{"version":3,"sources":["scripts/vendor.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","indexOf","risSimple","test","filter","sibling","cur","dir","createOptions","options","object","each","match","rnothtmlwhite","_","flag","Identity","v","Thrower","ex","adoptValue","value","resolve","reject","method","promise","done","fail","then","undefined","completed","removeEventListener","ready","Data","expando","uid","getData","data","rbrace","JSON","parse","dataAttr","key","name","replace","rmultiDash","toLowerCase","getAttribute","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","stripAndCollapse","tokens","join","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","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","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","matchedHandlers","matchedSelectors","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","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","classNames","hasClass","rreturn","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","rantiCache","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","errorHandlingConfig","config","isObject","isDefined","objectMaxDepth","minErrConfig","isValidObjectMaxDepth","NaN","isNumber","minErr","ErrorConstructor","regex","errRegExp","paramPrefix","template","templateArgs","sliceArgs","toDebugString","isString","jqLite","item","forEach","isPrimitive","isBlankObject","forEachSorted","reverseParams","iteratorFn","nextUid","setHashKey","h","$$hashKey","baseExtend","dst","objs","ii","jj","isDate","valueOf","isRegExp","isElement","toInt","str","inherit","create","identity","valueFn","hasCustomToString","isUndefined","isError","isScope","$evalAsync","$watch","isFile","isFormData","isBlob","isBoolean","isPromiseLike","isTypedArray","TYPED_ARRAY_REGEXP","isArrayBuffer","makeMap","items","nodeName_","element","lowercase","includes","array","arrayRemove","destination","copyRecurse","copyElement","stackSource","stackDest","ngMinErr","needsRecurse","copyType","buffer","byteOffset","copied","ArrayBuffer","byteLength","Uint8Array","re","lastIndex","simpleCompare","equals","o1","o2","keySet","t1","t2","getTime","createMap","charAt","array1","array2","startIndex","curryArgs","toJsonReplacer","toJson","pretty","stringify","fromJson","timezoneToOffset","timezone","fallback","ALL_COLONS","requestedTimezoneOffset","isNumberNaN","addDateMinutes","date","minutes","setMinutes","getMinutes","convertTimezoneToLocal","dateTimezoneOffset","getTimezoneOffset","timezoneOffset","startingTag","elemHtml","NODE_TYPE_TEXT","tryDecodeURIComponent","decodeURIComponent","parseKeyValue","keyValue","splitPoint","substring","toKeyValue","arrayValue","encodeUriQuery","encodeUriSegment","pctEncodeSpaces","getNgAttribute","ngAttr","ngAttrPrefixes","allowAutoBootstrap","currentScript","HTMLScriptElement","SVGScriptElement","srcs","getNamedItem","every","link","origin","angularInit","bootstrap","appElement","hasAttribute","candidate","querySelector","isAutoBootstrapAllowed","strictDi","modules","defaultConfig","doBootstrap","injector","$provide","debugInfoEnabled","$compileProvider","createInjector","invoke","scope","$apply","NG_ENABLE_DEBUG_INFO","NG_DEFER_BOOTSTRAP","angular","resumeBootstrap","extraModules","resumeDeferredBootstrap","reloadWithDebugInfo","reload","getTestability","rootElement","snake_case","separator","SNAKE_CASE_REGEXP","bindJQuery","originalCleanData","bindJQueryFired","jqName","jq","JQLitePrototype","isolateScope","controller","inheritedData","JQLite","$destroy","assertArg","reason","assertArgFn","acceptArrayAnnotation","assertNotHasOwnProperty","path","bindFnToScope","lastInstance","getBlockNodes","blockNodes","endNode","setupModuleLoader","ensure","$injectorMinErr","$$minErr","requires","configFn","info","invokeLater","provider","insertMethod","invokeQueue","moduleInstance","invokeLaterAndSetModuleName","recipeName","factoryFunction","$$moduleName","configBlocks","runBlocks","_invokeQueue","_configBlocks","_runBlocks","service","constant","decorator","directive","component","block","shallowCopy","serializeObject","seen","publishExternalAPI","callbacks","$$counter","$$csp","csp","$$encodeUriSegment","$$encodeUriQuery","$$lowercase","$$stringify","$$uppercase","uppercase","angularModule","$$sanitizeUri","$$SanitizeUriProvider","$CompileProvider","htmlAnchorDirective","inputDirective","textarea","form","formDirective","scriptDirective","selectDirective","optionDirective","ngBind","ngBindDirective","ngBindHtml","ngBindHtmlDirective","ngBindTemplate","ngBindTemplateDirective","ngClass","ngClassDirective","ngClassEven","ngClassEvenDirective","ngClassOdd","ngClassOddDirective","ngCloak","ngCloakDirective","ngController","ngControllerDirective","ngForm","ngFormDirective","ngHide","ngHideDirective","ngIf","ngIfDirective","ngInclude","ngIncludeDirective","ngInit","ngInitDirective","ngNonBindable","ngNonBindableDirective","ngPluralize","ngPluralizeDirective","ngRepeat","ngRepeatDirective","ngShow","ngShowDirective","ngStyle","ngStyleDirective","ngSwitch","ngSwitchDirective","ngSwitchWhen","ngSwitchWhenDirective","ngSwitchDefault","ngSwitchDefaultDirective","ngOptions","ngOptionsDirective","ngTransclude","ngTranscludeDirective","ngModel","ngModelDirective","ngList","ngListDirective","ngChange","ngChangeDirective","patternDirective","ngPattern","required","requiredDirective","ngRequired","minlength","minlengthDirective","ngMinlength","maxlength","maxlengthDirective","ngMaxlength","ngValue","ngValueDirective","ngModelOptions","ngModelOptionsDirective","ngIncludeFillContentDirective","ngAttributeAliasDirectives","ngEventDirectives","$anchorScroll","$AnchorScrollProvider","$animate","$AnimateProvider","$animateCss","$CoreAnimateCssProvider","$$animateJs","$$CoreAnimateJsProvider","$$animateQueue","$$CoreAnimateQueueProvider","$$AnimateRunner","$$AnimateRunnerFactoryProvider","$$animateAsyncRun","$$AnimateAsyncRunFactoryProvider","$browser","$BrowserProvider","$cacheFactory","$CacheFactoryProvider","$controller","$ControllerProvider","$document","$DocumentProvider","$$isDocumentHidden","$$IsDocumentHiddenProvider","$exceptionHandler","$ExceptionHandlerProvider","$filter","$FilterProvider","$$forceReflow","$$ForceReflowProvider","$interpolate","$InterpolateProvider","$interval","$IntervalProvider","$http","$HttpProvider","$httpParamSerializer","$HttpParamSerializerProvider","$httpParamSerializerJQLike","$HttpParamSerializerJQLikeProvider","$httpBackend","$HttpBackendProvider","$xhrFactory","$xhrFactoryProvider","$jsonpCallbacks","$jsonpCallbacksProvider","$location","$LocationProvider","$log","$LogProvider","$parse","$ParseProvider","$rootScope","$RootScopeProvider","$q","$QProvider","$$q","$$QProvider","$sce","$SceProvider","$sceDelegate","$SceDelegateProvider","$sniffer","$SnifferProvider","$templateCache","$TemplateCacheProvider","$templateRequest","$TemplateRequestProvider","$$testability","$$TestabilityProvider","$timeout","$TimeoutProvider","$window","$WindowProvider","$$rAF","$$RAFProvider","$$jqLite","$$jqLiteProvider","$$Map","$$MapProvider","$$cookieReader","$$CookieReaderProvider","angularVersion","jqNextId","jqId","cssKebabToCamel","kebabToCamel","MS_HACK_REGEXP","fnCamelCaseReplace","DASH_LOWERCASE_REGEXP","jqLiteIsTextNode","HTML_REGEXP","jqLiteAcceptsData","NODE_TYPE_ELEMENT","NODE_TYPE_DOCUMENT","jqLiteHasData","jqCache","ng339","jqLiteBuildFragment","TAG_NAME_REGEXP","XHTML_TAG_REGEXP","jqLiteParseHTML","SINGLE_TAG_REGEXP","jqLiteWrapNode","wrapper","argIsString","jqLiteMinErr","jqLiteAddNodes","jqLiteReady","jqLiteClone","jqLiteDealoc","onlyDescendants","removeIfEmptyData","expandoId","expandoStore","jqLiteOff","unsupported","jqLiteExpandoStore","removeHandler","listenerFns","MOUSE_EVENT_MAP","jqLiteRemoveData","createIfNecessary","jqLiteData","isSimpleSetter","isSimpleGetter","massGetter","jqLiteHasClass","jqLiteRemoveClass","cssClasses","existingClasses","newClasses","cssClass","jqLiteAddClass","jqLiteController","jqLiteInheritedData","names","NODE_TYPE_DOCUMENT_FRAGMENT","jqLiteEmpty","jqLiteRemove","jqLiteDocumentLoaded","action","getBooleanAttrName","booleanAttr","BOOLEAN_ATTR","BOOLEAN_ELEMENTS","getAliasedAttrName","ALIASED_ATTR","createEventHandler","eventHandler","eventFns","eventFnsLength","immediatePropagationStopped","originalStopImmediatePropagation","handlerWrapper","specialHandlerWrapper","defaultHandlerWrapper","specialMouseHandlerWrapper","jqLiteContains","$get","hashKey","nextUidFn","objType","NgMapShim","_keys","_values","_lastKey","_lastIndex","stringifyFn","Function","extractArgs","fnText","STRIP_COMMENTS","ARROW_ARG","FN_ARGS","anonFn","annotate","$inject","argDecl","FN_ARG_SPLIT","FN_ARG","underscore","modulesToLoad","supportObject","provider_","providerInjector","instantiate","providerCache","providerSuffix","enforceReturnValue","instanceInjector","factoryFn","enforce","$injector","instanceCache","serviceName","decorFn","origProvider","orig$get","origInstance","$delegate","loadModules","moduleFn","runInvokeQueue","invokeArgs","loadedModules","createInternalInjector","getService","caller","INSTANTIATING","injectionArgs","locals","$$annotate","isClass","msie","$$ngIsClass","Type","ctor","NgMap","protoInstanceInjector","loadNewModules","mods","autoScrollingEnabled","disableAutoScrolling","getFirstAnchor","some","getYOffset","scroll","yOffset","bottom","scrollIntoView","elemTop","scrollBy","elm","newVal","oldVal","mergeClasses","extractElementNode","ELEMENT_NODE","splitClasses","klass","prepareAnimateOptions","Browser","completeOutstandingRequest","outstandingRequestCount","outstandingRequestCallbacks","getHash","substr","cacheStateAndFireUrlChange","pendingLocation","fireStateOrUrlChange","cacheState","cachedState","getCurrentState","lastCachedState","lastHistoryState","prevLastHistoryState","lastBrowserUrl","urlChangeListeners","listener","history","pendingDeferIds","isMock","$$completeOutstandingRequest","$$incOutstandingRequestCount","notifyWhenNoOutstandingRequests","baseElement","sameState","sameBase","stripHash","urlChangeInit","onUrlChange","$$applicationDestroyed","$$checkUrlChange","baseHref","timeoutId","cancel","deferId","cacheFactory","cacheId","refresh","entry","freshEnd","staleEnd","nextEntry","prevEntry","caches","size","stats","capacity","Number","MAX_VALUE","lruHash","put","lruEntry","removeAll","destroy","UNINITIALIZED_VALUE","$$sanitizeUriProvider","parseIsolateBindings","directiveName","isController","LOCAL_REGEXP","bindings","definition","scopeName","bindingCache","$compileMinErr","mode","optional","attrName","parseDirectiveBindings","bindToController","assertValidDirectiveName","getDirectiveRequire","require","REQUIRE_PREFIX_REGEXP","getDirectiveRestrict","restrict","hasDirectives","Suffix","COMMENT_DIRECTIVE_REGEXP","CLASS_DIRECTIVE_REGEXP","ALL_OR_NOTHING_ATTRS","EVENT_HANDLER_ATTR_REGEXP","registerDirective","directiveFactory","directives","priority","registerComponent","makeInjectable","tElement","tAttrs","$element","$attrs","templateUrl","ddo","controllerAs","identifierForController","transclude","aHrefSanitizationWhitelist","regexp","imgSrcSanitizationWhitelist","strictComponentBindingsEnabled","TTL","onChangesTtl","commentDirectivesEnabledConfig","commentDirectivesEnabled","cssClassDirectivesEnabledConfig","cssClassDirectivesEnabled","flushOnChangesQueue","onChangesQueue","Attributes","attributesToCopy","$attr","$$element","setSpecialAttr","specialAttrHolder","attribute","removeNamedItem","setNamedItem","safeAddClass","$compileNodes","transcludeFn","maxPriority","ignoreDirective","previousCompileContext","compositeLinkFn","compileNodes","$$addScopeClass","cloneConnectFn","needsNewScope","$parent","$new","parentBoundTranscludeFn","transcludeControllers","futureParentElement","$$boundTransclude","detectNamespaceForChildElements","$linkNode","wrapTemplate","controllerName","instance","$$addScopeInfo","parentElement","nodeList","$rootElement","nodeLinkFn","childLinkFn","childScope","childBoundTranscludeFn","stableNodeList","nodeLinkFnFound","nodeListLength","linkFns","transcludeOnThisElement","createBoundTranscludeFn","templateOnThisElement","linkFnFound","notLiveList","mergeConsecutiveTextNodes","collectDirectives","applyDirectivesToNode","terminal","previousBoundTranscludeFn","boundTranscludeFn","transcludedScope","cloneFn","controllers","containingScope","$$transcluded","boundSlots","$$slots","slotName","attrsMap","addDirective","directiveNormalize","nName","ngAttrName","isNgAttr","nAttrs","attrStartName","attrEndName","NG_ATTR_BINDING","PREFIX_REGEXP","multiElementMatch","MULTI_ELEMENT_DIR_RE","directiveIsMultiElement","addAttrInterpolateDirective","animVal","addTextInterpolateDirective","NODE_TYPE_COMMENT","collectCommentDirectives","byPriority","groupScan","attrStart","attrEnd","groupElementsLinkFnWrapper","linkFn","compilationGenerator","eager","compileNode","templateAttrs","jqCollection","originalReplaceDirective","preLinkFns","postLinkFns","addLinkFns","pre","post","newIsolateScopeDirective","$$isolateScope","cloneAndAnnotateFn","linkNode","controllersBoundTransclude","cloneAttachFn","hasElementTranscludeDirective","elementControllers","scopeToChild","slotTranscludeFn","controllerScope","scopeBindingInfo","newScopeDirective","isSlotFilled","controllerDirectives","setupControllers","templateDirective","$$originalDirective","$$isolateBindings","initializeDirectiveBindings","removeWatches","$on","controllerDirective","$$bindings","bindingInfo","getControllers","controllerInstance","$onChanges","initialChanges","$onInit","$doCheck","$onDestroy","invokeLinkFn","$postLink","$template","directiveValue","terminalPriority","nonTlbTranscludeDirective","hasTranscludeDirective","hasTemplate","$compileNode","replaceDirective","childTranscludeFn","didScanForMultipleTransclusion","mightHaveMultipleTransclusionError","$$start","$$end","assertNoDuplicate","$$tlb","candidateDirective","scanningIndex","$$createComment","slots","slotMap","filledSlots","elementSelector","filled","$$newScope","denormalizeTemplate","removeComments","templateNamespace","newTemplateAttrs","templateDirectives","unprocessedDirectives","markDirectiveScope","mergeTemplateAttributes","compileTemplateUrl","inheritType","dataName","property","controllerKey","$scope","$transclude","newScope","tDirectives","startAttrName","endAttrName","multiElement","srcAttr","dstAttr","$set","afterTemplateNodeLinkFn","afterTemplateChildLinkFn","linkQueue","beforeTemplateCompileNode","origAsyncDirective","derivedSyncDirective","tempTemplateAttrs","beforeTemplateLinkNode","linkRootElement","$$destroyed","oldClasses","ignoreChildLinkFn","previousDirective","wrapModuleNameIfDefined","moduleName","interpolateFn","templateNode","templateNodeParent","hasCompileParent","$$addBindingClass","$$addBindingInfo","expressions","getTrustedContext","attrNormalizedName","HTML","RESOURCE_URL","MEDIA_URL","URL","trustedContext","mustHaveExpression","allOrNothing","$$observers","newValue","$$inter","$$scope","oldValue","$updateClass","elementsToRemove","newNode","firstElementToRemove","removeCount","j2","annotation","strictBindingsCheck","recordChanges","previousValue","$$postDigest","changes","triggerOnChangesHook","SimpleChange","removeWatchCollection","lastValue","parentGet","parentSet","removeWatch","$observe","_UNINITIALIZED_VALUE","literal","assign","parentValueWatch","parentValue","$stateful","$watchCollection","isLiteral","initialValue","SIMPLE_ATTR_NAME","$normalize","$addClass","classVal","$removeClass","toAdd","tokenDifference","toRemove","writeAttr","booleanKey","aliasedKey","observer","trimmedSrcset","srcPattern","rawUris","nbrUrisWith2parts","floor","innerIdx","getTrustedMediaUrl","lastTuple","listeners","startSymbol","endSymbol","binding","isolated","noTemplate","comment","previous","SPECIAL_CHARS_REGEXP","str1","str2","tokens1","tokens2","outer","jqNodes","ident","CNTRL_REG","register","addIdentifier","expression","later","$controllerMinErr","controllerPrototype","changeListener","exception","cause","serializeValue","toISOString","toSerialize","topLevel","defaultHttpResponseTransform","tempData","JSON_PROTECTION_PREFIX","hasJsonContentType","APPLICATION_JSON","isJsonLike","$httpMinErr","jsonStart","JSON_START","JSON_ENDS","parseHeaders","fillInParsed","line","headerVal","headerKey","headersGetter","headersObj","transformData","defaults","transformResponse","transformRequest","d","common","Accept","CONTENT_TYPE_APPLICATION_JSON","patch","xsrfCookieName","xsrfHeaderName","paramSerializer","jsonpCallbackParam","useApplyAsync","interceptorFactories","interceptors","xsrfWhitelistedOrigins","requestConfig","chainInterceptors","thenFn","rejectFn","executeHeaderFns","headerContent","processedHeaders","headerFn","mergeHeaders","defHeaderName","lowercaseDefHeaderName","reqHeaderName","defHeaders","reqHeaders","defaultHeadersIteration","serverRequest","reqData","withCredentials","sendReq","resp","requestInterceptors","responseInterceptors","reversedInterceptors","interceptor","request","requestError","responseError","createShortMethods","createShortMethodsWithData","createApplyHandlers","eventHandlers","applyHandlers","callEventHandler","$applyAsync","$$phase","headersString","xhrStatus","resolveHttpPromise","resolvePromise","resolvePromiseWithResult","removePendingReq","pendingRequests","cachedResp","isJsonp","getTrustedResourceUrl","buildUrl","sanitizeJsonpCallbackParam","defaultCache","xsrfValue","urlIsAllowedOrigin","uploadEventHandlers","serializedParams","cbKey","interceptorFactory","urlIsAllowedOriginFactory","createHttpBackend","createXhr","$browserDefer","rawDocument","jsonpReq","callbackPath","wasCalled","timeoutRequest","abortedByTimeout","jsonpDone","completeRequest","createCallback","getResponse","removeCallback","urlResolve","requestAborted","requestTimeout","ontimeout","upload","$$timeoutId","unescapeText","escapedStartRegexp","escapedEndRegexp","constantWatchDelegate","objectEquality","constantInterp","unwatch","parseStringifyInterceptor","contextAllowsConcatenation","getTrusted","$interpolateMinErr","interr","unescapedText","exp","$$watchDelegate","endIndex","parseFns","singleExpression","textLength","expressionPositions","startSymbolLength","endSymbolLength","compute","throwNoconcat","$watchGroup","oldValues","currValue","invokeApply","hasParams","iteration","skipApply","$$intervalId","intervals","$intervalMinErr","markQExceptionHandled","encodePath","segments","decodePath","html5Mode","parseAbsoluteUrl","absoluteUrl","locationObj","parsedUrl","$$protocol","$$host","hostname","$$port","port","DEFAULT_PORTS","parseAppUrl","DOUBLE_SLASH_REGEX","$locationMinErr","prefixed","pathname","$$path","$$search","search","$$hash","startsWith","stripBaseUrl","trimEmptyHash","stripFile","lastIndexOf","serverBase","LocationHtml5Url","appBase","appBaseNoFile","basePrefix","$$html5","$$parse","pathUrl","$$compose","$$url","$$absUrl","$$urlUpdatedByLocation","$$parseLinkUrl","relHref","appUrl","prevAppUrl","rewrittenUrl","LocationHashbangUrl","hashPrefix","removeWindowsDriveName","firstPathSegmentMatch","windowsFilePathExp","withoutHashUrl","withoutBaseUrl","LocationHashbangInHtml5Url","locationGetter","locationGetterSetter","preprocess","requireBase","rewriteLinks","setBrowserUrlWithFallback","oldUrl","oldState","$$state","afterLocationChange","$broadcast","absUrl","LocationMode","initialUrl","IGNORE_URI_REGEXP","absHref","initializing","newUrl","newState","$digest","currentReplace","$$replace","urlOrStateChanged","debug","debugEnabled","formatError","formatStackTrace","sourceURL","consoleLog","logFn","log","navigator","userAgent","getStringValue","ifDefined","plusFn","r","isStateless","filterName","isPure","parentIsPure","AST","MemberExpression","UnaryExpression","PURITY_ABSOLUTE","BinaryExpression","CallExpression","PURITY_RELATIVE","findConstantAndWatchExpressions","ast","allConstants","argsToWatch","isStatelessFilter","astIsPure","Program","Literal","toWatch","right","LogicalExpression","ConditionalExpression","alternate","consequent","Identifier","callee","AssignmentExpression","ArrayExpression","ObjectExpression","ThisExpression","LocalsExpression","getInputs","lastExpression","isAssignable","assignableAST","NGValueParameter","isConstant","ASTCompiler","ASTInterpreter","Parser","lexer","astCompiler","getValueOf","objectValueOf","identStart","identContinue","literals","true","false","null","addLiteral","literalName","literalValue","setIdentifierFns","identifierStart","identifierContinue","interceptorFn","parsedExpression","cacheKey","Lexer","$parseOptions","parser","addWatchDelegate","addInterceptor","$$getAst","getAst","expressionInputDirtyCheck","oldValueOfValue","compareObjectIdentity","inputsWatchDelegate","prettyPrintExpression","lastResult","inputExpressions","inputs","oldInputValueOf","newInputValue","oldInputValueOfValues","oldInputValues","changed","oneTimeWatchDelegate","unwatchIfDone","isDone","oneTimeWatch","useInputs","isAllDefined","$$intercepted","$$interceptor","allDefined","oneTime","chainedInterceptor","$$pure","noUnsafeEval","isIdentifierStart","isIdentifierContinue","errorOnUnhandledRejections","qFactory","nextTick","exceptionHandler","Promise","rejectPromise","notifyPromise","processQueue","pending","processScheduled","markQStateExceptionHandled","$$passToExceptionHandler","queueSize","processChecks","checkQueue","toCheck","isStateExceptionHandled","errorMessage","scheduleProcessQueue","$$reject","$qMinErr","$$resolve","doResolve","doReject","doNotify","handleCallback","resolver","callbackOutput","errback","progressBack","promises","counter","race","$Q","resolveFn","finally","pur","q","webkitRequestAnimationFrame","webkitCancelAnimationFrame","webkitCancelRequestAnimationFrame","rafSupported","supported","createChildScopeClass","ChildScope","$$watchers","$$nextSibling","$$childHead","$$childTail","$$listeners","$$listenerCount","$$watchersCount","$id","$$ChildScope","$$suspended","$rootScopeMinErr","lastDirtyWatch","applyAsyncId","digestTtl","destroyChildScope","$event","currentScope","cleanUpScope","$$prevSibling","$root","Scope","beginPhase","phase","clearPhase","incrementWatchersCount","decrementListenerCount","initWatchVal","flushApplyAsync","applyAsyncQueue","scheduleApplyAsync","isolate","child","watchExp","watcher","$$digestWatchIndex","watchExpressions","watchGroupAction","changeReactionScheduled","firstRun","newValues","deregisterFns","shouldCall","unwatchFn","$watchCollectionInterceptor","_value","newLength","bothNaN","newItem","oldItem","internalArray","oldLength","changeDetected","internalObject","$watchCollectionAction","initRun","veryOldValue","trackVeryOldValue","changeDetector","watch","watchers","dirty","logIdx","asyncTask","ttl","asyncQueue","watchLog","asyncQueuePosition","traverseScopesLoop","postDigestQueuePosition","postDigestQueue","$suspend","$isSuspended","$resume","eventName","$eval","$applyAsyncExpression","namedListeners","indexOfListener","$emit","targetScope","listenerArgs","$$asyncQueue","$$postDigestQueue","$$applyAsyncQueue","uri","isMediaUrl","normalizedVal","snakeToCamel","UNDERSCORE_LOWERCASE_REGEXP","adjustMatcher","$sceMinErr","escapeForRegexp","adjustMatchers","adjustedMatchers","SCE_CONTEXTS","resourceUrlWhitelist","resourceUrlBlacklist","matchUrl","urlIsSameOrigin","urlIsSameOriginAsBaseUrl","isResourceUrlAllowedByPolicy","allowed","generateHolderType","Base","holderType","trustedValue","$$unwrapTrustedValue","trustAs","Constructor","byType","maybeTrusted","trustedValueHolderBase","htmlSanitizer","CSS","JS","sce","isEnabled","parseAs","enumValue","lName","eventSupport","isNw","nw","isChromePackagedApp","chrome","app","runtime","hasHistoryPushState","pushState","android","boxee","bodyStyle","transitions","animations","hasEvent","divElm","httpOptions","handleRequestFn","tpl","ignoreRequestError","handleError","$templateRequestMinErr","totalPendingRequests","transformer","testability","findBindings","opt_exactMatch","dataBinding","bindingName","findModels","prefixes","attributeEquals","getLocation","setLocation","whenStable","deferreds","$timeoutMinErr","urlParsingNode","requestUrl","urlsAreSameOrigin","originUrl","getBaseUrl","whitelistedOriginUrls","parsedAllowedOriginUrls","url1","url2","baseURI","baseUrlParsingNode","$$CookieReader","safeGetCookie","cookie","safeDecodeURIComponent","lastCookies","lastCookieString","cookieArray","currentCookieString","currencyFilter","dateFilter","filterFilter","jsonFilter","limitToFilter","lowercaseFilter","numberFilter","orderByFilter","uppercaseFilter","comparator","anyPropertyKey","predicateFn","matchAgainstAnyProp","expressionType","getTypeForFilter","createPredicateFn","shouldMatchPrimitives","actual","expected","deepCompare","dontMatchWholeObject","actualType","expectedType","expectedVal","matchAnyProperty","actualVal","$locale","formats","NUMBER_FORMATS","amount","currencySymbol","fractionSize","CURRENCY_SYM","PATTERNS","maxFrac","currencySymbolRe","formatNumber","GROUP_SEP","DECIMAL_SEP","number","numStr","digits","numberOfIntegerDigits","zeros","exponent","ZERO_CHAR","MAX_DIGITS","roundNumber","parsedNumber","minFrac","fractionLen","min","roundAt","digit","k","carry","reduceRight","groupSep","decimalSep","isInfinity","isZero","abs","formattedText","integerLen","decimals","reduce","lgSize","gSize","negPre","negSuf","posPre","posSuf","padNumber","negWrap","neg","dateGetter","dateStrGetter","shortForm","standAlone","propPrefix","timeZoneGetter","zone","paddedZone","getFirstThursdayOfYear","year","dayOfWeekOnFirst","getDay","getThursdayThisWeek","datetime","getFullYear","getMonth","getDate","weekGetter","firstThurs","thisThurs","round","ampmGetter","getHours","AMPMS","eraGetter","ERAS","longEraGetter","ERANAMES","jsonStringToDate","R_ISO8601_STR","tzHour","tzMin","dateSetter","setUTCFullYear","setFullYear","timeSetter","setUTCHours","setHours","ms","format","DATETIME_FORMATS","NUMBER_STRING","DATE_FORMATS_SPLIT","DATE_FORMATS","spacing","limit","begin","Infinity","sliceFn","processPredicates","sortPredicates","predicate","descending","objectValue","getPredicateValue","defaultCompare","v1","v2","type1","type2","value1","value2","sortPredicate","reverseOrder","compareFn","getComparisonObject","tieBreaker","predicateValues","predicates","doComparison","compareValues","ngDirective","nullFormRenameControl","control","$name","FormController","$$controls","$error","$$success","$pending","$dirty","$pristine","$valid","$invalid","$submitted","$$parentForm","nullFormCtrl","$$animate","setupValidity","$$classCache","INVALID_CLASS","VALID_CLASS","addSetValidityMethod","createAndSet","ctrl","unsetAndCleanup","unset","isObjectEmpty","cachedToggleClass","switchValue","toggleValidationCss","validationErrorKey","isValid","$setValidity","PENDING_CLASS","combinedState","stringBasedInputType","$formatters","$isEmpty","textInputType","baseInputType","composing","ev","ngTrim","$viewValue","$$hasNativeValidators","$setViewValue","deferListener","origValue","PARTIAL_VALIDATION_TYPES","PARTIAL_VALIDATION_EVENTS","validity","VALIDITY_STATE_PROPERTY","origBadInput","badInput","origTypeMismatch","typeMismatch","$render","weekParser","isoWeek","existingDate","WEEK_REGEXP","week","hours","seconds","milliseconds","addDays","getSeconds","getMilliseconds","createDateParser","mapping","iso","previousDate","ISO_DATE_REGEXP","yyyy","MM","dd","HH","mm","ss","sss","part","createDateInputType","parseDate","isValidDate","parseObservedDateValue","parseDateAndConvertTimeZoneToLocal","$options","getOption","previousTimezone","parsedDate","badInputChecker","$parsers","$$parserName","ngModelMinErr","ngMin","minVal","$validators","$validate","ngMax","maxVal","parserName","nativeValidation","numberFormatterParser","NUMBER_REGEXP","parseNumberAttrVal","isNumberInteger","countDecimals","numString","decimalSymbolIndex","isValidForStep","viewValue","stepBase","isNonIntegerValue","isNonIntegerStepBase","isNonIntegerStep","valueDecimals","stepBaseDecimals","stepDecimals","decimalCount","multiplier","pow","numberInputType","modelValue","ngStep","stepVal","rangeInputType","setInitialValueAndObserver","htmlAttrName","changeFn","minChange","$modelValue","supportsRange","elVal","maxChange","stepChange","hasMinAttr","hasMaxAttr","hasStepAttr","originalRender","rangeUnderflow","rangeOverflow","stepMismatch","urlInputType","URL_REGEXP","emailInputType","email","EMAIL_REGEXP","radioInputType","doTrim","parseConstantExpr","parseFn","checkboxInputType","trueValue","ngTrueValue","falseValue","ngFalseValue","classDirective","arrayDifference","classString","toClassString","classValue","indexWatchExpression","addClasses","digestClassCounts","removeClasses","updateClasses","oldClassString","newClassString","oldClassArray","newClassArray","toRemoveArray","toAddArray","toRemoveString","toAddString","classArray","classesToUpdate","classCounts","ngClassIndexWatchAction","newModulo","oldModulo","ngClassWatchAction","$index","NgModelController","$$rawModelValue","$asyncValidators","$viewChangeListeners","$untouched","$touched","defaultModelOptions","$$updateEvents","$$updateEventHandler","$$parsedNgModel","$$parsedNgModelAssign","$$ngModelGet","$$ngModelSet","$$pendingDebounce","$$parserValid","$$currentValidationRunId","$$attr","$$timeout","$$exceptionHandler","setupModelWatcher","$$setModelValue","ModelOptions","$$options","setOptionSelectedStatus","optionEl","REGEX_STRING_REGEXP","documentMode","rules","ngCspElement","ngCspAttribute","noInlineStyle","name_","NODE_TYPE_ATTRIBUTE","full","major","minor","dot","codeName","Node","lowercasedName","isBooleanAttr","$dv","multiple","arg1","arg2","nodeCount","addHandler","noEventListener","onFn","replaceNode","wrapNode","newElement","condition","classCondition","nextElementSibling","extraParameters","dummyEvent","eventFnsCopy","handlerArgs","arg3","nanKey","_idx","_transformKey","delete","$animateMinErr","NG_ANIMATE_CLASSNAME","postDigestElements","updateData","handleCSSClassChanges","existing","addRemoveClassesPostDigest","classesAdded","classesRemoved","pin","domOperation","from","runner","classNameFilter","customFilter","$$registeredAnimations","filterFn","reservedRegex","domInsert","afterElement","afterNode","previousElementSibling","enter","move","leave","addclass","setClass","tempClasses","waitForTick","waitQueue","passed","AnimateRunner","setHost","rafTick","timeoutTick","_doneCallbacks","_tick","_state","INITIAL_STATE","DONE_PENDING_STATE","DONE_COMPLETE_STATE","chain","runners","getPromise","resolveHandler","rejectHandler","pause","resume","_resolve","initialOptions","applyAnimationContents","closed","$$prepared","cleanupStyles","isFirstChange","domNode","Content-Type","[","{","callbackId","called","callbackMap","PATH_MATCH","http","https","ftp","locationPrototype","paramValue","Location","$parseMinErr","OPERATORS","ESCAPE","f","'","\"","lex","readString","peek","readNumber","peekMultichar","readIdent","isWhitespace","ch2","ch3","op1","op2","op3","throwError","chars","codePointAt","isValidIdentifierStart","isValidIdentifierContinue","cp","cp1","cp2","isExpOperator","colStr","peekCh","quote","rawString","hex","rep","ExpressionStatement","Property","program","expressionStatement","expect","filterChain","assignment","ternary","logicalOR","consume","logicalAND","equality","relational","additive","multiplicative","unary","primary","arrayDeclaration","selfReferential","parseArguments","baseExpression","peekToken","kind","e1","e2","e3","e4","peekAhead","$locals","nextId","vars","own","assignable","stage","computing","recurse","return_","generateFunction","fnKey","intoId","watchId","fnString","USE","STRICT","filterPrefix","watchFns","varsPrefix","section","nameId","recursionFn","skipWatchIdCheck","if_","lazyAssign","computedMember","lazyRecurse","plus","getHasOwnProperty","isNull","nonComputedMember","notNull","member","SAFE_IDENTIFIER","UNSAFE_CHARACTERS","stringEscapeFn","stringEscapeRegex","c","rhs","lhs","unary+","unary-","unary!","binary+","binary-","binary*","binary/","binary%","binary===","binary!==","binary==","binary!=","binary<","binary>","binary<=","binary>=","binary&&","binary||","ternary?:","yy","y","MMMM","MMM","M","LLLL","H","hh","EEEE","EEE","Z","ww","G","GG","GGG","GGGG","xlinkHref","propName","defaultLinkFn","normalized","htmlAttr","$addControl","$$renameControl","$removeControl","$setDirty","$setPristine","$setSubmitted","$$setSubmitted","SUBMITTED_CLASS","$rollbackViewValue","$commitViewValue","newName","oldName","PRISTINE_CLASS","DIRTY_CLASS","$setUntouched","rootForm","formDirectiveFactory","isNgForm","getSetter","formElement","nameAttr","ctrls","handleFormSubmission","parentFormCtrl","DATE_REGEXP","DATETIMELOCAL_REGEXP","MONTH_REGEXP","TIME_REGEXP","inputType","datetime-local","month","range","CONSTANT_VALUE_REGEXP","updateElementValue","propValue","tplAttr","$compile","templateElement","ngBindHtmlGetter","ngBindHtmlWatch","getTrustedHtml","forceAsyncEvents","previousElements","srcExp","onloadExp","autoScrollExp","autoscroll","previousElement","currentElement","changeCounter","cleanupLastIncludeContent","afterAnimation","thisChangeId","trimValues","UNTOUCHED_CLASS","TOUCHED_CLASS","EMPTY_CLASS","NOT_EMPTY_CLASS","$$initGetterSetters","invokeModelGetter","invokeModelSetter","$$$p","$$updateEmptyClasses","$setTouched","$$lastCommittedViewValue","prevValid","prevModelValue","allowInvalid","$$runValidators","allValid","$$writeModelToScope","doneCallback","processParseErrors","errorKey","setValidity","processSyncValidators","syncValidatorsValid","validator","Boolean","processAsyncValidators","validatorPromises","validationDone","localValidationRunId","$$parseAndValidate","writeToModelIfNeeded","$$debounceViewValueCommit","debounceDelay","$overrideModelOptions","createChild","$$setUpdateOnEvents","$processModelValue","$$format","formatters","modelCtrl","formCtrl","optionsCtrl","setTouched","DEFAULT_REGEXP","inheritAll","updateOnDefault","updateOn","debounce","getterSetter","NgModelOptionsController","$$attrs","parentOptions","parentCtrl","modelOptionsDefinition","ngOptionsMinErr","NG_OPTIONS_REGEXP","parseOptionsExpression","optionsExp","selectElement","Option","selectValue","label","group","getOptionValuesKeys","optionValues","optionValuesKeys","keyName","itemKey","valueName","selectAs","trackBy","selectAsFn","viewValueFn","trackByFn","getTrackByValueFn","getTrackByValue","getLocals","displayFn","groupByFn","disableWhenFn","valuesFn","getWatchables","watchedArray","optionValuesLength","disableWhen","getOptions","optionItems","selectValueMap","optionItem","getOptionFromViewValue","getViewValueFromOption","ngOptionsPostLink","addOptionElement","optionElement","optionTemplate","updateOptionElement","getAndUpdateSelectedOption","updateOptions","selectCtrl","readValue","groupElementMap","groupElement","optGroupTemplate","listFragment","ngModelCtrl","nextValue","isNotPrimitive","hasEmptyOption","emptyOption","providedEmptyOption","unknownOption","generateUnknownOptionValue","writeValue","selectedOptions","selectedValues","selections","selectedOption","removeUnknownOption","selectUnknownOrEmptyOption","unselectEmptyOption","registerOption","optionScope","needsRerender","$isEmptyOptionSelected","BRACE","IS_WHEN","updateElementText","newText","lastCount","numberExp","whenExp","whens","whensExpFns","braceReplacement","watchRemover","attributeName","tmpMatch","whenKey","countIsNaN","pluralCat","whenExpFn","NG_REMOVED","ngRepeatMinErr","updateScope","valueIdentifier","keyIdentifier","arrayLength","$first","$last","$middle","$odd","$even","getBlockStart","getBlockEnd","ngRepeatEndComment","aliasAs","trackByExp","trackByExpGetter","trackByIdExpFn","trackByIdArrayFn","trackByIdObjFn","hashFnLocals","lastBlockMap","nextNode","collectionLength","trackById","trackByIdFn","collectionKeys","nextBlockOrder","previousNode","nextBlockMap","blockKey","NG_HIDE_CLASS","NG_HIDE_IN_PROGRESS_CLASS","newStyles","oldStyles","cases","ngSwitchController","watchExpr","selectedTranscludes","selectedElements","previousLeaveAnimations","selectedScopes","spliceFactory","selectedTransclude","caseElement","selectedScope","anchor","ngSwitchWhenSeparator","whenCase","ngTranscludeMinErr","fallbackLinkFn","ngTranscludeCloneAttachFn","notWhitespace","useFallbackContent","ngTranscludeSlot","noopNgModelController","SelectController","scheduleRender","renderScheduled","scheduleViewValueUpdate","renderAfter","updateScheduled","optionsMap","renderUnknownOption","unknownVal","updateUnknownOption","selectEmptyOption","realVal","hasOption","currentlySelectedOption","hashedVal","addOption","removeOption","$hasEmptyOption","$isUnknownOptionSelected","optionAttrs","interpolateValueFn","interpolateTextFn","removal","previouslySelected","removeValue","selectPreLink","shouldBeSelected","currentlySelected","lastView","lastViewRef","selectPostLink","selectCtrlName","patternExp","intVal","getDecimals","getVF","opt_precision","PLURAL_CATEGORY","ZERO","ONE","TWO","FEW","MANY","OTHER","DAY","FIRSTDAYOFWEEK","MONTH","SHORTDAY","SHORTMONTH","STANDALONEMONTH","WEEKENDRANGE","fullDate","longDate","medium","mediumDate","mediumTime","short","shortDate","shortTime","minInt","localeID","vf","packageStyles","pendClasses","isPrefix","removeFromArray","stripCommentsFromElement","$$addClass","$$removeClass","applyAnimationClassesFactory","prepareAnimationOptions","$$domOperationFired","applyAnimationStyles","applyAnimationFromStyles","applyAnimationToStyles","mergeAnimationDetails","oldAnimation","newAnimation","newOptions","resolveElementClasses","preparationClasses","concatWithSpace","realDomOperation","splitClassesToLookup","ADD_CLASS","REMOVE_CLASS","flags","allow","REMOVE_CLASS_SUFFIX","ADD_CLASS_SUFFIX","getDomNode","applyGeneratedPreparationClasses","EVENT_CLASS_PREFIX","clearGeneratedClasses","activeClasses","blockKeyframeAnimations","applyBlock","ANIMATION_PROP","ANIMATION_PLAYSTATE_KEY","applyInlineStyle","styleTuple","getCssKeyframeDurationStyle","ANIMATION_DURATION_PROP","getCssDelayStyle","isKeyframeAnimation","ANIMATION_DELAY_PROP","TRANSITION_DELAY_PROP","computeCssStyles","detectedStyles","formalStyleName","actualStyleName","parseMaxTime","maxValue","truthyTimingValue","getCssTransitionDurationStyle","applyOnlyDuration","TRANSITION_PROP","DURATION_KEY","registerRestorableStyles","backup","TRANSITIONEND_EVENT","ANIMATIONEND_EVENT","ACTIVE_CLASS_SUFFIX","PREPARE_CLASS_SUFFIX","NG_ANIMATE_CHILDREN_DATA","CSS_PREFIX","ontransitionend","onwebkittransitionend","onanimationend","onwebkitanimationend","PROPERTY_KEY","DELAY_KEY","TIMING_KEY","ANIMATION_ITERATION_COUNT_KEY","SAFE_FAST_FORWARD_DURATION_VALUE","TRANSITION_DURATION_PROP","helpers","blockTransitions","$$rAFSchedulerFactory","scheduler","tasks","cancelFn","waitUntilQuiet","$$AnimateChildrenDirective","setData","ngAnimateChildren","ANIMATE_TIMER_KEY","ONE_SECOND","ELAPSED_TIME_MAX_DECIMAL_PLACES","CLOSING_TIME_BUFFER","DETECT_CSS_PROPERTIES","transitionDuration","transitionDelay","transitionProperty","animationDuration","animationDelay","DETECT_STAGGER_CSS_PROPERTIES","$AnimateCssProvider","$animateProvider","$$animateCache","$$rAFScheduler","computeCachedCssStyles","allowNoDuration","timings","hasDuration","computeCachedCssStaggerStyles","stagger","staggerCacheKey","staggerClassName","rafWaitQueue","flush","pageWidth","computeTimings","aD","tD","maxDelay","maxDuration","applyAnimationClasses","endFn","close","rejected","animationClosed","animationCompleted","animationPaused","$$skipPreparationClasses","temporaryStyles","restoreStyles","setProperty","removeProperty","onDone","onAnimationProgress","animationTimerData","applyBlocking","blockTransition","blockKeyframeAnimation","closeAndReturnNoopAnimator","$$willAnimate","$manualTimeStamp","elapsedTime","toFixed","maxDelayTime","triggerAnimationStart","recalculateTimingStyles","fullClassName","relativeDelay","hasTransitions","hasAnimations","applyAnimationDelay","delayStyle","maxDurationTime","easeProp","easeVal","timerTime","endTime","animationsData","setupFallbackTimer","currentTimerData","expectedEndTime","onAnimationExpired","playPause","playAnimation","maxStagger","itemIndex","runnerHost","isStructural","structural","structuralClassName","addRemoveClassName","applyClassesEarly","hasToStyles","containsKeyframeAnimation","keyframeStyle","containsCachedAnimationWithoutDuration","staggerVal","transitionStyle","durationStyle","staggerIndex","isFirst","skipBlocking","hasTransitionAll","applyTransitionDuration","applyAnimationDuration","applyTransitionDelay","$$AnimateCssDriverProvider","$$animationProvider","isDocumentFragment","drivers","NG_ANIMATE_SHIM_CLASS_NAME","NG_ANIMATE_ANCHOR_CLASS_NAME","NG_OUT_ANCHOR_CLASS_NAME","NG_IN_ANCHOR_CLASS_NAME","filterCssClasses","getUniqueValues","prepareAnchoredAnimation","outAnchor","inAnchor","calculateAnchorStyles","coords","bodyNode","prepareOutAnimation","animator","getClassVal","prepareInAnimation","endingClasses","startingClasses","rootBodyElement","animatorIn","animatorOut","startingAnimator","currentAnimation","prepareFromToAnchorAnimation","anchors","fromAnimation","prepareRegularAnimation","toAnimation","anchorAnimations","outElement","inElement","animationRunners","animationDetails","rootNode","$$AnimateJsProvider","lookupAnimations","flagMap","animationFactory","applyOptions","executeAnimationFn","classesToAdd","classesToRemove","groupEventedAnimations","fnName","operations","ani","endProgressCb","resolved","onAnimationComplete","cancelled","packageAnimations","animateFn","afterFn","beforeFn","onComplete","endAnimations","closeActiveAnimations","$$AnimateJsDriverProvider","prepareAnimation","endFnFactory","NG_ANIMATE_ATTR_NAME","NG_ANIMATE_PIN_DATA","$$AnimateQueueProvider","getEventData","makeTruthyCssClassMap","ONE_SPACE","hasMatchingClasses","currentClassString","currentClassMap","isAllowed","ruleType","previousAnimation","hasAnimationClasses","and","PRE_DIGEST_STATE","RUNNING_STATE","nA","nR","cA","cR","$$animation","removeFromDisabledElementsLookup","disabledElementsLookup","postDigestTaskFactory","postDigestCalled","normalizeAnimationDetails","findCallbacks","targetParentNode","targetNode","entries","callbackRegistry","filterFromRegistry","matchContainer","matchCallback","containerNode","isMatch","cleanupEventListeners","queueAnimation","originalElement","notifyProgress","runInNextPostDigestOrNow","animationsEnabled","isAnimatableByFilter","isAnimatableClassName","documentHidden","skipAnimations","existingAnimation","activeAnimationsLookup","hasExistingAnimation","areAnimationsAllowed","closeChildAnimations","skipAnimationFlag","cancelAnimationFlag","joinAnimationFlag","isValidAnimation","clearElementAnimationState","markElementAnimationState","animationCancelled","realRunner","animateChildren","bodyNodeDetected","rootNodeDetected","parentAnimationDetected","elementDisabled","parentHost","details","parentNodeDisabled","allowAnimation","deregisterWatch","isEmpty","eventType","argCount","hasElement","$$AnimateCacheProvider","KEY","parentCounter","parentID","total","$$AnimationProvider","setRunner","RUNNER_STORAGE_KEY","removeRunner","getRunner","NG_ANIMATE_REF_ATTR","PREPARE_CLASSES_KEY","sortAnimations","processNode","processed","elementNode","lookup","parentEntry","tree","flatten","remainingLevelEntries","nextLevelEntries","row","childEntry","animationQueue","getAnchorNodes","SELECTOR","groupAnimations","preparedAnimations","refLookup","enterOrMove","anchorNodes","direction","animationID","usedIndicesLookup","anchorGroups","indexKey","lookupKey","beforeStart","cssClassesIntersection","out","in","aa","invokeFirstDriver","driverName","driver","prepareClassName","updateAnimationRunners","newRunner","update","handleDestroyedElement","groupedAnimations","toBeSortedAnimations","animationEntry","extraClasses","startAnimationFn","closeFn","targetElement","operation","animationRunner","finalAnimations","innerArray","ngAnimateSwapDirective","previousScope","ngAnimateSwap","ancestors","objectKeys","ceil","inheritParams","currentParams","newParams","$current","$to","parentParams","inherited","inheritList","equalForKeys","filterByKeys","filtered","pick","omit","silenceUncaughtInPromise","$Resolve","VISIT_IN_PROGRESS","VISIT_DONE","NOTHING","NO_DEPENDENCIES","NO_LOCALS","NO_PARENT","$$promises","$$values","study","invocables","visit","visited","cycle","plan","isResolve","invocableKeys","merged","$$inheritedValues","resolution","$$failure","invocable","onfailure","invocation","proceed","waitParams","dep","TemplateFactoryProvider","shouldUnsafelyUseHttp","TemplateFactory","fromConfig","fromString","fromUrl","templateProvider","fromProvider","UrlMatcher","parentMatcher","addParameter","paramNames","$$UMFP","Param","quoteRegExp","squash","surroundPattern","matchDetails","isSearch","segment","cfg","caseInsensitive","placeholder","searchPlaceholder","$$new","ParamSet","isOptional","sourceSearch","sourcePath","strict","$$paramNames","$UrlMatcherFactory","valToString","/","valFromString","~~","~2F","getDefaultConfig","isStrictMode","isCaseInsensitive","isInjectable","flushTypeQueue","typeQueue","$types","def","defaultSquashPolicy","enqueue","defaultTypes","encode","decode","int","capture","any","$$getDefaultValue","strictMode","isMatcher","o","definitionFn","unwrapShorthand","isShorthand","$$fn","getType","urlType","getArrayMode","arrayDefaults","arrayParamNomenclature","getSquashPolicy","getReplace","arrayMode","configuredKeys","defaultPolicy","$value","hasReplaceVal","$replace","replacement","$asArray","dynamic","$$parent","$$keys","ignore","paramset","paramValues","$$equals","paramValues1","paramValues2","equal","$$validates","rawVal","encoded","$UrlRouterProvider","$locationProvider","$urlMatcherFactory","regExpPrefix","interpolate","handleIfMatch","$match","appendBasePath","isHtml5","absolute","rule","handled","lastPushedUrl","otherwise","listen","interceptDeferred","sync","read","urlMatcher","$$avoidResync","validates","slash","redirect","handlerIsString","strategies","sticky","deferIntercept","$StateProvider","$urlRouterProvider","isRelative","stateName","findState","stateOrName","isStr","rel","pathLength","states","queueState","parentName","flushQueuedChildren","queued","registerState","stateBuilder","$delegates","abstractKey","$stateParams","$state","navigable","transitionTo","isGlob","doesStateMatchGlob","glob","globSegments","$view","$resolve","$urlRouter","handleRedirect","TransitionAborted","retry","$retry","TransitionFailed","retryTransition","transition","toParams","TransitionSuperseded","resolveState","paramsAreFiltered","resolveViews","viewsPromises","views","injectables","globals","controllerProvider","injectLocals","$$controller","$$controllerAs","$$resolveAs","resolveAs","TransitionSupersededError","TransitionPrevented","go","fromParams","fromPath","toState","redirectResult","toPath","keep","toLocals","reloadState","ownParams","shouldSkipReload","entering","exiting","onExit","onEnter","acc","paramDef","lossy","nav","nonSearchParamsEqual","fromAndToState","notSearchParam","nonQueryParamKeys","nonQueryParams","nonQueryParamSet","reloadOnSearch","compositeName","abstract","$ViewProvider","$templateFactory","$ViewScrollProvider","useAnchorScroll","$ViewDirective","$uiViewScroll","getRenderer","statics","cb","$animator","cleanupLastView","previousEl","currentEl","$uiViewData","renderer","$$animLeave","updateView","firstTime","getUiViewName","previousLocals","latestLocals","animEnter","animLeave","viewAnimData","$animEnter","$animLeave","$ViewDirectiveFill","resolveData","uiView","uiViewCreatedBy","parseStateRef","ref","preparsed","paramExpr","stateContext","stateData","getTypeInfo","isSvg","isForm","isAnchor","clickable","clickHook","ignorePreventDefaultCount","defaultOpts","$StateRefDirective","uiSrefActive","uiSref","unlinkInfoFn","uiSrefOpts","$$addStateInfo","$StateRefDynamicDirective","runStateRefLink","uiState","uiStateParams","uiStateOpts","$StateRefActiveDirective","addState","stateParams","activeClass","stateHash","createStateHash","stateInfo","anyMatch","exactMatch","activeEqClass","uiSrefActiveEq","deregister","$IsStateFilter","isFilter","$IncludedByStateFilter","includesFilter","searchParams","decodePathArray","reverseString","unquoteDashes","allReversed","paramName","parameters","nTotal","nPath","paramVal","encodeDashes","isPathParam","isDefaultValue","nextSegment","isFinalPathParam","$subPattern","sub","ArrayType","bindTo","arrayWrap","arrayUnwrap","falsey","arrayHandler","allTruthyMode","arrayEqualsHandler","val1","val2","$arrayMode","autoinject","moment","utils_hooks__hooks","hookCallback","setHookCallback","res","hasOwnProp","create_utc__createUTC","locale","createLocalOrUTC","utc","defaultParsingFlags","unusedTokens","unusedInput","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","getParsingFlags","_pf","valid__isValid","_isValid","_d","invalidWeekday","_strict","bigHour","valid__createInvalid","copyConfig","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","momentProperties","Moment","updateInProgress","updateOffset","isMoment","absFloor","argumentForCoercion","coercedNumber","compareArrays","dontConvert","lengthDiff","diffs","Locale","normalizeLocale","chooseLocale","loadLocale","oldLocale","locales","globalLocale","_abbr","locale_locales__getSetGlobalLocale","locale_locales__getLocale","defineLocale","abbr","addUnitAlias","shorthand","lowerCase","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","makeGetSet","keepTime","get_set__set","get_set__get","mom","getSet","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","addFormatToken","padded","ordinal","formatTokenFunctions","localeData","removeFormattingTokens","makeFormatFunction","formattingTokens","output","formatMoment","expandFormat","formatFunctions","invalidDate","replaceLongDateFormatTokens","longDateFormat","localFormattingTokens","sth","addRegexToken","strictRegex","regexes","isStrict","getParseRegexForToken","unescapeFormat","p1","p2","p3","p4","addParseToken","addWeekParseToken","_w","addTimeToArrayFromToken","_a","daysInMonth","UTC","getUTCDate","localeMonths","_months","localeMonthsShort","_monthsShort","localeMonthsParse","monthName","_monthsParse","_longMonthsParse","_shortMonthsParse","months","monthsShort","setMonth","dayOfMonth","monthsParse","getSetMonth","getDaysInMonth","checkOverflow","DATE","YEAR","HOUR","MINUTE","SECOND","MILLISECOND","_overflowDayOfYear","suppressDeprecationWarnings","deprecate","deprecateSimple","deprecations","configFromISO","from_string__isoRegex","isoDates","isoTimes","matchOffset","configFromStringAndFormat","configFromString","aspNetJsonRegex","createFromInputFallback","createDate","createUTCDate","daysInYear","isLeapYear","getIsLeapYear","weekOfYear","firstDayOfWeek","firstDayOfWeekOfYear","adjustedMoment","daysToDayOfWeek","day","local__createLocal","dayOfYear","localeWeek","_week","dow","doy","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","dayOfYearFromWeeks","weekday","week1Jan","janX","getUTCDay","getSetDayOfYear","startOf","currentDateArray","_useUTC","getUTCFullYear","getUTCMonth","configFromArray","currentDate","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","setUTCMinutes","getUTCMinutes","weekYear","W","E","gg","ISO_8601","parsedInput","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","_meridiem","hour","meridiem","isPm","meridiemHour","isPM","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","minute","millisecond","createFromConfig","prepareConfig","preparse","configFromInput","isUTC","pickBy","moments","Duration","years","quarters","quarter","weeks","days","_milliseconds","_days","_bubble","isDuration","utcOffset","offsetFromString","chunk","chunkOffset","cloneWithOffset","model","setTime","local","getDateOffset","getSetOffset","keepLocalTime","localAdjust","_changeInProgress","add_subtract__addSubtract","create__createDuration","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","other","isUtcOffset","isUtc","diffRes","aspNetRegex","create__isoRegex","parseIso","momentsDifference","inp","positiveMomentsDifference","isAfter","isBefore","createAdder","period","dur","isAdding","moment_calendar__calendar","sod","calendar","inputMs","endOf","isBetween","isSame","asFloat","delta","zoneDelta","monthDiff","anchor2","adjust","wholeMonthDiff","moment_format__toISOString","toDate","inputString","defaultFormat","postformat","withoutSuffix","humanize","fromNow","toNow","newLocaleData","isoWeekday","to_type__valueOf","unix","toObject","moment_valid__isValid","parsingFlags","invalidAt","addWeekYearFormatToken","weeksInYear","getSetWeekYear","getSetISOWeekYear","getISOWeeksInYear","getWeeksInYear","weekInfo","getSetQuarter","parseWeekday","weekdaysParse","localeWeekdays","_weekdays","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","localeWeekdaysParse","weekdayName","_weekdaysParse","weekdays","weekdaysShort","weekdaysMin","getSetDayOfWeek","getSetLocaleDayOfWeek","getSetISODayOfWeek","matchMeridiem","_meridiemParse","localeIsPM","localeMeridiem","isLower","parseMs","getZoneAbbr","getZoneName","moment__createUnix","moment__createInZone","parseZone","locale_calendar__calendar","_calendar","_longDateFormat","formatUpper","_invalidDate","_ordinal","preParsePostFormat","relative__relativeTime","isFuture","_relativeTime","pastFuture","locale_set__set","_ordinalParseLenient","_ordinalParse","lists__get","field","lists__listMonths","lists__listMonthsShort","lists__listWeekdays","lists__listWeekdaysShort","lists__listWeekdaysMin","duration_abs__abs","mathAbs","duration_add_subtract__addSubtract","duration_add_subtract__add","duration_add_subtract__subtract","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","duration_as__valueOf","makeAs","alias","duration_get__get","makeGetter","substituteTimeAgo","relativeTime","duration_humanize__relativeTime","posNegDuration","thresholds","duration_humanize__getSetRelativeTimeThreshold","threshold","withSuffix","iso_string__toISOString","iso_string__abs","Y","D","asSeconds","match1","match2","match3","match4","match6","match1to2","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchTimestamp","matchWord","defaultLocaleMonths","defaultLocaleMonthsShort","parseTwoDigitYear","getSetYear","defaultLocaleWeek","prototypeMin","prototypeMax","add_subtract__add","add_subtract__subtract","isoWeekYear","getSetDayOfMonth","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","_isPm","defaultLocaleMeridiemParse","getSetHour","getSetMinute","getSetSecond","getSetMillisecond","momentPrototype__proto","toJSON","isoWeeks","isoWeeksInYear","isDST","isDSTShifted","zoneAbbr","zoneName","dates","momentPrototype","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","defaultLongDateFormat","LTS","LT","L","LL","LLL","defaultInvalidDate","defaultOrdinal","defaultOrdinalParse","defaultRelativeTime","future","past","prototype__proto","firstDayOfYear","ordinalParse","langData","asMilliseconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","duration_prototype__proto","toIsoString","invalid","relativeTimeThreshold","_moment","horizontal","cssTo","uibCollapse","getScrollFromElement","scrollWidth","scrollHeight","expandingExpr","expandDone","expandedExpr","collapse","collapsingExpr","collapseDone","collapsedExpr","expanding","collapsing","collapsed","shouldCollapse","closeOthers","accordionConfig","openGroup","isOpen","addGroup","groupScope","removeGroup","heading","panelClass","setHeading","accordionCtrl","openClass","toggleOpen","headingId","panelId","accordionGroupCtrl","getHeaderSelectors","uibAccordionTransclude","closeable","dismissOnTimeout","toggleEvent","buttonConfig","buttonsCtrl","uncheckableExpr","uibUncheckable","uibBtnRadio","isActive","uncheckable","getTrueValue","getCheckboxValue","btnCheckboxTrue","getFalseValue","btnCheckboxFalse","setActive","slides","slide","goNext","destroyed","currentIndex","$currentTransition","SLIDE_DIRECTION","currentIdx","getCurrentIndex","restartTimer","findSlideIndex","resetTimer","currentInterval","resetTransition","timerFn","isPlaying","addSlide","play","newIndex","noWrap","removeSlide","nextSlide","nextIndex","indexOfSlide","isPrevDisabled","isNextDisabled","noPause","noTransition","carouselCtrl","beforeAddClass","directionClass","removeClassFn","beforeRemoveClass","getFormatCodeToRegex","formatCodeToRegex","createParser","quoteIndex","inLiteral","createFormatter","formatter","literalIdx","constructLiteralFormatter","constructFormatterFromIdx","endIdx","currentPosStr","toTimezone","fromTimezone","localeId","SPECIAL_CHARACTERS_REGEXP","parsers","_date","getParser","overrideParser","baseDate","tzOffset","fields","dt","mapper","datesetter","timesetter","ON_REGEXP","IS_REGEXP","linkedScopes","instances","exps","addForExp","removeScope","compareWithExp","expToData","watchFn","compareWithVal","newActivated","thisVal","onExp","lastActivated","removedScope","newWatchScope","onExpMatches","uibIsClass","expsStr","datepickerMode","formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","maxDate","maxMode","minDate","minMode","monthColumns","shortcutPropagation","showWeeks","yearColumns","yearRows","datepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","dateParser","setMode","datepickerOptions","extractOptions","watchListeners","modes","startingDay","refreshView","uniqueId","ngDisabled","dateObject","activeDate","activeDateId","ngModelCtrl_","initDate","render","selectedDt","_refreshView","activeDt","createDateObject","today","customClass","dateDisabled","arrays","toggleMode","13","32","33","34","35","36","37","38","39","40","focusElement","keydown","handleKeyDown","DAYS_IN_MONTH","getISO8601WeekNumber","checkDate","setDate","getDates","startDate","firstDayOfMonth","difference","numDisplayedFromPreviousMonth","firstDate","secondary","labels","title","rows","weekNumbers","thursdayIndex","numWeeks","curWeek","date1","date2","_date1","_date2","yearHeaderColspan","getStartingYear","columns","yearpickerInit","datepickerCtrl","daypickerCtrl","monthpickerCtrl","SCROLLBAR_WIDTH","BODY_SCROLLBAR_WIDTH","OVERFLOW_REGEX","normal","PLACEMENT_REGEX","auto","vertical","BODY_REGEX","getRawNode","parseStyle","isStaticPositioned","scrollbarWidth","isBody","bodyElem","innerWidth","clientWidth","scrollElem","scrollbarPadding","elemStyle","paddingRight","paddingBottom","scrollParent","tagName","widthOverflow","originalRight","heightOverflow","clientHeight","originalBottom","isScrollable","includeHidden","overflowRegex","includeSelf","documentEl","excludeStatic","spStyle","includeMagins","elemOffset","marginTop","elemBCR","viewportOffset","useDocument","includePadding","offsetBCR","offsetParentBCR","offsetParentStyle","paddingTop","paddingLeft","parsePlacement","placement","autoPlace","positionElements","hostElem","targetElem","appendToBody","targetWidth","targetHeight","hostElemPos","targetElemPos","targetElemStyle","adjustedSize","marginBottom","xOverflow","yOverflow","adjustTop","placementClasses","containerPosition","initialHeight","currentHeight","positionArrow","innerElem","isTooltip","arrowElem","arrowCss","borderProp","borderWidth","borderRadiusProp","borderRadius","altInputFormats","clearText","closeOnDateSelection","closeText","currentText","datepickerPopup","datepickerPopupTemplateUrl","datepickerTemplateUrl","html5Types","onOpenFocus","showButtonBar","$position","datepickerPopupConfig","$datepickerPopupLiteralWarning","parseDateString","dateFormat","documentClickBind","popup","$popup","dpContainsTarget","popupContainsTarget","inputKeydownBind","positionPopup","dpElement","popupPlacement","popupEl","datepickerEl","scrollParentEl","isHtml5DateInput","_ngModel_","datepickerAppendToBody","uibDatepickerPopup","newDateFormat","ng-model","ng-change","template-url","dateSelection","debounceTime","timeoutPromise","createNew","hasKey","appendToOpenClass","$$multiMap","openScope","openedContainers","isOnlyOpen","dropdownScope","openedDropdowns","openDropdown","toClose","dropdown","closeDropdown","openedScopes","keybindFilter","dropdownToClose","getAutoClose","toggleElement","getToggleElement","dropdownElement","getDropdownElement","focusToggleElement","dropdownElementTargeted","toggleElementTargeted","isKeynavEnabled","focusDropdownEntry","dropdownConfig","uibDropdownService","removeDropdownMenu","dropdownMenu","templateScope","getIsOpen","setIsOpen","toggleInvoker","onToggle","keynavEnabled","keyboardNav","autoClose","getElement","wasOpen","dropdownAppendTo","appendToEl","dropdownAppendToBody","appendToBodyValue","rightalign","appendOffset","openContainer","dropdownOpenClass","hasOpenClass","dropdownMenuTemplateUrl","tplContent","newEl","dropdownCtrl","dropdownNested","tplUrl","toggleDropdown","aria-haspopup","aria-expanded","removeTop","setResolver","resolves","resolveObj","resolveIter","$modalStack","modalInClass","NOW_CLOSING_EVENT","setIsAsync","modalOptions","backdropClass","windowTopClass","modal","getTop","backdrop","dismiss","$isRendered","modalRenderDeferObj","animationPromise","modalRendered","inputWithAutofocus","modalAnimation","uibModalAnimationClass","$$stackedMap","$uibPosition","isVisible","backdropIndex","topBackdropIndex","opened","openedWindows","topModalIndex","removeModalWindow","modalInstance","elementToReceiveFocus","modalWindow","appendToElement","previousTopOpenedModal","modalDomEl","removeAfterAnimate","modalScope","modalBodyClass","openedClass","OPENED_MODAL_CLASS","openedClasses","areAnyOpen","toggleTopWindowClass","closedDeferred","checkRemoveBackdrop","toggleSwitch","backdropDomEl","backdropScopeRef","backdropScope","domEl","afterAnimating","asyncDeferred","asyncPromise","keydownListener","keyboard","loadFocusElementList","focusChanged","isFocusInFirstItem","isModalFocused","focusLastFocusableElement","isFocusInLastItem","focusFirstFocusableElement","broadcastClosing","resultOrReason","closing","unhideBackgroundElements","ARIA_HIDDEN_ATTRIBUTE_NAME","hiddenEl","ariaHiddenCount","newHiddenCount","tabbableSelector","newBackdropIndex","applyAriaHidden","getSiblings","elemIsAlreadyHidden","modalOpener","renderDeferred","currBackdropIndex","ng-style","uib-modal-animation-class","modal-in-class","modal-instance","angularDomEl","windowTemplateUrl","window-top-class","role","aria-labelledby","ariaLabelledBy","aria-describedby","ariaDescribedBy","windowClass","$$topModalIndex","$$uibDestructionScheduled","dismissAll","topModal","srcElement","modalDomE1","$modalProvider","$uibResolve","getTemplatePromise","$modal","promiseChain","getPromiseChain","resolveWithTemplate","templateAndResolvePromise","modalResultDeferred","modalOpenedDeferred","modalClosedDeferred","modalRenderDeferred","rendered","samePromise","tplAndVars","constructLocals","instanceOnScope","injectable","$uibModalInstance","providedScope","$close","$dismiss","ctrlInstance","ctrlInstantiate","ctrlLocals","setNumPages","numPages","_watchers","itemsPerPage","totalPages","calculateTotalPages","updatePage","newTotal","oldTotal","totalItems","page","selectPage","clickAllowed","noPrevious","noNext","uibPaging","uibPagerConfig","align","previousText","nextText","paginationCtrl","uibPaginationConfig","makePage","getPages","currentPage","pages","startPage","endPage","isMaxSized","maxSize","rotate","pageLabel","forceEllipses","boundaryLinkNumbers","previousPageSet","secondPageLink","firstPageLink","nextPageSet","secondToLastPageLink","lastPageLink","$page","boundaryLinks","directionLinks","firstText","lastText","defaultOptions","placementClassPrefix","popupDelay","popupCloseDelay","useContentExp","triggerMap","outsideClick","none","globalOptions","setTriggers","triggers","keypressListener","openedTooltips","ttType","defaultTriggerShow","getTriggers","startSym","endSym","tElem","tooltipLinker","tooltipCtrl","toggleTooltipBind","ttScope","hideTooltipBind","showTooltipBind","hasEnableExp","cancelHide","prepareTooltip","showTimeout","cancelShow","hideTimeout","createTooltip","assignIsOpen","positionTooltip","positionTimeout","transitionTimeout","removeTooltip","tooltip","tooltipLinkedScope","prepObservers","unregisterObservers","adjustmentTimeout","contentParse","popupClass","lastPlacement","closeDelay","isOpenParse","observers","repositionScheduled","bodyHideTooltipBind","hideOnEscapeKey","prepTriggers","showTriggers","hideTriggers","unregisterTriggers","ttPosition","elementPos","adjustment","origScope","contentExp","appendToBodyVal","appendKey","tooltipTemplateTranscludeScope","parseAsResourceUrl","uibTooltipTemplateTransclude","tooltipAnimationClass","$uibTooltip","originScope","uibTitle","progressConfig","getMaxOrDefault","maxParam","bars","addBar","bar","recalculatePercentage","totalPercentage","removeBar","progressCtrl","stateOn","stateOff","enableReset","titles","ratingConfig","tmpTitles","ratingStates","buildTemplateObjects","getTitle","rate","readonly","newViewValue","onHover","onLeave","onKeydown","ratingCtrl","findTabIndex","tabs","oldIndex","previousIndex","previousSelected","tab","onDeselect","$selectedIndex","onSelect","addTab","newActiveIndex","removeTab","newActiveTabIndex","justified","tabsetCtrl","$transcludeFn","isTabHeading","uibTabContentTransclude","headingElement","hourStep","minuteStep","secondStep","showMeridian","showSeconds","meridians","readonlyInput","mousewheel","arrowkeys","showSpinners","timepickerConfig","getHoursFromTemplate","valid","meridian","getMinutesFromTemplate","getSecondsFromTemplate","pad","noPad","keyboardChange","makeValid","updateTemplate","hoursModelCtrl","minutesModelCtrl","secondsModelCtrl","invalidHours","invalidMinutes","invalidSeconds","padHours","addSecondsToSelected","addSeconds","addMinutes","newDate","modelIsEmpty","hoursInputEl","minutesInputEl","secondsInputEl","setupMousewheelEvents","setupArrowkeyEvents","setupInputEvents","noIncrementHours","incrementedSelected","noDecrementHours","decrementedSelected","noIncrementMinutes","noDecrementMinutes","noIncrementSeconds","noDecrementSeconds","noToggleMeridian","isScrollingUp","wheelDelta","deltaY","incrementHours","decrementHours","incrementMinutes","decrementMinutes","incrementSeconds","decrementSeconds","updateHours","updateMinutes","updateSeconds","invalidate","setSeconds","toggleMeridian","uibTimepickerConfig","timepickerCtrl","TYPEAHEAD_REGEXP","itemName","viewMapper","modelMapper","originalScope","$$debounce","typeaheadParser","fireRecalculating","moveInProgress","debouncedRecalculate","recalculatePosition","HOT_KEYS","eventDebounceTime","minLength","typeaheadMinLength","waitTime","typeaheadWaitMs","isEditable","typeaheadEditable","isLoadingSetter","typeaheadLoading","isSelectEvent","typeaheadShouldSelect","vals","onSelectCallback","typeaheadOnSelect","isSelectOnBlur","typeaheadSelectOnBlur","isNoResultsSetter","typeaheadNoResults","inputFormatter","typeaheadInputFormatter","typeaheadAppendToBody","typeaheadAppendTo","focusFirst","typeaheadFocusFirst","selectOnExact","typeaheadSelectOnExact","isOpenSetter","typeaheadIsOpen","showHint","typeaheadShowHint","parsedModel","$setModelValue","parserResult","uibTypeahead","offDestroy","popupId","aria-autocomplete","aria-owns","inputsContainer","hintInputElem","border-color","box-shadow","background","color","vertical-align","background-color","popUpEl","move-in-progress","query","assign-is-open","typeaheadTemplateUrl","typeaheadPopupTemplateUrl","resetHint","resetMatches","activeIdx","getMatchId","inputIsExactMatch","inputValue","getMatchesAsync","onCurrentRequest","debounceUpdate","firstLabel","scheduleSearchWithTimeout","cancelPreviousTimeout","$item","$model","$label","typeaheadFocusOnSelect","shouldSelect","offsetTop","editable","dismissClickHandler","_modelCtrl","candidateViewValue","emptyViewValue","popupTemplateUrl","isDropdownOpen","matchIdx","selectActive","selectMatch","tplEl","escapeRegexp","queryToEscape","containsHtml","matchItem","isSanitizePresent","trustAsHtml","$$uibCarouselCss","$$uibDatepickerCss","$$uibPositionCss","$$uibDatepickerpopupCss","$$uibTooltipCss","$$uibTimepickerCss","$$uibTypeaheadCss","thisArg","arrayAggregator","iteratee","accumulator","arrayEach","arrayEachRight","arrayEvery","arrayFilter","resIndex","arrayIncludes","baseIndexOf","arrayIncludesWith","arrayMap","arrayPush","arrayReduce","initAccum","arrayReduceRight","arraySome","asciiToArray","asciiWords","reAsciiWord","baseFindKey","eachFunc","baseFindIndex","fromIndex","fromRight","strictIndexOf","baseIsNaN","baseIndexOfWith","baseMean","baseSum","NAN","baseProperty","basePropertyOf","baseReduce","baseSortBy","comparer","baseTimes","baseToPairs","baseTrim","trimmedEndIndex","reTrimStart","baseUnary","baseValues","cacheHas","charsStartIndex","strSymbols","chrSymbols","charsEndIndex","countHolders","escapeStringChar","chr","stringEscapes","getValue","hasUnicode","reHasUnicode","hasUnicodeWord","reHasUnicodeWord","iteratorToArray","mapToArray","overArg","transform","replaceHolders","PLACEHOLDER","setToArray","setToPairs","strictLastIndexOf","stringSize","unicodeSize","asciiSize","stringToArray","unicodeToArray","reWhitespace","reUnicode","unicodeWords","reUnicodeWord","VERSION","LARGE_ARRAY_SIZE","CORE_ERROR_TEXT","FUNC_ERROR_TEXT","INVALID_TEMPL_VAR_ERROR_TEXT","HASH_UNDEFINED","MAX_MEMOIZE_SIZE","CLONE_DEEP_FLAG","CLONE_FLAT_FLAG","CLONE_SYMBOLS_FLAG","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","WRAP_BIND_FLAG","WRAP_BIND_KEY_FLAG","WRAP_CURRY_BOUND_FLAG","WRAP_CURRY_FLAG","WRAP_CURRY_RIGHT_FLAG","WRAP_PARTIAL_FLAG","WRAP_PARTIAL_RIGHT_FLAG","WRAP_ARY_FLAG","WRAP_REARG_FLAG","WRAP_FLIP_FLAG","DEFAULT_TRUNC_LENGTH","DEFAULT_TRUNC_OMISSION","HOT_COUNT","HOT_SPAN","LAZY_FILTER_FLAG","LAZY_MAP_FLAG","LAZY_WHILE_FLAG","INFINITY","MAX_SAFE_INTEGER","MAX_INTEGER","MAX_ARRAY_LENGTH","MAX_ARRAY_INDEX","HALF_MAX_ARRAY_LENGTH","wrapFlags","argsTag","arrayTag","asyncTag","boolTag","dateTag","domExcTag","errorTag","funcTag","genTag","mapTag","numberTag","nullTag","objectTag","promiseTag","proxyTag","regexpTag","setTag","stringTag","symbolTag","undefinedTag","weakMapTag","weakSetTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reEmptyStringLeading","reEmptyStringMiddle","reEmptyStringTrailing","reEscapedHtml","reUnescapedHtml","reHasEscapedHtml","reHasUnescapedHtml","reEscape","reEvaluate","reInterpolate","reIsDeepProp","reIsPlainProp","rePropName","reRegExpChar","reHasRegExpChar","reWrapComment","reWrapDetails","reSplitDetails","reForbiddenIdentifierChars","reEscapeChar","reEsTemplate","reFlags","reIsBadHex","reIsBinary","reIsHostCtor","reIsOctal","reIsUint","reLatin","reNoMatch","reUnescapedString","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsDingbatRange","rsLowerRange","rsMathOpRange","rsNonCharRange","rsPunctuationRange","rsSpaceRange","rsUpperRange","rsVarRange","rsBreakRange","rsApos","rsAstral","rsBreak","rsCombo","rsDigits","rsDingbat","rsLower","rsMisc","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","rsUpper","rsZWJ","rsMiscLower","rsMiscUpper","rsOptContrLower","rsOptContrUpper","reOptMod","rsOptVar","rsOptJoin","rsOrdLower","rsOrdUpper","rsSeq","rsEmoji","rsSymbol","reApos","reComboMark","contextProps","templateCounter","typedArrayTags","cloneableTags","deburredLetters","À","Á","Â","Ã","Ä","Å","à","á","â","ã","ä","å","Ç","ç","Ð","ð","È","É","Ê","Ë","è","é","ê","ë","Ì","Í","Î","Ï","ì","í","î","ï","Ñ","ñ","Ò","Ó","Ô","Õ","Ö","Ø","ò","ó","ô","õ","ö","ø","Ù","Ú","Û","Ü","ù","ú","û","ü","Ý","ý","ÿ","Æ","æ","Þ","þ","ß","Ā","Ă","Ą","ā","ă","ą","Ć","Ĉ","Ċ","Č","ć","ĉ","ċ","č","Ď","Đ","ď","đ","Ē","Ĕ","Ė","Ę","Ě","ē","ĕ","ė","ę","ě","Ĝ","Ğ","Ġ","Ģ","ĝ","ğ","ġ","ģ","Ĥ","Ħ","ĥ","ħ","Ĩ","Ī","Ĭ","Į","İ","ĩ","ī","ĭ","į","ı","Ĵ","ĵ","Ķ","ķ","ĸ","Ĺ","Ļ","Ľ","Ŀ","Ł","ĺ","ļ","ľ","ŀ","ł","Ń","Ņ","Ň","Ŋ","ń","ņ","ň","ŋ","Ō","Ŏ","Ő","ō","ŏ","ő","Ŕ","Ŗ","Ř","ŕ","ŗ","ř","Ś","Ŝ","Ş","Š","ś","ŝ","ş","š","Ţ","Ť","Ŧ","ţ","ť","ŧ","Ũ","Ū","Ŭ","Ů","Ű","Ų","ũ","ū","ŭ","ů","ű","ų","Ŵ","ŵ","Ŷ","ŷ","Ÿ","Ź","Ż","Ž","ź","ż","ž","IJ","ij","Œ","œ","ʼn","ſ","htmlEscapes","&","<","htmlUnescapes","&","<",">",""","'","\\","\n","\r","
","
","freeParseFloat","freeParseInt","freeGlobal","freeSelf","freeExports","freeModule","moduleExports","freeProcess","nodeUtil","nodeIsArrayBuffer","nodeIsDate","nodeIsMap","isMap","nodeIsRegExp","nodeIsSet","isSet","nodeIsTypedArray","deburrLetter","escapeHtmlChar","unescapeHtmlChar","runInContext","lodash","isObjectLike","LazyWrapper","LodashWrapper","wrapperClone","baseLodash","chainAll","__wrapped__","__actions__","__chain__","__index__","__values__","__dir__","__filtered__","__iteratees__","__takeCount__","__views__","lazyClone","copyArray","lazyReverse","lazyValue","isArr","isRight","arrLength","getView","iteratees","iterLength","takeCount","nativeMin","baseWrapperValue","iterIndex","Hash","clear","hashClear","__data__","nativeCreate","hashDelete","hashGet","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","Map","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","SetCache","setCacheAdd","setCacheHas","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","arrayLikeKeys","isArg","isArguments","isBuff","isBuffer","isType","skipIndexes","isIndex","arraySample","baseRandom","arraySampleSize","shuffleSelf","baseClamp","arrayShuffle","assignMergeValue","baseAssignValue","assignValue","objValue","baseAggregator","baseEach","baseAssign","copyObject","baseAssignIn","keysIn","baseAt","paths","lower","upper","baseClone","bitmask","customizer","isDeep","isFlat","isFull","initCloneArray","getTag","isFunc","cloneBuffer","initCloneObject","copySymbolsIn","copySymbols","initCloneByTag","stacked","subValue","keysFunc","getAllKeysIn","getAllKeys","baseConforms","baseConformsTo","baseDelay","baseDifference","isCommon","valuesLength","valuesIndex","baseEvery","baseExtremum","isSymbol","baseFill","toInteger","toLength","baseFilter","baseFlatten","isFlattenable","baseForOwn","baseFor","baseForOwnRight","baseForRight","baseFunctions","baseGet","castPath","toKey","baseGetAllKeys","symbolsFunc","baseGetTag","symToStringTag","getRawTag","objectToString","baseGt","baseHas","baseHasIn","baseInRange","nativeMax","baseIntersection","othLength","othIndex","maxLength","baseInverter","baseInvoke","baseIsArguments","baseIsArrayBuffer","baseIsDate","baseIsEqual","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsMap","baseIsMatch","matchData","noCustomizer","srcValue","baseIsNative","isMasked","reIsNative","toSource","baseIsRegExp","baseIsSet","baseIsTypedArray","isLength","baseIteratee","baseMatchesProperty","baseMatches","baseKeys","isPrototype","nativeKeys","baseKeysIn","nativeKeysIn","isProto","baseLt","baseMap","getMatchData","matchesStrictComparable","isKey","isStrictComparable","hasIn","baseMerge","srcIndex","baseMergeDeep","safeGet","mergeFunc","isTyped","isArrayLikeObject","cloneTypedArray","toPlainObject","baseNth","baseOrderBy","orders","getIteratee","criteria","compareMultiple","basePick","basePickBy","baseSet","basePropertyDeep","basePullAll","basePullAt","indexes","baseUnset","nativeFloor","nativeRandom","baseRange","nativeCeil","baseRepeat","baseRest","setToString","overRest","baseSample","baseSampleSize","nested","baseShuffle","baseSlice","baseSome","baseSortedIndex","retHighest","low","mid","baseSortedIndexBy","valIsNaN","valIsNull","valIsSymbol","valIsUndefined","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","setLow","baseSortedUniq","baseToNumber","baseToString","symbolToString","baseUniq","createSet","seenIndex","baseUpdate","updater","baseWhile","isDrop","actions","baseXor","baseZipObject","assignFunc","valsLength","castArrayLikeObject","castFunction","stringToPath","castSlice","allocUnsafe","cloneArrayBuffer","arrayBuffer","cloneDataView","dataView","cloneRegExp","cloneSymbol","symbol","symbolValueOf","typedArray","compareAscending","valIsDefined","valIsReflexive","objCriteria","othCriteria","ordersLength","composeArgs","partials","holders","isCurried","argsIndex","argsLength","holdersLength","leftIndex","leftLength","rangeLength","isUncurried","composeArgsRight","holdersIndex","rightIndex","rightLength","isNew","getSymbols","getSymbolsIn","createAggregator","initializer","createAssigner","assigner","sources","guard","isIterateeCall","createBaseEach","iterable","createBaseFor","createBind","isBind","createCtor","createCaseFirst","methodName","trailing","createCompounder","words","deburr","thisBinding","baseCreate","createCurry","arity","getHolder","createRecurry","createHybrid","createFind","findIndexFunc","createFlow","flatRest","funcs","prereq","thru","getFuncName","isLaziable","plant","partialsRight","holdersRight","argPos","ary","holdersCount","newHolders","isBindKey","reorder","isFlip","isAry","createInverter","toIteratee","createMathOperation","createOver","arrayFunc","createPadding","charsLength","createPartial","createRange","toFinite","createRelationalOperation","toNumber","wrapFunc","isCurry","newHoldersRight","newPartials","newPartialsRight","newData","setWrapToString","createRound","precision","nativeIsFinite","pair","createToPairs","createWrap","mergeData","baseSetData","customDefaultsAssignIn","objectProto","customDefaultsMerge","customOmitClone","isPartial","arrStacked","othStacked","arrValue","othValue","compared","convert","objProps","objLength","othProps","objStacked","skipCtor","objCtor","othCtor","realNames","otherFunc","isKeyable","getNative","isOwn","unmasked","nativeObjectToString","transforms","getWrapDetails","hasPath","hasFunc","getPrototype","insertWrapDetails","spreadableSymbol","maskSrcKey","memoizeCapped","memoize","srcBitmask","newBitmask","isCombo","otherArgs","oldArray","reference","updateWrapDetails","shortOut","lastCalled","stamp","nativeNow","rand","funcToString","compact","drop","dropRight","dropRightWhile","dropWhile","fill","findIndex","findLastIndex","flattenDeep","flattenDepth","fromPairs","nativeJoin","nth","pullAll","pullAllBy","pullAllWith","nativeReverse","sortedIndex","sortedIndexBy","sortedIndexOf","sortedLastIndex","sortedLastIndexBy","sortedLastIndexOf","sortedUniq","sortedUniqBy","tail","take","takeRight","takeRightWhile","takeWhile","uniq","uniqBy","uniqWith","unzip","unzipWith","zipObject","zipObjectDeep","tap","wrapperChain","wrapperCommit","wrapperNext","wrapperToIterator","wrapperPlant","wrapperReverse","wrapped","wrapperValue","flatMap","flatMapDeep","flatMapDepth","forEachRight","baseEachRight","orderBy","negate","sample","sampleSize","shuffle","curry","curryRight","invokeFunc","lastArgs","lastThis","lastInvokeTime","leadingEdge","timerExpired","leading","remainingWait","timeSinceLastCall","lastCallTime","timeSinceLastInvoke","timeWaiting","maxing","maxWait","shouldInvoke","trailingEdge","debounced","isInvoking","flip","memoized","Cache","rest","spread","throttle","partial","castArray","cloneWith","cloneDeep","cloneDeepWith","conformsTo","isEqual","isEqualWith","isInteger","isMatchWith","isNative","isMaskable","isNil","objectCtorString","isSafeInteger","isWeakMap","isWeakSet","symIterator","remainder","isBinary","toSafeInteger","findKey","findLastKey","forIn","forInRight","forOwn","forOwnRight","functions","functionsIn","mapKeys","mapValues","omitBy","setWith","isArrLike","updateWith","valuesIn","clamp","inRange","floating","capitalize","upperFirst","endsWith","escapeRegExp","strLength","padEnd","padStart","radix","nativeParseInt","repeat","templateSettings","assignInWith","isEscaping","isEvaluating","imports","importsKeys","importsValues","reDelimiters","evaluate","escapeValue","interpolateValue","esTemplateValue","evaluateValue","variable","attempt","toLower","toUpper","trimEnd","trimStart","omission","newEnd","unescape","cond","conforms","defaultTo","matchesProperty","mixin","methodNames","oldDash","nthArg","propertyOf","stubArray","stubFalse","stubObject","stubString","stubTrue","times","idCounter","maxBy","mean","meanBy","minBy","sum","sumBy","arrayProto","funcProto","coreJsData","IE_PROTO","Buffer","objectCreate","propertyIsEnumerable","isConcatSpreadable","toStringTag","ctxClearTimeout","ctxNow","ctxSetTimeout","nativeGetSymbols","getOwnPropertySymbols","nativeIsBuffer","DataView","Set","WeakMap","metaMap","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","baseSetToString","castRest","ctorString","subString","differenceBy","differenceWith","intersection","intersectionBy","intersectionWith","pull","pullAt","union","unionBy","unionWith","without","xor","xorBy","xorWith","zip","zipWith","wrapperAt","countBy","findLast","groupBy","invokeMap","keyBy","partition","sortBy","bindKey","overArgs","funcsLength","partialRight","rearg","gte","lte","assignIn","assignWith","at","propsIndex","propsLength","defaultsDeep","mergeWith","invertBy","toPairs","toPairsIn","word","kebabCase","lowerFirst","snakeCase","startCase","upperCase","bindAll","flow","flowRight","methodOf","over","overEvery","overSome","rangeRight","augend","addend","divide","dividend","divisor","multiply","multiplicand","minuend","subtrahend","entriesIn","extendWith","eachRight","takeName","dropName","checkIteratee","isTaker","lodashFunc","retUnwrapped","isLazy","useLazy","isHybrid","isUnwrapped","onlyLazy","chainName","commit","A","abbrs","offsets","untils","population","_set","zones","toTimeString","offsetScore","abbrScore","g","localeCompare","P","Intl","DateTimeFormat","resolvedOptions","timeZone","u","S","z","scoreOffsetAt","T","links","countries","dataVersion","C","didShowError","B","tz","N","_z","O","_index","moveAmbiguousForward","moveInvalidForward","_zones","_links","_names","_countries","zoneExists","guess","Zone","unpack","unpackBase60","needsOffset","zonesForCountry","defaultZone","setDefault","$SanitizeProvider","stringToMap","lowercaseKeys","arrayToMap","addElementsTo","elementsMap","newElements","htmlParserImpl","inertBodyElement","getInertBodyElement","mXSSAttempts","$sanitizeMinErr","attrToMap","getNonDescendant","encodeEntities","SURROGATE_PAIR_REGEXP","hi","NON_ALPHANUMERIC_REGEXP","htmlSanitizeWriterImpl","buf","uriValidator","ignoreCurrentElement","blockedElements","validElements","lkey","isImage","validAttrs","uriAttrs","voidElements","stripCustomNsAttrs","attrNode","removeAttributeNode","nodeContains","outerHTML","outerText","hasBeenInstantiated","svgEnabled","svgElements","htmlParser","htmlSanitizeWriter","enableSvg","addValidElements","htmlElements","htmlVoidElements","addValidAttrs","optionalEndTagBlockElements","optionalEndTagInlineElements","optionalEndTagElements","blockElements","inlineElements","htmlAttrs","svgAttrs","getInertBodyElement_XHR","encodeURI","getInertBodyElement_DOMParser","getInertBodyElement_InertDocument","inertDocument","getDocumentElement","sanitizeText","writer","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","linkyMinErr","addText","addLink","linkAttributes","attributesFn","ids","defs","dependencies","fragments","fi","expose","privateModules","AMDLC_TESTS","relativePosition","targetRect","x","targetW","targetH","findBestRelativePosition","constrainRect","rels","inflate","intersect","cropRect","x1","y1","x2","y2","clampRect","fixedSize","underflowX1","underflowY1","overflowX2","overflowY2","cx2","cy2","fromClientRect","clientRect","_deferreds","me","asap","finale","Handler","immediateFn","setImmediate","featurefill","requestAnimationFrameFunc","vendors","wrappedSetTimeout","wrappedSetInterval","wrappedClearTimeout","wrappedClearInterval","requestAnimationFramePromise","setEditorTimeout","editor","removed","setEditorInterval","matchMediaQuery","matchMedia","opera","webkit","ie","ie11","ie12","gecko","mac","iDevice","fileApi","phone","tablet","windowsPhone","buildNumber","appName","createObjectURL","contentEditable","iOS","transparentSrc","caretAfter","getSelection","ceFalse","canHaveCSP","desktop","Delay","Env","addEvent","detachEvent","getTargetFromShadowDom","defaultTarget","deepPath","undef","deprecated","experimentalShadowDom","mouseEventRe","eventDoc","cancelBubble","bindOnReady","eventUtils","readyHandler","domLoaded","waitForDomLoaded","tryScroll","EventUtils","executeHandlers","callbackList","hasFocusIn","hasMouseEnterLeave","mouseEnterLeave","eventExpandoPrefix","defaultNativeHandler","fakeName","nativeHandler","ci","eventMap","clean","keyLocation","layerX","layerY","webkitMovementX","webkitMovementY","rescape","MAX_NEGATIVE","strundefined","div1","Arr","whiteSpaceRegExp","delim","sp","ns","cn","scn","de","createNS","onCreate","ext","walk","explode","_addCacheSuffix","cacheSuffix","Tools","createFragment","fragDoc","frag","domManipulate","targetNodes","sourceItem","getElementDocument","DomQuery","lastParent","newWrapper","siblingName","firstSibling","appendHooks","targetHooks","skipUniques","numericCssMap","booleanMap","cssFix","camel","dashed","currentStyle","existingClassName","classState","docElm","contentWindow","overrideDefaults","schema","toHex","encodingItems","validStyles","invalidStyles","rgbRegExp","urlOrStrRegExp","styleRegExp","trimRightRegExp","encodingLookup","invisibleChar","getValidStyles","getInvalidStyles","compress","noJoin","box","canCompress","compress2","isEncoded","keep_slashes","decodeSingleHexSequence","escSeq","decodeHexSequences","processUrl","url3","allow_script_urls","scriptUrl","allow_svg_data_urls","urlConverter","urlConverterScope","url_converter","url_converter_scope","elementName","serializeStyles","styleList","styleMap","startNode","findSibling","startName","shallow","findPreviousNode","prev2","Range","dom","setStart","_setEndPoint","TRUE","setEnd","FALSE","setStartBefore","setStartAfter","setEndBefore","setEndAfter","ts","END_CONTAINER","START_CONTAINER","END_OFFSET","START_OFFSET","selectNode","selectNodeContents","compareBoundaryPoints","sc","so","ec","eo","rsc","startContainer","rso","startOffset","rec","endContainer","reo","endOffset","_compareBoundaryPoints","deleteContents","_traverse","DELETE","extractContents","EXTRACT","cloneContents","CLONE","insertNode","nn","splitText","surroundContents","cloneRange","commonAncestorContainer","_getSelectedNode","_isCollapsed","containerA","offsetA","containerB","offsetB","offsetC","cmnRoot","childA","childB","findCommonAncestor","st","how","depthDiff","ep","endContainerDepth","startContainerDepth","_traverseSameContainer","_traverseCommonStartContainer","_traverseCommonEndContainer","_traverseCommonAncestors","cnt","xferNode","deleteData","_traverseFullySelected","endAncestor","_traverseRightBoundary","previousSibling","startAncestor","startIdx","_traverseLeftBoundary","clonedParent","prevSibling","clonedChild","clonedGrandParent","isFullySelected","_traverseNode","isLeft","txtValue","newNodeValue","oldNodeValue","toStringIE","START_TO_START","START_TO_END","END_TO_END","END_TO_START","nativeDecode","buildEntitiesLookup","entity","baseEntities","namedEntities","reverseEntities","attrsCharsRegExp","textCharsRegExp","rawCharsRegExp","entityRegExp","asciiMap","128","130","131","132","133","134","135","136","137","138","139","140","142","145","146","147","148","149","150","151","152","153","154","155","156","158","159","`","'","Entities","encodeRaw","encodeAllRaw","encodeNumeric","encodeNamed","entities","getEncodeFunc","encodeNamedAndNumeric","encodeCustomNamed","named","numeric","appendToHead","loadedCallback","failed","isOldWebKit","webKitChunks","testCallback","waitCallback","maxLoadTime","waitForWebKitLinkLoaded","styleSheet","styleSheets","ownerNode","owningElement","waitForGeckoLinkLoaded","cssRules","sheet","loadedStates","idCount","Styles","TreeWalker","StyleSheetLoader","setupAttrHooks","domUtils","keepUrlHook","keepValues","keep_values","$elm","serializeStyle","updateInternalStyleAttr","lastNodeType","DOMUtils","blockElementsMap","files","stdMode","isIE","boxModel","compatMode","styleSheetLoader","boundEvents","fixDoc","ownEvents","getBlockElements","getRoot","isBlock","simpleSelectorRe","$$","getCustomElements","getAttribs","setAttrib","getAttrib","root_element","getViewPort","rootElm","innerHeight","getRect","getPos","getSize","getStyle","getParent","getParents","collect","selectorVal","getNext","_findSib","getPrev","elms","parentElm","newElm","setAttribs","setHTML","createHTML","outHtml","keepChildren","setStyle","update_styles","setStyles","removeAllAttribs","originalValue","onSetAttrib","attrElm","attrValue","defaultVal","offsetLeft","addStyle","styleElm","DOM","addedStyles","loadCSS","recalc","cls","isHidden","canHaveHTML","getOuterHTML","setOuterHTML","referenceNode","oldElm","rename","pe","ps","rgbVal","attrRegExp","walker","brCount","getNonEmptyElements","getWhiteSpaceElements","bogusVal","createRng","splitElm","replacementElm","trimNode","surroundedBySpans","previousIsSpan","nextIsSpan","trimmedLength","bef","aft","pa","getContentEditable","getContentEditableParent","isChildOf","dumpRng","ScriptLoader","loadScript","failure","QUEUED","LOADING","LOADED","FAILED","scriptLoadedCallbacks","queueLoadedCallbacks","loading","markDone","loadQueue","loadScripts","execCallbacks","failures","loadingScripts","AddOnManager","urls","requireLangPack","languages","language","languageLoad","addOn","createUrl","baseUrl","resource","addComponents","pluginName","pluginUrl","addOnUrl","loadDependencies","baseURL","PluginManager","ThemeManager","isNodeType","matchNodeNames","matchStyleValues","cssValue","hasPropValue","hasAttributeValue","isBogus","hasContentEditableState","isText","isComment","isBr","isContentEditableTrue","isContentEditableFalse","isZwsp","ZWSP","NodeType","Zwsp","isCaretContainerBlock","isCaretContainerInline","isCaretContainer","removeNode","getNodeValue","setNodeValue","insertInline","textNode","endsWithCaretContainer","startsWithCaretContainer","createBogusBr","br","insertBlock","blockName","blockNode","caretContainerNode","trimBogusBr","brs","lastBr","showCaretContainerBlock","caretContainer","CaretContainer","hasCeProperty","getEndChild","findParent","hasParent","isFormatterCaret","isCeFalseCaretContainer","RangeUtils","rng","exclude","collectSiblings","end_node","findEndPoint","walkBoundary","start_node","ancestor","startPoint","endPoint","hasChildNodes","normalize","normalizeEndPoint","isTableCell","hasBrBeforeAfter","hasContentEditableFalseParent","isPrevNode","findTextNodeRelative","lastInlineElement","parentBlockContainer","isAfterNode","nonEmptyElementsMap","directionLeft","findClosestIeRange","rects","elementFromPoint","createTextRange","moveToElementText","moveToPoint","moveOutOfContentEditableFalse","compareRanges","rng1","rng2","duplicate","getCaretRangeFromPoint","point","caretPositionFromPoint","offsetNode","caretRangeFromPoint","getSelectedNode","getNode","isSameElementPath","startElm","currentPath","getBody","lastPath","lastRng","getDoc","nativeRng","fakeRng","getRng","getStart","isCollapsed","nodeChanged","selectionChange","initialized","disable_nodechange","root_node","typeLookup","#text","#comment","#cdata","#pi","#doctype","#document-fragment","selfAttrs","selfAttr","cloneAttrs","shortEnded","ref_node","compileSchema","ni","attributesOrder","globalAttributes","dummyObj","addAttrs","schemaItem","blockContent","phrasingContent","flowContent","html4BlockContent","html4PhrasingContent","mapCache","table","compileElementMap","createLookupTable","default_value","patternToRegExp","ei","ai","al","attrData","attrType","outputName","globalAttributesOrder","elementRuleRegExp","attrRuleRegExp","hasPatternsRegExp","paddEmpty","removeEmpty","removeEmptyAttrs","attributesRequired","attributesDefault","attributesForced","forcedValue","validValues","attributePatterns","patternElements","setValidElements","schemaItems","addCustomElements","customElements","customElementRegExp","text_block_elements","block_elements","inline","cloneName","customElementsMap","customRule","elmName","addValidChildren","validChildren","childRuleRegExp","getElementRule","whiteSpaceElementsMap","selfClosingElementsMap","shortEndedElementsMap","boolAttrMap","validClasses","moveCaretBeforeOnEnterElementsMap","textBlockElementsMap","textInlineElementsMap","specialElements","verify_html","valid_elements","valid_styles","invalid_styles","valid_classes","custom_elements","valid_children","extended_valid_elements","li","legend","area","parentsRequired","invalid_elements","getValidClasses","getBoolAttrs","getTextBlockElements","getTextInlineElements","getShortEndedElements","getSelfClosingElements","getMoveCaretBeforeOnEnterElements","getSpecialElements","isValidChild","attrPatterns","Schema","trimComments","sanitizedText","findEndTag","tokenRegExp","shortEndedElements","SaxParser","fix_self_closing","processEndTag","parseAttribute","val3","attrRule","trimRegExp","fillAttrsMap","validate","isInternalElement","validAttributesMap","validAttributePatterns","filteredUrlAttrs","scriptUriRegExp","allow_html_data_urls","dataUriRegExp","attrList","endRegExp","removeInternalElements","isShortEnded","elementRule","isValidElement","attribsValue","anyAttributesRequired","selfClosing","fixSelfClosing","self_closing_elements","remove_internals","allow_conditional_comments","cdata","doctype","pi","paddEmptyNode","padd_empty_with_br","hasOnlyChild","fixInvalidChildren","newParent","currentNode","tempNode","childNode","nonEmptyElements","whitespaceElements","nonSplitableElements","textBlockElements","fixed","filterNode","nodeFilters","attributeFilters","matchedNodes","matchedAttributes","root_name","addNodeFilter","addAttributeFilter","addRootBlocks","rootBlockNode","startWhiteSpaceRegExp","endWhiteSpaceRegExp","rootBlockName","createNode","forced_root_block_attrs","removeWhitespaceBefore","textNodeNext","textVal","cloneAndExcludeBlocks","fl","isInWhiteSpacePreservedElement","allWhiteSpaceRegExp","isAllWhiteSpaceRegExp","whiteSpaceElements","invalidChildren","forced_root_block","attrFiltersLen","isRootContent","remove_trailing_brs","prevName","allow_unsafe_link_target","addTargetRules","removeTargetRules","regExp","toggleTargetRules","isUnsafe","allow_html_in_named_anchor","fix_list_elements","classList","validClassesMap","indent","indentBefore","indentAfter","htmlOutput","indent_before","indent_after","entity_encoding","element_format","getContent","Writer","sortedAttrs","3","8","7","10","4","11","inner","DomParser","Serializer","trimTrailingBr","brNode1","brNode2","trimHtml","trimContentRegExp","tempAttrs","trimContent","endTagIndex","matchLength","bogusAllRegExp","getTrimmedContent","addTempAttr","internalName","cleanup","impl","oldDoc","htmlSerializer","importNode","no_events","onPreProcess","getInner","onPostProcess","addRules","setRules","Selection","getPosition","checkRng","inside","compareEndPoints","getRange","ieRange","textNodeOffset","domRange","tmpRange","element2","bookmark","getBookmark","moveToBookmark","getIndexes","getBookmarkEndPoint","resolveIndexes","setBookmarkEndPoint","moveLeft","moveRng","moveStart","setEndPoint","createControlRange","addElement","addRange","marker","tmpRng","ieRng","ctrlRng","ctrlElm","getRangeAt","BACKSPACE","DOWN","ENTER","LEFT","RIGHT","SPACEBAR","TAB","UP","modifierPressed","metaKeyPressed","VK","getContentEditableRoot","isResizable","object_resizing","resizeGhostElement","deltaX","proportional","resizeHelperX","resizeHelperY","startX","startY","selectedHandle","startW","startH","selectedElm","resize_img_proportional","ratio","selectedElmGhost","startPos","resizeHelper","selectedElmX","selectedElmY","startScrollWidth","startScrollHeight","resizeStarted","endGhostResize","setSizeProp","editableDoc","rootDocument","showResizeRect","targetElm","mouseDownHandleName","mouseDownEvent","hideResizeRect","unbindResizeHandleEvents","detachResizeStartListener","resizeHandles","startDrag","unSelectabe","data-mce-bogus","handleElm","unselectable","updateResizeRect","isChildOrEqual","controlElm","img","disableGeckoResize","getEnd","resizeNativeStart","corner","cornerX","cornerY","relativeX","relativeY","lastMouseDownEvent","isWithinContentEditableFalse","nativeControlSelect","execCommand","controlSelect","ne","se","sw","rootClass","contentStyles","delayedSelect","throttledUpdateResizeRect","compose","or","tempArgs","isCaretCandidate","isInvalidTextElement","isAtomicInline","isTable","isInEditable","isAtomicContentEditableFalse","isAtomic","isEditableCaretCandidate","toStart","rect1","rect2","isValidOverflow","clientRect1","clientRect2","isAbove","isBelow","containsXY","isExtendingChar","extendingChars","Fun","CaretCandidate","ClientRect","ExtendingChar","isWhiteSpace","isHiddenWhiteSpaceRange","isNotPre","getCaretPositionClientRects","caretPosition","getBrClientRect","brNode","nbsp","clientRects","collapseAndInflateWidth","addUniqueAndValidRect","addCharacterOffset","beforeNode","isAtEnd","resolveIndex","isValidElementCaretCandidate","CaretPosition","isAtStart","toRange","isFloated","fromRangeStart","fromRangeEnd","DomUtils","normalizedParent","getChildNodes","normalizedTextOffset","targetValue","normalizedNodeIndex","numTextFragments","createPathItem","outputOffset","resolvePathItem","findTextPosition","dataLen","targetOffset","CaretBookmark","BookmarkManager","normalizeTableCellSelection","moveEndPoint","getPoint","findAdjacentContentEditableFalseElm","tridentSel","pasteHTML","data-mce-type","restoreEndPoint","appendData","addBogus","resolveCaretPositionBookmark","setRng","isBookmarkNode","TridentSelection","ControlSelection","serializer","bookmarkManager","controlSelection","setCursorLocation","_moveEndPoint","whiteSpaceBefore","whiteSpaceAfter","tmpElm","getSel","htmlText","setContent","caretNode","createContextualFragment","real","startElement","endElement","lastFocusBookmark","w3c","tryCompareBoundaryPoints","sourceRange","destinationRange","rangeCount","selectedRange","explicitRange","removeAllRanges","setBaseAndExtent","anchorNode","focusNode","setNode","skipEmptyTextNodes","forwards","getSelectedBlocks","endElm","selectedBlocks","isForward","anchorRange","focusRange","anchorOffset","focusOffset","selectorChanged","currentSelectors","selectorChangedData","getScrollContainer","scrollContainer","alignToTop","viewPort","viewPortY","viewPortH","getWin","placeCaretAt","ElementUtils","node1","node2","attribs","compareObjects","obj1","obj2","parsedSelectorToHtml","ancestry","decorate","sItem","getRequiredParent","elmRule","wrapInHtml","parentCandidate","parentRequired","ancestorName","siblingElm","selectorToHtml","parseSelector","parseSelectorItem","$0","$1","$2","$3","$4","getCssText","removeVars","previewFrag","previewElm","parentFontSize","previewStyles","previewCss","preview_styles","preview","addPostProcessHook","postProcessHooks","postProcess","hasPreSibling","isPre","blocks","joinPre","pre1","pre2","Preview","Hooks","ed","isTextBlock","isInlineBlock","isCaretNode","defaultFormats","valigntop","verticalAlign","valignmiddle","valignbottom","alignleft","ceFalseOverride","textAlign","defaultBlock","aligncenter","alignright","alignjustify","bold","italic","fontStyle","underline","textDecoration","exact","strikethrough","forecolor","remove_similar","hilitecolor","backgroundColor","fontname","fontFamily","fontsize","fontSize","fontsize_class","blockquote","subscript","superscript","onmatch","onformat","fmt","removeformat","block_expand","addKeyboardShortcuts","addShortcut","mixed","unregister","matchesUnInheritedFormatSelector","formatList","getTextDecoration","decoration","processUnderlineAndColor","setElementFormat","replaceVars","styleVal","applyNodeStyle","found","adjustSelectionToVisibleSelection","findSelectionEnd","applyRngStyle","node_specific","wrapName","wrapElm","newWrappers","rangeUtils","lastContentEditable","isEq","currentWrapElm","matchNode","getChildCount","isWhiteSpaceNode","getChildElementNode","isElementNode","matchNestedWrapper","mergeStyles","matchName","childCount","removeFormat","merge_with_parents","styleNode","hasStyle","merge_siblings","mergeSiblings","getNonWhiteSpaceSibling","expandRng","performCaretAction","curSelNode","forcedRootBlock","processChildElements","applyStyle","similar","findFormatRoot","formatRoot","wrapAndSplit","lastClone","firstClone","formatRootParent","splitToFormatRoot","removeRngStyle","getContainer","matchItems","item_name","normalizeStyleValue","matchParents","matchAll","matchedFormatNames","checkedMap","canApply","formatChanged","currentFormats","formatChangeData","matchedFormats","findParentContainer","isBogusBr","findLeaf","findParentContentEditable","findWordEndPoint","findSpace","pos2","lastTextNode","findSelectorEndPoint","sibling_name","curFormat","findBlockEndPoint","lastIdx","leaf","isColorFormatAndAnchor","compare_node","stylesModified","valueOut","MCE_ATTR_RE","inc","rootBlockElm","list_block","findElementSibling","tmpSibling","elementUtils","createCaretContainer","caretContainerId","INVISIBLE_CHAR","isCaretContainerEmpty","getParentCaretContainer","findFirstTextNode","removeCaretContainer","move_caret","applyCaretFormat","wordcharRegex","removeCaretFormat","hasContentAfter","formatNode","unmarkBogusCaretParents","caret_debug","_hasCaretEvents","markCaretContainersBogus","disableCaretContainer","isAtEndOfText","tmpNode","KEEP","INSERT","vDown","vUp","snake","diag","buildScript","start1","end1","start2","end2","middle","getMiddleSnake","i2","buildSnake","Diff","getOuterHtml","insertAt","removeAt","applyDiff","write","currentFragments","Fragments","hasIframes","createFragmentedLevel","beforeBookmark","createCompleteLevel","createFromEditor","trimmedFragments","applyToEditor","level","getLevelContent","level1","level2","Levels","setDirty","addNonTypingUndoLevel","typing","endTyping","isFirstTypedCharacter","locks","cmd","command","beforeChange","isDirty","lastLevel","modKey","currentLevel","custom_undo_redo_levels","undo","redo","hasUndo","hasRedo","transact","callback1","callback2","handleEnterKey","canSplitBlock","renderBlockOnIE","oldRng","trimInlineElementsOnLeftSideOfBlock","firstChilds","moveToCaretPosition","firstNonWhiteSpaceNodeSibling","tempElm","lastNode","parentBlock","setForcedBlockAttrs","forcedRootBlockName","emptyBlock","createNewBlock","clonedNode","textInlineElements","parentBlockName","newBlockName","keep_styles","editableRoot","isCaretAtStartOrEndOfBlock","isAfterLastNodeInContainer","wrapSelfAndSiblingsInDefaultBlock","newBlock","handleEmptyListItem","isFirstOrLastLi","containerBlock","getContainerBlock","containerBlockParent","containerBlockParentName","undoManager","insertBr","trimLeadingLineBreaks","getEditableRoot","addBrToBlockIfNeeded","insertNewBlockAfter","containerBlockName","end_container_on_empty_block","force_p_newlines","br_in_pre","restoreSelection","rootNodeName","moveEnd","isForwards","isBackwards","skipCaretContainers","findNode","getEditingHost","getParentBlock","isBlockLike","isInSameBlock","caretPosition1","caretPosition2","isInSameEditingHost","getChildNodeAtRelativeOffset","relativeOffset","beforeAfter","isNodesInSameBlock","lean","normalizeRange","leanLeft","leanRight","isNextToContentEditableFalse","isBeforeContentEditableFalse","isAfterContentEditableFalse","CaretUtils","nodeAtIndex","getCaretCandidatePosition","isBrBeforeBlock","findCaretPosition","startCaretPosition","innerNode","rootContentEditableFalseElm","CaretWalker","isListFragment","cleanupDomFragment","domFragment","toDomFragment","listItems","trimListItems","getParentLi","isParentBlockLi","getSplit","beforeRng","afterRng","findFirstIn","caretPos","caretWalker","newCaretPos","findLastOf","insertMiddle","insertAtCaret","liTarget","liElms","BEGINNING","END","isAt","newPos","InsertList","validInsertion","insertHtmlAtCaret","trimOrPaddLeftRight","hasSiblingText","trimNbspAfterDeleteAndPaddValue","reduceInlineTextElements","testNode","markFragmentElements","umarkFragmentElements","isPartOfFragment","canHaveChildren","moveSelectionToMarker","getContentEditableFalseParent","findNextCaretRng","parentEditableFalseElm","nextRng","bookmarkHtml","caretElement","parserArgs","paste","_selectionOverrides","showBlockCaretContainer","addVisual","processValue","InsertContent","isOldIE","ui","customCommand","skip_focus","commands","plugins","theme","queryCommandState","quirks","queryCommandValue","addCommands","command_list","addCommand","queryCommandSupported","addQueryStateHandler","addQueryValueHandler","hasCustomCommand","execNativeCommand","isFormatMatch","toggleFormat","storeSelection","mceResetDesignMode,mceBeginUndoLevel","mceEndUndoLevel,mceAddUndoLevel","Cut,Copy,Paste","queryCommandEnabled","translate","notificationManager","unlink","JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone","InsertUnorderedList,InsertOrderedList","listElm","listParent","Bold,Italic,Underline,Strikethrough,Superscript,Subscript","ForeColor,HiliteColor,FontName","FontSize","fontClasses","fontSizes","font_size_style_values","font_size_classes","RemoveFormat","mceBlockQuote","FormatBlock","mceCleanup","mceRemoveNode","mceSelectNodeDepth","mceSelectNode","mceInsertContent","mceInsertRawHTML","mceToggleFormat","mceSetContent","Indent,Outdent","intentValue","indentUnit","indentation","indentStyleName","getParam","mceRepaint","InsertHorizontalRule","mceToggleVisualAid","hasVisual","mceReplaceContent","mceInsertLink","selectAll","editingHost","mceNewDocument","InsertLineBreak","hasRightSideContent","brElm","extraBr","isControlKey","JustifyLeft,JustifyCenter,JustifyRight,JustifyFull","Outdent","inline_styles","FontSize,FontName","Undo","Redo","URI","baseUri","base_url","base_uri","isProtocolRelative","directory","toAbsPath","queryParts","userInfo","mailto","setPath","getURI","toRelative","tu","uu","toRelPath","toAbsolute","noHost","isSameOrigin","defaultPort","breakPoint","outPath","nb","noProtoHost","parseDataUri","getDocumentBaseUrl","loc","Class","extendClass","mixins","Mixins","dummy","createMethod","_super","Methods","Properties","fieldName","Statics","Defaults","Dispatcher","beforeFire","nativeEvents","Binding","otherModel","otherName","fromSelfToOther","fromOtherToSelf","_bindings","EventDispatcher","getEventDispatcher","_eventDispatcher","toggleNativeEvent","hasEventListeners","Observable","isNode","uniqueItems","__checked","Collection","chunker","whiteSpace","Selector","compileNameFilter","compileIdFilter","_name","compileClassesFilter","compileAttrFilter","cmp","compilePsuedoFilter","notSelectors","parseChunks","direct","_selectors","si","sl","getWindowSize","getRuntimeStyle","innerHtml","parseBox","measureBox","getSide","ClassList","onchange","_map","_change","curState","clsValue","animationFrameRequested","dirtyCtrls","_layout","_id","reflow","ObservableObject","BoxUtils","ReflowQueue","_nativeEvents","bindPendingEvents","eventCtrl","getParentCtrl","mouseLeaveHandler","eventRootCtrl","_lastHoverCtrl","getEl","mouseEnterHandler","lastParents","lastCtrl","fixWheelEvent","wheelDeltaX","_eventsRoot","eventRootDelegates","_delegates","hasWheelEventSupport","_hasMouseEnter","hasMouseWheelEventSupport","Control","classPrefix","isRtl","rtl","applyClasses","defaultClasses","_aria","_elmCache","borderBox","paddingBox","marginBox","getContainerElm","controlIdLookup","initLayoutRect","layoutRect","minHeight","autoResize","startMinWidth","startMinHeight","initialSize","deltaW","deltaH","maxW","maxH","maxHeight","_layoutRect","contentW","contentH","innerW","innerH","minW","minH","scrollW","_lastLayoutRect","newRect","lastLayoutRect","deltaWidth","deltaHeight","repaintControls","curRect","repaint","bodyElm","borderW","borderH","lastRepaintRect","_lastRepaintRect","_hasBody","updateLayoutRect","_lastRect","resolveCallbackName","parentsAndSelf","parentControls","$el","aria","ariaTarget","newItems","controls","renderBefore","renderHtml","postRender","renderTo","preRender","parentEventsRoot","border-top-width","border-right-width","border-bottom-width","border-left-width","bindStates","getOffset","parentWidth","parentHeight","rootControl","namespaceInit","typeClass","ControlType","tinymce","getRole","focusedElement","getParentRole","getAriaProp","isTextInputElement","canFocus","getFocusElements","getNavigationRoot","targetControl","navigationRoot","focusedControl","ariaRoot","focusElements","ariaRemember","moveFocusToIndex","lastAriaIndex","moveFocus","parentRole","submenu","up","down","handleNonTabOrEscEvent","Factory","KeyboardNavigation","selectorCache","_items","bodyClasses","containerCls","layout","focusCtrl","statusbar","autofocus","ctrlItems","defaultType","renderNew","containerElm","curItems","beforeItems","afterItems","fromJSON","lastRect","getDocumentSize","updateWithTouchData","getHandleElm","$eventOverlay","downButton","drag","cursor","docSize","runtimeStyle","DragHelper","renderScroll","repaintScroll","repaintAxis","axisName","posName","sizeName","contentSizeName","hasScroll","ax","scrollBarElm","scrollThumbElm","containerSize","scrollSize","posNameLower","sizeNameLower","hasScrollH","hasScrollV","addScroll","addScrollAxis","deltaPosName","scrollStart","axisId","draghelper","autoScroll","_hasScroll","bodyEl","Container","Scrollable","_preBodyHtml","calculateRelativePosition","selfW","selfH","viewport","testMoveRel","viewPortRect","moveRel","moveTo","moveBy","dx","dy","constrain","constrainToViewport","resizeToContent","resizeTo","resizeBy","dw","dh","Panel","Movable","Resizable","skipOrHidePanels","visiblePanels","panel","clickCtrl","autohide","bindDocumentClickHandler","documentClickHandler","bindDocumentScrollHandler","documentScrollHandler","repositionPanel","bindWindowResizeHandler","windowResizeHandler","FloatPanel","hideAll","toggleFixedChildPanels","scrollY","autofix","_autoFixY","addRemove","zOrder","modalBlockEl","hasModal","currentZIndex","removeVisiblePanel","$modalBlockEl","popover","ariaLabel","describedBy","bodyRole","toggleFullScreenState","contentValue","noScaleMetaValue","overrideViewPort","oldMetaValue","toggleBodyFullScreenClasses","checkFullscreenWindows","windows","_fullscreen","handleWindowResize","reposition","lastSize","Window","pack","closeClass","needsRecalc","headerW","headEl","headerH","headerHtml","footerHtml","fullscreen","slowRendering","_timer","_initial","dragHelper","getContentWindow","ifr","MessageBox","multiline","OK","OK_CANCEL","YES_NO","YES_NO_CANCEL","msgBox","createButton","subtype","onClick","onPostRender","onClose","onCancel","alert","confirm","getTopMostWindow","fireOpenEvent","fireCloseEvent","editorManager","bodyType","onclick","features","getParams","setParams","getWindows","Tooltip","Widget","tooltips","setValue","Progress","icon","closeButton","progressBar","notificationStyle","Notification","getLastNotification","notifications","resizeWindowEvent","prePositionNotifications","positionNotifications","firstItem","getContentAreaContainer","findDuplicateMessage","notificationArray","newNotification","isPlainTextNotification","filteredNotifications","notification","isSameNotification","notif","getNotifications","serviceMessage","service_message","NodePath","setEditorCommandState","getDocumentMode","setMceInternalContent","selectionHtml","internalContent","dataTransfer","mceInternalUrlPrefix","mceInternalDataType","getMceInternalContent","insertClipboardContents","cleanupStylesWhenDeleting","isTrailingBr","isSiblingsIgnoreWhiteSpace","findCaretNode","deleteRangeBetweenTextBlocks","startBlock","endBlock","caretNodeBefore","caretNodeAfter","expandBetweenBlocks","targetCaretNode","textBlock","targetTextBlock","handleTextBlockMergeDelete","handleLastBlockCharacterDelete","cloneTextBlockWithFormats","blockElm","currentFormatNodes","newBlockElm","clonedBlockElm","customDelete","mutationObserver","MutationObserver","observe","childList","subtree","attributeFilter","takeRecords","record","addedNodes","disconnect","span","transactCustomDelete","olderWebKit","dragStartRng","nodeInsert","relatedNode","records","attrModified","isMetaOrCtrl","modify","fragmentNode","blockParent","charText","pointRng","clipboardData","clearData","emptyEditorWhenDeleting","serializeRng","allContentsSelected","bodyRng","allRng","allSelection","shortcuts","inputMethodFocus","content_editable","removeHrOnBackspace","focusBody","selectControlElements","removeStylesWhenDeletingAcrossBlockElements","getAttributeApplyFunction","setAttributeNode","isSelectionAcrossElements","applyAttributes","ensureBodyHasRoleApplication","disableBackspaceIntoATable","addNewLinesBeforeBrInPre","brNodes","removePreSerializedStylesWhenSelectingControls","removeBlockQuoteOnBackSpace","setGeckoEditingOptions","setOpts","refreshContentEditable","addBrAfterLastLinks","fixLinks","setDefaultBlockType","deleteControlItemOnBackSpace","renderEmptyBlocksFix","emptyBlocksCSS","keepNoScriptContents","fixCaretSelectionOfDocumentElementOnIe","rngFromPoint","startRng","endSelection","started","htmlElm","normalizeSelection","showBrokenImageIcon","restoreFocusOnKeyDown","bodyHeight","blockCmdArrowNavigation","disableAutoUrlDetect","tapLinksAndImages","blockFormSubmitInsideEditor","removeAppleInterchangeBrs","ieInternalDragAndDrop","isGecko","emptyEditorOnDeleteEverything","isEverythingSelected","startCaretPos","endCaretPos","isWebKit","getEventTarget","event_root","eventRoot","bindEventDelegate","isListening","eventRootElm","delegates","customEventRootDelegates","activeEditor","editors","EditorObservable","bindPendingEventDelegates","_pendingNativeEvents","unbindAllNativeEvents","clickBlocker","toggleReadOnly","_clickBlocker","currentMode","keyCodeLookup","f9","f10","f11","modifierNames","parseShortcut","shortcut","alt","meta","createShortcut","desc","cmdFunc","subpatterns","hasModifier","isFunctionKey","matchShortcut","executeShortcutAction","pendingPatterns","uploadStatus","filename","blobInfo","extensions","image/jpeg","image/jpg","image/gif","image/png","blob","pathJoin","path1","path2","blobInfoToData","base64","defaultHandler","formData","credentials","onprogress","loaded","basePath","FormData","noUpload","handlerSuccess","handlerFailure","resolvePending","blobUri","pendingPromises","uploadBlobInfo","openNotification","markPending","closeNotification","markUploaded","removeFailed","isDefaultHandler","pendingUploadBlobInfo","uploadBlobs","blobInfos","isUploaded","isPending","blobUriToBlob","rejectWithError","dataUriToBlob","atob","Blob","uriToBlob","blobToDataUri","reader","FileReader","onloadend","readAsDataURL","Conversions","blobCache","findAll","imageToBlobInfo","getByUri","dataUri","findFirst","cachedBlobInfo","images","newPromise","cachedPromises","imageInfo","removeByUri","revokeObjectURL","createStatus","resultUri","hasBlobUri","blobUriStatuses","getResultUri","PENDING","UPLOADED","resolvePluginName","targetUrl","pluginUrlToMessage","plugin","displayNotification","displayError","_skinLoaded","uploadError","pluginLoadError","Uploader","ImageScanner","BlobCache","UploadStatus","ErrorReporter","aliveGuard","cacheInvalidator","replaceString","replaceImageUrl","replacementUrl","replaceUrlInUndoStack","replaceImageUri","images_reuse_filename","data-mce-src","convertURL","uploadImages","uploader","images_upload_url","images_upload_base_path","images_upload_credentials","images_upload_handler","scanForImages","imageInfos","uploadInfo","images_replace_blob_uris","uploadImagesAuto","automatic_uploads","isValidDataUriImage","imgElm","images_dataimg_filter","imageScanner","resultItem","replaceBlobUris","editorUpload","source_view","getAbsoluteClientRect","scrollX","rootRect","trimInlineCaretContainers","contentEditableFalseNodes","$lastVisualCaret","startBlink","cursorInterval","getCss","toArrayWithNode","Dimensions","findUntil","walkUntil","isAboveFn","isBeflowFn","targetClientRect","aboveLineNumber","lineNumber","isLine","positionsUntil","getClientRect","walkFn","isBelowFn","upUntil","downUntil","isAboveLine","distanceToRectLeft","distanceToRectRight","findClosestClientRect","isInside","oldClientRect","oldDistance","newDistance","findLineNodeRects","targetNodeRect","checkPosFn","lineRects","getContentEditableFalseChildren","caretInfo","closestCaret","contentEditableFalseNodeRects","closestNodeRect","getAbsolutePosition","getBodyPosition","getScrollPosition","getBodyScroll","inlineScroll","iframeScroll","getMousePosition","iframePosition","scrollPosition","bodyPosition","mousePosition","calc","MousePosition","isDraggable","isValidDropTarget","dragElement","cloneElement","cloneElm","createGhost","clonedElm","ghostElm","contenteditable","boxSizing","appendGhostToBody","moveGhost","maxX","maxY","removeElement","isLeftMouseButtonPressed","hasDraggableElement","applyRelPos","relX","ceElm","elmPos","relY","ghost","throttledPlaceCaretAt","hideFakeCaret","movement","dragging","targetPos","getRawTarget","targetClone","insertContent","removeDragState","bindFakeDragEvents","pageDom","dragStartHandler","dragHandler","dropHandler","dragEndHandler","blockIeDrop","realTarget","FakeCaret","LineWalker","LineUtils","DragDropOverrides","getVisualCaretPosition","SelectionOverrides","isFakeSelectionElement","getRealSelectionElement","realSelectionId","setRange","showCaret","fakeCaret","getNodeRange","isMoveInsideSameBlock","fromCaretPosition","toCaretPosition","inSameBlock","getNormalizedRangeEndPoint","isRangeInCaretContainerBlock","moveToCeFalseHorizontally","getNextPosFn","isBeforeContentEditableFalseFn","peekCaretPosition","rangeIsInContainerBlock","renderRangeCaret","moveToCeFalseVertically","walkerFn","linePositions","nextLinePositions","closestNextLineRect","caretClientRect","dist1","dist2","contentEditableFalseNode","caretPositions","exitPreBlock","createTextBlock","getNextVisualCaretPosition","getPrevVisualCaretPosition","moveH","newRange","moveV","getBlockCaretContainer","blockCaretContainer","renderCaretAtRange","ceRoot","caretRange","deleteContentEditableNode","nextCaretPosition","prevCaretPosition","prevCeFalseElm","nextElement","textBlocks","mergeTextBlocks","fromBlock","toBlock","ceTarget","backspaceDelete","newCaretPosition","registerEvents","override","moveFn","isXYWithinRange","handleTouchSelect","moved","contentEditableRoot","setContentEditableSelection","paddEmptyContentEditableArea","handleBlockContainer","handleEmptyBackspaceDelete","prevent","deleteForward","backspace","removeContentEditableSelection","hasNormalCaretPosition","block1","block2","isContentKey","hasBetterMouseTarget","targetBlock","caretBlock","selectedContentEditableNode","isRangeInCaretContainer","realSelectionElement","addCss","isWithinCaretContainer","$realSelectionContainer","origTargetClone","rnd","uuid","sidebars","NodeChange","DomSerializer","Formatter","UndoManager","EnterKey","ForceBlocks","EditorCommands","WindowManager","NotificationManager","Quirks","Mode","Shortcuts","EditorUpload","Uuid","Sidebar","Editor","documentBaseUrl","defaultSettings","documentBaseURL","delta_width","delta_height","popup_css","document_base_url","add_form_submit_trigger","submit_patch","add_unload_trigger","convert_urls","relative_urls","remove_script_host","visual","font_size_legacy_values","hidden_input","padd_empty_editor","render_ui","convert_fonts_to_spans","ie7_compat","external_plugins","language_load","documentBaseURI","contentCSS","loadedCSS","editorCommands","cache_suffix","override_viewport","execCallback","scriptLoader","language_url","themeUrl","theme_url","orgVisibility","hasHiddenInput","formEventDelegate","startContent","_mceOldSubmit","triggerSave","windowManager","encoding","save","_beforeUnload","set_dirty","initPlugin","pluginInstance","Plugin","initializedPlugins","Theme","bodyId","bodyClass","rtl_ui","i18n","setCode","aria_label","getLang","orgDisplay","min_height","renderUI","iframeHeight","editorContainer","iframeContainer","content_css","content_style","initContentBody","iframeHTML","cssUrl","body_id","body_class","content_security_policy","domainRelaxUrl","domain","frameBorder","allowTransparency","contentAreaContainer","iframeElement","skipWrite","contentCssText","content_document","content_window","bodyElement","hex_colors","force_hex_style_colors","class_filter","forceBlocks","enterKey","_nodeChangeDispatcher","browser_spellcheck","gecko_spellcheck","spellcheck","directionality","nowrap","protect","auto_focus","skipFocus","getContentEditableHost","contentEditableHost","callbackLookup","addButton","addSidebar","addMenuItem","menuItems","addContextToolbar","contextToolbars","focusedEditor","setProgressState","padd","isNotDirty","urlconverter_callback","visual_table_class","visual_anchor_class","automatic","_scanForImages","newCode","_dir","getCode","getLangData","FocusManager","getActiveElement","createBookmark","bookmarkToRng","selectionChangeHandler","blurredEditor","isUIElement","documentFocusInHandler","documentMouseUpHandler","unregisterDocumentEvents","customSelector","custom_ui_selector","isEditorUIElement","_isUIElement","I18n","globalEventDelegate","EditorManager","toggleGlobalEvents","boundGlobalEvents","removeEditorFromList","removedFromList","purgeDestroyedEditor","beforeUnloadDelegate","instanceCounter","majorVersion","minorVersion","releaseDate","preInit","tinyMCEPreInit","srcScript","focusManager","pluginBaseUrls","plugin_base_urls","isInvalidInlineTarget","invalidInlineTargets","report","createId","findTargets","forms","editor_deselector","editor_selector","initEditors","createEditor","initCount","provideResults","addI18n","tinyMCE","replaceWithSpan","font","face","strike","XHR","success_scope","error_scope","content_type","requestheaders","JSONRequest","sendRPC","ecb","scb","ty","updateKeys","LocalStorage","nextPos","hasOldIEDataSupport","storageElm","userDataKey","localStorage","addBehavior","getItem","setItem","removeItem","firstControlClass","lastControlClass","containerClass","firstClass","lastClass","lastItem","controlClass","Layout","btnStyle","btnElm","textHtml","setButtonText","$span","textCls","iconElm","subinput","menu","showMenu","statusLevel","statusMessage","openElm","innerPadding","inputElm","openBtnHtml","extraAttrs","statusHtml","showAutoComplete","term","hideMenu","previewUrl","statusIconElm","focusIdx","ComboBox","onaction","repaintColor","Button","showPanel","panelSettings","hidePanel","popoverAlign","PanelButton","_color","resetColor","onClickHandler","Color","rgb2hsv","minRGB","maxRGB","hsvToRgb","hue","saturation","brightness","side","chroma","toRgb","toHsv","updateColor","hsv","hueUpdate","huePointElm","svPointElm","svRootElm","updateSaturationAndValue","updateHue","hueRootElm","_repaint","_svdraghelper","_hdraghelper","rgb","_rendered","getOldIeFallbackHtml","gradientPrefix","stopsList","stops","hueHtml","gradientCssText","delimiter","_getDataPathHtml","Path","elementpath","outParents","flex","FormItem","labelGap","formItemDefaults","formItem","forId","recalcLabels","maxLabelWidth","labelGapCalc","labelCtrl","labelWidth","Form","attach","isChildOfContentEditableTrue","getElementText","getOrGenerateId","isValidAnchor","isHeader","isValidHeader","getLevel","headerTarget","headerId","anchorTarget","anchorId","anchorText","getHeaderTargets","getAnchorTargets","getTargetElements","hasTitle","LinkTargets","HISTORY_LENGTH","toMenuItem","toMenuItems","staticMenuItem","isUniqueUrl","foundTarget","getSetting","editorSettings","createMenuItems","fileType","fromHistoryMenuItems","uniqueHistory","fromMenuItems","filteredTargets","anchorMenuItems","topAnchor","bottomAchor","bothEmpty","typeahead_urls","filterByQuery","addToHistory","lowerCaseTerm","linkDetails","setupAutoCompleteHandler","autocomplete","linkTargets","statusToUiState","setupLinkValidatorHandler","validatorHandler","filepicker_validator_handler","validateUrl","actionCallback","fileBrowserCallback","fileBrowserCallbackTypes","filetype","file_picker_types","file_browser_callback_types","file_picker_callback","file_browser_callback","AbsoluteLayout","contLayoutRect","contPaddingBox","contSettings","totalFlex","availableSpace","ctrlLayoutRect","ctrlSettings","maxAlignEndPos","minSizeName","maxSizeName","beforeName","innerSizeName","deltaSizeName","alignAxisName","alignInnerSizeName","alignSizeName","alignMinSizeName","alignBeforeName","alignAfterName","alignDeltaSizeName","alignContentSizeName","maxSizeItems","maxFlexSize","endClass","getSpecifiedFontProp","toPt","normalizeFontFamily","getComputedFontProp","getFontSize","specifiedFontSize","getFontFamily","fontValue","FontInfo","setupContainer","ui_container","setupRtlMode","registerControls","createListBoxChangeHandler","formatName","createFontNameListBoxChangeHandler","getFirstFont","createFontSizeListBoxChangeHandler","px","pt","createFormats","createFormatMenu","createMenu","menuItem","newFormats","createStylesMenu","style_formats_merge","style_formats","defaultStyleFormats","itemDefaults","textStyle","initOnPostRender","toggleUndoRedoState","checkState","typeFn","toggleVisualAidState","hideMenuObjects","hideFormatMenuItems","formatMenu","outdent","cut","help","selectall","visualaid","newdocument","alignnone","trimMenuItems","outputMenuItems","createCustomMenuItems","nameList","createContextMenuItems","prependToContext","createInsertMenu","insert_button_items","selectable","oncreatemenu","onShowMenu","style_formats_autohide","block_formats","fixedWidth","onselect","defaultFontsFormats","fonts","font_formats","defaultFontsizeFormats","fontsize_formats","ar","cols","posX","posY","spacingH","spacingV","alignH","alignV","ctrlMinWidth","ctrlMinHeight","availableWidth","availableHeight","reverseRows","colWidths","rowHeights","sqrt","flexV","packV","flexWidths","severity","strong","startMinH","targetCtrl","forName","Toolbar","MenuBar","MenuButton","_renderOpen","activeMenu","hasVisibleSiblingMenu","overCtrl","ariaHideMenu","hasMenus","_parentMenu","_lastRel","convertShortcut","markMatches","boldMatches","iconHtml","textElm","MenuItem","Throbber","itemsFactory","hideThrobber","throbber","requestTime","_hasIcons","Menu","setSelected","menuValues","selectedText","lastItemCtrl","lastControl","activateMenuItemsByValue","getSelectedItem","selectedItem","Checkbox","resizeDragHelper","strOptions","_options","setAriaProp","updateSliderHandle","maxHandlePos","shortSizeName","stylePosName","styleValue","handleEl","orientation","_minValue","_maxValue","previewFilter","minValue","_initValue","toFraction","fromFraction","handleKeyboard","alter","handleDrag","startHandlePos","handlePos","_dragHelper","screenCordName","mainButtonElm","menuButtonElm","_menuBtnText","FlowLayout","activateTab","activeTabElm","activeTabId","tabsHtml","activeTab","targetParent","headH","hidefocus","deps","defn","bolt","api","demand","util","stateSelector","disabledStateSelector","toolbar","createToolbar","createToolbars","edit","tools","removed_menuitems","menubar","createMenuButtons","geom","Rect","elementRect","contentAreaRect","panelRect","inline_toolbar_position_handler","oncancel","addContextualToolbars","addKeys","hasSidebar","createSidebar","fireSkinLoaded","min_width","max_width","max_height","skinUiCss","toolbar_items_size","resize","onResizeStart","onResize","fixed_toolbar_container","_fixed","skin","skin_url","image_list","image_prepend_url","image_advtab","vspace","hspace","image_dimensions","image_class_list","onbeforecall","image_description","image_title","image_caption","onSubmit","contextmenu","isContextMenuVisible","link_context_toolbar","dispatchEvent","createEvent","initMouseEvent","link_list","default_link_target","target_list","rel_list","link_class_list","link_title","onkeyup","link_assume_external_targets","showDialog","isTextNode","isListNode","isListItemNode","isFirstChild","isLastChild","isChildOfBody","getSelectedListItems","getNormalizedEndPoint","resolveBookmark","normalizeList","normalizeLists","createNewTextBlock","splitList","outdentSelection","toggleList","removeList","mergeWithAdjacentLists","indentSelection","textcolor_map","color_picker_callback","lastId","forecolor_rows","textcolor_rows","backcolor","backcolor_rows","forecolor_cols","textcolor_cols","backcolor_cols","uiTinymceConfig","uiTinymceService","toggleDisable","ensureInstance","tinyInstance","getUniqueId","uiTinymce","debouncedUpdate","debouncedUpdateDelay","debouncedUpdateTimer","setupOptions","maybeInitPromise","unbindEventListener","eid","clonedElement","UITinymceService","ID_ATTR"],"mappings":";;;;;;;;;;;;;CAaA,SAAYA,EAAQC,GAEnB,YAEuB,iBAAXC,SAAiD,gBAAnBA,QAAOC,QAShDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,KAAM,IAAIE,OAAO,2CAElB,OAAOL,GAASI,IAGlBJ,EAASD,IAIY,mBAAXO,QAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAMtE,YA8BC,SAASC,GAASC,EAAMC,GACvBA,EAAMA,GAAOR,EAEb,IAAIS,GAASD,EAAIE,cAAe,SAEhCD,GAAOE,KAAOJ,EACdC,EAAII,KAAKC,YAAaJ,GAASK,WAAWC,YAAaN,GA8bzD,QAASO,GAAaC,GAMrB,GAAIC,KAAWD,GAAO,UAAYA,IAAOA,EAAIC,OAC5CC,EAAOC,GAAOD,KAAMF,EAErB,OAAc,aAATE,GAAuBC,GAAOC,SAAUJ,IACrC,EAGQ,UAATE,GAA+B,IAAXD,GACR,gBAAXA,IAAuBA,EAAS,GAAOA,EAAS,IAAOD,GAuwEhE,QAASK,GAAQC,EAAUC,EAAWC,GACrC,MAAKL,IAAOM,WAAYF,GAChBJ,GAAOO,KAAMJ,EAAU,SAAUK,EAAMC,GAC7C,QAASL,EAAUM,KAAMF,EAAMC,EAAGD,KAAWH,IAK1CD,EAAUO,SACPX,GAAOO,KAAMJ,EAAU,SAAUK,GACvC,MAASA,KAASJ,IAAgBC,IAKV,gBAAdD,GACJJ,GAAOO,KAAMJ,EAAU,SAAUK,GACvC,MAASI,IAAQF,KAAMN,EAAWI,GAAS,KAASH,IAKjDQ,GAAUC,KAAMV,GACbJ,GAAOe,OAAQX,EAAWD,EAAUE,I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Ck3J,EAAc15Q,EAAMsuC,MAAMryE,EAAMumJ,eAIpCh6G,EAAQ03C,YAAYt/E,QAAQ,SAAS4kF,GACnC,MAAOA,GAAa93C,EAAKq/H,YAAYvnF,GAAc,KAGrDh9C,EAAQi7C,SAAS7iF,QAAQ,SAASgkF,GAChC,MAAOA,GAAYl3C,EAAKovD,eAAelY,GAAa,KAGtDp8C,EAAQ84C,QAAU,WAChBq4N,GAEA,IAAI/0N,GAAYp8C,EAAQi4C,WACtB/yC,EAAKovD,eAAet0D,EAAQi4C,YAAc,EAIxCm5N,IACFA,EAAaz3E,WAEby3E,EAAal8D,WAAW94J,GAGxBg1N,EAAan8S,KAAK,YAItBxB,EAAMyyD,SAAS,WAAYgrP,EAK3B,IAAIU,GAAsBp6Q,EAAMunB,IAAI,mBAAoB,SAAS92D,EAAG2W,GAClE,GAAIizS,GAAMp+S,EAAMmL,EAChB,IAAIg5B,QAAQtH,YAAY1xB,IAAOA,IAAOizS,EAAK,CACzC,GAAIr4P,GAAgBloB,EAAQrmB,SACxB6mS,EAAgBxgR,EAAQvhC,OAC5B+hT,GAAc7wR,WAAW,MACzB6wR,EAAc7wR,WAAW,SACzB6wR,EAAc7wR,WAAW,eACzB8+O,QAAQ9wB,YAAY,mBAAmB,EAAO4iE,GAC9Cr4P,EAAch/B,OAAO05E,EAAS49M,GAAet6Q,IAC7Co6Q,MAIJp6Q,GAAMunB,IAAI,WAAY,WACpBoyP,IAEIC,IACFA,EAAalhT,SACbkhT,EAAe,cAYxBl2Q,QAAQ,oBAIP,WACE,GAAI62Q,GAAmB,WACrB,GAAIC,GAAU,aAEbj4J,EAAW,EAEXs3J,EAAc,WAEb,MADAt3J,KACOi4J,EAAU,IAAMj4J,EAGzB,QACCs3J,YAAaA,GAIhB,OAAO,IAAIU","file":"scripts/vendor-99a184e205.js","sourcesContent":["/*!\n * jQuery JavaScript Library v3.1.1\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-09-22T22:30Z\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.json 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.1\",\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\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\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.3\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-08-08\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)|^-$|[^\\0-\\x1f\\x7f-\\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 && (\"form\" in elem || \"label\" in elem);\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\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tdisabledAncestor( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\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 filter and find\n\tif ( support.getById ) {\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\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\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\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode(\"id\");\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( (elem = elems[i++]) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode(\"id\");\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\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 = \"\" +\n\t\t\t\t\"\";\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 = \"\" +\n\t\t\t\t\"\";\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\treturn false;\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\treturn false;\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: ) 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\tcontext.nodeType === 9 && documentIsHTML && Expr.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 = \"\";\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 = \"\";\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\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Simple selector that can be filtered directly, removing non-Elements\n\tif ( risSimple.test( qualifier ) ) {\n\t\treturn jQuery.filter( qualifier, elements, not );\n\t}\n\n\t// Complex selector, compare the two sets, removing non-Elements\n\tqualifier = jQuery.filter( qualifier, elements );\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\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\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 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 rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], 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\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? 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( rnothtmlwhite ) || [] );\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 getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\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 = getData( data );\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, \"\" ],\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 or other required elements.\n\tthead: [ 1, \"\", \"
\" ],\n\tcol: [ 2, \"\", \"
\" ],\n\ttr: [ 2, \"\", \"
\" ],\n\ttd: [ 3, \"\", \"
\" ],\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;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\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 = \"\";\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( rnothtmlwhite ) || [ \"\" ];\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( rnothtmlwhite ) || [ \"\" ];\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, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && 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 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\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 ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ 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 ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\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\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, 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\tif ( button & 1 ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif ( button & 2 ) {\n\t\t\t\treturn 3;\n\t\t\t}\n\n\t\t\tif ( button & 4 ) {\n\t\t\t\treturn 2;\n\t\t\t}\n\n\t\t\treturn 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 = /\\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>\" );\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,\n\t\tval = 0;\n\n\t// If we already have the right measurement, avoid augmentation\n\tif ( extra === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\ti = 4;\n\n\t// Otherwise initialize for horizontal or vertical properties\n\t} else {\n\t\ti = name === \"width\" ? 1 : 0;\n\t}\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( rnothtmlwhite );\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\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\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\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\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\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -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\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\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\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\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\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\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( rnothtmlwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\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 = stripAndCollapse( 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( rnothtmlwhite ) || [];\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 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\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 = stripAndCollapse( 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( rnothtmlwhite ) || [];\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( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\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\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\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == 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\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\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\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\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\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( jQuery.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { 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\trantiCache = /([?&])_=[^&]*/,\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( rnothtmlwhite ) || [];\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( rnothtmlwhite ) || [ \"\" ];\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 or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\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( \"\n * \n * \n * \n * ```\n *\n * @param {DOMElement} element DOM element which is the root of AngularJS application.\n * @param {Array=} modules an array of modules to load into the application.\n * Each item in the array should be the name of a predefined module or a (DI annotated)\n * function that will be invoked by the injector as a `config` block.\n * See: {@link angular.module modules}\n * @param {Object=} config an object for defining configuration options for the application. The\n * following keys are supported:\n *\n * * `strictDi` - disable automatic function annotation for the application. This is meant to\n * assist in finding bugs which break minified code. Defaults to `false`.\n *\n * @returns {auto.$injector} Returns the newly created injector for this app.\n */\nfunction bootstrap(element, modules, config) {\n if (!isObject(config)) config = {};\n var defaultConfig = {\n strictDi: false\n };\n config = extend(defaultConfig, config);\n var doBootstrap = function() {\n element = jqLite(element);\n\n if (element.injector()) {\n var tag = (element[0] === window.document) ? 'document' : startingTag(element);\n // Encode angle brackets to prevent input from being sanitized to empty string #8683.\n throw ngMinErr(\n 'btstrpd',\n 'App already bootstrapped with this element \\'{0}\\'',\n tag.replace(//,'>'));\n }\n\n modules = modules || [];\n modules.unshift(['$provide', function($provide) {\n $provide.value('$rootElement', element);\n }]);\n\n if (config.debugInfoEnabled) {\n // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.\n modules.push(['$compileProvider', function($compileProvider) {\n $compileProvider.debugInfoEnabled(true);\n }]);\n }\n\n modules.unshift('ng');\n var injector = createInjector(modules, config.strictDi);\n injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',\n function bootstrapApply(scope, element, compile, injector) {\n scope.$apply(function() {\n element.data('$injector', injector);\n compile(element)(scope);\n });\n }]\n );\n return injector;\n };\n\n var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;\n var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;\n\n if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {\n config.debugInfoEnabled = true;\n window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');\n }\n\n if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {\n return doBootstrap();\n }\n\n window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');\n angular.resumeBootstrap = function(extraModules) {\n forEach(extraModules, function(module) {\n modules.push(module);\n });\n return doBootstrap();\n };\n\n if (isFunction(angular.resumeDeferredBootstrap)) {\n angular.resumeDeferredBootstrap();\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.reloadWithDebugInfo\n * @module ng\n * @description\n * Use this function to reload the current application with debug information turned on.\n * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.\n *\n * See {@link ng.$compileProvider#debugInfoEnabled} for more.\n */\nfunction reloadWithDebugInfo() {\n window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;\n window.location.reload();\n}\n\n/**\n * @name angular.getTestability\n * @module ng\n * @description\n * Get the testability service for the instance of AngularJS on the given\n * element.\n * @param {DOMElement} element DOM element which is the root of AngularJS application.\n */\nfunction getTestability(rootElement) {\n var injector = angular.element(rootElement).injector();\n if (!injector) {\n throw ngMinErr('test',\n 'no injector found for element argument to getTestability');\n }\n return injector.get('$$testability');\n}\n\nvar SNAKE_CASE_REGEXP = /[A-Z]/g;\nfunction snake_case(name, separator) {\n separator = separator || '_';\n return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n return (pos ? separator : '') + letter.toLowerCase();\n });\n}\n\nvar bindJQueryFired = false;\nfunction bindJQuery() {\n var originalCleanData;\n\n if (bindJQueryFired) {\n return;\n }\n\n // bind to jQuery if present;\n var jqName = jq();\n jQuery = isUndefined(jqName) ? window.jQuery : // use jQuery (if present)\n !jqName ? undefined : // use jqLite\n window[jqName]; // use jQuery specified by `ngJq`\n\n // Use jQuery if it exists with proper functionality, otherwise default to us.\n // AngularJS 1.2+ requires jQuery 1.7+ for on()/off() support.\n // AngularJS 1.3+ technically requires at least jQuery 2.1+ but it may work with older\n // versions. It will not work for sure with jQuery <1.7, though.\n if (jQuery && jQuery.fn.on) {\n jqLite = jQuery;\n extend(jQuery.fn, {\n scope: JQLitePrototype.scope,\n isolateScope: JQLitePrototype.isolateScope,\n controller: /** @type {?} */ (JQLitePrototype).controller,\n injector: JQLitePrototype.injector,\n inheritedData: JQLitePrototype.inheritedData\n });\n } else {\n jqLite = JQLite;\n }\n\n // All nodes removed from the DOM via various jqLite/jQuery APIs like .remove()\n // are passed through jqLite/jQuery.cleanData. Monkey-patch this method to fire\n // the $destroy event on all removed nodes.\n originalCleanData = jqLite.cleanData;\n jqLite.cleanData = function(elems) {\n var events;\n for (var i = 0, elem; (elem = elems[i]) != null; i++) {\n events = jqLite._data(elem).events;\n if (events && events.$destroy) {\n jqLite(elem).triggerHandler('$destroy');\n }\n }\n originalCleanData(elems);\n };\n\n angular.element = jqLite;\n\n // Prevent double-proxying.\n bindJQueryFired = true;\n}\n\n/**\n * throw error if the argument is falsy.\n */\nfunction assertArg(arg, name, reason) {\n if (!arg) {\n throw ngMinErr('areq', 'Argument \\'{0}\\' is {1}', (name || '?'), (reason || 'required'));\n }\n return arg;\n}\n\nfunction assertArgFn(arg, name, acceptArrayAnnotation) {\n if (acceptArrayAnnotation && isArray(arg)) {\n arg = arg[arg.length - 1];\n }\n\n assertArg(isFunction(arg), name, 'not a function, got ' +\n (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));\n return arg;\n}\n\n/**\n * throw error if the name given is hasOwnProperty\n * @param {String} name the name to test\n * @param {String} context the context in which the name is used, such as module or directive\n */\nfunction assertNotHasOwnProperty(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n }\n}\n\n/**\n * Return the value accessible from the object by path. Any undefined traversals are ignored\n * @param {Object} obj starting object\n * @param {String} path path to traverse\n * @param {boolean} [bindFnToScope=true]\n * @returns {Object} value as accessible by path\n */\n//TODO(misko): this function needs to be removed\nfunction getter(obj, path, bindFnToScope) {\n if (!path) return obj;\n var keys = path.split('.');\n var key;\n var lastInstance = obj;\n var len = keys.length;\n\n for (var i = 0; i < len; i++) {\n key = keys[i];\n if (obj) {\n obj = (lastInstance = obj)[key];\n }\n }\n if (!bindFnToScope && isFunction(obj)) {\n return bind(lastInstance, obj);\n }\n return obj;\n}\n\n/**\n * Return the DOM siblings between the first and last node in the given array.\n * @param {Array} array like object\n * @returns {Array} the inputted object or a jqLite collection containing the nodes\n */\nfunction getBlockNodes(nodes) {\n // TODO(perf): update `nodes` instead of creating a new object?\n var node = nodes[0];\n var endNode = nodes[nodes.length - 1];\n var blockNodes;\n\n for (var i = 1; node !== endNode && (node = node.nextSibling); i++) {\n if (blockNodes || nodes[i] !== node) {\n if (!blockNodes) {\n blockNodes = jqLite(slice.call(nodes, 0, i));\n }\n blockNodes.push(node);\n }\n }\n\n return blockNodes || nodes;\n}\n\n\n/**\n * Creates a new object without a prototype. This object is useful for lookup without having to\n * guard against prototypically inherited properties via hasOwnProperty.\n *\n * Related micro-benchmarks:\n * - http://jsperf.com/object-create2\n * - http://jsperf.com/proto-map-lookup/2\n * - http://jsperf.com/for-in-vs-object-keys2\n *\n * @returns {Object}\n */\nfunction createMap() {\n return Object.create(null);\n}\n\nfunction stringify(value) {\n if (value == null) { // null || undefined\n return '';\n }\n switch (typeof value) {\n case 'string':\n break;\n case 'number':\n value = '' + value;\n break;\n default:\n if (hasCustomToString(value) && !isArray(value) && !isDate(value)) {\n value = value.toString();\n } else {\n value = toJson(value);\n }\n }\n\n return value;\n}\n\nvar NODE_TYPE_ELEMENT = 1;\nvar NODE_TYPE_ATTRIBUTE = 2;\nvar NODE_TYPE_TEXT = 3;\nvar NODE_TYPE_COMMENT = 8;\nvar NODE_TYPE_DOCUMENT = 9;\nvar NODE_TYPE_DOCUMENT_FRAGMENT = 11;\n\n/**\n * @ngdoc type\n * @name angular.Module\n * @module ng\n * @description\n *\n * Interface for configuring AngularJS {@link angular.module modules}.\n */\n\nfunction setupModuleLoader(window) {\n\n var $injectorMinErr = minErr('$injector');\n var ngMinErr = minErr('ng');\n\n function ensure(obj, name, factory) {\n return obj[name] || (obj[name] = factory());\n }\n\n var angular = ensure(window, 'angular', Object);\n\n // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap\n angular.$$minErr = angular.$$minErr || minErr;\n\n return ensure(angular, 'module', function() {\n /** @type {Object.} */\n var modules = {};\n\n /**\n * @ngdoc function\n * @name angular.module\n * @module ng\n * @description\n *\n * The `angular.module` is a global place for creating, registering and retrieving AngularJS\n * modules.\n * All modules (AngularJS core or 3rd party) that should be available to an application must be\n * registered using this mechanism.\n *\n * Passing one argument retrieves an existing {@link angular.Module},\n * whereas passing more than one argument creates a new {@link angular.Module}\n *\n *\n * # Module\n *\n * A module is a collection of services, directives, controllers, filters, and configuration information.\n * `angular.module` is used to configure the {@link auto.$injector $injector}.\n *\n * ```js\n * // Create a new module\n * var myModule = angular.module('myModule', []);\n *\n * // register a new service\n * myModule.value('appName', 'MyCoolApp');\n *\n * // configure existing services inside initialization blocks.\n * myModule.config(['$locationProvider', function($locationProvider) {\n * // Configure existing providers\n * $locationProvider.hashPrefix('!');\n * }]);\n * ```\n *\n * Then you can create an injector and load your modules like this:\n *\n * ```js\n * var injector = angular.injector(['ng', 'myModule'])\n * ```\n *\n * However it's more likely that you'll just use\n * {@link ng.directive:ngApp ngApp} or\n * {@link angular.bootstrap} to simplify this process for you.\n *\n * @param {!string} name The name of the module to create or retrieve.\n * @param {!Array.=} requires If specified then new module is being created. If\n * unspecified then the module is being retrieved for further configuration.\n * @param {Function=} configFn Optional configuration function for the module. Same as\n * {@link angular.Module#config Module#config()}.\n * @returns {angular.Module} new module with the {@link angular.Module} api.\n */\n return function module(name, requires, configFn) {\n\n var info = {};\n\n var assertNotHasOwnProperty = function(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n }\n };\n\n assertNotHasOwnProperty(name, 'module');\n if (requires && modules.hasOwnProperty(name)) {\n modules[name] = null;\n }\n return ensure(modules, name, function() {\n if (!requires) {\n throw $injectorMinErr('nomod', 'Module \\'{0}\\' is not available! You either misspelled ' +\n 'the module name or forgot to load it. If registering a module ensure that you ' +\n 'specify the dependencies as the second argument.', name);\n }\n\n /** @type {!Array.>} */\n var invokeQueue = [];\n\n /** @type {!Array.} */\n var configBlocks = [];\n\n /** @type {!Array.} */\n var runBlocks = [];\n\n var config = invokeLater('$injector', 'invoke', 'push', configBlocks);\n\n /** @type {angular.Module} */\n var moduleInstance = {\n // Private state\n _invokeQueue: invokeQueue,\n _configBlocks: configBlocks,\n _runBlocks: runBlocks,\n\n /**\n * @ngdoc method\n * @name angular.Module#info\n * @module ng\n *\n * @param {Object=} info Information about the module\n * @returns {Object|Module} The current info object for this module if called as a getter,\n * or `this` if called as a setter.\n *\n * @description\n * Read and write custom information about this module.\n * For example you could put the version of the module in here.\n *\n * ```js\n * angular.module('myModule', []).info({ version: '1.0.0' });\n * ```\n *\n * The version could then be read back out by accessing the module elsewhere:\n *\n * ```\n * var version = angular.module('myModule').info().version;\n * ```\n *\n * You can also retrieve this information during runtime via the\n * {@link $injector#modules `$injector.modules`} property:\n *\n * ```js\n * var version = $injector.modules['myModule'].info().version;\n * ```\n */\n info: function(value) {\n if (isDefined(value)) {\n if (!isObject(value)) throw ngMinErr('aobj', 'Argument \\'{0}\\' must be an object', 'value');\n info = value;\n return this;\n }\n return info;\n },\n\n /**\n * @ngdoc property\n * @name angular.Module#requires\n * @module ng\n *\n * @description\n * Holds the list of modules which the injector will load before the current module is\n * loaded.\n */\n requires: requires,\n\n /**\n * @ngdoc property\n * @name angular.Module#name\n * @module ng\n *\n * @description\n * Name of the module.\n */\n name: name,\n\n\n /**\n * @ngdoc method\n * @name angular.Module#provider\n * @module ng\n * @param {string} name service name\n * @param {Function} providerType Construction function for creating new instance of the\n * service.\n * @description\n * See {@link auto.$provide#provider $provide.provider()}.\n */\n provider: invokeLaterAndSetModuleName('$provide', 'provider'),\n\n /**\n * @ngdoc method\n * @name angular.Module#factory\n * @module ng\n * @param {string} name service name\n * @param {Function} providerFunction Function for creating new instance of the service.\n * @description\n * See {@link auto.$provide#factory $provide.factory()}.\n */\n factory: invokeLaterAndSetModuleName('$provide', 'factory'),\n\n /**\n * @ngdoc method\n * @name angular.Module#service\n * @module ng\n * @param {string} name service name\n * @param {Function} constructor A constructor function that will be instantiated.\n * @description\n * See {@link auto.$provide#service $provide.service()}.\n */\n service: invokeLaterAndSetModuleName('$provide', 'service'),\n\n /**\n * @ngdoc method\n * @name angular.Module#value\n * @module ng\n * @param {string} name service name\n * @param {*} object Service instance object.\n * @description\n * See {@link auto.$provide#value $provide.value()}.\n */\n value: invokeLater('$provide', 'value'),\n\n /**\n * @ngdoc method\n * @name angular.Module#constant\n * @module ng\n * @param {string} name constant name\n * @param {*} object Constant value.\n * @description\n * Because the constants are fixed, they get applied before other provide methods.\n * See {@link auto.$provide#constant $provide.constant()}.\n */\n constant: invokeLater('$provide', 'constant', 'unshift'),\n\n /**\n * @ngdoc method\n * @name angular.Module#decorator\n * @module ng\n * @param {string} name The name of the service to decorate.\n * @param {Function} decorFn This function will be invoked when the service needs to be\n * instantiated and should return the decorated service instance.\n * @description\n * See {@link auto.$provide#decorator $provide.decorator()}.\n */\n decorator: invokeLaterAndSetModuleName('$provide', 'decorator', configBlocks),\n\n /**\n * @ngdoc method\n * @name angular.Module#animation\n * @module ng\n * @param {string} name animation name\n * @param {Function} animationFactory Factory function for creating new instance of an\n * animation.\n * @description\n *\n * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.\n *\n *\n * Defines an animation hook that can be later used with\n * {@link $animate $animate} service and directives that use this service.\n *\n * ```js\n * module.animation('.animation-name', function($inject1, $inject2) {\n * return {\n * eventName : function(element, done) {\n * //code to run the animation\n * //once complete, then run done()\n * return function cancellationFunction(element) {\n * //code to cancel the animation\n * }\n * }\n * }\n * })\n * ```\n *\n * See {@link ng.$animateProvider#register $animateProvider.register()} and\n * {@link ngAnimate ngAnimate module} for more information.\n */\n animation: invokeLaterAndSetModuleName('$animateProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#filter\n * @module ng\n * @param {string} name Filter name - this must be a valid AngularJS expression identifier\n * @param {Function} filterFactory Factory function for creating new instance of filter.\n * @description\n * See {@link ng.$filterProvider#register $filterProvider.register()}.\n *\n *
\n * **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`.\n * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n * (`myapp_subsection_filterx`).\n *
\n */\n filter: invokeLaterAndSetModuleName('$filterProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#controller\n * @module ng\n * @param {string|Object} name Controller name, or an object map of controllers where the\n * keys are the names and the values are the constructors.\n * @param {Function} constructor Controller constructor function.\n * @description\n * See {@link ng.$controllerProvider#register $controllerProvider.register()}.\n */\n controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#directive\n * @module ng\n * @param {string|Object} name Directive name, or an object map of directives where the\n * keys are the names and the values are the factories.\n * @param {Function} directiveFactory Factory function for creating new instance of\n * directives.\n * @description\n * See {@link ng.$compileProvider#directive $compileProvider.directive()}.\n */\n directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'),\n\n /**\n * @ngdoc method\n * @name angular.Module#component\n * @module ng\n * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match ``),\n * or an object map of components where the keys are the names and the values are the component definition objects.\n * @param {Object} options Component definition object (a simplified\n * {@link ng.$compile#directive-definition-object directive definition object})\n *\n * @description\n * See {@link ng.$compileProvider#component $compileProvider.component()}.\n */\n component: invokeLaterAndSetModuleName('$compileProvider', 'component'),\n\n /**\n * @ngdoc method\n * @name angular.Module#config\n * @module ng\n * @param {Function} configFn Execute this function on module load. Useful for service\n * configuration.\n * @description\n * Use this method to configure services by injecting their\n * {@link angular.Module#provider `providers`}, e.g. for adding routes to the\n * {@link ngRoute.$routeProvider $routeProvider}.\n *\n * Note that you can only inject {@link angular.Module#provider `providers`} and\n * {@link angular.Module#constant `constants`} into this function.\n *\n * For more about how to configure services, see\n * {@link providers#provider-recipe Provider Recipe}.\n */\n config: config,\n\n /**\n * @ngdoc method\n * @name angular.Module#run\n * @module ng\n * @param {Function} initializationFn Execute this function after injector creation.\n * Useful for application initialization.\n * @description\n * Use this method to register work which should be performed when the injector is done\n * loading all modules.\n */\n run: function(block) {\n runBlocks.push(block);\n return this;\n }\n };\n\n if (configFn) {\n config(configFn);\n }\n\n return moduleInstance;\n\n /**\n * @param {string} provider\n * @param {string} method\n * @param {String=} insertMethod\n * @returns {angular.Module}\n */\n function invokeLater(provider, method, insertMethod, queue) {\n if (!queue) queue = invokeQueue;\n return function() {\n queue[insertMethod || 'push']([provider, method, arguments]);\n return moduleInstance;\n };\n }\n\n /**\n * @param {string} provider\n * @param {string} method\n * @returns {angular.Module}\n */\n function invokeLaterAndSetModuleName(provider, method, queue) {\n if (!queue) queue = invokeQueue;\n return function(recipeName, factoryFunction) {\n if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name;\n queue.push([provider, method, arguments]);\n return moduleInstance;\n };\n }\n });\n };\n });\n\n}\n\n/* global shallowCopy: true */\n\n/**\n * Creates a shallow copy of an object, an array or a primitive.\n *\n * Assumes that there are no proto properties for objects.\n */\nfunction shallowCopy(src, dst) {\n if (isArray(src)) {\n dst = dst || [];\n\n for (var i = 0, ii = src.length; i < ii; i++) {\n dst[i] = src[i];\n }\n } else if (isObject(src)) {\n dst = dst || {};\n\n for (var key in src) {\n if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst || src;\n}\n\n/* exported toDebugString */\n\nfunction serializeObject(obj, maxDepth) {\n var seen = [];\n\n // There is no direct way to stringify object until reaching a specific depth\n // and a very deep object can cause a performance issue, so we copy the object\n // based on this specific depth and then stringify it.\n if (isValidObjectMaxDepth(maxDepth)) {\n // This file is also included in `angular-loader`, so `copy()` might not always be available in\n // the closure. Therefore, it is lazily retrieved as `angular.copy()` when needed.\n obj = angular.copy(obj, null, maxDepth);\n }\n return JSON.stringify(obj, function(key, val) {\n val = toJsonReplacer(key, val);\n if (isObject(val)) {\n\n if (seen.indexOf(val) >= 0) return '...';\n\n seen.push(val);\n }\n return val;\n });\n}\n\nfunction toDebugString(obj, maxDepth) {\n if (typeof obj === 'function') {\n return obj.toString().replace(/ \\{[\\s\\S]*$/, '');\n } else if (isUndefined(obj)) {\n return 'undefined';\n } else if (typeof obj !== 'string') {\n return serializeObject(obj, maxDepth);\n }\n return obj;\n}\n\n/* global angularModule: true,\n version: true,\n\n $CompileProvider,\n\n htmlAnchorDirective,\n inputDirective,\n inputDirective,\n formDirective,\n scriptDirective,\n selectDirective,\n optionDirective,\n ngBindDirective,\n ngBindHtmlDirective,\n ngBindTemplateDirective,\n ngClassDirective,\n ngClassEvenDirective,\n ngClassOddDirective,\n ngCloakDirective,\n ngControllerDirective,\n ngFormDirective,\n ngHideDirective,\n ngIfDirective,\n ngIncludeDirective,\n ngIncludeFillContentDirective,\n ngInitDirective,\n ngNonBindableDirective,\n ngPluralizeDirective,\n ngRepeatDirective,\n ngShowDirective,\n ngStyleDirective,\n ngSwitchDirective,\n ngSwitchWhenDirective,\n ngSwitchDefaultDirective,\n ngOptionsDirective,\n ngTranscludeDirective,\n ngModelDirective,\n ngListDirective,\n ngChangeDirective,\n patternDirective,\n patternDirective,\n requiredDirective,\n requiredDirective,\n minlengthDirective,\n minlengthDirective,\n maxlengthDirective,\n maxlengthDirective,\n ngValueDirective,\n ngModelOptionsDirective,\n ngAttributeAliasDirectives,\n ngEventDirectives,\n\n $AnchorScrollProvider,\n $AnimateProvider,\n $CoreAnimateCssProvider,\n $$CoreAnimateJsProvider,\n $$CoreAnimateQueueProvider,\n $$AnimateRunnerFactoryProvider,\n $$AnimateAsyncRunFactoryProvider,\n $BrowserProvider,\n $CacheFactoryProvider,\n $ControllerProvider,\n $DateProvider,\n $DocumentProvider,\n $$IsDocumentHiddenProvider,\n $ExceptionHandlerProvider,\n $FilterProvider,\n $$ForceReflowProvider,\n $InterpolateProvider,\n $IntervalProvider,\n $HttpProvider,\n $HttpParamSerializerProvider,\n $HttpParamSerializerJQLikeProvider,\n $HttpBackendProvider,\n $xhrFactoryProvider,\n $jsonpCallbacksProvider,\n $LocationProvider,\n $LogProvider,\n $$MapProvider,\n $ParseProvider,\n $RootScopeProvider,\n $QProvider,\n $$QProvider,\n $$SanitizeUriProvider,\n $SceProvider,\n $SceDelegateProvider,\n $SnifferProvider,\n $TemplateCacheProvider,\n $TemplateRequestProvider,\n $$TestabilityProvider,\n $TimeoutProvider,\n $$RAFProvider,\n $WindowProvider,\n $$jqLiteProvider,\n $$CookieReaderProvider\n*/\n\n\n/**\n * @ngdoc object\n * @name angular.version\n * @module ng\n * @description\n * An object that contains information about the current AngularJS version.\n *\n * This object has the following properties:\n *\n * - `full` – `{string}` – Full version string, such as \"0.9.18\".\n * - `major` – `{number}` – Major version number, such as \"0\".\n * - `minor` – `{number}` – Minor version number, such as \"9\".\n * - `dot` – `{number}` – Dot version number, such as \"18\".\n * - `codeName` – `{string}` – Code name of the release, such as \"jiggling-armfat\".\n */\nvar version = {\n // These placeholder strings will be replaced by grunt's `build` task.\n // They need to be double- or single-quoted.\n full: '1.7.0',\n major: 1,\n minor: 7,\n dot: 0,\n codeName: 'nonexistent-physiology'\n};\n\n\nfunction publishExternalAPI(angular) {\n extend(angular, {\n 'errorHandlingConfig': errorHandlingConfig,\n 'bootstrap': bootstrap,\n 'copy': copy,\n 'extend': extend,\n 'merge': merge,\n 'equals': equals,\n 'element': jqLite,\n 'forEach': forEach,\n 'injector': createInjector,\n 'noop': noop,\n 'bind': bind,\n 'toJson': toJson,\n 'fromJson': fromJson,\n 'identity': identity,\n 'isUndefined': isUndefined,\n 'isDefined': isDefined,\n 'isString': isString,\n 'isFunction': isFunction,\n 'isObject': isObject,\n 'isNumber': isNumber,\n 'isElement': isElement,\n 'isArray': isArray,\n 'version': version,\n 'isDate': isDate,\n 'callbacks': {$$counter: 0},\n 'getTestability': getTestability,\n 'reloadWithDebugInfo': reloadWithDebugInfo,\n '$$minErr': minErr,\n '$$csp': csp,\n '$$encodeUriSegment': encodeUriSegment,\n '$$encodeUriQuery': encodeUriQuery,\n '$$lowercase': lowercase,\n '$$stringify': stringify,\n '$$uppercase': uppercase\n });\n\n angularModule = setupModuleLoader(window);\n\n angularModule('ng', ['ngLocale'], ['$provide',\n function ngModule($provide) {\n // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.\n $provide.provider({\n $$sanitizeUri: $$SanitizeUriProvider\n });\n $provide.provider('$compile', $CompileProvider).\n directive({\n a: htmlAnchorDirective,\n input: inputDirective,\n textarea: inputDirective,\n form: formDirective,\n script: scriptDirective,\n select: selectDirective,\n option: optionDirective,\n ngBind: ngBindDirective,\n ngBindHtml: ngBindHtmlDirective,\n ngBindTemplate: ngBindTemplateDirective,\n ngClass: ngClassDirective,\n ngClassEven: ngClassEvenDirective,\n ngClassOdd: ngClassOddDirective,\n ngCloak: ngCloakDirective,\n ngController: ngControllerDirective,\n ngForm: ngFormDirective,\n ngHide: ngHideDirective,\n ngIf: ngIfDirective,\n ngInclude: ngIncludeDirective,\n ngInit: ngInitDirective,\n ngNonBindable: ngNonBindableDirective,\n ngPluralize: ngPluralizeDirective,\n ngRepeat: ngRepeatDirective,\n ngShow: ngShowDirective,\n ngStyle: ngStyleDirective,\n ngSwitch: ngSwitchDirective,\n ngSwitchWhen: ngSwitchWhenDirective,\n ngSwitchDefault: ngSwitchDefaultDirective,\n ngOptions: ngOptionsDirective,\n ngTransclude: ngTranscludeDirective,\n ngModel: ngModelDirective,\n ngList: ngListDirective,\n ngChange: ngChangeDirective,\n pattern: patternDirective,\n ngPattern: patternDirective,\n required: requiredDirective,\n ngRequired: requiredDirective,\n minlength: minlengthDirective,\n ngMinlength: minlengthDirective,\n maxlength: maxlengthDirective,\n ngMaxlength: maxlengthDirective,\n ngValue: ngValueDirective,\n ngModelOptions: ngModelOptionsDirective\n }).\n directive({\n ngInclude: ngIncludeFillContentDirective\n }).\n directive(ngAttributeAliasDirectives).\n directive(ngEventDirectives);\n $provide.provider({\n $anchorScroll: $AnchorScrollProvider,\n $animate: $AnimateProvider,\n $animateCss: $CoreAnimateCssProvider,\n $$animateJs: $$CoreAnimateJsProvider,\n $$animateQueue: $$CoreAnimateQueueProvider,\n $$AnimateRunner: $$AnimateRunnerFactoryProvider,\n $$animateAsyncRun: $$AnimateAsyncRunFactoryProvider,\n $browser: $BrowserProvider,\n $cacheFactory: $CacheFactoryProvider,\n $controller: $ControllerProvider,\n $document: $DocumentProvider,\n $$isDocumentHidden: $$IsDocumentHiddenProvider,\n $exceptionHandler: $ExceptionHandlerProvider,\n $filter: $FilterProvider,\n $$forceReflow: $$ForceReflowProvider,\n $interpolate: $InterpolateProvider,\n $interval: $IntervalProvider,\n $http: $HttpProvider,\n $httpParamSerializer: $HttpParamSerializerProvider,\n $httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider,\n $httpBackend: $HttpBackendProvider,\n $xhrFactory: $xhrFactoryProvider,\n $jsonpCallbacks: $jsonpCallbacksProvider,\n $location: $LocationProvider,\n $log: $LogProvider,\n $parse: $ParseProvider,\n $rootScope: $RootScopeProvider,\n $q: $QProvider,\n $$q: $$QProvider,\n $sce: $SceProvider,\n $sceDelegate: $SceDelegateProvider,\n $sniffer: $SnifferProvider,\n $templateCache: $TemplateCacheProvider,\n $templateRequest: $TemplateRequestProvider,\n $$testability: $$TestabilityProvider,\n $timeout: $TimeoutProvider,\n $window: $WindowProvider,\n $$rAF: $$RAFProvider,\n $$jqLite: $$jqLiteProvider,\n $$Map: $$MapProvider,\n $$cookieReader: $$CookieReaderProvider\n });\n }\n ])\n .info({ angularVersion: '1.7.0' });\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables likes document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n/* global\n JQLitePrototype: true,\n BOOLEAN_ATTR: true,\n ALIASED_ATTR: true\n*/\n\n//////////////////////////////////\n//JQLite\n//////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.element\n * @module ng\n * @kind function\n *\n * @description\n * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.\n *\n * If jQuery is available, `angular.element` is an alias for the\n * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`\n * delegates to AngularJS's built-in subset of jQuery, called \"jQuery lite\" or **jqLite**.\n *\n * jqLite is a tiny, API-compatible subset of jQuery that allows\n * AngularJS to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most\n * commonly needed functionality with the goal of having a very small footprint.\n *\n * To use `jQuery`, simply ensure it is loaded before the `angular.js` file. You can also use the\n * {@link ngJq `ngJq`} directive to specify that jqlite should be used over jQuery, or to use a\n * specific version of jQuery if multiple versions exist on the page.\n *\n *
**Note:** All element references in AngularJS are always wrapped with jQuery or\n * jqLite (such as the element argument in a directive's compile / link function). They are never raw DOM references.
\n *\n *
**Note:** Keep in mind that this function will not find elements\n * by tag name / CSS selector. For lookups by tag name, try instead `angular.element(document).find(...)`\n * or `$document.find()`, or use the standard DOM APIs, e.g. `document.querySelectorAll()`.
\n *\n * ## AngularJS's jqLite\n * jqLite provides only the following jQuery methods:\n *\n * - [`addClass()`](http://api.jquery.com/addClass/) - Does not support a function as first argument\n * - [`after()`](http://api.jquery.com/after/)\n * - [`append()`](http://api.jquery.com/append/) - Contrary to jQuery, this doesn't clone elements\n * so will not work correctly when invoked on a jqLite object containing more than one DOM node\n * - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters\n * - [`bind()`](http://api.jquery.com/bind/) (_deprecated_, use [`on()`](http://api.jquery.com/on/)) - Does not support namespaces, selectors or eventData\n * - [`children()`](http://api.jquery.com/children/) - Does not support selectors\n * - [`clone()`](http://api.jquery.com/clone/)\n * - [`contents()`](http://api.jquery.com/contents/)\n * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`.\n * As a setter, does not convert numbers to strings or append 'px', and also does not have automatic property prefixing.\n * - [`data()`](http://api.jquery.com/data/)\n * - [`detach()`](http://api.jquery.com/detach/)\n * - [`empty()`](http://api.jquery.com/empty/)\n * - [`eq()`](http://api.jquery.com/eq/)\n * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name\n * - [`hasClass()`](http://api.jquery.com/hasClass/)\n * - [`html()`](http://api.jquery.com/html/)\n * - [`next()`](http://api.jquery.com/next/) - Does not support selectors\n * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces, selectors or event object as parameter\n * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors\n * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors\n * - [`prepend()`](http://api.jquery.com/prepend/)\n * - [`prop()`](http://api.jquery.com/prop/)\n * - [`ready()`](http://api.jquery.com/ready/) (_deprecated_, use `angular.element(callback)` instead of `angular.element(document).ready(callback)`)\n * - [`remove()`](http://api.jquery.com/remove/)\n * - [`removeAttr()`](http://api.jquery.com/removeAttr/) - Does not support multiple attributes\n * - [`removeClass()`](http://api.jquery.com/removeClass/) - Does not support a function as first argument\n * - [`removeData()`](http://api.jquery.com/removeData/)\n * - [`replaceWith()`](http://api.jquery.com/replaceWith/)\n * - [`text()`](http://api.jquery.com/text/)\n * - [`toggleClass()`](http://api.jquery.com/toggleClass/) - Does not support a function as first argument\n * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers\n * - [`unbind()`](http://api.jquery.com/unbind/) (_deprecated_, use [`off()`](http://api.jquery.com/off/)) - Does not support namespaces or event object as parameter\n * - [`val()`](http://api.jquery.com/val/)\n * - [`wrap()`](http://api.jquery.com/wrap/)\n *\n * ## jQuery/jqLite Extras\n * AngularJS also provides the following additional methods and events to both jQuery and jqLite:\n *\n * ### Events\n * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event\n * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM\n * element before it is removed.\n *\n * ### Methods\n * - `controller(name)` - retrieves the controller of the current element or its parent. By default\n * retrieves controller associated with the `ngController` directive. If `name` is provided as\n * camelCase directive name, then the controller for this directive will be retrieved (e.g.\n * `'ngModel'`).\n * - `injector()` - retrieves the injector of the current element or its parent.\n * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current\n * element or its parent. Requires {@link guide/production#disabling-debug-data Debug Data} to\n * be enabled.\n * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the\n * current element. This getter should be used only on elements that contain a directive which starts a new isolate\n * scope. Calling `scope()` on this element always returns the original non-isolate scope.\n * Requires {@link guide/production#disabling-debug-data Debug Data} to be enabled.\n * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top\n * parent element is reached.\n *\n * @knownIssue You cannot spy on `angular.element` if you are using Jasmine version 1.x. See\n * https://github.com/angular/angular.js/issues/14251 for more information.\n *\n * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.\n * @returns {Object} jQuery object.\n */\n\nJQLite.expando = 'ng339';\n\nvar jqCache = JQLite.cache = {},\n jqId = 1;\n\n/*\n * !!! This is an undocumented \"private\" function !!!\n */\nJQLite._data = function(node) {\n //jQuery always returns an object on cache miss\n return this.cache[node[this.expando]] || {};\n};\n\nfunction jqNextId() { return ++jqId; }\n\n\nvar DASH_LOWERCASE_REGEXP = /-([a-z])/g;\nvar MS_HACK_REGEXP = /^-ms-/;\nvar MOUSE_EVENT_MAP = { mouseleave: 'mouseout', mouseenter: 'mouseover' };\nvar jqLiteMinErr = minErr('jqLite');\n\n/**\n * Converts kebab-case to camelCase.\n * There is also a special case for the ms prefix starting with a lowercase letter.\n * @param name Name to normalize\n */\nfunction cssKebabToCamel(name) {\n return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-'));\n}\n\nfunction fnCamelCaseReplace(all, letter) {\n return letter.toUpperCase();\n}\n\n/**\n * Converts kebab-case to camelCase.\n * @param name Name to normalize\n */\nfunction kebabToCamel(name) {\n return name\n .replace(DASH_LOWERCASE_REGEXP, fnCamelCaseReplace);\n}\n\nvar SINGLE_TAG_REGEXP = /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/;\nvar HTML_REGEXP = /<|&#?\\w+;/;\nvar TAG_NAME_REGEXP = /<([\\w:-]+)/;\nvar XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi;\n\nvar wrapMap = {\n 'option': [1, ''],\n\n 'thead': [1, '', '
'],\n 'col': [2, '', '
'],\n 'tr': [2, '', '
'],\n 'td': [3, '', '
'],\n '_default': [0, '', '']\n};\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction jqLiteIsTextNode(html) {\n return !HTML_REGEXP.test(html);\n}\n\nfunction jqLiteAcceptsData(node) {\n // The window object can accept data but has no nodeType\n // Otherwise we are only interested in elements (1) and documents (9)\n var nodeType = node.nodeType;\n return nodeType === NODE_TYPE_ELEMENT || !nodeType || nodeType === NODE_TYPE_DOCUMENT;\n}\n\nfunction jqLiteHasData(node) {\n for (var key in jqCache[node.ng339]) {\n return true;\n }\n return false;\n}\n\nfunction jqLiteBuildFragment(html, context) {\n var tmp, tag, wrap,\n fragment = context.createDocumentFragment(),\n nodes = [], i;\n\n if (jqLiteIsTextNode(html)) {\n // Convert non-html into a text node\n nodes.push(context.createTextNode(html));\n } else {\n // Convert html into DOM nodes\n tmp = fragment.appendChild(context.createElement('div'));\n tag = (TAG_NAME_REGEXP.exec(html) || ['', ''])[1].toLowerCase();\n wrap = wrapMap[tag] || wrapMap._default;\n tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, '<$1>') + wrap[2];\n\n // Descend through wrappers to the right content\n i = wrap[0];\n while (i--) {\n tmp = tmp.lastChild;\n }\n\n nodes = concat(nodes, tmp.childNodes);\n\n tmp = fragment.firstChild;\n tmp.textContent = '';\n }\n\n // Remove wrapper from fragment\n fragment.textContent = '';\n fragment.innerHTML = ''; // Clear inner HTML\n forEach(nodes, function(node) {\n fragment.appendChild(node);\n });\n\n return fragment;\n}\n\nfunction jqLiteParseHTML(html, context) {\n context = context || window.document;\n var parsed;\n\n if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {\n return [context.createElement(parsed[1])];\n }\n\n if ((parsed = jqLiteBuildFragment(html, context))) {\n return parsed.childNodes;\n }\n\n return [];\n}\n\nfunction jqLiteWrapNode(node, wrapper) {\n var parent = node.parentNode;\n\n if (parent) {\n parent.replaceChild(wrapper, node);\n }\n\n wrapper.appendChild(node);\n}\n\n\n// IE9-11 has no method \"contains\" in SVG element and in Node.prototype. Bug #10259.\nvar jqLiteContains = window.Node.prototype.contains || /** @this */ function(arg) {\n // eslint-disable-next-line no-bitwise\n return !!(this.compareDocumentPosition(arg) & 16);\n};\n\n/////////////////////////////////////////////\nfunction JQLite(element) {\n if (element instanceof JQLite) {\n return element;\n }\n\n var argIsString;\n\n if (isString(element)) {\n element = trim(element);\n argIsString = true;\n }\n if (!(this instanceof JQLite)) {\n if (argIsString && element.charAt(0) !== '<') {\n throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');\n }\n return new JQLite(element);\n }\n\n if (argIsString) {\n jqLiteAddNodes(this, jqLiteParseHTML(element));\n } else if (isFunction(element)) {\n jqLiteReady(element);\n } else {\n jqLiteAddNodes(this, element);\n }\n}\n\nfunction jqLiteClone(element) {\n return element.cloneNode(true);\n}\n\nfunction jqLiteDealoc(element, onlyDescendants) {\n if (!onlyDescendants && jqLiteAcceptsData(element)) jqLite.cleanData([element]);\n\n if (element.querySelectorAll) {\n jqLite.cleanData(element.querySelectorAll('*'));\n }\n}\n\nfunction isEmptyObject(obj) {\n var name;\n\n for (name in obj) {\n return false;\n }\n return true;\n}\n\nfunction removeIfEmptyData(element) {\n var expandoId = element.ng339;\n var expandoStore = expandoId && jqCache[expandoId];\n\n var events = expandoStore && expandoStore.events;\n var data = expandoStore && expandoStore.data;\n\n if ((!data || isEmptyObject(data)) && (!events || isEmptyObject(events))) {\n delete jqCache[expandoId];\n element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it\n }\n}\n\nfunction jqLiteOff(element, type, fn, unsupported) {\n if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');\n\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var handle = expandoStore && expandoStore.handle;\n\n if (!handle) return; //no listeners registered\n\n if (!type) {\n for (type in events) {\n if (type !== '$destroy') {\n element.removeEventListener(type, handle);\n }\n delete events[type];\n }\n } else {\n\n var removeHandler = function(type) {\n var listenerFns = events[type];\n if (isDefined(fn)) {\n arrayRemove(listenerFns || [], fn);\n }\n if (!(isDefined(fn) && listenerFns && listenerFns.length > 0)) {\n element.removeEventListener(type, handle);\n delete events[type];\n }\n };\n\n forEach(type.split(' '), function(type) {\n removeHandler(type);\n if (MOUSE_EVENT_MAP[type]) {\n removeHandler(MOUSE_EVENT_MAP[type]);\n }\n });\n }\n\n removeIfEmptyData(element);\n}\n\nfunction jqLiteRemoveData(element, name) {\n var expandoId = element.ng339;\n var expandoStore = expandoId && jqCache[expandoId];\n\n if (expandoStore) {\n if (name) {\n delete expandoStore.data[name];\n } else {\n expandoStore.data = {};\n }\n\n removeIfEmptyData(element);\n }\n}\n\n\nfunction jqLiteExpandoStore(element, createIfNecessary) {\n var expandoId = element.ng339,\n expandoStore = expandoId && jqCache[expandoId];\n\n if (createIfNecessary && !expandoStore) {\n element.ng339 = expandoId = jqNextId();\n expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined};\n }\n\n return expandoStore;\n}\n\n\nfunction jqLiteData(element, key, value) {\n if (jqLiteAcceptsData(element)) {\n var prop;\n\n var isSimpleSetter = isDefined(value);\n var isSimpleGetter = !isSimpleSetter && key && !isObject(key);\n var massGetter = !key;\n var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter);\n var data = expandoStore && expandoStore.data;\n\n if (isSimpleSetter) { // data('key', value)\n data[kebabToCamel(key)] = value;\n } else {\n if (massGetter) { // data()\n return data;\n } else {\n if (isSimpleGetter) { // data('key')\n // don't force creation of expandoStore if it doesn't exist yet\n return data && data[kebabToCamel(key)];\n } else { // mass-setter: data({key1: val1, key2: val2})\n for (prop in key) {\n data[kebabToCamel(prop)] = key[prop];\n }\n }\n }\n }\n }\n}\n\nfunction jqLiteHasClass(element, selector) {\n if (!element.getAttribute) return false;\n return ((' ' + (element.getAttribute('class') || '') + ' ').replace(/[\\n\\t]/g, ' ').\n indexOf(' ' + selector + ' ') > -1);\n}\n\nfunction jqLiteRemoveClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n .replace(/[\\n\\t]/g, ' ');\n var newClasses = existingClasses;\n\n forEach(cssClasses.split(' '), function(cssClass) {\n cssClass = trim(cssClass);\n newClasses = newClasses.replace(' ' + cssClass + ' ', ' ');\n });\n\n if (newClasses !== existingClasses) {\n element.setAttribute('class', trim(newClasses));\n }\n }\n}\n\nfunction jqLiteAddClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n .replace(/[\\n\\t]/g, ' ');\n var newClasses = existingClasses;\n\n forEach(cssClasses.split(' '), function(cssClass) {\n cssClass = trim(cssClass);\n if (newClasses.indexOf(' ' + cssClass + ' ') === -1) {\n newClasses += cssClass + ' ';\n }\n });\n\n if (newClasses !== existingClasses) {\n element.setAttribute('class', trim(newClasses));\n }\n }\n}\n\n\nfunction jqLiteAddNodes(root, elements) {\n // THIS CODE IS VERY HOT. Don't make changes without benchmarking.\n\n if (elements) {\n\n // if a Node (the most common case)\n if (elements.nodeType) {\n root[root.length++] = elements;\n } else {\n var length = elements.length;\n\n // if an Array or NodeList and not a Window\n if (typeof length === 'number' && elements.window !== elements) {\n if (length) {\n for (var i = 0; i < length; i++) {\n root[root.length++] = elements[i];\n }\n }\n } else {\n root[root.length++] = elements;\n }\n }\n }\n}\n\n\nfunction jqLiteController(element, name) {\n return jqLiteInheritedData(element, '$' + (name || 'ngController') + 'Controller');\n}\n\nfunction jqLiteInheritedData(element, name, value) {\n // if element is the document object work with the html element instead\n // this makes $(document).scope() possible\n if (element.nodeType === NODE_TYPE_DOCUMENT) {\n element = element.documentElement;\n }\n var names = isArray(name) ? name : [name];\n\n while (element) {\n for (var i = 0, ii = names.length; i < ii; i++) {\n if (isDefined(value = jqLite.data(element, names[i]))) return value;\n }\n\n // If dealing with a document fragment node with a host element, and no parent, use the host\n // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM\n // to lookup parent controllers.\n element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);\n }\n}\n\nfunction jqLiteEmpty(element) {\n jqLiteDealoc(element, true);\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n}\n\nfunction jqLiteRemove(element, keepData) {\n if (!keepData) jqLiteDealoc(element);\n var parent = element.parentNode;\n if (parent) parent.removeChild(element);\n}\n\n\nfunction jqLiteDocumentLoaded(action, win) {\n win = win || window;\n if (win.document.readyState === 'complete') {\n // Force the action to be run async for consistent behavior\n // from the action's point of view\n // i.e. it will definitely not be in a $apply\n win.setTimeout(action);\n } else {\n // No need to unbind this handler as load is only ever called once\n jqLite(win).on('load', action);\n }\n}\n\nfunction jqLiteReady(fn) {\n function trigger() {\n window.document.removeEventListener('DOMContentLoaded', trigger);\n window.removeEventListener('load', trigger);\n fn();\n }\n\n // check if document is already loaded\n if (window.document.readyState === 'complete') {\n window.setTimeout(fn);\n } else {\n // We can not use jqLite since we are not done loading and jQuery could be loaded later.\n\n // Works for modern browsers and IE9\n window.document.addEventListener('DOMContentLoaded', trigger);\n\n // Fallback to window.onload for others\n window.addEventListener('load', trigger);\n }\n}\n\n//////////////////////////////////////////\n// Functions which are declared directly.\n//////////////////////////////////////////\nvar JQLitePrototype = JQLite.prototype = {\n ready: jqLiteReady,\n toString: function() {\n var value = [];\n forEach(this, function(e) { value.push('' + e);});\n return '[' + value.join(', ') + ']';\n },\n\n eq: function(index) {\n return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);\n },\n\n length: 0,\n push: push,\n sort: [].sort,\n splice: [].splice\n};\n\n//////////////////////////////////////////\n// Functions iterating getter/setters.\n// these functions return self on setter and\n// value on get.\n//////////////////////////////////////////\nvar BOOLEAN_ATTR = {};\nforEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {\n BOOLEAN_ATTR[lowercase(value)] = value;\n});\nvar BOOLEAN_ELEMENTS = {};\nforEach('input,select,option,textarea,button,form,details'.split(','), function(value) {\n BOOLEAN_ELEMENTS[value] = true;\n});\nvar ALIASED_ATTR = {\n 'ngMinlength': 'minlength',\n 'ngMaxlength': 'maxlength',\n 'ngMin': 'min',\n 'ngMax': 'max',\n 'ngPattern': 'pattern',\n 'ngStep': 'step'\n};\n\nfunction getBooleanAttrName(element, name) {\n // check dom last since we will most likely fail on name\n var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];\n\n // booleanAttr is here twice to minimize DOM access\n return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr;\n}\n\nfunction getAliasedAttrName(name) {\n return ALIASED_ATTR[name];\n}\n\nforEach({\n data: jqLiteData,\n removeData: jqLiteRemoveData,\n hasData: jqLiteHasData,\n cleanData: function jqLiteCleanData(nodes) {\n for (var i = 0, ii = nodes.length; i < ii; i++) {\n jqLiteRemoveData(nodes[i]);\n jqLiteOff(nodes[i]);\n }\n }\n}, function(fn, name) {\n JQLite[name] = fn;\n});\n\nforEach({\n data: jqLiteData,\n inheritedData: jqLiteInheritedData,\n\n scope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);\n },\n\n isolateScope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');\n },\n\n controller: jqLiteController,\n\n injector: function(element) {\n return jqLiteInheritedData(element, '$injector');\n },\n\n removeAttr: function(element, name) {\n element.removeAttribute(name);\n },\n\n hasClass: jqLiteHasClass,\n\n css: function(element, name, value) {\n name = cssKebabToCamel(name);\n\n if (isDefined(value)) {\n element.style[name] = value;\n } else {\n return element.style[name];\n }\n },\n\n attr: function(element, name, value) {\n var ret;\n var nodeType = element.nodeType;\n if (nodeType === NODE_TYPE_TEXT || nodeType === NODE_TYPE_ATTRIBUTE || nodeType === NODE_TYPE_COMMENT ||\n !element.getAttribute) {\n return;\n }\n\n var lowercasedName = lowercase(name);\n var isBooleanAttr = BOOLEAN_ATTR[lowercasedName];\n\n if (isDefined(value)) {\n // setter\n\n if (value === null || (value === false && isBooleanAttr)) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, isBooleanAttr ? lowercasedName : value);\n }\n } else {\n // getter\n\n ret = element.getAttribute(name);\n\n if (isBooleanAttr && ret !== null) {\n ret = lowercasedName;\n }\n // Normalize non-existing attributes to undefined (as jQuery).\n return ret === null ? undefined : ret;\n }\n },\n\n prop: function(element, name, value) {\n if (isDefined(value)) {\n element[name] = value;\n } else {\n return element[name];\n }\n },\n\n text: (function() {\n getText.$dv = '';\n return getText;\n\n function getText(element, value) {\n if (isUndefined(value)) {\n var nodeType = element.nodeType;\n return (nodeType === NODE_TYPE_ELEMENT || nodeType === NODE_TYPE_TEXT) ? element.textContent : '';\n }\n element.textContent = value;\n }\n })(),\n\n val: function(element, value) {\n if (isUndefined(value)) {\n if (element.multiple && nodeName_(element) === 'select') {\n var result = [];\n forEach(element.options, function(option) {\n if (option.selected) {\n result.push(option.value || option.text);\n }\n });\n return result;\n }\n return element.value;\n }\n element.value = value;\n },\n\n html: function(element, value) {\n if (isUndefined(value)) {\n return element.innerHTML;\n }\n jqLiteDealoc(element, true);\n element.innerHTML = value;\n },\n\n empty: jqLiteEmpty\n}, function(fn, name) {\n /**\n * Properties: writes return selection, reads return first value\n */\n JQLite.prototype[name] = function(arg1, arg2) {\n var i, key;\n var nodeCount = this.length;\n\n // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it\n // in a way that survives minification.\n // jqLiteEmpty takes no arguments but is a setter.\n if (fn !== jqLiteEmpty &&\n (isUndefined((fn.length === 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2))) {\n if (isObject(arg1)) {\n\n // we are a write, but the object properties are the key/values\n for (i = 0; i < nodeCount; i++) {\n if (fn === jqLiteData) {\n // data() takes the whole object in jQuery\n fn(this[i], arg1);\n } else {\n for (key in arg1) {\n fn(this[i], key, arg1[key]);\n }\n }\n }\n // return self for chaining\n return this;\n } else {\n // we are a read, so read the first child.\n // TODO: do we still need this?\n var value = fn.$dv;\n // Only if we have $dv do we iterate over all, otherwise it is just the first element.\n var jj = (isUndefined(value)) ? Math.min(nodeCount, 1) : nodeCount;\n for (var j = 0; j < jj; j++) {\n var nodeValue = fn(this[j], arg1, arg2);\n value = value ? value + nodeValue : nodeValue;\n }\n return value;\n }\n } else {\n // we are a write, so apply to all children\n for (i = 0; i < nodeCount; i++) {\n fn(this[i], arg1, arg2);\n }\n // return self for chaining\n return this;\n }\n };\n});\n\nfunction createEventHandler(element, events) {\n var eventHandler = function(event, type) {\n // jQuery specific api\n event.isDefaultPrevented = function() {\n return event.defaultPrevented;\n };\n\n var eventFns = events[type || event.type];\n var eventFnsLength = eventFns ? eventFns.length : 0;\n\n if (!eventFnsLength) return;\n\n if (isUndefined(event.immediatePropagationStopped)) {\n var originalStopImmediatePropagation = event.stopImmediatePropagation;\n event.stopImmediatePropagation = function() {\n event.immediatePropagationStopped = true;\n\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n\n if (originalStopImmediatePropagation) {\n originalStopImmediatePropagation.call(event);\n }\n };\n }\n\n event.isImmediatePropagationStopped = function() {\n return event.immediatePropagationStopped === true;\n };\n\n // Some events have special handlers that wrap the real handler\n var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper;\n\n // Copy event handlers in case event handlers array is modified during execution.\n if ((eventFnsLength > 1)) {\n eventFns = shallowCopy(eventFns);\n }\n\n for (var i = 0; i < eventFnsLength; i++) {\n if (!event.isImmediatePropagationStopped()) {\n handlerWrapper(element, event, eventFns[i]);\n }\n }\n };\n\n // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all\n // events on `element`\n eventHandler.elem = element;\n return eventHandler;\n}\n\nfunction defaultHandlerWrapper(element, event, handler) {\n handler.call(element, event);\n}\n\nfunction specialMouseHandlerWrapper(target, event, handler) {\n // Refer to jQuery's implementation of mouseenter & mouseleave\n // Read about mouseenter and mouseleave:\n // http://www.quirksmode.org/js/events_mouse.html#link8\n var related = event.relatedTarget;\n // For mousenter/leave call the handler if related is outside the target.\n // NB: No relatedTarget if the mouse left/entered the browser window\n if (!related || (related !== target && !jqLiteContains.call(target, related))) {\n handler.call(target, event);\n }\n}\n\n//////////////////////////////////////////\n// Functions iterating traversal.\n// These functions chain results into a single\n// selector.\n//////////////////////////////////////////\nforEach({\n removeData: jqLiteRemoveData,\n\n on: function jqLiteOn(element, type, fn, unsupported) {\n if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');\n\n // Do not add event handlers to non-elements because they will not be cleaned up.\n if (!jqLiteAcceptsData(element)) {\n return;\n }\n\n var expandoStore = jqLiteExpandoStore(element, true);\n var events = expandoStore.events;\n var handle = expandoStore.handle;\n\n if (!handle) {\n handle = expandoStore.handle = createEventHandler(element, events);\n }\n\n // http://jsperf.com/string-indexof-vs-split\n var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];\n var i = types.length;\n\n var addHandler = function(type, specialHandlerWrapper, noEventListener) {\n var eventFns = events[type];\n\n if (!eventFns) {\n eventFns = events[type] = [];\n eventFns.specialHandlerWrapper = specialHandlerWrapper;\n if (type !== '$destroy' && !noEventListener) {\n element.addEventListener(type, handle);\n }\n }\n\n eventFns.push(fn);\n };\n\n while (i--) {\n type = types[i];\n if (MOUSE_EVENT_MAP[type]) {\n addHandler(MOUSE_EVENT_MAP[type], specialMouseHandlerWrapper);\n addHandler(type, undefined, true);\n } else {\n addHandler(type);\n }\n }\n },\n\n off: jqLiteOff,\n\n one: function(element, type, fn) {\n element = jqLite(element);\n\n //add the listener twice so that when it is called\n //you can remove the original function and still be\n //able to call element.off(ev, fn) normally\n element.on(type, function onFn() {\n element.off(type, fn);\n element.off(type, onFn);\n });\n element.on(type, fn);\n },\n\n replaceWith: function(element, replaceNode) {\n var index, parent = element.parentNode;\n jqLiteDealoc(element);\n forEach(new JQLite(replaceNode), function(node) {\n if (index) {\n parent.insertBefore(node, index.nextSibling);\n } else {\n parent.replaceChild(node, element);\n }\n index = node;\n });\n },\n\n children: function(element) {\n var children = [];\n forEach(element.childNodes, function(element) {\n if (element.nodeType === NODE_TYPE_ELEMENT) {\n children.push(element);\n }\n });\n return children;\n },\n\n contents: function(element) {\n return element.contentDocument || element.childNodes || [];\n },\n\n append: function(element, node) {\n var nodeType = element.nodeType;\n if (nodeType !== NODE_TYPE_ELEMENT && nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT) return;\n\n node = new JQLite(node);\n\n for (var i = 0, ii = node.length; i < ii; i++) {\n var child = node[i];\n element.appendChild(child);\n }\n },\n\n prepend: function(element, node) {\n if (element.nodeType === NODE_TYPE_ELEMENT) {\n var index = element.firstChild;\n forEach(new JQLite(node), function(child) {\n element.insertBefore(child, index);\n });\n }\n },\n\n wrap: function(element, wrapNode) {\n jqLiteWrapNode(element, jqLite(wrapNode).eq(0).clone()[0]);\n },\n\n remove: jqLiteRemove,\n\n detach: function(element) {\n jqLiteRemove(element, true);\n },\n\n after: function(element, newElement) {\n var index = element, parent = element.parentNode;\n\n if (parent) {\n newElement = new JQLite(newElement);\n\n for (var i = 0, ii = newElement.length; i < ii; i++) {\n var node = newElement[i];\n parent.insertBefore(node, index.nextSibling);\n index = node;\n }\n }\n },\n\n addClass: jqLiteAddClass,\n removeClass: jqLiteRemoveClass,\n\n toggleClass: function(element, selector, condition) {\n if (selector) {\n forEach(selector.split(' '), function(className) {\n var classCondition = condition;\n if (isUndefined(classCondition)) {\n classCondition = !jqLiteHasClass(element, className);\n }\n (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);\n });\n }\n },\n\n parent: function(element) {\n var parent = element.parentNode;\n return parent && parent.nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT ? parent : null;\n },\n\n next: function(element) {\n return element.nextElementSibling;\n },\n\n find: function(element, selector) {\n if (element.getElementsByTagName) {\n return element.getElementsByTagName(selector);\n } else {\n return [];\n }\n },\n\n clone: jqLiteClone,\n\n triggerHandler: function(element, event, extraParameters) {\n\n var dummyEvent, eventFnsCopy, handlerArgs;\n var eventName = event.type || event;\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var eventFns = events && events[eventName];\n\n if (eventFns) {\n // Create a dummy event to pass to the handlers\n dummyEvent = {\n preventDefault: function() { this.defaultPrevented = true; },\n isDefaultPrevented: function() { return this.defaultPrevented === true; },\n stopImmediatePropagation: function() { this.immediatePropagationStopped = true; },\n isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; },\n stopPropagation: noop,\n type: eventName,\n target: element\n };\n\n // If a custom event was provided then extend our dummy event with it\n if (event.type) {\n dummyEvent = extend(dummyEvent, event);\n }\n\n // Copy event handlers in case event handlers array is modified during execution.\n eventFnsCopy = shallowCopy(eventFns);\n handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];\n\n forEach(eventFnsCopy, function(fn) {\n if (!dummyEvent.isImmediatePropagationStopped()) {\n fn.apply(element, handlerArgs);\n }\n });\n }\n }\n}, function(fn, name) {\n /**\n * chaining functions\n */\n JQLite.prototype[name] = function(arg1, arg2, arg3) {\n var value;\n\n for (var i = 0, ii = this.length; i < ii; i++) {\n if (isUndefined(value)) {\n value = fn(this[i], arg1, arg2, arg3);\n if (isDefined(value)) {\n // any function which returns a value needs to be wrapped\n value = jqLite(value);\n }\n } else {\n jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));\n }\n }\n return isDefined(value) ? value : this;\n };\n});\n\n// bind legacy bind/unbind to on/off\nJQLite.prototype.bind = JQLite.prototype.on;\nJQLite.prototype.unbind = JQLite.prototype.off;\n\n\n// Provider for private $$jqLite service\n/** @this */\nfunction $$jqLiteProvider() {\n this.$get = function $$jqLite() {\n return extend(JQLite, {\n hasClass: function(node, classes) {\n if (node.attr) node = node[0];\n return jqLiteHasClass(node, classes);\n },\n addClass: function(node, classes) {\n if (node.attr) node = node[0];\n return jqLiteAddClass(node, classes);\n },\n removeClass: function(node, classes) {\n if (node.attr) node = node[0];\n return jqLiteRemoveClass(node, classes);\n }\n });\n };\n}\n\n/**\n * Computes a hash of an 'obj'.\n * Hash of a:\n * string is string\n * number is number as string\n * object is either result of calling $$hashKey function on the object or uniquely generated id,\n * that is also assigned to the $$hashKey property of the object.\n *\n * @param obj\n * @returns {string} hash string such that the same input will have the same hash string.\n * The resulting string key is in 'type:hashKey' format.\n */\nfunction hashKey(obj, nextUidFn) {\n var key = obj && obj.$$hashKey;\n\n if (key) {\n if (typeof key === 'function') {\n key = obj.$$hashKey();\n }\n return key;\n }\n\n var objType = typeof obj;\n if (objType === 'function' || (objType === 'object' && obj !== null)) {\n key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)();\n } else {\n key = objType + ':' + obj;\n }\n\n return key;\n}\n\n// A minimal ES2015 Map implementation.\n// Should be bug/feature equivalent to the native implementations of supported browsers\n// (for the features required in Angular).\n// See https://kangax.github.io/compat-table/es6/#test-Map\nvar nanKey = Object.create(null);\nfunction NgMapShim() {\n this._keys = [];\n this._values = [];\n this._lastKey = NaN;\n this._lastIndex = -1;\n}\nNgMapShim.prototype = {\n _idx: function(key) {\n if (key === this._lastKey) {\n return this._lastIndex;\n }\n this._lastKey = key;\n this._lastIndex = this._keys.indexOf(key);\n return this._lastIndex;\n },\n _transformKey: function(key) {\n return isNumberNaN(key) ? nanKey : key;\n },\n get: function(key) {\n key = this._transformKey(key);\n var idx = this._idx(key);\n if (idx !== -1) {\n return this._values[idx];\n }\n },\n set: function(key, value) {\n key = this._transformKey(key);\n var idx = this._idx(key);\n if (idx === -1) {\n idx = this._lastIndex = this._keys.length;\n }\n this._keys[idx] = key;\n this._values[idx] = value;\n\n // Support: IE11\n // Do not `return this` to simulate the partial IE11 implementation\n },\n delete: function(key) {\n key = this._transformKey(key);\n var idx = this._idx(key);\n if (idx === -1) {\n return false;\n }\n this._keys.splice(idx, 1);\n this._values.splice(idx, 1);\n this._lastKey = NaN;\n this._lastIndex = -1;\n return true;\n }\n};\n\n// For now, always use `NgMapShim`, even if `window.Map` is available. Some native implementations\n// are still buggy (often in subtle ways) and can cause hard-to-debug failures. When native `Map`\n// implementations get more stable, we can reconsider switching to `window.Map` (when available).\nvar NgMap = NgMapShim;\n\nvar $$MapProvider = [/** @this */function() {\n this.$get = [function() {\n return NgMap;\n }];\n}];\n\n/**\n * @ngdoc function\n * @module ng\n * @name angular.injector\n * @kind function\n *\n * @description\n * Creates an injector object that can be used for retrieving services as well as for\n * dependency injection (see {@link guide/di dependency injection}).\n *\n * @param {Array.} modules A list of module functions or their aliases. See\n * {@link angular.module}. The `ng` module must be explicitly added.\n * @param {boolean=} [strictDi=false] Whether the injector should be in strict mode, which\n * disallows argument name annotation inference.\n * @returns {injector} Injector object. See {@link auto.$injector $injector}.\n *\n * @example\n * Typical usage\n * ```js\n * // create an injector\n * var $injector = angular.injector(['ng']);\n *\n * // use the injector to kick off your application\n * // use the type inference to auto inject arguments, or use implicit injection\n * $injector.invoke(function($rootScope, $compile, $document) {\n * $compile($document)($rootScope);\n * $rootScope.$digest();\n * });\n * ```\n *\n * Sometimes you want to get access to the injector of a currently running AngularJS app\n * from outside AngularJS. Perhaps, you want to inject and compile some markup after the\n * application has been bootstrapped. You can do this using the extra `injector()` added\n * to JQuery/jqLite elements. See {@link angular.element}.\n *\n * *This is fairly rare but could be the case if a third party library is injecting the\n * markup.*\n *\n * In the following example a new block of HTML containing a `ng-controller`\n * directive is added to the end of the document body by JQuery. We then compile and link\n * it into the current AngularJS scope.\n *\n * ```js\n * var $div = $('
{{content.label}}
');\n * $(document.body).append($div);\n *\n * angular.element(document).injector().invoke(function($compile) {\n * var scope = angular.element($div).scope();\n * $compile($div)(scope);\n * });\n * ```\n */\n\n\n/**\n * @ngdoc module\n * @name auto\n * @installation\n * @description\n *\n * Implicit module which gets automatically added to each {@link auto.$injector $injector}.\n */\n\nvar ARROW_ARG = /^([^(]+?)=>/;\nvar FN_ARGS = /^[^(]*\\(\\s*([^)]*)\\)/m;\nvar FN_ARG_SPLIT = /,/;\nvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\nvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar $injectorMinErr = minErr('$injector');\n\nfunction stringifyFn(fn) {\n return Function.prototype.toString.call(fn);\n}\n\nfunction extractArgs(fn) {\n var fnText = stringifyFn(fn).replace(STRIP_COMMENTS, ''),\n args = fnText.match(ARROW_ARG) || fnText.match(FN_ARGS);\n return args;\n}\n\nfunction anonFn(fn) {\n // For anonymous functions, showing at the very least the function signature can help in\n // debugging.\n var args = extractArgs(fn);\n if (args) {\n return 'function(' + (args[1] || '').replace(/[\\s\\r\\n]+/, ' ') + ')';\n }\n return 'fn';\n}\n\nfunction annotate(fn, strictDi, name) {\n var $inject,\n argDecl,\n last;\n\n if (typeof fn === 'function') {\n if (!($inject = fn.$inject)) {\n $inject = [];\n if (fn.length) {\n if (strictDi) {\n if (!isString(name) || !name) {\n name = fn.name || anonFn(fn);\n }\n throw $injectorMinErr('strictdi',\n '{0} is not using explicit annotation and cannot be invoked in strict mode', name);\n }\n argDecl = extractArgs(fn);\n forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {\n arg.replace(FN_ARG, function(all, underscore, name) {\n $inject.push(name);\n });\n });\n }\n fn.$inject = $inject;\n }\n } else if (isArray(fn)) {\n last = fn.length - 1;\n assertArgFn(fn[last], 'fn');\n $inject = fn.slice(0, last);\n } else {\n assertArgFn(fn, 'fn', true);\n }\n return $inject;\n}\n\n///////////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $injector\n *\n * @description\n *\n * `$injector` is used to retrieve object instances as defined by\n * {@link auto.$provide provider}, instantiate types, invoke methods,\n * and load modules.\n *\n * The following always holds true:\n *\n * ```js\n * var $injector = angular.injector();\n * expect($injector.get('$injector')).toBe($injector);\n * expect($injector.invoke(function($injector) {\n * return $injector;\n * })).toBe($injector);\n * ```\n *\n * ## Injection Function Annotation\n *\n * JavaScript does not have annotations, and annotations are needed for dependency injection. The\n * following are all valid ways of annotating function with injection arguments and are equivalent.\n *\n * ```js\n * // inferred (only works if code not minified/obfuscated)\n * $injector.invoke(function(serviceA){});\n *\n * // annotated\n * function explicit(serviceA) {};\n * explicit.$inject = ['serviceA'];\n * $injector.invoke(explicit);\n *\n * // inline\n * $injector.invoke(['serviceA', function(serviceA){}]);\n * ```\n *\n * ### Inference\n *\n * In JavaScript calling `toString()` on a function returns the function definition. The definition\n * can then be parsed and the function arguments can be extracted. This method of discovering\n * annotations is disallowed when the injector is in strict mode.\n * *NOTE:* This does not work with minification, and obfuscation tools since these tools change the\n * argument names.\n *\n * ### `$inject` Annotation\n * By adding an `$inject` property onto a function the injection parameters can be specified.\n *\n * ### Inline\n * As an array of injection names, where the last item in the array is the function to call.\n */\n\n/**\n * @ngdoc property\n * @name $injector#modules\n * @type {Object}\n * @description\n * A hash containing all the modules that have been loaded into the\n * $injector.\n *\n * You can use this property to find out information about a module via the\n * {@link angular.Module#info `myModule.info(...)`} method.\n *\n * For example:\n *\n * ```\n * var info = $injector.modules['ngAnimate'].info();\n * ```\n *\n * **Do not use this property to attempt to modify the modules after the application\n * has been bootstrapped.**\n */\n\n\n/**\n * @ngdoc method\n * @name $injector#get\n *\n * @description\n * Return an instance of the service.\n *\n * @param {string} name The name of the instance to retrieve.\n * @param {string=} caller An optional string to provide the origin of the function call for error messages.\n * @return {*} The instance.\n */\n\n/**\n * @ngdoc method\n * @name $injector#invoke\n *\n * @description\n * Invoke the method and supply the method arguments from the `$injector`.\n *\n * @param {Function|Array.} fn The injectable function to invoke. Function parameters are\n * injected according to the {@link guide/di $inject Annotation} rules.\n * @param {Object=} self The `this` for the invoked method.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {*} the value returned by the invoked `fn` function.\n */\n\n/**\n * @ngdoc method\n * @name $injector#has\n *\n * @description\n * Allows the user to query if the particular service exists.\n *\n * @param {string} name Name of the service to query.\n * @returns {boolean} `true` if injector has given service.\n */\n\n/**\n * @ngdoc method\n * @name $injector#instantiate\n * @description\n * Create a new instance of JS type. The method takes a constructor function, invokes the new\n * operator, and supplies all of the arguments to the constructor function as specified by the\n * constructor annotation.\n *\n * @param {Function} Type Annotated constructor function.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {Object} new instance of `Type`.\n */\n\n/**\n * @ngdoc method\n * @name $injector#annotate\n *\n * @description\n * Returns an array of service names which the function is requesting for injection. This API is\n * used by the injector to determine which services need to be injected into the function when the\n * function is invoked. There are three ways in which the function can be annotated with the needed\n * dependencies.\n *\n * #### Argument names\n *\n * The simplest form is to extract the dependencies from the arguments of the function. This is done\n * by converting the function into a string using `toString()` method and extracting the argument\n * names.\n * ```js\n * // Given\n * function MyController($scope, $route) {\n * // ...\n * }\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * You can disallow this method by using strict injection mode.\n *\n * This method does not work with code minification / obfuscation. For this reason the following\n * annotation strategies are supported.\n *\n * #### The `$inject` property\n *\n * If a function has an `$inject` property and its value is an array of strings, then the strings\n * represent names of services to be injected into the function.\n * ```js\n * // Given\n * var MyController = function(obfuscatedScope, obfuscatedRoute) {\n * // ...\n * }\n * // Define function dependencies\n * MyController['$inject'] = ['$scope', '$route'];\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * #### The array notation\n *\n * It is often desirable to inline Injected functions and that's when setting the `$inject` property\n * is very inconvenient. In these situations using the array notation to specify the dependencies in\n * a way that survives minification is a better choice:\n *\n * ```js\n * // We wish to write this (not minification / obfuscation safe)\n * injector.invoke(function($compile, $rootScope) {\n * // ...\n * });\n *\n * // We are forced to write break inlining\n * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {\n * // ...\n * };\n * tmpFn.$inject = ['$compile', '$rootScope'];\n * injector.invoke(tmpFn);\n *\n * // To better support inline function the inline annotation is supported\n * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {\n * // ...\n * }]);\n *\n * // Therefore\n * expect(injector.annotate(\n * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])\n * ).toEqual(['$compile', '$rootScope']);\n * ```\n *\n * @param {Function|Array.} fn Function for which dependent service names need to\n * be retrieved as described above.\n *\n * @param {boolean=} [strictDi=false] Disallow argument name annotation inference.\n *\n * @returns {Array.} The names of the services which the function requires.\n */\n/**\n * @ngdoc method\n * @name $injector#loadNewModules\n *\n * @description\n *\n * **This is a dangerous API, which you use at your own risk!**\n *\n * Add the specified modules to the current injector.\n *\n * This method will add each of the injectables to the injector and execute all of the config and run\n * blocks for each module passed to the method.\n *\n * If a module has already been loaded into the injector then it will not be loaded again.\n *\n * * The application developer is responsible for loading the code containing the modules; and for\n * ensuring that lazy scripts are not downloaded and executed more often that desired.\n * * Previously compiled HTML will not be affected by newly loaded directives, filters and components.\n * * Modules cannot be unloaded.\n *\n * You can use {@link $injector#modules `$injector.modules`} to check whether a module has been loaded\n * into the injector, which may indicate whether the script has been executed already.\n *\n * @example\n * Here is an example of loading a bundle of modules, with a utility method called `getScript`:\n *\n * ```javascript\n * app.factory('loadModule', function($injector) {\n * return function loadModule(moduleName, bundleUrl) {\n * return getScript(bundleUrl).then(function() { $injector.loadNewModules([moduleName]); });\n * };\n * })\n * ```\n *\n * @param {Array=} mods an array of modules to load into the application.\n * Each item in the array should be the name of a predefined module or a (DI annotated)\n * function that will be invoked by the injector as a `config` block.\n * See: {@link angular.module modules}\n */\n\n\n/**\n * @ngdoc service\n * @name $provide\n *\n * @description\n *\n * The {@link auto.$provide $provide} service has a number of methods for registering components\n * with the {@link auto.$injector $injector}. Many of these functions are also exposed on\n * {@link angular.Module}.\n *\n * An AngularJS **service** is a singleton object created by a **service factory**. These **service\n * factories** are functions which, in turn, are created by a **service provider**.\n * The **service providers** are constructor functions. When instantiated they must contain a\n * property called `$get`, which holds the **service factory** function.\n *\n * When you request a service, the {@link auto.$injector $injector} is responsible for finding the\n * correct **service provider**, instantiating it and then calling its `$get` **service factory**\n * function to get the instance of the **service**.\n *\n * Often services have no configuration options and there is no need to add methods to the service\n * provider. The provider will be no more than a constructor function with a `$get` property. For\n * these cases the {@link auto.$provide $provide} service has additional helper methods to register\n * services without specifying a provider.\n *\n * * {@link auto.$provide#provider provider(name, provider)} - registers a **service provider** with the\n * {@link auto.$injector $injector}\n * * {@link auto.$provide#constant constant(name, obj)} - registers a value/object that can be accessed by\n * providers and services.\n * * {@link auto.$provide#value value(name, obj)} - registers a value/object that can only be accessed by\n * services, not providers.\n * * {@link auto.$provide#factory factory(name, fn)} - registers a service **factory function**\n * that will be wrapped in a **service provider** object, whose `$get` property will contain the\n * given factory function.\n * * {@link auto.$provide#service service(name, Fn)} - registers a **constructor function**\n * that will be wrapped in a **service provider** object, whose `$get` property will instantiate\n * a new object using the given constructor function.\n * * {@link auto.$provide#decorator decorator(name, decorFn)} - registers a **decorator function** that\n * will be able to modify or replace the implementation of another service.\n *\n * See the individual methods for more information and examples.\n */\n\n/**\n * @ngdoc method\n * @name $provide#provider\n * @description\n *\n * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions\n * are constructor functions, whose instances are responsible for \"providing\" a factory for a\n * service.\n *\n * Service provider names start with the name of the service they provide followed by `Provider`.\n * For example, the {@link ng.$log $log} service has a provider called\n * {@link ng.$logProvider $logProvider}.\n *\n * Service provider objects can have additional methods which allow configuration of the provider\n * and its service. Importantly, you can configure what kind of service is created by the `$get`\n * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a\n * method {@link ng.$logProvider#debugEnabled debugEnabled}\n * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the\n * console or not.\n *\n * It is possible to inject other providers into the provider function,\n * but the injected provider must have been defined before the one that requires it.\n *\n * @param {string} name The name of the instance. NOTE: the provider will be available under `name +\n 'Provider'` key.\n * @param {(Object|function())} provider If the provider is:\n *\n * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using\n * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.\n * - `Constructor`: a new instance of the provider will be created using\n * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.\n *\n * @returns {Object} registered provider instance\n\n * @example\n *\n * The following example shows how to create a simple event tracking service and register it using\n * {@link auto.$provide#provider $provide.provider()}.\n *\n * ```js\n * // Define the eventTracker provider\n * function EventTrackerProvider() {\n * var trackingUrl = '/track';\n *\n * // A provider method for configuring where the tracked events should been saved\n * this.setTrackingUrl = function(url) {\n * trackingUrl = url;\n * };\n *\n * // The service factory function\n * this.$get = ['$http', function($http) {\n * var trackedEvents = {};\n * return {\n * // Call this to track an event\n * event: function(event) {\n * var count = trackedEvents[event] || 0;\n * count += 1;\n * trackedEvents[event] = count;\n * return count;\n * },\n * // Call this to save the tracked events to the trackingUrl\n * save: function() {\n * $http.post(trackingUrl, trackedEvents);\n * }\n * };\n * }];\n * }\n *\n * describe('eventTracker', function() {\n * var postSpy;\n *\n * beforeEach(module(function($provide) {\n * // Register the eventTracker provider\n * $provide.provider('eventTracker', EventTrackerProvider);\n * }));\n *\n * beforeEach(module(function(eventTrackerProvider) {\n * // Configure eventTracker provider\n * eventTrackerProvider.setTrackingUrl('/custom-track');\n * }));\n *\n * it('tracks events', inject(function(eventTracker) {\n * expect(eventTracker.event('login')).toEqual(1);\n * expect(eventTracker.event('login')).toEqual(2);\n * }));\n *\n * it('saves to the tracking url', inject(function(eventTracker, $http) {\n * postSpy = spyOn($http, 'post');\n * eventTracker.event('login');\n * eventTracker.save();\n * expect(postSpy).toHaveBeenCalled();\n * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');\n * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');\n * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });\n * }));\n * });\n * ```\n */\n\n/**\n * @ngdoc method\n * @name $provide#factory\n * @description\n *\n * Register a **service factory**, which will be called to return the service instance.\n * This is short for registering a service where its provider consists of only a `$get` property,\n * which is the given service factory function.\n * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to\n * configure your service in a provider.\n *\n * @param {string} name The name of the instance.\n * @param {Function|Array.} $getFn The injectable $getFn for the instance creation.\n * Internally this is a short hand for `$provide.provider(name, {$get: $getFn})`.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service\n * ```js\n * $provide.factory('ping', ['$http', function($http) {\n * return function ping() {\n * return $http.send('/ping');\n * };\n * }]);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#service\n * @description\n *\n * Register a **service constructor**, which will be invoked with `new` to create the service\n * instance.\n * This is short for registering a service where its provider's `$get` property is a factory\n * function that returns an instance instantiated by the injector from the service constructor\n * function.\n *\n * Internally it looks a bit like this:\n *\n * ```\n * {\n * $get: function() {\n * return $injector.instantiate(constructor);\n * }\n * }\n * ```\n *\n *\n * You should use {@link auto.$provide#service $provide.service(class)} if you define your service\n * as a type/class.\n *\n * @param {string} name The name of the instance.\n * @param {Function|Array.} constructor An injectable class (constructor function)\n * that will be instantiated.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service using\n * {@link auto.$provide#service $provide.service(class)}.\n * ```js\n * var Ping = function($http) {\n * this.$http = $http;\n * };\n *\n * Ping.$inject = ['$http'];\n *\n * Ping.prototype.send = function() {\n * return this.$http.get('/ping');\n * };\n * $provide.service('ping', Ping);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping.send();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#value\n * @description\n *\n * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a\n * number, an array, an object or a function. This is short for registering a service where its\n * provider's `$get` property is a factory function that takes no arguments and returns the **value\n * service**. That also means it is not possible to inject other services into a value service.\n *\n * Value services are similar to constant services, except that they cannot be injected into a\n * module configuration function (see {@link angular.Module#config}) but they can be overridden by\n * an AngularJS {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the instance.\n * @param {*} value The value.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here are some examples of creating value services.\n * ```js\n * $provide.value('ADMIN_USER', 'admin');\n *\n * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });\n *\n * $provide.value('halfOf', function(value) {\n * return value / 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#constant\n * @description\n *\n * Register a **constant service** with the {@link auto.$injector $injector}, such as a string,\n * a number, an array, an object or a function. Like the {@link auto.$provide#value value}, it is not\n * possible to inject other services into a constant.\n *\n * But unlike {@link auto.$provide#value value}, a constant can be\n * injected into a module configuration function (see {@link angular.Module#config}) and it cannot\n * be overridden by an AngularJS {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the constant.\n * @param {*} value The constant value.\n * @returns {Object} registered instance\n *\n * @example\n * Here a some examples of creating constants:\n * ```js\n * $provide.constant('SHARD_HEIGHT', 306);\n *\n * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);\n *\n * $provide.constant('double', function(value) {\n * return value * 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#decorator\n * @description\n *\n * Register a **decorator function** with the {@link auto.$injector $injector}. A decorator function\n * intercepts the creation of a service, allowing it to override or modify the behavior of the\n * service. The return value of the decorator function may be the original service, or a new service\n * that replaces (or wraps and delegates to) the original service.\n *\n * You can find out more about using decorators in the {@link guide/decorators} guide.\n *\n * @param {string} name The name of the service to decorate.\n * @param {Function|Array.} decorator This function will be invoked when the service needs to be\n * provided and should return the decorated service instance. The function is called using\n * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.\n * Local injection arguments:\n *\n * * `$delegate` - The original service instance, which can be replaced, monkey patched, configured,\n * decorated or delegated to.\n *\n * @example\n * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting\n * calls to {@link ng.$log#error $log.warn()}.\n * ```js\n * $provide.decorator('$log', ['$delegate', function($delegate) {\n * $delegate.warn = $delegate.error;\n * return $delegate;\n * }]);\n * ```\n */\n\n\nfunction createInjector(modulesToLoad, strictDi) {\n strictDi = (strictDi === true);\n var INSTANTIATING = {},\n providerSuffix = 'Provider',\n path = [],\n loadedModules = new NgMap(),\n providerCache = {\n $provide: {\n provider: supportObject(provider),\n factory: supportObject(factory),\n service: supportObject(service),\n value: supportObject(value),\n constant: supportObject(constant),\n decorator: decorator\n }\n },\n providerInjector = (providerCache.$injector =\n createInternalInjector(providerCache, function(serviceName, caller) {\n if (angular.isString(caller)) {\n path.push(caller);\n }\n throw $injectorMinErr('unpr', 'Unknown provider: {0}', path.join(' <- '));\n })),\n instanceCache = {},\n protoInstanceInjector =\n createInternalInjector(instanceCache, function(serviceName, caller) {\n var provider = providerInjector.get(serviceName + providerSuffix, caller);\n return instanceInjector.invoke(\n provider.$get, provider, undefined, serviceName);\n }),\n instanceInjector = protoInstanceInjector;\n\n providerCache['$injector' + providerSuffix] = { $get: valueFn(protoInstanceInjector) };\n instanceInjector.modules = providerInjector.modules = createMap();\n var runBlocks = loadModules(modulesToLoad);\n instanceInjector = protoInstanceInjector.get('$injector');\n instanceInjector.strictDi = strictDi;\n forEach(runBlocks, function(fn) { if (fn) instanceInjector.invoke(fn); });\n\n instanceInjector.loadNewModules = function(mods) {\n forEach(loadModules(mods), function(fn) { if (fn) instanceInjector.invoke(fn); });\n };\n\n\n return instanceInjector;\n\n ////////////////////////////////////\n // $provider\n ////////////////////////////////////\n\n function supportObject(delegate) {\n return function(key, value) {\n if (isObject(key)) {\n forEach(key, reverseParams(delegate));\n } else {\n return delegate(key, value);\n }\n };\n }\n\n function provider(name, provider_) {\n assertNotHasOwnProperty(name, 'service');\n if (isFunction(provider_) || isArray(provider_)) {\n provider_ = providerInjector.instantiate(provider_);\n }\n if (!provider_.$get) {\n throw $injectorMinErr('pget', 'Provider \\'{0}\\' must define $get factory method.', name);\n }\n return (providerCache[name + providerSuffix] = provider_);\n }\n\n function enforceReturnValue(name, factory) {\n return /** @this */ function enforcedReturnValue() {\n var result = instanceInjector.invoke(factory, this);\n if (isUndefined(result)) {\n throw $injectorMinErr('undef', 'Provider \\'{0}\\' must return a value from $get factory method.', name);\n }\n return result;\n };\n }\n\n function factory(name, factoryFn, enforce) {\n return provider(name, {\n $get: enforce !== false ? enforceReturnValue(name, factoryFn) : factoryFn\n });\n }\n\n function service(name, constructor) {\n return factory(name, ['$injector', function($injector) {\n return $injector.instantiate(constructor);\n }]);\n }\n\n function value(name, val) { return factory(name, valueFn(val), false); }\n\n function constant(name, value) {\n assertNotHasOwnProperty(name, 'constant');\n providerCache[name] = value;\n instanceCache[name] = value;\n }\n\n function decorator(serviceName, decorFn) {\n var origProvider = providerInjector.get(serviceName + providerSuffix),\n orig$get = origProvider.$get;\n\n origProvider.$get = function() {\n var origInstance = instanceInjector.invoke(orig$get, origProvider);\n return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});\n };\n }\n\n ////////////////////////////////////\n // Module Loading\n ////////////////////////////////////\n function loadModules(modulesToLoad) {\n assertArg(isUndefined(modulesToLoad) || isArray(modulesToLoad), 'modulesToLoad', 'not an array');\n var runBlocks = [], moduleFn;\n forEach(modulesToLoad, function(module) {\n if (loadedModules.get(module)) return;\n loadedModules.set(module, true);\n\n function runInvokeQueue(queue) {\n var i, ii;\n for (i = 0, ii = queue.length; i < ii; i++) {\n var invokeArgs = queue[i],\n provider = providerInjector.get(invokeArgs[0]);\n\n provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\n }\n }\n\n try {\n if (isString(module)) {\n moduleFn = angularModule(module);\n instanceInjector.modules[module] = moduleFn;\n runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);\n runInvokeQueue(moduleFn._invokeQueue);\n runInvokeQueue(moduleFn._configBlocks);\n } else if (isFunction(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else if (isArray(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else {\n assertArgFn(module, 'module');\n }\n } catch (e) {\n if (isArray(module)) {\n module = module[module.length - 1];\n }\n if (e.message && e.stack && e.stack.indexOf(e.message) === -1) {\n // Safari & FF's stack traces don't contain error.message content\n // unlike those of Chrome and IE\n // So if stack doesn't contain message, we create a new string that contains both.\n // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.\n // eslint-disable-next-line no-ex-assign\n e = e.message + '\\n' + e.stack;\n }\n throw $injectorMinErr('modulerr', 'Failed to instantiate module {0} due to:\\n{1}',\n module, e.stack || e.message || e);\n }\n });\n return runBlocks;\n }\n\n ////////////////////////////////////\n // internal Injector\n ////////////////////////////////////\n\n function createInternalInjector(cache, factory) {\n\n function getService(serviceName, caller) {\n if (cache.hasOwnProperty(serviceName)) {\n if (cache[serviceName] === INSTANTIATING) {\n throw $injectorMinErr('cdep', 'Circular dependency found: {0}',\n serviceName + ' <- ' + path.join(' <- '));\n }\n return cache[serviceName];\n } else {\n try {\n path.unshift(serviceName);\n cache[serviceName] = INSTANTIATING;\n cache[serviceName] = factory(serviceName, caller);\n return cache[serviceName];\n } catch (err) {\n if (cache[serviceName] === INSTANTIATING) {\n delete cache[serviceName];\n }\n throw err;\n } finally {\n path.shift();\n }\n }\n }\n\n\n function injectionArgs(fn, locals, serviceName) {\n var args = [],\n $inject = createInjector.$$annotate(fn, strictDi, serviceName);\n\n for (var i = 0, length = $inject.length; i < length; i++) {\n var key = $inject[i];\n if (typeof key !== 'string') {\n throw $injectorMinErr('itkn',\n 'Incorrect injection token! Expected service name as string, got {0}', key);\n }\n args.push(locals && locals.hasOwnProperty(key) ? locals[key] :\n getService(key, serviceName));\n }\n return args;\n }\n\n function isClass(func) {\n // Support: IE 9-11 only\n // IE 9-11 do not support classes and IE9 leaks with the code below.\n if (msie || typeof func !== 'function') {\n return false;\n }\n var result = func.$$ngIsClass;\n if (!isBoolean(result)) {\n result = func.$$ngIsClass = /^class\\b/.test(stringifyFn(func));\n }\n return result;\n }\n\n function invoke(fn, self, locals, serviceName) {\n if (typeof locals === 'string') {\n serviceName = locals;\n locals = null;\n }\n\n var args = injectionArgs(fn, locals, serviceName);\n if (isArray(fn)) {\n fn = fn[fn.length - 1];\n }\n\n if (!isClass(fn)) {\n // http://jsperf.com/angularjs-invoke-apply-vs-switch\n // #5388\n return fn.apply(self, args);\n } else {\n args.unshift(null);\n return new (Function.prototype.bind.apply(fn, args))();\n }\n }\n\n\n function instantiate(Type, locals, serviceName) {\n // Check if Type is annotated and use just the given function at n-1 as parameter\n // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);\n var ctor = (isArray(Type) ? Type[Type.length - 1] : Type);\n var args = injectionArgs(Type, locals, serviceName);\n // Empty object at position 0 is ignored for invocation with `new`, but required.\n args.unshift(null);\n return new (Function.prototype.bind.apply(ctor, args))();\n }\n\n\n return {\n invoke: invoke,\n instantiate: instantiate,\n get: getService,\n annotate: createInjector.$$annotate,\n has: function(name) {\n return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);\n }\n };\n }\n}\n\ncreateInjector.$$annotate = annotate;\n\n/**\n * @ngdoc provider\n * @name $anchorScrollProvider\n * @this\n *\n * @description\n * Use `$anchorScrollProvider` to disable automatic scrolling whenever\n * {@link ng.$location#hash $location.hash()} changes.\n */\nfunction $AnchorScrollProvider() {\n\n var autoScrollingEnabled = true;\n\n /**\n * @ngdoc method\n * @name $anchorScrollProvider#disableAutoScrolling\n *\n * @description\n * By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to\n * {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.
\n * Use this method to disable automatic scrolling.\n *\n * If automatic scrolling is disabled, one must explicitly call\n * {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the\n * current hash.\n */\n this.disableAutoScrolling = function() {\n autoScrollingEnabled = false;\n };\n\n /**\n * @ngdoc service\n * @name $anchorScroll\n * @kind function\n * @requires $window\n * @requires $location\n * @requires $rootScope\n *\n * @description\n * When called, it scrolls to the element related to the specified `hash` or (if omitted) to the\n * current value of {@link ng.$location#hash $location.hash()}, according to the rules specified\n * in the\n * [HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/browsers.html#an-indicated-part-of-the-document).\n *\n * It also watches the {@link ng.$location#hash $location.hash()} and automatically scrolls to\n * match any anchor whenever it changes. This can be disabled by calling\n * {@link ng.$anchorScrollProvider#disableAutoScrolling $anchorScrollProvider.disableAutoScrolling()}.\n *\n * Additionally, you can use its {@link ng.$anchorScroll#yOffset yOffset} property to specify a\n * vertical scroll-offset (either fixed or dynamic).\n *\n * @param {string=} hash The hash specifying the element to scroll to. If omitted, the value of\n * {@link ng.$location#hash $location.hash()} will be used.\n *\n * @property {(number|function|jqLite)} yOffset\n * If set, specifies a vertical scroll-offset. This is often useful when there are fixed\n * positioned elements at the top of the page, such as navbars, headers etc.\n *\n * `yOffset` can be specified in various ways:\n * - **number**: A fixed number of pixels to be used as offset.

\n * - **function**: A getter function called everytime `$anchorScroll()` is executed. Must return\n * a number representing the offset (in pixels).

\n * - **jqLite**: A jqLite/jQuery element to be used for specifying the offset. The distance from\n * the top of the page to the element's bottom will be used as offset.
\n * **Note**: The element will be taken into account only as long as its `position` is set to\n * `fixed`. This option is useful, when dealing with responsive navbars/headers that adjust\n * their height and/or positioning according to the viewport's size.\n *\n *
\n *
\n * In order for `yOffset` to work properly, scrolling should take place on the document's root and\n * not some child element.\n *
\n *\n * @example\n \n \n
\n Go to bottom\n You're at the bottom!\n
\n
\n \n angular.module('anchorScrollExample', [])\n .controller('ScrollController', ['$scope', '$location', '$anchorScroll',\n function($scope, $location, $anchorScroll) {\n $scope.gotoBottom = function() {\n // set the location.hash to the id of\n // the element you wish to scroll to.\n $location.hash('bottom');\n\n // call $anchorScroll()\n $anchorScroll();\n };\n }]);\n \n \n #scrollArea {\n height: 280px;\n overflow: auto;\n }\n\n #bottom {\n display: block;\n margin-top: 2000px;\n }\n \n
\n *\n *
\n * The example below illustrates the use of a vertical scroll-offset (specified as a fixed value).\n * See {@link ng.$anchorScroll#yOffset $anchorScroll.yOffset} for more details.\n *\n * @example\n \n \n \n
\n Anchor {{x}} of 5\n
\n
\n \n angular.module('anchorScrollOffsetExample', [])\n .run(['$anchorScroll', function($anchorScroll) {\n $anchorScroll.yOffset = 50; // always scroll by 50 extra pixels\n }])\n .controller('headerCtrl', ['$anchorScroll', '$location', '$scope',\n function($anchorScroll, $location, $scope) {\n $scope.gotoAnchor = function(x) {\n var newHash = 'anchor' + x;\n if ($location.hash() !== newHash) {\n // set the $location.hash to `newHash` and\n // $anchorScroll will automatically scroll to it\n $location.hash('anchor' + x);\n } else {\n // call $anchorScroll() explicitly,\n // since $location.hash hasn't changed\n $anchorScroll();\n }\n };\n }\n ]);\n \n \n body {\n padding-top: 50px;\n }\n\n .anchor {\n border: 2px dashed DarkOrchid;\n padding: 10px 10px 200px 10px;\n }\n\n .fixed-header {\n background-color: rgba(0, 0, 0, 0.2);\n height: 50px;\n position: fixed;\n top: 0; left: 0; right: 0;\n }\n\n .fixed-header > a {\n display: inline-block;\n margin: 5px 15px;\n }\n \n
\n */\n this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {\n var document = $window.document;\n\n // Helper function to get first anchor from a NodeList\n // (using `Array#some()` instead of `angular#forEach()` since it's more performant\n // and working in all supported browsers.)\n function getFirstAnchor(list) {\n var result = null;\n Array.prototype.some.call(list, function(element) {\n if (nodeName_(element) === 'a') {\n result = element;\n return true;\n }\n });\n return result;\n }\n\n function getYOffset() {\n\n var offset = scroll.yOffset;\n\n if (isFunction(offset)) {\n offset = offset();\n } else if (isElement(offset)) {\n var elem = offset[0];\n var style = $window.getComputedStyle(elem);\n if (style.position !== 'fixed') {\n offset = 0;\n } else {\n offset = elem.getBoundingClientRect().bottom;\n }\n } else if (!isNumber(offset)) {\n offset = 0;\n }\n\n return offset;\n }\n\n function scrollTo(elem) {\n if (elem) {\n elem.scrollIntoView();\n\n var offset = getYOffset();\n\n if (offset) {\n // `offset` is the number of pixels we should scroll UP in order to align `elem` properly.\n // This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the\n // top of the viewport.\n //\n // IF the number of pixels from the top of `elem` to the end of the page's content is less\n // than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some\n // way down the page.\n //\n // This is often the case for elements near the bottom of the page.\n //\n // In such cases we do not need to scroll the whole `offset` up, just the difference between\n // the top of the element and the offset, which is enough to align the top of `elem` at the\n // desired position.\n var elemTop = elem.getBoundingClientRect().top;\n $window.scrollBy(0, elemTop - offset);\n }\n } else {\n $window.scrollTo(0, 0);\n }\n }\n\n function scroll(hash) {\n // Allow numeric hashes\n hash = isString(hash) ? hash : isNumber(hash) ? hash.toString() : $location.hash();\n var elm;\n\n // empty hash, scroll to the top of the page\n if (!hash) scrollTo(null);\n\n // element with given id\n else if ((elm = document.getElementById(hash))) scrollTo(elm);\n\n // first anchor with given name :-D\n else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) scrollTo(elm);\n\n // no element and hash === 'top', scroll to the top of the page\n else if (hash === 'top') scrollTo(null);\n }\n\n // does not scroll when user clicks on anchor link that is currently on\n // (no url change, no $location.hash() change), browser native does scroll\n if (autoScrollingEnabled) {\n $rootScope.$watch(function autoScrollWatch() {return $location.hash();},\n function autoScrollWatchAction(newVal, oldVal) {\n // skip the initial scroll if $location.hash is empty\n if (newVal === oldVal && newVal === '') return;\n\n jqLiteDocumentLoaded(function() {\n $rootScope.$evalAsync(scroll);\n });\n });\n }\n\n return scroll;\n }];\n}\n\nvar $animateMinErr = minErr('$animate');\nvar ELEMENT_NODE = 1;\nvar NG_ANIMATE_CLASSNAME = 'ng-animate';\n\nfunction mergeClasses(a,b) {\n if (!a && !b) return '';\n if (!a) return b;\n if (!b) return a;\n if (isArray(a)) a = a.join(' ');\n if (isArray(b)) b = b.join(' ');\n return a + ' ' + b;\n}\n\nfunction extractElementNode(element) {\n for (var i = 0; i < element.length; i++) {\n var elm = element[i];\n if (elm.nodeType === ELEMENT_NODE) {\n return elm;\n }\n }\n}\n\nfunction splitClasses(classes) {\n if (isString(classes)) {\n classes = classes.split(' ');\n }\n\n // Use createMap() to prevent class assumptions involving property names in\n // Object.prototype\n var obj = createMap();\n forEach(classes, function(klass) {\n // sometimes the split leaves empty string values\n // incase extra spaces were applied to the options\n if (klass.length) {\n obj[klass] = true;\n }\n });\n return obj;\n}\n\n// if any other type of options value besides an Object value is\n// passed into the $animate.method() animation then this helper code\n// will be run which will ignore it. While this patch is not the\n// greatest solution to this, a lot of existing plugins depend on\n// $animate to either call the callback (< 1.2) or return a promise\n// that can be changed. This helper function ensures that the options\n// are wiped clean incase a callback function is provided.\nfunction prepareAnimateOptions(options) {\n return isObject(options)\n ? options\n : {};\n}\n\nvar $$CoreAnimateJsProvider = /** @this */ function() {\n this.$get = noop;\n};\n\n// this is prefixed with Core since it conflicts with\n// the animateQueueProvider defined in ngAnimate/animateQueue.js\nvar $$CoreAnimateQueueProvider = /** @this */ function() {\n var postDigestQueue = new NgMap();\n var postDigestElements = [];\n\n this.$get = ['$$AnimateRunner', '$rootScope',\n function($$AnimateRunner, $rootScope) {\n return {\n enabled: noop,\n on: noop,\n off: noop,\n pin: noop,\n\n push: function(element, event, options, domOperation) {\n if (domOperation) {\n domOperation();\n }\n\n options = options || {};\n if (options.from) {\n element.css(options.from);\n }\n if (options.to) {\n element.css(options.to);\n }\n\n if (options.addClass || options.removeClass) {\n addRemoveClassesPostDigest(element, options.addClass, options.removeClass);\n }\n\n var runner = new $$AnimateRunner();\n\n // since there are no animations to run the runner needs to be\n // notified that the animation call is complete.\n runner.complete();\n return runner;\n }\n };\n\n\n function updateData(data, classes, value) {\n var changed = false;\n if (classes) {\n classes = isString(classes) ? classes.split(' ') :\n isArray(classes) ? classes : [];\n forEach(classes, function(className) {\n if (className) {\n changed = true;\n data[className] = value;\n }\n });\n }\n return changed;\n }\n\n function handleCSSClassChanges() {\n forEach(postDigestElements, function(element) {\n var data = postDigestQueue.get(element);\n if (data) {\n var existing = splitClasses(element.attr('class'));\n var toAdd = '';\n var toRemove = '';\n forEach(data, function(status, className) {\n var hasClass = !!existing[className];\n if (status !== hasClass) {\n if (status) {\n toAdd += (toAdd.length ? ' ' : '') + className;\n } else {\n toRemove += (toRemove.length ? ' ' : '') + className;\n }\n }\n });\n\n forEach(element, function(elm) {\n if (toAdd) {\n jqLiteAddClass(elm, toAdd);\n }\n if (toRemove) {\n jqLiteRemoveClass(elm, toRemove);\n }\n });\n postDigestQueue.delete(element);\n }\n });\n postDigestElements.length = 0;\n }\n\n\n function addRemoveClassesPostDigest(element, add, remove) {\n var data = postDigestQueue.get(element) || {};\n\n var classesAdded = updateData(data, add, true);\n var classesRemoved = updateData(data, remove, false);\n\n if (classesAdded || classesRemoved) {\n\n postDigestQueue.set(element, data);\n postDigestElements.push(element);\n\n if (postDigestElements.length === 1) {\n $rootScope.$$postDigest(handleCSSClassChanges);\n }\n }\n }\n }];\n};\n\n/**\n * @ngdoc provider\n * @name $animateProvider\n *\n * @description\n * Default implementation of $animate that doesn't perform any animations, instead just\n * synchronously performs DOM updates and resolves the returned runner promise.\n *\n * In order to enable animations the `ngAnimate` module has to be loaded.\n *\n * To see the functional implementation check out `src/ngAnimate/animate.js`.\n */\nvar $AnimateProvider = ['$provide', /** @this */ function($provide) {\n var provider = this;\n var classNameFilter = null;\n var customFilter = null;\n\n this.$$registeredAnimations = Object.create(null);\n\n /**\n * @ngdoc method\n * @name $animateProvider#register\n *\n * @description\n * Registers a new injectable animation factory function. The factory function produces the\n * animation object which contains callback functions for each event that is expected to be\n * animated.\n *\n * * `eventFn`: `function(element, ... , doneFunction, options)`\n * The element to animate, the `doneFunction` and the options fed into the animation. Depending\n * on the type of animation additional arguments will be injected into the animation function. The\n * list below explains the function signatures for the different animation methods:\n *\n * - setClass: function(element, addedClasses, removedClasses, doneFunction, options)\n * - addClass: function(element, addedClasses, doneFunction, options)\n * - removeClass: function(element, removedClasses, doneFunction, options)\n * - enter, leave, move: function(element, doneFunction, options)\n * - animate: function(element, fromStyles, toStyles, doneFunction, options)\n *\n * Make sure to trigger the `doneFunction` once the animation is fully complete.\n *\n * ```js\n * return {\n * //enter, leave, move signature\n * eventFn : function(element, done, options) {\n * //code to run the animation\n * //once complete, then run done()\n * return function endFunction(wasCancelled) {\n * //code to cancel the animation\n * }\n * }\n * }\n * ```\n *\n * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to).\n * @param {Function} factory The factory function that will be executed to return the animation\n * object.\n */\n this.register = function(name, factory) {\n if (name && name.charAt(0) !== '.') {\n throw $animateMinErr('notcsel', 'Expecting class selector starting with \\'.\\' got \\'{0}\\'.', name);\n }\n\n var key = name + '-animation';\n provider.$$registeredAnimations[name.substr(1)] = key;\n $provide.factory(key, factory);\n };\n\n /**\n * @ngdoc method\n * @name $animateProvider#customFilter\n *\n * @description\n * Sets and/or returns the custom filter function that is used to \"filter\" animations, i.e.\n * determine if an animation is allowed or not. When no filter is specified (the default), no\n * animation will be blocked. Setting the `customFilter` value will only allow animations for\n * which the filter function's return value is truthy.\n *\n * This allows to easily create arbitrarily complex rules for filtering animations, such as\n * allowing specific events only, or enabling animations on specific subtrees of the DOM, etc.\n * Filtering animations can also boost performance for low-powered devices, as well as\n * applications containing a lot of structural operations.\n *\n *
\n * **Best Practice:**\n * Keep the filtering function as lean as possible, because it will be called for each DOM\n * action (e.g. insertion, removal, class change) performed by \"animation-aware\" directives.\n * See {@link guide/animations#which-directives-support-animations- here} for a list of built-in\n * directives that support animations.\n * Performing computationally expensive or time-consuming operations on each call of the\n * filtering function can make your animations sluggish.\n *
\n *\n * **Note:** If present, `customFilter` will be checked before\n * {@link $animateProvider#classNameFilter classNameFilter}.\n *\n * @param {Function=} filterFn - The filter function which will be used to filter all animations.\n * If a falsy value is returned, no animation will be performed. The function will be called\n * with the following arguments:\n * - **node** `{DOMElement}` - The DOM element to be animated.\n * - **event** `{String}` - The name of the animation event (e.g. `enter`, `leave`, `addClass`\n * etc).\n * - **options** `{Object}` - A collection of options/styles used for the animation.\n * @return {Function} The current filter function or `null` if there is none set.\n */\n this.customFilter = function(filterFn) {\n if (arguments.length === 1) {\n customFilter = isFunction(filterFn) ? filterFn : null;\n }\n\n return customFilter;\n };\n\n /**\n * @ngdoc method\n * @name $animateProvider#classNameFilter\n *\n * @description\n * Sets and/or returns the CSS class regular expression that is checked when performing\n * an animation. Upon bootstrap the classNameFilter value is not set at all and will\n * therefore enable $animate to attempt to perform an animation on any element that is triggered.\n * When setting the `classNameFilter` value, animations will only be performed on elements\n * that successfully match the filter expression. This in turn can boost performance\n * for low-powered devices as well as applications containing a lot of structural operations.\n *\n * **Note:** If present, `classNameFilter` will be checked after\n * {@link $animateProvider#customFilter customFilter}. If `customFilter` is present and returns\n * false, `classNameFilter` will not be checked.\n *\n * @param {RegExp=} expression The className expression which will be checked against all animations\n * @return {RegExp} The current CSS className expression value. If null then there is no expression value\n */\n this.classNameFilter = function(expression) {\n if (arguments.length === 1) {\n classNameFilter = (expression instanceof RegExp) ? expression : null;\n if (classNameFilter) {\n var reservedRegex = new RegExp('[(\\\\s|\\\\/)]' + NG_ANIMATE_CLASSNAME + '[(\\\\s|\\\\/)]');\n if (reservedRegex.test(classNameFilter.toString())) {\n classNameFilter = null;\n throw $animateMinErr('nongcls', '$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the \"{0}\" CSS class.', NG_ANIMATE_CLASSNAME);\n }\n }\n }\n return classNameFilter;\n };\n\n this.$get = ['$$animateQueue', function($$animateQueue) {\n function domInsert(element, parentElement, afterElement) {\n // if for some reason the previous element was removed\n // from the dom sometime before this code runs then let's\n // just stick to using the parent element as the anchor\n if (afterElement) {\n var afterNode = extractElementNode(afterElement);\n if (afterNode && !afterNode.parentNode && !afterNode.previousElementSibling) {\n afterElement = null;\n }\n }\n if (afterElement) {\n afterElement.after(element);\n } else {\n parentElement.prepend(element);\n }\n }\n\n /**\n * @ngdoc service\n * @name $animate\n * @description The $animate service exposes a series of DOM utility methods that provide support\n * for animation hooks. The default behavior is the application of DOM operations, however,\n * when an animation is detected (and animations are enabled), $animate will do the heavy lifting\n * to ensure that animation runs with the triggered DOM operation.\n *\n * By default $animate doesn't trigger any animations. This is because the `ngAnimate` module isn't\n * included and only when it is active then the animation hooks that `$animate` triggers will be\n * functional. Once active then all structural `ng-` directives will trigger animations as they perform\n * their DOM-related operations (enter, leave and move). Other directives such as `ngClass`,\n * `ngShow`, `ngHide` and `ngMessages` also provide support for animations.\n *\n * It is recommended that the`$animate` service is always used when executing DOM-related procedures within directives.\n *\n * To learn more about enabling animation support, click here to visit the\n * {@link ngAnimate ngAnimate module page}.\n */\n return {\n // we don't call it directly since non-existant arguments may\n // be interpreted as null within the sub enabled function\n\n /**\n *\n * @ngdoc method\n * @name $animate#on\n * @kind function\n * @description Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...)\n * has fired on the given element or among any of its children. Once the listener is fired, the provided callback\n * is fired with the following params:\n *\n * ```js\n * $animate.on('enter', container,\n * function callback(element, phase) {\n * // cool we detected an enter animation within the container\n * }\n * );\n * ```\n *\n * @param {string} event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...)\n * @param {DOMElement} container the container element that will capture each of the animation events that are fired on itself\n * as well as among its children\n * @param {Function} callback the callback function that will be fired when the listener is triggered\n *\n * The arguments present in the callback function are:\n * * `element` - The captured DOM element that the animation was fired on.\n * * `phase` - The phase of the animation. The two possible phases are **start** (when the animation starts) and **close** (when it ends).\n */\n on: $$animateQueue.on,\n\n /**\n *\n * @ngdoc method\n * @name $animate#off\n * @kind function\n * @description Deregisters an event listener based on the event which has been associated with the provided element. This method\n * can be used in three different ways depending on the arguments:\n *\n * ```js\n * // remove all the animation event listeners listening for `enter`\n * $animate.off('enter');\n *\n * // remove listeners for all animation events from the container element\n * $animate.off(container);\n *\n * // remove all the animation event listeners listening for `enter` on the given element and its children\n * $animate.off('enter', container);\n *\n * // remove the event listener function provided by `callback` that is set\n * // to listen for `enter` on the given `container` as well as its children\n * $animate.off('enter', container, callback);\n * ```\n *\n * @param {string|DOMElement} event|container the animation event (e.g. enter, leave, move,\n * addClass, removeClass, etc...), or the container element. If it is the element, all other\n * arguments are ignored.\n * @param {DOMElement=} container the container element the event listener was placed on\n * @param {Function=} callback the callback function that was registered as the listener\n */\n off: $$animateQueue.off,\n\n /**\n * @ngdoc method\n * @name $animate#pin\n * @kind function\n * @description Associates the provided element with a host parent element to allow the element to be animated even if it exists\n * outside of the DOM structure of the AngularJS application. By doing so, any animation triggered via `$animate` can be issued on the\n * element despite being outside the realm of the application or within another application. Say for example if the application\n * was bootstrapped on an element that is somewhere inside of the `` tag, but we wanted to allow for an element to be situated\n * as a direct child of `document.body`, then this can be achieved by pinning the element via `$animate.pin(element)`. Keep in mind\n * that calling `$animate.pin(element, parentElement)` will not actually insert into the DOM anywhere; it will just create the association.\n *\n * Note that this feature is only active when the `ngAnimate` module is used.\n *\n * @param {DOMElement} element the external element that will be pinned\n * @param {DOMElement} parentElement the host parent element that will be associated with the external element\n */\n pin: $$animateQueue.pin,\n\n /**\n *\n * @ngdoc method\n * @name $animate#enabled\n * @kind function\n * @description Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This\n * function can be called in four ways:\n *\n * ```js\n * // returns true or false\n * $animate.enabled();\n *\n * // changes the enabled state for all animations\n * $animate.enabled(false);\n * $animate.enabled(true);\n *\n * // returns true or false if animations are enabled for an element\n * $animate.enabled(element);\n *\n * // changes the enabled state for an element and its children\n * $animate.enabled(element, true);\n * $animate.enabled(element, false);\n * ```\n *\n * @param {DOMElement=} element the element that will be considered for checking/setting the enabled state\n * @param {boolean=} enabled whether or not the animations will be enabled for the element\n *\n * @return {boolean} whether or not animations are enabled\n */\n enabled: $$animateQueue.enabled,\n\n /**\n * @ngdoc method\n * @name $animate#cancel\n * @kind function\n * @description Cancels the provided animation and applies the end state of the animation.\n * Note that this does not cancel the underlying operation, e.g. the setting of classes or\n * adding the element to the DOM.\n *\n * @param {animationRunner} animationRunner An animation runner returned by an $animate function.\n *\n * @example\n \n \n angular.module('animationExample', ['ngAnimate']).component('cancelExample', {\n templateUrl: 'template.html',\n controller: function($element, $animate) {\n this.runner = null;\n\n this.addClass = function() {\n this.runner = $animate.addClass($element.find('div'), 'red');\n var ctrl = this;\n this.runner.finally(function() {\n ctrl.runner = null;\n });\n };\n\n this.removeClass = function() {\n this.runner = $animate.removeClass($element.find('div'), 'red');\n var ctrl = this;\n this.runner.finally(function() {\n ctrl.runner = null;\n });\n };\n\n this.cancel = function() {\n $animate.cancel(this.runner);\n };\n }\n });\n \n \n

\n \n \n
\n \n
\n

CSS-Animated Text
\n

\n
\n \n \n \n \n .red-add, .red-remove {\n transition: all 4s cubic-bezier(0.250, 0.460, 0.450, 0.940);\n }\n\n .red,\n .red-add.red-add-active {\n color: #FF0000;\n font-size: 40px;\n }\n\n .red-remove.red-remove-active {\n font-size: 10px;\n color: black;\n }\n\n \n
\n */\n cancel: function(runner) {\n if (runner.cancel) {\n runner.cancel();\n }\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#enter\n * @kind function\n * @description Inserts the element into the DOM either after the `after` element (if provided) or\n * as the first child within the `parent` element and then triggers an animation.\n * A promise is returned that will be resolved during the next digest once the animation\n * has completed.\n *\n * @param {DOMElement} element the element which will be inserted into the DOM\n * @param {DOMElement} parent the parent element which will append the element as\n * a child (so long as the after element is not present)\n * @param {DOMElement=} after the sibling element after which the element will be appended\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} the animation runner\n */\n enter: function(element, parent, after, options) {\n parent = parent && jqLite(parent);\n after = after && jqLite(after);\n parent = parent || after.parent();\n domInsert(element, parent, after);\n return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options));\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#move\n * @kind function\n * @description Inserts (moves) the element into its new position in the DOM either after\n * the `after` element (if provided) or as the first child within the `parent` element\n * and then triggers an animation. A promise is returned that will be resolved\n * during the next digest once the animation has completed.\n *\n * @param {DOMElement} element the element which will be moved into the new DOM position\n * @param {DOMElement} parent the parent element which will append the element as\n * a child (so long as the after element is not present)\n * @param {DOMElement=} after the sibling element after which the element will be appended\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} the animation runner\n */\n move: function(element, parent, after, options) {\n parent = parent && jqLite(parent);\n after = after && jqLite(after);\n parent = parent || after.parent();\n domInsert(element, parent, after);\n return $$animateQueue.push(element, 'move', prepareAnimateOptions(options));\n },\n\n /**\n * @ngdoc method\n * @name $animate#leave\n * @kind function\n * @description Triggers an animation and then removes the element from the DOM.\n * When the function is called a promise is returned that will be resolved during the next\n * digest once the animation has completed.\n *\n * @param {DOMElement} element the element which will be removed from the DOM\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} the animation runner\n */\n leave: function(element, options) {\n return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() {\n element.remove();\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#addClass\n * @kind function\n *\n * @description Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon\n * execution, the addClass operation will only be handled after the next digest and it will not trigger an\n * animation if element already contains the CSS class or if the class is removed at a later step.\n * Note that class-based animations are treated differently compared to structural animations\n * (like enter, move and leave) since the CSS classes may be added/removed at different points\n * depending if CSS or JavaScript animations are used.\n *\n * @param {DOMElement} element the element which the CSS classes will be applied to\n * @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} animationRunner the animation runner\n */\n addClass: function(element, className, options) {\n options = prepareAnimateOptions(options);\n options.addClass = mergeClasses(options.addclass, className);\n return $$animateQueue.push(element, 'addClass', options);\n },\n\n /**\n * @ngdoc method\n * @name $animate#removeClass\n * @kind function\n *\n * @description Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon\n * execution, the removeClass operation will only be handled after the next digest and it will not trigger an\n * animation if element does not contain the CSS class or if the class is added at a later step.\n * Note that class-based animations are treated differently compared to structural animations\n * (like enter, move and leave) since the CSS classes may be added/removed at different points\n * depending if CSS or JavaScript animations are used.\n *\n * @param {DOMElement} element the element which the CSS classes will be applied to\n * @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} the animation runner\n */\n removeClass: function(element, className, options) {\n options = prepareAnimateOptions(options);\n options.removeClass = mergeClasses(options.removeClass, className);\n return $$animateQueue.push(element, 'removeClass', options);\n },\n\n /**\n * @ngdoc method\n * @name $animate#setClass\n * @kind function\n *\n * @description Performs both the addition and removal of a CSS classes on an element and (during the process)\n * triggers an animation surrounding the class addition/removal. Much like `$animate.addClass` and\n * `$animate.removeClass`, `setClass` will only evaluate the classes being added/removed once a digest has\n * passed. Note that class-based animations are treated differently compared to structural animations\n * (like enter, move and leave) since the CSS classes may be added/removed at different points\n * depending if CSS or JavaScript animations are used.\n *\n * @param {DOMElement} element the element which the CSS classes will be applied to\n * @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces)\n * @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} the animation runner\n */\n setClass: function(element, add, remove, options) {\n options = prepareAnimateOptions(options);\n options.addClass = mergeClasses(options.addClass, add);\n options.removeClass = mergeClasses(options.removeClass, remove);\n return $$animateQueue.push(element, 'setClass', options);\n },\n\n /**\n * @ngdoc method\n * @name $animate#animate\n * @kind function\n *\n * @description Performs an inline animation on the element which applies the provided to and from CSS styles to the element.\n * If any detected CSS transition, keyframe or JavaScript matches the provided className value, then the animation will take\n * on the provided styles. For example, if a transition animation is set for the given className, then the provided `from` and\n * `to` styles will be applied alongside the given transition. If the CSS style provided in `from` does not have a corresponding\n * style in `to`, the style in `from` is applied immediately, and no animation is run.\n * If a JavaScript animation is detected then the provided styles will be given in as function parameters into the `animate`\n * method (or as part of the `options` parameter):\n *\n * ```js\n * ngModule.animation('.my-inline-animation', function() {\n * return {\n * animate : function(element, from, to, done, options) {\n * //animation\n * done();\n * }\n * }\n * });\n * ```\n *\n * @param {DOMElement} element the element which the CSS styles will be applied to\n * @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation.\n * @param {object} to the to (destination) CSS styles that will be applied to the element and across the animation.\n * @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If\n * this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element.\n * (Note that if no animation is detected then this value will not be applied to the element.)\n * @param {object=} options an optional collection of options/styles that will be applied to the element.\n * The object can have the following properties:\n *\n * - **addClass** - `{string}` - space-separated CSS classes to add to element\n * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`\n * - **removeClass** - `{string}` - space-separated CSS classes to remove from element\n * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`\n *\n * @return {Runner} the animation runner\n */\n animate: function(element, from, to, className, options) {\n options = prepareAnimateOptions(options);\n options.from = options.from ? extend(options.from, from) : from;\n options.to = options.to ? extend(options.to, to) : to;\n\n className = className || 'ng-inline-animate';\n options.tempClasses = mergeClasses(options.tempClasses, className);\n return $$animateQueue.push(element, 'animate', options);\n }\n };\n }];\n}];\n\nvar $$AnimateAsyncRunFactoryProvider = /** @this */ function() {\n this.$get = ['$$rAF', function($$rAF) {\n var waitQueue = [];\n\n function waitForTick(fn) {\n waitQueue.push(fn);\n if (waitQueue.length > 1) return;\n $$rAF(function() {\n for (var i = 0; i < waitQueue.length; i++) {\n waitQueue[i]();\n }\n waitQueue = [];\n });\n }\n\n return function() {\n var passed = false;\n waitForTick(function() {\n passed = true;\n });\n return function(callback) {\n if (passed) {\n callback();\n } else {\n waitForTick(callback);\n }\n };\n };\n }];\n};\n\nvar $$AnimateRunnerFactoryProvider = /** @this */ function() {\n this.$get = ['$q', '$sniffer', '$$animateAsyncRun', '$$isDocumentHidden', '$timeout',\n function($q, $sniffer, $$animateAsyncRun, $$isDocumentHidden, $timeout) {\n\n var INITIAL_STATE = 0;\n var DONE_PENDING_STATE = 1;\n var DONE_COMPLETE_STATE = 2;\n\n AnimateRunner.chain = function(chain, callback) {\n var index = 0;\n\n next();\n function next() {\n if (index === chain.length) {\n callback(true);\n return;\n }\n\n chain[index](function(response) {\n if (response === false) {\n callback(false);\n return;\n }\n index++;\n next();\n });\n }\n };\n\n AnimateRunner.all = function(runners, callback) {\n var count = 0;\n var status = true;\n forEach(runners, function(runner) {\n runner.done(onProgress);\n });\n\n function onProgress(response) {\n status = status && response;\n if (++count === runners.length) {\n callback(status);\n }\n }\n };\n\n function AnimateRunner(host) {\n this.setHost(host);\n\n var rafTick = $$animateAsyncRun();\n var timeoutTick = function(fn) {\n $timeout(fn, 0, false);\n };\n\n this._doneCallbacks = [];\n this._tick = function(fn) {\n if ($$isDocumentHidden()) {\n timeoutTick(fn);\n } else {\n rafTick(fn);\n }\n };\n this._state = 0;\n }\n\n AnimateRunner.prototype = {\n setHost: function(host) {\n this.host = host || {};\n },\n\n done: function(fn) {\n if (this._state === DONE_COMPLETE_STATE) {\n fn();\n } else {\n this._doneCallbacks.push(fn);\n }\n },\n\n progress: noop,\n\n getPromise: function() {\n if (!this.promise) {\n var self = this;\n this.promise = $q(function(resolve, reject) {\n self.done(function(status) {\n if (status === false) {\n reject();\n } else {\n resolve();\n }\n });\n });\n }\n return this.promise;\n },\n\n then: function(resolveHandler, rejectHandler) {\n return this.getPromise().then(resolveHandler, rejectHandler);\n },\n\n 'catch': function(handler) {\n return this.getPromise()['catch'](handler);\n },\n\n 'finally': function(handler) {\n return this.getPromise()['finally'](handler);\n },\n\n pause: function() {\n if (this.host.pause) {\n this.host.pause();\n }\n },\n\n resume: function() {\n if (this.host.resume) {\n this.host.resume();\n }\n },\n\n end: function() {\n if (this.host.end) {\n this.host.end();\n }\n this._resolve(true);\n },\n\n cancel: function() {\n if (this.host.cancel) {\n this.host.cancel();\n }\n this._resolve(false);\n },\n\n complete: function(response) {\n var self = this;\n if (self._state === INITIAL_STATE) {\n self._state = DONE_PENDING_STATE;\n self._tick(function() {\n self._resolve(response);\n });\n }\n },\n\n _resolve: function(response) {\n if (this._state !== DONE_COMPLETE_STATE) {\n forEach(this._doneCallbacks, function(fn) {\n fn(response);\n });\n this._doneCallbacks.length = 0;\n this._state = DONE_COMPLETE_STATE;\n }\n }\n };\n\n return AnimateRunner;\n }];\n};\n\n/* exported $CoreAnimateCssProvider */\n\n/**\n * @ngdoc service\n * @name $animateCss\n * @kind object\n * @this\n *\n * @description\n * This is the core version of `$animateCss`. By default, only when the `ngAnimate` is included,\n * then the `$animateCss` service will actually perform animations.\n *\n * Click here {@link ngAnimate.$animateCss to read the documentation for $animateCss}.\n */\nvar $CoreAnimateCssProvider = function() {\n this.$get = ['$$rAF', '$q', '$$AnimateRunner', function($$rAF, $q, $$AnimateRunner) {\n\n return function(element, initialOptions) {\n // all of the animation functions should create\n // a copy of the options data, however, if a\n // parent service has already created a copy then\n // we should stick to using that\n var options = initialOptions || {};\n if (!options.$$prepared) {\n options = copy(options);\n }\n\n // there is no point in applying the styles since\n // there is no animation that goes on at all in\n // this version of $animateCss.\n if (options.cleanupStyles) {\n options.from = options.to = null;\n }\n\n if (options.from) {\n element.css(options.from);\n options.from = null;\n }\n\n var closed, runner = new $$AnimateRunner();\n return {\n start: run,\n end: run\n };\n\n function run() {\n $$rAF(function() {\n applyAnimationContents();\n if (!closed) {\n runner.complete();\n }\n closed = true;\n });\n return runner;\n }\n\n function applyAnimationContents() {\n if (options.addClass) {\n element.addClass(options.addClass);\n options.addClass = null;\n }\n if (options.removeClass) {\n element.removeClass(options.removeClass);\n options.removeClass = null;\n }\n if (options.to) {\n element.css(options.to);\n options.to = null;\n }\n }\n };\n }];\n};\n\n/* global stripHash: true */\n\n/**\n * ! This is a private undocumented service !\n *\n * @name $browser\n * @requires $log\n * @description\n * This object has two goals:\n *\n * - hide all the global state in the browser caused by the window object\n * - abstract away all the browser specific features and inconsistencies\n *\n * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`\n * service, which can be used for convenient testing of the application without the interaction with\n * the real browser apis.\n */\n/**\n * @param {object} window The global window object.\n * @param {object} document jQuery wrapped document.\n * @param {object} $log window.console or an object with the same interface.\n * @param {object} $sniffer $sniffer service\n */\nfunction Browser(window, document, $log, $sniffer) {\n var self = this,\n location = window.location,\n history = window.history,\n setTimeout = window.setTimeout,\n clearTimeout = window.clearTimeout,\n pendingDeferIds = {};\n\n self.isMock = false;\n\n var outstandingRequestCount = 0;\n var outstandingRequestCallbacks = [];\n\n // TODO(vojta): remove this temporary api\n self.$$completeOutstandingRequest = completeOutstandingRequest;\n self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };\n\n /**\n * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`\n * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.\n */\n function completeOutstandingRequest(fn) {\n try {\n fn.apply(null, sliceArgs(arguments, 1));\n } finally {\n outstandingRequestCount--;\n if (outstandingRequestCount === 0) {\n while (outstandingRequestCallbacks.length) {\n try {\n outstandingRequestCallbacks.pop()();\n } catch (e) {\n $log.error(e);\n }\n }\n }\n }\n }\n\n function getHash(url) {\n var index = url.indexOf('#');\n return index === -1 ? '' : url.substr(index);\n }\n\n /**\n * @private\n * TODO(vojta): prefix this method with $$ ?\n * @param {function()} callback Function that will be called when no outstanding request\n */\n self.notifyWhenNoOutstandingRequests = function(callback) {\n if (outstandingRequestCount === 0) {\n callback();\n } else {\n outstandingRequestCallbacks.push(callback);\n }\n };\n\n //////////////////////////////////////////////////////////////\n // URL API\n //////////////////////////////////////////////////////////////\n\n var cachedState, lastHistoryState,\n lastBrowserUrl = location.href,\n baseElement = document.find('base'),\n pendingLocation = null,\n getCurrentState = !$sniffer.history ? noop : function getCurrentState() {\n try {\n return history.state;\n } catch (e) {\n // MSIE can reportedly throw when there is no state (UNCONFIRMED).\n }\n };\n\n cacheState();\n\n /**\n * @name $browser#url\n *\n * @description\n * GETTER:\n * Without any argument, this method just returns current value of location.href.\n *\n * SETTER:\n * With at least one argument, this method sets url to new value.\n * If html5 history api supported, pushState/replaceState is used, otherwise\n * location.href/location.replace is used.\n * Returns its own instance to allow chaining\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to change url.\n *\n * @param {string} url New url (when used as setter)\n * @param {boolean=} replace Should new url replace current history record?\n * @param {object=} state object to use with pushState/replaceState\n */\n self.url = function(url, replace, state) {\n // In modern browsers `history.state` is `null` by default; treating it separately\n // from `undefined` would cause `$browser.url('/foo')` to change `history.state`\n // to undefined via `pushState`. Instead, let's change `undefined` to `null` here.\n if (isUndefined(state)) {\n state = null;\n }\n\n // Android Browser BFCache causes location, history reference to become stale.\n if (location !== window.location) location = window.location;\n if (history !== window.history) history = window.history;\n\n // setter\n if (url) {\n var sameState = lastHistoryState === state;\n\n // Don't change anything if previous and current URLs and states match. This also prevents\n // IE<10 from getting into redirect loop when in LocationHashbangInHtml5Url mode.\n // See https://github.com/angular/angular.js/commit/ffb2701\n if (lastBrowserUrl === url && (!$sniffer.history || sameState)) {\n return self;\n }\n var sameBase = lastBrowserUrl && stripHash(lastBrowserUrl) === stripHash(url);\n lastBrowserUrl = url;\n lastHistoryState = state;\n // Don't use history API if only the hash changed\n // due to a bug in IE10/IE11 which leads\n // to not firing a `hashchange` nor `popstate` event\n // in some cases (see #9143).\n if ($sniffer.history && (!sameBase || !sameState)) {\n history[replace ? 'replaceState' : 'pushState'](state, '', url);\n cacheState();\n } else {\n if (!sameBase) {\n pendingLocation = url;\n }\n if (replace) {\n location.replace(url);\n } else if (!sameBase) {\n location.href = url;\n } else {\n location.hash = getHash(url);\n }\n if (location.href !== url) {\n pendingLocation = url;\n }\n }\n if (pendingLocation) {\n pendingLocation = url;\n }\n return self;\n // getter\n } else {\n // - pendingLocation is needed as browsers don't allow to read out\n // the new location.href if a reload happened or if there is a bug like in iOS 9 (see\n // https://openradar.appspot.com/22186109).\n return pendingLocation || location.href;\n }\n };\n\n /**\n * @name $browser#state\n *\n * @description\n * This method is a getter.\n *\n * Return history.state or null if history.state is undefined.\n *\n * @returns {object} state\n */\n self.state = function() {\n return cachedState;\n };\n\n var urlChangeListeners = [],\n urlChangeInit = false;\n\n function cacheStateAndFireUrlChange() {\n pendingLocation = null;\n fireStateOrUrlChange();\n }\n\n // This variable should be used *only* inside the cacheState function.\n var lastCachedState = null;\n function cacheState() {\n // This should be the only place in $browser where `history.state` is read.\n cachedState = getCurrentState();\n cachedState = isUndefined(cachedState) ? null : cachedState;\n\n // Prevent callbacks fo fire twice if both hashchange & popstate were fired.\n if (equals(cachedState, lastCachedState)) {\n cachedState = lastCachedState;\n }\n\n lastCachedState = cachedState;\n lastHistoryState = cachedState;\n }\n\n function fireStateOrUrlChange() {\n var prevLastHistoryState = lastHistoryState;\n cacheState();\n\n if (lastBrowserUrl === self.url() && prevLastHistoryState === cachedState) {\n return;\n }\n\n lastBrowserUrl = self.url();\n lastHistoryState = cachedState;\n forEach(urlChangeListeners, function(listener) {\n listener(self.url(), cachedState);\n });\n }\n\n /**\n * @name $browser#onUrlChange\n *\n * @description\n * Register callback function that will be called, when url changes.\n *\n * It's only called when the url is changed from outside of AngularJS:\n * - user types different url into address bar\n * - user clicks on history (forward/back) button\n * - user clicks on a link\n *\n * It's not called when url is changed by $browser.url() method\n *\n * The listener gets called with new url as parameter.\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to monitor url changes in AngularJS apps.\n *\n * @param {function(string)} listener Listener function to be called when url changes.\n * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.\n */\n self.onUrlChange = function(callback) {\n // TODO(vojta): refactor to use node's syntax for events\n if (!urlChangeInit) {\n // We listen on both (hashchange/popstate) when available, as some browsers don't\n // fire popstate when user changes the address bar and don't fire hashchange when url\n // changed by push/replaceState\n\n // html5 history api - popstate event\n if ($sniffer.history) jqLite(window).on('popstate', cacheStateAndFireUrlChange);\n // hashchange event\n jqLite(window).on('hashchange', cacheStateAndFireUrlChange);\n\n urlChangeInit = true;\n }\n\n urlChangeListeners.push(callback);\n return callback;\n };\n\n /**\n * @private\n * Remove popstate and hashchange handler from window.\n *\n * NOTE: this api is intended for use only by $rootScope.\n */\n self.$$applicationDestroyed = function() {\n jqLite(window).off('hashchange popstate', cacheStateAndFireUrlChange);\n };\n\n /**\n * Checks whether the url has changed outside of AngularJS.\n * Needs to be exported to be able to check for changes that have been done in sync,\n * as hashchange/popstate events fire in async.\n */\n self.$$checkUrlChange = fireStateOrUrlChange;\n\n //////////////////////////////////////////////////////////////\n // Misc API\n //////////////////////////////////////////////////////////////\n\n /**\n * @name $browser#baseHref\n *\n * @description\n * Returns current \n * (always relative - without domain)\n *\n * @returns {string} The current base href\n */\n self.baseHref = function() {\n var href = baseElement.attr('href');\n return href ? href.replace(/^(https?:)?\\/\\/[^/]*/, '') : '';\n };\n\n /**\n * @name $browser#defer\n * @param {function()} fn A function, who's execution should be deferred.\n * @param {number=} [delay=0] of milliseconds to defer the function execution.\n * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.\n *\n * @description\n * Executes a fn asynchronously via `setTimeout(fn, delay)`.\n *\n * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using\n * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed\n * via `$browser.defer.flush()`.\n *\n */\n self.defer = function(fn, delay) {\n var timeoutId;\n outstandingRequestCount++;\n timeoutId = setTimeout(function() {\n delete pendingDeferIds[timeoutId];\n completeOutstandingRequest(fn);\n }, delay || 0);\n pendingDeferIds[timeoutId] = true;\n return timeoutId;\n };\n\n\n /**\n * @name $browser#defer.cancel\n *\n * @description\n * Cancels a deferred task identified with `deferId`.\n *\n * @param {*} deferId Token returned by the `$browser.defer` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n self.defer.cancel = function(deferId) {\n if (pendingDeferIds[deferId]) {\n delete pendingDeferIds[deferId];\n clearTimeout(deferId);\n completeOutstandingRequest(noop);\n return true;\n }\n return false;\n };\n\n}\n\n/** @this */\nfunction $BrowserProvider() {\n this.$get = ['$window', '$log', '$sniffer', '$document',\n function($window, $log, $sniffer, $document) {\n return new Browser($window, $document, $log, $sniffer);\n }];\n}\n\n/**\n * @ngdoc service\n * @name $cacheFactory\n * @this\n *\n * @description\n * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to\n * them.\n *\n * ```js\n *\n * var cache = $cacheFactory('cacheId');\n * expect($cacheFactory.get('cacheId')).toBe(cache);\n * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();\n *\n * cache.put(\"key\", \"value\");\n * cache.put(\"another key\", \"another value\");\n *\n * // We've specified no options on creation\n * expect(cache.info()).toEqual({id: 'cacheId', size: 2});\n *\n * ```\n *\n *\n * @param {string} cacheId Name or id of the newly created cache.\n * @param {object=} options Options object that specifies the cache behavior. Properties:\n *\n * - `{number=}` `capacity` — turns the cache into LRU cache.\n *\n * @returns {object} Newly created cache object with the following set of methods:\n *\n * - `{object}` `info()` — Returns id, size, and options of cache.\n * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns\n * it.\n * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.\n * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.\n * - `{void}` `removeAll()` — Removes all cached values.\n * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.\n *\n * @example\n \n \n
\n \n \n \n\n

Cached Values

\n
\n \n : \n \n
\n\n

Cache Info

\n
\n \n : \n \n
\n
\n
\n \n angular.module('cacheExampleApp', []).\n controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {\n $scope.keys = [];\n $scope.cache = $cacheFactory('cacheId');\n $scope.put = function(key, value) {\n if (angular.isUndefined($scope.cache.get(key))) {\n $scope.keys.push(key);\n }\n $scope.cache.put(key, angular.isUndefined(value) ? null : value);\n };\n }]);\n \n \n p {\n margin: 10px 0 3px;\n }\n \n
\n */\nfunction $CacheFactoryProvider() {\n\n this.$get = function() {\n var caches = {};\n\n function cacheFactory(cacheId, options) {\n if (cacheId in caches) {\n throw minErr('$cacheFactory')('iid', 'CacheId \\'{0}\\' is already taken!', cacheId);\n }\n\n var size = 0,\n stats = extend({}, options, {id: cacheId}),\n data = createMap(),\n capacity = (options && options.capacity) || Number.MAX_VALUE,\n lruHash = createMap(),\n freshEnd = null,\n staleEnd = null;\n\n /**\n * @ngdoc type\n * @name $cacheFactory.Cache\n *\n * @description\n * A cache object used to store and retrieve data, primarily used by\n * {@link $templateRequest $templateRequest} and the {@link ng.directive:script script}\n * directive to cache templates and other data.\n *\n * ```js\n * angular.module('superCache')\n * .factory('superCache', ['$cacheFactory', function($cacheFactory) {\n * return $cacheFactory('super-cache');\n * }]);\n * ```\n *\n * Example test:\n *\n * ```js\n * it('should behave like a cache', inject(function(superCache) {\n * superCache.put('key', 'value');\n * superCache.put('another key', 'another value');\n *\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 2\n * });\n *\n * superCache.remove('another key');\n * expect(superCache.get('another key')).toBeUndefined();\n *\n * superCache.removeAll();\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 0\n * });\n * }));\n * ```\n */\n return (caches[cacheId] = {\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#put\n * @kind function\n *\n * @description\n * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be\n * retrieved later, and incrementing the size of the cache if the key was not already\n * present in the cache. If behaving like an LRU cache, it will also remove stale\n * entries from the set.\n *\n * It will not insert undefined values into the cache.\n *\n * @param {string} key the key under which the cached data is stored.\n * @param {*} value the value to store alongside the key. If it is undefined, the key\n * will not be stored.\n * @returns {*} the value stored.\n */\n put: function(key, value) {\n if (isUndefined(value)) return;\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key] || (lruHash[key] = {key: key});\n\n refresh(lruEntry);\n }\n\n if (!(key in data)) size++;\n data[key] = value;\n\n if (size > capacity) {\n this.remove(staleEnd.key);\n }\n\n return value;\n },\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#get\n * @kind function\n *\n * @description\n * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the data to be retrieved\n * @returns {*} the value stored.\n */\n get: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n refresh(lruEntry);\n }\n\n return data[key];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#remove\n * @kind function\n *\n * @description\n * Removes an entry from the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the entry to be removed\n */\n remove: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n if (lruEntry === freshEnd) freshEnd = lruEntry.p;\n if (lruEntry === staleEnd) staleEnd = lruEntry.n;\n link(lruEntry.n,lruEntry.p);\n\n delete lruHash[key];\n }\n\n if (!(key in data)) return;\n\n delete data[key];\n size--;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#removeAll\n * @kind function\n *\n * @description\n * Clears the cache object of any entries.\n */\n removeAll: function() {\n data = createMap();\n size = 0;\n lruHash = createMap();\n freshEnd = staleEnd = null;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#destroy\n * @kind function\n *\n * @description\n * Destroys the {@link $cacheFactory.Cache Cache} object entirely,\n * removing it from the {@link $cacheFactory $cacheFactory} set.\n */\n destroy: function() {\n data = null;\n stats = null;\n lruHash = null;\n delete caches[cacheId];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#info\n * @kind function\n *\n * @description\n * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.\n *\n * @returns {object} an object with the following properties:\n *
    \n *
  • **id**: the id of the cache instance
  • \n *
  • **size**: the number of entries kept in the cache instance
  • \n *
  • **...**: any additional properties from the options object when creating the\n * cache.
  • \n *
\n */\n info: function() {\n return extend({}, stats, {size: size});\n }\n });\n\n\n /**\n * makes the `entry` the freshEnd of the LRU linked list\n */\n function refresh(entry) {\n if (entry !== freshEnd) {\n if (!staleEnd) {\n staleEnd = entry;\n } else if (staleEnd === entry) {\n staleEnd = entry.n;\n }\n\n link(entry.n, entry.p);\n link(entry, freshEnd);\n freshEnd = entry;\n freshEnd.n = null;\n }\n }\n\n\n /**\n * bidirectionally links two entries of the LRU linked list\n */\n function link(nextEntry, prevEntry) {\n if (nextEntry !== prevEntry) {\n if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify\n if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#info\n *\n * @description\n * Get information about all the caches that have been created\n *\n * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`\n */\n cacheFactory.info = function() {\n var info = {};\n forEach(caches, function(cache, cacheId) {\n info[cacheId] = cache.info();\n });\n return info;\n };\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#get\n *\n * @description\n * Get access to a cache object by the `cacheId` used when it was created.\n *\n * @param {string} cacheId Name or id of a cache to access.\n * @returns {object} Cache object identified by the cacheId or undefined if no such cache.\n */\n cacheFactory.get = function(cacheId) {\n return caches[cacheId];\n };\n\n\n return cacheFactory;\n };\n}\n\n/**\n * @ngdoc service\n * @name $templateCache\n * @this\n *\n * @description\n * `$templateCache` is a {@link $cacheFactory.Cache Cache object} created by the\n * {@link ng.$cacheFactory $cacheFactory}.\n *\n * The first time a template is used, it is loaded in the template cache for quick retrieval. You\n * can load templates directly into the cache in a `script` tag, by using {@link $templateRequest},\n * or by consuming the `$templateCache` service directly.\n *\n * Adding via the `script` tag:\n *\n * ```html\n * \n * ```\n *\n * **Note:** the `script` tag containing the template does not need to be included in the `head` of\n * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (e.g.\n * element with {@link ngApp} attribute), otherwise the template will be ignored.\n *\n * Adding via the `$templateCache` service:\n *\n * ```js\n * var myApp = angular.module('myApp', []);\n * myApp.run(function($templateCache) {\n * $templateCache.put('templateId.html', 'This is the content of the template');\n * });\n * ```\n *\n * To retrieve the template later, simply use it in your component:\n * ```js\n * myApp.component('myComponent', {\n * templateUrl: 'templateId.html'\n * });\n * ```\n *\n * or get it via the `$templateCache` service:\n * ```js\n * $templateCache.get('templateId.html')\n * ```\n *\n */\nfunction $TemplateCacheProvider() {\n this.$get = ['$cacheFactory', function($cacheFactory) {\n return $cacheFactory('templates');\n }];\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables like document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!\n *\n * DOM-related variables:\n *\n * - \"node\" - DOM Node\n * - \"element\" - DOM Element or Node\n * - \"$node\" or \"$element\" - jqLite-wrapped node or element\n *\n *\n * Compiler related stuff:\n *\n * - \"linkFn\" - linking fn of a single directive\n * - \"nodeLinkFn\" - function that aggregates all linking fns for a particular node\n * - \"childLinkFn\" - function that aggregates all linking fns for child nodes of a particular node\n * - \"compositeLinkFn\" - function that aggregates all linking fns for a compilation root (nodeList)\n */\n\n\n/**\n * @ngdoc service\n * @name $compile\n * @kind function\n *\n * @description\n * Compiles an HTML string or DOM into a template and produces a template function, which\n * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.\n *\n * The compilation is a process of walking the DOM tree and matching DOM elements to\n * {@link ng.$compileProvider#directive directives}.\n *\n *
\n * **Note:** This document is an in-depth reference of all directive options.\n * For a gentle introduction to directives with examples of common use cases,\n * see the {@link guide/directive directive guide}.\n *
\n *\n * ## Comprehensive Directive API\n *\n * There are many different options for a directive.\n *\n * The difference resides in the return value of the factory function.\n * You can either return a {@link $compile#directive-definition-object Directive Definition Object (see below)}\n * that defines the directive properties, or just the `postLink` function (all other properties will have\n * the default values).\n *\n *
\n * **Best Practice:** It's recommended to use the \"directive definition object\" form.\n *
\n *\n * Here's an example directive declared with a Directive Definition Object:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * {@link $compile#-priority- priority}: 0,\n * {@link $compile#-template- template}: '
', // or // function(tElement, tAttrs) { ... },\n * // or\n * // {@link $compile#-templateurl- templateUrl}: 'directive.html', // or // function(tElement, tAttrs) { ... },\n * {@link $compile#-transclude- transclude}: false,\n * {@link $compile#-restrict- restrict}: 'A',\n * {@link $compile#-templatenamespace- templateNamespace}: 'html',\n * {@link $compile#-scope- scope}: false,\n * {@link $compile#-controller- controller}: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },\n * {@link $compile#-controlleras- controllerAs}: 'stringIdentifier',\n * {@link $compile#-bindtocontroller- bindToController}: false,\n * {@link $compile#-require- require}: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],\n * {@link $compile#-multielement- multiElement}: false,\n * {@link $compile#-compile- compile}: function compile(tElement, tAttrs, transclude) {\n * return {\n * {@link $compile#pre-linking-function pre}: function preLink(scope, iElement, iAttrs, controller) { ... },\n * {@link $compile#post-linking-function post}: function postLink(scope, iElement, iAttrs, controller) { ... }\n * }\n * // or\n * // return function postLink( ... ) { ... }\n * },\n * // or\n * // {@link $compile#-link- link}: {\n * // {@link $compile#pre-linking-function pre}: function preLink(scope, iElement, iAttrs, controller) { ... },\n * // {@link $compile#post-linking-function post}: function postLink(scope, iElement, iAttrs, controller) { ... }\n * // }\n * // or\n * // {@link $compile#-link- link}: function postLink( ... ) { ... }\n * };\n * return directiveDefinitionObject;\n * });\n * ```\n *\n *
\n * **Note:** Any unspecified options will use the default value. You can see the default values below.\n *
\n *\n * Therefore the above can be simplified as:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * link: function postLink(scope, iElement, iAttrs) { ... }\n * };\n * return directiveDefinitionObject;\n * // or\n * // return function postLink(scope, iElement, iAttrs) { ... }\n * });\n * ```\n *\n * ### Life-cycle hooks\n * Directive controllers can provide the following methods that are called by AngularJS at points in the life-cycle of the\n * directive:\n * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and\n * had their bindings initialized (and before the pre & post linking functions for the directives on\n * this element). This is a good place to put initialization code for your controller.\n * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The\n * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an\n * object of the form `{ currentValue, previousValue, isFirstChange() }`. Use this hook to trigger updates within a\n * component such as cloning the bound value to prevent accidental mutation of the outer value. Note that this will\n * also be called when your bindings are initialized.\n * * `$doCheck()` - Called on each turn of the digest cycle. Provides an opportunity to detect and act on\n * changes. Any actions that you wish to take in response to the changes that you detect must be\n * invoked from this hook; implementing this has no effect on when `$onChanges` is called. For example, this hook\n * could be useful if you wish to perform a deep equality check, or to check a Date object, changes to which would not\n * be detected by AngularJS's change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments;\n * if detecting changes, you must store the previous value(s) for comparison to the current values.\n * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing\n * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in\n * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent\n * components will have their `$onDestroy()` hook called before child components.\n * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link\n * function this hook can be used to set up DOM event handlers and do direct DOM manipulation.\n * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since\n * they are waiting for their template to load asynchronously and their own compilation and linking has been\n * suspended until that occurs.\n *\n * #### Comparison with life-cycle hooks in the new Angular\n * The new Angular also uses life-cycle hooks for its components. While the AngularJS life-cycle hooks are similar there are\n * some differences that you should be aware of, especially when it comes to moving your code from AngularJS to Angular:\n *\n * * AngularJS hooks are prefixed with `$`, such as `$onInit`. Angular hooks are prefixed with `ng`, such as `ngOnInit`.\n * * AngularJS hooks can be defined on the controller prototype or added to the controller inside its constructor.\n * In Angular you can only define hooks on the prototype of the Component class.\n * * Due to the differences in change-detection, you may get many more calls to `$doCheck` in AngularJS than you would to\n * `ngDoCheck` in Angular.\n * * Changes to the model inside `$doCheck` will trigger new turns of the digest loop, which will cause the changes to be\n * propagated throughout the application.\n * Angular does not allow the `ngDoCheck` hook to trigger a change outside of the component. It will either throw an\n * error or do nothing depending upon the state of `enableProdMode()`.\n *\n * #### Life-cycle hook examples\n *\n * This example shows how you can check for mutations to a Date object even though the identity of the object\n * has not changed.\n *\n * \n * \n * angular.module('do-check-module', [])\n * .component('app', {\n * template:\n * 'Month: ' +\n * 'Date: {{ $ctrl.date }}' +\n * '',\n * controller: function() {\n * this.date = new Date();\n * this.month = this.date.getMonth();\n * this.updateDate = function() {\n * this.date.setMonth(this.month);\n * };\n * }\n * })\n * .component('test', {\n * bindings: { date: '<' },\n * template:\n * '
{{ $ctrl.log | json }}
',\n * controller: function() {\n * var previousValue;\n * this.log = [];\n * this.$doCheck = function() {\n * var currentValue = this.date && this.date.valueOf();\n * if (previousValue !== currentValue) {\n * this.log.push('doCheck: date mutated: ' + this.date);\n * previousValue = currentValue;\n * }\n * };\n * }\n * });\n *
\n * \n * \n * \n *
\n *\n * This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the\n * actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large\n * arrays or objects can have a negative impact on your application performance)\n *\n * \n * \n *
\n * \n * \n *
{{ items }}
\n * \n *
\n *
\n * \n * angular.module('do-check-module', [])\n * .component('test', {\n * bindings: { items: '<' },\n * template:\n * '
{{ $ctrl.log | json }}
',\n * controller: function() {\n * this.log = [];\n *\n * this.$doCheck = function() {\n * if (this.items_ref !== this.items) {\n * this.log.push('doCheck: items changed');\n * this.items_ref = this.items;\n * }\n * if (!angular.equals(this.items_clone, this.items)) {\n * this.log.push('doCheck: items mutated');\n * this.items_clone = angular.copy(this.items);\n * }\n * };\n * }\n * });\n *
\n *
\n *\n *\n * ### Directive Definition Object\n *\n * The directive definition object provides instructions to the {@link ng.$compile\n * compiler}. The attributes are:\n *\n * #### `multiElement`\n * When this property is set to true (default is `false`), the HTML compiler will collect DOM nodes between\n * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them\n * together as the directive elements. It is recommended that this feature be used on directives\n * which are not strictly behavioral (such as {@link ngClick}), and which\n * do not manipulate or replace child nodes (such as {@link ngInclude}).\n *\n * #### `priority`\n * When there are multiple directives defined on a single DOM element, sometimes it\n * is necessary to specify the order in which the directives are applied. The `priority` is used\n * to sort the directives before their `compile` functions get called. Priority is defined as a\n * number. Directives with greater numerical `priority` are compiled first. Pre-link functions\n * are also run in priority order, but post-link functions are run in reverse order. The order\n * of directives with the same priority is undefined. The default priority is `0`.\n *\n * #### `terminal`\n * If set to true then the current `priority` will be the last set of directives\n * which will execute (any directives at the current priority will still execute\n * as the order of execution on same `priority` is undefined). Note that expressions\n * and other directives used in the directive's template will also be excluded from execution.\n *\n * #### `scope`\n * The scope property can be `false`, `true`, or an object:\n *\n * * **`false` (default):** No scope will be created for the directive. The directive will use its\n * parent's scope.\n *\n * * **`true`:** A new child scope that prototypically inherits from its parent will be created for\n * the directive's element. If multiple directives on the same element request a new scope,\n * only one new scope is created.\n *\n * * **`{...}` (an object hash):** A new \"isolate\" scope is created for the directive's template.\n * The 'isolate' scope differs from normal scope in that it does not prototypically\n * inherit from its parent scope. This is useful when creating reusable components, which should not\n * accidentally read or modify data in the parent scope. Note that an isolate scope\n * directive without a `template` or `templateUrl` will not apply the isolate scope\n * to its children elements.\n *\n * The 'isolate' scope object hash defines a set of local scope properties derived from attributes on the\n * directive's element. These local properties are useful for aliasing values for templates. The keys in\n * the object hash map to the name of the property on the isolate scope; the values define how the property\n * is bound to the parent scope, via matching attributes on the directive's element:\n *\n * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is\n * always a string since DOM attributes are strings. If no `attr` name is specified then the\n * attribute name is assumed to be the same as the local name. Given `` and the isolate scope definition `scope: { localName:'@myAttr' }`,\n * the directive's scope property `localName` will reflect the interpolated value of `hello\n * {{name}}`. As the `name` attribute changes so will the `localName` property on the directive's\n * scope. The `name` is read from the parent scope (not the directive's scope).\n *\n * * `=` or `=attr` - set up a bidirectional binding between a local scope property and an expression\n * passed via the attribute `attr`. The expression is evaluated in the context of the parent scope.\n * If no `attr` name is specified then the attribute name is assumed to be the same as the local\n * name. Given `` and the isolate scope definition `scope: {\n * localModel: '=myAttr' }`, the property `localModel` on the directive's scope will reflect the\n * value of `parentModel` on the parent scope. Changes to `parentModel` will be reflected in\n * `localModel` and vice versa. If the binding expression is non-assignable, or if the attribute\n * isn't optional and doesn't exist, an exception\n * ({@link error/$compile/nonassign `$compile:nonassign`}) will be thrown upon discovering changes\n * to the local value, since it will be impossible to sync them back to the parent scope.\n *\n * By default, the {@link ng.$rootScope.Scope#$watch `$watch`}\n * method is used for tracking changes, and the equality check is based on object identity.\n * However, if an object literal or an array literal is passed as the binding expression, the\n * equality check is done by value (using the {@link angular.equals} function). It's also possible\n * to watch the evaluated value shallowly with {@link ng.$rootScope.Scope#$watchCollection\n * `$watchCollection`}: use `=*` or `=*attr`\n *\n * * `<` or `` and directive definition of\n * `scope: { localModel:'` and the isolate scope definition `scope: {\n * localFn:'&myAttr' }`, the isolate scope property `localFn` will point to a function wrapper for\n * the `count = count + value` expression. Often it's desirable to pass data from the isolated scope\n * via an expression to the parent scope. This can be done by passing a map of local variable names\n * and values into the expression wrapper fn. For example, if the expression is `increment(amount)`\n * then we can specify the amount value by calling the `localFn` as `localFn({amount: 22})`.\n *\n * All 4 kinds of bindings (`@`, `=`, `<`, and `&`) can be made optional by adding `?` to the expression.\n * The marker must come after the mode and before the attribute name.\n * See the {@link error/$compile/iscp Invalid Isolate Scope Definition error} for definition examples.\n * This is useful to refine the interface directives provide.\n * One subtle difference between optional and non-optional happens **when the binding attribute is not\n * set**:\n * - the binding is optional: the property will not be defined\n * - the binding is not optional: the property is defined\n *\n * ```js\n *app.directive('testDir', function() {\n return {\n scope: {\n notoptional: '=',\n optional: '=?',\n },\n bindToController: true,\n controller: function() {\n this.$onInit = function() {\n console.log(this.hasOwnProperty('notoptional')) // true\n console.log(this.hasOwnProperty('optional')) // false\n }\n }\n }\n })\n *```\n *\n *\n * ##### Combining directives with different scope defintions\n *\n * In general it's possible to apply more than one directive to one element, but there might be limitations\n * depending on the type of scope required by the directives. The following points will help explain these limitations.\n * For simplicity only two directives are taken into account, but it is also applicable for several directives:\n *\n * * **no scope** + **no scope** => Two directives which don't require their own scope will use their parent's scope\n * * **child scope** + **no scope** => Both directives will share one single child scope\n * * **child scope** + **child scope** => Both directives will share one single child scope\n * * **isolated scope** + **no scope** => The isolated directive will use it's own created isolated scope. The other directive will use\n * its parent's scope\n * * **isolated scope** + **child scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives cannot\n * be applied to the same element.\n * * **isolated scope** + **isolated scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives\n * cannot be applied to the same element.\n *\n *\n * #### `bindToController`\n * This property is used to bind scope properties directly to the controller. It can be either\n * `true` or an object hash with the same format as the `scope` property.\n *\n * When an isolate scope is used for a directive (see above), `bindToController: true` will\n * allow a component to have its properties bound to the controller, rather than to scope.\n *\n * After the controller is instantiated, the initial values of the isolate scope bindings will be bound to the controller\n * properties. You can access these bindings once they have been initialized by providing a controller method called\n * `$onInit`, which is called after all the controllers on an element have been constructed and had their bindings\n * initialized.\n *\n * It is also possible to set `bindToController` to an object hash with the same format as the `scope` property.\n * This will set up the scope bindings to the controller directly. Note that `scope` can still be used\n * to define which kind of scope is created. By default, no scope is created. Use `scope: {}` to create an isolate\n * scope (useful for component directives).\n *\n * If both `bindToController` and `scope` are defined and have object hashes, `bindToController` overrides `scope`.\n *\n *\n * #### `controller`\n * Controller constructor function. The controller is instantiated before the\n * pre-linking phase and can be accessed by other directives (see\n * `require` attribute). This allows the directives to communicate with each other and augment\n * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:\n *\n * * `$scope` - Current scope associated with the element\n * * `$element` - Current element\n * * `$attrs` - Current attributes object for the element\n * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope:\n * `function([scope], cloneLinkingFn, futureParentElement, slotName)`:\n * * `scope`: (optional) override the scope.\n * * `cloneLinkingFn`: (optional) argument to create clones of the original transcluded content.\n * * `futureParentElement` (optional):\n * * defines the parent to which the `cloneLinkingFn` will add the cloned elements.\n * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`.\n * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements)\n * and when the `cloneLinkingFn` is passed,\n * as those elements need to created and cloned in a special way when they are defined outside their\n * usual containers (e.g. like ``).\n * * See also the `directive.templateNamespace` property.\n * * `slotName`: (optional) the name of the slot to transclude. If falsy (e.g. `null`, `undefined` or `''`)\n * then the default transclusion is provided.\n * The `$transclude` function also has a method on it, `$transclude.isSlotFilled(slotName)`, which returns\n * `true` if the specified slot contains content (i.e. one or more DOM nodes).\n *\n * #### `require`\n * Require another directive and inject its controller as the fourth argument to the linking function. The\n * `require` property can be a string, an array or an object:\n * * a **string** containing the name of the directive to pass to the linking function\n * * an **array** containing the names of directives to pass to the linking function. The argument passed to the\n * linking function will be an array of controllers in the same order as the names in the `require` property\n * * an **object** whose property values are the names of the directives to pass to the linking function. The argument\n * passed to the linking function will also be an object with matching keys, whose values will hold the corresponding\n * controllers.\n *\n * If the `require` property is an object and `bindToController` is truthy, then the required controllers are\n * bound to the controller using the keys of the `require` property. This binding occurs after all the controllers\n * have been constructed but before `$onInit` is called.\n * If the name of the required controller is the same as the local name (the key), the name can be\n * omitted. For example, `{parentDir: '^^'}` is equivalent to `{parentDir: '^^parentDir'}`.\n * See the {@link $compileProvider#component} helper for an example of how this can be used.\n * If no such required directive(s) can be found, or if the directive does not have a controller, then an error is\n * raised (unless no link function is specified and the required controllers are not being bound to the directive\n * controller, in which case error checking is skipped). The name can be prefixed with:\n *\n * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.\n * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.\n * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.\n * * `^^` - Locate the required controller by searching the element's parents. Throw an error if not found.\n * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass\n * `null` to the `link` fn if not found.\n * * `?^^` - Attempt to locate the required controller by searching the element's parents, or pass\n * `null` to the `link` fn if not found.\n *\n *\n * #### `controllerAs`\n * Identifier name for a reference to the controller in the directive's scope.\n * This allows the controller to be referenced from the directive template. This is especially\n * useful when a directive is used as component, i.e. with an `isolate` scope. It's also possible\n * to use it in a directive without an `isolate` / `new` scope, but you need to be aware that the\n * `controllerAs` reference might overwrite a property that already exists on the parent scope.\n *\n *\n * #### `restrict`\n * String of subset of `EACM` which restricts the directive to a specific directive\n * declaration style. If omitted, the defaults (elements and attributes) are used.\n *\n * * `E` - Element name (default): ``\n * * `A` - Attribute (default): `
`\n * * `C` - Class: `
`\n * * `M` - Comment: ``\n *\n *\n * #### `templateNamespace`\n * String representing the document type used by the markup in the template.\n * AngularJS needs this information as those elements need to be created and cloned\n * in a special way when they are defined outside their usual containers like `` and ``.\n *\n * * `html` - All root nodes in the template are HTML. Root nodes may also be\n * top-level elements such as `` or ``.\n * * `svg` - The root nodes in the template are SVG elements (excluding ``).\n * * `math` - The root nodes in the template are MathML elements (excluding ``).\n *\n * If no `templateNamespace` is specified, then the namespace is considered to be `html`.\n *\n * #### `template`\n * HTML markup that may:\n * * Replace the contents of the directive's element (default).\n * * Replace the directive's element itself (if `replace` is true - DEPRECATED).\n * * Wrap the contents of the directive's element (if `transclude` is true).\n *\n * Value may be:\n *\n * * A string. For example `
{{delete_str}}
`.\n * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`\n * function api below) and returns a string value.\n *\n *\n * #### `templateUrl`\n * This is similar to `template` but the template is loaded from the specified URL, asynchronously.\n *\n * Because template loading is asynchronous the compiler will suspend compilation of directives on that element\n * for later when the template has been resolved. In the meantime it will continue to compile and link\n * sibling and parent elements as though this element had not contained any directives.\n *\n * The compiler does not suspend the entire compilation to wait for templates to be loaded because this\n * would result in the whole app \"stalling\" until all templates are loaded asynchronously - even in the\n * case when only one deeply nested directive has `templateUrl`.\n *\n * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}\n *\n * You can specify `templateUrl` as a string representing the URL or as a function which takes two\n * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns\n * a string value representing the url. In either case, the template URL is passed through {@link\n * $sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.\n *\n *\n * #### `replace`\n *
\n * **Note:** `replace` is deprecated in AngularJS and has been removed in the new Angular (v2+).\n *
\n *\n * Specifies what the template should replace. Defaults to `false`.\n *\n * * `true` - the template will replace the directive's element.\n * * `false` - the template will replace the contents of the directive's element.\n *\n * The replacement process migrates all of the attributes / classes from the old element to the new\n * one. See the {@link guide/directive#template-expanding-directive\n * Directives Guide} for an example.\n *\n * There are very few scenarios where element replacement is required for the application function,\n * the main one being reusable custom components that are used within SVG contexts\n * (because SVG doesn't work with custom elements in the DOM tree).\n *\n * #### `transclude`\n * Extract the contents of the element where the directive appears and make it available to the directive.\n * The contents are compiled and provided to the directive as a **transclusion function**. See the\n * {@link $compile#transclusion Transclusion} section below.\n *\n *\n * #### `compile`\n *\n * ```js\n * function compile(tElement, tAttrs, transclude) { ... }\n * ```\n *\n * The compile function deals with transforming the template DOM. Since most directives do not do\n * template transformation, it is not used often. The compile function takes the following arguments:\n *\n * * `tElement` - template element - The element where the directive has been declared. It is\n * safe to do template transformation on the element and child elements only.\n *\n * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared\n * between all directive compile functions.\n *\n * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`\n *\n *
\n * **Note:** The template instance and the link instance may be different objects if the template has\n * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that\n * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration\n * should be done in a linking function rather than in a compile function.\n *
\n\n *
\n * **Note:** The compile function cannot handle directives that recursively use themselves in their\n * own templates or compile functions. Compiling these directives results in an infinite loop and\n * stack overflow errors.\n *\n * This can be avoided by manually using $compile in the postLink function to imperatively compile\n * a directive's template instead of relying on automatic template compilation via `template` or\n * `templateUrl` declaration or manual compilation inside the compile function.\n *
\n *\n *
\n * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it\n * e.g. does not know about the right outer scope. Please use the transclude function that is passed\n * to the link function instead.\n *
\n\n * A compile function can have a return value which can be either a function or an object.\n *\n * * returning a (post-link) function - is equivalent to registering the linking function via the\n * `link` property of the config object when the compile function is empty.\n *\n * * returning an object with function(s) registered via `pre` and `post` properties - allows you to\n * control when a linking function should be called during the linking phase. See info about\n * pre-linking and post-linking functions below.\n *\n *\n * #### `link`\n * This property is used only if the `compile` property is not defined.\n *\n * ```js\n * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }\n * ```\n *\n * The link function is responsible for registering DOM listeners as well as updating the DOM. It is\n * executed after the template has been cloned. This is where most of the directive logic will be\n * put.\n *\n * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the\n * directive for registering {@link ng.$rootScope.Scope#$watch watches}.\n *\n * * `iElement` - instance element - The element where the directive is to be used. It is safe to\n * manipulate the children of the element only in `postLink` function since the children have\n * already been linked.\n *\n * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared\n * between all directive linking functions.\n *\n * * `controller` - the directive's required controller instance(s) - Instances are shared\n * among all directives, which allows the directives to use the controllers as a communication\n * channel. The exact value depends on the directive's `require` property:\n * * no controller(s) required: the directive's own controller, or `undefined` if it doesn't have one\n * * `string`: the controller instance\n * * `array`: array of controller instances\n *\n * If a required controller cannot be found, and it is optional, the instance is `null`,\n * otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown.\n *\n * Note that you can also require the directive's own controller - it will be made available like\n * any other controller.\n *\n * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.\n * This is the same as the `$transclude` parameter of directive controllers,\n * see {@link ng.$compile#-controller- the controller section for details}.\n * `function([scope], cloneLinkingFn, futureParentElement)`.\n *\n * #### Pre-linking function\n *\n * Executed before the child elements are linked. Not safe to do DOM transformation since the\n * compiler linking function will fail to locate the correct elements for linking.\n *\n * #### Post-linking function\n *\n * Executed after the child elements are linked.\n *\n * Note that child elements that contain `templateUrl` directives will not have been compiled\n * and linked since they are waiting for their template to load asynchronously and their own\n * compilation and linking has been suspended until that occurs.\n *\n * It is safe to do DOM transformation in the post-linking function on elements that are not waiting\n * for their async templates to be resolved.\n *\n *\n * ### Transclusion\n *\n * Transclusion is the process of extracting a collection of DOM elements from one part of the DOM and\n * copying them to another part of the DOM, while maintaining their connection to the original AngularJS\n * scope from where they were taken.\n *\n * Transclusion is used (often with {@link ngTransclude}) to insert the\n * original contents of a directive's element into a specified place in the template of the directive.\n * The benefit of transclusion, over simply moving the DOM elements manually, is that the transcluded\n * content has access to the properties on the scope from which it was taken, even if the directive\n * has isolated scope.\n * See the {@link guide/directive#creating-a-directive-that-wraps-other-elements Directives Guide}.\n *\n * This makes it possible for the widget to have private state for its template, while the transcluded\n * content has access to its originating scope.\n *\n *
\n * **Note:** When testing an element transclude directive you must not place the directive at the root of the\n * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives\n * Testing Transclusion Directives}.\n *
\n *\n * There are three kinds of transclusion depending upon whether you want to transclude just the contents of the\n * directive's element, the entire element or multiple parts of the element contents:\n *\n * * `true` - transclude the content (i.e. the child nodes) of the directive's element.\n * * `'element'` - transclude the whole of the directive's element including any directives on this\n * element that defined at a lower priority than this directive. When used, the `template`\n * property is ignored.\n * * **`{...}` (an object hash):** - map elements of the content onto transclusion \"slots\" in the template.\n *\n * **Mult-slot transclusion** is declared by providing an object for the `transclude` property.\n *\n * This object is a map where the keys are the name of the slot to fill and the value is an element selector\n * used to match the HTML to the slot. The element selector should be in normalized form (e.g. `myElement`)\n * and will match the standard element variants (e.g. `my-element`, `my:element`, `data-my-element`, etc).\n *\n * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}\n *\n * If the element selector is prefixed with a `?` then that slot is optional.\n *\n * For example, the transclude object `{ slotA: '?myCustomElement' }` maps `` elements to\n * the `slotA` slot, which can be accessed via the `$transclude` function or via the {@link ngTransclude} directive.\n *\n * Slots that are not marked as optional (`?`) will trigger a compile time error if there are no matching elements\n * in the transclude content. If you wish to know if an optional slot was filled with content, then you can call\n * `$transclude.isSlotFilled(slotName)` on the transclude function passed to the directive's link function and\n * injectable into the directive's controller.\n *\n *\n * #### Transclusion Functions\n *\n * When a directive requests transclusion, the compiler extracts its contents and provides a **transclusion\n * function** to the directive's `link` function and `controller`. This transclusion function is a special\n * **linking function** that will return the compiled contents linked to a new transclusion scope.\n *\n *
\n * If you are just using {@link ngTransclude} then you don't need to worry about this function, since\n * ngTransclude will deal with it for us.\n *
\n *\n * If you want to manually control the insertion and removal of the transcluded content in your directive\n * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery\n * object that contains the compiled DOM, which is linked to the correct transclusion scope.\n *\n * When you call a transclusion function you can pass in a **clone attach function**. This function accepts\n * two parameters, `function(clone, scope) { ... }`, where the `clone` is a fresh compiled copy of your transcluded\n * content and the `scope` is the newly created transclusion scope, which the clone will be linked to.\n *\n *
\n * **Best Practice**: Always provide a `cloneFn` (clone attach function) when you call a transclude function\n * since you then get a fresh clone of the original DOM and also have access to the new transclusion scope.\n *
\n *\n * It is normal practice to attach your transcluded content (`clone`) to the DOM inside your **clone\n * attach function**:\n *\n * ```js\n * var transcludedContent, transclusionScope;\n *\n * $transclude(function(clone, scope) {\n * element.append(clone);\n * transcludedContent = clone;\n * transclusionScope = scope;\n * });\n * ```\n *\n * Later, if you want to remove the transcluded content from your DOM then you should also destroy the\n * associated transclusion scope:\n *\n * ```js\n * transcludedContent.remove();\n * transclusionScope.$destroy();\n * ```\n *\n *
\n * **Best Practice**: if you intend to add and remove transcluded content manually in your directive\n * (by calling the transclude function to get the DOM and calling `element.remove()` to remove it),\n * then you are also responsible for calling `$destroy` on the transclusion scope.\n *
\n *\n * The built-in DOM manipulation directives, such as {@link ngIf}, {@link ngSwitch} and {@link ngRepeat}\n * automatically destroy their transcluded clones as necessary so you do not need to worry about this if\n * you are simply using {@link ngTransclude} to inject the transclusion into your directive.\n *\n *\n * #### Transclusion Scopes\n *\n * When you call a transclude function it returns a DOM fragment that is pre-bound to a **transclusion\n * scope**. This scope is special, in that it is a child of the directive's scope (and so gets destroyed\n * when the directive's scope gets destroyed) but it inherits the properties of the scope from which it\n * was taken.\n *\n * For example consider a directive that uses transclusion and isolated scope. The DOM hierarchy might look\n * like this:\n *\n * ```html\n *
\n *
\n *
\n *
\n *
\n *
\n * ```\n *\n * The `$parent` scope hierarchy will look like this:\n *\n ```\n - $rootScope\n - isolate\n - transclusion\n ```\n *\n * but the scopes will inherit prototypically from different scopes to their `$parent`.\n *\n ```\n - $rootScope\n - transclusion\n - isolate\n ```\n *\n *\n * ### Attributes\n *\n * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the\n * `link()` or `compile()` functions. It has a variety of uses.\n *\n * * *Accessing normalized attribute names:* Directives like 'ngBind' can be expressed in many ways:\n * 'ng:bind', `data-ng-bind`, or 'x-ng-bind'. The attributes object allows for normalized access\n * to the attributes.\n *\n * * *Directive inter-communication:* All directives share the same instance of the attributes\n * object which allows the directives to use the attributes object as inter directive\n * communication.\n *\n * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object\n * allowing other directives to read the interpolated value.\n *\n * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes\n * that contain interpolation (e.g. `src=\"{{bar}}\"`). Not only is this very efficient but it's also\n * the only way to easily get the actual value because during the linking phase the interpolation\n * hasn't been evaluated yet and so the value is at this time set to `undefined`.\n *\n * ```js\n * function linkingFn(scope, elm, attrs, ctrl) {\n * // get the attribute value\n * console.log(attrs.ngModel);\n *\n * // change the attribute\n * attrs.$set('ngModel', 'new value');\n *\n * // observe changes to interpolated attribute\n * attrs.$observe('ngModel', function(value) {\n * console.log('ngModel has changed value to ' + value);\n * });\n * }\n * ```\n *\n * ## Example\n *\n *
\n * **Note**: Typically directives are registered with `module.directive`. The example below is\n * to illustrate how `$compile` works.\n *
\n *\n \n \n \n
\n
\n
\n
\n
\n
\n \n it('should auto compile', function() {\n var textarea = $('textarea');\n var output = $('div[compile]');\n // The initial state reads 'Hello AngularJS'.\n expect(output.getText()).toBe('Hello AngularJS');\n textarea.clear();\n textarea.sendKeys('{{name}}!');\n expect(output.getText()).toBe('AngularJS!');\n });\n \n
\n\n *\n *\n * @param {string|DOMElement} element Element or HTML string to compile into a template function.\n * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED.\n *\n *
\n * **Note:** Passing a `transclude` function to the $compile function is deprecated, as it\n * e.g. will not use the right outer scope. Please pass the transclude function as a\n * `parentBoundTranscludeFn` to the link function instead.\n *
\n *\n * @param {number} maxPriority only apply directives lower than given priority (Only effects the\n * root element(s), not their children)\n * @returns {function(scope, cloneAttachFn=, options=)} a link function which is used to bind template\n * (a DOM element/tree) to a scope. Where:\n *\n * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.\n * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the\n * `template` and call the `cloneAttachFn` function allowing the caller to attach the\n * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is\n * called as:
`cloneAttachFn(clonedElement, scope)` where:\n *\n * * `clonedElement` - is a clone of the original `element` passed into the compiler.\n * * `scope` - is the current scope with which the linking function is working with.\n *\n * * `options` - An optional object hash with linking options. If `options` is provided, then the following\n * keys may be used to control linking behavior:\n *\n * * `parentBoundTranscludeFn` - the transclude function made available to\n * directives; if given, it will be passed through to the link functions of\n * directives found in `element` during compilation.\n * * `transcludeControllers` - an object hash with keys that map controller names\n * to a hash with the key `instance`, which maps to the controller instance;\n * if given, it will make the controllers available to directives on the compileNode:\n * ```\n * {\n * parent: {\n * instance: parentControllerInstance\n * }\n * }\n * ```\n * * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add\n * the cloned elements; only needed for transcludes that are allowed to contain non html\n * elements (e.g. SVG elements). See also the directive.controller property.\n *\n * Calling the linking function returns the element of the template. It is either the original\n * element passed in, or the clone of the element if the `cloneAttachFn` is provided.\n *\n * After linking the view is not updated until after a call to $digest which typically is done by\n * AngularJS automatically.\n *\n * If you need access to the bound view, there are two ways to do it:\n *\n * - If you are not asking the linking function to clone the template, create the DOM element(s)\n * before you send them to the compiler and keep this reference around.\n * ```js\n * var element = $compile('

{{total}}

')(scope);\n * ```\n *\n * - if on the other hand, you need the element to be cloned, the view reference from the original\n * example would not point to the clone, but rather to the original template that was cloned. In\n * this case, you can access the clone via the cloneAttachFn:\n * ```js\n * var templateElement = angular.element('

{{total}}

'),\n * scope = ....;\n *\n * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {\n * //attach the clone to DOM document at the right place\n * });\n *\n * //now we have reference to the cloned DOM via `clonedElement`\n * ```\n *\n *\n * For information on how the compiler works, see the\n * {@link guide/compiler AngularJS HTML Compiler} section of the Developer Guide.\n *\n * @knownIssue\n *\n * ### Double Compilation\n *\n Double compilation occurs when an already compiled part of the DOM gets\n compiled again. This is an undesired effect and can lead to misbehaving directives, performance issues,\n and memory leaks. Refer to the Compiler Guide {@link guide/compiler#double-compilation-and-how-to-avoid-it\n section on double compilation} for an in-depth explanation and ways to avoid it.\n\n * @knownIssue\n\n ### Issues with `replace: true`\n *\n *
\n * **Note**: {@link $compile#-replace- `replace: true`} is deprecated and not recommended to use,\n * mainly due to the issues listed here. It has been completely removed in the new Angular.\n *
\n *\n * #### Attribute values are not merged\n *\n * When a `replace` directive encounters the same attribute on the original and the replace node,\n * it will simply deduplicate the attribute and join the values with a space or with a `;` in case of\n * the `style` attribute.\n * ```html\n * Original Node: \n * Replace Template: \n * Result: \n * ```\n *\n * That means attributes that contain AngularJS expressions will not be merged correctly, e.g.\n * {@link ngShow} or {@link ngClass} will cause a {@link $parse} error:\n *\n * ```html\n * Original Node: \n * Replace Template: \n * Result: \n * ```\n *\n * See issue [#5695](https://github.com/angular/angular.js/issues/5695).\n *\n * #### Directives are not deduplicated before compilation\n *\n * When the original node and the replace template declare the same directive(s), they will be\n * {@link guide/compiler#double-compilation-and-how-to-avoid-it compiled twice} because the compiler\n * does not deduplicate them. In many cases, this is not noticable, but e.g. {@link ngModel} will\n * attach `$formatters` and `$parsers` twice.\n *\n * See issue [#2573](https://github.com/angular/angular.js/issues/2573).\n *\n * #### `transclude: element` in the replace template root can have\n * unexpected effects\n *\n * When the replace template has a directive at the root node that uses\n * {@link $compile#-transclude- `transclude: element`}, e.g.\n * {@link ngIf} or {@link ngRepeat}, the DOM structure or scope inheritance can be incorrect.\n * See the following issues:\n *\n * - Incorrect scope on replaced element:\n * [#9837](https://github.com/angular/angular.js/issues/9837)\n * - Different DOM between `template` and `templateUrl`:\n * [#10612](https://github.com/angular/angular.js/issues/14326)\n *\n */\n\nvar $compileMinErr = minErr('$compile');\n\nfunction UNINITIALIZED_VALUE() {}\nvar _UNINITIALIZED_VALUE = new UNINITIALIZED_VALUE();\n\n/**\n * @ngdoc provider\n * @name $compileProvider\n *\n * @description\n */\n$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];\n/** @this */\nfunction $CompileProvider($provide, $$sanitizeUriProvider) {\n var hasDirectives = {},\n Suffix = 'Directive',\n COMMENT_DIRECTIVE_REGEXP = /^\\s*directive:\\s*([\\w-]+)\\s+(.*)$/,\n CLASS_DIRECTIVE_REGEXP = /(([\\w-]+)(?::([^;]+))?;?)/,\n ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset'),\n REQUIRE_PREFIX_REGEXP = /^(?:(\\^\\^?)?(\\?)?(\\^\\^?)?)?/;\n\n // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes\n // The assumption is that future DOM event attribute names will begin with\n // 'on' and be composed of only English letters.\n var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;\n var bindingCache = createMap();\n\n function parseIsolateBindings(scope, directiveName, isController) {\n var LOCAL_REGEXP = /^([@&<]|=(\\*?))(\\??)\\s*([\\w$]*)$/;\n\n var bindings = createMap();\n\n forEach(scope, function(definition, scopeName) {\n definition = definition.trim();\n\n if (definition in bindingCache) {\n bindings[scopeName] = bindingCache[definition];\n return;\n }\n var match = definition.match(LOCAL_REGEXP);\n\n if (!match) {\n throw $compileMinErr('iscp',\n 'Invalid {3} for directive \\'{0}\\'.' +\n ' Definition: {... {1}: \\'{2}\\' ...}',\n directiveName, scopeName, definition,\n (isController ? 'controller bindings definition' :\n 'isolate scope definition'));\n }\n\n bindings[scopeName] = {\n mode: match[1][0],\n collection: match[2] === '*',\n optional: match[3] === '?',\n attrName: match[4] || scopeName\n };\n if (match[4]) {\n bindingCache[definition] = bindings[scopeName];\n }\n });\n\n return bindings;\n }\n\n function parseDirectiveBindings(directive, directiveName) {\n var bindings = {\n isolateScope: null,\n bindToController: null\n };\n if (isObject(directive.scope)) {\n if (directive.bindToController === true) {\n bindings.bindToController = parseIsolateBindings(directive.scope,\n directiveName, true);\n bindings.isolateScope = {};\n } else {\n bindings.isolateScope = parseIsolateBindings(directive.scope,\n directiveName, false);\n }\n }\n if (isObject(directive.bindToController)) {\n bindings.bindToController =\n parseIsolateBindings(directive.bindToController, directiveName, true);\n }\n if (bindings.bindToController && !directive.controller) {\n // There is no controller\n throw $compileMinErr('noctrl',\n 'Cannot bind to controller without directive \\'{0}\\'s controller.',\n directiveName);\n }\n return bindings;\n }\n\n function assertValidDirectiveName(name) {\n var letter = name.charAt(0);\n if (!letter || letter !== lowercase(letter)) {\n throw $compileMinErr('baddir', 'Directive/Component name \\'{0}\\' is invalid. The first character must be a lowercase letter', name);\n }\n if (name !== name.trim()) {\n throw $compileMinErr('baddir',\n 'Directive/Component name \\'{0}\\' is invalid. The name should not contain leading or trailing whitespaces',\n name);\n }\n }\n\n function getDirectiveRequire(directive) {\n var require = directive.require || (directive.controller && directive.name);\n\n if (!isArray(require) && isObject(require)) {\n forEach(require, function(value, key) {\n var match = value.match(REQUIRE_PREFIX_REGEXP);\n var name = value.substring(match[0].length);\n if (!name) require[key] = match[0] + key;\n });\n }\n\n return require;\n }\n\n function getDirectiveRestrict(restrict, name) {\n if (restrict && !(isString(restrict) && /[EACM]/.test(restrict))) {\n throw $compileMinErr('badrestrict',\n 'Restrict property \\'{0}\\' of directive \\'{1}\\' is invalid',\n restrict,\n name);\n }\n\n return restrict || 'EA';\n }\n\n /**\n * @ngdoc method\n * @name $compileProvider#directive\n * @kind function\n *\n * @description\n * Register a new directive with the compiler.\n *\n * @param {string|Object} name Name of the directive in camel-case (i.e. ngBind which\n * will match as ng-bind), or an object map of directives where the keys are the\n * names and the values are the factories.\n * @param {Function|Array} directiveFactory An injectable directive factory function. See the\n * {@link guide/directive directive guide} and the {@link $compile compile API} for more info.\n * @returns {ng.$compileProvider} Self for chaining.\n */\n this.directive = function registerDirective(name, directiveFactory) {\n assertArg(name, 'name');\n assertNotHasOwnProperty(name, 'directive');\n if (isString(name)) {\n assertValidDirectiveName(name);\n assertArg(directiveFactory, 'directiveFactory');\n if (!hasDirectives.hasOwnProperty(name)) {\n hasDirectives[name] = [];\n $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',\n function($injector, $exceptionHandler) {\n var directives = [];\n forEach(hasDirectives[name], function(directiveFactory, index) {\n try {\n var directive = $injector.invoke(directiveFactory);\n if (isFunction(directive)) {\n directive = { compile: valueFn(directive) };\n } else if (!directive.compile && directive.link) {\n directive.compile = valueFn(directive.link);\n }\n directive.priority = directive.priority || 0;\n directive.index = index;\n directive.name = directive.name || name;\n directive.require = getDirectiveRequire(directive);\n directive.restrict = getDirectiveRestrict(directive.restrict, name);\n directive.$$moduleName = directiveFactory.$$moduleName;\n directives.push(directive);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n return directives;\n }]);\n }\n hasDirectives[name].push(directiveFactory);\n } else {\n forEach(name, reverseParams(registerDirective));\n }\n return this;\n };\n\n /**\n * @ngdoc method\n * @name $compileProvider#component\n * @module ng\n * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match ``),\n * or an object map of components where the keys are the names and the values are the component definition objects.\n * @param {Object} options Component definition object (a simplified\n * {@link ng.$compile#directive-definition-object directive definition object}),\n * with the following properties (all optional):\n *\n * - `controller` – `{(string|function()=}` – controller constructor function that should be\n * associated with newly created scope or the name of a {@link ng.$compile#-controller-\n * registered controller} if passed as a string. An empty `noop` function by default.\n * - `controllerAs` – `{string=}` – identifier name for to reference the controller in the component's scope.\n * If present, the controller will be published to scope under the `controllerAs` name.\n * If not present, this will default to be `$ctrl`.\n * - `template` – `{string=|function()=}` – html template as a string or a function that\n * returns an html template as a string which should be used as the contents of this component.\n * Empty string by default.\n *\n * If `template` is a function, then it is {@link auto.$injector#invoke injected} with\n * the following locals:\n *\n * - `$element` - Current element\n * - `$attrs` - Current attributes object for the element\n *\n * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html\n * template that should be used as the contents of this component.\n *\n * If `templateUrl` is a function, then it is {@link auto.$injector#invoke injected} with\n * the following locals:\n *\n * - `$element` - Current element\n * - `$attrs` - Current attributes object for the element\n *\n * - `bindings` – `{object=}` – defines bindings between DOM attributes and component properties.\n * Component properties are always bound to the component controller and not to the scope.\n * See {@link ng.$compile#-bindtocontroller- `bindToController`}.\n * - `transclude` – `{boolean=}` – whether {@link $compile#transclusion content transclusion} is enabled.\n * Disabled by default.\n * - `require` - `{Object=}` - requires the controllers of other directives and binds them to\n * this component's controller. The object keys specify the property names under which the required\n * controllers (object values) will be bound. See {@link ng.$compile#-require- `require`}.\n * - `$...` – additional properties to attach to the directive factory function and the controller\n * constructor function. (This is used by the component router to annotate)\n *\n * @returns {ng.$compileProvider} the compile provider itself, for chaining of function calls.\n * @description\n * Register a **component definition** with the compiler. This is a shorthand for registering a special\n * type of directive, which represents a self-contained UI component in your application. Such components\n * are always isolated (i.e. `scope: {}`) and are always restricted to elements (i.e. `restrict: 'E'`).\n *\n * Component definitions are very simple and do not require as much configuration as defining general\n * directives. Component definitions usually consist only of a template and a controller backing it.\n *\n * In order to make the definition easier, components enforce best practices like use of `controllerAs`,\n * `bindToController`. They always have **isolate scope** and are restricted to elements.\n *\n * Here are a few examples of how you would usually define components:\n *\n * ```js\n * var myMod = angular.module(...);\n * myMod.component('myComp', {\n * template: '
My name is {{$ctrl.name}}
',\n * controller: function() {\n * this.name = 'shahar';\n * }\n * });\n *\n * myMod.component('myComp', {\n * template: '
My name is {{$ctrl.name}}
',\n * bindings: {name: '@'}\n * });\n *\n * myMod.component('myComp', {\n * templateUrl: 'views/my-comp.html',\n * controller: 'MyCtrl',\n * controllerAs: 'ctrl',\n * bindings: {name: '@'}\n * });\n *\n * ```\n * For more examples, and an in-depth guide, see the {@link guide/component component guide}.\n *\n *
\n * See also {@link ng.$compileProvider#directive $compileProvider.directive()}.\n */\n this.component = function registerComponent(name, options) {\n if (!isString(name)) {\n forEach(name, reverseParams(bind(this, registerComponent)));\n return this;\n }\n\n var controller = options.controller || function() {};\n\n function factory($injector) {\n function makeInjectable(fn) {\n if (isFunction(fn) || isArray(fn)) {\n return /** @this */ function(tElement, tAttrs) {\n return $injector.invoke(fn, this, {$element: tElement, $attrs: tAttrs});\n };\n } else {\n return fn;\n }\n }\n\n var template = (!options.template && !options.templateUrl ? '' : options.template);\n var ddo = {\n controller: controller,\n controllerAs: identifierForController(options.controller) || options.controllerAs || '$ctrl',\n template: makeInjectable(template),\n templateUrl: makeInjectable(options.templateUrl),\n transclude: options.transclude,\n scope: {},\n bindToController: options.bindings || {},\n restrict: 'E',\n require: options.require\n };\n\n // Copy annotations (starting with $) over to the DDO\n forEach(options, function(val, key) {\n if (key.charAt(0) === '$') ddo[key] = val;\n });\n\n return ddo;\n }\n\n // TODO(pete) remove the following `forEach` before we release 1.6.0\n // The component-router@0.2.0 looks for the annotations on the controller constructor\n // Nothing in AngularJS looks for annotations on the factory function but we can't remove\n // it from 1.5.x yet.\n\n // Copy any annotation properties (starting with $) over to the factory and controller constructor functions\n // These could be used by libraries such as the new component router\n forEach(options, function(val, key) {\n if (key.charAt(0) === '$') {\n factory[key] = val;\n // Don't try to copy over annotations to named controller\n if (isFunction(controller)) controller[key] = val;\n }\n });\n\n factory.$inject = ['$injector'];\n\n return this.directive(name, factory);\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#aHrefSanitizationWhitelist\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during a[href] sanitization.\n *\n * The sanitization is a security measure aimed at preventing XSS attacks via html links.\n *\n * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.aHrefSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.aHrefSanitizationWhitelist();\n }\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#imgSrcSanitizationWhitelist\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during img[src] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.imgSrcSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();\n }\n };\n\n /**\n * @ngdoc method\n * @name $compileProvider#debugInfoEnabled\n *\n * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the\n * current debugInfoEnabled state\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n *\n * @kind function\n *\n * @description\n * Call this method to enable/disable various debug runtime information in the compiler such as adding\n * binding information and a reference to the current scope on to DOM elements.\n * If enabled, the compiler will add the following to DOM elements that have been bound to the scope\n * * `ng-binding` CSS class\n * * `ng-scope` and `ng-isolated-scope` CSS classes\n * * `$binding` data property containing an array of the binding expressions\n * * Data properties used by the {@link angular.element#methods `scope()`/`isolateScope()` methods} to return\n * the element's scope.\n * * Placeholder comments will contain information about what directive and binding caused the placeholder.\n * E.g. ``.\n *\n * You may want to disable this in production for a significant performance boost. See\n * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.\n *\n * The default value is true.\n */\n var debugInfoEnabled = true;\n this.debugInfoEnabled = function(enabled) {\n if (isDefined(enabled)) {\n debugInfoEnabled = enabled;\n return this;\n }\n return debugInfoEnabled;\n };\n\n /**\n * @ngdoc method\n * @name $compileProvider#strictComponentBindingsEnabled\n *\n * @param {boolean=} enabled update the strictComponentBindingsEnabled state if provided,\n * otherwise return the current strictComponentBindingsEnabled state.\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n *\n * @kind function\n *\n * @description\n * Call this method to enable / disable the strict component bindings check. If enabled, the\n * compiler will enforce that all scope / controller bindings of a\n * {@link $compileProvider#directive directive} / {@link $compileProvider#component component}\n * that are not set as optional with `?`, must be provided when the directive is instantiated.\n * If not provided, the compiler will throw the\n * {@link error/$compile/missingattr $compile:missingattr error}.\n *\n * The default value is false.\n */\n var strictComponentBindingsEnabled = false;\n this.strictComponentBindingsEnabled = function(enabled) {\n if (isDefined(enabled)) {\n strictComponentBindingsEnabled = enabled;\n return this;\n }\n return strictComponentBindingsEnabled;\n };\n\n var TTL = 10;\n /**\n * @ngdoc method\n * @name $compileProvider#onChangesTtl\n * @description\n *\n * Sets the number of times `$onChanges` hooks can trigger new changes before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that dependencies between `$onChanges` hooks and bindings will result\n * in several iterations of calls to these hooks. However if an application needs more than the default 10\n * iterations to stabilize then you should investigate what is causing the model to continuously change during\n * the `$onChanges` hook execution.\n *\n * Increasing the TTL could have performance implications, so you should not change it without proper justification.\n *\n * @param {number} limit The number of `$onChanges` hook iterations.\n * @returns {number|object} the current limit (or `this` if called as a setter for chaining)\n */\n this.onChangesTtl = function(value) {\n if (arguments.length) {\n TTL = value;\n return this;\n }\n return TTL;\n };\n\n var commentDirectivesEnabledConfig = true;\n /**\n * @ngdoc method\n * @name $compileProvider#commentDirectivesEnabled\n * @description\n *\n * It indicates to the compiler\n * whether or not directives on comments should be compiled.\n * Defaults to `true`.\n *\n * Calling this function with false disables the compilation of directives\n * on comments for the whole application.\n * This results in a compilation performance gain,\n * as the compiler doesn't have to check comments when looking for directives.\n * This should however only be used if you are sure that no comment directives are used in\n * the application (including any 3rd party directives).\n *\n * @param {boolean} enabled `false` if the compiler may ignore directives on comments\n * @returns {boolean|object} the current value (or `this` if called as a setter for chaining)\n */\n this.commentDirectivesEnabled = function(value) {\n if (arguments.length) {\n commentDirectivesEnabledConfig = value;\n return this;\n }\n return commentDirectivesEnabledConfig;\n };\n\n\n var cssClassDirectivesEnabledConfig = true;\n /**\n * @ngdoc method\n * @name $compileProvider#cssClassDirectivesEnabled\n * @description\n *\n * It indicates to the compiler\n * whether or not directives on element classes should be compiled.\n * Defaults to `true`.\n *\n * Calling this function with false disables the compilation of directives\n * on element classes for the whole application.\n * This results in a compilation performance gain,\n * as the compiler doesn't have to check element classes when looking for directives.\n * This should however only be used if you are sure that no class directives are used in\n * the application (including any 3rd party directives).\n *\n * @param {boolean} enabled `false` if the compiler may ignore directives on element classes\n * @returns {boolean|object} the current value (or `this` if called as a setter for chaining)\n */\n this.cssClassDirectivesEnabled = function(value) {\n if (arguments.length) {\n cssClassDirectivesEnabledConfig = value;\n return this;\n }\n return cssClassDirectivesEnabledConfig;\n };\n\n this.$get = [\n '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse',\n '$controller', '$rootScope', '$sce', '$animate',\n function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse,\n $controller, $rootScope, $sce, $animate) {\n\n var SIMPLE_ATTR_NAME = /^\\w/;\n var specialAttrHolder = window.document.createElement('div');\n\n\n var commentDirectivesEnabled = commentDirectivesEnabledConfig;\n var cssClassDirectivesEnabled = cssClassDirectivesEnabledConfig;\n\n\n var onChangesTtl = TTL;\n // The onChanges hooks should all be run together in a single digest\n // When changes occur, the call to trigger their hooks will be added to this queue\n var onChangesQueue;\n\n // This function is called in a $$postDigest to trigger all the onChanges hooks in a single digest\n function flushOnChangesQueue() {\n try {\n if (!(--onChangesTtl)) {\n // We have hit the TTL limit so reset everything\n onChangesQueue = undefined;\n throw $compileMinErr('infchng', '{0} $onChanges() iterations reached. Aborting!\\n', TTL);\n }\n // We must run this hook in an apply since the $$postDigest runs outside apply\n $rootScope.$apply(function() {\n for (var i = 0, ii = onChangesQueue.length; i < ii; ++i) {\n try {\n onChangesQueue[i]();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n // Reset the queue to trigger a new schedule next time there is a change\n onChangesQueue = undefined;\n });\n } finally {\n onChangesTtl++;\n }\n }\n\n\n function Attributes(element, attributesToCopy) {\n if (attributesToCopy) {\n var keys = Object.keys(attributesToCopy);\n var i, l, key;\n\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n this[key] = attributesToCopy[key];\n }\n } else {\n this.$attr = {};\n }\n\n this.$$element = element;\n }\n\n Attributes.prototype = {\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$normalize\n * @kind function\n *\n * @description\n * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or\n * `data-`) to its normalized, camelCase form.\n *\n * Also there is special case for Moz prefix starting with upper case letter.\n *\n * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}\n *\n * @param {string} name Name to normalize\n */\n $normalize: directiveNormalize,\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$addClass\n * @kind function\n *\n * @description\n * Adds the CSS class value specified by the classVal parameter to the element. If animations\n * are enabled then an animation will be triggered for the class addition.\n *\n * @param {string} classVal The className value that will be added to the element\n */\n $addClass: function(classVal) {\n if (classVal && classVal.length > 0) {\n $animate.addClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$removeClass\n * @kind function\n *\n * @description\n * Removes the CSS class value specified by the classVal parameter from the element. If\n * animations are enabled then an animation will be triggered for the class removal.\n *\n * @param {string} classVal The className value that will be removed from the element\n */\n $removeClass: function(classVal) {\n if (classVal && classVal.length > 0) {\n $animate.removeClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$updateClass\n * @kind function\n *\n * @description\n * Adds and removes the appropriate CSS class values to the element based on the difference\n * between the new and old CSS class values (specified as newClasses and oldClasses).\n *\n * @param {string} newClasses The current CSS className value\n * @param {string} oldClasses The former CSS className value\n */\n $updateClass: function(newClasses, oldClasses) {\n var toAdd = tokenDifference(newClasses, oldClasses);\n if (toAdd && toAdd.length) {\n $animate.addClass(this.$$element, toAdd);\n }\n\n var toRemove = tokenDifference(oldClasses, newClasses);\n if (toRemove && toRemove.length) {\n $animate.removeClass(this.$$element, toRemove);\n }\n },\n\n /**\n * Set a normalized attribute on the element in a way such that all directives\n * can share the attribute. This function properly handles boolean attributes.\n * @param {string} key Normalized key. (ie ngAttribute)\n * @param {string|boolean} value The value to set. If `null` attribute will be deleted.\n * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.\n * Defaults to true.\n * @param {string=} attrName Optional none normalized name. Defaults to key.\n */\n $set: function(key, value, writeAttr, attrName) {\n // TODO: decide whether or not to throw an error if \"class\"\n // is set through this function since it may cause $updateClass to\n // become unstable.\n\n var node = this.$$element[0],\n booleanKey = getBooleanAttrName(node, key),\n aliasedKey = getAliasedAttrName(key),\n observer = key,\n nodeName;\n\n if (booleanKey) {\n this.$$element.prop(key, value);\n attrName = booleanKey;\n } else if (aliasedKey) {\n this[aliasedKey] = value;\n observer = aliasedKey;\n }\n\n this[key] = value;\n\n // translate normalized key to actual key\n if (attrName) {\n this.$attr[key] = attrName;\n } else {\n attrName = this.$attr[key];\n if (!attrName) {\n this.$attr[key] = attrName = snake_case(key, '-');\n }\n }\n\n nodeName = nodeName_(this.$$element);\n\n // Sanitize img[srcset] values.\n if (nodeName === 'img' && key === 'srcset' && value) {\n if (!isString(value)) {\n throw $compileMinErr('srcset', 'Can\\'t pass trusted values to `$set(\\'srcset\\', value)`: \"{0}\"', value.toString());\n }\n\n // Such values are a bit too complex to handle automatically inside $sce.\n // Instead, we sanitize each of the URIs individually, which works, even dynamically.\n\n // It's not possible to work around this using `$sce.trustAsMediaUrl`.\n // If you want to programmatically set explicitly trusted unsafe URLs, you should use\n // `$sce.trustAsHtml` on the whole `img` tag and inject it into the DOM using the\n // `ng-bind-html` directive.\n\n var result = '';\n\n // first check if there are spaces because it's not the same pattern\n var trimmedSrcset = trim(value);\n // ( 999x ,| 999w ,| ,|, )\n var srcPattern = /(\\s+\\d+x\\s*,|\\s+\\d+w\\s*,|\\s+,|,\\s+)/;\n var pattern = /\\s/.test(trimmedSrcset) ? srcPattern : /(,)/;\n\n // split srcset into tuple of uri and descriptor except for the last item\n var rawUris = trimmedSrcset.split(pattern);\n\n // for each tuples\n var nbrUrisWith2parts = Math.floor(rawUris.length / 2);\n for (var i = 0; i < nbrUrisWith2parts; i++) {\n var innerIdx = i * 2;\n // sanitize the uri\n result += $sce.getTrustedMediaUrl(trim(rawUris[innerIdx]));\n // add the descriptor\n result += ' ' + trim(rawUris[innerIdx + 1]);\n }\n\n // split the last item into uri and descriptor\n var lastTuple = trim(rawUris[i * 2]).split(/\\s/);\n\n // sanitize the last uri\n result += $sce.getTrustedMediaUrl(trim(lastTuple[0]));\n\n // and add the last descriptor if any\n if (lastTuple.length === 2) {\n result += (' ' + trim(lastTuple[1]));\n }\n this[key] = value = result;\n }\n\n if (writeAttr !== false) {\n if (value === null || isUndefined(value)) {\n this.$$element.removeAttr(attrName);\n } else {\n if (SIMPLE_ATTR_NAME.test(attrName)) {\n this.$$element.attr(attrName, value);\n } else {\n setSpecialAttr(this.$$element[0], attrName, value);\n }\n }\n }\n\n // fire observers\n var $$observers = this.$$observers;\n if ($$observers) {\n forEach($$observers[observer], function(fn) {\n try {\n fn(value);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n }\n },\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$observe\n * @kind function\n *\n * @description\n * Observes an interpolated attribute.\n *\n * The observer function will be invoked once during the next `$digest` following\n * compilation. The observer is then invoked whenever the interpolated value\n * changes.\n *\n * @param {string} key Normalized key. (ie ngAttribute) .\n * @param {function(interpolatedValue)} fn Function that will be called whenever\n the interpolated value of the attribute changes.\n * See the {@link guide/interpolation#how-text-and-attribute-bindings-work Interpolation\n * guide} for more info.\n * @returns {function()} Returns a deregistration function for this observer.\n */\n $observe: function(key, fn) {\n var attrs = this,\n $$observers = (attrs.$$observers || (attrs.$$observers = createMap())),\n listeners = ($$observers[key] || ($$observers[key] = []));\n\n listeners.push(fn);\n $rootScope.$evalAsync(function() {\n if (!listeners.$$inter && attrs.hasOwnProperty(key) && !isUndefined(attrs[key])) {\n // no one registered attribute interpolation function, so lets call it manually\n fn(attrs[key]);\n }\n });\n\n return function() {\n arrayRemove(listeners, fn);\n };\n }\n };\n\n function setSpecialAttr(element, attrName, value) {\n // Attributes names that do not start with letters (such as `(click)`) cannot be set using `setAttribute`\n // so we have to jump through some hoops to get such an attribute\n // https://github.com/angular/angular.js/pull/13318\n specialAttrHolder.innerHTML = '';\n var attributes = specialAttrHolder.firstChild.attributes;\n var attribute = attributes[0];\n // We have to remove the attribute from its container element before we can add it to the destination element\n attributes.removeNamedItem(attribute.name);\n attribute.value = value;\n element.attributes.setNamedItem(attribute);\n }\n\n function safeAddClass($element, className) {\n try {\n $element.addClass(className);\n } catch (e) {\n // ignore, since it means that we are trying to set class on\n // SVG element, where class name is read-only.\n }\n }\n\n\n var startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n denormalizeTemplate = (startSymbol === '{{' && endSymbol === '}}')\n ? identity\n : function denormalizeTemplate(template) {\n return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n },\n NG_ATTR_BINDING = /^ngAttr[A-Z]/;\n var MULTI_ELEMENT_DIR_RE = /^(.+)Start$/;\n\n compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {\n var bindings = $element.data('$binding') || [];\n\n if (isArray(binding)) {\n bindings = bindings.concat(binding);\n } else {\n bindings.push(binding);\n }\n\n $element.data('$binding', bindings);\n } : noop;\n\n compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) {\n safeAddClass($element, 'ng-binding');\n } : noop;\n\n compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {\n var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';\n $element.data(dataName, scope);\n } : noop;\n\n compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) {\n safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');\n } : noop;\n\n compile.$$createComment = function(directiveName, comment) {\n var content = '';\n if (debugInfoEnabled) {\n content = ' ' + (directiveName || '') + ': ';\n if (comment) content += comment + ' ';\n }\n return window.document.createComment(content);\n };\n\n return compile;\n\n //================================\n\n function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,\n previousCompileContext) {\n if (!($compileNodes instanceof jqLite)) {\n // jquery always rewraps, whereas we need to preserve the original selector so that we can\n // modify it.\n $compileNodes = jqLite($compileNodes);\n }\n var compositeLinkFn =\n compileNodes($compileNodes, transcludeFn, $compileNodes,\n maxPriority, ignoreDirective, previousCompileContext);\n compile.$$addScopeClass($compileNodes);\n var namespace = null;\n return function publicLinkFn(scope, cloneConnectFn, options) {\n if (!$compileNodes) {\n throw $compileMinErr('multilink', 'This element has already been linked.');\n }\n assertArg(scope, 'scope');\n\n if (previousCompileContext && previousCompileContext.needsNewScope) {\n // A parent directive did a replace and a directive on this element asked\n // for transclusion, which caused us to lose a layer of element on which\n // we could hold the new transclusion scope, so we will create it manually\n // here.\n scope = scope.$parent.$new();\n }\n\n options = options || {};\n var parentBoundTranscludeFn = options.parentBoundTranscludeFn,\n transcludeControllers = options.transcludeControllers,\n futureParentElement = options.futureParentElement;\n\n // When `parentBoundTranscludeFn` is passed, it is a\n // `controllersBoundTransclude` function (it was previously passed\n // as `transclude` to directive.link) so we must unwrap it to get\n // its `boundTranscludeFn`\n if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) {\n parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude;\n }\n\n if (!namespace) {\n namespace = detectNamespaceForChildElements(futureParentElement);\n }\n var $linkNode;\n if (namespace !== 'html') {\n // When using a directive with replace:true and templateUrl the $compileNodes\n // (or a child element inside of them)\n // might change, so we need to recreate the namespace adapted compileNodes\n // for call to the link function.\n // Note: This will already clone the nodes...\n $linkNode = jqLite(\n wrapTemplate(namespace, jqLite('
').append($compileNodes).html())\n );\n } else if (cloneConnectFn) {\n // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart\n // and sometimes changes the structure of the DOM.\n $linkNode = JQLitePrototype.clone.call($compileNodes);\n } else {\n $linkNode = $compileNodes;\n }\n\n if (transcludeControllers) {\n for (var controllerName in transcludeControllers) {\n $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);\n }\n }\n\n compile.$$addScopeInfo($linkNode, scope);\n\n if (cloneConnectFn) cloneConnectFn($linkNode, scope);\n if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);\n\n if (!cloneConnectFn) {\n $compileNodes = compositeLinkFn = null;\n }\n return $linkNode;\n };\n }\n\n function detectNamespaceForChildElements(parentElement) {\n // TODO: Make this detect MathML as well...\n var node = parentElement && parentElement[0];\n if (!node) {\n return 'html';\n } else {\n return nodeName_(node) !== 'foreignobject' && toString.call(node).match(/SVG/) ? 'svg' : 'html';\n }\n }\n\n /**\n * Compile function matches each node in nodeList against the directives. Once all directives\n * for a particular node are collected their compile functions are executed. The compile\n * functions return values - the linking functions - are combined into a composite linking\n * function, which is the a linking function for the node.\n *\n * @param {NodeList} nodeList an array of nodes or NodeList to compile\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new child of the transcluded parent scope.\n * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then\n * the rootElement must be set the jqLite collection of the compile root. This is\n * needed so that the jqLite collection items can be replaced with widgets.\n * @param {number=} maxPriority Max directive priority.\n * @returns {Function} A composite linking function of all of the matched directives or null.\n */\n function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,\n previousCompileContext) {\n var linkFns = [],\n // `nodeList` can be either an element's `.childNodes` (live NodeList)\n // or a jqLite/jQuery collection or an array\n notLiveList = isArray(nodeList) || (nodeList instanceof jqLite),\n attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound;\n\n\n for (var i = 0; i < nodeList.length; i++) {\n attrs = new Attributes();\n\n // Support: IE 11 only\n // Workaround for #11781 and #14924\n if (msie === 11) {\n mergeConsecutiveTextNodes(nodeList, i, notLiveList);\n }\n\n // We must always refer to `nodeList[i]` hereafter,\n // since the nodes can be replaced underneath us.\n directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,\n ignoreDirective);\n\n nodeLinkFn = (directives.length)\n ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,\n null, [], [], previousCompileContext)\n : null;\n\n if (nodeLinkFn && nodeLinkFn.scope) {\n compile.$$addScopeClass(attrs.$$element);\n }\n\n childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||\n !(childNodes = nodeList[i].childNodes) ||\n !childNodes.length)\n ? null\n : compileNodes(childNodes,\n nodeLinkFn ? (\n (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)\n && nodeLinkFn.transclude) : transcludeFn);\n\n if (nodeLinkFn || childLinkFn) {\n linkFns.push(i, nodeLinkFn, childLinkFn);\n linkFnFound = true;\n nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn;\n }\n\n //use the previous context only for the first element in the virtual group\n previousCompileContext = null;\n }\n\n // return a linking function if we have found anything, null otherwise\n return linkFnFound ? compositeLinkFn : null;\n\n function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {\n var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;\n var stableNodeList;\n\n\n if (nodeLinkFnFound) {\n // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our\n // offsets don't get screwed up\n var nodeListLength = nodeList.length;\n stableNodeList = new Array(nodeListLength);\n\n // create a sparse array by only copying the elements which have a linkFn\n for (i = 0; i < linkFns.length; i += 3) {\n idx = linkFns[i];\n stableNodeList[idx] = nodeList[idx];\n }\n } else {\n stableNodeList = nodeList;\n }\n\n for (i = 0, ii = linkFns.length; i < ii;) {\n node = stableNodeList[linkFns[i++]];\n nodeLinkFn = linkFns[i++];\n childLinkFn = linkFns[i++];\n\n if (nodeLinkFn) {\n if (nodeLinkFn.scope) {\n childScope = scope.$new();\n compile.$$addScopeInfo(jqLite(node), childScope);\n } else {\n childScope = scope;\n }\n\n if (nodeLinkFn.transcludeOnThisElement) {\n childBoundTranscludeFn = createBoundTranscludeFn(\n scope, nodeLinkFn.transclude, parentBoundTranscludeFn);\n\n } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {\n childBoundTranscludeFn = parentBoundTranscludeFn;\n\n } else if (!parentBoundTranscludeFn && transcludeFn) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);\n\n } else {\n childBoundTranscludeFn = null;\n }\n\n nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);\n\n } else if (childLinkFn) {\n childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);\n }\n }\n }\n }\n\n function mergeConsecutiveTextNodes(nodeList, idx, notLiveList) {\n var node = nodeList[idx];\n var parent = node.parentNode;\n var sibling;\n\n if (node.nodeType !== NODE_TYPE_TEXT) {\n return;\n }\n\n while (true) {\n sibling = parent ? node.nextSibling : nodeList[idx + 1];\n if (!sibling || sibling.nodeType !== NODE_TYPE_TEXT) {\n break;\n }\n\n node.nodeValue = node.nodeValue + sibling.nodeValue;\n\n if (sibling.parentNode) {\n sibling.parentNode.removeChild(sibling);\n }\n if (notLiveList && sibling === nodeList[idx + 1]) {\n nodeList.splice(idx + 1, 1);\n }\n }\n }\n\n function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {\n function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {\n\n if (!transcludedScope) {\n transcludedScope = scope.$new(false, containingScope);\n transcludedScope.$$transcluded = true;\n }\n\n return transcludeFn(transcludedScope, cloneFn, {\n parentBoundTranscludeFn: previousBoundTranscludeFn,\n transcludeControllers: controllers,\n futureParentElement: futureParentElement\n });\n }\n\n // We need to attach the transclusion slots onto the `boundTranscludeFn`\n // so that they are available inside the `controllersBoundTransclude` function\n var boundSlots = boundTranscludeFn.$$slots = createMap();\n for (var slotName in transcludeFn.$$slots) {\n if (transcludeFn.$$slots[slotName]) {\n boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn);\n } else {\n boundSlots[slotName] = null;\n }\n }\n\n return boundTranscludeFn;\n }\n\n /**\n * Looks for directives on the given node and adds them to the directive collection which is\n * sorted.\n *\n * @param node Node to search.\n * @param directives An array to which the directives are added to. This array is sorted before\n * the function returns.\n * @param attrs The shared attrs object which is used to populate the normalized attributes.\n * @param {number=} maxPriority Max directive priority.\n */\n function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n var nodeType = node.nodeType,\n attrsMap = attrs.$attr,\n match,\n nodeName,\n className;\n\n switch (nodeType) {\n case NODE_TYPE_ELEMENT: /* Element */\n\n nodeName = nodeName_(node);\n\n // use the node name: \n addDirective(directives,\n directiveNormalize(nodeName), 'E', maxPriority, ignoreDirective);\n\n // iterate over the attributes\n for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,\n j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {\n var attrStartName = false;\n var attrEndName = false;\n\n attr = nAttrs[j];\n name = attr.name;\n value = attr.value;\n\n // support ngAttr attribute binding\n ngAttrName = directiveNormalize(name);\n isNgAttr = NG_ATTR_BINDING.test(ngAttrName);\n if (isNgAttr) {\n name = name.replace(PREFIX_REGEXP, '')\n .substr(8).replace(/_(.)/g, function(match, letter) {\n return letter.toUpperCase();\n });\n }\n\n var multiElementMatch = ngAttrName.match(MULTI_ELEMENT_DIR_RE);\n if (multiElementMatch && directiveIsMultiElement(multiElementMatch[1])) {\n attrStartName = name;\n attrEndName = name.substr(0, name.length - 5) + 'end';\n name = name.substr(0, name.length - 6);\n }\n\n nName = directiveNormalize(name.toLowerCase());\n attrsMap[nName] = name;\n if (isNgAttr || !attrs.hasOwnProperty(nName)) {\n attrs[nName] = value;\n if (getBooleanAttrName(node, nName)) {\n attrs[nName] = true; // presence means true\n }\n }\n addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);\n addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,\n attrEndName);\n }\n\n if (nodeName === 'input' && node.getAttribute('type') === 'hidden') {\n // Hidden input elements can have strange behaviour when navigating back to the page\n // This tells the browser not to try to cache and reinstate previous values\n node.setAttribute('autocomplete', 'off');\n }\n\n // use class as directive\n if (!cssClassDirectivesEnabled) break;\n className = node.className;\n if (isObject(className)) {\n // Maybe SVGAnimatedString\n className = className.animVal;\n }\n if (isString(className) && className !== '') {\n while ((match = CLASS_DIRECTIVE_REGEXP.exec(className))) {\n nName = directiveNormalize(match[2]);\n if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[3]);\n }\n className = className.substr(match.index + match[0].length);\n }\n }\n break;\n case NODE_TYPE_TEXT: /* Text Node */\n addTextInterpolateDirective(directives, node.nodeValue);\n break;\n case NODE_TYPE_COMMENT: /* Comment */\n if (!commentDirectivesEnabled) break;\n collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective);\n break;\n }\n\n directives.sort(byPriority);\n return directives;\n }\n\n function collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n // function created because of performance, try/catch disables\n // the optimization of the whole function #14848\n try {\n var match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);\n if (match) {\n var nName = directiveNormalize(match[1]);\n if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[2]);\n }\n }\n } catch (e) {\n // turns out that under some circumstances IE9 throws errors when one attempts to read\n // comment's node value.\n // Just ignore it and continue. (Can't seem to reproduce in test case.)\n }\n }\n\n /**\n * Given a node with a directive-start it collects all of the siblings until it finds\n * directive-end.\n * @param node\n * @param attrStart\n * @param attrEnd\n * @returns {*}\n */\n function groupScan(node, attrStart, attrEnd) {\n var nodes = [];\n var depth = 0;\n if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {\n do {\n if (!node) {\n throw $compileMinErr('uterdir',\n 'Unterminated attribute, found \\'{0}\\' but no matching \\'{1}\\' found.',\n attrStart, attrEnd);\n }\n if (node.nodeType === NODE_TYPE_ELEMENT) {\n if (node.hasAttribute(attrStart)) depth++;\n if (node.hasAttribute(attrEnd)) depth--;\n }\n nodes.push(node);\n node = node.nextSibling;\n } while (depth > 0);\n } else {\n nodes.push(node);\n }\n\n return jqLite(nodes);\n }\n\n /**\n * Wrapper for linking function which converts normal linking function into a grouped\n * linking function.\n * @param linkFn\n * @param attrStart\n * @param attrEnd\n * @returns {Function}\n */\n function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {\n return function groupedElementsLink(scope, element, attrs, controllers, transcludeFn) {\n element = groupScan(element[0], attrStart, attrEnd);\n return linkFn(scope, element, attrs, controllers, transcludeFn);\n };\n }\n\n /**\n * A function generator that is used to support both eager and lazy compilation\n * linking function.\n * @param eager\n * @param $compileNodes\n * @param transcludeFn\n * @param maxPriority\n * @param ignoreDirective\n * @param previousCompileContext\n * @returns {Function}\n */\n function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {\n var compiled;\n\n if (eager) {\n return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);\n }\n return /** @this */ function lazyCompilation() {\n if (!compiled) {\n compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);\n\n // Null out all of these references in order to make them eligible for garbage collection\n // since this is a potentially long lived closure\n $compileNodes = transcludeFn = previousCompileContext = null;\n }\n return compiled.apply(this, arguments);\n };\n }\n\n /**\n * Once the directives have been collected, their compile functions are executed. This method\n * is responsible for inlining directive templates as well as terminating the application\n * of the directives if the terminal directive has been reached.\n *\n * @param {Array} directives Array of collected directives to execute their compile function.\n * this needs to be pre-sorted by priority order.\n * @param {Node} compileNode The raw DOM node to apply the compile functions to\n * @param {Object} templateAttrs The shared attribute function\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new\n * child of the transcluded parent scope.\n * @param {JQLite} jqCollection If we are working on the root of the compile tree then this\n * argument has the root jqLite array so that we can replace nodes\n * on it.\n * @param {Object=} originalReplaceDirective An optional directive that will be ignored when\n * compiling the transclusion.\n * @param {Array.} preLinkFns\n * @param {Array.} postLinkFns\n * @param {Object} previousCompileContext Context used for previous compilation of the current\n * node\n * @returns {Function} linkFn\n */\n function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,\n jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,\n previousCompileContext) {\n previousCompileContext = previousCompileContext || {};\n\n var terminalPriority = -Number.MAX_VALUE,\n newScopeDirective = previousCompileContext.newScopeDirective,\n controllerDirectives = previousCompileContext.controllerDirectives,\n newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,\n templateDirective = previousCompileContext.templateDirective,\n nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,\n hasTranscludeDirective = false,\n hasTemplate = false,\n hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,\n $compileNode = templateAttrs.$$element = jqLite(compileNode),\n directive,\n directiveName,\n $template,\n replaceDirective = originalReplaceDirective,\n childTranscludeFn = transcludeFn,\n linkFn,\n didScanForMultipleTransclusion = false,\n mightHaveMultipleTransclusionError = false,\n directiveValue;\n\n // executes all directives on the current element\n for (var i = 0, ii = directives.length; i < ii; i++) {\n directive = directives[i];\n var attrStart = directive.$$start;\n var attrEnd = directive.$$end;\n\n // collect multiblock sections\n if (attrStart) {\n $compileNode = groupScan(compileNode, attrStart, attrEnd);\n }\n $template = undefined;\n\n if (terminalPriority > directive.priority) {\n break; // prevent further processing of directives\n }\n\n directiveValue = directive.scope;\n\n if (directiveValue) {\n\n // skip the check for directives with async templates, we'll check the derived sync\n // directive when the template arrives\n if (!directive.templateUrl) {\n if (isObject(directiveValue)) {\n // This directive is trying to add an isolated scope.\n // Check that there is no scope of any kind already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective,\n directive, $compileNode);\n newIsolateScopeDirective = directive;\n } else {\n // This directive is trying to add a child scope.\n // Check that there is no isolated scope already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,\n $compileNode);\n }\n }\n\n newScopeDirective = newScopeDirective || directive;\n }\n\n directiveName = directive.name;\n\n // If we encounter a condition that can result in transclusion on the directive,\n // then scan ahead in the remaining directives for others that may cause a multiple\n // transclusion error to be thrown during the compilation process. If a matching directive\n // is found, then we know that when we encounter a transcluded directive, we need to eagerly\n // compile the `transclude` function rather than doing it lazily in order to throw\n // exceptions at the correct time\n if (!didScanForMultipleTransclusion && ((directive.replace && (directive.templateUrl || directive.template))\n || (directive.transclude && !directive.$$tlb))) {\n var candidateDirective;\n\n for (var scanningIndex = i + 1; (candidateDirective = directives[scanningIndex++]);) {\n if ((candidateDirective.transclude && !candidateDirective.$$tlb)\n || (candidateDirective.replace && (candidateDirective.templateUrl || candidateDirective.template))) {\n mightHaveMultipleTransclusionError = true;\n break;\n }\n }\n\n didScanForMultipleTransclusion = true;\n }\n\n if (!directive.templateUrl && directive.controller) {\n controllerDirectives = controllerDirectives || createMap();\n assertNoDuplicate('\\'' + directiveName + '\\' controller',\n controllerDirectives[directiveName], directive, $compileNode);\n controllerDirectives[directiveName] = directive;\n }\n\n directiveValue = directive.transclude;\n\n if (directiveValue) {\n hasTranscludeDirective = true;\n\n // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.\n // This option should only be used by directives that know how to safely handle element transclusion,\n // where the transcluded nodes are added or replaced after linking.\n if (!directive.$$tlb) {\n assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);\n nonTlbTranscludeDirective = directive;\n }\n\n if (directiveValue === 'element') {\n hasElementTranscludeDirective = true;\n terminalPriority = directive.priority;\n $template = $compileNode;\n $compileNode = templateAttrs.$$element =\n jqLite(compile.$$createComment(directiveName, templateAttrs[directiveName]));\n compileNode = $compileNode[0];\n replaceWith(jqCollection, sliceArgs($template), compileNode);\n\n childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, terminalPriority,\n replaceDirective && replaceDirective.name, {\n // Don't pass in:\n // - controllerDirectives - otherwise we'll create duplicates controllers\n // - newIsolateScopeDirective or templateDirective - combining templates with\n // element transclusion doesn't make sense.\n //\n // We need only nonTlbTranscludeDirective so that we prevent putting transclusion\n // on the same element more than once.\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n } else {\n\n var slots = createMap();\n\n if (!isObject(directiveValue)) {\n $template = jqLite(jqLiteClone(compileNode)).contents();\n } else {\n\n // We have transclusion slots,\n // collect them up, compile them and store their transclusion functions\n $template = [];\n\n var slotMap = createMap();\n var filledSlots = createMap();\n\n // Parse the element selectors\n forEach(directiveValue, function(elementSelector, slotName) {\n // If an element selector starts with a ? then it is optional\n var optional = (elementSelector.charAt(0) === '?');\n elementSelector = optional ? elementSelector.substring(1) : elementSelector;\n\n slotMap[elementSelector] = slotName;\n\n // We explicitly assign `null` since this implies that a slot was defined but not filled.\n // Later when calling boundTransclusion functions with a slot name we only error if the\n // slot is `undefined`\n slots[slotName] = null;\n\n // filledSlots contains `true` for all slots that are either optional or have been\n // filled. This is used to check that we have not missed any required slots\n filledSlots[slotName] = optional;\n });\n\n // Add the matching elements into their slot\n forEach($compileNode.contents(), function(node) {\n var slotName = slotMap[directiveNormalize(nodeName_(node))];\n if (slotName) {\n filledSlots[slotName] = true;\n slots[slotName] = slots[slotName] || [];\n slots[slotName].push(node);\n } else {\n $template.push(node);\n }\n });\n\n // Check for required slots that were not filled\n forEach(filledSlots, function(filled, slotName) {\n if (!filled) {\n throw $compileMinErr('reqslot', 'Required transclusion slot `{0}` was not filled.', slotName);\n }\n });\n\n for (var slotName in slots) {\n if (slots[slotName]) {\n // Only define a transclusion function if the slot was filled\n slots[slotName] = compilationGenerator(mightHaveMultipleTransclusionError, slots[slotName], transcludeFn);\n }\n }\n }\n\n $compileNode.empty(); // clear contents\n childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, undefined,\n undefined, { needsNewScope: directive.$$isolateScope || directive.$$newScope});\n childTranscludeFn.$$slots = slots;\n }\n }\n\n if (directive.template) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n directiveValue = (isFunction(directive.template))\n ? directive.template($compileNode, templateAttrs)\n : directive.template;\n\n directiveValue = denormalizeTemplate(directiveValue);\n\n if (directive.replace) {\n replaceDirective = directive;\n if (jqLiteIsTextNode(directiveValue)) {\n $template = [];\n } else {\n $template = removeComments(wrapTemplate(directive.templateNamespace, trim(directiveValue)));\n }\n compileNode = $template[0];\n\n if ($template.length !== 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {\n throw $compileMinErr('tplrt',\n 'Template for directive \\'{0}\\' must have exactly one root element. {1}',\n directiveName, '');\n }\n\n replaceWith(jqCollection, $compileNode, compileNode);\n\n var newTemplateAttrs = {$attr: {}};\n\n // combine directives from the original node and from the template:\n // - take the array of directives for this element\n // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)\n // - collect directives from the template and sort them by priority\n // - combine directives as: processed + template + unprocessed\n var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);\n var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));\n\n if (newIsolateScopeDirective || newScopeDirective) {\n // The original directive caused the current element to be replaced but this element\n // also needs to have a new scope, so we need to tell the template directives\n // that they would need to get their scope from further up, if they require transclusion\n markDirectiveScope(templateDirectives, newIsolateScopeDirective, newScopeDirective);\n }\n directives = directives.concat(templateDirectives).concat(unprocessedDirectives);\n mergeTemplateAttributes(templateAttrs, newTemplateAttrs);\n\n ii = directives.length;\n } else {\n $compileNode.html(directiveValue);\n }\n }\n\n if (directive.templateUrl) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n if (directive.replace) {\n replaceDirective = directive;\n }\n\n // eslint-disable-next-line no-func-assign\n nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,\n templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {\n controllerDirectives: controllerDirectives,\n newScopeDirective: (newScopeDirective !== directive) && newScopeDirective,\n newIsolateScopeDirective: newIsolateScopeDirective,\n templateDirective: templateDirective,\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n ii = directives.length;\n } else if (directive.compile) {\n try {\n linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);\n var context = directive.$$originalDirective || directive;\n if (isFunction(linkFn)) {\n addLinkFns(null, bind(context, linkFn), attrStart, attrEnd);\n } else if (linkFn) {\n addLinkFns(bind(context, linkFn.pre), bind(context, linkFn.post), attrStart, attrEnd);\n }\n } catch (e) {\n $exceptionHandler(e, startingTag($compileNode));\n }\n }\n\n if (directive.terminal) {\n nodeLinkFn.terminal = true;\n terminalPriority = Math.max(terminalPriority, directive.priority);\n }\n\n }\n\n nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;\n nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;\n nodeLinkFn.templateOnThisElement = hasTemplate;\n nodeLinkFn.transclude = childTranscludeFn;\n\n previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;\n\n // might be normal or delayed nodeLinkFn depending on if templateUrl is present\n return nodeLinkFn;\n\n ////////////////////\n\n function addLinkFns(pre, post, attrStart, attrEnd) {\n if (pre) {\n if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);\n pre.require = directive.require;\n pre.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n pre = cloneAndAnnotateFn(pre, {isolateScope: true});\n }\n preLinkFns.push(pre);\n }\n if (post) {\n if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);\n post.require = directive.require;\n post.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n post = cloneAndAnnotateFn(post, {isolateScope: true});\n }\n postLinkFns.push(post);\n }\n }\n\n function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {\n var i, ii, linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,\n attrs, scopeBindingInfo;\n\n if (compileNode === linkNode) {\n attrs = templateAttrs;\n $element = templateAttrs.$$element;\n } else {\n $element = jqLite(linkNode);\n attrs = new Attributes($element, templateAttrs);\n }\n\n controllerScope = scope;\n if (newIsolateScopeDirective) {\n isolateScope = scope.$new(true);\n } else if (newScopeDirective) {\n controllerScope = scope.$parent;\n }\n\n if (boundTranscludeFn) {\n // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn`\n // is later passed as `parentBoundTranscludeFn` to `publicLinkFn`\n transcludeFn = controllersBoundTransclude;\n transcludeFn.$$boundTransclude = boundTranscludeFn;\n // expose the slots on the `$transclude` function\n transcludeFn.isSlotFilled = function(slotName) {\n return !!boundTranscludeFn.$$slots[slotName];\n };\n }\n\n if (controllerDirectives) {\n elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope, newIsolateScopeDirective);\n }\n\n if (newIsolateScopeDirective) {\n // Initialize isolate scope bindings for new isolate scope directive.\n compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||\n templateDirective === newIsolateScopeDirective.$$originalDirective)));\n compile.$$addScopeClass($element, true);\n isolateScope.$$isolateBindings =\n newIsolateScopeDirective.$$isolateBindings;\n scopeBindingInfo = initializeDirectiveBindings(scope, attrs, isolateScope,\n isolateScope.$$isolateBindings,\n newIsolateScopeDirective);\n if (scopeBindingInfo.removeWatches) {\n isolateScope.$on('$destroy', scopeBindingInfo.removeWatches);\n }\n }\n\n // Initialize bindToController bindings\n for (var name in elementControllers) {\n var controllerDirective = controllerDirectives[name];\n var controller = elementControllers[name];\n var bindings = controllerDirective.$$bindings.bindToController;\n\n controller.instance = controller();\n $element.data('$' + controllerDirective.name + 'Controller', controller.instance);\n controller.bindingInfo =\n initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);\n }\n\n // Bind the required controllers to the controller, if `require` is an object and `bindToController` is truthy\n forEach(controllerDirectives, function(controllerDirective, name) {\n var require = controllerDirective.require;\n if (controllerDirective.bindToController && !isArray(require) && isObject(require)) {\n extend(elementControllers[name].instance, getControllers(name, require, $element, elementControllers));\n }\n });\n\n // Handle the init and destroy lifecycle hooks on all controllers that have them\n forEach(elementControllers, function(controller) {\n var controllerInstance = controller.instance;\n if (isFunction(controllerInstance.$onChanges)) {\n try {\n controllerInstance.$onChanges(controller.bindingInfo.initialChanges);\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n if (isFunction(controllerInstance.$onInit)) {\n try {\n controllerInstance.$onInit();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n if (isFunction(controllerInstance.$doCheck)) {\n controllerScope.$watch(function() { controllerInstance.$doCheck(); });\n controllerInstance.$doCheck();\n }\n if (isFunction(controllerInstance.$onDestroy)) {\n controllerScope.$on('$destroy', function callOnDestroyHook() {\n controllerInstance.$onDestroy();\n });\n }\n });\n\n // PRELINKING\n for (i = 0, ii = preLinkFns.length; i < ii; i++) {\n linkFn = preLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // RECURSION\n // We only pass the isolate scope, if the isolate directive has a template,\n // otherwise the child elements do not belong to the isolate directive.\n var scopeToChild = scope;\n if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {\n scopeToChild = isolateScope;\n }\n if (childLinkFn) {\n childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);\n }\n\n // POSTLINKING\n for (i = postLinkFns.length - 1; i >= 0; i--) {\n linkFn = postLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // Trigger $postLink lifecycle hooks\n forEach(elementControllers, function(controller) {\n var controllerInstance = controller.instance;\n if (isFunction(controllerInstance.$postLink)) {\n controllerInstance.$postLink();\n }\n });\n\n // This is the function that is injected as `$transclude`.\n // Note: all arguments are optional!\n function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) {\n var transcludeControllers;\n // No scope passed in:\n if (!isScope(scope)) {\n slotName = futureParentElement;\n futureParentElement = cloneAttachFn;\n cloneAttachFn = scope;\n scope = undefined;\n }\n\n if (hasElementTranscludeDirective) {\n transcludeControllers = elementControllers;\n }\n if (!futureParentElement) {\n futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;\n }\n if (slotName) {\n // slotTranscludeFn can be one of three things:\n // * a transclude function - a filled slot\n // * `null` - an optional slot that was not filled\n // * `undefined` - a slot that was not declared (i.e. invalid)\n var slotTranscludeFn = boundTranscludeFn.$$slots[slotName];\n if (slotTranscludeFn) {\n return slotTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);\n } else if (isUndefined(slotTranscludeFn)) {\n throw $compileMinErr('noslot',\n 'No parent directive that requires a transclusion with slot name \"{0}\". ' +\n 'Element: {1}',\n slotName, startingTag($element));\n }\n } else {\n return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);\n }\n }\n }\n }\n\n function getControllers(directiveName, require, $element, elementControllers) {\n var value;\n\n if (isString(require)) {\n var match = require.match(REQUIRE_PREFIX_REGEXP);\n var name = require.substring(match[0].length);\n var inheritType = match[1] || match[3];\n var optional = match[2] === '?';\n\n //If only parents then start at the parent element\n if (inheritType === '^^') {\n $element = $element.parent();\n //Otherwise attempt getting the controller from elementControllers in case\n //the element is transcluded (and has no data) and to avoid .data if possible\n } else {\n value = elementControllers && elementControllers[name];\n value = value && value.instance;\n }\n\n if (!value) {\n var dataName = '$' + name + 'Controller';\n value = inheritType ? $element.inheritedData(dataName) : $element.data(dataName);\n }\n\n if (!value && !optional) {\n throw $compileMinErr('ctreq',\n 'Controller \\'{0}\\', required by directive \\'{1}\\', can\\'t be found!',\n name, directiveName);\n }\n } else if (isArray(require)) {\n value = [];\n for (var i = 0, ii = require.length; i < ii; i++) {\n value[i] = getControllers(directiveName, require[i], $element, elementControllers);\n }\n } else if (isObject(require)) {\n value = {};\n forEach(require, function(controller, property) {\n value[property] = getControllers(directiveName, controller, $element, elementControllers);\n });\n }\n\n return value || null;\n }\n\n function setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope, newIsolateScopeDirective) {\n var elementControllers = createMap();\n for (var controllerKey in controllerDirectives) {\n var directive = controllerDirectives[controllerKey];\n var locals = {\n $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,\n $element: $element,\n $attrs: attrs,\n $transclude: transcludeFn\n };\n\n var controller = directive.controller;\n if (controller === '@') {\n controller = attrs[directive.name];\n }\n\n var controllerInstance = $controller(controller, locals, true, directive.controllerAs);\n\n // For directives with element transclusion the element is a comment.\n // In this case .data will not attach any data.\n // Instead, we save the controllers for the element in a local hash and attach to .data\n // later, once we have the actual element.\n elementControllers[directive.name] = controllerInstance;\n $element.data('$' + directive.name + 'Controller', controllerInstance.instance);\n }\n return elementControllers;\n }\n\n // Depending upon the context in which a directive finds itself it might need to have a new isolated\n // or child scope created. For instance:\n // * if the directive has been pulled into a template because another directive with a higher priority\n // asked for element transclusion\n // * if the directive itself asks for transclusion but it is at the root of a template and the original\n // element was replaced. See https://github.com/angular/angular.js/issues/12936\n function markDirectiveScope(directives, isolateScope, newScope) {\n for (var j = 0, jj = directives.length; j < jj; j++) {\n directives[j] = inherit(directives[j], {$$isolateScope: isolateScope, $$newScope: newScope});\n }\n }\n\n /**\n * looks up the directive and decorates it with exception handling and proper parameters. We\n * call this the boundDirective.\n *\n * @param {string} name name of the directive to look up.\n * @param {string} location The directive must be found in specific format.\n * String containing any of theses characters:\n *\n * * `E`: element name\n * * `A': attribute\n * * `C`: class\n * * `M`: comment\n * @returns {boolean} true if directive was added.\n */\n function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,\n endAttrName) {\n if (name === ignoreDirective) return null;\n var match = null;\n if (hasDirectives.hasOwnProperty(name)) {\n for (var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i < ii; i++) {\n directive = directives[i];\n if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&\n directive.restrict.indexOf(location) !== -1) {\n if (startAttrName) {\n directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});\n }\n if (!directive.$$bindings) {\n var bindings = directive.$$bindings =\n parseDirectiveBindings(directive, directive.name);\n if (isObject(bindings.isolateScope)) {\n directive.$$isolateBindings = bindings.isolateScope;\n }\n }\n tDirectives.push(directive);\n match = directive;\n }\n }\n }\n return match;\n }\n\n\n /**\n * looks up the directive and returns true if it is a multi-element directive,\n * and therefore requires DOM nodes between -start and -end markers to be grouped\n * together.\n *\n * @param {string} name name of the directive to look up.\n * @returns true if directive was registered as multi-element.\n */\n function directiveIsMultiElement(name) {\n if (hasDirectives.hasOwnProperty(name)) {\n for (var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i < ii; i++) {\n directive = directives[i];\n if (directive.multiElement) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * When the element is replaced with HTML template then the new attributes\n * on the template need to be merged with the existing attributes in the DOM.\n * The desired effect is to have both of the attributes present.\n *\n * @param {object} dst destination attributes (original DOM)\n * @param {object} src source attributes (from the directive template)\n */\n function mergeTemplateAttributes(dst, src) {\n var srcAttr = src.$attr,\n dstAttr = dst.$attr;\n\n // reapply the old attributes to the new element\n forEach(dst, function(value, key) {\n if (key.charAt(0) !== '$') {\n if (src[key] && src[key] !== value) {\n if (value.length) {\n value += (key === 'style' ? ';' : ' ') + src[key];\n } else {\n value = src[key];\n }\n }\n dst.$set(key, value, true, srcAttr[key]);\n }\n });\n\n // copy the new attributes on the old attrs object\n forEach(src, function(value, key) {\n // Check if we already set this attribute in the loop above.\n // `dst` will never contain hasOwnProperty as DOM parser won't let it.\n // You will get an \"InvalidCharacterError: DOM Exception 5\" error if you\n // have an attribute like \"has-own-property\" or \"data-has-own-property\", etc.\n if (!dst.hasOwnProperty(key) && key.charAt(0) !== '$') {\n dst[key] = value;\n\n if (key !== 'class' && key !== 'style') {\n dstAttr[key] = srcAttr[key];\n }\n }\n });\n }\n\n\n function compileTemplateUrl(directives, $compileNode, tAttrs,\n $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {\n var linkQueue = [],\n afterTemplateNodeLinkFn,\n afterTemplateChildLinkFn,\n beforeTemplateCompileNode = $compileNode[0],\n origAsyncDirective = directives.shift(),\n derivedSyncDirective = inherit(origAsyncDirective, {\n templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective\n }),\n templateUrl = (isFunction(origAsyncDirective.templateUrl))\n ? origAsyncDirective.templateUrl($compileNode, tAttrs)\n : origAsyncDirective.templateUrl,\n templateNamespace = origAsyncDirective.templateNamespace;\n\n $compileNode.empty();\n\n $templateRequest(templateUrl)\n .then(function(content) {\n var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;\n\n content = denormalizeTemplate(content);\n\n if (origAsyncDirective.replace) {\n if (jqLiteIsTextNode(content)) {\n $template = [];\n } else {\n $template = removeComments(wrapTemplate(templateNamespace, trim(content)));\n }\n compileNode = $template[0];\n\n if ($template.length !== 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {\n throw $compileMinErr('tplrt',\n 'Template for directive \\'{0}\\' must have exactly one root element. {1}',\n origAsyncDirective.name, templateUrl);\n }\n\n tempTemplateAttrs = {$attr: {}};\n replaceWith($rootElement, $compileNode, compileNode);\n var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);\n\n if (isObject(origAsyncDirective.scope)) {\n // the original directive that caused the template to be loaded async required\n // an isolate scope\n markDirectiveScope(templateDirectives, true);\n }\n directives = templateDirectives.concat(directives);\n mergeTemplateAttributes(tAttrs, tempTemplateAttrs);\n } else {\n compileNode = beforeTemplateCompileNode;\n $compileNode.html(content);\n }\n\n directives.unshift(derivedSyncDirective);\n\n afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs,\n childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns,\n previousCompileContext);\n forEach($rootElement, function(node, i) {\n if (node === compileNode) {\n $rootElement[i] = $compileNode[0];\n }\n });\n afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);\n\n while (linkQueue.length) {\n var scope = linkQueue.shift(),\n beforeTemplateLinkNode = linkQueue.shift(),\n linkRootElement = linkQueue.shift(),\n boundTranscludeFn = linkQueue.shift(),\n linkNode = $compileNode[0];\n\n if (scope.$$destroyed) continue;\n\n if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {\n var oldClasses = beforeTemplateLinkNode.className;\n\n if (!(previousCompileContext.hasElementTranscludeDirective &&\n origAsyncDirective.replace)) {\n // it was cloned therefore we have to clone as well.\n linkNode = jqLiteClone(compileNode);\n }\n replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);\n\n // Copy in CSS classes from original node\n safeAddClass(jqLite(linkNode), oldClasses);\n }\n if (afterTemplateNodeLinkFn.transcludeOnThisElement) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);\n } else {\n childBoundTranscludeFn = boundTranscludeFn;\n }\n afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,\n childBoundTranscludeFn);\n }\n linkQueue = null;\n }).catch(function(error) {\n if (isError(error)) {\n $exceptionHandler(error);\n }\n });\n\n return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {\n var childBoundTranscludeFn = boundTranscludeFn;\n if (scope.$$destroyed) return;\n if (linkQueue) {\n linkQueue.push(scope,\n node,\n rootElement,\n childBoundTranscludeFn);\n } else {\n if (afterTemplateNodeLinkFn.transcludeOnThisElement) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);\n }\n afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn);\n }\n };\n }\n\n\n /**\n * Sorting function for bound directives.\n */\n function byPriority(a, b) {\n var diff = b.priority - a.priority;\n if (diff !== 0) return diff;\n if (a.name !== b.name) return (a.name < b.name) ? -1 : 1;\n return a.index - b.index;\n }\n\n function assertNoDuplicate(what, previousDirective, directive, element) {\n\n function wrapModuleNameIfDefined(moduleName) {\n return moduleName ?\n (' (module: ' + moduleName + ')') :\n '';\n }\n\n if (previousDirective) {\n throw $compileMinErr('multidir', 'Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}',\n previousDirective.name, wrapModuleNameIfDefined(previousDirective.$$moduleName),\n directive.name, wrapModuleNameIfDefined(directive.$$moduleName), what, startingTag(element));\n }\n }\n\n\n function addTextInterpolateDirective(directives, text) {\n var interpolateFn = $interpolate(text, true);\n if (interpolateFn) {\n directives.push({\n priority: 0,\n compile: function textInterpolateCompileFn(templateNode) {\n var templateNodeParent = templateNode.parent(),\n hasCompileParent = !!templateNodeParent.length;\n\n // When transcluding a template that has bindings in the root\n // we don't have a parent and thus need to add the class during linking fn.\n if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);\n\n return function textInterpolateLinkFn(scope, node) {\n var parent = node.parent();\n if (!hasCompileParent) compile.$$addBindingClass(parent);\n compile.$$addBindingInfo(parent, interpolateFn.expressions);\n scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {\n node[0].nodeValue = value;\n });\n };\n }\n });\n }\n }\n\n\n function wrapTemplate(type, template) {\n type = lowercase(type || 'html');\n switch (type) {\n case 'svg':\n case 'math':\n var wrapper = window.document.createElement('div');\n wrapper.innerHTML = '<' + type + '>' + template + '';\n return wrapper.childNodes[0].childNodes;\n default:\n return template;\n }\n }\n\n\n function getTrustedContext(node, attrNormalizedName) {\n if (attrNormalizedName === 'srcdoc') {\n return $sce.HTML;\n }\n var tag = nodeName_(node);\n // All tags with src attributes require a RESOURCE_URL value, except for\n // img and various html5 media tags, which require the MEDIA_URL context.\n if (attrNormalizedName === 'src' || attrNormalizedName === 'ngSrc') {\n if (['img', 'video', 'audio', 'source', 'track'].indexOf(tag) === -1) {\n return $sce.RESOURCE_URL;\n }\n return $sce.MEDIA_URL;\n } else if (attrNormalizedName === 'xlinkHref') {\n // Some xlink:href are okay, most aren't\n if (tag === 'image') return $sce.MEDIA_URL;\n if (tag === 'a') return $sce.URL;\n return $sce.RESOURCE_URL;\n } else if (\n // Formaction\n (tag === 'form' && attrNormalizedName === 'action') ||\n // If relative URLs can go where they are not expected to, then\n // all sorts of trust issues can arise.\n (tag === 'base' && attrNormalizedName === 'href') ||\n // links can be stylesheets or imports, which can run script in the current origin\n (tag === 'link' && attrNormalizedName === 'href')\n ) {\n return $sce.RESOURCE_URL;\n } else if (tag === 'a' && (attrNormalizedName === 'href' ||\n attrNormalizedName === 'ngHref')) {\n return $sce.URL;\n }\n }\n\n\n function addAttrInterpolateDirective(node, directives, value, name, isNgAttr) {\n var trustedContext = getTrustedContext(node, name);\n var mustHaveExpression = !isNgAttr;\n var allOrNothing = ALL_OR_NOTHING_ATTRS[name] || isNgAttr;\n\n var interpolateFn = $interpolate(value, mustHaveExpression, trustedContext, allOrNothing);\n\n // no interpolation found -> ignore\n if (!interpolateFn) return;\n\n if (name === 'multiple' && nodeName_(node) === 'select') {\n throw $compileMinErr('selmulti',\n 'Binding to the \\'multiple\\' attribute is not supported. Element: {0}',\n startingTag(node));\n }\n\n if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {\n throw $compileMinErr('nodomevents',\n 'Interpolations for HTML DOM event attributes are disallowed. Please use the ' +\n 'ng- versions (such as ng-click instead of onclick) instead.');\n }\n\n directives.push({\n priority: 100,\n compile: function() {\n return {\n pre: function attrInterpolatePreLinkFn(scope, element, attr) {\n var $$observers = (attr.$$observers || (attr.$$observers = createMap()));\n\n // If the attribute has changed since last $interpolate()ed\n var newValue = attr[name];\n if (newValue !== value) {\n // we need to interpolate again since the attribute value has been updated\n // (e.g. by another directive's compile function)\n // ensure unset/empty values make interpolateFn falsy\n interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing);\n value = newValue;\n }\n\n // if attribute was updated so that there is no interpolation going on we don't want to\n // register any observers\n if (!interpolateFn) return;\n\n // initialize attr object so that it's ready in case we need the value for isolate\n // scope initialization, otherwise the value would not be available from isolate\n // directive's linking fn during linking phase\n attr[name] = interpolateFn(scope);\n\n ($$observers[name] || ($$observers[name] = [])).$$inter = true;\n (attr.$$observers && attr.$$observers[name].$$scope || scope).\n $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {\n //special case for class attribute addition + removal\n //so that class changes can tap into the animation\n //hooks provided by the $animate service. Be sure to\n //skip animations when the first digest occurs (when\n //both the new and the old values are the same) since\n //the CSS classes are the non-interpolated values\n if (name === 'class' && newValue !== oldValue) {\n attr.$updateClass(newValue, oldValue);\n } else {\n attr.$set(name, newValue);\n }\n });\n }\n };\n }\n });\n }\n\n\n /**\n * This is a special jqLite.replaceWith, which can replace items which\n * have no parents, provided that the containing jqLite collection is provided.\n *\n * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes\n * in the root of the tree.\n * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep\n * the shell, but replace its DOM node reference.\n * @param {Node} newNode The new DOM node.\n */\n function replaceWith($rootElement, elementsToRemove, newNode) {\n var firstElementToRemove = elementsToRemove[0],\n removeCount = elementsToRemove.length,\n parent = firstElementToRemove.parentNode,\n i, ii;\n\n if ($rootElement) {\n for (i = 0, ii = $rootElement.length; i < ii; i++) {\n if ($rootElement[i] === firstElementToRemove) {\n $rootElement[i++] = newNode;\n for (var j = i, j2 = j + removeCount - 1,\n jj = $rootElement.length;\n j < jj; j++, j2++) {\n if (j2 < jj) {\n $rootElement[j] = $rootElement[j2];\n } else {\n delete $rootElement[j];\n }\n }\n $rootElement.length -= removeCount - 1;\n\n // If the replaced element is also the jQuery .context then replace it\n // .context is a deprecated jQuery api, so we should set it only when jQuery set it\n // http://api.jquery.com/context/\n if ($rootElement.context === firstElementToRemove) {\n $rootElement.context = newNode;\n }\n break;\n }\n }\n }\n\n if (parent) {\n parent.replaceChild(newNode, firstElementToRemove);\n }\n\n // Append all the `elementsToRemove` to a fragment. This will...\n // - remove them from the DOM\n // - allow them to still be traversed with .nextSibling\n // - allow a single fragment.qSA to fetch all elements being removed\n var fragment = window.document.createDocumentFragment();\n for (i = 0; i < removeCount; i++) {\n fragment.appendChild(elementsToRemove[i]);\n }\n\n if (jqLite.hasData(firstElementToRemove)) {\n // Copy over user data (that includes AngularJS's $scope etc.). Don't copy private\n // data here because there's no public interface in jQuery to do that and copying over\n // event listeners (which is the main use of private data) wouldn't work anyway.\n jqLite.data(newNode, jqLite.data(firstElementToRemove));\n\n // Remove $destroy event listeners from `firstElementToRemove`\n jqLite(firstElementToRemove).off('$destroy');\n }\n\n // Cleanup any data/listeners on the elements and children.\n // This includes invoking the $destroy event on any elements with listeners.\n jqLite.cleanData(fragment.querySelectorAll('*'));\n\n // Update the jqLite collection to only contain the `newNode`\n for (i = 1; i < removeCount; i++) {\n delete elementsToRemove[i];\n }\n elementsToRemove[0] = newNode;\n elementsToRemove.length = 1;\n }\n\n\n function cloneAndAnnotateFn(fn, annotation) {\n return extend(function() { return fn.apply(null, arguments); }, fn, annotation);\n }\n\n\n function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) {\n try {\n linkFn(scope, $element, attrs, controllers, transcludeFn);\n } catch (e) {\n $exceptionHandler(e, startingTag($element));\n }\n }\n\n function strictBindingsCheck(attrName, directiveName) {\n if (strictComponentBindingsEnabled) {\n throw $compileMinErr('missingattr',\n 'Attribute \\'{0}\\' of \\'{1}\\' is non-optional and must be set!',\n attrName, directiveName);\n }\n }\n\n // Set up $watches for isolate scope and controller bindings.\n function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) {\n var removeWatchCollection = [];\n var initialChanges = {};\n var changes;\n\n forEach(bindings, function initializeBinding(definition, scopeName) {\n var attrName = definition.attrName,\n optional = definition.optional,\n mode = definition.mode, // @, =, <, or &\n lastValue,\n parentGet, parentSet, compare, removeWatch;\n\n switch (mode) {\n\n case '@':\n if (!optional && !hasOwnProperty.call(attrs, attrName)) {\n strictBindingsCheck(attrName, directive.name);\n destination[scopeName] = attrs[attrName] = undefined;\n\n }\n removeWatch = attrs.$observe(attrName, function(value) {\n if (isString(value) || isBoolean(value)) {\n var oldValue = destination[scopeName];\n recordChanges(scopeName, value, oldValue);\n destination[scopeName] = value;\n }\n });\n attrs.$$observers[attrName].$$scope = scope;\n lastValue = attrs[attrName];\n if (isString(lastValue)) {\n // If the attribute has been provided then we trigger an interpolation to ensure\n // the value is there for use in the link fn\n destination[scopeName] = $interpolate(lastValue)(scope);\n } else if (isBoolean(lastValue)) {\n // If the attributes is one of the BOOLEAN_ATTR then AngularJS will have converted\n // the value to boolean rather than a string, so we special case this situation\n destination[scopeName] = lastValue;\n }\n initialChanges[scopeName] = new SimpleChange(_UNINITIALIZED_VALUE, destination[scopeName]);\n removeWatchCollection.push(removeWatch);\n break;\n\n case '=':\n if (!hasOwnProperty.call(attrs, attrName)) {\n if (optional) break;\n strictBindingsCheck(attrName, directive.name);\n attrs[attrName] = undefined;\n }\n if (optional && !attrs[attrName]) break;\n\n parentGet = $parse(attrs[attrName]);\n if (parentGet.literal) {\n compare = equals;\n } else {\n compare = simpleCompare;\n }\n parentSet = parentGet.assign || function() {\n // reset the change, or we will throw this exception on every $digest\n lastValue = destination[scopeName] = parentGet(scope);\n throw $compileMinErr('nonassign',\n 'Expression \\'{0}\\' in attribute \\'{1}\\' used with directive \\'{2}\\' is non-assignable!',\n attrs[attrName], attrName, directive.name);\n };\n lastValue = destination[scopeName] = parentGet(scope);\n var parentValueWatch = function parentValueWatch(parentValue) {\n if (!compare(parentValue, destination[scopeName])) {\n // we are out of sync and need to copy\n if (!compare(parentValue, lastValue)) {\n // parent changed and it has precedence\n destination[scopeName] = parentValue;\n } else {\n // if the parent can be assigned then do so\n parentSet(scope, parentValue = destination[scopeName]);\n }\n }\n lastValue = parentValue;\n return lastValue;\n };\n parentValueWatch.$stateful = true;\n if (definition.collection) {\n removeWatch = scope.$watchCollection(attrs[attrName], parentValueWatch);\n } else {\n removeWatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);\n }\n removeWatchCollection.push(removeWatch);\n break;\n\n case '<':\n if (!hasOwnProperty.call(attrs, attrName)) {\n if (optional) break;\n strictBindingsCheck(attrName, directive.name);\n attrs[attrName] = undefined;\n }\n if (optional && !attrs[attrName]) break;\n\n parentGet = $parse(attrs[attrName]);\n var isLiteral = parentGet.literal;\n\n var initialValue = destination[scopeName] = parentGet(scope);\n initialChanges[scopeName] = new SimpleChange(_UNINITIALIZED_VALUE, destination[scopeName]);\n\n removeWatch = scope.$watch(parentGet, function parentValueWatchAction(newValue, oldValue) {\n if (oldValue === newValue) {\n if (oldValue === initialValue || (isLiteral && equals(oldValue, initialValue))) {\n return;\n }\n oldValue = initialValue;\n }\n recordChanges(scopeName, newValue, oldValue);\n destination[scopeName] = newValue;\n });\n\n removeWatchCollection.push(removeWatch);\n break;\n\n case '&':\n if (!optional && !hasOwnProperty.call(attrs, attrName)) {\n strictBindingsCheck(attrName, directive.name);\n }\n // Don't assign Object.prototype method to scope\n parentGet = attrs.hasOwnProperty(attrName) ? $parse(attrs[attrName]) : noop;\n\n // Don't assign noop to destination if expression is not valid\n if (parentGet === noop && optional) break;\n\n destination[scopeName] = function(locals) {\n return parentGet(scope, locals);\n };\n break;\n }\n });\n\n function recordChanges(key, currentValue, previousValue) {\n if (isFunction(destination.$onChanges) && !simpleCompare(currentValue, previousValue)) {\n // If we have not already scheduled the top level onChangesQueue handler then do so now\n if (!onChangesQueue) {\n scope.$$postDigest(flushOnChangesQueue);\n onChangesQueue = [];\n }\n // If we have not already queued a trigger of onChanges for this controller then do so now\n if (!changes) {\n changes = {};\n onChangesQueue.push(triggerOnChangesHook);\n }\n // If the has been a change on this property already then we need to reuse the previous value\n if (changes[key]) {\n previousValue = changes[key].previousValue;\n }\n // Store this change\n changes[key] = new SimpleChange(previousValue, currentValue);\n }\n }\n\n function triggerOnChangesHook() {\n destination.$onChanges(changes);\n // Now clear the changes so that we schedule onChanges when more changes arrive\n changes = undefined;\n }\n\n return {\n initialChanges: initialChanges,\n removeWatches: removeWatchCollection.length && function removeWatches() {\n for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) {\n removeWatchCollection[i]();\n }\n }\n };\n }\n }];\n}\n\nfunction SimpleChange(previous, current) {\n this.previousValue = previous;\n this.currentValue = current;\n}\nSimpleChange.prototype.isFirstChange = function() { return this.previousValue === _UNINITIALIZED_VALUE; };\n\n\nvar PREFIX_REGEXP = /^((?:x|data)[:\\-_])/i;\nvar SPECIAL_CHARS_REGEXP = /[:\\-_]+(.)/g;\n\n/**\n * Converts all accepted directives format into proper directive name.\n * @param name Name to normalize\n */\nfunction directiveNormalize(name) {\n return name\n .replace(PREFIX_REGEXP, '')\n .replace(SPECIAL_CHARS_REGEXP, function(_, letter, offset) {\n return offset ? letter.toUpperCase() : letter;\n });\n}\n\n/**\n * @ngdoc type\n * @name $compile.directive.Attributes\n *\n * @description\n * A shared object between directive compile / linking functions which contains normalized DOM\n * element attributes. The values reflect current binding state `{{ }}`. The normalization is\n * needed since all of these are treated as equivalent in AngularJS:\n *\n * ```\n * \n * ```\n */\n\n/**\n * @ngdoc property\n * @name $compile.directive.Attributes#$attr\n *\n * @description\n * A map of DOM element attribute names to the normalized name. This is\n * needed to do reverse lookup from normalized name back to actual name.\n */\n\n\n/**\n * @ngdoc method\n * @name $compile.directive.Attributes#$set\n * @kind function\n *\n * @description\n * Set DOM element attribute value.\n *\n *\n * @param {string} name Normalized element attribute name of the property to modify. The name is\n * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}\n * property to the original name.\n * @param {string} value Value to set the attribute to. The value can be an interpolated string.\n */\n\n\n\n/**\n * Closure compiler type information\n */\n\nfunction nodesetLinkingFn(\n /* angular.Scope */ scope,\n /* NodeList */ nodeList,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n) {}\n\nfunction directiveLinkingFn(\n /* nodesetLinkingFn */ nodesetLinkingFn,\n /* angular.Scope */ scope,\n /* Node */ node,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n) {}\n\nfunction tokenDifference(str1, str2) {\n var values = '',\n tokens1 = str1.split(/\\s+/),\n tokens2 = str2.split(/\\s+/);\n\n outer:\n for (var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for (var j = 0; j < tokens2.length; j++) {\n if (token === tokens2[j]) continue outer;\n }\n values += (values.length > 0 ? ' ' : '') + token;\n }\n return values;\n}\n\nfunction removeComments(jqNodes) {\n jqNodes = jqLite(jqNodes);\n var i = jqNodes.length;\n\n if (i <= 1) {\n return jqNodes;\n }\n\n while (i--) {\n var node = jqNodes[i];\n if (node.nodeType === NODE_TYPE_COMMENT ||\n (node.nodeType === NODE_TYPE_TEXT && node.nodeValue.trim() === '')) {\n splice.call(jqNodes, i, 1);\n }\n }\n return jqNodes;\n}\n\nvar $controllerMinErr = minErr('$controller');\n\n\nvar CNTRL_REG = /^(\\S+)(\\s+as\\s+([\\w$]+))?$/;\nfunction identifierForController(controller, ident) {\n if (ident && isString(ident)) return ident;\n if (isString(controller)) {\n var match = CNTRL_REG.exec(controller);\n if (match) return match[3];\n }\n}\n\n\n/**\n * @ngdoc provider\n * @name $controllerProvider\n * @this\n *\n * @description\n * The {@link ng.$controller $controller service} is used by AngularJS to create new\n * controllers.\n *\n * This provider allows controller registration via the\n * {@link ng.$controllerProvider#register register} method.\n */\nfunction $ControllerProvider() {\n var controllers = {};\n\n /**\n * @ngdoc method\n * @name $controllerProvider#has\n * @param {string} name Controller name to check.\n */\n this.has = function(name) {\n return controllers.hasOwnProperty(name);\n };\n\n /**\n * @ngdoc method\n * @name $controllerProvider#register\n * @param {string|Object} name Controller name, or an object map of controllers where the keys are\n * the names and the values are the constructors.\n * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI\n * annotations in the array notation).\n */\n this.register = function(name, constructor) {\n assertNotHasOwnProperty(name, 'controller');\n if (isObject(name)) {\n extend(controllers, name);\n } else {\n controllers[name] = constructor;\n }\n };\n\n this.$get = ['$injector', function($injector) {\n\n /**\n * @ngdoc service\n * @name $controller\n * @requires $injector\n *\n * @param {Function|string} constructor If called with a function then it's considered to be the\n * controller constructor function. Otherwise it's considered to be a string which is used\n * to retrieve the controller constructor using the following steps:\n *\n * * check if a controller with given name is registered via `$controllerProvider`\n * * check if evaluating the string on the current scope returns a constructor\n *\n * The string can use the `controller as property` syntax, where the controller instance is published\n * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this\n * to work correctly.\n *\n * @param {Object} locals Injection locals for Controller.\n * @return {Object} Instance of given controller.\n *\n * @description\n * `$controller` service is responsible for instantiating controllers.\n *\n * It's just a simple call to {@link auto.$injector $injector}, but extracted into\n * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).\n */\n return function $controller(expression, locals, later, ident) {\n // PRIVATE API:\n // param `later` --- indicates that the controller's constructor is invoked at a later time.\n // If true, $controller will allocate the object with the correct\n // prototype chain, but will not invoke the controller until a returned\n // callback is invoked.\n // param `ident` --- An optional label which overrides the label parsed from the controller\n // expression, if any.\n var instance, match, constructor, identifier;\n later = later === true;\n if (ident && isString(ident)) {\n identifier = ident;\n }\n\n if (isString(expression)) {\n match = expression.match(CNTRL_REG);\n if (!match) {\n throw $controllerMinErr('ctrlfmt',\n 'Badly formed controller string \\'{0}\\'. ' +\n 'Must match `__name__ as __id__` or `__name__`.', expression);\n }\n constructor = match[1];\n identifier = identifier || match[3];\n expression = controllers.hasOwnProperty(constructor)\n ? controllers[constructor]\n : getter(locals.$scope, constructor, true);\n\n if (!expression) {\n throw $controllerMinErr('ctrlreg',\n 'The controller with the name \\'{0}\\' is not registered.', constructor);\n }\n\n assertArgFn(expression, constructor, true);\n }\n\n if (later) {\n // Instantiate controller later:\n // This machinery is used to create an instance of the object before calling the\n // controller's constructor itself.\n //\n // This allows properties to be added to the controller before the constructor is\n // invoked. Primarily, this is used for isolate scope bindings in $compile.\n //\n // This feature is not intended for use by applications, and is thus not documented\n // publicly.\n // Object creation: http://jsperf.com/create-constructor/2\n var controllerPrototype = (isArray(expression) ?\n expression[expression.length - 1] : expression).prototype;\n instance = Object.create(controllerPrototype || null);\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return extend(function $controllerInit() {\n var result = $injector.invoke(expression, instance, locals, constructor);\n if (result !== instance && (isObject(result) || isFunction(result))) {\n instance = result;\n if (identifier) {\n // If result changed, re-assign controllerAs value to scope.\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n }\n return instance;\n }, {\n instance: instance,\n identifier: identifier\n });\n }\n\n instance = $injector.instantiate(expression, locals, constructor);\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return instance;\n };\n\n function addIdentifier(locals, identifier, instance, name) {\n if (!(locals && isObject(locals.$scope))) {\n throw minErr('$controller')('noscp',\n 'Cannot export controller \\'{0}\\' as \\'{1}\\'! No $scope object provided via `locals`.',\n name, identifier);\n }\n\n locals.$scope[identifier] = instance;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $document\n * @requires $window\n * @this\n *\n * @description\n * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.\n *\n * @example\n \n \n
\n

$document title:

\n

window.document title:

\n
\n
\n \n angular.module('documentExample', [])\n .controller('ExampleController', ['$scope', '$document', function($scope, $document) {\n $scope.title = $document[0].title;\n $scope.windowTitle = angular.element(window.document)[0].title;\n }]);\n \n
\n */\nfunction $DocumentProvider() {\n this.$get = ['$window', function(window) {\n return jqLite(window.document);\n }];\n}\n\n\n/**\n * @private\n * @this\n * Listens for document visibility change and makes the current status accessible.\n */\nfunction $$IsDocumentHiddenProvider() {\n this.$get = ['$document', '$rootScope', function($document, $rootScope) {\n var doc = $document[0];\n var hidden = doc && doc.hidden;\n\n $document.on('visibilitychange', changeListener);\n\n $rootScope.$on('$destroy', function() {\n $document.off('visibilitychange', changeListener);\n });\n\n function changeListener() {\n hidden = doc.hidden;\n }\n\n return function() {\n return hidden;\n };\n }];\n}\n\n/**\n * @ngdoc service\n * @name $exceptionHandler\n * @requires ng.$log\n * @this\n *\n * @description\n * Any uncaught exception in AngularJS expressions is delegated to this service.\n * The default implementation simply delegates to `$log.error` which logs it into\n * the browser console.\n *\n * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by\n * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.\n *\n * ## Example:\n *\n * The example below will overwrite the default `$exceptionHandler` in order to (a) log uncaught\n * errors to the backend for later inspection by the developers and (b) to use `$log.warn()` instead\n * of `$log.error()`.\n *\n * ```js\n * angular.\n * module('exceptionOverwrite', []).\n * factory('$exceptionHandler', ['$log', 'logErrorsToBackend', function($log, logErrorsToBackend) {\n * return function myExceptionHandler(exception, cause) {\n * logErrorsToBackend(exception, cause);\n * $log.warn(exception, cause);\n * };\n * }]);\n * ```\n *\n *
\n * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`\n * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}\n * (unless executed during a digest).\n *\n * If you wish, you can manually delegate exceptions, e.g.\n * `try { ... } catch(e) { $exceptionHandler(e); }`\n *\n * @param {Error} exception Exception associated with the error.\n * @param {string=} cause Optional information about the context in which\n * the error was thrown.\n *\n */\nfunction $ExceptionHandlerProvider() {\n this.$get = ['$log', function($log) {\n return function(exception, cause) {\n $log.error.apply($log, arguments);\n };\n }];\n}\n\nvar $$ForceReflowProvider = /** @this */ function() {\n this.$get = ['$document', function($document) {\n return function(domNode) {\n //the line below will force the browser to perform a repaint so\n //that all the animated elements within the animation frame will\n //be properly updated and drawn on screen. This is required to\n //ensure that the preparation animation is properly flushed so that\n //the active state picks up from there. DO NOT REMOVE THIS LINE.\n //DO NOT OPTIMIZE THIS LINE. THE MINIFIER WILL REMOVE IT OTHERWISE WHICH\n //WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND\n //WILL TAKE YEARS AWAY FROM YOUR LIFE.\n if (domNode) {\n if (!domNode.nodeType && domNode instanceof jqLite) {\n domNode = domNode[0];\n }\n } else {\n domNode = $document[0].body;\n }\n return domNode.offsetWidth + 1;\n };\n }];\n};\n\nvar APPLICATION_JSON = 'application/json';\nvar CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'};\nvar JSON_START = /^\\[|^\\{(?!\\{)/;\nvar JSON_ENDS = {\n '[': /]$/,\n '{': /}$/\n};\nvar JSON_PROTECTION_PREFIX = /^\\)]\\}',?\\n/;\nvar $httpMinErr = minErr('$http');\n\nfunction serializeValue(v) {\n if (isObject(v)) {\n return isDate(v) ? v.toISOString() : toJson(v);\n }\n return v;\n}\n\n\n/** @this */\nfunction $HttpParamSerializerProvider() {\n /**\n * @ngdoc service\n * @name $httpParamSerializer\n * @description\n *\n * Default {@link $http `$http`} params serializer that converts objects to strings\n * according to the following rules:\n *\n * * `{'foo': 'bar'}` results in `foo=bar`\n * * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)\n * * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)\n * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object)\n *\n * Note that serializer will sort the request parameters alphabetically.\n */\n\n this.$get = function() {\n return function ngParamSerializer(params) {\n if (!params) return '';\n var parts = [];\n forEachSorted(params, function(value, key) {\n if (value === null || isUndefined(value) || isFunction(value)) return;\n if (isArray(value)) {\n forEach(value, function(v) {\n parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(v)));\n });\n } else {\n parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(value)));\n }\n });\n\n return parts.join('&');\n };\n };\n}\n\n/** @this */\nfunction $HttpParamSerializerJQLikeProvider() {\n /**\n * @ngdoc service\n * @name $httpParamSerializerJQLike\n *\n * @description\n *\n * Alternative {@link $http `$http`} params serializer that follows\n * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.\n * The serializer will also sort the params alphabetically.\n *\n * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:\n *\n * ```js\n * $http({\n * url: myUrl,\n * method: 'GET',\n * params: myParams,\n * paramSerializer: '$httpParamSerializerJQLike'\n * });\n * ```\n *\n * It is also possible to set it as the default `paramSerializer` in the\n * {@link $httpProvider#defaults `$httpProvider`}.\n *\n * Additionally, you can inject the serializer and use it explicitly, for example to serialize\n * form data for submission:\n *\n * ```js\n * .controller(function($http, $httpParamSerializerJQLike) {\n * //...\n *\n * $http({\n * url: myUrl,\n * method: 'POST',\n * data: $httpParamSerializerJQLike(myData),\n * headers: {\n * 'Content-Type': 'application/x-www-form-urlencoded'\n * }\n * });\n *\n * });\n * ```\n *\n */\n this.$get = function() {\n return function jQueryLikeParamSerializer(params) {\n if (!params) return '';\n var parts = [];\n serialize(params, '', true);\n return parts.join('&');\n\n function serialize(toSerialize, prefix, topLevel) {\n if (isArray(toSerialize)) {\n forEach(toSerialize, function(value, index) {\n serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']');\n });\n } else if (isObject(toSerialize) && !isDate(toSerialize)) {\n forEachSorted(toSerialize, function(value, key) {\n serialize(value, prefix +\n (topLevel ? '' : '[') +\n key +\n (topLevel ? '' : ']'));\n });\n } else {\n if (isFunction(toSerialize)) {\n toSerialize = toSerialize();\n }\n parts.push(encodeUriQuery(prefix) + '=' +\n (toSerialize == null ? '' : encodeUriQuery(serializeValue(toSerialize))));\n }\n }\n };\n };\n}\n\nfunction defaultHttpResponseTransform(data, headers) {\n if (isString(data)) {\n // Strip json vulnerability protection prefix and trim whitespace\n var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim();\n\n if (tempData) {\n var contentType = headers('Content-Type');\n var hasJsonContentType = contentType && (contentType.indexOf(APPLICATION_JSON) === 0);\n\n if (hasJsonContentType || isJsonLike(tempData)) {\n try {\n data = fromJson(tempData);\n } catch (e) {\n if (!hasJsonContentType) {\n return data;\n }\n throw $httpMinErr('baddata', 'Data must be a valid JSON object. Received: \"{0}\". ' +\n 'Parse error: \"{1}\"', data, e);\n }\n }\n }\n }\n\n return data;\n}\n\nfunction isJsonLike(str) {\n var jsonStart = str.match(JSON_START);\n return jsonStart && JSON_ENDS[jsonStart[0]].test(str);\n}\n\n/**\n * Parse headers into key value object\n *\n * @param {string} headers Raw headers as a string\n * @returns {Object} Parsed headers as key value object\n */\nfunction parseHeaders(headers) {\n var parsed = createMap(), i;\n\n function fillInParsed(key, val) {\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n\n if (isString(headers)) {\n forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n fillInParsed(lowercase(trim(line.substr(0, i))), trim(line.substr(i + 1)));\n });\n } else if (isObject(headers)) {\n forEach(headers, function(headerVal, headerKey) {\n fillInParsed(lowercase(headerKey), trim(headerVal));\n });\n }\n\n return parsed;\n}\n\n\n/**\n * Returns a function that provides access to parsed headers.\n *\n * Headers are lazy parsed when first requested.\n * @see parseHeaders\n *\n * @param {(string|Object)} headers Headers to provide access to.\n * @returns {function(string=)} Returns a getter function which if called with:\n *\n * - if called with an argument returns a single header value or null\n * - if called with no arguments returns an object containing all headers.\n */\nfunction headersGetter(headers) {\n var headersObj;\n\n return function(name) {\n if (!headersObj) headersObj = parseHeaders(headers);\n\n if (name) {\n var value = headersObj[lowercase(name)];\n if (value === undefined) {\n value = null;\n }\n return value;\n }\n\n return headersObj;\n };\n}\n\n\n/**\n * Chain all given functions\n *\n * This function is used for both request and response transforming\n *\n * @param {*} data Data to transform.\n * @param {function(string=)} headers HTTP headers getter fn.\n * @param {number} status HTTP status code of the response.\n * @param {(Function|Array.)} fns Function or an array of functions.\n * @returns {*} Transformed data.\n */\nfunction transformData(data, headers, status, fns) {\n if (isFunction(fns)) {\n return fns(data, headers, status);\n }\n\n forEach(fns, function(fn) {\n data = fn(data, headers, status);\n });\n\n return data;\n}\n\n\nfunction isSuccess(status) {\n return 200 <= status && status < 300;\n}\n\n\n/**\n * @ngdoc provider\n * @name $httpProvider\n * @this\n *\n * @description\n * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.\n */\nfunction $HttpProvider() {\n /**\n * @ngdoc property\n * @name $httpProvider#defaults\n * @description\n *\n * Object containing default values for all {@link ng.$http $http} requests.\n *\n * - **`defaults.cache`** - {boolean|Object} - A boolean value or object created with\n * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of HTTP responses\n * by default. See {@link $http#caching $http Caching} for more information.\n *\n * - **`defaults.headers`** - {Object} - Default headers for all $http requests.\n * Refer to {@link ng.$http#setting-http-headers $http} for documentation on\n * setting default headers.\n * - **`defaults.headers.common`**\n * - **`defaults.headers.post`**\n * - **`defaults.headers.put`**\n * - **`defaults.headers.patch`**\n *\n * - **`defaults.jsonpCallbackParam`** - `{string}` - the name of the query parameter that passes the name of the\n * callback in a JSONP request. The value of this parameter will be replaced with the expression generated by the\n * {@link $jsonpCallbacks} service. Defaults to `'callback'`.\n *\n * - **`defaults.paramSerializer`** - `{string|function(Object):string}` - A function\n * used to the prepare string representation of request parameters (specified as an object).\n * If specified as string, it is interpreted as a function registered with the {@link auto.$injector $injector}.\n * Defaults to {@link ng.$httpParamSerializer $httpParamSerializer}.\n *\n * - **`defaults.transformRequest`** -\n * `{Array|function(data, headersGetter)}` -\n * An array of functions (or a single function) which are applied to the request data.\n * By default, this is an array with one request transformation function:\n *\n * - If the `data` property of the request configuration object contains an object, serialize it\n * into JSON format.\n *\n * - **`defaults.transformResponse`** -\n * `{Array|function(data, headersGetter, status)}` -\n * An array of functions (or a single function) which are applied to the response data. By default,\n * this is an array which applies one response transformation function that does two things:\n *\n * - If XSRF prefix is detected, strip it\n * (see {@link ng.$http#security-considerations Security Considerations in the $http docs}).\n * - If the `Content-Type` is `application/json` or the response looks like JSON,\n * deserialize it using a JSON parser.\n *\n * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.\n * Defaults value is `'XSRF-TOKEN'`.\n *\n * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the\n * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.\n *\n */\n var defaults = this.defaults = {\n // transform incoming response data\n transformResponse: [defaultHttpResponseTransform],\n\n // transform outgoing request data\n transformRequest: [function(d) {\n return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d;\n }],\n\n // default headers\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n paramSerializer: '$httpParamSerializer',\n\n jsonpCallbackParam: 'callback'\n };\n\n var useApplyAsync = false;\n /**\n * @ngdoc method\n * @name $httpProvider#useApplyAsync\n * @description\n *\n * Configure $http service to combine processing of multiple http responses received at around\n * the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in\n * significant performance improvement for bigger applications that make many HTTP requests\n * concurrently (common during application bootstrap).\n *\n * Defaults to false. If no value is specified, returns the current configured value.\n *\n * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred\n * \"apply\" on the next tick, giving time for subsequent requests in a roughly ~10ms window\n * to load and share the same digest cycle.\n *\n * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.\n * otherwise, returns the current configured value.\n */\n this.useApplyAsync = function(value) {\n if (isDefined(value)) {\n useApplyAsync = !!value;\n return this;\n }\n return useApplyAsync;\n };\n\n /**\n * @ngdoc property\n * @name $httpProvider#interceptors\n * @description\n *\n * Array containing service factories for all synchronous or asynchronous {@link ng.$http $http}\n * pre-processing of request or postprocessing of responses.\n *\n * These service factories are ordered by request, i.e. they are applied in the same order as the\n * array, on request, but reverse order, on response.\n *\n * {@link ng.$http#interceptors Interceptors detailed info}\n */\n var interceptorFactories = this.interceptors = [];\n\n /**\n * @ngdoc property\n * @name $httpProvider#xsrfWhitelistedOrigins\n * @description\n *\n * Array containing URLs whose origins are trusted to receive the XSRF token. See the\n * {@link ng.$http#security-considerations Security Considerations} sections for more details on\n * XSRF.\n *\n * **Note:** An \"origin\" consists of the [URI scheme](https://en.wikipedia.org/wiki/URI_scheme),\n * the [hostname](https://en.wikipedia.org/wiki/Hostname) and the\n * [port number](https://en.wikipedia.org/wiki/Port_(computer_networking). For `http:` and\n * `https:`, the port number can be omitted if using th default ports (80 and 443 respectively).\n * Examples: `http://example.com`, `https://api.example.com:9876`\n *\n *
\n * It is not possible to whitelist specific URLs/paths. The `path`, `query` and `fragment` parts\n * of a URL will be ignored. For example, `https://foo.com/path/bar?query=baz#fragment` will be\n * treated as `https://foo.com`, meaning that **all** requests to URLs starting with\n * `https://foo.com/` will include the XSRF token.\n *
\n *\n * @example\n *\n * ```js\n * // App served from `https://example.com/`.\n * angular.\n * module('xsrfWhitelistedOriginsExample', []).\n * config(['$httpProvider', function($httpProvider) {\n * $httpProvider.xsrfWhitelistedOrigins.push('https://api.example.com');\n * }]).\n * run(['$http', function($http) {\n * // The XSRF token will be sent.\n * $http.get('https://api.example.com/preferences').then(...);\n *\n * // The XSRF token will NOT be sent.\n * $http.get('https://stats.example.com/activity').then(...);\n * }]);\n * ```\n */\n var xsrfWhitelistedOrigins = this.xsrfWhitelistedOrigins = [];\n\n this.$get = ['$browser', '$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector', '$sce',\n function($browser, $httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector, $sce) {\n\n var defaultCache = $cacheFactory('$http');\n\n /**\n * Make sure that default param serializer is exposed as a function\n */\n defaults.paramSerializer = isString(defaults.paramSerializer) ?\n $injector.get(defaults.paramSerializer) : defaults.paramSerializer;\n\n /**\n * Interceptors stored in reverse order. Inner interceptors before outer interceptors.\n * The reversal is needed so that we can build up the interception chain around the\n * server request.\n */\n var reversedInterceptors = [];\n\n forEach(interceptorFactories, function(interceptorFactory) {\n reversedInterceptors.unshift(isString(interceptorFactory)\n ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));\n });\n\n /**\n * A function to check request URLs against a list of allowed origins.\n */\n var urlIsAllowedOrigin = urlIsAllowedOriginFactory(xsrfWhitelistedOrigins);\n\n /**\n * @ngdoc service\n * @kind function\n * @name $http\n * @requires ng.$httpBackend\n * @requires $cacheFactory\n * @requires $rootScope\n * @requires $q\n * @requires $injector\n *\n * @description\n * The `$http` service is a core AngularJS service that facilitates communication with the remote\n * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)\n * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).\n *\n * For unit testing applications that use `$http` service, see\n * {@link ngMock.$httpBackend $httpBackend mock}.\n *\n * For a higher level of abstraction, please check out the {@link ngResource.$resource\n * $resource} service.\n *\n * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by\n * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage\n * it is important to familiarize yourself with these APIs and the guarantees they provide.\n *\n *\n * ## General usage\n * The `$http` service is a function which takes a single argument — a {@link $http#usage configuration object} —\n * that is used to generate an HTTP request and returns a {@link ng.$q promise} that is\n * resolved (request success) or rejected (request failure) with a\n * {@link ng.$http#$http-returns response} object.\n *\n * ```js\n * // Simple GET request example:\n * $http({\n * method: 'GET',\n * url: '/someUrl'\n * }).then(function successCallback(response) {\n * // this callback will be called asynchronously\n * // when the response is available\n * }, function errorCallback(response) {\n * // called asynchronously if an error occurs\n * // or server returns response with an error status.\n * });\n * ```\n *\n *\n * ## Shortcut methods\n *\n * Shortcut methods are also available. All shortcut methods require passing in the URL, and\n * request data must be passed in for POST/PUT requests. An optional config can be passed as the\n * last argument.\n *\n * ```js\n * $http.get('/someUrl', config).then(successCallback, errorCallback);\n * $http.post('/someUrl', data, config).then(successCallback, errorCallback);\n * ```\n *\n * Complete list of shortcut methods:\n *\n * - {@link ng.$http#get $http.get}\n * - {@link ng.$http#head $http.head}\n * - {@link ng.$http#post $http.post}\n * - {@link ng.$http#put $http.put}\n * - {@link ng.$http#delete $http.delete}\n * - {@link ng.$http#jsonp $http.jsonp}\n * - {@link ng.$http#patch $http.patch}\n *\n *\n * ## Writing Unit Tests that use $http\n * When unit testing (using {@link ngMock ngMock}), it is necessary to call\n * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending\n * request using trained responses.\n *\n * ```\n * $httpBackend.expectGET(...);\n * $http.get(...);\n * $httpBackend.flush();\n * ```\n *\n * ## Setting HTTP Headers\n *\n * The $http service will automatically add certain HTTP headers to all requests. These defaults\n * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration\n * object, which currently contains this default configuration:\n *\n * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):\n * - Accept: application/json, text/plain, \\*/\\*\n * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)\n * - `Content-Type: application/json`\n * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)\n * - `Content-Type: application/json`\n *\n * To add or overwrite these defaults, simply add or remove a property from these configuration\n * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object\n * with the lowercased HTTP method name as the key, e.g.\n * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }`.\n *\n * The defaults can also be set at runtime via the `$http.defaults` object in the same\n * fashion. For example:\n *\n * ```\n * module.run(function($http) {\n * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w';\n * });\n * ```\n *\n * In addition, you can supply a `headers` property in the config object passed when\n * calling `$http(config)`, which overrides the defaults without changing them globally.\n *\n * To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis,\n * Use the `headers` property, setting the desired header to `undefined`. For example:\n *\n * ```js\n * var req = {\n * method: 'POST',\n * url: 'http://example.com',\n * headers: {\n * 'Content-Type': undefined\n * },\n * data: { test: 'test' }\n * }\n *\n * $http(req).then(function(){...}, function(){...});\n * ```\n *\n * ## Transforming Requests and Responses\n *\n * Both requests and responses can be transformed using transformation functions: `transformRequest`\n * and `transformResponse`. These properties can be a single function that returns\n * the transformed value (`function(data, headersGetter, status)`) or an array of such transformation functions,\n * which allows you to `push` or `unshift` a new transformation function into the transformation chain.\n *\n *
\n * **Note:** AngularJS does not make a copy of the `data` parameter before it is passed into the `transformRequest` pipeline.\n * That means changes to the properties of `data` are not local to the transform function (since Javascript passes objects by reference).\n * For example, when calling `$http.get(url, $scope.myObject)`, modifications to the object's properties in a transformRequest\n * function will be reflected on the scope and in any templates where the object is data-bound.\n * To prevent this, transform functions should have no side-effects.\n * If you need to modify properties, it is recommended to make a copy of the data, or create new object to return.\n *
\n *\n * ### Default Transformations\n *\n * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and\n * `defaults.transformResponse` properties. If a request does not provide its own transformations\n * then these will be applied.\n *\n * You can augment or replace the default transformations by modifying these properties by adding to or\n * replacing the array.\n *\n * AngularJS provides the following default transformations:\n *\n * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`) is\n * an array with one function that does the following:\n *\n * - If the `data` property of the request configuration object contains an object, serialize it\n * into JSON format.\n *\n * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`) is\n * an array with one function that does the following:\n *\n * - If XSRF prefix is detected, strip it (see Security Considerations section below).\n * - If the `Content-Type` is `application/json` or the response looks like JSON,\n * deserialize it using a JSON parser.\n *\n *\n * ### Overriding the Default Transformations Per Request\n *\n * If you wish to override the request/response transformations only for a single request then provide\n * `transformRequest` and/or `transformResponse` properties on the configuration object passed\n * into `$http`.\n *\n * Note that if you provide these properties on the config object the default transformations will be\n * overwritten. If you wish to augment the default transformations then you must include them in your\n * local transformation array.\n *\n * The following code demonstrates adding a new response transformation to be run after the default response\n * transformations have been run.\n *\n * ```js\n * function appendTransform(defaults, transform) {\n *\n * // We can't guarantee that the default transformation is an array\n * defaults = angular.isArray(defaults) ? defaults : [defaults];\n *\n * // Append the new transformation to the defaults\n * return defaults.concat(transform);\n * }\n *\n * $http({\n * url: '...',\n * method: 'GET',\n * transformResponse: appendTransform($http.defaults.transformResponse, function(value) {\n * return doTransform(value);\n * })\n * });\n * ```\n *\n *\n * ## Caching\n *\n * {@link ng.$http `$http`} responses are not cached by default. To enable caching, you must\n * set the config.cache value or the default cache value to TRUE or to a cache object (created\n * with {@link ng.$cacheFactory `$cacheFactory`}). If defined, the value of config.cache takes\n * precedence over the default cache value.\n *\n * In order to:\n * * cache all responses - set the default cache value to TRUE or to a cache object\n * * cache a specific response - set config.cache value to TRUE or to a cache object\n *\n * If caching is enabled, but neither the default cache nor config.cache are set to a cache object,\n * then the default `$cacheFactory(\"$http\")` object is used.\n *\n * The default cache value can be set by updating the\n * {@link ng.$http#defaults `$http.defaults.cache`} property or the\n * {@link $httpProvider#defaults `$httpProvider.defaults.cache`} property.\n *\n * When caching is enabled, {@link ng.$http `$http`} stores the response from the server using\n * the relevant cache object. The next time the same request is made, the response is returned\n * from the cache without sending a request to the server.\n *\n * Take note that:\n *\n * * Only GET and JSONP requests are cached.\n * * The cache key is the request URL including search parameters; headers are not considered.\n * * Cached responses are returned asynchronously, in the same way as responses from the server.\n * * If multiple identical requests are made using the same cache, which is not yet populated,\n * one request will be made to the server and remaining requests will return the same response.\n * * A cache-control header on the response does not affect if or how responses are cached.\n *\n *\n * ## Interceptors\n *\n * Before you start creating interceptors, be sure to understand the\n * {@link ng.$q $q and deferred/promise APIs}.\n *\n * For purposes of global error handling, authentication, or any kind of synchronous or\n * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be\n * able to intercept requests before they are handed to the server and\n * responses before they are handed over to the application code that\n * initiated these requests. The interceptors leverage the {@link ng.$q\n * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.\n *\n * The interceptors are service factories that are registered with the `$httpProvider` by\n * adding them to the `$httpProvider.interceptors` array. The factory is called and\n * injected with dependencies (if specified) and returns the interceptor.\n *\n * There are two kinds of interceptors (and two kinds of rejection interceptors):\n *\n * * `request`: interceptors get called with a http {@link $http#usage config} object. The function is free to\n * modify the `config` object or create a new one. The function needs to return the `config`\n * object directly, or a promise containing the `config` or a new `config` object.\n * * `requestError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n * * `response`: interceptors get called with http `response` object. The function is free to\n * modify the `response` object or create a new one. The function needs to return the `response`\n * object directly, or as a promise containing the `response` or a new `response` object.\n * * `responseError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n *\n *\n * ```js\n * // register the interceptor as a service\n * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n * return {\n * // optional method\n * 'request': function(config) {\n * // do something on success\n * return config;\n * },\n *\n * // optional method\n * 'requestError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * },\n *\n *\n *\n * // optional method\n * 'response': function(response) {\n * // do something on success\n * return response;\n * },\n *\n * // optional method\n * 'responseError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * }\n * };\n * });\n *\n * $httpProvider.interceptors.push('myHttpInterceptor');\n *\n *\n * // alternatively, register the interceptor via an anonymous factory\n * $httpProvider.interceptors.push(function($q, dependency1, dependency2) {\n * return {\n * 'request': function(config) {\n * // same as above\n * },\n *\n * 'response': function(response) {\n * // same as above\n * }\n * };\n * });\n * ```\n *\n * ## Security Considerations\n *\n * When designing web applications, consider security threats from:\n *\n * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)\n *\n * Both server and the client must cooperate in order to eliminate these threats. AngularJS comes\n * pre-configured with strategies that address these issues, but for this to work backend server\n * cooperation is required.\n *\n * ### JSON Vulnerability Protection\n *\n * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * allows third party website to turn your JSON resource URL into\n * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To\n * counter this your server can prefix all JSON requests with following string `\")]}',\\n\"`.\n * AngularJS will automatically strip the prefix before processing it as JSON.\n *\n * For example if your server needs to return:\n * ```js\n * ['one','two']\n * ```\n *\n * which is vulnerable to attack, your server can return:\n * ```js\n * )]}',\n * ['one','two']\n * ```\n *\n * AngularJS will strip the prefix, before processing the JSON.\n *\n *\n * ### Cross Site Request Forgery (XSRF) Protection\n *\n * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is an attack technique by\n * which the attacker can trick an authenticated user into unknowingly executing actions on your\n * website. AngularJS provides a mechanism to counter XSRF. When performing XHR requests, the\n * $http service reads a token from a cookie (by default, `XSRF-TOKEN`) and sets it as an HTTP\n * header (by default `X-XSRF-TOKEN`). Since only JavaScript that runs on your domain could read\n * the cookie, your server can be assured that the XHR came from JavaScript running on your\n * domain.\n *\n * To take advantage of this, your server needs to set a token in a JavaScript readable session\n * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the\n * server can verify that the cookie matches the `X-XSRF-TOKEN` HTTP header, and therefore be\n * sure that only JavaScript running on your domain could have sent the request. The token must\n * be unique for each user and must be verifiable by the server (to prevent the JavaScript from\n * making up its own tokens). We recommend that the token is a digest of your site's\n * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography))\n * for added security.\n *\n * The header will — by default — **not** be set for cross-domain requests. This\n * prevents unauthorized servers (e.g. malicious or compromised 3rd-party APIs) from gaining\n * access to your users' XSRF tokens and exposing them to Cross Site Request Forgery. If you\n * want to, you can whitelist additional origins to also receive the XSRF token, by adding them\n * to {@link ng.$httpProvider#xsrfWhitelistedOrigins xsrfWhitelistedOrigins}. This might be\n * useful, for example, if your application, served from `example.com`, needs to access your API\n * at `api.example.com`.\n * See {@link ng.$httpProvider#xsrfWhitelistedOrigins $httpProvider.xsrfWhitelistedOrigins} for\n * more details.\n *\n *
\n * **Warning**
\n * Only whitelist origins that you have control over and make sure you understand the\n * implications of doing so.\n *
\n *\n * The name of the cookie and the header can be specified using the `xsrfCookieName` and\n * `xsrfHeaderName` properties of either `$httpProvider.defaults` at config-time,\n * `$http.defaults` at run-time, or the per-request config object.\n *\n * In order to prevent collisions in environments where multiple AngularJS apps share the\n * same domain or subdomain, we recommend that each application uses a unique cookie name.\n *\n *\n * @param {object} config Object describing the request to be made and how it should be\n * processed. The object has following properties:\n *\n * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)\n * - **url** – `{string|TrustedObject}` – Absolute or relative URL of the resource that is being requested;\n * or an object created by a call to `$sce.trustAsResourceUrl(url)`.\n * - **params** – `{Object.}` – Map of strings or objects which will be serialized\n * with the `paramSerializer` and appended as GET parameters.\n * - **data** – `{string|Object}` – Data to be sent as the request message data.\n * - **headers** – `{Object}` – Map of strings or functions which return strings representing\n * HTTP headers to send to the server. If the return value of a function is null, the\n * header will not be sent. Functions accept a config object as an argument.\n * - **eventHandlers** - `{Object}` - Event listeners to be bound to the XMLHttpRequest object.\n * To bind events to the XMLHttpRequest upload object, use `uploadEventHandlers`.\n * The handler will be called in the context of a `$apply` block.\n * - **uploadEventHandlers** - `{Object}` - Event listeners to be bound to the XMLHttpRequest upload\n * object. To bind events to the XMLHttpRequest object, use `eventHandlers`.\n * The handler will be called in the context of a `$apply` block.\n * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.\n * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.\n * - **transformRequest** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * request body and headers and returns its transformed (typically serialized) version.\n * See {@link ng.$http#overriding-the-default-transformations-per-request\n * Overriding the Default Transformations}\n * - **transformResponse** –\n * `{function(data, headersGetter, status)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * response body, headers and status and returns its transformed (typically deserialized) version.\n * See {@link ng.$http#overriding-the-default-transformations-per-request\n * Overriding the Default Transformations}\n * - **paramSerializer** - `{string|function(Object):string}` - A function used to\n * prepare the string representation of request parameters (specified as an object).\n * If specified as string, it is interpreted as function registered with the\n * {@link $injector $injector}, which means you can create your own serializer\n * by registering it as a {@link auto.$provide#service service}.\n * The default serializer is the {@link $httpParamSerializer $httpParamSerializer};\n * alternatively, you can use the {@link $httpParamSerializerJQLike $httpParamSerializerJQLike}\n * - **cache** – `{boolean|Object}` – A boolean value or object created with\n * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of the HTTP response.\n * See {@link $http#caching $http Caching} for more information.\n * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}\n * that should abort the request when resolved.\n *\n * A numerical timeout or a promise returned from {@link ng.$timeout $timeout}, will set\n * the `xhrStatus` in the {@link $http#$http-returns response} to \"timeout\", and any other\n * resolved promise will set it to \"abort\", following standard XMLHttpRequest behavior.\n *\n * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the\n * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)\n * for more information.\n * - **responseType** - `{string}` - see\n * [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype).\n *\n * @returns {HttpPromise} A {@link ng.$q `Promise}` that will be resolved (request success)\n * or rejected (request failure) with a response object.\n *\n * The response object has these properties:\n *\n * - **data** – `{string|Object}` – The response body transformed with\n * the transform functions.\n * - **status** – `{number}` – HTTP status code of the response.\n * - **headers** – `{function([headerName])}` – Header getter function.\n * - **config** – `{Object}` – The configuration object that was used\n * to generate the request.\n * - **statusText** – `{string}` – HTTP status text of the response.\n * - **xhrStatus** – `{string}` – Status of the XMLHttpRequest\n * (`complete`, `error`, `timeout` or `abort`).\n *\n *\n * A response status code between 200 and 299 is considered a success status\n * and will result in the success callback being called. Any response status\n * code outside of that range is considered an error status and will result\n * in the error callback being called.\n * Also, status codes less than -1 are normalized to zero. -1 usually means\n * the request was aborted, e.g. using a `config.timeout`. More information\n * about the status might be available in the `xhrStatus` property.\n *\n * Note that if the response is a redirect, XMLHttpRequest will transparently\n * follow it, meaning that the outcome (success or error) will be determined\n * by the final response status code.\n *\n *\n * @property {Array.} pendingRequests Array of config objects for currently pending\n * requests. This is primarily meant to be used for debugging purposes.\n *\n *\n * @example\n\n\n
\n \n \n
\n \n \n \n
http status code: {{status}}
\n
http response data: {{data}}
\n
\n
\n\n angular.module('httpExample', [])\n .config(['$sceDelegateProvider', function($sceDelegateProvider) {\n // We must whitelist the JSONP endpoint that we are using to show that we trust it\n $sceDelegateProvider.resourceUrlWhitelist([\n 'self',\n 'https://angularjs.org/**'\n ]);\n }])\n .controller('FetchController', ['$scope', '$http', '$templateCache',\n function($scope, $http, $templateCache) {\n $scope.method = 'GET';\n $scope.url = 'http-hello.html';\n\n $scope.fetch = function() {\n $scope.code = null;\n $scope.response = null;\n\n $http({method: $scope.method, url: $scope.url, cache: $templateCache}).\n then(function(response) {\n $scope.status = response.status;\n $scope.data = response.data;\n }, function(response) {\n $scope.data = response.data || 'Request failed';\n $scope.status = response.status;\n });\n };\n\n $scope.updateModel = function(method, url) {\n $scope.method = method;\n $scope.url = url;\n };\n }]);\n\n\n Hello, $http!\n\n\n var status = element(by.binding('status'));\n var data = element(by.binding('data'));\n var fetchBtn = element(by.id('fetchbtn'));\n var sampleGetBtn = element(by.id('samplegetbtn'));\n var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));\n\n it('should make an xhr GET request', function() {\n sampleGetBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('200');\n expect(data.getText()).toMatch(/Hello, \\$http!/);\n });\n\n// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185\n// it('should make a JSONP request to angularjs.org', function() {\n// var sampleJsonpBtn = element(by.id('samplejsonpbtn'));\n// sampleJsonpBtn.click();\n// fetchBtn.click();\n// expect(status.getText()).toMatch('200');\n// expect(data.getText()).toMatch(/Super Hero!/);\n// });\n\n it('should make JSONP request to invalid URL and invoke the error handler',\n function() {\n invalidJsonpBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('0');\n expect(data.getText()).toMatch('Request failed');\n });\n\n
\n */\n function $http(requestConfig) {\n\n if (!isObject(requestConfig)) {\n throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig);\n }\n\n if (!isString($sce.valueOf(requestConfig.url))) {\n throw minErr('$http')('badreq', 'Http request configuration url must be a string or a $sce trusted object. Received: {0}', requestConfig.url);\n }\n\n var config = extend({\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse,\n paramSerializer: defaults.paramSerializer,\n jsonpCallbackParam: defaults.jsonpCallbackParam\n }, requestConfig);\n\n config.headers = mergeHeaders(requestConfig);\n config.method = uppercase(config.method);\n config.paramSerializer = isString(config.paramSerializer) ?\n $injector.get(config.paramSerializer) : config.paramSerializer;\n\n $browser.$$incOutstandingRequestCount();\n\n var requestInterceptors = [];\n var responseInterceptors = [];\n var promise = $q.resolve(config);\n\n // apply interceptors\n forEach(reversedInterceptors, function(interceptor) {\n if (interceptor.request || interceptor.requestError) {\n requestInterceptors.unshift(interceptor.request, interceptor.requestError);\n }\n if (interceptor.response || interceptor.responseError) {\n responseInterceptors.push(interceptor.response, interceptor.responseError);\n }\n });\n\n promise = chainInterceptors(promise, requestInterceptors);\n promise = promise.then(serverRequest);\n promise = chainInterceptors(promise, responseInterceptors);\n promise = promise.finally(completeOutstandingRequest);\n\n return promise;\n\n\n function chainInterceptors(promise, interceptors) {\n for (var i = 0, ii = interceptors.length; i < ii;) {\n var thenFn = interceptors[i++];\n var rejectFn = interceptors[i++];\n\n promise = promise.then(thenFn, rejectFn);\n }\n\n interceptors.length = 0;\n\n return promise;\n }\n\n function completeOutstandingRequest() {\n $browser.$$completeOutstandingRequest(noop);\n }\n\n function executeHeaderFns(headers, config) {\n var headerContent, processedHeaders = {};\n\n forEach(headers, function(headerFn, header) {\n if (isFunction(headerFn)) {\n headerContent = headerFn(config);\n if (headerContent != null) {\n processedHeaders[header] = headerContent;\n }\n } else {\n processedHeaders[header] = headerFn;\n }\n });\n\n return processedHeaders;\n }\n\n function mergeHeaders(config) {\n var defHeaders = defaults.headers,\n reqHeaders = extend({}, config.headers),\n defHeaderName, lowercaseDefHeaderName, reqHeaderName;\n\n defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);\n\n // using for-in instead of forEach to avoid unnecessary iteration after header has been found\n defaultHeadersIteration:\n for (defHeaderName in defHeaders) {\n lowercaseDefHeaderName = lowercase(defHeaderName);\n\n for (reqHeaderName in reqHeaders) {\n if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {\n continue defaultHeadersIteration;\n }\n }\n\n reqHeaders[defHeaderName] = defHeaders[defHeaderName];\n }\n\n // execute if header value is a function for merged headers\n return executeHeaderFns(reqHeaders, shallowCopy(config));\n }\n\n function serverRequest(config) {\n var headers = config.headers;\n var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);\n\n // strip content-type if data is undefined\n if (isUndefined(reqData)) {\n forEach(headers, function(value, header) {\n if (lowercase(header) === 'content-type') {\n delete headers[header];\n }\n });\n }\n\n if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {\n config.withCredentials = defaults.withCredentials;\n }\n\n // send request\n return sendReq(config, reqData).then(transformResponse, transformResponse);\n }\n\n function transformResponse(response) {\n // make a copy since the response must be cacheable\n var resp = extend({}, response);\n resp.data = transformData(response.data, response.headers, response.status,\n config.transformResponse);\n return (isSuccess(response.status))\n ? resp\n : $q.reject(resp);\n }\n }\n\n $http.pendingRequests = [];\n\n /**\n * @ngdoc method\n * @name $http#get\n *\n * @description\n * Shortcut method to perform `GET` request.\n *\n * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested;\n * or an object created by a call to `$sce.trustAsResourceUrl(url)`.\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n\n /**\n * @ngdoc method\n * @name $http#delete\n *\n * @description\n * Shortcut method to perform `DELETE` request.\n *\n * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested;\n * or an object created by a call to `$sce.trustAsResourceUrl(url)`.\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n\n /**\n * @ngdoc method\n * @name $http#head\n *\n * @description\n * Shortcut method to perform `HEAD` request.\n *\n * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested;\n * or an object created by a call to `$sce.trustAsResourceUrl(url)`.\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n\n /**\n * @ngdoc method\n * @name $http#jsonp\n *\n * @description\n * Shortcut method to perform `JSONP` request.\n *\n * Note that, since JSONP requests are sensitive because the response is given full access to the browser,\n * the url must be declared, via {@link $sce} as a trusted resource URL.\n * You can trust a URL by adding it to the whitelist via\n * {@link $sceDelegateProvider#resourceUrlWhitelist `$sceDelegateProvider.resourceUrlWhitelist`} or\n * by explicitly trusting the URL via {@link $sce#trustAsResourceUrl `$sce.trustAsResourceUrl(url)`}.\n *\n * You should avoid generating the URL for the JSONP request from user provided data.\n * Provide additional query parameters via `params` property of the `config` parameter, rather than\n * modifying the URL itself.\n *\n * JSONP requests must specify a callback to be used in the response from the server. This callback\n * is passed as a query parameter in the request. You must specify the name of this parameter by\n * setting the `jsonpCallbackParam` property on the request config object.\n *\n * ```\n * $http.jsonp('some/trusted/url', {jsonpCallbackParam: 'callback'})\n * ```\n *\n * You can also specify a default callback parameter name in `$http.defaults.jsonpCallbackParam`.\n * Initially this is set to `'callback'`.\n *\n *
\n * You can no longer use the `JSON_CALLBACK` string as a placeholder for specifying where the callback\n * parameter value should go.\n *
\n *\n * If you would like to customise where and how the callbacks are stored then try overriding\n * or decorating the {@link $jsonpCallbacks} service.\n *\n * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested;\n * or an object created by a call to `$sce.trustAsResourceUrl(url)`.\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n createShortMethods('get', 'delete', 'head', 'jsonp');\n\n /**\n * @ngdoc method\n * @name $http#post\n *\n * @description\n * Shortcut method to perform `POST` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n\n /**\n * @ngdoc method\n * @name $http#put\n *\n * @description\n * Shortcut method to perform `PUT` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n\n /**\n * @ngdoc method\n * @name $http#patch\n *\n * @description\n * Shortcut method to perform `PATCH` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object. See {@link ng.$http#$http-arguments `$http()` arguments}.\n * @returns {HttpPromise} A Promise that will be resolved or rejected with a response object.\n * See {@link ng.$http#$http-returns `$http()` return value}.\n */\n createShortMethodsWithData('post', 'put', 'patch');\n\n /**\n * @ngdoc property\n * @name $http#defaults\n *\n * @description\n * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of\n * default headers, withCredentials as well as request and response transformations.\n *\n * See \"Setting HTTP Headers\" and \"Transforming Requests and Responses\" sections above.\n */\n $http.defaults = defaults;\n\n\n return $http;\n\n\n function createShortMethods(names) {\n forEach(arguments, function(name) {\n $http[name] = function(url, config) {\n return $http(extend({}, config || {}, {\n method: name,\n url: url\n }));\n };\n });\n }\n\n\n function createShortMethodsWithData(name) {\n forEach(arguments, function(name) {\n $http[name] = function(url, data, config) {\n return $http(extend({}, config || {}, {\n method: name,\n url: url,\n data: data\n }));\n };\n });\n }\n\n\n /**\n * Makes the request.\n *\n * !!! ACCESSES CLOSURE VARS:\n * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests\n */\n function sendReq(config, reqData) {\n var deferred = $q.defer(),\n promise = deferred.promise,\n cache,\n cachedResp,\n reqHeaders = config.headers,\n isJsonp = lowercase(config.method) === 'jsonp',\n url = config.url;\n\n if (isJsonp) {\n // JSONP is a pretty sensitive operation where we're allowing a script to have full access to\n // our DOM and JS space. So we require that the URL satisfies SCE.RESOURCE_URL.\n url = $sce.getTrustedResourceUrl(url);\n } else if (!isString(url)) {\n // If it is not a string then the URL must be a $sce trusted object\n url = $sce.valueOf(url);\n }\n\n url = buildUrl(url, config.paramSerializer(config.params));\n\n if (isJsonp) {\n // Check the url and add the JSONP callback placeholder\n url = sanitizeJsonpCallbackParam(url, config.jsonpCallbackParam);\n }\n\n $http.pendingRequests.push(config);\n promise.then(removePendingReq, removePendingReq);\n\n if ((config.cache || defaults.cache) && config.cache !== false &&\n (config.method === 'GET' || config.method === 'JSONP')) {\n cache = isObject(config.cache) ? config.cache\n : isObject(/** @type {?} */ (defaults).cache)\n ? /** @type {?} */ (defaults).cache\n : defaultCache;\n }\n\n if (cache) {\n cachedResp = cache.get(url);\n if (isDefined(cachedResp)) {\n if (isPromiseLike(cachedResp)) {\n // cached request has already been sent, but there is no response yet\n cachedResp.then(resolvePromiseWithResult, resolvePromiseWithResult);\n } else {\n // serving from cache\n if (isArray(cachedResp)) {\n resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3], cachedResp[4]);\n } else {\n resolvePromise(cachedResp, 200, {}, 'OK', 'complete');\n }\n }\n } else {\n // put the promise for the non-transformed response into cache as a placeholder\n cache.put(url, promise);\n }\n }\n\n\n // if we won't have the response in cache, set the xsrf headers and\n // send the request to the backend\n if (isUndefined(cachedResp)) {\n var xsrfValue = urlIsAllowedOrigin(config.url)\n ? $$cookieReader()[config.xsrfCookieName || defaults.xsrfCookieName]\n : undefined;\n if (xsrfValue) {\n reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;\n }\n\n $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,\n config.withCredentials, config.responseType,\n createApplyHandlers(config.eventHandlers),\n createApplyHandlers(config.uploadEventHandlers));\n }\n\n return promise;\n\n function createApplyHandlers(eventHandlers) {\n if (eventHandlers) {\n var applyHandlers = {};\n forEach(eventHandlers, function(eventHandler, key) {\n applyHandlers[key] = function(event) {\n if (useApplyAsync) {\n $rootScope.$applyAsync(callEventHandler);\n } else if ($rootScope.$$phase) {\n callEventHandler();\n } else {\n $rootScope.$apply(callEventHandler);\n }\n\n function callEventHandler() {\n eventHandler(event);\n }\n };\n });\n return applyHandlers;\n }\n }\n\n\n /**\n * Callback registered to $httpBackend():\n * - caches the response if desired\n * - resolves the raw $http promise\n * - calls $apply\n */\n function done(status, response, headersString, statusText, xhrStatus) {\n if (cache) {\n if (isSuccess(status)) {\n cache.put(url, [status, response, parseHeaders(headersString), statusText, xhrStatus]);\n } else {\n // remove promise from the cache\n cache.remove(url);\n }\n }\n\n function resolveHttpPromise() {\n resolvePromise(response, status, headersString, statusText, xhrStatus);\n }\n\n if (useApplyAsync) {\n $rootScope.$applyAsync(resolveHttpPromise);\n } else {\n resolveHttpPromise();\n if (!$rootScope.$$phase) $rootScope.$apply();\n }\n }\n\n\n /**\n * Resolves the raw $http promise.\n */\n function resolvePromise(response, status, headers, statusText, xhrStatus) {\n //status: HTTP response status code, 0, -1 (aborted by timeout / promise)\n status = status >= -1 ? status : 0;\n\n (isSuccess(status) ? deferred.resolve : deferred.reject)({\n data: response,\n status: status,\n headers: headersGetter(headers),\n config: config,\n statusText: statusText,\n xhrStatus: xhrStatus\n });\n }\n\n function resolvePromiseWithResult(result) {\n resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText, result.xhrStatus);\n }\n\n function removePendingReq() {\n var idx = $http.pendingRequests.indexOf(config);\n if (idx !== -1) $http.pendingRequests.splice(idx, 1);\n }\n }\n\n\n function buildUrl(url, serializedParams) {\n if (serializedParams.length > 0) {\n url += ((url.indexOf('?') === -1) ? '?' : '&') + serializedParams;\n }\n return url;\n }\n\n function sanitizeJsonpCallbackParam(url, cbKey) {\n var parts = url.split('?');\n if (parts.length > 2) {\n // Throw if the url contains more than one `?` query indicator\n throw $httpMinErr('badjsonp', 'Illegal use more than one \"?\", in url, \"{1}\"', url);\n }\n var params = parseKeyValue(parts[1]);\n forEach(params, function(value, key) {\n if (value === 'JSON_CALLBACK') {\n // Throw if the url already contains a reference to JSON_CALLBACK\n throw $httpMinErr('badjsonp', 'Illegal use of JSON_CALLBACK in url, \"{0}\"', url);\n }\n if (key === cbKey) {\n // Throw if the callback param was already provided\n throw $httpMinErr('badjsonp', 'Illegal use of callback param, \"{0}\", in url, \"{1}\"', cbKey, url);\n }\n });\n\n // Add in the JSON_CALLBACK callback param value\n url += ((url.indexOf('?') === -1) ? '?' : '&') + cbKey + '=JSON_CALLBACK';\n\n return url;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $xhrFactory\n * @this\n *\n * @description\n * Factory function used to create XMLHttpRequest objects.\n *\n * Replace or decorate this service to create your own custom XMLHttpRequest objects.\n *\n * ```\n * angular.module('myApp', [])\n * .factory('$xhrFactory', function() {\n * return function createXhr(method, url) {\n * return new window.XMLHttpRequest({mozSystem: true});\n * };\n * });\n * ```\n *\n * @param {string} method HTTP method of the request (GET, POST, PUT, ..)\n * @param {string} url URL of the request.\n */\nfunction $xhrFactoryProvider() {\n this.$get = function() {\n return function createXhr() {\n return new window.XMLHttpRequest();\n };\n };\n}\n\n/**\n * @ngdoc service\n * @name $httpBackend\n * @requires $jsonpCallbacks\n * @requires $document\n * @requires $xhrFactory\n * @this\n *\n * @description\n * HTTP backend used by the {@link ng.$http service} that delegates to\n * XMLHttpRequest object or JSONP and deals with browser incompatibilities.\n *\n * You should never need to use this service directly, instead use the higher-level abstractions:\n * {@link ng.$http $http} or {@link ngResource.$resource $resource}.\n *\n * During testing this implementation is swapped with {@link ngMock.$httpBackend mock\n * $httpBackend} which can be trained with responses.\n */\nfunction $HttpBackendProvider() {\n this.$get = ['$browser', '$jsonpCallbacks', '$document', '$xhrFactory', function($browser, $jsonpCallbacks, $document, $xhrFactory) {\n return createHttpBackend($browser, $xhrFactory, $browser.defer, $jsonpCallbacks, $document[0]);\n }];\n}\n\nfunction createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {\n // TODO(vojta): fix the signature\n return function(method, url, post, callback, headers, timeout, withCredentials, responseType, eventHandlers, uploadEventHandlers) {\n url = url || $browser.url();\n\n if (lowercase(method) === 'jsonp') {\n var callbackPath = callbacks.createCallback(url);\n var jsonpDone = jsonpReq(url, callbackPath, function(status, text) {\n // jsonpReq only ever sets status to 200 (OK), 404 (ERROR) or -1 (WAITING)\n var response = (status === 200) && callbacks.getResponse(callbackPath);\n completeRequest(callback, status, response, '', text, 'complete');\n callbacks.removeCallback(callbackPath);\n });\n } else {\n\n var xhr = createXhr(method, url);\n var abortedByTimeout = false;\n\n xhr.open(method, url, true);\n forEach(headers, function(value, key) {\n if (isDefined(value)) {\n xhr.setRequestHeader(key, value);\n }\n });\n\n xhr.onload = function requestLoaded() {\n var statusText = xhr.statusText || '';\n\n // responseText is the old-school way of retrieving response (supported by IE9)\n // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n var response = ('response' in xhr) ? xhr.response : xhr.responseText;\n\n // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n var status = xhr.status === 1223 ? 204 : xhr.status;\n\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = response ? 200 : urlResolve(url).protocol === 'file' ? 404 : 0;\n }\n\n completeRequest(callback,\n status,\n response,\n xhr.getAllResponseHeaders(),\n statusText,\n 'complete');\n };\n\n var requestError = function() {\n // The response is always empty\n // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error\n completeRequest(callback, -1, null, null, '', 'error');\n };\n\n var requestAborted = function() {\n completeRequest(callback, -1, null, null, '', abortedByTimeout ? 'timeout' : 'abort');\n };\n\n var requestTimeout = function() {\n // The response is always empty\n // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error\n completeRequest(callback, -1, null, null, '', 'timeout');\n };\n\n xhr.onerror = requestError;\n xhr.ontimeout = requestTimeout;\n xhr.onabort = requestAborted;\n\n forEach(eventHandlers, function(value, key) {\n xhr.addEventListener(key, value);\n });\n\n forEach(uploadEventHandlers, function(value, key) {\n xhr.upload.addEventListener(key, value);\n });\n\n if (withCredentials) {\n xhr.withCredentials = true;\n }\n\n if (responseType) {\n try {\n xhr.responseType = responseType;\n } catch (e) {\n // WebKit added support for the json responseType value on 09/03/2013\n // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are\n // known to throw when setting the value \"json\" as the response type. Other older\n // browsers implementing the responseType\n //\n // The json response type can be ignored if not supported, because JSON payloads are\n // parsed on the client-side regardless.\n if (responseType !== 'json') {\n throw e;\n }\n }\n }\n\n xhr.send(isUndefined(post) ? null : post);\n }\n\n // Since we are using xhr.abort() when a request times out, we have to set a flag that\n // indicates to requestAborted if the request timed out or was aborted.\n //\n // http.timeout = numerical timeout timeout\n // http.timeout = $timeout timeout\n // http.timeout = promise abort\n // xhr.abort() abort (The xhr object is normally inaccessible, but\n // can be exposed with the xhrFactory)\n if (timeout > 0) {\n var timeoutId = $browserDefer(function() {\n timeoutRequest('timeout');\n }, timeout);\n } else if (isPromiseLike(timeout)) {\n timeout.then(function() {\n timeoutRequest(isDefined(timeout.$$timeoutId) ? 'timeout' : 'abort');\n });\n }\n\n function timeoutRequest(reason) {\n abortedByTimeout = reason === 'timeout';\n if (jsonpDone) {\n jsonpDone();\n }\n if (xhr) {\n xhr.abort();\n }\n }\n\n function completeRequest(callback, status, response, headersString, statusText, xhrStatus) {\n // cancel timeout and subsequent timeout promise resolution\n if (isDefined(timeoutId)) {\n $browserDefer.cancel(timeoutId);\n }\n jsonpDone = xhr = null;\n\n callback(status, response, headersString, statusText, xhrStatus);\n }\n };\n\n function jsonpReq(url, callbackPath, done) {\n url = url.replace('JSON_CALLBACK', callbackPath);\n // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:\n // - fetches local scripts via XHR and evals them\n // - adds and immediately removes script elements from the document\n var script = rawDocument.createElement('script'), callback = null;\n script.type = 'text/javascript';\n script.src = url;\n script.async = true;\n\n callback = function(event) {\n script.removeEventListener('load', callback);\n script.removeEventListener('error', callback);\n rawDocument.body.removeChild(script);\n script = null;\n var status = -1;\n var text = 'unknown';\n\n if (event) {\n if (event.type === 'load' && !callbacks.wasCalled(callbackPath)) {\n event = { type: 'error' };\n }\n text = event.type;\n status = event.type === 'error' ? 404 : 200;\n }\n\n if (done) {\n done(status, text);\n }\n };\n\n script.addEventListener('load', callback);\n script.addEventListener('error', callback);\n rawDocument.body.appendChild(script);\n return callback;\n }\n}\n\nvar $interpolateMinErr = angular.$interpolateMinErr = minErr('$interpolate');\n$interpolateMinErr.throwNoconcat = function(text) {\n throw $interpolateMinErr('noconcat',\n 'Error while interpolating: {0}\\nStrict Contextual Escaping disallows ' +\n 'interpolations that concatenate multiple expressions when a trusted value is ' +\n 'required. See http://docs.angularjs.org/api/ng.$sce', text);\n};\n\n$interpolateMinErr.interr = function(text, err) {\n return $interpolateMinErr('interr', 'Can\\'t interpolate: {0}\\n{1}', text, err.toString());\n};\n\n/**\n * @ngdoc provider\n * @name $interpolateProvider\n * @this\n *\n * @description\n *\n * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.\n *\n *
\n * This feature is sometimes used to mix different markup languages, e.g. to wrap an AngularJS\n * template within a Python Jinja template (or any other template language). Mixing templating\n * languages is **very dangerous**. The embedding template language will not safely escape AngularJS\n * expressions, so any user-controlled values in the template will cause Cross Site Scripting (XSS)\n * security bugs!\n *
\n *\n * @example\n\n\n\n
\n //demo.label//\n
\n
\n\n it('should interpolate binding with custom symbols', function() {\n expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');\n });\n\n
\n */\nfunction $InterpolateProvider() {\n var startSymbol = '{{';\n var endSymbol = '}}';\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#startSymbol\n * @description\n * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.\n *\n * @param {string=} value new value to set the starting symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.startSymbol = function(value) {\n if (value) {\n startSymbol = value;\n return this;\n }\n return startSymbol;\n };\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * @param {string=} value new value to set the ending symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.endSymbol = function(value) {\n if (value) {\n endSymbol = value;\n return this;\n }\n return endSymbol;\n };\n\n\n this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {\n var startSymbolLength = startSymbol.length,\n endSymbolLength = endSymbol.length,\n escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'),\n escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g');\n\n function escape(ch) {\n return '\\\\\\\\\\\\' + ch;\n }\n\n function unescapeText(text) {\n return text.replace(escapedStartRegexp, startSymbol).\n replace(escapedEndRegexp, endSymbol);\n }\n\n // TODO: this is the same as the constantWatchDelegate in parse.js\n function constantWatchDelegate(scope, listener, objectEquality, constantInterp) {\n var unwatch = scope.$watch(function constantInterpolateWatch(scope) {\n unwatch();\n return constantInterp(scope);\n }, listener, objectEquality);\n return unwatch;\n }\n\n /**\n * @ngdoc service\n * @name $interpolate\n * @kind function\n *\n * @requires $parse\n * @requires $sce\n *\n * @description\n *\n * Compiles a string with markup into an interpolation function. This service is used by the\n * HTML {@link ng.$compile $compile} service for data binding. See\n * {@link ng.$interpolateProvider $interpolateProvider} for configuring the\n * interpolation markup.\n *\n *\n * ```js\n * var $interpolate = ...; // injected\n * var exp = $interpolate('Hello {{name | uppercase}}!');\n * expect(exp({name:'AngularJS'})).toEqual('Hello ANGULARJS!');\n * ```\n *\n * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is\n * `true`, the interpolation function will return `undefined` unless all embedded expressions\n * evaluate to a value other than `undefined`.\n *\n * ```js\n * var $interpolate = ...; // injected\n * var context = {greeting: 'Hello', name: undefined };\n *\n * // default \"forgiving\" mode\n * var exp = $interpolate('{{greeting}} {{name}}!');\n * expect(exp(context)).toEqual('Hello !');\n *\n * // \"allOrNothing\" mode\n * exp = $interpolate('{{greeting}} {{name}}!', false, null, true);\n * expect(exp(context)).toBeUndefined();\n * context.name = 'AngularJS';\n * expect(exp(context)).toEqual('Hello AngularJS!');\n * ```\n *\n * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.\n *\n * #### Escaped Interpolation\n * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers\n * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).\n * It will be rendered as a regular start/end marker, and will not be interpreted as an expression\n * or binding.\n *\n * This enables web-servers to prevent script injection attacks and defacing attacks, to some\n * degree, while also enabling code examples to work without relying on the\n * {@link ng.directive:ngNonBindable ngNonBindable} directive.\n *\n * **For security purposes, it is strongly encouraged that web servers escape user-supplied data,\n * replacing angle brackets (<, >) with &lt; and &gt; respectively, and replacing all\n * interpolation start/end markers with their escaped counterparts.**\n *\n * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered\n * output when the $interpolate service processes the text. So, for HTML elements interpolated\n * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter\n * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such,\n * this is typically useful only when user-data is used in rendering a template from the server, or\n * when otherwise untrusted data is used by a directive.\n *\n * \n * \n *
\n *

{{apptitle}}: \\{\\{ username = \"defaced value\"; \\}\\}\n *

\n *

{{username}} attempts to inject code which will deface the\n * application, but fails to accomplish their task, because the server has correctly\n * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)\n * characters.

\n *

Instead, the result of the attempted script injection is visible, and can be removed\n * from the database by an administrator.

\n *
\n *
\n *
\n *\n * @knownIssue\n * It is currently not possible for an interpolated expression to contain the interpolation end\n * symbol. For example, `{{ '}}' }}` will be incorrectly interpreted as `{{ ' }}` + `' }}`, i.e.\n * an interpolated expression consisting of a single-quote (`'`) and the `' }}` string.\n *\n * @knownIssue\n * All directives and components must use the standard `{{` `}}` interpolation symbols\n * in their templates. If you change the application interpolation symbols the {@link $compile}\n * service will attempt to denormalize the standard symbols to the custom symbols.\n * The denormalization process is not clever enough to know not to replace instances of the standard\n * symbols where they would not normally be treated as interpolation symbols. For example in the following\n * code snippet the closing braces of the literal object will get incorrectly denormalized:\n *\n * ```\n *
\n * ```\n *\n * See https://github.com/angular/angular.js/pull/14610#issuecomment-219401099 for more information.\n *\n * @param {string} text The text with markup to interpolate.\n * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have\n * embedded expression in order to return an interpolation function. Strings with no\n * embedded expression will return null for the interpolation function.\n * @param {string=} trustedContext when provided, the returned function passes the interpolated\n * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,\n * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that\n * provides Strict Contextual Escaping for details.\n * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined\n * unless all embedded expressions evaluate to a value other than `undefined`.\n * @returns {function(context)} an interpolation function which is used to compute the\n * interpolated string. The function has these parameters:\n *\n * - `context`: evaluation context for all expressions embedded in the interpolated text\n */\n function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {\n var contextAllowsConcatenation = trustedContext === $sce.URL || trustedContext === $sce.MEDIA_URL;\n\n // Provide a quick exit and simplified result function for text with no interpolation\n if (!text.length || text.indexOf(startSymbol) === -1) {\n if (mustHaveExpression && !contextAllowsConcatenation) return;\n\n var unescapedText = unescapeText(text);\n if (contextAllowsConcatenation) {\n unescapedText = $sce.getTrusted(trustedContext, unescapedText);\n }\n var constantInterp = valueFn(unescapedText);\n constantInterp.exp = text;\n constantInterp.expressions = [];\n constantInterp.$$watchDelegate = constantWatchDelegate;\n\n return constantInterp;\n }\n\n allOrNothing = !!allOrNothing;\n var startIndex,\n endIndex,\n index = 0,\n expressions = [],\n parseFns,\n textLength = text.length,\n exp,\n concat = [],\n expressionPositions = [],\n singleExpression;\n\n\n while (index < textLength) {\n if (((startIndex = text.indexOf(startSymbol, index)) !== -1) &&\n ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) !== -1)) {\n if (index !== startIndex) {\n concat.push(unescapeText(text.substring(index, startIndex)));\n }\n exp = text.substring(startIndex + startSymbolLength, endIndex);\n expressions.push(exp);\n index = endIndex + endSymbolLength;\n expressionPositions.push(concat.length);\n concat.push(''); // Placeholder that will get replaced with the evaluated expression.\n } else {\n // we did not find an interpolation, so we have to add the remainder to the separators array\n if (index !== textLength) {\n concat.push(unescapeText(text.substring(index)));\n }\n break;\n }\n }\n\n singleExpression = concat.length === 1 && expressionPositions.length === 1;\n // Intercept expression if we need to stringify concatenated inputs, which may be SCE trusted\n // objects rather than simple strings\n // (we don't modify the expression if the input consists of only a single trusted input)\n var interceptor = contextAllowsConcatenation && singleExpression ? undefined : parseStringifyInterceptor;\n parseFns = expressions.map(function(exp) { return $parse(exp, interceptor); });\n\n // Concatenating expressions makes it hard to reason about whether some combination of\n // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a\n // single expression be used for some $sce-managed secure contexts (RESOURCE_URLs mostly),\n // we ensure that the value that's used is assigned or constructed by some JS code somewhere\n // that is more testable or make it obvious that you bound the value to some user controlled\n // value. This helps reduce the load when auditing for XSS issues.\n\n // Note that URL and MEDIA_URL $sce contexts do not need this, since `$sce` can sanitize the values\n // passed to it. In that case, `$sce.getTrusted` will be called on either the single expression\n // or on the overall concatenated string (losing trusted types used in the mix, by design).\n // Both these methods will sanitize plain strings. Also, HTML could be included, but since it's\n // only used in srcdoc attributes, this would not be very useful.\n\n if (!mustHaveExpression || expressions.length) {\n var compute = function(values) {\n for (var i = 0, ii = expressions.length; i < ii; i++) {\n if (allOrNothing && isUndefined(values[i])) return;\n concat[expressionPositions[i]] = values[i];\n }\n\n if (contextAllowsConcatenation) {\n // If `singleExpression` then `concat[0]` might be a \"trusted\" value or `null`, rather than a string\n return $sce.getTrusted(trustedContext, singleExpression ? concat[0] : concat.join(''));\n } else if (trustedContext && concat.length > 1) {\n // This context does not allow more than one part, e.g. expr + string or exp + exp.\n $interpolateMinErr.throwNoconcat(text);\n }\n // In an unprivileged context or only one part: just concatenate and return.\n return concat.join('');\n };\n\n return extend(function interpolationFn(context) {\n var i = 0;\n var ii = expressions.length;\n var values = new Array(ii);\n\n try {\n for (; i < ii; i++) {\n values[i] = parseFns[i](context);\n }\n\n return compute(values);\n } catch (err) {\n $exceptionHandler($interpolateMinErr.interr(text, err));\n }\n\n }, {\n // all of these properties are undocumented for now\n exp: text, //just for compatibility with regular watchers created via $watch\n expressions: expressions,\n $$watchDelegate: function(scope, listener) {\n var lastValue;\n return scope.$watchGroup(parseFns, /** @this */ function interpolateFnWatcher(values, oldValues) {\n var currValue = compute(values);\n listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);\n lastValue = currValue;\n });\n }\n });\n }\n\n function parseStringifyInterceptor(value) {\n try {\n // In concatenable contexts, getTrusted comes at the end, to avoid sanitizing individual\n // parts of a full URL. We don't care about losing the trustedness here.\n // In non-concatenable contexts, where there is only one expression, this interceptor is\n // not applied to the expression.\n value = (trustedContext && !contextAllowsConcatenation) ?\n $sce.getTrusted(trustedContext, value) :\n $sce.valueOf(value);\n return allOrNothing && !isDefined(value) ? value : stringify(value);\n } catch (err) {\n $exceptionHandler($interpolateMinErr.interr(text, err));\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $interpolate#startSymbol\n * @description\n * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.\n *\n * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change\n * the symbol.\n *\n * @returns {string} start symbol.\n */\n $interpolate.startSymbol = function() {\n return startSymbol;\n };\n\n\n /**\n * @ngdoc method\n * @name $interpolate#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change\n * the symbol.\n *\n * @returns {string} end symbol.\n */\n $interpolate.endSymbol = function() {\n return endSymbol;\n };\n\n return $interpolate;\n }];\n}\n\nvar $intervalMinErr = minErr('$interval');\n\n/** @this */\nfunction $IntervalProvider() {\n this.$get = ['$rootScope', '$window', '$q', '$$q', '$browser',\n function($rootScope, $window, $q, $$q, $browser) {\n var intervals = {};\n\n\n /**\n * @ngdoc service\n * @name $interval\n *\n * @description\n * AngularJS's wrapper for `window.setInterval`. The `fn` function is executed every `delay`\n * milliseconds.\n *\n * The return value of registering an interval function is a promise. This promise will be\n * notified upon each tick of the interval, and will be resolved after `count` iterations, or\n * run indefinitely if `count` is not defined. The value of the notification will be the\n * number of iterations that have run.\n * To cancel an interval, call `$interval.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to\n * move forward by `millis` milliseconds and trigger any functions scheduled to run in that\n * time.\n *\n *
\n * **Note**: Intervals created by this service must be explicitly destroyed when you are finished\n * with them. In particular they are not automatically destroyed when a controller's scope or a\n * directive's element are destroyed.\n * You should take this into consideration and make sure to always cancel the interval at the\n * appropriate moment. See the example below for more details on how and when to do this.\n *
\n *\n * @param {function()} fn A function that should be called repeatedly. If no additional arguments\n * are passed (see below), the function is called with the current iteration count.\n * @param {number} delay Number of milliseconds between each function call.\n * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat\n * indefinitely.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @param {...*=} Pass additional parameters to the executed function.\n * @returns {promise} A promise which will be notified on each iteration. It will resolve once all iterations of the interval complete.\n *\n * @example\n * \n * \n * \n *\n *
\n *
\n *
\n * Current time is: \n *
\n * Blood 1 : {{blood_1}}\n * Blood 2 : {{blood_2}}\n * \n * \n * \n *
\n *
\n *\n *
\n *
\n */\n function interval(fn, delay, count, invokeApply) {\n var hasParams = arguments.length > 4,\n args = hasParams ? sliceArgs(arguments, 4) : [],\n setInterval = $window.setInterval,\n clearInterval = $window.clearInterval,\n iteration = 0,\n skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise;\n\n count = isDefined(count) ? count : 0;\n\n promise.$$intervalId = setInterval(function tick() {\n if (skipApply) {\n $browser.defer(callback);\n } else {\n $rootScope.$evalAsync(callback);\n }\n deferred.notify(iteration++);\n\n if (count > 0 && iteration >= count) {\n deferred.resolve(iteration);\n clearInterval(promise.$$intervalId);\n delete intervals[promise.$$intervalId];\n }\n\n if (!skipApply) $rootScope.$apply();\n\n }, delay);\n\n intervals[promise.$$intervalId] = deferred;\n\n return promise;\n\n function callback() {\n if (!hasParams) {\n fn(iteration);\n } else {\n fn.apply(null, args);\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $interval#cancel\n *\n * @description\n * Cancels a task associated with the `promise`.\n *\n * @param {Promise=} promise returned by the `$interval` function.\n * @returns {boolean} Returns `true` if the task was successfully canceled.\n */\n interval.cancel = function(promise) {\n if (!promise) return false;\n\n if (!promise.hasOwnProperty('$$intervalId')) {\n throw $intervalMinErr('badprom',\n '`$interval.cancel()` called with a promise that was not generated by `$interval()`.');\n }\n\n if (!intervals.hasOwnProperty(promise.$$intervalId)) return false;\n\n var id = promise.$$intervalId;\n var deferred = intervals[id];\n\n // Interval cancels should not report an unhandled promise.\n markQExceptionHandled(deferred.promise);\n deferred.reject('canceled');\n $window.clearInterval(id);\n delete intervals[id];\n\n return true;\n };\n\n return interval;\n }];\n}\n\n/**\n * @ngdoc service\n * @name $jsonpCallbacks\n * @requires $window\n * @description\n * This service handles the lifecycle of callbacks to handle JSONP requests.\n * Override this service if you wish to customise where the callbacks are stored and\n * how they vary compared to the requested url.\n */\nvar $jsonpCallbacksProvider = /** @this */ function() {\n this.$get = function() {\n var callbacks = angular.callbacks;\n var callbackMap = {};\n\n function createCallback(callbackId) {\n var callback = function(data) {\n callback.data = data;\n callback.called = true;\n };\n callback.id = callbackId;\n return callback;\n }\n\n return {\n /**\n * @ngdoc method\n * @name $jsonpCallbacks#createCallback\n * @param {string} url the url of the JSONP request\n * @returns {string} the callback path to send to the server as part of the JSONP request\n * @description\n * {@link $httpBackend} calls this method to create a callback and get hold of the path to the callback\n * to pass to the server, which will be used to call the callback with its payload in the JSONP response.\n */\n createCallback: function(url) {\n var callbackId = '_' + (callbacks.$$counter++).toString(36);\n var callbackPath = 'angular.callbacks.' + callbackId;\n var callback = createCallback(callbackId);\n callbackMap[callbackPath] = callbacks[callbackId] = callback;\n return callbackPath;\n },\n /**\n * @ngdoc method\n * @name $jsonpCallbacks#wasCalled\n * @param {string} callbackPath the path to the callback that was sent in the JSONP request\n * @returns {boolean} whether the callback has been called, as a result of the JSONP response\n * @description\n * {@link $httpBackend} calls this method to find out whether the JSONP response actually called the\n * callback that was passed in the request.\n */\n wasCalled: function(callbackPath) {\n return callbackMap[callbackPath].called;\n },\n /**\n * @ngdoc method\n * @name $jsonpCallbacks#getResponse\n * @param {string} callbackPath the path to the callback that was sent in the JSONP request\n * @returns {*} the data received from the response via the registered callback\n * @description\n * {@link $httpBackend} calls this method to get hold of the data that was provided to the callback\n * in the JSONP response.\n */\n getResponse: function(callbackPath) {\n return callbackMap[callbackPath].data;\n },\n /**\n * @ngdoc method\n * @name $jsonpCallbacks#removeCallback\n * @param {string} callbackPath the path to the callback that was sent in the JSONP request\n * @description\n * {@link $httpBackend} calls this method to remove the callback after the JSONP request has\n * completed or timed-out.\n */\n removeCallback: function(callbackPath) {\n var callback = callbackMap[callbackPath];\n delete callbacks[callback.id];\n delete callbackMap[callbackPath];\n }\n };\n };\n};\n\n/**\n * @ngdoc service\n * @name $locale\n *\n * @description\n * $locale service provides localization rules for various AngularJS components. As of right now the\n * only public api is:\n *\n * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)\n */\n\nvar PATH_MATCH = /^([^?#]*)(\\?([^#]*))?(#(.*))?$/,\n DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};\nvar $locationMinErr = minErr('$location');\n\n\n/**\n * Encode path using encodeUriSegment, ignoring forward slashes\n *\n * @param {string} path Path to encode\n * @returns {string}\n */\nfunction encodePath(path) {\n var segments = path.split('/'),\n i = segments.length;\n\n while (i--) {\n // decode forward slashes to prevent them from being double encoded\n segments[i] = encodeUriSegment(segments[i].replace(/%2F/g, '/'));\n }\n\n return segments.join('/');\n}\n\nfunction decodePath(path, html5Mode) {\n var segments = path.split('/'),\n i = segments.length;\n\n while (i--) {\n segments[i] = decodeURIComponent(segments[i]);\n if (html5Mode) {\n // encode forward slashes to prevent them from being mistaken for path separators\n segments[i] = segments[i].replace(/\\//g, '%2F');\n }\n }\n\n return segments.join('/');\n}\n\nfunction parseAbsoluteUrl(absoluteUrl, locationObj) {\n var parsedUrl = urlResolve(absoluteUrl);\n\n locationObj.$$protocol = parsedUrl.protocol;\n locationObj.$$host = parsedUrl.hostname;\n locationObj.$$port = toInt(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;\n}\n\nvar DOUBLE_SLASH_REGEX = /^\\s*[\\\\/]{2,}/;\nfunction parseAppUrl(url, locationObj, html5Mode) {\n\n if (DOUBLE_SLASH_REGEX.test(url)) {\n throw $locationMinErr('badpath', 'Invalid url \"{0}\".', url);\n }\n\n var prefixed = (url.charAt(0) !== '/');\n if (prefixed) {\n url = '/' + url;\n }\n var match = urlResolve(url);\n var path = prefixed && match.pathname.charAt(0) === '/' ? match.pathname.substring(1) : match.pathname;\n locationObj.$$path = decodePath(path, html5Mode);\n locationObj.$$search = parseKeyValue(match.search);\n locationObj.$$hash = decodeURIComponent(match.hash);\n\n // make sure path starts with '/';\n if (locationObj.$$path && locationObj.$$path.charAt(0) !== '/') {\n locationObj.$$path = '/' + locationObj.$$path;\n }\n}\n\nfunction startsWith(str, search) {\n return str.slice(0, search.length) === search;\n}\n\n/**\n *\n * @param {string} base\n * @param {string} url\n * @returns {string} returns text from `url` after `base` or `undefined` if it does not begin with\n * the expected string.\n */\nfunction stripBaseUrl(base, url) {\n if (startsWith(url, base)) {\n return url.substr(base.length);\n }\n}\n\n\nfunction stripHash(url) {\n var index = url.indexOf('#');\n return index === -1 ? url : url.substr(0, index);\n}\n\nfunction trimEmptyHash(url) {\n return url.replace(/(#.+)|#$/, '$1');\n}\n\n\nfunction stripFile(url) {\n return url.substr(0, stripHash(url).lastIndexOf('/') + 1);\n}\n\n/* return the server only (scheme://host:port) */\nfunction serverBase(url) {\n return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));\n}\n\n\n/**\n * LocationHtml5Url represents a URL\n * This object is exposed as $location service when HTML5 mode is enabled and supported\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} appBaseNoFile application base URL stripped of any filename\n * @param {string} basePrefix URL path prefix\n */\nfunction LocationHtml5Url(appBase, appBaseNoFile, basePrefix) {\n this.$$html5 = true;\n basePrefix = basePrefix || '';\n parseAbsoluteUrl(appBase, this);\n\n\n /**\n * Parse given HTML5 (regular) URL string into properties\n * @param {string} url HTML5 URL\n * @private\n */\n this.$$parse = function(url) {\n var pathUrl = stripBaseUrl(appBaseNoFile, url);\n if (!isString(pathUrl)) {\n throw $locationMinErr('ipthprfx', 'Invalid url \"{0}\", missing path prefix \"{1}\".', url,\n appBaseNoFile);\n }\n\n parseAppUrl(pathUrl, this, true);\n\n if (!this.$$path) {\n this.$$path = '/';\n }\n\n this.$$compose();\n };\n\n /**\n * Compose url and update `absUrl` property\n * @private\n */\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'\n\n this.$$urlUpdatedByLocation = true;\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n var appUrl, prevAppUrl;\n var rewrittenUrl;\n\n\n if (isDefined(appUrl = stripBaseUrl(appBase, url))) {\n prevAppUrl = appUrl;\n if (basePrefix && isDefined(appUrl = stripBaseUrl(basePrefix, appUrl))) {\n rewrittenUrl = appBaseNoFile + (stripBaseUrl('/', appUrl) || appUrl);\n } else {\n rewrittenUrl = appBase + prevAppUrl;\n }\n } else if (isDefined(appUrl = stripBaseUrl(appBaseNoFile, url))) {\n rewrittenUrl = appBaseNoFile + appUrl;\n } else if (appBaseNoFile === url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents URL\n * This object is exposed as $location service when developer doesn't opt into html5 mode.\n * It also serves as the base class for html5 mode fallback on legacy browsers.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} appBaseNoFile application base URL stripped of any filename\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) {\n\n parseAbsoluteUrl(appBase, this);\n\n\n /**\n * Parse given hashbang URL into properties\n * @param {string} url Hashbang URL\n * @private\n */\n this.$$parse = function(url) {\n var withoutBaseUrl = stripBaseUrl(appBase, url) || stripBaseUrl(appBaseNoFile, url);\n var withoutHashUrl;\n\n if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') {\n\n // The rest of the URL starts with a hash so we have\n // got either a hashbang path or a plain hash fragment\n withoutHashUrl = stripBaseUrl(hashPrefix, withoutBaseUrl);\n if (isUndefined(withoutHashUrl)) {\n // There was no hashbang prefix so we just have a hash fragment\n withoutHashUrl = withoutBaseUrl;\n }\n\n } else {\n // There was no hashbang path nor hash fragment:\n // If we are in HTML5 mode we use what is left as the path;\n // Otherwise we ignore what is left\n if (this.$$html5) {\n withoutHashUrl = withoutBaseUrl;\n } else {\n withoutHashUrl = '';\n if (isUndefined(withoutBaseUrl)) {\n appBase = url;\n /** @type {?} */ (this).replace();\n }\n }\n }\n\n parseAppUrl(withoutHashUrl, this, false);\n\n this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);\n\n this.$$compose();\n\n /*\n * In Windows, on an anchor node on documents loaded from\n * the filesystem, the browser will return a pathname\n * prefixed with the drive name ('/C:/path') when a\n * pathname without a drive is set:\n * * a.setAttribute('href', '/foo')\n * * a.pathname === '/C:/foo' //true\n *\n * Inside of AngularJS, we're always using pathnames that\n * do not include drive names for routing.\n */\n function removeWindowsDriveName(path, url, base) {\n /*\n Matches paths for file protocol on windows,\n such as /C:/foo/bar, and captures only /foo/bar.\n */\n var windowsFilePathExp = /^\\/[A-Z]:(\\/.*)/;\n\n var firstPathSegmentMatch;\n\n //Get the relative path from the input URL.\n if (startsWith(url, base)) {\n url = url.replace(base, '');\n }\n\n // The input URL intentionally contains a first path segment that ends with a colon.\n if (windowsFilePathExp.exec(url)) {\n return path;\n }\n\n firstPathSegmentMatch = windowsFilePathExp.exec(path);\n return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;\n }\n };\n\n /**\n * Compose hashbang URL and update `absUrl` property\n * @private\n */\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');\n\n this.$$urlUpdatedByLocation = true;\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (stripHash(appBase) === stripHash(url)) {\n this.$$parse(url);\n return true;\n }\n return false;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents URL\n * This object is exposed as $location service when html5 history api is enabled but the browser\n * does not support it.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} appBaseNoFile application base URL stripped of any filename\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {\n this.$$html5 = true;\n LocationHashbangUrl.apply(this, arguments);\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n\n var rewrittenUrl;\n var appUrl;\n\n if (appBase === stripHash(url)) {\n rewrittenUrl = url;\n } else if ((appUrl = stripBaseUrl(appBaseNoFile, url))) {\n rewrittenUrl = appBase + hashPrefix + appUrl;\n } else if (appBaseNoFile === url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n // include hashPrefix in $$absUrl when $$url is empty so IE9 does not reload page because of removal of '#'\n this.$$absUrl = appBase + hashPrefix + this.$$url;\n\n this.$$urlUpdatedByLocation = true;\n };\n\n}\n\n\nvar locationPrototype = {\n\n /**\n * Ensure absolute URL is initialized.\n * @private\n */\n $$absUrl:'',\n\n /**\n * Are we in html5 mode?\n * @private\n */\n $$html5: false,\n\n /**\n * Has any change been replacing?\n * @private\n */\n $$replace: false,\n\n /**\n * @ngdoc method\n * @name $location#absUrl\n *\n * @description\n * This method is getter only.\n *\n * Return full URL representation with all segments encoded according to rules specified in\n * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var absUrl = $location.absUrl();\n * // => \"http://example.com/#/some/path?foo=bar&baz=xoxo\"\n * ```\n *\n * @return {string} full URL\n */\n absUrl: locationGetter('$$absUrl'),\n\n /**\n * @ngdoc method\n * @name $location#url\n *\n * @description\n * This method is getter / setter.\n *\n * Return URL (e.g. `/path?a=b#hash`) when called without any parameter.\n *\n * Change path, search and hash, when called with parameter and return `$location`.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var url = $location.url();\n * // => \"/some/path?foo=bar&baz=xoxo\"\n * ```\n *\n * @param {string=} url New URL without base prefix (e.g. `/path?a=b#hash`)\n * @return {string} url\n */\n url: function(url) {\n if (isUndefined(url)) {\n return this.$$url;\n }\n\n var match = PATH_MATCH.exec(url);\n if (match[1] || url === '') this.path(decodeURIComponent(match[1]));\n if (match[2] || match[1] || url === '') this.search(match[3] || '');\n this.hash(match[5] || '');\n\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#protocol\n *\n * @description\n * This method is getter only.\n *\n * Return protocol of current URL.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var protocol = $location.protocol();\n * // => \"http\"\n * ```\n *\n * @return {string} protocol of current URL\n */\n protocol: locationGetter('$$protocol'),\n\n /**\n * @ngdoc method\n * @name $location#host\n *\n * @description\n * This method is getter only.\n *\n * Return host of current URL.\n *\n * Note: compared to the non-AngularJS version `location.host` which returns `hostname:port`, this returns the `hostname` portion only.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var host = $location.host();\n * // => \"example.com\"\n *\n * // given URL http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo\n * host = $location.host();\n * // => \"example.com\"\n * host = location.host;\n * // => \"example.com:8080\"\n * ```\n *\n * @return {string} host of current URL.\n */\n host: locationGetter('$$host'),\n\n /**\n * @ngdoc method\n * @name $location#port\n *\n * @description\n * This method is getter only.\n *\n * Return port of current URL.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var port = $location.port();\n * // => 80\n * ```\n *\n * @return {Number} port\n */\n port: locationGetter('$$port'),\n\n /**\n * @ngdoc method\n * @name $location#path\n *\n * @description\n * This method is getter / setter.\n *\n * Return path of current URL when called without any parameter.\n *\n * Change path when called with parameter and return `$location`.\n *\n * Note: Path should always begin with forward slash (/), this method will add the forward slash\n * if it is missing.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var path = $location.path();\n * // => \"/some/path\"\n * ```\n *\n * @param {(string|number)=} path New path\n * @return {(string|object)} path if called with no parameters, or `$location` if called with a parameter\n */\n path: locationGetterSetter('$$path', function(path) {\n path = path !== null ? path.toString() : '';\n return path.charAt(0) === '/' ? path : '/' + path;\n }),\n\n /**\n * @ngdoc method\n * @name $location#search\n *\n * @description\n * This method is getter / setter.\n *\n * Return search part (as object) of current URL when called without any parameter.\n *\n * Change search part when called with parameter and return `$location`.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo\n * var searchObject = $location.search();\n * // => {foo: 'bar', baz: 'xoxo'}\n *\n * // set foo to 'yipee'\n * $location.search('foo', 'yipee');\n * // $location.search() => {foo: 'yipee', baz: 'xoxo'}\n * ```\n *\n * @param {string|Object.|Object.>} search New search params - string or\n * hash object.\n *\n * When called with a single argument the method acts as a setter, setting the `search` component\n * of `$location` to the specified value.\n *\n * If the argument is a hash object containing an array of values, these values will be encoded\n * as duplicate search parameters in the URL.\n *\n * @param {(string|Number|Array|boolean)=} paramValue If `search` is a string or number, then `paramValue`\n * will override only a single search property.\n *\n * If `paramValue` is an array, it will override the property of the `search` component of\n * `$location` specified via the first argument.\n *\n * If `paramValue` is `null`, the property specified via the first argument will be deleted.\n *\n * If `paramValue` is `true`, the property specified via the first argument will be added with no\n * value nor trailing equal sign.\n *\n * @return {Object} If called with no arguments returns the parsed `search` object. If called with\n * one or more arguments returns `$location` object itself.\n */\n search: function(search, paramValue) {\n switch (arguments.length) {\n case 0:\n return this.$$search;\n case 1:\n if (isString(search) || isNumber(search)) {\n search = search.toString();\n this.$$search = parseKeyValue(search);\n } else if (isObject(search)) {\n search = copy(search, {});\n // remove object undefined or null properties\n forEach(search, function(value, key) {\n if (value == null) delete search[key];\n });\n\n this.$$search = search;\n } else {\n throw $locationMinErr('isrcharg',\n 'The first argument of the `$location#search()` call must be a string or an object.');\n }\n break;\n default:\n if (isUndefined(paramValue) || paramValue === null) {\n delete this.$$search[search];\n } else {\n this.$$search[search] = paramValue;\n }\n }\n\n this.$$compose();\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#hash\n *\n * @description\n * This method is getter / setter.\n *\n * Returns the hash fragment when called without any parameters.\n *\n * Changes the hash fragment when called with a parameter and returns `$location`.\n *\n *\n * ```js\n * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue\n * var hash = $location.hash();\n * // => \"hashValue\"\n * ```\n *\n * @param {(string|number)=} hash New hash fragment\n * @return {string} hash\n */\n hash: locationGetterSetter('$$hash', function(hash) {\n return hash !== null ? hash.toString() : '';\n }),\n\n /**\n * @ngdoc method\n * @name $location#replace\n *\n * @description\n * If called, all changes to $location during the current `$digest` will replace the current history\n * record, instead of adding a new one.\n */\n replace: function() {\n this.$$replace = true;\n return this;\n }\n};\n\nforEach([LocationHashbangInHtml5Url, LocationHashbangUrl, LocationHtml5Url], function(Location) {\n Location.prototype = Object.create(locationPrototype);\n\n /**\n * @ngdoc method\n * @name $location#state\n *\n * @description\n * This method is getter / setter.\n *\n * Return the history state object when called without any parameter.\n *\n * Change the history state object when called with one parameter and return `$location`.\n * The state object is later passed to `pushState` or `replaceState`.\n *\n * NOTE: This method is supported only in HTML5 mode and only in browsers supporting\n * the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support\n * older browsers (like IE9 or Android < 4.0), don't use this method.\n *\n * @param {object=} state State object for pushState or replaceState\n * @return {object} state\n */\n Location.prototype.state = function(state) {\n if (!arguments.length) {\n return this.$$state;\n }\n\n if (Location !== LocationHtml5Url || !this.$$html5) {\n throw $locationMinErr('nostate', 'History API state support is available only ' +\n 'in HTML5 mode and only in browsers supporting HTML5 History API');\n }\n // The user might modify `stateObject` after invoking `$location.state(stateObject)`\n // but we're changing the $$state reference to $browser.state() during the $digest\n // so the modification window is narrow.\n this.$$state = isUndefined(state) ? null : state;\n this.$$urlUpdatedByLocation = true;\n\n return this;\n };\n});\n\n\nfunction locationGetter(property) {\n return /** @this */ function() {\n return this[property];\n };\n}\n\n\nfunction locationGetterSetter(property, preprocess) {\n return /** @this */ function(value) {\n if (isUndefined(value)) {\n return this[property];\n }\n\n this[property] = preprocess(value);\n this.$$compose();\n\n return this;\n };\n}\n\n\n/**\n * @ngdoc service\n * @name $location\n *\n * @requires $rootElement\n *\n * @description\n * The $location service parses the URL in the browser address bar (based on the\n * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL\n * available to your application. Changes to the URL in the address bar are reflected into\n * $location service and changes to $location are reflected into the browser address bar.\n *\n * **The $location service:**\n *\n * - Exposes the current URL in the browser address bar, so you can\n * - Watch and observe the URL.\n * - Change the URL.\n * - Synchronizes the URL with the browser when the user\n * - Changes the address bar.\n * - Clicks the back or forward button (or clicks a History link).\n * - Clicks on a link.\n * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).\n *\n * For more information see {@link guide/$location Developer Guide: Using $location}\n */\n\n/**\n * @ngdoc provider\n * @name $locationProvider\n * @this\n *\n * @description\n * Use the `$locationProvider` to configure how the application deep linking paths are stored.\n */\nfunction $LocationProvider() {\n var hashPrefix = '!',\n html5Mode = {\n enabled: false,\n requireBase: true,\n rewriteLinks: true\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#hashPrefix\n * @description\n * The default value for the prefix is `'!'`.\n * @param {string=} prefix Prefix for hash part (containing path and search)\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.hashPrefix = function(prefix) {\n if (isDefined(prefix)) {\n hashPrefix = prefix;\n return this;\n } else {\n return hashPrefix;\n }\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#html5Mode\n * @description\n * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.\n * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported\n * properties:\n * - **enabled** – `{boolean}` – (default: false) If true, will rely on `history.pushState` to\n * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not\n * support `pushState`.\n * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies\n * whether or not a tag is required to be present. If `enabled` and `requireBase` are\n * true, and a base tag is not present, an error will be thrown when `$location` is injected.\n * See the {@link guide/$location $location guide for more information}\n * - **rewriteLinks** - `{boolean|string}` - (default: `true`) When html5Mode is enabled,\n * enables/disables URL rewriting for relative links. If set to a string, URL rewriting will\n * only happen on links with an attribute that matches the given string. For example, if set\n * to `'internal-link'`, then the URL will only be rewritten for `` links.\n * Note that [attribute name normalization](guide/directive#normalization) does not apply\n * here, so `'internalLink'` will **not** match `'internal-link'`.\n *\n * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter\n */\n this.html5Mode = function(mode) {\n if (isBoolean(mode)) {\n html5Mode.enabled = mode;\n return this;\n } else if (isObject(mode)) {\n\n if (isBoolean(mode.enabled)) {\n html5Mode.enabled = mode.enabled;\n }\n\n if (isBoolean(mode.requireBase)) {\n html5Mode.requireBase = mode.requireBase;\n }\n\n if (isBoolean(mode.rewriteLinks) || isString(mode.rewriteLinks)) {\n html5Mode.rewriteLinks = mode.rewriteLinks;\n }\n\n return this;\n } else {\n return html5Mode;\n }\n };\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeStart\n * @eventType broadcast on root scope\n * @description\n * Broadcasted before a URL will change.\n *\n * This change can be prevented by calling\n * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more\n * details about event object. Upon successful change\n * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired.\n *\n * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when\n * the browser supports the HTML5 History API.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n * @param {string=} newState New history state object\n * @param {string=} oldState History state object that was before it was changed.\n */\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeSuccess\n * @eventType broadcast on root scope\n * @description\n * Broadcasted after a URL was changed.\n *\n * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when\n * the browser supports the HTML5 History API.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n * @param {string=} newState New history state object\n * @param {string=} oldState History state object that was before it was changed.\n */\n\n this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window',\n function($rootScope, $browser, $sniffer, $rootElement, $window) {\n var $location,\n LocationMode,\n baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''\n initialUrl = $browser.url(),\n appBase;\n\n if (html5Mode.enabled) {\n if (!baseHref && html5Mode.requireBase) {\n throw $locationMinErr('nobase',\n '$location in HTML5 mode requires a tag to be present!');\n }\n appBase = serverBase(initialUrl) + (baseHref || '/');\n LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;\n } else {\n appBase = stripHash(initialUrl);\n LocationMode = LocationHashbangUrl;\n }\n var appBaseNoFile = stripFile(appBase);\n\n $location = new LocationMode(appBase, appBaseNoFile, '#' + hashPrefix);\n $location.$$parseLinkUrl(initialUrl, initialUrl);\n\n $location.$$state = $browser.state();\n\n var IGNORE_URI_REGEXP = /^\\s*(javascript|mailto):/i;\n\n function setBrowserUrlWithFallback(url, replace, state) {\n var oldUrl = $location.url();\n var oldState = $location.$$state;\n try {\n $browser.url(url, replace, state);\n\n // Make sure $location.state() returns referentially identical (not just deeply equal)\n // state object; this makes possible quick checking if the state changed in the digest\n // loop. Checking deep equality would be too expensive.\n $location.$$state = $browser.state();\n } catch (e) {\n // Restore old values if pushState fails\n $location.url(oldUrl);\n $location.$$state = oldState;\n\n throw e;\n }\n }\n\n $rootElement.on('click', function(event) {\n var rewriteLinks = html5Mode.rewriteLinks;\n // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)\n // currently we open nice url link and redirect then\n\n if (!rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which === 2 || event.button === 2) return;\n\n var elm = jqLite(event.target);\n\n // traverse the DOM up to find first A tag\n while (nodeName_(elm[0]) !== 'a') {\n // ignore rewriting if no A tag (reached root element, or no parent - removed from document)\n if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;\n }\n\n if (isString(rewriteLinks) && isUndefined(elm.attr(rewriteLinks))) return;\n\n var absHref = elm.prop('href');\n // get the actual href attribute - see\n // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx\n var relHref = elm.attr('href') || elm.attr('xlink:href');\n\n if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {\n // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during\n // an animation.\n absHref = urlResolve(absHref.animVal).href;\n }\n\n // Ignore when url is started with javascript: or mailto:\n if (IGNORE_URI_REGEXP.test(absHref)) return;\n\n if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) {\n if ($location.$$parseLinkUrl(absHref, relHref)) {\n // We do a preventDefault for all urls that are part of the AngularJS application,\n // in html5mode and also without, so that we are able to abort navigation without\n // getting double entries in the location history.\n event.preventDefault();\n // update location manually\n if ($location.absUrl() !== $browser.url()) {\n $rootScope.$apply();\n }\n }\n }\n });\n\n\n // rewrite hashbang url <> html5 url\n if (trimEmptyHash($location.absUrl()) !== trimEmptyHash(initialUrl)) {\n $browser.url($location.absUrl(), true);\n }\n\n var initializing = true;\n\n // update $location when $browser url changes\n $browser.onUrlChange(function(newUrl, newState) {\n\n if (!startsWith(newUrl, appBaseNoFile)) {\n // If we are navigating outside of the app then force a reload\n $window.location.href = newUrl;\n return;\n }\n\n $rootScope.$evalAsync(function() {\n var oldUrl = $location.absUrl();\n var oldState = $location.$$state;\n var defaultPrevented;\n newUrl = trimEmptyHash(newUrl);\n $location.$$parse(newUrl);\n $location.$$state = newState;\n\n defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,\n newState, oldState).defaultPrevented;\n\n // if the location was changed by a `$locationChangeStart` handler then stop\n // processing this location change\n if ($location.absUrl() !== newUrl) return;\n\n if (defaultPrevented) {\n $location.$$parse(oldUrl);\n $location.$$state = oldState;\n setBrowserUrlWithFallback(oldUrl, false, oldState);\n } else {\n initializing = false;\n afterLocationChange(oldUrl, oldState);\n }\n });\n if (!$rootScope.$$phase) $rootScope.$digest();\n });\n\n // update browser\n $rootScope.$watch(function $locationWatch() {\n if (initializing || $location.$$urlUpdatedByLocation) {\n $location.$$urlUpdatedByLocation = false;\n\n var oldUrl = trimEmptyHash($browser.url());\n var newUrl = trimEmptyHash($location.absUrl());\n var oldState = $browser.state();\n var currentReplace = $location.$$replace;\n var urlOrStateChanged = oldUrl !== newUrl ||\n ($location.$$html5 && $sniffer.history && oldState !== $location.$$state);\n\n if (initializing || urlOrStateChanged) {\n initializing = false;\n\n $rootScope.$evalAsync(function() {\n var newUrl = $location.absUrl();\n var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,\n $location.$$state, oldState).defaultPrevented;\n\n // if the location was changed by a `$locationChangeStart` handler then stop\n // processing this location change\n if ($location.absUrl() !== newUrl) return;\n\n if (defaultPrevented) {\n $location.$$parse(oldUrl);\n $location.$$state = oldState;\n } else {\n if (urlOrStateChanged) {\n setBrowserUrlWithFallback(newUrl, currentReplace,\n oldState === $location.$$state ? null : $location.$$state);\n }\n afterLocationChange(oldUrl, oldState);\n }\n });\n }\n }\n\n $location.$$replace = false;\n\n // we don't need to return anything because $evalAsync will make the digest loop dirty when\n // there is a change\n });\n\n return $location;\n\n function afterLocationChange(oldUrl, oldState) {\n $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl,\n $location.$$state, oldState);\n }\n}];\n}\n\n/**\n * @ngdoc service\n * @name $log\n * @requires $window\n *\n * @description\n * Simple service for logging. Default implementation safely writes the message\n * into the browser's console (if present).\n *\n * The main purpose of this service is to simplify debugging and troubleshooting.\n *\n * To reveal the location of the calls to `$log` in the JavaScript console,\n * you can \"blackbox\" the AngularJS source in your browser:\n *\n * [Mozilla description of blackboxing](https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Black_box_a_source).\n * [Chrome description of blackboxing](https://developer.chrome.com/devtools/docs/blackboxing).\n *\n * Note: Not all browsers support blackboxing.\n *\n * The default is to log `debug` messages. You can use\n * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.\n *\n * @example\n \n \n angular.module('logExample', [])\n .controller('LogController', ['$scope', '$log', function($scope, $log) {\n $scope.$log = $log;\n $scope.message = 'Hello World!';\n }]);\n \n \n
\n

Reload this page with open console, enter text and hit the log button...

\n \n \n \n \n \n \n
\n
\n
\n */\n\n/**\n * @ngdoc provider\n * @name $logProvider\n * @this\n *\n * @description\n * Use the `$logProvider` to configure how the application logs messages\n */\nfunction $LogProvider() {\n var debug = true,\n self = this;\n\n /**\n * @ngdoc method\n * @name $logProvider#debugEnabled\n * @description\n * @param {boolean=} flag enable or disable debug level messages\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.debugEnabled = function(flag) {\n if (isDefined(flag)) {\n debug = flag;\n return this;\n } else {\n return debug;\n }\n };\n\n this.$get = ['$window', function($window) {\n // Support: IE 9-11, Edge 12-14+\n // IE/Edge display errors in such a way that it requires the user to click in 4 places\n // to see the stack trace. There is no way to feature-detect it so there's a chance\n // of the user agent sniffing to go wrong but since it's only about logging, this shouldn't\n // break apps. Other browsers display errors in a sensible way and some of them map stack\n // traces along source maps if available so it makes sense to let browsers display it\n // as they want.\n var formatStackTrace = msie || /\\bEdge\\//.test($window.navigator && $window.navigator.userAgent);\n\n return {\n /**\n * @ngdoc method\n * @name $log#log\n *\n * @description\n * Write a log message\n */\n log: consoleLog('log'),\n\n /**\n * @ngdoc method\n * @name $log#info\n *\n * @description\n * Write an information message\n */\n info: consoleLog('info'),\n\n /**\n * @ngdoc method\n * @name $log#warn\n *\n * @description\n * Write a warning message\n */\n warn: consoleLog('warn'),\n\n /**\n * @ngdoc method\n * @name $log#error\n *\n * @description\n * Write an error message\n */\n error: consoleLog('error'),\n\n /**\n * @ngdoc method\n * @name $log#debug\n *\n * @description\n * Write a debug message\n */\n debug: (function() {\n var fn = consoleLog('debug');\n\n return function() {\n if (debug) {\n fn.apply(self, arguments);\n }\n };\n })()\n };\n\n function formatError(arg) {\n if (isError(arg)) {\n if (arg.stack && formatStackTrace) {\n arg = (arg.message && arg.stack.indexOf(arg.message) === -1)\n ? 'Error: ' + arg.message + '\\n' + arg.stack\n : arg.stack;\n } else if (arg.sourceURL) {\n arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n }\n }\n return arg;\n }\n\n function consoleLog(type) {\n var console = $window.console || {},\n logFn = console[type] || console.log || noop;\n\n return function() {\n var args = [];\n forEach(arguments, function(arg) {\n args.push(formatError(arg));\n });\n // Support: IE 9 only\n // console methods don't inherit from Function.prototype in IE 9 so we can't\n // call `logFn.apply(console, args)` directly.\n return Function.prototype.apply.call(logFn, console, args);\n };\n }\n }];\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables likes document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\nvar $parseMinErr = minErr('$parse');\n\nvar objectValueOf = {}.constructor.prototype.valueOf;\n\n// Sandboxing AngularJS Expressions\n// ------------------------------\n// AngularJS expressions are no longer sandboxed. So it is now even easier to access arbitrary JS code by\n// various means such as obtaining a reference to native JS functions like the Function constructor.\n//\n// As an example, consider the following AngularJS expression:\n//\n// {}.toString.constructor('alert(\"evil JS code\")')\n//\n// It is important to realize that if you create an expression from a string that contains user provided\n// content then it is possible that your application contains a security vulnerability to an XSS style attack.\n//\n// See https://docs.angularjs.org/guide/security\n\n\nfunction getStringValue(name) {\n // Property names must be strings. This means that non-string objects cannot be used\n // as keys in an object. Any non-string object, including a number, is typecasted\n // into a string via the toString method.\n // -- MDN, https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Property_accessors#Property_names\n //\n // So, to ensure that we are checking the same `name` that JavaScript would use, we cast it\n // to a string. It's not always possible. If `name` is an object and its `toString` method is\n // 'broken' (doesn't return a string, isn't a function, etc.), an error will be thrown:\n //\n // TypeError: Cannot convert object to primitive value\n //\n // For performance reasons, we don't catch this error here and allow it to propagate up the call\n // stack. Note that you'll get the same error in JavaScript if you try to access a property using\n // such a 'broken' object as a key.\n return name + '';\n}\n\n\nvar OPERATORS = createMap();\nforEach('+ - * / % === !== == != < > <= >= && || ! = |'.split(' '), function(operator) { OPERATORS[operator] = true; });\nvar ESCAPE = {'n':'\\n', 'f':'\\f', 'r':'\\r', 't':'\\t', 'v':'\\v', '\\'':'\\'', '\"':'\"'};\n\n\n/////////////////////////////////////////\n\n\n/**\n * @constructor\n */\nvar Lexer = function Lexer(options) {\n this.options = options;\n};\n\nLexer.prototype = {\n constructor: Lexer,\n\n lex: function(text) {\n this.text = text;\n this.index = 0;\n this.tokens = [];\n\n while (this.index < this.text.length) {\n var ch = this.text.charAt(this.index);\n if (ch === '\"' || ch === '\\'') {\n this.readString(ch);\n } else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) {\n this.readNumber();\n } else if (this.isIdentifierStart(this.peekMultichar())) {\n this.readIdent();\n } else if (this.is(ch, '(){}[].,;:?')) {\n this.tokens.push({index: this.index, text: ch});\n this.index++;\n } else if (this.isWhitespace(ch)) {\n this.index++;\n } else {\n var ch2 = ch + this.peek();\n var ch3 = ch2 + this.peek(2);\n var op1 = OPERATORS[ch];\n var op2 = OPERATORS[ch2];\n var op3 = OPERATORS[ch3];\n if (op1 || op2 || op3) {\n var token = op3 ? ch3 : (op2 ? ch2 : ch);\n this.tokens.push({index: this.index, text: token, operator: true});\n this.index += token.length;\n } else {\n this.throwError('Unexpected next character ', this.index, this.index + 1);\n }\n }\n }\n return this.tokens;\n },\n\n is: function(ch, chars) {\n return chars.indexOf(ch) !== -1;\n },\n\n peek: function(i) {\n var num = i || 1;\n return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;\n },\n\n isNumber: function(ch) {\n return ('0' <= ch && ch <= '9') && typeof ch === 'string';\n },\n\n isWhitespace: function(ch) {\n // IE treats non-breaking space as \\u00A0\n return (ch === ' ' || ch === '\\r' || ch === '\\t' ||\n ch === '\\n' || ch === '\\v' || ch === '\\u00A0');\n },\n\n isIdentifierStart: function(ch) {\n return this.options.isIdentifierStart ?\n this.options.isIdentifierStart(ch, this.codePointAt(ch)) :\n this.isValidIdentifierStart(ch);\n },\n\n isValidIdentifierStart: function(ch) {\n return ('a' <= ch && ch <= 'z' ||\n 'A' <= ch && ch <= 'Z' ||\n '_' === ch || ch === '$');\n },\n\n isIdentifierContinue: function(ch) {\n return this.options.isIdentifierContinue ?\n this.options.isIdentifierContinue(ch, this.codePointAt(ch)) :\n this.isValidIdentifierContinue(ch);\n },\n\n isValidIdentifierContinue: function(ch, cp) {\n return this.isValidIdentifierStart(ch, cp) || this.isNumber(ch);\n },\n\n codePointAt: function(ch) {\n if (ch.length === 1) return ch.charCodeAt(0);\n // eslint-disable-next-line no-bitwise\n return (ch.charCodeAt(0) << 10) + ch.charCodeAt(1) - 0x35FDC00;\n },\n\n peekMultichar: function() {\n var ch = this.text.charAt(this.index);\n var peek = this.peek();\n if (!peek) {\n return ch;\n }\n var cp1 = ch.charCodeAt(0);\n var cp2 = peek.charCodeAt(0);\n if (cp1 >= 0xD800 && cp1 <= 0xDBFF && cp2 >= 0xDC00 && cp2 <= 0xDFFF) {\n return ch + peek;\n }\n return ch;\n },\n\n isExpOperator: function(ch) {\n return (ch === '-' || ch === '+' || this.isNumber(ch));\n },\n\n throwError: function(error, start, end) {\n end = end || this.index;\n var colStr = (isDefined(start)\n ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'\n : ' ' + end);\n throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',\n error, colStr, this.text);\n },\n\n readNumber: function() {\n var number = '';\n var start = this.index;\n while (this.index < this.text.length) {\n var ch = lowercase(this.text.charAt(this.index));\n if (ch === '.' || this.isNumber(ch)) {\n number += ch;\n } else {\n var peekCh = this.peek();\n if (ch === 'e' && this.isExpOperator(peekCh)) {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n peekCh && this.isNumber(peekCh) &&\n number.charAt(number.length - 1) === 'e') {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n (!peekCh || !this.isNumber(peekCh)) &&\n number.charAt(number.length - 1) === 'e') {\n this.throwError('Invalid exponent');\n } else {\n break;\n }\n }\n this.index++;\n }\n this.tokens.push({\n index: start,\n text: number,\n constant: true,\n value: Number(number)\n });\n },\n\n readIdent: function() {\n var start = this.index;\n this.index += this.peekMultichar().length;\n while (this.index < this.text.length) {\n var ch = this.peekMultichar();\n if (!this.isIdentifierContinue(ch)) {\n break;\n }\n this.index += ch.length;\n }\n this.tokens.push({\n index: start,\n text: this.text.slice(start, this.index),\n identifier: true\n });\n },\n\n readString: function(quote) {\n var start = this.index;\n this.index++;\n var string = '';\n var rawString = quote;\n var escape = false;\n while (this.index < this.text.length) {\n var ch = this.text.charAt(this.index);\n rawString += ch;\n if (escape) {\n if (ch === 'u') {\n var hex = this.text.substring(this.index + 1, this.index + 5);\n if (!hex.match(/[\\da-f]{4}/i)) {\n this.throwError('Invalid unicode escape [\\\\u' + hex + ']');\n }\n this.index += 4;\n string += String.fromCharCode(parseInt(hex, 16));\n } else {\n var rep = ESCAPE[ch];\n string = string + (rep || ch);\n }\n escape = false;\n } else if (ch === '\\\\') {\n escape = true;\n } else if (ch === quote) {\n this.index++;\n this.tokens.push({\n index: start,\n text: rawString,\n constant: true,\n value: string\n });\n return;\n } else {\n string += ch;\n }\n this.index++;\n }\n this.throwError('Unterminated quote', start);\n }\n};\n\nvar AST = function AST(lexer, options) {\n this.lexer = lexer;\n this.options = options;\n};\n\nAST.Program = 'Program';\nAST.ExpressionStatement = 'ExpressionStatement';\nAST.AssignmentExpression = 'AssignmentExpression';\nAST.ConditionalExpression = 'ConditionalExpression';\nAST.LogicalExpression = 'LogicalExpression';\nAST.BinaryExpression = 'BinaryExpression';\nAST.UnaryExpression = 'UnaryExpression';\nAST.CallExpression = 'CallExpression';\nAST.MemberExpression = 'MemberExpression';\nAST.Identifier = 'Identifier';\nAST.Literal = 'Literal';\nAST.ArrayExpression = 'ArrayExpression';\nAST.Property = 'Property';\nAST.ObjectExpression = 'ObjectExpression';\nAST.ThisExpression = 'ThisExpression';\nAST.LocalsExpression = 'LocalsExpression';\n\n// Internal use only\nAST.NGValueParameter = 'NGValueParameter';\n\nAST.prototype = {\n ast: function(text) {\n this.text = text;\n this.tokens = this.lexer.lex(text);\n\n var value = this.program();\n\n if (this.tokens.length !== 0) {\n this.throwError('is an unexpected token', this.tokens[0]);\n }\n\n return value;\n },\n\n program: function() {\n var body = [];\n while (true) {\n if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))\n body.push(this.expressionStatement());\n if (!this.expect(';')) {\n return { type: AST.Program, body: body};\n }\n }\n },\n\n expressionStatement: function() {\n return { type: AST.ExpressionStatement, expression: this.filterChain() };\n },\n\n filterChain: function() {\n var left = this.expression();\n while (this.expect('|')) {\n left = this.filter(left);\n }\n return left;\n },\n\n expression: function() {\n return this.assignment();\n },\n\n assignment: function() {\n var result = this.ternary();\n if (this.expect('=')) {\n if (!isAssignable(result)) {\n throw $parseMinErr('lval', 'Trying to assign a value to a non l-value');\n }\n\n result = { type: AST.AssignmentExpression, left: result, right: this.assignment(), operator: '='};\n }\n return result;\n },\n\n ternary: function() {\n var test = this.logicalOR();\n var alternate;\n var consequent;\n if (this.expect('?')) {\n alternate = this.expression();\n if (this.consume(':')) {\n consequent = this.expression();\n return { type: AST.ConditionalExpression, test: test, alternate: alternate, consequent: consequent};\n }\n }\n return test;\n },\n\n logicalOR: function() {\n var left = this.logicalAND();\n while (this.expect('||')) {\n left = { type: AST.LogicalExpression, operator: '||', left: left, right: this.logicalAND() };\n }\n return left;\n },\n\n logicalAND: function() {\n var left = this.equality();\n while (this.expect('&&')) {\n left = { type: AST.LogicalExpression, operator: '&&', left: left, right: this.equality()};\n }\n return left;\n },\n\n equality: function() {\n var left = this.relational();\n var token;\n while ((token = this.expect('==','!=','===','!=='))) {\n left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.relational() };\n }\n return left;\n },\n\n relational: function() {\n var left = this.additive();\n var token;\n while ((token = this.expect('<', '>', '<=', '>='))) {\n left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.additive() };\n }\n return left;\n },\n\n additive: function() {\n var left = this.multiplicative();\n var token;\n while ((token = this.expect('+','-'))) {\n left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.multiplicative() };\n }\n return left;\n },\n\n multiplicative: function() {\n var left = this.unary();\n var token;\n while ((token = this.expect('*','/','%'))) {\n left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.unary() };\n }\n return left;\n },\n\n unary: function() {\n var token;\n if ((token = this.expect('+', '-', '!'))) {\n return { type: AST.UnaryExpression, operator: token.text, prefix: true, argument: this.unary() };\n } else {\n return this.primary();\n }\n },\n\n primary: function() {\n var primary;\n if (this.expect('(')) {\n primary = this.filterChain();\n this.consume(')');\n } else if (this.expect('[')) {\n primary = this.arrayDeclaration();\n } else if (this.expect('{')) {\n primary = this.object();\n } else if (this.selfReferential.hasOwnProperty(this.peek().text)) {\n primary = copy(this.selfReferential[this.consume().text]);\n } else if (this.options.literals.hasOwnProperty(this.peek().text)) {\n primary = { type: AST.Literal, value: this.options.literals[this.consume().text]};\n } else if (this.peek().identifier) {\n primary = this.identifier();\n } else if (this.peek().constant) {\n primary = this.constant();\n } else {\n this.throwError('not a primary expression', this.peek());\n }\n\n var next;\n while ((next = this.expect('(', '[', '.'))) {\n if (next.text === '(') {\n primary = {type: AST.CallExpression, callee: primary, arguments: this.parseArguments() };\n this.consume(')');\n } else if (next.text === '[') {\n primary = { type: AST.MemberExpression, object: primary, property: this.expression(), computed: true };\n this.consume(']');\n } else if (next.text === '.') {\n primary = { type: AST.MemberExpression, object: primary, property: this.identifier(), computed: false };\n } else {\n this.throwError('IMPOSSIBLE');\n }\n }\n return primary;\n },\n\n filter: function(baseExpression) {\n var args = [baseExpression];\n var result = {type: AST.CallExpression, callee: this.identifier(), arguments: args, filter: true};\n\n while (this.expect(':')) {\n args.push(this.expression());\n }\n\n return result;\n },\n\n parseArguments: function() {\n var args = [];\n if (this.peekToken().text !== ')') {\n do {\n args.push(this.filterChain());\n } while (this.expect(','));\n }\n return args;\n },\n\n identifier: function() {\n var token = this.consume();\n if (!token.identifier) {\n this.throwError('is not a valid identifier', token);\n }\n return { type: AST.Identifier, name: token.text };\n },\n\n constant: function() {\n // TODO check that it is a constant\n return { type: AST.Literal, value: this.consume().value };\n },\n\n arrayDeclaration: function() {\n var elements = [];\n if (this.peekToken().text !== ']') {\n do {\n if (this.peek(']')) {\n // Support trailing commas per ES5.1.\n break;\n }\n elements.push(this.expression());\n } while (this.expect(','));\n }\n this.consume(']');\n\n return { type: AST.ArrayExpression, elements: elements };\n },\n\n object: function() {\n var properties = [], property;\n if (this.peekToken().text !== '}') {\n do {\n if (this.peek('}')) {\n // Support trailing commas per ES5.1.\n break;\n }\n property = {type: AST.Property, kind: 'init'};\n if (this.peek().constant) {\n property.key = this.constant();\n property.computed = false;\n this.consume(':');\n property.value = this.expression();\n } else if (this.peek().identifier) {\n property.key = this.identifier();\n property.computed = false;\n if (this.peek(':')) {\n this.consume(':');\n property.value = this.expression();\n } else {\n property.value = property.key;\n }\n } else if (this.peek('[')) {\n this.consume('[');\n property.key = this.expression();\n this.consume(']');\n property.computed = true;\n this.consume(':');\n property.value = this.expression();\n } else {\n this.throwError('invalid key', this.peek());\n }\n properties.push(property);\n } while (this.expect(','));\n }\n this.consume('}');\n\n return {type: AST.ObjectExpression, properties: properties };\n },\n\n throwError: function(msg, token) {\n throw $parseMinErr('syntax',\n 'Syntax Error: Token \\'{0}\\' {1} at column {2} of the expression [{3}] starting at [{4}].',\n token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));\n },\n\n consume: function(e1) {\n if (this.tokens.length === 0) {\n throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n }\n\n var token = this.expect(e1);\n if (!token) {\n this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());\n }\n return token;\n },\n\n peekToken: function() {\n if (this.tokens.length === 0) {\n throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n }\n return this.tokens[0];\n },\n\n peek: function(e1, e2, e3, e4) {\n return this.peekAhead(0, e1, e2, e3, e4);\n },\n\n peekAhead: function(i, e1, e2, e3, e4) {\n if (this.tokens.length > i) {\n var token = this.tokens[i];\n var t = token.text;\n if (t === e1 || t === e2 || t === e3 || t === e4 ||\n (!e1 && !e2 && !e3 && !e4)) {\n return token;\n }\n }\n return false;\n },\n\n expect: function(e1, e2, e3, e4) {\n var token = this.peek(e1, e2, e3, e4);\n if (token) {\n this.tokens.shift();\n return token;\n }\n return false;\n },\n\n selfReferential: {\n 'this': {type: AST.ThisExpression },\n '$locals': {type: AST.LocalsExpression }\n }\n};\n\nfunction ifDefined(v, d) {\n return typeof v !== 'undefined' ? v : d;\n}\n\nfunction plusFn(l, r) {\n if (typeof l === 'undefined') return r;\n if (typeof r === 'undefined') return l;\n return l + r;\n}\n\nfunction isStateless($filter, filterName) {\n var fn = $filter(filterName);\n return !fn.$stateful;\n}\n\nvar PURITY_ABSOLUTE = 1;\nvar PURITY_RELATIVE = 2;\n\n// Detect nodes which could depend on non-shallow state of objects\nfunction isPure(node, parentIsPure) {\n switch (node.type) {\n // Computed members might invoke a stateful toString()\n case AST.MemberExpression:\n if (node.computed) {\n return false;\n }\n break;\n\n // Unary always convert to primative\n case AST.UnaryExpression:\n return PURITY_ABSOLUTE;\n\n // The binary + operator can invoke a stateful toString().\n case AST.BinaryExpression:\n return node.operator !== '+' ? PURITY_ABSOLUTE : false;\n\n // Functions / filters probably read state from within objects\n case AST.CallExpression:\n return false;\n }\n\n return (undefined === parentIsPure) ? PURITY_RELATIVE : parentIsPure;\n}\n\nfunction findConstantAndWatchExpressions(ast, $filter, parentIsPure) {\n var allConstants;\n var argsToWatch;\n var isStatelessFilter;\n\n var astIsPure = ast.isPure = isPure(ast, parentIsPure);\n\n switch (ast.type) {\n case AST.Program:\n allConstants = true;\n forEach(ast.body, function(expr) {\n findConstantAndWatchExpressions(expr.expression, $filter, astIsPure);\n allConstants = allConstants && expr.expression.constant;\n });\n ast.constant = allConstants;\n break;\n case AST.Literal:\n ast.constant = true;\n ast.toWatch = [];\n break;\n case AST.UnaryExpression:\n findConstantAndWatchExpressions(ast.argument, $filter, astIsPure);\n ast.constant = ast.argument.constant;\n ast.toWatch = ast.argument.toWatch;\n break;\n case AST.BinaryExpression:\n findConstantAndWatchExpressions(ast.left, $filter, astIsPure);\n findConstantAndWatchExpressions(ast.right, $filter, astIsPure);\n ast.constant = ast.left.constant && ast.right.constant;\n ast.toWatch = ast.left.toWatch.concat(ast.right.toWatch);\n break;\n case AST.LogicalExpression:\n findConstantAndWatchExpressions(ast.left, $filter, astIsPure);\n findConstantAndWatchExpressions(ast.right, $filter, astIsPure);\n ast.constant = ast.left.constant && ast.right.constant;\n ast.toWatch = ast.constant ? [] : [ast];\n break;\n case AST.ConditionalExpression:\n findConstantAndWatchExpressions(ast.test, $filter, astIsPure);\n findConstantAndWatchExpressions(ast.alternate, $filter, astIsPure);\n findConstantAndWatchExpressions(ast.consequent, $filter, astIsPure);\n ast.constant = ast.test.constant && ast.alternate.constant && ast.consequent.constant;\n ast.toWatch = ast.constant ? [] : [ast];\n break;\n case AST.Identifier:\n ast.constant = false;\n ast.toWatch = [ast];\n break;\n case AST.MemberExpression:\n findConstantAndWatchExpressions(ast.object, $filter, astIsPure);\n if (ast.computed) {\n findConstantAndWatchExpressions(ast.property, $filter, astIsPure);\n }\n ast.constant = ast.object.constant && (!ast.computed || ast.property.constant);\n ast.toWatch = ast.constant ? [] : [ast];\n break;\n case AST.CallExpression:\n isStatelessFilter = ast.filter ? isStateless($filter, ast.callee.name) : false;\n allConstants = isStatelessFilter;\n argsToWatch = [];\n forEach(ast.arguments, function(expr) {\n findConstantAndWatchExpressions(expr, $filter, astIsPure);\n allConstants = allConstants && expr.constant;\n argsToWatch.push.apply(argsToWatch, expr.toWatch);\n });\n ast.constant = allConstants;\n ast.toWatch = isStatelessFilter ? argsToWatch : [ast];\n break;\n case AST.AssignmentExpression:\n findConstantAndWatchExpressions(ast.left, $filter, astIsPure);\n findConstantAndWatchExpressions(ast.right, $filter, astIsPure);\n ast.constant = ast.left.constant && ast.right.constant;\n ast.toWatch = [ast];\n break;\n case AST.ArrayExpression:\n allConstants = true;\n argsToWatch = [];\n forEach(ast.elements, function(expr) {\n findConstantAndWatchExpressions(expr, $filter, astIsPure);\n allConstants = allConstants && expr.constant;\n argsToWatch.push.apply(argsToWatch, expr.toWatch);\n });\n ast.constant = allConstants;\n ast.toWatch = argsToWatch;\n break;\n case AST.ObjectExpression:\n allConstants = true;\n argsToWatch = [];\n forEach(ast.properties, function(property) {\n findConstantAndWatchExpressions(property.value, $filter, astIsPure);\n allConstants = allConstants && property.value.constant;\n argsToWatch.push.apply(argsToWatch, property.value.toWatch);\n if (property.computed) {\n //`{[key]: value}` implicitly does `key.toString()` which may be non-pure\n findConstantAndWatchExpressions(property.key, $filter, /*parentIsPure=*/false);\n allConstants = allConstants && property.key.constant;\n argsToWatch.push.apply(argsToWatch, property.key.toWatch);\n }\n });\n ast.constant = allConstants;\n ast.toWatch = argsToWatch;\n break;\n case AST.ThisExpression:\n ast.constant = false;\n ast.toWatch = [];\n break;\n case AST.LocalsExpression:\n ast.constant = false;\n ast.toWatch = [];\n break;\n }\n}\n\nfunction getInputs(body) {\n if (body.length !== 1) return;\n var lastExpression = body[0].expression;\n var candidate = lastExpression.toWatch;\n if (candidate.length !== 1) return candidate;\n return candidate[0] !== lastExpression ? candidate : undefined;\n}\n\nfunction isAssignable(ast) {\n return ast.type === AST.Identifier || ast.type === AST.MemberExpression;\n}\n\nfunction assignableAST(ast) {\n if (ast.body.length === 1 && isAssignable(ast.body[0].expression)) {\n return {type: AST.AssignmentExpression, left: ast.body[0].expression, right: {type: AST.NGValueParameter}, operator: '='};\n }\n}\n\nfunction isLiteral(ast) {\n return ast.body.length === 0 ||\n ast.body.length === 1 && (\n ast.body[0].expression.type === AST.Literal ||\n ast.body[0].expression.type === AST.ArrayExpression ||\n ast.body[0].expression.type === AST.ObjectExpression);\n}\n\nfunction isConstant(ast) {\n return ast.constant;\n}\n\nfunction ASTCompiler($filter) {\n this.$filter = $filter;\n}\n\nASTCompiler.prototype = {\n compile: function(ast) {\n var self = this;\n this.state = {\n nextId: 0,\n filters: {},\n fn: {vars: [], body: [], own: {}},\n assign: {vars: [], body: [], own: {}},\n inputs: []\n };\n findConstantAndWatchExpressions(ast, self.$filter);\n var extra = '';\n var assignable;\n this.stage = 'assign';\n if ((assignable = assignableAST(ast))) {\n this.state.computing = 'assign';\n var result = this.nextId();\n this.recurse(assignable, result);\n this.return_(result);\n extra = 'fn.assign=' + this.generateFunction('assign', 's,v,l');\n }\n var toWatch = getInputs(ast.body);\n self.stage = 'inputs';\n forEach(toWatch, function(watch, key) {\n var fnKey = 'fn' + key;\n self.state[fnKey] = {vars: [], body: [], own: {}};\n self.state.computing = fnKey;\n var intoId = self.nextId();\n self.recurse(watch, intoId);\n self.return_(intoId);\n self.state.inputs.push({name: fnKey, isPure: watch.isPure});\n watch.watchId = key;\n });\n this.state.computing = 'fn';\n this.stage = 'main';\n this.recurse(ast);\n var fnString =\n // The build and minification steps remove the string \"use strict\" from the code, but this is done using a regex.\n // This is a workaround for this until we do a better job at only removing the prefix only when we should.\n '\"' + this.USE + ' ' + this.STRICT + '\";\\n' +\n this.filterPrefix() +\n 'var fn=' + this.generateFunction('fn', 's,l,a,i') +\n extra +\n this.watchFns() +\n 'return fn;';\n\n // eslint-disable-next-line no-new-func\n var fn = (new Function('$filter',\n 'getStringValue',\n 'ifDefined',\n 'plus',\n fnString))(\n this.$filter,\n getStringValue,\n ifDefined,\n plusFn);\n this.state = this.stage = undefined;\n return fn;\n },\n\n USE: 'use',\n\n STRICT: 'strict',\n\n watchFns: function() {\n var result = [];\n var inputs = this.state.inputs;\n var self = this;\n forEach(inputs, function(input) {\n result.push('var ' + input.name + '=' + self.generateFunction(input.name, 's'));\n if (input.isPure) {\n result.push(input.name, '.isPure=' + JSON.stringify(input.isPure) + ';');\n }\n });\n if (inputs.length) {\n result.push('fn.inputs=[' + inputs.map(function(i) { return i.name; }).join(',') + '];');\n }\n return result.join('');\n },\n\n generateFunction: function(name, params) {\n return 'function(' + params + '){' +\n this.varsPrefix(name) +\n this.body(name) +\n '};';\n },\n\n filterPrefix: function() {\n var parts = [];\n var self = this;\n forEach(this.state.filters, function(id, filter) {\n parts.push(id + '=$filter(' + self.escape(filter) + ')');\n });\n if (parts.length) return 'var ' + parts.join(',') + ';';\n return '';\n },\n\n varsPrefix: function(section) {\n return this.state[section].vars.length ? 'var ' + this.state[section].vars.join(',') + ';' : '';\n },\n\n body: function(section) {\n return this.state[section].body.join('');\n },\n\n recurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {\n var left, right, self = this, args, expression, computed;\n recursionFn = recursionFn || noop;\n if (!skipWatchIdCheck && isDefined(ast.watchId)) {\n intoId = intoId || this.nextId();\n this.if_('i',\n this.lazyAssign(intoId, this.computedMember('i', ast.watchId)),\n this.lazyRecurse(ast, intoId, nameId, recursionFn, create, true)\n );\n return;\n }\n switch (ast.type) {\n case AST.Program:\n forEach(ast.body, function(expression, pos) {\n self.recurse(expression.expression, undefined, undefined, function(expr) { right = expr; });\n if (pos !== ast.body.length - 1) {\n self.current().body.push(right, ';');\n } else {\n self.return_(right);\n }\n });\n break;\n case AST.Literal:\n expression = this.escape(ast.value);\n this.assign(intoId, expression);\n recursionFn(intoId || expression);\n break;\n case AST.UnaryExpression:\n this.recurse(ast.argument, undefined, undefined, function(expr) { right = expr; });\n expression = ast.operator + '(' + this.ifDefined(right, 0) + ')';\n this.assign(intoId, expression);\n recursionFn(expression);\n break;\n case AST.BinaryExpression:\n this.recurse(ast.left, undefined, undefined, function(expr) { left = expr; });\n this.recurse(ast.right, undefined, undefined, function(expr) { right = expr; });\n if (ast.operator === '+') {\n expression = this.plus(left, right);\n } else if (ast.operator === '-') {\n expression = this.ifDefined(left, 0) + ast.operator + this.ifDefined(right, 0);\n } else {\n expression = '(' + left + ')' + ast.operator + '(' + right + ')';\n }\n this.assign(intoId, expression);\n recursionFn(expression);\n break;\n case AST.LogicalExpression:\n intoId = intoId || this.nextId();\n self.recurse(ast.left, intoId);\n self.if_(ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId));\n recursionFn(intoId);\n break;\n case AST.ConditionalExpression:\n intoId = intoId || this.nextId();\n self.recurse(ast.test, intoId);\n self.if_(intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId));\n recursionFn(intoId);\n break;\n case AST.Identifier:\n intoId = intoId || this.nextId();\n if (nameId) {\n nameId.context = self.stage === 'inputs' ? 's' : this.assign(this.nextId(), this.getHasOwnProperty('l', ast.name) + '?l:s');\n nameId.computed = false;\n nameId.name = ast.name;\n }\n self.if_(self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)),\n function() {\n self.if_(self.stage === 'inputs' || 's', function() {\n if (create && create !== 1) {\n self.if_(\n self.isNull(self.nonComputedMember('s', ast.name)),\n self.lazyAssign(self.nonComputedMember('s', ast.name), '{}'));\n }\n self.assign(intoId, self.nonComputedMember('s', ast.name));\n });\n }, intoId && self.lazyAssign(intoId, self.nonComputedMember('l', ast.name))\n );\n recursionFn(intoId);\n break;\n case AST.MemberExpression:\n left = nameId && (nameId.context = this.nextId()) || this.nextId();\n intoId = intoId || this.nextId();\n self.recurse(ast.object, left, undefined, function() {\n self.if_(self.notNull(left), function() {\n if (ast.computed) {\n right = self.nextId();\n self.recurse(ast.property, right);\n self.getStringValue(right);\n if (create && create !== 1) {\n self.if_(self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}'));\n }\n expression = self.computedMember(left, right);\n self.assign(intoId, expression);\n if (nameId) {\n nameId.computed = true;\n nameId.name = right;\n }\n } else {\n if (create && create !== 1) {\n self.if_(self.isNull(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}'));\n }\n expression = self.nonComputedMember(left, ast.property.name);\n self.assign(intoId, expression);\n if (nameId) {\n nameId.computed = false;\n nameId.name = ast.property.name;\n }\n }\n }, function() {\n self.assign(intoId, 'undefined');\n });\n recursionFn(intoId);\n }, !!create);\n break;\n case AST.CallExpression:\n intoId = intoId || this.nextId();\n if (ast.filter) {\n right = self.filter(ast.callee.name);\n args = [];\n forEach(ast.arguments, function(expr) {\n var argument = self.nextId();\n self.recurse(expr, argument);\n args.push(argument);\n });\n expression = right + '(' + args.join(',') + ')';\n self.assign(intoId, expression);\n recursionFn(intoId);\n } else {\n right = self.nextId();\n left = {};\n args = [];\n self.recurse(ast.callee, right, left, function() {\n self.if_(self.notNull(right), function() {\n forEach(ast.arguments, function(expr) {\n self.recurse(expr, ast.constant ? undefined : self.nextId(), undefined, function(argument) {\n args.push(argument);\n });\n });\n if (left.name) {\n expression = self.member(left.context, left.name, left.computed) + '(' + args.join(',') + ')';\n } else {\n expression = right + '(' + args.join(',') + ')';\n }\n self.assign(intoId, expression);\n }, function() {\n self.assign(intoId, 'undefined');\n });\n recursionFn(intoId);\n });\n }\n break;\n case AST.AssignmentExpression:\n right = this.nextId();\n left = {};\n this.recurse(ast.left, undefined, left, function() {\n self.if_(self.notNull(left.context), function() {\n self.recurse(ast.right, right);\n expression = self.member(left.context, left.name, left.computed) + ast.operator + right;\n self.assign(intoId, expression);\n recursionFn(intoId || expression);\n });\n }, 1);\n break;\n case AST.ArrayExpression:\n args = [];\n forEach(ast.elements, function(expr) {\n self.recurse(expr, ast.constant ? undefined : self.nextId(), undefined, function(argument) {\n args.push(argument);\n });\n });\n expression = '[' + args.join(',') + ']';\n this.assign(intoId, expression);\n recursionFn(intoId || expression);\n break;\n case AST.ObjectExpression:\n args = [];\n computed = false;\n forEach(ast.properties, function(property) {\n if (property.computed) {\n computed = true;\n }\n });\n if (computed) {\n intoId = intoId || this.nextId();\n this.assign(intoId, '{}');\n forEach(ast.properties, function(property) {\n if (property.computed) {\n left = self.nextId();\n self.recurse(property.key, left);\n } else {\n left = property.key.type === AST.Identifier ?\n property.key.name :\n ('' + property.key.value);\n }\n right = self.nextId();\n self.recurse(property.value, right);\n self.assign(self.member(intoId, left, property.computed), right);\n });\n } else {\n forEach(ast.properties, function(property) {\n self.recurse(property.value, ast.constant ? undefined : self.nextId(), undefined, function(expr) {\n args.push(self.escape(\n property.key.type === AST.Identifier ? property.key.name :\n ('' + property.key.value)) +\n ':' + expr);\n });\n });\n expression = '{' + args.join(',') + '}';\n this.assign(intoId, expression);\n }\n recursionFn(intoId || expression);\n break;\n case AST.ThisExpression:\n this.assign(intoId, 's');\n recursionFn(intoId || 's');\n break;\n case AST.LocalsExpression:\n this.assign(intoId, 'l');\n recursionFn(intoId || 'l');\n break;\n case AST.NGValueParameter:\n this.assign(intoId, 'v');\n recursionFn(intoId || 'v');\n break;\n }\n },\n\n getHasOwnProperty: function(element, property) {\n var key = element + '.' + property;\n var own = this.current().own;\n if (!own.hasOwnProperty(key)) {\n own[key] = this.nextId(false, element + '&&(' + this.escape(property) + ' in ' + element + ')');\n }\n return own[key];\n },\n\n assign: function(id, value) {\n if (!id) return;\n this.current().body.push(id, '=', value, ';');\n return id;\n },\n\n filter: function(filterName) {\n if (!this.state.filters.hasOwnProperty(filterName)) {\n this.state.filters[filterName] = this.nextId(true);\n }\n return this.state.filters[filterName];\n },\n\n ifDefined: function(id, defaultValue) {\n return 'ifDefined(' + id + ',' + this.escape(defaultValue) + ')';\n },\n\n plus: function(left, right) {\n return 'plus(' + left + ',' + right + ')';\n },\n\n return_: function(id) {\n this.current().body.push('return ', id, ';');\n },\n\n if_: function(test, alternate, consequent) {\n if (test === true) {\n alternate();\n } else {\n var body = this.current().body;\n body.push('if(', test, '){');\n alternate();\n body.push('}');\n if (consequent) {\n body.push('else{');\n consequent();\n body.push('}');\n }\n }\n },\n\n not: function(expression) {\n return '!(' + expression + ')';\n },\n\n isNull: function(expression) {\n return expression + '==null';\n },\n\n notNull: function(expression) {\n return expression + '!=null';\n },\n\n nonComputedMember: function(left, right) {\n var SAFE_IDENTIFIER = /^[$_a-zA-Z][$_a-zA-Z0-9]*$/;\n var UNSAFE_CHARACTERS = /[^$_a-zA-Z0-9]/g;\n if (SAFE_IDENTIFIER.test(right)) {\n return left + '.' + right;\n } else {\n return left + '[\"' + right.replace(UNSAFE_CHARACTERS, this.stringEscapeFn) + '\"]';\n }\n },\n\n computedMember: function(left, right) {\n return left + '[' + right + ']';\n },\n\n member: function(left, right, computed) {\n if (computed) return this.computedMember(left, right);\n return this.nonComputedMember(left, right);\n },\n\n getStringValue: function(item) {\n this.assign(item, 'getStringValue(' + item + ')');\n },\n\n lazyRecurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {\n var self = this;\n return function() {\n self.recurse(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck);\n };\n },\n\n lazyAssign: function(id, value) {\n var self = this;\n return function() {\n self.assign(id, value);\n };\n },\n\n stringEscapeRegex: /[^ a-zA-Z0-9]/g,\n\n stringEscapeFn: function(c) {\n return '\\\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4);\n },\n\n escape: function(value) {\n if (isString(value)) return '\\'' + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + '\\'';\n if (isNumber(value)) return value.toString();\n if (value === true) return 'true';\n if (value === false) return 'false';\n if (value === null) return 'null';\n if (typeof value === 'undefined') return 'undefined';\n\n throw $parseMinErr('esc', 'IMPOSSIBLE');\n },\n\n nextId: function(skip, init) {\n var id = 'v' + (this.state.nextId++);\n if (!skip) {\n this.current().vars.push(id + (init ? '=' + init : ''));\n }\n return id;\n },\n\n current: function() {\n return this.state[this.state.computing];\n }\n};\n\n\nfunction ASTInterpreter($filter) {\n this.$filter = $filter;\n}\n\nASTInterpreter.prototype = {\n compile: function(ast) {\n var self = this;\n findConstantAndWatchExpressions(ast, self.$filter);\n var assignable;\n var assign;\n if ((assignable = assignableAST(ast))) {\n assign = this.recurse(assignable);\n }\n var toWatch = getInputs(ast.body);\n var inputs;\n if (toWatch) {\n inputs = [];\n forEach(toWatch, function(watch, key) {\n var input = self.recurse(watch);\n input.isPure = watch.isPure;\n watch.input = input;\n inputs.push(input);\n watch.watchId = key;\n });\n }\n var expressions = [];\n forEach(ast.body, function(expression) {\n expressions.push(self.recurse(expression.expression));\n });\n var fn = ast.body.length === 0 ? noop :\n ast.body.length === 1 ? expressions[0] :\n function(scope, locals) {\n var lastValue;\n forEach(expressions, function(exp) {\n lastValue = exp(scope, locals);\n });\n return lastValue;\n };\n if (assign) {\n fn.assign = function(scope, value, locals) {\n return assign(scope, locals, value);\n };\n }\n if (inputs) {\n fn.inputs = inputs;\n }\n return fn;\n },\n\n recurse: function(ast, context, create) {\n var left, right, self = this, args;\n if (ast.input) {\n return this.inputs(ast.input, ast.watchId);\n }\n switch (ast.type) {\n case AST.Literal:\n return this.value(ast.value, context);\n case AST.UnaryExpression:\n right = this.recurse(ast.argument);\n return this['unary' + ast.operator](right, context);\n case AST.BinaryExpression:\n left = this.recurse(ast.left);\n right = this.recurse(ast.right);\n return this['binary' + ast.operator](left, right, context);\n case AST.LogicalExpression:\n left = this.recurse(ast.left);\n right = this.recurse(ast.right);\n return this['binary' + ast.operator](left, right, context);\n case AST.ConditionalExpression:\n return this['ternary?:'](\n this.recurse(ast.test),\n this.recurse(ast.alternate),\n this.recurse(ast.consequent),\n context\n );\n case AST.Identifier:\n return self.identifier(ast.name, context, create);\n case AST.MemberExpression:\n left = this.recurse(ast.object, false, !!create);\n if (!ast.computed) {\n right = ast.property.name;\n }\n if (ast.computed) right = this.recurse(ast.property);\n return ast.computed ?\n this.computedMember(left, right, context, create) :\n this.nonComputedMember(left, right, context, create);\n case AST.CallExpression:\n args = [];\n forEach(ast.arguments, function(expr) {\n args.push(self.recurse(expr));\n });\n if (ast.filter) right = this.$filter(ast.callee.name);\n if (!ast.filter) right = this.recurse(ast.callee, true);\n return ast.filter ?\n function(scope, locals, assign, inputs) {\n var values = [];\n for (var i = 0; i < args.length; ++i) {\n values.push(args[i](scope, locals, assign, inputs));\n }\n var value = right.apply(undefined, values, inputs);\n return context ? {context: undefined, name: undefined, value: value} : value;\n } :\n function(scope, locals, assign, inputs) {\n var rhs = right(scope, locals, assign, inputs);\n var value;\n if (rhs.value != null) {\n var values = [];\n for (var i = 0; i < args.length; ++i) {\n values.push(args[i](scope, locals, assign, inputs));\n }\n value = rhs.value.apply(rhs.context, values);\n }\n return context ? {value: value} : value;\n };\n case AST.AssignmentExpression:\n left = this.recurse(ast.left, true, 1);\n right = this.recurse(ast.right);\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n var rhs = right(scope, locals, assign, inputs);\n lhs.context[lhs.name] = rhs;\n return context ? {value: rhs} : rhs;\n };\n case AST.ArrayExpression:\n args = [];\n forEach(ast.elements, function(expr) {\n args.push(self.recurse(expr));\n });\n return function(scope, locals, assign, inputs) {\n var value = [];\n for (var i = 0; i < args.length; ++i) {\n value.push(args[i](scope, locals, assign, inputs));\n }\n return context ? {value: value} : value;\n };\n case AST.ObjectExpression:\n args = [];\n forEach(ast.properties, function(property) {\n if (property.computed) {\n args.push({key: self.recurse(property.key),\n computed: true,\n value: self.recurse(property.value)\n });\n } else {\n args.push({key: property.key.type === AST.Identifier ?\n property.key.name :\n ('' + property.key.value),\n computed: false,\n value: self.recurse(property.value)\n });\n }\n });\n return function(scope, locals, assign, inputs) {\n var value = {};\n for (var i = 0; i < args.length; ++i) {\n if (args[i].computed) {\n value[args[i].key(scope, locals, assign, inputs)] = args[i].value(scope, locals, assign, inputs);\n } else {\n value[args[i].key] = args[i].value(scope, locals, assign, inputs);\n }\n }\n return context ? {value: value} : value;\n };\n case AST.ThisExpression:\n return function(scope) {\n return context ? {value: scope} : scope;\n };\n case AST.LocalsExpression:\n return function(scope, locals) {\n return context ? {value: locals} : locals;\n };\n case AST.NGValueParameter:\n return function(scope, locals, assign) {\n return context ? {value: assign} : assign;\n };\n }\n },\n\n 'unary+': function(argument, context) {\n return function(scope, locals, assign, inputs) {\n var arg = argument(scope, locals, assign, inputs);\n if (isDefined(arg)) {\n arg = +arg;\n } else {\n arg = 0;\n }\n return context ? {value: arg} : arg;\n };\n },\n 'unary-': function(argument, context) {\n return function(scope, locals, assign, inputs) {\n var arg = argument(scope, locals, assign, inputs);\n if (isDefined(arg)) {\n arg = -arg;\n } else {\n arg = -0;\n }\n return context ? {value: arg} : arg;\n };\n },\n 'unary!': function(argument, context) {\n return function(scope, locals, assign, inputs) {\n var arg = !argument(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary+': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n var rhs = right(scope, locals, assign, inputs);\n var arg = plusFn(lhs, rhs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary-': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n var rhs = right(scope, locals, assign, inputs);\n var arg = (isDefined(lhs) ? lhs : 0) - (isDefined(rhs) ? rhs : 0);\n return context ? {value: arg} : arg;\n };\n },\n 'binary*': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) * right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary/': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) / right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary%': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) % right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary===': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) === right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary!==': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) !== right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary==': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n // eslint-disable-next-line eqeqeq\n var arg = left(scope, locals, assign, inputs) == right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary!=': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n // eslint-disable-next-line eqeqeq\n var arg = left(scope, locals, assign, inputs) != right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary<': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) < right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary>': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) > right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary<=': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) <= right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary>=': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) >= right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary&&': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) && right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'binary||': function(left, right, context) {\n return function(scope, locals, assign, inputs) {\n var arg = left(scope, locals, assign, inputs) || right(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n 'ternary?:': function(test, alternate, consequent, context) {\n return function(scope, locals, assign, inputs) {\n var arg = test(scope, locals, assign, inputs) ? alternate(scope, locals, assign, inputs) : consequent(scope, locals, assign, inputs);\n return context ? {value: arg} : arg;\n };\n },\n value: function(value, context) {\n return function() { return context ? {context: undefined, name: undefined, value: value} : value; };\n },\n identifier: function(name, context, create) {\n return function(scope, locals, assign, inputs) {\n var base = locals && (name in locals) ? locals : scope;\n if (create && create !== 1 && base && base[name] == null) {\n base[name] = {};\n }\n var value = base ? base[name] : undefined;\n if (context) {\n return {context: base, name: name, value: value};\n } else {\n return value;\n }\n };\n },\n computedMember: function(left, right, context, create) {\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n var rhs;\n var value;\n if (lhs != null) {\n rhs = right(scope, locals, assign, inputs);\n rhs = getStringValue(rhs);\n if (create && create !== 1) {\n if (lhs && !(lhs[rhs])) {\n lhs[rhs] = {};\n }\n }\n value = lhs[rhs];\n }\n if (context) {\n return {context: lhs, name: rhs, value: value};\n } else {\n return value;\n }\n };\n },\n nonComputedMember: function(left, right, context, create) {\n return function(scope, locals, assign, inputs) {\n var lhs = left(scope, locals, assign, inputs);\n if (create && create !== 1) {\n if (lhs && lhs[right] == null) {\n lhs[right] = {};\n }\n }\n var value = lhs != null ? lhs[right] : undefined;\n if (context) {\n return {context: lhs, name: right, value: value};\n } else {\n return value;\n }\n };\n },\n inputs: function(input, watchId) {\n return function(scope, value, locals, inputs) {\n if (inputs) return inputs[watchId];\n return input(scope, value, locals);\n };\n }\n};\n\n/**\n * @constructor\n */\nfunction Parser(lexer, $filter, options) {\n this.ast = new AST(lexer, options);\n this.astCompiler = options.csp ? new ASTInterpreter($filter) :\n new ASTCompiler($filter);\n}\n\nParser.prototype = {\n constructor: Parser,\n\n parse: function(text) {\n var ast = this.getAst(text);\n var fn = this.astCompiler.compile(ast.ast);\n fn.literal = isLiteral(ast.ast);\n fn.constant = isConstant(ast.ast);\n fn.oneTime = ast.oneTime;\n return fn;\n },\n\n getAst: function(exp) {\n var oneTime = false;\n exp = exp.trim();\n\n if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {\n oneTime = true;\n exp = exp.substring(2);\n }\n return {\n ast: this.ast.ast(exp),\n oneTime: oneTime\n };\n }\n};\n\nfunction getValueOf(value) {\n return isFunction(value.valueOf) ? value.valueOf() : objectValueOf.call(value);\n}\n\n///////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $parse\n * @kind function\n *\n * @description\n *\n * Converts AngularJS {@link guide/expression expression} into a function.\n *\n * ```js\n * var getter = $parse('user.name');\n * var setter = getter.assign;\n * var context = {user:{name:'AngularJS'}};\n * var locals = {user:{name:'local'}};\n *\n * expect(getter(context)).toEqual('AngularJS');\n * setter(context, 'newValue');\n * expect(context.user.name).toEqual('newValue');\n * expect(getter(context, locals)).toEqual('local');\n * ```\n *\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n *\n * The returned function also has the following properties:\n * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript\n * literal.\n * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript\n * constant literals.\n * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be\n * set to a function to change its value on the given context.\n *\n */\n\n\n/**\n * @ngdoc provider\n * @name $parseProvider\n * @this\n *\n * @description\n * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}\n * service.\n */\nfunction $ParseProvider() {\n var cache = createMap();\n var literals = {\n 'true': true,\n 'false': false,\n 'null': null,\n 'undefined': undefined\n };\n var identStart, identContinue;\n\n /**\n * @ngdoc method\n * @name $parseProvider#addLiteral\n * @description\n *\n * Configure $parse service to add literal values that will be present as literal at expressions.\n *\n * @param {string} literalName Token for the literal value. The literal name value must be a valid literal name.\n * @param {*} literalValue Value for this literal. All literal values must be primitives or `undefined`.\n *\n **/\n this.addLiteral = function(literalName, literalValue) {\n literals[literalName] = literalValue;\n };\n\n /**\n * @ngdoc method\n * @name $parseProvider#setIdentifierFns\n *\n * @description\n *\n * Allows defining the set of characters that are allowed in AngularJS expressions. The function\n * `identifierStart` will get called to know if a given character is a valid character to be the\n * first character for an identifier. The function `identifierContinue` will get called to know if\n * a given character is a valid character to be a follow-up identifier character. The functions\n * `identifierStart` and `identifierContinue` will receive as arguments the single character to be\n * identifier and the character code point. These arguments will be `string` and `numeric`. Keep in\n * mind that the `string` parameter can be two characters long depending on the character\n * representation. It is expected for the function to return `true` or `false`, whether that\n * character is allowed or not.\n *\n * Since this function will be called extensively, keep the implementation of these functions fast,\n * as the performance of these functions have a direct impact on the expressions parsing speed.\n *\n * @param {function=} identifierStart The function that will decide whether the given character is\n * a valid identifier start character.\n * @param {function=} identifierContinue The function that will decide whether the given character is\n * a valid identifier continue character.\n */\n this.setIdentifierFns = function(identifierStart, identifierContinue) {\n identStart = identifierStart;\n identContinue = identifierContinue;\n return this;\n };\n\n this.$get = ['$filter', function($filter) {\n var noUnsafeEval = csp().noUnsafeEval;\n var $parseOptions = {\n csp: noUnsafeEval,\n literals: copy(literals),\n isIdentifierStart: isFunction(identStart) && identStart,\n isIdentifierContinue: isFunction(identContinue) && identContinue\n };\n $parse.$$getAst = $$getAst;\n return $parse;\n\n function $parse(exp, interceptorFn) {\n var parsedExpression, cacheKey;\n\n switch (typeof exp) {\n case 'string':\n exp = exp.trim();\n cacheKey = exp;\n\n parsedExpression = cache[cacheKey];\n\n if (!parsedExpression) {\n var lexer = new Lexer($parseOptions);\n var parser = new Parser(lexer, $filter, $parseOptions);\n parsedExpression = parser.parse(exp);\n\n cache[cacheKey] = addWatchDelegate(parsedExpression);\n }\n return addInterceptor(parsedExpression, interceptorFn);\n\n case 'function':\n return addInterceptor(exp, interceptorFn);\n\n default:\n return addInterceptor(noop, interceptorFn);\n }\n }\n\n function $$getAst(exp) {\n var lexer = new Lexer($parseOptions);\n var parser = new Parser(lexer, $filter, $parseOptions);\n return parser.getAst(exp).ast;\n }\n\n function expressionInputDirtyCheck(newValue, oldValueOfValue, compareObjectIdentity) {\n\n if (newValue == null || oldValueOfValue == null) { // null/undefined\n return newValue === oldValueOfValue;\n }\n\n if (typeof newValue === 'object') {\n\n // attempt to convert the value to a primitive type\n // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can\n // be cheaply dirty-checked\n newValue = getValueOf(newValue);\n\n if (typeof newValue === 'object' && !compareObjectIdentity) {\n // objects/arrays are not supported - deep-watching them would be too expensive\n return false;\n }\n\n // fall-through to the primitive equality check\n }\n\n //Primitive or NaN\n // eslint-disable-next-line no-self-compare\n return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue);\n }\n\n function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) {\n var inputExpressions = parsedExpression.inputs;\n var lastResult;\n\n if (inputExpressions.length === 1) {\n var oldInputValueOf = expressionInputDirtyCheck; // init to something unique so that equals check fails\n inputExpressions = inputExpressions[0];\n return scope.$watch(function expressionInputWatch(scope) {\n var newInputValue = inputExpressions(scope);\n if (!expressionInputDirtyCheck(newInputValue, oldInputValueOf, inputExpressions.isPure)) {\n lastResult = parsedExpression(scope, undefined, undefined, [newInputValue]);\n oldInputValueOf = newInputValue && getValueOf(newInputValue);\n }\n return lastResult;\n }, listener, objectEquality, prettyPrintExpression);\n }\n\n var oldInputValueOfValues = [];\n var oldInputValues = [];\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails\n oldInputValues[i] = null;\n }\n\n return scope.$watch(function expressionInputsWatch(scope) {\n var changed = false;\n\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n var newInputValue = inputExpressions[i](scope);\n if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i], inputExpressions[i].isPure))) {\n oldInputValues[i] = newInputValue;\n oldInputValueOfValues[i] = newInputValue && getValueOf(newInputValue);\n }\n }\n\n if (changed) {\n lastResult = parsedExpression(scope, undefined, undefined, oldInputValues);\n }\n\n return lastResult;\n }, listener, objectEquality, prettyPrintExpression);\n }\n\n function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) {\n var isDone = parsedExpression.literal ? isAllDefined : isDefined;\n var unwatch, lastValue;\n\n var exp = parsedExpression.$$intercepted || parsedExpression;\n var post = parsedExpression.$$interceptor || identity;\n\n var useInputs = parsedExpression.inputs && !exp.inputs;\n\n // Propogate the literal/inputs/constant attributes\n // ... but not oneTime since we are handling it\n oneTimeWatch.literal = parsedExpression.literal;\n oneTimeWatch.constant = parsedExpression.constant;\n oneTimeWatch.inputs = parsedExpression.inputs;\n\n // Allow other delegates to run on this wrapped expression\n addWatchDelegate(oneTimeWatch);\n\n unwatch = scope.$watch(oneTimeWatch, listener, objectEquality, prettyPrintExpression);\n\n return unwatch;\n\n function unwatchIfDone() {\n if (isDone(lastValue)) {\n unwatch();\n }\n }\n\n function oneTimeWatch(scope, locals, assign, inputs) {\n lastValue = useInputs && inputs ? inputs[0] : exp(scope, locals, assign, inputs);\n if (isDone(lastValue)) {\n scope.$$postDigest(unwatchIfDone);\n }\n return post(lastValue);\n }\n }\n\n function isAllDefined(value) {\n var allDefined = true;\n forEach(value, function(val) {\n if (!isDefined(val)) allDefined = false;\n });\n return allDefined;\n }\n\n function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch = scope.$watch(function constantWatch(scope) {\n unwatch();\n return parsedExpression(scope);\n }, listener, objectEquality);\n return unwatch;\n }\n\n function addWatchDelegate(parsedExpression) {\n if (parsedExpression.constant) {\n parsedExpression.$$watchDelegate = constantWatchDelegate;\n } else if (parsedExpression.oneTime) {\n parsedExpression.$$watchDelegate = oneTimeWatchDelegate;\n } else if (parsedExpression.inputs) {\n parsedExpression.$$watchDelegate = inputsWatchDelegate;\n }\n\n return parsedExpression;\n }\n\n function chainInterceptors(first, second) {\n function chainedInterceptor(value) {\n return second(first(value));\n }\n chainedInterceptor.$stateful = first.$stateful || second.$stateful;\n chainedInterceptor.$$pure = first.$$pure && second.$$pure;\n\n return chainedInterceptor;\n }\n\n function addInterceptor(parsedExpression, interceptorFn) {\n if (!interceptorFn) return parsedExpression;\n\n // Extract any existing interceptors out of the parsedExpression\n // to ensure the original parsedExpression is always the $$intercepted\n if (parsedExpression.$$interceptor) {\n interceptorFn = chainInterceptors(parsedExpression.$$interceptor, interceptorFn);\n parsedExpression = parsedExpression.$$intercepted;\n }\n\n var useInputs = false;\n\n var fn = function interceptedExpression(scope, locals, assign, inputs) {\n var value = useInputs && inputs ? inputs[0] : parsedExpression(scope, locals, assign, inputs);\n return interceptorFn(value);\n };\n\n // Maintain references to the interceptor/intercepted\n fn.$$intercepted = parsedExpression;\n fn.$$interceptor = interceptorFn;\n\n // Propogate the literal/oneTime/constant attributes\n fn.literal = parsedExpression.literal;\n fn.oneTime = parsedExpression.oneTime;\n fn.constant = parsedExpression.constant;\n\n // Treat the interceptor like filters.\n // If it is not $stateful then only watch its inputs.\n // If the expression itself has no inputs then use the full expression as an input.\n if (!interceptorFn.$stateful) {\n useInputs = !parsedExpression.inputs;\n fn.inputs = parsedExpression.inputs ? parsedExpression.inputs : [parsedExpression];\n\n if (!interceptorFn.$$pure) {\n fn.inputs = fn.inputs.map(function(e) {\n // Remove the isPure flag of inputs when it is not absolute because they are now wrapped in a\n // non-pure interceptor function.\n if (e.isPure === PURITY_RELATIVE) {\n return function depurifier(s) { return e(s); };\n }\n return e;\n });\n }\n }\n\n return addWatchDelegate(fn);\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $q\n * @requires $rootScope\n *\n * @description\n * A service that helps you run functions asynchronously, and use their return values (or exceptions)\n * when they are done processing.\n *\n * This is a [Promises/A+](https://promisesaplus.com/)-compliant implementation of promises/deferred\n * objects inspired by [Kris Kowal's Q](https://github.com/kriskowal/q).\n *\n * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred\n * implementations, and the other which resembles ES6 (ES2015) promises to some degree.\n *\n * ## $q constructor\n *\n * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`\n * function as the first argument. This is similar to the native Promise implementation from ES6,\n * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n *\n * While the constructor-style use is supported, not all of the supporting methods from ES6 promises are\n * available yet.\n *\n * It can be used like so:\n *\n * ```js\n * // for the purpose of this example let's assume that variables `$q` and `okToGreet`\n * // are available in the current lexical scope (they could have been injected or passed in).\n *\n * function asyncGreet(name) {\n * // perform some asynchronous operation, resolve or reject the promise when appropriate.\n * return $q(function(resolve, reject) {\n * setTimeout(function() {\n * if (okToGreet(name)) {\n * resolve('Hello, ' + name + '!');\n * } else {\n * reject('Greeting ' + name + ' is not allowed.');\n * }\n * }, 1000);\n * });\n * }\n *\n * var promise = asyncGreet('Robin Hood');\n * promise.then(function(greeting) {\n * alert('Success: ' + greeting);\n * }, function(reason) {\n * alert('Failed: ' + reason);\n * });\n * ```\n *\n * Note: progress/notify callbacks are not currently supported via the ES6-style interface.\n *\n * Note: unlike ES6 behavior, an exception thrown in the constructor function will NOT implicitly reject the promise.\n *\n * However, the more traditional CommonJS-style usage is still available, and documented below.\n *\n * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an\n * interface for interacting with an object that represents the result of an action that is\n * performed asynchronously, and may or may not be finished at any given point in time.\n *\n * From the perspective of dealing with error handling, deferred and promise APIs are to\n * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.\n *\n * ```js\n * // for the purpose of this example let's assume that variables `$q` and `okToGreet`\n * // are available in the current lexical scope (they could have been injected or passed in).\n *\n * function asyncGreet(name) {\n * var deferred = $q.defer();\n *\n * setTimeout(function() {\n * deferred.notify('About to greet ' + name + '.');\n *\n * if (okToGreet(name)) {\n * deferred.resolve('Hello, ' + name + '!');\n * } else {\n * deferred.reject('Greeting ' + name + ' is not allowed.');\n * }\n * }, 1000);\n *\n * return deferred.promise;\n * }\n *\n * var promise = asyncGreet('Robin Hood');\n * promise.then(function(greeting) {\n * alert('Success: ' + greeting);\n * }, function(reason) {\n * alert('Failed: ' + reason);\n * }, function(update) {\n * alert('Got notification: ' + update);\n * });\n * ```\n *\n * At first it might not be obvious why this extra complexity is worth the trouble. The payoff\n * comes in the way of guarantees that promise and deferred APIs make, see\n * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.\n *\n * Additionally the promise api allows for composition that is very hard to do with the\n * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.\n * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the\n * section on serial or parallel joining of promises.\n *\n * ## The Deferred API\n *\n * A new instance of deferred is constructed by calling `$q.defer()`.\n *\n * The purpose of the deferred object is to expose the associated Promise instance as well as APIs\n * that can be used for signaling the successful or unsuccessful completion, as well as the status\n * of the task.\n *\n * **Methods**\n *\n * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection\n * constructed via `$q.reject`, the promise will be rejected instead.\n * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to\n * resolving it with a rejection constructed via `$q.reject`.\n * - `notify(value)` - provides updates on the status of the promise's execution. This may be called\n * multiple times before the promise is either resolved or rejected.\n *\n * **Properties**\n *\n * - promise – `{Promise}` – promise object associated with this deferred.\n *\n *\n * ## The Promise API\n *\n * A new promise instance is created when a deferred instance is created and can be retrieved by\n * calling `deferred.promise`.\n *\n * The purpose of the promise object is to allow for interested parties to get access to the result\n * of the deferred task when it completes.\n *\n * **Methods**\n *\n * - `then(successCallback, [errorCallback], [notifyCallback])` – regardless of when the promise was or\n * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously\n * as soon as the result is available. The callbacks are called with a single argument: the result\n * or rejection reason. Additionally, the notify callback may be called zero or more times to\n * provide a progress indication, before the promise is resolved or rejected.\n *\n * This method *returns a new promise* which is resolved or rejected via the return value of the\n * `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved\n * with the value which is resolved in that promise using\n * [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).\n * It also notifies via the return value of the `notifyCallback` method. The promise cannot be\n * resolved or rejected from the notifyCallback method. The errorCallback and notifyCallback\n * arguments are optional.\n *\n * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`\n *\n * - `finally(callback, notifyCallback)` – allows you to observe either the fulfillment or rejection of a promise,\n * but to do so without modifying the final value. This is useful to release resources or do some\n * clean-up that needs to be done whether the promise was rejected or resolved. See the [full\n * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for\n * more information.\n *\n * ## Chaining promises\n *\n * Because calling the `then` method of a promise returns a new derived promise, it is easily\n * possible to create a chain of promises:\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * return result + 1;\n * });\n *\n * // promiseB will be resolved immediately after promiseA is resolved and its value\n * // will be the result of promiseA incremented by 1\n * ```\n *\n * It is possible to create chains of any length and since a promise can be resolved with another\n * promise (which will defer its resolution further), it is possible to pause/defer resolution of\n * the promises at any point in the chain. This makes it possible to implement powerful APIs like\n * $http's response interceptors.\n *\n *\n * ## Differences between Kris Kowal's Q and $q\n *\n * There are two main differences:\n *\n * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation\n * mechanism in AngularJS, which means faster propagation of resolution or rejection into your\n * models and avoiding unnecessary browser repaints, which would result in flickering UI.\n * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains\n * all the important functionality needed for common async tasks.\n *\n * ## Testing\n *\n * ```js\n * it('should simulate promise', inject(function($q, $rootScope) {\n * var deferred = $q.defer();\n * var promise = deferred.promise;\n * var resolvedValue;\n *\n * promise.then(function(value) { resolvedValue = value; });\n * expect(resolvedValue).toBeUndefined();\n *\n * // Simulate resolving of promise\n * deferred.resolve(123);\n * // Note that the 'then' function does not get called synchronously.\n * // This is because we want the promise API to always be async, whether or not\n * // it got called synchronously or asynchronously.\n * expect(resolvedValue).toBeUndefined();\n *\n * // Propagate promise resolution to 'then' functions using $apply().\n * $rootScope.$apply();\n * expect(resolvedValue).toEqual(123);\n * }));\n * ```\n *\n * @param {function(function, function)} resolver Function which is responsible for resolving or\n * rejecting the newly created promise. The first parameter is a function which resolves the\n * promise, the second parameter is a function which rejects the promise.\n *\n * @returns {Promise} The newly created promise.\n */\n/**\n * @ngdoc provider\n * @name $qProvider\n * @this\n *\n * @description\n */\nfunction $QProvider() {\n var errorOnUnhandledRejections = true;\n this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {\n return qFactory(function(callback) {\n $rootScope.$evalAsync(callback);\n }, $exceptionHandler, errorOnUnhandledRejections);\n }];\n\n /**\n * @ngdoc method\n * @name $qProvider#errorOnUnhandledRejections\n * @kind function\n *\n * @description\n * Retrieves or overrides whether to generate an error when a rejected promise is not handled.\n * This feature is enabled by default.\n *\n * @param {boolean=} value Whether to generate an error when a rejected promise is not handled.\n * @returns {boolean|ng.$qProvider} Current value when called without a new value or self for\n * chaining otherwise.\n */\n this.errorOnUnhandledRejections = function(value) {\n if (isDefined(value)) {\n errorOnUnhandledRejections = value;\n return this;\n } else {\n return errorOnUnhandledRejections;\n }\n };\n}\n\n/** @this */\nfunction $$QProvider() {\n var errorOnUnhandledRejections = true;\n this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {\n return qFactory(function(callback) {\n $browser.defer(callback);\n }, $exceptionHandler, errorOnUnhandledRejections);\n }];\n\n this.errorOnUnhandledRejections = function(value) {\n if (isDefined(value)) {\n errorOnUnhandledRejections = value;\n return this;\n } else {\n return errorOnUnhandledRejections;\n }\n };\n}\n\n/**\n * Constructs a promise manager.\n *\n * @param {function(function)} nextTick Function for executing functions in the next turn.\n * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for\n * debugging purposes.\n * @param {boolean=} errorOnUnhandledRejections Whether an error should be generated on unhandled\n * promises rejections.\n * @returns {object} Promise manager.\n */\nfunction qFactory(nextTick, exceptionHandler, errorOnUnhandledRejections) {\n var $qMinErr = minErr('$q', TypeError);\n var queueSize = 0;\n var checkQueue = [];\n\n /**\n * @ngdoc method\n * @name ng.$q#defer\n * @kind function\n *\n * @description\n * Creates a `Deferred` object which represents a task which will finish in the future.\n *\n * @returns {Deferred} Returns a new instance of deferred.\n */\n function defer() {\n return new Deferred();\n }\n\n function Deferred() {\n var promise = this.promise = new Promise();\n //Non prototype methods necessary to support unbound execution :/\n this.resolve = function(val) { resolvePromise(promise, val); };\n this.reject = function(reason) { rejectPromise(promise, reason); };\n this.notify = function(progress) { notifyPromise(promise, progress); };\n }\n\n\n function Promise() {\n this.$$state = { status: 0 };\n }\n\n extend(Promise.prototype, {\n then: function(onFulfilled, onRejected, progressBack) {\n if (isUndefined(onFulfilled) && isUndefined(onRejected) && isUndefined(progressBack)) {\n return this;\n }\n var result = new Promise();\n\n this.$$state.pending = this.$$state.pending || [];\n this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]);\n if (this.$$state.status > 0) scheduleProcessQueue(this.$$state);\n\n return result;\n },\n\n 'catch': function(callback) {\n return this.then(null, callback);\n },\n\n 'finally': function(callback, progressBack) {\n return this.then(function(value) {\n return handleCallback(value, resolve, callback);\n }, function(error) {\n return handleCallback(error, reject, callback);\n }, progressBack);\n }\n });\n\n function processQueue(state) {\n var fn, promise, pending;\n\n pending = state.pending;\n state.processScheduled = false;\n state.pending = undefined;\n try {\n for (var i = 0, ii = pending.length; i < ii; ++i) {\n markQStateExceptionHandled(state);\n promise = pending[i][0];\n fn = pending[i][state.status];\n try {\n if (isFunction(fn)) {\n resolvePromise(promise, fn(state.value));\n } else if (state.status === 1) {\n resolvePromise(promise, state.value);\n } else {\n rejectPromise(promise, state.value);\n }\n } catch (e) {\n rejectPromise(promise, e);\n // This error is explicitly marked for being passed to the $exceptionHandler\n if (e && e.$$passToExceptionHandler === true) {\n exceptionHandler(e);\n }\n }\n }\n } finally {\n --queueSize;\n if (errorOnUnhandledRejections && queueSize === 0) {\n nextTick(processChecks);\n }\n }\n }\n\n function processChecks() {\n // eslint-disable-next-line no-unmodified-loop-condition\n while (!queueSize && checkQueue.length) {\n var toCheck = checkQueue.shift();\n if (!isStateExceptionHandled(toCheck)) {\n markQStateExceptionHandled(toCheck);\n var errorMessage = 'Possibly unhandled rejection: ' + toDebugString(toCheck.value);\n if (isError(toCheck.value)) {\n exceptionHandler(toCheck.value, errorMessage);\n } else {\n exceptionHandler(errorMessage);\n }\n }\n }\n }\n\n function scheduleProcessQueue(state) {\n if (errorOnUnhandledRejections && !state.pending && state.status === 2 && !isStateExceptionHandled(state)) {\n if (queueSize === 0 && checkQueue.length === 0) {\n nextTick(processChecks);\n }\n checkQueue.push(state);\n }\n if (state.processScheduled || !state.pending) return;\n state.processScheduled = true;\n ++queueSize;\n nextTick(function() { processQueue(state); });\n }\n\n function resolvePromise(promise, val) {\n if (promise.$$state.status) return;\n if (val === promise) {\n $$reject(promise, $qMinErr(\n 'qcycle',\n 'Expected promise to be resolved with value other than itself \\'{0}\\'',\n val));\n } else {\n $$resolve(promise, val);\n }\n\n }\n\n function $$resolve(promise, val) {\n var then;\n var done = false;\n try {\n if (isObject(val) || isFunction(val)) then = val.then;\n if (isFunction(then)) {\n promise.$$state.status = -1;\n then.call(val, doResolve, doReject, doNotify);\n } else {\n promise.$$state.value = val;\n promise.$$state.status = 1;\n scheduleProcessQueue(promise.$$state);\n }\n } catch (e) {\n doReject(e);\n }\n\n function doResolve(val) {\n if (done) return;\n done = true;\n $$resolve(promise, val);\n }\n function doReject(val) {\n if (done) return;\n done = true;\n $$reject(promise, val);\n }\n function doNotify(progress) {\n notifyPromise(promise, progress);\n }\n }\n\n function rejectPromise(promise, reason) {\n if (promise.$$state.status) return;\n $$reject(promise, reason);\n }\n\n function $$reject(promise, reason) {\n promise.$$state.value = reason;\n promise.$$state.status = 2;\n scheduleProcessQueue(promise.$$state);\n }\n\n function notifyPromise(promise, progress) {\n var callbacks = promise.$$state.pending;\n\n if ((promise.$$state.status <= 0) && callbacks && callbacks.length) {\n nextTick(function() {\n var callback, result;\n for (var i = 0, ii = callbacks.length; i < ii; i++) {\n result = callbacks[i][0];\n callback = callbacks[i][3];\n try {\n notifyPromise(result, isFunction(callback) ? callback(progress) : progress);\n } catch (e) {\n exceptionHandler(e);\n }\n }\n });\n }\n }\n\n /**\n * @ngdoc method\n * @name $q#reject\n * @kind function\n *\n * @description\n * Creates a promise that is resolved as rejected with the specified `reason`. This api should be\n * used to forward rejection in a chain of promises. If you are dealing with the last promise in\n * a promise chain, you don't need to worry about it.\n *\n * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of\n * `reject` as the `throw` keyword in JavaScript. This also means that if you \"catch\" an error via\n * a promise error callback and you want to forward the error to the promise derived from the\n * current promise, you have to \"rethrow\" the error by returning a rejection constructed via\n * `reject`.\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * // success: do something and resolve promiseB\n * // with the old or a new result\n * return result;\n * }, function(reason) {\n * // error: handle the error if possible and\n * // resolve promiseB with newPromiseOrValue,\n * // otherwise forward the rejection to promiseB\n * if (canHandle(reason)) {\n * // handle the error and recover\n * return newPromiseOrValue;\n * }\n * return $q.reject(reason);\n * });\n * ```\n *\n * @param {*} reason Constant, message, exception or an object representing the rejection reason.\n * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.\n */\n function reject(reason) {\n var result = new Promise();\n rejectPromise(result, reason);\n return result;\n }\n\n function handleCallback(value, resolver, callback) {\n var callbackOutput = null;\n try {\n if (isFunction(callback)) callbackOutput = callback();\n } catch (e) {\n return reject(e);\n }\n if (isPromiseLike(callbackOutput)) {\n return callbackOutput.then(function() {\n return resolver(value);\n }, reject);\n } else {\n return resolver(value);\n }\n }\n\n /**\n * @ngdoc method\n * @name $q#when\n * @kind function\n *\n * @description\n * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.\n * This is useful when you are dealing with an object that might or might not be a promise, or if\n * the promise comes from a source that can't be trusted.\n *\n * @param {*} value Value or a promise\n * @param {Function=} successCallback\n * @param {Function=} errorCallback\n * @param {Function=} progressCallback\n * @returns {Promise} Returns a promise of the passed value or promise\n */\n\n\n function when(value, callback, errback, progressBack) {\n var result = new Promise();\n resolvePromise(result, value);\n return result.then(callback, errback, progressBack);\n }\n\n /**\n * @ngdoc method\n * @name $q#resolve\n * @kind function\n *\n * @description\n * Alias of {@link ng.$q#when when} to maintain naming consistency with ES6.\n *\n * @param {*} value Value or a promise\n * @param {Function=} successCallback\n * @param {Function=} errorCallback\n * @param {Function=} progressCallback\n * @returns {Promise} Returns a promise of the passed value or promise\n */\n var resolve = when;\n\n /**\n * @ngdoc method\n * @name $q#all\n * @kind function\n *\n * @description\n * Combines multiple promises into a single promise that is resolved when all of the input\n * promises are resolved.\n *\n * @param {Array.|Object.} promises An array or hash of promises.\n * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,\n * each value corresponding to the promise at the same index/key in the `promises` array/hash.\n * If any of the promises is resolved with a rejection, this resulting promise will be rejected\n * with the same rejection value.\n */\n\n function all(promises) {\n var result = new Promise(),\n counter = 0,\n results = isArray(promises) ? [] : {};\n\n forEach(promises, function(promise, key) {\n counter++;\n when(promise).then(function(value) {\n results[key] = value;\n if (!(--counter)) resolvePromise(result, results);\n }, function(reason) {\n rejectPromise(result, reason);\n });\n });\n\n if (counter === 0) {\n resolvePromise(result, results);\n }\n\n return result;\n }\n\n /**\n * @ngdoc method\n * @name $q#race\n * @kind function\n *\n * @description\n * Returns a promise that resolves or rejects as soon as one of those promises\n * resolves or rejects, with the value or reason from that promise.\n *\n * @param {Array.|Object.} promises An array or hash of promises.\n * @returns {Promise} a promise that resolves or rejects as soon as one of the `promises`\n * resolves or rejects, with the value or reason from that promise.\n */\n\n function race(promises) {\n var deferred = defer();\n\n forEach(promises, function(promise) {\n when(promise).then(deferred.resolve, deferred.reject);\n });\n\n return deferred.promise;\n }\n\n function $Q(resolver) {\n if (!isFunction(resolver)) {\n throw $qMinErr('norslvr', 'Expected resolverFn, got \\'{0}\\'', resolver);\n }\n\n var promise = new Promise();\n\n function resolveFn(value) {\n resolvePromise(promise, value);\n }\n\n function rejectFn(reason) {\n rejectPromise(promise, reason);\n }\n\n resolver(resolveFn, rejectFn);\n\n return promise;\n }\n\n // Let's make the instanceof operator work for promises, so that\n // `new $q(fn) instanceof $q` would evaluate to true.\n $Q.prototype = Promise.prototype;\n\n $Q.defer = defer;\n $Q.reject = reject;\n $Q.when = when;\n $Q.resolve = resolve;\n $Q.all = all;\n $Q.race = race;\n\n return $Q;\n}\n\nfunction isStateExceptionHandled(state) {\n return !!state.pur;\n}\nfunction markQStateExceptionHandled(state) {\n state.pur = true;\n}\nfunction markQExceptionHandled(q) {\n markQStateExceptionHandled(q.$$state);\n}\n\n/** @this */\nfunction $$RAFProvider() { //rAF\n this.$get = ['$window', '$timeout', function($window, $timeout) {\n var requestAnimationFrame = $window.requestAnimationFrame ||\n $window.webkitRequestAnimationFrame;\n\n var cancelAnimationFrame = $window.cancelAnimationFrame ||\n $window.webkitCancelAnimationFrame ||\n $window.webkitCancelRequestAnimationFrame;\n\n var rafSupported = !!requestAnimationFrame;\n var raf = rafSupported\n ? function(fn) {\n var id = requestAnimationFrame(fn);\n return function() {\n cancelAnimationFrame(id);\n };\n }\n : function(fn) {\n var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666\n return function() {\n $timeout.cancel(timer);\n };\n };\n\n raf.supported = rafSupported;\n\n return raf;\n }];\n}\n\n/**\n * DESIGN NOTES\n *\n * The design decisions behind the scope are heavily favored for speed and memory consumption.\n *\n * The typical use of scope is to watch the expressions, which most of the time return the same\n * value as last time so we optimize the operation.\n *\n * Closures construction is expensive in terms of speed as well as memory:\n * - No closures, instead use prototypical inheritance for API\n * - Internal state needs to be stored on scope directly, which means that private state is\n * exposed as $$____ properties\n *\n * Loop operations are optimized by using while(count--) { ... }\n * - This means that in order to keep the same order of execution as addition we have to add\n * items to the array at the beginning (unshift) instead of at the end (push)\n *\n * Child scopes are created and removed often\n * - Using an array would be slow since inserts in the middle are expensive; so we use linked lists\n *\n * There are fewer watches than observers. This is why you don't want the observer to be implemented\n * in the same way as watch. Watch requires return of the initialization function which is expensive\n * to construct.\n */\n\n\n/**\n * @ngdoc provider\n * @name $rootScopeProvider\n * @description\n *\n * Provider for the $rootScope service.\n */\n\n/**\n * @ngdoc method\n * @name $rootScopeProvider#digestTtl\n * @description\n *\n * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that the dependencies between `$watch`s will result in\n * several digest iterations. However if an application needs more than the default 10 digest\n * iterations for its model to stabilize then you should investigate what is causing the model to\n * continuously change during the digest.\n *\n * Increasing the TTL could have performance implications, so you should not change it without\n * proper justification.\n *\n * @param {number} limit The number of digest iterations.\n */\n\n\n/**\n * @ngdoc service\n * @name $rootScope\n * @this\n *\n * @description\n *\n * Every application has a single root {@link ng.$rootScope.Scope scope}.\n * All other scopes are descendant scopes of the root scope. Scopes provide separation\n * between the model and the view, via a mechanism for watching the model for changes.\n * They also provide event emission/broadcast and subscription facility. See the\n * {@link guide/scope developer guide on scopes}.\n */\nfunction $RootScopeProvider() {\n var TTL = 10;\n var $rootScopeMinErr = minErr('$rootScope');\n var lastDirtyWatch = null;\n var applyAsyncId = null;\n\n this.digestTtl = function(value) {\n if (arguments.length) {\n TTL = value;\n }\n return TTL;\n };\n\n function createChildScopeClass(parent) {\n function ChildScope() {\n this.$$watchers = this.$$nextSibling =\n this.$$childHead = this.$$childTail = null;\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$$watchersCount = 0;\n this.$id = nextUid();\n this.$$ChildScope = null;\n this.$$suspended = false;\n }\n ChildScope.prototype = parent;\n return ChildScope;\n }\n\n this.$get = ['$exceptionHandler', '$parse', '$browser',\n function($exceptionHandler, $parse, $browser) {\n\n function destroyChildScope($event) {\n $event.currentScope.$$destroyed = true;\n }\n\n function cleanUpScope($scope) {\n\n // Support: IE 9 only\n if (msie === 9) {\n // There is a memory leak in IE9 if all child scopes are not disconnected\n // completely when a scope is destroyed. So this code will recurse up through\n // all this scopes children\n //\n // See issue https://github.com/angular/angular.js/issues/10706\n if ($scope.$$childHead) {\n cleanUpScope($scope.$$childHead);\n }\n if ($scope.$$nextSibling) {\n cleanUpScope($scope.$$nextSibling);\n }\n }\n\n // The code below works around IE9 and V8's memory leaks\n //\n // See:\n // - https://code.google.com/p/v8/issues/detail?id=2073#c26\n // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909\n // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451\n\n $scope.$parent = $scope.$$nextSibling = $scope.$$prevSibling = $scope.$$childHead =\n $scope.$$childTail = $scope.$root = $scope.$$watchers = null;\n }\n\n /**\n * @ngdoc type\n * @name $rootScope.Scope\n *\n * @description\n * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the\n * {@link auto.$injector $injector}. Child scopes are created using the\n * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when\n * compiled HTML template is executed.) See also the {@link guide/scope Scopes guide} for\n * an in-depth introduction and usage examples.\n *\n *\n * ## Inheritance\n * A scope can inherit from a parent scope, as in this example:\n * ```js\n var parent = $rootScope;\n var child = parent.$new();\n\n parent.salutation = \"Hello\";\n expect(child.salutation).toEqual('Hello');\n\n child.salutation = \"Welcome\";\n expect(child.salutation).toEqual('Welcome');\n expect(parent.salutation).toEqual('Hello');\n * ```\n *\n * When interacting with `Scope` in tests, additional helper methods are available on the\n * instances of `Scope` type. See {@link ngMock.$rootScope.Scope ngMock Scope} for additional\n * details.\n *\n *\n * @param {Object.=} providers Map of service factory which need to be\n * provided for the current scope. Defaults to {@link ng}.\n * @param {Object.=} instanceCache Provides pre-instantiated services which should\n * append/override services provided by `providers`. This is handy\n * when unit-testing and having the need to override a default\n * service.\n * @returns {Object} Newly created scope.\n *\n */\n function Scope() {\n this.$id = nextUid();\n this.$$phase = this.$parent = this.$$watchers =\n this.$$nextSibling = this.$$prevSibling =\n this.$$childHead = this.$$childTail = null;\n this.$root = this;\n this.$$destroyed = false;\n this.$$suspended = false;\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$$watchersCount = 0;\n this.$$isolateBindings = null;\n }\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$id\n *\n * @description\n * Unique scope ID (monotonically increasing) useful for debugging.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$parent\n *\n * @description\n * Reference to the parent scope.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$root\n *\n * @description\n * Reference to the root scope.\n */\n\n Scope.prototype = {\n constructor: Scope,\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$new\n * @kind function\n *\n * @description\n * Creates a new child {@link ng.$rootScope.Scope scope}.\n *\n * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.\n * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.\n *\n * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is\n * desired for the scope and its child scopes to be permanently detached from the parent and\n * thus stop participating in model change detection and listener notification by invoking.\n *\n * @param {boolean} isolate If true, then the scope does not prototypically inherit from the\n * parent scope. The scope is isolated, as it can not see parent scope properties.\n * When creating widgets, it is useful for the widget to not accidentally read parent\n * state.\n *\n * @param {Scope} [parent=this] The {@link ng.$rootScope.Scope `Scope`} that will be the `$parent`\n * of the newly created scope. Defaults to `this` scope if not provided.\n * This is used when creating a transclude scope to correctly place it\n * in the scope hierarchy while maintaining the correct prototypical\n * inheritance.\n *\n * @returns {Object} The newly created child scope.\n *\n */\n $new: function(isolate, parent) {\n var child;\n\n parent = parent || this;\n\n if (isolate) {\n child = new Scope();\n child.$root = this.$root;\n } else {\n // Only create a child scope class if somebody asks for one,\n // but cache it to allow the VM to optimize lookups.\n if (!this.$$ChildScope) {\n this.$$ChildScope = createChildScopeClass(this);\n }\n child = new this.$$ChildScope();\n }\n child.$parent = parent;\n child.$$prevSibling = parent.$$childTail;\n if (parent.$$childHead) {\n parent.$$childTail.$$nextSibling = child;\n parent.$$childTail = child;\n } else {\n parent.$$childHead = parent.$$childTail = child;\n }\n\n // When the new scope is not isolated or we inherit from `this`, and\n // the parent scope is destroyed, the property `$$destroyed` is inherited\n // prototypically. In all other cases, this property needs to be set\n // when the parent scope is destroyed.\n // The listener needs to be added after the parent is set\n if (isolate || parent !== this) child.$on('$destroy', destroyChildScope);\n\n return child;\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watch\n * @kind function\n *\n * @description\n * Registers a `listener` callback to be executed whenever the `watchExpression` changes.\n *\n * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest\n * $digest()} and should return the value that will be watched. (`watchExpression` should not change\n * its value when executed multiple times with the same input because it may be executed multiple\n * times by {@link ng.$rootScope.Scope#$digest $digest()}. That is, `watchExpression` should be\n * [idempotent](http://en.wikipedia.org/wiki/Idempotence).)\n * - The `listener` is called only when the value from the current `watchExpression` and the\n * previous call to `watchExpression` are not equal (with the exception of the initial run,\n * see below). Inequality is determined according to reference inequality,\n * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)\n * via the `!==` Javascript operator, unless `objectEquality == true`\n * (see next point)\n * - When `objectEquality == true`, inequality of the `watchExpression` is determined\n * according to the {@link angular.equals} function. To save the value of the object for\n * later comparison, the {@link angular.copy} function is used. This therefore means that\n * watching complex objects will have adverse memory and performance implications.\n * - This should not be used to watch for changes in objects that are (or contain)\n * [File](https://developer.mozilla.org/docs/Web/API/File) objects due to limitations with {@link angular.copy `angular.copy`}.\n * - The watch `listener` may change the model, which may trigger other `listener`s to fire.\n * This is achieved by rerunning the watchers until no changes are detected. The rerun\n * iteration limit is 10 to prevent an infinite loop deadlock.\n *\n *\n * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,\n * you can register a `watchExpression` function with no `listener`. (Be prepared for\n * multiple calls to your `watchExpression` because it will execute multiple times in a\n * single {@link ng.$rootScope.Scope#$digest $digest} cycle if a change is detected.)\n *\n * After a watcher is registered with the scope, the `listener` fn is called asynchronously\n * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the\n * watcher. In rare cases, this is undesirable because the listener is called when the result\n * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you\n * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the\n * listener was called due to initialization.\n *\n *\n *\n * @example\n * ```js\n // let's assume that scope was dependency injected as the $rootScope\n var scope = $rootScope;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n\n\n\n // Using a function as a watchExpression\n var food;\n scope.foodCounter = 0;\n expect(scope.foodCounter).toEqual(0);\n scope.$watch(\n // This function returns the value being watched. It is called for each turn of the $digest loop\n function() { return food; },\n // This is the change listener, called when the value returned from the above function changes\n function(newValue, oldValue) {\n if ( newValue !== oldValue ) {\n // Only increment the counter if the value changed\n scope.foodCounter = scope.foodCounter + 1;\n }\n }\n );\n // No digest has been run so the counter will be zero\n expect(scope.foodCounter).toEqual(0);\n\n // Run the digest but since food has not changed count will still be zero\n scope.$digest();\n expect(scope.foodCounter).toEqual(0);\n\n // Update food and run digest. Now the counter will increment\n food = 'cheeseburger';\n scope.$digest();\n expect(scope.foodCounter).toEqual(1);\n\n * ```\n *\n *\n *\n * @param {(function()|string)} watchExpression Expression that is evaluated on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers\n * a call to the `listener`.\n *\n * - `string`: Evaluated as {@link guide/expression expression}\n * - `function(scope)`: called with current `scope` as a parameter.\n * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value\n * of `watchExpression` changes.\n *\n * - `newVal` contains the current value of the `watchExpression`\n * - `oldVal` contains the previous value of the `watchExpression`\n * - `scope` refers to the current scope\n * @param {boolean=} [objectEquality=false] Compare for object equality using {@link angular.equals} instead of\n * comparing for reference equality.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $watch: function(watchExp, listener, objectEquality, prettyPrintExpression) {\n var get = $parse(watchExp);\n var fn = isFunction(listener) ? listener : noop;\n\n if (get.$$watchDelegate) {\n return get.$$watchDelegate(this, fn, objectEquality, get, watchExp);\n }\n var scope = this,\n array = scope.$$watchers,\n watcher = {\n fn: fn,\n last: initWatchVal,\n get: get,\n exp: prettyPrintExpression || watchExp,\n eq: !!objectEquality\n };\n\n lastDirtyWatch = null;\n\n if (!array) {\n array = scope.$$watchers = [];\n array.$$digestWatchIndex = -1;\n }\n // we use unshift since we use a while loop in $digest for speed.\n // the while loop reads in reverse order.\n array.unshift(watcher);\n array.$$digestWatchIndex++;\n incrementWatchersCount(this, 1);\n\n return function deregisterWatch() {\n var index = arrayRemove(array, watcher);\n if (index >= 0) {\n incrementWatchersCount(scope, -1);\n if (index < array.$$digestWatchIndex) {\n array.$$digestWatchIndex--;\n }\n }\n lastDirtyWatch = null;\n };\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchGroup\n * @kind function\n *\n * @description\n * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.\n * If any one expression in the collection changes the `listener` is executed.\n *\n * - The items in the `watchExpressions` array are observed via the standard `$watch` operation. Their return\n * values are examined for changes on every call to `$digest`.\n * - The `listener` is called whenever any expression in the `watchExpressions` array changes.\n *\n * @param {Array.} watchExpressions Array of expressions that will be individually\n * watched using {@link ng.$rootScope.Scope#$watch $watch()}\n *\n * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any\n * expression in `watchExpressions` changes\n * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * The `scope` refers to the current scope.\n * @returns {function()} Returns a de-registration function for all listeners.\n */\n $watchGroup: function(watchExpressions, listener) {\n var oldValues = new Array(watchExpressions.length);\n var newValues = new Array(watchExpressions.length);\n var deregisterFns = [];\n var self = this;\n var changeReactionScheduled = false;\n var firstRun = true;\n\n if (!watchExpressions.length) {\n // No expressions means we call the listener ASAP\n var shouldCall = true;\n self.$evalAsync(function() {\n if (shouldCall) listener(newValues, newValues, self);\n });\n return function deregisterWatchGroup() {\n shouldCall = false;\n };\n }\n\n if (watchExpressions.length === 1) {\n // Special case size of one\n return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {\n newValues[0] = value;\n oldValues[0] = oldValue;\n listener(newValues, (value === oldValue) ? newValues : oldValues, scope);\n });\n }\n\n forEach(watchExpressions, function(expr, i) {\n var unwatchFn = self.$watch(expr, function watchGroupSubAction(value) {\n newValues[i] = value;\n if (!changeReactionScheduled) {\n changeReactionScheduled = true;\n self.$evalAsync(watchGroupAction);\n }\n });\n deregisterFns.push(unwatchFn);\n });\n\n function watchGroupAction() {\n changeReactionScheduled = false;\n\n try {\n if (firstRun) {\n firstRun = false;\n listener(newValues, newValues, self);\n } else {\n listener(newValues, oldValues, self);\n }\n } finally {\n for (var i = 0; i < watchExpressions.length; i++) {\n oldValues[i] = newValues[i];\n }\n }\n }\n\n return function deregisterWatchGroup() {\n while (deregisterFns.length) {\n deregisterFns.shift()();\n }\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchCollection\n * @kind function\n *\n * @description\n * Shallow watches the properties of an object and fires whenever any of the properties change\n * (for arrays, this implies watching the array items; for object maps, this implies watching\n * the properties). If a change is detected, the `listener` callback is fired.\n *\n * - The `obj` collection is observed via standard $watch operation and is examined on every\n * call to $digest() to see if any items have been added, removed, or moved.\n * - The `listener` is called whenever anything within the `obj` has changed. Examples include\n * adding, removing, and moving items belonging to an object or array.\n *\n *\n * @example\n * ```js\n $scope.names = ['igor', 'matias', 'misko', 'james'];\n $scope.dataCount = 4;\n\n $scope.$watchCollection('names', function(newNames, oldNames) {\n $scope.dataCount = newNames.length;\n });\n\n expect($scope.dataCount).toEqual(4);\n $scope.$digest();\n\n //still at 4 ... no changes\n expect($scope.dataCount).toEqual(4);\n\n $scope.names.pop();\n $scope.$digest();\n\n //now there's been a change\n expect($scope.dataCount).toEqual(3);\n * ```\n *\n *\n * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The\n * expression value should evaluate to an object or an array which is observed on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the\n * collection will trigger a call to the `listener`.\n *\n * @param {function(newCollection, oldCollection, scope)} listener a callback function called\n * when a change is detected.\n * - The `newCollection` object is the newly modified data obtained from the `obj` expression\n * - The `oldCollection` object is a copy of the former collection data.\n * Due to performance considerations, the`oldCollection` value is computed only if the\n * `listener` function declares two or more arguments.\n * - The `scope` argument refers to the current scope.\n *\n * @returns {function()} Returns a de-registration function for this listener. When the\n * de-registration function is executed, the internal watch operation is terminated.\n */\n $watchCollection: function(obj, listener) {\n // Mark the interceptor as\n // ... $$pure when literal since the instance will change when any input changes\n $watchCollectionInterceptor.$$pure = $parse(obj).literal;\n // ... $stateful when non-literal since we must read the state of the collection\n $watchCollectionInterceptor.$stateful = !$watchCollectionInterceptor.$$pure;\n\n var self = this;\n // the current value, updated on each dirty-check run\n var newValue;\n // a shallow copy of the newValue from the last dirty-check run,\n // updated to match newValue during dirty-check run\n var oldValue;\n // a shallow copy of the newValue from when the last change happened\n var veryOldValue;\n // only track veryOldValue if the listener is asking for it\n var trackVeryOldValue = (listener.length > 1);\n var changeDetected = 0;\n var changeDetector = $parse(obj, $watchCollectionInterceptor);\n var internalArray = [];\n var internalObject = {};\n var initRun = true;\n var oldLength = 0;\n\n function $watchCollectionInterceptor(_value) {\n newValue = _value;\n var newLength, key, bothNaN, newItem, oldItem;\n\n // If the new value is undefined, then return undefined as the watch may be a one-time watch\n if (isUndefined(newValue)) return;\n\n if (!isObject(newValue)) { // if primitive\n if (oldValue !== newValue) {\n oldValue = newValue;\n changeDetected++;\n }\n } else if (isArrayLike(newValue)) {\n if (oldValue !== internalArray) {\n // we are transitioning from something which was not an array into array.\n oldValue = internalArray;\n oldLength = oldValue.length = 0;\n changeDetected++;\n }\n\n newLength = newValue.length;\n\n if (oldLength !== newLength) {\n // if lengths do not match we need to trigger change notification\n changeDetected++;\n oldValue.length = oldLength = newLength;\n }\n // copy the items to oldValue and look for changes.\n for (var i = 0; i < newLength; i++) {\n oldItem = oldValue[i];\n newItem = newValue[i];\n\n // eslint-disable-next-line no-self-compare\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[i] = newItem;\n }\n }\n } else {\n if (oldValue !== internalObject) {\n // we are transitioning from something which was not an object into object.\n oldValue = internalObject = {};\n oldLength = 0;\n changeDetected++;\n }\n // copy the items to oldValue and look for changes.\n newLength = 0;\n for (key in newValue) {\n if (hasOwnProperty.call(newValue, key)) {\n newLength++;\n newItem = newValue[key];\n oldItem = oldValue[key];\n\n if (key in oldValue) {\n // eslint-disable-next-line no-self-compare\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[key] = newItem;\n }\n } else {\n oldLength++;\n oldValue[key] = newItem;\n changeDetected++;\n }\n }\n }\n if (oldLength > newLength) {\n // we used to have more keys, need to find them and destroy them.\n changeDetected++;\n for (key in oldValue) {\n if (!hasOwnProperty.call(newValue, key)) {\n oldLength--;\n delete oldValue[key];\n }\n }\n }\n }\n return changeDetected;\n }\n\n function $watchCollectionAction() {\n if (initRun) {\n initRun = false;\n listener(newValue, newValue, self);\n } else {\n listener(newValue, veryOldValue, self);\n }\n\n // make a copy for the next time a collection is changed\n if (trackVeryOldValue) {\n if (!isObject(newValue)) {\n //primitive\n veryOldValue = newValue;\n } else if (isArrayLike(newValue)) {\n veryOldValue = new Array(newValue.length);\n for (var i = 0; i < newValue.length; i++) {\n veryOldValue[i] = newValue[i];\n }\n } else { // if object\n veryOldValue = {};\n for (var key in newValue) {\n if (hasOwnProperty.call(newValue, key)) {\n veryOldValue[key] = newValue[key];\n }\n }\n }\n }\n }\n\n return this.$watch(changeDetector, $watchCollectionAction);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$digest\n * @kind function\n *\n * @description\n * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and\n * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change\n * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}\n * until no more listeners are firing. This means that it is possible to get into an infinite\n * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of\n * iterations exceeds 10.\n *\n * Usually, you don't call `$digest()` directly in\n * {@link ng.directive:ngController controllers} or in\n * {@link ng.$compileProvider#directive directives}.\n * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within\n * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.\n *\n * If you want to be notified whenever `$digest()` is called,\n * you can register a `watchExpression` function with\n * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.\n *\n * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.\n *\n * @example\n * ```js\n var scope = ...;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n * ```\n *\n */\n $digest: function() {\n var watch, value, last, fn, get,\n watchers,\n dirty, ttl = TTL,\n next, current, target = asyncQueue.length ? $rootScope : this,\n watchLog = [],\n logIdx, asyncTask;\n\n beginPhase('$digest');\n // Check for changes to browser url that happened in sync before the call to $digest\n $browser.$$checkUrlChange();\n\n if (this === $rootScope && applyAsyncId !== null) {\n // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then\n // cancel the scheduled $apply and flush the queue of expressions to be evaluated.\n $browser.defer.cancel(applyAsyncId);\n flushApplyAsync();\n }\n\n lastDirtyWatch = null;\n\n do { // \"while dirty\" loop\n dirty = false;\n current = target;\n\n // It's safe for asyncQueuePosition to be a local variable here because this loop can't\n // be reentered recursively. Calling $digest from a function passed to $evalAsync would\n // lead to a '$digest already in progress' error.\n for (var asyncQueuePosition = 0; asyncQueuePosition < asyncQueue.length; asyncQueuePosition++) {\n try {\n asyncTask = asyncQueue[asyncQueuePosition];\n fn = asyncTask.fn;\n fn(asyncTask.scope, asyncTask.locals);\n } catch (e) {\n $exceptionHandler(e);\n }\n lastDirtyWatch = null;\n }\n asyncQueue.length = 0;\n\n traverseScopesLoop:\n do { // \"traverse the scopes\" loop\n if ((watchers = !current.$$suspended && current.$$watchers)) {\n // process our watches\n watchers.$$digestWatchIndex = watchers.length;\n while (watchers.$$digestWatchIndex--) {\n try {\n watch = watchers[watchers.$$digestWatchIndex];\n // Most common watches are on primitives, in which case we can short\n // circuit it with === operator, only when === fails do we use .equals\n if (watch) {\n get = watch.get;\n if ((value = get(current)) !== (last = watch.last) &&\n !(watch.eq\n ? equals(value, last)\n : (isNumberNaN(value) && isNumberNaN(last)))) {\n dirty = true;\n lastDirtyWatch = watch;\n watch.last = watch.eq ? copy(value, null) : value;\n fn = watch.fn;\n fn(value, ((last === initWatchVal) ? value : last), current);\n if (ttl < 5) {\n logIdx = 4 - ttl;\n if (!watchLog[logIdx]) watchLog[logIdx] = [];\n watchLog[logIdx].push({\n msg: isFunction(watch.exp) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp,\n newVal: value,\n oldVal: last\n });\n }\n } else if (watch === lastDirtyWatch) {\n // If the most recently dirty watcher is now clean, short circuit since the remaining watchers\n // have already been tested.\n dirty = false;\n break traverseScopesLoop;\n }\n }\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n }\n\n // Insanity Warning: scope depth-first traversal\n // yes, this code is a bit crazy, but it works and we have tests to prove it!\n // this piece should be kept in sync with the traversal in $broadcast\n // (though it differs due to having the extra check for $$suspended and does not\n // check $$listenerCount)\n if (!(next = ((!current.$$suspended && current.$$watchersCount && current.$$childHead) ||\n (current !== target && current.$$nextSibling)))) {\n while (current !== target && !(next = current.$$nextSibling)) {\n current = current.$parent;\n }\n }\n } while ((current = next));\n\n // `break traverseScopesLoop;` takes us to here\n\n if ((dirty || asyncQueue.length) && !(ttl--)) {\n clearPhase();\n throw $rootScopeMinErr('infdig',\n '{0} $digest() iterations reached. Aborting!\\n' +\n 'Watchers fired in the last 5 iterations: {1}',\n TTL, watchLog);\n }\n\n } while (dirty || asyncQueue.length);\n\n clearPhase();\n\n // postDigestQueuePosition isn't local here because this loop can be reentered recursively.\n while (postDigestQueuePosition < postDigestQueue.length) {\n try {\n postDigestQueue[postDigestQueuePosition++]();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n postDigestQueue.length = postDigestQueuePosition = 0;\n\n // Check for changes to browser url that happened during the $digest\n // (for which no event is fired; e.g. via `history.pushState()`)\n $browser.$$checkUrlChange();\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$suspend\n * @kind function\n *\n * @description\n * Suspend watchers of this scope subtree so that they will not be invoked during digest.\n *\n * This can be used to optimize your application when you know that running those watchers\n * is redundant.\n *\n * **Warning**\n *\n * Suspending scopes from the digest cycle can have unwanted and difficult to debug results.\n * Only use this approach if you are confident that you know what you are doing and have\n * ample tests to ensure that bindings get updated as you expect.\n *\n * Some of the things to consider are:\n *\n * * Any external event on a directive/component will not trigger a digest while the hosting\n * scope is suspended - even if the event handler calls `$apply()` or `$rootScope.$digest()`.\n * * Transcluded content exists on a scope that inherits from outside a directive but exists\n * as a child of the directive's containing scope. If the containing scope is suspended the\n * transcluded scope will also be suspended, even if the scope from which the transcluded\n * scope inherits is not suspended.\n * * Multiple directives trying to manage the suspended status of a scope can confuse each other:\n * * A call to `$suspend()` on an already suspended scope is a no-op.\n * * A call to `$resume()` on a non-suspended scope is a no-op.\n * * If two directives suspend a scope, then one of them resumes the scope, the scope will no\n * longer be suspended. This could result in the other directive believing a scope to be\n * suspended when it is not.\n * * If a parent scope is suspended then all its descendants will be also excluded from future\n * digests whether or not they have been suspended themselves. Note that this also applies to\n * isolate child scopes.\n * * Calling `$digest()` directly on a descendant of a suspended scope will still run the watchers\n * for that scope and its descendants. When digesting we only check whether the current scope is\n * locally suspended, rather than checking whether it has a suspended ancestor.\n * * Calling `$resume()` on a scope that has a suspended ancestor will not cause the scope to be\n * included in future digests until all its ancestors have been resumed.\n * * Resolved promises, e.g. from explicit `$q` deferreds and `$http` calls, trigger `$apply()`\n * against the `$rootScope` and so will still trigger a global digest even if the promise was\n * initiated by a component that lives on a suspended scope.\n */\n $suspend: function() {\n this.$$suspended = true;\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$isSuspended\n * @kind function\n *\n * @description\n * Call this method to determine if this scope has been explicitly suspended. It will not\n * tell you whether an ancestor has been suspended.\n * To determine if this scope will be excluded from a digest triggered at the $rootScope,\n * for example, you must check all its ancestors:\n *\n * ```\n * function isExcludedFromDigest(scope) {\n * while(scope) {\n * if (scope.$isSuspended()) return true;\n * scope = scope.$parent;\n * }\n * return false;\n * ```\n *\n * Be aware that a scope may not be included in digests if it has a suspended ancestor,\n * even if `$isSuspended()` returns false.\n *\n * @returns true if the current scope has been suspended.\n */\n $isSuspended: function() {\n return this.$$suspended;\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$resume\n * @kind function\n *\n * @description\n * Resume watchers of this scope subtree in case it was suspended.\n *\n * See {@link $rootScope.Scope#$suspend} for information about the dangers of using this approach.\n */\n $resume: function() {\n this.$$suspended = false;\n },\n\n /**\n * @ngdoc event\n * @name $rootScope.Scope#$destroy\n * @eventType broadcast on scope being destroyed\n *\n * @description\n * Broadcasted when a scope and its children are being destroyed.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$destroy\n * @kind function\n *\n * @description\n * Removes the current scope (and all of its children) from the parent scope. Removal implies\n * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer\n * propagate to the current scope and its children. Removal also implies that the current\n * scope is eligible for garbage collection.\n *\n * The `$destroy()` is usually used by directives such as\n * {@link ng.directive:ngRepeat ngRepeat} for managing the\n * unrolling of the loop.\n *\n * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.\n * Application code can register a `$destroy` event handler that will give it a chance to\n * perform any necessary cleanup.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n $destroy: function() {\n // We can't destroy a scope that has been already destroyed.\n if (this.$$destroyed) return;\n var parent = this.$parent;\n\n this.$broadcast('$destroy');\n this.$$destroyed = true;\n\n if (this === $rootScope) {\n //Remove handlers attached to window when $rootScope is removed\n $browser.$$applicationDestroyed();\n }\n\n incrementWatchersCount(this, -this.$$watchersCount);\n for (var eventName in this.$$listenerCount) {\n decrementListenerCount(this, this.$$listenerCount[eventName], eventName);\n }\n\n // sever all the references to parent scopes (after this cleanup, the current scope should\n // not be retained by any of our references and should be eligible for garbage collection)\n if (parent && parent.$$childHead === this) parent.$$childHead = this.$$nextSibling;\n if (parent && parent.$$childTail === this) parent.$$childTail = this.$$prevSibling;\n if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;\n if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;\n\n // Disable listeners, watchers and apply/digest methods\n this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = noop;\n this.$on = this.$watch = this.$watchGroup = function() { return noop; };\n this.$$listeners = {};\n\n // Disconnect the next sibling to prevent `cleanUpScope` destroying those too\n this.$$nextSibling = null;\n cleanUpScope(this);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$eval\n * @kind function\n *\n * @description\n * Executes the `expression` on the current scope and returns the result. Any exceptions in\n * the expression are propagated (uncaught). This is useful when evaluating AngularJS\n * expressions.\n *\n * @example\n * ```js\n var scope = ng.$rootScope.Scope();\n scope.a = 1;\n scope.b = 2;\n\n expect(scope.$eval('a+b')).toEqual(3);\n expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);\n * ```\n *\n * @param {(string|function())=} expression An AngularJS expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n * @returns {*} The result of evaluating the expression.\n */\n $eval: function(expr, locals) {\n return $parse(expr)(this, locals);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$evalAsync\n * @kind function\n *\n * @description\n * Executes the expression on the current scope at a later point in time.\n *\n * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only\n * that:\n *\n * - it will execute after the function that scheduled the evaluation (preferably before DOM\n * rendering).\n * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after\n * `expression` execution.\n *\n * Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle\n * will be scheduled. However, it is encouraged to always call code that changes the model\n * from within an `$apply` call. That includes code evaluated via `$evalAsync`.\n *\n * @param {(string|function())=} expression An AngularJS expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n */\n $evalAsync: function(expr, locals) {\n // if we are outside of an $digest loop and this is the first time we are scheduling async\n // task also schedule async auto-flush\n if (!$rootScope.$$phase && !asyncQueue.length) {\n $browser.defer(function() {\n if (asyncQueue.length) {\n $rootScope.$digest();\n }\n });\n }\n\n asyncQueue.push({scope: this, fn: $parse(expr), locals: locals});\n },\n\n $$postDigest: function(fn) {\n postDigestQueue.push(fn);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$apply\n * @kind function\n *\n * @description\n * `$apply()` is used to execute an expression in AngularJS from outside of the AngularJS\n * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).\n * Because we are calling into the AngularJS framework we need to perform proper scope life\n * cycle of {@link ng.$exceptionHandler exception handling},\n * {@link ng.$rootScope.Scope#$digest executing watches}.\n *\n * **Life cycle: Pseudo-Code of `$apply()`**\n *\n * ```js\n function $apply(expr) {\n try {\n return $eval(expr);\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n $root.$digest();\n }\n }\n * ```\n *\n *\n * Scope's `$apply()` method transitions through the following stages:\n *\n * 1. The {@link guide/expression expression} is executed using the\n * {@link ng.$rootScope.Scope#$eval $eval()} method.\n * 2. Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the\n * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.\n *\n *\n * @param {(string|function())=} exp An AngularJS expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n *\n * @returns {*} The result of evaluating the expression.\n */\n $apply: function(expr) {\n try {\n beginPhase('$apply');\n try {\n return this.$eval(expr);\n } finally {\n clearPhase();\n }\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n try {\n $rootScope.$digest();\n } catch (e) {\n $exceptionHandler(e);\n // eslint-disable-next-line no-unsafe-finally\n throw e;\n }\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$applyAsync\n * @kind function\n *\n * @description\n * Schedule the invocation of $apply to occur at a later time. The actual time difference\n * varies across browsers, but is typically around ~10 milliseconds.\n *\n * This can be used to queue up multiple expressions which need to be evaluated in the same\n * digest.\n *\n * @param {(string|function())=} exp An AngularJS expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n */\n $applyAsync: function(expr) {\n var scope = this;\n if (expr) {\n applyAsyncQueue.push($applyAsyncExpression);\n }\n expr = $parse(expr);\n scheduleApplyAsync();\n\n function $applyAsyncExpression() {\n scope.$eval(expr);\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$on\n * @kind function\n *\n * @description\n * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for\n * discussion of event life cycle.\n *\n * The event listener function format is: `function(event, args...)`. The `event` object\n * passed into the listener has the following attributes:\n *\n * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or\n * `$broadcast`-ed.\n * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the\n * event propagates through the scope hierarchy, this property is set to null.\n * - `name` - `{string}`: name of the event.\n * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel\n * further event propagation (available only for events that were `$emit`-ed).\n * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag\n * to true.\n * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.\n *\n * @param {string} name Event name to listen on.\n * @param {function(event, ...args)} listener Function to call when the event is emitted.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $on: function(name, listener) {\n var namedListeners = this.$$listeners[name];\n if (!namedListeners) {\n this.$$listeners[name] = namedListeners = [];\n }\n namedListeners.push(listener);\n\n var current = this;\n do {\n if (!current.$$listenerCount[name]) {\n current.$$listenerCount[name] = 0;\n }\n current.$$listenerCount[name]++;\n } while ((current = current.$parent));\n\n var self = this;\n return function() {\n var indexOfListener = namedListeners.indexOf(listener);\n if (indexOfListener !== -1) {\n // Use delete in the hope of the browser deallocating the memory for the array entry,\n // while not shifting the array indexes of other listeners.\n // See issue https://github.com/angular/angular.js/issues/16135\n delete namedListeners[indexOfListener];\n decrementListenerCount(self, 1, name);\n }\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$emit\n * @kind function\n *\n * @description\n * Dispatches an event `name` upwards through the scope hierarchy notifying the\n * registered {@link ng.$rootScope.Scope#$on} listeners.\n *\n * The event life cycle starts at the scope on which `$emit` was called. All\n * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n * notified. Afterwards, the event traverses upwards toward the root scope and calls all\n * registered listeners along the way. The event will stop propagating if one of the listeners\n * cancels it.\n *\n * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * @param {string} name Event name to emit.\n * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).\n */\n $emit: function(name, args) {\n var empty = [],\n namedListeners,\n scope = this,\n stopPropagation = false,\n event = {\n name: name,\n targetScope: scope,\n stopPropagation: function() {stopPropagation = true;},\n preventDefault: function() {\n event.defaultPrevented = true;\n },\n defaultPrevented: false\n },\n listenerArgs = concat([event], arguments, 1),\n i, length;\n\n do {\n namedListeners = scope.$$listeners[name] || empty;\n event.currentScope = scope;\n for (i = 0, length = namedListeners.length; i < length; i++) {\n\n // if listeners were deregistered, defragment the array\n if (!namedListeners[i]) {\n namedListeners.splice(i, 1);\n i--;\n length--;\n continue;\n }\n try {\n //allow all listeners attached to the current scope to run\n namedListeners[i].apply(null, listenerArgs);\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n //if any listener on the current scope stops propagation, prevent bubbling\n if (stopPropagation) {\n break;\n }\n //traverse upwards\n scope = scope.$parent;\n } while (scope);\n\n event.currentScope = null;\n\n return event;\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$broadcast\n * @kind function\n *\n * @description\n * Dispatches an event `name` downwards to all child scopes (and their children) notifying the\n * registered {@link ng.$rootScope.Scope#$on} listeners.\n *\n * The event life cycle starts at the scope on which `$broadcast` was called. All\n * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n * notified. Afterwards, the event propagates to all direct and indirect scopes of the current\n * scope and calls all registered listeners along the way. The event cannot be canceled.\n *\n * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * @param {string} name Event name to broadcast.\n * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}\n */\n $broadcast: function(name, args) {\n var target = this,\n current = target,\n next = target,\n event = {\n name: name,\n targetScope: target,\n preventDefault: function() {\n event.defaultPrevented = true;\n },\n defaultPrevented: false\n };\n\n if (!target.$$listenerCount[name]) return event;\n\n var listenerArgs = concat([event], arguments, 1),\n listeners, i, length;\n\n //down while you can, then up and next sibling or up and next sibling until back at root\n while ((current = next)) {\n event.currentScope = current;\n listeners = current.$$listeners[name] || [];\n for (i = 0, length = listeners.length; i < length; i++) {\n // if listeners were deregistered, defragment the array\n if (!listeners[i]) {\n listeners.splice(i, 1);\n i--;\n length--;\n continue;\n }\n\n try {\n listeners[i].apply(null, listenerArgs);\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n\n // Insanity Warning: scope depth-first traversal\n // yes, this code is a bit crazy, but it works and we have tests to prove it!\n // this piece should be kept in sync with the traversal in $digest\n // (though it differs due to having the extra check for $$listenerCount and\n // does not check $$suspended)\n if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||\n (current !== target && current.$$nextSibling)))) {\n while (current !== target && !(next = current.$$nextSibling)) {\n current = current.$parent;\n }\n }\n }\n\n event.currentScope = null;\n return event;\n }\n };\n\n var $rootScope = new Scope();\n\n //The internal queues. Expose them on the $rootScope for debugging/testing purposes.\n var asyncQueue = $rootScope.$$asyncQueue = [];\n var postDigestQueue = $rootScope.$$postDigestQueue = [];\n var applyAsyncQueue = $rootScope.$$applyAsyncQueue = [];\n\n var postDigestQueuePosition = 0;\n\n return $rootScope;\n\n\n function beginPhase(phase) {\n if ($rootScope.$$phase) {\n throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);\n }\n\n $rootScope.$$phase = phase;\n }\n\n function clearPhase() {\n $rootScope.$$phase = null;\n }\n\n function incrementWatchersCount(current, count) {\n do {\n current.$$watchersCount += count;\n } while ((current = current.$parent));\n }\n\n function decrementListenerCount(current, count, name) {\n do {\n current.$$listenerCount[name] -= count;\n\n if (current.$$listenerCount[name] === 0) {\n delete current.$$listenerCount[name];\n }\n } while ((current = current.$parent));\n }\n\n /**\n * function used as an initial value for watchers.\n * because it's unique we can easily tell it apart from other values\n */\n function initWatchVal() {}\n\n function flushApplyAsync() {\n while (applyAsyncQueue.length) {\n try {\n applyAsyncQueue.shift()();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n applyAsyncId = null;\n }\n\n function scheduleApplyAsync() {\n if (applyAsyncId === null) {\n applyAsyncId = $browser.defer(function() {\n $rootScope.$apply(flushApplyAsync);\n });\n }\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $rootElement\n *\n * @description\n * The root element of AngularJS application. This is either the element where {@link\n * ng.directive:ngApp ngApp} was declared or the element passed into\n * {@link angular.bootstrap}. The element represents the root element of application. It is also the\n * location where the application's {@link auto.$injector $injector} service gets\n * published, and can be retrieved using `$rootElement.injector()`.\n */\n\n\n// the implementation is in angular.bootstrap\n\n/**\n * @this\n * @description\n * Private service to sanitize uris for links and images. Used by $compile and $sanitize.\n */\nfunction $$SanitizeUriProvider() {\n\n var aHrefSanitizationWhitelist = /^\\s*(https?|s?ftp|mailto|tel|file):/,\n imgSrcSanitizationWhitelist = /^\\s*((https?|ftp|file|blob):|data:image\\/)/;\n\n /**\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during a[href] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via HTML anchor links.\n *\n * Any url due to be assigned to an `a[href]` attribute via interpolation is marked as requiring\n * the $sce.URL security context. When interpolation occurs a call is made to `$sce.trustAsUrl(url)`\n * which in turn may call `$$sanitizeUri(url, isMedia)` to sanitize the potentially malicious URL.\n *\n * If the URL matches the `aHrefSanitizationWhitelist` regular expression, it is returned unchanged.\n *\n * If there is no match the URL is returned prefixed with `'unsafe:'` to ensure that when it is written\n * to the DOM it is inactive and potentially malicious code will not be executed.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.aHrefSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n aHrefSanitizationWhitelist = regexp;\n return this;\n }\n return aHrefSanitizationWhitelist;\n };\n\n\n /**\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during img[src] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via HTML image src links.\n *\n * Any URL due to be assigned to an `img[src]` attribute via interpolation is marked as requiring\n * the $sce.MEDIA_URL security context. When interpolation occurs a call is made to\n * `$sce.trustAsMediaUrl(url)` which in turn may call `$$sanitizeUri(url, isMedia)` to sanitize\n * the potentially malicious URL.\n *\n * If the URL matches the `aImgSanitizationWhitelist` regular expression, it is returned unchanged.\n *\n * If there is no match the URL is returned prefixed with `'unsafe:'` to ensure that when it is written\n * to the DOM it is inactive and potentially malicious code will not be executed.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.imgSrcSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n imgSrcSanitizationWhitelist = regexp;\n return this;\n }\n return imgSrcSanitizationWhitelist;\n };\n\n this.$get = function() {\n return function sanitizeUri(uri, isMediaUrl) {\n // if (!uri) return uri;\n var regex = isMediaUrl ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist;\n var normalizedVal = urlResolve(uri && uri.trim()).href;\n if (normalizedVal !== '' && !normalizedVal.match(regex)) {\n return 'unsafe:' + normalizedVal;\n }\n return uri;\n };\n };\n}\n\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Any commits to this file should be reviewed with security in mind. *\n * Changes to this file can potentially create security vulnerabilities. *\n * An approval from 2 Core members with history of modifying *\n * this file is required. *\n * *\n * Does the change somehow allow for arbitrary javascript to be executed? *\n * Or allows for someone to change the prototype of built-in objects? *\n * Or gives undesired access to variables likes document or window? *\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n/* exported $SceProvider, $SceDelegateProvider */\n\nvar $sceMinErr = minErr('$sce');\n\nvar SCE_CONTEXTS = {\n // HTML is used when there's HTML rendered (e.g. ng-bind-html, iframe srcdoc binding).\n HTML: 'html',\n\n // Style statements or stylesheets. Currently unused in AngularJS.\n CSS: 'css',\n\n // An URL used in a context where it refers to the source of media, which are not expected to be run\n // as scripts, such as an image, audio, video, etc.\n MEDIA_URL: 'mediaUrl',\n\n // An URL used in a context where it does not refer to a resource that loads code.\n // A value that can be trusted as a URL can also trusted as a MEDIA_URL.\n URL: 'url',\n\n // RESOURCE_URL is a subtype of URL used where the referred-to resource could be interpreted as\n // code. (e.g. ng-include, script src binding, templateUrl)\n // A value that can be trusted as a RESOURCE_URL, can also trusted as a URL and a MEDIA_URL.\n RESOURCE_URL: 'resourceUrl',\n\n // Script. Currently unused in AngularJS.\n JS: 'js'\n};\n\n// Helper functions follow.\n\nvar UNDERSCORE_LOWERCASE_REGEXP = /_([a-z])/g;\n\nfunction snakeToCamel(name) {\n return name\n .replace(UNDERSCORE_LOWERCASE_REGEXP, fnCamelCaseReplace);\n}\n\nfunction adjustMatcher(matcher) {\n if (matcher === 'self') {\n return matcher;\n } else if (isString(matcher)) {\n // Strings match exactly except for 2 wildcards - '*' and '**'.\n // '*' matches any character except those from the set ':/.?&'.\n // '**' matches any character (like .* in a RegExp).\n // More than 2 *'s raises an error as it's ill defined.\n if (matcher.indexOf('***') > -1) {\n throw $sceMinErr('iwcard',\n 'Illegal sequence *** in string matcher. String: {0}', matcher);\n }\n matcher = escapeForRegexp(matcher).\n replace(/\\\\\\*\\\\\\*/g, '.*').\n replace(/\\\\\\*/g, '[^:/.?&;]*');\n return new RegExp('^' + matcher + '$');\n } else if (isRegExp(matcher)) {\n // The only other type of matcher allowed is a Regexp.\n // Match entire URL / disallow partial matches.\n // Flags are reset (i.e. no global, ignoreCase or multiline)\n return new RegExp('^' + matcher.source + '$');\n } else {\n throw $sceMinErr('imatcher',\n 'Matchers may only be \"self\", string patterns or RegExp objects');\n }\n}\n\n\nfunction adjustMatchers(matchers) {\n var adjustedMatchers = [];\n if (isDefined(matchers)) {\n forEach(matchers, function(matcher) {\n adjustedMatchers.push(adjustMatcher(matcher));\n });\n }\n return adjustedMatchers;\n}\n\n\n/**\n * @ngdoc service\n * @name $sceDelegate\n * @kind function\n *\n * @description\n *\n * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict\n * Contextual Escaping (SCE)} services to AngularJS.\n *\n * For an overview of this service and the functionnality it provides in AngularJS, see the main\n * page for {@link ng.$sce SCE}. The current page is targeted for developers who need to alter how\n * SCE works in their application, which shouldn't be needed in most cases.\n *\n *
\n * AngularJS strongly relies on contextual escaping for the security of bindings: disabling or\n * modifying this might cause cross site scripting (XSS) vulnerabilities. For libraries owners,\n * changes to this service will also influence users, so be extra careful and document your changes.\n *
\n *\n * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of\n * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is\n * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to\n * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things\n * work because `$sce` delegates to `$sceDelegate` for these operations.\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.\n *\n * The default instance of `$sceDelegate` should work out of the box with little pain. While you\n * can override it completely to change the behavior of `$sce`, the common case would\n * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting\n * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as\n * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist\n * $sceDelegateProvider.resourceUrlWhitelist} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n */\n\n/**\n * @ngdoc provider\n * @name $sceDelegateProvider\n * @this\n *\n * @description\n *\n * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate\n * $sceDelegate service}, used as a delegate for {@link ng.$sce Strict Contextual Escaping (SCE)}.\n *\n * The `$sceDelegateProvider` allows one to get/set the whitelists and blacklists used to ensure\n * that the URLs used for sourcing AngularJS templates and other script-running URLs are safe (all\n * places that use the `$sce.RESOURCE_URL` context). See\n * {@link ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist}\n * and\n * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist},\n *\n * For the general details about this service in AngularJS, read the main page for {@link ng.$sce\n * Strict Contextual Escaping (SCE)}.\n *\n * **Example**: Consider the following case.
\n *\n * - your app is hosted at url `http://myapp.example.com/`\n * - but some of your templates are hosted on other domains you control such as\n * `http://srv01.assets.example.com/`, `http://srv02.assets.example.com/`, etc.\n * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.\n *\n * Here is what a secure configuration for this scenario might look like:\n *\n * ```\n * angular.module('myApp', []).config(function($sceDelegateProvider) {\n * $sceDelegateProvider.resourceUrlWhitelist([\n * // Allow same origin resource loads.\n * 'self',\n * // Allow loading from our assets domain. Notice the difference between * and **.\n * 'http://srv*.assets.example.com/**'\n * ]);\n *\n * // The blacklist overrides the whitelist so the open redirect here is blocked.\n * $sceDelegateProvider.resourceUrlBlacklist([\n * 'http://myapp.example.com/clickThru**'\n * ]);\n * });\n * ```\n * Note that an empty whitelist will block every resource URL from being loaded, and will require\n * you to manually mark each one as trusted with `$sce.trustAsResourceUrl`. However, templates\n * requested by {@link ng.$templateRequest $templateRequest} that are present in\n * {@link ng.$templateCache $templateCache} will not go through this check. If you have a mechanism\n * to populate your templates in that cache at config time, then it is a good idea to remove 'self'\n * from that whitelist. This helps to mitigate the security impact of certain types of issues, like\n * for instance attacker-controlled `ng-includes`.\n */\n\nfunction $SceDelegateProvider() {\n this.SCE_CONTEXTS = SCE_CONTEXTS;\n\n // Resource URLs can also be trusted by policy.\n var resourceUrlWhitelist = ['self'],\n resourceUrlBlacklist = [];\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlWhitelist\n * @kind function\n *\n * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value\n * provided. This must be an array or null. A snapshot of this array is used so further\n * changes to the array are ignored.\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.\n *\n * @return {Array} The currently set whitelist array.\n *\n * @description\n * Sets/Gets the whitelist of trusted resource URLs.\n *\n * The **default value** when no whitelist has been explicitly set is `['self']` allowing only\n * same origin resource requests.\n *\n *
\n * **Note:** the default whitelist of 'self' is not recommended if your app shares its origin\n * with other apps! It is a good idea to limit it to only your application's directory.\n *
\n */\n this.resourceUrlWhitelist = function(value) {\n if (arguments.length) {\n resourceUrlWhitelist = adjustMatchers(value);\n }\n return resourceUrlWhitelist;\n };\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlBlacklist\n * @kind function\n *\n * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value\n * provided. This must be an array or null. A snapshot of this array is used so further\n * changes to the array are ignored.

\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.

\n * The typical usage for the blacklist is to **block\n * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as\n * these would otherwise be trusted but actually return content from the redirected domain.\n *

\n * Finally, **the blacklist overrides the whitelist** and has the final say.\n *\n * @return {Array} The currently set blacklist array.\n *\n * @description\n * Sets/Gets the blacklist of trusted resource URLs.\n *\n * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there\n * is no blacklist.)\n */\n\n this.resourceUrlBlacklist = function(value) {\n if (arguments.length) {\n resourceUrlBlacklist = adjustMatchers(value);\n }\n return resourceUrlBlacklist;\n };\n\n this.$get = ['$injector', '$$sanitizeUri', function($injector, $$sanitizeUri) {\n\n var htmlSanitizer = function htmlSanitizer(html) {\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n };\n\n if ($injector.has('$sanitize')) {\n htmlSanitizer = $injector.get('$sanitize');\n }\n\n\n function matchUrl(matcher, parsedUrl) {\n if (matcher === 'self') {\n return urlIsSameOrigin(parsedUrl) || urlIsSameOriginAsBaseUrl(parsedUrl);\n } else {\n // definitely a regex. See adjustMatchers()\n return !!matcher.exec(parsedUrl.href);\n }\n }\n\n function isResourceUrlAllowedByPolicy(url) {\n var parsedUrl = urlResolve(url.toString());\n var i, n, allowed = false;\n // Ensure that at least one item from the whitelist allows this url.\n for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {\n if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {\n allowed = true;\n break;\n }\n }\n if (allowed) {\n // Ensure that no item from the blacklist blocked this url.\n for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {\n if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {\n allowed = false;\n break;\n }\n }\n }\n return allowed;\n }\n\n function generateHolderType(Base) {\n var holderType = function TrustedValueHolderType(trustedValue) {\n this.$$unwrapTrustedValue = function() {\n return trustedValue;\n };\n };\n if (Base) {\n holderType.prototype = new Base();\n }\n holderType.prototype.valueOf = function sceValueOf() {\n return this.$$unwrapTrustedValue();\n };\n holderType.prototype.toString = function sceToString() {\n return this.$$unwrapTrustedValue().toString();\n };\n return holderType;\n }\n\n var trustedValueHolderBase = generateHolderType(),\n byType = {};\n\n byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.MEDIA_URL] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.URL] = generateHolderType(byType[SCE_CONTEXTS.MEDIA_URL]);\n byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);\n\n /**\n * @ngdoc method\n * @name $sceDelegate#trustAs\n *\n * @description\n * Returns a trusted representation of the parameter for the specified context. This trusted\n * object will later on be used as-is, without any security check, by bindings or directives\n * that require this security context.\n * For instance, marking a string as trusted for the `$sce.HTML` context will entirely bypass\n * the potential `$sanitize` call in corresponding `$sce.HTML` bindings or directives, such as\n * `ng-bind-html`. Note that in most cases you won't need to call this function: if you have the\n * sanitizer loaded, passing the value itself will render all the HTML that does not pose a\n * security risk.\n *\n * See {@link ng.$sceDelegate#getTrusted getTrusted} for the function that will consume those\n * trusted values, and {@link ng.$sce $sce} for general documentation about strict contextual\n * escaping.\n *\n * @param {string} type The context in which this value is safe for use, e.g. `$sce.URL`,\n * `$sce.RESOURCE_URL`, `$sce.HTML`, `$sce.JS` or `$sce.CSS`.\n *\n * @param {*} value The value that should be considered trusted.\n * @return {*} A trusted representation of value, that can be used in the given context.\n */\n function trustAs(type, trustedValue) {\n var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n if (!Constructor) {\n throw $sceMinErr('icontext',\n 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',\n type, trustedValue);\n }\n if (trustedValue === null || isUndefined(trustedValue) || trustedValue === '') {\n return trustedValue;\n }\n // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting\n // mutable objects, we ensure here that the value passed in is actually a string.\n if (typeof trustedValue !== 'string') {\n throw $sceMinErr('itype',\n 'Attempted to trust a non-string value in a content requiring a string: Context: {0}',\n type);\n }\n return new Constructor(trustedValue);\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#valueOf\n *\n * @description\n * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.\n *\n * If the passed parameter is not a value that had been returned by {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, it must be returned as-is.\n *\n * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}\n * call or anything else.\n * @return {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns\n * `value` unchanged.\n */\n function valueOf(maybeTrusted) {\n if (maybeTrusted instanceof trustedValueHolderBase) {\n return maybeTrusted.$$unwrapTrustedValue();\n } else {\n return maybeTrusted;\n }\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#getTrusted\n *\n * @description\n * Given an object and a security context in which to assign it, returns a value that's safe to\n * use in this context, which was represented by the parameter. To do so, this function either\n * unwraps the safe type it has been given (for instance, a {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} result), or it might try to sanitize the value given, depending on\n * the context and sanitizer availablility.\n *\n * The contexts that can be sanitized are $sce.MEDIA_URL, $sce.URL and $sce.HTML. The first two are available\n * by default, and the third one relies on the `$sanitize` service (which may be loaded through\n * the `ngSanitize` module). Furthermore, for $sce.RESOURCE_URL context, a plain string may be\n * accepted if the resource url policy defined by {@link ng.$sceDelegateProvider#resourceUrlWhitelist\n * `$sceDelegateProvider.resourceUrlWhitelist`} and {@link ng.$sceDelegateProvider#resourceUrlBlacklist\n * `$sceDelegateProvider.resourceUrlBlacklist`} accepts that resource.\n *\n * This function will throw if the safe type isn't appropriate for this context, or if the\n * value given cannot be accepted in the context (which might be caused by sanitization not\n * being available, or the value not being recognized as safe).\n *\n *

\n * Disabling auto-escaping is extremely dangerous, it usually creates a Cross Site Scripting\n * (XSS) vulnerability in your application.\n *
\n *\n * @param {string} type The context in which this value is to be used (such as `$sce.HTML`).\n * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} call, or anything else (which will not be considered trusted.)\n * @return {*} A version of the value that's safe to use in the given context, or throws an\n * exception if this is impossible.\n */\n function getTrusted(type, maybeTrusted) {\n if (maybeTrusted === null || isUndefined(maybeTrusted) || maybeTrusted === '') {\n return maybeTrusted;\n }\n var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n // If maybeTrusted is a trusted class instance or subclass instance, then unwrap and return\n // as-is.\n if (constructor && maybeTrusted instanceof constructor) {\n return maybeTrusted.$$unwrapTrustedValue();\n }\n\n // If maybeTrusted is a trusted class instance but not of the correct trusted type\n // then unwrap it and allow it to pass through to the rest of the checks\n if (isFunction(maybeTrusted.$$unwrapTrustedValue)) {\n maybeTrusted = maybeTrusted.$$unwrapTrustedValue();\n }\n\n // If we get here, then we will either sanitize the value or throw an exception.\n if (type === SCE_CONTEXTS.MEDIA_URL || type === SCE_CONTEXTS.URL) {\n // we attempt to sanitize non-resource URLs\n return $$sanitizeUri(maybeTrusted, type === SCE_CONTEXTS.MEDIA_URL);\n } else if (type === SCE_CONTEXTS.RESOURCE_URL) {\n if (isResourceUrlAllowedByPolicy(maybeTrusted)) {\n return maybeTrusted;\n } else {\n throw $sceMinErr('insecurl',\n 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',\n maybeTrusted.toString());\n }\n } else if (type === SCE_CONTEXTS.HTML) {\n // htmlSanitizer throws its own error when no sanitizer is available.\n return htmlSanitizer(maybeTrusted);\n }\n // Default error when the $sce service has no way to make the input safe.\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n }\n\n return { trustAs: trustAs,\n getTrusted: getTrusted,\n valueOf: valueOf };\n }];\n}\n\n\n/**\n * @ngdoc provider\n * @name $sceProvider\n * @this\n *\n * @description\n *\n * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.\n * - enable/disable Strict Contextual Escaping (SCE) in a module\n * - override the default implementation with a custom delegate\n *\n * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.\n */\n\n/**\n * @ngdoc service\n * @name $sce\n * @kind function\n *\n * @description\n *\n * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.\n *\n * ## Strict Contextual Escaping\n *\n * Strict Contextual Escaping (SCE) is a mode in which AngularJS constrains bindings to only render\n * trusted values. Its goal is to assist in writing code in a way that (a) is secure by default, and\n * (b) makes auditing for security vulnerabilities such as XSS, clickjacking, etc. a lot easier.\n *\n * ### Overview\n *\n * To systematically block XSS security bugs, AngularJS treats all values as untrusted by default in\n * HTML or sensitive URL bindings. When binding untrusted values, AngularJS will automatically\n * run security checks on them (sanitizations, whitelists, depending on context), or throw when it\n * cannot guarantee the security of the result. That behavior depends strongly on contexts: HTML\n * can be sanitized, but template URLs cannot, for instance.\n *\n * To illustrate this, consider the `ng-bind-html` directive. It renders its value directly as HTML:\n * we call that the *context*. When given an untrusted input, AngularJS will attempt to sanitize it\n * before rendering if a sanitizer is available, and throw otherwise. To bypass sanitization and\n * render the input as-is, you will need to mark it as trusted for that context before attempting\n * to bind it.\n *\n * As of version 1.2, AngularJS ships with SCE enabled by default.\n *\n * ### In practice\n *\n * Here's an example of a binding in a privileged context:\n *\n * ```\n * \n *
\n * ```\n *\n * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE\n * disabled, this application allows the user to render arbitrary HTML into the DIV, which would\n * be an XSS security bug. In a more realistic example, one may be rendering user comments, blog\n * articles, etc. via bindings. (HTML is just one example of a context where rendering user\n * controlled input creates security vulnerabilities.)\n *\n * For the case of HTML, you might use a library, either on the client side, or on the server side,\n * to sanitize unsafe HTML before binding to the value and rendering it in the document.\n *\n * How would you ensure that every place that used these types of bindings was bound to a value that\n * was sanitized by your library (or returned as safe for rendering by your server?) How can you\n * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some\n * properties/fields and forgot to update the binding to the sanitized value?\n *\n * To be secure by default, AngularJS makes sure bindings go through that sanitization, or\n * any similar validation process, unless there's a good reason to trust the given value in this\n * context. That trust is formalized with a function call. This means that as a developer, you\n * can assume all untrusted bindings are safe. Then, to audit your code for binding security issues,\n * you just need to ensure the values you mark as trusted indeed are safe - because they were\n * received from your server, sanitized by your library, etc. You can organize your codebase to\n * help with this - perhaps allowing only the files in a specific directory to do this.\n * Ensuring that the internal API exposed by that code doesn't markup arbitrary values as safe then\n * becomes a more manageable task.\n *\n * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}\n * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to\n * build the trusted versions of your values.\n *\n * ### How does it work?\n *\n * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted\n * $sce.getTrusted(context, value)} rather than to the value directly. Think of this function as\n * a way to enforce the required security context in your data sink. Directives use {@link\n * ng.$sce#parseAs $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs\n * the {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals. Also,\n * when binding without directives, AngularJS will understand the context of your bindings\n * automatically.\n *\n * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link\n * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly\n * simplified):\n *\n * ```\n * var ngBindHtmlDirective = ['$sce', function($sce) {\n * return function(scope, element, attr) {\n * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {\n * element.html(value || '');\n * });\n * };\n * }];\n * ```\n *\n * ### Impact on loading templates\n *\n * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as\n * `templateUrl`'s specified by {@link guide/directive directives}.\n *\n * By default, AngularJS only loads templates from the same domain and protocol as the application\n * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or\n * protocols, you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist\n * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.\n *\n * *Please note*:\n * The browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy apply in addition to this and may further restrict whether the template is successfully\n * loaded. This means that without the right CORS policy, loading templates from a different domain\n * won't work on all browsers. Also, loading templates from `file://` URL does not work on some\n * browsers.\n *\n * ### This feels like too much overhead\n *\n * It's important to remember that SCE only applies to interpolation expressions.\n *\n * If your expressions are constant literals, they're automatically trusted and you don't need to\n * call `$sce.trustAs` on them (e.g.\n * `
implicitly trusted'\">
`) just works (remember to include the\n * `ngSanitize` module). The `$sceDelegate` will also use the `$sanitize` service if it is available\n * when binding untrusted values to `$sce.HTML` context.\n * AngularJS provides an implementation in `angular-sanitize.js`, and if you\n * wish to use it, you will also need to depend on the {@link ngSanitize `ngSanitize`} module in\n * your application.\n *\n * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load\n * templates in `ng-include` from your application's domain without having to even know about SCE.\n * It blocks loading templates from other domains or loading templates over http from an https\n * served document. You can change these by setting your own custom {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.\n *\n * This significantly reduces the overhead. It is far easier to pay the small overhead and have an\n * application that's secure and can be audited to verify that with much more ease than bolting\n * security onto an application later.\n *\n * \n * ### What trusted context types are supported?\n *\n * | Context | Notes |\n * |---------------------|----------------|\n * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |\n * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |\n * | `$sce.MEDIA_URL` | For URLs that are safe to render as media. Is automatically converted from string by sanitizing when needed. |\n * | `$sce.URL` | For URLs that are safe to follow as links. Is automatically converted from string by sanitizing when needed. Note that `$sce.URL` makes a stronger statement about the URL than `$sce.MEDIA_URL` does and therefore contexts requiring values trusted for `$sce.URL` can be used anywhere that values trusted for `$sce.MEDIA_URL` are required.|\n * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.)

Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` or `$sce.MEDIA_URL` do and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` or `$sce.MEDIA_URL` are required. |\n * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |\n *\n *\n *
\n * Be aware that, before AngularJS 1.7.0, `a[href]` and `img[src]` used to sanitize their\n * interpolated values directly rather than rely upon {@link ng.$sce#getTrusted `$sce.getTrusted`}.\n *\n * **As of 1.7.0, this is no longer the case.**\n *\n * Now such interpolations are marked as requiring `$sce.URL` (for `a[href]`) or `$sce.MEDIA_URL`\n * (for `img[src]`), so that the sanitization happens (via `$sce.getTrusted...`) when the `$interpolate`\n * service evaluates the expressions.\n *
\n *\n * There are no CSS or JS context bindings in AngularJS currently, so their corresponding `$sce.trustAs`\n * functions aren't useful yet. This might evolve.\n *\n * ### Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} \n *\n * Each element in these arrays must be one of the following:\n *\n * - **'self'**\n * - The special **string**, `'self'`, can be used to match against all URLs of the **same\n * domain** as the application document using the **same protocol**.\n * - **String** (except the special value `'self'`)\n * - The string is matched against the full *normalized / absolute URL* of the resource\n * being tested (substring matches are not good enough.)\n * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters\n * match themselves.\n * - `*`: matches zero or more occurrences of any character other than one of the following 6\n * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '`;`'. It's a useful wildcard for use\n * in a whitelist.\n * - `**`: matches zero or more occurrences of *any* character. As such, it's not\n * appropriate for use in a scheme, domain, etc. as it would match too much. (e.g.\n * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might\n * not have been the intention.) Its usage at the very end of the path is ok. (e.g.\n * http://foo.example.com/templates/**).\n * - **RegExp** (*see caveat below*)\n * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax\n * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to\n * accidentally introduce a bug when one updates a complex expression (imho, all regexes should\n * have good test coverage). For instance, the use of `.` in the regex is correct only in a\n * small number of cases. A `.` character in the regex used when matching the scheme or a\n * subdomain could be matched against a `:` or literal `.` that was likely not intended. It\n * is highly recommended to use the string patterns and only fall back to regular expressions\n * as a last resort.\n * - The regular expression must be an instance of RegExp (i.e. not a string.) It is\n * matched against the **entire** *normalized / absolute URL* of the resource being tested\n * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags\n * present on the RegExp (such as multiline, global, ignoreCase) are ignored.\n * - If you are generating your JavaScript from some other templating engine (not\n * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),\n * remember to escape your regular expression (and be aware that you might need more than\n * one level of escaping depending on your templating engine and the way you interpolated\n * the value.) Do make use of your platform's escaping mechanism as it might be good\n * enough before coding your own. E.g. Ruby has\n * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)\n * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).\n * Javascript lacks a similar built in function for escaping. Take a look at Google\n * Closure library's [goog.string.regExpEscape(s)](\n * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.\n *\n * ### Show me an example using SCE.\n *\n * \n * \n *
\n *

\n * User comments
\n * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when\n * $sanitize is available. If $sanitize isn't available, this results in an error instead of an\n * exploit.\n *
\n *
\n * {{userComment.name}}:\n * \n *
\n *
\n *
\n *
\n *
\n *\n * \n * angular.module('mySceApp', ['ngSanitize'])\n * .controller('AppController', ['$http', '$templateCache', '$sce',\n * function AppController($http, $templateCache, $sce) {\n * var self = this;\n * $http.get('test_data.json', {cache: $templateCache}).then(function(response) {\n * self.userComments = response.data;\n * });\n * self.explicitlyTrustedHtml = $sce.trustAsHtml(\n * 'Hover over this text.');\n * }]);\n * \n *\n * \n * [\n * { \"name\": \"Alice\",\n * \"htmlComment\":\n * \"Is anyone reading this?\"\n * },\n * { \"name\": \"Bob\",\n * \"htmlComment\": \"Yes! Am I the only other one?\"\n * }\n * ]\n * \n *\n * \n * describe('SCE doc demo', function() {\n * it('should sanitize untrusted values', function() {\n * expect(element.all(by.css('.htmlComment')).first().getAttribute('innerHTML'))\n * .toBe('Is anyone reading this?');\n * });\n *\n * it('should NOT sanitize explicitly trusted values', function() {\n * expect(element(by.id('explicitlyTrustedHtml')).getAttribute('innerHTML')).toBe(\n * 'Hover over this text.');\n * });\n * });\n * \n *
\n *\n *\n *\n * ## Can I disable SCE completely?\n *\n * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits\n * for little coding overhead. It will be much harder to take an SCE disabled application and\n * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE\n * for cases where you have a lot of existing code that was written before SCE was introduced and\n * you're migrating them a module at a time. Also do note that this is an app-wide setting, so if\n * you are writing a library, you will cause security bugs applications using it.\n *\n * That said, here's how you can completely disable SCE:\n *\n * ```\n * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {\n * // Completely disable SCE. For demonstration purposes only!\n * // Do not use in new projects or libraries.\n * $sceProvider.enabled(false);\n * });\n * ```\n *\n */\n\nfunction $SceProvider() {\n var enabled = true;\n\n /**\n * @ngdoc method\n * @name $sceProvider#enabled\n * @kind function\n *\n * @param {boolean=} value If provided, then enables/disables SCE application-wide.\n * @return {boolean} True if SCE is enabled, false otherwise.\n *\n * @description\n * Enables/disables SCE and returns the current value.\n */\n this.enabled = function(value) {\n if (arguments.length) {\n enabled = !!value;\n }\n return enabled;\n };\n\n\n /* Design notes on the default implementation for SCE.\n *\n * The API contract for the SCE delegate\n * -------------------------------------\n * The SCE delegate object must provide the following 3 methods:\n *\n * - trustAs(contextEnum, value)\n * This method is used to tell the SCE service that the provided value is OK to use in the\n * contexts specified by contextEnum. It must return an object that will be accepted by\n * getTrusted() for a compatible contextEnum and return this value.\n *\n * - valueOf(value)\n * For values that were not produced by trustAs(), return them as is. For values that were\n * produced by trustAs(), return the corresponding input value to trustAs. Basically, if\n * trustAs is wrapping the given values into some type, this operation unwraps it when given\n * such a value.\n *\n * - getTrusted(contextEnum, value)\n * This function should return the value that is safe to use in the context specified by\n * contextEnum or throw and exception otherwise.\n *\n * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be\n * opaque or wrapped in some holder object. That happens to be an implementation detail. For\n * instance, an implementation could maintain a registry of all trusted objects by context. In\n * such a case, trustAs() would return the same object that was passed in. getTrusted() would\n * return the same object passed in if it was found in the registry under a compatible context or\n * throw an exception otherwise. An implementation might only wrap values some of the time based\n * on some criteria. getTrusted() might return a value and not throw an exception for special\n * constants or objects even if not wrapped. All such implementations fulfill this contract.\n *\n *\n * A note on the inheritance model for SCE contexts\n * ------------------------------------------------\n * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This\n * is purely an implementation details.\n *\n * The contract is simply this:\n *\n * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)\n * will also succeed.\n *\n * Inheritance happens to capture this in a natural way. In some future, we may not use\n * inheritance anymore. That is OK because no code outside of sce.js and sceSpecs.js would need to\n * be aware of this detail.\n */\n\n this.$get = ['$parse', '$sceDelegate', function(\n $parse, $sceDelegate) {\n // Support: IE 9-11 only\n // Prereq: Ensure that we're not running in IE<11 quirks mode. In that mode, IE < 11 allow\n // the \"expression(javascript expression)\" syntax which is insecure.\n if (enabled && msie < 8) {\n throw $sceMinErr('iequirks',\n 'Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks ' +\n 'mode. You can fix this by adding the text to the top of your HTML ' +\n 'document. See http://docs.angularjs.org/api/ng.$sce for more information.');\n }\n\n var sce = shallowCopy(SCE_CONTEXTS);\n\n /**\n * @ngdoc method\n * @name $sce#isEnabled\n * @kind function\n *\n * @return {Boolean} True if SCE is enabled, false otherwise. If you want to set the value, you\n * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.\n *\n * @description\n * Returns a boolean indicating if SCE is enabled.\n */\n sce.isEnabled = function() {\n return enabled;\n };\n sce.trustAs = $sceDelegate.trustAs;\n sce.getTrusted = $sceDelegate.getTrusted;\n sce.valueOf = $sceDelegate.valueOf;\n\n if (!enabled) {\n sce.trustAs = sce.getTrusted = function(type, value) { return value; };\n sce.valueOf = identity;\n }\n\n /**\n * @ngdoc method\n * @name $sce#parseAs\n *\n * @description\n * Converts AngularJS {@link guide/expression expression} into a function. This is like {@link\n * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it\n * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,\n * *result*)}\n *\n * @param {string} type The SCE context in which this result will be used.\n * @param {string} expression String expression to compile.\n * @return {function(context, locals)} A function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the\n * strings are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values\n * in `context`.\n */\n sce.parseAs = function sceParseAs(type, expr) {\n var parsed = $parse(expr);\n if (parsed.literal && parsed.constant) {\n return parsed;\n } else {\n return $parse(expr, function(value) {\n return sce.getTrusted(type, value);\n });\n }\n };\n\n /**\n * @ngdoc method\n * @name $sce#trustAs\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such, returns a\n * wrapped object that represents your value, and the trust you have in its safety for the given\n * context. AngularJS can then use that value as-is in bindings of the specified secure context.\n * This is used in bindings for `ng-bind-html`, `ng-include`, and most `src` attribute\n * interpolations. See {@link ng.$sce $sce} for strict contextual escaping.\n *\n * @param {string} type The context in which this value is safe for use, e.g. `$sce.URL`,\n * `$sce.RESOURCE_URL`, `$sce.HTML`, `$sce.JS` or `$sce.CSS`.\n *\n * @param {*} value The value that that should be considered trusted.\n * @return {*} A wrapped version of value that can be used as a trusted variant of your `value`\n * in the context you specified.\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsHtml\n *\n * @description\n * Shorthand method. `$sce.trustAsHtml(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}\n *\n * @param {*} value The value to mark as trusted for `$sce.HTML` context.\n * @return {*} A wrapped version of value that can be used as a trusted variant of your `value`\n * in `$sce.HTML` context (like `ng-bind-html`).\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsCss\n *\n * @description\n * Shorthand method. `$sce.trustAsCss(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.CSS, value)`}\n *\n * @param {*} value The value to mark as trusted for `$sce.CSS` context.\n * @return {*} A wrapped version of value that can be used as a trusted variant\n * of your `value` in `$sce.CSS` context. This context is currently unused, so there are\n * almost no reasons to use this function so far.\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}\n *\n * @param {*} value The value to mark as trusted for `$sce.URL` context.\n * @return {*} A wrapped version of value that can be used as a trusted variant of your `value`\n * in `$sce.URL` context. That context is currently unused, so there are almost no reasons\n * to use this function so far.\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsResourceUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to mark as trusted for `$sce.RESOURCE_URL` context.\n * @return {*} A wrapped version of value that can be used as a trusted variant of your `value`\n * in `$sce.RESOURCE_URL` context (template URLs in `ng-include`, most `src` attribute\n * bindings, ...)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsJs\n *\n * @description\n * Shorthand method. `$sce.trustAsJs(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}\n *\n * @param {*} value The value to mark as trusted for `$sce.JS` context.\n * @return {*} A wrapped version of value that can be used as a trusted variant of your `value`\n * in `$sce.JS` context. That context is currently unused, so there are almost no reasons to\n * use this function so far.\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrusted\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such,\n * takes any input, and either returns a value that's safe to use in the specified context,\n * or throws an exception. This function is aware of trusted values created by the `trustAs`\n * function and its shorthands, and when contexts are appropriate, returns the unwrapped value\n * as-is. Finally, this function can also throw when there is no way to turn `maybeTrusted` in a\n * safe value (e.g., no sanitization is available or possible.)\n *\n * @param {string} type The context in which this value is to be used.\n * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs\n * `$sce.trustAs`} call, or anything else (which will not be considered trusted.)\n * @return {*} A version of the value that's safe to use in the given context, or throws an\n * exception if this is impossible.\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedHtml\n *\n * @description\n * Shorthand method. `$sce.getTrustedHtml(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @return {*} The return value of `$sce.getTrusted($sce.HTML, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedCss\n *\n * @description\n * Shorthand method. `$sce.getTrustedCss(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @return {*} The return value of `$sce.getTrusted($sce.CSS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @return {*} The return value of `$sce.getTrusted($sce.URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedResourceUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedResourceUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to pass to `$sceDelegate.getTrusted`.\n * @return {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedJs\n *\n * @description\n * Shorthand method. `$sce.getTrustedJs(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @return {*} The return value of `$sce.getTrusted($sce.JS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsHtml\n *\n * @description\n * Shorthand method. `$sce.parseAsHtml(expression string)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.HTML, value)`}\n *\n * @param {string} expression String expression to compile.\n * @return {function(context, locals)} A function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the\n * strings are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values\n * in `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsCss\n *\n * @description\n * Shorthand method. `$sce.parseAsCss(value)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.CSS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @return {function(context, locals)} A function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the\n * strings are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values\n * in `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsUrl(value)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @return {function(context, locals)} A function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the\n * strings are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values\n * in `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsResourceUrl(value)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.RESOURCE_URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @return {function(context, locals)} A function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the\n * strings are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values\n * in `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsJs\n *\n * @description\n * Shorthand method. `$sce.parseAsJs(value)` →\n * {@link ng.$sce#parseAs `$sce.parseAs($sce.JS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @return {function(context, locals)} A function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the\n * strings are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values\n * in `context`.\n */\n\n // Shorthand delegations.\n var parse = sce.parseAs,\n getTrusted = sce.getTrusted,\n trustAs = sce.trustAs;\n\n forEach(SCE_CONTEXTS, function(enumValue, name) {\n var lName = lowercase(name);\n sce[snakeToCamel('parse_as_' + lName)] = function(expr) {\n return parse(enumValue, expr);\n };\n sce[snakeToCamel('get_trusted_' + lName)] = function(value) {\n return getTrusted(enumValue, value);\n };\n sce[snakeToCamel('trust_as_' + lName)] = function(value) {\n return trustAs(enumValue, value);\n };\n });\n\n return sce;\n }];\n}\n\n/* exported $SnifferProvider */\n\n/**\n * !!! This is an undocumented \"private\" service !!!\n *\n * @name $sniffer\n * @requires $window\n * @requires $document\n * @this\n *\n * @property {boolean} history Does the browser support html5 history api ?\n * @property {boolean} transitions Does the browser support CSS transition events ?\n * @property {boolean} animations Does the browser support CSS animation events ?\n *\n * @description\n * This is very simple implementation of testing browser's features.\n */\nfunction $SnifferProvider() {\n this.$get = ['$window', '$document', function($window, $document) {\n var eventSupport = {},\n // Chrome Packaged Apps are not allowed to access `history.pushState`.\n // If not sandboxed, they can be detected by the presence of `chrome.app.runtime`\n // (see https://developer.chrome.com/apps/api_index). If sandboxed, they can be detected by\n // the presence of an extension runtime ID and the absence of other Chrome runtime APIs\n // (see https://developer.chrome.com/apps/manifest/sandbox).\n // (NW.js apps have access to Chrome APIs, but do support `history`.)\n isNw = $window.nw && $window.nw.process,\n isChromePackagedApp =\n !isNw &&\n $window.chrome &&\n ($window.chrome.app && $window.chrome.app.runtime ||\n !$window.chrome.app && $window.chrome.runtime && $window.chrome.runtime.id),\n hasHistoryPushState = !isChromePackagedApp && $window.history && $window.history.pushState,\n android =\n toInt((/android (\\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),\n boxee = /Boxee/i.test(($window.navigator || {}).userAgent),\n document = $document[0] || {},\n bodyStyle = document.body && document.body.style,\n transitions = false,\n animations = false;\n\n if (bodyStyle) {\n // Support: Android <5, Blackberry Browser 10, default Chrome in Android 4.4.x\n // Mentioned browsers need a -webkit- prefix for transitions & animations.\n transitions = !!('transition' in bodyStyle || 'webkitTransition' in bodyStyle);\n animations = !!('animation' in bodyStyle || 'webkitAnimation' in bodyStyle);\n }\n\n\n return {\n // Android has history.pushState, but it does not update location correctly\n // so let's not use the history API at all.\n // http://code.google.com/p/android/issues/detail?id=17471\n // https://github.com/angular/angular.js/issues/904\n\n // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has\n // so let's not use the history API also\n // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined\n history: !!(hasHistoryPushState && !(android < 4) && !boxee),\n hasEvent: function(event) {\n // Support: IE 9-11 only\n // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have\n // it. In particular the event is not fired when backspace or delete key are pressed or\n // when cut operation is performed.\n // IE10+ implements 'input' event but it erroneously fires under various situations,\n // e.g. when placeholder changes, or a form is focused.\n if (event === 'input' && msie) return false;\n\n if (isUndefined(eventSupport[event])) {\n var divElm = document.createElement('div');\n eventSupport[event] = 'on' + event in divElm;\n }\n\n return eventSupport[event];\n },\n csp: csp(),\n transitions: transitions,\n animations: animations,\n android: android\n };\n }];\n}\n\nvar $templateRequestMinErr = minErr('$templateRequest');\n\n/**\n * @ngdoc provider\n * @name $templateRequestProvider\n * @this\n *\n * @description\n * Used to configure the options passed to the {@link $http} service when making a template request.\n *\n * For example, it can be used for specifying the \"Accept\" header that is sent to the server, when\n * requesting a template.\n */\nfunction $TemplateRequestProvider() {\n\n var httpOptions;\n\n /**\n * @ngdoc method\n * @name $templateRequestProvider#httpOptions\n * @description\n * The options to be passed to the {@link $http} service when making the request.\n * You can use this to override options such as the \"Accept\" header for template requests.\n *\n * The {@link $templateRequest} will set the `cache` and the `transformResponse` properties of the\n * options if not overridden here.\n *\n * @param {string=} value new value for the {@link $http} options.\n * @returns {string|self} Returns the {@link $http} options when used as getter and self if used as setter.\n */\n this.httpOptions = function(val) {\n if (val) {\n httpOptions = val;\n return this;\n }\n return httpOptions;\n };\n\n /**\n * @ngdoc service\n * @name $templateRequest\n *\n * @description\n * The `$templateRequest` service runs security checks then downloads the provided template using\n * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request\n * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the\n * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the\n * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted\n * when `tpl` is of type string and `$templateCache` has the matching entry.\n *\n * If you want to pass custom options to the `$http` service, such as setting the Accept header you\n * can configure this via {@link $templateRequestProvider#httpOptions}.\n *\n * `$templateRequest` is used internally by {@link $compile}, {@link ngRoute.$route}, and directives such\n * as {@link ngInclude} to download and cache templates.\n *\n * 3rd party modules should use `$templateRequest` if their services or directives are loading\n * templates.\n *\n * @param {string|TrustedResourceUrl} tpl The HTTP request template URL\n * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty\n *\n * @return {Promise} a promise for the HTTP response data of the given URL.\n *\n * @property {number} totalPendingRequests total amount of pending template requests being downloaded.\n */\n this.$get = ['$exceptionHandler', '$templateCache', '$http', '$q', '$sce',\n function($exceptionHandler, $templateCache, $http, $q, $sce) {\n\n function handleRequestFn(tpl, ignoreRequestError) {\n handleRequestFn.totalPendingRequests++;\n\n // We consider the template cache holds only trusted templates, so\n // there's no need to go through whitelisting again for keys that already\n // are included in there. This also makes AngularJS accept any script\n // directive, no matter its name. However, we still need to unwrap trusted\n // types.\n if (!isString(tpl) || isUndefined($templateCache.get(tpl))) {\n tpl = $sce.getTrustedResourceUrl(tpl);\n }\n\n var transformResponse = $http.defaults && $http.defaults.transformResponse;\n\n if (isArray(transformResponse)) {\n transformResponse = transformResponse.filter(function(transformer) {\n return transformer !== defaultHttpResponseTransform;\n });\n } else if (transformResponse === defaultHttpResponseTransform) {\n transformResponse = null;\n }\n\n return $http.get(tpl, extend({\n cache: $templateCache,\n transformResponse: transformResponse\n }, httpOptions))\n .finally(function() {\n handleRequestFn.totalPendingRequests--;\n })\n .then(function(response) {\n return $templateCache.put(tpl, response.data);\n }, handleError);\n\n function handleError(resp) {\n if (!ignoreRequestError) {\n resp = $templateRequestMinErr('tpload',\n 'Failed to load template: {0} (HTTP status: {1} {2})',\n tpl, resp.status, resp.statusText);\n\n $exceptionHandler(resp);\n }\n\n return $q.reject(resp);\n }\n }\n\n handleRequestFn.totalPendingRequests = 0;\n\n return handleRequestFn;\n }\n ];\n}\n\n/** @this */\nfunction $$TestabilityProvider() {\n this.$get = ['$rootScope', '$browser', '$location',\n function($rootScope, $browser, $location) {\n\n /**\n * @name $testability\n *\n * @description\n * The private $$testability service provides a collection of methods for use when debugging\n * or by automated test and debugging tools.\n */\n var testability = {};\n\n /**\n * @name $$testability#findBindings\n *\n * @description\n * Returns an array of elements that are bound (via ng-bind or {{}})\n * to expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The binding expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression. Filters and whitespace are ignored.\n */\n testability.findBindings = function(element, expression, opt_exactMatch) {\n var bindings = element.getElementsByClassName('ng-binding');\n var matches = [];\n forEach(bindings, function(binding) {\n var dataBinding = angular.element(binding).data('$binding');\n if (dataBinding) {\n forEach(dataBinding, function(bindingName) {\n if (opt_exactMatch) {\n var matcher = new RegExp('(^|\\\\s)' + escapeForRegexp(expression) + '(\\\\s|\\\\||$)');\n if (matcher.test(bindingName)) {\n matches.push(binding);\n }\n } else {\n if (bindingName.indexOf(expression) !== -1) {\n matches.push(binding);\n }\n }\n });\n }\n });\n return matches;\n };\n\n /**\n * @name $$testability#findModels\n *\n * @description\n * Returns an array of elements that are two-way found via ng-model to\n * expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The model expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression.\n */\n testability.findModels = function(element, expression, opt_exactMatch) {\n var prefixes = ['ng-', 'data-ng-', 'ng\\\\:'];\n for (var p = 0; p < prefixes.length; ++p) {\n var attributeEquals = opt_exactMatch ? '=' : '*=';\n var selector = '[' + prefixes[p] + 'model' + attributeEquals + '\"' + expression + '\"]';\n var elements = element.querySelectorAll(selector);\n if (elements.length) {\n return elements;\n }\n }\n };\n\n /**\n * @name $$testability#getLocation\n *\n * @description\n * Shortcut for getting the location in a browser agnostic way. Returns\n * the path, search, and hash. (e.g. /path?a=b#hash)\n */\n testability.getLocation = function() {\n return $location.url();\n };\n\n /**\n * @name $$testability#setLocation\n *\n * @description\n * Shortcut for navigating to a location without doing a full page reload.\n *\n * @param {string} url The location url (path, search and hash,\n * e.g. /path?a=b#hash) to go to.\n */\n testability.setLocation = function(url) {\n if (url !== $location.url()) {\n $location.url(url);\n $rootScope.$digest();\n }\n };\n\n /**\n * @name $$testability#whenStable\n *\n * @description\n * Calls the callback when $timeout and $http requests are completed.\n *\n * @param {function} callback\n */\n testability.whenStable = function(callback) {\n $browser.notifyWhenNoOutstandingRequests(callback);\n };\n\n return testability;\n }];\n}\n\nvar $timeoutMinErr = minErr('$timeout');\n\n/** @this */\nfunction $TimeoutProvider() {\n this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',\n function($rootScope, $browser, $q, $$q, $exceptionHandler) {\n\n var deferreds = {};\n\n\n /**\n * @ngdoc service\n * @name $timeout\n *\n * @description\n * AngularJS's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch\n * block and delegates any exceptions to\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * The return value of calling `$timeout` is a promise, which will be resolved when\n * the delay has passed and the timeout function, if provided, is executed.\n *\n * To cancel a timeout request, call `$timeout.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to\n * synchronously flush the queue of deferred functions.\n *\n * If you only want a promise that will be resolved after some specified delay\n * then you can call `$timeout` without the `fn` function.\n *\n * @param {function()=} fn A function, whose execution should be delayed.\n * @param {number=} [delay=0] Delay in milliseconds.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @param {...*=} Pass additional parameters to the executed function.\n * @returns {Promise} Promise that will be resolved when the timeout is reached. The promise\n * will be resolved with the return value of the `fn` function.\n *\n */\n function timeout(fn, delay, invokeApply) {\n if (!isFunction(fn)) {\n invokeApply = delay;\n delay = fn;\n fn = noop;\n }\n\n var args = sliceArgs(arguments, 3),\n skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise,\n timeoutId;\n\n timeoutId = $browser.defer(function() {\n try {\n deferred.resolve(fn.apply(null, args));\n } catch (e) {\n deferred.reject(e);\n $exceptionHandler(e);\n } finally {\n delete deferreds[promise.$$timeoutId];\n }\n\n if (!skipApply) $rootScope.$apply();\n }, delay);\n\n promise.$$timeoutId = timeoutId;\n deferreds[timeoutId] = deferred;\n\n return promise;\n }\n\n\n /**\n * @ngdoc method\n * @name $timeout#cancel\n *\n * @description\n * Cancels a task associated with the `promise`. As a result of this, the promise will be\n * resolved with a rejection.\n *\n * @param {Promise=} promise Promise returned by the `$timeout` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n timeout.cancel = function(promise) {\n if (!promise) return false;\n\n if (!promise.hasOwnProperty('$$timeoutId')) {\n throw $timeoutMinErr('badprom',\n '`$timeout.cancel()` called with a promise that was not generated by `$timeout()`.');\n }\n\n if (!deferreds.hasOwnProperty(promise.$$timeoutId)) return false;\n\n var id = promise.$$timeoutId;\n var deferred = deferreds[id];\n\n // Timeout cancels should not report an unhandled promise.\n markQExceptionHandled(deferred.promise);\n deferred.reject('canceled');\n delete deferreds[id];\n\n return $browser.defer.cancel(id);\n };\n\n return timeout;\n }];\n}\n\n// NOTE: The usage of window and document instead of $window and $document here is\n// deliberate. This service depends on the specific behavior of anchor nodes created by the\n// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and\n// cause us to break tests. In addition, when the browser resolves a URL for XHR, it\n// doesn't know about mocked locations and resolves URLs to the real document - which is\n// exactly the behavior needed here. There is little value is mocking these out for this\n// service.\nvar urlParsingNode = window.document.createElement('a');\nvar originUrl = urlResolve(window.location.href);\nvar baseUrlParsingNode;\n\n\n/**\n *\n * Implementation Notes for non-IE browsers\n * ----------------------------------------\n * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,\n * results both in the normalizing and parsing of the URL. Normalizing means that a relative\n * URL will be resolved into an absolute URL in the context of the application document.\n * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related\n * properties are all populated to reflect the normalized URL. This approach has wide\n * compatibility - Safari 1+, Mozilla 1+ etc. See\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *\n * Implementation Notes for IE\n * ---------------------------\n * IE <= 10 normalizes the URL when assigned to the anchor node similar to the other\n * browsers. However, the parsed components will not be set if the URL assigned did not specify\n * them. (e.g. if you assign a.href = \"foo\", then a.protocol, a.host, etc. will be empty.) We\n * work around that by performing the parsing in a 2nd step by taking a previously normalized\n * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the\n * properties such as protocol, hostname, port, etc.\n *\n * References:\n * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n * http://url.spec.whatwg.org/#urlutils\n * https://github.com/angular/angular.js/pull/2902\n * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/\n *\n * @kind function\n * @param {string|object} url The URL to be parsed. If `url` is not a string, it will be returned\n * unchanged.\n * @description Normalizes and parses a URL.\n * @returns {object} Returns the normalized URL as a dictionary.\n *\n * | member name | Description |\n * |---------------|------------------------------------------------------------------------|\n * | href | A normalized version of the provided URL if it was not an absolute URL |\n * | protocol | The protocol without the trailing colon |\n * | host | The host and port (if the port is non-default) of the normalizedUrl |\n * | search | The search params, minus the question mark |\n * | hash | The hash string, minus the hash symbol |\n * | hostname | The hostname |\n * | port | The port, without \":\" |\n * | pathname | The pathname, beginning with \"/\" |\n *\n */\nfunction urlResolve(url) {\n if (!isString(url)) return url;\n\n var href = url;\n\n // Support: IE 9-11 only\n if (msie) {\n // Normalize before parse. Refer Implementation Notes on why this is\n // done in two steps on IE.\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/')\n ? urlParsingNode.pathname\n : '/' + urlParsingNode.pathname\n };\n}\n\n/**\n * Parse a request URL and determine whether this is a same-origin request as the application\n * document.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the request is for the same origin as the application document.\n */\nfunction urlIsSameOrigin(requestUrl) {\n return urlsAreSameOrigin(requestUrl, originUrl);\n}\n\n/**\n * Parse a request URL and determine whether it is same-origin as the current document base URL.\n *\n * Note: The base URL is usually the same as the document location (`location.href`) but can\n * be overriden by using the `` tag.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the URL is same-origin as the document base URL.\n */\nfunction urlIsSameOriginAsBaseUrl(requestUrl) {\n return urlsAreSameOrigin(requestUrl, getBaseUrl());\n}\n\n/**\n * Create a function that can check a URL's origin against a list of allowed/whitelisted origins.\n * The current location's origin is implicitly trusted.\n *\n * @param {string[]} whitelistedOriginUrls - A list of URLs (strings), whose origins are trusted.\n *\n * @returns {Function} - A function that receives a URL (string or parsed URL object) and returns\n * whether it is of an allowed origin.\n */\nfunction urlIsAllowedOriginFactory(whitelistedOriginUrls) {\n var parsedAllowedOriginUrls = [originUrl].concat(whitelistedOriginUrls.map(urlResolve));\n\n /**\n * Check whether the specified URL (string or parsed URL object) has an origin that is allowed\n * based on a list of whitelisted-origin URLs. The current location's origin is implicitly\n * trusted.\n *\n * @param {string|Object} requestUrl - The URL to be checked (provided as a string that will be\n * resolved or a parsed URL object).\n *\n * @returns {boolean} - Whether the specified URL is of an allowed origin.\n */\n return function urlIsAllowedOrigin(requestUrl) {\n var parsedUrl = urlResolve(requestUrl);\n return parsedAllowedOriginUrls.some(urlsAreSameOrigin.bind(null, parsedUrl));\n };\n}\n\n/**\n * Determine if two URLs share the same origin.\n *\n * @param {string|Object} url1 - First URL to compare as a string or a normalized URL in the form of\n * a dictionary object returned by `urlResolve()`.\n * @param {string|object} url2 - Second URL to compare as a string or a normalized URL in the form\n * of a dictionary object returned by `urlResolve()`.\n *\n * @returns {boolean} - True if both URLs have the same origin, and false otherwise.\n */\nfunction urlsAreSameOrigin(url1, url2) {\n url1 = urlResolve(url1);\n url2 = urlResolve(url2);\n\n return (url1.protocol === url2.protocol &&\n url1.host === url2.host);\n}\n\n/**\n * Returns the current document base URL.\n * @returns {string}\n */\nfunction getBaseUrl() {\n if (window.document.baseURI) {\n return window.document.baseURI;\n }\n\n // `document.baseURI` is available everywhere except IE\n if (!baseUrlParsingNode) {\n baseUrlParsingNode = window.document.createElement('a');\n baseUrlParsingNode.href = '.';\n\n // Work-around for IE bug described in Implementation Notes. The fix in `urlResolve()` is not\n // suitable here because we need to track changes to the base URL.\n baseUrlParsingNode = baseUrlParsingNode.cloneNode(false);\n }\n return baseUrlParsingNode.href;\n}\n\n/**\n * @ngdoc service\n * @name $window\n * @this\n *\n * @description\n * A reference to the browser's `window` object. While `window`\n * is globally available in JavaScript, it causes testability problems, because\n * it is a global variable. In AngularJS we always refer to it through the\n * `$window` service, so it may be overridden, removed or mocked for testing.\n *\n * Expressions, like the one defined for the `ngClick` directive in the example\n * below, are evaluated with respect to the current scope. Therefore, there is\n * no risk of inadvertently coding in a dependency on a global value in such an\n * expression.\n *\n * @example\n \n \n \n
\n \n \n
\n
\n \n it('should display the greeting in the input box', function() {\n element(by.model('greeting')).sendKeys('Hello, E2E Tests');\n // If we click the button it will block the test runner\n // element(':button').click();\n });\n \n
\n */\nfunction $WindowProvider() {\n this.$get = valueFn(window);\n}\n\n/**\n * @name $$cookieReader\n * @requires $document\n *\n * @description\n * This is a private service for reading cookies used by $http and ngCookies\n *\n * @return {Object} a key/value map of the current cookies\n */\nfunction $$CookieReader($document) {\n var rawDocument = $document[0] || {};\n var lastCookies = {};\n var lastCookieString = '';\n\n function safeGetCookie(rawDocument) {\n try {\n return rawDocument.cookie || '';\n } catch (e) {\n return '';\n }\n }\n\n function safeDecodeURIComponent(str) {\n try {\n return decodeURIComponent(str);\n } catch (e) {\n return str;\n }\n }\n\n return function() {\n var cookieArray, cookie, i, index, name;\n var currentCookieString = safeGetCookie(rawDocument);\n\n if (currentCookieString !== lastCookieString) {\n lastCookieString = currentCookieString;\n cookieArray = lastCookieString.split('; ');\n lastCookies = {};\n\n for (i = 0; i < cookieArray.length; i++) {\n cookie = cookieArray[i];\n index = cookie.indexOf('=');\n if (index > 0) { //ignore nameless cookies\n name = safeDecodeURIComponent(cookie.substring(0, index));\n // the first value that is seen for a cookie is the most\n // specific one. values for the same cookie name that\n // follow are for less specific paths.\n if (isUndefined(lastCookies[name])) {\n lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1));\n }\n }\n }\n }\n return lastCookies;\n };\n}\n\n$$CookieReader.$inject = ['$document'];\n\n/** @this */\nfunction $$CookieReaderProvider() {\n this.$get = $$CookieReader;\n}\n\n/* global currencyFilter: true,\n dateFilter: true,\n filterFilter: true,\n jsonFilter: true,\n limitToFilter: true,\n lowercaseFilter: true,\n numberFilter: true,\n orderByFilter: true,\n uppercaseFilter: true,\n */\n\n/**\n * @ngdoc provider\n * @name $filterProvider\n * @description\n *\n * Filters are just functions which transform input to an output. However filters need to be\n * Dependency Injected. To achieve this a filter definition consists of a factory function which is\n * annotated with dependencies and is responsible for creating a filter function.\n *\n *
\n * **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`.\n * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n * (`myapp_subsection_filterx`).\n *
\n *\n * ```js\n * // Filter registration\n * function MyModule($provide, $filterProvider) {\n * // create a service to demonstrate injection (not always needed)\n * $provide.value('greet', function(name){\n * return 'Hello ' + name + '!';\n * });\n *\n * // register a filter factory which uses the\n * // greet service to demonstrate DI.\n * $filterProvider.register('greet', function(greet){\n * // return the filter function which uses the greet service\n * // to generate salutation\n * return function(text) {\n * // filters need to be forgiving so check input validity\n * return text && greet(text) || text;\n * };\n * });\n * }\n * ```\n *\n * The filter function is registered with the `$injector` under the filter name suffix with\n * `Filter`.\n *\n * ```js\n * it('should be the same instance', inject(\n * function($filterProvider) {\n * $filterProvider.register('reverse', function(){\n * return ...;\n * });\n * },\n * function($filter, reverseFilter) {\n * expect($filter('reverse')).toBe(reverseFilter);\n * });\n * ```\n *\n *\n * For more information about how AngularJS filters work, and how to create your own filters, see\n * {@link guide/filter Filters} in the AngularJS Developer Guide.\n */\n\n/**\n * @ngdoc service\n * @name $filter\n * @kind function\n * @description\n * Filters are used for formatting data displayed to the user.\n *\n * They can be used in view templates, controllers or services. AngularJS comes\n * with a collection of [built-in filters](api/ng/filter), but it is easy to\n * define your own as well.\n *\n * The general syntax in templates is as follows:\n *\n * ```html\n * {{ expression [| filter_name[:parameter_value] ... ] }}\n * ```\n *\n * @param {String} name Name of the filter function to retrieve\n * @return {Function} the filter function\n * @example\n \n \n
\n

{{ originalText }}

\n

{{ filteredText }}

\n
\n
\n\n \n angular.module('filterExample', [])\n .controller('MainCtrl', function($scope, $filter) {\n $scope.originalText = 'hello';\n $scope.filteredText = $filter('uppercase')($scope.originalText);\n });\n \n
\n */\n$FilterProvider.$inject = ['$provide'];\n/** @this */\nfunction $FilterProvider($provide) {\n var suffix = 'Filter';\n\n /**\n * @ngdoc method\n * @name $filterProvider#register\n * @param {string|Object} name Name of the filter function, or an object map of filters where\n * the keys are the filter names and the values are the filter factories.\n *\n *
\n * **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`.\n * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace\n * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores\n * (`myapp_subsection_filterx`).\n *
\n * @param {Function} factory If the first argument was a string, a factory function for the filter to be registered.\n * @returns {Object} Registered filter instance, or if a map of filters was provided then a map\n * of the registered filter instances.\n */\n function register(name, factory) {\n if (isObject(name)) {\n var filters = {};\n forEach(name, function(filter, key) {\n filters[key] = register(key, filter);\n });\n return filters;\n } else {\n return $provide.factory(name + suffix, factory);\n }\n }\n this.register = register;\n\n this.$get = ['$injector', function($injector) {\n return function(name) {\n return $injector.get(name + suffix);\n };\n }];\n\n ////////////////////////////////////////\n\n /* global\n currencyFilter: false,\n dateFilter: false,\n filterFilter: false,\n jsonFilter: false,\n limitToFilter: false,\n lowercaseFilter: false,\n numberFilter: false,\n orderByFilter: false,\n uppercaseFilter: false\n */\n\n register('currency', currencyFilter);\n register('date', dateFilter);\n register('filter', filterFilter);\n register('json', jsonFilter);\n register('limitTo', limitToFilter);\n register('lowercase', lowercaseFilter);\n register('number', numberFilter);\n register('orderBy', orderByFilter);\n register('uppercase', uppercaseFilter);\n}\n\n/**\n * @ngdoc filter\n * @name filter\n * @kind function\n *\n * @description\n * Selects a subset of items from `array` and returns it as a new array.\n *\n * @param {Array} array The source array.\n *
\n * **Note**: If the array contains objects that reference themselves, filtering is not possible.\n *
\n * @param {string|Object|function()} expression The predicate to be used for selecting items from\n * `array`.\n *\n * Can be one of:\n *\n * - `string`: The string is used for matching against the contents of the `array`. All strings or\n * objects with string properties in `array` that match this string will be returned. This also\n * applies to nested object properties.\n * The predicate can be negated by prefixing the string with `!`.\n *\n * - `Object`: A pattern object can be used to filter specific properties on objects contained\n * by `array`. For example `{name:\"M\", phone:\"1\"}` predicate will return an array of items\n * which have property `name` containing \"M\" and property `phone` containing \"1\". A special\n * property name (`$` by default) can be used (e.g. as in `{$: \"text\"}`) to accept a match\n * against any property of the object or its nested object properties. That's equivalent to the\n * simple substring match with a `string` as described above. The special property name can be\n * overwritten, using the `anyPropertyKey` parameter.\n * The predicate can be negated by prefixing the string with `!`.\n * For example `{name: \"!M\"}` predicate will return an array of items which have property `name`\n * not containing \"M\".\n *\n * Note that a named property will match properties on the same level only, while the special\n * `$` property will match properties on the same level or deeper. E.g. an array item like\n * `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but\n * **will** be matched by `{$: 'John'}`.\n *\n * - `function(value, index, array)`: A predicate function can be used to write arbitrary filters.\n * The function is called for each element of the array, with the element, its index, and\n * the entire array itself as arguments.\n *\n * The final result is an array of those elements that the predicate returned true for.\n *\n * @param {function(actual, expected)|true|false} [comparator] Comparator which is used in\n * determining if values retrieved using `expression` (when it is not a function) should be\n * considered a match based on the expected value (from the filter expression) and actual\n * value (from the object in the array).\n *\n * Can be one of:\n *\n * - `function(actual, expected)`:\n * The function will be given the object value and the predicate value to compare and\n * should return true if both values should be considered equal.\n *\n * - `true`: A shorthand for `function(actual, expected) { return angular.equals(actual, expected)}`.\n * This is essentially strict comparison of expected and actual.\n *\n * - `false`: A short hand for a function which will look for a substring match in a case\n * insensitive way. Primitive values are converted to strings. Objects are not compared against\n * primitives, unless they have a custom `toString` method (e.g. `Date` objects).\n *\n *\n * Defaults to `false`.\n *\n * @param {string} [anyPropertyKey] The special property name that matches against any property.\n * By default `$`.\n *\n * @example\n \n \n
\n\n \n \n \n \n \n \n \n
NamePhone
{{friend.name}}{{friend.phone}}
\n
\n
\n
\n
\n
\n \n \n \n \n \n \n
NamePhone
{{friendObj.name}}{{friendObj.phone}}
\n
\n \n var expectFriendNames = function(expectedNames, key) {\n element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {\n arr.forEach(function(wd, i) {\n expect(wd.getText()).toMatch(expectedNames[i]);\n });\n });\n };\n\n it('should search across all fields when filtering with a string', function() {\n var searchText = element(by.model('searchText'));\n searchText.clear();\n searchText.sendKeys('m');\n expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');\n\n searchText.clear();\n searchText.sendKeys('76');\n expectFriendNames(['John', 'Julie'], 'friend');\n });\n\n it('should search in specific fields when filtering with a predicate object', function() {\n var searchAny = element(by.model('search.$'));\n searchAny.clear();\n searchAny.sendKeys('i');\n expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');\n });\n it('should use a equal comparison when comparator is true', function() {\n var searchName = element(by.model('search.name'));\n var strict = element(by.model('strict'));\n searchName.clear();\n searchName.sendKeys('Julie');\n strict.click();\n expectFriendNames(['Julie'], 'friendObj');\n });\n \n
\n */\n\nfunction filterFilter() {\n return function(array, expression, comparator, anyPropertyKey) {\n if (!isArrayLike(array)) {\n if (array == null) {\n return array;\n } else {\n throw minErr('filter')('notarray', 'Expected array but received: {0}', array);\n }\n }\n\n anyPropertyKey = anyPropertyKey || '$';\n var expressionType = getTypeForFilter(expression);\n var predicateFn;\n var matchAgainstAnyProp;\n\n switch (expressionType) {\n case 'function':\n predicateFn = expression;\n break;\n case 'boolean':\n case 'null':\n case 'number':\n case 'string':\n matchAgainstAnyProp = true;\n // falls through\n case 'object':\n predicateFn = createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp);\n break;\n default:\n return array;\n }\n\n return Array.prototype.filter.call(array, predicateFn);\n };\n}\n\n// Helper functions for `filterFilter`\nfunction createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp) {\n var shouldMatchPrimitives = isObject(expression) && (anyPropertyKey in expression);\n var predicateFn;\n\n if (comparator === true) {\n comparator = equals;\n } else if (!isFunction(comparator)) {\n comparator = function(actual, expected) {\n if (isUndefined(actual)) {\n // No substring matching against `undefined`\n return false;\n }\n if ((actual === null) || (expected === null)) {\n // No substring matching against `null`; only match against `null`\n return actual === expected;\n }\n if (isObject(expected) || (isObject(actual) && !hasCustomToString(actual))) {\n // Should not compare primitives against objects, unless they have custom `toString` method\n return false;\n }\n\n actual = lowercase('' + actual);\n expected = lowercase('' + expected);\n return actual.indexOf(expected) !== -1;\n };\n }\n\n predicateFn = function(item) {\n if (shouldMatchPrimitives && !isObject(item)) {\n return deepCompare(item, expression[anyPropertyKey], comparator, anyPropertyKey, false);\n }\n return deepCompare(item, expression, comparator, anyPropertyKey, matchAgainstAnyProp);\n };\n\n return predicateFn;\n}\n\nfunction deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstAnyProp, dontMatchWholeObject) {\n var actualType = getTypeForFilter(actual);\n var expectedType = getTypeForFilter(expected);\n\n if ((expectedType === 'string') && (expected.charAt(0) === '!')) {\n return !deepCompare(actual, expected.substring(1), comparator, anyPropertyKey, matchAgainstAnyProp);\n } else if (isArray(actual)) {\n // In case `actual` is an array, consider it a match\n // if ANY of it's items matches `expected`\n return actual.some(function(item) {\n return deepCompare(item, expected, comparator, anyPropertyKey, matchAgainstAnyProp);\n });\n }\n\n switch (actualType) {\n case 'object':\n var key;\n if (matchAgainstAnyProp) {\n for (key in actual) {\n // Under certain, rare, circumstances, key may not be a string and `charAt` will be undefined\n // See: https://github.com/angular/angular.js/issues/15644\n if (key.charAt && (key.charAt(0) !== '$') &&\n deepCompare(actual[key], expected, comparator, anyPropertyKey, true)) {\n return true;\n }\n }\n return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, anyPropertyKey, false);\n } else if (expectedType === 'object') {\n for (key in expected) {\n var expectedVal = expected[key];\n if (isFunction(expectedVal) || isUndefined(expectedVal)) {\n continue;\n }\n\n var matchAnyProperty = key === anyPropertyKey;\n var actualVal = matchAnyProperty ? actual : actual[key];\n if (!deepCompare(actualVal, expectedVal, comparator, anyPropertyKey, matchAnyProperty, matchAnyProperty)) {\n return false;\n }\n }\n return true;\n } else {\n return comparator(actual, expected);\n }\n case 'function':\n return false;\n default:\n return comparator(actual, expected);\n }\n}\n\n// Used for easily differentiating between `null` and actual `object`\nfunction getTypeForFilter(val) {\n return (val === null) ? 'null' : typeof val;\n}\n\nvar MAX_DIGITS = 22;\nvar DECIMAL_SEP = '.';\nvar ZERO_CHAR = '0';\n\n/**\n * @ngdoc filter\n * @name currency\n * @kind function\n *\n * @description\n * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default\n * symbol for current locale is used.\n *\n * @param {number} amount Input to filter.\n * @param {string=} symbol Currency symbol or identifier to be displayed.\n * @param {number=} fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale\n * @returns {string} Formatted number.\n *\n *\n * @example\n \n \n \n
\n
\n default currency symbol ($): {{amount | currency}}
\n custom currency identifier (USD$): {{amount | currency:\"USD$\"}}
\n no fractions (0): {{amount | currency:\"USD$\":0}}\n
\n
\n \n it('should init with 1234.56', function() {\n expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');\n expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56');\n expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235');\n });\n it('should update', function() {\n if (browser.params.browser === 'safari') {\n // Safari does not understand the minus key. See\n // https://github.com/angular/protractor/issues/481\n return;\n }\n element(by.model('amount')).clear();\n element(by.model('amount')).sendKeys('-1234');\n expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00');\n expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00');\n expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234');\n });\n \n
\n */\ncurrencyFilter.$inject = ['$locale'];\nfunction currencyFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(amount, currencySymbol, fractionSize) {\n if (isUndefined(currencySymbol)) {\n currencySymbol = formats.CURRENCY_SYM;\n }\n\n if (isUndefined(fractionSize)) {\n fractionSize = formats.PATTERNS[1].maxFrac;\n }\n\n // If the currency symbol is empty, trim whitespace around the symbol\n var currencySymbolRe = !currencySymbol ? /\\s*\\u00A4\\s*/g : /\\u00A4/g;\n\n // if null or undefined pass it through\n return (amount == null)\n ? amount\n : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, fractionSize).\n replace(currencySymbolRe, currencySymbol);\n };\n}\n\n/**\n * @ngdoc filter\n * @name number\n * @kind function\n *\n * @description\n * Formats a number as text.\n *\n * If the input is null or undefined, it will just be returned.\n * If the input is infinite (Infinity or -Infinity), the Infinity symbol '∞' or '-∞' is returned, respectively.\n * If the input is not a number an empty string is returned.\n *\n *\n * @param {number|string} number Number to format.\n * @param {(number|string)=} fractionSize Number of decimal places to round the number to.\n * If this is not provided then the fraction size is computed from the current locale's number\n * formatting pattern. In the case of the default locale, it will be 3.\n * @returns {string} Number rounded to `fractionSize` appropriately formatted based on the current\n * locale (e.g., in the en_US locale it will have \".\" as the decimal separator and\n * include \",\" group separators after each third digit).\n *\n * @example\n \n \n \n
\n
\n Default formatting: {{val | number}}
\n No fractions: {{val | number:0}}
\n Negative number: {{-val | number:4}}\n
\n
\n \n it('should format numbers', function() {\n expect(element(by.id('number-default')).getText()).toBe('1,234.568');\n expect(element(by.binding('val | number:0')).getText()).toBe('1,235');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');\n });\n\n it('should update', function() {\n element(by.model('val')).clear();\n element(by.model('val')).sendKeys('3374.333');\n expect(element(by.id('number-default')).getText()).toBe('3,374.333');\n expect(element(by.binding('val | number:0')).getText()).toBe('3,374');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');\n });\n \n
\n */\nnumberFilter.$inject = ['$locale'];\nfunction numberFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(number, fractionSize) {\n\n // if null or undefined pass it through\n return (number == null)\n ? number\n : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,\n fractionSize);\n };\n}\n\n/**\n * Parse a number (as a string) into three components that can be used\n * for formatting the number.\n *\n * (Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/)\n *\n * @param {string} numStr The number to parse\n * @return {object} An object describing this number, containing the following keys:\n * - d : an array of digits containing leading zeros as necessary\n * - i : the number of the digits in `d` that are to the left of the decimal point\n * - e : the exponent for numbers that would need more than `MAX_DIGITS` digits in `d`\n *\n */\nfunction parse(numStr) {\n var exponent = 0, digits, numberOfIntegerDigits;\n var i, j, zeros;\n\n // Decimal point?\n if ((numberOfIntegerDigits = numStr.indexOf(DECIMAL_SEP)) > -1) {\n numStr = numStr.replace(DECIMAL_SEP, '');\n }\n\n // Exponential form?\n if ((i = numStr.search(/e/i)) > 0) {\n // Work out the exponent.\n if (numberOfIntegerDigits < 0) numberOfIntegerDigits = i;\n numberOfIntegerDigits += +numStr.slice(i + 1);\n numStr = numStr.substring(0, i);\n } else if (numberOfIntegerDigits < 0) {\n // There was no decimal point or exponent so it is an integer.\n numberOfIntegerDigits = numStr.length;\n }\n\n // Count the number of leading zeros.\n for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */ }\n\n if (i === (zeros = numStr.length)) {\n // The digits are all zero.\n digits = [0];\n numberOfIntegerDigits = 1;\n } else {\n // Count the number of trailing zeros\n zeros--;\n while (numStr.charAt(zeros) === ZERO_CHAR) zeros--;\n\n // Trailing zeros are insignificant so ignore them\n numberOfIntegerDigits -= i;\n digits = [];\n // Convert string to array of digits without leading/trailing zeros.\n for (j = 0; i <= zeros; i++, j++) {\n digits[j] = +numStr.charAt(i);\n }\n }\n\n // If the number overflows the maximum allowed digits then use an exponent.\n if (numberOfIntegerDigits > MAX_DIGITS) {\n digits = digits.splice(0, MAX_DIGITS - 1);\n exponent = numberOfIntegerDigits - 1;\n numberOfIntegerDigits = 1;\n }\n\n return { d: digits, e: exponent, i: numberOfIntegerDigits };\n}\n\n/**\n * Round the parsed number to the specified number of decimal places\n * This function changed the parsedNumber in-place\n */\nfunction roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) {\n var digits = parsedNumber.d;\n var fractionLen = digits.length - parsedNumber.i;\n\n // determine fractionSize if it is not specified; `+fractionSize` converts it to a number\n fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(minFrac, fractionLen), maxFrac) : +fractionSize;\n\n // The index of the digit to where rounding is to occur\n var roundAt = fractionSize + parsedNumber.i;\n var digit = digits[roundAt];\n\n if (roundAt > 0) {\n // Drop fractional digits beyond `roundAt`\n digits.splice(Math.max(parsedNumber.i, roundAt));\n\n // Set non-fractional digits beyond `roundAt` to 0\n for (var j = roundAt; j < digits.length; j++) {\n digits[j] = 0;\n }\n } else {\n // We rounded to zero so reset the parsedNumber\n fractionLen = Math.max(0, fractionLen);\n parsedNumber.i = 1;\n digits.length = Math.max(1, roundAt = fractionSize + 1);\n digits[0] = 0;\n for (var i = 1; i < roundAt; i++) digits[i] = 0;\n }\n\n if (digit >= 5) {\n if (roundAt - 1 < 0) {\n for (var k = 0; k > roundAt; k--) {\n digits.unshift(0);\n parsedNumber.i++;\n }\n digits.unshift(1);\n parsedNumber.i++;\n } else {\n digits[roundAt - 1]++;\n }\n }\n\n // Pad out with zeros to get the required fraction length\n for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0);\n\n\n // Do any carrying, e.g. a digit was rounded up to 10\n var carry = digits.reduceRight(function(carry, d, i, digits) {\n d = d + carry;\n digits[i] = d % 10;\n return Math.floor(d / 10);\n }, 0);\n if (carry) {\n digits.unshift(carry);\n parsedNumber.i++;\n }\n}\n\n/**\n * Format a number into a string\n * @param {number} number The number to format\n * @param {{\n * minFrac, // the minimum number of digits required in the fraction part of the number\n * maxFrac, // the maximum number of digits required in the fraction part of the number\n * gSize, // number of digits in each group of separated digits\n * lgSize, // number of digits in the last group of digits before the decimal separator\n * negPre, // the string to go in front of a negative number (e.g. `-` or `(`))\n * posPre, // the string to go in front of a positive number\n * negSuf, // the string to go after a negative number (e.g. `)`)\n * posSuf // the string to go after a positive number\n * }} pattern\n * @param {string} groupSep The string to separate groups of number (e.g. `,`)\n * @param {string} decimalSep The string to act as the decimal separator (e.g. `.`)\n * @param {[type]} fractionSize The size of the fractional part of the number\n * @return {string} The number formatted as a string\n */\nfunction formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {\n\n if (!(isString(number) || isNumber(number)) || isNaN(number)) return '';\n\n var isInfinity = !isFinite(number);\n var isZero = false;\n var numStr = Math.abs(number) + '',\n formattedText = '',\n parsedNumber;\n\n if (isInfinity) {\n formattedText = '\\u221e';\n } else {\n parsedNumber = parse(numStr);\n\n roundNumber(parsedNumber, fractionSize, pattern.minFrac, pattern.maxFrac);\n\n var digits = parsedNumber.d;\n var integerLen = parsedNumber.i;\n var exponent = parsedNumber.e;\n var decimals = [];\n isZero = digits.reduce(function(isZero, d) { return isZero && !d; }, true);\n\n // pad zeros for small numbers\n while (integerLen < 0) {\n digits.unshift(0);\n integerLen++;\n }\n\n // extract decimals digits\n if (integerLen > 0) {\n decimals = digits.splice(integerLen, digits.length);\n } else {\n decimals = digits;\n digits = [0];\n }\n\n // format the integer digits with grouping separators\n var groups = [];\n if (digits.length >= pattern.lgSize) {\n groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));\n }\n while (digits.length > pattern.gSize) {\n groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));\n }\n if (digits.length) {\n groups.unshift(digits.join(''));\n }\n formattedText = groups.join(groupSep);\n\n // append the decimal digits\n if (decimals.length) {\n formattedText += decimalSep + decimals.join('');\n }\n\n if (exponent) {\n formattedText += 'e+' + exponent;\n }\n }\n if (number < 0 && !isZero) {\n return pattern.negPre + formattedText + pattern.negSuf;\n } else {\n return pattern.posPre + formattedText + pattern.posSuf;\n }\n}\n\nfunction padNumber(num, digits, trim, negWrap) {\n var neg = '';\n if (num < 0 || (negWrap && num <= 0)) {\n if (negWrap) {\n num = -num + 1;\n } else {\n num = -num;\n neg = '-';\n }\n }\n num = '' + num;\n while (num.length < digits) num = ZERO_CHAR + num;\n if (trim) {\n num = num.substr(num.length - digits);\n }\n return neg + num;\n}\n\n\nfunction dateGetter(name, size, offset, trim, negWrap) {\n offset = offset || 0;\n return function(date) {\n var value = date['get' + name]();\n if (offset > 0 || value > -offset) {\n value += offset;\n }\n if (value === 0 && offset === -12) value = 12;\n return padNumber(value, size, trim, negWrap);\n };\n}\n\nfunction dateStrGetter(name, shortForm, standAlone) {\n return function(date, formats) {\n var value = date['get' + name]();\n var propPrefix = (standAlone ? 'STANDALONE' : '') + (shortForm ? 'SHORT' : '');\n var get = uppercase(propPrefix + name);\n\n return formats[get][value];\n };\n}\n\nfunction timeZoneGetter(date, formats, offset) {\n var zone = -1 * offset;\n var paddedZone = (zone >= 0) ? '+' : '';\n\n paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +\n padNumber(Math.abs(zone % 60), 2);\n\n return paddedZone;\n}\n\nfunction getFirstThursdayOfYear(year) {\n // 0 = index of January\n var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay();\n // 4 = index of Thursday (+1 to account for 1st = 5)\n // 11 = index of *next* Thursday (+1 account for 1st = 12)\n return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst);\n}\n\nfunction getThursdayThisWeek(datetime) {\n return new Date(datetime.getFullYear(), datetime.getMonth(),\n // 4 = index of Thursday\n datetime.getDate() + (4 - datetime.getDay()));\n}\n\nfunction weekGetter(size) {\n return function(date) {\n var firstThurs = getFirstThursdayOfYear(date.getFullYear()),\n thisThurs = getThursdayThisWeek(date);\n\n var diff = +thisThurs - +firstThurs,\n result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n\n return padNumber(result, size);\n };\n}\n\nfunction ampmGetter(date, formats) {\n return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];\n}\n\nfunction eraGetter(date, formats) {\n return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1];\n}\n\nfunction longEraGetter(date, formats) {\n return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1];\n}\n\nvar DATE_FORMATS = {\n yyyy: dateGetter('FullYear', 4, 0, false, true),\n yy: dateGetter('FullYear', 2, 0, true, true),\n y: dateGetter('FullYear', 1, 0, false, true),\n MMMM: dateStrGetter('Month'),\n MMM: dateStrGetter('Month', true),\n MM: dateGetter('Month', 2, 1),\n M: dateGetter('Month', 1, 1),\n LLLL: dateStrGetter('Month', false, true),\n dd: dateGetter('Date', 2),\n d: dateGetter('Date', 1),\n HH: dateGetter('Hours', 2),\n H: dateGetter('Hours', 1),\n hh: dateGetter('Hours', 2, -12),\n h: dateGetter('Hours', 1, -12),\n mm: dateGetter('Minutes', 2),\n m: dateGetter('Minutes', 1),\n ss: dateGetter('Seconds', 2),\n s: dateGetter('Seconds', 1),\n // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions\n sss: dateGetter('Milliseconds', 3),\n EEEE: dateStrGetter('Day'),\n EEE: dateStrGetter('Day', true),\n a: ampmGetter,\n Z: timeZoneGetter,\n ww: weekGetter(2),\n w: weekGetter(1),\n G: eraGetter,\n GG: eraGetter,\n GGG: eraGetter,\n GGGG: longEraGetter\n};\n\nvar DATE_FORMATS_SPLIT = /((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\\s\\S]*)/,\n NUMBER_STRING = /^-?\\d+$/;\n\n/**\n * @ngdoc filter\n * @name date\n * @kind function\n *\n * @description\n * Formats `date` to a string based on the requested `format`.\n *\n * `format` string can be composed of the following elements:\n *\n * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)\n * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)\n * * `'MMMM'`: Month in year (January-December)\n * * `'MMM'`: Month in year (Jan-Dec)\n * * `'MM'`: Month in year, padded (01-12)\n * * `'M'`: Month in year (1-12)\n * * `'LLLL'`: Stand-alone month in year (January-December)\n * * `'dd'`: Day in month, padded (01-31)\n * * `'d'`: Day in month (1-31)\n * * `'EEEE'`: Day in Week,(Sunday-Saturday)\n * * `'EEE'`: Day in Week, (Sun-Sat)\n * * `'HH'`: Hour in day, padded (00-23)\n * * `'H'`: Hour in day (0-23)\n * * `'hh'`: Hour in AM/PM, padded (01-12)\n * * `'h'`: Hour in AM/PM, (1-12)\n * * `'mm'`: Minute in hour, padded (00-59)\n * * `'m'`: Minute in hour (0-59)\n * * `'ss'`: Second in minute, padded (00-59)\n * * `'s'`: Second in minute (0-59)\n * * `'sss'`: Millisecond in second, padded (000-999)\n * * `'a'`: AM/PM marker\n * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n * * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year\n * * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year\n * * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD')\n * * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini')\n *\n * `format` string can also be one of the following predefined\n * {@link guide/i18n localizable formats}:\n *\n * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale\n * (e.g. Sep 3, 2010 12:05:08 PM)\n * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM)\n * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale\n * (e.g. Friday, September 3, 2010)\n * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)\n * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)\n * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)\n * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM)\n * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM)\n *\n * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.\n * `\"h 'in the morning'\"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence\n * (e.g. `\"h 'o''clock'\"`).\n *\n * Any other characters in the `format` string will be output as-is.\n *\n * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or\n * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its\n * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is\n * specified in the string input, the time is considered to be in the local timezone.\n * @param {string=} format Formatting rules (see Description). If not specified,\n * `mediumDate` is used.\n * @param {string=} timezone Timezone to be used for formatting. It understands UTC/GMT and the\n * continental US time zone abbreviations, but for general use, use a time zone offset, for\n * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)\n * If not specified, the timezone of the browser will be used.\n * @returns {string} Formatted string or the input if input is not recognized as date/millis.\n *\n * @example\n \n \n {{1288323623006 | date:'medium'}}:\n {{1288323623006 | date:'medium'}}
\n {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}:\n {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
\n {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}:\n {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
\n {{1288323623006 | date:\"MM/dd/yyyy 'at' h:mma\"}}:\n {{'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"}}
\n
\n \n it('should format date', function() {\n expect(element(by.binding(\"1288323623006 | date:'medium'\")).getText()).\n toMatch(/Oct 2\\d, 2010 \\d{1,2}:\\d{2}:\\d{2} (AM|PM)/);\n expect(element(by.binding(\"1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'\")).getText()).\n toMatch(/2010-10-2\\d \\d{2}:\\d{2}:\\d{2} (-|\\+)?\\d{4}/);\n expect(element(by.binding(\"'1288323623006' | date:'MM/dd/yyyy @ h:mma'\")).getText()).\n toMatch(/10\\/2\\d\\/2010 @ \\d{1,2}:\\d{2}(AM|PM)/);\n expect(element(by.binding(\"'1288323623006' | date:\\\"MM/dd/yyyy 'at' h:mma\\\"\")).getText()).\n toMatch(/10\\/2\\d\\/2010 at \\d{1,2}:\\d{2}(AM|PM)/);\n });\n \n
\n */\ndateFilter.$inject = ['$locale'];\nfunction dateFilter($locale) {\n\n\n var R_ISO8601_STR = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n // 1 2 3 4 5 6 7 8 9 10 11\n function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }\n\n\n return function(date, format, timezone) {\n var text = '',\n parts = [],\n fn, match;\n\n format = format || 'mediumDate';\n format = $locale.DATETIME_FORMATS[format] || format;\n if (isString(date)) {\n date = NUMBER_STRING.test(date) ? toInt(date) : jsonStringToDate(date);\n }\n\n if (isNumber(date)) {\n date = new Date(date);\n }\n\n if (!isDate(date) || !isFinite(date.getTime())) {\n return date;\n }\n\n while (format) {\n match = DATE_FORMATS_SPLIT.exec(format);\n if (match) {\n parts = concat(parts, match, 1);\n format = parts.pop();\n } else {\n parts.push(format);\n format = null;\n }\n }\n\n var dateTimezoneOffset = date.getTimezoneOffset();\n if (timezone) {\n dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n date = convertTimezoneToLocal(date, timezone, true);\n }\n forEach(parts, function(value) {\n fn = DATE_FORMATS[value];\n text += fn ? fn(date, $locale.DATETIME_FORMATS, dateTimezoneOffset)\n : value === '\\'\\'' ? '\\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\\'');\n });\n\n return text;\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name json\n * @kind function\n *\n * @description\n * Allows you to convert a JavaScript object into JSON string.\n *\n * This filter is mostly useful for debugging. When using the double curly {{value}} notation\n * the binding is automatically converted to JSON.\n *\n * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.\n * @param {number=} spacing The number of spaces to use per indentation, defaults to 2.\n * @returns {string} JSON string.\n *\n *\n * @example\n \n \n
{{ {'name':'value'} | json }}
\n
{{ {'name':'value'} | json:4 }}
\n
\n \n it('should jsonify filtered objects', function() {\n expect(element(by.id('default-spacing')).getText()).toMatch(/\\{\\n {2}\"name\": ?\"value\"\\n}/);\n expect(element(by.id('custom-spacing')).getText()).toMatch(/\\{\\n {4}\"name\": ?\"value\"\\n}/);\n });\n \n
\n *\n */\nfunction jsonFilter() {\n return function(object, spacing) {\n if (isUndefined(spacing)) {\n spacing = 2;\n }\n return toJson(object, spacing);\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name lowercase\n * @kind function\n * @description\n * Converts string to lowercase.\n *\n * See the {@link ng.uppercase uppercase filter documentation} for a functionally identical example.\n *\n * @see angular.lowercase\n */\nvar lowercaseFilter = valueFn(lowercase);\n\n\n/**\n * @ngdoc filter\n * @name uppercase\n * @kind function\n * @description\n * Converts string to uppercase.\n * @example\n \n \n \n
\n \n

{{title}}

\n \n

{{title | uppercase}}

\n
\n
\n
\n */\nvar uppercaseFilter = valueFn(uppercase);\n\n/**\n * @ngdoc filter\n * @name limitTo\n * @kind function\n *\n * @description\n * Creates a new array or string containing only a specified number of elements. The elements are\n * taken from either the beginning or the end of the source array, string or number, as specified by\n * the value and sign (positive or negative) of `limit`. Other array-like objects are also supported\n * (e.g. array subclasses, NodeLists, jqLite/jQuery collections etc). If a number is used as input,\n * it is converted to a string.\n *\n * @param {Array|ArrayLike|string|number} input - Array/array-like, string or number to be limited.\n * @param {string|number} limit - The length of the returned array or string. If the `limit` number\n * is positive, `limit` number of items from the beginning of the source array/string are copied.\n * If the number is negative, `limit` number of items from the end of the source array/string\n * are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined,\n * the input will be returned unchanged.\n * @param {(string|number)=} begin - Index at which to begin limitation. As a negative index,\n * `begin` indicates an offset from the end of `input`. Defaults to `0`.\n * @returns {Array|string} A new sub-array or substring of length `limit` or less if the input had\n * less than `limit` elements.\n *\n * @example\n \n \n \n
\n \n

Output numbers: {{ numbers | limitTo:numLimit }}

\n \n

Output letters: {{ letters | limitTo:letterLimit }}

\n \n

Output long number: {{ longNumber | limitTo:longNumberLimit }}

\n
\n
\n \n var numLimitInput = element(by.model('numLimit'));\n var letterLimitInput = element(by.model('letterLimit'));\n var longNumberLimitInput = element(by.model('longNumberLimit'));\n var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));\n var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));\n var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));\n\n it('should limit the number array to first three items', function() {\n expect(numLimitInput.getAttribute('value')).toBe('3');\n expect(letterLimitInput.getAttribute('value')).toBe('3');\n expect(longNumberLimitInput.getAttribute('value')).toBe('3');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');\n expect(limitedLetters.getText()).toEqual('Output letters: abc');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 234');\n });\n\n // There is a bug in safari and protractor that doesn't like the minus key\n // it('should update the output when -3 is entered', function() {\n // numLimitInput.clear();\n // numLimitInput.sendKeys('-3');\n // letterLimitInput.clear();\n // letterLimitInput.sendKeys('-3');\n // longNumberLimitInput.clear();\n // longNumberLimitInput.sendKeys('-3');\n // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');\n // expect(limitedLetters.getText()).toEqual('Output letters: ghi');\n // expect(limitedLongNumber.getText()).toEqual('Output long number: 342');\n // });\n\n it('should not exceed the maximum size of input array', function() {\n numLimitInput.clear();\n numLimitInput.sendKeys('100');\n letterLimitInput.clear();\n letterLimitInput.sendKeys('100');\n longNumberLimitInput.clear();\n longNumberLimitInput.sendKeys('100');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');\n expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');\n });\n \n
\n*/\nfunction limitToFilter() {\n return function(input, limit, begin) {\n if (Math.abs(Number(limit)) === Infinity) {\n limit = Number(limit);\n } else {\n limit = toInt(limit);\n }\n if (isNumberNaN(limit)) return input;\n\n if (isNumber(input)) input = input.toString();\n if (!isArrayLike(input)) return input;\n\n begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);\n begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;\n\n if (limit >= 0) {\n return sliceFn(input, begin, begin + limit);\n } else {\n if (begin === 0) {\n return sliceFn(input, limit, input.length);\n } else {\n return sliceFn(input, Math.max(0, begin + limit), begin);\n }\n }\n };\n}\n\nfunction sliceFn(input, begin, end) {\n if (isString(input)) return input.slice(begin, end);\n\n return slice.call(input, begin, end);\n}\n\n/**\n * @ngdoc filter\n * @name orderBy\n * @kind function\n *\n * @description\n * Returns an array containing the items from the specified `collection`, ordered by a `comparator`\n * function based on the values computed using the `expression` predicate.\n *\n * For example, `[{id: 'foo'}, {id: 'bar'}] | orderBy:'id'` would result in\n * `[{id: 'bar'}, {id: 'foo'}]`.\n *\n * The `collection` can be an Array or array-like object (e.g. NodeList, jQuery object, TypedArray,\n * String, etc).\n *\n * The `expression` can be a single predicate, or a list of predicates each serving as a tie-breaker\n * for the preceding one. The `expression` is evaluated against each item and the output is used\n * for comparing with other items.\n *\n * You can change the sorting order by setting `reverse` to `true`. By default, items are sorted in\n * ascending order.\n *\n * The comparison is done using the `comparator` function. If none is specified, a default, built-in\n * comparator is used (see below for details - in a nutshell, it compares numbers numerically and\n * strings alphabetically).\n *\n * ### Under the hood\n *\n * Ordering the specified `collection` happens in two phases:\n *\n * 1. All items are passed through the predicate (or predicates), and the returned values are saved\n * along with their type (`string`, `number` etc). For example, an item `{label: 'foo'}`, passed\n * through a predicate that extracts the value of the `label` property, would be transformed to:\n * ```\n * {\n * value: 'foo',\n * type: 'string',\n * index: ...\n * }\n * ```\n * **Note:** `null` values use `'null'` as their type.\n * 2. The comparator function is used to sort the items, based on the derived values, types and\n * indices.\n *\n * If you use a custom comparator, it will be called with pairs of objects of the form\n * `{value: ..., type: '...', index: ...}` and is expected to return `0` if the objects are equal\n * (as far as the comparator is concerned), `-1` if the 1st one should be ranked higher than the\n * second, or `1` otherwise.\n *\n * In order to ensure that the sorting will be deterministic across platforms, if none of the\n * specified predicates can distinguish between two items, `orderBy` will automatically introduce a\n * dummy predicate that returns the item's index as `value`.\n * (If you are using a custom comparator, make sure it can handle this predicate as well.)\n *\n * If a custom comparator still can't distinguish between two items, then they will be sorted based\n * on their index using the built-in comparator.\n *\n * Finally, in an attempt to simplify things, if a predicate returns an object as the extracted\n * value for an item, `orderBy` will try to convert that object to a primitive value, before passing\n * it to the comparator. The following rules govern the conversion:\n *\n * 1. If the object has a `valueOf()` method that returns a primitive, its return value will be\n * used instead.
\n * (If the object has a `valueOf()` method that returns another object, then the returned object\n * will be used in subsequent steps.)\n * 2. If the object has a custom `toString()` method (i.e. not the one inherited from `Object`) that\n * returns a primitive, its return value will be used instead.
\n * (If the object has a `toString()` method that returns another object, then the returned object\n * will be used in subsequent steps.)\n * 3. No conversion; the object itself is used.\n *\n * ### The default comparator\n *\n * The default, built-in comparator should be sufficient for most usecases. In short, it compares\n * numbers numerically, strings alphabetically (and case-insensitively), for objects falls back to\n * using their index in the original collection, sorts values of different types by type and puts\n * `undefined` and `null` values at the end of the sorted list.\n *\n * More specifically, it follows these steps to determine the relative order of items:\n *\n * 1. If the compared values are of different types:\n * - If one of the values is undefined, consider it \"greater than\" the other.\n * - Else if one of the values is null, consider it \"greater than\" the other.\n * - Else compare the types themselves alphabetically.\n * 2. If both values are of type `string`, compare them alphabetically in a case- and\n * locale-insensitive way.\n * 3. If both values are objects, compare their indices instead.\n * 4. Otherwise, return:\n * - `0`, if the values are equal (by strict equality comparison, i.e. using `===`).\n * - `-1`, if the 1st value is \"less than\" the 2nd value (compared using the `<` operator).\n * - `1`, otherwise.\n *\n * **Note:** If you notice numbers not being sorted as expected, make sure they are actually being\n * saved as numbers and not strings.\n * **Note:** For the purpose of sorting, `null` and `undefined` are considered \"greater than\"\n * any other value (with undefined \"greater than\" null). This effectively means that `null`\n * and `undefined` values end up at the end of a list sorted in ascending order.\n * **Note:** `null` values use `'null'` as their type to be able to distinguish them from objects.\n *\n * @param {Array|ArrayLike} collection - The collection (array or array-like object) to sort.\n * @param {(Function|string|Array.)=} expression - A predicate (or list of\n * predicates) to be used by the comparator to determine the order of elements.\n *\n * Can be one of:\n *\n * - `Function`: A getter function. This function will be called with each item as argument and\n * the return value will be used for sorting.\n * - `string`: An AngularJS expression. This expression will be evaluated against each item and the\n * result will be used for sorting. For example, use `'label'` to sort by a property called\n * `label` or `'label.substring(0, 3)'` to sort by the first 3 characters of the `label`\n * property.
\n * (The result of a constant expression is interpreted as a property name to be used for\n * comparison. For example, use `'\"special name\"'` (note the extra pair of quotes) to sort by a\n * property called `special name`.)
\n * An expression can be optionally prefixed with `+` or `-` to control the sorting direction,\n * ascending or descending. For example, `'+label'` or `'-label'`. If no property is provided,\n * (e.g. `'+'` or `'-'`), the collection element itself is used in comparisons.\n * - `Array`: An array of function and/or string predicates. If a predicate cannot determine the\n * relative order of two items, the next predicate is used as a tie-breaker.\n *\n * **Note:** If the predicate is missing or empty then it defaults to `'+'`.\n *\n * @param {boolean=} reverse - If `true`, reverse the sorting order.\n * @param {(Function)=} comparator - The comparator function used to determine the relative order of\n * value pairs. If omitted, the built-in comparator will be used.\n *\n * @returns {Array} - The sorted array.\n *\n *\n * @example\n * ### Ordering a table with `ngRepeat`\n *\n * The example below demonstrates a simple {@link ngRepeat ngRepeat}, where the data is sorted by\n * age in descending order (expression is set to `'-age'`). The `comparator` is not set, which means\n * it defaults to the built-in comparator.\n *\n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n
NamePhone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
\n
\n
\n \n angular.module('orderByExample1', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.friends = [\n {name: 'John', phone: '555-1212', age: 10},\n {name: 'Mary', phone: '555-9876', age: 19},\n {name: 'Mike', phone: '555-4321', age: 21},\n {name: 'Adam', phone: '555-5678', age: 35},\n {name: 'Julie', phone: '555-8765', age: 29}\n ];\n }]);\n \n \n .friends {\n border-collapse: collapse;\n }\n\n .friends th {\n border-bottom: 1px solid;\n }\n .friends td, .friends th {\n border-left: 1px solid;\n padding: 5px 10px;\n }\n .friends td:first-child, .friends th:first-child {\n border-left: none;\n }\n \n \n // Element locators\n var names = element.all(by.repeater('friends').column('friend.name'));\n\n it('should sort friends by age in reverse order', function() {\n expect(names.get(0).getText()).toBe('Adam');\n expect(names.get(1).getText()).toBe('Julie');\n expect(names.get(2).getText()).toBe('Mike');\n expect(names.get(3).getText()).toBe('Mary');\n expect(names.get(4).getText()).toBe('John');\n });\n \n
\n *
\n *\n * @example\n * ### Changing parameters dynamically\n *\n * All parameters can be changed dynamically. The next example shows how you can make the columns of\n * a table sortable, by binding the `expression` and `reverse` parameters to scope properties.\n *\n \n \n
\n
Sort by = {{propertyName}}; reverse = {{reverse}}
\n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n
{{friend.name}}{{friend.phone}}{{friend.age}}
\n
\n
\n \n angular.module('orderByExample2', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var friends = [\n {name: 'John', phone: '555-1212', age: 10},\n {name: 'Mary', phone: '555-9876', age: 19},\n {name: 'Mike', phone: '555-4321', age: 21},\n {name: 'Adam', phone: '555-5678', age: 35},\n {name: 'Julie', phone: '555-8765', age: 29}\n ];\n\n $scope.propertyName = 'age';\n $scope.reverse = true;\n $scope.friends = friends;\n\n $scope.sortBy = function(propertyName) {\n $scope.reverse = ($scope.propertyName === propertyName) ? !$scope.reverse : false;\n $scope.propertyName = propertyName;\n };\n }]);\n \n \n .friends {\n border-collapse: collapse;\n }\n\n .friends th {\n border-bottom: 1px solid;\n }\n .friends td, .friends th {\n border-left: 1px solid;\n padding: 5px 10px;\n }\n .friends td:first-child, .friends th:first-child {\n border-left: none;\n }\n\n .sortorder:after {\n content: '\\25b2'; // BLACK UP-POINTING TRIANGLE\n }\n .sortorder.reverse:after {\n content: '\\25bc'; // BLACK DOWN-POINTING TRIANGLE\n }\n \n \n // Element locators\n var unsortButton = element(by.partialButtonText('unsorted'));\n var nameHeader = element(by.partialButtonText('Name'));\n var phoneHeader = element(by.partialButtonText('Phone'));\n var ageHeader = element(by.partialButtonText('Age'));\n var firstName = element(by.repeater('friends').column('friend.name').row(0));\n var lastName = element(by.repeater('friends').column('friend.name').row(4));\n\n it('should sort friends by some property, when clicking on the column header', function() {\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n\n phoneHeader.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Mary');\n\n nameHeader.click();\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('Mike');\n\n ageHeader.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Adam');\n });\n\n it('should sort friends in reverse order, when clicking on the same column', function() {\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n\n ageHeader.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Adam');\n\n ageHeader.click();\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n });\n\n it('should restore the original order, when clicking \"Set to unsorted\"', function() {\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n\n unsortButton.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Julie');\n });\n \n
\n *
\n *\n * @example\n * ### Using `orderBy` inside a controller\n *\n * It is also possible to call the `orderBy` filter manually, by injecting `orderByFilter`, and\n * calling it with the desired parameters. (Alternatively, you could inject the `$filter` factory\n * and retrieve the `orderBy` filter with `$filter('orderBy')`.)\n *\n \n \n
\n
Sort by = {{propertyName}}; reverse = {{reverse}}
\n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n
{{friend.name}}{{friend.phone}}{{friend.age}}
\n
\n
\n \n angular.module('orderByExample3', [])\n .controller('ExampleController', ['$scope', 'orderByFilter', function($scope, orderBy) {\n var friends = [\n {name: 'John', phone: '555-1212', age: 10},\n {name: 'Mary', phone: '555-9876', age: 19},\n {name: 'Mike', phone: '555-4321', age: 21},\n {name: 'Adam', phone: '555-5678', age: 35},\n {name: 'Julie', phone: '555-8765', age: 29}\n ];\n\n $scope.propertyName = 'age';\n $scope.reverse = true;\n $scope.friends = orderBy(friends, $scope.propertyName, $scope.reverse);\n\n $scope.sortBy = function(propertyName) {\n $scope.reverse = (propertyName !== null && $scope.propertyName === propertyName)\n ? !$scope.reverse : false;\n $scope.propertyName = propertyName;\n $scope.friends = orderBy(friends, $scope.propertyName, $scope.reverse);\n };\n }]);\n \n \n .friends {\n border-collapse: collapse;\n }\n\n .friends th {\n border-bottom: 1px solid;\n }\n .friends td, .friends th {\n border-left: 1px solid;\n padding: 5px 10px;\n }\n .friends td:first-child, .friends th:first-child {\n border-left: none;\n }\n\n .sortorder:after {\n content: '\\25b2'; // BLACK UP-POINTING TRIANGLE\n }\n .sortorder.reverse:after {\n content: '\\25bc'; // BLACK DOWN-POINTING TRIANGLE\n }\n \n \n // Element locators\n var unsortButton = element(by.partialButtonText('unsorted'));\n var nameHeader = element(by.partialButtonText('Name'));\n var phoneHeader = element(by.partialButtonText('Phone'));\n var ageHeader = element(by.partialButtonText('Age'));\n var firstName = element(by.repeater('friends').column('friend.name').row(0));\n var lastName = element(by.repeater('friends').column('friend.name').row(4));\n\n it('should sort friends by some property, when clicking on the column header', function() {\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n\n phoneHeader.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Mary');\n\n nameHeader.click();\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('Mike');\n\n ageHeader.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Adam');\n });\n\n it('should sort friends in reverse order, when clicking on the same column', function() {\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n\n ageHeader.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Adam');\n\n ageHeader.click();\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n });\n\n it('should restore the original order, when clicking \"Set to unsorted\"', function() {\n expect(firstName.getText()).toBe('Adam');\n expect(lastName.getText()).toBe('John');\n\n unsortButton.click();\n expect(firstName.getText()).toBe('John');\n expect(lastName.getText()).toBe('Julie');\n });\n \n
\n *
\n *\n * @example\n * ### Using a custom comparator\n *\n * If you have very specific requirements about the way items are sorted, you can pass your own\n * comparator function. For example, you might need to compare some strings in a locale-sensitive\n * way. (When specifying a custom comparator, you also need to pass a value for the `reverse`\n * argument - passing `false` retains the default sorting order, i.e. ascending.)\n *\n \n \n
\n
\n

Locale-sensitive Comparator

\n \n \n \n \n \n \n \n \n \n
NameFavorite Letter
{{friend.name}}{{friend.favoriteLetter}}
\n
\n
\n

Default Comparator

\n \n \n \n \n \n \n \n \n \n
NameFavorite Letter
{{friend.name}}{{friend.favoriteLetter}}
\n
\n
\n
\n \n angular.module('orderByExample4', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.friends = [\n {name: 'John', favoriteLetter: 'Ä'},\n {name: 'Mary', favoriteLetter: 'Ü'},\n {name: 'Mike', favoriteLetter: 'Ö'},\n {name: 'Adam', favoriteLetter: 'H'},\n {name: 'Julie', favoriteLetter: 'Z'}\n ];\n\n $scope.localeSensitiveComparator = function(v1, v2) {\n // If we don't get strings, just compare by index\n if (v1.type !== 'string' || v2.type !== 'string') {\n return (v1.index < v2.index) ? -1 : 1;\n }\n\n // Compare strings alphabetically, taking locale into account\n return v1.value.localeCompare(v2.value);\n };\n }]);\n \n \n .friends-container {\n display: inline-block;\n margin: 0 30px;\n }\n\n .friends {\n border-collapse: collapse;\n }\n\n .friends th {\n border-bottom: 1px solid;\n }\n .friends td, .friends th {\n border-left: 1px solid;\n padding: 5px 10px;\n }\n .friends td:first-child, .friends th:first-child {\n border-left: none;\n }\n \n \n // Element locators\n var container = element(by.css('.custom-comparator'));\n var names = container.all(by.repeater('friends').column('friend.name'));\n\n it('should sort friends by favorite letter (in correct alphabetical order)', function() {\n expect(names.get(0).getText()).toBe('John');\n expect(names.get(1).getText()).toBe('Adam');\n expect(names.get(2).getText()).toBe('Mike');\n expect(names.get(3).getText()).toBe('Mary');\n expect(names.get(4).getText()).toBe('Julie');\n });\n \n
\n *\n */\norderByFilter.$inject = ['$parse'];\nfunction orderByFilter($parse) {\n return function(array, sortPredicate, reverseOrder, compareFn) {\n\n if (array == null) return array;\n if (!isArrayLike(array)) {\n throw minErr('orderBy')('notarray', 'Expected array but received: {0}', array);\n }\n\n if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; }\n if (sortPredicate.length === 0) { sortPredicate = ['+']; }\n\n var predicates = processPredicates(sortPredicate);\n\n var descending = reverseOrder ? -1 : 1;\n\n // Define the `compare()` function. Use a default comparator if none is specified.\n var compare = isFunction(compareFn) ? compareFn : defaultCompare;\n\n // The next three lines are a version of a Swartzian Transform idiom from Perl\n // (sometimes called the Decorate-Sort-Undecorate idiom)\n // See https://en.wikipedia.org/wiki/Schwartzian_transform\n var compareValues = Array.prototype.map.call(array, getComparisonObject);\n compareValues.sort(doComparison);\n array = compareValues.map(function(item) { return item.value; });\n\n return array;\n\n function getComparisonObject(value, index) {\n // NOTE: We are adding an extra `tieBreaker` value based on the element's index.\n // This will be used to keep the sort stable when none of the input predicates can\n // distinguish between two elements.\n return {\n value: value,\n tieBreaker: {value: index, type: 'number', index: index},\n predicateValues: predicates.map(function(predicate) {\n return getPredicateValue(predicate.get(value), index);\n })\n };\n }\n\n function doComparison(v1, v2) {\n for (var i = 0, ii = predicates.length; i < ii; i++) {\n var result = compare(v1.predicateValues[i], v2.predicateValues[i]);\n if (result) {\n return result * predicates[i].descending * descending;\n }\n }\n\n return (compare(v1.tieBreaker, v2.tieBreaker) || defaultCompare(v1.tieBreaker, v2.tieBreaker)) * descending;\n }\n };\n\n function processPredicates(sortPredicates) {\n return sortPredicates.map(function(predicate) {\n var descending = 1, get = identity;\n\n if (isFunction(predicate)) {\n get = predicate;\n } else if (isString(predicate)) {\n if ((predicate.charAt(0) === '+' || predicate.charAt(0) === '-')) {\n descending = predicate.charAt(0) === '-' ? -1 : 1;\n predicate = predicate.substring(1);\n }\n if (predicate !== '') {\n get = $parse(predicate);\n if (get.constant) {\n var key = get();\n get = function(value) { return value[key]; };\n }\n }\n }\n return {get: get, descending: descending};\n });\n }\n\n function isPrimitive(value) {\n switch (typeof value) {\n case 'number': /* falls through */\n case 'boolean': /* falls through */\n case 'string':\n return true;\n default:\n return false;\n }\n }\n\n function objectValue(value) {\n // If `valueOf` is a valid function use that\n if (isFunction(value.valueOf)) {\n value = value.valueOf();\n if (isPrimitive(value)) return value;\n }\n // If `toString` is a valid function and not the one from `Object.prototype` use that\n if (hasCustomToString(value)) {\n value = value.toString();\n if (isPrimitive(value)) return value;\n }\n\n return value;\n }\n\n function getPredicateValue(value, index) {\n var type = typeof value;\n if (value === null) {\n type = 'null';\n } else if (type === 'object') {\n value = objectValue(value);\n }\n return {value: value, type: type, index: index};\n }\n\n function defaultCompare(v1, v2) {\n var result = 0;\n var type1 = v1.type;\n var type2 = v2.type;\n\n if (type1 === type2) {\n var value1 = v1.value;\n var value2 = v2.value;\n\n if (type1 === 'string') {\n // Compare strings case-insensitively\n value1 = value1.toLowerCase();\n value2 = value2.toLowerCase();\n } else if (type1 === 'object') {\n // For basic objects, use the position of the object\n // in the collection instead of the value\n if (isObject(value1)) value1 = v1.index;\n if (isObject(value2)) value2 = v2.index;\n }\n\n if (value1 !== value2) {\n result = value1 < value2 ? -1 : 1;\n }\n } else {\n result = (type1 === 'undefined') ? 1 :\n (type2 === 'undefined') ? -1 :\n (type1 === 'null') ? 1 :\n (type2 === 'null') ? -1 :\n (type1 < type2) ? -1 : 1;\n }\n\n return result;\n }\n}\n\nfunction ngDirective(directive) {\n if (isFunction(directive)) {\n directive = {\n link: directive\n };\n }\n directive.restrict = directive.restrict || 'AC';\n return valueFn(directive);\n}\n\n/**\n * @ngdoc directive\n * @name a\n * @restrict E\n *\n * @description\n * Modifies the default behavior of the html a tag so that the default action is prevented when\n * the href attribute is empty.\n *\n * For dynamically creating `href` attributes for a tags, see the {@link ng.ngHref `ngHref`} directive.\n */\nvar htmlAnchorDirective = valueFn({\n restrict: 'E',\n compile: function(element, attr) {\n if (!attr.href && !attr.xlinkHref) {\n return function(scope, element) {\n // If the linked element is not an anchor tag anymore, do nothing\n if (element[0].nodeName.toLowerCase() !== 'a') return;\n\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n 'xlink:href' : 'href';\n element.on('click', function(event) {\n // if we have no href url, then don't navigate anywhere.\n if (!element.attr(href)) {\n event.preventDefault();\n }\n });\n };\n }\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngHref\n * @restrict A\n * @priority 99\n *\n * @description\n * Using AngularJS markup like `{{hash}}` in an href attribute will\n * make the link go to the wrong URL if the user clicks it before\n * AngularJS has a chance to replace the `{{hash}}` markup with its\n * value. Until AngularJS replaces the markup the link will be broken\n * and will most likely return a 404 error. The `ngHref` directive\n * solves this problem.\n *\n * The wrong way to write it:\n * ```html\n * link1\n * ```\n *\n * The correct way to write it:\n * ```html\n * link1\n * ```\n *\n * @element A\n * @param {template} ngHref any string which can contain `{{}}` markup.\n *\n * @example\n * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes\n * in links and their different behaviors:\n \n \n
\n link 1 (link, don't reload)
\n link 2 (link, don't reload)
\n link 3 (link, reload!)
\n anchor (link, don't reload)
\n anchor (no link)
\n link (link, change location)\n
\n \n it('should execute ng-click but not reload when href without value', function() {\n element(by.id('link-1')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('1');\n expect(element(by.id('link-1')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when href empty string', function() {\n element(by.id('link-2')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('2');\n expect(element(by.id('link-2')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click and change url when ng-href specified', function() {\n expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\\/123$/);\n\n element(by.id('link-3')).click();\n\n // At this point, we navigate away from an AngularJS page, so we need\n // to use browser.driver to get the base webdriver.\n\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/123$/);\n });\n }, 5000, 'page should navigate to /123');\n });\n\n it('should execute ng-click but not reload when href empty string and name specified', function() {\n element(by.id('link-4')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('4');\n expect(element(by.id('link-4')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when no href but name specified', function() {\n element(by.id('link-5')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('5');\n expect(element(by.id('link-5')).getAttribute('href')).toBe(null);\n });\n\n it('should only change url when only ng-href', function() {\n element(by.model('value')).clear();\n element(by.model('value')).sendKeys('6');\n expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\\/6$/);\n\n element(by.id('link-6')).click();\n\n // At this point, we navigate away from an AngularJS page, so we need\n // to use browser.driver to get the base webdriver.\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/6$/);\n });\n }, 5000, 'page should navigate to /6');\n });\n \n
\n */\n\n/**\n * @ngdoc directive\n * @name ngSrc\n * @restrict A\n * @priority 99\n *\n * @description\n * Using AngularJS markup like `{{hash}}` in a `src` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until AngularJS replaces the expression inside\n * `{{hash}}`. The `ngSrc` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * \"Description\"/\n * ```\n *\n * The correct way to write it:\n * ```html\n * \"Description\"\n * ```\n *\n * @element IMG\n * @param {template} ngSrc any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngSrcset\n * @restrict A\n * @priority 99\n *\n * @description\n * Using AngularJS markup like `{{hash}}` in a `srcset` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until AngularJS replaces the expression inside\n * `{{hash}}`. The `ngSrcset` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * \"Description\"/\n * ```\n *\n * The correct way to write it:\n * ```html\n * \"Description\"\n * ```\n *\n * @element IMG\n * @param {template} ngSrcset any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngDisabled\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * This directive sets the `disabled` attribute on the element (typically a form control,\n * e.g. `input`, `button`, `select` etc.) if the\n * {@link guide/expression expression} inside `ngDisabled` evaluates to truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `disabled`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n \n \n
\n \n
\n \n it('should toggle button', function() {\n expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();\n });\n \n
\n *\n * @element INPUT\n * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,\n * then the `disabled` attribute will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngChecked\n * @restrict A\n * @priority 100\n *\n * @description\n * Sets the `checked` attribute on the element, if the expression inside `ngChecked` is truthy.\n *\n * Note that this directive should not be used together with {@link ngModel `ngModel`},\n * as this can lead to unexpected behavior.\n *\n * A special directive is necessary because we cannot use interpolation inside the `checked`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n \n \n
\n \n
\n \n it('should check both checkBoxes', function() {\n expect(element(by.id('checkFollower')).getAttribute('checked')).toBeFalsy();\n element(by.model('leader')).click();\n expect(element(by.id('checkFollower')).getAttribute('checked')).toBeTruthy();\n });\n \n
\n *\n * @element INPUT\n * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,\n * then the `checked` attribute will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngReadonly\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * Sets the `readonly` attribute on the element, if the expression inside `ngReadonly` is truthy.\n * Note that `readonly` applies only to `input` elements with specific types. [See the input docs on\n * MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) for more information.\n *\n * A special directive is necessary because we cannot use interpolation inside the `readonly`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * @example\n \n \n
\n \n
\n \n it('should toggle readonly attr', function() {\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeTruthy();\n });\n \n
\n *\n * @element INPUT\n * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,\n * then special attribute \"readonly\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSelected\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * Sets the `selected` attribute on the element, if the expression inside `ngSelected` is truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `selected`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n *
\n * **Note:** `ngSelected` does not interact with the `select` and `ngModel` directives, it only\n * sets the `selected` attribute on the element. If you are using `ngModel` on the select, you\n * should not use `ngSelected` on the options, as `ngModel` will set the select value and\n * selected options.\n *
\n *\n * @example\n \n \n
\n \n
\n \n it('should select Greetings!', function() {\n expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();\n element(by.model('selected')).click();\n expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();\n });\n \n
\n *\n * @element OPTION\n * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,\n * then special attribute \"selected\" will be set on the element\n */\n\n/**\n * @ngdoc directive\n * @name ngOpen\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * Sets the `open` attribute on the element, if the expression inside `ngOpen` is truthy.\n *\n * A special directive is necessary because we cannot use interpolation inside the `open`\n * attribute. See the {@link guide/interpolation interpolation guide} for more info.\n *\n * ## A note about browser compatibility\n *\n * Internet Explorer and Edge do not support the `details` element, it is\n * recommended to use {@link ng.ngShow} and {@link ng.ngHide} instead.\n *\n * @example\n \n \n
\n
\n List\n
    \n
  • Apple
  • \n
  • Orange
  • \n
  • Durian
  • \n
\n
\n
\n \n it('should toggle open', function() {\n expect(element(by.id('details')).getAttribute('open')).toBeFalsy();\n element(by.model('open')).click();\n expect(element(by.id('details')).getAttribute('open')).toBeTruthy();\n });\n \n
\n *\n * @element DETAILS\n * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,\n * then special attribute \"open\" will be set on the element\n */\n\nvar ngAttributeAliasDirectives = {};\n\n// boolean attrs are evaluated\nforEach(BOOLEAN_ATTR, function(propName, attrName) {\n // binding to multiple is not supported\n if (propName === 'multiple') return;\n\n function defaultLinkFn(scope, element, attr) {\n scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {\n attr.$set(attrName, !!value);\n });\n }\n\n var normalized = directiveNormalize('ng-' + attrName);\n var linkFn = defaultLinkFn;\n\n if (propName === 'checked') {\n linkFn = function(scope, element, attr) {\n // ensuring ngChecked doesn't interfere with ngModel when both are set on the same input\n if (attr.ngModel !== attr[normalized]) {\n defaultLinkFn(scope, element, attr);\n }\n };\n }\n\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n restrict: 'A',\n priority: 100,\n link: linkFn\n };\n };\n});\n\n// aliased input attrs are evaluated\nforEach(ALIASED_ATTR, function(htmlAttr, ngAttr) {\n ngAttributeAliasDirectives[ngAttr] = function() {\n return {\n priority: 100,\n link: function(scope, element, attr) {\n //special case ngPattern when a literal regular expression value\n //is used as the expression (this way we don't have to watch anything).\n if (ngAttr === 'ngPattern' && attr.ngPattern.charAt(0) === '/') {\n var match = attr.ngPattern.match(REGEX_STRING_REGEXP);\n if (match) {\n attr.$set('ngPattern', new RegExp(match[1], match[2]));\n return;\n }\n }\n\n scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {\n attr.$set(ngAttr, value);\n });\n }\n };\n };\n});\n\n// ng-src, ng-srcset, ng-href are interpolated\nforEach(['src', 'srcset', 'href'], function(attrName) {\n var normalized = directiveNormalize('ng-' + attrName);\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n priority: 99, // it needs to run after the attributes are interpolated\n link: function(scope, element, attr) {\n var propName = attrName,\n name = attrName;\n\n if (attrName === 'href' &&\n toString.call(element.prop('href')) === '[object SVGAnimatedString]') {\n name = 'xlinkHref';\n attr.$attr[name] = 'xlink:href';\n propName = null;\n }\n\n attr.$observe(normalized, function(value) {\n if (!value) {\n if (attrName === 'href') {\n attr.$set(name, null);\n }\n return;\n }\n\n attr.$set(name, value);\n\n // Support: IE 9-11 only\n // On IE, if \"ng:src\" directive declaration is used and \"src\" attribute doesn't exist\n // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need\n // to set the property as well to achieve the desired effect.\n // We use attr[attrName] value since $set might have sanitized the url.\n if (msie && propName) element.prop(propName, attr[name]);\n });\n }\n };\n };\n});\n\n/* global -nullFormCtrl, -PENDING_CLASS, -SUBMITTED_CLASS\n */\nvar nullFormCtrl = {\n $addControl: noop,\n $$renameControl: nullFormRenameControl,\n $removeControl: noop,\n $setValidity: noop,\n $setDirty: noop,\n $setPristine: noop,\n $setSubmitted: noop,\n $$setSubmitted: noop\n},\nPENDING_CLASS = 'ng-pending',\nSUBMITTED_CLASS = 'ng-submitted';\n\nfunction nullFormRenameControl(control, name) {\n control.$name = name;\n}\n\n/**\n * @ngdoc type\n * @name form.FormController\n *\n * @property {boolean} $pristine True if user has not interacted with the form yet.\n * @property {boolean} $dirty True if user has already interacted with the form.\n * @property {boolean} $valid True if all of the containing forms and controls are valid.\n * @property {boolean} $invalid True if at least one containing control or form is invalid.\n * @property {boolean} $submitted True if user has submitted the form even if its invalid.\n *\n * @property {Object} $pending An object hash, containing references to controls or forms with\n * pending validators, where:\n *\n * - keys are validations tokens (error names).\n * - values are arrays of controls or forms that have a pending validator for the given error name.\n *\n * See {@link form.FormController#$error $error} for a list of built-in validation tokens.\n *\n * @property {Object} $error An object hash, containing references to controls or forms with failing\n * validators, where:\n *\n * - keys are validation tokens (error names),\n * - values are arrays of controls or forms that have a failing validator for the given error name.\n *\n * Built-in validation tokens:\n * - `email`\n * - `max`\n * - `maxlength`\n * - `min`\n * - `minlength`\n * - `number`\n * - `pattern`\n * - `required`\n * - `url`\n * - `date`\n * - `datetimelocal`\n * - `time`\n * - `week`\n * - `month`\n *\n * @description\n * `FormController` keeps track of all its controls and nested forms as well as the state of them,\n * such as being valid/invalid or dirty/pristine.\n *\n * Each {@link ng.directive:form form} directive creates an instance\n * of `FormController`.\n *\n */\n//asks for $scope to fool the BC controller module\nFormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];\nfunction FormController($element, $attrs, $scope, $animate, $interpolate) {\n this.$$controls = [];\n\n // init state\n this.$error = {};\n this.$$success = {};\n this.$pending = undefined;\n this.$name = $interpolate($attrs.name || $attrs.ngForm || '')($scope);\n this.$dirty = false;\n this.$pristine = true;\n this.$valid = true;\n this.$invalid = false;\n this.$submitted = false;\n this.$$parentForm = nullFormCtrl;\n\n this.$$element = $element;\n this.$$animate = $animate;\n\n setupValidity(this);\n}\n\nFormController.prototype = {\n /**\n * @ngdoc method\n * @name form.FormController#$rollbackViewValue\n *\n * @description\n * Rollback all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is typically needed by the reset button of\n * a form that uses `ng-model-options` to pend updates.\n */\n $rollbackViewValue: function() {\n forEach(this.$$controls, function(control) {\n control.$rollbackViewValue();\n });\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$commitViewValue\n *\n * @description\n * Commit all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n $commitViewValue: function() {\n forEach(this.$$controls, function(control) {\n control.$commitViewValue();\n });\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$addControl\n * @param {object} control control object, either a {@link form.FormController} or an\n * {@link ngModel.NgModelController}\n *\n * @description\n * Register a control with the form. Input elements using ngModelController do this automatically\n * when they are linked.\n *\n * Note that the current state of the control will not be reflected on the new parent form. This\n * is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine`\n * state.\n *\n * However, if the method is used programmatically, for example by adding dynamically created controls,\n * or controls that have been previously removed without destroying their corresponding DOM element,\n * it's the developers responsibility to make sure the current state propagates to the parent form.\n *\n * For example, if an input control is added that is already `$dirty` and has `$error` properties,\n * calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form.\n */\n $addControl: function(control) {\n // Breaking change - before, inputs whose name was \"hasOwnProperty\" were quietly ignored\n // and not added to the scope. Now we throw an error.\n assertNotHasOwnProperty(control.$name, 'input');\n this.$$controls.push(control);\n\n if (control.$name) {\n this[control.$name] = control;\n }\n\n control.$$parentForm = this;\n },\n\n // Private API: rename a form control\n $$renameControl: function(control, newName) {\n var oldName = control.$name;\n\n if (this[oldName] === control) {\n delete this[oldName];\n }\n this[newName] = control;\n control.$name = newName;\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$removeControl\n * @param {object} control control object, either a {@link form.FormController} or an\n * {@link ngModel.NgModelController}\n *\n * @description\n * Deregister a control from the form.\n *\n * Input elements using ngModelController do this automatically when they are destroyed.\n *\n * Note that only the removed control's validation state (`$errors`etc.) will be removed from the\n * form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be\n * different from case to case. For example, removing the only `$dirty` control from a form may or\n * may not mean that the form is still `$dirty`.\n */\n $removeControl: function(control) {\n if (control.$name && this[control.$name] === control) {\n delete this[control.$name];\n }\n forEach(this.$pending, function(value, name) {\n // eslint-disable-next-line no-invalid-this\n this.$setValidity(name, null, control);\n }, this);\n forEach(this.$error, function(value, name) {\n // eslint-disable-next-line no-invalid-this\n this.$setValidity(name, null, control);\n }, this);\n forEach(this.$$success, function(value, name) {\n // eslint-disable-next-line no-invalid-this\n this.$setValidity(name, null, control);\n }, this);\n\n arrayRemove(this.$$controls, control);\n control.$$parentForm = nullFormCtrl;\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$setDirty\n *\n * @description\n * Sets the form to a dirty state.\n *\n * This method can be called to add the 'ng-dirty' class and set the form to a dirty\n * state (ng-dirty class). This method will also propagate to parent forms.\n */\n $setDirty: function() {\n this.$$animate.removeClass(this.$$element, PRISTINE_CLASS);\n this.$$animate.addClass(this.$$element, DIRTY_CLASS);\n this.$dirty = true;\n this.$pristine = false;\n this.$$parentForm.$setDirty();\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$setPristine\n *\n * @description\n * Sets the form to its pristine state.\n *\n * This method sets the form's `$pristine` state to true, the `$dirty` state to false, removes\n * the `ng-dirty` class and adds the `ng-pristine` class. Additionally, it sets the `$submitted`\n * state to false.\n *\n * This method will also propagate to all the controls contained in this form.\n *\n * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after\n * saving or resetting it.\n */\n $setPristine: function() {\n this.$$animate.setClass(this.$$element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);\n this.$dirty = false;\n this.$pristine = true;\n this.$submitted = false;\n forEach(this.$$controls, function(control) {\n control.$setPristine();\n });\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$setUntouched\n *\n * @description\n * Sets the form to its untouched state.\n *\n * This method can be called to remove the 'ng-touched' class and set the form controls to their\n * untouched state (ng-untouched class).\n *\n * Setting a form controls back to their untouched state is often useful when setting the form\n * back to its pristine state.\n */\n $setUntouched: function() {\n forEach(this.$$controls, function(control) {\n control.$setUntouched();\n });\n },\n\n /**\n * @ngdoc method\n * @name form.FormController#$setSubmitted\n *\n * @description\n * Sets the form to its `$submitted` state. This will also set `$submitted` on all child and\n * parent forms of the form.\n */\n $setSubmitted: function() {\n var rootForm = this;\n while (rootForm.$$parentForm && (rootForm.$$parentForm !== nullFormCtrl)) {\n rootForm = rootForm.$$parentForm;\n }\n rootForm.$$setSubmitted();\n },\n\n $$setSubmitted: function() {\n this.$$animate.addClass(this.$$element, SUBMITTED_CLASS);\n this.$submitted = true;\n forEach(this.$$controls, function(control) {\n if (control.$$setSubmitted) {\n control.$$setSubmitted();\n }\n });\n }\n};\n\n/**\n * @ngdoc method\n * @name form.FormController#$setValidity\n *\n * @description\n * Change the validity state of the form, and notify the parent form (if any).\n *\n * Application developers will rarely need to call this method directly. It is used internally, by\n * {@link ngModel.NgModelController#$setValidity NgModelController.$setValidity()}, to propagate a\n * control's validity state to the parent `FormController`.\n *\n * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be\n * assigned to either `$error[validationErrorKey]` or `$pending[validationErrorKey]` (for\n * unfulfilled `$asyncValidators`), so that it is available for data-binding. The\n * `validationErrorKey` should be in camelCase and will get converted into dash-case for\n * class name. Example: `myError` will result in `ng-valid-my-error` and\n * `ng-invalid-my-error` classes and can be bound to as `{{ someForm.$error.myError }}`.\n * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending\n * (undefined), or skipped (null). Pending is used for unfulfilled `$asyncValidators`.\n * Skipped is used by AngularJS when validators do not run because of parse errors and when\n * `$asyncValidators` do not run because any of the `$validators` failed.\n * @param {NgModelController | FormController} controller - The controller whose validity state is\n * triggering the change.\n */\naddSetValidityMethod({\n clazz: FormController,\n set: function(object, property, controller) {\n var list = object[property];\n if (!list) {\n object[property] = [controller];\n } else {\n var index = list.indexOf(controller);\n if (index === -1) {\n list.push(controller);\n }\n }\n },\n unset: function(object, property, controller) {\n var list = object[property];\n if (!list) {\n return;\n }\n arrayRemove(list, controller);\n if (list.length === 0) {\n delete object[property];\n }\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngForm\n * @restrict EAC\n *\n * @description\n * Helper directive that makes it possible to create control groups inside a\n * {@link ng.directive:form `form`} directive.\n * These \"child forms\" can be used, for example, to determine the validity of a sub-group of\n * controls.\n *\n *
\n * **Note**: `ngForm` cannot be used as a replacement for `
`, because it lacks its\n * [built-in HTML functionality](https://html.spec.whatwg.org/#the-form-element).\n * Specifically, you cannot submit `ngForm` like a `` tag. That means,\n * you cannot send data to the server with `ngForm`, or integrate it with\n * {@link ng.directive:ngSubmit `ngSubmit`}.\n *
\n *\n * @param {string=} ngForm|name Name of the form. If specified, the form controller will\n * be published into the related scope, under this name.\n *\n */\n\n /**\n * @ngdoc directive\n * @name form\n * @restrict E\n *\n * @description\n * Directive that instantiates\n * {@link form.FormController FormController}.\n *\n * If the `name` attribute is specified, the form controller is published onto the current scope under\n * this name.\n *\n * ## Alias: {@link ng.directive:ngForm `ngForm`}\n *\n * In AngularJS, forms can be nested. This means that the outer form is valid when all of the child\n * forms are valid as well. However, browsers do not allow nesting of `` elements, so\n * AngularJS provides the {@link ng.directive:ngForm `ngForm`} directive, which behaves identically to\n * `form` but can be nested. Nested forms can be useful, for example, if the validity of a sub-group\n * of controls needs to be determined.\n *\n * ## CSS classes\n * - `ng-valid` is set if the form is valid.\n * - `ng-invalid` is set if the form is invalid.\n * - `ng-pending` is set if the form is pending.\n * - `ng-pristine` is set if the form is pristine.\n * - `ng-dirty` is set if the form is dirty.\n * - `ng-submitted` is set if the form was submitted.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n *\n * ## Submitting a form and preventing the default action\n *\n * Since the role of forms in client-side AngularJS applications is different than in classical\n * roundtrip apps, it is desirable for the browser not to translate the form submission into a full\n * page reload that sends the data to the server. Instead some javascript logic should be triggered\n * to handle the form submission in an application-specific way.\n *\n * For this reason, AngularJS prevents the default action (form submission to the server) unless the\n * `` element has an `action` attribute specified.\n *\n * You can use one of the following two ways to specify what javascript method should be called when\n * a form is submitted:\n *\n * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element\n * - {@link ng.directive:ngClick ngClick} directive on the first\n * button or input field of type submit (input[type=submit])\n *\n * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}\n * or {@link ng.directive:ngClick ngClick} directives.\n * This is because of the following form submission rules in the HTML specification:\n *\n * - If a form has only one input field then hitting enter in this field triggers form submit\n * (`ngSubmit`)\n * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter\n * doesn't trigger submit\n * - if a form has one or more input fields and one or more buttons or input[type=submit] then\n * hitting enter in any of the input fields will trigger the click handler on the *first* button or\n * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)\n *\n * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is\n * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * @animations\n * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.\n * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any\n * other validations that are performed within the form. Animations in ngForm are similar to how\n * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well\n * as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style a form element\n * that has been rendered as invalid after it has been validated:\n *\n *
\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-form {\n *   transition:0.5s linear all;\n *   background: white;\n * }\n * .my-form.ng-invalid {\n *   background: red;\n *   color:white;\n * }\n * 
\n *\n * @example\n \n \n \n \n \n userType: \n Required!
\n userType = {{userType}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n \n
\n \n it('should initialize to model', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n expect(userType.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n var userInput = element(by.model('userType'));\n\n userInput.clear();\n userInput.sendKeys('');\n\n expect(userType.getText()).toEqual('userType =');\n expect(valid.getText()).toContain('false');\n });\n \n
\n *\n * @param {string=} name Name of the form. If specified, the form controller will be published into\n * related scope, under this name.\n */\nvar formDirectiveFactory = function(isNgForm) {\n return ['$timeout', '$parse', function($timeout, $parse) {\n var formDirective = {\n name: 'form',\n restrict: isNgForm ? 'EAC' : 'E',\n require: ['form', '^^?form'], //first is the form's own ctrl, second is an optional parent form\n controller: FormController,\n compile: function ngFormCompile(formElement, attr) {\n // Setup initial state of the control\n formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);\n\n var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false);\n\n return {\n pre: function ngFormPreLink(scope, formElement, attr, ctrls) {\n var controller = ctrls[0];\n\n // if `action` attr is not present on the form, prevent the default action (submission)\n if (!('action' in attr)) {\n // we can't use jq events because if a form is destroyed during submission the default\n // action is not prevented. see #1238\n //\n // IE 9 is not affected because it doesn't fire a submit event and try to do a full\n // page reload if the form was destroyed by submission of the form via a click handler\n // on a button in the form. Looks like an IE9 specific bug.\n var handleFormSubmission = function(event) {\n scope.$apply(function() {\n controller.$commitViewValue();\n controller.$setSubmitted();\n });\n\n event.preventDefault();\n };\n\n formElement[0].addEventListener('submit', handleFormSubmission);\n\n // unregister the preventDefault listener so that we don't not leak memory but in a\n // way that will achieve the prevention of the default action.\n formElement.on('$destroy', function() {\n $timeout(function() {\n formElement[0].removeEventListener('submit', handleFormSubmission);\n }, 0, false);\n });\n }\n\n var parentFormCtrl = ctrls[1] || controller.$$parentForm;\n parentFormCtrl.$addControl(controller);\n\n var setter = nameAttr ? getSetter(controller.$name) : noop;\n\n if (nameAttr) {\n setter(scope, controller);\n attr.$observe(nameAttr, function(newValue) {\n if (controller.$name === newValue) return;\n setter(scope, undefined);\n controller.$$parentForm.$$renameControl(controller, newValue);\n setter = getSetter(controller.$name);\n setter(scope, controller);\n });\n }\n formElement.on('$destroy', function() {\n controller.$$parentForm.$removeControl(controller);\n setter(scope, undefined);\n extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards\n });\n }\n };\n }\n };\n\n return formDirective;\n\n function getSetter(expression) {\n if (expression === '') {\n //create an assignable expression, so forms with an empty name can be renamed later\n return $parse('this[\"\"]').assign;\n }\n return $parse(expression).assign || noop;\n }\n }];\n};\n\nvar formDirective = formDirectiveFactory();\nvar ngFormDirective = formDirectiveFactory(true);\n\n\n\n// helper methods\nfunction setupValidity(instance) {\n instance.$$classCache = {};\n instance.$$classCache[INVALID_CLASS] = !(instance.$$classCache[VALID_CLASS] = instance.$$element.hasClass(VALID_CLASS));\n}\nfunction addSetValidityMethod(context) {\n var clazz = context.clazz,\n set = context.set,\n unset = context.unset;\n\n clazz.prototype.$setValidity = function(validationErrorKey, state, controller) {\n if (isUndefined(state)) {\n createAndSet(this, '$pending', validationErrorKey, controller);\n } else {\n unsetAndCleanup(this, '$pending', validationErrorKey, controller);\n }\n if (!isBoolean(state)) {\n unset(this.$error, validationErrorKey, controller);\n unset(this.$$success, validationErrorKey, controller);\n } else {\n if (state) {\n unset(this.$error, validationErrorKey, controller);\n set(this.$$success, validationErrorKey, controller);\n } else {\n set(this.$error, validationErrorKey, controller);\n unset(this.$$success, validationErrorKey, controller);\n }\n }\n if (this.$pending) {\n cachedToggleClass(this, PENDING_CLASS, true);\n this.$valid = this.$invalid = undefined;\n toggleValidationCss(this, '', null);\n } else {\n cachedToggleClass(this, PENDING_CLASS, false);\n this.$valid = isObjectEmpty(this.$error);\n this.$invalid = !this.$valid;\n toggleValidationCss(this, '', this.$valid);\n }\n\n // re-read the state as the set/unset methods could have\n // combined state in this.$error[validationError] (used for forms),\n // where setting/unsetting only increments/decrements the value,\n // and does not replace it.\n var combinedState;\n if (this.$pending && this.$pending[validationErrorKey]) {\n combinedState = undefined;\n } else if (this.$error[validationErrorKey]) {\n combinedState = false;\n } else if (this.$$success[validationErrorKey]) {\n combinedState = true;\n } else {\n combinedState = null;\n }\n\n toggleValidationCss(this, validationErrorKey, combinedState);\n this.$$parentForm.$setValidity(validationErrorKey, combinedState, this);\n };\n\n function createAndSet(ctrl, name, value, controller) {\n if (!ctrl[name]) {\n ctrl[name] = {};\n }\n set(ctrl[name], value, controller);\n }\n\n function unsetAndCleanup(ctrl, name, value, controller) {\n if (ctrl[name]) {\n unset(ctrl[name], value, controller);\n }\n if (isObjectEmpty(ctrl[name])) {\n ctrl[name] = undefined;\n }\n }\n\n function cachedToggleClass(ctrl, className, switchValue) {\n if (switchValue && !ctrl.$$classCache[className]) {\n ctrl.$$animate.addClass(ctrl.$$element, className);\n ctrl.$$classCache[className] = true;\n } else if (!switchValue && ctrl.$$classCache[className]) {\n ctrl.$$animate.removeClass(ctrl.$$element, className);\n ctrl.$$classCache[className] = false;\n }\n }\n\n function toggleValidationCss(ctrl, validationErrorKey, isValid) {\n validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n\n cachedToggleClass(ctrl, VALID_CLASS + validationErrorKey, isValid === true);\n cachedToggleClass(ctrl, INVALID_CLASS + validationErrorKey, isValid === false);\n }\n}\n\nfunction isObjectEmpty(obj) {\n if (obj) {\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n return false;\n }\n }\n }\n return true;\n}\n\n/* global\n VALID_CLASS: false,\n INVALID_CLASS: false,\n PRISTINE_CLASS: false,\n DIRTY_CLASS: false,\n ngModelMinErr: false\n*/\n\n// Regex code was initially obtained from SO prior to modification: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231\nvar ISO_DATE_REGEXP = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/;\n// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987)\n// Note: We are being more lenient, because browsers are too.\n// 1. Scheme\n// 2. Slashes\n// 3. Username\n// 4. Password\n// 5. Hostname\n// 6. Port\n// 7. Path\n// 8. Query\n// 9. Fragment\n// 1111111111111111 222 333333 44444 55555555555555555555555 666 77777777 8888888 999\nvar URL_REGEXP = /^[a-z][a-z\\d.+-]*:\\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\\s:/?#]+|\\[[a-f\\d:]+])(?::\\d+)?(?:\\/[^?#]*)?(?:\\?[^#]*)?(?:#.*)?$/i;\n// eslint-disable-next-line max-len\nvar EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/;\nvar NUMBER_REGEXP = /^\\s*(-|\\+)?(\\d+|(\\d*(\\.\\d*)))([eE][+-]?\\d+)?\\s*$/;\nvar DATE_REGEXP = /^(\\d{4,})-(\\d{2})-(\\d{2})$/;\nvar DATETIMELOCAL_REGEXP = /^(\\d{4,})-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\nvar WEEK_REGEXP = /^(\\d{4,})-W(\\d\\d)$/;\nvar MONTH_REGEXP = /^(\\d{4,})-(\\d\\d)$/;\nvar TIME_REGEXP = /^(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\n\nvar PARTIAL_VALIDATION_EVENTS = 'keydown wheel mousedown';\nvar PARTIAL_VALIDATION_TYPES = createMap();\nforEach('date,datetime-local,month,time,week'.split(','), function(type) {\n PARTIAL_VALIDATION_TYPES[type] = true;\n});\n\nvar inputType = {\n\n /**\n * @ngdoc input\n * @name input[text]\n *\n * @description\n * Standard HTML text input with AngularJS data binding, inherited by most of the `input` elements.\n *\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Adds `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n * any length.\n * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n * that contains the regular expression body that will be converted to a regular expression\n * as in the ngPattern directive.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.
\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false AngularJS will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n \n \n \n
\n \n
\n \n Required!\n \n Single word only!\n
\n text = {{example.text}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var text = element(by.binding('example.text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('example.text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if multi word', function() {\n input.clear();\n input.sendKeys('hello world');\n\n expect(valid.getText()).toContain('false');\n });\n \n
\n */\n 'text': textInputType,\n\n /**\n * @ngdoc input\n * @name input[date]\n *\n * @description\n * Input with date validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601\n * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many\n * modern browsers do not yet support this input type, it is important to provide cues to users on the\n * expected input format via a placeholder or label.\n *\n * The model must always be a Date object, otherwise AngularJS will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute\n * (e.g. `min=\"{{minDate | date:'yyyy-MM-dd'}}\"`). Note that `min` will also add native HTML5\n * constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute\n * (e.g. `max=\"{{maxDate | date:'yyyy-MM-dd'}}\"`). Note that `max` will also add native HTML5\n * constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO date string\n * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO date string\n * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n \n \n
\n \n Required!\n \n Not a valid date!\n
\n value = {{example.value | date: \"yyyy-MM-dd\"}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var value = element(by.binding('example.value | date: \"yyyy-MM-dd\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (see https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10-22');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n
\n */\n 'date': createDateInputType('date', DATE_REGEXP,\n createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']),\n 'yyyy-MM-dd'),\n\n /**\n * @ngdoc input\n * @name input[datetime-local]\n *\n * @description\n * Input with datetime validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`.\n *\n * The model must always be a Date object, otherwise AngularJS will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation\n * inside this attribute (e.g. `min=\"{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}\"`).\n * Note that `min` will also add native HTML5 constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation\n * inside this attribute (e.g. `max=\"{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}\"`).\n * Note that `max` will also add native HTML5 constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation error key to the Date / ISO datetime string\n * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation error key to the Date / ISO datetime string\n * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n \n \n
\n \n Required!\n \n Not a valid date!\n
\n value = {{example.value | date: \"yyyy-MM-ddTHH:mm:ss\"}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var value = element(by.binding('example.value | date: \"yyyy-MM-ddTHH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2010-12-28T14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01T23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n
\n */\n 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP,\n createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']),\n 'yyyy-MM-ddTHH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[time]\n *\n * @description\n * Input with time validation and transformation. In browsers that do not yet support\n * the HTML5 time input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a\n * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`.\n *\n * The model must always be a Date object, otherwise AngularJS will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this\n * attribute (e.g. `min=\"{{minTime | date:'HH:mm:ss'}}\"`). Note that `min` will also add\n * native HTML5 constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this\n * attribute (e.g. `max=\"{{maxTime | date:'HH:mm:ss'}}\"`). Note that `max` will also add\n * native HTML5 constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO time string the\n * `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO time string the\n * `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n \n \n
\n \n Required!\n \n Not a valid date!\n
\n value = {{example.value | date: \"HH:mm:ss\"}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var value = element(by.binding('example.value | date: \"HH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n
\n */\n 'time': createDateInputType('time', TIME_REGEXP,\n createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']),\n 'HH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[week]\n *\n * @description\n * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support\n * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * week format (yyyy-W##), for example: `2013-W02`.\n *\n * The model must always be a Date object, otherwise AngularJS will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n *\n * The value of the resulting Date object will be set to Thursday at 00:00:00 of the requested week,\n * due to ISO-8601 week numbering standards. Information on ISO's system for numbering the weeks of the\n * year can be found at: https://en.wikipedia.org/wiki/ISO_8601#Week_dates\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this\n * attribute (e.g. `min=\"{{minWeek | date:'yyyy-Www'}}\"`). Note that `min` will also add\n * native HTML5 constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this\n * attribute (e.g. `max=\"{{maxWeek | date:'yyyy-Www'}}\"`). Note that `max` will also add\n * native HTML5 constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string\n * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string\n * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n \n
\n \n Required!\n \n Not a valid date!\n
\n value = {{example.value | date: \"yyyy-Www\"}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var value = element(by.binding('example.value | date: \"yyyy-Www\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-W01');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-W01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n
\n */\n 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'),\n\n /**\n * @ngdoc input\n * @name input[month]\n *\n * @description\n * Input with month validation and transformation. In browsers that do not yet support\n * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * month format (yyyy-MM), for example: `2009-01`.\n *\n * The model must always be a Date object, otherwise AngularJS will throw an error.\n * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.\n * If the model is not set to the first of the month, the next view to model update will set it\n * to the first of the month.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this\n * attribute (e.g. `min=\"{{minMonth | date:'yyyy-MM'}}\"`). Note that `min` will also add\n * native HTML5 constraint validation.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this\n * attribute (e.g. `max=\"{{maxMonth | date:'yyyy-MM'}}\"`). Note that `max` will also add\n * native HTML5 constraint validation.\n * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string\n * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.\n * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string\n * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.\n\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n \n \n
\n \n Required!\n \n Not a valid month!\n
\n value = {{example.value | date: \"yyyy-MM\"}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var value = element(by.binding('example.value | date: \"yyyy-MM\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n
\n */\n 'month': createDateInputType('month', MONTH_REGEXP,\n createDateParser(MONTH_REGEXP, ['yyyy', 'MM']),\n 'yyyy-MM'),\n\n /**\n * @ngdoc input\n * @name input[number]\n *\n * @description\n * Text input with number validation and transformation. Sets the `number` validation\n * error if not a valid number.\n *\n *
\n * The model must always be of type `number` otherwise AngularJS will throw an error.\n * Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt}\n * error docs for more information and an example of how to convert your model if necessary.\n *
\n *\n * ## Issues with HTML5 constraint validation\n *\n * In browsers that follow the\n * [HTML5 specification](https://html.spec.whatwg.org/multipage/forms.html#number-state-%28type=number%29),\n * `input[number]` does not work as expected with {@link ngModelOptions `ngModelOptions.allowInvalid`}.\n * If a non-number is entered in the input, the browser will report the value as an empty string,\n * which means the view / model values in `ngModel` and subsequently the scope value\n * will also be an empty string.\n *\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * Can be interpolated.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * Can be interpolated.\n * @param {string=} ngMin Like `min`, sets the `min` validation error key if the value entered is less than `ngMin`,\n * but does not trigger HTML5 native validation. Takes an expression.\n * @param {string=} ngMax Like `max`, sets the `max` validation error key if the value entered is greater than `ngMax`,\n * but does not trigger HTML5 native validation. Takes an expression.\n * @param {string=} step Sets the `step` validation error key if the value entered does not fit the `step` constraint.\n * Can be interpolated.\n * @param {string=} ngStep Like `step`, sets the `step` validation error key if the value entered does not fit the `ngStep` constraint,\n * but does not trigger HTML5 native validation. Takes an expression.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n * any length.\n * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n * that contains the regular expression body that will be converted to a regular expression\n * as in the ngPattern directive.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.
\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n \n
\n \n Required!\n \n Not valid number!\n
\n value = {{example.value}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var value = element(by.binding('example.value'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('example.value'));\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('12');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if over max', function() {\n input.clear();\n input.sendKeys('123');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n \n
\n */\n 'number': numberInputType,\n\n\n /**\n * @ngdoc input\n * @name input[url]\n *\n * @description\n * Text input with URL validation. Sets the `url` validation error key if the content is not a\n * valid URL.\n *\n *
\n * **Note:** `input[url]` uses a regex to validate urls that is derived from the regex\n * used in Chromium. If you need stricter validation, you can use `ng-pattern` or modify\n * the built-in validators (see the {@link guide/forms Forms guide})\n *
\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n * any length.\n * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n * that contains the regular expression body that will be converted to a regular expression\n * as in the ngPattern directive.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.
\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n
\n \n var text = element(by.binding('url.text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('url.text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('http://google.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not url', function() {\n input.clear();\n input.sendKeys('box');\n\n expect(valid.getText()).toContain('false');\n });\n \n
\n */\n 'url': urlInputType,\n\n\n /**\n * @ngdoc input\n * @name input[email]\n *\n * @description\n * Text input with email validation. Sets the `email` validation error key if not a valid email\n * address.\n *\n *
\n * **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex\n * used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can\n * use `ng-pattern` or modify the built-in validators (see the {@link guide/forms Forms guide})\n *
\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of\n * any length.\n * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string\n * that contains the regular expression body that will be converted to a regular expression\n * as in the ngPattern directive.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.
\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n \n
\n \n Required!\n \n Not valid email!\n
\n text = {{email.text}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n myForm.$error.email = {{!!myForm.$error.email}}
\n
\n
\n \n var text = element(by.binding('email.text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('email.text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('me@example.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not email', function() {\n input.clear();\n input.sendKeys('xxx');\n\n expect(valid.getText()).toContain('false');\n });\n \n
\n */\n 'email': emailInputType,\n\n\n /**\n * @ngdoc input\n * @name input[radio]\n *\n * @description\n * HTML radio button.\n *\n * **Note:**
\n * All inputs controlled by {@link ngModel ngModel} (including those of type `radio`) will use the\n * value of their `name` attribute to determine the property under which their\n * {@link ngModel.NgModelController NgModelController} will be published on the parent\n * {@link form.FormController FormController}. Thus, if you use the same `name` for multiple\n * inputs of a form (e.g. a group of radio inputs), only _one_ `NgModelController` will be\n * published on the parent `FormController` under that name. The rest of the controllers will\n * continue to work as expected, but you won't be able to access them as properties on the parent\n * `FormController`.\n *\n *
\n *

\n * In plain HTML forms, the `name` attribute is used to identify groups of radio inputs, so\n * that the browser can manage their state (checked/unchecked) based on the state of other\n * inputs in the same group.\n *

\n *

\n * In AngularJS forms, this is not necessary. The input's state will be updated based on the\n * value of the underlying model data.\n *

\n *
\n *\n *
\n * If you omit the `name` attribute on a radio input, `ngModel` will automatically assign it a\n * unique name.\n *
\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string} value The value to which the `ngModel` expression should be set when selected.\n * Note that `value` only supports `string` values, i.e. the scope model needs to be a string,\n * too. Use `ngValue` if you need complex models (`number`, `object`, ...).\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {string} ngValue AngularJS expression to which `ngModel` will be be set when the radio\n * is selected. Should be used instead of the `value` attribute if you need\n * a non-string `ngModel` (`boolean`, `array`, ...).\n *\n * @example\n \n \n \n
\n
\n
\n
\n color = {{color.name | json}}
\n
\n Note that `ng-value=\"specialValue\"` sets radio item's value to be the value of `$scope.specialValue`.\n
\n \n it('should change state', function() {\n var inputs = element.all(by.model('color.name'));\n var color = element(by.binding('color.name'));\n\n expect(color.getText()).toContain('blue');\n\n inputs.get(0).click();\n expect(color.getText()).toContain('red');\n\n inputs.get(1).click();\n expect(color.getText()).toContain('green');\n });\n \n
\n */\n 'radio': radioInputType,\n\n /**\n * @ngdoc input\n * @name input[range]\n *\n * @description\n * Native range input with validation and transformation.\n *\n * The model for the range input must always be a `Number`.\n *\n * IE9 and other browsers that do not support the `range` type fall back\n * to a text input without any default values for `min`, `max` and `step`. Model binding,\n * validation and number parsing are nevertheless supported.\n *\n * Browsers that support range (latest Chrome, Safari, Firefox, Edge) treat `input[range]`\n * in a way that never allows the input to hold an invalid value. That means:\n * - any non-numerical value is set to `(max + min) / 2`.\n * - any numerical value that is less than the current min val, or greater than the current max val\n * is set to the min / max val respectively.\n * - additionally, the current `step` is respected, so the nearest value that satisfies a step\n * is used.\n *\n * See the [HTML Spec on input[type=range]](https://www.w3.org/TR/html5/forms.html#range-state-(type=range))\n * for more info.\n *\n * This has the following consequences for AngularJS:\n *\n * Since the element value should always reflect the current model value, a range input\n * will set the bound ngModel expression to the value that the browser has set for the\n * input element. For example, in the following input ``,\n * if the application sets `model.value = null`, the browser will set the input to `'50'`.\n * AngularJS will then set the model to `50`, to prevent input and model value being out of sync.\n *\n * That means the model for range will immediately be set to `50` after `ngModel` has been\n * initialized. It also means a range input can never have the required error.\n *\n * This does not only affect changes to the model value, but also to the values of the `min`,\n * `max`, and `step` attributes. When these change in a way that will cause the browser to modify\n * the input value, AngularJS will also update the model value.\n *\n * Automatic value adjustment also means that a range input element can never have the `required`,\n * `min`, or `max` errors.\n *\n * However, `step` is currently only fully implemented by Firefox. Other browsers have problems\n * when the step value changes dynamically - they do not adjust the element value correctly, but\n * instead may set the `stepMismatch` error. If that's the case, the AngularJS will set the `step`\n * error on the input, and set the model to `undefined`.\n *\n * Note that `input[range]` is not compatible with`ngMax`, `ngMin`, and `ngStep`, because they do\n * not set the `min` and `max` attributes, which means that the browser won't automatically adjust\n * the input value based on their values, and will always assume min = 0, max = 100, and step = 1.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation to ensure that the value entered is greater\n * than `min`. Can be interpolated.\n * @param {string=} max Sets the `max` validation to ensure that the value entered is less than `max`.\n * Can be interpolated.\n * @param {string=} step Sets the `step` validation to ensure that the value entered matches the `step`\n * Can be interpolated.\n * @param {expression=} ngChange AngularJS expression to be executed when the ngModel value changes due\n * to user interaction with the input element.\n * @param {expression=} ngChecked If the expression is truthy, then the `checked` attribute will be set on the\n * element. **Note** : `ngChecked` should not be used alongside `ngModel`.\n * Checkout {@link ng.directive:ngChecked ngChecked} for usage.\n *\n * @example\n \n \n \n
\n\n Model as range: \n
\n Model as number:
\n Min:
\n Max:
\n value = {{value}}
\n myForm.range.$valid = {{myForm.range.$valid}}
\n myForm.range.$error = {{myForm.range.$error}}\n
\n
\n
\n\n * ## Range Input with ngMin & ngMax attributes\n\n * @example\n \n \n \n
\n Model as range: \n
\n Model as number:
\n Min:
\n Max:
\n value = {{value}}
\n myForm.range.$valid = {{myForm.range.$valid}}
\n myForm.range.$error = {{myForm.range.$error}}\n
\n
\n
\n\n */\n 'range': rangeInputType,\n\n /**\n * @ngdoc input\n * @name input[checkbox]\n *\n * @description\n * HTML checkbox.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {expression=} ngTrueValue The value to which the expression should be set when selected.\n * @param {expression=} ngFalseValue The value to which the expression should be set when not selected.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n
\n
\n value1 = {{checkboxModel.value1}}
\n value2 = {{checkboxModel.value2}}
\n
\n
\n \n it('should change state', function() {\n var value1 = element(by.binding('checkboxModel.value1'));\n var value2 = element(by.binding('checkboxModel.value2'));\n\n expect(value1.getText()).toContain('true');\n expect(value2.getText()).toContain('YES');\n\n element(by.model('checkboxModel.value1')).click();\n element(by.model('checkboxModel.value2')).click();\n\n expect(value1.getText()).toContain('false');\n expect(value2.getText()).toContain('NO');\n });\n \n
\n */\n 'checkbox': checkboxInputType,\n\n 'hidden': noop,\n 'button': noop,\n 'submit': noop,\n 'reset': noop,\n 'file': noop\n};\n\nfunction stringBasedInputType(ctrl) {\n ctrl.$formatters.push(function(value) {\n return ctrl.$isEmpty(value) ? value : value.toString();\n });\n}\n\nfunction textInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n}\n\nfunction baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n var type = lowercase(element[0].type);\n\n // In composition mode, users are still inputting intermediate text buffer,\n // hold the listener until composition is done.\n // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent\n if (!$sniffer.android) {\n var composing = false;\n\n element.on('compositionstart', function() {\n composing = true;\n });\n\n // Support: IE9+\n element.on('compositionupdate', function(ev) {\n // End composition when ev.data is empty string on 'compositionupdate' event.\n // When the input de-focusses (e.g. by clicking away), IE triggers 'compositionupdate'\n // instead of 'compositionend'.\n if (isUndefined(ev.data) || ev.data === '') {\n composing = false;\n }\n });\n\n element.on('compositionend', function() {\n composing = false;\n listener();\n });\n }\n\n var timeout;\n\n var listener = function(ev) {\n if (timeout) {\n $browser.defer.cancel(timeout);\n timeout = null;\n }\n if (composing) return;\n var value = element.val(),\n event = ev && ev.type;\n\n // By default we will trim the value\n // If the attribute ng-trim exists we will avoid trimming\n // If input type is 'password', the value is never trimmed\n if (type !== 'password' && (!attr.ngTrim || attr.ngTrim !== 'false')) {\n value = trim(value);\n }\n\n // If a control is suffering from bad input (due to native validators), browsers discard its\n // value, so it may be necessary to revalidate (by calling $setViewValue again) even if the\n // control's value is the same empty value twice in a row.\n if (ctrl.$viewValue !== value || (value === '' && ctrl.$$hasNativeValidators)) {\n ctrl.$setViewValue(value, event);\n }\n };\n\n // if the browser does support \"input\" event, we are fine - except on IE9 which doesn't fire the\n // input event on backspace, delete or cut\n if ($sniffer.hasEvent('input')) {\n element.on('input', listener);\n } else {\n var deferListener = function(ev, input, origValue) {\n if (!timeout) {\n timeout = $browser.defer(function() {\n timeout = null;\n if (!input || input.value !== origValue) {\n listener(ev);\n }\n });\n }\n };\n\n element.on('keydown', /** @this */ function(event) {\n var key = event.keyCode;\n\n // ignore\n // command modifiers arrows\n if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;\n\n deferListener(event, this, this.value);\n });\n\n // if user modifies input value using context menu in IE, we need \"paste\", \"cut\" and \"drop\" events to catch it\n if ($sniffer.hasEvent('paste')) {\n element.on('paste cut drop', deferListener);\n }\n }\n\n // if user paste into input using mouse on older browser\n // or form autocomplete on newer browser, we need \"change\" event to catch it\n element.on('change', listener);\n\n // Some native input types (date-family) have the ability to change validity without\n // firing any input/change events.\n // For these event types, when native validators are present and the browser supports the type,\n // check for validity changes on various DOM events.\n if (PARTIAL_VALIDATION_TYPES[type] && ctrl.$$hasNativeValidators && type === attr.type) {\n element.on(PARTIAL_VALIDATION_EVENTS, /** @this */ function(ev) {\n if (!timeout) {\n var validity = this[VALIDITY_STATE_PROPERTY];\n var origBadInput = validity.badInput;\n var origTypeMismatch = validity.typeMismatch;\n timeout = $browser.defer(function() {\n timeout = null;\n if (validity.badInput !== origBadInput || validity.typeMismatch !== origTypeMismatch) {\n listener(ev);\n }\n });\n }\n });\n }\n\n ctrl.$render = function() {\n // Workaround for Firefox validation #12102.\n var value = ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue;\n if (element.val() !== value) {\n element.val(value);\n }\n };\n}\n\nfunction weekParser(isoWeek, existingDate) {\n if (isDate(isoWeek)) {\n return isoWeek;\n }\n\n if (isString(isoWeek)) {\n WEEK_REGEXP.lastIndex = 0;\n var parts = WEEK_REGEXP.exec(isoWeek);\n if (parts) {\n var year = +parts[1],\n week = +parts[2],\n hours = 0,\n minutes = 0,\n seconds = 0,\n milliseconds = 0,\n firstThurs = getFirstThursdayOfYear(year),\n addDays = (week - 1) * 7;\n\n if (existingDate) {\n hours = existingDate.getHours();\n minutes = existingDate.getMinutes();\n seconds = existingDate.getSeconds();\n milliseconds = existingDate.getMilliseconds();\n }\n\n return new Date(year, 0, firstThurs.getDate() + addDays, hours, minutes, seconds, milliseconds);\n }\n }\n\n return NaN;\n}\n\nfunction createDateParser(regexp, mapping) {\n return function(iso, previousDate) {\n var parts, map;\n\n if (isDate(iso)) {\n return iso;\n }\n\n if (isString(iso)) {\n // When a date is JSON'ified to wraps itself inside of an extra\n // set of double quotes. This makes the date parsing code unable\n // to match the date string and parse it as a date.\n if (iso.charAt(0) === '\"' && iso.charAt(iso.length - 1) === '\"') {\n iso = iso.substring(1, iso.length - 1);\n }\n if (ISO_DATE_REGEXP.test(iso)) {\n return new Date(iso);\n }\n regexp.lastIndex = 0;\n parts = regexp.exec(iso);\n\n if (parts) {\n parts.shift();\n if (previousDate) {\n map = {\n yyyy: previousDate.getFullYear(),\n MM: previousDate.getMonth() + 1,\n dd: previousDate.getDate(),\n HH: previousDate.getHours(),\n mm: previousDate.getMinutes(),\n ss: previousDate.getSeconds(),\n sss: previousDate.getMilliseconds() / 1000\n };\n } else {\n map = { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 };\n }\n\n forEach(parts, function(part, index) {\n if (index < mapping.length) {\n map[mapping[index]] = +part;\n }\n });\n\n var date = new Date(map.yyyy, map.MM - 1, map.dd, map.HH, map.mm, map.ss || 0, map.sss * 1000 || 0);\n if (map.yyyy < 100) {\n // In the constructor, 2-digit years map to 1900-1999.\n // Use `setFullYear()` to set the correct year.\n date.setFullYear(map.yyyy);\n }\n\n return date;\n }\n }\n\n return NaN;\n };\n}\n\nfunction createDateInputType(type, regexp, parseDate, format) {\n return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter) {\n badInputChecker(scope, element, attr, ctrl, type);\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n var previousDate;\n var previousTimezone;\n\n ctrl.$parsers.push(function(value) {\n if (ctrl.$isEmpty(value)) return null;\n\n if (regexp.test(value)) {\n // Note: We cannot read ctrl.$modelValue, as there might be a different\n // parser/formatter in the processing chain so that the model\n // contains some different data format!\n return parseDateAndConvertTimeZoneToLocal(value, previousDate);\n }\n ctrl.$$parserName = type;\n return undefined;\n });\n\n ctrl.$formatters.push(function(value) {\n if (value && !isDate(value)) {\n throw ngModelMinErr('datefmt', 'Expected `{0}` to be a date', value);\n }\n if (isValidDate(value)) {\n previousDate = value;\n var timezone = ctrl.$options.getOption('timezone');\n if (timezone) {\n previousTimezone = timezone;\n previousDate = convertTimezoneToLocal(previousDate, timezone, true);\n }\n return $filter('date')(value, format, timezone);\n } else {\n previousDate = null;\n previousTimezone = null;\n return '';\n }\n });\n\n if (isDefined(attr.min) || attr.ngMin) {\n var minVal;\n ctrl.$validators.min = function(value) {\n return !isValidDate(value) || isUndefined(minVal) || parseDate(value) >= minVal;\n };\n attr.$observe('min', function(val) {\n minVal = parseObservedDateValue(val);\n ctrl.$validate();\n });\n }\n\n if (isDefined(attr.max) || attr.ngMax) {\n var maxVal;\n ctrl.$validators.max = function(value) {\n return !isValidDate(value) || isUndefined(maxVal) || parseDate(value) <= maxVal;\n };\n attr.$observe('max', function(val) {\n maxVal = parseObservedDateValue(val);\n ctrl.$validate();\n });\n }\n\n function isValidDate(value) {\n // Invalid Date: getTime() returns NaN\n return value && !(value.getTime && value.getTime() !== value.getTime());\n }\n\n function parseObservedDateValue(val) {\n return isDefined(val) && !isDate(val) ? parseDateAndConvertTimeZoneToLocal(val) || undefined : val;\n }\n\n function parseDateAndConvertTimeZoneToLocal(value, previousDate) {\n var timezone = ctrl.$options.getOption('timezone');\n\n if (previousTimezone && previousTimezone !== timezone) {\n // If the timezone has changed, adjust the previousDate to the default timezone\n // so that the new date is converted with the correct timezone offset\n previousDate = addDateMinutes(previousDate, timezoneToOffset(previousTimezone));\n }\n\n var parsedDate = parseDate(value, previousDate);\n\n if (!isNaN(parsedDate) && timezone) {\n parsedDate = convertTimezoneToLocal(parsedDate, timezone);\n }\n return parsedDate;\n }\n };\n}\n\nfunction badInputChecker(scope, element, attr, ctrl, parserName) {\n var node = element[0];\n var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity);\n if (nativeValidation) {\n ctrl.$parsers.push(function(value) {\n var validity = element.prop(VALIDITY_STATE_PROPERTY) || {};\n if (validity.badInput || validity.typeMismatch) {\n ctrl.$$parserName = parserName;\n return undefined;\n }\n\n return value;\n });\n }\n}\n\nfunction numberFormatterParser(ctrl) {\n ctrl.$parsers.push(function(value) {\n if (ctrl.$isEmpty(value)) return null;\n if (NUMBER_REGEXP.test(value)) return parseFloat(value);\n\n ctrl.$$parserName = 'number';\n return undefined;\n });\n\n ctrl.$formatters.push(function(value) {\n if (!ctrl.$isEmpty(value)) {\n if (!isNumber(value)) {\n throw ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);\n }\n value = value.toString();\n }\n return value;\n });\n}\n\nfunction parseNumberAttrVal(val) {\n if (isDefined(val) && !isNumber(val)) {\n val = parseFloat(val);\n }\n return !isNumberNaN(val) ? val : undefined;\n}\n\nfunction isNumberInteger(num) {\n // See http://stackoverflow.com/questions/14636536/how-to-check-if-a-variable-is-an-integer-in-javascript#14794066\n // (minus the assumption that `num` is a number)\n\n // eslint-disable-next-line no-bitwise\n return (num | 0) === num;\n}\n\nfunction countDecimals(num) {\n var numString = num.toString();\n var decimalSymbolIndex = numString.indexOf('.');\n\n if (decimalSymbolIndex === -1) {\n if (-1 < num && num < 1) {\n // It may be in the exponential notation format (`1e-X`)\n var match = /e-(\\d+)$/.exec(numString);\n\n if (match) {\n return Number(match[1]);\n }\n }\n\n return 0;\n }\n\n return numString.length - decimalSymbolIndex - 1;\n}\n\nfunction isValidForStep(viewValue, stepBase, step) {\n // At this point `stepBase` and `step` are expected to be non-NaN values\n // and `viewValue` is expected to be a valid stringified number.\n var value = Number(viewValue);\n\n var isNonIntegerValue = !isNumberInteger(value);\n var isNonIntegerStepBase = !isNumberInteger(stepBase);\n var isNonIntegerStep = !isNumberInteger(step);\n\n // Due to limitations in Floating Point Arithmetic (e.g. `0.3 - 0.2 !== 0.1` or\n // `0.5 % 0.1 !== 0`), we need to convert all numbers to integers.\n if (isNonIntegerValue || isNonIntegerStepBase || isNonIntegerStep) {\n var valueDecimals = isNonIntegerValue ? countDecimals(value) : 0;\n var stepBaseDecimals = isNonIntegerStepBase ? countDecimals(stepBase) : 0;\n var stepDecimals = isNonIntegerStep ? countDecimals(step) : 0;\n\n var decimalCount = Math.max(valueDecimals, stepBaseDecimals, stepDecimals);\n var multiplier = Math.pow(10, decimalCount);\n\n value = value * multiplier;\n stepBase = stepBase * multiplier;\n step = step * multiplier;\n\n if (isNonIntegerValue) value = Math.round(value);\n if (isNonIntegerStepBase) stepBase = Math.round(stepBase);\n if (isNonIntegerStep) step = Math.round(step);\n }\n\n return (value - stepBase) % step === 0;\n}\n\nfunction numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n badInputChecker(scope, element, attr, ctrl, 'number');\n numberFormatterParser(ctrl);\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n var minVal;\n var maxVal;\n\n if (isDefined(attr.min) || attr.ngMin) {\n ctrl.$validators.min = function(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || isUndefined(minVal) || viewValue >= minVal;\n };\n\n attr.$observe('min', function(val) {\n minVal = parseNumberAttrVal(val);\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n\n if (isDefined(attr.max) || attr.ngMax) {\n ctrl.$validators.max = function(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || isUndefined(maxVal) || viewValue <= maxVal;\n };\n\n attr.$observe('max', function(val) {\n maxVal = parseNumberAttrVal(val);\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n\n if (isDefined(attr.step) || attr.ngStep) {\n var stepVal;\n ctrl.$validators.step = function(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || isUndefined(stepVal) ||\n isValidForStep(viewValue, minVal || 0, stepVal);\n };\n\n attr.$observe('step', function(val) {\n stepVal = parseNumberAttrVal(val);\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n}\n\nfunction rangeInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n badInputChecker(scope, element, attr, ctrl, 'range');\n numberFormatterParser(ctrl);\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n var supportsRange = ctrl.$$hasNativeValidators && element[0].type === 'range',\n minVal = supportsRange ? 0 : undefined,\n maxVal = supportsRange ? 100 : undefined,\n stepVal = supportsRange ? 1 : undefined,\n validity = element[0].validity,\n hasMinAttr = isDefined(attr.min),\n hasMaxAttr = isDefined(attr.max),\n hasStepAttr = isDefined(attr.step);\n\n var originalRender = ctrl.$render;\n\n ctrl.$render = supportsRange && isDefined(validity.rangeUnderflow) && isDefined(validity.rangeOverflow) ?\n //Browsers that implement range will set these values automatically, but reading the adjusted values after\n //$render would cause the min / max validators to be applied with the wrong value\n function rangeRender() {\n originalRender();\n ctrl.$setViewValue(element.val());\n } :\n originalRender;\n\n if (hasMinAttr) {\n ctrl.$validators.min = supportsRange ?\n // Since all browsers set the input to a valid value, we don't need to check validity\n function noopMinValidator() { return true; } :\n // non-support browsers validate the min val\n function minValidator(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || isUndefined(minVal) || viewValue >= minVal;\n };\n\n setInitialValueAndObserver('min', minChange);\n }\n\n if (hasMaxAttr) {\n ctrl.$validators.max = supportsRange ?\n // Since all browsers set the input to a valid value, we don't need to check validity\n function noopMaxValidator() { return true; } :\n // non-support browsers validate the max val\n function maxValidator(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || isUndefined(maxVal) || viewValue <= maxVal;\n };\n\n setInitialValueAndObserver('max', maxChange);\n }\n\n if (hasStepAttr) {\n ctrl.$validators.step = supportsRange ?\n function nativeStepValidator() {\n // Currently, only FF implements the spec on step change correctly (i.e. adjusting the\n // input element value to a valid value). It's possible that other browsers set the stepMismatch\n // validity error instead, so we can at least report an error in that case.\n return !validity.stepMismatch;\n } :\n // ngStep doesn't set the setp attr, so the browser doesn't adjust the input value as setting step would\n function stepValidator(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || isUndefined(stepVal) ||\n isValidForStep(viewValue, minVal || 0, stepVal);\n };\n\n setInitialValueAndObserver('step', stepChange);\n }\n\n function setInitialValueAndObserver(htmlAttrName, changeFn) {\n // interpolated attributes set the attribute value only after a digest, but we need the\n // attribute value when the input is first rendered, so that the browser can adjust the\n // input value based on the min/max value\n element.attr(htmlAttrName, attr[htmlAttrName]);\n attr.$observe(htmlAttrName, changeFn);\n }\n\n function minChange(val) {\n minVal = parseNumberAttrVal(val);\n // ignore changes before model is initialized\n if (isNumberNaN(ctrl.$modelValue)) {\n return;\n }\n\n if (supportsRange) {\n var elVal = element.val();\n // IE11 doesn't set the el val correctly if the minVal is greater than the element value\n if (minVal > elVal) {\n elVal = minVal;\n element.val(elVal);\n }\n ctrl.$setViewValue(elVal);\n } else {\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n }\n }\n\n function maxChange(val) {\n maxVal = parseNumberAttrVal(val);\n // ignore changes before model is initialized\n if (isNumberNaN(ctrl.$modelValue)) {\n return;\n }\n\n if (supportsRange) {\n var elVal = element.val();\n // IE11 doesn't set the el val correctly if the maxVal is less than the element value\n if (maxVal < elVal) {\n element.val(maxVal);\n // IE11 and Chrome don't set the value to the minVal when max < min\n elVal = maxVal < minVal ? minVal : maxVal;\n }\n ctrl.$setViewValue(elVal);\n } else {\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n }\n }\n\n function stepChange(val) {\n stepVal = parseNumberAttrVal(val);\n // ignore changes before model is initialized\n if (isNumberNaN(ctrl.$modelValue)) {\n return;\n }\n\n // Some browsers don't adjust the input value correctly, but set the stepMismatch error\n if (supportsRange && ctrl.$viewValue !== element.val()) {\n ctrl.$setViewValue(element.val());\n } else {\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n }\n }\n}\n\nfunction urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$validators.url = function(modelValue, viewValue) {\n var value = modelValue || viewValue;\n return ctrl.$isEmpty(value) || URL_REGEXP.test(value);\n };\n}\n\nfunction emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$validators.email = function(modelValue, viewValue) {\n var value = modelValue || viewValue;\n return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);\n };\n}\n\nfunction radioInputType(scope, element, attr, ctrl) {\n var doTrim = !attr.ngTrim || trim(attr.ngTrim) !== 'false';\n // make the name unique, if not defined\n if (isUndefined(attr.name)) {\n element.attr('name', nextUid());\n }\n\n var listener = function(ev) {\n var value;\n if (element[0].checked) {\n value = attr.value;\n if (doTrim) {\n value = trim(value);\n }\n ctrl.$setViewValue(value, ev && ev.type);\n }\n };\n\n element.on('change', listener);\n\n ctrl.$render = function() {\n var value = attr.value;\n if (doTrim) {\n value = trim(value);\n }\n element[0].checked = (value === ctrl.$viewValue);\n };\n\n attr.$observe('value', ctrl.$render);\n}\n\nfunction parseConstantExpr($parse, context, name, expression, fallback) {\n var parseFn;\n if (isDefined(expression)) {\n parseFn = $parse(expression);\n if (!parseFn.constant) {\n throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +\n '`{1}`.', name, expression);\n }\n return parseFn(context);\n }\n return fallback;\n}\n\nfunction checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {\n var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);\n var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false);\n\n var listener = function(ev) {\n ctrl.$setViewValue(element[0].checked, ev && ev.type);\n };\n\n element.on('change', listener);\n\n ctrl.$render = function() {\n element[0].checked = ctrl.$viewValue;\n };\n\n // Override the standard `$isEmpty` because the $viewValue of an empty checkbox is always set to `false`\n // This is because of the parser below, which compares the `$modelValue` with `trueValue` to convert\n // it to a boolean.\n ctrl.$isEmpty = function(value) {\n return value === false;\n };\n\n ctrl.$formatters.push(function(value) {\n return equals(value, trueValue);\n });\n\n ctrl.$parsers.push(function(value) {\n return value ? trueValue : falseValue;\n });\n}\n\n\n/**\n * @ngdoc directive\n * @name textarea\n * @restrict E\n *\n * @description\n * HTML textarea element control with AngularJS data-binding. The data-binding and validation\n * properties of this element are exactly the same as those of the\n * {@link ng.directive:input input element}.\n *\n * @param {string} ngModel Assignable AngularJS expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any\n * length.\n * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}\n * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.\n * If the expression evaluates to a RegExp object, then this is used directly.\n * If the expression evaluates to a string, then it will be converted to a RegExp\n * after wrapping it in `^` and `$` characters. For instance, `\"abc\"` will be converted to\n * `new RegExp('^abc$')`.
\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n * @param {string=} ngChange AngularJS expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false AngularJS will not automatically trim the input.\n *\n * @knownIssue\n *\n * When specifying the `placeholder` attribute of `\n *
{{ list | json }}
\n * \n * \n * it(\"should split the text by newlines\", function() {\n * var listInput = element(by.model('list'));\n * var output = element(by.binding('list | json'));\n * listInput.sendKeys('abc\\ndef\\nghi');\n * expect(output.getText()).toContain('[\\n \"abc\",\\n \"def\",\\n \"ghi\"\\n]');\n * });\n * \n * \n *\n */\nvar ngListDirective = function() {\n return {\n restrict: 'A',\n priority: 100,\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n var ngList = attr.ngList || ', ';\n var trimValues = attr.ngTrim !== 'false';\n var separator = trimValues ? trim(ngList) : ngList;\n\n var parse = function(viewValue) {\n // If the viewValue is invalid (say required but empty) it will be `undefined`\n if (isUndefined(viewValue)) return;\n\n var list = [];\n\n if (viewValue) {\n forEach(viewValue.split(separator), function(value) {\n if (value) list.push(trimValues ? trim(value) : value);\n });\n }\n\n return list;\n };\n\n ctrl.$parsers.push(parse);\n ctrl.$formatters.push(function(value) {\n if (isArray(value)) {\n return value.join(ngList);\n }\n\n return undefined;\n });\n\n // Override the standard $isEmpty because an empty array means the input is empty.\n ctrl.$isEmpty = function(value) {\n return !value || !value.length;\n };\n }\n };\n};\n\n/* global VALID_CLASS: true,\n INVALID_CLASS: true,\n PRISTINE_CLASS: true,\n DIRTY_CLASS: true,\n UNTOUCHED_CLASS: true,\n TOUCHED_CLASS: true,\n PENDING_CLASS: true,\n addSetValidityMethod: true,\n setupValidity: true,\n defaultModelOptions: false\n*/\n\n\nvar VALID_CLASS = 'ng-valid',\n INVALID_CLASS = 'ng-invalid',\n PRISTINE_CLASS = 'ng-pristine',\n DIRTY_CLASS = 'ng-dirty',\n UNTOUCHED_CLASS = 'ng-untouched',\n TOUCHED_CLASS = 'ng-touched',\n EMPTY_CLASS = 'ng-empty',\n NOT_EMPTY_CLASS = 'ng-not-empty';\n\nvar ngModelMinErr = minErr('ngModel');\n\n/**\n * @ngdoc type\n * @name ngModel.NgModelController\n * @property {*} $viewValue The actual value from the control's view. For `input` elements, this is a\n * String. See {@link ngModel.NgModelController#$setViewValue} for information about when the $viewValue\n * is set.\n *\n * @property {*} $modelValue The value in the model that the control is bound to.\n *\n * @property {Array.} $parsers Array of functions to execute, as a pipeline, whenever\n * the control updates the ngModelController with a new {@link ngModel.NgModelController#$viewValue\n `$viewValue`} from the DOM, usually via user input.\n See {@link ngModel.NgModelController#$setViewValue `$setViewValue()`} for a detailed lifecycle explanation.\n Note that the `$parsers` are not called when the bound ngModel expression changes programmatically.\n\n The functions are called in array order, each passing\n its return value through to the next. The last return value is forwarded to the\n {@link ngModel.NgModelController#$validators `$validators`} collection.\n\n Parsers are used to sanitize / convert the {@link ngModel.NgModelController#$viewValue\n `$viewValue`}.\n\n Returning `undefined` from a parser means a parse error occurred. In that case,\n no {@link ngModel.NgModelController#$validators `$validators`} will run and the `ngModel`\n will be set to `undefined` unless {@link ngModelOptions `ngModelOptions.allowInvalid`}\n is set to `true`. The parse error is stored in `ngModel.$error.parse`.\n\n This simple example shows a parser that would convert text input value to lowercase:\n * ```js\n * function parse(value) {\n * if (value) {\n * return value.toLowerCase();\n * }\n * }\n * ngModelController.$parsers.push(parse);\n * ```\n\n *\n * @property {Array.} $formatters Array of functions to execute, as a pipeline, whenever\n the bound ngModel expression changes programmatically. The `$formatters` are not called when the\n value of the control is changed by user interaction.\n\n Formatters are used to format / convert the {@link ngModel.NgModelController#$modelValue\n `$modelValue`} for display in the control.\n\n The functions are called in reverse array order, each passing the value through to the\n next. The last return value is used as the actual DOM value.\n\n This simple example shows a formatter that would convert the model value to uppercase:\n\n * ```js\n * function format(value) {\n * if (value) {\n * return value.toUpperCase();\n * }\n * }\n * ngModel.$formatters.push(format);\n * ```\n *\n * @property {Object.} $validators A collection of validators that are applied\n * whenever the model value changes. The key value within the object refers to the name of the\n * validator while the function refers to the validation operation. The validation operation is\n * provided with the model value as an argument and must return a true or false value depending\n * on the response of that validation.\n *\n * ```js\n * ngModel.$validators.validCharacters = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n * return /[0-9]+/.test(value) &&\n * /[a-z]+/.test(value) &&\n * /[A-Z]+/.test(value) &&\n * /\\W+/.test(value);\n * };\n * ```\n *\n * @property {Object.} $asyncValidators A collection of validations that are expected to\n * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided\n * is expected to return a promise when it is run during the model validation process. Once the promise\n * is delivered then the validation status will be set to true when fulfilled and false when rejected.\n * When the asynchronous validators are triggered, each of the validators will run in parallel and the model\n * value will only be updated once all validators have been fulfilled. As long as an asynchronous validator\n * is unfulfilled, its key will be added to the controllers `$pending` property. Also, all asynchronous validators\n * will only run once all synchronous validators have passed.\n *\n * Please note that if $http is used then it is important that the server returns a success HTTP response code\n * in order to fulfill the validation and a status level of `4xx` in order to reject the validation.\n *\n * ```js\n * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n *\n * // Lookup user by username\n * return $http.get('/api/users/' + value).\n * then(function resolved() {\n * //username exists, this means validation fails\n * return $q.reject('exists');\n * }, function rejected() {\n * //username does not exist, therefore this validation passes\n * return true;\n * });\n * };\n * ```\n *\n * @property {Array.} $viewChangeListeners Array of functions to execute whenever\n * a change to {@link ngModel.NgModelController#$viewValue `$viewValue`} has caused a change\n * to {@link ngModel.NgModelController#$modelValue `$modelValue`}.\n * It is called with no arguments, and its return value is ignored.\n * This can be used in place of additional $watches against the model value.\n *\n * @property {Object} $error An object hash with all failing validator ids as keys.\n * @property {Object} $pending An object hash with all pending validator ids as keys.\n *\n * @property {boolean} $untouched True if control has not lost focus yet.\n * @property {boolean} $touched True if control has lost focus.\n * @property {boolean} $pristine True if user has not interacted with the control yet.\n * @property {boolean} $dirty True if user has already interacted with the control.\n * @property {boolean} $valid True if there is no error.\n * @property {boolean} $invalid True if at least one error on the control.\n * @property {string} $name The name attribute of the control.\n *\n * @description\n *\n * `NgModelController` provides API for the {@link ngModel `ngModel`} directive.\n * The controller contains services for data-binding, validation, CSS updates, and value formatting\n * and parsing. It purposefully does not contain any logic which deals with DOM rendering or\n * listening to DOM events.\n * Such DOM related logic should be provided by other directives which make use of\n * `NgModelController` for data-binding to control elements.\n * AngularJS provides this DOM logic for most {@link input `input`} elements.\n * At the end of this page you can find a {@link ngModel.NgModelController#custom-control-example\n * custom control example} that uses `ngModelController` to bind to `contenteditable` elements.\n *\n * @example\n * ### Custom Control Example\n * This example shows how to use `NgModelController` with a custom control to achieve\n * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)\n * collaborate together to achieve the desired result.\n *\n * `contenteditable` is an HTML5 attribute, which tells the browser to let the element\n * contents be edited in place by the user.\n *\n * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}\n * module to automatically remove \"bad\" content like inline event listener (e.g. ``).\n * However, as we are using `$sce` the model can still decide to provide unsafe content if it marks\n * that content using the `$sce` service.\n *\n * \n \n [contenteditable] {\n border: 1px solid black;\n background-color: white;\n min-height: 20px;\n }\n\n .ng-invalid {\n border: 1px solid red;\n }\n\n \n \n angular.module('customControl', ['ngSanitize']).\n directive('contenteditable', ['$sce', function($sce) {\n return {\n restrict: 'A', // only activate on element attribute\n require: '?ngModel', // get a hold of NgModelController\n link: function(scope, element, attrs, ngModel) {\n if (!ngModel) return; // do nothing if no ng-model\n\n // Specify how UI should be updated\n ngModel.$render = function() {\n element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));\n };\n\n // Listen for change events to enable binding\n element.on('blur keyup change', function() {\n scope.$evalAsync(read);\n });\n read(); // initialize\n\n // Write data to the model\n function read() {\n var html = element.html();\n // When we clear the content editable the browser leaves a
behind\n // If strip-br attribute is provided then we strip this out\n if (attrs.stripBr && html === '
') {\n html = '';\n }\n ngModel.$setViewValue(html);\n }\n }\n };\n }]);\n
\n \n
\n
Change me!
\n Required!\n
\n \n
\n
\n \n it('should data-bind and become invalid', function() {\n if (browser.params.browser === 'safari' || browser.params.browser === 'firefox') {\n // SafariDriver can't handle contenteditable\n // and Firefox driver can't clear contenteditables very well\n return;\n }\n var contentEditable = element(by.css('[contenteditable]'));\n var content = 'Change me!';\n\n expect(contentEditable.getText()).toEqual(content);\n\n contentEditable.clear();\n contentEditable.sendKeys(protractor.Key.BACK_SPACE);\n expect(contentEditable.getText()).toEqual('');\n expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);\n });\n \n *
\n *\n *\n */\nNgModelController.$inject = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$q', '$interpolate'];\nfunction NgModelController($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate) {\n this.$viewValue = Number.NaN;\n this.$modelValue = Number.NaN;\n this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity.\n this.$validators = {};\n this.$asyncValidators = {};\n this.$parsers = [];\n this.$formatters = [];\n this.$viewChangeListeners = [];\n this.$untouched = true;\n this.$touched = false;\n this.$pristine = true;\n this.$dirty = false;\n this.$valid = true;\n this.$invalid = false;\n this.$error = {}; // keep invalid keys here\n this.$$success = {}; // keep valid keys here\n this.$pending = undefined; // keep pending keys here\n this.$name = $interpolate($attr.name || '', false)($scope);\n this.$$parentForm = nullFormCtrl;\n this.$options = defaultModelOptions;\n this.$$updateEvents = '';\n // Attach the correct context to the event handler function for updateOn\n this.$$updateEventHandler = this.$$updateEventHandler.bind(this);\n\n this.$$parsedNgModel = $parse($attr.ngModel);\n this.$$parsedNgModelAssign = this.$$parsedNgModel.assign;\n this.$$ngModelGet = this.$$parsedNgModel;\n this.$$ngModelSet = this.$$parsedNgModelAssign;\n this.$$pendingDebounce = null;\n this.$$parserValid = undefined;\n this.$$parserName = 'parse';\n\n this.$$currentValidationRunId = 0;\n\n this.$$scope = $scope;\n this.$$attr = $attr;\n this.$$element = $element;\n this.$$animate = $animate;\n this.$$timeout = $timeout;\n this.$$parse = $parse;\n this.$$q = $q;\n this.$$exceptionHandler = $exceptionHandler;\n\n setupValidity(this);\n setupModelWatcher(this);\n}\n\nNgModelController.prototype = {\n $$initGetterSetters: function() {\n if (this.$options.getOption('getterSetter')) {\n var invokeModelGetter = this.$$parse(this.$$attr.ngModel + '()'),\n invokeModelSetter = this.$$parse(this.$$attr.ngModel + '($$$p)');\n\n this.$$ngModelGet = function($scope) {\n var modelValue = this.$$parsedNgModel($scope);\n if (isFunction(modelValue)) {\n modelValue = invokeModelGetter($scope);\n }\n return modelValue;\n };\n this.$$ngModelSet = function($scope, newValue) {\n if (isFunction(this.$$parsedNgModel($scope))) {\n invokeModelSetter($scope, {$$$p: newValue});\n } else {\n this.$$parsedNgModelAssign($scope, newValue);\n }\n };\n } else if (!this.$$parsedNgModel.assign) {\n throw ngModelMinErr('nonassign', 'Expression \\'{0}\\' is non-assignable. Element: {1}',\n this.$$attr.ngModel, startingTag(this.$$element));\n }\n },\n\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$render\n *\n * @description\n * Called when the view needs to be updated. It is expected that the user of the ng-model\n * directive will implement this method.\n *\n * The `$render()` method is invoked in the following situations:\n *\n * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last\n * committed value then `$render()` is called to update the input control.\n * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and\n * the `$viewValue` are different from last time.\n *\n * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of\n * `$modelValue` and `$viewValue` are actually different from their previous values. If `$modelValue`\n * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be\n * invoked if you only change a property on the objects.\n */\n $render: noop,\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$isEmpty\n *\n * @description\n * This is called when we need to determine if the value of an input is empty.\n *\n * For instance, the required directive does this to work out if the input has data or not.\n *\n * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.\n *\n * You can override this for input directives whose concept of being empty is different from the\n * default. The `checkboxInputType` directive does this because in its case a value of `false`\n * implies empty.\n *\n * @param {*} value The value of the input to check for emptiness.\n * @returns {boolean} True if `value` is \"empty\".\n */\n $isEmpty: function(value) {\n // eslint-disable-next-line no-self-compare\n return isUndefined(value) || value === '' || value === null || value !== value;\n },\n\n $$updateEmptyClasses: function(value) {\n if (this.$isEmpty(value)) {\n this.$$animate.removeClass(this.$$element, NOT_EMPTY_CLASS);\n this.$$animate.addClass(this.$$element, EMPTY_CLASS);\n } else {\n this.$$animate.removeClass(this.$$element, EMPTY_CLASS);\n this.$$animate.addClass(this.$$element, NOT_EMPTY_CLASS);\n }\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setPristine\n *\n * @description\n * Sets the control to its pristine state.\n *\n * This method can be called to remove the `ng-dirty` class and set the control to its pristine\n * state (`ng-pristine` class). A model is considered to be pristine when the control\n * has not been changed from when first compiled.\n */\n $setPristine: function() {\n this.$dirty = false;\n this.$pristine = true;\n this.$$animate.removeClass(this.$$element, DIRTY_CLASS);\n this.$$animate.addClass(this.$$element, PRISTINE_CLASS);\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setDirty\n *\n * @description\n * Sets the control to its dirty state.\n *\n * This method can be called to remove the `ng-pristine` class and set the control to its dirty\n * state (`ng-dirty` class). A model is considered to be dirty when the control has been changed\n * from when first compiled.\n */\n $setDirty: function() {\n this.$dirty = true;\n this.$pristine = false;\n this.$$animate.removeClass(this.$$element, PRISTINE_CLASS);\n this.$$animate.addClass(this.$$element, DIRTY_CLASS);\n this.$$parentForm.$setDirty();\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setUntouched\n *\n * @description\n * Sets the control to its untouched state.\n *\n * This method can be called to remove the `ng-touched` class and set the control to its\n * untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched\n * by default, however this function can be used to restore that state if the model has\n * already been touched by the user.\n */\n $setUntouched: function() {\n this.$touched = false;\n this.$untouched = true;\n this.$$animate.setClass(this.$$element, UNTOUCHED_CLASS, TOUCHED_CLASS);\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setTouched\n *\n * @description\n * Sets the control to its touched state.\n *\n * This method can be called to remove the `ng-untouched` class and set the control to its\n * touched state (`ng-touched` class). A model is considered to be touched when the user has\n * first focused the control element and then shifted focus away from the control (blur event).\n */\n $setTouched: function() {\n this.$touched = true;\n this.$untouched = false;\n this.$$animate.setClass(this.$$element, TOUCHED_CLASS, UNTOUCHED_CLASS);\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$rollbackViewValue\n *\n * @description\n * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`,\n * which may be caused by a pending debounced event or because the input is waiting for some\n * future event.\n *\n * If you have an input that uses `ng-model-options` to set up debounced updates or updates that\n * depend on special events such as `blur`, there can be a period when the `$viewValue` is out of\n * sync with the ngModel's `$modelValue`.\n *\n * In this case, you can use `$rollbackViewValue()` to manually cancel the debounced / future update\n * and reset the input to the last committed view value.\n *\n * It is also possible that you run into difficulties if you try to update the ngModel's `$modelValue`\n * programmatically before these debounced/future events have resolved/occurred, because AngularJS's\n * dirty checking mechanism is not able to tell whether the model has actually changed or not.\n *\n * The `$rollbackViewValue()` method should be called before programmatically changing the model of an\n * input which may have such events pending. This is important in order to make sure that the\n * input field will be updated with the new model value and any pending operations are cancelled.\n *\n * @example\n * \n * \n * angular.module('cancel-update-example', [])\n *\n * .controller('CancelUpdateController', ['$scope', function($scope) {\n * $scope.model = {value1: '', value2: ''};\n *\n * $scope.setEmpty = function(e, value, rollback) {\n * if (e.keyCode === 27) {\n * e.preventDefault();\n * if (rollback) {\n * $scope.myForm[value].$rollbackViewValue();\n * }\n * $scope.model[value] = '';\n * }\n * };\n * }]);\n * \n * \n *
\n *

Both of these inputs are only updated if they are blurred. Hitting escape should\n * empty them. Follow these steps and observe the difference:

\n *
    \n *
  1. Type something in the input. You will see that the model is not yet updated
  2. \n *
  3. Press the Escape key.\n *
      \n *
    1. In the first example, nothing happens, because the model is already '', and no\n * update is detected. If you blur the input, the model will be set to the current view.\n *
    2. \n *
    3. In the second example, the pending update is cancelled, and the input is set back\n * to the last committed view value (''). Blurring the input does nothing.\n *
    4. \n *
    \n *
  4. \n *
\n *\n *
\n *
\n *

Without $rollbackViewValue():

\n * \n * value1: \"{{ model.value1 }}\"\n *
\n *\n *
\n *

With $rollbackViewValue():

\n * \n * value2: \"{{ model.value2 }}\"\n *
\n *
\n *
\n *
\n \n div {\n display: table-cell;\n }\n div:nth-child(1) {\n padding-right: 30px;\n }\n\n \n *
\n */\n $rollbackViewValue: function() {\n this.$$timeout.cancel(this.$$pendingDebounce);\n this.$viewValue = this.$$lastCommittedViewValue;\n this.$render();\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$validate\n *\n * @description\n * Runs each of the registered validators (first synchronous validators and then\n * asynchronous validators).\n * If the validity changes to invalid, the model will be set to `undefined`,\n * unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`.\n * If the validity changes to valid, it will set the model to the last available valid\n * `$modelValue`, i.e. either the last parsed value or the last value set from the scope.\n */\n $validate: function() {\n // ignore $validate before model is initialized\n if (isNumberNaN(this.$modelValue)) {\n return;\n }\n\n var viewValue = this.$$lastCommittedViewValue;\n // Note: we use the $$rawModelValue as $modelValue might have been\n // set to undefined during a view -> model update that found validation\n // errors. We can't parse the view here, since that could change\n // the model although neither viewValue nor the model on the scope changed\n var modelValue = this.$$rawModelValue;\n\n var prevValid = this.$valid;\n var prevModelValue = this.$modelValue;\n\n var allowInvalid = this.$options.getOption('allowInvalid');\n\n var that = this;\n this.$$runValidators(modelValue, viewValue, function(allValid) {\n // If there was no change in validity, don't update the model\n // This prevents changing an invalid modelValue to undefined\n if (!allowInvalid && prevValid !== allValid) {\n // Note: Don't check this.$valid here, as we could have\n // external validators (e.g. calculated on the server),\n // that just call $setValidity and need the model value\n // to calculate their validity.\n that.$modelValue = allValid ? modelValue : undefined;\n\n if (that.$modelValue !== prevModelValue) {\n that.$$writeModelToScope();\n }\n }\n });\n },\n\n $$runValidators: function(modelValue, viewValue, doneCallback) {\n this.$$currentValidationRunId++;\n var localValidationRunId = this.$$currentValidationRunId;\n var that = this;\n\n // check parser error\n if (!processParseErrors()) {\n validationDone(false);\n return;\n }\n if (!processSyncValidators()) {\n validationDone(false);\n return;\n }\n processAsyncValidators();\n\n function processParseErrors() {\n var errorKey = that.$$parserName;\n\n if (isUndefined(that.$$parserValid)) {\n setValidity(errorKey, null);\n } else {\n if (!that.$$parserValid) {\n forEach(that.$validators, function(v, name) {\n setValidity(name, null);\n });\n forEach(that.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n }\n\n // Set the parse error last, to prevent unsetting it, should a $validators key == parserName\n setValidity(errorKey, that.$$parserValid);\n return that.$$parserValid;\n }\n return true;\n }\n\n function processSyncValidators() {\n var syncValidatorsValid = true;\n forEach(that.$validators, function(validator, name) {\n var result = Boolean(validator(modelValue, viewValue));\n syncValidatorsValid = syncValidatorsValid && result;\n setValidity(name, result);\n });\n if (!syncValidatorsValid) {\n forEach(that.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n return false;\n }\n return true;\n }\n\n function processAsyncValidators() {\n var validatorPromises = [];\n var allValid = true;\n forEach(that.$asyncValidators, function(validator, name) {\n var promise = validator(modelValue, viewValue);\n if (!isPromiseLike(promise)) {\n throw ngModelMinErr('nopromise',\n 'Expected asynchronous validator to return a promise but got \\'{0}\\' instead.', promise);\n }\n setValidity(name, undefined);\n validatorPromises.push(promise.then(function() {\n setValidity(name, true);\n }, function() {\n allValid = false;\n setValidity(name, false);\n }));\n });\n if (!validatorPromises.length) {\n validationDone(true);\n } else {\n that.$$q.all(validatorPromises).then(function() {\n validationDone(allValid);\n }, noop);\n }\n }\n\n function setValidity(name, isValid) {\n if (localValidationRunId === that.$$currentValidationRunId) {\n that.$setValidity(name, isValid);\n }\n }\n\n function validationDone(allValid) {\n if (localValidationRunId === that.$$currentValidationRunId) {\n\n doneCallback(allValid);\n }\n }\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$commitViewValue\n *\n * @description\n * Commit a pending update to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n $commitViewValue: function() {\n var viewValue = this.$viewValue;\n\n this.$$timeout.cancel(this.$$pendingDebounce);\n\n // If the view value has not changed then we should just exit, except in the case where there is\n // a native validator on the element. In this case the validation state may have changed even though\n // the viewValue has stayed empty.\n if (this.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !this.$$hasNativeValidators)) {\n return;\n }\n this.$$updateEmptyClasses(viewValue);\n this.$$lastCommittedViewValue = viewValue;\n\n // change to dirty\n if (this.$pristine) {\n this.$setDirty();\n }\n this.$$parseAndValidate();\n },\n\n $$parseAndValidate: function() {\n var viewValue = this.$$lastCommittedViewValue;\n var modelValue = viewValue;\n var that = this;\n\n this.$$parserValid = isUndefined(modelValue) ? undefined : true;\n\n // Reset any previous parse error\n this.$setValidity(this.$$parserName, null);\n this.$$parserName = 'parse';\n\n if (this.$$parserValid) {\n for (var i = 0; i < this.$parsers.length; i++) {\n modelValue = this.$parsers[i](modelValue);\n if (isUndefined(modelValue)) {\n this.$$parserValid = false;\n break;\n }\n }\n }\n if (isNumberNaN(this.$modelValue)) {\n // this.$modelValue has not been touched yet...\n this.$modelValue = this.$$ngModelGet(this.$$scope);\n }\n var prevModelValue = this.$modelValue;\n var allowInvalid = this.$options.getOption('allowInvalid');\n this.$$rawModelValue = modelValue;\n\n if (allowInvalid) {\n this.$modelValue = modelValue;\n writeToModelIfNeeded();\n }\n\n // Pass the $$lastCommittedViewValue here, because the cached viewValue might be out of date.\n // This can happen if e.g. $setViewValue is called from inside a parser\n this.$$runValidators(modelValue, this.$$lastCommittedViewValue, function(allValid) {\n if (!allowInvalid) {\n // Note: Don't check this.$valid here, as we could have\n // external validators (e.g. calculated on the server),\n // that just call $setValidity and need the model value\n // to calculate their validity.\n that.$modelValue = allValid ? modelValue : undefined;\n writeToModelIfNeeded();\n }\n });\n\n function writeToModelIfNeeded() {\n if (that.$modelValue !== prevModelValue) {\n that.$$writeModelToScope();\n }\n }\n },\n\n $$writeModelToScope: function() {\n this.$$ngModelSet(this.$$scope, this.$modelValue);\n forEach(this.$viewChangeListeners, function(listener) {\n try {\n listener();\n } catch (e) {\n // eslint-disable-next-line no-invalid-this\n this.$$exceptionHandler(e);\n }\n }, this);\n },\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setViewValue\n *\n * @description\n * Update the view value.\n *\n * This method should be called when a control wants to change the view value; typically,\n * this is done from within a DOM event handler. For example, the {@link ng.directive:input input}\n * directive calls it when the value of the input changes and {@link ng.directive:select select}\n * calls it when an option is selected.\n *\n * When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers`\n * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged\n * value is sent directly for processing through the `$parsers` pipeline. After this, the `$validators` and\n * `$asyncValidators` are called and the value is applied to `$modelValue`.\n * Finally, the value is set to the **expression** specified in the `ng-model` attribute and\n * all the registered change listeners, in the `$viewChangeListeners` list are called.\n *\n * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`\n * and the `default` trigger is not listed, all those actions will remain pending until one of the\n * `updateOn` events is triggered on the DOM element.\n * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}\n * directive is used with a custom debounce for this particular event.\n * Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce`\n * is specified, once the timer runs out.\n *\n * When used with standard inputs, the view value will always be a string (which is in some cases\n * parsed into another type, such as a `Date` object for `input[date]`.)\n * However, custom controls might also pass objects to this method. In this case, we should make\n * a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not\n * perform a deep watch of objects, it only looks for a change of identity. If you only change\n * the property of the object then ngModel will not realize that the object has changed and\n * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should\n * not change properties of the copy once it has been passed to `$setViewValue`.\n * Otherwise you may cause the model value on the scope to change incorrectly.\n *\n *
\n * In any case, the value passed to the method should always reflect the current value\n * of the control. For example, if you are calling `$setViewValue` for an input element,\n * you should pass the input DOM value. Otherwise, the control and the scope model become\n * out of sync. It's also important to note that `$setViewValue` does not call `$render` or change\n * the control's DOM value in any way. If we want to change the control's DOM value\n * programmatically, we should update the `ngModel` scope expression. Its new value will be\n * picked up by the model controller, which will run it through the `$formatters`, `$render` it\n * to update the DOM, and finally call `$validate` on it.\n *
\n *\n * @param {*} value value from the view.\n * @param {string} trigger Event that triggered the update.\n */\n $setViewValue: function(value, trigger) {\n this.$viewValue = value;\n if (this.$options.getOption('updateOnDefault')) {\n this.$$debounceViewValueCommit(trigger);\n }\n },\n\n $$debounceViewValueCommit: function(trigger) {\n var debounceDelay = this.$options.getOption('debounce');\n\n if (isNumber(debounceDelay[trigger])) {\n debounceDelay = debounceDelay[trigger];\n } else if (isNumber(debounceDelay['default']) &&\n this.$options.getOption('updateOn').indexOf(trigger) === -1\n ) {\n debounceDelay = debounceDelay['default'];\n } else if (isNumber(debounceDelay['*'])) {\n debounceDelay = debounceDelay['*'];\n }\n\n this.$$timeout.cancel(this.$$pendingDebounce);\n var that = this;\n if (debounceDelay > 0) { // this fails if debounceDelay is an object\n this.$$pendingDebounce = this.$$timeout(function() {\n that.$commitViewValue();\n }, debounceDelay);\n } else if (this.$$scope.$root.$$phase) {\n this.$commitViewValue();\n } else {\n this.$$scope.$apply(function() {\n that.$commitViewValue();\n });\n }\n },\n\n /**\n * @ngdoc method\n *\n * @name ngModel.NgModelController#$overrideModelOptions\n *\n * @description\n *\n * Override the current model options settings programmatically.\n *\n * The previous `ModelOptions` value will not be modified. Instead, a\n * new `ModelOptions` object will inherit from the previous one overriding\n * or inheriting settings that are defined in the given parameter.\n *\n * See {@link ngModelOptions} for information about what options can be specified\n * and how model option inheritance works.\n *\n *
\n * **Note:** this function only affects the options set on the `ngModelController`,\n * and not the options on the {@link ngModelOptions} directive from which they might have been\n * obtained initially.\n *
\n *\n *
\n * **Note:** it is not possible to override the `getterSetter` option.\n *
\n *\n * @param {Object} options a hash of settings to override the previous options\n *\n */\n $overrideModelOptions: function(options) {\n this.$options = this.$options.createChild(options);\n this.$$setUpdateOnEvents();\n },\n\n /**\n * @ngdoc method\n *\n * @name ngModel.NgModelController#$processModelValue\n\n * @description\n *\n * Runs the model -> view pipeline on the current\n * {@link ngModel.NgModelController#$modelValue $modelValue}.\n *\n * The following actions are performed by this method:\n *\n * - the `$modelValue` is run through the {@link ngModel.NgModelController#$formatters $formatters}\n * and the result is set to the {@link ngModel.NgModelController#$viewValue $viewValue}\n * - the `ng-empty` or `ng-not-empty` class is set on the element\n * - if the `$viewValue` has changed:\n * - {@link ngModel.NgModelController#$render $render} is called on the control\n * - the {@link ngModel.NgModelController#$validators $validators} are run and\n * the validation status is set.\n *\n * This method is called by ngModel internally when the bound scope value changes.\n * Application developers usually do not have to call this function themselves.\n *\n * This function can be used when the `$viewValue` or the rendered DOM value are not correctly\n * formatted and the `$modelValue` must be run through the `$formatters` again.\n *\n * @example\n * Consider a text input with an autocomplete list (for fruit), where the items are\n * objects with a name and an id.\n * A user enters `ap` and then selects `Apricot` from the list.\n * Based on this, the autocomplete widget will call `$setViewValue({name: 'Apricot', id: 443})`,\n * but the rendered value will still be `ap`.\n * The widget can then call `ctrl.$processModelValue()` to run the model -> view\n * pipeline again, which formats the object to the string `Apricot`,\n * then updates the `$viewValue`, and finally renders it in the DOM.\n *\n * \n \n
\n
\n Search Fruit:\n \n
\n
\n Model:
\n
{{selectedFruit | json}}
\n
\n
\n
\n \n angular.module('inputExample', [])\n .controller('inputController', function($scope) {\n $scope.items = [\n {name: 'Apricot', id: 443},\n {name: 'Clementine', id: 972},\n {name: 'Durian', id: 169},\n {name: 'Jackfruit', id: 982},\n {name: 'Strawberry', id: 863}\n ];\n })\n .component('basicAutocomplete', {\n bindings: {\n items: '<',\n onSelect: '&'\n },\n templateUrl: 'autocomplete.html',\n controller: function($element, $scope) {\n var that = this;\n var ngModel;\n\n that.$postLink = function() {\n ngModel = $element.find('input').controller('ngModel');\n\n ngModel.$formatters.push(function(value) {\n return (value && value.name) || value;\n });\n\n ngModel.$parsers.push(function(value) {\n var match = value;\n for (var i = 0; i < that.items.length; i++) {\n if (that.items[i].name === value) {\n match = that.items[i];\n break;\n }\n }\n\n return match;\n });\n };\n\n that.selectItem = function(item) {\n ngModel.$setViewValue(item);\n ngModel.$processModelValue();\n that.onSelect({item: item});\n };\n }\n });\n \n \n
\n \n
    \n
  • \n \n
  • \n
\n
\n
\n *
\n *\n */\n $processModelValue: function() {\n var viewValue = this.$$format();\n\n if (this.$viewValue !== viewValue) {\n this.$$updateEmptyClasses(viewValue);\n this.$viewValue = this.$$lastCommittedViewValue = viewValue;\n this.$render();\n // It is possible that model and view value have been updated during render\n this.$$runValidators(this.$modelValue, this.$viewValue, noop);\n }\n },\n\n /**\n * This method is called internally to run the $formatters on the $modelValue\n */\n $$format: function() {\n var formatters = this.$formatters,\n idx = formatters.length;\n\n var viewValue = this.$modelValue;\n while (idx--) {\n viewValue = formatters[idx](viewValue);\n }\n\n return viewValue;\n },\n\n /**\n * This method is called internally when the bound scope value changes.\n */\n $$setModelValue: function(modelValue) {\n this.$modelValue = this.$$rawModelValue = modelValue;\n this.$$parserValid = undefined;\n this.$processModelValue();\n },\n\n $$setUpdateOnEvents: function() {\n if (this.$$updateEvents) {\n this.$$element.off(this.$$updateEvents, this.$$updateEventHandler);\n }\n\n this.$$updateEvents = this.$options.getOption('updateOn');\n if (this.$$updateEvents) {\n this.$$element.on(this.$$updateEvents, this.$$updateEventHandler);\n }\n },\n\n $$updateEventHandler: function(ev) {\n this.$$debounceViewValueCommit(ev && ev.type);\n }\n};\n\nfunction setupModelWatcher(ctrl) {\n // model -> value\n // Note: we cannot use a normal scope.$watch as we want to detect the following:\n // 1. scope value is 'a'\n // 2. user enters 'b'\n // 3. ng-change kicks in and reverts scope value to 'a'\n // -> scope value did not change since the last digest as\n // ng-change executes in apply phase\n // 4. view should be changed back to 'a'\n ctrl.$$scope.$watch(function ngModelWatch(scope) {\n var modelValue = ctrl.$$ngModelGet(scope);\n\n // if scope model value and ngModel value are out of sync\n // This cannot be moved to the action function, because it would not catch the\n // case where the model is changed in the ngChange function or the model setter\n if (modelValue !== ctrl.$modelValue &&\n // checks for NaN is needed to allow setting the model to NaN when there's an asyncValidator\n // eslint-disable-next-line no-self-compare\n (ctrl.$modelValue === ctrl.$modelValue || modelValue === modelValue)\n ) {\n ctrl.$$setModelValue(modelValue);\n }\n\n return modelValue;\n });\n}\n\n/**\n * @ngdoc method\n * @name ngModel.NgModelController#$setValidity\n *\n * @description\n * Change the validity state, and notify the form.\n *\n * This method can be called within $parsers/$formatters or a custom validation implementation.\n * However, in most cases it should be sufficient to use the `ngModel.$validators` and\n * `ngModel.$asyncValidators` collections which will call `$setValidity` automatically.\n *\n * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be assigned\n * to either `$error[validationErrorKey]` or `$pending[validationErrorKey]`\n * (for unfulfilled `$asyncValidators`), so that it is available for data-binding.\n * The `validationErrorKey` should be in camelCase and will get converted into dash-case\n * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`\n * classes and can be bound to as `{{ someForm.someControl.$error.myError }}`.\n * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined),\n * or skipped (null). Pending is used for unfulfilled `$asyncValidators`.\n * Skipped is used by AngularJS when validators do not run because of parse errors and\n * when `$asyncValidators` do not run because any of the `$validators` failed.\n */\naddSetValidityMethod({\n clazz: NgModelController,\n set: function(object, property) {\n object[property] = true;\n },\n unset: function(object, property) {\n delete object[property];\n }\n});\n\n\n/**\n * @ngdoc directive\n * @name ngModel\n * @restrict A\n * @priority 1\n * @param {expression} ngModel assignable {@link guide/expression Expression} to bind to.\n *\n * @description\n * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a\n * property on the scope using {@link ngModel.NgModelController NgModelController},\n * which is created and exposed by this directive.\n *\n * `ngModel` is responsible for:\n *\n * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`\n * require.\n * - Providing validation behavior (i.e. required, number, email, url).\n * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).\n * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`,\n * `ng-untouched`, `ng-empty`, `ng-not-empty`) including animations.\n * - Registering the control with its parent {@link ng.directive:form form}.\n *\n * Note: `ngModel` will try to bind to the property given by evaluating the expression on the\n * current scope. If the property doesn't already exist on this scope, it will be created\n * implicitly and added to the scope.\n *\n * For best practices on using `ngModel`, see:\n *\n * - [Understanding Scopes](https://github.com/angular/angular.js/wiki/Understanding-Scopes)\n *\n * For basic examples, how to use `ngModel`, see:\n *\n * - {@link ng.directive:input input}\n * - {@link input[text] text}\n * - {@link input[checkbox] checkbox}\n * - {@link input[radio] radio}\n * - {@link input[number] number}\n * - {@link input[email] email}\n * - {@link input[url] url}\n * - {@link input[date] date}\n * - {@link input[datetime-local] datetime-local}\n * - {@link input[time] time}\n * - {@link input[month] month}\n * - {@link input[week] week}\n * - {@link ng.directive:select select}\n * - {@link ng.directive:textarea textarea}\n *\n * ## Complex Models (objects or collections)\n *\n * By default, `ngModel` watches the model by reference, not value. This is important to know when\n * binding inputs to models that are objects (e.g. `Date`) or collections (e.g. arrays). If only properties of the\n * object or collection change, `ngModel` will not be notified and so the input will not be re-rendered.\n *\n * The model must be assigned an entirely new object or collection before a re-rendering will occur.\n *\n * Some directives have options that will cause them to use a custom `$watchCollection` on the model expression\n * - for example, `ngOptions` will do so when a `track by` clause is included in the comprehension expression or\n * if the select is given the `multiple` attribute.\n *\n * The `$watchCollection()` method only does a shallow comparison, meaning that changing properties deeper than the\n * first level of the object (or only changing the properties of an item in the collection if it's an array) will still\n * not trigger a re-rendering of the model.\n *\n * ## CSS classes\n * The following CSS classes are added and removed on the associated input/select/textarea element\n * depending on the validity of the model.\n *\n * - `ng-valid`: the model is valid\n * - `ng-invalid`: the model is invalid\n * - `ng-valid-[key]`: for each valid key added by `$setValidity`\n * - `ng-invalid-[key]`: for each invalid key added by `$setValidity`\n * - `ng-pristine`: the control hasn't been interacted with yet\n * - `ng-dirty`: the control has been interacted with\n * - `ng-touched`: the control has been blurred\n * - `ng-untouched`: the control hasn't been blurred\n * - `ng-pending`: any `$asyncValidators` are unfulfilled\n * - `ng-empty`: the view does not contain a value or the value is deemed \"empty\", as defined\n * by the {@link ngModel.NgModelController#$isEmpty} method\n * - `ng-not-empty`: the view contains a non-empty value\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n * @animations\n * Animations within models are triggered when any of the associated CSS classes are added and removed\n * on the input element which is attached to the model. These classes include: `.ng-pristine`, `.ng-dirty`,\n * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.\n * The animations that are triggered within ngModel are similar to how they work in ngClass and\n * animations can be hooked into using CSS transitions, keyframes as well as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style an input element\n * that has been rendered as invalid after it has been validated:\n *\n *
\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-input {\n *   transition:0.5s linear all;\n *   background: white;\n * }\n * .my-input.ng-invalid {\n *   background: red;\n *   color:white;\n * }\n * 
\n *\n * @example\n * ### Basic Usage\n * \n \n \n \n

\n Update input to see transitions when valid/invalid.\n Integer is a valid value.\n

\n
\n \n
\n
\n *
\n *\n * @example\n * ### Binding to a getter/setter\n *\n * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a\n * function that returns a representation of the model when called with zero arguments, and sets\n * the internal state of a model when called with an argument. It's sometimes useful to use this\n * for models that have an internal representation that's different from what the model exposes\n * to the view.\n *\n *
\n * **Best Practice:** It's best to keep getters fast because AngularJS is likely to call them more\n * frequently than other parts of your code.\n *
\n *\n * You use this behavior by adding `ng-model-options=\"{ getterSetter: true }\"` to an element that\n * has `ng-model` attached to it. You can also add `ng-model-options=\"{ getterSetter: true }\"` to\n * a `
`, which will enable this behavior for all ``s within it. See\n * {@link ng.directive:ngModelOptions `ngModelOptions`} for more.\n *\n * The following example shows how to use `ngModel` with a getter/setter:\n *\n * @example\n * \n \n
\n \n \n \n
user.name = 
\n
\n
\n \n angular.module('getterSetterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var _name = 'Brian';\n $scope.user = {\n name: function(newName) {\n // Note that newName can be undefined for two reasons:\n // 1. Because it is called as a getter and thus called with no arguments\n // 2. Because the property should actually be set to undefined. This happens e.g. if the\n // input is invalid\n return arguments.length ? (_name = newName) : _name;\n }\n };\n }]);\n \n *
\n */\nvar ngModelDirective = ['$rootScope', function($rootScope) {\n return {\n restrict: 'A',\n require: ['ngModel', '^?form', '^?ngModelOptions'],\n controller: NgModelController,\n // Prelink needs to run before any input directive\n // so that we can set the NgModelOptions in NgModelController\n // before anyone else uses it.\n priority: 1,\n compile: function ngModelCompile(element) {\n // Setup initial state of the control\n element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS);\n\n return {\n pre: function ngModelPreLink(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0],\n formCtrl = ctrls[1] || modelCtrl.$$parentForm,\n optionsCtrl = ctrls[2];\n\n if (optionsCtrl) {\n modelCtrl.$options = optionsCtrl.$options;\n }\n\n modelCtrl.$$initGetterSetters();\n\n // notify others, especially parent forms\n formCtrl.$addControl(modelCtrl);\n\n attr.$observe('name', function(newValue) {\n if (modelCtrl.$name !== newValue) {\n modelCtrl.$$parentForm.$$renameControl(modelCtrl, newValue);\n }\n });\n\n scope.$on('$destroy', function() {\n modelCtrl.$$parentForm.$removeControl(modelCtrl);\n });\n },\n post: function ngModelPostLink(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0];\n modelCtrl.$$setUpdateOnEvents();\n\n function setTouched() {\n modelCtrl.$setTouched();\n }\n\n element.on('blur', function() {\n if (modelCtrl.$touched) return;\n\n if ($rootScope.$$phase) {\n scope.$evalAsync(setTouched);\n } else {\n scope.$apply(setTouched);\n }\n });\n }\n };\n }\n };\n}];\n\n/* exported defaultModelOptions */\nvar defaultModelOptions;\nvar DEFAULT_REGEXP = /(\\s+|^)default(\\s+|$)/;\n\n/**\n * @ngdoc type\n * @name ModelOptions\n * @description\n * A container for the options set by the {@link ngModelOptions} directive\n */\nfunction ModelOptions(options) {\n this.$$options = options;\n}\n\nModelOptions.prototype = {\n\n /**\n * @ngdoc method\n * @name ModelOptions#getOption\n * @param {string} name the name of the option to retrieve\n * @returns {*} the value of the option\n * @description\n * Returns the value of the given option\n */\n getOption: function(name) {\n return this.$$options[name];\n },\n\n /**\n * @ngdoc method\n * @name ModelOptions#createChild\n * @param {Object} options a hash of options for the new child that will override the parent's options\n * @return {ModelOptions} a new `ModelOptions` object initialized with the given options.\n */\n createChild: function(options) {\n var inheritAll = false;\n\n // make a shallow copy\n options = extend({}, options);\n\n // Inherit options from the parent if specified by the value `\"$inherit\"`\n forEach(options, /* @this */ function(option, key) {\n if (option === '$inherit') {\n if (key === '*') {\n inheritAll = true;\n } else {\n options[key] = this.$$options[key];\n // `updateOn` is special so we must also inherit the `updateOnDefault` option\n if (key === 'updateOn') {\n options.updateOnDefault = this.$$options.updateOnDefault;\n }\n }\n } else {\n if (key === 'updateOn') {\n // If the `updateOn` property contains the `default` event then we have to remove\n // it from the event list and set the `updateOnDefault` flag.\n options.updateOnDefault = false;\n options[key] = trim(option.replace(DEFAULT_REGEXP, function() {\n options.updateOnDefault = true;\n return ' ';\n }));\n }\n }\n }, this);\n\n if (inheritAll) {\n // We have a property of the form: `\"*\": \"$inherit\"`\n delete options['*'];\n defaults(options, this.$$options);\n }\n\n // Finally add in any missing defaults\n defaults(options, defaultModelOptions.$$options);\n\n return new ModelOptions(options);\n }\n};\n\n\ndefaultModelOptions = new ModelOptions({\n updateOn: '',\n updateOnDefault: true,\n debounce: 0,\n getterSetter: false,\n allowInvalid: false,\n timezone: null\n});\n\n\n/**\n * @ngdoc directive\n * @name ngModelOptions\n * @restrict A\n * @priority 10\n *\n * @description\n * This directive allows you to modify the behaviour of {@link ngModel} directives within your\n * application. You can specify an `ngModelOptions` directive on any element. All {@link ngModel}\n * directives will use the options of their nearest `ngModelOptions` ancestor.\n *\n * The `ngModelOptions` settings are found by evaluating the value of the attribute directive as\n * an AngularJS expression. This expression should evaluate to an object, whose properties contain\n * the settings. For example: `
\n *
\n * \n *
\n *
\n * ```\n *\n * the `input` element will have the following settings\n *\n * ```js\n * { allowInvalid: true, updateOn: 'default', debounce: 0 }\n * ```\n *\n * Notice that the `debounce` setting was not inherited and used the default value instead.\n *\n * You can specify that all undefined settings are automatically inherited from an ancestor by\n * including a property with key of `\"*\"` and value of `\"$inherit\"`.\n *\n * For example given the following fragment of HTML\n *\n *\n * ```html\n *
\n *
\n * \n *
\n *
\n * ```\n *\n * the `input` element will have the following settings\n *\n * ```js\n * { allowInvalid: true, updateOn: 'default', debounce: 200 }\n * ```\n *\n * Notice that the `debounce` setting now inherits the value from the outer `
` element.\n *\n * If you are creating a reusable component then you should be careful when using `\"*\": \"$inherit\"`\n * since you may inadvertently inherit a setting in the future that changes the behavior of your component.\n *\n *\n * ## Triggering and debouncing model updates\n *\n * The `updateOn` and `debounce` properties allow you to specify a custom list of events that will\n * trigger a model update and/or a debouncing delay so that the actual update only takes place when\n * a timer expires; this timer will be reset after another change takes place.\n *\n * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might\n * be different from the value in the actual model. This means that if you update the model you\n * should also invoke {@link ngModel.NgModelController#$rollbackViewValue} on the relevant input field in\n * order to make sure it is synchronized with the model and that any debounced action is canceled.\n *\n * The easiest way to reference the control's {@link ngModel.NgModelController#$rollbackViewValue}\n * method is by making sure the input is placed inside a form that has a `name` attribute. This is\n * important because `form` controllers are published to the related scope under the name in their\n * `name` attribute.\n *\n * Any pending changes will take place immediately when an enclosing form is submitted via the\n * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * ### Overriding immediate updates\n *\n * The following example shows how to override immediate updates. Changes on the inputs within the\n * form will update the model only when the control loses focus (blur event). If `escape` key is\n * pressed while the input field is focused, the value is reset to the value in the current model.\n *\n * \n * \n *
\n *
\n *
\n *
\n *
\n *
user.name = 
\n *
\n *
\n * \n * angular.module('optionsExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.user = { name: 'say', data: '' };\n *\n * $scope.cancel = function(e) {\n * if (e.keyCode === 27) {\n * $scope.userForm.userName.$rollbackViewValue();\n * }\n * };\n * }]);\n * \n * \n * var model = element(by.binding('user.name'));\n * var input = element(by.model('user.name'));\n * var other = element(by.model('user.data'));\n *\n * it('should allow custom events', function() {\n * input.sendKeys(' hello');\n * input.click();\n * expect(model.getText()).toEqual('say');\n * other.click();\n * expect(model.getText()).toEqual('say hello');\n * });\n *\n * it('should $rollbackViewValue when model changes', function() {\n * input.sendKeys(' hello');\n * expect(input.getAttribute('value')).toEqual('say hello');\n * input.sendKeys(protractor.Key.ESCAPE);\n * expect(input.getAttribute('value')).toEqual('say');\n * other.click();\n * expect(model.getText()).toEqual('say');\n * });\n * \n *
\n *\n * ### Debouncing updates\n *\n * The next example shows how to debounce model changes. Model will be updated only 1 sec after last change.\n * If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty.\n *\n * \n * \n *
\n *
\n * Name:\n * \n *
\n *
\n *
user.name = 
\n *
\n *
\n * \n * angular.module('optionsExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.user = { name: 'say' };\n * }]);\n * \n *
\n *\n * ### Default events, extra triggers, and catch-all debounce values\n *\n * This example shows the relationship between \"default\" update events and\n * additional `updateOn` triggers.\n *\n * `default` events are those that are bound to the control, and when fired, update the `$viewValue`\n * via {@link ngModel.NgModelController#$setViewValue $setViewValue}. Every event that is not listed\n * in `updateOn` is considered a \"default\" event, since different control types have different\n * default events.\n *\n * The control in this example updates by \"default\", \"click\", and \"blur\", with different `debounce`\n * values. You can see that \"click\" doesn't have an individual `debounce` value -\n * therefore it uses the `*` debounce value.\n *\n * There is also a button that calls {@link ngModel.NgModelController#$setViewValue $setViewValue}\n * directly with a \"custom\" event. Since \"custom\" is not defined in the `updateOn` list,\n * it is considered a \"default\" event and will update the\n * control if \"default\" is defined in `updateOn`, and will receive the \"default\" debounce value.\n * Note that this is just to illustrate how custom controls would possibly call `$setViewValue`.\n *\n * You can change the `updateOn` and `debounce` configuration to test different scenarios. This\n * is done with {@link ngModel.NgModelController#$overrideModelOptions $overrideModelOptions}.\n *\n \n \n \n \n \n angular.module('optionsExample', [])\n .component('modelUpdateDemo', {\n templateUrl: 'template.html',\n controller: function() {\n this.name = 'Chinua';\n\n this.options = {\n updateOn: 'default blur click',\n debounce: {\n default: 2000,\n blur: 0,\n '*': 1000\n }\n };\n\n this.updateEvents = function() {\n var eventList = this.options.updateOn.split(' ');\n eventList.push('*');\n var events = {};\n\n for (var i = 0; i < eventList.length; i++) {\n events[eventList[i]] = this.options.debounce[eventList[i]];\n }\n\n this.events = events;\n };\n\n this.updateOptions = function() {\n var options = angular.extend(this.options, {\n updateOn: Object.keys(this.events).join(' ').replace('*', ''),\n debounce: this.events\n });\n\n this.form.input.$overrideModelOptions(options);\n };\n\n // Initialize the event form\n this.updateEvents();\n }\n });\n \n \n
\n Input: \n
\n Model: {{$ctrl.name}}\n
\n \n\n
\n
\n updateOn
\n \n\n \n \n \n \n \n \n \n \n \n
OptionDebounce value
{{key}}
\n\n
\n \n
\n
\n
\n *\n *\n * ## Model updates and validation\n *\n * The default behaviour in `ngModel` is that the model value is set to `undefined` when the\n * validation determines that the value is invalid. By setting the `allowInvalid` property to true,\n * the model will still be updated even if the value is invalid.\n *\n *\n * ## Connecting to the scope\n *\n * By setting the `getterSetter` property to true you are telling ngModel that the `ngModel` expression\n * on the scope refers to a \"getter/setter\" function rather than the value itself.\n *\n * The following example shows how to bind to getter/setters:\n *\n * \n * \n *
\n *
\n * \n *
\n *
user.name = 
\n *
\n *
\n * \n * angular.module('getterSetterExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * var _name = 'Brian';\n * $scope.user = {\n * name: function(newName) {\n * return angular.isDefined(newName) ? (_name = newName) : _name;\n * }\n * };\n * }]);\n * \n *
\n *\n *\n * ## Specifying timezones\n *\n * You can specify the timezone that date/time input directives expect by providing its name in the\n * `timezone` property.\n *\n *\n * ## Programmatically changing options\n *\n * The `ngModelOptions` expression is only evaluated once when the directive is linked; it is not\n * watched for changes. However, it is possible to override the options on a single\n * {@link ngModel.NgModelController} instance with\n * {@link ngModel.NgModelController#$overrideModelOptions `NgModelController#$overrideModelOptions()`}.\n * See also the example for\n * {@link ngModelOptions#default-events-extra-triggers-and-catch-all-debounce-values\n * Default events, extra triggers, and catch-all debounce values}.\n *\n *\n * @param {Object} ngModelOptions options to apply to {@link ngModel} directives on this element and\n * and its descendents. Valid keys are:\n * - `updateOn`: string specifying which event should the input be bound to. You can set several\n * events using an space delimited list. There is a special event called `default` that\n * matches the default events belonging to the control. These are the events that are bound to\n * the control, and when fired, update the `$viewValue` via `$setViewValue`.\n *\n * `ngModelOptions` considers every event that is not listed in `updateOn` a \"default\" event,\n * since different control types use different default events.\n *\n * See also the section {@link ngModelOptions#triggering-and-debouncing-model-updates\n * Triggering and debouncing model updates}.\n *\n * - `debounce`: integer value which contains the debounce model update value in milliseconds. A\n * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a\n * custom value for each event. For example:\n * ```\n * ng-model-options=\"{\n * updateOn: 'default blur',\n * debounce: { 'default': 500, 'blur': 0 }\n * }\"\n * ```\n * You can use the `*` key to specify a debounce value that applies to all events that are not\n * specifically listed. In the following example, `mouseup` would have a debounce delay of 1000:\n * ```\n * ng-model-options=\"{\n * updateOn: 'default blur mouseup',\n * debounce: { 'default': 500, 'blur': 0, '*': 1000 }\n * }\"\n * ```\n * - `allowInvalid`: boolean value which indicates that the model can be set with values that did\n * not validate correctly instead of the default behavior of setting the model to undefined.\n * - `getterSetter`: boolean value which determines whether or not to treat functions bound to\n * `ngModel` as getters/setters.\n * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for\n * ``, ``, ... . It understands UTC/GMT and the\n * continental US time zone abbreviations, but for general use, use a time zone offset, for\n * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)\n * If not specified, the timezone of the browser will be used.\n * Note that changing the timezone will have no effect on the current date, and is only applied after\n * the next input / model change.\n *\n */\nvar ngModelOptionsDirective = function() {\n NgModelOptionsController.$inject = ['$attrs', '$scope'];\n function NgModelOptionsController($attrs, $scope) {\n this.$$attrs = $attrs;\n this.$$scope = $scope;\n }\n NgModelOptionsController.prototype = {\n $onInit: function() {\n var parentOptions = this.parentCtrl ? this.parentCtrl.$options : defaultModelOptions;\n var modelOptionsDefinition = this.$$scope.$eval(this.$$attrs.ngModelOptions);\n\n this.$options = parentOptions.createChild(modelOptionsDefinition);\n }\n };\n\n return {\n restrict: 'A',\n // ngModelOptions needs to run before ngModel and input directives\n priority: 10,\n require: {parentCtrl: '?^^ngModelOptions'},\n bindToController: true,\n controller: NgModelOptionsController\n };\n};\n\n\n// shallow copy over values from `src` that are not already specified on `dst`\nfunction defaults(dst, src) {\n forEach(src, function(value, key) {\n if (!isDefined(dst[key])) {\n dst[key] = value;\n }\n });\n}\n\n/**\n * @ngdoc directive\n * @name ngNonBindable\n * @restrict AC\n * @priority 1000\n * @element ANY\n *\n * @description\n * The `ngNonBindable` directive tells AngularJS not to compile or bind the contents of the current\n * DOM element, including directives on the element itself that have a lower priority than\n * `ngNonBindable`. This is useful if the element contains what appears to be AngularJS directives\n * and bindings but which should be ignored by AngularJS. This could be the case if you have a site\n * that displays snippets of code, for instance.\n *\n * @example\n * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,\n * but the one wrapped in `ngNonBindable` is left alone.\n *\n \n \n
Normal: {{1 + 2}}
\n
Ignored: {{1 + 2}}
\n
\n \n it('should check ng-non-bindable', function() {\n expect(element(by.binding('1 + 2')).getText()).toContain('3');\n expect(element.all(by.css('div')).last().getText()).toMatch(/1 \\+ 2/);\n });\n \n
\n */\nvar ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });\n\n/* exported ngOptionsDirective */\n\n/* global jqLiteRemove */\n\nvar ngOptionsMinErr = minErr('ngOptions');\n\n/**\n * @ngdoc directive\n * @name ngOptions\n * @restrict A\n *\n * @description\n *\n * The `ngOptions` attribute can be used to dynamically generate a list of ``\n * DOM element.\n * * `disable`: The result of this expression will be used to disable the rendered `\n * \n *
\n *\n *
\n *
\n *
\n * singleSelect = {{data.singleSelect}}\n *\n *
\n *
\n *
\n * multipleSelect = {{data.multipleSelect}}
\n * \n *
\n * \n * \n * angular.module('staticSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.data = {\n * singleSelect: null,\n * multipleSelect: [],\n * option1: 'option-1'\n * };\n *\n * $scope.forceUnknownOption = function() {\n * $scope.data.singleSelect = 'nonsense';\n * };\n * }]);\n * \n *\n *\n * @example\n * ### Using `ngRepeat` to generate `select` options\n * \n * \n *
\n *
\n * \n * \n *
\n *
\n * model = {{data.model}}
\n *
\n *
\n * \n * angular.module('ngrepeatSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.data = {\n * model: null,\n * availableOptions: [\n * {id: '1', name: 'Option A'},\n * {id: '2', name: 'Option B'},\n * {id: '3', name: 'Option C'}\n * ]\n * };\n * }]);\n * \n *
\n *\n * @example\n * ### Using `ngValue` to bind the model to an array of objects\n * \n * \n *
\n *
\n * \n * \n *
\n *
\n *
model = {{data.model | json}}

\n *
\n *
\n * \n * angular.module('ngvalueSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.data = {\n * model: null,\n * availableOptions: [\n {value: 'myString', name: 'string'},\n {value: 1, name: 'integer'},\n {value: true, name: 'boolean'},\n {value: null, name: 'null'},\n {value: {prop: 'value'}, name: 'object'},\n {value: ['a'], name: 'array'}\n * ]\n * };\n * }]);\n * \n *
\n *\n * @example\n * ### Using `select` with `ngOptions` and setting a default value\n * See the {@link ngOptions ngOptions documentation} for more `ngOptions` usage examples.\n *\n * \n * \n *
\n *
\n * \n * \n *
\n *
\n * option = {{data.selectedOption}}
\n *
\n *
\n * \n * angular.module('defaultValueSelect', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.data = {\n * availableOptions: [\n * {id: '1', name: 'Option A'},\n * {id: '2', name: 'Option B'},\n * {id: '3', name: 'Option C'}\n * ],\n * selectedOption: {id: '3', name: 'Option C'} //This sets the default value of the select in the ui\n * };\n * }]);\n * \n *
\n *\n * @example\n * ### Binding `select` to a non-string value via `ngModel` parsing / formatting\n *\n * \n * \n * \n * {{ model }}\n * \n * \n * angular.module('nonStringSelect', [])\n * .run(function($rootScope) {\n * $rootScope.model = { id: 2 };\n * })\n * .directive('convertToNumber', function() {\n * return {\n * require: 'ngModel',\n * link: function(scope, element, attrs, ngModel) {\n * ngModel.$parsers.push(function(val) {\n * return parseInt(val, 10);\n * });\n * ngModel.$formatters.push(function(val) {\n * return '' + val;\n * });\n * }\n * };\n * });\n * \n * \n * it('should initialize to model', function() {\n * expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two');\n * });\n * \n * \n *\n */\nvar selectDirective = function() {\n\n return {\n restrict: 'E',\n require: ['select', '?ngModel'],\n controller: SelectController,\n priority: 1,\n link: {\n pre: selectPreLink,\n post: selectPostLink\n }\n };\n\n function selectPreLink(scope, element, attr, ctrls) {\n\n var selectCtrl = ctrls[0];\n var ngModelCtrl = ctrls[1];\n\n // if ngModel is not defined, we don't need to do anything but set the registerOption\n // function to noop, so options don't get added internally\n if (!ngModelCtrl) {\n selectCtrl.registerOption = noop;\n return;\n }\n\n\n selectCtrl.ngModelCtrl = ngModelCtrl;\n\n // When the selected item(s) changes we delegate getting the value of the select control\n // to the `readValue` method, which can be changed if the select can have multiple\n // selected values or if the options are being generated by `ngOptions`\n element.on('change', function() {\n selectCtrl.removeUnknownOption();\n scope.$apply(function() {\n ngModelCtrl.$setViewValue(selectCtrl.readValue());\n });\n });\n\n // If the select allows multiple values then we need to modify how we read and write\n // values from and to the control; also what it means for the value to be empty and\n // we have to add an extra watch since ngModel doesn't work well with arrays - it\n // doesn't trigger rendering if only an item in the array changes.\n if (attr.multiple) {\n selectCtrl.multiple = true;\n\n // Read value now needs to check each option to see if it is selected\n selectCtrl.readValue = function readMultipleValue() {\n var array = [];\n forEach(element.find('option'), function(option) {\n if (option.selected && !option.disabled) {\n var val = option.value;\n array.push(val in selectCtrl.selectValueMap ? selectCtrl.selectValueMap[val] : val);\n }\n });\n return array;\n };\n\n // Write value now needs to set the selected property of each matching option\n selectCtrl.writeValue = function writeMultipleValue(value) {\n forEach(element.find('option'), function(option) {\n var shouldBeSelected = !!value && (includes(value, option.value) ||\n includes(value, selectCtrl.selectValueMap[option.value]));\n var currentlySelected = option.selected;\n\n // Support: IE 9-11 only, Edge 12-15+\n // In IE and Edge adding options to the selection via shift+click/UP/DOWN\n // will de-select already selected options if \"selected\" on those options was set\n // more than once (i.e. when the options were already selected)\n // So we only modify the selected property if necessary.\n // Note: this behavior cannot be replicated via unit tests because it only shows in the\n // actual user interface.\n if (shouldBeSelected !== currentlySelected) {\n setOptionSelectedStatus(jqLite(option), shouldBeSelected);\n }\n\n });\n };\n\n // we have to do it on each watch since ngModel watches reference, but\n // we need to work of an array, so we need to see if anything was inserted/removed\n var lastView, lastViewRef = NaN;\n scope.$watch(function selectMultipleWatch() {\n if (lastViewRef === ngModelCtrl.$viewValue && !equals(lastView, ngModelCtrl.$viewValue)) {\n lastView = shallowCopy(ngModelCtrl.$viewValue);\n ngModelCtrl.$render();\n }\n lastViewRef = ngModelCtrl.$viewValue;\n });\n\n // If we are a multiple select then value is now a collection\n // so the meaning of $isEmpty changes\n ngModelCtrl.$isEmpty = function(value) {\n return !value || value.length === 0;\n };\n\n }\n }\n\n function selectPostLink(scope, element, attrs, ctrls) {\n // if ngModel is not defined, we don't need to do anything\n var ngModelCtrl = ctrls[1];\n if (!ngModelCtrl) return;\n\n var selectCtrl = ctrls[0];\n\n // We delegate rendering to the `writeValue` method, which can be changed\n // if the select can have multiple selected values or if the options are being\n // generated by `ngOptions`.\n // This must be done in the postLink fn to prevent $render to be called before\n // all nodes have been linked correctly.\n ngModelCtrl.$render = function() {\n selectCtrl.writeValue(ngModelCtrl.$viewValue);\n };\n }\n};\n\n\n// The option directive is purely designed to communicate the existence (or lack of)\n// of dynamically created (and destroyed) option elements to their containing select\n// directive via its controller.\nvar optionDirective = ['$interpolate', function($interpolate) {\n return {\n restrict: 'E',\n priority: 100,\n compile: function(element, attr) {\n var interpolateValueFn, interpolateTextFn;\n\n if (isDefined(attr.ngValue)) {\n // Will be handled by registerOption\n } else if (isDefined(attr.value)) {\n // If the value attribute is defined, check if it contains an interpolation\n interpolateValueFn = $interpolate(attr.value, true);\n } else {\n // If the value attribute is not defined then we fall back to the\n // text content of the option element, which may be interpolated\n interpolateTextFn = $interpolate(element.text(), true);\n if (!interpolateTextFn) {\n attr.$set('value', element.text());\n }\n }\n\n return function(scope, element, attr) {\n // This is an optimization over using ^^ since we don't want to have to search\n // all the way to the root of the DOM for every single option element\n var selectCtrlName = '$selectController',\n parent = element.parent(),\n selectCtrl = parent.data(selectCtrlName) ||\n parent.parent().data(selectCtrlName); // in case we are in optgroup\n\n if (selectCtrl) {\n selectCtrl.registerOption(scope, element, attr, interpolateValueFn, interpolateTextFn);\n }\n };\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngRequired\n * @restrict A\n *\n * @param {expression} ngRequired AngularJS expression. If it evaluates to `true`, it sets the\n * `required` attribute to the element and adds the `required`\n * {@link ngModel.NgModelController#$validators `validator`}.\n *\n * @description\n *\n * ngRequired adds the required {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for {@link input `input`} and {@link select `select`} controls, but can also be\n * applied to custom controls.\n *\n * The directive sets the `required` attribute on the element if the AngularJS expression inside\n * `ngRequired` evaluates to true. A special directive for setting `required` is necessary because we\n * cannot use interpolation inside `required`. See the {@link guide/interpolation interpolation guide}\n * for more info.\n *\n * The validator will set the `required` error key to true if the `required` attribute is set and\n * calling {@link ngModel.NgModelController#$isEmpty `NgModelController.$isEmpty`} with the\n * {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} returns `true`. For example, the\n * `$isEmpty()` implementation for `input[text]` checks the length of the `$viewValue`. When developing\n * custom controls, `$isEmpty()` can be overwritten to account for a $viewValue that is not string-based.\n *\n * @example\n * \n * \n * \n *
\n *
\n * \n * \n *
\n * \n *
\n *
\n * required error set? = {{form.input.$error.required}}
\n * model = {{model}}\n *
\n *
\n *
\n * \n var required = element(by.binding('form.input.$error.required'));\n var model = element(by.binding('model'));\n var input = element(by.id('input'));\n\n it('should set the required error', function() {\n expect(required.getText()).toContain('true');\n\n input.sendKeys('123');\n expect(required.getText()).not.toContain('true');\n expect(model.getText()).toContain('123');\n });\n * \n *
\n */\nvar requiredDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n attr.required = true; // force truthy in case we are on non input element\n\n ctrl.$validators.required = function(modelValue, viewValue) {\n return !attr.required || !ctrl.$isEmpty(viewValue);\n };\n\n attr.$observe('required', function() {\n ctrl.$validate();\n });\n }\n };\n};\n\n/**\n * @ngdoc directive\n * @name ngPattern\n * @restrict A\n *\n * @param {expression|RegExp} ngPattern AngularJS expression that must evaluate to a `RegExp` or a `String`\n * parsable into a `RegExp`, or a `RegExp` literal. See above for\n * more details.\n *\n * @description\n *\n * ngPattern adds the pattern {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n *\n * The validator sets the `pattern` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n * does not match a RegExp which is obtained from the `ngPattern` attribute value:\n * - the value is an AngularJS expression:\n * - If the expression evaluates to a RegExp object, then this is used directly.\n * - If the expression evaluates to a string, then it will be converted to a RegExp after wrapping it\n * in `^` and `$` characters. For instance, `\"abc\"` will be converted to `new RegExp('^abc$')`.\n * - If the value is a RegExp literal, e.g. `ngPattern=\"/^\\d+$/\"`, it is used directly.\n *\n *
\n * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to\n * start at the index of the last search's match, thus not taking the whole input value into\n * account.\n *
\n *\n *
\n * **Note:** This directive is also added when the plain `pattern` attribute is used, with two\n * differences:\n *
    \n *
  1. \n * `ngPattern` does not set the `pattern` attribute and therefore HTML5 constraint validation is\n * not available.\n *
  2. \n *
  3. \n * The `ngPattern` attribute must be an expression, while the `pattern` value must be\n * interpolated.\n *
  4. \n *
\n *
\n *\n * @example\n * \n * \n * \n *
\n *
\n * \n * \n *
\n * \n *
\n *
\n * input valid? = {{form.input.$valid}}
\n * model = {{model}}\n *
\n *
\n *
\n * \n var model = element(by.binding('model'));\n var input = element(by.id('input'));\n\n it('should validate the input with the default pattern', function() {\n input.sendKeys('aaa');\n expect(model.getText()).not.toContain('aaa');\n\n input.clear().then(function() {\n input.sendKeys('123');\n expect(model.getText()).toContain('123');\n });\n });\n * \n *
\n */\nvar patternDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var regexp, patternExp = attr.ngPattern || attr.pattern;\n attr.$observe('pattern', function(regex) {\n if (isString(regex) && regex.length > 0) {\n regex = new RegExp('^' + regex + '$');\n }\n\n if (regex && !regex.test) {\n throw minErr('ngPattern')('noregexp',\n 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp,\n regex, startingTag(elm));\n }\n\n regexp = regex || undefined;\n ctrl.$validate();\n });\n\n ctrl.$validators.pattern = function(modelValue, viewValue) {\n // HTML5 pattern constraint validates the input value, so we validate the viewValue\n return ctrl.$isEmpty(viewValue) || isUndefined(regexp) || regexp.test(viewValue);\n };\n }\n };\n};\n\n/**\n * @ngdoc directive\n * @name ngMaxlength\n * @restrict A\n *\n * @param {expression} ngMaxlength AngularJS expression that must evaluate to a `Number` or `String`\n * parsable into a `Number`. Used as value for the `maxlength`\n * {@link ngModel.NgModelController#$validators validator}.\n *\n * @description\n *\n * ngMaxlength adds the maxlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n *\n * The validator sets the `maxlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n * is longer than the integer obtained by evaluating the AngularJS expression given in the\n * `ngMaxlength` attribute value.\n *\n *
\n * **Note:** This directive is also added when the plain `maxlength` attribute is used, with two\n * differences:\n *
    \n *
  1. \n * `ngMaxlength` does not set the `maxlength` attribute and therefore HTML5 constraint\n * validation is not available.\n *
  2. \n *
  3. \n * The `ngMaxlength` attribute must be an expression, while the `maxlength` value must be\n * interpolated.\n *
  4. \n *
\n *
\n *\n * @example\n * \n * \n * \n *
\n *
\n * \n * \n *
\n * \n *
\n *
\n * input valid? = {{form.input.$valid}}
\n * model = {{model}}\n *
\n *
\n *
\n * \n var model = element(by.binding('model'));\n var input = element(by.id('input'));\n\n it('should validate the input with the default maxlength', function() {\n input.sendKeys('abcdef');\n expect(model.getText()).not.toContain('abcdef');\n\n input.clear().then(function() {\n input.sendKeys('abcde');\n expect(model.getText()).toContain('abcde');\n });\n });\n * \n *
\n */\nvar maxlengthDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var maxlength = -1;\n attr.$observe('maxlength', function(value) {\n var intVal = toInt(value);\n maxlength = isNumberNaN(intVal) ? -1 : intVal;\n ctrl.$validate();\n });\n ctrl.$validators.maxlength = function(modelValue, viewValue) {\n return (maxlength < 0) || ctrl.$isEmpty(viewValue) || (viewValue.length <= maxlength);\n };\n }\n };\n};\n\n/**\n * @ngdoc directive\n * @name ngMinlength\n * @restrict A\n *\n * @param {expression} ngMinlength AngularJS expression that must evaluate to a `Number` or `String`\n * parsable into a `Number`. Used as value for the `minlength`\n * {@link ngModel.NgModelController#$validators validator}.\n *\n * @description\n *\n * ngMinlength adds the minlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}.\n * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls.\n *\n * The validator sets the `minlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`}\n * is shorter than the integer obtained by evaluating the AngularJS expression given in the\n * `ngMinlength` attribute value.\n *\n *
\n * **Note:** This directive is also added when the plain `minlength` attribute is used, with two\n * differences:\n *
    \n *
  1. \n * `ngMinlength` does not set the `minlength` attribute and therefore HTML5 constraint\n * validation is not available.\n *
  2. \n *
  3. \n * The `ngMinlength` value must be an expression, while the `minlength` value must be\n * interpolated.\n *
  4. \n *
\n *
\n *\n * @example\n * \n * \n * \n *
\n *
\n * \n * \n *
\n * \n *
\n *
\n * input valid? = {{form.input.$valid}}
\n * model = {{model}}\n *
\n *
\n *
\n * \n var model = element(by.binding('model'));\n var input = element(by.id('input'));\n\n it('should validate the input with the default minlength', function() {\n input.sendKeys('ab');\n expect(model.getText()).not.toContain('ab');\n\n input.sendKeys('abc');\n expect(model.getText()).toContain('abc');\n });\n * \n *
\n */\nvar minlengthDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var minlength = 0;\n attr.$observe('minlength', function(value) {\n minlength = toInt(value) || 0;\n ctrl.$validate();\n });\n ctrl.$validators.minlength = function(modelValue, viewValue) {\n return ctrl.$isEmpty(viewValue) || viewValue.length >= minlength;\n };\n }\n };\n};\n\nif (window.angular.bootstrap) {\n // AngularJS is already loaded, so we can return here...\n if (window.console) {\n console.log('WARNING: Tried to load AngularJS more than once.');\n }\n return;\n}\n\n// try to bind to jquery now so that one can write jqLite(fn)\n// but we will rebind on bootstrap again.\nbindJQuery();\n\npublishExternalAPI(angular);\n\nangular.module(\"ngLocale\", [], [\"$provide\", function($provide) {\nvar PLURAL_CATEGORY = {ZERO: \"zero\", ONE: \"one\", TWO: \"two\", FEW: \"few\", MANY: \"many\", OTHER: \"other\"};\nfunction getDecimals(n) {\n n = n + '';\n var i = n.indexOf('.');\n return (i == -1) ? 0 : n.length - i - 1;\n}\n\nfunction getVF(n, opt_precision) {\n var v = opt_precision;\n\n if (undefined === v) {\n v = Math.min(getDecimals(n), 3);\n }\n\n var base = Math.pow(10, v);\n var f = ((n * base) | 0) % base;\n return {v: v, f: f};\n}\n\n$provide.value(\"$locale\", {\n \"DATETIME_FORMATS\": {\n \"AMPMS\": [\n \"AM\",\n \"PM\"\n ],\n \"DAY\": [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n ],\n \"ERANAMES\": [\n \"Before Christ\",\n \"Anno Domini\"\n ],\n \"ERAS\": [\n \"BC\",\n \"AD\"\n ],\n \"FIRSTDAYOFWEEK\": 6,\n \"MONTH\": [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n ],\n \"SHORTDAY\": [\n \"Sun\",\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\"\n ],\n \"SHORTMONTH\": [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\"\n ],\n \"STANDALONEMONTH\": [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n ],\n \"WEEKENDRANGE\": [\n 5,\n 6\n ],\n \"fullDate\": \"EEEE, MMMM d, y\",\n \"longDate\": \"MMMM d, y\",\n \"medium\": \"MMM d, y h:mm:ss a\",\n \"mediumDate\": \"MMM d, y\",\n \"mediumTime\": \"h:mm:ss a\",\n \"short\": \"M/d/yy h:mm a\",\n \"shortDate\": \"M/d/yy\",\n \"shortTime\": \"h:mm a\"\n },\n \"NUMBER_FORMATS\": {\n \"CURRENCY_SYM\": \"$\",\n \"DECIMAL_SEP\": \".\",\n \"GROUP_SEP\": \",\",\n \"PATTERNS\": [\n {\n \"gSize\": 3,\n \"lgSize\": 3,\n \"maxFrac\": 3,\n \"minFrac\": 0,\n \"minInt\": 1,\n \"negPre\": \"-\",\n \"negSuf\": \"\",\n \"posPre\": \"\",\n \"posSuf\": \"\"\n },\n {\n \"gSize\": 3,\n \"lgSize\": 3,\n \"maxFrac\": 2,\n \"minFrac\": 2,\n \"minInt\": 1,\n \"negPre\": \"-\\u00a4\",\n \"negSuf\": \"\",\n \"posPre\": \"\\u00a4\",\n \"posSuf\": \"\"\n }\n ]\n },\n \"id\": \"en-us\",\n \"localeID\": \"en_US\",\n \"pluralCat\": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}\n});\n}]);\n\n jqLite(function() {\n angularInit(window.document, bootstrap);\n });\n\n})(window);\n\n!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('');\n/**\n * @license AngularJS v1.7.9\n * (c) 2010-2018 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular) {'use strict';\n\nvar ELEMENT_NODE = 1;\nvar COMMENT_NODE = 8;\n\nvar ADD_CLASS_SUFFIX = '-add';\nvar REMOVE_CLASS_SUFFIX = '-remove';\nvar EVENT_CLASS_PREFIX = 'ng-';\nvar ACTIVE_CLASS_SUFFIX = '-active';\nvar PREPARE_CLASS_SUFFIX = '-prepare';\n\nvar NG_ANIMATE_CLASSNAME = 'ng-animate';\nvar NG_ANIMATE_CHILDREN_DATA = '$$ngAnimateChildren';\n\n// Detect proper transitionend/animationend event names.\nvar CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;\n\n// If unprefixed events are not supported but webkit-prefixed are, use the latter.\n// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.\n// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`\n// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.\n// Register both events in case `window.onanimationend` is not supported because of that,\n// do the same for `transitionend` as Safari is likely to exhibit similar behavior.\n// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit\n// therefore there is no reason to test anymore for other vendor prefixes:\n// http://caniuse.com/#search=transition\nif ((window.ontransitionend === undefined) && (window.onwebkittransitionend !== undefined)) {\n CSS_PREFIX = '-webkit-';\n TRANSITION_PROP = 'WebkitTransition';\n TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';\n} else {\n TRANSITION_PROP = 'transition';\n TRANSITIONEND_EVENT = 'transitionend';\n}\n\nif ((window.onanimationend === undefined) && (window.onwebkitanimationend !== undefined)) {\n CSS_PREFIX = '-webkit-';\n ANIMATION_PROP = 'WebkitAnimation';\n ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';\n} else {\n ANIMATION_PROP = 'animation';\n ANIMATIONEND_EVENT = 'animationend';\n}\n\nvar DURATION_KEY = 'Duration';\nvar PROPERTY_KEY = 'Property';\nvar DELAY_KEY = 'Delay';\nvar TIMING_KEY = 'TimingFunction';\nvar ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';\nvar ANIMATION_PLAYSTATE_KEY = 'PlayState';\nvar SAFE_FAST_FORWARD_DURATION_VALUE = 9999;\n\nvar ANIMATION_DELAY_PROP = ANIMATION_PROP + DELAY_KEY;\nvar ANIMATION_DURATION_PROP = ANIMATION_PROP + DURATION_KEY;\nvar TRANSITION_DELAY_PROP = TRANSITION_PROP + DELAY_KEY;\nvar TRANSITION_DURATION_PROP = TRANSITION_PROP + DURATION_KEY;\n\nvar ngMinErr = angular.$$minErr('ng');\nfunction assertArg(arg, name, reason) {\n if (!arg) {\n throw ngMinErr('areq', 'Argument \\'{0}\\' is {1}', (name || '?'), (reason || 'required'));\n }\n return arg;\n}\n\nfunction mergeClasses(a,b) {\n if (!a && !b) return '';\n if (!a) return b;\n if (!b) return a;\n if (isArray(a)) a = a.join(' ');\n if (isArray(b)) b = b.join(' ');\n return a + ' ' + b;\n}\n\nfunction packageStyles(options) {\n var styles = {};\n if (options && (options.to || options.from)) {\n styles.to = options.to;\n styles.from = options.from;\n }\n return styles;\n}\n\nfunction pendClasses(classes, fix, isPrefix) {\n var className = '';\n classes = isArray(classes)\n ? classes\n : classes && isString(classes) && classes.length\n ? classes.split(/\\s+/)\n : [];\n forEach(classes, function(klass, i) {\n if (klass && klass.length > 0) {\n className += (i > 0) ? ' ' : '';\n className += isPrefix ? fix + klass\n : klass + fix;\n }\n });\n return className;\n}\n\nfunction removeFromArray(arr, val) {\n var index = arr.indexOf(val);\n if (val >= 0) {\n arr.splice(index, 1);\n }\n}\n\nfunction stripCommentsFromElement(element) {\n if (element instanceof jqLite) {\n switch (element.length) {\n case 0:\n return element;\n\n case 1:\n // there is no point of stripping anything if the element\n // is the only element within the jqLite wrapper.\n // (it's important that we retain the element instance.)\n if (element[0].nodeType === ELEMENT_NODE) {\n return element;\n }\n break;\n\n default:\n return jqLite(extractElementNode(element));\n }\n }\n\n if (element.nodeType === ELEMENT_NODE) {\n return jqLite(element);\n }\n}\n\nfunction extractElementNode(element) {\n if (!element[0]) return element;\n for (var i = 0; i < element.length; i++) {\n var elm = element[i];\n if (elm.nodeType === ELEMENT_NODE) {\n return elm;\n }\n }\n}\n\nfunction $$addClass($$jqLite, element, className) {\n forEach(element, function(elm) {\n $$jqLite.addClass(elm, className);\n });\n}\n\nfunction $$removeClass($$jqLite, element, className) {\n forEach(element, function(elm) {\n $$jqLite.removeClass(elm, className);\n });\n}\n\nfunction applyAnimationClassesFactory($$jqLite) {\n return function(element, options) {\n if (options.addClass) {\n $$addClass($$jqLite, element, options.addClass);\n options.addClass = null;\n }\n if (options.removeClass) {\n $$removeClass($$jqLite, element, options.removeClass);\n options.removeClass = null;\n }\n };\n}\n\nfunction prepareAnimationOptions(options) {\n options = options || {};\n if (!options.$$prepared) {\n var domOperation = options.domOperation || noop;\n options.domOperation = function() {\n options.$$domOperationFired = true;\n domOperation();\n domOperation = noop;\n };\n options.$$prepared = true;\n }\n return options;\n}\n\nfunction applyAnimationStyles(element, options) {\n applyAnimationFromStyles(element, options);\n applyAnimationToStyles(element, options);\n}\n\nfunction applyAnimationFromStyles(element, options) {\n if (options.from) {\n element.css(options.from);\n options.from = null;\n }\n}\n\nfunction applyAnimationToStyles(element, options) {\n if (options.to) {\n element.css(options.to);\n options.to = null;\n }\n}\n\nfunction mergeAnimationDetails(element, oldAnimation, newAnimation) {\n var target = oldAnimation.options || {};\n var newOptions = newAnimation.options || {};\n\n var toAdd = (target.addClass || '') + ' ' + (newOptions.addClass || '');\n var toRemove = (target.removeClass || '') + ' ' + (newOptions.removeClass || '');\n var classes = resolveElementClasses(element.attr('class'), toAdd, toRemove);\n\n if (newOptions.preparationClasses) {\n target.preparationClasses = concatWithSpace(newOptions.preparationClasses, target.preparationClasses);\n delete newOptions.preparationClasses;\n }\n\n // noop is basically when there is no callback; otherwise something has been set\n var realDomOperation = target.domOperation !== noop ? target.domOperation : null;\n\n extend(target, newOptions);\n\n // TODO(matsko or sreeramu): proper fix is to maintain all animation callback in array and call at last,but now only leave has the callback so no issue with this.\n if (realDomOperation) {\n target.domOperation = realDomOperation;\n }\n\n if (classes.addClass) {\n target.addClass = classes.addClass;\n } else {\n target.addClass = null;\n }\n\n if (classes.removeClass) {\n target.removeClass = classes.removeClass;\n } else {\n target.removeClass = null;\n }\n\n oldAnimation.addClass = target.addClass;\n oldAnimation.removeClass = target.removeClass;\n\n return target;\n}\n\nfunction resolveElementClasses(existing, toAdd, toRemove) {\n var ADD_CLASS = 1;\n var REMOVE_CLASS = -1;\n\n var flags = {};\n existing = splitClassesToLookup(existing);\n\n toAdd = splitClassesToLookup(toAdd);\n forEach(toAdd, function(value, key) {\n flags[key] = ADD_CLASS;\n });\n\n toRemove = splitClassesToLookup(toRemove);\n forEach(toRemove, function(value, key) {\n flags[key] = flags[key] === ADD_CLASS ? null : REMOVE_CLASS;\n });\n\n var classes = {\n addClass: '',\n removeClass: ''\n };\n\n forEach(flags, function(val, klass) {\n var prop, allow;\n if (val === ADD_CLASS) {\n prop = 'addClass';\n allow = !existing[klass] || existing[klass + REMOVE_CLASS_SUFFIX];\n } else if (val === REMOVE_CLASS) {\n prop = 'removeClass';\n allow = existing[klass] || existing[klass + ADD_CLASS_SUFFIX];\n }\n if (allow) {\n if (classes[prop].length) {\n classes[prop] += ' ';\n }\n classes[prop] += klass;\n }\n });\n\n function splitClassesToLookup(classes) {\n if (isString(classes)) {\n classes = classes.split(' ');\n }\n\n var obj = {};\n forEach(classes, function(klass) {\n // sometimes the split leaves empty string values\n // incase extra spaces were applied to the options\n if (klass.length) {\n obj[klass] = true;\n }\n });\n return obj;\n }\n\n return classes;\n}\n\nfunction getDomNode(element) {\n return (element instanceof jqLite) ? element[0] : element;\n}\n\nfunction applyGeneratedPreparationClasses($$jqLite, element, event, options) {\n var classes = '';\n if (event) {\n classes = pendClasses(event, EVENT_CLASS_PREFIX, true);\n }\n if (options.addClass) {\n classes = concatWithSpace(classes, pendClasses(options.addClass, ADD_CLASS_SUFFIX));\n }\n if (options.removeClass) {\n classes = concatWithSpace(classes, pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX));\n }\n if (classes.length) {\n options.preparationClasses = classes;\n element.addClass(classes);\n }\n}\n\nfunction clearGeneratedClasses(element, options) {\n if (options.preparationClasses) {\n element.removeClass(options.preparationClasses);\n options.preparationClasses = null;\n }\n if (options.activeClasses) {\n element.removeClass(options.activeClasses);\n options.activeClasses = null;\n }\n}\n\nfunction blockKeyframeAnimations(node, applyBlock) {\n var value = applyBlock ? 'paused' : '';\n var key = ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY;\n applyInlineStyle(node, [key, value]);\n return [key, value];\n}\n\nfunction applyInlineStyle(node, styleTuple) {\n var prop = styleTuple[0];\n var value = styleTuple[1];\n node.style[prop] = value;\n}\n\nfunction concatWithSpace(a,b) {\n if (!a) return b;\n if (!b) return a;\n return a + ' ' + b;\n}\n\nvar helpers = {\n blockTransitions: function(node, duration) {\n // we use a negative delay value since it performs blocking\n // yet it doesn't kill any existing transitions running on the\n // same element which makes this safe for class-based animations\n var value = duration ? '-' + duration + 's' : '';\n applyInlineStyle(node, [TRANSITION_DELAY_PROP, value]);\n return [TRANSITION_DELAY_PROP, value];\n }\n};\n\nvar $$rAFSchedulerFactory = ['$$rAF', function($$rAF) {\n var queue, cancelFn;\n\n function scheduler(tasks) {\n // we make a copy since RAFScheduler mutates the state\n // of the passed in array variable and this would be difficult\n // to track down on the outside code\n queue = queue.concat(tasks);\n nextTick();\n }\n\n queue = scheduler.queue = [];\n\n /* waitUntilQuiet does two things:\n * 1. It will run the FINAL `fn` value only when an uncanceled RAF has passed through\n * 2. It will delay the next wave of tasks from running until the quiet `fn` has run.\n *\n * The motivation here is that animation code can request more time from the scheduler\n * before the next wave runs. This allows for certain DOM properties such as classes to\n * be resolved in time for the next animation to run.\n */\n scheduler.waitUntilQuiet = function(fn) {\n if (cancelFn) cancelFn();\n\n cancelFn = $$rAF(function() {\n cancelFn = null;\n fn();\n nextTick();\n });\n };\n\n return scheduler;\n\n function nextTick() {\n if (!queue.length) return;\n\n var items = queue.shift();\n for (var i = 0; i < items.length; i++) {\n items[i]();\n }\n\n if (!cancelFn) {\n $$rAF(function() {\n if (!cancelFn) nextTick();\n });\n }\n }\n}];\n\n/**\n * @ngdoc directive\n * @name ngAnimateChildren\n * @restrict AE\n * @element ANY\n *\n * @description\n *\n * ngAnimateChildren allows you to specify that children of this element should animate even if any\n * of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move`\n * (structural) animation, child elements that also have an active structural animation are not animated.\n *\n * Note that even if `ngAnimateChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation).\n *\n *\n * @param {string} ngAnimateChildren If the value is empty, `true` or `on`,\n * then child animations are allowed. If the value is `false`, child animations are not allowed.\n *\n * @example\n * \n \n
\n \n \n
\n
\n
\n List of items:\n
Item {{item}}
\n
\n
\n
\n
\n \n\n .container.ng-enter,\n .container.ng-leave {\n transition: all ease 1.5s;\n }\n\n .container.ng-enter,\n .container.ng-leave-active {\n opacity: 0;\n }\n\n .container.ng-leave,\n .container.ng-enter-active {\n opacity: 1;\n }\n\n .item {\n background: firebrick;\n color: #FFF;\n margin-bottom: 10px;\n }\n\n .item.ng-enter,\n .item.ng-leave {\n transition: transform 1.5s ease;\n }\n\n .item.ng-enter {\n transform: translateX(50px);\n }\n\n .item.ng-enter-active {\n transform: translateX(0);\n }\n \n \n angular.module('ngAnimateChildren', ['ngAnimate'])\n .controller('MainController', function MainController() {\n this.animateChildren = false;\n this.enterElement = false;\n });\n \n
\n */\nvar $$AnimateChildrenDirective = ['$interpolate', function($interpolate) {\n return {\n link: function(scope, element, attrs) {\n var val = attrs.ngAnimateChildren;\n if (isString(val) && val.length === 0) { //empty attribute\n element.data(NG_ANIMATE_CHILDREN_DATA, true);\n } else {\n // Interpolate and set the value, so that it is available to\n // animations that run right after compilation\n setData($interpolate(val)(scope));\n attrs.$observe('ngAnimateChildren', setData);\n }\n\n function setData(value) {\n value = value === 'on' || value === 'true';\n element.data(NG_ANIMATE_CHILDREN_DATA, value);\n }\n }\n };\n}];\n\n/* exported $AnimateCssProvider */\n\nvar ANIMATE_TIMER_KEY = '$$animateCss';\n\n/**\n * @ngdoc service\n * @name $animateCss\n * @kind object\n *\n * @description\n * The `$animateCss` service is a useful utility to trigger customized CSS-based transitions/keyframes\n * from a JavaScript-based animation or directly from a directive. The purpose of `$animateCss` is NOT\n * to side-step how `$animate` and ngAnimate work, but the goal is to allow pre-existing animations or\n * directives to create more complex animations that can be purely driven using CSS code.\n *\n * Note that only browsers that support CSS transitions and/or keyframe animations are capable of\n * rendering animations triggered via `$animateCss` (bad news for IE9 and lower).\n *\n * ## General Use\n * Once again, `$animateCss` is designed to be used inside of a registered JavaScript animation that\n * is powered by ngAnimate. It is possible to use `$animateCss` directly inside of a directive, however,\n * any automatic control over cancelling animations and/or preventing animations from being run on\n * child elements will not be handled by AngularJS. For this to work as expected, please use `$animate` to\n * trigger the animation and then setup a JavaScript animation that injects `$animateCss` to trigger\n * the CSS animation.\n *\n * The example below shows how we can create a folding animation on an element using `ng-if`:\n *\n * ```html\n * \n *
\n * This element will go BOOM\n *
\n * \n * ```\n *\n * Now we create the **JavaScript animation** that will trigger the CSS transition:\n *\n * ```js\n * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) {\n * return {\n * enter: function(element, doneFn) {\n * var height = element[0].offsetHeight;\n * return $animateCss(element, {\n * from: { height:'0px' },\n * to: { height:height + 'px' },\n * duration: 1 // one second\n * });\n * }\n * }\n * }]);\n * ```\n *\n * ## More Advanced Uses\n *\n * `$animateCss` is the underlying code that ngAnimate uses to power **CSS-based animations** behind the scenes. Therefore CSS hooks\n * like `.ng-EVENT`, `.ng-EVENT-active`, `.ng-EVENT-stagger` are all features that can be triggered using `$animateCss` via JavaScript code.\n *\n * This also means that just about any combination of adding classes, removing classes, setting styles, dynamically setting a keyframe animation,\n * applying a hardcoded duration or delay value, changing the animation easing or applying a stagger animation are all options that work with\n * `$animateCss`. The service itself is smart enough to figure out the combination of options and examine the element styling properties in order\n * to provide a working animation that will run in CSS.\n *\n * The example below showcases a more advanced version of the `.fold-animation` from the example above:\n *\n * ```js\n * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) {\n * return {\n * enter: function(element, doneFn) {\n * var height = element[0].offsetHeight;\n * return $animateCss(element, {\n * addClass: 'red large-text pulse-twice',\n * easing: 'ease-out',\n * from: { height:'0px' },\n * to: { height:height + 'px' },\n * duration: 1 // one second\n * });\n * }\n * }\n * }]);\n * ```\n *\n * Since we're adding/removing CSS classes then the CSS transition will also pick those up:\n *\n * ```css\n * /* since a hardcoded duration value of 1 was provided in the JavaScript animation code,\n * the CSS classes below will be transitioned despite them being defined as regular CSS classes */\n * .red { background:red; }\n * .large-text { font-size:20px; }\n *\n * /* we can also use a keyframe animation and $animateCss will make it work alongside the transition */\n * .pulse-twice {\n * animation: 0.5s pulse linear 2;\n * -webkit-animation: 0.5s pulse linear 2;\n * }\n *\n * @keyframes pulse {\n * from { transform: scale(0.5); }\n * to { transform: scale(1.5); }\n * }\n *\n * @-webkit-keyframes pulse {\n * from { -webkit-transform: scale(0.5); }\n * to { -webkit-transform: scale(1.5); }\n * }\n * ```\n *\n * Given this complex combination of CSS classes, styles and options, `$animateCss` will figure everything out and make the animation happen.\n *\n * ## How the Options are handled\n *\n * `$animateCss` is very versatile and intelligent when it comes to figuring out what configurations to apply to the element to ensure the animation\n * works with the options provided. Say for example we were adding a class that contained a keyframe value and we wanted to also animate some inline\n * styles using the `from` and `to` properties.\n *\n * ```js\n * var animator = $animateCss(element, {\n * from: { background:'red' },\n * to: { background:'blue' }\n * });\n * animator.start();\n * ```\n *\n * ```css\n * .rotating-animation {\n * animation:0.5s rotate linear;\n * -webkit-animation:0.5s rotate linear;\n * }\n *\n * @keyframes rotate {\n * from { transform: rotate(0deg); }\n * to { transform: rotate(360deg); }\n * }\n *\n * @-webkit-keyframes rotate {\n * from { -webkit-transform: rotate(0deg); }\n * to { -webkit-transform: rotate(360deg); }\n * }\n * ```\n *\n * The missing pieces here are that we do not have a transition set (within the CSS code nor within the `$animateCss` options) and the duration of the animation is\n * going to be detected from what the keyframe styles on the CSS class are. In this event, `$animateCss` will automatically create an inline transition\n * style matching the duration detected from the keyframe style (which is present in the CSS class that is being added) and then prepare both the transition\n * and keyframe animations to run in parallel on the element. Then when the animation is underway the provided `from` and `to` CSS styles will be applied\n * and spread across the transition and keyframe animation.\n *\n * ## What is returned\n *\n * `$animateCss` works in two stages: a preparation phase and an animation phase. Therefore when `$animateCss` is first called it will NOT actually\n * start the animation. All that is going on here is that the element is being prepared for the animation (which means that the generated CSS classes are\n * added and removed on the element). Once `$animateCss` is called it will return an object with the following properties:\n *\n * ```js\n * var animator = $animateCss(element, { ... });\n * ```\n *\n * Now what do the contents of our `animator` variable look like:\n *\n * ```js\n * {\n * // starts the animation\n * start: Function,\n *\n * // ends (aborts) the animation\n * end: Function\n * }\n * ```\n *\n * To actually start the animation we need to run `animation.start()` which will then return a promise that we can hook into to detect when the animation ends.\n * If we choose not to run the animation then we MUST run `animation.end()` to perform a cleanup on the element (since some CSS classes and styles may have been\n * applied to the element during the preparation phase). Note that all other properties such as duration, delay, transitions and keyframes are just properties\n * and that changing them will not reconfigure the parameters of the animation.\n *\n * ### runner.done() vs runner.then()\n * It is documented that `animation.start()` will return a promise object and this is true, however, there is also an additional method available on the\n * runner called `.done(callbackFn)`. The done method works the same as `.finally(callbackFn)`, however, it does **not trigger a digest to occur**.\n * Therefore, for performance reasons, it's always best to use `runner.done(callback)` instead of `runner.then()`, `runner.catch()` or `runner.finally()`\n * unless you really need a digest to kick off afterwards.\n *\n * Keep in mind that, to make this easier, ngAnimate has tweaked the JS animations API to recognize when a runner instance is returned from $animateCss\n * (so there is no need to call `runner.done(doneFn)` inside of your JavaScript animation code).\n * Check the {@link ngAnimate.$animateCss#usage animation code above} to see how this works.\n *\n * @param {DOMElement} element the element that will be animated\n * @param {object} options the animation-related options that will be applied during the animation\n *\n * * `event` - The DOM event (e.g. enter, leave, move). When used, a generated CSS class of `ng-EVENT` and `ng-EVENT-active` will be applied\n * to the element during the animation. Multiple events can be provided when spaces are used as a separator. (Note that this will not perform any DOM operation.)\n * * `structural` - Indicates that the `ng-` prefix will be added to the event class. Setting to `false` or omitting will turn `ng-EVENT` and\n * `ng-EVENT-active` in `EVENT` and `EVENT-active`. Unused if `event` is omitted.\n * * `easing` - The CSS easing value that will be applied to the transition or keyframe animation (or both).\n * * `transitionStyle` - The raw CSS transition style that will be used (e.g. `1s linear all`).\n * * `keyframeStyle` - The raw CSS keyframe animation style that will be used (e.g. `1s my_animation linear`).\n * * `from` - The starting CSS styles (a key/value object) that will be applied at the start of the animation.\n * * `to` - The ending CSS styles (a key/value object) that will be applied across the animation via a CSS transition.\n * * `addClass` - A space separated list of CSS classes that will be added to the element and spread across the animation.\n * * `removeClass` - A space separated list of CSS classes that will be removed from the element and spread across the animation.\n * * `duration` - A number value representing the total duration of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `0`\n * is provided then the animation will be skipped entirely.\n * * `delay` - A number value representing the total delay of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `true` is\n * used then whatever delay value is detected from the CSS classes will be mirrored on the elements styles (e.g. by setting delay true then the style value\n * of the element will be `transition-delay: DETECTED_VALUE`). Using `true` is useful when you want the CSS classes and inline styles to all share the same\n * CSS delay value.\n * * `stagger` - A numeric time value representing the delay between successively animated elements\n * ({@link ngAnimate#css-staggering-animations Click here to learn how CSS-based staggering works in ngAnimate.})\n * * `staggerIndex` - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a\n * `stagger` option value of `0.1` is used then there will be a stagger delay of `600ms`)\n * * `applyClassesEarly` - Whether or not the classes being added or removed will be used when detecting the animation. This is set by `$animate` when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occurring on the classes being added and removed.)\n * * `cleanupStyles` - Whether or not the provided `from` and `to` styles will be removed once\n * the animation is closed. This is useful for when the styles are used purely for the sake of\n * the animation and do not have a lasting visual effect on the element (e.g. a collapse and open animation).\n * By default this value is set to `false`.\n *\n * @return {object} an object with start and end methods and details about the animation.\n *\n * * `start` - The method to start the animation. This will return a `Promise` when called.\n * * `end` - This method will cancel the animation and remove all applied CSS classes and styles.\n */\nvar ONE_SECOND = 1000;\n\nvar ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;\nvar CLOSING_TIME_BUFFER = 1.5;\n\nvar DETECT_CSS_PROPERTIES = {\n transitionDuration: TRANSITION_DURATION_PROP,\n transitionDelay: TRANSITION_DELAY_PROP,\n transitionProperty: TRANSITION_PROP + PROPERTY_KEY,\n animationDuration: ANIMATION_DURATION_PROP,\n animationDelay: ANIMATION_DELAY_PROP,\n animationIterationCount: ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY\n};\n\nvar DETECT_STAGGER_CSS_PROPERTIES = {\n transitionDuration: TRANSITION_DURATION_PROP,\n transitionDelay: TRANSITION_DELAY_PROP,\n animationDuration: ANIMATION_DURATION_PROP,\n animationDelay: ANIMATION_DELAY_PROP\n};\n\nfunction getCssKeyframeDurationStyle(duration) {\n return [ANIMATION_DURATION_PROP, duration + 's'];\n}\n\nfunction getCssDelayStyle(delay, isKeyframeAnimation) {\n var prop = isKeyframeAnimation ? ANIMATION_DELAY_PROP : TRANSITION_DELAY_PROP;\n return [prop, delay + 's'];\n}\n\nfunction computeCssStyles($window, element, properties) {\n var styles = Object.create(null);\n var detectedStyles = $window.getComputedStyle(element) || {};\n forEach(properties, function(formalStyleName, actualStyleName) {\n var val = detectedStyles[formalStyleName];\n if (val) {\n var c = val.charAt(0);\n\n // only numerical-based values have a negative sign or digit as the first value\n if (c === '-' || c === '+' || c >= 0) {\n val = parseMaxTime(val);\n }\n\n // by setting this to null in the event that the delay is not set or is set directly as 0\n // then we can still allow for negative values to be used later on and not mistake this\n // value for being greater than any other negative value.\n if (val === 0) {\n val = null;\n }\n styles[actualStyleName] = val;\n }\n });\n\n return styles;\n}\n\nfunction parseMaxTime(str) {\n var maxValue = 0;\n var values = str.split(/\\s*,\\s*/);\n forEach(values, function(value) {\n // it's always safe to consider only second values and omit `ms` values since\n // getComputedStyle will always handle the conversion for us\n if (value.charAt(value.length - 1) === 's') {\n value = value.substring(0, value.length - 1);\n }\n value = parseFloat(value) || 0;\n maxValue = maxValue ? Math.max(value, maxValue) : value;\n });\n return maxValue;\n}\n\nfunction truthyTimingValue(val) {\n return val === 0 || val != null;\n}\n\nfunction getCssTransitionDurationStyle(duration, applyOnlyDuration) {\n var style = TRANSITION_PROP;\n var value = duration + 's';\n if (applyOnlyDuration) {\n style += DURATION_KEY;\n } else {\n value += ' linear all';\n }\n return [style, value];\n}\n\n// we do not reassign an already present style value since\n// if we detect the style property value again we may be\n// detecting styles that were added via the `from` styles.\n// We make use of `isDefined` here since an empty string\n// or null value (which is what getPropertyValue will return\n// for a non-existing style) will still be marked as a valid\n// value for the style (a falsy value implies that the style\n// is to be removed at the end of the animation). If we had a simple\n// \"OR\" statement then it would not be enough to catch that.\nfunction registerRestorableStyles(backup, node, properties) {\n forEach(properties, function(prop) {\n backup[prop] = isDefined(backup[prop])\n ? backup[prop]\n : node.style.getPropertyValue(prop);\n });\n}\n\nvar $AnimateCssProvider = ['$animateProvider', /** @this */ function($animateProvider) {\n\n this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout', '$$animateCache',\n '$$forceReflow', '$sniffer', '$$rAFScheduler', '$$animateQueue',\n function($window, $$jqLite, $$AnimateRunner, $timeout, $$animateCache,\n $$forceReflow, $sniffer, $$rAFScheduler, $$animateQueue) {\n\n var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n\n function computeCachedCssStyles(node, className, cacheKey, allowNoDuration, properties) {\n var timings = $$animateCache.get(cacheKey);\n\n if (!timings) {\n timings = computeCssStyles($window, node, properties);\n if (timings.animationIterationCount === 'infinite') {\n timings.animationIterationCount = 1;\n }\n }\n\n // if a css animation has no duration we\n // should mark that so that repeated addClass/removeClass calls are skipped\n var hasDuration = allowNoDuration || (timings.transitionDuration > 0 || timings.animationDuration > 0);\n\n // we keep putting this in multiple times even though the value and the cacheKey are the same\n // because we're keeping an internal tally of how many duplicate animations are detected.\n $$animateCache.put(cacheKey, timings, hasDuration);\n\n return timings;\n }\n\n function computeCachedCssStaggerStyles(node, className, cacheKey, properties) {\n var stagger;\n var staggerCacheKey = 'stagger-' + cacheKey;\n\n // if we have one or more existing matches of matching elements\n // containing the same parent + CSS styles (which is how cacheKey works)\n // then staggering is possible\n if ($$animateCache.count(cacheKey) > 0) {\n stagger = $$animateCache.get(staggerCacheKey);\n\n if (!stagger) {\n var staggerClassName = pendClasses(className, '-stagger');\n\n $$jqLite.addClass(node, staggerClassName);\n\n stagger = computeCssStyles($window, node, properties);\n\n // force the conversion of a null value to zero incase not set\n stagger.animationDuration = Math.max(stagger.animationDuration, 0);\n stagger.transitionDuration = Math.max(stagger.transitionDuration, 0);\n\n $$jqLite.removeClass(node, staggerClassName);\n\n $$animateCache.put(staggerCacheKey, stagger, true);\n }\n }\n\n return stagger || {};\n }\n\n var rafWaitQueue = [];\n function waitUntilQuiet(callback) {\n rafWaitQueue.push(callback);\n $$rAFScheduler.waitUntilQuiet(function() {\n $$animateCache.flush();\n\n // DO NOT REMOVE THIS LINE OR REFACTOR OUT THE `pageWidth` variable.\n // PLEASE EXAMINE THE `$$forceReflow` service to understand why.\n var pageWidth = $$forceReflow();\n\n // we use a for loop to ensure that if the queue is changed\n // during this looping then it will consider new requests\n for (var i = 0; i < rafWaitQueue.length; i++) {\n rafWaitQueue[i](pageWidth);\n }\n rafWaitQueue.length = 0;\n });\n }\n\n function computeTimings(node, className, cacheKey, allowNoDuration) {\n var timings = computeCachedCssStyles(node, className, cacheKey, allowNoDuration, DETECT_CSS_PROPERTIES);\n var aD = timings.animationDelay;\n var tD = timings.transitionDelay;\n timings.maxDelay = aD && tD\n ? Math.max(aD, tD)\n : (aD || tD);\n timings.maxDuration = Math.max(\n timings.animationDuration * timings.animationIterationCount,\n timings.transitionDuration);\n\n return timings;\n }\n\n return function init(element, initialOptions) {\n // all of the animation functions should create\n // a copy of the options data, however, if a\n // parent service has already created a copy then\n // we should stick to using that\n var options = initialOptions || {};\n if (!options.$$prepared) {\n options = prepareAnimationOptions(copy(options));\n }\n\n var restoreStyles = {};\n var node = getDomNode(element);\n if (!node\n || !node.parentNode\n || !$$animateQueue.enabled()) {\n return closeAndReturnNoopAnimator();\n }\n\n var temporaryStyles = [];\n var classes = element.attr('class');\n var styles = packageStyles(options);\n var animationClosed;\n var animationPaused;\n var animationCompleted;\n var runner;\n var runnerHost;\n var maxDelay;\n var maxDelayTime;\n var maxDuration;\n var maxDurationTime;\n var startTime;\n var events = [];\n\n if (options.duration === 0 || (!$sniffer.animations && !$sniffer.transitions)) {\n return closeAndReturnNoopAnimator();\n }\n\n var method = options.event && isArray(options.event)\n ? options.event.join(' ')\n : options.event;\n\n var isStructural = method && options.structural;\n var structuralClassName = '';\n var addRemoveClassName = '';\n\n if (isStructural) {\n structuralClassName = pendClasses(method, EVENT_CLASS_PREFIX, true);\n } else if (method) {\n structuralClassName = method;\n }\n\n if (options.addClass) {\n addRemoveClassName += pendClasses(options.addClass, ADD_CLASS_SUFFIX);\n }\n\n if (options.removeClass) {\n if (addRemoveClassName.length) {\n addRemoveClassName += ' ';\n }\n addRemoveClassName += pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX);\n }\n\n // there may be a situation where a structural animation is combined together\n // with CSS classes that need to resolve before the animation is computed.\n // However this means that there is no explicit CSS code to block the animation\n // from happening (by setting 0s none in the class name). If this is the case\n // we need to apply the classes before the first rAF so we know to continue if\n // there actually is a detected transition or keyframe animation\n if (options.applyClassesEarly && addRemoveClassName.length) {\n applyAnimationClasses(element, options);\n }\n\n var preparationClasses = [structuralClassName, addRemoveClassName].join(' ').trim();\n var fullClassName = classes + ' ' + preparationClasses;\n var hasToStyles = styles.to && Object.keys(styles.to).length > 0;\n var containsKeyframeAnimation = (options.keyframeStyle || '').length > 0;\n\n // there is no way we can trigger an animation if no styles and\n // no classes are being applied which would then trigger a transition,\n // unless there a is raw keyframe value that is applied to the element.\n if (!containsKeyframeAnimation\n && !hasToStyles\n && !preparationClasses) {\n return closeAndReturnNoopAnimator();\n }\n\n var stagger, cacheKey = $$animateCache.cacheKey(node, method, options.addClass, options.removeClass);\n if ($$animateCache.containsCachedAnimationWithoutDuration(cacheKey)) {\n preparationClasses = null;\n return closeAndReturnNoopAnimator();\n }\n\n if (options.stagger > 0) {\n var staggerVal = parseFloat(options.stagger);\n stagger = {\n transitionDelay: staggerVal,\n animationDelay: staggerVal,\n transitionDuration: 0,\n animationDuration: 0\n };\n } else {\n stagger = computeCachedCssStaggerStyles(node, preparationClasses, cacheKey, DETECT_STAGGER_CSS_PROPERTIES);\n }\n\n if (!options.$$skipPreparationClasses) {\n $$jqLite.addClass(element, preparationClasses);\n }\n\n var applyOnlyDuration;\n\n if (options.transitionStyle) {\n var transitionStyle = [TRANSITION_PROP, options.transitionStyle];\n applyInlineStyle(node, transitionStyle);\n temporaryStyles.push(transitionStyle);\n }\n\n if (options.duration >= 0) {\n applyOnlyDuration = node.style[TRANSITION_PROP].length > 0;\n var durationStyle = getCssTransitionDurationStyle(options.duration, applyOnlyDuration);\n\n // we set the duration so that it will be picked up by getComputedStyle later\n applyInlineStyle(node, durationStyle);\n temporaryStyles.push(durationStyle);\n }\n\n if (options.keyframeStyle) {\n var keyframeStyle = [ANIMATION_PROP, options.keyframeStyle];\n applyInlineStyle(node, keyframeStyle);\n temporaryStyles.push(keyframeStyle);\n }\n\n var itemIndex = stagger\n ? options.staggerIndex >= 0\n ? options.staggerIndex\n : $$animateCache.count(cacheKey)\n : 0;\n\n var isFirst = itemIndex === 0;\n\n // this is a pre-emptive way of forcing the setup classes to be added and applied INSTANTLY\n // without causing any combination of transitions to kick in. By adding a negative delay value\n // it forces the setup class' transition to end immediately. We later then remove the negative\n // transition delay to allow for the transition to naturally do it's thing. The beauty here is\n // that if there is no transition defined then nothing will happen and this will also allow\n // other transitions to be stacked on top of each other without any chopping them out.\n if (isFirst && !options.skipBlocking) {\n helpers.blockTransitions(node, SAFE_FAST_FORWARD_DURATION_VALUE);\n }\n\n var timings = computeTimings(node, fullClassName, cacheKey, !isStructural);\n var relativeDelay = timings.maxDelay;\n maxDelay = Math.max(relativeDelay, 0);\n maxDuration = timings.maxDuration;\n\n var flags = {};\n flags.hasTransitions = timings.transitionDuration > 0;\n flags.hasAnimations = timings.animationDuration > 0;\n flags.hasTransitionAll = flags.hasTransitions && timings.transitionProperty === 'all';\n flags.applyTransitionDuration = hasToStyles && (\n (flags.hasTransitions && !flags.hasTransitionAll)\n || (flags.hasAnimations && !flags.hasTransitions));\n flags.applyAnimationDuration = options.duration && flags.hasAnimations;\n flags.applyTransitionDelay = truthyTimingValue(options.delay) && (flags.applyTransitionDuration || flags.hasTransitions);\n flags.applyAnimationDelay = truthyTimingValue(options.delay) && flags.hasAnimations;\n flags.recalculateTimingStyles = addRemoveClassName.length > 0;\n\n if (flags.applyTransitionDuration || flags.applyAnimationDuration) {\n maxDuration = options.duration ? parseFloat(options.duration) : maxDuration;\n\n if (flags.applyTransitionDuration) {\n flags.hasTransitions = true;\n timings.transitionDuration = maxDuration;\n applyOnlyDuration = node.style[TRANSITION_PROP + PROPERTY_KEY].length > 0;\n temporaryStyles.push(getCssTransitionDurationStyle(maxDuration, applyOnlyDuration));\n }\n\n if (flags.applyAnimationDuration) {\n flags.hasAnimations = true;\n timings.animationDuration = maxDuration;\n temporaryStyles.push(getCssKeyframeDurationStyle(maxDuration));\n }\n }\n\n if (maxDuration === 0 && !flags.recalculateTimingStyles) {\n return closeAndReturnNoopAnimator();\n }\n\n var activeClasses = pendClasses(preparationClasses, ACTIVE_CLASS_SUFFIX);\n\n if (options.delay != null) {\n var delayStyle;\n if (typeof options.delay !== 'boolean') {\n delayStyle = parseFloat(options.delay);\n // number in options.delay means we have to recalculate the delay for the closing timeout\n maxDelay = Math.max(delayStyle, 0);\n }\n\n if (flags.applyTransitionDelay) {\n temporaryStyles.push(getCssDelayStyle(delayStyle));\n }\n\n if (flags.applyAnimationDelay) {\n temporaryStyles.push(getCssDelayStyle(delayStyle, true));\n }\n }\n\n // we need to recalculate the delay value since we used a pre-emptive negative\n // delay value and the delay value is required for the final event checking. This\n // property will ensure that this will happen after the RAF phase has passed.\n if (options.duration == null && timings.transitionDuration > 0) {\n flags.recalculateTimingStyles = flags.recalculateTimingStyles || isFirst;\n }\n\n maxDelayTime = maxDelay * ONE_SECOND;\n maxDurationTime = maxDuration * ONE_SECOND;\n if (!options.skipBlocking) {\n flags.blockTransition = timings.transitionDuration > 0;\n flags.blockKeyframeAnimation = timings.animationDuration > 0 &&\n stagger.animationDelay > 0 &&\n stagger.animationDuration === 0;\n }\n\n if (options.from) {\n if (options.cleanupStyles) {\n registerRestorableStyles(restoreStyles, node, Object.keys(options.from));\n }\n applyAnimationFromStyles(element, options);\n }\n\n if (flags.blockTransition || flags.blockKeyframeAnimation) {\n applyBlocking(maxDuration);\n } else if (!options.skipBlocking) {\n helpers.blockTransitions(node, false);\n }\n\n // TODO(matsko): for 1.5 change this code to have an animator object for better debugging\n return {\n $$willAnimate: true,\n end: endFn,\n start: function() {\n if (animationClosed) return;\n\n runnerHost = {\n end: endFn,\n cancel: cancelFn,\n resume: null, //this will be set during the start() phase\n pause: null\n };\n\n runner = new $$AnimateRunner(runnerHost);\n\n waitUntilQuiet(start);\n\n // we don't have access to pause/resume the animation\n // since it hasn't run yet. AnimateRunner will therefore\n // set noop functions for resume and pause and they will\n // later be overridden once the animation is triggered\n return runner;\n }\n };\n\n function endFn() {\n close();\n }\n\n function cancelFn() {\n close(true);\n }\n\n function close(rejected) {\n // if the promise has been called already then we shouldn't close\n // the animation again\n if (animationClosed || (animationCompleted && animationPaused)) return;\n animationClosed = true;\n animationPaused = false;\n\n if (preparationClasses && !options.$$skipPreparationClasses) {\n $$jqLite.removeClass(element, preparationClasses);\n }\n\n if (activeClasses) {\n $$jqLite.removeClass(element, activeClasses);\n }\n\n blockKeyframeAnimations(node, false);\n helpers.blockTransitions(node, false);\n\n forEach(temporaryStyles, function(entry) {\n // There is only one way to remove inline style properties entirely from elements.\n // By using `removeProperty` this works, but we need to convert camel-cased CSS\n // styles down to hyphenated values.\n node.style[entry[0]] = '';\n });\n\n applyAnimationClasses(element, options);\n applyAnimationStyles(element, options);\n\n if (Object.keys(restoreStyles).length) {\n forEach(restoreStyles, function(value, prop) {\n if (value) {\n node.style.setProperty(prop, value);\n } else {\n node.style.removeProperty(prop);\n }\n });\n }\n\n // the reason why we have this option is to allow a synchronous closing callback\n // that is fired as SOON as the animation ends (when the CSS is removed) or if\n // the animation never takes off at all. A good example is a leave animation since\n // the element must be removed just after the animation is over or else the element\n // will appear on screen for one animation frame causing an overbearing flicker.\n if (options.onDone) {\n options.onDone();\n }\n\n if (events && events.length) {\n // Remove the transitionend / animationend listener(s)\n element.off(events.join(' '), onAnimationProgress);\n }\n\n //Cancel the fallback closing timeout and remove the timer data\n var animationTimerData = element.data(ANIMATE_TIMER_KEY);\n if (animationTimerData) {\n $timeout.cancel(animationTimerData[0].timer);\n element.removeData(ANIMATE_TIMER_KEY);\n }\n\n // if the preparation function fails then the promise is not setup\n if (runner) {\n runner.complete(!rejected);\n }\n }\n\n function applyBlocking(duration) {\n if (flags.blockTransition) {\n helpers.blockTransitions(node, duration);\n }\n\n if (flags.blockKeyframeAnimation) {\n blockKeyframeAnimations(node, !!duration);\n }\n }\n\n function closeAndReturnNoopAnimator() {\n runner = new $$AnimateRunner({\n end: endFn,\n cancel: cancelFn\n });\n\n // should flush the cache animation\n waitUntilQuiet(noop);\n close();\n\n return {\n $$willAnimate: false,\n start: function() {\n return runner;\n },\n end: endFn\n };\n }\n\n function onAnimationProgress(event) {\n event.stopPropagation();\n var ev = event.originalEvent || event;\n\n if (ev.target !== node) {\n // Since TransitionEvent / AnimationEvent bubble up,\n // we have to ignore events by finished child animations\n return;\n }\n\n // we now always use `Date.now()` due to the recent changes with\n // event.timeStamp in Firefox, Webkit and Chrome (see #13494 for more info)\n var timeStamp = ev.$manualTimeStamp || Date.now();\n\n /* Firefox (or possibly just Gecko) likes to not round values up\n * when a ms measurement is used for the animation */\n var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));\n\n /* $manualTimeStamp is a mocked timeStamp value which is set\n * within browserTrigger(). This is only here so that tests can\n * mock animations properly. Real events fallback to event.timeStamp,\n * or, if they don't, then a timeStamp is automatically created for them.\n * We're checking to see if the timeStamp surpasses the expected delay,\n * but we're using elapsedTime instead of the timeStamp on the 2nd\n * pre-condition since animationPauseds sometimes close off early */\n if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {\n // we set this flag to ensure that if the transition is paused then, when resumed,\n // the animation will automatically close itself since transitions cannot be paused.\n animationCompleted = true;\n close();\n }\n }\n\n function start() {\n if (animationClosed) return;\n if (!node.parentNode) {\n close();\n return;\n }\n\n // even though we only pause keyframe animations here the pause flag\n // will still happen when transitions are used. Only the transition will\n // not be paused since that is not possible. If the animation ends when\n // paused then it will not complete until unpaused or cancelled.\n var playPause = function(playAnimation) {\n if (!animationCompleted) {\n animationPaused = !playAnimation;\n if (timings.animationDuration) {\n var value = blockKeyframeAnimations(node, animationPaused);\n if (animationPaused) {\n temporaryStyles.push(value);\n } else {\n removeFromArray(temporaryStyles, value);\n }\n }\n } else if (animationPaused && playAnimation) {\n animationPaused = false;\n close();\n }\n };\n\n // checking the stagger duration prevents an accidentally cascade of the CSS delay style\n // being inherited from the parent. If the transition duration is zero then we can safely\n // rely that the delay value is an intentional stagger delay style.\n var maxStagger = itemIndex > 0\n && ((timings.transitionDuration && stagger.transitionDuration === 0) ||\n (timings.animationDuration && stagger.animationDuration === 0))\n && Math.max(stagger.animationDelay, stagger.transitionDelay);\n if (maxStagger) {\n $timeout(triggerAnimationStart,\n Math.floor(maxStagger * itemIndex * ONE_SECOND),\n false);\n } else {\n triggerAnimationStart();\n }\n\n // this will decorate the existing promise runner with pause/resume methods\n runnerHost.resume = function() {\n playPause(true);\n };\n\n runnerHost.pause = function() {\n playPause(false);\n };\n\n function triggerAnimationStart() {\n // just incase a stagger animation kicks in when the animation\n // itself was cancelled entirely\n if (animationClosed) return;\n\n applyBlocking(false);\n\n forEach(temporaryStyles, function(entry) {\n var key = entry[0];\n var value = entry[1];\n node.style[key] = value;\n });\n\n applyAnimationClasses(element, options);\n $$jqLite.addClass(element, activeClasses);\n\n if (flags.recalculateTimingStyles) {\n fullClassName = node.getAttribute('class') + ' ' + preparationClasses;\n cacheKey = $$animateCache.cacheKey(node, method, options.addClass, options.removeClass);\n\n timings = computeTimings(node, fullClassName, cacheKey, false);\n relativeDelay = timings.maxDelay;\n maxDelay = Math.max(relativeDelay, 0);\n maxDuration = timings.maxDuration;\n\n if (maxDuration === 0) {\n close();\n return;\n }\n\n flags.hasTransitions = timings.transitionDuration > 0;\n flags.hasAnimations = timings.animationDuration > 0;\n }\n\n if (flags.applyAnimationDelay) {\n relativeDelay = typeof options.delay !== 'boolean' && truthyTimingValue(options.delay)\n ? parseFloat(options.delay)\n : relativeDelay;\n\n maxDelay = Math.max(relativeDelay, 0);\n timings.animationDelay = relativeDelay;\n delayStyle = getCssDelayStyle(relativeDelay, true);\n temporaryStyles.push(delayStyle);\n node.style[delayStyle[0]] = delayStyle[1];\n }\n\n maxDelayTime = maxDelay * ONE_SECOND;\n maxDurationTime = maxDuration * ONE_SECOND;\n\n if (options.easing) {\n var easeProp, easeVal = options.easing;\n if (flags.hasTransitions) {\n easeProp = TRANSITION_PROP + TIMING_KEY;\n temporaryStyles.push([easeProp, easeVal]);\n node.style[easeProp] = easeVal;\n }\n if (flags.hasAnimations) {\n easeProp = ANIMATION_PROP + TIMING_KEY;\n temporaryStyles.push([easeProp, easeVal]);\n node.style[easeProp] = easeVal;\n }\n }\n\n if (timings.transitionDuration) {\n events.push(TRANSITIONEND_EVENT);\n }\n\n if (timings.animationDuration) {\n events.push(ANIMATIONEND_EVENT);\n }\n\n startTime = Date.now();\n var timerTime = maxDelayTime + CLOSING_TIME_BUFFER * maxDurationTime;\n var endTime = startTime + timerTime;\n\n var animationsData = element.data(ANIMATE_TIMER_KEY) || [];\n var setupFallbackTimer = true;\n if (animationsData.length) {\n var currentTimerData = animationsData[0];\n setupFallbackTimer = endTime > currentTimerData.expectedEndTime;\n if (setupFallbackTimer) {\n $timeout.cancel(currentTimerData.timer);\n } else {\n animationsData.push(close);\n }\n }\n\n if (setupFallbackTimer) {\n var timer = $timeout(onAnimationExpired, timerTime, false);\n animationsData[0] = {\n timer: timer,\n expectedEndTime: endTime\n };\n animationsData.push(close);\n element.data(ANIMATE_TIMER_KEY, animationsData);\n }\n\n if (events.length) {\n element.on(events.join(' '), onAnimationProgress);\n }\n\n if (options.to) {\n if (options.cleanupStyles) {\n registerRestorableStyles(restoreStyles, node, Object.keys(options.to));\n }\n applyAnimationToStyles(element, options);\n }\n }\n\n function onAnimationExpired() {\n var animationsData = element.data(ANIMATE_TIMER_KEY);\n\n // this will be false in the event that the element was\n // removed from the DOM (via a leave animation or something\n // similar)\n if (animationsData) {\n for (var i = 1; i < animationsData.length; i++) {\n animationsData[i]();\n }\n element.removeData(ANIMATE_TIMER_KEY);\n }\n }\n }\n };\n }];\n}];\n\nvar $$AnimateCssDriverProvider = ['$$animationProvider', /** @this */ function($$animationProvider) {\n $$animationProvider.drivers.push('$$animateCssDriver');\n\n var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim';\n var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor';\n\n var NG_OUT_ANCHOR_CLASS_NAME = 'ng-anchor-out';\n var NG_IN_ANCHOR_CLASS_NAME = 'ng-anchor-in';\n\n function isDocumentFragment(node) {\n return node.parentNode && node.parentNode.nodeType === 11;\n }\n\n this.$get = ['$animateCss', '$rootScope', '$$AnimateRunner', '$rootElement', '$sniffer', '$$jqLite', '$document',\n function($animateCss, $rootScope, $$AnimateRunner, $rootElement, $sniffer, $$jqLite, $document) {\n\n // only browsers that support these properties can render animations\n if (!$sniffer.animations && !$sniffer.transitions) return noop;\n\n var bodyNode = $document[0].body;\n var rootNode = getDomNode($rootElement);\n\n var rootBodyElement = jqLite(\n // this is to avoid using something that exists outside of the body\n // we also special case the doc fragment case because our unit test code\n // appends the $rootElement to the body after the app has been bootstrapped\n isDocumentFragment(rootNode) || bodyNode.contains(rootNode) ? rootNode : bodyNode\n );\n\n return function initDriverFn(animationDetails) {\n return animationDetails.from && animationDetails.to\n ? prepareFromToAnchorAnimation(animationDetails.from,\n animationDetails.to,\n animationDetails.classes,\n animationDetails.anchors)\n : prepareRegularAnimation(animationDetails);\n };\n\n function filterCssClasses(classes) {\n //remove all the `ng-` stuff\n return classes.replace(/\\bng-\\S+\\b/g, '');\n }\n\n function getUniqueValues(a, b) {\n if (isString(a)) a = a.split(' ');\n if (isString(b)) b = b.split(' ');\n return a.filter(function(val) {\n return b.indexOf(val) === -1;\n }).join(' ');\n }\n\n function prepareAnchoredAnimation(classes, outAnchor, inAnchor) {\n var clone = jqLite(getDomNode(outAnchor).cloneNode(true));\n var startingClasses = filterCssClasses(getClassVal(clone));\n\n outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);\n inAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);\n\n clone.addClass(NG_ANIMATE_ANCHOR_CLASS_NAME);\n\n rootBodyElement.append(clone);\n\n var animatorIn, animatorOut = prepareOutAnimation();\n\n // the user may not end up using the `out` animation and\n // only making use of the `in` animation or vice-versa.\n // In either case we should allow this and not assume the\n // animation is over unless both animations are not used.\n if (!animatorOut) {\n animatorIn = prepareInAnimation();\n if (!animatorIn) {\n return end();\n }\n }\n\n var startingAnimator = animatorOut || animatorIn;\n\n return {\n start: function() {\n var runner;\n\n var currentAnimation = startingAnimator.start();\n currentAnimation.done(function() {\n currentAnimation = null;\n if (!animatorIn) {\n animatorIn = prepareInAnimation();\n if (animatorIn) {\n currentAnimation = animatorIn.start();\n currentAnimation.done(function() {\n currentAnimation = null;\n end();\n runner.complete();\n });\n return currentAnimation;\n }\n }\n // in the event that there is no `in` animation\n end();\n runner.complete();\n });\n\n runner = new $$AnimateRunner({\n end: endFn,\n cancel: endFn\n });\n\n return runner;\n\n function endFn() {\n if (currentAnimation) {\n currentAnimation.end();\n }\n }\n }\n };\n\n function calculateAnchorStyles(anchor) {\n var styles = {};\n\n var coords = getDomNode(anchor).getBoundingClientRect();\n\n // we iterate directly since safari messes up and doesn't return\n // all the keys for the coords object when iterated\n forEach(['width','height','top','left'], function(key) {\n var value = coords[key];\n switch (key) {\n case 'top':\n value += bodyNode.scrollTop;\n break;\n case 'left':\n value += bodyNode.scrollLeft;\n break;\n }\n styles[key] = Math.floor(value) + 'px';\n });\n return styles;\n }\n\n function prepareOutAnimation() {\n var animator = $animateCss(clone, {\n addClass: NG_OUT_ANCHOR_CLASS_NAME,\n delay: true,\n from: calculateAnchorStyles(outAnchor)\n });\n\n // read the comment within `prepareRegularAnimation` to understand\n // why this check is necessary\n return animator.$$willAnimate ? animator : null;\n }\n\n function getClassVal(element) {\n return element.attr('class') || '';\n }\n\n function prepareInAnimation() {\n var endingClasses = filterCssClasses(getClassVal(inAnchor));\n var toAdd = getUniqueValues(endingClasses, startingClasses);\n var toRemove = getUniqueValues(startingClasses, endingClasses);\n\n var animator = $animateCss(clone, {\n to: calculateAnchorStyles(inAnchor),\n addClass: NG_IN_ANCHOR_CLASS_NAME + ' ' + toAdd,\n removeClass: NG_OUT_ANCHOR_CLASS_NAME + ' ' + toRemove,\n delay: true\n });\n\n // read the comment within `prepareRegularAnimation` to understand\n // why this check is necessary\n return animator.$$willAnimate ? animator : null;\n }\n\n function end() {\n clone.remove();\n outAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME);\n inAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME);\n }\n }\n\n function prepareFromToAnchorAnimation(from, to, classes, anchors) {\n var fromAnimation = prepareRegularAnimation(from, noop);\n var toAnimation = prepareRegularAnimation(to, noop);\n\n var anchorAnimations = [];\n forEach(anchors, function(anchor) {\n var outElement = anchor['out'];\n var inElement = anchor['in'];\n var animator = prepareAnchoredAnimation(classes, outElement, inElement);\n if (animator) {\n anchorAnimations.push(animator);\n }\n });\n\n // no point in doing anything when there are no elements to animate\n if (!fromAnimation && !toAnimation && anchorAnimations.length === 0) return;\n\n return {\n start: function() {\n var animationRunners = [];\n\n if (fromAnimation) {\n animationRunners.push(fromAnimation.start());\n }\n\n if (toAnimation) {\n animationRunners.push(toAnimation.start());\n }\n\n forEach(anchorAnimations, function(animation) {\n animationRunners.push(animation.start());\n });\n\n var runner = new $$AnimateRunner({\n end: endFn,\n cancel: endFn // CSS-driven animations cannot be cancelled, only ended\n });\n\n $$AnimateRunner.all(animationRunners, function(status) {\n runner.complete(status);\n });\n\n return runner;\n\n function endFn() {\n forEach(animationRunners, function(runner) {\n runner.end();\n });\n }\n }\n };\n }\n\n function prepareRegularAnimation(animationDetails) {\n var element = animationDetails.element;\n var options = animationDetails.options || {};\n\n if (animationDetails.structural) {\n options.event = animationDetails.event;\n options.structural = true;\n options.applyClassesEarly = true;\n\n // we special case the leave animation since we want to ensure that\n // the element is removed as soon as the animation is over. Otherwise\n // a flicker might appear or the element may not be removed at all\n if (animationDetails.event === 'leave') {\n options.onDone = options.domOperation;\n }\n }\n\n // We assign the preparationClasses as the actual animation event since\n // the internals of $animateCss will just suffix the event token values\n // with `-active` to trigger the animation.\n if (options.preparationClasses) {\n options.event = concatWithSpace(options.event, options.preparationClasses);\n }\n\n var animator = $animateCss(element, options);\n\n // the driver lookup code inside of $$animation attempts to spawn a\n // driver one by one until a driver returns a.$$willAnimate animator object.\n // $animateCss will always return an object, however, it will pass in\n // a flag as a hint as to whether an animation was detected or not\n return animator.$$willAnimate ? animator : null;\n }\n }];\n}];\n\n// TODO(matsko): use caching here to speed things up for detection\n// TODO(matsko): add documentation\n// by the time...\n\nvar $$AnimateJsProvider = ['$animateProvider', /** @this */ function($animateProvider) {\n this.$get = ['$injector', '$$AnimateRunner', '$$jqLite',\n function($injector, $$AnimateRunner, $$jqLite) {\n\n var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n // $animateJs(element, 'enter');\n return function(element, event, classes, options) {\n var animationClosed = false;\n\n // the `classes` argument is optional and if it is not used\n // then the classes will be resolved from the element's className\n // property as well as options.addClass/options.removeClass.\n if (arguments.length === 3 && isObject(classes)) {\n options = classes;\n classes = null;\n }\n\n options = prepareAnimationOptions(options);\n if (!classes) {\n classes = element.attr('class') || '';\n if (options.addClass) {\n classes += ' ' + options.addClass;\n }\n if (options.removeClass) {\n classes += ' ' + options.removeClass;\n }\n }\n\n var classesToAdd = options.addClass;\n var classesToRemove = options.removeClass;\n\n // the lookupAnimations function returns a series of animation objects that are\n // matched up with one or more of the CSS classes. These animation objects are\n // defined via the module.animation factory function. If nothing is detected then\n // we don't return anything which then makes $animation query the next driver.\n var animations = lookupAnimations(classes);\n var before, after;\n if (animations.length) {\n var afterFn, beforeFn;\n if (event === 'leave') {\n beforeFn = 'leave';\n afterFn = 'afterLeave'; // TODO(matsko): get rid of this\n } else {\n beforeFn = 'before' + event.charAt(0).toUpperCase() + event.substr(1);\n afterFn = event;\n }\n\n if (event !== 'enter' && event !== 'move') {\n before = packageAnimations(element, event, options, animations, beforeFn);\n }\n after = packageAnimations(element, event, options, animations, afterFn);\n }\n\n // no matching animations\n if (!before && !after) return;\n\n function applyOptions() {\n options.domOperation();\n applyAnimationClasses(element, options);\n }\n\n function close() {\n animationClosed = true;\n applyOptions();\n applyAnimationStyles(element, options);\n }\n\n var runner;\n\n return {\n $$willAnimate: true,\n end: function() {\n if (runner) {\n runner.end();\n } else {\n close();\n runner = new $$AnimateRunner();\n runner.complete(true);\n }\n return runner;\n },\n start: function() {\n if (runner) {\n return runner;\n }\n\n runner = new $$AnimateRunner();\n var closeActiveAnimations;\n var chain = [];\n\n if (before) {\n chain.push(function(fn) {\n closeActiveAnimations = before(fn);\n });\n }\n\n if (chain.length) {\n chain.push(function(fn) {\n applyOptions();\n fn(true);\n });\n } else {\n applyOptions();\n }\n\n if (after) {\n chain.push(function(fn) {\n closeActiveAnimations = after(fn);\n });\n }\n\n runner.setHost({\n end: function() {\n endAnimations();\n },\n cancel: function() {\n endAnimations(true);\n }\n });\n\n $$AnimateRunner.chain(chain, onComplete);\n return runner;\n\n function onComplete(success) {\n close(success);\n runner.complete(success);\n }\n\n function endAnimations(cancelled) {\n if (!animationClosed) {\n (closeActiveAnimations || noop)(cancelled);\n onComplete(cancelled);\n }\n }\n }\n };\n\n function executeAnimationFn(fn, element, event, options, onDone) {\n var args;\n switch (event) {\n case 'animate':\n args = [element, options.from, options.to, onDone];\n break;\n\n case 'setClass':\n args = [element, classesToAdd, classesToRemove, onDone];\n break;\n\n case 'addClass':\n args = [element, classesToAdd, onDone];\n break;\n\n case 'removeClass':\n args = [element, classesToRemove, onDone];\n break;\n\n default:\n args = [element, onDone];\n break;\n }\n\n args.push(options);\n\n var value = fn.apply(fn, args);\n if (value) {\n if (isFunction(value.start)) {\n value = value.start();\n }\n\n if (value instanceof $$AnimateRunner) {\n value.done(onDone);\n } else if (isFunction(value)) {\n // optional onEnd / onCancel callback\n return value;\n }\n }\n\n return noop;\n }\n\n function groupEventedAnimations(element, event, options, animations, fnName) {\n var operations = [];\n forEach(animations, function(ani) {\n var animation = ani[fnName];\n if (!animation) return;\n\n // note that all of these animations will run in parallel\n operations.push(function() {\n var runner;\n var endProgressCb;\n\n var resolved = false;\n var onAnimationComplete = function(rejected) {\n if (!resolved) {\n resolved = true;\n (endProgressCb || noop)(rejected);\n runner.complete(!rejected);\n }\n };\n\n runner = new $$AnimateRunner({\n end: function() {\n onAnimationComplete();\n },\n cancel: function() {\n onAnimationComplete(true);\n }\n });\n\n endProgressCb = executeAnimationFn(animation, element, event, options, function(result) {\n var cancelled = result === false;\n onAnimationComplete(cancelled);\n });\n\n return runner;\n });\n });\n\n return operations;\n }\n\n function packageAnimations(element, event, options, animations, fnName) {\n var operations = groupEventedAnimations(element, event, options, animations, fnName);\n if (operations.length === 0) {\n var a, b;\n if (fnName === 'beforeSetClass') {\n a = groupEventedAnimations(element, 'removeClass', options, animations, 'beforeRemoveClass');\n b = groupEventedAnimations(element, 'addClass', options, animations, 'beforeAddClass');\n } else if (fnName === 'setClass') {\n a = groupEventedAnimations(element, 'removeClass', options, animations, 'removeClass');\n b = groupEventedAnimations(element, 'addClass', options, animations, 'addClass');\n }\n\n if (a) {\n operations = operations.concat(a);\n }\n if (b) {\n operations = operations.concat(b);\n }\n }\n\n if (operations.length === 0) return;\n\n // TODO(matsko): add documentation\n return function startAnimation(callback) {\n var runners = [];\n if (operations.length) {\n forEach(operations, function(animateFn) {\n runners.push(animateFn());\n });\n }\n\n if (runners.length) {\n $$AnimateRunner.all(runners, callback);\n } else {\n callback();\n }\n\n return function endFn(reject) {\n forEach(runners, function(runner) {\n if (reject) {\n runner.cancel();\n } else {\n runner.end();\n }\n });\n };\n };\n }\n };\n\n function lookupAnimations(classes) {\n classes = isArray(classes) ? classes : classes.split(' ');\n var matches = [], flagMap = {};\n for (var i = 0; i < classes.length; i++) {\n var klass = classes[i],\n animationFactory = $animateProvider.$$registeredAnimations[klass];\n if (animationFactory && !flagMap[klass]) {\n matches.push($injector.get(animationFactory));\n flagMap[klass] = true;\n }\n }\n return matches;\n }\n }];\n}];\n\nvar $$AnimateJsDriverProvider = ['$$animationProvider', /** @this */ function($$animationProvider) {\n $$animationProvider.drivers.push('$$animateJsDriver');\n this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) {\n return function initDriverFn(animationDetails) {\n if (animationDetails.from && animationDetails.to) {\n var fromAnimation = prepareAnimation(animationDetails.from);\n var toAnimation = prepareAnimation(animationDetails.to);\n if (!fromAnimation && !toAnimation) return;\n\n return {\n start: function() {\n var animationRunners = [];\n\n if (fromAnimation) {\n animationRunners.push(fromAnimation.start());\n }\n\n if (toAnimation) {\n animationRunners.push(toAnimation.start());\n }\n\n $$AnimateRunner.all(animationRunners, done);\n\n var runner = new $$AnimateRunner({\n end: endFnFactory(),\n cancel: endFnFactory()\n });\n\n return runner;\n\n function endFnFactory() {\n return function() {\n forEach(animationRunners, function(runner) {\n // at this point we cannot cancel animations for groups just yet. 1.5+\n runner.end();\n });\n };\n }\n\n function done(status) {\n runner.complete(status);\n }\n }\n };\n } else {\n return prepareAnimation(animationDetails);\n }\n };\n\n function prepareAnimation(animationDetails) {\n // TODO(matsko): make sure to check for grouped animations and delegate down to normal animations\n var element = animationDetails.element;\n var event = animationDetails.event;\n var options = animationDetails.options;\n var classes = animationDetails.classes;\n return $$animateJs(element, event, classes, options);\n }\n }];\n}];\n\nvar NG_ANIMATE_ATTR_NAME = 'data-ng-animate';\nvar NG_ANIMATE_PIN_DATA = '$ngAnimatePin';\nvar $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animateProvider) {\n var PRE_DIGEST_STATE = 1;\n var RUNNING_STATE = 2;\n var ONE_SPACE = ' ';\n\n var rules = this.rules = {\n skip: [],\n cancel: [],\n join: []\n };\n\n function getEventData(options) {\n return {\n addClass: options.addClass,\n removeClass: options.removeClass,\n from: options.from,\n to: options.to\n };\n }\n\n function makeTruthyCssClassMap(classString) {\n if (!classString) {\n return null;\n }\n\n var keys = classString.split(ONE_SPACE);\n var map = Object.create(null);\n\n forEach(keys, function(key) {\n map[key] = true;\n });\n return map;\n }\n\n function hasMatchingClasses(newClassString, currentClassString) {\n if (newClassString && currentClassString) {\n var currentClassMap = makeTruthyCssClassMap(currentClassString);\n return newClassString.split(ONE_SPACE).some(function(className) {\n return currentClassMap[className];\n });\n }\n }\n\n function isAllowed(ruleType, currentAnimation, previousAnimation) {\n return rules[ruleType].some(function(fn) {\n return fn(currentAnimation, previousAnimation);\n });\n }\n\n function hasAnimationClasses(animation, and) {\n var a = (animation.addClass || '').length > 0;\n var b = (animation.removeClass || '').length > 0;\n return and ? a && b : a || b;\n }\n\n rules.join.push(function(newAnimation, currentAnimation) {\n // if the new animation is class-based then we can just tack that on\n return !newAnimation.structural && hasAnimationClasses(newAnimation);\n });\n\n rules.skip.push(function(newAnimation, currentAnimation) {\n // there is no need to animate anything if no classes are being added and\n // there is no structural animation that will be triggered\n return !newAnimation.structural && !hasAnimationClasses(newAnimation);\n });\n\n rules.skip.push(function(newAnimation, currentAnimation) {\n // why should we trigger a new structural animation if the element will\n // be removed from the DOM anyway?\n return currentAnimation.event === 'leave' && newAnimation.structural;\n });\n\n rules.skip.push(function(newAnimation, currentAnimation) {\n // if there is an ongoing current animation then don't even bother running the class-based animation\n return currentAnimation.structural && currentAnimation.state === RUNNING_STATE && !newAnimation.structural;\n });\n\n rules.cancel.push(function(newAnimation, currentAnimation) {\n // there can never be two structural animations running at the same time\n return currentAnimation.structural && newAnimation.structural;\n });\n\n rules.cancel.push(function(newAnimation, currentAnimation) {\n // if the previous animation is already running, but the new animation will\n // be triggered, but the new animation is structural\n return currentAnimation.state === RUNNING_STATE && newAnimation.structural;\n });\n\n rules.cancel.push(function(newAnimation, currentAnimation) {\n // cancel the animation if classes added / removed in both animation cancel each other out,\n // but only if the current animation isn't structural\n\n if (currentAnimation.structural) return false;\n\n var nA = newAnimation.addClass;\n var nR = newAnimation.removeClass;\n var cA = currentAnimation.addClass;\n var cR = currentAnimation.removeClass;\n\n // early detection to save the global CPU shortage :)\n if ((isUndefined(nA) && isUndefined(nR)) || (isUndefined(cA) && isUndefined(cR))) {\n return false;\n }\n\n return hasMatchingClasses(nA, cR) || hasMatchingClasses(nR, cA);\n });\n\n this.$get = ['$$rAF', '$rootScope', '$rootElement', '$document', '$$Map',\n '$$animation', '$$AnimateRunner', '$templateRequest', '$$jqLite', '$$forceReflow',\n '$$isDocumentHidden',\n function($$rAF, $rootScope, $rootElement, $document, $$Map,\n $$animation, $$AnimateRunner, $templateRequest, $$jqLite, $$forceReflow,\n $$isDocumentHidden) {\n\n var activeAnimationsLookup = new $$Map();\n var disabledElementsLookup = new $$Map();\n var animationsEnabled = null;\n\n function removeFromDisabledElementsLookup(evt) {\n disabledElementsLookup.delete(evt.target);\n }\n\n function postDigestTaskFactory() {\n var postDigestCalled = false;\n return function(fn) {\n // we only issue a call to postDigest before\n // it has first passed. This prevents any callbacks\n // from not firing once the animation has completed\n // since it will be out of the digest cycle.\n if (postDigestCalled) {\n fn();\n } else {\n $rootScope.$$postDigest(function() {\n postDigestCalled = true;\n fn();\n });\n }\n };\n }\n\n // Wait until all directive and route-related templates are downloaded and\n // compiled. The $templateRequest.totalPendingRequests variable keeps track of\n // all of the remote templates being currently downloaded. If there are no\n // templates currently downloading then the watcher will still fire anyway.\n var deregisterWatch = $rootScope.$watch(\n function() { return $templateRequest.totalPendingRequests === 0; },\n function(isEmpty) {\n if (!isEmpty) return;\n deregisterWatch();\n\n // Now that all templates have been downloaded, $animate will wait until\n // the post digest queue is empty before enabling animations. By having two\n // calls to $postDigest calls we can ensure that the flag is enabled at the\n // very end of the post digest queue. Since all of the animations in $animate\n // use $postDigest, it's important that the code below executes at the end.\n // This basically means that the page is fully downloaded and compiled before\n // any animations are triggered.\n $rootScope.$$postDigest(function() {\n $rootScope.$$postDigest(function() {\n // we check for null directly in the event that the application already called\n // .enabled() with whatever arguments that it provided it with\n if (animationsEnabled === null) {\n animationsEnabled = true;\n }\n });\n });\n }\n );\n\n var callbackRegistry = Object.create(null);\n\n // remember that the `customFilter`/`classNameFilter` are set during the\n // provider/config stage therefore we can optimize here and setup helper functions\n var customFilter = $animateProvider.customFilter();\n var classNameFilter = $animateProvider.classNameFilter();\n var returnTrue = function() { return true; };\n\n var isAnimatableByFilter = customFilter || returnTrue;\n var isAnimatableClassName = !classNameFilter ? returnTrue : function(node, options) {\n var className = [node.getAttribute('class'), options.addClass, options.removeClass].join(' ');\n return classNameFilter.test(className);\n };\n\n var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n\n function normalizeAnimationDetails(element, animation) {\n return mergeAnimationDetails(element, animation, {});\n }\n\n // IE9-11 has no method \"contains\" in SVG element and in Node.prototype. Bug #10259.\n var contains = window.Node.prototype.contains || /** @this */ function(arg) {\n // eslint-disable-next-line no-bitwise\n return this === arg || !!(this.compareDocumentPosition(arg) & 16);\n };\n\n function findCallbacks(targetParentNode, targetNode, event) {\n var matches = [];\n var entries = callbackRegistry[event];\n if (entries) {\n forEach(entries, function(entry) {\n if (contains.call(entry.node, targetNode)) {\n matches.push(entry.callback);\n } else if (event === 'leave' && contains.call(entry.node, targetParentNode)) {\n matches.push(entry.callback);\n }\n });\n }\n\n return matches;\n }\n\n function filterFromRegistry(list, matchContainer, matchCallback) {\n var containerNode = extractElementNode(matchContainer);\n return list.filter(function(entry) {\n var isMatch = entry.node === containerNode &&\n (!matchCallback || entry.callback === matchCallback);\n return !isMatch;\n });\n }\n\n function cleanupEventListeners(phase, node) {\n if (phase === 'close' && !node.parentNode) {\n // If the element is not attached to a parentNode, it has been removed by\n // the domOperation, and we can safely remove the event callbacks\n $animate.off(node);\n }\n }\n\n var $animate = {\n on: function(event, container, callback) {\n var node = extractElementNode(container);\n callbackRegistry[event] = callbackRegistry[event] || [];\n callbackRegistry[event].push({\n node: node,\n callback: callback\n });\n\n // Remove the callback when the element is removed from the DOM\n jqLite(container).on('$destroy', function() {\n var animationDetails = activeAnimationsLookup.get(node);\n\n if (!animationDetails) {\n // If there's an animation ongoing, the callback calling code will remove\n // the event listeners. If we'd remove here, the callbacks would be removed\n // before the animation ends\n $animate.off(event, container, callback);\n }\n });\n },\n\n off: function(event, container, callback) {\n if (arguments.length === 1 && !isString(arguments[0])) {\n container = arguments[0];\n for (var eventType in callbackRegistry) {\n callbackRegistry[eventType] = filterFromRegistry(callbackRegistry[eventType], container);\n }\n\n return;\n }\n\n var entries = callbackRegistry[event];\n if (!entries) return;\n\n callbackRegistry[event] = arguments.length === 1\n ? null\n : filterFromRegistry(entries, container, callback);\n },\n\n pin: function(element, parentElement) {\n assertArg(isElement(element), 'element', 'not an element');\n assertArg(isElement(parentElement), 'parentElement', 'not an element');\n element.data(NG_ANIMATE_PIN_DATA, parentElement);\n },\n\n push: function(element, event, options, domOperation) {\n options = options || {};\n options.domOperation = domOperation;\n return queueAnimation(element, event, options);\n },\n\n // this method has four signatures:\n // () - global getter\n // (bool) - global setter\n // (element) - element getter\n // (element, bool) - element setter\n enabled: function(element, bool) {\n var argCount = arguments.length;\n\n if (argCount === 0) {\n // () - Global getter\n bool = !!animationsEnabled;\n } else {\n var hasElement = isElement(element);\n\n if (!hasElement) {\n // (bool) - Global setter\n bool = animationsEnabled = !!element;\n } else {\n var node = getDomNode(element);\n\n if (argCount === 1) {\n // (element) - Element getter\n bool = !disabledElementsLookup.get(node);\n } else {\n // (element, bool) - Element setter\n if (!disabledElementsLookup.has(node)) {\n // The element is added to the map for the first time.\n // Create a listener to remove it on `$destroy` (to avoid memory leak).\n jqLite(element).on('$destroy', removeFromDisabledElementsLookup);\n }\n disabledElementsLookup.set(node, !bool);\n }\n }\n }\n\n return bool;\n }\n };\n\n return $animate;\n\n function queueAnimation(originalElement, event, initialOptions) {\n // we always make a copy of the options since\n // there should never be any side effects on\n // the input data when running `$animateCss`.\n var options = copy(initialOptions);\n\n var element = stripCommentsFromElement(originalElement);\n var node = getDomNode(element);\n var parentNode = node && node.parentNode;\n\n options = prepareAnimationOptions(options);\n\n // we create a fake runner with a working promise.\n // These methods will become available after the digest has passed\n var runner = new $$AnimateRunner();\n\n // this is used to trigger callbacks in postDigest mode\n var runInNextPostDigestOrNow = postDigestTaskFactory();\n\n if (isArray(options.addClass)) {\n options.addClass = options.addClass.join(' ');\n }\n\n if (options.addClass && !isString(options.addClass)) {\n options.addClass = null;\n }\n\n if (isArray(options.removeClass)) {\n options.removeClass = options.removeClass.join(' ');\n }\n\n if (options.removeClass && !isString(options.removeClass)) {\n options.removeClass = null;\n }\n\n if (options.from && !isObject(options.from)) {\n options.from = null;\n }\n\n if (options.to && !isObject(options.to)) {\n options.to = null;\n }\n\n // If animations are hard-disabled for the whole application there is no need to continue.\n // There are also situations where a directive issues an animation for a jqLite wrapper that\n // contains only comment nodes. In this case, there is no way we can perform an animation.\n if (!animationsEnabled ||\n !node ||\n !isAnimatableByFilter(node, event, initialOptions) ||\n !isAnimatableClassName(node, options)) {\n close();\n return runner;\n }\n\n var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;\n\n var documentHidden = $$isDocumentHidden();\n\n // This is a hard disable of all animations the element itself, therefore there is no need to\n // continue further past this point if not enabled\n // Animations are also disabled if the document is currently hidden (page is not visible\n // to the user), because browsers slow down or do not flush calls to requestAnimationFrame\n var skipAnimations = documentHidden || disabledElementsLookup.get(node);\n var existingAnimation = (!skipAnimations && activeAnimationsLookup.get(node)) || {};\n var hasExistingAnimation = !!existingAnimation.state;\n\n // there is no point in traversing the same collection of parent ancestors if a followup\n // animation will be run on the same element that already did all that checking work\n if (!skipAnimations && (!hasExistingAnimation || existingAnimation.state !== PRE_DIGEST_STATE)) {\n skipAnimations = !areAnimationsAllowed(node, parentNode, event);\n }\n\n if (skipAnimations) {\n // Callbacks should fire even if the document is hidden (regression fix for issue #14120)\n if (documentHidden) notifyProgress(runner, event, 'start', getEventData(options));\n close();\n if (documentHidden) notifyProgress(runner, event, 'close', getEventData(options));\n return runner;\n }\n\n if (isStructural) {\n closeChildAnimations(node);\n }\n\n var newAnimation = {\n structural: isStructural,\n element: element,\n event: event,\n addClass: options.addClass,\n removeClass: options.removeClass,\n close: close,\n options: options,\n runner: runner\n };\n\n if (hasExistingAnimation) {\n var skipAnimationFlag = isAllowed('skip', newAnimation, existingAnimation);\n if (skipAnimationFlag) {\n if (existingAnimation.state === RUNNING_STATE) {\n close();\n return runner;\n } else {\n mergeAnimationDetails(element, existingAnimation, newAnimation);\n return existingAnimation.runner;\n }\n }\n var cancelAnimationFlag = isAllowed('cancel', newAnimation, existingAnimation);\n if (cancelAnimationFlag) {\n if (existingAnimation.state === RUNNING_STATE) {\n // this will end the animation right away and it is safe\n // to do so since the animation is already running and the\n // runner callback code will run in async\n existingAnimation.runner.end();\n } else if (existingAnimation.structural) {\n // this means that the animation is queued into a digest, but\n // hasn't started yet. Therefore it is safe to run the close\n // method which will call the runner methods in async.\n existingAnimation.close();\n } else {\n // this will merge the new animation options into existing animation options\n mergeAnimationDetails(element, existingAnimation, newAnimation);\n\n return existingAnimation.runner;\n }\n } else {\n // a joined animation means that this animation will take over the existing one\n // so an example would involve a leave animation taking over an enter. Then when\n // the postDigest kicks in the enter will be ignored.\n var joinAnimationFlag = isAllowed('join', newAnimation, existingAnimation);\n if (joinAnimationFlag) {\n if (existingAnimation.state === RUNNING_STATE) {\n normalizeAnimationDetails(element, newAnimation);\n } else {\n applyGeneratedPreparationClasses($$jqLite, element, isStructural ? event : null, options);\n\n event = newAnimation.event = existingAnimation.event;\n options = mergeAnimationDetails(element, existingAnimation, newAnimation);\n\n //we return the same runner since only the option values of this animation will\n //be fed into the `existingAnimation`.\n return existingAnimation.runner;\n }\n }\n }\n } else {\n // normalization in this case means that it removes redundant CSS classes that\n // already exist (addClass) or do not exist (removeClass) on the element\n normalizeAnimationDetails(element, newAnimation);\n }\n\n // when the options are merged and cleaned up we may end up not having to do\n // an animation at all, therefore we should check this before issuing a post\n // digest callback. Structural animations will always run no matter what.\n var isValidAnimation = newAnimation.structural;\n if (!isValidAnimation) {\n // animate (from/to) can be quickly checked first, otherwise we check if any classes are present\n isValidAnimation = (newAnimation.event === 'animate' && Object.keys(newAnimation.options.to || {}).length > 0)\n || hasAnimationClasses(newAnimation);\n }\n\n if (!isValidAnimation) {\n close();\n clearElementAnimationState(node);\n return runner;\n }\n\n // the counter keeps track of cancelled animations\n var counter = (existingAnimation.counter || 0) + 1;\n newAnimation.counter = counter;\n\n markElementAnimationState(node, PRE_DIGEST_STATE, newAnimation);\n\n $rootScope.$$postDigest(function() {\n // It is possible that the DOM nodes inside `originalElement` have been replaced. This can\n // happen if the animated element is a transcluded clone and also has a `templateUrl`\n // directive on it. Therefore, we must recreate `element` in order to interact with the\n // actual DOM nodes.\n // Note: We still need to use the old `node` for certain things, such as looking up in\n // HashMaps where it was used as the key.\n\n element = stripCommentsFromElement(originalElement);\n\n var animationDetails = activeAnimationsLookup.get(node);\n var animationCancelled = !animationDetails;\n animationDetails = animationDetails || {};\n\n // if addClass/removeClass is called before something like enter then the\n // registered parent element may not be present. The code below will ensure\n // that a final value for parent element is obtained\n var parentElement = element.parent() || [];\n\n // animate/structural/class-based animations all have requirements. Otherwise there\n // is no point in performing an animation. The parent node must also be set.\n var isValidAnimation = parentElement.length > 0\n && (animationDetails.event === 'animate'\n || animationDetails.structural\n || hasAnimationClasses(animationDetails));\n\n // this means that the previous animation was cancelled\n // even if the follow-up animation is the same event\n if (animationCancelled || animationDetails.counter !== counter || !isValidAnimation) {\n // if another animation did not take over then we need\n // to make sure that the domOperation and options are\n // handled accordingly\n if (animationCancelled) {\n applyAnimationClasses(element, options);\n applyAnimationStyles(element, options);\n }\n\n // if the event changed from something like enter to leave then we do\n // it, otherwise if it's the same then the end result will be the same too\n if (animationCancelled || (isStructural && animationDetails.event !== event)) {\n options.domOperation();\n runner.end();\n }\n\n // in the event that the element animation was not cancelled or a follow-up animation\n // isn't allowed to animate from here then we need to clear the state of the element\n // so that any future animations won't read the expired animation data.\n if (!isValidAnimation) {\n clearElementAnimationState(node);\n }\n\n return;\n }\n\n // this combined multiple class to addClass / removeClass into a setClass event\n // so long as a structural event did not take over the animation\n event = !animationDetails.structural && hasAnimationClasses(animationDetails, true)\n ? 'setClass'\n : animationDetails.event;\n\n markElementAnimationState(node, RUNNING_STATE);\n var realRunner = $$animation(element, event, animationDetails.options);\n\n // this will update the runner's flow-control events based on\n // the `realRunner` object.\n runner.setHost(realRunner);\n notifyProgress(runner, event, 'start', getEventData(options));\n\n realRunner.done(function(status) {\n close(!status);\n var animationDetails = activeAnimationsLookup.get(node);\n if (animationDetails && animationDetails.counter === counter) {\n clearElementAnimationState(node);\n }\n notifyProgress(runner, event, 'close', getEventData(options));\n });\n });\n\n return runner;\n\n function notifyProgress(runner, event, phase, data) {\n runInNextPostDigestOrNow(function() {\n var callbacks = findCallbacks(parentNode, node, event);\n if (callbacks.length) {\n // do not optimize this call here to RAF because\n // we don't know how heavy the callback code here will\n // be and if this code is buffered then this can\n // lead to a performance regression.\n $$rAF(function() {\n forEach(callbacks, function(callback) {\n callback(element, phase, data);\n });\n cleanupEventListeners(phase, node);\n });\n } else {\n cleanupEventListeners(phase, node);\n }\n });\n runner.progress(event, phase, data);\n }\n\n function close(reject) {\n clearGeneratedClasses(element, options);\n applyAnimationClasses(element, options);\n applyAnimationStyles(element, options);\n options.domOperation();\n runner.complete(!reject);\n }\n }\n\n function closeChildAnimations(node) {\n var children = node.querySelectorAll('[' + NG_ANIMATE_ATTR_NAME + ']');\n forEach(children, function(child) {\n var state = parseInt(child.getAttribute(NG_ANIMATE_ATTR_NAME), 10);\n var animationDetails = activeAnimationsLookup.get(child);\n if (animationDetails) {\n switch (state) {\n case RUNNING_STATE:\n animationDetails.runner.end();\n /* falls through */\n case PRE_DIGEST_STATE:\n activeAnimationsLookup.delete(child);\n break;\n }\n }\n });\n }\n\n function clearElementAnimationState(node) {\n node.removeAttribute(NG_ANIMATE_ATTR_NAME);\n activeAnimationsLookup.delete(node);\n }\n\n /**\n * This fn returns false if any of the following is true:\n * a) animations on any parent element are disabled, and animations on the element aren't explicitly allowed\n * b) a parent element has an ongoing structural animation, and animateChildren is false\n * c) the element is not a child of the body\n * d) the element is not a child of the $rootElement\n */\n function areAnimationsAllowed(node, parentNode, event) {\n var bodyNode = $document[0].body;\n var rootNode = getDomNode($rootElement);\n\n var bodyNodeDetected = (node === bodyNode) || node.nodeName === 'HTML';\n var rootNodeDetected = (node === rootNode);\n var parentAnimationDetected = false;\n var elementDisabled = disabledElementsLookup.get(node);\n var animateChildren;\n\n var parentHost = jqLite.data(node, NG_ANIMATE_PIN_DATA);\n if (parentHost) {\n parentNode = getDomNode(parentHost);\n }\n\n while (parentNode) {\n if (!rootNodeDetected) {\n // AngularJS doesn't want to attempt to animate elements outside of the application\n // therefore we need to ensure that the rootElement is an ancestor of the current element\n rootNodeDetected = (parentNode === rootNode);\n }\n\n if (parentNode.nodeType !== ELEMENT_NODE) {\n // no point in inspecting the #document element\n break;\n }\n\n var details = activeAnimationsLookup.get(parentNode) || {};\n // either an enter, leave or move animation will commence\n // therefore we can't allow any animations to take place\n // but if a parent animation is class-based then that's ok\n if (!parentAnimationDetected) {\n var parentNodeDisabled = disabledElementsLookup.get(parentNode);\n\n if (parentNodeDisabled === true && elementDisabled !== false) {\n // disable animations if the user hasn't explicitly enabled animations on the\n // current element\n elementDisabled = true;\n // element is disabled via parent element, no need to check anything else\n break;\n } else if (parentNodeDisabled === false) {\n elementDisabled = false;\n }\n parentAnimationDetected = details.structural;\n }\n\n if (isUndefined(animateChildren) || animateChildren === true) {\n var value = jqLite.data(parentNode, NG_ANIMATE_CHILDREN_DATA);\n if (isDefined(value)) {\n animateChildren = value;\n }\n }\n\n // there is no need to continue traversing at this point\n if (parentAnimationDetected && animateChildren === false) break;\n\n if (!bodyNodeDetected) {\n // we also need to ensure that the element is or will be a part of the body element\n // otherwise it is pointless to even issue an animation to be rendered\n bodyNodeDetected = (parentNode === bodyNode);\n }\n\n if (bodyNodeDetected && rootNodeDetected) {\n // If both body and root have been found, any other checks are pointless,\n // as no animation data should live outside the application\n break;\n }\n\n if (!rootNodeDetected) {\n // If `rootNode` is not detected, check if `parentNode` is pinned to another element\n parentHost = jqLite.data(parentNode, NG_ANIMATE_PIN_DATA);\n if (parentHost) {\n // The pin target element becomes the next parent element\n parentNode = getDomNode(parentHost);\n continue;\n }\n }\n\n parentNode = parentNode.parentNode;\n }\n\n var allowAnimation = (!parentAnimationDetected || animateChildren) && elementDisabled !== true;\n return allowAnimation && rootNodeDetected && bodyNodeDetected;\n }\n\n function markElementAnimationState(node, state, details) {\n details = details || {};\n details.state = state;\n\n node.setAttribute(NG_ANIMATE_ATTR_NAME, state);\n\n var oldValue = activeAnimationsLookup.get(node);\n var newValue = oldValue\n ? extend(oldValue, details)\n : details;\n activeAnimationsLookup.set(node, newValue);\n }\n }];\n}];\n\n/** @this */\nvar $$AnimateCacheProvider = function() {\n\n var KEY = '$$ngAnimateParentKey';\n var parentCounter = 0;\n var cache = Object.create(null);\n\n this.$get = [function() {\n return {\n cacheKey: function(node, method, addClass, removeClass) {\n var parentNode = node.parentNode;\n var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter);\n var parts = [parentID, method, node.getAttribute('class')];\n if (addClass) {\n parts.push(addClass);\n }\n if (removeClass) {\n parts.push(removeClass);\n }\n return parts.join(' ');\n },\n\n containsCachedAnimationWithoutDuration: function(key) {\n var entry = cache[key];\n\n // nothing cached, so go ahead and animate\n // otherwise it should be a valid animation\n return (entry && !entry.isValid) || false;\n },\n\n flush: function() {\n cache = Object.create(null);\n },\n\n count: function(key) {\n var entry = cache[key];\n return entry ? entry.total : 0;\n },\n\n get: function(key) {\n var entry = cache[key];\n return entry && entry.value;\n },\n\n put: function(key, value, isValid) {\n if (!cache[key]) {\n cache[key] = { total: 1, value: value, isValid: isValid };\n } else {\n cache[key].total++;\n cache[key].value = value;\n }\n }\n };\n }];\n};\n\n/* exported $$AnimationProvider */\n\nvar $$AnimationProvider = ['$animateProvider', /** @this */ function($animateProvider) {\n var NG_ANIMATE_REF_ATTR = 'ng-animate-ref';\n\n var drivers = this.drivers = [];\n\n var RUNNER_STORAGE_KEY = '$$animationRunner';\n var PREPARE_CLASSES_KEY = '$$animatePrepareClasses';\n\n function setRunner(element, runner) {\n element.data(RUNNER_STORAGE_KEY, runner);\n }\n\n function removeRunner(element) {\n element.removeData(RUNNER_STORAGE_KEY);\n }\n\n function getRunner(element) {\n return element.data(RUNNER_STORAGE_KEY);\n }\n\n this.$get = ['$$jqLite', '$rootScope', '$injector', '$$AnimateRunner', '$$Map', '$$rAFScheduler', '$$animateCache',\n function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$Map, $$rAFScheduler, $$animateCache) {\n\n var animationQueue = [];\n var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);\n\n function sortAnimations(animations) {\n var tree = { children: [] };\n var i, lookup = new $$Map();\n\n // this is done first beforehand so that the map\n // is filled with a list of the elements that will be animated\n for (i = 0; i < animations.length; i++) {\n var animation = animations[i];\n lookup.set(animation.domNode, animations[i] = {\n domNode: animation.domNode,\n element: animation.element,\n fn: animation.fn,\n children: []\n });\n }\n\n for (i = 0; i < animations.length; i++) {\n processNode(animations[i]);\n }\n\n return flatten(tree);\n\n function processNode(entry) {\n if (entry.processed) return entry;\n entry.processed = true;\n\n var elementNode = entry.domNode;\n var parentNode = elementNode.parentNode;\n lookup.set(elementNode, entry);\n\n var parentEntry;\n while (parentNode) {\n parentEntry = lookup.get(parentNode);\n if (parentEntry) {\n if (!parentEntry.processed) {\n parentEntry = processNode(parentEntry);\n }\n break;\n }\n parentNode = parentNode.parentNode;\n }\n\n (parentEntry || tree).children.push(entry);\n return entry;\n }\n\n function flatten(tree) {\n var result = [];\n var queue = [];\n var i;\n\n for (i = 0; i < tree.children.length; i++) {\n queue.push(tree.children[i]);\n }\n\n var remainingLevelEntries = queue.length;\n var nextLevelEntries = 0;\n var row = [];\n\n for (i = 0; i < queue.length; i++) {\n var entry = queue[i];\n if (remainingLevelEntries <= 0) {\n remainingLevelEntries = nextLevelEntries;\n nextLevelEntries = 0;\n result.push(row);\n row = [];\n }\n row.push(entry);\n entry.children.forEach(function(childEntry) {\n nextLevelEntries++;\n queue.push(childEntry);\n });\n remainingLevelEntries--;\n }\n\n if (row.length) {\n result.push(row);\n }\n\n return result;\n }\n }\n\n // TODO(matsko): document the signature in a better way\n return function(element, event, options) {\n options = prepareAnimationOptions(options);\n var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;\n\n // there is no animation at the current moment, however\n // these runner methods will get later updated with the\n // methods leading into the driver's end/cancel methods\n // for now they just stop the animation from starting\n var runner = new $$AnimateRunner({\n end: function() { close(); },\n cancel: function() { close(true); }\n });\n\n if (!drivers.length) {\n close();\n return runner;\n }\n\n var classes = mergeClasses(element.attr('class'), mergeClasses(options.addClass, options.removeClass));\n var tempClasses = options.tempClasses;\n if (tempClasses) {\n classes += ' ' + tempClasses;\n options.tempClasses = null;\n }\n\n if (isStructural) {\n element.data(PREPARE_CLASSES_KEY, 'ng-' + event + PREPARE_CLASS_SUFFIX);\n }\n\n setRunner(element, runner);\n\n animationQueue.push({\n // this data is used by the postDigest code and passed into\n // the driver step function\n element: element,\n classes: classes,\n event: event,\n structural: isStructural,\n options: options,\n beforeStart: beforeStart,\n close: close\n });\n\n element.on('$destroy', handleDestroyedElement);\n\n // we only want there to be one function called within the post digest\n // block. This way we can group animations for all the animations that\n // were apart of the same postDigest flush call.\n if (animationQueue.length > 1) return runner;\n\n $rootScope.$$postDigest(function() {\n var animations = [];\n forEach(animationQueue, function(entry) {\n // the element was destroyed early on which removed the runner\n // form its storage. This means we can't animate this element\n // at all and it already has been closed due to destruction.\n if (getRunner(entry.element)) {\n animations.push(entry);\n } else {\n entry.close();\n }\n });\n\n // now any future animations will be in another postDigest\n animationQueue.length = 0;\n\n var groupedAnimations = groupAnimations(animations);\n var toBeSortedAnimations = [];\n\n forEach(groupedAnimations, function(animationEntry) {\n var element = animationEntry.from ? animationEntry.from.element : animationEntry.element;\n var extraClasses = options.addClass;\n\n extraClasses = (extraClasses ? (extraClasses + ' ') : '') + NG_ANIMATE_CLASSNAME;\n var cacheKey = $$animateCache.cacheKey(element[0], animationEntry.event, extraClasses, options.removeClass);\n\n toBeSortedAnimations.push({\n element: element,\n domNode: getDomNode(element),\n fn: function triggerAnimationStart() {\n var startAnimationFn, closeFn = animationEntry.close;\n\n // in the event that we've cached the animation status for this element\n // and it's in fact an invalid animation (something that has duration = 0)\n // then we should skip all the heavy work from here on\n if ($$animateCache.containsCachedAnimationWithoutDuration(cacheKey)) {\n closeFn();\n return;\n }\n\n // it's important that we apply the `ng-animate` CSS class and the\n // temporary classes before we do any driver invoking since these\n // CSS classes may be required for proper CSS detection.\n animationEntry.beforeStart();\n\n // in the event that the element was removed before the digest runs or\n // during the RAF sequencing then we should not trigger the animation.\n var targetElement = animationEntry.anchors\n ? (animationEntry.from.element || animationEntry.to.element)\n : animationEntry.element;\n\n if (getRunner(targetElement)) {\n var operation = invokeFirstDriver(animationEntry);\n if (operation) {\n startAnimationFn = operation.start;\n }\n }\n\n if (!startAnimationFn) {\n closeFn();\n } else {\n var animationRunner = startAnimationFn();\n animationRunner.done(function(status) {\n closeFn(!status);\n });\n updateAnimationRunners(animationEntry, animationRunner);\n }\n }\n });\n });\n\n // we need to sort each of the animations in order of parent to child\n // relationships. This ensures that the child classes are applied at the\n // right time.\n var finalAnimations = sortAnimations(toBeSortedAnimations);\n for (var i = 0; i < finalAnimations.length; i++) {\n var innerArray = finalAnimations[i];\n for (var j = 0; j < innerArray.length; j++) {\n var entry = innerArray[j];\n var element = entry.element;\n\n // the RAFScheduler code only uses functions\n finalAnimations[i][j] = entry.fn;\n\n // the first row of elements shouldn't have a prepare-class added to them\n // since the elements are at the top of the animation hierarchy and they\n // will be applied without a RAF having to pass...\n if (i === 0) {\n element.removeData(PREPARE_CLASSES_KEY);\n continue;\n }\n\n var prepareClassName = element.data(PREPARE_CLASSES_KEY);\n if (prepareClassName) {\n $$jqLite.addClass(element, prepareClassName);\n }\n }\n }\n\n $$rAFScheduler(finalAnimations);\n });\n\n return runner;\n\n // TODO(matsko): change to reference nodes\n function getAnchorNodes(node) {\n var SELECTOR = '[' + NG_ANIMATE_REF_ATTR + ']';\n var items = node.hasAttribute(NG_ANIMATE_REF_ATTR)\n ? [node]\n : node.querySelectorAll(SELECTOR);\n var anchors = [];\n forEach(items, function(node) {\n var attr = node.getAttribute(NG_ANIMATE_REF_ATTR);\n if (attr && attr.length) {\n anchors.push(node);\n }\n });\n return anchors;\n }\n\n function groupAnimations(animations) {\n var preparedAnimations = [];\n var refLookup = {};\n forEach(animations, function(animation, index) {\n var element = animation.element;\n var node = getDomNode(element);\n var event = animation.event;\n var enterOrMove = ['enter', 'move'].indexOf(event) >= 0;\n var anchorNodes = animation.structural ? getAnchorNodes(node) : [];\n\n if (anchorNodes.length) {\n var direction = enterOrMove ? 'to' : 'from';\n\n forEach(anchorNodes, function(anchor) {\n var key = anchor.getAttribute(NG_ANIMATE_REF_ATTR);\n refLookup[key] = refLookup[key] || {};\n refLookup[key][direction] = {\n animationID: index,\n element: jqLite(anchor)\n };\n });\n } else {\n preparedAnimations.push(animation);\n }\n });\n\n var usedIndicesLookup = {};\n var anchorGroups = {};\n forEach(refLookup, function(operations, key) {\n var from = operations.from;\n var to = operations.to;\n\n if (!from || !to) {\n // only one of these is set therefore we can't have an\n // anchor animation since all three pieces are required\n var index = from ? from.animationID : to.animationID;\n var indexKey = index.toString();\n if (!usedIndicesLookup[indexKey]) {\n usedIndicesLookup[indexKey] = true;\n preparedAnimations.push(animations[index]);\n }\n return;\n }\n\n var fromAnimation = animations[from.animationID];\n var toAnimation = animations[to.animationID];\n var lookupKey = from.animationID.toString();\n if (!anchorGroups[lookupKey]) {\n var group = anchorGroups[lookupKey] = {\n structural: true,\n beforeStart: function() {\n fromAnimation.beforeStart();\n toAnimation.beforeStart();\n },\n close: function() {\n fromAnimation.close();\n toAnimation.close();\n },\n classes: cssClassesIntersection(fromAnimation.classes, toAnimation.classes),\n from: fromAnimation,\n to: toAnimation,\n anchors: [] // TODO(matsko): change to reference nodes\n };\n\n // the anchor animations require that the from and to elements both have at least\n // one shared CSS class which effectively marries the two elements together to use\n // the same animation driver and to properly sequence the anchor animation.\n if (group.classes.length) {\n preparedAnimations.push(group);\n } else {\n preparedAnimations.push(fromAnimation);\n preparedAnimations.push(toAnimation);\n }\n }\n\n anchorGroups[lookupKey].anchors.push({\n 'out': from.element, 'in': to.element\n });\n });\n\n return preparedAnimations;\n }\n\n function cssClassesIntersection(a,b) {\n a = a.split(' ');\n b = b.split(' ');\n var matches = [];\n\n for (var i = 0; i < a.length; i++) {\n var aa = a[i];\n if (aa.substring(0,3) === 'ng-') continue;\n\n for (var j = 0; j < b.length; j++) {\n if (aa === b[j]) {\n matches.push(aa);\n break;\n }\n }\n }\n\n return matches.join(' ');\n }\n\n function invokeFirstDriver(animationDetails) {\n // we loop in reverse order since the more general drivers (like CSS and JS)\n // may attempt more elements, but custom drivers are more particular\n for (var i = drivers.length - 1; i >= 0; i--) {\n var driverName = drivers[i];\n var factory = $injector.get(driverName);\n var driver = factory(animationDetails);\n if (driver) {\n return driver;\n }\n }\n }\n\n function beforeStart() {\n tempClasses = (tempClasses ? (tempClasses + ' ') : '') + NG_ANIMATE_CLASSNAME;\n $$jqLite.addClass(element, tempClasses);\n\n var prepareClassName = element.data(PREPARE_CLASSES_KEY);\n if (prepareClassName) {\n $$jqLite.removeClass(element, prepareClassName);\n prepareClassName = null;\n }\n }\n\n function updateAnimationRunners(animation, newRunner) {\n if (animation.from && animation.to) {\n update(animation.from.element);\n update(animation.to.element);\n } else {\n update(animation.element);\n }\n\n function update(element) {\n var runner = getRunner(element);\n if (runner) runner.setHost(newRunner);\n }\n }\n\n function handleDestroyedElement() {\n var runner = getRunner(element);\n if (runner && (event !== 'leave' || !options.$$domOperationFired)) {\n runner.end();\n }\n }\n\n function close(rejected) {\n element.off('$destroy', handleDestroyedElement);\n removeRunner(element);\n\n applyAnimationClasses(element, options);\n applyAnimationStyles(element, options);\n options.domOperation();\n\n if (tempClasses) {\n $$jqLite.removeClass(element, tempClasses);\n }\n\n runner.complete(!rejected);\n }\n };\n }];\n}];\n\n/**\n * @ngdoc directive\n * @name ngAnimateSwap\n * @restrict A\n * @scope\n *\n * @description\n *\n * ngAnimateSwap is a animation-oriented directive that allows for the container to\n * be removed and entered in whenever the associated expression changes. A\n * common usecase for this directive is a rotating banner or slider component which\n * contains one image being present at a time. When the active image changes\n * then the old image will perform a `leave` animation and the new element\n * will be inserted via an `enter` animation.\n *\n * @animations\n * | Animation | Occurs |\n * |----------------------------------|--------------------------------------|\n * | {@link ng.$animate#enter enter} | when the new element is inserted to the DOM |\n * | {@link ng.$animate#leave leave} | when the old element is removed from the DOM |\n *\n * @example\n * \n * \n *
\n *
\n * {{ number }}\n *
\n *
\n *
\n * \n * angular.module('ngAnimateSwapExample', ['ngAnimate'])\n * .controller('AppCtrl', ['$scope', '$interval', function($scope, $interval) {\n * $scope.number = 0;\n * $interval(function() {\n * $scope.number++;\n * }, 1000);\n *\n * var colors = ['red','blue','green','yellow','orange'];\n * $scope.colorClass = function(number) {\n * return colors[number % colors.length];\n * };\n * }]);\n * \n * \n * .container {\n * height:250px;\n * width:250px;\n * position:relative;\n * overflow:hidden;\n * border:2px solid black;\n * }\n * .container .cell {\n * font-size:150px;\n * text-align:center;\n * line-height:250px;\n * position:absolute;\n * top:0;\n * left:0;\n * right:0;\n * border-bottom:2px solid black;\n * }\n * .swap-animation.ng-enter, .swap-animation.ng-leave {\n * transition:0.5s linear all;\n * }\n * .swap-animation.ng-enter {\n * top:-250px;\n * }\n * .swap-animation.ng-enter-active {\n * top:0px;\n * }\n * .swap-animation.ng-leave {\n * top:0px;\n * }\n * .swap-animation.ng-leave-active {\n * top:250px;\n * }\n * .red { background:red; }\n * .green { background:green; }\n * .blue { background:blue; }\n * .yellow { background:yellow; }\n * .orange { background:orange; }\n * \n *
\n */\nvar ngAnimateSwapDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n transclude: 'element',\n terminal: true,\n priority: 550, // We use 550 here to ensure that the directive is caught before others,\n // but after `ngIf` (at priority 600).\n link: function(scope, $element, attrs, ctrl, $transclude) {\n var previousElement, previousScope;\n scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) {\n if (previousElement) {\n $animate.leave(previousElement);\n }\n if (previousScope) {\n previousScope.$destroy();\n previousScope = null;\n }\n if (value || value === 0) {\n $transclude(function(clone, childScope) {\n previousElement = clone;\n previousScope = childScope;\n $animate.enter(clone, null, $element);\n });\n }\n });\n }\n };\n}];\n\n/**\n * @ngdoc module\n * @name ngAnimate\n * @description\n *\n * The `ngAnimate` module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via\n * callback hooks. Animations are not enabled by default, however, by including `ngAnimate` the animation hooks are enabled for an AngularJS app.\n *\n * ## Usage\n * Simply put, there are two ways to make use of animations when ngAnimate is used: by using **CSS** and **JavaScript**. The former works purely based\n * using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via `module.animation()`. For\n * both CSS and JS animations the sole requirement is to have a matching `CSS class` that exists both in the registered animation and within\n * the HTML element that the animation will be triggered on.\n *\n * ## Directive Support\n * The following directives are \"animation aware\":\n *\n * | Directive | Supported Animations |\n * |-------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n * | {@link ng.directive:form#animations form / ngForm} | add and remove ({@link ng.directive:form#css-classes various classes}) |\n * | {@link ngAnimate.directive:ngAnimateSwap#animations ngAnimateSwap} | enter and leave |\n * | {@link ng.directive:ngClass#animations ngClass / {{class}​}} | add and remove |\n * | {@link ng.directive:ngClassEven#animations ngClassEven} | add and remove |\n * | {@link ng.directive:ngClassOdd#animations ngClassOdd} | add and remove |\n * | {@link ng.directive:ngHide#animations ngHide} | add and remove (the `ng-hide` class) |\n * | {@link ng.directive:ngIf#animations ngIf} | enter and leave |\n * | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave |\n * | {@link module:ngMessages#animations ngMessage / ngMessageExp} | enter and leave |\n * | {@link module:ngMessages#animations ngMessages} | add and remove (the `ng-active`/`ng-inactive` classes) |\n * | {@link ng.directive:ngModel#animations ngModel} | add and remove ({@link ng.directive:ngModel#css-classes various classes}) |\n * | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave, and move |\n * | {@link ng.directive:ngShow#animations ngShow} | add and remove (the `ng-hide` class) |\n * | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave |\n * | {@link ngRoute.directive:ngView#animations ngView} | enter and leave |\n *\n * (More information can be found by visiting the documentation associated with each directive.)\n *\n * For a full breakdown of the steps involved during each animation event, refer to the\n * {@link ng.$animate `$animate` API docs}.\n *\n * ## CSS-based Animations\n *\n * CSS-based animations with ngAnimate are unique since they require no JavaScript code at all. By using a CSS class that we reference between our HTML\n * and CSS code we can create an animation that will be picked up by AngularJS when an underlying directive performs an operation.\n *\n * The example below shows how an `enter` animation can be made possible on an element using `ng-if`:\n *\n * ```html\n *
\n * Fade me in out\n *
\n * \n * \n * ```\n *\n * Notice the CSS class **fade**? We can now create the CSS transition code that references this class:\n *\n * ```css\n * /* The starting CSS styles for the enter animation */\n * .fade.ng-enter {\n * transition:0.5s linear all;\n * opacity:0;\n * }\n *\n * /* The finishing CSS styles for the enter animation */\n * .fade.ng-enter.ng-enter-active {\n * opacity:1;\n * }\n * ```\n *\n * The key thing to remember here is that, depending on the animation event (which each of the directives above trigger depending on what's going on) two\n * generated CSS classes will be applied to the element; in the example above we have `.ng-enter` and `.ng-enter-active`. For CSS transitions, the transition\n * code **must** be defined within the starting CSS class (in this case `.ng-enter`). The destination class is what the transition will animate towards.\n *\n * If for example we wanted to create animations for `leave` and `move` (ngRepeat triggers move) then we can do so using the same CSS naming conventions:\n *\n * ```css\n * /* now the element will fade out before it is removed from the DOM */\n * .fade.ng-leave {\n * transition:0.5s linear all;\n * opacity:1;\n * }\n * .fade.ng-leave.ng-leave-active {\n * opacity:0;\n * }\n * ```\n *\n * We can also make use of **CSS Keyframes** by referencing the keyframe animation within the starting CSS class:\n *\n * ```css\n * /* there is no need to define anything inside of the destination\n * CSS class since the keyframe will take charge of the animation */\n * .fade.ng-leave {\n * animation: my_fade_animation 0.5s linear;\n * -webkit-animation: my_fade_animation 0.5s linear;\n * }\n *\n * @keyframes my_fade_animation {\n * from { opacity:1; }\n * to { opacity:0; }\n * }\n *\n * @-webkit-keyframes my_fade_animation {\n * from { opacity:1; }\n * to { opacity:0; }\n * }\n * ```\n *\n * Feel free also mix transitions and keyframes together as well as any other CSS classes on the same element.\n *\n * ### CSS Class-based Animations\n *\n * Class-based animations (animations that are triggered via `ngClass`, `ngShow`, `ngHide` and some other directives) have a slightly different\n * naming convention. Class-based animations are basic enough that a standard transition or keyframe can be referenced on the class being added\n * and removed.\n *\n * For example if we wanted to do a CSS animation for `ngHide` then we place an animation on the `.ng-hide` CSS class:\n *\n * ```html\n *
\n * Show and hide me\n *
\n * \n *\n * \n * ```\n *\n * All that is going on here with ngShow/ngHide behind the scenes is the `.ng-hide` class is added/removed (when the hidden state is valid). Since\n * ngShow and ngHide are animation aware then we can match up a transition and ngAnimate handles the rest.\n *\n * In addition the addition and removal of the CSS class, ngAnimate also provides two helper methods that we can use to further decorate the animation\n * with CSS styles.\n *\n * ```html\n *
\n * Highlight this box\n *
\n * \n *\n * \n * ```\n *\n * We can also make use of CSS keyframes by placing them within the CSS classes.\n *\n *\n * ### CSS Staggering Animations\n * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a\n * curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be\n * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for\n * the animation. The style property expected within the stagger class can either be a **transition-delay** or an\n * **animation-delay** property (or both if your animation contains both transitions and keyframe animations).\n *\n * ```css\n * .my-animation.ng-enter {\n * /* standard transition code */\n * transition: 1s linear all;\n * opacity:0;\n * }\n * .my-animation.ng-enter-stagger {\n * /* this will have a 100ms delay between each successive leave animation */\n * transition-delay: 0.1s;\n *\n * /* As of 1.4.4, this must always be set: it signals ngAnimate\n * to not accidentally inherit a delay property from another CSS class */\n * transition-duration: 0s;\n *\n * /* if you are using animations instead of transitions you should configure as follows:\n * animation-delay: 0.1s;\n * animation-duration: 0s; */\n * }\n * .my-animation.ng-enter.ng-enter-active {\n * /* standard transition styles */\n * opacity:1;\n * }\n * ```\n *\n * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations\n * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this\n * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation\n * will also be reset if one or more animation frames have passed since the multiple calls to `$animate` were fired.\n *\n * The following code will issue the **ng-leave-stagger** event on the element provided:\n *\n * ```js\n * var kids = parent.children();\n *\n * $animate.leave(kids[0]); //stagger index=0\n * $animate.leave(kids[1]); //stagger index=1\n * $animate.leave(kids[2]); //stagger index=2\n * $animate.leave(kids[3]); //stagger index=3\n * $animate.leave(kids[4]); //stagger index=4\n *\n * window.requestAnimationFrame(function() {\n * //stagger has reset itself\n * $animate.leave(kids[5]); //stagger index=0\n * $animate.leave(kids[6]); //stagger index=1\n *\n * $scope.$digest();\n * });\n * ```\n *\n * Stagger animations are currently only supported within CSS-defined animations.\n *\n * ### The `ng-animate` CSS class\n *\n * When ngAnimate is animating an element it will apply the `ng-animate` CSS class to the element for the duration of the animation.\n * This is a temporary CSS class and it will be removed once the animation is over (for both JavaScript and CSS-based animations).\n *\n * Therefore, animations can be applied to an element using this temporary class directly via CSS.\n *\n * ```css\n * .zipper.ng-animate {\n * transition:0.5s linear all;\n * }\n * .zipper.ng-enter {\n * opacity:0;\n * }\n * .zipper.ng-enter.ng-enter-active {\n * opacity:1;\n * }\n * .zipper.ng-leave {\n * opacity:1;\n * }\n * .zipper.ng-leave.ng-leave-active {\n * opacity:0;\n * }\n * ```\n *\n * (Note that the `ng-animate` CSS class is reserved and it cannot be applied on an element directly since ngAnimate will always remove\n * the CSS class once an animation has completed.)\n *\n *\n * ### The `ng-[event]-prepare` class\n *\n * This is a special class that can be used to prevent unwanted flickering / flash of content before\n * the actual animation starts. The class is added as soon as an animation is initialized, but removed\n * before the actual animation starts (after waiting for a $digest).\n * It is also only added for *structural* animations (`enter`, `move`, and `leave`).\n *\n * In practice, flickering can appear when nesting elements with structural animations such as `ngIf`\n * into elements that have class-based animations such as `ngClass`.\n *\n * ```html\n *
\n *
\n *
\n *
\n *
\n * ```\n *\n * It is possible that during the `enter` animation, the `.message` div will be briefly visible before it starts animating.\n * In that case, you can add styles to the CSS that make sure the element stays hidden before the animation starts:\n *\n * ```css\n * .message.ng-enter-prepare {\n * opacity: 0;\n * }\n * ```\n *\n * ### Animating between value changes\n *\n * Sometimes you need to animate between different expression states, whose values\n * don't necessary need to be known or referenced in CSS styles.\n * Unless possible with another {@link ngAnimate#directive-support \"animation aware\" directive},\n * that specific use case can always be covered with {@link ngAnimate.directive:ngAnimateSwap} as\n * can be seen in {@link ngAnimate.directive:ngAnimateSwap#examples this example}.\n *\n * Note that {@link ngAnimate.directive:ngAnimateSwap} is a *structural directive*, which means it\n * creates a new instance of the element (including any other/child directives it may have) and\n * links it to a new scope every time *swap* happens. In some cases this might not be desirable\n * (e.g. for performance reasons, or when you wish to retain internal state on the original\n * element instance).\n *\n * ## JavaScript-based Animations\n *\n * ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared\n * CSS class that is referenced in our HTML code) but in addition we need to register the JavaScript animation on the module. By making use of the\n * `module.animation()` module function we can register the animation.\n *\n * Let's see an example of a enter/leave animation using `ngRepeat`:\n *\n * ```html\n *
\n * {{ item }}\n *
\n * ```\n *\n * See the **slide** CSS class? Let's use that class to define an animation that we'll structure in our module code by using `module.animation`:\n *\n * ```js\n * myModule.animation('.slide', [function() {\n * return {\n * // make note that other events (like addClass/removeClass)\n * // have different function input parameters\n * enter: function(element, doneFn) {\n * jQuery(element).fadeIn(1000, doneFn);\n *\n * // remember to call doneFn so that AngularJS\n * // knows that the animation has concluded\n * },\n *\n * move: function(element, doneFn) {\n * jQuery(element).fadeIn(1000, doneFn);\n * },\n *\n * leave: function(element, doneFn) {\n * jQuery(element).fadeOut(1000, doneFn);\n * }\n * }\n * }]);\n * ```\n *\n * The nice thing about JS-based animations is that we can inject other services and make use of advanced animation libraries such as\n * greensock.js and velocity.js.\n *\n * If our animation code class-based (meaning that something like `ngClass`, `ngHide` and `ngShow` triggers it) then we can still define\n * our animations inside of the same registered animation, however, the function input arguments are a bit different:\n *\n * ```html\n *
\n * this box is moody\n *
\n * \n * \n * \n * ```\n *\n * ```js\n * myModule.animation('.colorful', [function() {\n * return {\n * addClass: function(element, className, doneFn) {\n * // do some cool animation and call the doneFn\n * },\n * removeClass: function(element, className, doneFn) {\n * // do some cool animation and call the doneFn\n * },\n * setClass: function(element, addedClass, removedClass, doneFn) {\n * // do some cool animation and call the doneFn\n * }\n * }\n * }]);\n * ```\n *\n * ## CSS + JS Animations Together\n *\n * AngularJS 1.4 and higher has taken steps to make the amalgamation of CSS and JS animations more flexible. However, unlike earlier versions of AngularJS,\n * defining CSS and JS animations to work off of the same CSS class will not work anymore. Therefore the example below will only result in **JS animations taking\n * charge of the animation**:\n *\n * ```html\n *
\n * Slide in and out\n *
\n * ```\n *\n * ```js\n * myModule.animation('.slide', [function() {\n * return {\n * enter: function(element, doneFn) {\n * jQuery(element).slideIn(1000, doneFn);\n * }\n * }\n * }]);\n * ```\n *\n * ```css\n * .slide.ng-enter {\n * transition:0.5s linear all;\n * transform:translateY(-100px);\n * }\n * .slide.ng-enter.ng-enter-active {\n * transform:translateY(0);\n * }\n * ```\n *\n * Does this mean that CSS and JS animations cannot be used together? Do JS-based animations always have higher priority? We can make up for the\n * lack of CSS animations by using the `$animateCss` service to trigger our own tweaked-out, CSS-based animations directly from\n * our own JS-based animation code:\n *\n * ```js\n * myModule.animation('.slide', ['$animateCss', function($animateCss) {\n * return {\n * enter: function(element) {\n* // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`.\n * return $animateCss(element, {\n * event: 'enter',\n * structural: true\n * });\n * }\n * }\n * }]);\n * ```\n *\n * The nice thing here is that we can save bandwidth by sticking to our CSS-based animation code and we don't need to rely on a 3rd-party animation framework.\n *\n * The `$animateCss` service is very powerful since we can feed in all kinds of extra properties that will be evaluated and fed into a CSS transition or\n * keyframe animation. For example if we wanted to animate the height of an element while adding and removing classes then we can do so by providing that\n * data into `$animateCss` directly:\n *\n * ```js\n * myModule.animation('.slide', ['$animateCss', function($animateCss) {\n * return {\n * enter: function(element) {\n * return $animateCss(element, {\n * event: 'enter',\n * structural: true,\n * addClass: 'maroon-setting',\n * from: { height:0 },\n * to: { height: 200 }\n * });\n * }\n * }\n * }]);\n * ```\n *\n * Now we can fill in the rest via our transition CSS code:\n *\n * ```css\n * /* the transition tells ngAnimate to make the animation happen */\n * .slide.ng-enter { transition:0.5s linear all; }\n *\n * /* this extra CSS class will be absorbed into the transition\n * since the $animateCss code is adding the class */\n * .maroon-setting { background:red; }\n * ```\n *\n * And `$animateCss` will figure out the rest. Just make sure to have the `done()` callback fire the `doneFn` function to signal when the animation is over.\n *\n * To learn more about what's possible be sure to visit the {@link ngAnimate.$animateCss $animateCss service}.\n *\n * ## Animation Anchoring (via `ng-animate-ref`)\n *\n * ngAnimate in AngularJS 1.4 comes packed with the ability to cross-animate elements between\n * structural areas of an application (like views) by pairing up elements using an attribute\n * called `ng-animate-ref`.\n *\n * Let's say for example we have two views that are managed by `ng-view` and we want to show\n * that there is a relationship between two components situated in within these views. By using the\n * `ng-animate-ref` attribute we can identify that the two components are paired together and we\n * can then attach an animation, which is triggered when the view changes.\n *\n * Say for example we have the following template code:\n *\n * ```html\n * \n *
\n *
\n *\n * \n * \n * \n * \n *\n * \n * \n * ```\n *\n * Now, when the view changes (once the link is clicked), ngAnimate will examine the\n * HTML contents to see if there is a match reference between any components in the view\n * that is leaving and the view that is entering. It will scan both the view which is being\n * removed (leave) and inserted (enter) to see if there are any paired DOM elements that\n * contain a matching ref value.\n *\n * The two images match since they share the same ref value. ngAnimate will now create a\n * transport element (which is a clone of the first image element) and it will then attempt\n * to animate to the position of the second image element in the next view. For the animation to\n * work a special CSS class called `ng-anchor` will be added to the transported element.\n *\n * We can now attach a transition onto the `.banner.ng-anchor` CSS class and then\n * ngAnimate will handle the entire transition for us as well as the addition and removal of\n * any changes of CSS classes between the elements:\n *\n * ```css\n * .banner.ng-anchor {\n * /* this animation will last for 1 second since there are\n * two phases to the animation (an `in` and an `out` phase) */\n * transition:0.5s linear all;\n * }\n * ```\n *\n * We also **must** include animations for the views that are being entered and removed\n * (otherwise anchoring wouldn't be possible since the new view would be inserted right away).\n *\n * ```css\n * .view-animation.ng-enter, .view-animation.ng-leave {\n * transition:0.5s linear all;\n * position:fixed;\n * left:0;\n * top:0;\n * width:100%;\n * }\n * .view-animation.ng-enter {\n * transform:translateX(100%);\n * }\n * .view-animation.ng-leave,\n * .view-animation.ng-enter.ng-enter-active {\n * transform:translateX(0%);\n * }\n * .view-animation.ng-leave.ng-leave-active {\n * transform:translateX(-100%);\n * }\n * ```\n *\n * Now we can jump back to the anchor animation. When the animation happens, there are two stages that occur:\n * an `out` and an `in` stage. The `out` stage happens first and that is when the element is animated away\n * from its origin. Once that animation is over then the `in` stage occurs which animates the\n * element to its destination. The reason why there are two animations is to give enough time\n * for the enter animation on the new element to be ready.\n *\n * The example above sets up a transition for both the in and out phases, but we can also target the out or\n * in phases directly via `ng-anchor-out` and `ng-anchor-in`.\n *\n * ```css\n * .banner.ng-anchor-out {\n * transition: 0.5s linear all;\n *\n * /* the scale will be applied during the out animation,\n * but will be animated away when the in animation runs */\n * transform: scale(1.2);\n * }\n *\n * .banner.ng-anchor-in {\n * transition: 1s linear all;\n * }\n * ```\n *\n *\n *\n *\n * ### Anchoring Demo\n *\n \n \n Home\n
\n
\n
\n
\n
\n \n angular.module('anchoringExample', ['ngAnimate', 'ngRoute'])\n .config(['$routeProvider', function($routeProvider) {\n $routeProvider.when('/', {\n templateUrl: 'home.html',\n controller: 'HomeController as home'\n });\n $routeProvider.when('/profile/:id', {\n templateUrl: 'profile.html',\n controller: 'ProfileController as profile'\n });\n }])\n .run(['$rootScope', function($rootScope) {\n $rootScope.records = [\n { id: 1, title: 'Miss Beulah Roob' },\n { id: 2, title: 'Trent Morissette' },\n { id: 3, title: 'Miss Ava Pouros' },\n { id: 4, title: 'Rod Pouros' },\n { id: 5, title: 'Abdul Rice' },\n { id: 6, title: 'Laurie Rutherford Sr.' },\n { id: 7, title: 'Nakia McLaughlin' },\n { id: 8, title: 'Jordon Blanda DVM' },\n { id: 9, title: 'Rhoda Hand' },\n { id: 10, title: 'Alexandrea Sauer' }\n ];\n }])\n .controller('HomeController', [function() {\n //empty\n }])\n .controller('ProfileController', ['$rootScope', '$routeParams',\n function ProfileController($rootScope, $routeParams) {\n var index = parseInt($routeParams.id, 10);\n var record = $rootScope.records[index - 1];\n\n this.title = record.title;\n this.id = record.id;\n }]);\n \n \n

Welcome to the home page

\n

Please click on an element

\n \n {{ record.title }}\n \n
\n \n
\n {{ profile.title }}\n
\n
\n \n .record {\n display:block;\n font-size:20px;\n }\n .profile {\n background:black;\n color:white;\n font-size:100px;\n }\n .view-container {\n position:relative;\n }\n .view-container > .view.ng-animate {\n position:absolute;\n top:0;\n left:0;\n width:100%;\n min-height:500px;\n }\n .view.ng-enter, .view.ng-leave,\n .record.ng-anchor {\n transition:0.5s linear all;\n }\n .view.ng-enter {\n transform:translateX(100%);\n }\n .view.ng-enter.ng-enter-active, .view.ng-leave {\n transform:translateX(0%);\n }\n .view.ng-leave.ng-leave-active {\n transform:translateX(-100%);\n }\n .record.ng-anchor-out {\n background:red;\n }\n \n
\n *\n * ### How is the element transported?\n *\n * When an anchor animation occurs, ngAnimate will clone the starting element and position it exactly where the starting\n * element is located on screen via absolute positioning. The cloned element will be placed inside of the root element\n * of the application (where ng-app was defined) and all of the CSS classes of the starting element will be applied. The\n * element will then animate into the `out` and `in` animations and will eventually reach the coordinates and match\n * the dimensions of the destination element. During the entire animation a CSS class of `.ng-animate-shim` will be applied\n * to both the starting and destination elements in order to hide them from being visible (the CSS styling for the class\n * is: `visibility:hidden`). Once the anchor reaches its destination then it will be removed and the destination element\n * will become visible since the shim class will be removed.\n *\n * ### How is the morphing handled?\n *\n * CSS Anchoring relies on transitions and keyframes and the internal code is intelligent enough to figure out\n * what CSS classes differ between the starting element and the destination element. These different CSS classes\n * will be added/removed on the anchor element and a transition will be applied (the transition that is provided\n * in the anchor class). Long story short, ngAnimate will figure out what classes to add and remove which will\n * make the transition of the element as smooth and automatic as possible. Be sure to use simple CSS classes that\n * do not rely on DOM nesting structure so that the anchor element appears the same as the starting element (since\n * the cloned element is placed inside of root element which is likely close to the body element).\n *\n * Note that if the root element is on the `` element then the cloned node will be placed inside of body.\n *\n *\n * ## Using $animate in your directive code\n *\n * So far we've explored how to feed in animations into an AngularJS application, but how do we trigger animations within our own directives in our application?\n * By injecting the `$animate` service into our directive code, we can trigger structural and class-based hooks which can then be consumed by animations. Let's\n * imagine we have a greeting box that shows and hides itself when the data changes\n *\n * ```html\n * Hi there\n * ```\n *\n * ```js\n * ngModule.directive('greetingBox', ['$animate', function($animate) {\n * return function(scope, element, attrs) {\n * attrs.$observe('active', function(value) {\n * value ? $animate.addClass(element, 'on') : $animate.removeClass(element, 'on');\n * });\n * });\n * }]);\n * ```\n *\n * Now the `on` CSS class is added and removed on the greeting box component. Now if we add a CSS class on top of the greeting box element\n * in our HTML code then we can trigger a CSS or JS animation to happen.\n *\n * ```css\n * /* normally we would create a CSS class to reference on the element */\n * greeting-box.on { transition:0.5s linear all; background:green; color:white; }\n * ```\n *\n * The `$animate` service contains a variety of other methods like `enter`, `leave`, `animate` and `setClass`. To learn more about what's\n * possible be sure to visit the {@link ng.$animate $animate service API page}.\n *\n *\n * ## Callbacks and Promises\n *\n * When `$animate` is called it returns a promise that can be used to capture when the animation has ended. Therefore if we were to trigger\n * an animation (within our directive code) then we can continue performing directive and scope related activities after the animation has\n * ended by chaining onto the returned promise that animation method returns.\n *\n * ```js\n * // somewhere within the depths of the directive\n * $animate.enter(element, parent).then(function() {\n * //the animation has completed\n * });\n * ```\n *\n * (Note that earlier versions of AngularJS prior to v1.4 required the promise code to be wrapped using `$scope.$apply(...)`. This is not the case\n * anymore.)\n *\n * In addition to the animation promise, we can also make use of animation-related callbacks within our directives and controller code by registering\n * an event listener using the `$animate` service. Let's say for example that an animation was triggered on our view\n * routing controller to hook into that:\n *\n * ```js\n * ngModule.controller('HomePageController', ['$animate', function($animate) {\n * $animate.on('enter', ngViewElement, function(element) {\n * // the animation for this route has completed\n * }]);\n * }])\n * ```\n *\n * (Note that you will need to trigger a digest within the callback to get AngularJS to notice any scope-related changes.)\n */\n\nvar copy;\nvar extend;\nvar forEach;\nvar isArray;\nvar isDefined;\nvar isElement;\nvar isFunction;\nvar isObject;\nvar isString;\nvar isUndefined;\nvar jqLite;\nvar noop;\n\n/**\n * @ngdoc service\n * @name $animate\n * @kind object\n *\n * @description\n * The ngAnimate `$animate` service documentation is the same for the core `$animate` service.\n *\n * Click here {@link ng.$animate to learn more about animations with `$animate`}.\n */\nangular.module('ngAnimate', [], function initAngularHelpers() {\n // Access helpers from AngularJS core.\n // Do it inside a `config` block to ensure `window.angular` is available.\n noop = angular.noop;\n copy = angular.copy;\n extend = angular.extend;\n jqLite = angular.element;\n forEach = angular.forEach;\n isArray = angular.isArray;\n isString = angular.isString;\n isObject = angular.isObject;\n isUndefined = angular.isUndefined;\n isDefined = angular.isDefined;\n isFunction = angular.isFunction;\n isElement = angular.isElement;\n})\n .info({ angularVersion: '1.7.9' })\n .directive('ngAnimateSwap', ngAnimateSwapDirective)\n\n .directive('ngAnimateChildren', $$AnimateChildrenDirective)\n .factory('$$rAFScheduler', $$rAFSchedulerFactory)\n\n .provider('$$animateQueue', $$AnimateQueueProvider)\n .provider('$$animateCache', $$AnimateCacheProvider)\n .provider('$$animation', $$AnimationProvider)\n\n .provider('$animateCss', $AnimateCssProvider)\n .provider('$$animateCssDriver', $$AnimateCssDriverProvider)\n\n .provider('$$animateJs', $$AnimateJsProvider)\n .provider('$$animateJsDriver', $$AnimateJsDriverProvider);\n\n\n})(window, window.angular);\n\n/**\n * State-based routing for AngularJS\n * @version v0.4.3\n * @link http://angular-ui.github.com/\n * @license MIT License, http://www.opensource.org/licenses/MIT\n */\n\n/* commonjs package manager support (eg componentjs) */\nif (typeof module !== \"undefined\" && typeof exports !== \"undefined\" && module.exports === exports){\n module.exports = 'ui.router';\n}\n\n(function (window, angular, undefined) {\n/*jshint globalstrict:true*/\n/*global angular:false*/\n'use strict';\n\nvar isDefined = angular.isDefined,\n isFunction = angular.isFunction,\n isString = angular.isString,\n isObject = angular.isObject,\n isArray = angular.isArray,\n forEach = angular.forEach,\n extend = angular.extend,\n copy = angular.copy,\n toJson = angular.toJson;\n\nfunction inherit(parent, extra) {\n return extend(new (extend(function() {}, { prototype: parent }))(), extra);\n}\n\nfunction merge(dst) {\n forEach(arguments, function(obj) {\n if (obj !== dst) {\n forEach(obj, function(value, key) {\n if (!dst.hasOwnProperty(key)) dst[key] = value;\n });\n }\n });\n return dst;\n}\n\n/**\n * Finds the common ancestor path between two states.\n *\n * @param {Object} first The first state.\n * @param {Object} second The second state.\n * @return {Array} Returns an array of state names in descending order, not including the root.\n */\nfunction ancestors(first, second) {\n var path = [];\n\n for (var n in first.path) {\n if (first.path[n] !== second.path[n]) break;\n path.push(first.path[n]);\n }\n return path;\n}\n\n/**\n * IE8-safe wrapper for `Object.keys()`.\n *\n * @param {Object} object A JavaScript object.\n * @return {Array} Returns the keys of the object as an array.\n */\nfunction objectKeys(object) {\n if (Object.keys) {\n return Object.keys(object);\n }\n var result = [];\n\n forEach(object, function(val, key) {\n result.push(key);\n });\n return result;\n}\n\n/**\n * IE8-safe wrapper for `Array.prototype.indexOf()`.\n *\n * @param {Array} array A JavaScript array.\n * @param {*} value A value to search the array for.\n * @return {Number} Returns the array index value of `value`, or `-1` if not present.\n */\nfunction indexOf(array, value) {\n if (Array.prototype.indexOf) {\n return array.indexOf(value, Number(arguments[2]) || 0);\n }\n var len = array.length >>> 0, from = Number(arguments[2]) || 0;\n from = (from < 0) ? Math.ceil(from) : Math.floor(from);\n\n if (from < 0) from += len;\n\n for (; from < len; from++) {\n if (from in array && array[from] === value) return from;\n }\n return -1;\n}\n\n/**\n * Merges a set of parameters with all parameters inherited between the common parents of the\n * current state and a given destination state.\n *\n * @param {Object} currentParams The value of the current state parameters ($stateParams).\n * @param {Object} newParams The set of parameters which will be composited with inherited params.\n * @param {Object} $current Internal definition of object representing the current state.\n * @param {Object} $to Internal definition of object representing state to transition to.\n */\nfunction inheritParams(currentParams, newParams, $current, $to) {\n var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = [];\n\n for (var i in parents) {\n if (!parents[i] || !parents[i].params) continue;\n parentParams = objectKeys(parents[i].params);\n if (!parentParams.length) continue;\n\n for (var j in parentParams) {\n if (indexOf(inheritList, parentParams[j]) >= 0) continue;\n inheritList.push(parentParams[j]);\n inherited[parentParams[j]] = currentParams[parentParams[j]];\n }\n }\n return extend({}, inherited, newParams);\n}\n\n/**\n * Performs a non-strict comparison of the subset of two objects, defined by a list of keys.\n *\n * @param {Object} a The first object.\n * @param {Object} b The second object.\n * @param {Array} keys The list of keys within each object to compare. If the list is empty or not specified,\n * it defaults to the list of keys in `a`.\n * @return {Boolean} Returns `true` if the keys match, otherwise `false`.\n */\nfunction equalForKeys(a, b, keys) {\n if (!keys) {\n keys = [];\n for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility\n }\n\n for (var i=0; i\n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n */\nangular.module('ui.router', ['ui.router.state']);\n\nangular.module('ui.router.compat', ['ui.router']);\n\n/**\n * @ngdoc object\n * @name ui.router.util.$resolve\n *\n * @requires $q\n * @requires $injector\n *\n * @description\n * Manages resolution of (acyclic) graphs of promises.\n */\n$Resolve.$inject = ['$q', '$injector'];\nfunction $Resolve( $q, $injector) {\n \n var VISIT_IN_PROGRESS = 1,\n VISIT_DONE = 2,\n NOTHING = {},\n NO_DEPENDENCIES = [],\n NO_LOCALS = NOTHING,\n NO_PARENT = extend($q.when(NOTHING), { $$promises: NOTHING, $$values: NOTHING });\n \n\n /**\n * @ngdoc function\n * @name ui.router.util.$resolve#study\n * @methodOf ui.router.util.$resolve\n *\n * @description\n * Studies a set of invocables that are likely to be used multiple times.\n *
\n   * $resolve.study(invocables)(locals, parent, self)\n   * 
\n * is equivalent to\n *
\n   * $resolve.resolve(invocables, locals, parent, self)\n   * 
\n * but the former is more efficient (in fact `resolve` just calls `study` \n * internally).\n *\n * @param {object} invocables Invocable objects\n * @return {function} a function to pass in locals, parent and self\n */\n this.study = function (invocables) {\n if (!isObject(invocables)) throw new Error(\"'invocables' must be an object\");\n var invocableKeys = objectKeys(invocables || {});\n \n // Perform a topological sort of invocables to build an ordered plan\n var plan = [], cycle = [], visited = {};\n function visit(value, key) {\n if (visited[key] === VISIT_DONE) return;\n \n cycle.push(key);\n if (visited[key] === VISIT_IN_PROGRESS) {\n cycle.splice(0, indexOf(cycle, key));\n throw new Error(\"Cyclic dependency: \" + cycle.join(\" -> \"));\n }\n visited[key] = VISIT_IN_PROGRESS;\n \n if (isString(value)) {\n plan.push(key, [ function() { return $injector.get(value); }], NO_DEPENDENCIES);\n } else {\n var params = $injector.annotate(value);\n forEach(params, function (param) {\n if (param !== key && invocables.hasOwnProperty(param)) visit(invocables[param], param);\n });\n plan.push(key, value, params);\n }\n \n cycle.pop();\n visited[key] = VISIT_DONE;\n }\n forEach(invocables, visit);\n invocables = cycle = visited = null; // plan is all that's required\n \n function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }\n \n return function (locals, parent, self) {\n if (isResolve(locals) && self === undefined) {\n self = parent; parent = locals; locals = null;\n }\n if (!locals) locals = NO_LOCALS;\n else if (!isObject(locals)) {\n throw new Error(\"'locals' must be an object\");\n } \n if (!parent) parent = NO_PARENT;\n else if (!isResolve(parent)) {\n throw new Error(\"'parent' must be a promise returned by $resolve.resolve()\");\n }\n \n // To complete the overall resolution, we have to wait for the parent\n // promise and for the promise for each invokable in our plan.\n var resolution = $q.defer(),\n result = silenceUncaughtInPromise(resolution.promise),\n promises = result.$$promises = {},\n values = extend({}, locals),\n wait = 1 + plan.length/3,\n merged = false;\n\n silenceUncaughtInPromise(result);\n \n function done() {\n // Merge parent values we haven't got yet and publish our own $$values\n if (!--wait) {\n if (!merged) merge(values, parent.$$values); \n result.$$values = values;\n result.$$promises = result.$$promises || true; // keep for isResolve()\n delete result.$$inheritedValues;\n resolution.resolve(values);\n }\n }\n \n function fail(reason) {\n result.$$failure = reason;\n resolution.reject(reason);\n }\n\n // Short-circuit if parent has already failed\n if (isDefined(parent.$$failure)) {\n fail(parent.$$failure);\n return result;\n }\n \n if (parent.$$inheritedValues) {\n merge(values, omit(parent.$$inheritedValues, invocableKeys));\n }\n\n // Merge parent values if the parent has already resolved, or merge\n // parent promises and wait if the parent resolve is still in progress.\n extend(promises, parent.$$promises);\n if (parent.$$values) {\n merged = merge(values, omit(parent.$$values, invocableKeys));\n result.$$inheritedValues = omit(parent.$$values, invocableKeys);\n done();\n } else {\n if (parent.$$inheritedValues) {\n result.$$inheritedValues = omit(parent.$$inheritedValues, invocableKeys);\n } \n parent.then(done, fail);\n }\n \n // Process each invocable in the plan, but ignore any where a local of the same name exists.\n for (var i=0, ii=plan.length; i\n * Impact on loading templates for more details about this mechanism.\n *\n * @param {boolean} value\n */\n this.shouldUnsafelyUseHttp = function(value) {\n shouldUnsafelyUseHttp = !!value;\n };\n\n /**\n * @ngdoc object\n * @name ui.router.util.$templateFactory\n *\n * @requires $http\n * @requires $templateCache\n * @requires $injector\n *\n * @description\n * Service. Manages loading of templates.\n */\n this.$get = ['$http', '$templateCache', '$injector', function($http, $templateCache, $injector){\n return new TemplateFactory($http, $templateCache, $injector, shouldUnsafelyUseHttp);}];\n}\n\n\n/**\n * @ngdoc object\n * @name ui.router.util.$templateFactory\n *\n * @requires $http\n * @requires $templateCache\n * @requires $injector\n *\n * @description\n * Service. Manages loading of templates.\n */\nfunction TemplateFactory($http, $templateCache, $injector, shouldUnsafelyUseHttp) {\n\n /**\n * @ngdoc function\n * @name ui.router.util.$templateFactory#fromConfig\n * @methodOf ui.router.util.$templateFactory\n *\n * @description\n * Creates a template from a configuration object. \n *\n * @param {object} config Configuration object for which to load a template. \n * The following properties are search in the specified order, and the first one \n * that is defined is used to create the template:\n *\n * @param {string|object} config.template html string template or function to \n * load via {@link ui.router.util.$templateFactory#fromString fromString}.\n * @param {string|object} config.templateUrl url to load or a function returning \n * the url to load via {@link ui.router.util.$templateFactory#fromUrl fromUrl}.\n * @param {Function} config.templateProvider function to invoke via \n * {@link ui.router.util.$templateFactory#fromProvider fromProvider}.\n * @param {object} params Parameters to pass to the template function.\n * @param {object} locals Locals to pass to `invoke` if the template is loaded \n * via a `templateProvider`. Defaults to `{ params: params }`.\n *\n * @return {string|object} The template html as a string, or a promise for \n * that string,or `null` if no template is configured.\n */\n this.fromConfig = function (config, params, locals) {\n return (\n isDefined(config.template) ? this.fromString(config.template, params) :\n isDefined(config.templateUrl) ? this.fromUrl(config.templateUrl, params) :\n isDefined(config.templateProvider) ? this.fromProvider(config.templateProvider, params, locals) :\n null\n );\n };\n\n /**\n * @ngdoc function\n * @name ui.router.util.$templateFactory#fromString\n * @methodOf ui.router.util.$templateFactory\n *\n * @description\n * Creates a template from a string or a function returning a string.\n *\n * @param {string|object} template html template as a string or function that \n * returns an html template as a string.\n * @param {object} params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that \n * string.\n */\n this.fromString = function (template, params) {\n return isFunction(template) ? template(params) : template;\n };\n\n /**\n * @ngdoc function\n * @name ui.router.util.$templateFactory#fromUrl\n * @methodOf ui.router.util.$templateFactory\n * \n * @description\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function \n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.} The template html as a string, or a promise \n * for that string.\n */\n this.fromUrl = function (url, params) {\n if (isFunction(url)) url = url(params);\n if (url == null) return null;\n else {\n if(!shouldUnsafelyUseHttp) {\n return $injector.get('$templateRequest')(url);\n } else {\n return $http\n .get(url, { cache: $templateCache, headers: { Accept: 'text/html' }})\n .then(function(response) { return response.data; });\n }\n }\n };\n\n /**\n * @ngdoc function\n * @name ui.router.util.$templateFactory#fromProvider\n * @methodOf ui.router.util.$templateFactory\n *\n * @description\n * Creates a template by invoking an injectable provider function.\n *\n * @param {Function} provider Function to invoke via `$injector.invoke`\n * @param {Object} params Parameters for the template.\n * @param {Object} locals Locals to pass to `invoke`. Defaults to \n * `{ params: params }`.\n * @return {string|Promise.} The template html as a string, or a promise \n * for that string.\n */\n this.fromProvider = function (provider, params, locals) {\n return $injector.invoke(provider, null, locals || { params: params });\n };\n}\n\nangular.module('ui.router.util').provider('$templateFactory', TemplateFactoryProvider);\n\nvar $$UMFP; // reference to $UrlMatcherFactoryProvider\n\n/**\n * @ngdoc object\n * @name ui.router.util.type:UrlMatcher\n *\n * @description\n * Matches URLs against patterns and extracts named parameters from the path or the search\n * part of the URL. A URL pattern consists of a path pattern, optionally followed by '?' and a list\n * of search parameters. Multiple search parameter names are separated by '&'. Search parameters\n * do not influence whether or not a URL is matched, but their values are passed through into\n * the matched parameters returned by {@link ui.router.util.type:UrlMatcher#methods_exec exec}.\n *\n * Path parameter placeholders can be specified using simple colon/catch-all syntax or curly brace\n * syntax, which optionally allows a regular expression for the parameter to be specified:\n *\n * * `':'` name - colon placeholder\n * * `'*'` name - catch-all placeholder\n * * `'{' name '}'` - curly placeholder\n * * `'{' name ':' regexp|type '}'` - curly placeholder with regexp or type name. Should the\n * regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.\n *\n * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n * must be unique within the pattern (across both path and search parameters). For colon\n * placeholders or curly placeholders without an explicit regexp, a path parameter matches any\n * number of characters other than '/'. For catch-all placeholders the path parameter matches\n * any number of characters.\n *\n * Examples:\n *\n * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for\n * trailing slashes, and patterns have to match the entire path, not just a prefix.\n * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n * '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax.\n * * `'/user/{id:[^/]*}'` - Same as the previous example.\n * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id\n * parameter consists of 1 to 8 hex digits.\n * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the\n * path into the parameter 'path'.\n * * `'/files/*path'` - ditto.\n * * `'/calendar/{start:date}'` - Matches \"/calendar/2014-11-12\" (because the pattern defined\n * in the built-in `date` Type matches `2014-11-12`) and provides a Date object in $stateParams.start\n *\n * @param {string} pattern The pattern to compile into a matcher.\n * @param {Object} config A configuration object hash:\n * @param {Object=} parentMatcher Used to concatenate the pattern/config onto\n * an existing UrlMatcher\n *\n * * `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`.\n * * `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`.\n *\n * @property {string} prefix A static prefix of this pattern. The matcher guarantees that any\n * URL matching this matcher (i.e. any string for which {@link ui.router.util.type:UrlMatcher#methods_exec exec()} returns\n * non-null) will start with this prefix.\n *\n * @property {string} source The pattern that was passed into the constructor\n *\n * @property {string} sourcePath The path portion of the source property\n *\n * @property {string} sourceSearch The search portion of the source property\n *\n * @property {string} regex The constructed regex that will be used to match against the url when\n * it is time to determine which url will match.\n *\n * @returns {Object} New `UrlMatcher` object\n */\nfunction UrlMatcher(pattern, config, parentMatcher) {\n config = extend({ params: {} }, isObject(config) ? config : {});\n\n // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n // '*' name\n // ':' name\n // '{' name '}'\n // '{' name ':' regexp '}'\n // The regular expression is somewhat complicated due to the need to allow curly braces\n // inside the regular expression. The placeholder regexp breaks down as follows:\n // ([:*])([\\w\\[\\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case)\n // \\{([\\w\\[\\]]+)(?:\\:\\s*( ... ))?\\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case\n // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either\n // [^{}\\\\]+ - anything other than curly braces or backslash\n // \\\\. - a backslash escape\n // \\{(?:[^{}\\\\]+|\\\\.)*\\} - a matched set of curly braces containing other atoms\n var placeholder = /([:*])([\\w\\[\\]]+)|\\{([\\w\\[\\]]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n searchPlaceholder = /([:]?)([\\w\\[\\].-]+)|\\{([\\w\\[\\].-]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n compiled = '^', last = 0, m,\n segments = this.segments = [],\n parentParams = parentMatcher ? parentMatcher.params : {},\n params = this.params = parentMatcher ? parentMatcher.params.$$new() : new $$UMFP.ParamSet(),\n paramNames = [];\n\n function addParameter(id, type, config, location) {\n paramNames.push(id);\n if (parentParams[id]) return parentParams[id];\n if (!/^\\w+([-.]+\\w+)*(?:\\[\\])?$/.test(id)) throw new Error(\"Invalid parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n if (params[id]) throw new Error(\"Duplicate parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n params[id] = new $$UMFP.Param(id, type, config, location);\n return params[id];\n }\n\n function quoteRegExp(string, pattern, squash, optional) {\n var surroundPattern = ['',''], result = string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n if (!pattern) return result;\n switch(squash) {\n case false: surroundPattern = ['(', ')' + (optional ? \"?\" : \"\")]; break;\n case true:\n result = result.replace(/\\/$/, '');\n surroundPattern = ['(?:\\/(', ')|\\/)?'];\n break;\n default: surroundPattern = ['(' + squash + \"|\", ')?']; break;\n }\n return result + surroundPattern[0] + pattern + surroundPattern[1];\n }\n\n this.source = pattern;\n\n // Split into static segments separated by path parameter placeholders.\n // The number of segments is always 1 more than the number of parameters.\n function matchDetails(m, isSearch) {\n var id, regexp, segment, type, cfg, arrayMode;\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n cfg = config.params[id];\n segment = pattern.substring(last, m.index);\n regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n\n if (regexp) {\n type = $$UMFP.type(regexp) || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n }\n\n return {\n id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n };\n }\n\n var p, param, segment;\n while ((m = placeholder.exec(pattern))) {\n p = matchDetails(m, false);\n if (p.segment.indexOf('?') >= 0) break; // we're into the search part\n\n param = addParameter(p.id, p.type, p.cfg, \"path\");\n compiled += quoteRegExp(p.segment, param.type.pattern.source, param.squash, param.isOptional);\n segments.push(p.segment);\n last = placeholder.lastIndex;\n }\n segment = pattern.substring(last);\n\n // Find any search parameter names and remove them from the last segment\n var i = segment.indexOf('?');\n\n if (i >= 0) {\n var search = this.sourceSearch = segment.substring(i);\n segment = segment.substring(0, i);\n this.sourcePath = pattern.substring(0, last + i);\n\n if (search.length > 0) {\n last = 0;\n while ((m = searchPlaceholder.exec(search))) {\n p = matchDetails(m, true);\n param = addParameter(p.id, p.type, p.cfg, \"search\");\n last = placeholder.lastIndex;\n // check if ?&\n }\n }\n } else {\n this.sourcePath = pattern;\n this.sourceSearch = '';\n }\n\n compiled += quoteRegExp(segment) + (config.strict === false ? '\\/?' : '') + '$';\n segments.push(segment);\n\n this.regexp = new RegExp(compiled, config.caseInsensitive ? 'i' : undefined);\n this.prefix = segments[0];\n this.$$paramNames = paramNames;\n}\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#concat\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Returns a new matcher for a pattern constructed by appending the path part and adding the\n * search parameters of the specified pattern to this pattern. The current pattern is not\n * modified. This can be understood as creating a pattern for URLs that are relative to (or\n * suffixes of) the current pattern.\n *\n * @example\n * The following two matchers are equivalent:\n *
\n * new UrlMatcher('/user/{id}?q').concat('/details?date');\n * new UrlMatcher('/user/{id}/details?q&date');\n * 
\n *\n * @param {string} pattern The pattern to append.\n * @param {Object} config An object hash of the configuration for the matcher.\n * @returns {UrlMatcher} A matcher for the concatenated pattern.\n */\nUrlMatcher.prototype.concat = function (pattern, config) {\n // Because order of search parameters is irrelevant, we can add our own search\n // parameters to the end of the new pattern. Parse the new pattern by itself\n // and then join the bits together, but it's much easier to do this on a string level.\n var defaultConfig = {\n caseInsensitive: $$UMFP.caseInsensitive(),\n strict: $$UMFP.strictMode(),\n squash: $$UMFP.defaultSquashPolicy()\n };\n return new UrlMatcher(this.sourcePath + pattern + this.sourceSearch, extend(defaultConfig, config), this);\n};\n\nUrlMatcher.prototype.toString = function () {\n return this.source;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#exec\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Tests the specified path against this matcher, and returns an object containing the captured\n * parameter values, or null if the path does not match. The returned object contains the values\n * of any search parameters that are mentioned in the pattern, but their value may be null if\n * they are not present in `searchParams`. This means that search parameters are always treated\n * as optional.\n *\n * @example\n *
\n * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {\n *   x: '1', q: 'hello'\n * });\n * // returns { id: 'bob', q: 'hello', r: null }\n * 
\n *\n * @param {string} path The URL path to match, e.g. `$location.path()`.\n * @param {Object} searchParams URL search parameters, e.g. `$location.search()`.\n * @returns {Object} The captured parameter values.\n */\nUrlMatcher.prototype.exec = function (path, searchParams) {\n var m = this.regexp.exec(path);\n if (!m) return null;\n searchParams = searchParams || {};\n\n var paramNames = this.parameters(), nTotal = paramNames.length,\n nPath = this.segments.length - 1,\n values = {}, i, j, cfg, paramName;\n\n if (nPath !== m.length - 1) throw new Error(\"Unbalanced capture group in route '\" + this.source + \"'\");\n\n function decodePathArray(string) {\n function reverseString(str) { return str.split(\"\").reverse().join(\"\"); }\n function unquoteDashes(str) { return str.replace(/\\\\-/g, \"-\"); }\n\n var split = reverseString(string).split(/-(?!\\\\)/);\n var allReversed = map(split, reverseString);\n return map(allReversed, unquoteDashes).reverse();\n }\n\n var param, paramVal;\n for (i = 0; i < nPath; i++) {\n paramName = paramNames[i];\n param = this.params[paramName];\n paramVal = m[i+1];\n // if the param value matches a pre-replace pair, replace the value before decoding.\n for (j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === paramVal) paramVal = param.replace[j].to;\n }\n if (paramVal && param.array === true) paramVal = decodePathArray(paramVal);\n if (isDefined(paramVal)) paramVal = param.type.decode(paramVal);\n values[paramName] = param.value(paramVal);\n }\n for (/**/; i < nTotal; i++) {\n paramName = paramNames[i];\n values[paramName] = this.params[paramName].value(searchParams[paramName]);\n param = this.params[paramName];\n paramVal = searchParams[paramName];\n for (j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === paramVal) paramVal = param.replace[j].to;\n }\n if (isDefined(paramVal)) paramVal = param.type.decode(paramVal);\n values[paramName] = param.value(paramVal);\n }\n\n return values;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#parameters\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Returns the names of all path and search parameters of this pattern in an unspecified order.\n *\n * @returns {Array.} An array of parameter names. Must be treated as read-only. If the\n * pattern has no parameters, an empty array is returned.\n */\nUrlMatcher.prototype.parameters = function (param) {\n if (!isDefined(param)) return this.$$paramNames;\n return this.params[param] || null;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#validates\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Checks an object hash of parameters to validate their correctness according to the parameter\n * types of this `UrlMatcher`.\n *\n * @param {Object} params The object hash of parameters to validate.\n * @returns {boolean} Returns `true` if `params` validates, otherwise `false`.\n */\nUrlMatcher.prototype.validates = function (params) {\n return this.params.$$validates(params);\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#format\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Creates a URL that matches this pattern by substituting the specified values\n * for the path and search parameters. Null values for path parameters are\n * treated as empty strings.\n *\n * @example\n *
\n * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n * // returns '/user/bob?q=yes'\n * 
\n *\n * @param {Object} values the values to substitute for the parameters in this pattern.\n * @returns {string} the formatted URL (path and optionally search part).\n */\nUrlMatcher.prototype.format = function (values) {\n values = values || {};\n var segments = this.segments, params = this.parameters(), paramset = this.params;\n if (!this.validates(values)) return null;\n\n var i, search = false, nPath = segments.length - 1, nTotal = params.length, result = segments[0];\n\n function encodeDashes(str) { // Replace dashes with encoded \"\\-\"\n return encodeURIComponent(str).replace(/-/g, function(c) { return '%5C%' + c.charCodeAt(0).toString(16).toUpperCase(); });\n }\n\n for (i = 0; i < nTotal; i++) {\n var isPathParam = i < nPath;\n var name = params[i], param = paramset[name], value = param.value(values[name]);\n var isDefaultValue = param.isOptional && param.type.equals(param.value(), value);\n var squash = isDefaultValue ? param.squash : false;\n var encoded = param.type.encode(value);\n\n if (isPathParam) {\n var nextSegment = segments[i + 1];\n var isFinalPathParam = i + 1 === nPath;\n\n if (squash === false) {\n if (encoded != null) {\n if (isArray(encoded)) {\n result += map(encoded, encodeDashes).join(\"-\");\n } else {\n result += encodeURIComponent(encoded);\n }\n }\n result += nextSegment;\n } else if (squash === true) {\n var capture = result.match(/\\/$/) ? /\\/?(.*)/ : /(.*)/;\n result += nextSegment.match(capture)[1];\n } else if (isString(squash)) {\n result += squash + nextSegment;\n }\n\n if (isFinalPathParam && param.squash === true && result.slice(-1) === '/') result = result.slice(0, -1);\n } else {\n if (encoded == null || (isDefaultValue && squash !== false)) continue;\n if (!isArray(encoded)) encoded = [ encoded ];\n if (encoded.length === 0) continue;\n encoded = map(encoded, encodeURIComponent).join('&' + name + '=');\n result += (search ? '&' : '?') + (name + '=' + encoded);\n search = true;\n }\n }\n\n return result;\n};\n\n/**\n * @ngdoc object\n * @name ui.router.util.type:Type\n *\n * @description\n * Implements an interface to define custom parameter types that can be decoded from and encoded to\n * string parameters matched in a URL. Used by {@link ui.router.util.type:UrlMatcher `UrlMatcher`}\n * objects when matching or formatting URLs, or comparing or validating parameter values.\n *\n * See {@link ui.router.util.$urlMatcherFactory#methods_type `$urlMatcherFactory#type()`} for more\n * information on registering custom types.\n *\n * @param {Object} config A configuration object which contains the custom type definition. The object's\n * properties will override the default methods and/or pattern in `Type`'s public interface.\n * @example\n *
\n * {\n *   decode: function(val) { return parseInt(val, 10); },\n *   encode: function(val) { return val && val.toString(); },\n *   equals: function(a, b) { return this.is(a) && a === b; },\n *   is: function(val) { return angular.isNumber(val) isFinite(val) && val % 1 === 0; },\n *   pattern: /\\d+/\n * }\n * 
\n *\n * @property {RegExp} pattern The regular expression pattern used to match values of this type when\n * coming from a substring of a URL.\n *\n * @returns {Object} Returns a new `Type` object.\n */\nfunction Type(config) {\n extend(this, config);\n}\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:Type#is\n * @methodOf ui.router.util.type:Type\n *\n * @description\n * Detects whether a value is of a particular type. Accepts a native (decoded) value\n * and determines whether it matches the current `Type` object.\n *\n * @param {*} val The value to check.\n * @param {string} key Optional. If the type check is happening in the context of a specific\n * {@link ui.router.util.type:UrlMatcher `UrlMatcher`} object, this is the name of the\n * parameter in which `val` is stored. Can be used for meta-programming of `Type` objects.\n * @returns {Boolean} Returns `true` if the value matches the type, otherwise `false`.\n */\nType.prototype.is = function(val, key) {\n return true;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:Type#encode\n * @methodOf ui.router.util.type:Type\n *\n * @description\n * Encodes a custom/native type value to a string that can be embedded in a URL. Note that the\n * return value does *not* need to be URL-safe (i.e. passed through `encodeURIComponent()`), it\n * only needs to be a representation of `val` that has been coerced to a string.\n *\n * @param {*} val The value to encode.\n * @param {string} key The name of the parameter in which `val` is stored. Can be used for\n * meta-programming of `Type` objects.\n * @returns {string} Returns a string representation of `val` that can be encoded in a URL.\n */\nType.prototype.encode = function(val, key) {\n return val;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:Type#decode\n * @methodOf ui.router.util.type:Type\n *\n * @description\n * Converts a parameter value (from URL string or transition param) to a custom/native value.\n *\n * @param {string} val The URL parameter value to decode.\n * @param {string} key The name of the parameter in which `val` is stored. Can be used for\n * meta-programming of `Type` objects.\n * @returns {*} Returns a custom representation of the URL parameter value.\n */\nType.prototype.decode = function(val, key) {\n return val;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:Type#equals\n * @methodOf ui.router.util.type:Type\n *\n * @description\n * Determines whether two decoded values are equivalent.\n *\n * @param {*} a A value to compare against.\n * @param {*} b A value to compare against.\n * @returns {Boolean} Returns `true` if the values are equivalent/equal, otherwise `false`.\n */\nType.prototype.equals = function(a, b) {\n return a == b;\n};\n\nType.prototype.$subPattern = function() {\n var sub = this.pattern.toString();\n return sub.substr(1, sub.length - 2);\n};\n\nType.prototype.pattern = /.*/;\n\nType.prototype.toString = function() { return \"{Type:\" + this.name + \"}\"; };\n\n/** Given an encoded string, or a decoded object, returns a decoded object */\nType.prototype.$normalize = function(val) {\n return this.is(val) ? val : this.decode(val);\n};\n\n/*\n * Wraps an existing custom Type as an array of Type, depending on 'mode'.\n * e.g.:\n * - urlmatcher pattern \"/path?{queryParam[]:int}\"\n * - url: \"/path?queryParam=1&queryParam=2\n * - $stateParams.queryParam will be [1, 2]\n * if `mode` is \"auto\", then\n * - url: \"/path?queryParam=1 will create $stateParams.queryParam: 1\n * - url: \"/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]\n */\nType.prototype.$asArray = function(mode, isSearch) {\n if (!mode) return this;\n if (mode === \"auto\" && !isSearch) throw new Error(\"'auto' array mode is for query parameters only\");\n\n function ArrayType(type, mode) {\n function bindTo(type, callbackName) {\n return function() {\n return type[callbackName].apply(type, arguments);\n };\n }\n\n // Wrap non-array value as array\n function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }\n // Unwrap array value for \"auto\" mode. Return undefined for empty array.\n function arrayUnwrap(val) {\n switch(val.length) {\n case 0: return undefined;\n case 1: return mode === \"auto\" ? val[0] : val;\n default: return val;\n }\n }\n function falsey(val) { return !val; }\n\n // Wraps type (.is/.encode/.decode) functions to operate on each value of an array\n function arrayHandler(callback, allTruthyMode) {\n return function handleArray(val) {\n if (isArray(val) && val.length === 0) return val;\n val = arrayWrap(val);\n var result = map(val, callback);\n if (allTruthyMode === true)\n return filter(result, falsey).length === 0;\n return arrayUnwrap(result);\n };\n }\n\n // Wraps type (.equals) functions to operate on each value of an array\n function arrayEqualsHandler(callback) {\n return function handleArray(val1, val2) {\n var left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (var i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }\n\n this.encode = arrayHandler(bindTo(type, 'encode'));\n this.decode = arrayHandler(bindTo(type, 'decode'));\n this.is = arrayHandler(bindTo(type, 'is'), true);\n this.equals = arrayEqualsHandler(bindTo(type, 'equals'));\n this.pattern = type.pattern;\n this.$normalize = arrayHandler(bindTo(type, '$normalize'));\n this.name = type.name;\n this.$arrayMode = mode;\n }\n\n return new ArrayType(this, mode);\n};\n\n\n\n/**\n * @ngdoc object\n * @name ui.router.util.$urlMatcherFactory\n *\n * @description\n * Factory for {@link ui.router.util.type:UrlMatcher `UrlMatcher`} instances. The factory\n * is also available to providers under the name `$urlMatcherFactoryProvider`.\n */\nfunction $UrlMatcherFactory() {\n $$UMFP = this;\n\n var isCaseInsensitive = false, isStrictMode = true, defaultSquashPolicy = false;\n\n // Use tildes to pre-encode slashes.\n // If the slashes are simply URLEncoded, the browser can choose to pre-decode them,\n // and bidirectional encoding/decoding fails.\n // Tilde was chosen because it's not a RFC 3986 section 2.2 Reserved Character\n function valToString(val) { return val != null ? val.toString().replace(/(~|\\/)/g, function (m) { return {'~':'~~', '/':'~2F'}[m]; }) : val; }\n function valFromString(val) { return val != null ? val.toString().replace(/(~~|~2F)/g, function (m) { return {'~~':'~', '~2F':'/'}[m]; }) : val; }\n\n var $types = {}, enqueue = true, typeQueue = [], injector, defaultTypes = {\n \"string\": {\n encode: valToString,\n decode: valFromString,\n // TODO: in 1.0, make string .is() return false if value is undefined/null by default.\n // In 0.2.x, string params are optional by default for backwards compat\n is: function(val) { return val == null || !isDefined(val) || typeof val === \"string\"; },\n pattern: /[^/]*/\n },\n \"int\": {\n encode: valToString,\n decode: function(val) { return parseInt(val, 10); },\n is: function(val) { return val !== undefined && val !== null && this.decode(val.toString()) === val; },\n pattern: /-?\\d+/\n },\n \"bool\": {\n encode: function(val) { return val ? 1 : 0; },\n decode: function(val) { return parseInt(val, 10) !== 0; },\n is: function(val) { return val === true || val === false; },\n pattern: /0|1/\n },\n \"date\": {\n encode: function (val) {\n if (!this.is(val))\n return undefined;\n return [ val.getFullYear(),\n ('0' + (val.getMonth() + 1)).slice(-2),\n ('0' + val.getDate()).slice(-2)\n ].join(\"-\");\n },\n decode: function (val) {\n if (this.is(val)) return val;\n var match = this.capture.exec(val);\n return match ? new Date(match[1], match[2] - 1, match[3]) : undefined;\n },\n is: function(val) { return val instanceof Date && !isNaN(val.valueOf()); },\n equals: function (a, b) { return this.is(a) && this.is(b) && a.toISOString() === b.toISOString(); },\n pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,\n capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/\n },\n \"json\": {\n encode: angular.toJson,\n decode: angular.fromJson,\n is: angular.isObject,\n equals: angular.equals,\n pattern: /[^/]*/\n },\n \"any\": { // does not encode/decode\n encode: angular.identity,\n decode: angular.identity,\n equals: angular.equals,\n pattern: /.*/\n }\n };\n\n function getDefaultConfig() {\n return {\n strict: isStrictMode,\n caseInsensitive: isCaseInsensitive\n };\n }\n\n function isInjectable(value) {\n return (isFunction(value) || (isArray(value) && isFunction(value[value.length - 1])));\n }\n\n /**\n * [Internal] Get the default value of a parameter, which may be an injectable function.\n */\n $UrlMatcherFactory.$$getDefaultValue = function(config) {\n if (!isInjectable(config.value)) return config.value;\n if (!injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n return injector.invoke(config.value);\n };\n\n /**\n * @ngdoc function\n * @name ui.router.util.$urlMatcherFactory#caseInsensitive\n * @methodOf ui.router.util.$urlMatcherFactory\n *\n * @description\n * Defines whether URL matching should be case sensitive (the default behavior), or not.\n *\n * @param {boolean} value `false` to match URL in a case sensitive manner; otherwise `true`;\n * @returns {boolean} the current value of caseInsensitive\n */\n this.caseInsensitive = function(value) {\n if (isDefined(value))\n isCaseInsensitive = value;\n return isCaseInsensitive;\n };\n\n /**\n * @ngdoc function\n * @name ui.router.util.$urlMatcherFactory#strictMode\n * @methodOf ui.router.util.$urlMatcherFactory\n *\n * @description\n * Defines whether URLs should match trailing slashes, or not (the default behavior).\n *\n * @param {boolean=} value `false` to match trailing slashes in URLs, otherwise `true`.\n * @returns {boolean} the current value of strictMode\n */\n this.strictMode = function(value) {\n if (isDefined(value))\n isStrictMode = value;\n return isStrictMode;\n };\n\n /**\n * @ngdoc function\n * @name ui.router.util.$urlMatcherFactory#defaultSquashPolicy\n * @methodOf ui.router.util.$urlMatcherFactory\n *\n * @description\n * Sets the default behavior when generating or matching URLs with default parameter values.\n *\n * @param {string} value A string that defines the default parameter URL squashing behavior.\n * `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL\n * `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the\n * parameter is surrounded by slashes, squash (remove) one slash from the URL\n * any other string, e.g. \"~\": When generating an href with a default parameter value, squash (remove)\n * the parameter value from the URL and replace it with this string.\n */\n this.defaultSquashPolicy = function(value) {\n if (!isDefined(value)) return defaultSquashPolicy;\n if (value !== true && value !== false && !isString(value))\n throw new Error(\"Invalid squash policy: \" + value + \". Valid policies: false, true, arbitrary-string\");\n defaultSquashPolicy = value;\n return value;\n };\n\n /**\n * @ngdoc function\n * @name ui.router.util.$urlMatcherFactory#compile\n * @methodOf ui.router.util.$urlMatcherFactory\n *\n * @description\n * Creates a {@link ui.router.util.type:UrlMatcher `UrlMatcher`} for the specified pattern.\n *\n * @param {string} pattern The URL pattern.\n * @param {Object} config The config object hash.\n * @returns {UrlMatcher} The UrlMatcher.\n */\n this.compile = function (pattern, config) {\n return new UrlMatcher(pattern, extend(getDefaultConfig(), config));\n };\n\n /**\n * @ngdoc function\n * @name ui.router.util.$urlMatcherFactory#isMatcher\n * @methodOf ui.router.util.$urlMatcherFactory\n *\n * @description\n * Returns true if the specified object is a `UrlMatcher`, or false otherwise.\n *\n * @param {Object} object The object to perform the type check against.\n * @returns {Boolean} Returns `true` if the object matches the `UrlMatcher` interface, by\n * implementing all the same methods.\n */\n this.isMatcher = function (o) {\n if (!isObject(o)) return false;\n var result = true;\n\n forEach(UrlMatcher.prototype, function(val, name) {\n if (isFunction(val)) {\n result = result && (isDefined(o[name]) && isFunction(o[name]));\n }\n });\n return result;\n };\n\n /**\n * @ngdoc function\n * @name ui.router.util.$urlMatcherFactory#type\n * @methodOf ui.router.util.$urlMatcherFactory\n *\n * @description\n * Registers a custom {@link ui.router.util.type:Type `Type`} object that can be used to\n * generate URLs with typed parameters.\n *\n * @param {string} name The type name.\n * @param {Object|Function} definition The type definition. See\n * {@link ui.router.util.type:Type `Type`} for information on the values accepted.\n * @param {Object|Function} definitionFn (optional) A function that is injected before the app\n * runtime starts. The result of this function is merged into the existing `definition`.\n * See {@link ui.router.util.type:Type `Type`} for information on the values accepted.\n *\n * @returns {Object} Returns `$urlMatcherFactoryProvider`.\n *\n * @example\n * This is a simple example of a custom type that encodes and decodes items from an\n * array, using the array index as the URL-encoded value:\n *\n *
\n   * var list = ['John', 'Paul', 'George', 'Ringo'];\n   *\n   * $urlMatcherFactoryProvider.type('listItem', {\n   *   encode: function(item) {\n   *     // Represent the list item in the URL using its corresponding index\n   *     return list.indexOf(item);\n   *   },\n   *   decode: function(item) {\n   *     // Look up the list item by index\n   *     return list[parseInt(item, 10)];\n   *   },\n   *   is: function(item) {\n   *     // Ensure the item is valid by checking to see that it appears\n   *     // in the list\n   *     return list.indexOf(item) > -1;\n   *   }\n   * });\n   *\n   * $stateProvider.state('list', {\n   *   url: \"/list/{item:listItem}\",\n   *   controller: function($scope, $stateParams) {\n   *     console.log($stateParams.item);\n   *   }\n   * });\n   *\n   * // ...\n   *\n   * // Changes URL to '/list/3', logs \"Ringo\" to the console\n   * $state.go('list', { item: \"Ringo\" });\n   * 
\n *\n * This is a more complex example of a type that relies on dependency injection to\n * interact with services, and uses the parameter name from the URL to infer how to\n * handle encoding and decoding parameter values:\n *\n *
\n   * // Defines a custom type that gets a value from a service,\n   * // where each service gets different types of values from\n   * // a backend API:\n   * $urlMatcherFactoryProvider.type('dbObject', {}, function(Users, Posts) {\n   *\n   *   // Matches up services to URL parameter names\n   *   var services = {\n   *     user: Users,\n   *     post: Posts\n   *   };\n   *\n   *   return {\n   *     encode: function(object) {\n   *       // Represent the object in the URL using its unique ID\n   *       return object.id;\n   *     },\n   *     decode: function(value, key) {\n   *       // Look up the object by ID, using the parameter\n   *       // name (key) to call the correct service\n   *       return services[key].findById(value);\n   *     },\n   *     is: function(object, key) {\n   *       // Check that object is a valid dbObject\n   *       return angular.isObject(object) && object.id && services[key];\n   *     }\n   *     equals: function(a, b) {\n   *       // Check the equality of decoded objects by comparing\n   *       // their unique IDs\n   *       return a.id === b.id;\n   *     }\n   *   };\n   * });\n   *\n   * // In a config() block, you can then attach URLs with\n   * // type-annotated parameters:\n   * $stateProvider.state('users', {\n   *   url: \"/users\",\n   *   // ...\n   * }).state('users.item', {\n   *   url: \"/{user:dbObject}\",\n   *   controller: function($scope, $stateParams) {\n   *     // $stateParams.user will now be an object returned from\n   *     // the Users service\n   *   },\n   *   // ...\n   * });\n   * 
\n */\n this.type = function (name, definition, definitionFn) {\n if (!isDefined(definition)) return $types[name];\n if ($types.hasOwnProperty(name)) throw new Error(\"A type named '\" + name + \"' has already been defined.\");\n\n $types[name] = new Type(extend({ name: name }, definition));\n if (definitionFn) {\n typeQueue.push({ name: name, def: definitionFn });\n if (!enqueue) flushTypeQueue();\n }\n return this;\n };\n\n // `flushTypeQueue()` waits until `$urlMatcherFactory` is injected before invoking the queued `definitionFn`s\n function flushTypeQueue() {\n while(typeQueue.length) {\n var type = typeQueue.shift();\n if (type.pattern) throw new Error(\"You cannot override a type's .pattern at runtime.\");\n angular.extend($types[type.name], injector.invoke(type.def));\n }\n }\n\n // Register default types. Store them in the prototype of $types.\n forEach(defaultTypes, function(type, name) { $types[name] = new Type(extend({name: name}, type)); });\n $types = inherit($types, {});\n\n /* No need to document $get, since it returns this */\n this.$get = ['$injector', function ($injector) {\n injector = $injector;\n enqueue = false;\n flushTypeQueue();\n\n forEach(defaultTypes, function(type, name) {\n if (!$types[name]) $types[name] = new Type(type);\n });\n return this;\n }];\n\n this.Param = function Param(id, type, config, location) {\n var self = this;\n config = unwrapShorthand(config);\n type = getType(config, type, location);\n var arrayMode = getArrayMode();\n type = arrayMode ? type.$asArray(arrayMode, location === \"search\") : type;\n if (type.name === \"string\" && !arrayMode && location === \"path\" && config.value === undefined)\n config.value = \"\"; // for 0.2.x; in 0.3.0+ do not automatically default to \"\"\n var isOptional = config.value !== undefined;\n var squash = getSquashPolicy(config, isOptional);\n var replace = getReplace(config, arrayMode, isOptional, squash);\n\n function unwrapShorthand(config) {\n var keys = isObject(config) ? objectKeys(config) : [];\n var isShorthand = indexOf(keys, \"value\") === -1 && indexOf(keys, \"type\") === -1 &&\n indexOf(keys, \"squash\") === -1 && indexOf(keys, \"array\") === -1;\n if (isShorthand) config = { value: config };\n config.$$fn = isInjectable(config.value) ? config.value : function () { return config.value; };\n return config;\n }\n\n function getType(config, urlType, location) {\n if (config.type && urlType) throw new Error(\"Param '\"+id+\"' has two type configurations.\");\n if (urlType) return urlType;\n if (!config.type) return (location === \"config\" ? $types.any : $types.string);\n\n if (angular.isString(config.type))\n return $types[config.type];\n if (config.type instanceof Type)\n return config.type;\n return new Type(config.type);\n }\n\n // array config: param name (param[]) overrides default settings. explicit config overrides param name.\n function getArrayMode() {\n var arrayDefaults = { array: (location === \"search\" ? \"auto\" : false) };\n var arrayParamNomenclature = id.match(/\\[\\]$/) ? { array: true } : {};\n return extend(arrayDefaults, arrayParamNomenclature, config).array;\n }\n\n /**\n * returns false, true, or the squash value to indicate the \"default parameter url squash policy\".\n */\n function getSquashPolicy(config, isOptional) {\n var squash = config.squash;\n if (!isOptional || squash === false) return false;\n if (!isDefined(squash) || squash == null) return defaultSquashPolicy;\n if (squash === true || isString(squash)) return squash;\n throw new Error(\"Invalid squash policy: '\" + squash + \"'. Valid policies: false, true, or arbitrary string\");\n }\n\n function getReplace(config, arrayMode, isOptional, squash) {\n var replace, configuredKeys, defaultPolicy = [\n { from: \"\", to: (isOptional || arrayMode ? undefined : \"\") },\n { from: null, to: (isOptional || arrayMode ? undefined : \"\") }\n ];\n replace = isArray(config.replace) ? config.replace : [];\n if (isString(squash))\n replace.push({ from: squash, to: undefined });\n configuredKeys = map(replace, function(item) { return item.from; } );\n return filter(defaultPolicy, function(item) { return indexOf(configuredKeys, item.from) === -1; }).concat(replace);\n }\n\n /**\n * [Internal] Get the default value of a parameter, which may be an injectable function.\n */\n function $$getDefaultValue() {\n if (!injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n var defaultValue = injector.invoke(config.$$fn);\n if (defaultValue !== null && defaultValue !== undefined && !self.type.is(defaultValue))\n throw new Error(\"Default value (\" + defaultValue + \") for parameter '\" + self.id + \"' is not an instance of Type (\" + self.type.name + \")\");\n return defaultValue;\n }\n\n /**\n * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the\n * default value, which may be the result of an injectable function.\n */\n function $value(value) {\n function hasReplaceVal(val) { return function(obj) { return obj.from === val; }; }\n function $replace(value) {\n var replacement = map(filter(self.replace, hasReplaceVal(value)), function(obj) { return obj.to; });\n return replacement.length ? replacement[0] : value;\n }\n value = $replace(value);\n return !isDefined(value) ? $$getDefaultValue() : self.type.$normalize(value);\n }\n\n function toString() { return \"{Param:\" + id + \" \" + type + \" squash: '\" + squash + \"' optional: \" + isOptional + \"}\"; }\n\n extend(this, {\n id: id,\n type: type,\n location: location,\n array: arrayMode,\n squash: squash,\n replace: replace,\n isOptional: isOptional,\n value: $value,\n dynamic: undefined,\n config: config,\n toString: toString\n });\n };\n\n function ParamSet(params) {\n extend(this, params || {});\n }\n\n ParamSet.prototype = {\n $$new: function() {\n return inherit(this, extend(new ParamSet(), { $$parent: this}));\n },\n $$keys: function () {\n var keys = [], chain = [], parent = this,\n ignore = objectKeys(ParamSet.prototype);\n while (parent) { chain.push(parent); parent = parent.$$parent; }\n chain.reverse();\n forEach(chain, function(paramset) {\n forEach(objectKeys(paramset), function(key) {\n if (indexOf(keys, key) === -1 && indexOf(ignore, key) === -1) keys.push(key);\n });\n });\n return keys;\n },\n $$values: function(paramValues) {\n var values = {}, self = this;\n forEach(self.$$keys(), function(key) {\n values[key] = self[key].value(paramValues && paramValues[key]);\n });\n return values;\n },\n $$equals: function(paramValues1, paramValues2) {\n var equal = true, self = this;\n forEach(self.$$keys(), function(key) {\n var left = paramValues1 && paramValues1[key], right = paramValues2 && paramValues2[key];\n if (!self[key].type.equals(left, right)) equal = false;\n });\n return equal;\n },\n $$validates: function $$validate(paramValues) {\n var keys = this.$$keys(), i, param, rawVal, normalized, encoded;\n for (i = 0; i < keys.length; i++) {\n param = this[keys[i]];\n rawVal = paramValues[keys[i]];\n if ((rawVal === undefined || rawVal === null) && param.isOptional)\n break; // There was no parameter value, but the param is optional\n normalized = param.type.$normalize(rawVal);\n if (!param.type.is(normalized))\n return false; // The value was not of the correct Type, and could not be decoded to the correct Type\n encoded = param.type.encode(normalized);\n if (angular.isString(encoded) && !param.type.pattern.exec(encoded))\n return false; // The value was of the correct type, but when encoded, did not match the Type's regexp\n }\n return true;\n },\n $$parent: undefined\n };\n\n this.ParamSet = ParamSet;\n}\n\n// Register as a provider so it's available to other providers\nangular.module('ui.router.util').provider('$urlMatcherFactory', $UrlMatcherFactory);\nangular.module('ui.router.util').run(['$urlMatcherFactory', function($urlMatcherFactory) { }]);\n\n/**\n * @ngdoc object\n * @name ui.router.router.$urlRouterProvider\n *\n * @requires ui.router.util.$urlMatcherFactoryProvider\n * @requires $locationProvider\n *\n * @description\n * `$urlRouterProvider` has the responsibility of watching `$location`. \n * When `$location` changes it runs through a list of rules one by one until a \n * match is found. `$urlRouterProvider` is used behind the scenes anytime you specify \n * a url in a state configuration. All urls are compiled into a UrlMatcher object.\n *\n * There are several methods on `$urlRouterProvider` that make it useful to use directly\n * in your module config.\n */\n$UrlRouterProvider.$inject = ['$locationProvider', '$urlMatcherFactoryProvider'];\nfunction $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {\n var rules = [], otherwise = null, interceptDeferred = false, listener;\n\n // Returns a string that is a prefix of all strings matching the RegExp\n function regExpPrefix(re) {\n var prefix = /^\\^((?:\\\\[^a-zA-Z0-9]|[^\\\\\\[\\]\\^$*+?.()|{}]+)*)/.exec(re.source);\n return (prefix != null) ? prefix[1].replace(/\\\\(.)/g, \"$1\") : '';\n }\n\n // Interpolates matched values into a String.replace()-style pattern\n function interpolate(pattern, match) {\n return pattern.replace(/\\$(\\$|\\d{1,2})/, function (m, what) {\n return match[what === '$' ? 0 : Number(what)];\n });\n }\n\n /**\n * @ngdoc function\n * @name ui.router.router.$urlRouterProvider#rule\n * @methodOf ui.router.router.$urlRouterProvider\n *\n * @description\n * Defines rules that are used by `$urlRouterProvider` to find matches for\n * specific URLs.\n *\n * @example\n *
\n   * var app = angular.module('app', ['ui.router.router']);\n   *\n   * app.config(function ($urlRouterProvider) {\n   *   // Here's an example of how you might allow case insensitive urls\n   *   $urlRouterProvider.rule(function ($injector, $location) {\n   *     var path = $location.path(),\n   *         normalized = path.toLowerCase();\n   *\n   *     if (path !== normalized) {\n   *       return normalized;\n   *     }\n   *   });\n   * });\n   * 
\n *\n * @param {function} rule Handler function that takes `$injector` and `$location`\n * services as arguments. You can use them to return a valid path as a string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n this.rule = function (rule) {\n if (!isFunction(rule)) throw new Error(\"'rule' must be a function\");\n rules.push(rule);\n return this;\n };\n\n /**\n * @ngdoc object\n * @name ui.router.router.$urlRouterProvider#otherwise\n * @methodOf ui.router.router.$urlRouterProvider\n *\n * @description\n * Defines a path that is used when an invalid route is requested.\n *\n * @example\n *
\n   * var app = angular.module('app', ['ui.router.router']);\n   *\n   * app.config(function ($urlRouterProvider) {\n   *   // if the path doesn't match any of the urls you configured\n   *   // otherwise will take care of routing the user to the\n   *   // specified url\n   *   $urlRouterProvider.otherwise('/index');\n   *\n   *   // Example of using function rule as param\n   *   $urlRouterProvider.otherwise(function ($injector, $location) {\n   *     return '/a/valid/url';\n   *   });\n   * });\n   * 
\n *\n * @param {string|function} rule The url path you want to redirect to or a function \n * rule that returns the url path. The function version is passed two params: \n * `$injector` and `$location` services, and must return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n this.otherwise = function (rule) {\n if (isString(rule)) {\n var redirect = rule;\n rule = function () { return redirect; };\n }\n else if (!isFunction(rule)) throw new Error(\"'rule' must be a function\");\n otherwise = rule;\n return this;\n };\n\n\n function handleIfMatch($injector, handler, match) {\n if (!match) return false;\n var result = $injector.invoke(handler, handler, { $match: match });\n return isDefined(result) ? result : true;\n }\n\n /**\n * @ngdoc function\n * @name ui.router.router.$urlRouterProvider#when\n * @methodOf ui.router.router.$urlRouterProvider\n *\n * @description\n * Registers a handler for a given url matching. \n * \n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable. It gets invoked if `$location`\n * matches. You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * @example\n *
\n   * var app = angular.module('app', ['ui.router.router']);\n   *\n   * app.config(function ($urlRouterProvider) {\n   *   $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n   *     if ($state.$current.navigable !== state ||\n   *         !equalForKeys($match, $stateParams) {\n   *      $state.transitionTo(state, $match, false);\n   *     }\n   *   });\n   * });\n   * 
\n *\n * @param {string|object} what The incoming path that you want to redirect.\n * @param {string|function} handler The path you want to redirect your user to.\n */\n this.when = function (what, handler) {\n var redirect, handlerIsString = isString(handler);\n if (isString(what)) what = $urlMatcherFactory.compile(what);\n\n if (!handlerIsString && !isFunction(handler) && !isArray(handler))\n throw new Error(\"invalid 'handler' in when()\");\n\n var strategies = {\n matcher: function (what, handler) {\n if (handlerIsString) {\n redirect = $urlMatcherFactory.compile(handler);\n handler = ['$match', function ($match) { return redirect.format($match); }];\n }\n return extend(function ($injector, $location) {\n return handleIfMatch($injector, handler, what.exec($location.path(), $location.search()));\n }, {\n prefix: isString(what.prefix) ? what.prefix : ''\n });\n },\n regex: function (what, handler) {\n if (what.global || what.sticky) throw new Error(\"when() RegExp must not be global or sticky\");\n\n if (handlerIsString) {\n redirect = handler;\n handler = ['$match', function ($match) { return interpolate(redirect, $match); }];\n }\n return extend(function ($injector, $location) {\n return handleIfMatch($injector, handler, what.exec($location.path()));\n }, {\n prefix: regExpPrefix(what)\n });\n }\n };\n\n var check = { matcher: $urlMatcherFactory.isMatcher(what), regex: what instanceof RegExp };\n\n for (var n in check) {\n if (check[n]) return this.rule(strategies[n](what, handler));\n }\n\n throw new Error(\"invalid 'what' in when()\");\n };\n\n /**\n * @ngdoc function\n * @name ui.router.router.$urlRouterProvider#deferIntercept\n * @methodOf ui.router.router.$urlRouterProvider\n *\n * @description\n * Disables (or enables) deferring location change interception.\n *\n * If you wish to customize the behavior of syncing the URL (for example, if you wish to\n * defer a transition but maintain the current URL), call this method at configuration time.\n * Then, at run time, call `$urlRouter.listen()` after you have configured your own\n * `$locationChangeSuccess` event handler.\n *\n * @example\n *
\n   * var app = angular.module('app', ['ui.router.router']);\n   *\n   * app.config(function ($urlRouterProvider) {\n   *\n   *   // Prevent $urlRouter from automatically intercepting URL changes;\n   *   // this allows you to configure custom behavior in between\n   *   // location changes and route synchronization:\n   *   $urlRouterProvider.deferIntercept();\n   *\n   * }).run(function ($rootScope, $urlRouter, UserService) {\n   *\n   *   $rootScope.$on('$locationChangeSuccess', function(e) {\n   *     // UserService is an example service for managing user state\n   *     if (UserService.isLoggedIn()) return;\n   *\n   *     // Prevent $urlRouter's default handler from firing\n   *     e.preventDefault();\n   *\n   *     UserService.handleLogin().then(function() {\n   *       // Once the user has logged in, sync the current URL\n   *       // to the router:\n   *       $urlRouter.sync();\n   *     });\n   *   });\n   *\n   *   // Configures $urlRouter's listener *after* your custom listener\n   *   $urlRouter.listen();\n   * });\n   * 
\n *\n * @param {boolean} defer Indicates whether to defer location change interception. Passing\n no parameter is equivalent to `true`.\n */\n this.deferIntercept = function (defer) {\n if (defer === undefined) defer = true;\n interceptDeferred = defer;\n };\n\n /**\n * @ngdoc object\n * @name ui.router.router.$urlRouter\n *\n * @requires $location\n * @requires $rootScope\n * @requires $injector\n * @requires $browser\n *\n * @description\n *\n */\n this.$get = $get;\n $get.$inject = ['$location', '$rootScope', '$injector', '$browser', '$sniffer'];\n function $get( $location, $rootScope, $injector, $browser, $sniffer) {\n\n var baseHref = $browser.baseHref(), location = $location.url(), lastPushedUrl;\n\n function appendBasePath(url, isHtml5, absolute) {\n if (baseHref === '/') return url;\n if (isHtml5) return baseHref.slice(0, -1) + url;\n if (absolute) return baseHref.slice(1) + url;\n return url;\n }\n\n // TODO: Optimize groups of rules with non-empty prefix into some sort of decision tree\n function update(evt) {\n if (evt && evt.defaultPrevented) return;\n var ignoreUpdate = lastPushedUrl && $location.url() === lastPushedUrl;\n lastPushedUrl = undefined;\n // TODO: Re-implement this in 1.0 for https://github.com/angular-ui/ui-router/issues/1573\n //if (ignoreUpdate) return true;\n\n function check(rule) {\n var handled = rule($injector, $location);\n\n if (!handled) return false;\n if (isString(handled)) $location.replace().url(handled);\n return true;\n }\n var n = rules.length, i;\n\n for (i = 0; i < n; i++) {\n if (check(rules[i])) return;\n }\n // always check otherwise last to allow dynamic updates to the set of rules\n if (otherwise) check(otherwise);\n }\n\n function listen() {\n listener = listener || $rootScope.$on('$locationChangeSuccess', update);\n return listener;\n }\n\n if (!interceptDeferred) listen();\n\n return {\n /**\n * @ngdoc function\n * @name ui.router.router.$urlRouter#sync\n * @methodOf ui.router.router.$urlRouter\n *\n * @description\n * Triggers an update; the same update that happens when the address bar url changes, aka `$locationChangeSuccess`.\n * This method is useful when you need to use `preventDefault()` on the `$locationChangeSuccess` event,\n * perform some custom logic (route protection, auth, config, redirection, etc) and then finally proceed\n * with the transition by calling `$urlRouter.sync()`.\n *\n * @example\n *
\n       * angular.module('app', ['ui.router'])\n       *   .run(function($rootScope, $urlRouter) {\n       *     $rootScope.$on('$locationChangeSuccess', function(evt) {\n       *       // Halt state change from even starting\n       *       evt.preventDefault();\n       *       // Perform custom logic\n       *       var meetsRequirement = ...\n       *       // Continue with the update and state transition if logic allows\n       *       if (meetsRequirement) $urlRouter.sync();\n       *     });\n       * });\n       * 
\n */\n sync: function() {\n update();\n },\n\n listen: function() {\n return listen();\n },\n\n update: function(read) {\n if (read) {\n location = $location.url();\n return;\n }\n if ($location.url() === location) return;\n\n $location.url(location);\n $location.replace();\n },\n\n push: function(urlMatcher, params, options) {\n var url = urlMatcher.format(params || {});\n\n // Handle the special hash param, if needed\n if (url !== null && params && params['#']) {\n url += '#' + params['#'];\n }\n\n $location.url(url);\n lastPushedUrl = options && options.$$avoidResync ? $location.url() : undefined;\n if (options && options.replace) $location.replace();\n },\n\n /**\n * @ngdoc function\n * @name ui.router.router.$urlRouter#href\n * @methodOf ui.router.router.$urlRouter\n *\n * @description\n * A URL generation method that returns the compiled URL for a given\n * {@link ui.router.util.type:UrlMatcher `UrlMatcher`}, populated with the provided parameters.\n *\n * @example\n *
\n       * $bob = $urlRouter.href(new UrlMatcher(\"/about/:person\"), {\n       *   person: \"bob\"\n       * });\n       * // $bob == \"/about/bob\";\n       * 
\n *\n * @param {UrlMatcher} urlMatcher The `UrlMatcher` object which is used as the template of the URL to generate.\n * @param {object=} params An object of parameter values to fill the matcher's required parameters.\n * @param {object=} options Options object. The options are:\n *\n * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n *\n * @returns {string} Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher`\n */\n href: function(urlMatcher, params, options) {\n if (!urlMatcher.validates(params)) return null;\n\n var isHtml5 = $locationProvider.html5Mode();\n if (angular.isObject(isHtml5)) {\n isHtml5 = isHtml5.enabled;\n }\n\n isHtml5 = isHtml5 && $sniffer.history;\n \n var url = urlMatcher.format(params);\n options = options || {};\n\n if (!isHtml5 && url !== null) {\n url = \"#\" + $locationProvider.hashPrefix() + url;\n }\n\n // Handle special hash param, if needed\n if (url !== null && params && params['#']) {\n url += '#' + params['#'];\n }\n\n url = appendBasePath(url, isHtml5, options.absolute);\n\n if (!options.absolute || !url) {\n return url;\n }\n\n var slash = (!isHtml5 && url ? '/' : ''), port = $location.port();\n port = (port === 80 || port === 443 ? '' : ':' + port);\n\n return [$location.protocol(), '://', $location.host(), port, slash, url].join('');\n }\n };\n }\n}\n\nangular.module('ui.router.router').provider('$urlRouter', $UrlRouterProvider);\n\n/**\n * @ngdoc object\n * @name ui.router.state.$stateProvider\n *\n * @requires ui.router.router.$urlRouterProvider\n * @requires ui.router.util.$urlMatcherFactoryProvider\n *\n * @description\n * The new `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\n$StateProvider.$inject = ['$urlRouterProvider', '$urlMatcherFactoryProvider'];\nfunction $StateProvider( $urlRouterProvider, $urlMatcherFactory) {\n\n var root, states = {}, $state, queue = {}, abstractKey = 'abstract';\n\n // Builds state properties from definition passed to registerState()\n var stateBuilder = {\n\n // Derive parent state from a hierarchical name only if 'parent' is not explicitly defined.\n // state.children = [];\n // if (parent) parent.children.push(state);\n parent: function(state) {\n if (isDefined(state.parent) && state.parent) return findState(state.parent);\n // regex matches any valid composite state name\n // would match \"contact.list\" but not \"contacts\"\n var compositeName = /^(.+)\\.[^.]+$/.exec(state.name);\n return compositeName ? findState(compositeName[1]) : root;\n },\n\n // inherit 'data' from parent and override by own values (if any)\n data: function(state) {\n if (state.parent && state.parent.data) {\n state.data = state.self.data = inherit(state.parent.data, state.data);\n }\n return state.data;\n },\n\n // Build a URLMatcher if necessary, either via a relative or absolute URL\n url: function(state) {\n var url = state.url, config = { params: state.params || {} };\n\n if (isString(url)) {\n if (url.charAt(0) == '^') return $urlMatcherFactory.compile(url.substring(1), config);\n return (state.parent.navigable || root).url.concat(url, config);\n }\n\n if (!url || $urlMatcherFactory.isMatcher(url)) return url;\n throw new Error(\"Invalid url '\" + url + \"' in state '\" + state + \"'\");\n },\n\n // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n navigable: function(state) {\n return state.url ? state : (state.parent ? state.parent.navigable : null);\n },\n\n // Own parameters for this state. state.url.params is already built at this point. Create and add non-url params\n ownParams: function(state) {\n var params = state.url && state.url.params || new $$UMFP.ParamSet();\n forEach(state.params || {}, function(config, id) {\n if (!params[id]) params[id] = new $$UMFP.Param(id, null, config, \"config\");\n });\n return params;\n },\n\n // Derive parameters for this state and ensure they're a super-set of parent's parameters\n params: function(state) {\n var ownParams = pick(state.ownParams, state.ownParams.$$keys());\n return state.parent && state.parent.params ? extend(state.parent.params.$$new(), ownParams) : new $$UMFP.ParamSet();\n },\n\n // If there is no explicit multi-view configuration, make one up so we don't have\n // to handle both cases in the view directive later. Note that having an explicit\n // 'views' property will mean the default unnamed view properties are ignored. This\n // is also a good time to resolve view names to absolute names, so everything is a\n // straight lookup at link time.\n views: function(state) {\n var views = {};\n\n forEach(isDefined(state.views) ? state.views : { '': state }, function (view, name) {\n if (name.indexOf('@') < 0) name += '@' + state.parent.name;\n view.resolveAs = view.resolveAs || state.resolveAs || '$resolve';\n views[name] = view;\n });\n return views;\n },\n\n // Keep a full path from the root down to this state as this is needed for state activation.\n path: function(state) {\n return state.parent ? state.parent.path.concat(state) : []; // exclude root from path\n },\n\n // Speed up $state.contains() as it's used a lot\n includes: function(state) {\n var includes = state.parent ? extend({}, state.parent.includes) : {};\n includes[state.name] = true;\n return includes;\n },\n\n $delegates: {}\n };\n\n function isRelative(stateName) {\n return stateName.indexOf(\".\") === 0 || stateName.indexOf(\"^\") === 0;\n }\n\n function findState(stateOrName, base) {\n if (!stateOrName) return undefined;\n\n var isStr = isString(stateOrName),\n name = isStr ? stateOrName : stateOrName.name,\n path = isRelative(name);\n\n if (path) {\n if (!base) throw new Error(\"No reference point given for path '\" + name + \"'\");\n base = findState(base);\n \n var rel = name.split(\".\"), i = 0, pathLength = rel.length, current = base;\n\n for (; i < pathLength; i++) {\n if (rel[i] === \"\" && i === 0) {\n current = base;\n continue;\n }\n if (rel[i] === \"^\") {\n if (!current.parent) throw new Error(\"Path '\" + name + \"' not valid for state '\" + base.name + \"'\");\n current = current.parent;\n continue;\n }\n break;\n }\n rel = rel.slice(i).join(\".\");\n name = current.name + (current.name && rel ? \".\" : \"\") + rel;\n }\n var state = states[name];\n\n if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n return state;\n }\n return undefined;\n }\n\n function queueState(parentName, state) {\n if (!queue[parentName]) {\n queue[parentName] = [];\n }\n queue[parentName].push(state);\n }\n\n function flushQueuedChildren(parentName) {\n var queued = queue[parentName] || [];\n while(queued.length) {\n registerState(queued.shift());\n }\n }\n\n function registerState(state) {\n // Wrap a new object around the state so we can store our private details easily.\n state = inherit(state, {\n self: state,\n resolve: state.resolve || {},\n toString: function() { return this.name; }\n });\n\n var name = state.name;\n if (!isString(name) || name.indexOf('@') >= 0) throw new Error(\"State must have a valid name\");\n if (states.hasOwnProperty(name)) throw new Error(\"State '\" + name + \"' is already defined\");\n\n // Get parent name\n var parentName = (name.indexOf('.') !== -1) ? name.substring(0, name.lastIndexOf('.'))\n : (isString(state.parent)) ? state.parent\n : (isObject(state.parent) && isString(state.parent.name)) ? state.parent.name\n : '';\n\n // If parent is not registered yet, add state to queue and register later\n if (parentName && !states[parentName]) {\n return queueState(parentName, state.self);\n }\n\n for (var key in stateBuilder) {\n if (isFunction(stateBuilder[key])) state[key] = stateBuilder[key](state, stateBuilder.$delegates[key]);\n }\n states[name] = state;\n\n // Register the state in the global state list and with $urlRouter if necessary.\n if (!state[abstractKey] && state.url) {\n $urlRouterProvider.when(state.url, ['$match', '$stateParams', function ($match, $stateParams) {\n if ($state.$current.navigable != state || !equalForKeys($match, $stateParams)) {\n $state.transitionTo(state, $match, { inherit: true, location: false });\n }\n }]);\n }\n\n // Register any queued children\n flushQueuedChildren(name);\n\n return state;\n }\n\n // Checks text to see if it looks like a glob.\n function isGlob (text) {\n return text.indexOf('*') > -1;\n }\n\n // Returns true if glob matches current $state name.\n function doesStateMatchGlob (glob) {\n var globSegments = glob.split('.'),\n segments = $state.$current.name.split('.');\n\n //match single stars\n for (var i = 0, l = globSegments.length; i < l; i++) {\n if (globSegments[i] === '*') {\n segments[i] = '*';\n }\n }\n\n //match greedy starts\n if (globSegments[0] === '**') {\n segments = segments.slice(indexOf(segments, globSegments[1]));\n segments.unshift('**');\n }\n //match greedy ends\n if (globSegments[globSegments.length - 1] === '**') {\n segments.splice(indexOf(segments, globSegments[globSegments.length - 2]) + 1, Number.MAX_VALUE);\n segments.push('**');\n }\n\n if (globSegments.length != segments.length) {\n return false;\n }\n\n return segments.join('') === globSegments.join('');\n }\n\n\n // Implicit root state that is always active\n root = registerState({\n name: '',\n url: '^',\n views: null,\n 'abstract': true\n });\n root.navigable = null;\n\n\n /**\n * @ngdoc function\n * @name ui.router.state.$stateProvider#decorator\n * @methodOf ui.router.state.$stateProvider\n *\n * @description\n * Allows you to extend (carefully) or override (at your own peril) the \n * `stateBuilder` object used internally by `$stateProvider`. This can be used \n * to add custom functionality to ui-router, for example inferring templateUrl \n * based on the state name.\n *\n * When passing only a name, it returns the current (original or decorated) builder\n * function that matches `name`.\n *\n * The builder functions that can be decorated are listed below. Though not all\n * necessarily have a good use case for decoration, that is up to you to decide.\n *\n * In addition, users can attach custom decorators, which will generate new \n * properties within the state's internal definition. There is currently no clear \n * use-case for this beyond accessing internal states (i.e. $state.$current), \n * however, expect this to become increasingly relevant as we introduce additional \n * meta-programming features.\n *\n * **Warning**: Decorators should not be interdependent because the order of \n * execution of the builder functions in non-deterministic. Builder functions \n * should only be dependent on the state definition object and super function.\n *\n *\n * Existing builder functions and current return values:\n *\n * - **parent** `{object}` - returns the parent state object.\n * - **data** `{object}` - returns state data, including any inherited data that is not\n * overridden by own values (if any).\n * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n * or `null`.\n * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is \n * navigable).\n * - **params** `{object}` - returns an array of state params that are ensured to \n * be a super-set of parent's params.\n * - **views** `{object}` - returns a views object where each key is an absolute view \n * name (i.e. \"viewName@stateName\") and each value is the config object \n * (template, controller) for the view. Even when you don't use the views object \n * explicitly on a state config, one is still created for you internally.\n * So by decorating this builder function you have access to decorating template \n * and controller properties.\n * - **ownParams** `{object}` - returns an array of params that belong to the state, \n * not including any params defined by ancestor states.\n * - **path** `{string}` - returns the full path from the root down to this state. \n * Needed for state activation.\n * - **includes** `{object}` - returns an object that includes every state that \n * would pass a `$state.includes()` test.\n *\n * @example\n *
\n   * // Override the internal 'views' builder with a function that takes the state\n   * // definition, and a reference to the internal function being overridden:\n   * $stateProvider.decorator('views', function (state, parent) {\n   *   var result = {},\n   *       views = parent(state);\n   *\n   *   angular.forEach(views, function (config, name) {\n   *     var autoName = (state.name + '.' + name).replace('.', '/');\n   *     config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n   *     result[name] = config;\n   *   });\n   *   return result;\n   * });\n   *\n   * $stateProvider.state('home', {\n   *   views: {\n   *     'contact.list': { controller: 'ListController' },\n   *     'contact.item': { controller: 'ItemController' }\n   *   }\n   * });\n   *\n   * // ...\n   *\n   * $state.go('home');\n   * // Auto-populates list and item views with /partials/home/contact/list.html,\n   * // and /partials/home/contact/item.html, respectively.\n   * 
\n *\n * @param {string} name The name of the builder function to decorate. \n * @param {object} func A function that is responsible for decorating the original \n * builder function. The function receives two parameters:\n *\n * - `{object}` - state - The state config object.\n * - `{object}` - super - The original builder function.\n *\n * @return {object} $stateProvider - $stateProvider instance\n */\n this.decorator = decorator;\n function decorator(name, func) {\n /*jshint validthis: true */\n if (isString(name) && !isDefined(func)) {\n return stateBuilder[name];\n }\n if (!isFunction(func) || !isString(name)) {\n return this;\n }\n if (stateBuilder[name] && !stateBuilder.$delegates[name]) {\n stateBuilder.$delegates[name] = stateBuilder[name];\n }\n stateBuilder[name] = func;\n return this;\n }\n\n /**\n * @ngdoc function\n * @name ui.router.state.$stateProvider#state\n * @methodOf ui.router.state.$stateProvider\n *\n * @description\n * Registers a state configuration under a given state name. The stateConfig object\n * has the following acceptable properties.\n *\n * @param {string} name A unique state name, e.g. \"home\", \"about\", \"contacts\".\n * To create a parent/child state use a dot, e.g. \"about.sales\", \"home.newest\".\n * @param {object} stateConfig State configuration object.\n * @param {string|function=} stateConfig.template\n * \n * html template as a string or a function that returns\n * an html template as a string which should be used by the uiView directives. This property \n * takes precedence over templateUrl.\n * \n * If `template` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n *
template:\n   *   \"

inline template definition

\" +\n * \"
\"
\n *
template: function(params) {\n   *       return \"

generated template

\"; }
\n *
\n *\n * @param {string|function=} stateConfig.templateUrl\n * \n *\n * path or function that returns a path to an html\n * template that should be used by uiView.\n * \n * If `templateUrl` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by \n * applying the current state\n *\n *
templateUrl: \"home.html\"
\n *
templateUrl: function(params) {\n   *     return myTemplates[params.pageId]; }
\n *\n * @param {function=} stateConfig.templateProvider\n * \n * Provider function that returns HTML content string.\n *
 templateProvider:\n   *       function(MyTemplateService, params) {\n   *         return MyTemplateService.getTemplate(params.pageId);\n   *       }
\n *\n * @param {string|function=} stateConfig.controller\n * \n *\n * Controller fn that should be associated with newly\n * related scope or the name of a registered controller if passed as a string.\n * Optionally, the ControllerAs may be declared here.\n *
controller: \"MyRegisteredController\"
\n *
controller:\n   *     \"MyRegisteredController as fooCtrl\"}
\n *
controller: function($scope, MyService) {\n   *     $scope.data = MyService.getData(); }
\n *\n * @param {function=} stateConfig.controllerProvider\n * \n *\n * Injectable provider function that returns the actual controller or string.\n *
controllerProvider:\n   *   function(MyResolveData) {\n   *     if (MyResolveData.foo)\n   *       return \"FooCtrl\"\n   *     else if (MyResolveData.bar)\n   *       return \"BarCtrl\";\n   *     else return function($scope) {\n   *       $scope.baz = \"Qux\";\n   *     }\n   *   }
\n *\n * @param {string=} stateConfig.controllerAs\n * \n * \n * A controller alias name. If present the controller will be\n * published to scope under the controllerAs name.\n *
controllerAs: \"myCtrl\"
\n *\n * @param {string|object=} stateConfig.parent\n * \n * Optionally specifies the parent state of this state.\n *\n *
parent: 'parentState'
\n *
parent: parentState // JS variable
\n *\n * @param {object=} stateConfig.resolve\n * \n *\n * An optional map<string, function> of dependencies which\n * should be injected into the controller. If any of these dependencies are promises, \n * the router will wait for them all to be resolved before the controller is instantiated.\n * If all the promises are resolved successfully, the $stateChangeSuccess event is fired\n * and the values of the resolved promises are injected into any controllers that reference them.\n * If any of the promises are rejected the $stateChangeError event is fired.\n *\n * The map object is:\n * \n * - key - {string}: name of dependency to be injected into controller\n * - factory - {string|function}: If string then it is alias for service. Otherwise if function, \n * it is injected and return value it treated as dependency. If result is a promise, it is \n * resolved before its value is injected into controller.\n *\n *
resolve: {\n   *     myResolve1:\n   *       function($http, $stateParams) {\n   *         return $http.get(\"/api/foos/\"+stateParams.fooID);\n   *       }\n   *     }
\n *\n * @param {string=} stateConfig.url\n * \n *\n * A url fragment with optional parameters. When a state is navigated or\n * transitioned to, the `$stateParams` service will be populated with any \n * parameters that were passed.\n *\n * (See {@link ui.router.util.type:UrlMatcher UrlMatcher} `UrlMatcher`} for\n * more details on acceptable patterns )\n *\n * examples:\n *
url: \"/home\"\n   * url: \"/users/:userid\"\n   * url: \"/books/{bookid:[a-zA-Z_-]}\"\n   * url: \"/books/{categoryid:int}\"\n   * url: \"/books/{publishername:string}/{categoryid:int}\"\n   * url: \"/messages?before&after\"\n   * url: \"/messages?{before:date}&{after:date}\"\n   * url: \"/messages/:mailboxid?{before:date}&{after:date}\"\n   * 
\n *\n * @param {object=} stateConfig.views\n * \n * an optional map<string, object> which defined multiple views, or targets views\n * manually/explicitly.\n *\n * Examples:\n *\n * Targets three named `ui-view`s in the parent state's template\n *
views: {\n   *     header: {\n   *       controller: \"headerCtrl\",\n   *       templateUrl: \"header.html\"\n   *     }, body: {\n   *       controller: \"bodyCtrl\",\n   *       templateUrl: \"body.html\"\n   *     }, footer: {\n   *       controller: \"footCtrl\",\n   *       templateUrl: \"footer.html\"\n   *     }\n   *   }
\n *\n * Targets named `ui-view=\"header\"` from grandparent state 'top''s template, and named `ui-view=\"body\" from parent state's template.\n *
views: {\n   *     'header@top': {\n   *       controller: \"msgHeaderCtrl\",\n   *       templateUrl: \"msgHeader.html\"\n   *     }, 'body': {\n   *       controller: \"messagesCtrl\",\n   *       templateUrl: \"messages.html\"\n   *     }\n   *   }
\n *\n * @param {boolean=} [stateConfig.abstract=false]\n * \n * An abstract state will never be directly activated,\n * but can provide inherited properties to its common children states.\n *
abstract: true
\n *\n * @param {function=} stateConfig.onEnter\n * \n *\n * Callback function for when a state is entered. Good way\n * to trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to explicitly annotate this function,\n * because it won't be automatically annotated by your build tools.\n *\n *
onEnter: function(MyService, $stateParams) {\n   *     MyService.foo($stateParams.myParam);\n   * }
\n *\n * @param {function=} stateConfig.onExit\n * \n *\n * Callback function for when a state is exited. Good way to\n * trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to explicitly annotate this function,\n * because it won't be automatically annotated by your build tools.\n *\n *
onExit: function(MyService, $stateParams) {\n   *     MyService.cleanup($stateParams.myParam);\n   * }
\n *\n * @param {boolean=} [stateConfig.reloadOnSearch=true]\n * \n *\n * If `false`, will not retrigger the same state\n * just because a search/query parameter has changed (via $location.search() or $location.hash()). \n * Useful for when you'd like to modify $location.search() without triggering a reload.\n *
reloadOnSearch: false
\n *\n * @param {object=} stateConfig.data\n * \n *\n * Arbitrary data object, useful for custom configuration. The parent state's `data` is\n * prototypally inherited. In other words, adding a data property to a state adds it to\n * the entire subtree via prototypal inheritance.\n *\n *
data: {\n   *     requiredRole: 'foo'\n   * } 
\n *\n * @param {object=} stateConfig.params\n * \n *\n * A map which optionally configures parameters declared in the `url`, or\n * defines additional non-url parameters. For each parameter being\n * configured, add a configuration object keyed to the name of the parameter.\n *\n * Each parameter configuration object may contain the following properties:\n *\n * - ** value ** - {object|function=}: specifies the default value for this\n * parameter. This implicitly sets this parameter as optional.\n *\n * When UI-Router routes to a state and no value is\n * specified for this parameter in the URL or transition, the\n * default value will be used instead. If `value` is a function,\n * it will be injected and invoked, and the return value used.\n *\n * *Note*: `undefined` is treated as \"no default value\" while `null`\n * is treated as \"the default value is `null`\".\n *\n * *Shorthand*: If you only need to configure the default value of the\n * parameter, you may use a shorthand syntax. In the **`params`**\n * map, instead mapping the param name to a full parameter configuration\n * object, simply set map it to the default parameter value, e.g.:\n *\n *
// define a parameter's default value\n   * params: {\n   *     param1: { value: \"defaultValue\" }\n   * }\n   * // shorthand default values\n   * params: {\n   *     param1: \"defaultValue\",\n   *     param2: \"param2Default\"\n   * }
\n *\n * - ** array ** - {boolean=}: *(default: false)* If true, the param value will be\n * treated as an array of values. If you specified a Type, the value will be\n * treated as an array of the specified Type. Note: query parameter values\n * default to a special `\"auto\"` mode.\n *\n * For query parameters in `\"auto\"` mode, if multiple values for a single parameter\n * are present in the URL (e.g.: `/foo?bar=1&bar=2&bar=3`) then the values\n * are mapped to an array (e.g.: `{ foo: [ '1', '2', '3' ] }`). However, if\n * only one value is present (e.g.: `/foo?bar=1`) then the value is treated as single\n * value (e.g.: `{ foo: '1' }`).\n *\n *
params: {\n   *     param1: { array: true }\n   * }
\n *\n * - ** squash ** - {bool|string=}: `squash` configures how a default parameter value is represented in the URL when\n * the current parameter value is the same as the default value. If `squash` is not set, it uses the\n * configured default squash policy.\n * (See {@link ui.router.util.$urlMatcherFactory#methods_defaultSquashPolicy `defaultSquashPolicy()`})\n *\n * There are three squash settings:\n *\n * - false: The parameter's default value is not squashed. It is encoded and included in the URL\n * - true: The parameter's default value is omitted from the URL. If the parameter is preceeded and followed\n * by slashes in the state's `url` declaration, then one of those slashes are omitted.\n * This can allow for cleaner looking URLs.\n * - `\"\"`: The parameter's default value is replaced with an arbitrary placeholder of your choice.\n *\n *
params: {\n   *     param1: {\n   *       value: \"defaultId\",\n   *       squash: true\n   * } }\n   * // squash \"defaultValue\" to \"~\"\n   * params: {\n   *     param1: {\n   *       value: \"defaultValue\",\n   *       squash: \"~\"\n   * } }\n   * 
\n *\n *\n * @example\n *
\n   * // Some state name examples\n   *\n   * // stateName can be a single top-level name (must be unique).\n   * $stateProvider.state(\"home\", {});\n   *\n   * // Or it can be a nested state name. This state is a child of the\n   * // above \"home\" state.\n   * $stateProvider.state(\"home.newest\", {});\n   *\n   * // Nest states as deeply as needed.\n   * $stateProvider.state(\"home.newest.abc.xyz.inception\", {});\n   *\n   * // state() returns $stateProvider, so you can chain state declarations.\n   * $stateProvider\n   *   .state(\"home\", {})\n   *   .state(\"about\", {})\n   *   .state(\"contacts\", {});\n   * 
\n *\n */\n this.state = state;\n function state(name, definition) {\n /*jshint validthis: true */\n if (isObject(name)) definition = name;\n else definition.name = name;\n registerState(definition);\n return this;\n }\n\n /**\n * @ngdoc object\n * @name ui.router.state.$state\n *\n * @requires $rootScope\n * @requires $q\n * @requires ui.router.state.$view\n * @requires $injector\n * @requires ui.router.util.$resolve\n * @requires ui.router.state.$stateParams\n * @requires ui.router.router.$urlRouter\n *\n * @property {object} params A param object, e.g. {sectionId: section.id)}, that \n * you'd like to test against the current active state.\n * @property {object} current A reference to the state's config object. However \n * you passed it in. Useful for accessing custom data.\n * @property {object} transition Currently pending transition. A promise that'll \n * resolve or reject.\n *\n * @description\n * `$state` service is responsible for representing states as well as transitioning\n * between them. It also provides interfaces to ask for current state or even states\n * you're coming from.\n */\n this.$get = $get;\n $get.$inject = ['$rootScope', '$q', '$view', '$injector', '$resolve', '$stateParams', '$urlRouter', '$location', '$urlMatcherFactory'];\n function $get( $rootScope, $q, $view, $injector, $resolve, $stateParams, $urlRouter, $location, $urlMatcherFactory) {\n\n var TransitionSupersededError = new Error('transition superseded');\n\n var TransitionSuperseded = silenceUncaughtInPromise($q.reject(TransitionSupersededError));\n var TransitionPrevented = silenceUncaughtInPromise($q.reject(new Error('transition prevented')));\n var TransitionAborted = silenceUncaughtInPromise($q.reject(new Error('transition aborted')));\n var TransitionFailed = silenceUncaughtInPromise($q.reject(new Error('transition failed')));\n\n // Handles the case where a state which is the target of a transition is not found, and the user\n // can optionally retry or defer the transition\n function handleRedirect(redirect, state, params, options) {\n /**\n * @ngdoc event\n * @name ui.router.state.$state#$stateNotFound\n * @eventOf ui.router.state.$state\n * @eventType broadcast on root scope\n * @description\n * Fired when a requested state **cannot be found** using the provided state name during transition.\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A special `unfoundState` object is passed to the listener handler,\n * you can see its three properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `go` will be rejected with a `'transition aborted'` value.\n *\n * @param {Object} event Event object.\n * @param {Object} unfoundState Unfound State information. Contains: `to, toParams, options` properties.\n * @param {State} fromState Current state object.\n * @param {Object} fromParams Current state params.\n *\n * @example\n *\n *
\n       * // somewhere, assume lazy.state has not been defined\n       * $state.go(\"lazy.state\", {a:1, b:2}, {inherit:false});\n       *\n       * // somewhere else\n       * $scope.$on('$stateNotFound',\n       * function(event, unfoundState, fromState, fromParams){\n       *     console.log(unfoundState.to); // \"lazy.state\"\n       *     console.log(unfoundState.toParams); // {a:1, b:2}\n       *     console.log(unfoundState.options); // {inherit:false} + default options\n       * })\n       * 
\n */\n var evt = $rootScope.$broadcast('$stateNotFound', redirect, state, params);\n\n if (evt.defaultPrevented) {\n $urlRouter.update();\n return TransitionAborted;\n }\n\n if (!evt.retry) {\n return null;\n }\n\n // Allow the handler to return a promise to defer state lookup retry\n if (options.$retry) {\n $urlRouter.update();\n return TransitionFailed;\n }\n var retryTransition = $state.transition = $q.when(evt.retry);\n\n retryTransition.then(function() {\n if (retryTransition !== $state.transition) {\n $rootScope.$broadcast('$stateChangeCancel', redirect.to, redirect.toParams, state, params);\n return TransitionSuperseded;\n }\n redirect.options.$retry = true;\n return $state.transitionTo(redirect.to, redirect.toParams, redirect.options);\n }, function() {\n return TransitionAborted;\n });\n $urlRouter.update();\n\n return retryTransition;\n }\n\n root.locals = { resolve: null, globals: { $stateParams: {} } };\n\n $state = {\n params: {},\n current: root.self,\n $current: root,\n transition: null\n };\n\n /**\n * @ngdoc function\n * @name ui.router.state.$state#reload\n * @methodOf ui.router.state.$state\n *\n * @description\n * A method that force reloads the current state. All resolves are re-resolved,\n * controllers reinstantiated, and events re-fired.\n *\n * @example\n *
\n     * var app angular.module('app', ['ui.router']);\n     *\n     * app.controller('ctrl', function ($scope, $state) {\n     *   $scope.reload = function(){\n     *     $state.reload();\n     *   }\n     * });\n     * 
\n *\n * `reload()` is just an alias for:\n *
\n     * $state.transitionTo($state.current, $stateParams, { \n     *   reload: true, inherit: false, notify: true\n     * });\n     * 
\n *\n * @param {string=|object=} state - A state name or a state object, which is the root of the resolves to be re-resolved.\n * @example\n *
\n     * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item' \n     * //and current state is 'contacts.detail.item'\n     * var app angular.module('app', ['ui.router']);\n     *\n     * app.controller('ctrl', function ($scope, $state) {\n     *   $scope.reload = function(){\n     *     //will reload 'contact.detail' and 'contact.detail.item' states\n     *     $state.reload('contact.detail');\n     *   }\n     * });\n     * 
\n *\n * `reload()` is just an alias for:\n *
\n     * $state.transitionTo($state.current, $stateParams, { \n     *   reload: true, inherit: false, notify: true\n     * });\n     * 
\n\n * @returns {promise} A promise representing the state of the new transition. See\n * {@link ui.router.state.$state#methods_go $state.go}.\n */\n $state.reload = function reload(state) {\n return $state.transitionTo($state.current, $stateParams, { reload: state || true, inherit: false, notify: true});\n };\n\n /**\n * @ngdoc function\n * @name ui.router.state.$state#go\n * @methodOf ui.router.state.$state\n *\n * @description\n * Convenience method for transitioning to a new state. `$state.go` calls \n * `$state.transitionTo` internally but automatically sets options to \n * `{ location: true, inherit: true, relative: $state.$current, notify: true }`. \n * This allows you to easily use an absolute or relative to path and specify \n * only the parameters you'd like to update (while letting unspecified parameters \n * inherit from the currently active ancestor states).\n *\n * @example\n *
\n     * var app = angular.module('app', ['ui.router']);\n     *\n     * app.controller('ctrl', function ($scope, $state) {\n     *   $scope.changeState = function () {\n     *     $state.go('contact.detail');\n     *   };\n     * });\n     * 
\n * \n *\n * @param {string} to Absolute state name or relative state path. Some examples:\n *\n * - `$state.go('contact.detail')` - will go to the `contact.detail` state\n * - `$state.go('^')` - will go to a parent state\n * - `$state.go('^.sibling')` - will go to a sibling state\n * - `$state.go('.child.grandchild')` - will go to grandchild state\n *\n * @param {object=} params A map of the parameters that will be sent to the state, \n * will populate $stateParams. Any parameters that are not specified will be inherited from currently \n * defined parameters. Only parameters specified in the state definition can be overridden, new \n * parameters will be ignored. This allows, for example, going to a sibling state that shares parameters\n * specified in a parent state. Parameter inheritance only works between common ancestor states, I.e.\n * transitioning to a sibling will get you the parameters for all parents, transitioning to a child\n * will get you all current parameters, etc.\n * @param {object=} options Options object. The options are:\n *\n * - **`location`** - {boolean=true|string=} - If `true` will update the url in the location bar, if `false`\n * will not. If string, must be `\"replace\"`, which will update url and also replace last history record.\n * - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url.\n * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'), \n * defines which state to be relative from.\n * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events.\n * - **`reload`** (v0.2.5) - {boolean=false|string|object}, If `true` will force transition even if no state or params\n * have changed. It will reload the resolves and views of the current state and parent states.\n * If `reload` is a string (or state object), the state object is fetched (by name, or object reference); and \\\n * the transition reloads the resolves and views for that matched state, and all its children states.\n *\n * @returns {promise} A promise representing the state of the new transition.\n *\n * Possible success values:\n *\n * - $state.current\n *\n *
Possible rejection values:\n *\n * - 'transition superseded' - when a newer transition has been started after this one\n * - 'transition prevented' - when `event.preventDefault()` has been called in a `$stateChangeStart` listener\n * - 'transition aborted' - when `event.preventDefault()` has been called in a `$stateNotFound` listener or\n * when a `$stateNotFound` `event.retry` promise errors.\n * - 'transition failed' - when a state has been unsuccessfully found after 2 tries.\n * - *resolve error* - when an error has occurred with a `resolve`\n *\n */\n $state.go = function go(to, params, options) {\n return $state.transitionTo(to, params, extend({ inherit: true, relative: $state.$current }, options));\n };\n\n /**\n * @ngdoc function\n * @name ui.router.state.$state#transitionTo\n * @methodOf ui.router.state.$state\n *\n * @description\n * Low-level method for transitioning to a new state. {@link ui.router.state.$state#methods_go $state.go}\n * uses `transitionTo` internally. `$state.go` is recommended in most situations.\n *\n * @example\n *
\n     * var app = angular.module('app', ['ui.router']);\n     *\n     * app.controller('ctrl', function ($scope, $state) {\n     *   $scope.changeState = function () {\n     *     $state.transitionTo('contact.detail');\n     *   };\n     * });\n     * 
\n *\n * @param {string} to State name.\n * @param {object=} toParams A map of the parameters that will be sent to the state,\n * will populate $stateParams.\n * @param {object=} options Options object. The options are:\n *\n * - **`location`** - {boolean=true|string=} - If `true` will update the url in the location bar, if `false`\n * will not. If string, must be `\"replace\"`, which will update url and also replace last history record.\n * - **`inherit`** - {boolean=false}, If `true` will inherit url parameters from current url.\n * - **`relative`** - {object=}, When transitioning with relative path (e.g '^'), \n * defines which state to be relative from.\n * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events.\n * - **`reload`** (v0.2.5) - {boolean=false|string=|object=}, If `true` will force transition even if the state or params \n * have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd\n * use this when you want to force a reload when *everything* is the same, including search params.\n * if String, then will reload the state with the name given in reload, and any children.\n * if Object, then a stateObj is expected, will reload the state found in stateObj, and any children.\n *\n * @returns {promise} A promise representing the state of the new transition. See\n * {@link ui.router.state.$state#methods_go $state.go}.\n */\n $state.transitionTo = function transitionTo(to, toParams, options) {\n toParams = toParams || {};\n options = extend({\n location: true, inherit: false, relative: null, notify: true, reload: false, $retry: false\n }, options || {});\n\n var from = $state.$current, fromParams = $state.params, fromPath = from.path;\n var evt, toState = findState(to, options.relative);\n\n // Store the hash param for later (since it will be stripped out by various methods)\n var hash = toParams['#'];\n\n if (!isDefined(toState)) {\n var redirect = { to: to, toParams: toParams, options: options };\n var redirectResult = handleRedirect(redirect, from.self, fromParams, options);\n\n if (redirectResult) {\n return redirectResult;\n }\n\n // Always retry once if the $stateNotFound was not prevented\n // (handles either redirect changed or state lazy-definition)\n to = redirect.to;\n toParams = redirect.toParams;\n options = redirect.options;\n toState = findState(to, options.relative);\n\n if (!isDefined(toState)) {\n if (!options.relative) throw new Error(\"No such state '\" + to + \"'\");\n throw new Error(\"Could not resolve '\" + to + \"' from state '\" + options.relative + \"'\");\n }\n }\n if (toState[abstractKey]) throw new Error(\"Cannot transition to abstract state '\" + to + \"'\");\n if (options.inherit) toParams = inheritParams($stateParams, toParams || {}, $state.$current, toState);\n if (!toState.params.$$validates(toParams)) return TransitionFailed;\n\n toParams = toState.params.$$values(toParams);\n to = toState;\n\n var toPath = to.path;\n\n // Starting from the root of the path, keep all levels that haven't changed\n var keep = 0, state = toPath[keep], locals = root.locals, toLocals = [];\n\n if (!options.reload) {\n while (state && state === fromPath[keep] && state.ownParams.$$equals(toParams, fromParams)) {\n locals = toLocals[keep] = state.locals;\n keep++;\n state = toPath[keep];\n }\n } else if (isString(options.reload) || isObject(options.reload)) {\n if (isObject(options.reload) && !options.reload.name) {\n throw new Error('Invalid reload state object');\n }\n \n var reloadState = options.reload === true ? fromPath[0] : findState(options.reload);\n if (options.reload && !reloadState) {\n throw new Error(\"No such reload state '\" + (isString(options.reload) ? options.reload : options.reload.name) + \"'\");\n }\n\n while (state && state === fromPath[keep] && state !== reloadState) {\n locals = toLocals[keep] = state.locals;\n keep++;\n state = toPath[keep];\n }\n }\n\n // If we're going to the same state and all locals are kept, we've got nothing to do.\n // But clear 'transition', as we still want to cancel any other pending transitions.\n // TODO: We may not want to bump 'transition' if we're called from a location change\n // that we've initiated ourselves, because we might accidentally abort a legitimate\n // transition initiated from code?\n if (shouldSkipReload(to, toParams, from, fromParams, locals, options)) {\n if (hash) toParams['#'] = hash;\n $state.params = toParams;\n copy($state.params, $stateParams);\n copy(filterByKeys(to.params.$$keys(), $stateParams), to.locals.globals.$stateParams);\n if (options.location && to.navigable && to.navigable.url) {\n $urlRouter.push(to.navigable.url, toParams, {\n $$avoidResync: true, replace: options.location === 'replace'\n });\n $urlRouter.update(true);\n }\n $state.transition = null;\n return $q.when($state.current);\n }\n\n // Filter parameters before we pass them to event handlers etc.\n toParams = filterByKeys(to.params.$$keys(), toParams || {});\n \n // Re-add the saved hash before we start returning things or broadcasting $stateChangeStart\n if (hash) toParams['#'] = hash;\n \n // Broadcast start event and cancel the transition if requested\n if (options.notify) {\n /**\n * @ngdoc event\n * @name ui.router.state.$state#$stateChangeStart\n * @eventOf ui.router.state.$state\n * @eventType broadcast on root scope\n * @description\n * Fired when the state transition **begins**. You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * @param {Object} event Event object.\n * @param {State} toState The state being transitioned to.\n * @param {Object} toParams The params supplied to the `toState`.\n * @param {State} fromState The current state, pre-transition.\n * @param {Object} fromParams The params supplied to the `fromState`.\n *\n * @example\n *\n *
\n         * $rootScope.$on('$stateChangeStart',\n         * function(event, toState, toParams, fromState, fromParams){\n         *     event.preventDefault();\n         *     // transitionTo() promise will be rejected with\n         *     // a 'transition prevented' error\n         * })\n         * 
\n */\n if ($rootScope.$broadcast('$stateChangeStart', to.self, toParams, from.self, fromParams, options).defaultPrevented) {\n $rootScope.$broadcast('$stateChangeCancel', to.self, toParams, from.self, fromParams);\n //Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return TransitionPrevented;\n }\n }\n\n // Resolve locals for the remaining states, but don't update any global state just\n // yet -- if anything fails to resolve the current state needs to remain untouched.\n // We also set up an inheritance chain for the locals here. This allows the view directive\n // to quickly look up the correct definition for each view in the current state. Even\n // though we create the locals object itself outside resolveState(), it is initially\n // empty and gets filled asynchronously. We need to keep track of the promise for the\n // (fully resolved) current locals, and pass this down the chain.\n var resolved = $q.when(locals);\n\n for (var l = keep; l < toPath.length; l++, state = toPath[l]) {\n locals = toLocals[l] = inherit(locals);\n resolved = resolveState(state, toParams, state === to, resolved, locals, options);\n }\n\n // Once everything is resolved, we are ready to perform the actual transition\n // and return a promise for the new state. We also keep track of what the\n // current promise is, so that we can detect overlapping transitions and\n // keep only the outcome of the last transition.\n var transition = $state.transition = resolved.then(function () {\n var l, entering, exiting;\n\n if ($state.transition !== transition) {\n $rootScope.$broadcast('$stateChangeCancel', to.self, toParams, from.self, fromParams);\n return TransitionSuperseded;\n }\n\n // Exit 'from' states not kept\n for (l = fromPath.length - 1; l >= keep; l--) {\n exiting = fromPath[l];\n if (exiting.self.onExit) {\n $injector.invoke(exiting.self.onExit, exiting.self, exiting.locals.globals);\n }\n exiting.locals = null;\n }\n\n // Enter 'to' states not kept\n for (l = keep; l < toPath.length; l++) {\n entering = toPath[l];\n entering.locals = toLocals[l];\n if (entering.self.onEnter) {\n $injector.invoke(entering.self.onEnter, entering.self, entering.locals.globals);\n }\n }\n\n // Run it again, to catch any transitions in callbacks\n if ($state.transition !== transition) {\n $rootScope.$broadcast('$stateChangeCancel', to.self, toParams, from.self, fromParams);\n return TransitionSuperseded;\n }\n\n // Update globals in $state\n $state.$current = to;\n $state.current = to.self;\n $state.params = toParams;\n copy($state.params, $stateParams);\n $state.transition = null;\n\n if (options.location && to.navigable) {\n $urlRouter.push(to.navigable.url, to.navigable.locals.globals.$stateParams, {\n $$avoidResync: true, replace: options.location === 'replace'\n });\n }\n\n if (options.notify) {\n /**\n * @ngdoc event\n * @name ui.router.state.$state#$stateChangeSuccess\n * @eventOf ui.router.state.$state\n * @eventType broadcast on root scope\n * @description\n * Fired once the state transition is **complete**.\n *\n * @param {Object} event Event object.\n * @param {State} toState The state being transitioned to.\n * @param {Object} toParams The params supplied to the `toState`.\n * @param {State} fromState The current state, pre-transition.\n * @param {Object} fromParams The params supplied to the `fromState`.\n */\n $rootScope.$broadcast('$stateChangeSuccess', to.self, toParams, from.self, fromParams);\n }\n $urlRouter.update(true);\n\n return $state.current;\n }).then(null, function (error) {\n // propagate TransitionSuperseded error without emitting $stateChangeCancel\n // as it was already emitted in the success handler above\n if (error === TransitionSupersededError) return TransitionSuperseded;\n\n if ($state.transition !== transition) {\n $rootScope.$broadcast('$stateChangeCancel', to.self, toParams, from.self, fromParams);\n return TransitionSuperseded;\n }\n\n $state.transition = null;\n /**\n * @ngdoc event\n * @name ui.router.state.$state#$stateChangeError\n * @eventOf ui.router.state.$state\n * @eventType broadcast on root scope\n * @description\n * Fired when an **error occurs** during transition. It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * @param {Object} event Event object.\n * @param {State} toState The state being transitioned to.\n * @param {Object} toParams The params supplied to the `toState`.\n * @param {State} fromState The current state, pre-transition.\n * @param {Object} fromParams The params supplied to the `fromState`.\n * @param {Error} error The resolve error object.\n */\n evt = $rootScope.$broadcast('$stateChangeError', to.self, toParams, from.self, fromParams, error);\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n\n return $q.reject(error);\n });\n\n silenceUncaughtInPromise(transition);\n return transition;\n };\n\n /**\n * @ngdoc function\n * @name ui.router.state.$state#is\n * @methodOf ui.router.state.$state\n *\n * @description\n * Similar to {@link ui.router.state.$state#methods_includes $state.includes},\n * but only checks for the full state name. If params is supplied then it will be\n * tested for strict equality against the current active params object, so all params\n * must match with none missing and no extras.\n *\n * @example\n *
\n     * $state.$current.name = 'contacts.details.item';\n     *\n     * // absolute name\n     * $state.is('contact.details.item'); // returns true\n     * $state.is(contactDetailItemStateObject); // returns true\n     *\n     * // relative name (. and ^), typically from a template\n     * // E.g. from the 'contacts.details' template\n     * 
Item
\n *
\n *\n * @param {string|object} stateOrName The state name (absolute or relative) or state object you'd like to check.\n * @param {object=} params A param object, e.g. `{sectionId: section.id}`, that you'd like\n * to test against the current active state.\n * @param {object=} options An options object. The options are:\n *\n * - **`relative`** - {string|object} - If `stateOrName` is a relative state name and `options.relative` is set, .is will\n * test relative to `options.relative` state (or name).\n *\n * @returns {boolean} Returns true if it is the state.\n */\n $state.is = function is(stateOrName, params, options) {\n options = extend({ relative: $state.$current }, options || {});\n var state = findState(stateOrName, options.relative);\n\n if (!isDefined(state)) { return undefined; }\n if ($state.$current !== state) { return false; }\n\n return !params || objectKeys(params).reduce(function(acc, key) {\n var paramDef = state.params[key];\n return acc && (!paramDef || paramDef.type.equals($stateParams[key], params[key]));\n }, true);\n };\n\n /**\n * @ngdoc function\n * @name ui.router.state.$state#includes\n * @methodOf ui.router.state.$state\n *\n * @description\n * A method to determine if the current active state is equal to or is the child of the\n * state stateName. If any params are passed then they will be tested for a match as well.\n * Not all the parameters need to be passed, just the ones you'd like to test for equality.\n *\n * @example\n * Partial and relative names\n *
\n     * $state.$current.name = 'contacts.details.item';\n     *\n     * // Using partial names\n     * $state.includes(\"contacts\"); // returns true\n     * $state.includes(\"contacts.details\"); // returns true\n     * $state.includes(\"contacts.details.item\"); // returns true\n     * $state.includes(\"contacts.list\"); // returns false\n     * $state.includes(\"about\"); // returns false\n     *\n     * // Using relative names (. and ^), typically from a template\n     * // E.g. from the 'contacts.details' template\n     * 
Item
\n *
\n *\n * Basic globbing patterns\n *
\n     * $state.$current.name = 'contacts.details.item.url';\n     *\n     * $state.includes(\"*.details.*.*\"); // returns true\n     * $state.includes(\"*.details.**\"); // returns true\n     * $state.includes(\"**.item.**\"); // returns true\n     * $state.includes(\"*.details.item.url\"); // returns true\n     * $state.includes(\"*.details.*.url\"); // returns true\n     * $state.includes(\"*.details.*\"); // returns false\n     * $state.includes(\"item.**\"); // returns false\n     * 
\n *\n * @param {string} stateOrName A partial name, relative name, or glob pattern\n * to be searched for within the current state name.\n * @param {object=} params A param object, e.g. `{sectionId: section.id}`,\n * that you'd like to test against the current active state.\n * @param {object=} options An options object. The options are:\n *\n * - **`relative`** - {string|object=} - If `stateOrName` is a relative state reference and `options.relative` is set,\n * .includes will test relative to `options.relative` state (or name).\n *\n * @returns {boolean} Returns true if it does include the state\n */\n $state.includes = function includes(stateOrName, params, options) {\n options = extend({ relative: $state.$current }, options || {});\n if (isString(stateOrName) && isGlob(stateOrName)) {\n if (!doesStateMatchGlob(stateOrName)) {\n return false;\n }\n stateOrName = $state.$current.name;\n }\n\n var state = findState(stateOrName, options.relative);\n if (!isDefined(state)) { return undefined; }\n if (!isDefined($state.$current.includes[state.name])) { return false; }\n if (!params) { return true; }\n\n var keys = objectKeys(params);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i], paramDef = state.params[key];\n if (paramDef && !paramDef.type.equals($stateParams[key], params[key])) {\n return false;\n }\n }\n\n return objectKeys(params).reduce(function(acc, key) {\n var paramDef = state.params[key];\n return acc && !paramDef || paramDef.type.equals($stateParams[key], params[key]);\n }, true);\n };\n\n\n /**\n * @ngdoc function\n * @name ui.router.state.$state#href\n * @methodOf ui.router.state.$state\n *\n * @description\n * A url generation method that returns the compiled url for the given state populated with the given params.\n *\n * @example\n *
\n     * expect($state.href(\"about.person\", { person: \"bob\" })).toEqual(\"/about/bob\");\n     * 
\n *\n * @param {string|object} stateOrName The state name or state object you'd like to generate a url from.\n * @param {object=} params An object of parameter values to fill the state's required parameters.\n * @param {object=} options Options object. The options are:\n *\n * - **`lossy`** - {boolean=true} - If true, and if there is no url associated with the state provided in the\n * first parameter, then the constructed href url will be built from the first navigable ancestor (aka\n * ancestor with a valid url).\n * - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url.\n * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'), \n * defines which state to be relative from.\n * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n * \n * @returns {string} compiled state url\n */\n $state.href = function href(stateOrName, params, options) {\n options = extend({\n lossy: true,\n inherit: true,\n absolute: false,\n relative: $state.$current\n }, options || {});\n\n var state = findState(stateOrName, options.relative);\n\n if (!isDefined(state)) return null;\n if (options.inherit) params = inheritParams($stateParams, params || {}, $state.$current, state);\n \n var nav = (state && options.lossy) ? state.navigable : state;\n\n if (!nav || nav.url === undefined || nav.url === null) {\n return null;\n }\n return $urlRouter.href(nav.url, filterByKeys(state.params.$$keys().concat('#'), params || {}), {\n absolute: options.absolute\n });\n };\n\n /**\n * @ngdoc function\n * @name ui.router.state.$state#get\n * @methodOf ui.router.state.$state\n *\n * @description\n * Returns the state configuration object for any specific state or all states.\n *\n * @param {string|object=} stateOrName (absolute or relative) If provided, will only get the config for\n * the requested state. If not provided, returns an array of ALL state configs.\n * @param {string|object=} context When stateOrName is a relative state reference, the state will be retrieved relative to context.\n * @returns {Object|Array} State configuration object or array of all objects.\n */\n $state.get = function (stateOrName, context) {\n if (arguments.length === 0) return map(objectKeys(states), function(name) { return states[name].self; });\n var state = findState(stateOrName, context || $state.$current);\n return (state && state.self) ? state.self : null;\n };\n\n function resolveState(state, params, paramsAreFiltered, inherited, dst, options) {\n // Make a restricted $stateParams with only the parameters that apply to this state if\n // necessary. In addition to being available to the controller and onEnter/onExit callbacks,\n // we also need $stateParams to be available for any $injector calls we make during the\n // dependency resolution process.\n var $stateParams = (paramsAreFiltered) ? params : filterByKeys(state.params.$$keys(), params);\n var locals = { $stateParams: $stateParams };\n\n // Resolve 'global' dependencies for the state, i.e. those not specific to a view.\n // We're also including $stateParams in this; that way the parameters are restricted\n // to the set that should be visible to the state, and are independent of when we update\n // the global $state and $stateParams values.\n dst.resolve = $resolve.resolve(state.resolve, locals, dst.resolve, state);\n var promises = [dst.resolve.then(function (globals) {\n dst.globals = globals;\n })];\n if (inherited) promises.push(inherited);\n\n function resolveViews() {\n var viewsPromises = [];\n\n // Resolve template and dependencies for all views.\n forEach(state.views, function (view, name) {\n var injectables = (view.resolve && view.resolve !== state.resolve ? view.resolve : {});\n injectables.$template = [ function () {\n return $view.load(name, { view: view, locals: dst.globals, params: $stateParams, notify: options.notify }) || '';\n }];\n\n viewsPromises.push($resolve.resolve(injectables, dst.globals, dst.resolve, state).then(function (result) {\n // References to the controller (only instantiated at link time)\n if (isFunction(view.controllerProvider) || isArray(view.controllerProvider)) {\n var injectLocals = angular.extend({}, injectables, dst.globals);\n result.$$controller = $injector.invoke(view.controllerProvider, null, injectLocals);\n } else {\n result.$$controller = view.controller;\n }\n // Provide access to the state itself for internal use\n result.$$state = state;\n result.$$controllerAs = view.controllerAs;\n result.$$resolveAs = view.resolveAs;\n dst[name] = result;\n }));\n });\n\n return $q.all(viewsPromises).then(function(){\n return dst.globals;\n });\n }\n\n // Wait for all the promises and then return the activation object\n return $q.all(promises).then(resolveViews).then(function (values) {\n return dst;\n });\n }\n\n return $state;\n }\n\n function shouldSkipReload(to, toParams, from, fromParams, locals, options) {\n // Return true if there are no differences in non-search (path/object) params, false if there are differences\n function nonSearchParamsEqual(fromAndToState, fromParams, toParams) {\n // Identify whether all the parameters that differ between `fromParams` and `toParams` were search params.\n function notSearchParam(key) {\n return fromAndToState.params[key].location != \"search\";\n }\n var nonQueryParamKeys = fromAndToState.params.$$keys().filter(notSearchParam);\n var nonQueryParams = pick.apply({}, [fromAndToState.params].concat(nonQueryParamKeys));\n var nonQueryParamSet = new $$UMFP.ParamSet(nonQueryParams);\n return nonQueryParamSet.$$equals(fromParams, toParams);\n }\n\n // If reload was not explicitly requested\n // and we're transitioning to the same state we're already in\n // and the locals didn't change\n // or they changed in a way that doesn't merit reloading\n // (reloadOnParams:false, or reloadOnSearch.false and only search params changed)\n // Then return true.\n if (!options.reload && to === from &&\n (locals === from.locals || (to.self.reloadOnSearch === false && nonSearchParamsEqual(from, fromParams, toParams)))) {\n return true;\n }\n }\n}\n\nangular.module('ui.router.state')\n .factory('$stateParams', function () { return {}; })\n .constant(\"$state.runtime\", { autoinject: true })\n .provider('$state', $StateProvider)\n // Inject $state to initialize when entering runtime. #2574\n .run(['$injector', function ($injector) {\n // Allow tests (stateSpec.js) to turn this off by defining this constant\n if ($injector.get(\"$state.runtime\").autoinject) {\n $injector.get('$state');\n }\n }]);\n\n\n$ViewProvider.$inject = [];\nfunction $ViewProvider() {\n\n this.$get = $get;\n /**\n * @ngdoc object\n * @name ui.router.state.$view\n *\n * @requires ui.router.util.$templateFactory\n * @requires $rootScope\n *\n * @description\n *\n */\n $get.$inject = ['$rootScope', '$templateFactory'];\n function $get( $rootScope, $templateFactory) {\n return {\n // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... })\n /**\n * @ngdoc function\n * @name ui.router.state.$view#load\n * @methodOf ui.router.state.$view\n *\n * @description\n *\n * @param {string} name name\n * @param {object} options option object.\n */\n load: function load(name, options) {\n var result, defaults = {\n template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {}\n };\n options = extend(defaults, options);\n\n if (options.view) {\n result = $templateFactory.fromConfig(options.view, options.params, options.locals);\n }\n return result;\n }\n };\n }\n}\n\nangular.module('ui.router.state').provider('$view', $ViewProvider);\n\n/**\n * @ngdoc object\n * @name ui.router.state.$uiViewScrollProvider\n *\n * @description\n * Provider that returns the {@link ui.router.state.$uiViewScroll} service function.\n */\nfunction $ViewScrollProvider() {\n\n var useAnchorScroll = false;\n\n /**\n * @ngdoc function\n * @name ui.router.state.$uiViewScrollProvider#useAnchorScroll\n * @methodOf ui.router.state.$uiViewScrollProvider\n *\n * @description\n * Reverts back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) service for\n * scrolling based on the url anchor.\n */\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n\n /**\n * @ngdoc object\n * @name ui.router.state.$uiViewScroll\n *\n * @requires $anchorScroll\n * @requires $timeout\n *\n * @description\n * When called with a jqLite element, it scrolls the element into view (after a\n * `$timeout` so the DOM has time to refresh).\n *\n * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,\n * this can be enabled by calling {@link ui.router.state.$uiViewScrollProvider#methods_useAnchorScroll `$uiViewScrollProvider.useAnchorScroll()`}.\n */\n this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function ($element) {\n return $timeout(function () {\n $element[0].scrollIntoView();\n }, 0, false);\n };\n }];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-view\n *\n * @requires ui.router.state.$state\n * @requires $compile\n * @requires $controller\n * @requires $injector\n * @requires ui.router.state.$uiViewScroll\n * @requires $document\n *\n * @restrict ECA\n *\n * @description\n * The ui-view directive tells $state where to place your templates.\n *\n * @param {string=} name A view name. The name should be unique amongst the other views in the\n * same state. You can have views of the same name that live in different states.\n *\n * @param {string=} autoscroll It allows you to set the scroll behavior of the browser window\n * when a view is populated. By default, $anchorScroll is overridden by ui-router's custom scroll\n * service, {@link ui.router.state.$uiViewScroll}. This custom service let's you\n * scroll ui-view elements into view when they are populated during a state activation.\n *\n * *Note: To revert back to old [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * functionality, call `$uiViewScrollProvider.useAnchorScroll()`.*\n *\n * @param {string=} onload Expression to evaluate whenever the view updates.\n *\n * @example\n * A view can be unnamed or named.\n *
\n * \n * 
\n *\n * \n *
\n *
\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *
\n * 
\n * $stateProvider.state(\"home\", {\n * template: \"

HELLO!

\"\n * })\n *
\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the {@link ui.router.state.$stateProvider#methods_state `views`}\n * config property, by name, in this case an empty name:\n *
\n * $stateProvider.state(\"home\", {\n *   views: {\n *     \"\": {\n *       template: \"

HELLO!

\"\n * }\n * } \n * })\n *
\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *
\n * 
\n *
\n *
\n * $stateProvider.state(\"home\", {\n *   views: {\n *     \"main\": {\n *       template: \"

HELLO!

\"\n * }\n * } \n * })\n *
\n *\n * Really though, you'll use views to set up multiple views:\n *
\n * 
\n *
\n *
\n *
\n *\n *
\n * $stateProvider.state(\"home\", {\n *   views: {\n *     \"\": {\n *       template: \"

HELLO!

\"\n * },\n * \"chart\": {\n * template: \"\"\n * },\n * \"data\": {\n * template: \"\"\n * }\n * } \n * })\n *
\n *\n * Examples for `autoscroll`:\n *\n *
\n * \n * \n *\n * \n * \n * \n * \n * 
\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * Example usage of $resolve in a view template\n *
\n * $stateProvider.state('home', {\n *   template: '',\n *   resolve: {\n *     user: function(UserService) { return UserService.fetchUser(); }\n *   }\n * });\n * 
\n */\n$ViewDirective.$inject = ['$state', '$injector', '$uiViewScroll', '$interpolate', '$q'];\nfunction $ViewDirective( $state, $injector, $uiViewScroll, $interpolate, $q) {\n\n function getService() {\n return ($injector.has) ? function(service) {\n return $injector.has(service) ? $injector.get(service) : null;\n } : function(service) {\n try {\n return $injector.get(service);\n } catch (e) {\n return null;\n }\n };\n }\n\n var service = getService(),\n $animator = service('$animator'),\n $animate = service('$animate');\n\n // Returns a set of DOM manipulation functions based on which Angular version\n // it should use\n function getRenderer(attrs, scope) {\n var statics = function() {\n return {\n enter: function (element, target, cb) { target.after(element); cb(); },\n leave: function (element, cb) { element.remove(); cb(); }\n };\n };\n\n if ($animate) {\n return {\n enter: function(element, target, cb) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n } else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function(element, cb) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n } else {\n $animate.leave(element, cb);\n }\n }\n };\n }\n\n if ($animator) {\n var animate = $animator && $animator(scope, attrs);\n\n return {\n enter: function(element, target, cb) {animate.enter(element, null, target); cb(); },\n leave: function(element, cb) { animate.leave(element); cb(); }\n };\n }\n\n return statics();\n }\n\n var directive = {\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement, tAttrs, $transclude) {\n return function (scope, $element, attrs) {\n var previousEl, currentEl, currentScope, latestLocals,\n onloadExp = attrs.onload || '',\n autoScrollExp = attrs.autoscroll,\n renderer = getRenderer(attrs, scope),\n inherited = $element.inheritedData('$uiView');\n\n scope.$on('$stateChangeSuccess', function() {\n updateView(false);\n });\n\n updateView(true);\n\n function cleanupLastView() {\n if (previousEl) {\n previousEl.remove();\n previousEl = null;\n }\n\n if (currentScope) {\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentEl) {\n var $uiViewData = currentEl.data('$uiViewAnim');\n renderer.leave(currentEl, function() {\n $uiViewData.$$animLeave.resolve();\n previousEl = null;\n });\n\n previousEl = currentEl;\n currentEl = null;\n }\n }\n\n function updateView(firstTime) {\n var newScope,\n name = getUiViewName(scope, attrs, $element, $interpolate),\n previousLocals = name && $state.$current && $state.$current.locals[name];\n\n if (!firstTime && previousLocals === latestLocals) return; // nothing to do\n newScope = scope.$new();\n latestLocals = $state.$current.locals[name];\n\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n\n var clone = $transclude(newScope, function(clone) {\n var animEnter = $q.defer(), animLeave = $q.defer();\n var viewAnimData = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave\n };\n\n clone.data('$uiViewAnim', viewAnimData);\n renderer.enter(clone, $element, function onUiViewEnter() {\n animEnter.resolve();\n if(currentScope) {\n currentScope.$emit('$viewContentAnimationEnded');\n }\n\n if (angular.isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n cleanupLastView();\n });\n\n currentEl = clone;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n currentScope.$emit('$viewContentLoaded', name);\n currentScope.$eval(onloadExp);\n }\n };\n }\n };\n\n return directive;\n}\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$state', '$interpolate'];\nfunction $ViewDirectiveFill ( $compile, $controller, $state, $interpolate) {\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement) {\n var initial = tElement.html();\n if (tElement.empty) {\n tElement.empty();\n } else {\n // ng 1.0.0 doesn't have empty(), which cleans up data and handlers\n tElement[0].innerHTML = null;\n }\n\n return function (scope, $element, attrs) {\n var current = $state.$current,\n name = getUiViewName(scope, attrs, $element, $interpolate),\n locals = current && current.locals[name];\n\n if (! locals) {\n $element.html(initial);\n $compile($element.contents())(scope);\n return;\n }\n\n $element.data('$uiView', { name: name, state: locals.$$state });\n $element.html(locals.$template ? locals.$template : initial);\n\n var resolveData = angular.extend({}, locals);\n scope[locals.$$resolveAs] = resolveData;\n\n var link = $compile($element.contents());\n\n if (locals.$$controller) {\n locals.$scope = scope;\n locals.$element = $element;\n var controller = $controller(locals.$$controller, locals);\n if (locals.$$controllerAs) {\n scope[locals.$$controllerAs] = controller;\n scope[locals.$$controllerAs][locals.$$resolveAs] = resolveData;\n }\n if (isFunction(controller.$onInit)) controller.$onInit();\n $element.data('$ngControllerController', controller);\n $element.children().data('$ngControllerController', controller);\n }\n\n link(scope);\n };\n }\n };\n}\n\n/**\n * Shared ui-view code for both directives:\n * Given scope, element, and its attributes, return the view's name\n */\nfunction getUiViewName(scope, attrs, element, $interpolate) {\n var name = $interpolate(attrs.uiView || attrs.name || '')(scope);\n var uiViewCreatedBy = element.inheritedData('$uiView');\n return name.indexOf('@') >= 0 ? name : (name + '@' + (uiViewCreatedBy ? uiViewCreatedBy.state.name : ''));\n}\n\nangular.module('ui.router.state').directive('uiView', $ViewDirective);\nangular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n\nfunction parseStateRef(ref, current) {\n var preparsed = ref.match(/^\\s*({[^}]*})\\s*$/), parsed;\n if (preparsed) ref = current + '(' + preparsed[1] + ')';\n parsed = ref.replace(/\\n/g, \" \").match(/^([^(]+?)\\s*(\\((.*)\\))?$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1], paramExpr: parsed[3] || null };\n}\n\nfunction stateContext(el) {\n var stateData = el.parent().inheritedData('$uiView');\n\n if (stateData && stateData.state && stateData.state.name) {\n return stateData.state;\n }\n}\n\nfunction getTypeInfo(el) {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n var isForm = el[0].nodeName === \"FORM\";\n\n return {\n attr: isForm ? \"action\" : (isSvg ? 'xlink:href' : 'href'),\n isAnchor: el.prop(\"tagName\").toUpperCase() === \"A\",\n clickable: !isForm\n };\n}\n\nfunction clickHook(el, $state, $timeout, type, current) {\n return function(e) {\n var button = e.which || e.button, target = current();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n var transition = $timeout(function() {\n $state.go(target.state, target.params, target.options);\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the directive.\n var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1: 0;\n\n e.preventDefault = function() {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\nfunction defaultOpts(el, $state) {\n return { relative: stateContext(el) || $state.$current, inherit: true };\n}\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-sref\n *\n * @requires ui.router.state.$state\n * @requires $timeout\n *\n * @restrict A\n *\n * @description\n * A directive that binds a link (`` tag) to a state. If the state has an associated\n * URL, the directive will automatically generate & update the `href` attribute via\n * the {@link ui.router.state.$state#methods_href $state.href()} method. Clicking\n * the link will trigger a state transition with optional parameters.\n *\n * Also middle-clicking, right-clicking, and ctrl-clicking on the link will be\n * handled natively by the browser.\n *\n * You can also use relative state paths within ui-sref, just like the relative\n * paths passed to `$state.go()`. You just need to be aware that the path is relative\n * to the state that the link lives in, in other words the state that loaded the\n * template containing the link.\n *\n * You can specify options to pass to {@link ui.router.state.$state#methods_go $state.go()}\n * using the `ui-sref-opts` attribute. Options are restricted to `location`, `inherit`,\n * and `reload`.\n *\n * @example\n * Here's an example of how you'd use ui-sref and how it would compile. If you have the\n * following template:\n *
\n * Home | About | Next page\n *\n * \n * 
\n *\n * Then the compiled html would be (assuming Html5Mode is off and current state is contacts):\n *
\n * Home | About | Next page\n *\n * 
    \n *
  • \n * Joe\n *
  • \n *
  • \n * Alice\n *
  • \n *
  • \n * Bob\n *
  • \n *
\n *\n * Home\n *
\n *\n * @param {string} ui-sref 'stateName' can be any valid absolute or relative state\n * @param {Object} ui-sref-opts options to pass to {@link ui.router.state.$state#methods_go $state.go()}\n */\n$StateRefDirective.$inject = ['$state', '$timeout'];\nfunction $StateRefDirective($state, $timeout) {\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function(scope, element, attrs, uiSrefActive) {\n var ref = parseStateRef(attrs.uiSref, $state.current.name);\n var def = { state: ref.state, href: null, params: null };\n var type = getTypeInfo(element);\n var active = uiSrefActive[1] || uiSrefActive[0];\n var unlinkInfoFn = null;\n var hookFn;\n\n def.options = extend(defaultOpts(element, $state), attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {});\n\n var update = function(val) {\n if (val) def.params = angular.copy(val);\n def.href = $state.href(ref.state, def.params, def.options);\n\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(ref.state, def.params);\n if (def.href !== null) attrs.$set(type.attr, def.href);\n };\n\n if (ref.paramExpr) {\n scope.$watch(ref.paramExpr, function(val) { if (val !== def.params) update(val); }, true);\n def.params = angular.copy(scope.$eval(ref.paramExpr));\n }\n update();\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, function() { return def; });\n element[element.on ? 'on' : 'bind'](\"click\", hookFn);\n scope.$on('$destroy', function() {\n element[element.off ? 'off' : 'unbind'](\"click\", hookFn);\n });\n }\n };\n}\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-state\n *\n * @requires ui.router.state.uiSref\n *\n * @restrict A\n *\n * @description\n * Much like ui-sref, but will accept named $scope properties to evaluate for a state definition,\n * params and override options.\n *\n * @param {string} ui-state 'stateName' can be any valid absolute or relative state\n * @param {Object} ui-state-params params to pass to {@link ui.router.state.$state#methods_href $state.href()}\n * @param {Object} ui-state-opts options to pass to {@link ui.router.state.$state#methods_go $state.go()}\n */\n$StateRefDynamicDirective.$inject = ['$state', '$timeout'];\nfunction $StateRefDynamicDirective($state, $timeout) {\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function(scope, element, attrs, uiSrefActive) {\n var type = getTypeInfo(element);\n var active = uiSrefActive[1] || uiSrefActive[0];\n var group = [attrs.uiState, attrs.uiStateParams || null, attrs.uiStateOpts || null];\n var watch = '[' + group.map(function(val) { return val || 'null'; }).join(', ') + ']';\n var def = { state: null, params: null, options: null, href: null };\n var unlinkInfoFn = null;\n var hookFn;\n\n function runStateRefLink (group) {\n def.state = group[0]; def.params = group[1]; def.options = group[2];\n def.href = $state.href(def.state, def.params, def.options);\n\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.state, def.params);\n if (def.href) attrs.$set(type.attr, def.href);\n }\n\n scope.$watch(watch, runStateRefLink, true);\n runStateRefLink(scope.$eval(watch));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, function() { return def; });\n element[element.on ? 'on' : 'bind'](\"click\", hookFn);\n scope.$on('$destroy', function() {\n element[element.off ? 'off' : 'unbind'](\"click\", hookFn);\n });\n }\n };\n}\n\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-sref-active\n *\n * @requires ui.router.state.$state\n * @requires ui.router.state.$stateParams\n * @requires $interpolate\n *\n * @restrict A\n *\n * @description\n * A directive working alongside ui-sref to add classes to an element when the\n * related ui-sref directive's state is active, and removing them when it is inactive.\n * The primary use-case is to simplify the special appearance of navigation menus\n * relying on `ui-sref`, by having the \"active\" state's menu button appear different,\n * distinguishing it from the inactive menu items.\n *\n * ui-sref-active can live on the same element as ui-sref or on a parent element. The first\n * ui-sref-active found at the same level or above the ui-sref will be used.\n *\n * Will activate when the ui-sref's target state or any child state is active. If you\n * need to activate only when the ui-sref target state is active and *not* any of\n * it's children, then you will use\n * {@link ui.router.state.directive:ui-sref-active-eq ui-sref-active-eq}\n *\n * @example\n * Given the following template:\n *
\n * \n * 
\n *\n *\n * When the app state is \"app.user\" (or any children states), and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *
\n * \n * 
\n *\n * The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * Multiple classes may be specified in a space-separated format:\n *
\n * 
    \n *
  • \n * link\n *
  • \n *
\n *
\n *\n * It is also possible to pass ui-sref-active an expression that evaluates\n * to an object hash, whose keys represent active class names and whose\n * values represent the respective state names/globs.\n * ui-sref-active will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * @Example\n * Given the following template, with \"admin\" being an abstract state:\n *
\n * 
\n * Roles\n *
\n *
\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied\n * to both the
and elements. It is important to note that the state\n * names/globs passed to ui-sref-active shadow the state provided by ui-sref.\n */\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-sref-active-eq\n *\n * @requires ui.router.state.$state\n * @requires ui.router.state.$stateParams\n * @requires $interpolate\n *\n * @restrict A\n *\n * @description\n * The same as {@link ui.router.state.directive:ui-sref-active ui-sref-active} but will only activate\n * when the exact target state used in the `ui-sref` is active; no child states.\n *\n */\n$StateRefActiveDirective.$inject = ['$state', '$stateParams', '$interpolate'];\nfunction $StateRefActiveDirective($state, $stateParams, $interpolate) {\n return {\n restrict: \"A\",\n controller: ['$scope', '$element', '$attrs', '$timeout', function ($scope, $element, $attrs, $timeout) {\n var states = [], activeClasses = {}, activeEqClass, uiSrefActive;\n\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n } catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n if (isObject(uiSrefActive)) {\n forEach(uiSrefActive, function(stateOrName, activeClass) {\n if (isString(stateOrName)) {\n var ref = parseStateRef(stateOrName, $state.current.name);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n }\n });\n }\n\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState, newParams) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n var deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n\n $scope.$on('$stateChangeSuccess', update);\n\n function addState(stateName, stateParams, activeClass) {\n var state = $state.get(stateName, stateContext($element));\n var stateHash = createStateHash(stateName, stateParams);\n\n var stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n hash: stateHash\n };\n\n states.push(stateInfo);\n activeClasses[stateHash] = activeClass;\n\n return function removeState() {\n var idx = states.indexOf(stateInfo);\n if (idx !== -1) states.splice(idx, 1);\n };\n }\n\n /**\n * @param {string} state\n * @param {Object|string} [params]\n * @return {string}\n */\n function createStateHash(state, params) {\n if (!isString(state)) {\n throw new Error('state should be a string');\n }\n if (isObject(params)) {\n return state + toJson(params);\n }\n params = $scope.$eval(params);\n if (isObject(params)) {\n return state + toJson(params);\n }\n return state;\n }\n\n // Update route state\n function update() {\n for (var i = 0; i < states.length; i++) {\n if (anyMatch(states[i].state, states[i].params)) {\n addClass($element, activeClasses[states[i].hash]);\n } else {\n removeClass($element, activeClasses[states[i].hash]);\n }\n\n if (exactMatch(states[i].state, states[i].params)) {\n addClass($element, activeEqClass);\n } else {\n removeClass($element, activeEqClass);\n }\n }\n }\n\n function addClass(el, className) { $timeout(function () { el.addClass(className); }); }\n function removeClass(el, className) { el.removeClass(className); }\n function anyMatch(state, params) { return $state.includes(state.name, params); }\n function exactMatch(state, params) { return $state.is(state.name, params); }\n\n update();\n }]\n };\n}\n\nangular.module('ui.router.state')\n .directive('uiSref', $StateRefDirective)\n .directive('uiSrefActive', $StateRefActiveDirective)\n .directive('uiSrefActiveEq', $StateRefActiveDirective)\n .directive('uiState', $StateRefDynamicDirective);\n\n/**\n * @ngdoc filter\n * @name ui.router.state.filter:isState\n *\n * @requires ui.router.state.$state\n *\n * @description\n * Translates to {@link ui.router.state.$state#methods_is $state.is(\"stateName\")}.\n */\n$IsStateFilter.$inject = ['$state'];\nfunction $IsStateFilter($state) {\n var isFilter = function (state, params) {\n return $state.is(state, params);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * @ngdoc filter\n * @name ui.router.state.filter:includedByState\n *\n * @requires ui.router.state.$state\n *\n * @description\n * Translates to {@link ui.router.state.$state#methods_includes $state.includes('fullOrPartialStateName')}.\n */\n$IncludedByStateFilter.$inject = ['$state'];\nfunction $IncludedByStateFilter($state) {\n var includesFilter = function (state, params, options) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular.module('ui.router.state')\n .filter('isState', $IsStateFilter)\n .filter('includedByState', $IncludedByStateFilter);\n})(window, window.angular);\n//! moment.js\n//! version : 2.10.6\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, function () { 'use strict';\n\n var hookCallback;\n\n function utils_hooks__hooks () {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback (callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function create_utc__createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n function valid__isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n m._isValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated;\n\n if (m._strict) {\n m._isValid = m._isValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n }\n return m._isValid;\n }\n\n function valid__createInvalid (flags) {\n var m = create_utc__createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n }\n else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n var momentProperties = utils_hooks__hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (typeof from._isAMomentObject !== 'undefined') {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (typeof from._i !== 'undefined') {\n to._i = from._i;\n }\n if (typeof from._f !== 'undefined') {\n to._f = from._f;\n }\n if (typeof from._l !== 'undefined') {\n to._l = from._l;\n }\n if (typeof from._strict !== 'undefined') {\n to._strict = from._strict;\n }\n if (typeof from._tzm !== 'undefined') {\n to._tzm = from._tzm;\n }\n if (typeof from._isUTC !== 'undefined') {\n to._isUTC = from._isUTC;\n }\n if (typeof from._offset !== 'undefined') {\n to._offset = from._offset;\n }\n if (typeof from._pf !== 'undefined') {\n to._pf = getParsingFlags(from);\n }\n if (typeof from._locale !== 'undefined') {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i in momentProperties) {\n prop = momentProperties[i];\n val = from[prop];\n if (typeof val !== 'undefined') {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false;\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n utils_hooks__hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment (obj) {\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n }\n\n function absFloor (number) {\n if (number < 0) {\n return Math.ceil(number);\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n function Locale() {\n }\n\n var locales = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n }\n\n function loadLocale(name) {\n var oldLocale = null;\n // TODO: Find a better way to register and load all the locales in Node\n if (!locales[name] && typeof module !== 'undefined' &&\n module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n require('./locale/' + name);\n // because defineLocale currently also sets the global locale, we\n // want to undo that for lazy loaded locales\n locale_locales__getSetGlobalLocale(oldLocale);\n } catch (e) { }\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function locale_locales__getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (typeof values === 'undefined') {\n data = locale_locales__getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale (name, values) {\n if (values !== null) {\n values.abbr = name;\n locales[name] = locales[name] || new Locale();\n locales[name].set(values);\n\n // backwards compat for now: also set the locale\n locale_locales__getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n // returns locale data\n function locale_locales__getLocale (key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n var aliases = {};\n\n function addUnitAlias (unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n function makeGetSet (unit, keepTime) {\n return function (value) {\n if (value != null) {\n get_set__set(this, unit, value);\n utils_hooks__hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get_set__get(this, unit);\n }\n };\n }\n\n function get_set__get (mom, unit) {\n return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]();\n }\n\n function get_set__set (mom, unit, value) {\n return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n\n // MOMENTS\n\n function getSet (units, value) {\n var unit;\n if (typeof units === 'object') {\n for (unit in units) {\n this.set(unit, units[unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (typeof this[units] === 'function') {\n return this[units](value);\n }\n }\n return this;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\n var formatFunctions = {};\n\n var formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken (token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens), i, length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '';\n for (i = 0; i < length; i++) {\n output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n var match2 = /\\d\\d/; // 00 - 99\n var match3 = /\\d{3}/; // 000 - 999\n var match4 = /\\d{4}/; // 0000 - 9999\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n var match1to2 = /\\d\\d?/; // 0 - 99\n var match1to3 = /\\d{1,3}/; // 0 - 999\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n // any word (or two) characters or numbers including two/three word month in arabic.\n var matchWord = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\n\n var regexes = {};\n\n function isFunction (sth) {\n // https://github.com/moment/moment/issues/2325\n return typeof sth === 'function' &&\n Object.prototype.toString.call(sth) === '[object Function]';\n }\n\n\n function addRegexToken (token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict) {\n return (isStrict && strictRegex) ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken (token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }).replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken (token, callback) {\n var i, func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (typeof callback === 'number') {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken (token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n\n function daysInMonth(year, month) {\n return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', matchWord);\n addRegexToken('MMMM', matchWord);\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n function localeMonths (m) {\n return this._months[m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n function localeMonthsShort (m) {\n return this._monthsShort[m.month()];\n }\n\n function localeMonthsParse (monthName, format, strict) {\n var i, mom, regex;\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = create_utc__createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth (mom, value) {\n var dayOfMonth;\n\n // TODO: Move this out of here!\n if (typeof value === 'string') {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (typeof value !== 'number') {\n return mom;\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth (value) {\n if (value != null) {\n setMonth(this, value);\n utils_hooks__hooks.updateOffset(this, true);\n return this;\n } else {\n return get_set__get(this, 'Month');\n }\n }\n\n function getDaysInMonth () {\n return daysInMonth(this.year(), this.month());\n }\n\n function checkOverflow (m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n function warn(msg) {\n if (utils_hooks__hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (firstTime) {\n warn(msg + '\\n' + (new Error()).stack);\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n utils_hooks__hooks.suppressDeprecationWarnings = false;\n\n var from_string__isoRegex = /^\\s*(?:[+-]\\d{6}|\\d{4})-(?:(\\d\\d-\\d\\d)|(W\\d\\d$)|(W\\d\\d-\\d)|(\\d\\d\\d))((T| )(\\d\\d(:\\d\\d(:\\d\\d(\\.\\d+)?)?)?)?([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\n var isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d{2}-\\d{2}/],\n ['YYYY-MM-DD', /\\d{4}-\\d{2}-\\d{2}/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d{2}-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d{2}/],\n ['YYYY-DDD', /\\d{4}-\\d{3}/]\n ];\n\n // iso time formats and regexes\n var isoTimes = [\n ['HH:mm:ss.SSSS', /(T| )\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss', /(T| )\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /(T| )\\d\\d:\\d\\d/],\n ['HH', /(T| )\\d\\d/]\n ];\n\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n // date from iso format\n function configFromISO(config) {\n var i, l,\n string = config._i,\n match = from_string__isoRegex.exec(string);\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n config._f = isoDates[i][0];\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n // match[6] should be 'T' or space\n config._f += (match[6] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (string.match(matchOffset)) {\n config._f += 'Z';\n }\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n // date from iso format or fallback\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n utils_hooks__hooks.createFromInputFallback(config);\n }\n }\n\n utils_hooks__hooks.createFromInputFallback = deprecate(\n 'moment construction falls back to js Date. This is ' +\n 'discouraged and will be removed in upcoming major ' +\n 'release. Please refer to ' +\n 'https://github.com/moment/moment/issues/1407 for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n function createDate (y, m, d, h, M, s, ms) {\n //can't just apply() to create a date:\n //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply\n var date = new Date(y, m, d, h, M, s, ms);\n\n //the date constructor doesn't accept years < 1970\n if (y < 1970) {\n date.setFullYear(y);\n }\n return date;\n }\n\n function createUTCDate (y) {\n var date = new Date(Date.UTC.apply(null, arguments));\n if (y < 1970) {\n date.setUTCFullYear(y);\n }\n return date;\n }\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n // HOOKS\n\n utils_hooks__hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', false);\n\n function getIsLeapYear () {\n return isLeapYear(this.year());\n }\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n });\n\n // HELPERS\n\n // firstDayOfWeek 0 = sun, 6 = sat\n // the day of the week that starts the week\n // (usually sunday or monday)\n // firstDayOfWeekOfYear 0 = sun, 6 = sat\n // the first week is the week that contains the first\n // of this day of the week\n // (eg. ISO weeks use thursday (4))\n function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) {\n var end = firstDayOfWeekOfYear - firstDayOfWeek,\n daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(),\n adjustedMoment;\n\n\n if (daysToDayOfWeek > end) {\n daysToDayOfWeek -= 7;\n }\n\n if (daysToDayOfWeek < end - 7) {\n daysToDayOfWeek += 7;\n }\n\n adjustedMoment = local__createLocal(mom).add(daysToDayOfWeek, 'd');\n return {\n week: Math.ceil(adjustedMoment.dayOfYear() / 7),\n year: adjustedMoment.year()\n };\n }\n\n // LOCALES\n\n function localeWeek (mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n };\n\n function localeFirstDayOfWeek () {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear () {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek (input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek (input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {\n var week1Jan = 6 + firstDayOfWeek - firstDayOfWeekOfYear, janX = createUTCDate(year, 0, 1 + week1Jan), d = janX.getUTCDay(), dayOfYear;\n if (d < firstDayOfWeek) {\n d += 7;\n }\n\n weekday = weekday != null ? 1 * weekday : firstDayOfWeek;\n\n dayOfYear = 1 + week1Jan + 7 * (week - 1) - d + weekday;\n\n return {\n year: dayOfYear > 0 ? year : year - 1,\n dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear\n };\n }\n\n // MOMENTS\n\n function getSetDayOfYear (input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n }\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n var now = new Date();\n if (config._useUTC) {\n return [now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()];\n }\n return [now.getFullYear(), now.getMonth(), now.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year);\n week = defaults(w.w, 1);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < dow) {\n ++week;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from begining of week\n weekday = w.e + dow;\n } else {\n // default to begining of week\n weekday = dow;\n }\n }\n temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow);\n\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n\n utils_hooks__hooks.ISO_8601 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === utils_hooks__hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n }\n else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (getParsingFlags(config).bigHour === true &&\n config._a[HOUR] <= 12 &&\n config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n\n function meridiemFixWrap (locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!valid__isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = [i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond];\n\n configFromArray(config);\n }\n\n function createFromConfig (config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig (config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || locale_locales__getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return valid__createInvalid({nullInput: true});\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else if (isDate(input)) {\n config._d = input;\n } else {\n configFromInput(config);\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (input === undefined) {\n config._d = new Date();\n } else if (isDate(input)) {\n config._d = new Date(+input);\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (typeof(input) === 'object') {\n configFromObject(config);\n } else if (typeof(input) === 'number') {\n // from milliseconds\n config._d = new Date(input);\n } else {\n utils_hooks__hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC (input, format, locale, strict, isUTC) {\n var c = {};\n\n if (typeof(locale) === 'boolean') {\n strict = locale;\n locale = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function local__createLocal (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',\n function () {\n var other = local__createLocal.apply(null, arguments);\n return other < this ? this : other;\n }\n );\n\n var prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',\n function () {\n var other = local__createLocal.apply(null, arguments);\n return other > this ? this : other;\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return local__createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n function Duration (duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n // representation for dateAddRemove\n this._milliseconds = +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 36e5; // 1000 * 60 * 60\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days +\n weeks * 7;\n // It is impossible translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months +\n quarters * 3 +\n years * 12;\n\n this._data = {};\n\n this._locale = locale_locales__getLocale();\n\n this._bubble();\n }\n\n function isDuration (obj) {\n return obj instanceof Duration;\n }\n\n function offset (token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchOffset);\n addRegexToken('ZZ', matchOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(string) {\n var matches = ((string || '').match(matchOffset) || []);\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n }\n\n function getDateOffset (m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n utils_hooks__hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone (input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC (keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal (keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset () {\n if (this._tzm) {\n this.utcOffset(this._tzm);\n } else if (typeof this._i === 'string') {\n this.utcOffset(offsetFromString(this._i));\n }\n return this;\n }\n\n function hasAlignedHourOffset (input) {\n input = input ? local__createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime () {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted () {\n if (typeof this._isDSTShifted !== 'undefined') {\n return this._isDSTShifted;\n }\n\n var c = {};\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a);\n this._isDSTShifted = this.isValid() &&\n compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal () {\n return !this._isUTC;\n }\n\n function isUtcOffset () {\n return this._isUTC;\n }\n\n function isUtc () {\n return this._isUTC && this._offset === 0;\n }\n\n var aspNetRegex = /(\\-)?(?:(\\d*)\\.)?(\\d+)\\:(\\d+)(?:\\:(\\d+)\\.?(\\d{3})?)?/;\n\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n var create__isoRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;\n\n function create__createDuration (input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms : input._milliseconds,\n d : input._days,\n M : input._months\n };\n } else if (typeof input === 'number') {\n duration = {};\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : 0,\n d : toInt(match[DATE]) * sign,\n h : toInt(match[HOUR]) * sign,\n m : toInt(match[MINUTE]) * sign,\n s : toInt(match[SECOND]) * sign,\n ms : toInt(match[MILLISECOND]) * sign\n };\n } else if (!!(match = create__isoRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : parseIso(match[2], sign),\n M : parseIso(match[3], sign),\n d : parseIso(match[4], sign),\n h : parseIso(match[5], sign),\n m : parseIso(match[6], sign),\n s : parseIso(match[7], sign),\n w : parseIso(match[8], sign)\n };\n } else if (duration == null) {// checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to));\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n create__createDuration.fn = Duration.prototype;\n\n function parseIso (inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {milliseconds: 0, months: 0};\n\n res.months = other.month() - base.month() +\n (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = create__createDuration(val, period);\n add_subtract__addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = duration._days,\n months = duration._months;\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (milliseconds) {\n mom._d.setTime(+mom._d + milliseconds * isAdding);\n }\n if (days) {\n get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding);\n }\n if (months) {\n setMonth(mom, get_set__get(mom, 'Month') + months * isAdding);\n }\n if (updateOffset) {\n utils_hooks__hooks.updateOffset(mom, days || months);\n }\n }\n\n var add_subtract__add = createAdder(1, 'add');\n var add_subtract__subtract = createAdder(-1, 'subtract');\n\n function moment_calendar__calendar (time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || local__createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n diff = this.diff(sod, 'days', true),\n format = diff < -6 ? 'sameElse' :\n diff < -1 ? 'lastWeek' :\n diff < 0 ? 'lastDay' :\n diff < 1 ? 'sameDay' :\n diff < 2 ? 'nextDay' :\n diff < 7 ? 'nextWeek' : 'sameElse';\n return this.format(formats && formats[format] || this.localeData().calendar(format, this, local__createLocal(now)));\n }\n\n function clone () {\n return new Moment(this);\n }\n\n function isAfter (input, units) {\n var inputMs;\n units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');\n if (units === 'millisecond') {\n input = isMoment(input) ? input : local__createLocal(input);\n return +this > +input;\n } else {\n inputMs = isMoment(input) ? +input : +local__createLocal(input);\n return inputMs < +this.clone().startOf(units);\n }\n }\n\n function isBefore (input, units) {\n var inputMs;\n units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');\n if (units === 'millisecond') {\n input = isMoment(input) ? input : local__createLocal(input);\n return +this < +input;\n } else {\n inputMs = isMoment(input) ? +input : +local__createLocal(input);\n return +this.clone().endOf(units) < inputMs;\n }\n }\n\n function isBetween (from, to, units) {\n return this.isAfter(from, units) && this.isBefore(to, units);\n }\n\n function isSame (input, units) {\n var inputMs;\n units = normalizeUnits(units || 'millisecond');\n if (units === 'millisecond') {\n input = isMoment(input) ? input : local__createLocal(input);\n return +this === +input;\n } else {\n inputMs = +local__createLocal(input);\n return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units));\n }\n }\n\n function diff (input, units, asFloat) {\n var that = cloneWithOffset(input, this),\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4,\n delta, output;\n\n units = normalizeUnits(units);\n\n if (units === 'year' || units === 'month' || units === 'quarter') {\n output = monthDiff(this, that);\n if (units === 'quarter') {\n output = output / 3;\n } else if (units === 'year') {\n output = output / 12;\n }\n } else {\n delta = this - that;\n output = units === 'second' ? delta / 1e3 : // 1000\n units === 'minute' ? delta / 6e4 : // 1000 * 60\n units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60\n units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\n units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\n delta;\n }\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff (a, b) {\n // difference in months\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2, adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n return -(wholeMonthDiff + adjust);\n }\n\n utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n\n function toString () {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function moment_format__toISOString () {\n var m = this.clone().utc();\n if (0 < m.year() && m.year() <= 9999) {\n if ('function' === typeof Date.prototype.toISOString) {\n // native implementation is ~50x faster, use it when we can\n return this.toDate().toISOString();\n } else {\n return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n } else {\n return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n }\n\n function format (inputString) {\n var output = formatMoment(this, inputString || utils_hooks__hooks.defaultFormat);\n return this.localeData().postformat(output);\n }\n\n function from (time, withoutSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n }\n\n function fromNow (withoutSuffix) {\n return this.from(local__createLocal(), withoutSuffix);\n }\n\n function to (time, withoutSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n }\n\n function toNow (withoutSuffix) {\n return this.to(local__createLocal(), withoutSuffix);\n }\n\n function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = locale_locales__getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData () {\n return this._locale;\n }\n\n function startOf (units) {\n units = normalizeUnits(units);\n // the following switch intentionally omits break keywords\n // to utilize falling through the cases.\n switch (units) {\n case 'year':\n this.month(0);\n /* falls through */\n case 'quarter':\n case 'month':\n this.date(1);\n /* falls through */\n case 'week':\n case 'isoWeek':\n case 'day':\n this.hours(0);\n /* falls through */\n case 'hour':\n this.minutes(0);\n /* falls through */\n case 'minute':\n this.seconds(0);\n /* falls through */\n case 'second':\n this.milliseconds(0);\n }\n\n // weeks are a special case\n if (units === 'week') {\n this.weekday(0);\n }\n if (units === 'isoWeek') {\n this.isoWeekday(1);\n }\n\n // quarters are also special\n if (units === 'quarter') {\n this.month(Math.floor(this.month() / 3) * 3);\n }\n\n return this;\n }\n\n function endOf (units) {\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond') {\n return this;\n }\n return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\n }\n\n function to_type__valueOf () {\n return +this._d - ((this._offset || 0) * 60000);\n }\n\n function unix () {\n return Math.floor(+this / 1000);\n }\n\n function toDate () {\n return this._offset ? new Date(+this) : this._d;\n }\n\n function toArray () {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject () {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function moment_valid__isValid () {\n return valid__isValid(this);\n }\n\n function parsingFlags () {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt () {\n return getParsingFlags(this).overflow;\n }\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken (token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = utils_hooks__hooks.parseTwoDigitYear(input);\n });\n\n // HELPERS\n\n function weeksInYear(year, dow, doy) {\n return weekOfYear(local__createLocal([year, 11, 31 + dow - doy]), dow, doy).week;\n }\n\n // MOMENTS\n\n function getSetWeekYear (input) {\n var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year;\n return input == null ? year : this.add((input - year), 'y');\n }\n\n function getSetISOWeekYear (input) {\n var year = weekOfYear(this, 1, 4).year;\n return input == null ? year : this.add((input - year), 'y');\n }\n\n function getISOWeeksInYear () {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear () {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n addFormatToken('Q', 0, 0, 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter (input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n }\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0], 10);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', matchWord);\n addRegexToken('ddd', matchWord);\n addRegexToken('dddd', matchWord);\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config) {\n var weekday = config._locale.weekdaysParse(input);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n // LOCALES\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n function localeWeekdays (m) {\n return this._weekdays[m.day()];\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n function localeWeekdaysShort (m) {\n return this._weekdaysShort[m.day()];\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n function localeWeekdaysMin (m) {\n return this._weekdaysMin[m.day()];\n }\n\n function localeWeekdaysParse (weekdayName) {\n var i, mom, regex;\n\n this._weekdaysParse = this._weekdaysParse || [];\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n if (!this._weekdaysParse[i]) {\n mom = local__createLocal([2000, 1]).day(i);\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek (input) {\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek (input) {\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek (input) {\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, function () {\n return this.hours() % 12 || 12;\n });\n\n function meridiem (token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PARSING\n\n function matchMeridiem (isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n\n // LOCALES\n\n function localeIsPM (input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return ((input + '').toLowerCase().charAt(0) === 'p');\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n function localeMeridiem (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n\n // MOMENTS\n\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour he wants. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n var getSetHour = makeGetSet('Hours', true);\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n // MOMENTS\n\n var getSetMillisecond = makeGetSet('Milliseconds', false);\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr () {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName () {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var momentPrototype__proto = Moment.prototype;\n\n momentPrototype__proto.add = add_subtract__add;\n momentPrototype__proto.calendar = moment_calendar__calendar;\n momentPrototype__proto.clone = clone;\n momentPrototype__proto.diff = diff;\n momentPrototype__proto.endOf = endOf;\n momentPrototype__proto.format = format;\n momentPrototype__proto.from = from;\n momentPrototype__proto.fromNow = fromNow;\n momentPrototype__proto.to = to;\n momentPrototype__proto.toNow = toNow;\n momentPrototype__proto.get = getSet;\n momentPrototype__proto.invalidAt = invalidAt;\n momentPrototype__proto.isAfter = isAfter;\n momentPrototype__proto.isBefore = isBefore;\n momentPrototype__proto.isBetween = isBetween;\n momentPrototype__proto.isSame = isSame;\n momentPrototype__proto.isValid = moment_valid__isValid;\n momentPrototype__proto.lang = lang;\n momentPrototype__proto.locale = locale;\n momentPrototype__proto.localeData = localeData;\n momentPrototype__proto.max = prototypeMax;\n momentPrototype__proto.min = prototypeMin;\n momentPrototype__proto.parsingFlags = parsingFlags;\n momentPrototype__proto.set = getSet;\n momentPrototype__proto.startOf = startOf;\n momentPrototype__proto.subtract = add_subtract__subtract;\n momentPrototype__proto.toArray = toArray;\n momentPrototype__proto.toObject = toObject;\n momentPrototype__proto.toDate = toDate;\n momentPrototype__proto.toISOString = moment_format__toISOString;\n momentPrototype__proto.toJSON = moment_format__toISOString;\n momentPrototype__proto.toString = toString;\n momentPrototype__proto.unix = unix;\n momentPrototype__proto.valueOf = to_type__valueOf;\n\n // Year\n momentPrototype__proto.year = getSetYear;\n momentPrototype__proto.isLeapYear = getIsLeapYear;\n\n // Week Year\n momentPrototype__proto.weekYear = getSetWeekYear;\n momentPrototype__proto.isoWeekYear = getSetISOWeekYear;\n\n // Quarter\n momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter;\n\n // Month\n momentPrototype__proto.month = getSetMonth;\n momentPrototype__proto.daysInMonth = getDaysInMonth;\n\n // Week\n momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek;\n momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek;\n momentPrototype__proto.weeksInYear = getWeeksInYear;\n momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear;\n\n // Day\n momentPrototype__proto.date = getSetDayOfMonth;\n momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek;\n momentPrototype__proto.weekday = getSetLocaleDayOfWeek;\n momentPrototype__proto.isoWeekday = getSetISODayOfWeek;\n momentPrototype__proto.dayOfYear = getSetDayOfYear;\n\n // Hour\n momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour;\n\n // Minute\n momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute;\n\n // Second\n momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond;\n\n // Millisecond\n momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond;\n\n // Offset\n momentPrototype__proto.utcOffset = getSetOffset;\n momentPrototype__proto.utc = setOffsetToUTC;\n momentPrototype__proto.local = setOffsetToLocal;\n momentPrototype__proto.parseZone = setOffsetToParsedOffset;\n momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset;\n momentPrototype__proto.isDST = isDaylightSavingTime;\n momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted;\n momentPrototype__proto.isLocal = isLocal;\n momentPrototype__proto.isUtcOffset = isUtcOffset;\n momentPrototype__proto.isUtc = isUtc;\n momentPrototype__proto.isUTC = isUtc;\n\n // Timezone\n momentPrototype__proto.zoneAbbr = getZoneAbbr;\n momentPrototype__proto.zoneName = getZoneName;\n\n // Deprecations\n momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone);\n\n var momentPrototype = momentPrototype__proto;\n\n function moment__createUnix (input) {\n return local__createLocal(input * 1000);\n }\n\n function moment__createInZone () {\n return local__createLocal.apply(null, arguments).parseZone();\n }\n\n var defaultCalendar = {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n };\n\n function locale_calendar__calendar (key, mom, now) {\n var output = this._calendar[key];\n return typeof output === 'function' ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS : 'h:mm:ss A',\n LT : 'h:mm A',\n L : 'MM/DD/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY h:mm A',\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat (key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate () {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultOrdinalParse = /\\d{1,2}/;\n\n function ordinal (number) {\n return this._ordinal.replace('%d', number);\n }\n\n function preParsePostFormat (string) {\n return string;\n }\n\n var defaultRelativeTime = {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n };\n\n function relative__relativeTime (number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return (typeof output === 'function') ?\n output(number, withoutSuffix, string, isFuture) :\n output.replace(/%d/i, number);\n }\n\n function pastFuture (diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return typeof format === 'function' ? format(output) : format.replace(/%s/i, output);\n }\n\n function locale_set__set (config) {\n var prop, i;\n for (i in config) {\n prop = config[i];\n if (typeof prop === 'function') {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _ordinalParseLenient.\n this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\\d{1,2}/).source);\n }\n\n var prototype__proto = Locale.prototype;\n\n prototype__proto._calendar = defaultCalendar;\n prototype__proto.calendar = locale_calendar__calendar;\n prototype__proto._longDateFormat = defaultLongDateFormat;\n prototype__proto.longDateFormat = longDateFormat;\n prototype__proto._invalidDate = defaultInvalidDate;\n prototype__proto.invalidDate = invalidDate;\n prototype__proto._ordinal = defaultOrdinal;\n prototype__proto.ordinal = ordinal;\n prototype__proto._ordinalParse = defaultOrdinalParse;\n prototype__proto.preparse = preParsePostFormat;\n prototype__proto.postformat = preParsePostFormat;\n prototype__proto._relativeTime = defaultRelativeTime;\n prototype__proto.relativeTime = relative__relativeTime;\n prototype__proto.pastFuture = pastFuture;\n prototype__proto.set = locale_set__set;\n\n // Month\n prototype__proto.months = localeMonths;\n prototype__proto._months = defaultLocaleMonths;\n prototype__proto.monthsShort = localeMonthsShort;\n prototype__proto._monthsShort = defaultLocaleMonthsShort;\n prototype__proto.monthsParse = localeMonthsParse;\n\n // Week\n prototype__proto.week = localeWeek;\n prototype__proto._week = defaultLocaleWeek;\n prototype__proto.firstDayOfYear = localeFirstDayOfYear;\n prototype__proto.firstDayOfWeek = localeFirstDayOfWeek;\n\n // Day of Week\n prototype__proto.weekdays = localeWeekdays;\n prototype__proto._weekdays = defaultLocaleWeekdays;\n prototype__proto.weekdaysMin = localeWeekdaysMin;\n prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin;\n prototype__proto.weekdaysShort = localeWeekdaysShort;\n prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort;\n prototype__proto.weekdaysParse = localeWeekdaysParse;\n\n // Hours\n prototype__proto.isPM = localeIsPM;\n prototype__proto._meridiemParse = defaultLocaleMeridiemParse;\n prototype__proto.meridiem = localeMeridiem;\n\n function lists__get (format, index, field, setter) {\n var locale = locale_locales__getLocale();\n var utc = create_utc__createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function list (format, index, field, count, setter) {\n if (typeof format === 'number') {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return lists__get(format, index, field, setter);\n }\n\n var i;\n var out = [];\n for (i = 0; i < count; i++) {\n out[i] = lists__get(format, i, field, setter);\n }\n return out;\n }\n\n function lists__listMonths (format, index) {\n return list(format, index, 'months', 12, 'month');\n }\n\n function lists__listMonthsShort (format, index) {\n return list(format, index, 'monthsShort', 12, 'month');\n }\n\n function lists__listWeekdays (format, index) {\n return list(format, index, 'weekdays', 7, 'day');\n }\n\n function lists__listWeekdaysShort (format, index) {\n return list(format, index, 'weekdaysShort', 7, 'day');\n }\n\n function lists__listWeekdaysMin (format, index) {\n return list(format, index, 'weekdaysMin', 7, 'day');\n }\n\n locale_locales__getSetGlobalLocale('en', {\n ordinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n });\n\n // Side effect imports\n utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale);\n utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale);\n\n var mathAbs = Math.abs;\n\n function duration_abs__abs () {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function duration_add_subtract__addSubtract (duration, input, value, direction) {\n var other = create__createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }\n\n function absCeil (number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble () {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0))) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths (days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays (months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as (units) {\n var days;\n var months;\n var milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n return units === 'month' ? months : months / 12;\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week' : return days / 7 + milliseconds / 6048e5;\n case 'day' : return days + milliseconds / 864e5;\n case 'hour' : return days * 24 + milliseconds / 36e5;\n case 'minute' : return days * 1440 + milliseconds / 6e4;\n case 'second' : return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n default: throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function duration_as__valueOf () {\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs (alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asYears = makeAs('y');\n\n function duration_get__get (units) {\n units = normalizeUnits(units);\n return this[units + 's']();\n }\n\n function makeGetter(name) {\n return function () {\n return this._data[name];\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks () {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month\n M: 11 // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) {\n var duration = create__createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n\n var a = seconds < thresholds.s && ['s', seconds] ||\n minutes === 1 && ['m'] ||\n minutes < thresholds.m && ['mm', minutes] ||\n hours === 1 && ['h'] ||\n hours < thresholds.h && ['hh', hours] ||\n days === 1 && ['d'] ||\n days < thresholds.d && ['dd', days] ||\n months === 1 && ['M'] ||\n months < thresholds.M && ['MM', months] ||\n years === 1 && ['y'] || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set a threshold for relative time strings\n function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n return true;\n }\n\n function humanize (withSuffix) {\n var locale = this.localeData();\n var output = duration_humanize__relativeTime(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var iso_string__abs = Math.abs;\n\n function iso_string__toISOString() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n var seconds = iso_string__abs(this._milliseconds) / 1000;\n var days = iso_string__abs(this._days);\n var months = iso_string__abs(this._months);\n var minutes, hours, years;\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds;\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n return (total < 0 ? '-' : '') +\n 'P' +\n (Y ? Y + 'Y' : '') +\n (M ? M + 'M' : '') +\n (D ? D + 'D' : '') +\n ((h || m || s) ? 'T' : '') +\n (h ? h + 'H' : '') +\n (m ? m + 'M' : '') +\n (s ? s + 'S' : '');\n }\n\n var duration_prototype__proto = Duration.prototype;\n\n duration_prototype__proto.abs = duration_abs__abs;\n duration_prototype__proto.add = duration_add_subtract__add;\n duration_prototype__proto.subtract = duration_add_subtract__subtract;\n duration_prototype__proto.as = as;\n duration_prototype__proto.asMilliseconds = asMilliseconds;\n duration_prototype__proto.asSeconds = asSeconds;\n duration_prototype__proto.asMinutes = asMinutes;\n duration_prototype__proto.asHours = asHours;\n duration_prototype__proto.asDays = asDays;\n duration_prototype__proto.asWeeks = asWeeks;\n duration_prototype__proto.asMonths = asMonths;\n duration_prototype__proto.asYears = asYears;\n duration_prototype__proto.valueOf = duration_as__valueOf;\n duration_prototype__proto._bubble = bubble;\n duration_prototype__proto.get = duration_get__get;\n duration_prototype__proto.milliseconds = milliseconds;\n duration_prototype__proto.seconds = seconds;\n duration_prototype__proto.minutes = minutes;\n duration_prototype__proto.hours = hours;\n duration_prototype__proto.days = days;\n duration_prototype__proto.weeks = weeks;\n duration_prototype__proto.months = months;\n duration_prototype__proto.years = years;\n duration_prototype__proto.humanize = humanize;\n duration_prototype__proto.toISOString = iso_string__toISOString;\n duration_prototype__proto.toString = iso_string__toISOString;\n duration_prototype__proto.toJSON = iso_string__toISOString;\n duration_prototype__proto.locale = locale;\n duration_prototype__proto.localeData = localeData;\n\n // Deprecations\n duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString);\n duration_prototype__proto.lang = lang;\n\n // Side effect imports\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n // Side effect imports\n\n\n utils_hooks__hooks.version = '2.10.6';\n\n setHookCallback(local__createLocal);\n\n utils_hooks__hooks.fn = momentPrototype;\n utils_hooks__hooks.min = min;\n utils_hooks__hooks.max = max;\n utils_hooks__hooks.utc = create_utc__createUTC;\n utils_hooks__hooks.unix = moment__createUnix;\n utils_hooks__hooks.months = lists__listMonths;\n utils_hooks__hooks.isDate = isDate;\n utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale;\n utils_hooks__hooks.invalid = valid__createInvalid;\n utils_hooks__hooks.duration = create__createDuration;\n utils_hooks__hooks.isMoment = isMoment;\n utils_hooks__hooks.weekdays = lists__listWeekdays;\n utils_hooks__hooks.parseZone = moment__createInZone;\n utils_hooks__hooks.localeData = locale_locales__getLocale;\n utils_hooks__hooks.isDuration = isDuration;\n utils_hooks__hooks.monthsShort = lists__listMonthsShort;\n utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin;\n utils_hooks__hooks.defineLocale = defineLocale;\n utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort;\n utils_hooks__hooks.normalizeUnits = normalizeUnits;\n utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold;\n\n var _moment = utils_hooks__hooks;\n\n return _moment;\n\n}));\n/*\n * angular-ui-bootstrap\n * http://angular-ui.github.io/bootstrap/\n\n * Version: 2.5.0 - 2017-01-28\n * License: MIT\n */angular.module(\"ui.bootstrap\", [\"ui.bootstrap.tpls\", \"ui.bootstrap.collapse\",\"ui.bootstrap.tabindex\",\"ui.bootstrap.accordion\",\"ui.bootstrap.alert\",\"ui.bootstrap.buttons\",\"ui.bootstrap.carousel\",\"ui.bootstrap.dateparser\",\"ui.bootstrap.isClass\",\"ui.bootstrap.datepicker\",\"ui.bootstrap.position\",\"ui.bootstrap.datepickerPopup\",\"ui.bootstrap.debounce\",\"ui.bootstrap.multiMap\",\"ui.bootstrap.dropdown\",\"ui.bootstrap.stackedMap\",\"ui.bootstrap.modal\",\"ui.bootstrap.paging\",\"ui.bootstrap.pager\",\"ui.bootstrap.pagination\",\"ui.bootstrap.tooltip\",\"ui.bootstrap.popover\",\"ui.bootstrap.progressbar\",\"ui.bootstrap.rating\",\"ui.bootstrap.tabs\",\"ui.bootstrap.timepicker\",\"ui.bootstrap.typeahead\"]);\nangular.module(\"ui.bootstrap.tpls\", [\"uib/template/accordion/accordion-group.html\",\"uib/template/accordion/accordion.html\",\"uib/template/alert/alert.html\",\"uib/template/carousel/carousel.html\",\"uib/template/carousel/slide.html\",\"uib/template/datepicker/datepicker.html\",\"uib/template/datepicker/day.html\",\"uib/template/datepicker/month.html\",\"uib/template/datepicker/year.html\",\"uib/template/datepickerPopup/popup.html\",\"uib/template/modal/window.html\",\"uib/template/pager/pager.html\",\"uib/template/pagination/pagination.html\",\"uib/template/tooltip/tooltip-html-popup.html\",\"uib/template/tooltip/tooltip-popup.html\",\"uib/template/tooltip/tooltip-template-popup.html\",\"uib/template/popover/popover-html.html\",\"uib/template/popover/popover-template.html\",\"uib/template/popover/popover.html\",\"uib/template/progressbar/bar.html\",\"uib/template/progressbar/progress.html\",\"uib/template/progressbar/progressbar.html\",\"uib/template/rating/rating.html\",\"uib/template/tabs/tab.html\",\"uib/template/tabs/tabset.html\",\"uib/template/timepicker/timepicker.html\",\"uib/template/typeahead/typeahead-match.html\",\"uib/template/typeahead/typeahead-popup.html\"]);\nangular.module('ui.bootstrap.collapse', [])\n\n .directive('uibCollapse', ['$animate', '$q', '$parse', '$injector', function($animate, $q, $parse, $injector) {\n var $animateCss = $injector.has('$animateCss') ? $injector.get('$animateCss') : null;\n return {\n link: function(scope, element, attrs) {\n var expandingExpr = $parse(attrs.expanding),\n expandedExpr = $parse(attrs.expanded),\n collapsingExpr = $parse(attrs.collapsing),\n collapsedExpr = $parse(attrs.collapsed),\n horizontal = false,\n css = {},\n cssTo = {};\n\n init();\n\n function init() {\n horizontal = !!('horizontal' in attrs);\n if (horizontal) {\n css = {\n width: ''\n };\n cssTo = {width: '0'};\n } else {\n css = {\n height: ''\n };\n cssTo = {height: '0'};\n }\n if (!scope.$eval(attrs.uibCollapse)) {\n element.addClass('in')\n .addClass('collapse')\n .attr('aria-expanded', true)\n .attr('aria-hidden', false)\n .css(css);\n }\n }\n\n function getScrollFromElement(element) {\n if (horizontal) {\n return {width: element.scrollWidth + 'px'};\n }\n return {height: element.scrollHeight + 'px'};\n }\n\n function expand() {\n if (element.hasClass('collapse') && element.hasClass('in')) {\n return;\n }\n\n $q.resolve(expandingExpr(scope))\n .then(function() {\n element.removeClass('collapse')\n .addClass('collapsing')\n .attr('aria-expanded', true)\n .attr('aria-hidden', false);\n\n if ($animateCss) {\n $animateCss(element, {\n addClass: 'in',\n easing: 'ease',\n css: {\n overflow: 'hidden'\n },\n to: getScrollFromElement(element[0])\n }).start()['finally'](expandDone);\n } else {\n $animate.addClass(element, 'in', {\n css: {\n overflow: 'hidden'\n },\n to: getScrollFromElement(element[0])\n }).then(expandDone);\n }\n }, angular.noop);\n }\n\n function expandDone() {\n element.removeClass('collapsing')\n .addClass('collapse')\n .css(css);\n expandedExpr(scope);\n }\n\n function collapse() {\n if (!element.hasClass('collapse') && !element.hasClass('in')) {\n return collapseDone();\n }\n\n $q.resolve(collapsingExpr(scope))\n .then(function() {\n element\n // IMPORTANT: The width must be set before adding \"collapsing\" class.\n // Otherwise, the browser attempts to animate from width 0 (in\n // collapsing class) to the given width here.\n .css(getScrollFromElement(element[0]))\n // initially all panel collapse have the collapse class, this removal\n // prevents the animation from jumping to collapsed state\n .removeClass('collapse')\n .addClass('collapsing')\n .attr('aria-expanded', false)\n .attr('aria-hidden', true);\n\n if ($animateCss) {\n $animateCss(element, {\n removeClass: 'in',\n to: cssTo\n }).start()['finally'](collapseDone);\n } else {\n $animate.removeClass(element, 'in', {\n to: cssTo\n }).then(collapseDone);\n }\n }, angular.noop);\n }\n\n function collapseDone() {\n element.css(cssTo); // Required so that collapse works when animation is disabled\n element.removeClass('collapsing')\n .addClass('collapse');\n collapsedExpr(scope);\n }\n\n scope.$watch(attrs.uibCollapse, function(shouldCollapse) {\n if (shouldCollapse) {\n collapse();\n } else {\n expand();\n }\n });\n }\n };\n }]);\n\nangular.module('ui.bootstrap.tabindex', [])\n\n.directive('uibTabindexToggle', function() {\n return {\n restrict: 'A',\n link: function(scope, elem, attrs) {\n attrs.$observe('disabled', function(disabled) {\n attrs.$set('tabindex', disabled ? -1 : null);\n });\n }\n };\n});\n\nangular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse', 'ui.bootstrap.tabindex'])\n\n.constant('uibAccordionConfig', {\n closeOthers: true\n})\n\n.controller('UibAccordionController', ['$scope', '$attrs', 'uibAccordionConfig', function($scope, $attrs, accordionConfig) {\n // This array keeps track of the accordion groups\n this.groups = [];\n\n // Ensure that all the groups in this accordion are closed, unless close-others explicitly says not to\n this.closeOthers = function(openGroup) {\n var closeOthers = angular.isDefined($attrs.closeOthers) ?\n $scope.$eval($attrs.closeOthers) : accordionConfig.closeOthers;\n if (closeOthers) {\n angular.forEach(this.groups, function(group) {\n if (group !== openGroup) {\n group.isOpen = false;\n }\n });\n }\n };\n\n // This is called from the accordion-group directive to add itself to the accordion\n this.addGroup = function(groupScope) {\n var that = this;\n this.groups.push(groupScope);\n\n groupScope.$on('$destroy', function(event) {\n that.removeGroup(groupScope);\n });\n };\n\n // This is called from the accordion-group directive when to remove itself\n this.removeGroup = function(group) {\n var index = this.groups.indexOf(group);\n if (index !== -1) {\n this.groups.splice(index, 1);\n }\n };\n}])\n\n// The accordion directive simply sets up the directive controller\n// and adds an accordion CSS class to itself element.\n.directive('uibAccordion', function() {\n return {\n controller: 'UibAccordionController',\n controllerAs: 'accordion',\n transclude: true,\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/accordion/accordion.html';\n }\n };\n})\n\n// The accordion-group directive indicates a block of html that will expand and collapse in an accordion\n.directive('uibAccordionGroup', function() {\n return {\n require: '^uibAccordion', // We need this directive to be inside an accordion\n transclude: true, // It transcludes the contents of the directive into the template\n restrict: 'A',\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/accordion/accordion-group.html';\n },\n scope: {\n heading: '@', // Interpolate the heading attribute onto this scope\n panelClass: '@?', // Ditto with panelClass\n isOpen: '=?',\n isDisabled: '=?'\n },\n controller: function() {\n this.setHeading = function(element) {\n this.heading = element;\n };\n },\n link: function(scope, element, attrs, accordionCtrl) {\n element.addClass('panel');\n accordionCtrl.addGroup(scope);\n\n scope.openClass = attrs.openClass || 'panel-open';\n scope.panelClass = attrs.panelClass || 'panel-default';\n scope.$watch('isOpen', function(value) {\n element.toggleClass(scope.openClass, !!value);\n if (value) {\n accordionCtrl.closeOthers(scope);\n }\n });\n\n scope.toggleOpen = function($event) {\n if (!scope.isDisabled) {\n if (!$event || $event.which === 32) {\n scope.isOpen = !scope.isOpen;\n }\n }\n };\n\n var id = 'accordiongroup-' + scope.$id + '-' + Math.floor(Math.random() * 10000);\n scope.headingId = id + '-tab';\n scope.panelId = id + '-panel';\n }\n };\n})\n\n// Use accordion-heading below an accordion-group to provide a heading containing HTML\n.directive('uibAccordionHeading', function() {\n return {\n transclude: true, // Grab the contents to be used as the heading\n template: '', // In effect remove this element!\n replace: true,\n require: '^uibAccordionGroup',\n link: function(scope, element, attrs, accordionGroupCtrl, transclude) {\n // Pass the heading to the accordion-group controller\n // so that it can be transcluded into the right place in the template\n // [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]\n accordionGroupCtrl.setHeading(transclude(scope, angular.noop));\n }\n };\n})\n\n// Use in the accordion-group template to indicate where you want the heading to be transcluded\n// You must provide the property on the accordion-group controller that will hold the transcluded element\n.directive('uibAccordionTransclude', function() {\n return {\n require: '^uibAccordionGroup',\n link: function(scope, element, attrs, controller) {\n scope.$watch(function() { return controller[attrs.uibAccordionTransclude]; }, function(heading) {\n if (heading) {\n var elem = angular.element(element[0].querySelector(getHeaderSelectors()));\n elem.html('');\n elem.append(heading);\n }\n });\n }\n };\n\n function getHeaderSelectors() {\n return 'uib-accordion-header,' +\n 'data-uib-accordion-header,' +\n 'x-uib-accordion-header,' +\n 'uib\\\\:accordion-header,' +\n '[uib-accordion-header],' +\n '[data-uib-accordion-header],' +\n '[x-uib-accordion-header]';\n }\n});\n\nangular.module('ui.bootstrap.alert', [])\n\n.controller('UibAlertController', ['$scope', '$element', '$attrs', '$interpolate', '$timeout', function($scope, $element, $attrs, $interpolate, $timeout) {\n $scope.closeable = !!$attrs.close;\n $element.addClass('alert');\n $attrs.$set('role', 'alert');\n if ($scope.closeable) {\n $element.addClass('alert-dismissible');\n }\n\n var dismissOnTimeout = angular.isDefined($attrs.dismissOnTimeout) ?\n $interpolate($attrs.dismissOnTimeout)($scope.$parent) : null;\n\n if (dismissOnTimeout) {\n $timeout(function() {\n $scope.close();\n }, parseInt(dismissOnTimeout, 10));\n }\n}])\n\n.directive('uibAlert', function() {\n return {\n controller: 'UibAlertController',\n controllerAs: 'alert',\n restrict: 'A',\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/alert/alert.html';\n },\n transclude: true,\n scope: {\n close: '&'\n }\n };\n});\n\nangular.module('ui.bootstrap.buttons', [])\n\n.constant('uibButtonConfig', {\n activeClass: 'active',\n toggleEvent: 'click'\n})\n\n.controller('UibButtonsController', ['uibButtonConfig', function(buttonConfig) {\n this.activeClass = buttonConfig.activeClass || 'active';\n this.toggleEvent = buttonConfig.toggleEvent || 'click';\n}])\n\n.directive('uibBtnRadio', ['$parse', function($parse) {\n return {\n require: ['uibBtnRadio', 'ngModel'],\n controller: 'UibButtonsController',\n controllerAs: 'buttons',\n link: function(scope, element, attrs, ctrls) {\n var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1];\n var uncheckableExpr = $parse(attrs.uibUncheckable);\n\n element.find('input').css({display: 'none'});\n\n //model -> UI\n ngModelCtrl.$render = function() {\n element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.uibBtnRadio)));\n };\n\n //ui->model\n element.on(buttonsCtrl.toggleEvent, function() {\n if (attrs.disabled) {\n return;\n }\n\n var isActive = element.hasClass(buttonsCtrl.activeClass);\n\n if (!isActive || angular.isDefined(attrs.uncheckable)) {\n scope.$apply(function() {\n ngModelCtrl.$setViewValue(isActive ? null : scope.$eval(attrs.uibBtnRadio));\n ngModelCtrl.$render();\n });\n }\n });\n\n if (attrs.uibUncheckable) {\n scope.$watch(uncheckableExpr, function(uncheckable) {\n attrs.$set('uncheckable', uncheckable ? '' : undefined);\n });\n }\n }\n };\n}])\n\n.directive('uibBtnCheckbox', function() {\n return {\n require: ['uibBtnCheckbox', 'ngModel'],\n controller: 'UibButtonsController',\n controllerAs: 'button',\n link: function(scope, element, attrs, ctrls) {\n var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1];\n\n element.find('input').css({display: 'none'});\n\n function getTrueValue() {\n return getCheckboxValue(attrs.btnCheckboxTrue, true);\n }\n\n function getFalseValue() {\n return getCheckboxValue(attrs.btnCheckboxFalse, false);\n }\n\n function getCheckboxValue(attribute, defaultValue) {\n return angular.isDefined(attribute) ? scope.$eval(attribute) : defaultValue;\n }\n\n //model -> UI\n ngModelCtrl.$render = function() {\n element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));\n };\n\n //ui->model\n element.on(buttonsCtrl.toggleEvent, function() {\n if (attrs.disabled) {\n return;\n }\n\n scope.$apply(function() {\n ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass) ? getFalseValue() : getTrueValue());\n ngModelCtrl.$render();\n });\n });\n }\n };\n});\n\nangular.module('ui.bootstrap.carousel', [])\n\n.controller('UibCarouselController', ['$scope', '$element', '$interval', '$timeout', '$animate', function($scope, $element, $interval, $timeout, $animate) {\n var self = this,\n slides = self.slides = $scope.slides = [],\n SLIDE_DIRECTION = 'uib-slideDirection',\n currentIndex = $scope.active,\n currentInterval, isPlaying;\n\n var destroyed = false;\n $element.addClass('carousel');\n\n self.addSlide = function(slide, element) {\n slides.push({\n slide: slide,\n element: element\n });\n slides.sort(function(a, b) {\n return +a.slide.index - +b.slide.index;\n });\n //if this is the first slide or the slide is set to active, select it\n if (slide.index === $scope.active || slides.length === 1 && !angular.isNumber($scope.active)) {\n if ($scope.$currentTransition) {\n $scope.$currentTransition = null;\n }\n\n currentIndex = slide.index;\n $scope.active = slide.index;\n setActive(currentIndex);\n self.select(slides[findSlideIndex(slide)]);\n if (slides.length === 1) {\n $scope.play();\n }\n }\n };\n\n self.getCurrentIndex = function() {\n for (var i = 0; i < slides.length; i++) {\n if (slides[i].slide.index === currentIndex) {\n return i;\n }\n }\n };\n\n self.next = $scope.next = function() {\n var newIndex = (self.getCurrentIndex() + 1) % slides.length;\n\n if (newIndex === 0 && $scope.noWrap()) {\n $scope.pause();\n return;\n }\n\n return self.select(slides[newIndex], 'next');\n };\n\n self.prev = $scope.prev = function() {\n var newIndex = self.getCurrentIndex() - 1 < 0 ? slides.length - 1 : self.getCurrentIndex() - 1;\n\n if ($scope.noWrap() && newIndex === slides.length - 1) {\n $scope.pause();\n return;\n }\n\n return self.select(slides[newIndex], 'prev');\n };\n\n self.removeSlide = function(slide) {\n var index = findSlideIndex(slide);\n\n //get the index of the slide inside the carousel\n slides.splice(index, 1);\n if (slides.length > 0 && currentIndex === index) {\n if (index >= slides.length) {\n currentIndex = slides.length - 1;\n $scope.active = currentIndex;\n setActive(currentIndex);\n self.select(slides[slides.length - 1]);\n } else {\n currentIndex = index;\n $scope.active = currentIndex;\n setActive(currentIndex);\n self.select(slides[index]);\n }\n } else if (currentIndex > index) {\n currentIndex--;\n $scope.active = currentIndex;\n }\n\n //clean the active value when no more slide\n if (slides.length === 0) {\n currentIndex = null;\n $scope.active = null;\n }\n };\n\n /* direction: \"prev\" or \"next\" */\n self.select = $scope.select = function(nextSlide, direction) {\n var nextIndex = findSlideIndex(nextSlide.slide);\n //Decide direction if it's not given\n if (direction === undefined) {\n direction = nextIndex > self.getCurrentIndex() ? 'next' : 'prev';\n }\n //Prevent this user-triggered transition from occurring if there is already one in progress\n if (nextSlide.slide.index !== currentIndex &&\n !$scope.$currentTransition) {\n goNext(nextSlide.slide, nextIndex, direction);\n }\n };\n\n /* Allow outside people to call indexOf on slides array */\n $scope.indexOfSlide = function(slide) {\n return +slide.slide.index;\n };\n\n $scope.isActive = function(slide) {\n return $scope.active === slide.slide.index;\n };\n\n $scope.isPrevDisabled = function() {\n return $scope.active === 0 && $scope.noWrap();\n };\n\n $scope.isNextDisabled = function() {\n return $scope.active === slides.length - 1 && $scope.noWrap();\n };\n\n $scope.pause = function() {\n if (!$scope.noPause) {\n isPlaying = false;\n resetTimer();\n }\n };\n\n $scope.play = function() {\n if (!isPlaying) {\n isPlaying = true;\n restartTimer();\n }\n };\n\n $element.on('mouseenter', $scope.pause);\n $element.on('mouseleave', $scope.play);\n\n $scope.$on('$destroy', function() {\n destroyed = true;\n resetTimer();\n });\n\n $scope.$watch('noTransition', function(noTransition) {\n $animate.enabled($element, !noTransition);\n });\n\n $scope.$watch('interval', restartTimer);\n\n $scope.$watchCollection('slides', resetTransition);\n\n $scope.$watch('active', function(index) {\n if (angular.isNumber(index) && currentIndex !== index) {\n for (var i = 0; i < slides.length; i++) {\n if (slides[i].slide.index === index) {\n index = i;\n break;\n }\n }\n\n var slide = slides[index];\n if (slide) {\n setActive(index);\n self.select(slides[index]);\n currentIndex = index;\n }\n }\n });\n\n function getSlideByIndex(index) {\n for (var i = 0, l = slides.length; i < l; ++i) {\n if (slides[i].index === index) {\n return slides[i];\n }\n }\n }\n\n function setActive(index) {\n for (var i = 0; i < slides.length; i++) {\n slides[i].slide.active = i === index;\n }\n }\n\n function goNext(slide, index, direction) {\n if (destroyed) {\n return;\n }\n\n angular.extend(slide, {direction: direction});\n angular.extend(slides[currentIndex].slide || {}, {direction: direction});\n if ($animate.enabled($element) && !$scope.$currentTransition &&\n slides[index].element && self.slides.length > 1) {\n slides[index].element.data(SLIDE_DIRECTION, slide.direction);\n var currentIdx = self.getCurrentIndex();\n\n if (angular.isNumber(currentIdx) && slides[currentIdx].element) {\n slides[currentIdx].element.data(SLIDE_DIRECTION, slide.direction);\n }\n\n $scope.$currentTransition = true;\n $animate.on('addClass', slides[index].element, function(element, phase) {\n if (phase === 'close') {\n $scope.$currentTransition = null;\n $animate.off('addClass', element);\n }\n });\n }\n\n $scope.active = slide.index;\n currentIndex = slide.index;\n setActive(index);\n\n //every time you change slides, reset the timer\n restartTimer();\n }\n\n function findSlideIndex(slide) {\n for (var i = 0; i < slides.length; i++) {\n if (slides[i].slide === slide) {\n return i;\n }\n }\n }\n\n function resetTimer() {\n if (currentInterval) {\n $interval.cancel(currentInterval);\n currentInterval = null;\n }\n }\n\n function resetTransition(slides) {\n if (!slides.length) {\n $scope.$currentTransition = null;\n }\n }\n\n function restartTimer() {\n resetTimer();\n var interval = +$scope.interval;\n if (!isNaN(interval) && interval > 0) {\n currentInterval = $interval(timerFn, interval);\n }\n }\n\n function timerFn() {\n var interval = +$scope.interval;\n if (isPlaying && !isNaN(interval) && interval > 0 && slides.length) {\n $scope.next();\n } else {\n $scope.pause();\n }\n }\n}])\n\n.directive('uibCarousel', function() {\n return {\n transclude: true,\n controller: 'UibCarouselController',\n controllerAs: 'carousel',\n restrict: 'A',\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/carousel/carousel.html';\n },\n scope: {\n active: '=',\n interval: '=',\n noTransition: '=',\n noPause: '=',\n noWrap: '&'\n }\n };\n})\n\n.directive('uibSlide', ['$animate', function($animate) {\n return {\n require: '^uibCarousel',\n restrict: 'A',\n transclude: true,\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/carousel/slide.html';\n },\n scope: {\n actual: '=?',\n index: '=?'\n },\n link: function (scope, element, attrs, carouselCtrl) {\n element.addClass('item');\n carouselCtrl.addSlide(scope, element);\n //when the scope is destroyed then remove the slide from the current slides array\n scope.$on('$destroy', function() {\n carouselCtrl.removeSlide(scope);\n });\n\n scope.$watch('active', function(active) {\n $animate[active ? 'addClass' : 'removeClass'](element, 'active');\n });\n }\n };\n}])\n\n.animation('.item', ['$animateCss',\nfunction($animateCss) {\n var SLIDE_DIRECTION = 'uib-slideDirection';\n\n function removeClass(element, className, callback) {\n element.removeClass(className);\n if (callback) {\n callback();\n }\n }\n\n return {\n beforeAddClass: function(element, className, done) {\n if (className === 'active') {\n var stopped = false;\n var direction = element.data(SLIDE_DIRECTION);\n var directionClass = direction === 'next' ? 'left' : 'right';\n var removeClassFn = removeClass.bind(this, element,\n directionClass + ' ' + direction, done);\n element.addClass(direction);\n\n $animateCss(element, {addClass: directionClass})\n .start()\n .done(removeClassFn);\n\n return function() {\n stopped = true;\n };\n }\n done();\n },\n beforeRemoveClass: function (element, className, done) {\n if (className === 'active') {\n var stopped = false;\n var direction = element.data(SLIDE_DIRECTION);\n var directionClass = direction === 'next' ? 'left' : 'right';\n var removeClassFn = removeClass.bind(this, element, directionClass, done);\n\n $animateCss(element, {addClass: directionClass})\n .start()\n .done(removeClassFn);\n\n return function() {\n stopped = true;\n };\n }\n done();\n }\n };\n}]);\n\nangular.module('ui.bootstrap.dateparser', [])\n\n.service('uibDateParser', ['$log', '$locale', 'dateFilter', 'orderByFilter', 'filterFilter', function($log, $locale, dateFilter, orderByFilter, filterFilter) {\n // Pulled from https://github.com/mbostock/d3/blob/master/src/format/requote.js\n var SPECIAL_CHARACTERS_REGEXP = /[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g;\n\n var localeId;\n var formatCodeToRegex;\n\n this.init = function() {\n localeId = $locale.id;\n\n this.parsers = {};\n this.formatters = {};\n\n formatCodeToRegex = [\n {\n key: 'yyyy',\n regex: '\\\\d{4}',\n apply: function(value) { this.year = +value; },\n formatter: function(date) {\n var _date = new Date();\n _date.setFullYear(Math.abs(date.getFullYear()));\n return dateFilter(_date, 'yyyy');\n }\n },\n {\n key: 'yy',\n regex: '\\\\d{2}',\n apply: function(value) { value = +value; this.year = value < 69 ? value + 2000 : value + 1900; },\n formatter: function(date) {\n var _date = new Date();\n _date.setFullYear(Math.abs(date.getFullYear()));\n return dateFilter(_date, 'yy');\n }\n },\n {\n key: 'y',\n regex: '\\\\d{1,4}',\n apply: function(value) { this.year = +value; },\n formatter: function(date) {\n var _date = new Date();\n _date.setFullYear(Math.abs(date.getFullYear()));\n return dateFilter(_date, 'y');\n }\n },\n {\n key: 'M!',\n regex: '0?[1-9]|1[0-2]',\n apply: function(value) { this.month = value - 1; },\n formatter: function(date) {\n var value = date.getMonth();\n if (/^[0-9]$/.test(value)) {\n return dateFilter(date, 'MM');\n }\n\n return dateFilter(date, 'M');\n }\n },\n {\n key: 'MMMM',\n regex: $locale.DATETIME_FORMATS.MONTH.join('|'),\n apply: function(value) { this.month = $locale.DATETIME_FORMATS.MONTH.indexOf(value); },\n formatter: function(date) { return dateFilter(date, 'MMMM'); }\n },\n {\n key: 'MMM',\n regex: $locale.DATETIME_FORMATS.SHORTMONTH.join('|'),\n apply: function(value) { this.month = $locale.DATETIME_FORMATS.SHORTMONTH.indexOf(value); },\n formatter: function(date) { return dateFilter(date, 'MMM'); }\n },\n {\n key: 'MM',\n regex: '0[1-9]|1[0-2]',\n apply: function(value) { this.month = value - 1; },\n formatter: function(date) { return dateFilter(date, 'MM'); }\n },\n {\n key: 'M',\n regex: '[1-9]|1[0-2]',\n apply: function(value) { this.month = value - 1; },\n formatter: function(date) { return dateFilter(date, 'M'); }\n },\n {\n key: 'd!',\n regex: '[0-2]?[0-9]{1}|3[0-1]{1}',\n apply: function(value) { this.date = +value; },\n formatter: function(date) {\n var value = date.getDate();\n if (/^[1-9]$/.test(value)) {\n return dateFilter(date, 'dd');\n }\n\n return dateFilter(date, 'd');\n }\n },\n {\n key: 'dd',\n regex: '[0-2][0-9]{1}|3[0-1]{1}',\n apply: function(value) { this.date = +value; },\n formatter: function(date) { return dateFilter(date, 'dd'); }\n },\n {\n key: 'd',\n regex: '[1-2]?[0-9]{1}|3[0-1]{1}',\n apply: function(value) { this.date = +value; },\n formatter: function(date) { return dateFilter(date, 'd'); }\n },\n {\n key: 'EEEE',\n regex: $locale.DATETIME_FORMATS.DAY.join('|'),\n formatter: function(date) { return dateFilter(date, 'EEEE'); }\n },\n {\n key: 'EEE',\n regex: $locale.DATETIME_FORMATS.SHORTDAY.join('|'),\n formatter: function(date) { return dateFilter(date, 'EEE'); }\n },\n {\n key: 'HH',\n regex: '(?:0|1)[0-9]|2[0-3]',\n apply: function(value) { this.hours = +value; },\n formatter: function(date) { return dateFilter(date, 'HH'); }\n },\n {\n key: 'hh',\n regex: '0[0-9]|1[0-2]',\n apply: function(value) { this.hours = +value; },\n formatter: function(date) { return dateFilter(date, 'hh'); }\n },\n {\n key: 'H',\n regex: '1?[0-9]|2[0-3]',\n apply: function(value) { this.hours = +value; },\n formatter: function(date) { return dateFilter(date, 'H'); }\n },\n {\n key: 'h',\n regex: '[0-9]|1[0-2]',\n apply: function(value) { this.hours = +value; },\n formatter: function(date) { return dateFilter(date, 'h'); }\n },\n {\n key: 'mm',\n regex: '[0-5][0-9]',\n apply: function(value) { this.minutes = +value; },\n formatter: function(date) { return dateFilter(date, 'mm'); }\n },\n {\n key: 'm',\n regex: '[0-9]|[1-5][0-9]',\n apply: function(value) { this.minutes = +value; },\n formatter: function(date) { return dateFilter(date, 'm'); }\n },\n {\n key: 'sss',\n regex: '[0-9][0-9][0-9]',\n apply: function(value) { this.milliseconds = +value; },\n formatter: function(date) { return dateFilter(date, 'sss'); }\n },\n {\n key: 'ss',\n regex: '[0-5][0-9]',\n apply: function(value) { this.seconds = +value; },\n formatter: function(date) { return dateFilter(date, 'ss'); }\n },\n {\n key: 's',\n regex: '[0-9]|[1-5][0-9]',\n apply: function(value) { this.seconds = +value; },\n formatter: function(date) { return dateFilter(date, 's'); }\n },\n {\n key: 'a',\n regex: $locale.DATETIME_FORMATS.AMPMS.join('|'),\n apply: function(value) {\n if (this.hours === 12) {\n this.hours = 0;\n }\n\n if (value === 'PM') {\n this.hours += 12;\n }\n },\n formatter: function(date) { return dateFilter(date, 'a'); }\n },\n {\n key: 'Z',\n regex: '[+-]\\\\d{4}',\n apply: function(value) {\n var matches = value.match(/([+-])(\\d{2})(\\d{2})/),\n sign = matches[1],\n hours = matches[2],\n minutes = matches[3];\n this.hours += toInt(sign + hours);\n this.minutes += toInt(sign + minutes);\n },\n formatter: function(date) {\n return dateFilter(date, 'Z');\n }\n },\n {\n key: 'ww',\n regex: '[0-4][0-9]|5[0-3]',\n formatter: function(date) { return dateFilter(date, 'ww'); }\n },\n {\n key: 'w',\n regex: '[0-9]|[1-4][0-9]|5[0-3]',\n formatter: function(date) { return dateFilter(date, 'w'); }\n },\n {\n key: 'GGGG',\n regex: $locale.DATETIME_FORMATS.ERANAMES.join('|').replace(/\\s/g, '\\\\s'),\n formatter: function(date) { return dateFilter(date, 'GGGG'); }\n },\n {\n key: 'GGG',\n regex: $locale.DATETIME_FORMATS.ERAS.join('|'),\n formatter: function(date) { return dateFilter(date, 'GGG'); }\n },\n {\n key: 'GG',\n regex: $locale.DATETIME_FORMATS.ERAS.join('|'),\n formatter: function(date) { return dateFilter(date, 'GG'); }\n },\n {\n key: 'G',\n regex: $locale.DATETIME_FORMATS.ERAS.join('|'),\n formatter: function(date) { return dateFilter(date, 'G'); }\n }\n ];\n\n if (angular.version.major >= 1 && angular.version.minor > 4) {\n formatCodeToRegex.push({\n key: 'LLLL',\n regex: $locale.DATETIME_FORMATS.STANDALONEMONTH.join('|'),\n apply: function(value) { this.month = $locale.DATETIME_FORMATS.STANDALONEMONTH.indexOf(value); },\n formatter: function(date) { return dateFilter(date, 'LLLL'); }\n });\n }\n };\n\n this.init();\n\n function getFormatCodeToRegex(key) {\n return filterFilter(formatCodeToRegex, {key: key}, true)[0];\n }\n\n this.getParser = function (key) {\n var f = getFormatCodeToRegex(key);\n return f && f.apply || null;\n };\n\n this.overrideParser = function (key, parser) {\n var f = getFormatCodeToRegex(key);\n if (f && angular.isFunction(parser)) {\n this.parsers = {};\n f.apply = parser;\n }\n }.bind(this);\n\n function createParser(format) {\n var map = [], regex = format.split('');\n\n // check for literal values\n var quoteIndex = format.indexOf('\\'');\n if (quoteIndex > -1) {\n var inLiteral = false;\n format = format.split('');\n for (var i = quoteIndex; i < format.length; i++) {\n if (inLiteral) {\n if (format[i] === '\\'') {\n if (i + 1 < format.length && format[i+1] === '\\'') { // escaped single quote\n format[i+1] = '$';\n regex[i+1] = '';\n } else { // end of literal\n regex[i] = '';\n inLiteral = false;\n }\n }\n format[i] = '$';\n } else {\n if (format[i] === '\\'') { // start of literal\n format[i] = '$';\n regex[i] = '';\n inLiteral = true;\n }\n }\n }\n\n format = format.join('');\n }\n\n angular.forEach(formatCodeToRegex, function(data) {\n var index = format.indexOf(data.key);\n\n if (index > -1) {\n format = format.split('');\n\n regex[index] = '(' + data.regex + ')';\n format[index] = '$'; // Custom symbol to define consumed part of format\n for (var i = index + 1, n = index + data.key.length; i < n; i++) {\n regex[i] = '';\n format[i] = '$';\n }\n format = format.join('');\n\n map.push({\n index: index,\n key: data.key,\n apply: data.apply,\n matcher: data.regex\n });\n }\n });\n\n return {\n regex: new RegExp('^' + regex.join('') + '$'),\n map: orderByFilter(map, 'index')\n };\n }\n\n function createFormatter(format) {\n var formatters = [];\n var i = 0;\n var formatter, literalIdx;\n while (i < format.length) {\n if (angular.isNumber(literalIdx)) {\n if (format.charAt(i) === '\\'') {\n if (i + 1 >= format.length || format.charAt(i + 1) !== '\\'') {\n formatters.push(constructLiteralFormatter(format, literalIdx, i));\n literalIdx = null;\n }\n } else if (i === format.length) {\n while (literalIdx < format.length) {\n formatter = constructFormatterFromIdx(format, literalIdx);\n formatters.push(formatter);\n literalIdx = formatter.endIdx;\n }\n }\n\n i++;\n continue;\n }\n\n if (format.charAt(i) === '\\'') {\n literalIdx = i;\n i++;\n continue;\n }\n\n formatter = constructFormatterFromIdx(format, i);\n\n formatters.push(formatter.parser);\n i = formatter.endIdx;\n }\n\n return formatters;\n }\n\n function constructLiteralFormatter(format, literalIdx, endIdx) {\n return function() {\n return format.substr(literalIdx + 1, endIdx - literalIdx - 1);\n };\n }\n\n function constructFormatterFromIdx(format, i) {\n var currentPosStr = format.substr(i);\n for (var j = 0; j < formatCodeToRegex.length; j++) {\n if (new RegExp('^' + formatCodeToRegex[j].key).test(currentPosStr)) {\n var data = formatCodeToRegex[j];\n return {\n endIdx: i + data.key.length,\n parser: data.formatter\n };\n }\n }\n\n return {\n endIdx: i + 1,\n parser: function() {\n return currentPosStr.charAt(0);\n }\n };\n }\n\n this.filter = function(date, format) {\n if (!angular.isDate(date) || isNaN(date) || !format) {\n return '';\n }\n\n format = $locale.DATETIME_FORMATS[format] || format;\n\n if ($locale.id !== localeId) {\n this.init();\n }\n\n if (!this.formatters[format]) {\n this.formatters[format] = createFormatter(format);\n }\n\n var formatters = this.formatters[format];\n\n return formatters.reduce(function(str, formatter) {\n return str + formatter(date);\n }, '');\n };\n\n this.parse = function(input, format, baseDate) {\n if (!angular.isString(input) || !format) {\n return input;\n }\n\n format = $locale.DATETIME_FORMATS[format] || format;\n format = format.replace(SPECIAL_CHARACTERS_REGEXP, '\\\\$&');\n\n if ($locale.id !== localeId) {\n this.init();\n }\n\n if (!this.parsers[format]) {\n this.parsers[format] = createParser(format, 'apply');\n }\n\n var parser = this.parsers[format],\n regex = parser.regex,\n map = parser.map,\n results = input.match(regex),\n tzOffset = false;\n if (results && results.length) {\n var fields, dt;\n if (angular.isDate(baseDate) && !isNaN(baseDate.getTime())) {\n fields = {\n year: baseDate.getFullYear(),\n month: baseDate.getMonth(),\n date: baseDate.getDate(),\n hours: baseDate.getHours(),\n minutes: baseDate.getMinutes(),\n seconds: baseDate.getSeconds(),\n milliseconds: baseDate.getMilliseconds()\n };\n } else {\n if (baseDate) {\n $log.warn('dateparser:', 'baseDate is not a valid date');\n }\n fields = { year: 1900, month: 0, date: 1, hours: 0, minutes: 0, seconds: 0, milliseconds: 0 };\n }\n\n for (var i = 1, n = results.length; i < n; i++) {\n var mapper = map[i - 1];\n if (mapper.matcher === 'Z') {\n tzOffset = true;\n }\n\n if (mapper.apply) {\n mapper.apply.call(fields, results[i]);\n }\n }\n\n var datesetter = tzOffset ? Date.prototype.setUTCFullYear :\n Date.prototype.setFullYear;\n var timesetter = tzOffset ? Date.prototype.setUTCHours :\n Date.prototype.setHours;\n\n if (isValid(fields.year, fields.month, fields.date)) {\n if (angular.isDate(baseDate) && !isNaN(baseDate.getTime()) && !tzOffset) {\n dt = new Date(baseDate);\n datesetter.call(dt, fields.year, fields.month, fields.date);\n timesetter.call(dt, fields.hours, fields.minutes,\n fields.seconds, fields.milliseconds);\n } else {\n dt = new Date(0);\n datesetter.call(dt, fields.year, fields.month, fields.date);\n timesetter.call(dt, fields.hours || 0, fields.minutes || 0,\n fields.seconds || 0, fields.milliseconds || 0);\n }\n }\n\n return dt;\n }\n };\n\n // Check if date is valid for specific month (and year for February).\n // Month: 0 = Jan, 1 = Feb, etc\n function isValid(year, month, date) {\n if (date < 1) {\n return false;\n }\n\n if (month === 1 && date > 28) {\n return date === 29 && (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0);\n }\n\n if (month === 3 || month === 5 || month === 8 || month === 10) {\n return date < 31;\n }\n\n return true;\n }\n\n function toInt(str) {\n return parseInt(str, 10);\n }\n\n this.toTimezone = toTimezone;\n this.fromTimezone = fromTimezone;\n this.timezoneToOffset = timezoneToOffset;\n this.addDateMinutes = addDateMinutes;\n this.convertTimezoneToLocal = convertTimezoneToLocal;\n\n function toTimezone(date, timezone) {\n return date && timezone ? convertTimezoneToLocal(date, timezone) : date;\n }\n\n function fromTimezone(date, timezone) {\n return date && timezone ? convertTimezoneToLocal(date, timezone, true) : date;\n }\n\n //https://github.com/angular/angular.js/blob/622c42169699ec07fc6daaa19fe6d224e5d2f70e/src/Angular.js#L1207\n function timezoneToOffset(timezone, fallback) {\n timezone = timezone.replace(/:/g, '');\n var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n }\n\n function addDateMinutes(date, minutes) {\n date = new Date(date.getTime());\n date.setMinutes(date.getMinutes() + minutes);\n return date;\n }\n\n function convertTimezoneToLocal(date, timezone, reverse) {\n reverse = reverse ? -1 : 1;\n var dateTimezoneOffset = date.getTimezoneOffset();\n var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset));\n }\n}]);\n\n// Avoiding use of ng-class as it creates a lot of watchers when a class is to be applied to\n// at most one element.\nangular.module('ui.bootstrap.isClass', [])\n.directive('uibIsClass', [\n '$animate',\nfunction ($animate) {\n // 11111111 22222222\n var ON_REGEXP = /^\\s*([\\s\\S]+?)\\s+on\\s+([\\s\\S]+?)\\s*$/;\n // 11111111 22222222\n var IS_REGEXP = /^\\s*([\\s\\S]+?)\\s+for\\s+([\\s\\S]+?)\\s*$/;\n\n var dataPerTracked = {};\n\n return {\n restrict: 'A',\n compile: function(tElement, tAttrs) {\n var linkedScopes = [];\n var instances = [];\n var expToData = {};\n var lastActivated = null;\n var onExpMatches = tAttrs.uibIsClass.match(ON_REGEXP);\n var onExp = onExpMatches[2];\n var expsStr = onExpMatches[1];\n var exps = expsStr.split(',');\n\n return linkFn;\n\n function linkFn(scope, element, attrs) {\n linkedScopes.push(scope);\n instances.push({\n scope: scope,\n element: element\n });\n\n exps.forEach(function(exp, k) {\n addForExp(exp, scope);\n });\n\n scope.$on('$destroy', removeScope);\n }\n\n function addForExp(exp, scope) {\n var matches = exp.match(IS_REGEXP);\n var clazz = scope.$eval(matches[1]);\n var compareWithExp = matches[2];\n var data = expToData[exp];\n if (!data) {\n var watchFn = function(compareWithVal) {\n var newActivated = null;\n instances.some(function(instance) {\n var thisVal = instance.scope.$eval(onExp);\n if (thisVal === compareWithVal) {\n newActivated = instance;\n return true;\n }\n });\n if (data.lastActivated !== newActivated) {\n if (data.lastActivated) {\n $animate.removeClass(data.lastActivated.element, clazz);\n }\n if (newActivated) {\n $animate.addClass(newActivated.element, clazz);\n }\n data.lastActivated = newActivated;\n }\n };\n expToData[exp] = data = {\n lastActivated: null,\n scope: scope,\n watchFn: watchFn,\n compareWithExp: compareWithExp,\n watcher: scope.$watch(compareWithExp, watchFn)\n };\n }\n data.watchFn(scope.$eval(compareWithExp));\n }\n\n function removeScope(e) {\n var removedScope = e.targetScope;\n var index = linkedScopes.indexOf(removedScope);\n linkedScopes.splice(index, 1);\n instances.splice(index, 1);\n if (linkedScopes.length) {\n var newWatchScope = linkedScopes[0];\n angular.forEach(expToData, function(data) {\n if (data.scope === removedScope) {\n data.watcher = newWatchScope.$watch(data.compareWithExp, data.watchFn);\n data.scope = newWatchScope;\n }\n });\n } else {\n expToData = {};\n }\n }\n }\n };\n}]);\nangular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootstrap.isClass'])\n\n.value('$datepickerSuppressError', false)\n\n.value('$datepickerLiteralWarning', true)\n\n.constant('uibDatepickerConfig', {\n datepickerMode: 'day',\n formatDay: 'dd',\n formatMonth: 'MMMM',\n formatYear: 'yyyy',\n formatDayHeader: 'EEE',\n formatDayTitle: 'MMMM yyyy',\n formatMonthTitle: 'yyyy',\n maxDate: null,\n maxMode: 'year',\n minDate: null,\n minMode: 'day',\n monthColumns: 3,\n ngModelOptions: {},\n shortcutPropagation: false,\n showWeeks: true,\n yearColumns: 5,\n yearRows: 4\n})\n\n.controller('UibDatepickerController', ['$scope', '$element', '$attrs', '$parse', '$interpolate', '$locale', '$log', 'dateFilter', 'uibDatepickerConfig', '$datepickerLiteralWarning', '$datepickerSuppressError', 'uibDateParser',\n function($scope, $element, $attrs, $parse, $interpolate, $locale, $log, dateFilter, datepickerConfig, $datepickerLiteralWarning, $datepickerSuppressError, dateParser) {\n var self = this,\n ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl;\n ngModelOptions = {},\n watchListeners = [];\n\n $element.addClass('uib-datepicker');\n $attrs.$set('role', 'application');\n\n if (!$scope.datepickerOptions) {\n $scope.datepickerOptions = {};\n }\n\n // Modes chain\n this.modes = ['day', 'month', 'year'];\n\n [\n 'customClass',\n 'dateDisabled',\n 'datepickerMode',\n 'formatDay',\n 'formatDayHeader',\n 'formatDayTitle',\n 'formatMonth',\n 'formatMonthTitle',\n 'formatYear',\n 'maxDate',\n 'maxMode',\n 'minDate',\n 'minMode',\n 'monthColumns',\n 'showWeeks',\n 'shortcutPropagation',\n 'startingDay',\n 'yearColumns',\n 'yearRows'\n ].forEach(function(key) {\n switch (key) {\n case 'customClass':\n case 'dateDisabled':\n $scope[key] = $scope.datepickerOptions[key] || angular.noop;\n break;\n case 'datepickerMode':\n $scope.datepickerMode = angular.isDefined($scope.datepickerOptions.datepickerMode) ?\n $scope.datepickerOptions.datepickerMode : datepickerConfig.datepickerMode;\n break;\n case 'formatDay':\n case 'formatDayHeader':\n case 'formatDayTitle':\n case 'formatMonth':\n case 'formatMonthTitle':\n case 'formatYear':\n self[key] = angular.isDefined($scope.datepickerOptions[key]) ?\n $interpolate($scope.datepickerOptions[key])($scope.$parent) :\n datepickerConfig[key];\n break;\n case 'monthColumns':\n case 'showWeeks':\n case 'shortcutPropagation':\n case 'yearColumns':\n case 'yearRows':\n self[key] = angular.isDefined($scope.datepickerOptions[key]) ?\n $scope.datepickerOptions[key] : datepickerConfig[key];\n break;\n case 'startingDay':\n if (angular.isDefined($scope.datepickerOptions.startingDay)) {\n self.startingDay = $scope.datepickerOptions.startingDay;\n } else if (angular.isNumber(datepickerConfig.startingDay)) {\n self.startingDay = datepickerConfig.startingDay;\n } else {\n self.startingDay = ($locale.DATETIME_FORMATS.FIRSTDAYOFWEEK + 8) % 7;\n }\n\n break;\n case 'maxDate':\n case 'minDate':\n $scope.$watch('datepickerOptions.' + key, function(value) {\n if (value) {\n if (angular.isDate(value)) {\n self[key] = dateParser.fromTimezone(new Date(value), ngModelOptions.getOption('timezone'));\n } else {\n if ($datepickerLiteralWarning) {\n $log.warn('Literal date support has been deprecated, please switch to date object usage');\n }\n\n self[key] = new Date(dateFilter(value, 'medium'));\n }\n } else {\n self[key] = datepickerConfig[key] ?\n dateParser.fromTimezone(new Date(datepickerConfig[key]), ngModelOptions.getOption('timezone')) :\n null;\n }\n\n self.refreshView();\n });\n\n break;\n case 'maxMode':\n case 'minMode':\n if ($scope.datepickerOptions[key]) {\n $scope.$watch(function() { return $scope.datepickerOptions[key]; }, function(value) {\n self[key] = $scope[key] = angular.isDefined(value) ? value : $scope.datepickerOptions[key];\n if (key === 'minMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) < self.modes.indexOf(self[key]) ||\n key === 'maxMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) > self.modes.indexOf(self[key])) {\n $scope.datepickerMode = self[key];\n $scope.datepickerOptions.datepickerMode = self[key];\n }\n });\n } else {\n self[key] = $scope[key] = datepickerConfig[key] || null;\n }\n\n break;\n }\n });\n\n $scope.uniqueId = 'datepicker-' + $scope.$id + '-' + Math.floor(Math.random() * 10000);\n\n $scope.disabled = angular.isDefined($attrs.disabled) || false;\n if (angular.isDefined($attrs.ngDisabled)) {\n watchListeners.push($scope.$parent.$watch($attrs.ngDisabled, function(disabled) {\n $scope.disabled = disabled;\n self.refreshView();\n }));\n }\n\n $scope.isActive = function(dateObject) {\n if (self.compare(dateObject.date, self.activeDate) === 0) {\n $scope.activeDateId = dateObject.uid;\n return true;\n }\n return false;\n };\n\n this.init = function(ngModelCtrl_) {\n ngModelCtrl = ngModelCtrl_;\n ngModelOptions = extractOptions(ngModelCtrl);\n\n if ($scope.datepickerOptions.initDate) {\n self.activeDate = dateParser.fromTimezone($scope.datepickerOptions.initDate, ngModelOptions.getOption('timezone')) || new Date();\n $scope.$watch('datepickerOptions.initDate', function(initDate) {\n if (initDate && (ngModelCtrl.$isEmpty(ngModelCtrl.$modelValue) || ngModelCtrl.$invalid)) {\n self.activeDate = dateParser.fromTimezone(initDate, ngModelOptions.getOption('timezone'));\n self.refreshView();\n }\n });\n } else {\n self.activeDate = new Date();\n }\n\n var date = ngModelCtrl.$modelValue ? new Date(ngModelCtrl.$modelValue) : new Date();\n this.activeDate = !isNaN(date) ?\n dateParser.fromTimezone(date, ngModelOptions.getOption('timezone')) :\n dateParser.fromTimezone(new Date(), ngModelOptions.getOption('timezone'));\n\n ngModelCtrl.$render = function() {\n self.render();\n };\n };\n\n this.render = function() {\n if (ngModelCtrl.$viewValue) {\n var date = new Date(ngModelCtrl.$viewValue),\n isValid = !isNaN(date);\n\n if (isValid) {\n this.activeDate = dateParser.fromTimezone(date, ngModelOptions.getOption('timezone'));\n } else if (!$datepickerSuppressError) {\n $log.error('Datepicker directive: \"ng-model\" value must be a Date object');\n }\n }\n this.refreshView();\n };\n\n this.refreshView = function() {\n if (this.element) {\n $scope.selectedDt = null;\n this._refreshView();\n if ($scope.activeDt) {\n $scope.activeDateId = $scope.activeDt.uid;\n }\n\n var date = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;\n date = dateParser.fromTimezone(date, ngModelOptions.getOption('timezone'));\n ngModelCtrl.$setValidity('dateDisabled', !date ||\n this.element && !this.isDisabled(date));\n }\n };\n\n this.createDateObject = function(date, format) {\n var model = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;\n model = dateParser.fromTimezone(model, ngModelOptions.getOption('timezone'));\n var today = new Date();\n today = dateParser.fromTimezone(today, ngModelOptions.getOption('timezone'));\n var time = this.compare(date, today);\n var dt = {\n date: date,\n label: dateParser.filter(date, format),\n selected: model && this.compare(date, model) === 0,\n disabled: this.isDisabled(date),\n past: time < 0,\n current: time === 0,\n future: time > 0,\n customClass: this.customClass(date) || null\n };\n\n if (model && this.compare(date, model) === 0) {\n $scope.selectedDt = dt;\n }\n\n if (self.activeDate && this.compare(dt.date, self.activeDate) === 0) {\n $scope.activeDt = dt;\n }\n\n return dt;\n };\n\n this.isDisabled = function(date) {\n return $scope.disabled ||\n this.minDate && this.compare(date, this.minDate) < 0 ||\n this.maxDate && this.compare(date, this.maxDate) > 0 ||\n $scope.dateDisabled && $scope.dateDisabled({date: date, mode: $scope.datepickerMode});\n };\n\n this.customClass = function(date) {\n return $scope.customClass({date: date, mode: $scope.datepickerMode});\n };\n\n // Split array into smaller arrays\n this.split = function(arr, size) {\n var arrays = [];\n while (arr.length > 0) {\n arrays.push(arr.splice(0, size));\n }\n return arrays;\n };\n\n $scope.select = function(date) {\n if ($scope.datepickerMode === self.minMode) {\n var dt = ngModelCtrl.$viewValue ? dateParser.fromTimezone(new Date(ngModelCtrl.$viewValue), ngModelOptions.getOption('timezone')) : new Date(0, 0, 0, 0, 0, 0, 0);\n dt.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n dt = dateParser.toTimezone(dt, ngModelOptions.getOption('timezone'));\n ngModelCtrl.$setViewValue(dt);\n ngModelCtrl.$render();\n } else {\n self.activeDate = date;\n setMode(self.modes[self.modes.indexOf($scope.datepickerMode) - 1]);\n\n $scope.$emit('uib:datepicker.mode');\n }\n\n $scope.$broadcast('uib:datepicker.focus');\n };\n\n $scope.move = function(direction) {\n var year = self.activeDate.getFullYear() + direction * (self.step.years || 0),\n month = self.activeDate.getMonth() + direction * (self.step.months || 0);\n self.activeDate.setFullYear(year, month, 1);\n self.refreshView();\n };\n\n $scope.toggleMode = function(direction) {\n direction = direction || 1;\n\n if ($scope.datepickerMode === self.maxMode && direction === 1 ||\n $scope.datepickerMode === self.minMode && direction === -1) {\n return;\n }\n\n setMode(self.modes[self.modes.indexOf($scope.datepickerMode) + direction]);\n\n $scope.$emit('uib:datepicker.mode');\n };\n\n // Key event mapper\n $scope.keys = { 13: 'enter', 32: 'space', 33: 'pageup', 34: 'pagedown', 35: 'end', 36: 'home', 37: 'left', 38: 'up', 39: 'right', 40: 'down' };\n\n var focusElement = function() {\n self.element[0].focus();\n };\n\n // Listen for focus requests from popup directive\n $scope.$on('uib:datepicker.focus', focusElement);\n\n $scope.keydown = function(evt) {\n var key = $scope.keys[evt.which];\n\n if (!key || evt.shiftKey || evt.altKey || $scope.disabled) {\n return;\n }\n\n evt.preventDefault();\n if (!self.shortcutPropagation) {\n evt.stopPropagation();\n }\n\n if (key === 'enter' || key === 'space') {\n if (self.isDisabled(self.activeDate)) {\n return; // do nothing\n }\n $scope.select(self.activeDate);\n } else if (evt.ctrlKey && (key === 'up' || key === 'down')) {\n $scope.toggleMode(key === 'up' ? 1 : -1);\n } else {\n self.handleKeyDown(key, evt);\n self.refreshView();\n }\n };\n\n $element.on('keydown', function(evt) {\n $scope.$apply(function() {\n $scope.keydown(evt);\n });\n });\n\n $scope.$on('$destroy', function() {\n //Clear all watch listeners on destroy\n while (watchListeners.length) {\n watchListeners.shift()();\n }\n });\n\n function setMode(mode) {\n $scope.datepickerMode = mode;\n $scope.datepickerOptions.datepickerMode = mode;\n }\n\n function extractOptions(ngModelCtrl) {\n var ngModelOptions;\n\n if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing\n // guarantee a value\n ngModelOptions = ngModelCtrl.$options ||\n $scope.datepickerOptions.ngModelOptions ||\n datepickerConfig.ngModelOptions ||\n {};\n\n // mimic 1.6+ api\n ngModelOptions.getOption = function (key) {\n return ngModelOptions[key];\n };\n } else { // in angular >=1.6 $options is always present\n // ng-model-options defaults timezone to null; don't let its precedence squash a non-null value\n var timezone = ngModelCtrl.$options.getOption('timezone') ||\n ($scope.datepickerOptions.ngModelOptions ? $scope.datepickerOptions.ngModelOptions.timezone : null) ||\n (datepickerConfig.ngModelOptions ? datepickerConfig.ngModelOptions.timezone : null);\n\n // values passed to createChild override existing values\n ngModelOptions = ngModelCtrl.$options // start with a ModelOptions instance\n .createChild(datepickerConfig.ngModelOptions) // lowest precedence\n .createChild($scope.datepickerOptions.ngModelOptions)\n .createChild(ngModelCtrl.$options) // highest precedence\n .createChild({timezone: timezone}); // to keep from squashing a non-null value\n }\n\n return ngModelOptions;\n }\n}])\n\n.controller('UibDaypickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {\n var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\n this.step = { months: 1 };\n this.element = $element;\n function getDaysInMonth(year, month) {\n return month === 1 && year % 4 === 0 &&\n (year % 100 !== 0 || year % 400 === 0) ? 29 : DAYS_IN_MONTH[month];\n }\n\n this.init = function(ctrl) {\n angular.extend(ctrl, this);\n scope.showWeeks = ctrl.showWeeks;\n ctrl.refreshView();\n };\n\n this.getDates = function(startDate, n) {\n var dates = new Array(n), current = new Date(startDate), i = 0, date;\n while (i < n) {\n date = new Date(current);\n dates[i++] = date;\n current.setDate(current.getDate() + 1);\n }\n return dates;\n };\n\n this._refreshView = function() {\n var year = this.activeDate.getFullYear(),\n month = this.activeDate.getMonth(),\n firstDayOfMonth = new Date(this.activeDate);\n\n firstDayOfMonth.setFullYear(year, month, 1);\n\n var difference = this.startingDay - firstDayOfMonth.getDay(),\n numDisplayedFromPreviousMonth = difference > 0 ?\n 7 - difference : - difference,\n firstDate = new Date(firstDayOfMonth);\n\n if (numDisplayedFromPreviousMonth > 0) {\n firstDate.setDate(-numDisplayedFromPreviousMonth + 1);\n }\n\n // 42 is the number of days on a six-week calendar\n var days = this.getDates(firstDate, 42);\n for (var i = 0; i < 42; i ++) {\n days[i] = angular.extend(this.createDateObject(days[i], this.formatDay), {\n secondary: days[i].getMonth() !== month,\n uid: scope.uniqueId + '-' + i\n });\n }\n\n scope.labels = new Array(7);\n for (var j = 0; j < 7; j++) {\n scope.labels[j] = {\n abbr: dateFilter(days[j].date, this.formatDayHeader),\n full: dateFilter(days[j].date, 'EEEE')\n };\n }\n\n scope.title = dateFilter(this.activeDate, this.formatDayTitle);\n scope.rows = this.split(days, 7);\n\n if (scope.showWeeks) {\n scope.weekNumbers = [];\n var thursdayIndex = (4 + 7 - this.startingDay) % 7,\n numWeeks = scope.rows.length;\n for (var curWeek = 0; curWeek < numWeeks; curWeek++) {\n scope.weekNumbers.push(\n getISO8601WeekNumber(scope.rows[curWeek][thursdayIndex].date));\n }\n }\n };\n\n this.compare = function(date1, date2) {\n var _date1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());\n var _date2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());\n _date1.setFullYear(date1.getFullYear());\n _date2.setFullYear(date2.getFullYear());\n return _date1 - _date2;\n };\n\n function getISO8601WeekNumber(date) {\n var checkDate = new Date(date);\n checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); // Thursday\n var time = checkDate.getTime();\n checkDate.setMonth(0); // Compare with Jan 1\n checkDate.setDate(1);\n return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;\n }\n\n this.handleKeyDown = function(key, evt) {\n var date = this.activeDate.getDate();\n\n if (key === 'left') {\n date = date - 1;\n } else if (key === 'up') {\n date = date - 7;\n } else if (key === 'right') {\n date = date + 1;\n } else if (key === 'down') {\n date = date + 7;\n } else if (key === 'pageup' || key === 'pagedown') {\n var month = this.activeDate.getMonth() + (key === 'pageup' ? - 1 : 1);\n this.activeDate.setMonth(month, 1);\n date = Math.min(getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth()), date);\n } else if (key === 'home') {\n date = 1;\n } else if (key === 'end') {\n date = getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth());\n }\n this.activeDate.setDate(date);\n };\n}])\n\n.controller('UibMonthpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {\n this.step = { years: 1 };\n this.element = $element;\n\n this.init = function(ctrl) {\n angular.extend(ctrl, this);\n ctrl.refreshView();\n };\n\n this._refreshView = function() {\n var months = new Array(12),\n year = this.activeDate.getFullYear(),\n date;\n\n for (var i = 0; i < 12; i++) {\n date = new Date(this.activeDate);\n date.setFullYear(year, i, 1);\n months[i] = angular.extend(this.createDateObject(date, this.formatMonth), {\n uid: scope.uniqueId + '-' + i\n });\n }\n\n scope.title = dateFilter(this.activeDate, this.formatMonthTitle);\n scope.rows = this.split(months, this.monthColumns);\n scope.yearHeaderColspan = this.monthColumns > 3 ? this.monthColumns - 2 : 1;\n };\n\n this.compare = function(date1, date2) {\n var _date1 = new Date(date1.getFullYear(), date1.getMonth());\n var _date2 = new Date(date2.getFullYear(), date2.getMonth());\n _date1.setFullYear(date1.getFullYear());\n _date2.setFullYear(date2.getFullYear());\n return _date1 - _date2;\n };\n\n this.handleKeyDown = function(key, evt) {\n var date = this.activeDate.getMonth();\n\n if (key === 'left') {\n date = date - 1;\n } else if (key === 'up') {\n date = date - this.monthColumns;\n } else if (key === 'right') {\n date = date + 1;\n } else if (key === 'down') {\n date = date + this.monthColumns;\n } else if (key === 'pageup' || key === 'pagedown') {\n var year = this.activeDate.getFullYear() + (key === 'pageup' ? - 1 : 1);\n this.activeDate.setFullYear(year);\n } else if (key === 'home') {\n date = 0;\n } else if (key === 'end') {\n date = 11;\n }\n this.activeDate.setMonth(date);\n };\n}])\n\n.controller('UibYearpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {\n var columns, range;\n this.element = $element;\n\n function getStartingYear(year) {\n return parseInt((year - 1) / range, 10) * range + 1;\n }\n\n this.yearpickerInit = function() {\n columns = this.yearColumns;\n range = this.yearRows * columns;\n this.step = { years: range };\n };\n\n this._refreshView = function() {\n var years = new Array(range), date;\n\n for (var i = 0, start = getStartingYear(this.activeDate.getFullYear()); i < range; i++) {\n date = new Date(this.activeDate);\n date.setFullYear(start + i, 0, 1);\n years[i] = angular.extend(this.createDateObject(date, this.formatYear), {\n uid: scope.uniqueId + '-' + i\n });\n }\n\n scope.title = [years[0].label, years[range - 1].label].join(' - ');\n scope.rows = this.split(years, columns);\n scope.columns = columns;\n };\n\n this.compare = function(date1, date2) {\n return date1.getFullYear() - date2.getFullYear();\n };\n\n this.handleKeyDown = function(key, evt) {\n var date = this.activeDate.getFullYear();\n\n if (key === 'left') {\n date = date - 1;\n } else if (key === 'up') {\n date = date - columns;\n } else if (key === 'right') {\n date = date + 1;\n } else if (key === 'down') {\n date = date + columns;\n } else if (key === 'pageup' || key === 'pagedown') {\n date += (key === 'pageup' ? - 1 : 1) * range;\n } else if (key === 'home') {\n date = getStartingYear(this.activeDate.getFullYear());\n } else if (key === 'end') {\n date = getStartingYear(this.activeDate.getFullYear()) + range - 1;\n }\n this.activeDate.setFullYear(date);\n };\n}])\n\n.directive('uibDatepicker', function() {\n return {\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/datepicker/datepicker.html';\n },\n scope: {\n datepickerOptions: '=?'\n },\n require: ['uibDatepicker', '^ngModel'],\n restrict: 'A',\n controller: 'UibDatepickerController',\n controllerAs: 'datepicker',\n link: function(scope, element, attrs, ctrls) {\n var datepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1];\n\n datepickerCtrl.init(ngModelCtrl);\n }\n };\n})\n\n.directive('uibDaypicker', function() {\n return {\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/datepicker/day.html';\n },\n require: ['^uibDatepicker', 'uibDaypicker'],\n restrict: 'A',\n controller: 'UibDaypickerController',\n link: function(scope, element, attrs, ctrls) {\n var datepickerCtrl = ctrls[0],\n daypickerCtrl = ctrls[1];\n\n daypickerCtrl.init(datepickerCtrl);\n }\n };\n})\n\n.directive('uibMonthpicker', function() {\n return {\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/datepicker/month.html';\n },\n require: ['^uibDatepicker', 'uibMonthpicker'],\n restrict: 'A',\n controller: 'UibMonthpickerController',\n link: function(scope, element, attrs, ctrls) {\n var datepickerCtrl = ctrls[0],\n monthpickerCtrl = ctrls[1];\n\n monthpickerCtrl.init(datepickerCtrl);\n }\n };\n})\n\n.directive('uibYearpicker', function() {\n return {\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/datepicker/year.html';\n },\n require: ['^uibDatepicker', 'uibYearpicker'],\n restrict: 'A',\n controller: 'UibYearpickerController',\n link: function(scope, element, attrs, ctrls) {\n var ctrl = ctrls[0];\n angular.extend(ctrl, ctrls[1]);\n ctrl.yearpickerInit();\n\n ctrl.refreshView();\n }\n };\n});\n\nangular.module('ui.bootstrap.position', [])\n\n/**\n * A set of utility methods for working with the DOM.\n * It is meant to be used where we need to absolute-position elements in\n * relation to another element (this is the case for tooltips, popovers,\n * typeahead suggestions etc.).\n */\n .factory('$uibPosition', ['$document', '$window', function($document, $window) {\n /**\n * Used by scrollbarWidth() function to cache scrollbar's width.\n * Do not access this variable directly, use scrollbarWidth() instead.\n */\n var SCROLLBAR_WIDTH;\n /**\n * scrollbar on body and html element in IE and Edge overlay\n * content and should be considered 0 width.\n */\n var BODY_SCROLLBAR_WIDTH;\n var OVERFLOW_REGEX = {\n normal: /(auto|scroll)/,\n hidden: /(auto|scroll|hidden)/\n };\n var PLACEMENT_REGEX = {\n auto: /\\s?auto?\\s?/i,\n primary: /^(top|bottom|left|right)$/,\n secondary: /^(top|bottom|left|right|center)$/,\n vertical: /^(top|bottom)$/\n };\n var BODY_REGEX = /(HTML|BODY)/;\n\n return {\n\n /**\n * Provides a raw DOM element from a jQuery/jQLite element.\n *\n * @param {element} elem - The element to convert.\n *\n * @returns {element} A HTML element.\n */\n getRawNode: function(elem) {\n return elem.nodeName ? elem : elem[0] || elem;\n },\n\n /**\n * Provides a parsed number for a style property. Strips\n * units and casts invalid numbers to 0.\n *\n * @param {string} value - The style value to parse.\n *\n * @returns {number} A valid number.\n */\n parseStyle: function(value) {\n value = parseFloat(value);\n return isFinite(value) ? value : 0;\n },\n\n /**\n * Provides the closest positioned ancestor.\n *\n * @param {element} element - The element to get the offest parent for.\n *\n * @returns {element} The closest positioned ancestor.\n */\n offsetParent: function(elem) {\n elem = this.getRawNode(elem);\n\n var offsetParent = elem.offsetParent || $document[0].documentElement;\n\n function isStaticPositioned(el) {\n return ($window.getComputedStyle(el).position || 'static') === 'static';\n }\n\n while (offsetParent && offsetParent !== $document[0].documentElement && isStaticPositioned(offsetParent)) {\n offsetParent = offsetParent.offsetParent;\n }\n\n return offsetParent || $document[0].documentElement;\n },\n\n /**\n * Provides the scrollbar width, concept from TWBS measureScrollbar()\n * function in https://github.com/twbs/bootstrap/blob/master/js/modal.js\n * In IE and Edge, scollbar on body and html element overlay and should\n * return a width of 0.\n *\n * @returns {number} The width of the browser scollbar.\n */\n scrollbarWidth: function(isBody) {\n if (isBody) {\n if (angular.isUndefined(BODY_SCROLLBAR_WIDTH)) {\n var bodyElem = $document.find('body');\n bodyElem.addClass('uib-position-body-scrollbar-measure');\n BODY_SCROLLBAR_WIDTH = $window.innerWidth - bodyElem[0].clientWidth;\n BODY_SCROLLBAR_WIDTH = isFinite(BODY_SCROLLBAR_WIDTH) ? BODY_SCROLLBAR_WIDTH : 0;\n bodyElem.removeClass('uib-position-body-scrollbar-measure');\n }\n return BODY_SCROLLBAR_WIDTH;\n }\n\n if (angular.isUndefined(SCROLLBAR_WIDTH)) {\n var scrollElem = angular.element('
');\n $document.find('body').append(scrollElem);\n SCROLLBAR_WIDTH = scrollElem[0].offsetWidth - scrollElem[0].clientWidth;\n SCROLLBAR_WIDTH = isFinite(SCROLLBAR_WIDTH) ? SCROLLBAR_WIDTH : 0;\n scrollElem.remove();\n }\n\n return SCROLLBAR_WIDTH;\n },\n\n /**\n * Provides the padding required on an element to replace the scrollbar.\n *\n * @returns {object} An object with the following properties:\n *
    \n *
  • **scrollbarWidth**: the width of the scrollbar
  • \n *
  • **widthOverflow**: whether the the width is overflowing
  • \n *
  • **right**: the amount of right padding on the element needed to replace the scrollbar
  • \n *
  • **rightOriginal**: the amount of right padding currently on the element
  • \n *
  • **heightOverflow**: whether the the height is overflowing
  • \n *
  • **bottom**: the amount of bottom padding on the element needed to replace the scrollbar
  • \n *
  • **bottomOriginal**: the amount of bottom padding currently on the element
  • \n *
\n */\n scrollbarPadding: function(elem) {\n elem = this.getRawNode(elem);\n\n var elemStyle = $window.getComputedStyle(elem);\n var paddingRight = this.parseStyle(elemStyle.paddingRight);\n var paddingBottom = this.parseStyle(elemStyle.paddingBottom);\n var scrollParent = this.scrollParent(elem, false, true);\n var scrollbarWidth = this.scrollbarWidth(BODY_REGEX.test(scrollParent.tagName));\n\n return {\n scrollbarWidth: scrollbarWidth,\n widthOverflow: scrollParent.scrollWidth > scrollParent.clientWidth,\n right: paddingRight + scrollbarWidth,\n originalRight: paddingRight,\n heightOverflow: scrollParent.scrollHeight > scrollParent.clientHeight,\n bottom: paddingBottom + scrollbarWidth,\n originalBottom: paddingBottom\n };\n },\n\n /**\n * Checks to see if the element is scrollable.\n *\n * @param {element} elem - The element to check.\n * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered,\n * default is false.\n *\n * @returns {boolean} Whether the element is scrollable.\n */\n isScrollable: function(elem, includeHidden) {\n elem = this.getRawNode(elem);\n\n var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal;\n var elemStyle = $window.getComputedStyle(elem);\n return overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX);\n },\n\n /**\n * Provides the closest scrollable ancestor.\n * A port of the jQuery UI scrollParent method:\n * https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js\n *\n * @param {element} elem - The element to find the scroll parent of.\n * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered,\n * default is false.\n * @param {boolean=} [includeSelf=false] - Should the element being passed be\n * included in the scrollable llokup.\n *\n * @returns {element} A HTML element.\n */\n scrollParent: function(elem, includeHidden, includeSelf) {\n elem = this.getRawNode(elem);\n\n var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal;\n var documentEl = $document[0].documentElement;\n var elemStyle = $window.getComputedStyle(elem);\n if (includeSelf && overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX)) {\n return elem;\n }\n var excludeStatic = elemStyle.position === 'absolute';\n var scrollParent = elem.parentElement || documentEl;\n\n if (scrollParent === documentEl || elemStyle.position === 'fixed') {\n return documentEl;\n }\n\n while (scrollParent.parentElement && scrollParent !== documentEl) {\n var spStyle = $window.getComputedStyle(scrollParent);\n if (excludeStatic && spStyle.position !== 'static') {\n excludeStatic = false;\n }\n\n if (!excludeStatic && overflowRegex.test(spStyle.overflow + spStyle.overflowY + spStyle.overflowX)) {\n break;\n }\n scrollParent = scrollParent.parentElement;\n }\n\n return scrollParent;\n },\n\n /**\n * Provides read-only equivalent of jQuery's position function:\n * http://api.jquery.com/position/ - distance to closest positioned\n * ancestor. Does not account for margins by default like jQuery position.\n *\n * @param {element} elem - The element to caclulate the position on.\n * @param {boolean=} [includeMargins=false] - Should margins be accounted\n * for, default is false.\n *\n * @returns {object} An object with the following properties:\n *
    \n *
  • **width**: the width of the element
  • \n *
  • **height**: the height of the element
  • \n *
  • **top**: distance to top edge of offset parent
  • \n *
  • **left**: distance to left edge of offset parent
  • \n *
\n */\n position: function(elem, includeMagins) {\n elem = this.getRawNode(elem);\n\n var elemOffset = this.offset(elem);\n if (includeMagins) {\n var elemStyle = $window.getComputedStyle(elem);\n elemOffset.top -= this.parseStyle(elemStyle.marginTop);\n elemOffset.left -= this.parseStyle(elemStyle.marginLeft);\n }\n var parent = this.offsetParent(elem);\n var parentOffset = {top: 0, left: 0};\n\n if (parent !== $document[0].documentElement) {\n parentOffset = this.offset(parent);\n parentOffset.top += parent.clientTop - parent.scrollTop;\n parentOffset.left += parent.clientLeft - parent.scrollLeft;\n }\n\n return {\n width: Math.round(angular.isNumber(elemOffset.width) ? elemOffset.width : elem.offsetWidth),\n height: Math.round(angular.isNumber(elemOffset.height) ? elemOffset.height : elem.offsetHeight),\n top: Math.round(elemOffset.top - parentOffset.top),\n left: Math.round(elemOffset.left - parentOffset.left)\n };\n },\n\n /**\n * Provides read-only equivalent of jQuery's offset function:\n * http://api.jquery.com/offset/ - distance to viewport. Does\n * not account for borders, margins, or padding on the body\n * element.\n *\n * @param {element} elem - The element to calculate the offset on.\n *\n * @returns {object} An object with the following properties:\n *
    \n *
  • **width**: the width of the element
  • \n *
  • **height**: the height of the element
  • \n *
  • **top**: distance to top edge of viewport
  • \n *
  • **right**: distance to bottom edge of viewport
  • \n *
\n */\n offset: function(elem) {\n elem = this.getRawNode(elem);\n\n var elemBCR = elem.getBoundingClientRect();\n return {\n width: Math.round(angular.isNumber(elemBCR.width) ? elemBCR.width : elem.offsetWidth),\n height: Math.round(angular.isNumber(elemBCR.height) ? elemBCR.height : elem.offsetHeight),\n top: Math.round(elemBCR.top + ($window.pageYOffset || $document[0].documentElement.scrollTop)),\n left: Math.round(elemBCR.left + ($window.pageXOffset || $document[0].documentElement.scrollLeft))\n };\n },\n\n /**\n * Provides offset distance to the closest scrollable ancestor\n * or viewport. Accounts for border and scrollbar width.\n *\n * Right and bottom dimensions represent the distance to the\n * respective edge of the viewport element. If the element\n * edge extends beyond the viewport, a negative value will be\n * reported.\n *\n * @param {element} elem - The element to get the viewport offset for.\n * @param {boolean=} [useDocument=false] - Should the viewport be the document element instead\n * of the first scrollable element, default is false.\n * @param {boolean=} [includePadding=true] - Should the padding on the offset parent element\n * be accounted for, default is true.\n *\n * @returns {object} An object with the following properties:\n *
    \n *
  • **top**: distance to the top content edge of viewport element
  • \n *
  • **bottom**: distance to the bottom content edge of viewport element
  • \n *
  • **left**: distance to the left content edge of viewport element
  • \n *
  • **right**: distance to the right content edge of viewport element
  • \n *
\n */\n viewportOffset: function(elem, useDocument, includePadding) {\n elem = this.getRawNode(elem);\n includePadding = includePadding !== false ? true : false;\n\n var elemBCR = elem.getBoundingClientRect();\n var offsetBCR = {top: 0, left: 0, bottom: 0, right: 0};\n\n var offsetParent = useDocument ? $document[0].documentElement : this.scrollParent(elem);\n var offsetParentBCR = offsetParent.getBoundingClientRect();\n\n offsetBCR.top = offsetParentBCR.top + offsetParent.clientTop;\n offsetBCR.left = offsetParentBCR.left + offsetParent.clientLeft;\n if (offsetParent === $document[0].documentElement) {\n offsetBCR.top += $window.pageYOffset;\n offsetBCR.left += $window.pageXOffset;\n }\n offsetBCR.bottom = offsetBCR.top + offsetParent.clientHeight;\n offsetBCR.right = offsetBCR.left + offsetParent.clientWidth;\n\n if (includePadding) {\n var offsetParentStyle = $window.getComputedStyle(offsetParent);\n offsetBCR.top += this.parseStyle(offsetParentStyle.paddingTop);\n offsetBCR.bottom -= this.parseStyle(offsetParentStyle.paddingBottom);\n offsetBCR.left += this.parseStyle(offsetParentStyle.paddingLeft);\n offsetBCR.right -= this.parseStyle(offsetParentStyle.paddingRight);\n }\n\n return {\n top: Math.round(elemBCR.top - offsetBCR.top),\n bottom: Math.round(offsetBCR.bottom - elemBCR.bottom),\n left: Math.round(elemBCR.left - offsetBCR.left),\n right: Math.round(offsetBCR.right - elemBCR.right)\n };\n },\n\n /**\n * Provides an array of placement values parsed from a placement string.\n * Along with the 'auto' indicator, supported placement strings are:\n *
    \n *
  • top: element on top, horizontally centered on host element.
  • \n *
  • top-left: element on top, left edge aligned with host element left edge.
  • \n *
  • top-right: element on top, lerightft edge aligned with host element right edge.
  • \n *
  • bottom: element on bottom, horizontally centered on host element.
  • \n *
  • bottom-left: element on bottom, left edge aligned with host element left edge.
  • \n *
  • bottom-right: element on bottom, right edge aligned with host element right edge.
  • \n *
  • left: element on left, vertically centered on host element.
  • \n *
  • left-top: element on left, top edge aligned with host element top edge.
  • \n *
  • left-bottom: element on left, bottom edge aligned with host element bottom edge.
  • \n *
  • right: element on right, vertically centered on host element.
  • \n *
  • right-top: element on right, top edge aligned with host element top edge.
  • \n *
  • right-bottom: element on right, bottom edge aligned with host element bottom edge.
  • \n *
\n * A placement string with an 'auto' indicator is expected to be\n * space separated from the placement, i.e: 'auto bottom-left' If\n * the primary and secondary placement values do not match 'top,\n * bottom, left, right' then 'top' will be the primary placement and\n * 'center' will be the secondary placement. If 'auto' is passed, true\n * will be returned as the 3rd value of the array.\n *\n * @param {string} placement - The placement string to parse.\n *\n * @returns {array} An array with the following values\n *
    \n *
  • **[0]**: The primary placement.
  • \n *
  • **[1]**: The secondary placement.
  • \n *
  • **[2]**: If auto is passed: true, else undefined.
  • \n *
\n */\n parsePlacement: function(placement) {\n var autoPlace = PLACEMENT_REGEX.auto.test(placement);\n if (autoPlace) {\n placement = placement.replace(PLACEMENT_REGEX.auto, '');\n }\n\n placement = placement.split('-');\n\n placement[0] = placement[0] || 'top';\n if (!PLACEMENT_REGEX.primary.test(placement[0])) {\n placement[0] = 'top';\n }\n\n placement[1] = placement[1] || 'center';\n if (!PLACEMENT_REGEX.secondary.test(placement[1])) {\n placement[1] = 'center';\n }\n\n if (autoPlace) {\n placement[2] = true;\n } else {\n placement[2] = false;\n }\n\n return placement;\n },\n\n /**\n * Provides coordinates for an element to be positioned relative to\n * another element. Passing 'auto' as part of the placement parameter\n * will enable smart placement - where the element fits. i.e:\n * 'auto left-top' will check to see if there is enough space to the left\n * of the hostElem to fit the targetElem, if not place right (same for secondary\n * top placement). Available space is calculated using the viewportOffset\n * function.\n *\n * @param {element} hostElem - The element to position against.\n * @param {element} targetElem - The element to position.\n * @param {string=} [placement=top] - The placement for the targetElem,\n * default is 'top'. 'center' is assumed as secondary placement for\n * 'top', 'left', 'right', and 'bottom' placements. Available placements are:\n *
    \n *
  • top
  • \n *
  • top-right
  • \n *
  • top-left
  • \n *
  • bottom
  • \n *
  • bottom-left
  • \n *
  • bottom-right
  • \n *
  • left
  • \n *
  • left-top
  • \n *
  • left-bottom
  • \n *
  • right
  • \n *
  • right-top
  • \n *
  • right-bottom
  • \n *
\n * @param {boolean=} [appendToBody=false] - Should the top and left values returned\n * be calculated from the body element, default is false.\n *\n * @returns {object} An object with the following properties:\n *
    \n *
  • **top**: Value for targetElem top.
  • \n *
  • **left**: Value for targetElem left.
  • \n *
  • **placement**: The resolved placement.
  • \n *
\n */\n positionElements: function(hostElem, targetElem, placement, appendToBody) {\n hostElem = this.getRawNode(hostElem);\n targetElem = this.getRawNode(targetElem);\n\n // need to read from prop to support tests.\n var targetWidth = angular.isDefined(targetElem.offsetWidth) ? targetElem.offsetWidth : targetElem.prop('offsetWidth');\n var targetHeight = angular.isDefined(targetElem.offsetHeight) ? targetElem.offsetHeight : targetElem.prop('offsetHeight');\n\n placement = this.parsePlacement(placement);\n\n var hostElemPos = appendToBody ? this.offset(hostElem) : this.position(hostElem);\n var targetElemPos = {top: 0, left: 0, placement: ''};\n\n if (placement[2]) {\n var viewportOffset = this.viewportOffset(hostElem, appendToBody);\n\n var targetElemStyle = $window.getComputedStyle(targetElem);\n var adjustedSize = {\n width: targetWidth + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginLeft) + this.parseStyle(targetElemStyle.marginRight))),\n height: targetHeight + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginTop) + this.parseStyle(targetElemStyle.marginBottom)))\n };\n\n placement[0] = placement[0] === 'top' && adjustedSize.height > viewportOffset.top && adjustedSize.height <= viewportOffset.bottom ? 'bottom' :\n placement[0] === 'bottom' && adjustedSize.height > viewportOffset.bottom && adjustedSize.height <= viewportOffset.top ? 'top' :\n placement[0] === 'left' && adjustedSize.width > viewportOffset.left && adjustedSize.width <= viewportOffset.right ? 'right' :\n placement[0] === 'right' && adjustedSize.width > viewportOffset.right && adjustedSize.width <= viewportOffset.left ? 'left' :\n placement[0];\n\n placement[1] = placement[1] === 'top' && adjustedSize.height - hostElemPos.height > viewportOffset.bottom && adjustedSize.height - hostElemPos.height <= viewportOffset.top ? 'bottom' :\n placement[1] === 'bottom' && adjustedSize.height - hostElemPos.height > viewportOffset.top && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom ? 'top' :\n placement[1] === 'left' && adjustedSize.width - hostElemPos.width > viewportOffset.right && adjustedSize.width - hostElemPos.width <= viewportOffset.left ? 'right' :\n placement[1] === 'right' && adjustedSize.width - hostElemPos.width > viewportOffset.left && adjustedSize.width - hostElemPos.width <= viewportOffset.right ? 'left' :\n placement[1];\n\n if (placement[1] === 'center') {\n if (PLACEMENT_REGEX.vertical.test(placement[0])) {\n var xOverflow = hostElemPos.width / 2 - targetWidth / 2;\n if (viewportOffset.left + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.right) {\n placement[1] = 'left';\n } else if (viewportOffset.right + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.left) {\n placement[1] = 'right';\n }\n } else {\n var yOverflow = hostElemPos.height / 2 - adjustedSize.height / 2;\n if (viewportOffset.top + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom) {\n placement[1] = 'top';\n } else if (viewportOffset.bottom + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.top) {\n placement[1] = 'bottom';\n }\n }\n }\n }\n\n switch (placement[0]) {\n case 'top':\n targetElemPos.top = hostElemPos.top - targetHeight;\n break;\n case 'bottom':\n targetElemPos.top = hostElemPos.top + hostElemPos.height;\n break;\n case 'left':\n targetElemPos.left = hostElemPos.left - targetWidth;\n break;\n case 'right':\n targetElemPos.left = hostElemPos.left + hostElemPos.width;\n break;\n }\n\n switch (placement[1]) {\n case 'top':\n targetElemPos.top = hostElemPos.top;\n break;\n case 'bottom':\n targetElemPos.top = hostElemPos.top + hostElemPos.height - targetHeight;\n break;\n case 'left':\n targetElemPos.left = hostElemPos.left;\n break;\n case 'right':\n targetElemPos.left = hostElemPos.left + hostElemPos.width - targetWidth;\n break;\n case 'center':\n if (PLACEMENT_REGEX.vertical.test(placement[0])) {\n targetElemPos.left = hostElemPos.left + hostElemPos.width / 2 - targetWidth / 2;\n } else {\n targetElemPos.top = hostElemPos.top + hostElemPos.height / 2 - targetHeight / 2;\n }\n break;\n }\n\n targetElemPos.top = Math.round(targetElemPos.top);\n targetElemPos.left = Math.round(targetElemPos.left);\n targetElemPos.placement = placement[1] === 'center' ? placement[0] : placement[0] + '-' + placement[1];\n\n return targetElemPos;\n },\n\n /**\n * Provides a way to adjust the top positioning after first\n * render to correctly align element to top after content\n * rendering causes resized element height\n *\n * @param {array} placementClasses - The array of strings of classes\n * element should have.\n * @param {object} containerPosition - The object with container\n * position information\n * @param {number} initialHeight - The initial height for the elem.\n * @param {number} currentHeight - The current height for the elem.\n */\n adjustTop: function(placementClasses, containerPosition, initialHeight, currentHeight) {\n if (placementClasses.indexOf('top') !== -1 && initialHeight !== currentHeight) {\n return {\n top: containerPosition.top - currentHeight + 'px'\n };\n }\n },\n\n /**\n * Provides a way for positioning tooltip & dropdown\n * arrows when using placement options beyond the standard\n * left, right, top, or bottom.\n *\n * @param {element} elem - The tooltip/dropdown element.\n * @param {string} placement - The placement for the elem.\n */\n positionArrow: function(elem, placement) {\n elem = this.getRawNode(elem);\n\n var innerElem = elem.querySelector('.tooltip-inner, .popover-inner');\n if (!innerElem) {\n return;\n }\n\n var isTooltip = angular.element(innerElem).hasClass('tooltip-inner');\n\n var arrowElem = isTooltip ? elem.querySelector('.tooltip-arrow') : elem.querySelector('.arrow');\n if (!arrowElem) {\n return;\n }\n\n var arrowCss = {\n top: '',\n bottom: '',\n left: '',\n right: ''\n };\n\n placement = this.parsePlacement(placement);\n if (placement[1] === 'center') {\n // no adjustment necessary - just reset styles\n angular.element(arrowElem).css(arrowCss);\n return;\n }\n\n var borderProp = 'border-' + placement[0] + '-width';\n var borderWidth = $window.getComputedStyle(arrowElem)[borderProp];\n\n var borderRadiusProp = 'border-';\n if (PLACEMENT_REGEX.vertical.test(placement[0])) {\n borderRadiusProp += placement[0] + '-' + placement[1];\n } else {\n borderRadiusProp += placement[1] + '-' + placement[0];\n }\n borderRadiusProp += '-radius';\n var borderRadius = $window.getComputedStyle(isTooltip ? innerElem : elem)[borderRadiusProp];\n\n switch (placement[0]) {\n case 'top':\n arrowCss.bottom = isTooltip ? '0' : '-' + borderWidth;\n break;\n case 'bottom':\n arrowCss.top = isTooltip ? '0' : '-' + borderWidth;\n break;\n case 'left':\n arrowCss.right = isTooltip ? '0' : '-' + borderWidth;\n break;\n case 'right':\n arrowCss.left = isTooltip ? '0' : '-' + borderWidth;\n break;\n }\n\n arrowCss[placement[1]] = borderRadius;\n\n angular.element(arrowElem).css(arrowCss);\n }\n };\n }]);\n\nangular.module('ui.bootstrap.datepickerPopup', ['ui.bootstrap.datepicker', 'ui.bootstrap.position'])\n\n.value('$datepickerPopupLiteralWarning', true)\n\n.constant('uibDatepickerPopupConfig', {\n altInputFormats: [],\n appendToBody: false,\n clearText: 'Clear',\n closeOnDateSelection: true,\n closeText: 'Done',\n currentText: 'Today',\n datepickerPopup: 'yyyy-MM-dd',\n datepickerPopupTemplateUrl: 'uib/template/datepickerPopup/popup.html',\n datepickerTemplateUrl: 'uib/template/datepicker/datepicker.html',\n html5Types: {\n date: 'yyyy-MM-dd',\n 'datetime-local': 'yyyy-MM-ddTHH:mm:ss.sss',\n 'month': 'yyyy-MM'\n },\n onOpenFocus: true,\n showButtonBar: true,\n placement: 'auto bottom-left'\n})\n\n.controller('UibDatepickerPopupController', ['$scope', '$element', '$attrs', '$compile', '$log', '$parse', '$window', '$document', '$rootScope', '$uibPosition', 'dateFilter', 'uibDateParser', 'uibDatepickerPopupConfig', '$timeout', 'uibDatepickerConfig', '$datepickerPopupLiteralWarning',\nfunction($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $rootScope, $position, dateFilter, dateParser, datepickerPopupConfig, $timeout, datepickerConfig, $datepickerPopupLiteralWarning) {\n var cache = {},\n isHtml5DateInput = false;\n var dateFormat, closeOnDateSelection, appendToBody, onOpenFocus,\n datepickerPopupTemplateUrl, datepickerTemplateUrl, popupEl, datepickerEl, scrollParentEl,\n ngModel, ngModelOptions, $popup, altInputFormats, watchListeners = [];\n\n this.init = function(_ngModel_) {\n ngModel = _ngModel_;\n ngModelOptions = extractOptions(ngModel);\n closeOnDateSelection = angular.isDefined($attrs.closeOnDateSelection) ?\n $scope.$parent.$eval($attrs.closeOnDateSelection) :\n datepickerPopupConfig.closeOnDateSelection;\n appendToBody = angular.isDefined($attrs.datepickerAppendToBody) ?\n $scope.$parent.$eval($attrs.datepickerAppendToBody) :\n datepickerPopupConfig.appendToBody;\n onOpenFocus = angular.isDefined($attrs.onOpenFocus) ?\n $scope.$parent.$eval($attrs.onOpenFocus) : datepickerPopupConfig.onOpenFocus;\n datepickerPopupTemplateUrl = angular.isDefined($attrs.datepickerPopupTemplateUrl) ?\n $attrs.datepickerPopupTemplateUrl :\n datepickerPopupConfig.datepickerPopupTemplateUrl;\n datepickerTemplateUrl = angular.isDefined($attrs.datepickerTemplateUrl) ?\n $attrs.datepickerTemplateUrl : datepickerPopupConfig.datepickerTemplateUrl;\n altInputFormats = angular.isDefined($attrs.altInputFormats) ?\n $scope.$parent.$eval($attrs.altInputFormats) :\n datepickerPopupConfig.altInputFormats;\n\n $scope.showButtonBar = angular.isDefined($attrs.showButtonBar) ?\n $scope.$parent.$eval($attrs.showButtonBar) :\n datepickerPopupConfig.showButtonBar;\n\n if (datepickerPopupConfig.html5Types[$attrs.type]) {\n dateFormat = datepickerPopupConfig.html5Types[$attrs.type];\n isHtml5DateInput = true;\n } else {\n dateFormat = $attrs.uibDatepickerPopup || datepickerPopupConfig.datepickerPopup;\n $attrs.$observe('uibDatepickerPopup', function(value, oldValue) {\n var newDateFormat = value || datepickerPopupConfig.datepickerPopup;\n // Invalidate the $modelValue to ensure that formatters re-run\n // FIXME: Refactor when PR is merged: https://github.com/angular/angular.js/pull/10764\n if (newDateFormat !== dateFormat) {\n dateFormat = newDateFormat;\n ngModel.$modelValue = null;\n\n if (!dateFormat) {\n throw new Error('uibDatepickerPopup must have a date format specified.');\n }\n }\n });\n }\n\n if (!dateFormat) {\n throw new Error('uibDatepickerPopup must have a date format specified.');\n }\n\n if (isHtml5DateInput && $attrs.uibDatepickerPopup) {\n throw new Error('HTML5 date input types do not support custom formats.');\n }\n\n // popup element used to display calendar\n popupEl = angular.element('
');\n\n popupEl.attr({\n 'ng-model': 'date',\n 'ng-change': 'dateSelection(date)',\n 'template-url': datepickerPopupTemplateUrl\n });\n\n // datepicker element\n datepickerEl = angular.element(popupEl.children()[0]);\n datepickerEl.attr('template-url', datepickerTemplateUrl);\n\n if (!$scope.datepickerOptions) {\n $scope.datepickerOptions = {};\n }\n\n if (isHtml5DateInput) {\n if ($attrs.type === 'month') {\n $scope.datepickerOptions.datepickerMode = 'month';\n $scope.datepickerOptions.minMode = 'month';\n }\n }\n\n datepickerEl.attr('datepicker-options', 'datepickerOptions');\n\n if (!isHtml5DateInput) {\n // Internal API to maintain the correct ng-invalid-[key] class\n ngModel.$$parserName = 'date';\n ngModel.$validators.date = validator;\n ngModel.$parsers.unshift(parseDate);\n ngModel.$formatters.push(function(value) {\n if (ngModel.$isEmpty(value)) {\n $scope.date = value;\n return value;\n }\n\n if (angular.isNumber(value)) {\n value = new Date(value);\n }\n\n $scope.date = dateParser.fromTimezone(value, ngModelOptions.getOption('timezone'));\n\n return dateParser.filter($scope.date, dateFormat);\n });\n } else {\n ngModel.$formatters.push(function(value) {\n $scope.date = dateParser.fromTimezone(value, ngModelOptions.getOption('timezone'));\n return value;\n });\n }\n\n // Detect changes in the view from the text box\n ngModel.$viewChangeListeners.push(function() {\n $scope.date = parseDateString(ngModel.$viewValue);\n });\n\n $element.on('keydown', inputKeydownBind);\n\n $popup = $compile(popupEl)($scope);\n // Prevent jQuery cache memory leak (template is now redundant after linking)\n popupEl.remove();\n\n if (appendToBody) {\n $document.find('body').append($popup);\n } else {\n $element.after($popup);\n }\n\n $scope.$on('$destroy', function() {\n if ($scope.isOpen === true) {\n if (!$rootScope.$$phase) {\n $scope.$apply(function() {\n $scope.isOpen = false;\n });\n }\n }\n\n $popup.remove();\n $element.off('keydown', inputKeydownBind);\n $document.off('click', documentClickBind);\n if (scrollParentEl) {\n scrollParentEl.off('scroll', positionPopup);\n }\n angular.element($window).off('resize', positionPopup);\n\n //Clear all watch listeners on destroy\n while (watchListeners.length) {\n watchListeners.shift()();\n }\n });\n };\n\n $scope.getText = function(key) {\n return $scope[key + 'Text'] || datepickerPopupConfig[key + 'Text'];\n };\n\n $scope.isDisabled = function(date) {\n if (date === 'today') {\n date = dateParser.fromTimezone(new Date(), ngModelOptions.getOption('timezone'));\n }\n\n var dates = {};\n angular.forEach(['minDate', 'maxDate'], function(key) {\n if (!$scope.datepickerOptions[key]) {\n dates[key] = null;\n } else if (angular.isDate($scope.datepickerOptions[key])) {\n dates[key] = new Date($scope.datepickerOptions[key]);\n } else {\n if ($datepickerPopupLiteralWarning) {\n $log.warn('Literal date support has been deprecated, please switch to date object usage');\n }\n\n dates[key] = new Date(dateFilter($scope.datepickerOptions[key], 'medium'));\n }\n });\n\n return $scope.datepickerOptions &&\n dates.minDate && $scope.compare(date, dates.minDate) < 0 ||\n dates.maxDate && $scope.compare(date, dates.maxDate) > 0;\n };\n\n $scope.compare = function(date1, date2) {\n return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());\n };\n\n // Inner change\n $scope.dateSelection = function(dt) {\n $scope.date = dt;\n var date = $scope.date ? dateParser.filter($scope.date, dateFormat) : null; // Setting to NULL is necessary for form validators to function\n $element.val(date);\n ngModel.$setViewValue(date);\n\n if (closeOnDateSelection) {\n $scope.isOpen = false;\n $element[0].focus();\n }\n };\n\n $scope.keydown = function(evt) {\n if (evt.which === 27) {\n evt.stopPropagation();\n $scope.isOpen = false;\n $element[0].focus();\n }\n };\n\n $scope.select = function(date, evt) {\n evt.stopPropagation();\n\n if (date === 'today') {\n var today = new Date();\n if (angular.isDate($scope.date)) {\n date = new Date($scope.date);\n date.setFullYear(today.getFullYear(), today.getMonth(), today.getDate());\n } else {\n date = dateParser.fromTimezone(today, ngModelOptions.getOption('timezone'));\n date.setHours(0, 0, 0, 0);\n }\n }\n $scope.dateSelection(date);\n };\n\n $scope.close = function(evt) {\n evt.stopPropagation();\n\n $scope.isOpen = false;\n $element[0].focus();\n };\n\n $scope.disabled = angular.isDefined($attrs.disabled) || false;\n if ($attrs.ngDisabled) {\n watchListeners.push($scope.$parent.$watch($parse($attrs.ngDisabled), function(disabled) {\n $scope.disabled = disabled;\n }));\n }\n\n $scope.$watch('isOpen', function(value) {\n if (value) {\n if (!$scope.disabled) {\n $timeout(function() {\n positionPopup();\n\n if (onOpenFocus) {\n $scope.$broadcast('uib:datepicker.focus');\n }\n\n $document.on('click', documentClickBind);\n\n var placement = $attrs.popupPlacement ? $attrs.popupPlacement : datepickerPopupConfig.placement;\n if (appendToBody || $position.parsePlacement(placement)[2]) {\n scrollParentEl = scrollParentEl || angular.element($position.scrollParent($element));\n if (scrollParentEl) {\n scrollParentEl.on('scroll', positionPopup);\n }\n } else {\n scrollParentEl = null;\n }\n\n angular.element($window).on('resize', positionPopup);\n }, 0, false);\n } else {\n $scope.isOpen = false;\n }\n } else {\n $document.off('click', documentClickBind);\n if (scrollParentEl) {\n scrollParentEl.off('scroll', positionPopup);\n }\n angular.element($window).off('resize', positionPopup);\n }\n });\n\n function cameltoDash(string) {\n return string.replace(/([A-Z])/g, function($1) { return '-' + $1.toLowerCase(); });\n }\n\n function parseDateString(viewValue) {\n var date = dateParser.parse(viewValue, dateFormat, $scope.date);\n if (isNaN(date)) {\n for (var i = 0; i < altInputFormats.length; i++) {\n date = dateParser.parse(viewValue, altInputFormats[i], $scope.date);\n if (!isNaN(date)) {\n return date;\n }\n }\n }\n return date;\n }\n\n function parseDate(viewValue) {\n if (angular.isNumber(viewValue)) {\n // presumably timestamp to date object\n viewValue = new Date(viewValue);\n }\n\n if (!viewValue) {\n return null;\n }\n\n if (angular.isDate(viewValue) && !isNaN(viewValue)) {\n return viewValue;\n }\n\n if (angular.isString(viewValue)) {\n var date = parseDateString(viewValue);\n if (!isNaN(date)) {\n return dateParser.toTimezone(date, ngModelOptions.getOption('timezone'));\n }\n }\n\n return ngModelOptions.getOption('allowInvalid') ? viewValue : undefined;\n }\n\n function validator(modelValue, viewValue) {\n var value = modelValue || viewValue;\n\n if (!$attrs.ngRequired && !value) {\n return true;\n }\n\n if (angular.isNumber(value)) {\n value = new Date(value);\n }\n\n if (!value) {\n return true;\n }\n\n if (angular.isDate(value) && !isNaN(value)) {\n return true;\n }\n\n if (angular.isString(value)) {\n return !isNaN(parseDateString(value));\n }\n\n return false;\n }\n\n function documentClickBind(event) {\n if (!$scope.isOpen && $scope.disabled) {\n return;\n }\n\n var popup = $popup[0];\n var dpContainsTarget = $element[0].contains(event.target);\n // The popup node may not be an element node\n // In some browsers (IE) only element nodes have the 'contains' function\n var popupContainsTarget = popup.contains !== undefined && popup.contains(event.target);\n if ($scope.isOpen && !(dpContainsTarget || popupContainsTarget)) {\n $scope.$apply(function() {\n $scope.isOpen = false;\n });\n }\n }\n\n function inputKeydownBind(evt) {\n if (evt.which === 27 && $scope.isOpen) {\n evt.preventDefault();\n evt.stopPropagation();\n $scope.$apply(function() {\n $scope.isOpen = false;\n });\n $element[0].focus();\n } else if (evt.which === 40 && !$scope.isOpen) {\n evt.preventDefault();\n evt.stopPropagation();\n $scope.$apply(function() {\n $scope.isOpen = true;\n });\n }\n }\n\n function positionPopup() {\n if ($scope.isOpen) {\n var dpElement = angular.element($popup[0].querySelector('.uib-datepicker-popup'));\n var placement = $attrs.popupPlacement ? $attrs.popupPlacement : datepickerPopupConfig.placement;\n var position = $position.positionElements($element, dpElement, placement, appendToBody);\n dpElement.css({top: position.top + 'px', left: position.left + 'px'});\n if (dpElement.hasClass('uib-position-measure')) {\n dpElement.removeClass('uib-position-measure');\n }\n }\n }\n\n function extractOptions(ngModelCtrl) {\n var ngModelOptions;\n\n if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing\n // guarantee a value\n ngModelOptions = angular.isObject(ngModelCtrl.$options) ?\n ngModelCtrl.$options :\n {\n timezone: null\n };\n\n // mimic 1.6+ api\n ngModelOptions.getOption = function (key) {\n return ngModelOptions[key];\n };\n } else { // in angular >=1.6 $options is always present\n ngModelOptions = ngModelCtrl.$options;\n }\n\n return ngModelOptions;\n }\n\n $scope.$on('uib:datepicker.mode', function() {\n $timeout(positionPopup, 0, false);\n });\n}])\n\n.directive('uibDatepickerPopup', function() {\n return {\n require: ['ngModel', 'uibDatepickerPopup'],\n controller: 'UibDatepickerPopupController',\n scope: {\n datepickerOptions: '=?',\n isOpen: '=?',\n currentText: '@',\n clearText: '@',\n closeText: '@'\n },\n link: function(scope, element, attrs, ctrls) {\n var ngModel = ctrls[0],\n ctrl = ctrls[1];\n\n ctrl.init(ngModel);\n }\n };\n})\n\n.directive('uibDatepickerPopupWrap', function() {\n return {\n restrict: 'A',\n transclude: true,\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/datepickerPopup/popup.html';\n }\n };\n});\n\nangular.module('ui.bootstrap.debounce', [])\n/**\n * A helper, internal service that debounces a function\n */\n .factory('$$debounce', ['$timeout', function($timeout) {\n return function(callback, debounceTime) {\n var timeoutPromise;\n\n return function() {\n var self = this;\n var args = Array.prototype.slice.call(arguments);\n if (timeoutPromise) {\n $timeout.cancel(timeoutPromise);\n }\n\n timeoutPromise = $timeout(function() {\n callback.apply(self, args);\n }, debounceTime);\n };\n };\n }]);\n\nangular.module('ui.bootstrap.multiMap', [])\n/**\n * A helper, internal data structure that stores all references attached to key\n */\n .factory('$$multiMap', function() {\n return {\n createNew: function() {\n var map = {};\n\n return {\n entries: function() {\n return Object.keys(map).map(function(key) {\n return {\n key: key,\n value: map[key]\n };\n });\n },\n get: function(key) {\n return map[key];\n },\n hasKey: function(key) {\n return !!map[key];\n },\n keys: function() {\n return Object.keys(map);\n },\n put: function(key, value) {\n if (!map[key]) {\n map[key] = [];\n }\n\n map[key].push(value);\n },\n remove: function(key, value) {\n var values = map[key];\n\n if (!values) {\n return;\n }\n\n var idx = values.indexOf(value);\n\n if (idx !== -1) {\n values.splice(idx, 1);\n }\n\n if (!values.length) {\n delete map[key];\n }\n }\n };\n }\n };\n });\n\nangular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.position'])\n\n.constant('uibDropdownConfig', {\n appendToOpenClass: 'uib-dropdown-open',\n openClass: 'open'\n})\n\n.service('uibDropdownService', ['$document', '$rootScope', '$$multiMap', function($document, $rootScope, $$multiMap) {\n var openScope = null;\n var openedContainers = $$multiMap.createNew();\n\n this.isOnlyOpen = function(dropdownScope, appendTo) {\n var openedDropdowns = openedContainers.get(appendTo);\n if (openedDropdowns) {\n var openDropdown = openedDropdowns.reduce(function(toClose, dropdown) {\n if (dropdown.scope === dropdownScope) {\n return dropdown;\n }\n\n return toClose;\n }, {});\n if (openDropdown) {\n return openedDropdowns.length === 1;\n }\n }\n\n return false;\n };\n\n this.open = function(dropdownScope, element, appendTo) {\n if (!openScope) {\n $document.on('click', closeDropdown);\n }\n\n if (openScope && openScope !== dropdownScope) {\n openScope.isOpen = false;\n }\n\n openScope = dropdownScope;\n\n if (!appendTo) {\n return;\n }\n\n var openedDropdowns = openedContainers.get(appendTo);\n if (openedDropdowns) {\n var openedScopes = openedDropdowns.map(function(dropdown) {\n return dropdown.scope;\n });\n if (openedScopes.indexOf(dropdownScope) === -1) {\n openedContainers.put(appendTo, {\n scope: dropdownScope\n });\n }\n } else {\n openedContainers.put(appendTo, {\n scope: dropdownScope\n });\n }\n };\n\n this.close = function(dropdownScope, element, appendTo) {\n if (openScope === dropdownScope) {\n $document.off('click', closeDropdown);\n $document.off('keydown', this.keybindFilter);\n openScope = null;\n }\n\n if (!appendTo) {\n return;\n }\n\n var openedDropdowns = openedContainers.get(appendTo);\n if (openedDropdowns) {\n var dropdownToClose = openedDropdowns.reduce(function(toClose, dropdown) {\n if (dropdown.scope === dropdownScope) {\n return dropdown;\n }\n\n return toClose;\n }, {});\n if (dropdownToClose) {\n openedContainers.remove(appendTo, dropdownToClose);\n }\n }\n };\n\n var closeDropdown = function(evt) {\n // This method may still be called during the same mouse event that\n // unbound this event handler. So check openScope before proceeding.\n if (!openScope || !openScope.isOpen) { return; }\n\n if (evt && openScope.getAutoClose() === 'disabled') { return; }\n\n if (evt && evt.which === 3) { return; }\n\n var toggleElement = openScope.getToggleElement();\n if (evt && toggleElement && toggleElement[0].contains(evt.target)) {\n return;\n }\n\n var dropdownElement = openScope.getDropdownElement();\n if (evt && openScope.getAutoClose() === 'outsideClick' &&\n dropdownElement && dropdownElement[0].contains(evt.target)) {\n return;\n }\n\n openScope.focusToggleElement();\n openScope.isOpen = false;\n\n if (!$rootScope.$$phase) {\n openScope.$apply();\n }\n };\n\n this.keybindFilter = function(evt) {\n if (!openScope) {\n // see this.close as ESC could have been pressed which kills the scope so we can not proceed\n return;\n }\n\n var dropdownElement = openScope.getDropdownElement();\n var toggleElement = openScope.getToggleElement();\n var dropdownElementTargeted = dropdownElement && dropdownElement[0].contains(evt.target);\n var toggleElementTargeted = toggleElement && toggleElement[0].contains(evt.target);\n if (evt.which === 27) {\n evt.stopPropagation();\n openScope.focusToggleElement();\n closeDropdown();\n } else if (openScope.isKeynavEnabled() && [38, 40].indexOf(evt.which) !== -1 && openScope.isOpen && (dropdownElementTargeted || toggleElementTargeted)) {\n evt.preventDefault();\n evt.stopPropagation();\n openScope.focusDropdownEntry(evt.which);\n }\n };\n}])\n\n.controller('UibDropdownController', ['$scope', '$element', '$attrs', '$parse', 'uibDropdownConfig', 'uibDropdownService', '$animate', '$uibPosition', '$document', '$compile', '$templateRequest', function($scope, $element, $attrs, $parse, dropdownConfig, uibDropdownService, $animate, $position, $document, $compile, $templateRequest) {\n var self = this,\n scope = $scope.$new(), // create a child scope so we are not polluting original one\n templateScope,\n appendToOpenClass = dropdownConfig.appendToOpenClass,\n openClass = dropdownConfig.openClass,\n getIsOpen,\n setIsOpen = angular.noop,\n toggleInvoker = $attrs.onToggle ? $parse($attrs.onToggle) : angular.noop,\n keynavEnabled = false,\n selectedOption = null,\n body = $document.find('body');\n\n $element.addClass('dropdown');\n\n this.init = function() {\n if ($attrs.isOpen) {\n getIsOpen = $parse($attrs.isOpen);\n setIsOpen = getIsOpen.assign;\n\n $scope.$watch(getIsOpen, function(value) {\n scope.isOpen = !!value;\n });\n }\n\n keynavEnabled = angular.isDefined($attrs.keyboardNav);\n };\n\n this.toggle = function(open) {\n scope.isOpen = arguments.length ? !!open : !scope.isOpen;\n if (angular.isFunction(setIsOpen)) {\n setIsOpen(scope, scope.isOpen);\n }\n\n return scope.isOpen;\n };\n\n // Allow other directives to watch status\n this.isOpen = function() {\n return scope.isOpen;\n };\n\n scope.getToggleElement = function() {\n return self.toggleElement;\n };\n\n scope.getAutoClose = function() {\n return $attrs.autoClose || 'always'; //or 'outsideClick' or 'disabled'\n };\n\n scope.getElement = function() {\n return $element;\n };\n\n scope.isKeynavEnabled = function() {\n return keynavEnabled;\n };\n\n scope.focusDropdownEntry = function(keyCode) {\n var elems = self.dropdownMenu ? //If append to body is used.\n angular.element(self.dropdownMenu).find('a') :\n $element.find('ul').eq(0).find('a');\n\n switch (keyCode) {\n case 40: {\n if (!angular.isNumber(self.selectedOption)) {\n self.selectedOption = 0;\n } else {\n self.selectedOption = self.selectedOption === elems.length - 1 ?\n self.selectedOption :\n self.selectedOption + 1;\n }\n break;\n }\n case 38: {\n if (!angular.isNumber(self.selectedOption)) {\n self.selectedOption = elems.length - 1;\n } else {\n self.selectedOption = self.selectedOption === 0 ?\n 0 : self.selectedOption - 1;\n }\n break;\n }\n }\n elems[self.selectedOption].focus();\n };\n\n scope.getDropdownElement = function() {\n return self.dropdownMenu;\n };\n\n scope.focusToggleElement = function() {\n if (self.toggleElement) {\n self.toggleElement[0].focus();\n }\n };\n\n function removeDropdownMenu() {\n $element.append(self.dropdownMenu);\n }\n\n scope.$watch('isOpen', function(isOpen, wasOpen) {\n var appendTo = null,\n appendToBody = false;\n\n if (angular.isDefined($attrs.dropdownAppendTo)) {\n var appendToEl = $parse($attrs.dropdownAppendTo)(scope);\n if (appendToEl) {\n appendTo = angular.element(appendToEl);\n }\n }\n\n if (angular.isDefined($attrs.dropdownAppendToBody)) {\n var appendToBodyValue = $parse($attrs.dropdownAppendToBody)(scope);\n if (appendToBodyValue !== false) {\n appendToBody = true;\n }\n }\n\n if (appendToBody && !appendTo) {\n appendTo = body;\n }\n\n if (appendTo && self.dropdownMenu) {\n if (isOpen) {\n appendTo.append(self.dropdownMenu);\n $element.on('$destroy', removeDropdownMenu);\n } else {\n $element.off('$destroy', removeDropdownMenu);\n removeDropdownMenu();\n }\n }\n\n if (appendTo && self.dropdownMenu) {\n var pos = $position.positionElements($element, self.dropdownMenu, 'bottom-left', true),\n css,\n rightalign,\n scrollbarPadding,\n scrollbarWidth = 0;\n\n css = {\n top: pos.top + 'px',\n display: isOpen ? 'block' : 'none'\n };\n\n rightalign = self.dropdownMenu.hasClass('dropdown-menu-right');\n if (!rightalign) {\n css.left = pos.left + 'px';\n css.right = 'auto';\n } else {\n css.left = 'auto';\n scrollbarPadding = $position.scrollbarPadding(appendTo);\n\n if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {\n scrollbarWidth = scrollbarPadding.scrollbarWidth;\n }\n\n css.right = window.innerWidth - scrollbarWidth -\n (pos.left + $element.prop('offsetWidth')) + 'px';\n }\n\n // Need to adjust our positioning to be relative to the appendTo container\n // if it's not the body element\n if (!appendToBody) {\n var appendOffset = $position.offset(appendTo);\n\n css.top = pos.top - appendOffset.top + 'px';\n\n if (!rightalign) {\n css.left = pos.left - appendOffset.left + 'px';\n } else {\n css.right = window.innerWidth -\n (pos.left - appendOffset.left + $element.prop('offsetWidth')) + 'px';\n }\n }\n\n self.dropdownMenu.css(css);\n }\n\n var openContainer = appendTo ? appendTo : $element;\n var dropdownOpenClass = appendTo ? appendToOpenClass : openClass;\n var hasOpenClass = openContainer.hasClass(dropdownOpenClass);\n var isOnlyOpen = uibDropdownService.isOnlyOpen($scope, appendTo);\n\n if (hasOpenClass === !isOpen) {\n var toggleClass;\n if (appendTo) {\n toggleClass = !isOnlyOpen ? 'addClass' : 'removeClass';\n } else {\n toggleClass = isOpen ? 'addClass' : 'removeClass';\n }\n $animate[toggleClass](openContainer, dropdownOpenClass).then(function() {\n if (angular.isDefined(isOpen) && isOpen !== wasOpen) {\n toggleInvoker($scope, { open: !!isOpen });\n }\n });\n }\n\n if (isOpen) {\n if (self.dropdownMenuTemplateUrl) {\n $templateRequest(self.dropdownMenuTemplateUrl).then(function(tplContent) {\n templateScope = scope.$new();\n $compile(tplContent.trim())(templateScope, function(dropdownElement) {\n var newEl = dropdownElement;\n self.dropdownMenu.replaceWith(newEl);\n self.dropdownMenu = newEl;\n $document.on('keydown', uibDropdownService.keybindFilter);\n });\n });\n } else {\n $document.on('keydown', uibDropdownService.keybindFilter);\n }\n\n scope.focusToggleElement();\n uibDropdownService.open(scope, $element, appendTo);\n } else {\n uibDropdownService.close(scope, $element, appendTo);\n if (self.dropdownMenuTemplateUrl) {\n if (templateScope) {\n templateScope.$destroy();\n }\n var newEl = angular.element('
    ');\n self.dropdownMenu.replaceWith(newEl);\n self.dropdownMenu = newEl;\n }\n\n self.selectedOption = null;\n }\n\n if (angular.isFunction(setIsOpen)) {\n setIsOpen($scope, isOpen);\n }\n });\n}])\n\n.directive('uibDropdown', function() {\n return {\n controller: 'UibDropdownController',\n link: function(scope, element, attrs, dropdownCtrl) {\n dropdownCtrl.init();\n }\n };\n})\n\n.directive('uibDropdownMenu', function() {\n return {\n restrict: 'A',\n require: '?^uibDropdown',\n link: function(scope, element, attrs, dropdownCtrl) {\n if (!dropdownCtrl || angular.isDefined(attrs.dropdownNested)) {\n return;\n }\n\n element.addClass('dropdown-menu');\n\n var tplUrl = attrs.templateUrl;\n if (tplUrl) {\n dropdownCtrl.dropdownMenuTemplateUrl = tplUrl;\n }\n\n if (!dropdownCtrl.dropdownMenu) {\n dropdownCtrl.dropdownMenu = element;\n }\n }\n };\n})\n\n.directive('uibDropdownToggle', function() {\n return {\n require: '?^uibDropdown',\n link: function(scope, element, attrs, dropdownCtrl) {\n if (!dropdownCtrl) {\n return;\n }\n\n element.addClass('dropdown-toggle');\n\n dropdownCtrl.toggleElement = element;\n\n var toggleDropdown = function(event) {\n event.preventDefault();\n\n if (!element.hasClass('disabled') && !attrs.disabled) {\n scope.$apply(function() {\n dropdownCtrl.toggle();\n });\n }\n };\n\n element.on('click', toggleDropdown);\n\n // WAI-ARIA\n element.attr({ 'aria-haspopup': true, 'aria-expanded': false });\n scope.$watch(dropdownCtrl.isOpen, function(isOpen) {\n element.attr('aria-expanded', !!isOpen);\n });\n\n scope.$on('$destroy', function() {\n element.off('click', toggleDropdown);\n });\n }\n };\n});\n\nangular.module('ui.bootstrap.stackedMap', [])\n/**\n * A helper, internal data structure that acts as a map but also allows getting / removing\n * elements in the LIFO order\n */\n .factory('$$stackedMap', function() {\n return {\n createNew: function() {\n var stack = [];\n\n return {\n add: function(key, value) {\n stack.push({\n key: key,\n value: value\n });\n },\n get: function(key) {\n for (var i = 0; i < stack.length; i++) {\n if (key === stack[i].key) {\n return stack[i];\n }\n }\n },\n keys: function() {\n var keys = [];\n for (var i = 0; i < stack.length; i++) {\n keys.push(stack[i].key);\n }\n return keys;\n },\n top: function() {\n return stack[stack.length - 1];\n },\n remove: function(key) {\n var idx = -1;\n for (var i = 0; i < stack.length; i++) {\n if (key === stack[i].key) {\n idx = i;\n break;\n }\n }\n return stack.splice(idx, 1)[0];\n },\n removeTop: function() {\n return stack.pop();\n },\n length: function() {\n return stack.length;\n }\n };\n }\n };\n });\nangular.module('ui.bootstrap.modal', ['ui.bootstrap.multiMap', 'ui.bootstrap.stackedMap', 'ui.bootstrap.position'])\n/**\n * Pluggable resolve mechanism for the modal resolve resolution\n * Supports UI Router's $resolve service\n */\n .provider('$uibResolve', function() {\n var resolve = this;\n this.resolver = null;\n\n this.setResolver = function(resolver) {\n this.resolver = resolver;\n };\n\n this.$get = ['$injector', '$q', function($injector, $q) {\n var resolver = resolve.resolver ? $injector.get(resolve.resolver) : null;\n return {\n resolve: function(invocables, locals, parent, self) {\n if (resolver) {\n return resolver.resolve(invocables, locals, parent, self);\n }\n\n var promises = [];\n\n angular.forEach(invocables, function(value) {\n if (angular.isFunction(value) || angular.isArray(value)) {\n promises.push($q.resolve($injector.invoke(value)));\n } else if (angular.isString(value)) {\n promises.push($q.resolve($injector.get(value)));\n } else {\n promises.push($q.resolve(value));\n }\n });\n\n return $q.all(promises).then(function(resolves) {\n var resolveObj = {};\n var resolveIter = 0;\n angular.forEach(invocables, function(value, key) {\n resolveObj[key] = resolves[resolveIter++];\n });\n\n return resolveObj;\n });\n }\n };\n }];\n })\n\n/**\n * A helper directive for the $modal service. It creates a backdrop element.\n */\n .directive('uibModalBackdrop', ['$animate', '$injector', '$uibModalStack',\n function($animate, $injector, $modalStack) {\n return {\n restrict: 'A',\n compile: function(tElement, tAttrs) {\n tElement.addClass(tAttrs.backdropClass);\n return linkFn;\n }\n };\n\n function linkFn(scope, element, attrs) {\n if (attrs.modalInClass) {\n $animate.addClass(element, attrs.modalInClass);\n\n scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {\n var done = setIsAsync();\n if (scope.modalOptions.animation) {\n $animate.removeClass(element, attrs.modalInClass).then(done);\n } else {\n done();\n }\n });\n }\n }\n }])\n\n .directive('uibModalWindow', ['$uibModalStack', '$q', '$animateCss', '$document',\n function($modalStack, $q, $animateCss, $document) {\n return {\n scope: {\n index: '@'\n },\n restrict: 'A',\n transclude: true,\n templateUrl: function(tElement, tAttrs) {\n return tAttrs.templateUrl || 'uib/template/modal/window.html';\n },\n link: function(scope, element, attrs) {\n element.addClass(attrs.windowTopClass || '');\n scope.size = attrs.size;\n\n scope.close = function(evt) {\n var modal = $modalStack.getTop();\n if (modal && modal.value.backdrop &&\n modal.value.backdrop !== 'static' &&\n evt.target === evt.currentTarget) {\n evt.preventDefault();\n evt.stopPropagation();\n $modalStack.dismiss(modal.key, 'backdrop click');\n }\n };\n\n // moved from template to fix issue #2280\n element.on('click', scope.close);\n\n // This property is only added to the scope for the purpose of detecting when this directive is rendered.\n // We can detect that by using this property in the template associated with this directive and then use\n // {@link Attribute#$observe} on it. For more details please see {@link TableColumnResize}.\n scope.$isRendered = true;\n\n // Deferred object that will be resolved when this modal is rendered.\n var modalRenderDeferObj = $q.defer();\n // Resolve render promise post-digest\n scope.$$postDigest(function() {\n modalRenderDeferObj.resolve();\n });\n\n modalRenderDeferObj.promise.then(function() {\n var animationPromise = null;\n\n if (attrs.modalInClass) {\n animationPromise = $animateCss(element, {\n addClass: attrs.modalInClass\n }).start();\n\n scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {\n var done = setIsAsync();\n $animateCss(element, {\n removeClass: attrs.modalInClass\n }).start().then(done);\n });\n }\n\n\n $q.when(animationPromise).then(function() {\n // Notify {@link $modalStack} that modal is rendered.\n var modal = $modalStack.getTop();\n if (modal) {\n $modalStack.modalRendered(modal.key);\n }\n\n /**\n * If something within the freshly-opened modal already has focus (perhaps via a\n * directive that causes focus) then there's no need to try to focus anything.\n */\n if (!($document[0].activeElement && element[0].contains($document[0].activeElement))) {\n var inputWithAutofocus = element[0].querySelector('[autofocus]');\n /**\n * Auto-focusing of a freshly-opened modal element causes any child elements\n * with the autofocus attribute to lose focus. This is an issue on touch\n * based devices which will show and then hide the onscreen keyboard.\n * Attempts to refocus the autofocus element via JavaScript will not reopen\n * the onscreen keyboard. Fixed by updated the focusing logic to only autofocus\n * the modal element if the modal does not contain an autofocus element.\n */\n if (inputWithAutofocus) {\n inputWithAutofocus.focus();\n } else {\n element[0].focus();\n }\n }\n });\n });\n }\n };\n }])\n\n .directive('uibModalAnimationClass', function() {\n return {\n compile: function(tElement, tAttrs) {\n if (tAttrs.modalAnimation) {\n tElement.addClass(tAttrs.uibModalAnimationClass);\n }\n }\n };\n })\n\n .directive('uibModalTransclude', ['$animate', function($animate) {\n return {\n link: function(scope, element, attrs, controller, transclude) {\n transclude(scope.$parent, function(clone) {\n element.empty();\n $animate.enter(clone, element);\n });\n }\n };\n }])\n\n .factory('$uibModalStack', ['$animate', '$animateCss', '$document',\n '$compile', '$rootScope', '$q', '$$multiMap', '$$stackedMap', '$uibPosition',\n function($animate, $animateCss, $document, $compile, $rootScope, $q, $$multiMap, $$stackedMap, $uibPosition) {\n var OPENED_MODAL_CLASS = 'modal-open';\n\n var backdropDomEl, backdropScope;\n var openedWindows = $$stackedMap.createNew();\n var openedClasses = $$multiMap.createNew();\n var $modalStack = {\n NOW_CLOSING_EVENT: 'modal.stack.now-closing'\n };\n var topModalIndex = 0;\n var previousTopOpenedModal = null;\n var ARIA_HIDDEN_ATTRIBUTE_NAME = 'data-bootstrap-modal-aria-hidden-count';\n\n //Modal focus behavior\n var tabbableSelector = 'a[href], area[href], input:not([disabled]):not([tabindex=\\'-1\\']), ' +\n 'button:not([disabled]):not([tabindex=\\'-1\\']),select:not([disabled]):not([tabindex=\\'-1\\']), textarea:not([disabled]):not([tabindex=\\'-1\\']), ' +\n 'iframe, object, embed, *[tabindex]:not([tabindex=\\'-1\\']), *[contenteditable=true]';\n var scrollbarPadding;\n var SNAKE_CASE_REGEXP = /[A-Z]/g;\n\n // TODO: extract into common dependency with tooltip\n function snake_case(name) {\n var separator = '-';\n return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n return (pos ? separator : '') + letter.toLowerCase();\n });\n }\n\n function isVisible(element) {\n return !!(element.offsetWidth ||\n element.offsetHeight ||\n element.getClientRects().length);\n }\n\n function backdropIndex() {\n var topBackdropIndex = -1;\n var opened = openedWindows.keys();\n for (var i = 0; i < opened.length; i++) {\n if (openedWindows.get(opened[i]).value.backdrop) {\n topBackdropIndex = i;\n }\n }\n\n // If any backdrop exist, ensure that it's index is always\n // right below the top modal\n if (topBackdropIndex > -1 && topBackdropIndex < topModalIndex) {\n topBackdropIndex = topModalIndex;\n }\n return topBackdropIndex;\n }\n\n $rootScope.$watch(backdropIndex, function(newBackdropIndex) {\n if (backdropScope) {\n backdropScope.index = newBackdropIndex;\n }\n });\n\n function removeModalWindow(modalInstance, elementToReceiveFocus) {\n var modalWindow = openedWindows.get(modalInstance).value;\n var appendToElement = modalWindow.appendTo;\n\n //clean up the stack\n openedWindows.remove(modalInstance);\n previousTopOpenedModal = openedWindows.top();\n if (previousTopOpenedModal) {\n topModalIndex = parseInt(previousTopOpenedModal.value.modalDomEl.attr('index'), 10);\n }\n\n removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope, function() {\n var modalBodyClass = modalWindow.openedClass || OPENED_MODAL_CLASS;\n openedClasses.remove(modalBodyClass, modalInstance);\n var areAnyOpen = openedClasses.hasKey(modalBodyClass);\n appendToElement.toggleClass(modalBodyClass, areAnyOpen);\n if (!areAnyOpen && scrollbarPadding && scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {\n if (scrollbarPadding.originalRight) {\n appendToElement.css({paddingRight: scrollbarPadding.originalRight + 'px'});\n } else {\n appendToElement.css({paddingRight: ''});\n }\n scrollbarPadding = null;\n }\n toggleTopWindowClass(true);\n }, modalWindow.closedDeferred);\n checkRemoveBackdrop();\n\n //move focus to specified element if available, or else to body\n if (elementToReceiveFocus && elementToReceiveFocus.focus) {\n elementToReceiveFocus.focus();\n } else if (appendToElement.focus) {\n appendToElement.focus();\n }\n }\n\n // Add or remove \"windowTopClass\" from the top window in the stack\n function toggleTopWindowClass(toggleSwitch) {\n var modalWindow;\n\n if (openedWindows.length() > 0) {\n modalWindow = openedWindows.top().value;\n modalWindow.modalDomEl.toggleClass(modalWindow.windowTopClass || '', toggleSwitch);\n }\n }\n\n function checkRemoveBackdrop() {\n //remove backdrop if no longer needed\n if (backdropDomEl && backdropIndex() === -1) {\n var backdropScopeRef = backdropScope;\n removeAfterAnimate(backdropDomEl, backdropScope, function() {\n backdropScopeRef = null;\n });\n backdropDomEl = undefined;\n backdropScope = undefined;\n }\n }\n\n function removeAfterAnimate(domEl, scope, done, closedDeferred) {\n var asyncDeferred;\n var asyncPromise = null;\n var setIsAsync = function() {\n if (!asyncDeferred) {\n asyncDeferred = $q.defer();\n asyncPromise = asyncDeferred.promise;\n }\n\n return function asyncDone() {\n asyncDeferred.resolve();\n };\n };\n scope.$broadcast($modalStack.NOW_CLOSING_EVENT, setIsAsync);\n\n // Note that it's intentional that asyncPromise might be null.\n // That's when setIsAsync has not been called during the\n // NOW_CLOSING_EVENT broadcast.\n return $q.when(asyncPromise).then(afterAnimating);\n\n function afterAnimating() {\n if (afterAnimating.done) {\n return;\n }\n afterAnimating.done = true;\n\n $animate.leave(domEl).then(function() {\n if (done) {\n done();\n }\n\n domEl.remove();\n if (closedDeferred) {\n closedDeferred.resolve();\n }\n });\n\n scope.$destroy();\n }\n }\n\n $document.on('keydown', keydownListener);\n\n $rootScope.$on('$destroy', function() {\n $document.off('keydown', keydownListener);\n });\n\n function keydownListener(evt) {\n if (evt.isDefaultPrevented()) {\n return evt;\n }\n\n var modal = openedWindows.top();\n if (modal) {\n switch (evt.which) {\n case 27: {\n if (modal.value.keyboard) {\n evt.preventDefault();\n $rootScope.$apply(function() {\n $modalStack.dismiss(modal.key, 'escape key press');\n });\n }\n break;\n }\n case 9: {\n var list = $modalStack.loadFocusElementList(modal);\n var focusChanged = false;\n if (evt.shiftKey) {\n if ($modalStack.isFocusInFirstItem(evt, list) || $modalStack.isModalFocused(evt, modal)) {\n focusChanged = $modalStack.focusLastFocusableElement(list);\n }\n } else {\n if ($modalStack.isFocusInLastItem(evt, list)) {\n focusChanged = $modalStack.focusFirstFocusableElement(list);\n }\n }\n\n if (focusChanged) {\n evt.preventDefault();\n evt.stopPropagation();\n }\n\n break;\n }\n }\n }\n }\n\n $modalStack.open = function(modalInstance, modal) {\n var modalOpener = $document[0].activeElement,\n modalBodyClass = modal.openedClass || OPENED_MODAL_CLASS;\n\n toggleTopWindowClass(false);\n\n // Store the current top first, to determine what index we ought to use\n // for the current top modal\n previousTopOpenedModal = openedWindows.top();\n\n openedWindows.add(modalInstance, {\n deferred: modal.deferred,\n renderDeferred: modal.renderDeferred,\n closedDeferred: modal.closedDeferred,\n modalScope: modal.scope,\n backdrop: modal.backdrop,\n keyboard: modal.keyboard,\n openedClass: modal.openedClass,\n windowTopClass: modal.windowTopClass,\n animation: modal.animation,\n appendTo: modal.appendTo\n });\n\n openedClasses.put(modalBodyClass, modalInstance);\n\n var appendToElement = modal.appendTo,\n currBackdropIndex = backdropIndex();\n\n if (currBackdropIndex >= 0 && !backdropDomEl) {\n backdropScope = $rootScope.$new(true);\n backdropScope.modalOptions = modal;\n backdropScope.index = currBackdropIndex;\n backdropDomEl = angular.element('
    ');\n backdropDomEl.attr({\n 'class': 'modal-backdrop',\n 'ng-style': '{\\'z-index\\': 1040 + (index && 1 || 0) + index*10}',\n 'uib-modal-animation-class': 'fade',\n 'modal-in-class': 'in'\n });\n if (modal.backdropClass) {\n backdropDomEl.addClass(modal.backdropClass);\n }\n\n if (modal.animation) {\n backdropDomEl.attr('modal-animation', 'true');\n }\n $compile(backdropDomEl)(backdropScope);\n $animate.enter(backdropDomEl, appendToElement);\n if ($uibPosition.isScrollable(appendToElement)) {\n scrollbarPadding = $uibPosition.scrollbarPadding(appendToElement);\n if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {\n appendToElement.css({paddingRight: scrollbarPadding.right + 'px'});\n }\n }\n }\n\n var content;\n if (modal.component) {\n content = document.createElement(snake_case(modal.component.name));\n content = angular.element(content);\n content.attr({\n resolve: '$resolve',\n 'modal-instance': '$uibModalInstance',\n close: '$close($value)',\n dismiss: '$dismiss($value)'\n });\n } else {\n content = modal.content;\n }\n\n // Set the top modal index based on the index of the previous top modal\n topModalIndex = previousTopOpenedModal ? parseInt(previousTopOpenedModal.value.modalDomEl.attr('index'), 10) + 1 : 0;\n var angularDomEl = angular.element('
    ');\n angularDomEl.attr({\n 'class': 'modal',\n 'template-url': modal.windowTemplateUrl,\n 'window-top-class': modal.windowTopClass,\n 'role': 'dialog',\n 'aria-labelledby': modal.ariaLabelledBy,\n 'aria-describedby': modal.ariaDescribedBy,\n 'size': modal.size,\n 'index': topModalIndex,\n 'animate': 'animate',\n 'ng-style': '{\\'z-index\\': 1050 + $$topModalIndex*10, display: \\'block\\'}',\n 'tabindex': -1,\n 'uib-modal-animation-class': 'fade',\n 'modal-in-class': 'in'\n }).append(content);\n if (modal.windowClass) {\n angularDomEl.addClass(modal.windowClass);\n }\n\n if (modal.animation) {\n angularDomEl.attr('modal-animation', 'true');\n }\n\n appendToElement.addClass(modalBodyClass);\n if (modal.scope) {\n // we need to explicitly add the modal index to the modal scope\n // because it is needed by ngStyle to compute the zIndex property.\n modal.scope.$$topModalIndex = topModalIndex;\n }\n $animate.enter($compile(angularDomEl)(modal.scope), appendToElement);\n\n openedWindows.top().value.modalDomEl = angularDomEl;\n openedWindows.top().value.modalOpener = modalOpener;\n\n applyAriaHidden(angularDomEl);\n\n function applyAriaHidden(el) {\n if (!el || el[0].tagName === 'BODY') {\n return;\n }\n\n getSiblings(el).forEach(function(sibling) {\n var elemIsAlreadyHidden = sibling.getAttribute('aria-hidden') === 'true',\n ariaHiddenCount = parseInt(sibling.getAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME), 10);\n\n if (!ariaHiddenCount) {\n ariaHiddenCount = elemIsAlreadyHidden ? 1 : 0;\n }\n\n sibling.setAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME, ariaHiddenCount + 1);\n sibling.setAttribute('aria-hidden', 'true');\n });\n\n return applyAriaHidden(el.parent());\n\n function getSiblings(el) {\n var children = el.parent() ? el.parent().children() : [];\n\n return Array.prototype.filter.call(children, function(child) {\n return child !== el[0];\n });\n }\n }\n };\n\n function broadcastClosing(modalWindow, resultOrReason, closing) {\n return !modalWindow.value.modalScope.$broadcast('modal.closing', resultOrReason, closing).defaultPrevented;\n }\n\n function unhideBackgroundElements() {\n Array.prototype.forEach.call(\n document.querySelectorAll('[' + ARIA_HIDDEN_ATTRIBUTE_NAME + ']'),\n function(hiddenEl) {\n var ariaHiddenCount = parseInt(hiddenEl.getAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME), 10),\n newHiddenCount = ariaHiddenCount - 1;\n hiddenEl.setAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME, newHiddenCount);\n\n if (!newHiddenCount) {\n hiddenEl.removeAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME);\n hiddenEl.removeAttribute('aria-hidden');\n }\n }\n );\n }\n\n $modalStack.close = function(modalInstance, result) {\n var modalWindow = openedWindows.get(modalInstance);\n unhideBackgroundElements();\n if (modalWindow && broadcastClosing(modalWindow, result, true)) {\n modalWindow.value.modalScope.$$uibDestructionScheduled = true;\n modalWindow.value.deferred.resolve(result);\n removeModalWindow(modalInstance, modalWindow.value.modalOpener);\n return true;\n }\n\n return !modalWindow;\n };\n\n $modalStack.dismiss = function(modalInstance, reason) {\n var modalWindow = openedWindows.get(modalInstance);\n unhideBackgroundElements();\n if (modalWindow && broadcastClosing(modalWindow, reason, false)) {\n modalWindow.value.modalScope.$$uibDestructionScheduled = true;\n modalWindow.value.deferred.reject(reason);\n removeModalWindow(modalInstance, modalWindow.value.modalOpener);\n return true;\n }\n return !modalWindow;\n };\n\n $modalStack.dismissAll = function(reason) {\n var topModal = this.getTop();\n while (topModal && this.dismiss(topModal.key, reason)) {\n topModal = this.getTop();\n }\n };\n\n $modalStack.getTop = function() {\n return openedWindows.top();\n };\n\n $modalStack.modalRendered = function(modalInstance) {\n var modalWindow = openedWindows.get(modalInstance);\n if (modalWindow) {\n modalWindow.value.renderDeferred.resolve();\n }\n };\n\n $modalStack.focusFirstFocusableElement = function(list) {\n if (list.length > 0) {\n list[0].focus();\n return true;\n }\n return false;\n };\n\n $modalStack.focusLastFocusableElement = function(list) {\n if (list.length > 0) {\n list[list.length - 1].focus();\n return true;\n }\n return false;\n };\n\n $modalStack.isModalFocused = function(evt, modalWindow) {\n if (evt && modalWindow) {\n var modalDomEl = modalWindow.value.modalDomEl;\n if (modalDomEl && modalDomEl.length) {\n return (evt.target || evt.srcElement) === modalDomEl[0];\n }\n }\n return false;\n };\n\n $modalStack.isFocusInFirstItem = function(evt, list) {\n if (list.length > 0) {\n return (evt.target || evt.srcElement) === list[0];\n }\n return false;\n };\n\n $modalStack.isFocusInLastItem = function(evt, list) {\n if (list.length > 0) {\n return (evt.target || evt.srcElement) === list[list.length - 1];\n }\n return false;\n };\n\n $modalStack.loadFocusElementList = function(modalWindow) {\n if (modalWindow) {\n var modalDomE1 = modalWindow.value.modalDomEl;\n if (modalDomE1 && modalDomE1.length) {\n var elements = modalDomE1[0].querySelectorAll(tabbableSelector);\n return elements ?\n Array.prototype.filter.call(elements, function(element) {\n return isVisible(element);\n }) : elements;\n }\n }\n };\n\n return $modalStack;\n }])\n\n .provider('$uibModal', function() {\n var $modalProvider = {\n options: {\n animation: true,\n backdrop: true, //can also be false or 'static'\n keyboard: true\n },\n $get: ['$rootScope', '$q', '$document', '$templateRequest', '$controller', '$uibResolve', '$uibModalStack',\n function ($rootScope, $q, $document, $templateRequest, $controller, $uibResolve, $modalStack) {\n var $modal = {};\n\n function getTemplatePromise(options) {\n return options.template ? $q.when(options.template) :\n $templateRequest(angular.isFunction(options.templateUrl) ?\n options.templateUrl() : options.templateUrl);\n }\n\n var promiseChain = null;\n $modal.getPromiseChain = function() {\n return promiseChain;\n };\n\n $modal.open = function(modalOptions) {\n var modalResultDeferred = $q.defer();\n var modalOpenedDeferred = $q.defer();\n var modalClosedDeferred = $q.defer();\n var modalRenderDeferred = $q.defer();\n\n //prepare an instance of a modal to be injected into controllers and returned to a caller\n var modalInstance = {\n result: modalResultDeferred.promise,\n opened: modalOpenedDeferred.promise,\n closed: modalClosedDeferred.promise,\n rendered: modalRenderDeferred.promise,\n close: function (result) {\n return $modalStack.close(modalInstance, result);\n },\n dismiss: function (reason) {\n return $modalStack.dismiss(modalInstance, reason);\n }\n };\n\n //merge and clean up options\n modalOptions = angular.extend({}, $modalProvider.options, modalOptions);\n modalOptions.resolve = modalOptions.resolve || {};\n modalOptions.appendTo = modalOptions.appendTo || $document.find('body').eq(0);\n\n if (!modalOptions.appendTo.length) {\n throw new Error('appendTo element not found. Make sure that the element passed is in DOM.');\n }\n\n //verify options\n if (!modalOptions.component && !modalOptions.template && !modalOptions.templateUrl) {\n throw new Error('One of component or template or templateUrl options is required.');\n }\n\n var templateAndResolvePromise;\n if (modalOptions.component) {\n templateAndResolvePromise = $q.when($uibResolve.resolve(modalOptions.resolve, {}, null, null));\n } else {\n templateAndResolvePromise =\n $q.all([getTemplatePromise(modalOptions), $uibResolve.resolve(modalOptions.resolve, {}, null, null)]);\n }\n\n function resolveWithTemplate() {\n return templateAndResolvePromise;\n }\n\n // Wait for the resolution of the existing promise chain.\n // Then switch to our own combined promise dependency (regardless of how the previous modal fared).\n // Then add to $modalStack and resolve opened.\n // Finally clean up the chain variable if no subsequent modal has overwritten it.\n var samePromise;\n samePromise = promiseChain = $q.all([promiseChain])\n .then(resolveWithTemplate, resolveWithTemplate)\n .then(function resolveSuccess(tplAndVars) {\n var providedScope = modalOptions.scope || $rootScope;\n\n var modalScope = providedScope.$new();\n modalScope.$close = modalInstance.close;\n modalScope.$dismiss = modalInstance.dismiss;\n\n modalScope.$on('$destroy', function() {\n if (!modalScope.$$uibDestructionScheduled) {\n modalScope.$dismiss('$uibUnscheduledDestruction');\n }\n });\n\n var modal = {\n scope: modalScope,\n deferred: modalResultDeferred,\n renderDeferred: modalRenderDeferred,\n closedDeferred: modalClosedDeferred,\n animation: modalOptions.animation,\n backdrop: modalOptions.backdrop,\n keyboard: modalOptions.keyboard,\n backdropClass: modalOptions.backdropClass,\n windowTopClass: modalOptions.windowTopClass,\n windowClass: modalOptions.windowClass,\n windowTemplateUrl: modalOptions.windowTemplateUrl,\n ariaLabelledBy: modalOptions.ariaLabelledBy,\n ariaDescribedBy: modalOptions.ariaDescribedBy,\n size: modalOptions.size,\n openedClass: modalOptions.openedClass,\n appendTo: modalOptions.appendTo\n };\n\n var component = {};\n var ctrlInstance, ctrlInstantiate, ctrlLocals = {};\n\n if (modalOptions.component) {\n constructLocals(component, false, true, false);\n component.name = modalOptions.component;\n modal.component = component;\n } else if (modalOptions.controller) {\n constructLocals(ctrlLocals, true, false, true);\n\n // the third param will make the controller instantiate later,private api\n // @see https://github.com/angular/angular.js/blob/master/src/ng/controller.js#L126\n ctrlInstantiate = $controller(modalOptions.controller, ctrlLocals, true, modalOptions.controllerAs);\n if (modalOptions.controllerAs && modalOptions.bindToController) {\n ctrlInstance = ctrlInstantiate.instance;\n ctrlInstance.$close = modalScope.$close;\n ctrlInstance.$dismiss = modalScope.$dismiss;\n angular.extend(ctrlInstance, {\n $resolve: ctrlLocals.$scope.$resolve\n }, providedScope);\n }\n\n ctrlInstance = ctrlInstantiate();\n\n if (angular.isFunction(ctrlInstance.$onInit)) {\n ctrlInstance.$onInit();\n }\n }\n\n if (!modalOptions.component) {\n modal.content = tplAndVars[0];\n }\n\n $modalStack.open(modalInstance, modal);\n modalOpenedDeferred.resolve(true);\n\n function constructLocals(obj, template, instanceOnScope, injectable) {\n obj.$scope = modalScope;\n obj.$scope.$resolve = {};\n if (instanceOnScope) {\n obj.$scope.$uibModalInstance = modalInstance;\n } else {\n obj.$uibModalInstance = modalInstance;\n }\n\n var resolves = template ? tplAndVars[1] : tplAndVars;\n angular.forEach(resolves, function(value, key) {\n if (injectable) {\n obj[key] = value;\n }\n\n obj.$scope.$resolve[key] = value;\n });\n }\n }, function resolveError(reason) {\n modalOpenedDeferred.reject(reason);\n modalResultDeferred.reject(reason);\n })['finally'](function() {\n if (promiseChain === samePromise) {\n promiseChain = null;\n }\n });\n\n return modalInstance;\n };\n\n return $modal;\n }\n ]\n };\n\n return $modalProvider;\n });\n\nangular.module('ui.bootstrap.paging', [])\n/**\n * Helper internal service for generating common controller code between the\n * pager and pagination components\n */\n.factory('uibPaging', ['$parse', function($parse) {\n return {\n create: function(ctrl, $scope, $attrs) {\n ctrl.setNumPages = $attrs.numPages ? $parse($attrs.numPages).assign : angular.noop;\n ctrl.ngModelCtrl = { $setViewValue: angular.noop }; // nullModelCtrl\n ctrl._watchers = [];\n\n ctrl.init = function(ngModelCtrl, config) {\n ctrl.ngModelCtrl = ngModelCtrl;\n ctrl.config = config;\n\n ngModelCtrl.$render = function() {\n ctrl.render();\n };\n\n if ($attrs.itemsPerPage) {\n ctrl._watchers.push($scope.$parent.$watch($attrs.itemsPerPage, function(value) {\n ctrl.itemsPerPage = parseInt(value, 10);\n $scope.totalPages = ctrl.calculateTotalPages();\n ctrl.updatePage();\n }));\n } else {\n ctrl.itemsPerPage = config.itemsPerPage;\n }\n\n $scope.$watch('totalItems', function(newTotal, oldTotal) {\n if (angular.isDefined(newTotal) || newTotal !== oldTotal) {\n $scope.totalPages = ctrl.calculateTotalPages();\n ctrl.updatePage();\n }\n });\n };\n\n ctrl.calculateTotalPages = function() {\n var totalPages = ctrl.itemsPerPage < 1 ? 1 : Math.ceil($scope.totalItems / ctrl.itemsPerPage);\n return Math.max(totalPages || 0, 1);\n };\n\n ctrl.render = function() {\n $scope.page = parseInt(ctrl.ngModelCtrl.$viewValue, 10) || 1;\n };\n\n $scope.selectPage = function(page, evt) {\n if (evt) {\n evt.preventDefault();\n }\n\n var clickAllowed = !$scope.ngDisabled || !evt;\n if (clickAllowed && $scope.page !== page && page > 0 && page <= $scope.totalPages) {\n if (evt && evt.target) {\n evt.target.blur();\n }\n ctrl.ngModelCtrl.$setViewValue(page);\n ctrl.ngModelCtrl.$render();\n }\n };\n\n $scope.getText = function(key) {\n return $scope[key + 'Text'] || ctrl.config[key + 'Text'];\n };\n\n $scope.noPrevious = function() {\n return $scope.page === 1;\n };\n\n $scope.noNext = function() {\n return $scope.page === $scope.totalPages;\n };\n\n ctrl.updatePage = function() {\n ctrl.setNumPages($scope.$parent, $scope.totalPages); // Readonly variable\n\n if ($scope.page > $scope.totalPages) {\n $scope.selectPage($scope.totalPages);\n } else {\n ctrl.ngModelCtrl.$render();\n }\n };\n\n $scope.$on('$destroy', function() {\n while (ctrl._watchers.length) {\n ctrl._watchers.shift()();\n }\n });\n }\n };\n}]);\n\nangular.module('ui.bootstrap.pager', ['ui.bootstrap.paging', 'ui.bootstrap.tabindex'])\n\n.controller('UibPagerController', ['$scope', '$attrs', 'uibPaging', 'uibPagerConfig', function($scope, $attrs, uibPaging, uibPagerConfig) {\n $scope.align = angular.isDefined($attrs.align) ? $scope.$parent.$eval($attrs.align) : uibPagerConfig.align;\n\n uibPaging.create(this, $scope, $attrs);\n}])\n\n.constant('uibPagerConfig', {\n itemsPerPage: 10,\n previousText: '« Previous',\n nextText: 'Next »',\n align: true\n})\n\n.directive('uibPager', ['uibPagerConfig', function(uibPagerConfig) {\n return {\n scope: {\n totalItems: '=',\n previousText: '@',\n nextText: '@',\n ngDisabled: '='\n },\n require: ['uibPager', '?ngModel'],\n restrict: 'A',\n controller: 'UibPagerController',\n controllerAs: 'pager',\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/pager/pager.html';\n },\n link: function(scope, element, attrs, ctrls) {\n element.addClass('pager');\n var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1];\n\n if (!ngModelCtrl) {\n return; // do nothing if no ng-model\n }\n\n paginationCtrl.init(ngModelCtrl, uibPagerConfig);\n }\n };\n}]);\n\nangular.module('ui.bootstrap.pagination', ['ui.bootstrap.paging', 'ui.bootstrap.tabindex'])\n.controller('UibPaginationController', ['$scope', '$attrs', '$parse', 'uibPaging', 'uibPaginationConfig', function($scope, $attrs, $parse, uibPaging, uibPaginationConfig) {\n var ctrl = this;\n // Setup configuration parameters\n var maxSize = angular.isDefined($attrs.maxSize) ? $scope.$parent.$eval($attrs.maxSize) : uibPaginationConfig.maxSize,\n rotate = angular.isDefined($attrs.rotate) ? $scope.$parent.$eval($attrs.rotate) : uibPaginationConfig.rotate,\n forceEllipses = angular.isDefined($attrs.forceEllipses) ? $scope.$parent.$eval($attrs.forceEllipses) : uibPaginationConfig.forceEllipses,\n boundaryLinkNumbers = angular.isDefined($attrs.boundaryLinkNumbers) ? $scope.$parent.$eval($attrs.boundaryLinkNumbers) : uibPaginationConfig.boundaryLinkNumbers,\n pageLabel = angular.isDefined($attrs.pageLabel) ? function(idx) { return $scope.$parent.$eval($attrs.pageLabel, {$page: idx}); } : angular.identity;\n $scope.boundaryLinks = angular.isDefined($attrs.boundaryLinks) ? $scope.$parent.$eval($attrs.boundaryLinks) : uibPaginationConfig.boundaryLinks;\n $scope.directionLinks = angular.isDefined($attrs.directionLinks) ? $scope.$parent.$eval($attrs.directionLinks) : uibPaginationConfig.directionLinks;\n $attrs.$set('role', 'menu');\n\n uibPaging.create(this, $scope, $attrs);\n\n if ($attrs.maxSize) {\n ctrl._watchers.push($scope.$parent.$watch($parse($attrs.maxSize), function(value) {\n maxSize = parseInt(value, 10);\n ctrl.render();\n }));\n }\n\n // Create page object used in template\n function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }\n\n function getPages(currentPage, totalPages) {\n var pages = [];\n\n // Default page limits\n var startPage = 1, endPage = totalPages;\n var isMaxSized = angular.isDefined(maxSize) && maxSize < totalPages;\n\n // recompute if maxSize\n if (isMaxSized) {\n if (rotate) {\n // Current page is displayed in the middle of the visible ones\n startPage = Math.max(currentPage - Math.floor(maxSize / 2), 1);\n endPage = startPage + maxSize - 1;\n\n // Adjust if limit is exceeded\n if (endPage > totalPages) {\n endPage = totalPages;\n startPage = endPage - maxSize + 1;\n }\n } else {\n // Visible pages are paginated with maxSize\n startPage = (Math.ceil(currentPage / maxSize) - 1) * maxSize + 1;\n\n // Adjust last page if limit is exceeded\n endPage = Math.min(startPage + maxSize - 1, totalPages);\n }\n }\n\n // Add page number links\n for (var number = startPage; number <= endPage; number++) {\n var page = makePage(number, pageLabel(number), number === currentPage);\n pages.push(page);\n }\n\n // Add links to move between page sets\n if (isMaxSized && maxSize > 0 && (!rotate || forceEllipses || boundaryLinkNumbers)) {\n if (startPage > 1) {\n if (!boundaryLinkNumbers || startPage > 3) { //need ellipsis for all options unless range is too close to beginning\n var previousPageSet = makePage(startPage - 1, '...', false);\n pages.unshift(previousPageSet);\n }\n if (boundaryLinkNumbers) {\n if (startPage === 3) { //need to replace ellipsis when the buttons would be sequential\n var secondPageLink = makePage(2, '2', false);\n pages.unshift(secondPageLink);\n }\n //add the first page\n var firstPageLink = makePage(1, '1', false);\n pages.unshift(firstPageLink);\n }\n }\n\n if (endPage < totalPages) {\n if (!boundaryLinkNumbers || endPage < totalPages - 2) { //need ellipsis for all options unless range is too close to end\n var nextPageSet = makePage(endPage + 1, '...', false);\n pages.push(nextPageSet);\n }\n if (boundaryLinkNumbers) {\n if (endPage === totalPages - 2) { //need to replace ellipsis when the buttons would be sequential\n var secondToLastPageLink = makePage(totalPages - 1, totalPages - 1, false);\n pages.push(secondToLastPageLink);\n }\n //add the last page\n var lastPageLink = makePage(totalPages, totalPages, false);\n pages.push(lastPageLink);\n }\n }\n }\n return pages;\n }\n\n var originalRender = this.render;\n this.render = function() {\n originalRender();\n if ($scope.page > 0 && $scope.page <= $scope.totalPages) {\n $scope.pages = getPages($scope.page, $scope.totalPages);\n }\n };\n}])\n\n.constant('uibPaginationConfig', {\n itemsPerPage: 10,\n boundaryLinks: false,\n boundaryLinkNumbers: false,\n directionLinks: true,\n firstText: 'First',\n previousText: 'Previous',\n nextText: 'Next',\n lastText: 'Last',\n rotate: true,\n forceEllipses: false\n})\n\n.directive('uibPagination', ['$parse', 'uibPaginationConfig', function($parse, uibPaginationConfig) {\n return {\n scope: {\n totalItems: '=',\n firstText: '@',\n previousText: '@',\n nextText: '@',\n lastText: '@',\n ngDisabled:'='\n },\n require: ['uibPagination', '?ngModel'],\n restrict: 'A',\n controller: 'UibPaginationController',\n controllerAs: 'pagination',\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/pagination/pagination.html';\n },\n link: function(scope, element, attrs, ctrls) {\n element.addClass('pagination');\n var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1];\n\n if (!ngModelCtrl) {\n return; // do nothing if no ng-model\n }\n\n paginationCtrl.init(ngModelCtrl, uibPaginationConfig);\n }\n };\n}]);\n\n/**\n * The following features are still outstanding: animation as a\n * function, placement as a function, inside, support for more triggers than\n * just mouse enter/leave, html tooltips, and selector delegation.\n */\nangular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.stackedMap'])\n\n/**\n * The $tooltip service creates tooltip- and popover-like directives as well as\n * houses global options for them.\n */\n.provider('$uibTooltip', function() {\n // The default options tooltip and popover.\n var defaultOptions = {\n placement: 'top',\n placementClassPrefix: '',\n animation: true,\n popupDelay: 0,\n popupCloseDelay: 0,\n useContentExp: false\n };\n\n // Default hide triggers for each show trigger\n var triggerMap = {\n 'mouseenter': 'mouseleave',\n 'click': 'click',\n 'outsideClick': 'outsideClick',\n 'focus': 'blur',\n 'none': ''\n };\n\n // The options specified to the provider globally.\n var globalOptions = {};\n\n /**\n * `options({})` allows global configuration of all tooltips in the\n * application.\n *\n * var app = angular.module( 'App', ['ui.bootstrap.tooltip'], function( $tooltipProvider ) {\n * // place tooltips left instead of top by default\n * $tooltipProvider.options( { placement: 'left' } );\n * });\n */\n\tthis.options = function(value) {\n\t\tangular.extend(globalOptions, value);\n\t};\n\n /**\n * This allows you to extend the set of trigger mappings available. E.g.:\n *\n * $tooltipProvider.setTriggers( { 'openTrigger': 'closeTrigger' } );\n */\n this.setTriggers = function setTriggers(triggers) {\n angular.extend(triggerMap, triggers);\n };\n\n /**\n * This is a helper function for translating camel-case to snake_case.\n */\n function snake_case(name) {\n var regexp = /[A-Z]/g;\n var separator = '-';\n return name.replace(regexp, function(letter, pos) {\n return (pos ? separator : '') + letter.toLowerCase();\n });\n }\n\n /**\n * Returns the actual instance of the $tooltip service.\n * TODO support multiple triggers\n */\n this.$get = ['$window', '$compile', '$timeout', '$document', '$uibPosition', '$interpolate', '$rootScope', '$parse', '$$stackedMap', function($window, $compile, $timeout, $document, $position, $interpolate, $rootScope, $parse, $$stackedMap) {\n var openedTooltips = $$stackedMap.createNew();\n $document.on('keyup', keypressListener);\n\n $rootScope.$on('$destroy', function() {\n $document.off('keyup', keypressListener);\n });\n\n function keypressListener(e) {\n if (e.which === 27) {\n var last = openedTooltips.top();\n if (last) {\n last.value.close();\n last = null;\n }\n }\n }\n\n return function $tooltip(ttType, prefix, defaultTriggerShow, options) {\n options = angular.extend({}, defaultOptions, globalOptions, options);\n\n /**\n * Returns an object of show and hide triggers.\n *\n * If a trigger is supplied,\n * it is used to show the tooltip; otherwise, it will use the `trigger`\n * option passed to the `$tooltipProvider.options` method; else it will\n * default to the trigger supplied to this directive factory.\n *\n * The hide trigger is based on the show trigger. If the `trigger` option\n * was passed to the `$tooltipProvider.options` method, it will use the\n * mapped trigger from `triggerMap` or the passed trigger if the map is\n * undefined; otherwise, it uses the `triggerMap` value of the show\n * trigger; else it will just use the show trigger.\n */\n function getTriggers(trigger) {\n var show = (trigger || options.trigger || defaultTriggerShow).split(' ');\n var hide = show.map(function(trigger) {\n return triggerMap[trigger] || trigger;\n });\n return {\n show: show,\n hide: hide\n };\n }\n\n var directiveName = snake_case(ttType);\n\n var startSym = $interpolate.startSymbol();\n var endSym = $interpolate.endSymbol();\n var template =\n '
    ' +\n '
    ';\n\n return {\n compile: function(tElem, tAttrs) {\n var tooltipLinker = $compile(template);\n\n return function link(scope, element, attrs, tooltipCtrl) {\n var tooltip;\n var tooltipLinkedScope;\n var transitionTimeout;\n var showTimeout;\n var hideTimeout;\n var positionTimeout;\n var adjustmentTimeout;\n var appendToBody = angular.isDefined(options.appendToBody) ? options.appendToBody : false;\n var triggers = getTriggers(undefined);\n var hasEnableExp = angular.isDefined(attrs[prefix + 'Enable']);\n var ttScope = scope.$new(true);\n var repositionScheduled = false;\n var isOpenParse = angular.isDefined(attrs[prefix + 'IsOpen']) ? $parse(attrs[prefix + 'IsOpen']) : false;\n var contentParse = options.useContentExp ? $parse(attrs[ttType]) : false;\n var observers = [];\n var lastPlacement;\n\n var positionTooltip = function() {\n // check if tooltip exists and is not empty\n if (!tooltip || !tooltip.html()) { return; }\n\n if (!positionTimeout) {\n positionTimeout = $timeout(function() {\n var ttPosition = $position.positionElements(element, tooltip, ttScope.placement, appendToBody);\n var initialHeight = angular.isDefined(tooltip.offsetHeight) ? tooltip.offsetHeight : tooltip.prop('offsetHeight');\n var elementPos = appendToBody ? $position.offset(element) : $position.position(element);\n tooltip.css({ top: ttPosition.top + 'px', left: ttPosition.left + 'px' });\n var placementClasses = ttPosition.placement.split('-');\n\n if (!tooltip.hasClass(placementClasses[0])) {\n tooltip.removeClass(lastPlacement.split('-')[0]);\n tooltip.addClass(placementClasses[0]);\n }\n\n if (!tooltip.hasClass(options.placementClassPrefix + ttPosition.placement)) {\n tooltip.removeClass(options.placementClassPrefix + lastPlacement);\n tooltip.addClass(options.placementClassPrefix + ttPosition.placement);\n }\n\n adjustmentTimeout = $timeout(function() {\n var currentHeight = angular.isDefined(tooltip.offsetHeight) ? tooltip.offsetHeight : tooltip.prop('offsetHeight');\n var adjustment = $position.adjustTop(placementClasses, elementPos, initialHeight, currentHeight);\n if (adjustment) {\n tooltip.css(adjustment);\n }\n adjustmentTimeout = null;\n }, 0, false);\n\n // first time through tt element will have the\n // uib-position-measure class or if the placement\n // has changed we need to position the arrow.\n if (tooltip.hasClass('uib-position-measure')) {\n $position.positionArrow(tooltip, ttPosition.placement);\n tooltip.removeClass('uib-position-measure');\n } else if (lastPlacement !== ttPosition.placement) {\n $position.positionArrow(tooltip, ttPosition.placement);\n }\n lastPlacement = ttPosition.placement;\n\n positionTimeout = null;\n }, 0, false);\n }\n };\n\n // Set up the correct scope to allow transclusion later\n ttScope.origScope = scope;\n\n // By default, the tooltip is not open.\n // TODO add ability to start tooltip opened\n ttScope.isOpen = false;\n\n function toggleTooltipBind() {\n if (!ttScope.isOpen) {\n showTooltipBind();\n } else {\n hideTooltipBind();\n }\n }\n\n // Show the tooltip with delay if specified, otherwise show it immediately\n function showTooltipBind() {\n if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {\n return;\n }\n\n cancelHide();\n prepareTooltip();\n\n if (ttScope.popupDelay) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!showTimeout) {\n showTimeout = $timeout(show, ttScope.popupDelay, false);\n }\n } else {\n show();\n }\n }\n\n function hideTooltipBind() {\n cancelShow();\n\n if (ttScope.popupCloseDelay) {\n if (!hideTimeout) {\n hideTimeout = $timeout(hide, ttScope.popupCloseDelay, false);\n }\n } else {\n hide();\n }\n }\n\n // Show the tooltip popup element.\n function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }\n\n function cancelShow() {\n if (showTimeout) {\n $timeout.cancel(showTimeout);\n showTimeout = null;\n }\n\n if (positionTimeout) {\n $timeout.cancel(positionTimeout);\n positionTimeout = null;\n }\n }\n\n // Hide the tooltip popup element.\n function hide() {\n if (!ttScope) {\n return;\n }\n\n // First things first: we don't show it anymore.\n ttScope.$evalAsync(function() {\n if (ttScope) {\n ttScope.isOpen = false;\n assignIsOpen(false);\n // And now we remove it from the DOM. However, if we have animation, we\n // need to wait for it to expire beforehand.\n // FIXME: this is a placeholder for a port of the transitions library.\n // The fade transition in TWBS is 150ms.\n if (ttScope.animation) {\n if (!transitionTimeout) {\n transitionTimeout = $timeout(removeTooltip, 150, false);\n }\n } else {\n removeTooltip();\n }\n }\n });\n }\n\n function cancelHide() {\n if (hideTimeout) {\n $timeout.cancel(hideTimeout);\n hideTimeout = null;\n }\n\n if (transitionTimeout) {\n $timeout.cancel(transitionTimeout);\n transitionTimeout = null;\n }\n }\n\n function createTooltip() {\n // There can only be one tooltip element per directive shown at once.\n if (tooltip) {\n return;\n }\n\n tooltipLinkedScope = ttScope.$new();\n tooltip = tooltipLinker(tooltipLinkedScope, function(tooltip) {\n if (appendToBody) {\n $document.find('body').append(tooltip);\n } else {\n element.after(tooltip);\n }\n });\n\n openedTooltips.add(ttScope, {\n close: hide\n });\n\n prepObservers();\n }\n\n function removeTooltip() {\n cancelShow();\n cancelHide();\n unregisterObservers();\n\n if (tooltip) {\n tooltip.remove();\n \n tooltip = null;\n if (adjustmentTimeout) {\n $timeout.cancel(adjustmentTimeout);\n }\n }\n\n openedTooltips.remove(ttScope);\n \n if (tooltipLinkedScope) {\n tooltipLinkedScope.$destroy();\n tooltipLinkedScope = null;\n }\n }\n\n /**\n * Set the initial scope values. Once\n * the tooltip is created, the observers\n * will be added to keep things in sync.\n */\n function prepareTooltip() {\n ttScope.title = attrs[prefix + 'Title'];\n if (contentParse) {\n ttScope.content = contentParse(scope);\n } else {\n ttScope.content = attrs[ttType];\n }\n\n ttScope.popupClass = attrs[prefix + 'Class'];\n ttScope.placement = angular.isDefined(attrs[prefix + 'Placement']) ? attrs[prefix + 'Placement'] : options.placement;\n var placement = $position.parsePlacement(ttScope.placement);\n lastPlacement = placement[1] ? placement[0] + '-' + placement[1] : placement[0];\n\n var delay = parseInt(attrs[prefix + 'PopupDelay'], 10);\n var closeDelay = parseInt(attrs[prefix + 'PopupCloseDelay'], 10);\n ttScope.popupDelay = !isNaN(delay) ? delay : options.popupDelay;\n ttScope.popupCloseDelay = !isNaN(closeDelay) ? closeDelay : options.popupCloseDelay;\n }\n\n function assignIsOpen(isOpen) {\n if (isOpenParse && angular.isFunction(isOpenParse.assign)) {\n isOpenParse.assign(scope, isOpen);\n }\n }\n\n ttScope.contentExp = function() {\n return ttScope.content;\n };\n\n /**\n * Observe the relevant attributes.\n */\n attrs.$observe('disabled', function(val) {\n if (val) {\n cancelShow();\n }\n\n if (val && ttScope.isOpen) {\n hide();\n }\n });\n\n if (isOpenParse) {\n scope.$watch(isOpenParse, function(val) {\n if (ttScope && !val === ttScope.isOpen) {\n toggleTooltipBind();\n }\n });\n }\n\n function prepObservers() {\n observers.length = 0;\n\n if (contentParse) {\n observers.push(\n scope.$watch(contentParse, function(val) {\n ttScope.content = val;\n if (!val && ttScope.isOpen) {\n hide();\n }\n })\n );\n\n observers.push(\n tooltipLinkedScope.$watch(function() {\n if (!repositionScheduled) {\n repositionScheduled = true;\n tooltipLinkedScope.$$postDigest(function() {\n repositionScheduled = false;\n if (ttScope && ttScope.isOpen) {\n positionTooltip();\n }\n });\n }\n })\n );\n } else {\n observers.push(\n attrs.$observe(ttType, function(val) {\n ttScope.content = val;\n if (!val && ttScope.isOpen) {\n hide();\n } else {\n positionTooltip();\n }\n })\n );\n }\n\n observers.push(\n attrs.$observe(prefix + 'Title', function(val) {\n ttScope.title = val;\n if (ttScope.isOpen) {\n positionTooltip();\n }\n })\n );\n\n observers.push(\n attrs.$observe(prefix + 'Placement', function(val) {\n ttScope.placement = val ? val : options.placement;\n if (ttScope.isOpen) {\n positionTooltip();\n }\n })\n );\n }\n\n function unregisterObservers() {\n if (observers.length) {\n angular.forEach(observers, function(observer) {\n observer();\n });\n observers.length = 0;\n }\n }\n\n // hide tooltips/popovers for outsideClick trigger\n function bodyHideTooltipBind(e) {\n if (!ttScope || !ttScope.isOpen || !tooltip) {\n return;\n }\n // make sure the tooltip/popover link or tool tooltip/popover itself were not clicked\n if (!element[0].contains(e.target) && !tooltip[0].contains(e.target)) {\n hideTooltipBind();\n }\n }\n\n // KeyboardEvent handler to hide the tooltip on Escape key press\n function hideOnEscapeKey(e) {\n if (e.which === 27) {\n hideTooltipBind();\n }\n }\n\n var unregisterTriggers = function() {\n triggers.show.forEach(function(trigger) {\n if (trigger === 'outsideClick') {\n element.off('click', toggleTooltipBind);\n } else {\n element.off(trigger, showTooltipBind);\n element.off(trigger, toggleTooltipBind);\n }\n element.off('keypress', hideOnEscapeKey);\n });\n triggers.hide.forEach(function(trigger) {\n if (trigger === 'outsideClick') {\n $document.off('click', bodyHideTooltipBind);\n } else {\n element.off(trigger, hideTooltipBind);\n }\n });\n };\n\n function prepTriggers() {\n var showTriggers = [], hideTriggers = [];\n var val = scope.$eval(attrs[prefix + 'Trigger']);\n unregisterTriggers();\n\n if (angular.isObject(val)) {\n Object.keys(val).forEach(function(key) {\n showTriggers.push(key);\n hideTriggers.push(val[key]);\n });\n triggers = {\n show: showTriggers,\n hide: hideTriggers\n };\n } else {\n triggers = getTriggers(val);\n }\n\n if (triggers.show !== 'none') {\n triggers.show.forEach(function(trigger, idx) {\n if (trigger === 'outsideClick') {\n element.on('click', toggleTooltipBind);\n $document.on('click', bodyHideTooltipBind);\n } else if (trigger === triggers.hide[idx]) {\n element.on(trigger, toggleTooltipBind);\n } else if (trigger) {\n element.on(trigger, showTooltipBind);\n element.on(triggers.hide[idx], hideTooltipBind);\n }\n element.on('keypress', hideOnEscapeKey);\n });\n }\n }\n\n prepTriggers();\n\n var animation = scope.$eval(attrs[prefix + 'Animation']);\n ttScope.animation = angular.isDefined(animation) ? !!animation : options.animation;\n\n var appendToBodyVal;\n var appendKey = prefix + 'AppendToBody';\n if (appendKey in attrs && attrs[appendKey] === undefined) {\n appendToBodyVal = true;\n } else {\n appendToBodyVal = scope.$eval(attrs[appendKey]);\n }\n\n appendToBody = angular.isDefined(appendToBodyVal) ? appendToBodyVal : appendToBody;\n\n // Make sure tooltip is destroyed and removed.\n scope.$on('$destroy', function onDestroyTooltip() {\n unregisterTriggers();\n removeTooltip();\n ttScope = null;\n });\n };\n }\n };\n };\n }];\n})\n\n// This is mostly ngInclude code but with a custom scope\n.directive('uibTooltipTemplateTransclude', [\n '$animate', '$sce', '$compile', '$templateRequest',\nfunction ($animate, $sce, $compile, $templateRequest) {\n return {\n link: function(scope, elem, attrs) {\n var origScope = scope.$eval(attrs.tooltipTemplateTranscludeScope);\n\n var changeCounter = 0,\n currentScope,\n previousElement,\n currentElement;\n\n var cleanupLastIncludeContent = function() {\n if (previousElement) {\n previousElement.remove();\n previousElement = null;\n }\n\n if (currentScope) {\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentElement) {\n $animate.leave(currentElement).then(function() {\n previousElement = null;\n });\n previousElement = currentElement;\n currentElement = null;\n }\n };\n\n scope.$watch($sce.parseAsResourceUrl(attrs.uibTooltipTemplateTransclude), function(src) {\n var thisChangeId = ++changeCounter;\n\n if (src) {\n //set the 2nd param to true to ignore the template request error so that the inner\n //contents and scope can be cleaned up.\n $templateRequest(src, true).then(function(response) {\n if (thisChangeId !== changeCounter) { return; }\n var newScope = origScope.$new();\n var template = response;\n\n var clone = $compile(template)(newScope, function(clone) {\n cleanupLastIncludeContent();\n $animate.enter(clone, elem);\n });\n\n currentScope = newScope;\n currentElement = clone;\n\n currentScope.$emit('$includeContentLoaded', src);\n }, function() {\n if (thisChangeId === changeCounter) {\n cleanupLastIncludeContent();\n scope.$emit('$includeContentError', src);\n }\n });\n scope.$emit('$includeContentRequested', src);\n } else {\n cleanupLastIncludeContent();\n }\n });\n\n scope.$on('$destroy', cleanupLastIncludeContent);\n }\n };\n}])\n\n/**\n * Note that it's intentional that these classes are *not* applied through $animate.\n * They must not be animated as they're expected to be present on the tooltip on\n * initialization.\n */\n.directive('uibTooltipClasses', ['$uibPosition', function($uibPosition) {\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n // need to set the primary position so the\n // arrow has space during position measure.\n // tooltip.positionTooltip()\n if (scope.placement) {\n // // There are no top-left etc... classes\n // // in TWBS, so we need the primary position.\n var position = $uibPosition.parsePlacement(scope.placement);\n element.addClass(position[0]);\n }\n\n if (scope.popupClass) {\n element.addClass(scope.popupClass);\n }\n\n if (scope.animation) {\n element.addClass(attrs.tooltipAnimationClass);\n }\n }\n };\n}])\n\n.directive('uibTooltipPopup', function() {\n return {\n restrict: 'A',\n scope: { content: '@' },\n templateUrl: 'uib/template/tooltip/tooltip-popup.html'\n };\n})\n\n.directive('uibTooltip', [ '$uibTooltip', function($uibTooltip) {\n return $uibTooltip('uibTooltip', 'tooltip', 'mouseenter');\n}])\n\n.directive('uibTooltipTemplatePopup', function() {\n return {\n restrict: 'A',\n scope: { contentExp: '&', originScope: '&' },\n templateUrl: 'uib/template/tooltip/tooltip-template-popup.html'\n };\n})\n\n.directive('uibTooltipTemplate', ['$uibTooltip', function($uibTooltip) {\n return $uibTooltip('uibTooltipTemplate', 'tooltip', 'mouseenter', {\n useContentExp: true\n });\n}])\n\n.directive('uibTooltipHtmlPopup', function() {\n return {\n restrict: 'A',\n scope: { contentExp: '&' },\n templateUrl: 'uib/template/tooltip/tooltip-html-popup.html'\n };\n})\n\n.directive('uibTooltipHtml', ['$uibTooltip', function($uibTooltip) {\n return $uibTooltip('uibTooltipHtml', 'tooltip', 'mouseenter', {\n useContentExp: true\n });\n}]);\n\n/**\n * The following features are still outstanding: popup delay, animation as a\n * function, placement as a function, inside, support for more triggers than\n * just mouse enter/leave, and selector delegatation.\n */\nangular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip'])\n\n.directive('uibPopoverTemplatePopup', function() {\n return {\n restrict: 'A',\n scope: { uibTitle: '@', contentExp: '&', originScope: '&' },\n templateUrl: 'uib/template/popover/popover-template.html'\n };\n})\n\n.directive('uibPopoverTemplate', ['$uibTooltip', function($uibTooltip) {\n return $uibTooltip('uibPopoverTemplate', 'popover', 'click', {\n useContentExp: true\n });\n}])\n\n.directive('uibPopoverHtmlPopup', function() {\n return {\n restrict: 'A',\n scope: { contentExp: '&', uibTitle: '@' },\n templateUrl: 'uib/template/popover/popover-html.html'\n };\n})\n\n.directive('uibPopoverHtml', ['$uibTooltip', function($uibTooltip) {\n return $uibTooltip('uibPopoverHtml', 'popover', 'click', {\n useContentExp: true\n });\n}])\n\n.directive('uibPopoverPopup', function() {\n return {\n restrict: 'A',\n scope: { uibTitle: '@', content: '@' },\n templateUrl: 'uib/template/popover/popover.html'\n };\n})\n\n.directive('uibPopover', ['$uibTooltip', function($uibTooltip) {\n return $uibTooltip('uibPopover', 'popover', 'click');\n}]);\n\nangular.module('ui.bootstrap.progressbar', [])\n\n.constant('uibProgressConfig', {\n animate: true,\n max: 100\n})\n\n.controller('UibProgressController', ['$scope', '$attrs', 'uibProgressConfig', function($scope, $attrs, progressConfig) {\n var self = this,\n animate = angular.isDefined($attrs.animate) ? $scope.$parent.$eval($attrs.animate) : progressConfig.animate;\n\n this.bars = [];\n $scope.max = getMaxOrDefault();\n\n this.addBar = function(bar, element, attrs) {\n if (!animate) {\n element.css({'transition': 'none'});\n }\n\n this.bars.push(bar);\n\n bar.max = getMaxOrDefault();\n bar.title = attrs && angular.isDefined(attrs.title) ? attrs.title : 'progressbar';\n\n bar.$watch('value', function(value) {\n bar.recalculatePercentage();\n });\n\n bar.recalculatePercentage = function() {\n var totalPercentage = self.bars.reduce(function(total, bar) {\n bar.percent = +(100 * bar.value / bar.max).toFixed(2);\n return total + bar.percent;\n }, 0);\n\n if (totalPercentage > 100) {\n bar.percent -= totalPercentage - 100;\n }\n };\n\n bar.$on('$destroy', function() {\n element = null;\n self.removeBar(bar);\n });\n };\n\n this.removeBar = function(bar) {\n this.bars.splice(this.bars.indexOf(bar), 1);\n this.bars.forEach(function (bar) {\n bar.recalculatePercentage();\n });\n };\n\n //$attrs.$observe('maxParam', function(maxParam) {\n $scope.$watch('maxParam', function(maxParam) {\n self.bars.forEach(function(bar) {\n bar.max = getMaxOrDefault();\n bar.recalculatePercentage();\n });\n });\n\n function getMaxOrDefault () {\n return angular.isDefined($scope.maxParam) ? $scope.maxParam : progressConfig.max;\n }\n}])\n\n.directive('uibProgress', function() {\n return {\n replace: true,\n transclude: true,\n controller: 'UibProgressController',\n require: 'uibProgress',\n scope: {\n maxParam: '=?max'\n },\n templateUrl: 'uib/template/progressbar/progress.html'\n };\n})\n\n.directive('uibBar', function() {\n return {\n replace: true,\n transclude: true,\n require: '^uibProgress',\n scope: {\n value: '=',\n type: '@'\n },\n templateUrl: 'uib/template/progressbar/bar.html',\n link: function(scope, element, attrs, progressCtrl) {\n progressCtrl.addBar(scope, element, attrs);\n }\n };\n})\n\n.directive('uibProgressbar', function() {\n return {\n replace: true,\n transclude: true,\n controller: 'UibProgressController',\n scope: {\n value: '=',\n maxParam: '=?max',\n type: '@'\n },\n templateUrl: 'uib/template/progressbar/progressbar.html',\n link: function(scope, element, attrs, progressCtrl) {\n progressCtrl.addBar(scope, angular.element(element.children()[0]), {title: attrs.title});\n }\n };\n});\n\nangular.module('ui.bootstrap.rating', [])\n\n.constant('uibRatingConfig', {\n max: 5,\n stateOn: null,\n stateOff: null,\n enableReset: true,\n titles: ['one', 'two', 'three', 'four', 'five']\n})\n\n.controller('UibRatingController', ['$scope', '$attrs', 'uibRatingConfig', function($scope, $attrs, ratingConfig) {\n var ngModelCtrl = { $setViewValue: angular.noop },\n self = this;\n\n this.init = function(ngModelCtrl_) {\n ngModelCtrl = ngModelCtrl_;\n ngModelCtrl.$render = this.render;\n\n ngModelCtrl.$formatters.push(function(value) {\n if (angular.isNumber(value) && value << 0 !== value) {\n value = Math.round(value);\n }\n\n return value;\n });\n\n this.stateOn = angular.isDefined($attrs.stateOn) ? $scope.$parent.$eval($attrs.stateOn) : ratingConfig.stateOn;\n this.stateOff = angular.isDefined($attrs.stateOff) ? $scope.$parent.$eval($attrs.stateOff) : ratingConfig.stateOff;\n this.enableReset = angular.isDefined($attrs.enableReset) ?\n $scope.$parent.$eval($attrs.enableReset) : ratingConfig.enableReset;\n var tmpTitles = angular.isDefined($attrs.titles) ? $scope.$parent.$eval($attrs.titles) : ratingConfig.titles;\n this.titles = angular.isArray(tmpTitles) && tmpTitles.length > 0 ?\n tmpTitles : ratingConfig.titles;\n\n var ratingStates = angular.isDefined($attrs.ratingStates) ?\n $scope.$parent.$eval($attrs.ratingStates) :\n new Array(angular.isDefined($attrs.max) ? $scope.$parent.$eval($attrs.max) : ratingConfig.max);\n $scope.range = this.buildTemplateObjects(ratingStates);\n };\n\n this.buildTemplateObjects = function(states) {\n for (var i = 0, n = states.length; i < n; i++) {\n states[i] = angular.extend({ index: i }, { stateOn: this.stateOn, stateOff: this.stateOff, title: this.getTitle(i) }, states[i]);\n }\n return states;\n };\n\n this.getTitle = function(index) {\n if (index >= this.titles.length) {\n return index + 1;\n }\n\n return this.titles[index];\n };\n\n $scope.rate = function(value) {\n if (!$scope.readonly && value >= 0 && value <= $scope.range.length) {\n var newViewValue = self.enableReset && ngModelCtrl.$viewValue === value ? 0 : value;\n ngModelCtrl.$setViewValue(newViewValue);\n ngModelCtrl.$render();\n }\n };\n\n $scope.enter = function(value) {\n if (!$scope.readonly) {\n $scope.value = value;\n }\n $scope.onHover({value: value});\n };\n\n $scope.reset = function() {\n $scope.value = ngModelCtrl.$viewValue;\n $scope.onLeave();\n };\n\n $scope.onKeydown = function(evt) {\n if (/(37|38|39|40)/.test(evt.which)) {\n evt.preventDefault();\n evt.stopPropagation();\n $scope.rate($scope.value + (evt.which === 38 || evt.which === 39 ? 1 : -1));\n }\n };\n\n this.render = function() {\n $scope.value = ngModelCtrl.$viewValue;\n $scope.title = self.getTitle($scope.value - 1);\n };\n}])\n\n.directive('uibRating', function() {\n return {\n require: ['uibRating', 'ngModel'],\n restrict: 'A',\n scope: {\n readonly: '=?readOnly',\n onHover: '&',\n onLeave: '&'\n },\n controller: 'UibRatingController',\n templateUrl: 'uib/template/rating/rating.html',\n link: function(scope, element, attrs, ctrls) {\n var ratingCtrl = ctrls[0], ngModelCtrl = ctrls[1];\n ratingCtrl.init(ngModelCtrl);\n }\n };\n});\n\nangular.module('ui.bootstrap.tabs', [])\n\n.controller('UibTabsetController', ['$scope', function ($scope) {\n var ctrl = this,\n oldIndex;\n ctrl.tabs = [];\n\n ctrl.select = function(index, evt) {\n if (!destroyed) {\n var previousIndex = findTabIndex(oldIndex);\n var previousSelected = ctrl.tabs[previousIndex];\n if (previousSelected) {\n previousSelected.tab.onDeselect({\n $event: evt,\n $selectedIndex: index\n });\n if (evt && evt.isDefaultPrevented()) {\n return;\n }\n previousSelected.tab.active = false;\n }\n\n var selected = ctrl.tabs[index];\n if (selected) {\n selected.tab.onSelect({\n $event: evt\n });\n selected.tab.active = true;\n ctrl.active = selected.index;\n oldIndex = selected.index;\n } else if (!selected && angular.isDefined(oldIndex)) {\n ctrl.active = null;\n oldIndex = null;\n }\n }\n };\n\n ctrl.addTab = function addTab(tab) {\n ctrl.tabs.push({\n tab: tab,\n index: tab.index\n });\n ctrl.tabs.sort(function(t1, t2) {\n if (t1.index > t2.index) {\n return 1;\n }\n\n if (t1.index < t2.index) {\n return -1;\n }\n\n return 0;\n });\n\n if (tab.index === ctrl.active || !angular.isDefined(ctrl.active) && ctrl.tabs.length === 1) {\n var newActiveIndex = findTabIndex(tab.index);\n ctrl.select(newActiveIndex);\n }\n };\n\n ctrl.removeTab = function removeTab(tab) {\n var index;\n for (var i = 0; i < ctrl.tabs.length; i++) {\n if (ctrl.tabs[i].tab === tab) {\n index = i;\n break;\n }\n }\n\n if (ctrl.tabs[index].index === ctrl.active) {\n var newActiveTabIndex = index === ctrl.tabs.length - 1 ?\n index - 1 : index + 1 % ctrl.tabs.length;\n ctrl.select(newActiveTabIndex);\n }\n\n ctrl.tabs.splice(index, 1);\n };\n\n $scope.$watch('tabset.active', function(val) {\n if (angular.isDefined(val) && val !== oldIndex) {\n ctrl.select(findTabIndex(val));\n }\n });\n\n var destroyed;\n $scope.$on('$destroy', function() {\n destroyed = true;\n });\n\n function findTabIndex(index) {\n for (var i = 0; i < ctrl.tabs.length; i++) {\n if (ctrl.tabs[i].index === index) {\n return i;\n }\n }\n }\n}])\n\n.directive('uibTabset', function() {\n return {\n transclude: true,\n replace: true,\n scope: {},\n bindToController: {\n active: '=?',\n type: '@'\n },\n controller: 'UibTabsetController',\n controllerAs: 'tabset',\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/tabs/tabset.html';\n },\n link: function(scope, element, attrs) {\n scope.vertical = angular.isDefined(attrs.vertical) ?\n scope.$parent.$eval(attrs.vertical) : false;\n scope.justified = angular.isDefined(attrs.justified) ?\n scope.$parent.$eval(attrs.justified) : false;\n }\n };\n})\n\n.directive('uibTab', ['$parse', function($parse) {\n return {\n require: '^uibTabset',\n replace: true,\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || 'uib/template/tabs/tab.html';\n },\n transclude: true,\n scope: {\n heading: '@',\n index: '=?',\n classes: '@?',\n onSelect: '&select', //This callback is called in contentHeadingTransclude\n //once it inserts the tab's content into the dom\n onDeselect: '&deselect'\n },\n controller: function() {\n //Empty controller so other directives can require being 'under' a tab\n },\n controllerAs: 'tab',\n link: function(scope, elm, attrs, tabsetCtrl, transclude) {\n scope.disabled = false;\n if (attrs.disable) {\n scope.$parent.$watch($parse(attrs.disable), function(value) {\n scope.disabled = !! value;\n });\n }\n\n if (angular.isUndefined(attrs.index)) {\n if (tabsetCtrl.tabs && tabsetCtrl.tabs.length) {\n scope.index = Math.max.apply(null, tabsetCtrl.tabs.map(function(t) { return t.index; })) + 1;\n } else {\n scope.index = 0;\n }\n }\n\n if (angular.isUndefined(attrs.classes)) {\n scope.classes = '';\n }\n\n scope.select = function(evt) {\n if (!scope.disabled) {\n var index;\n for (var i = 0; i < tabsetCtrl.tabs.length; i++) {\n if (tabsetCtrl.tabs[i].tab === scope) {\n index = i;\n break;\n }\n }\n\n tabsetCtrl.select(index, evt);\n }\n };\n\n tabsetCtrl.addTab(scope);\n scope.$on('$destroy', function() {\n tabsetCtrl.removeTab(scope);\n });\n\n //We need to transclude later, once the content container is ready.\n //when this link happens, we're inside a tab heading.\n scope.$transcludeFn = transclude;\n }\n };\n}])\n\n.directive('uibTabHeadingTransclude', function() {\n return {\n restrict: 'A',\n require: '^uibTab',\n link: function(scope, elm) {\n scope.$watch('headingElement', function updateHeadingElement(heading) {\n if (heading) {\n elm.html('');\n elm.append(heading);\n }\n });\n }\n };\n})\n\n.directive('uibTabContentTransclude', function() {\n return {\n restrict: 'A',\n require: '^uibTabset',\n link: function(scope, elm, attrs) {\n var tab = scope.$eval(attrs.uibTabContentTransclude).tab;\n\n //Now our tab is ready to be transcluded: both the tab heading area\n //and the tab content area are loaded. Transclude 'em both.\n tab.$transcludeFn(tab.$parent, function(contents) {\n angular.forEach(contents, function(node) {\n if (isTabHeading(node)) {\n //Let tabHeadingTransclude know.\n tab.headingElement = node;\n } else {\n elm.append(node);\n }\n });\n });\n }\n };\n\n function isTabHeading(node) {\n return node.tagName && (\n node.hasAttribute('uib-tab-heading') ||\n node.hasAttribute('data-uib-tab-heading') ||\n node.hasAttribute('x-uib-tab-heading') ||\n node.tagName.toLowerCase() === 'uib-tab-heading' ||\n node.tagName.toLowerCase() === 'data-uib-tab-heading' ||\n node.tagName.toLowerCase() === 'x-uib-tab-heading' ||\n node.tagName.toLowerCase() === 'uib:tab-heading'\n );\n }\n});\n\nangular.module('ui.bootstrap.timepicker', [])\n\n.constant('uibTimepickerConfig', {\n hourStep: 1,\n minuteStep: 1,\n secondStep: 1,\n showMeridian: true,\n showSeconds: false,\n meridians: null,\n readonlyInput: false,\n mousewheel: true,\n arrowkeys: true,\n showSpinners: true,\n templateUrl: 'uib/template/timepicker/timepicker.html'\n})\n\n.controller('UibTimepickerController', ['$scope', '$element', '$attrs', '$parse', '$log', '$locale', 'uibTimepickerConfig', function($scope, $element, $attrs, $parse, $log, $locale, timepickerConfig) {\n var hoursModelCtrl, minutesModelCtrl, secondsModelCtrl;\n var selected = new Date(),\n watchers = [],\n ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl\n meridians = angular.isDefined($attrs.meridians) ? $scope.$parent.$eval($attrs.meridians) : timepickerConfig.meridians || $locale.DATETIME_FORMATS.AMPMS,\n padHours = angular.isDefined($attrs.padHours) ? $scope.$parent.$eval($attrs.padHours) : true;\n\n $scope.tabindex = angular.isDefined($attrs.tabindex) ? $attrs.tabindex : 0;\n $element.removeAttr('tabindex');\n\n this.init = function(ngModelCtrl_, inputs) {\n ngModelCtrl = ngModelCtrl_;\n ngModelCtrl.$render = this.render;\n\n ngModelCtrl.$formatters.unshift(function(modelValue) {\n return modelValue ? new Date(modelValue) : null;\n });\n\n var hoursInputEl = inputs.eq(0),\n minutesInputEl = inputs.eq(1),\n secondsInputEl = inputs.eq(2);\n\n hoursModelCtrl = hoursInputEl.controller('ngModel');\n minutesModelCtrl = minutesInputEl.controller('ngModel');\n secondsModelCtrl = secondsInputEl.controller('ngModel');\n\n var mousewheel = angular.isDefined($attrs.mousewheel) ? $scope.$parent.$eval($attrs.mousewheel) : timepickerConfig.mousewheel;\n\n if (mousewheel) {\n this.setupMousewheelEvents(hoursInputEl, minutesInputEl, secondsInputEl);\n }\n\n var arrowkeys = angular.isDefined($attrs.arrowkeys) ? $scope.$parent.$eval($attrs.arrowkeys) : timepickerConfig.arrowkeys;\n if (arrowkeys) {\n this.setupArrowkeyEvents(hoursInputEl, minutesInputEl, secondsInputEl);\n }\n\n $scope.readonlyInput = angular.isDefined($attrs.readonlyInput) ? $scope.$parent.$eval($attrs.readonlyInput) : timepickerConfig.readonlyInput;\n this.setupInputEvents(hoursInputEl, minutesInputEl, secondsInputEl);\n };\n\n var hourStep = timepickerConfig.hourStep;\n if ($attrs.hourStep) {\n watchers.push($scope.$parent.$watch($parse($attrs.hourStep), function(value) {\n hourStep = +value;\n }));\n }\n\n var minuteStep = timepickerConfig.minuteStep;\n if ($attrs.minuteStep) {\n watchers.push($scope.$parent.$watch($parse($attrs.minuteStep), function(value) {\n minuteStep = +value;\n }));\n }\n\n var min;\n watchers.push($scope.$parent.$watch($parse($attrs.min), function(value) {\n var dt = new Date(value);\n min = isNaN(dt) ? undefined : dt;\n }));\n\n var max;\n watchers.push($scope.$parent.$watch($parse($attrs.max), function(value) {\n var dt = new Date(value);\n max = isNaN(dt) ? undefined : dt;\n }));\n\n var disabled = false;\n if ($attrs.ngDisabled) {\n watchers.push($scope.$parent.$watch($parse($attrs.ngDisabled), function(value) {\n disabled = value;\n }));\n }\n\n $scope.noIncrementHours = function() {\n var incrementedSelected = addMinutes(selected, hourStep * 60);\n return disabled || incrementedSelected > max ||\n incrementedSelected < selected && incrementedSelected < min;\n };\n\n $scope.noDecrementHours = function() {\n var decrementedSelected = addMinutes(selected, -hourStep * 60);\n return disabled || decrementedSelected < min ||\n decrementedSelected > selected && decrementedSelected > max;\n };\n\n $scope.noIncrementMinutes = function() {\n var incrementedSelected = addMinutes(selected, minuteStep);\n return disabled || incrementedSelected > max ||\n incrementedSelected < selected && incrementedSelected < min;\n };\n\n $scope.noDecrementMinutes = function() {\n var decrementedSelected = addMinutes(selected, -minuteStep);\n return disabled || decrementedSelected < min ||\n decrementedSelected > selected && decrementedSelected > max;\n };\n\n $scope.noIncrementSeconds = function() {\n var incrementedSelected = addSeconds(selected, secondStep);\n return disabled || incrementedSelected > max ||\n incrementedSelected < selected && incrementedSelected < min;\n };\n\n $scope.noDecrementSeconds = function() {\n var decrementedSelected = addSeconds(selected, -secondStep);\n return disabled || decrementedSelected < min ||\n decrementedSelected > selected && decrementedSelected > max;\n };\n\n $scope.noToggleMeridian = function() {\n if (selected.getHours() < 12) {\n return disabled || addMinutes(selected, 12 * 60) > max;\n }\n\n return disabled || addMinutes(selected, -12 * 60) < min;\n };\n\n var secondStep = timepickerConfig.secondStep;\n if ($attrs.secondStep) {\n watchers.push($scope.$parent.$watch($parse($attrs.secondStep), function(value) {\n secondStep = +value;\n }));\n }\n\n $scope.showSeconds = timepickerConfig.showSeconds;\n if ($attrs.showSeconds) {\n watchers.push($scope.$parent.$watch($parse($attrs.showSeconds), function(value) {\n $scope.showSeconds = !!value;\n }));\n }\n\n // 12H / 24H mode\n $scope.showMeridian = timepickerConfig.showMeridian;\n if ($attrs.showMeridian) {\n watchers.push($scope.$parent.$watch($parse($attrs.showMeridian), function(value) {\n $scope.showMeridian = !!value;\n\n if (ngModelCtrl.$error.time) {\n // Evaluate from template\n var hours = getHoursFromTemplate(), minutes = getMinutesFromTemplate();\n if (angular.isDefined(hours) && angular.isDefined(minutes)) {\n selected.setHours(hours);\n refresh();\n }\n } else {\n updateTemplate();\n }\n }));\n }\n\n // Get $scope.hours in 24H mode if valid\n function getHoursFromTemplate() {\n var hours = +$scope.hours;\n var valid = $scope.showMeridian ? hours > 0 && hours < 13 :\n hours >= 0 && hours < 24;\n if (!valid || $scope.hours === '') {\n return undefined;\n }\n\n if ($scope.showMeridian) {\n if (hours === 12) {\n hours = 0;\n }\n if ($scope.meridian === meridians[1]) {\n hours = hours + 12;\n }\n }\n return hours;\n }\n\n function getMinutesFromTemplate() {\n var minutes = +$scope.minutes;\n var valid = minutes >= 0 && minutes < 60;\n if (!valid || $scope.minutes === '') {\n return undefined;\n }\n return minutes;\n }\n\n function getSecondsFromTemplate() {\n var seconds = +$scope.seconds;\n return seconds >= 0 && seconds < 60 ? seconds : undefined;\n }\n\n function pad(value, noPad) {\n if (value === null) {\n return '';\n }\n\n return angular.isDefined(value) && value.toString().length < 2 && !noPad ?\n '0' + value : value.toString();\n }\n\n // Respond on mousewheel spin\n this.setupMousewheelEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) {\n var isScrollingUp = function(e) {\n if (e.originalEvent) {\n e = e.originalEvent;\n }\n //pick correct delta variable depending on event\n var delta = e.wheelDelta ? e.wheelDelta : -e.deltaY;\n return e.detail || delta > 0;\n };\n\n hoursInputEl.on('mousewheel wheel', function(e) {\n if (!disabled) {\n $scope.$apply(isScrollingUp(e) ? $scope.incrementHours() : $scope.decrementHours());\n }\n e.preventDefault();\n });\n\n minutesInputEl.on('mousewheel wheel', function(e) {\n if (!disabled) {\n $scope.$apply(isScrollingUp(e) ? $scope.incrementMinutes() : $scope.decrementMinutes());\n }\n e.preventDefault();\n });\n\n secondsInputEl.on('mousewheel wheel', function(e) {\n if (!disabled) {\n $scope.$apply(isScrollingUp(e) ? $scope.incrementSeconds() : $scope.decrementSeconds());\n }\n e.preventDefault();\n });\n };\n\n // Respond on up/down arrowkeys\n this.setupArrowkeyEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) {\n hoursInputEl.on('keydown', function(e) {\n if (!disabled) {\n if (e.which === 38) { // up\n e.preventDefault();\n $scope.incrementHours();\n $scope.$apply();\n } else if (e.which === 40) { // down\n e.preventDefault();\n $scope.decrementHours();\n $scope.$apply();\n }\n }\n });\n\n minutesInputEl.on('keydown', function(e) {\n if (!disabled) {\n if (e.which === 38) { // up\n e.preventDefault();\n $scope.incrementMinutes();\n $scope.$apply();\n } else if (e.which === 40) { // down\n e.preventDefault();\n $scope.decrementMinutes();\n $scope.$apply();\n }\n }\n });\n\n secondsInputEl.on('keydown', function(e) {\n if (!disabled) {\n if (e.which === 38) { // up\n e.preventDefault();\n $scope.incrementSeconds();\n $scope.$apply();\n } else if (e.which === 40) { // down\n e.preventDefault();\n $scope.decrementSeconds();\n $scope.$apply();\n }\n }\n });\n };\n\n this.setupInputEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) {\n if ($scope.readonlyInput) {\n $scope.updateHours = angular.noop;\n $scope.updateMinutes = angular.noop;\n $scope.updateSeconds = angular.noop;\n return;\n }\n\n var invalidate = function(invalidHours, invalidMinutes, invalidSeconds) {\n ngModelCtrl.$setViewValue(null);\n ngModelCtrl.$setValidity('time', false);\n if (angular.isDefined(invalidHours)) {\n $scope.invalidHours = invalidHours;\n if (hoursModelCtrl) {\n hoursModelCtrl.$setValidity('hours', false);\n }\n }\n\n if (angular.isDefined(invalidMinutes)) {\n $scope.invalidMinutes = invalidMinutes;\n if (minutesModelCtrl) {\n minutesModelCtrl.$setValidity('minutes', false);\n }\n }\n\n if (angular.isDefined(invalidSeconds)) {\n $scope.invalidSeconds = invalidSeconds;\n if (secondsModelCtrl) {\n secondsModelCtrl.$setValidity('seconds', false);\n }\n }\n };\n\n $scope.updateHours = function() {\n var hours = getHoursFromTemplate(),\n minutes = getMinutesFromTemplate();\n\n ngModelCtrl.$setDirty();\n\n if (angular.isDefined(hours) && angular.isDefined(minutes)) {\n selected.setHours(hours);\n selected.setMinutes(minutes);\n if (selected < min || selected > max) {\n invalidate(true);\n } else {\n refresh('h');\n }\n } else {\n invalidate(true);\n }\n };\n\n hoursInputEl.on('blur', function(e) {\n ngModelCtrl.$setTouched();\n if (modelIsEmpty()) {\n makeValid();\n } else if ($scope.hours === null || $scope.hours === '') {\n invalidate(true);\n } else if (!$scope.invalidHours && $scope.hours < 10) {\n $scope.$apply(function() {\n $scope.hours = pad($scope.hours, !padHours);\n });\n }\n });\n\n $scope.updateMinutes = function() {\n var minutes = getMinutesFromTemplate(),\n hours = getHoursFromTemplate();\n\n ngModelCtrl.$setDirty();\n\n if (angular.isDefined(minutes) && angular.isDefined(hours)) {\n selected.setHours(hours);\n selected.setMinutes(minutes);\n if (selected < min || selected > max) {\n invalidate(undefined, true);\n } else {\n refresh('m');\n }\n } else {\n invalidate(undefined, true);\n }\n };\n\n minutesInputEl.on('blur', function(e) {\n ngModelCtrl.$setTouched();\n if (modelIsEmpty()) {\n makeValid();\n } else if ($scope.minutes === null) {\n invalidate(undefined, true);\n } else if (!$scope.invalidMinutes && $scope.minutes < 10) {\n $scope.$apply(function() {\n $scope.minutes = pad($scope.minutes);\n });\n }\n });\n\n $scope.updateSeconds = function() {\n var seconds = getSecondsFromTemplate();\n\n ngModelCtrl.$setDirty();\n\n if (angular.isDefined(seconds)) {\n selected.setSeconds(seconds);\n refresh('s');\n } else {\n invalidate(undefined, undefined, true);\n }\n };\n\n secondsInputEl.on('blur', function(e) {\n if (modelIsEmpty()) {\n makeValid();\n } else if (!$scope.invalidSeconds && $scope.seconds < 10) {\n $scope.$apply( function() {\n $scope.seconds = pad($scope.seconds);\n });\n }\n });\n\n };\n\n this.render = function() {\n var date = ngModelCtrl.$viewValue;\n\n if (isNaN(date)) {\n ngModelCtrl.$setValidity('time', false);\n $log.error('Timepicker directive: \"ng-model\" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.');\n } else {\n if (date) {\n selected = date;\n }\n\n if (selected < min || selected > max) {\n ngModelCtrl.$setValidity('time', false);\n $scope.invalidHours = true;\n $scope.invalidMinutes = true;\n } else {\n makeValid();\n }\n updateTemplate();\n }\n };\n\n // Call internally when we know that model is valid.\n function refresh(keyboardChange) {\n makeValid();\n ngModelCtrl.$setViewValue(new Date(selected));\n updateTemplate(keyboardChange);\n }\n\n function makeValid() {\n if (hoursModelCtrl) {\n hoursModelCtrl.$setValidity('hours', true);\n }\n\n if (minutesModelCtrl) {\n minutesModelCtrl.$setValidity('minutes', true);\n }\n\n if (secondsModelCtrl) {\n secondsModelCtrl.$setValidity('seconds', true);\n }\n\n ngModelCtrl.$setValidity('time', true);\n $scope.invalidHours = false;\n $scope.invalidMinutes = false;\n $scope.invalidSeconds = false;\n }\n\n function updateTemplate(keyboardChange) {\n if (!ngModelCtrl.$modelValue) {\n $scope.hours = null;\n $scope.minutes = null;\n $scope.seconds = null;\n $scope.meridian = meridians[0];\n } else {\n var hours = selected.getHours(),\n minutes = selected.getMinutes(),\n seconds = selected.getSeconds();\n\n if ($scope.showMeridian) {\n hours = hours === 0 || hours === 12 ? 12 : hours % 12; // Convert 24 to 12 hour system\n }\n\n $scope.hours = keyboardChange === 'h' ? hours : pad(hours, !padHours);\n if (keyboardChange !== 'm') {\n $scope.minutes = pad(minutes);\n }\n $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1];\n\n if (keyboardChange !== 's') {\n $scope.seconds = pad(seconds);\n }\n $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1];\n }\n }\n\n function addSecondsToSelected(seconds) {\n selected = addSeconds(selected, seconds);\n refresh();\n }\n\n function addMinutes(selected, minutes) {\n return addSeconds(selected, minutes*60);\n }\n\n function addSeconds(date, seconds) {\n var dt = new Date(date.getTime() + seconds * 1000);\n var newDate = new Date(date);\n newDate.setHours(dt.getHours(), dt.getMinutes(), dt.getSeconds());\n return newDate;\n }\n\n function modelIsEmpty() {\n return ($scope.hours === null || $scope.hours === '') &&\n ($scope.minutes === null || $scope.minutes === '') &&\n (!$scope.showSeconds || $scope.showSeconds && ($scope.seconds === null || $scope.seconds === ''));\n }\n\n $scope.showSpinners = angular.isDefined($attrs.showSpinners) ?\n $scope.$parent.$eval($attrs.showSpinners) : timepickerConfig.showSpinners;\n\n $scope.incrementHours = function() {\n if (!$scope.noIncrementHours()) {\n addSecondsToSelected(hourStep * 60 * 60);\n }\n };\n\n $scope.decrementHours = function() {\n if (!$scope.noDecrementHours()) {\n addSecondsToSelected(-hourStep * 60 * 60);\n }\n };\n\n $scope.incrementMinutes = function() {\n if (!$scope.noIncrementMinutes()) {\n addSecondsToSelected(minuteStep * 60);\n }\n };\n\n $scope.decrementMinutes = function() {\n if (!$scope.noDecrementMinutes()) {\n addSecondsToSelected(-minuteStep * 60);\n }\n };\n\n $scope.incrementSeconds = function() {\n if (!$scope.noIncrementSeconds()) {\n addSecondsToSelected(secondStep);\n }\n };\n\n $scope.decrementSeconds = function() {\n if (!$scope.noDecrementSeconds()) {\n addSecondsToSelected(-secondStep);\n }\n };\n\n $scope.toggleMeridian = function() {\n var minutes = getMinutesFromTemplate(),\n hours = getHoursFromTemplate();\n\n if (!$scope.noToggleMeridian()) {\n if (angular.isDefined(minutes) && angular.isDefined(hours)) {\n addSecondsToSelected(12 * 60 * (selected.getHours() < 12 ? 60 : -60));\n } else {\n $scope.meridian = $scope.meridian === meridians[0] ? meridians[1] : meridians[0];\n }\n }\n };\n\n $scope.blur = function() {\n ngModelCtrl.$setTouched();\n };\n\n $scope.$on('$destroy', function() {\n while (watchers.length) {\n watchers.shift()();\n }\n });\n}])\n\n.directive('uibTimepicker', ['uibTimepickerConfig', function(uibTimepickerConfig) {\n return {\n require: ['uibTimepicker', '?^ngModel'],\n restrict: 'A',\n controller: 'UibTimepickerController',\n controllerAs: 'timepicker',\n scope: {},\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || uibTimepickerConfig.templateUrl;\n },\n link: function(scope, element, attrs, ctrls) {\n var timepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1];\n\n if (ngModelCtrl) {\n timepickerCtrl.init(ngModelCtrl, element.find('input'));\n }\n }\n };\n}]);\n\nangular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap.position'])\n\n/**\n * A helper service that can parse typeahead's syntax (string provided by users)\n * Extracted to a separate service for ease of unit testing\n */\n .factory('uibTypeaheadParser', ['$parse', function($parse) {\n // 000001111111100000000000002222222200000000000000003333333333333330000000000044444444000\n var TYPEAHEAD_REGEXP = /^\\s*([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?\\s+for\\s+(?:([\\$\\w][\\$\\w\\d]*))\\s+in\\s+([\\s\\S]+?)$/;\n return {\n parse: function(input) {\n var match = input.match(TYPEAHEAD_REGEXP);\n if (!match) {\n throw new Error(\n 'Expected typeahead specification in form of \"_modelValue_ (as _label_)? for _item_ in _collection_\"' +\n ' but got \"' + input + '\".');\n }\n\n return {\n itemName: match[3],\n source: $parse(match[4]),\n viewMapper: $parse(match[2] || match[1]),\n modelMapper: $parse(match[1])\n };\n }\n };\n }])\n\n .controller('UibTypeaheadController', ['$scope', '$element', '$attrs', '$compile', '$parse', '$q', '$timeout', '$document', '$window', '$rootScope', '$$debounce', '$uibPosition', 'uibTypeaheadParser',\n function(originalScope, element, attrs, $compile, $parse, $q, $timeout, $document, $window, $rootScope, $$debounce, $position, typeaheadParser) {\n var HOT_KEYS = [9, 13, 27, 38, 40];\n var eventDebounceTime = 200;\n var modelCtrl, ngModelOptions;\n //SUPPORTED ATTRIBUTES (OPTIONS)\n\n //minimal no of characters that needs to be entered before typeahead kicks-in\n var minLength = originalScope.$eval(attrs.typeaheadMinLength);\n if (!minLength && minLength !== 0) {\n minLength = 1;\n }\n\n originalScope.$watch(attrs.typeaheadMinLength, function (newVal) {\n minLength = !newVal && newVal !== 0 ? 1 : newVal;\n });\n\n //minimal wait time after last character typed before typeahead kicks-in\n var waitTime = originalScope.$eval(attrs.typeaheadWaitMs) || 0;\n\n //should it restrict model values to the ones selected from the popup only?\n var isEditable = originalScope.$eval(attrs.typeaheadEditable) !== false;\n originalScope.$watch(attrs.typeaheadEditable, function (newVal) {\n isEditable = newVal !== false;\n });\n\n //binding to a variable that indicates if matches are being retrieved asynchronously\n var isLoadingSetter = $parse(attrs.typeaheadLoading).assign || angular.noop;\n\n //a function to determine if an event should cause selection\n var isSelectEvent = attrs.typeaheadShouldSelect ? $parse(attrs.typeaheadShouldSelect) : function(scope, vals) {\n var evt = vals.$event;\n return evt.which === 13 || evt.which === 9;\n };\n\n //a callback executed when a match is selected\n var onSelectCallback = $parse(attrs.typeaheadOnSelect);\n\n //should it select highlighted popup value when losing focus?\n var isSelectOnBlur = angular.isDefined(attrs.typeaheadSelectOnBlur) ? originalScope.$eval(attrs.typeaheadSelectOnBlur) : false;\n\n //binding to a variable that indicates if there were no results after the query is completed\n var isNoResultsSetter = $parse(attrs.typeaheadNoResults).assign || angular.noop;\n\n var inputFormatter = attrs.typeaheadInputFormatter ? $parse(attrs.typeaheadInputFormatter) : undefined;\n\n var appendToBody = attrs.typeaheadAppendToBody ? originalScope.$eval(attrs.typeaheadAppendToBody) : false;\n\n var appendTo = attrs.typeaheadAppendTo ?\n originalScope.$eval(attrs.typeaheadAppendTo) : null;\n\n var focusFirst = originalScope.$eval(attrs.typeaheadFocusFirst) !== false;\n\n //If input matches an item of the list exactly, select it automatically\n var selectOnExact = attrs.typeaheadSelectOnExact ? originalScope.$eval(attrs.typeaheadSelectOnExact) : false;\n\n //binding to a variable that indicates if dropdown is open\n var isOpenSetter = $parse(attrs.typeaheadIsOpen).assign || angular.noop;\n\n var showHint = originalScope.$eval(attrs.typeaheadShowHint) || false;\n\n //INTERNAL VARIABLES\n\n //model setter executed upon match selection\n var parsedModel = $parse(attrs.ngModel);\n var invokeModelSetter = $parse(attrs.ngModel + '($$$p)');\n var $setModelValue = function(scope, newValue) {\n if (angular.isFunction(parsedModel(originalScope)) &&\n ngModelOptions.getOption('getterSetter')) {\n return invokeModelSetter(scope, {$$$p: newValue});\n }\n\n return parsedModel.assign(scope, newValue);\n };\n\n //expressions used by typeahead\n var parserResult = typeaheadParser.parse(attrs.uibTypeahead);\n\n var hasFocus;\n\n //Used to avoid bug in iOS webview where iOS keyboard does not fire\n //mousedown & mouseup events\n //Issue #3699\n var selected;\n\n //create a child scope for the typeahead directive so we are not polluting original scope\n //with typeahead-specific data (matches, query etc.)\n var scope = originalScope.$new();\n var offDestroy = originalScope.$on('$destroy', function() {\n scope.$destroy();\n });\n scope.$on('$destroy', offDestroy);\n\n // WAI-ARIA\n var popupId = 'typeahead-' + scope.$id + '-' + Math.floor(Math.random() * 10000);\n element.attr({\n 'aria-autocomplete': 'list',\n 'aria-expanded': false,\n 'aria-owns': popupId\n });\n\n var inputsContainer, hintInputElem;\n //add read-only input to show hint\n if (showHint) {\n inputsContainer = angular.element('
    ');\n inputsContainer.css('position', 'relative');\n element.after(inputsContainer);\n hintInputElem = element.clone();\n hintInputElem.attr('placeholder', '');\n hintInputElem.attr('tabindex', '-1');\n hintInputElem.val('');\n hintInputElem.css({\n 'position': 'absolute',\n 'top': '0px',\n 'left': '0px',\n 'border-color': 'transparent',\n 'box-shadow': 'none',\n 'opacity': 1,\n 'background': 'none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)',\n 'color': '#999'\n });\n element.css({\n 'position': 'relative',\n 'vertical-align': 'top',\n 'background-color': 'transparent'\n });\n\n if (hintInputElem.attr('id')) {\n hintInputElem.removeAttr('id'); // remove duplicate id if present.\n }\n inputsContainer.append(hintInputElem);\n hintInputElem.after(element);\n }\n\n //pop-up element used to display matches\n var popUpEl = angular.element('
    ');\n popUpEl.attr({\n id: popupId,\n matches: 'matches',\n active: 'activeIdx',\n select: 'select(activeIdx, evt)',\n 'move-in-progress': 'moveInProgress',\n query: 'query',\n position: 'position',\n 'assign-is-open': 'assignIsOpen(isOpen)',\n debounce: 'debounceUpdate'\n });\n //custom item template\n if (angular.isDefined(attrs.typeaheadTemplateUrl)) {\n popUpEl.attr('template-url', attrs.typeaheadTemplateUrl);\n }\n\n if (angular.isDefined(attrs.typeaheadPopupTemplateUrl)) {\n popUpEl.attr('popup-template-url', attrs.typeaheadPopupTemplateUrl);\n }\n\n var resetHint = function() {\n if (showHint) {\n hintInputElem.val('');\n }\n };\n\n var resetMatches = function() {\n scope.matches = [];\n scope.activeIdx = -1;\n element.attr('aria-expanded', false);\n resetHint();\n };\n\n var getMatchId = function(index) {\n return popupId + '-option-' + index;\n };\n\n // Indicate that the specified match is the active (pre-selected) item in the list owned by this typeahead.\n // This attribute is added or removed automatically when the `activeIdx` changes.\n scope.$watch('activeIdx', function(index) {\n if (index < 0) {\n element.removeAttr('aria-activedescendant');\n } else {\n element.attr('aria-activedescendant', getMatchId(index));\n }\n });\n\n var inputIsExactMatch = function(inputValue, index) {\n if (scope.matches.length > index && inputValue) {\n return inputValue.toUpperCase() === scope.matches[index].label.toUpperCase();\n }\n\n return false;\n };\n\n var getMatchesAsync = function(inputValue, evt) {\n var locals = {$viewValue: inputValue};\n isLoadingSetter(originalScope, true);\n isNoResultsSetter(originalScope, false);\n $q.when(parserResult.source(originalScope, locals)).then(function(matches) {\n //it might happen that several async queries were in progress if a user were typing fast\n //but we are interested only in responses that correspond to the current view value\n var onCurrentRequest = inputValue === modelCtrl.$viewValue;\n if (onCurrentRequest && hasFocus) {\n if (matches && matches.length > 0) {\n scope.activeIdx = focusFirst ? 0 : -1;\n isNoResultsSetter(originalScope, false);\n scope.matches.length = 0;\n\n //transform labels\n for (var i = 0; i < matches.length; i++) {\n locals[parserResult.itemName] = matches[i];\n scope.matches.push({\n id: getMatchId(i),\n label: parserResult.viewMapper(scope, locals),\n model: matches[i]\n });\n }\n\n scope.query = inputValue;\n //position pop-up with matches - we need to re-calculate its position each time we are opening a window\n //with matches as a pop-up might be absolute-positioned and position of an input might have changed on a page\n //due to other elements being rendered\n recalculatePosition();\n\n element.attr('aria-expanded', true);\n\n //Select the single remaining option if user input matches\n if (selectOnExact && scope.matches.length === 1 && inputIsExactMatch(inputValue, 0)) {\n if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) {\n $$debounce(function() {\n scope.select(0, evt);\n }, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']);\n } else {\n scope.select(0, evt);\n }\n }\n\n if (showHint) {\n var firstLabel = scope.matches[0].label;\n if (angular.isString(inputValue) &&\n inputValue.length > 0 &&\n firstLabel.slice(0, inputValue.length).toUpperCase() === inputValue.toUpperCase()) {\n hintInputElem.val(inputValue + firstLabel.slice(inputValue.length));\n } else {\n hintInputElem.val('');\n }\n }\n } else {\n resetMatches();\n isNoResultsSetter(originalScope, true);\n }\n }\n if (onCurrentRequest) {\n isLoadingSetter(originalScope, false);\n }\n }, function() {\n resetMatches();\n isLoadingSetter(originalScope, false);\n isNoResultsSetter(originalScope, true);\n });\n };\n\n // bind events only if appendToBody params exist - performance feature\n if (appendToBody) {\n angular.element($window).on('resize', fireRecalculating);\n $document.find('body').on('scroll', fireRecalculating);\n }\n\n // Declare the debounced function outside recalculating for\n // proper debouncing\n var debouncedRecalculate = $$debounce(function() {\n // if popup is visible\n if (scope.matches.length) {\n recalculatePosition();\n }\n\n scope.moveInProgress = false;\n }, eventDebounceTime);\n\n // Default progress type\n scope.moveInProgress = false;\n\n function fireRecalculating() {\n if (!scope.moveInProgress) {\n scope.moveInProgress = true;\n scope.$digest();\n }\n\n debouncedRecalculate();\n }\n\n // recalculate actual position and set new values to scope\n // after digest loop is popup in right position\n function recalculatePosition() {\n scope.position = appendToBody ? $position.offset(element) : $position.position(element);\n scope.position.top += element.prop('offsetHeight');\n }\n\n //we need to propagate user's query so we can higlight matches\n scope.query = undefined;\n\n //Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later\n var timeoutPromise;\n\n var scheduleSearchWithTimeout = function(inputValue) {\n timeoutPromise = $timeout(function() {\n getMatchesAsync(inputValue);\n }, waitTime);\n };\n\n var cancelPreviousTimeout = function() {\n if (timeoutPromise) {\n $timeout.cancel(timeoutPromise);\n }\n };\n\n resetMatches();\n\n scope.assignIsOpen = function (isOpen) {\n isOpenSetter(originalScope, isOpen);\n };\n\n scope.select = function(activeIdx, evt) {\n //called from within the $digest() cycle\n var locals = {};\n var model, item;\n\n selected = true;\n locals[parserResult.itemName] = item = scope.matches[activeIdx].model;\n model = parserResult.modelMapper(originalScope, locals);\n $setModelValue(originalScope, model);\n modelCtrl.$setValidity('editable', true);\n modelCtrl.$setValidity('parse', true);\n\n onSelectCallback(originalScope, {\n $item: item,\n $model: model,\n $label: parserResult.viewMapper(originalScope, locals),\n $event: evt\n });\n\n resetMatches();\n\n //return focus to the input element if a match was selected via a mouse click event\n // use timeout to avoid $rootScope:inprog error\n if (scope.$eval(attrs.typeaheadFocusOnSelect) !== false) {\n $timeout(function() { element[0].focus(); }, 0, false);\n }\n };\n\n //bind keyboard events: arrows up(38) / down(40), enter(13) and tab(9), esc(27)\n element.on('keydown', function(evt) {\n //typeahead is open and an \"interesting\" key was pressed\n if (scope.matches.length === 0 || HOT_KEYS.indexOf(evt.which) === -1) {\n return;\n }\n\n var shouldSelect = isSelectEvent(originalScope, {$event: evt});\n\n /**\n * if there's nothing selected (i.e. focusFirst) and enter or tab is hit\n * or\n * shift + tab is pressed to bring focus to the previous element\n * then clear the results\n */\n if (scope.activeIdx === -1 && shouldSelect || evt.which === 9 && !!evt.shiftKey) {\n resetMatches();\n scope.$digest();\n return;\n }\n\n evt.preventDefault();\n var target;\n switch (evt.which) {\n case 27: // escape\n evt.stopPropagation();\n\n resetMatches();\n originalScope.$digest();\n break;\n case 38: // up arrow\n scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;\n scope.$digest();\n target = popUpEl[0].querySelectorAll('.uib-typeahead-match')[scope.activeIdx];\n target.parentNode.scrollTop = target.offsetTop;\n break;\n case 40: // down arrow\n scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length;\n scope.$digest();\n target = popUpEl[0].querySelectorAll('.uib-typeahead-match')[scope.activeIdx];\n target.parentNode.scrollTop = target.offsetTop;\n break;\n default:\n if (shouldSelect) {\n scope.$apply(function() {\n if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) {\n $$debounce(function() {\n scope.select(scope.activeIdx, evt);\n }, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']);\n } else {\n scope.select(scope.activeIdx, evt);\n }\n });\n }\n }\n });\n\n element.on('focus', function (evt) {\n hasFocus = true;\n if (minLength === 0 && !modelCtrl.$viewValue) {\n $timeout(function() {\n getMatchesAsync(modelCtrl.$viewValue, evt);\n }, 0);\n }\n });\n\n element.on('blur', function(evt) {\n if (isSelectOnBlur && scope.matches.length && scope.activeIdx !== -1 && !selected) {\n selected = true;\n scope.$apply(function() {\n if (angular.isObject(scope.debounceUpdate) && angular.isNumber(scope.debounceUpdate.blur)) {\n $$debounce(function() {\n scope.select(scope.activeIdx, evt);\n }, scope.debounceUpdate.blur);\n } else {\n scope.select(scope.activeIdx, evt);\n }\n });\n }\n if (!isEditable && modelCtrl.$error.editable) {\n modelCtrl.$setViewValue();\n scope.$apply(function() {\n // Reset validity as we are clearing\n modelCtrl.$setValidity('editable', true);\n modelCtrl.$setValidity('parse', true);\n });\n element.val('');\n }\n hasFocus = false;\n selected = false;\n });\n\n // Keep reference to click handler to unbind it.\n var dismissClickHandler = function(evt) {\n // Issue #3973\n // Firefox treats right click as a click on document\n if (element[0] !== evt.target && evt.which !== 3 && scope.matches.length !== 0) {\n resetMatches();\n if (!$rootScope.$$phase) {\n originalScope.$digest();\n }\n }\n };\n\n $document.on('click', dismissClickHandler);\n\n originalScope.$on('$destroy', function() {\n $document.off('click', dismissClickHandler);\n if (appendToBody || appendTo) {\n $popup.remove();\n }\n\n if (appendToBody) {\n angular.element($window).off('resize', fireRecalculating);\n $document.find('body').off('scroll', fireRecalculating);\n }\n // Prevent jQuery cache memory leak\n popUpEl.remove();\n\n if (showHint) {\n inputsContainer.remove();\n }\n });\n\n var $popup = $compile(popUpEl)(scope);\n\n if (appendToBody) {\n $document.find('body').append($popup);\n } else if (appendTo) {\n angular.element(appendTo).eq(0).append($popup);\n } else {\n element.after($popup);\n }\n\n this.init = function(_modelCtrl) {\n modelCtrl = _modelCtrl;\n ngModelOptions = extractOptions(modelCtrl);\n\n scope.debounceUpdate = $parse(ngModelOptions.getOption('debounce'))(originalScope);\n\n //plug into $parsers pipeline to open a typeahead on view changes initiated from DOM\n //$parsers kick-in on all the changes coming from the view as well as manually triggered by $setViewValue\n modelCtrl.$parsers.unshift(function(inputValue) {\n hasFocus = true;\n\n if (minLength === 0 || inputValue && inputValue.length >= minLength) {\n if (waitTime > 0) {\n cancelPreviousTimeout();\n scheduleSearchWithTimeout(inputValue);\n } else {\n getMatchesAsync(inputValue);\n }\n } else {\n isLoadingSetter(originalScope, false);\n cancelPreviousTimeout();\n resetMatches();\n }\n\n if (isEditable) {\n return inputValue;\n }\n\n if (!inputValue) {\n // Reset in case user had typed something previously.\n modelCtrl.$setValidity('editable', true);\n return null;\n }\n\n modelCtrl.$setValidity('editable', false);\n return undefined;\n });\n\n modelCtrl.$formatters.push(function(modelValue) {\n var candidateViewValue, emptyViewValue;\n var locals = {};\n\n // The validity may be set to false via $parsers (see above) if\n // the model is restricted to selected values. If the model\n // is set manually it is considered to be valid.\n if (!isEditable) {\n modelCtrl.$setValidity('editable', true);\n }\n\n if (inputFormatter) {\n locals.$model = modelValue;\n return inputFormatter(originalScope, locals);\n }\n\n //it might happen that we don't have enough info to properly render input value\n //we need to check for this situation and simply return model value if we can't apply custom formatting\n locals[parserResult.itemName] = modelValue;\n candidateViewValue = parserResult.viewMapper(originalScope, locals);\n locals[parserResult.itemName] = undefined;\n emptyViewValue = parserResult.viewMapper(originalScope, locals);\n\n return candidateViewValue !== emptyViewValue ? candidateViewValue : modelValue;\n });\n };\n\n function extractOptions(ngModelCtrl) {\n var ngModelOptions;\n\n if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing\n // guarantee a value\n ngModelOptions = ngModelCtrl.$options || {};\n\n // mimic 1.6+ api\n ngModelOptions.getOption = function (key) {\n return ngModelOptions[key];\n };\n } else { // in angular >=1.6 $options is always present\n ngModelOptions = ngModelCtrl.$options;\n }\n\n return ngModelOptions;\n }\n }])\n\n .directive('uibTypeahead', function() {\n return {\n controller: 'UibTypeaheadController',\n require: ['ngModel', 'uibTypeahead'],\n link: function(originalScope, element, attrs, ctrls) {\n ctrls[1].init(ctrls[0]);\n }\n };\n })\n\n .directive('uibTypeaheadPopup', ['$$debounce', function($$debounce) {\n return {\n scope: {\n matches: '=',\n query: '=',\n active: '=',\n position: '&',\n moveInProgress: '=',\n select: '&',\n assignIsOpen: '&',\n debounce: '&'\n },\n replace: true,\n templateUrl: function(element, attrs) {\n return attrs.popupTemplateUrl || 'uib/template/typeahead/typeahead-popup.html';\n },\n link: function(scope, element, attrs) {\n scope.templateUrl = attrs.templateUrl;\n\n scope.isOpen = function() {\n var isDropdownOpen = scope.matches.length > 0;\n scope.assignIsOpen({ isOpen: isDropdownOpen });\n return isDropdownOpen;\n };\n\n scope.isActive = function(matchIdx) {\n return scope.active === matchIdx;\n };\n\n scope.selectActive = function(matchIdx) {\n scope.active = matchIdx;\n };\n\n scope.selectMatch = function(activeIdx, evt) {\n var debounce = scope.debounce();\n if (angular.isNumber(debounce) || angular.isObject(debounce)) {\n $$debounce(function() {\n scope.select({activeIdx: activeIdx, evt: evt});\n }, angular.isNumber(debounce) ? debounce : debounce['default']);\n } else {\n scope.select({activeIdx: activeIdx, evt: evt});\n }\n };\n }\n };\n }])\n\n .directive('uibTypeaheadMatch', ['$templateRequest', '$compile', '$parse', function($templateRequest, $compile, $parse) {\n return {\n scope: {\n index: '=',\n match: '=',\n query: '='\n },\n link: function(scope, element, attrs) {\n var tplUrl = $parse(attrs.templateUrl)(scope.$parent) || 'uib/template/typeahead/typeahead-match.html';\n $templateRequest(tplUrl).then(function(tplContent) {\n var tplEl = angular.element(tplContent.trim());\n element.replaceWith(tplEl);\n $compile(tplEl)(scope);\n });\n }\n };\n }])\n\n .filter('uibTypeaheadHighlight', ['$sce', '$injector', '$log', function($sce, $injector, $log) {\n var isSanitizePresent;\n isSanitizePresent = $injector.has('$sanitize');\n\n function escapeRegexp(queryToEscape) {\n // Regex: capture the whole query string and replace it with the string that will be used to match\n // the results, for example if the capture is \"a\" the result will be \\a\n return queryToEscape.replace(/([.?*+^$[\\]\\\\(){}|-])/g, '\\\\$1');\n }\n\n function containsHtml(matchItem) {\n return /<.*>/g.test(matchItem);\n }\n\n return function(matchItem, query) {\n if (!isSanitizePresent && containsHtml(matchItem)) {\n $log.warn('Unsafe use of typeahead please use ngSanitize'); // Warn the user about the danger\n }\n matchItem = query ? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '$&') : matchItem; // Replaces the capture string with a the same string inside of a \"strong\" tag\n if (!isSanitizePresent) {\n matchItem = $sce.trustAsHtml(matchItem); // If $sanitize is not present we pack the string in a $sce object for the ng-bind-html directive\n }\n return matchItem;\n };\n }]);\n\nangular.module(\"uib/template/accordion/accordion-group.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/accordion/accordion-group.html\",\n \"
    \\n\" +\n \"

    \\n\" +\n \" {{heading}}\\n\" +\n \"

    \\n\" +\n \"
    \\n\" +\n \"
    \\n\" +\n \"
    \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/accordion/accordion.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/accordion/accordion.html\",\n \"
    \");\n}]);\n\nangular.module(\"uib/template/alert/alert.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/alert/alert.html\",\n \"\\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/carousel/carousel.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/carousel/carousel.html\",\n \"
    \\n\" +\n \" 1\\\">\\n\" +\n \" \\n\" +\n \" previous\\n\" +\n \"\\n\" +\n \" 1\\\">\\n\" +\n \" \\n\" +\n \" next\\n\" +\n \"\\n\" +\n \"
      1\\\">\\n\" +\n \"
    1. \\n\" +\n \" slide {{ $index + 1 }} of {{ slides.length }}, currently active\\n\" +\n \"
    2. \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/carousel/slide.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/carousel/slide.html\",\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/datepicker/datepicker.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/datepicker/datepicker.html\",\n \"
    \\n\" +\n \"
    \\n\" +\n \"
    \\n\" +\n \"
    \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/datepicker/day.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/datepicker/day.html\",\n \"\\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \"
    {{::label.abbr}}
    {{ weekNumbers[$index] }}\\n\" +\n \" \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/datepicker/month.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/datepicker/month.html\",\n \"\\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \"
    \\n\" +\n \" \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/datepicker/year.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/datepicker/year.html\",\n \"\\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \"
    \\n\" +\n \" \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/datepickerPopup/popup.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/datepickerPopup/popup.html\",\n \"
      \\n\" +\n \"
    • \\n\" +\n \"
    • \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \"
    • \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/modal/window.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/modal/window.html\",\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/pager/pager.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/pager/pager.html\",\n \"
  • {{::getText('previous')}}
  • \\n\" +\n \"
  • {{::getText('next')}}
  • \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/pagination/pagination.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/pagination/pagination.html\",\n \"
  • {{::getText('first')}}
  • \\n\" +\n \"
  • {{::getText('previous')}}
  • \\n\" +\n \"
  • {{page.text}}
  • \\n\" +\n \"
  • {{::getText('next')}}
  • \\n\" +\n \"
  • {{::getText('last')}}
  • \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/tooltip/tooltip-html-popup.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/tooltip/tooltip-html-popup.html\",\n \"
    \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/tooltip/tooltip-popup.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/tooltip/tooltip-popup.html\",\n \"
    \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/tooltip/tooltip-template-popup.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/tooltip/tooltip-template-popup.html\",\n \"
    \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/popover/popover-html.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/popover/popover-html.html\",\n \"
    \\n\" +\n \"\\n\" +\n \"
    \\n\" +\n \"

    \\n\" +\n \"
    \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/popover/popover-template.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/popover/popover-template.html\",\n \"
    \\n\" +\n \"\\n\" +\n \"
    \\n\" +\n \"

    \\n\" +\n \"
    \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/popover/popover.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/popover/popover.html\",\n \"
    \\n\" +\n \"\\n\" +\n \"
    \\n\" +\n \"

    \\n\" +\n \"
    \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/progressbar/bar.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/progressbar/bar.html\",\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/progressbar/progress.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/progressbar/progress.html\",\n \"
    \");\n}]);\n\nangular.module(\"uib/template/progressbar/progressbar.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/progressbar/progressbar.html\",\n \"
    \\n\" +\n \"
    \\n\" +\n \"
    \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/rating/rating.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/rating/rating.html\",\n \"\\n\" +\n \" ({{ $index < value ? '*' : ' ' }})\\n\" +\n \" \\n\" +\n \"\\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/tabs/tab.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/tabs/tab.html\",\n \"
  • \\n\" +\n \" {{heading}}\\n\" +\n \"
  • \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/tabs/tabset.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/tabs/tabset.html\",\n \"
    \\n\" +\n \"
      \\n\" +\n \"
      \\n\" +\n \"
      \\n\" +\n \"
      \\n\" +\n \"
      \\n\" +\n \"
      \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/timepicker/timepicker.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/timepicker/timepicker.html\",\n \"\\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \" \\n\" +\n \"
        
      \\n\" +\n \" \\n\" +\n \" :\\n\" +\n \" \\n\" +\n \" :\\n\" +\n \" \\n\" +\n \"
        
      \\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/typeahead/typeahead-match.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/typeahead/typeahead-match.html\",\n \"\\n\" +\n \"\");\n}]);\n\nangular.module(\"uib/template/typeahead/typeahead-popup.html\", []).run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"uib/template/typeahead/typeahead-popup.html\",\n \"
        \\n\" +\n \"
      • \\n\" +\n \"
        \\n\" +\n \"
      • \\n\" +\n \"
      \\n\" +\n \"\");\n}]);\nangular.module('ui.bootstrap.carousel').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibCarouselCss && angular.element(document).find('head').prepend(''); angular.$$uibCarouselCss = true; });\nangular.module('ui.bootstrap.datepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerCss && angular.element(document).find('head').prepend(''); angular.$$uibDatepickerCss = true; });\nangular.module('ui.bootstrap.position').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibPositionCss && angular.element(document).find('head').prepend(''); angular.$$uibPositionCss = true; });\nangular.module('ui.bootstrap.datepickerPopup').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerpopupCss && angular.element(document).find('head').prepend(''); angular.$$uibDatepickerpopupCss = true; });\nangular.module('ui.bootstrap.tooltip').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTooltipCss && angular.element(document).find('head').prepend(''); angular.$$uibTooltipCss = true; });\nangular.module('ui.bootstrap.timepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTimepickerCss && angular.element(document).find('head').prepend(''); angular.$$uibTimepickerCss = true; });\nangular.module('ui.bootstrap.typeahead').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTypeaheadCss && angular.element(document).find('head').prepend(''); angular.$$uibTypeaheadCss = true; });\n/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

      ' + func(text) + '

      ';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

      fred, barney, & pebbles

      '\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '\n
      \n Snippet: \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      DirectiveHowSourceRendered
      ng-bind-htmlAutomatically uses $sanitize
      <div ng-bind-html=\"snippet\">
      </div>
      ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value\n
      <div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\">\n</div>
      \n
      ng-bindAutomatically escapes
      <div ng-bind=\"snippet\">
      </div>
      \n
      \n \n \n it('should sanitize the html snippet by default', function() {\n expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')).\n toBe('

      an html\\nclick here\\nsnippet

      ');\n });\n\n it('should inline raw snippet if bound to a trusted value', function() {\n expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).\n toBe(\"

      an html\\n\" +\n \"click here\\n\" +\n \"snippet

      \");\n });\n\n it('should escape snippet without any filter', function() {\n expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).\n toBe(\"<p style=\\\"color:blue\\\">an html\\n\" +\n \"<em onmouseover=\\\"this.textContent='PWN3D!'\\\">click here</em>\\n\" +\n \"snippet</p>\");\n });\n\n it('should update', function() {\n element(by.model('snippet')).clear();\n element(by.model('snippet')).sendKeys('new text');\n expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')).\n toBe('new text');\n expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).toBe(\n 'new text');\n expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).toBe(\n \"new <b onclick=\\\"alert(1)\\\">text</b>\");\n });\n
      \n \n */\n\n\n/**\n * @ngdoc provider\n * @name $sanitizeProvider\n * @this\n *\n * @description\n * Creates and configures {@link $sanitize} instance.\n */\nfunction $SanitizeProvider() {\n var hasBeenInstantiated = false;\n var svgEnabled = false;\n\n this.$get = ['$$sanitizeUri', function($$sanitizeUri) {\n hasBeenInstantiated = true;\n if (svgEnabled) {\n extend(validElements, svgElements);\n }\n return function(html) {\n var buf = [];\n htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) {\n return !/^unsafe:/.test($$sanitizeUri(uri, isImage));\n }));\n return buf.join('');\n };\n }];\n\n\n /**\n * @ngdoc method\n * @name $sanitizeProvider#enableSvg\n * @kind function\n *\n * @description\n * Enables a subset of svg to be supported by the sanitizer.\n *\n *
      \n *

      By enabling this setting without taking other precautions, you might expose your\n * application to click-hijacking attacks. In these attacks, sanitized svg elements could be positioned\n * outside of the containing element and be rendered over other elements on the page (e.g. a login\n * link). Such behavior can then result in phishing incidents.

      \n *\n *

      To protect against these, explicitly setup `overflow: hidden` css rule for all potential svg\n * tags within the sanitized content:

      \n *\n *
      \n *\n *
      \n   *   .rootOfTheIncludedContent svg {\n   *     overflow: hidden !important;\n   *   }\n   *   
      \n *
      \n *\n * @param {boolean=} flag Enable or disable SVG support in the sanitizer.\n * @returns {boolean|$sanitizeProvider} Returns the currently configured value if called\n * without an argument or self for chaining otherwise.\n */\n this.enableSvg = function(enableSvg) {\n if (isDefined(enableSvg)) {\n svgEnabled = enableSvg;\n return this;\n } else {\n return svgEnabled;\n }\n };\n\n\n /**\n * @ngdoc method\n * @name $sanitizeProvider#addValidElements\n * @kind function\n *\n * @description\n * Extends the built-in lists of valid HTML/SVG elements, i.e. elements that are considered safe\n * and are not stripped off during sanitization. You can extend the following lists of elements:\n *\n * - `htmlElements`: A list of elements (tag names) to extend the current list of safe HTML\n * elements. HTML elements considered safe will not be removed during sanitization. All other\n * elements will be stripped off.\n *\n * - `htmlVoidElements`: This is similar to `htmlElements`, but marks the elements as\n * \"void elements\" (similar to HTML\n * [void elements](https://rawgit.com/w3c/html/html5.1-2/single-page.html#void-elements)). These\n * elements have no end tag and cannot have content.\n *\n * - `svgElements`: This is similar to `htmlElements`, but for SVG elements. This list is only\n * taken into account if SVG is {@link ngSanitize.$sanitizeProvider#enableSvg enabled} for\n * `$sanitize`.\n *\n *
      \n * This method must be called during the {@link angular.Module#config config} phase. Once the\n * `$sanitize` service has been instantiated, this method has no effect.\n *
      \n *\n *
      \n * Keep in mind that extending the built-in lists of elements may expose your app to XSS or\n * other vulnerabilities. Be very mindful of the elements you add.\n *
      \n *\n * @param {Array|Object} elements - A list of valid HTML elements or an object with one or\n * more of the following properties:\n * - **htmlElements** - `{Array}` - A list of elements to extend the current list of\n * HTML elements.\n * - **htmlVoidElements** - `{Array}` - A list of elements to extend the current list of\n * void HTML elements; i.e. elements that do not have an end tag.\n * - **svgElements** - `{Array}` - A list of elements to extend the current list of SVG\n * elements. The list of SVG elements is only taken into account if SVG is\n * {@link ngSanitize.$sanitizeProvider#enableSvg enabled} for `$sanitize`.\n *\n * Passing an array (`[...]`) is equivalent to passing `{htmlElements: [...]}`.\n *\n * @return {$sanitizeProvider} Returns self for chaining.\n */\n this.addValidElements = function(elements) {\n if (!hasBeenInstantiated) {\n if (isArray(elements)) {\n elements = {htmlElements: elements};\n }\n\n addElementsTo(svgElements, elements.svgElements);\n addElementsTo(voidElements, elements.htmlVoidElements);\n addElementsTo(validElements, elements.htmlVoidElements);\n addElementsTo(validElements, elements.htmlElements);\n }\n\n return this;\n };\n\n\n /**\n * @ngdoc method\n * @name $sanitizeProvider#addValidAttrs\n * @kind function\n *\n * @description\n * Extends the built-in list of valid attributes, i.e. attributes that are considered safe and are\n * not stripped off during sanitization.\n *\n * **Note**:\n * The new attributes will not be treated as URI attributes, which means their values will not be\n * sanitized as URIs using `$compileProvider`'s\n * {@link ng.$compileProvider#aHrefSanitizationWhitelist aHrefSanitizationWhitelist} and\n * {@link ng.$compileProvider#imgSrcSanitizationWhitelist imgSrcSanitizationWhitelist}.\n *\n *
      \n * This method must be called during the {@link angular.Module#config config} phase. Once the\n * `$sanitize` service has been instantiated, this method has no effect.\n *
      \n *\n *
      \n * Keep in mind that extending the built-in list of attributes may expose your app to XSS or\n * other vulnerabilities. Be very mindful of the attributes you add.\n *
      \n *\n * @param {Array} attrs - A list of valid attributes.\n *\n * @returns {$sanitizeProvider} Returns self for chaining.\n */\n this.addValidAttrs = function(attrs) {\n if (!hasBeenInstantiated) {\n extend(validAttrs, arrayToMap(attrs, true));\n }\n return this;\n };\n\n //////////////////////////////////////////////////////////////////////////////////////////////////\n // Private stuff\n //////////////////////////////////////////////////////////////////////////////////////////////////\n\n bind = angular.bind;\n extend = angular.extend;\n forEach = angular.forEach;\n isArray = angular.isArray;\n isDefined = angular.isDefined;\n lowercase = angular.$$lowercase;\n noop = angular.noop;\n\n htmlParser = htmlParserImpl;\n htmlSanitizeWriter = htmlSanitizeWriterImpl;\n\n nodeContains = window.Node.prototype.contains || /** @this */ function(arg) {\n // eslint-disable-next-line no-bitwise\n return !!(this.compareDocumentPosition(arg) & 16);\n };\n\n // Regular Expressions for parsing tags and attributes\n var SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\n // Match everything outside of normal chars and \" (quote character)\n NON_ALPHANUMERIC_REGEXP = /([^#-~ |!])/g;\n\n\n // Good source of info about elements and attributes\n // http://dev.w3.org/html5/spec/Overview.html#semantics\n // http://simon.html5.org/html-elements\n\n // Safe Void Elements - HTML5\n // http://dev.w3.org/html5/spec/Overview.html#void-elements\n var voidElements = stringToMap('area,br,col,hr,img,wbr');\n\n // Elements that you can, intentionally, leave open (and which close themselves)\n // http://dev.w3.org/html5/spec/Overview.html#optional-tags\n var optionalEndTagBlockElements = stringToMap('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr'),\n optionalEndTagInlineElements = stringToMap('rp,rt'),\n optionalEndTagElements = extend({},\n optionalEndTagInlineElements,\n optionalEndTagBlockElements);\n\n // Safe Block Elements - HTML5\n var blockElements = extend({}, optionalEndTagBlockElements, stringToMap('address,article,' +\n 'aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n 'h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul'));\n\n // Inline Elements - HTML5\n var inlineElements = extend({}, optionalEndTagInlineElements, stringToMap('a,abbr,acronym,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,' +\n 'samp,small,span,strike,strong,sub,sup,time,tt,u,var'));\n\n // SVG Elements\n // https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Elements\n // Note: the elements animate,animateColor,animateMotion,animateTransform,set are intentionally omitted.\n // They can potentially allow for arbitrary javascript to be executed. See #11290\n var svgElements = stringToMap('circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,' +\n 'hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,' +\n 'radialGradient,rect,stop,svg,switch,text,title,tspan');\n\n // Blocked Elements (will be stripped)\n var blockedElements = stringToMap('script,style');\n\n var validElements = extend({},\n voidElements,\n blockElements,\n inlineElements,\n optionalEndTagElements);\n\n //Attributes that have href and hence need to be sanitized\n var uriAttrs = stringToMap('background,cite,href,longdesc,src,xlink:href,xml:base');\n\n var htmlAttrs = stringToMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,' +\n 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,' +\n 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,' +\n 'valign,value,vspace,width');\n\n // SVG attributes (without \"id\" and \"name\" attributes)\n // https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Attributes\n var svgAttrs = stringToMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' +\n 'baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,' +\n 'cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,' +\n 'font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,' +\n 'height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,' +\n 'marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,' +\n 'max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,' +\n 'path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,' +\n 'requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,' +\n 'stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,' +\n 'stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,' +\n 'stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,' +\n 'underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,' +\n 'width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,' +\n 'xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan', true);\n\n var validAttrs = extend({},\n uriAttrs,\n svgAttrs,\n htmlAttrs);\n\n function stringToMap(str, lowercaseKeys) {\n return arrayToMap(str.split(','), lowercaseKeys);\n }\n\n function arrayToMap(items, lowercaseKeys) {\n var obj = {}, i;\n for (i = 0; i < items.length; i++) {\n obj[lowercaseKeys ? lowercase(items[i]) : items[i]] = true;\n }\n return obj;\n }\n\n function addElementsTo(elementsMap, newElements) {\n if (newElements && newElements.length) {\n extend(elementsMap, arrayToMap(newElements));\n }\n }\n\n /**\n * Create an inert document that contains the dirty HTML that needs sanitizing\n * Depending upon browser support we use one of three strategies for doing this.\n * Support: Safari 10.x -> XHR strategy\n * Support: Firefox -> DomParser strategy\n */\n var getInertBodyElement /* function(html: string): HTMLBodyElement */ = (function(window, document) {\n var inertDocument;\n if (document && document.implementation) {\n inertDocument = document.implementation.createHTMLDocument('inert');\n } else {\n throw $sanitizeMinErr('noinert', 'Can\\'t create an inert html document');\n }\n var inertBodyElement = (inertDocument.documentElement || inertDocument.getDocumentElement()).querySelector('body');\n\n // Check for the Safari 10.1 bug - which allows JS to run inside the SVG G element\n inertBodyElement.innerHTML = '';\n if (!inertBodyElement.querySelector('svg')) {\n return getInertBodyElement_XHR;\n } else {\n // Check for the Firefox bug - which prevents the inner img JS from being sanitized\n inertBodyElement.innerHTML = '

      ';\n if (inertBodyElement.querySelector('svg img')) {\n return getInertBodyElement_DOMParser;\n } else {\n return getInertBodyElement_InertDocument;\n }\n }\n\n function getInertBodyElement_XHR(html) {\n // We add this dummy element to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `` do not get hoisted to the `` tag.\n html = '' + html;\n try {\n html = encodeURI(html);\n } catch (e) {\n return undefined;\n }\n var xhr = new window.XMLHttpRequest();\n xhr.responseType = 'document';\n xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false);\n xhr.send(null);\n var body = xhr.response.body;\n body.firstChild.remove();\n return body;\n }\n\n function getInertBodyElement_DOMParser(html) {\n // We add this dummy element to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `` do not get hoisted to the `` tag.\n html = '' + html;\n try {\n var body = new window.DOMParser().parseFromString(html, 'text/html').body;\n body.firstChild.remove();\n return body;\n } catch (e) {\n return undefined;\n }\n }\n\n function getInertBodyElement_InertDocument(html) {\n inertBodyElement.innerHTML = html;\n\n // Support: IE 9-11 only\n // strip custom-namespaced attributes on IE<=11\n if (document.documentMode) {\n stripCustomNsAttrs(inertBodyElement);\n }\n\n return inertBodyElement;\n }\n })(window, window.document);\n\n /**\n * @example\n * htmlParser(htmlString, {\n * start: function(tag, attrs) {},\n * end: function(tag) {},\n * chars: function(text) {},\n * comment: function(text) {}\n * });\n *\n * @param {string} html string\n * @param {object} handler\n */\n function htmlParserImpl(html, handler) {\n if (html === null || html === undefined) {\n html = '';\n } else if (typeof html !== 'string') {\n html = '' + html;\n }\n\n var inertBodyElement = getInertBodyElement(html);\n if (!inertBodyElement) return '';\n\n //mXSS protection\n var mXSSAttempts = 5;\n do {\n if (mXSSAttempts === 0) {\n throw $sanitizeMinErr('uinput', 'Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n\n // trigger mXSS if it is going to happen by reading and writing the innerHTML\n html = inertBodyElement.innerHTML;\n inertBodyElement = getInertBodyElement(html);\n } while (html !== inertBodyElement.innerHTML);\n\n var node = inertBodyElement.firstChild;\n while (node) {\n switch (node.nodeType) {\n case 1: // ELEMENT_NODE\n handler.start(node.nodeName.toLowerCase(), attrToMap(node.attributes));\n break;\n case 3: // TEXT NODE\n handler.chars(node.textContent);\n break;\n }\n\n var nextNode;\n if (!(nextNode = node.firstChild)) {\n if (node.nodeType === 1) {\n handler.end(node.nodeName.toLowerCase());\n }\n nextNode = getNonDescendant('nextSibling', node);\n if (!nextNode) {\n while (nextNode == null) {\n node = getNonDescendant('parentNode', node);\n if (node === inertBodyElement) break;\n nextNode = getNonDescendant('nextSibling', node);\n if (node.nodeType === 1) {\n handler.end(node.nodeName.toLowerCase());\n }\n }\n }\n }\n node = nextNode;\n }\n\n while ((node = inertBodyElement.firstChild)) {\n inertBodyElement.removeChild(node);\n }\n }\n\n function attrToMap(attrs) {\n var map = {};\n for (var i = 0, ii = attrs.length; i < ii; i++) {\n var attr = attrs[i];\n map[attr.name] = attr.value;\n }\n return map;\n }\n\n\n /**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n * @returns {string} escaped text\n */\n function encodeEntities(value) {\n return value.\n replace(/&/g, '&').\n replace(SURROGATE_PAIR_REGEXP, function(value) {\n var hi = value.charCodeAt(0);\n var low = value.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n }).\n replace(NON_ALPHANUMERIC_REGEXP, function(value) {\n return '&#' + value.charCodeAt(0) + ';';\n }).\n replace(//g, '>');\n }\n\n /**\n * create an HTML/XML writer which writes to buffer\n * @param {Array} buf use buf.join('') to get out sanitized html string\n * @returns {object} in the form of {\n * start: function(tag, attrs) {},\n * end: function(tag) {},\n * chars: function(text) {},\n * comment: function(text) {}\n * }\n */\n function htmlSanitizeWriterImpl(buf, uriValidator) {\n var ignoreCurrentElement = false;\n var out = bind(buf, buf.push);\n return {\n start: function(tag, attrs) {\n tag = lowercase(tag);\n if (!ignoreCurrentElement && blockedElements[tag]) {\n ignoreCurrentElement = tag;\n }\n if (!ignoreCurrentElement && validElements[tag] === true) {\n out('<');\n out(tag);\n forEach(attrs, function(value, key) {\n var lkey = lowercase(key);\n var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background');\n if (validAttrs[lkey] === true &&\n (uriAttrs[lkey] !== true || uriValidator(value, isImage))) {\n out(' ');\n out(key);\n out('=\"');\n out(encodeEntities(value));\n out('\"');\n }\n });\n out('>');\n }\n },\n end: function(tag) {\n tag = lowercase(tag);\n if (!ignoreCurrentElement && validElements[tag] === true && voidElements[tag] !== true) {\n out('');\n }\n // eslint-disable-next-line eqeqeq\n if (tag == ignoreCurrentElement) {\n ignoreCurrentElement = false;\n }\n },\n chars: function(chars) {\n if (!ignoreCurrentElement) {\n out(encodeEntities(chars));\n }\n }\n };\n }\n\n\n /**\n * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1' attribute to declare\n * ns1 namespace and prefixes the attribute with 'ns1' (e.g. 'ns1:xlink:foo'). This is undesirable since we don't want\n * to allow any of these custom attributes. This method strips them all.\n *\n * @param node Root element to process\n */\n function stripCustomNsAttrs(node) {\n while (node) {\n if (node.nodeType === window.Node.ELEMENT_NODE) {\n var attrs = node.attributes;\n for (var i = 0, l = attrs.length; i < l; i++) {\n var attrNode = attrs[i];\n var attrName = attrNode.name.toLowerCase();\n if (attrName === 'xmlns:ns1' || attrName.lastIndexOf('ns1:', 0) === 0) {\n node.removeAttributeNode(attrNode);\n i--;\n l--;\n }\n }\n }\n\n var nextNode = node.firstChild;\n if (nextNode) {\n stripCustomNsAttrs(nextNode);\n }\n\n node = getNonDescendant('nextSibling', node);\n }\n }\n\n function getNonDescendant(propName, node) {\n // An element is clobbered if its `propName` property points to one of its descendants\n var nextNode = node[propName];\n if (nextNode && nodeContains.call(node, nextNode)) {\n throw $sanitizeMinErr('elclob', 'Failed to sanitize html because the element is clobbered: {0}', node.outerHTML || node.outerText);\n }\n return nextNode;\n }\n}\n\nfunction sanitizeText(chars) {\n var buf = [];\n var writer = htmlSanitizeWriter(buf, noop);\n writer.chars(chars);\n return buf.join('');\n}\n\n\n// define ngSanitize module and register $sanitize service\nangular.module('ngSanitize', [])\n .provider('$sanitize', $SanitizeProvider)\n .info({ angularVersion: '1.7.0' });\n\n/**\n * @ngdoc filter\n * @name linky\n * @kind function\n *\n * @description\n * Finds links in text input and turns them into html links. Supports `http/https/ftp/sftp/mailto` and\n * plain email address links.\n *\n * Requires the {@link ngSanitize `ngSanitize`} module to be installed.\n *\n * @param {string} text Input text.\n * @param {string} [target] Window (`_blank|_self|_parent|_top`) or named frame to open links in.\n * @param {object|function(url)} [attributes] Add custom attributes to the link element.\n *\n * Can be one of:\n *\n * - `object`: A map of attributes\n * - `function`: Takes the url as a parameter and returns a map of attributes\n *\n * If the map of attributes contains a value for `target`, it overrides the value of\n * the target parameter.\n *\n *\n * @returns {string} Html-linkified and {@link $sanitize sanitized} text.\n *\n * @usage\n \n *\n * @example\n \n \n

      \n Snippet: \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      FilterSourceRendered
      linky filter\n
      <div ng-bind-html=\"snippet | linky\">
      </div>
      \n
      \n
      \n
      linky target\n
      <div ng-bind-html=\"snippetWithSingleURL | linky:'_blank'\">
      </div>
      \n
      \n
      \n
      linky custom attributes\n
      <div ng-bind-html=\"snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}\">
      </div>
      \n
      \n
      \n
      no filter
      <div ng-bind=\"snippet\">
      </div>
      \n \n \n angular.module('linkyExample', ['ngSanitize'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.snippet =\n 'Pretty text with some links:\\n' +\n 'http://angularjs.org/,\\n' +\n 'mailto:us@somewhere.org,\\n' +\n 'another@somewhere.org,\\n' +\n 'and one more: ftp://127.0.0.1/.';\n $scope.snippetWithSingleURL = 'http://angularjs.org/';\n }]);\n \n \n it('should linkify the snippet with urls', function() {\n expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' +\n 'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n expect(element.all(by.css('#linky-filter a')).count()).toEqual(4);\n });\n\n it('should not linkify snippet without the linky filter', function() {\n expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()).\n toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' +\n 'another@somewhere.org, and one more: ftp://127.0.0.1/.');\n expect(element.all(by.css('#escaped-html a')).count()).toEqual(0);\n });\n\n it('should update', function() {\n element(by.model('snippet')).clear();\n element(by.model('snippet')).sendKeys('new http://link.');\n expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).\n toBe('new http://link.');\n expect(element.all(by.css('#linky-filter a')).count()).toEqual(1);\n expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText())\n .toBe('new http://link.');\n });\n\n it('should work with the target property', function() {\n expect(element(by.id('linky-target')).\n element(by.binding(\"snippetWithSingleURL | linky:'_blank'\")).getText()).\n toBe('http://angularjs.org/');\n expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank');\n });\n\n it('should optionally add custom attributes', function() {\n expect(element(by.id('linky-custom-attributes')).\n element(by.binding(\"snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}\")).getText()).\n toBe('http://angularjs.org/');\n expect(element(by.css('#linky-custom-attributes a')).getAttribute('rel')).toEqual('nofollow');\n });\n \n \n */\nangular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {\n var LINKY_URL_REGEXP =\n /((s?ftp|https?):\\/\\/|(www\\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\\S*[^\\s.;,(){}<>\"\\u201d\\u2019]/i,\n MAILTO_REGEXP = /^mailto:/i;\n\n var linkyMinErr = angular.$$minErr('linky');\n var isDefined = angular.isDefined;\n var isFunction = angular.isFunction;\n var isObject = angular.isObject;\n var isString = angular.isString;\n\n return function(text, target, attributes) {\n if (text == null || text === '') return text;\n if (!isString(text)) throw linkyMinErr('notstring', 'Expected string but received: {0}', text);\n\n var attributesFn =\n isFunction(attributes) ? attributes :\n isObject(attributes) ? function getAttributesObject() {return attributes;} :\n function getEmptyAttributesObject() {return {};};\n\n var match;\n var raw = text;\n var html = [];\n var url;\n var i;\n while ((match = raw.match(LINKY_URL_REGEXP))) {\n // We can not end in these as they are sometimes found at the end of the sentence\n url = match[0];\n // if we did not match ftp/http/www/mailto then assume mailto\n if (!match[2] && !match[4]) {\n url = (match[3] ? 'http://' : 'mailto:') + url;\n }\n i = match.index;\n addText(raw.substr(0, i));\n addLink(url, match[0].replace(MAILTO_REGEXP, ''));\n raw = raw.substring(i + match[0].length);\n }\n addText(raw);\n return $sanitize(html.join(''));\n\n function addText(text) {\n if (!text) {\n return;\n }\n html.push(sanitizeText(text));\n }\n\n function addLink(url, text) {\n var key, linkAttributes = attributesFn(url);\n html.push('');\n addText(text);\n html.push('');\n }\n };\n}]);\n\n\n})(window, window.angular);\n\n// 4.5.12 (2020-07-03)\n\n/**\n * Compiled inline version. (Library mode)\n */\n\n/*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */\n/*globals $code */\n\n(function(exports, undefined) {\n\t\"use strict\";\n\n\tvar modules = {};\n\n\tfunction require(ids, callback) {\n\t\tvar module, defs = [];\n\n\t\tfor (var i = 0; i < ids.length; ++i) {\n\t\t\tmodule = modules[ids[i]] || resolve(ids[i]);\n\t\t\tif (!module) {\n\t\t\t\tthrow 'module definition dependecy not found: ' + ids[i];\n\t\t\t}\n\n\t\t\tdefs.push(module);\n\t\t}\n\n\t\tcallback.apply(null, defs);\n\t}\n\n\tfunction define(id, dependencies, definition) {\n\t\tif (typeof id !== 'string') {\n\t\t\tthrow 'invalid module definition, module id must be defined and be a string';\n\t\t}\n\n\t\tif (dependencies === undefined) {\n\t\t\tthrow 'invalid module definition, dependencies must be specified';\n\t\t}\n\n\t\tif (definition === undefined) {\n\t\t\tthrow 'invalid module definition, definition function must be specified';\n\t\t}\n\n\t\trequire(dependencies, function() {\n\t\t\tmodules[id] = definition.apply(null, arguments);\n\t\t});\n\t}\n\n\tfunction defined(id) {\n\t\treturn !!modules[id];\n\t}\n\n\tfunction resolve(id) {\n\t\tvar target = exports;\n\t\tvar fragments = id.split(/[.\\/]/);\n\n\t\tfor (var fi = 0; fi < fragments.length; ++fi) {\n\t\t\tif (!target[fragments[fi]]) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttarget = target[fragments[fi]];\n\t\t}\n\n\t\treturn target;\n\t}\n\n\tfunction expose(ids) {\n\t\tvar i, target, id, fragments, privateModules;\n\n\t\tfor (i = 0; i < ids.length; i++) {\n\t\t\ttarget = exports;\n\t\t\tid = ids[i];\n\t\t\tfragments = id.split(/[.\\/]/);\n\n\t\t\tfor (var fi = 0; fi < fragments.length - 1; ++fi) {\n\t\t\t\tif (target[fragments[fi]] === undefined) {\n\t\t\t\t\ttarget[fragments[fi]] = {};\n\t\t\t\t}\n\n\t\t\t\ttarget = target[fragments[fi]];\n\t\t\t}\n\n\t\t\ttarget[fragments[fragments.length - 1]] = modules[id];\n\t\t}\n\n\t\t// Expose private modules for unit tests\n\t\tif (exports.AMDLC_TESTS) {\n\t\t\tprivateModules = exports.privateModules || {};\n\n\t\t\tfor (id in modules) {\n\t\t\t\tprivateModules[id] = modules[id];\n\t\t\t}\n\n\t\t\tfor (i = 0; i < ids.length; i++) {\n\t\t\t\tdelete privateModules[ids[i]];\n\t\t\t}\n\n\t\t\texports.privateModules = privateModules;\n\t\t}\n\t}\n\n// Included from: js/tinymce/classes/geom/Rect.js\n\n/**\n * Rect.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Contains various tools for rect/position calculation.\n *\n * @class tinymce.geom.Rect\n */\ndefine(\"tinymce/geom/Rect\", [\n], function() {\n\t\"use strict\";\n\n\tvar min = Math.min, max = Math.max, round = Math.round;\n\n\t/**\n\t * Returns the rect positioned based on the relative position name\n\t * to the target rect.\n\t *\n\t * @method relativePosition\n\t * @param {Rect} rect Source rect to modify into a new rect.\n\t * @param {Rect} targetRect Rect to move relative to based on the rel option.\n\t * @param {String} rel Relative position. For example: tr-bl.\n\t */\n\tfunction relativePosition(rect, targetRect, rel) {\n\t\tvar x, y, w, h, targetW, targetH;\n\n\t\tx = targetRect.x;\n\t\ty = targetRect.y;\n\t\tw = rect.w;\n\t\th = rect.h;\n\t\ttargetW = targetRect.w;\n\t\ttargetH = targetRect.h;\n\n\t\trel = (rel || '').split('');\n\n\t\tif (rel[0] === 'b') {\n\t\t\ty += targetH;\n\t\t}\n\n\t\tif (rel[1] === 'r') {\n\t\t\tx += targetW;\n\t\t}\n\n\t\tif (rel[0] === 'c') {\n\t\t\ty += round(targetH / 2);\n\t\t}\n\n\t\tif (rel[1] === 'c') {\n\t\t\tx += round(targetW / 2);\n\t\t}\n\n\t\tif (rel[3] === 'b') {\n\t\t\ty -= h;\n\t\t}\n\n\t\tif (rel[4] === 'r') {\n\t\t\tx -= w;\n\t\t}\n\n\t\tif (rel[3] === 'c') {\n\t\t\ty -= round(h / 2);\n\t\t}\n\n\t\tif (rel[4] === 'c') {\n\t\t\tx -= round(w / 2);\n\t\t}\n\n\t\treturn create(x, y, w, h);\n\t}\n\n\t/**\n\t * Tests various positions to get the most suitable one.\n\t *\n\t * @method findBestRelativePosition\n\t * @param {Rect} rect Rect to use as source.\n\t * @param {Rect} targetRect Rect to move relative to.\n\t * @param {Rect} constrainRect Rect to constrain within.\n\t * @param {Array} rels Array of relative positions to test against.\n\t */\n\tfunction findBestRelativePosition(rect, targetRect, constrainRect, rels) {\n\t\tvar pos, i;\n\n\t\tfor (i = 0; i < rels.length; i++) {\n\t\t\tpos = relativePosition(rect, targetRect, rels[i]);\n\n\t\t\tif (pos.x >= constrainRect.x && pos.x + pos.w <= constrainRect.w + constrainRect.x &&\n\t\t\t\tpos.y >= constrainRect.y && pos.y + pos.h <= constrainRect.h + constrainRect.y) {\n\t\t\t\treturn rels[i];\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Inflates the rect in all directions.\n\t *\n\t * @method inflate\n\t * @param {Rect} rect Rect to expand.\n\t * @param {Number} w Relative width to expand by.\n\t * @param {Number} h Relative height to expand by.\n\t * @return {Rect} New expanded rect.\n\t */\n\tfunction inflate(rect, w, h) {\n\t\treturn create(rect.x - w, rect.y - h, rect.w + w * 2, rect.h + h * 2);\n\t}\n\n\t/**\n\t * Returns the intersection of the specified rectangles.\n\t *\n\t * @method intersect\n\t * @param {Rect} rect The first rectangle to compare.\n\t * @param {Rect} cropRect The second rectangle to compare.\n\t * @return {Rect} The intersection of the two rectangles or null if they don't intersect.\n\t */\n\tfunction intersect(rect, cropRect) {\n\t\tvar x1, y1, x2, y2;\n\n\t\tx1 = max(rect.x, cropRect.x);\n\t\ty1 = max(rect.y, cropRect.y);\n\t\tx2 = min(rect.x + rect.w, cropRect.x + cropRect.w);\n\t\ty2 = min(rect.y + rect.h, cropRect.y + cropRect.h);\n\n\t\tif (x2 - x1 < 0 || y2 - y1 < 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn create(x1, y1, x2 - x1, y2 - y1);\n\t}\n\n\t/**\n\t * Returns a rect clamped within the specified clamp rect. This forces the\n\t * rect to be inside the clamp rect.\n\t *\n\t * @method clamp\n\t * @param {Rect} rect Rectangle to force within clamp rect.\n\t * @param {Rect} clampRect Rectable to force within.\n\t * @param {Boolean} fixedSize True/false if size should be fixed.\n\t * @return {Rect} Clamped rect.\n\t */\n\tfunction clamp(rect, clampRect, fixedSize) {\n\t\tvar underflowX1, underflowY1, overflowX2, overflowY2,\n\t\t\tx1, y1, x2, y2, cx2, cy2;\n\n\t\tx1 = rect.x;\n\t\ty1 = rect.y;\n\t\tx2 = rect.x + rect.w;\n\t\ty2 = rect.y + rect.h;\n\t\tcx2 = clampRect.x + clampRect.w;\n\t\tcy2 = clampRect.y + clampRect.h;\n\n\t\tunderflowX1 = max(0, clampRect.x - x1);\n\t\tunderflowY1 = max(0, clampRect.y - y1);\n\t\toverflowX2 = max(0, x2 - cx2);\n\t\toverflowY2 = max(0, y2 - cy2);\n\n\t\tx1 += underflowX1;\n\t\ty1 += underflowY1;\n\n\t\tif (fixedSize) {\n\t\t\tx2 += underflowX1;\n\t\t\ty2 += underflowY1;\n\t\t\tx1 -= overflowX2;\n\t\t\ty1 -= overflowY2;\n\t\t}\n\n\t\tx2 -= overflowX2;\n\t\ty2 -= overflowY2;\n\n\t\treturn create(x1, y1, x2 - x1, y2 - y1);\n\t}\n\n\t/**\n\t * Creates a new rectangle object.\n\t *\n\t * @method create\n\t * @param {Number} x Rectangle x location.\n\t * @param {Number} y Rectangle y location.\n\t * @param {Number} w Rectangle width.\n\t * @param {Number} h Rectangle height.\n\t * @return {Rect} New rectangle object.\n\t */\n\tfunction create(x, y, w, h) {\n\t\treturn {x: x, y: y, w: w, h: h};\n\t}\n\n\t/**\n\t * Creates a new rectangle object form a clientRects object.\n\t *\n\t * @method fromClientRect\n\t * @param {ClientRect} clientRect DOM ClientRect object.\n\t * @return {Rect} New rectangle object.\n\t */\n\tfunction fromClientRect(clientRect) {\n\t\treturn create(clientRect.left, clientRect.top, clientRect.width, clientRect.height);\n\t}\n\n\treturn {\n\t\tinflate: inflate,\n\t\trelativePosition: relativePosition,\n\t\tfindBestRelativePosition: findBestRelativePosition,\n\t\tintersect: intersect,\n\t\tclamp: clamp,\n\t\tcreate: create,\n\t\tfromClientRect: fromClientRect\n\t};\n});\n\n// Included from: js/tinymce/classes/util/Promise.js\n\n/**\n * Promise.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * Promise polyfill under MIT license: https://github.com/taylorhakes/promise-polyfill\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/* eslint-disable */\n/* jshint ignore:start */\n\n/**\n * Modifed to be a feature fill and wrapped as tinymce module.\n */\ndefine(\"tinymce/util/Promise\", [], function() {\n\tif (window.Promise) {\n\t\treturn window.Promise;\n\t}\n\n\t// Use polyfill for setImmediate for performance gains\n\tvar asap = Promise.immediateFn || (typeof setImmediate === 'function' && setImmediate) ||\n\t\tfunction(fn) { setTimeout(fn, 1); };\n\n\t// Polyfill for Function.prototype.bind\n\tfunction bind(fn, thisArg) {\n\t\treturn function() {\n\t\t\tfn.apply(thisArg, arguments);\n\t\t};\n\t}\n\n\tvar isArray = Array.isArray || function(value) { return Object.prototype.toString.call(value) === \"[object Array]\"; };\n\n\tfunction Promise(fn) {\n\t\tif (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n\t\tif (typeof fn !== 'function') throw new TypeError('not a function');\n\t\tthis._state = null;\n\t\tthis._value = null;\n\t\tthis._deferreds = [];\n\n\t\tdoResolve(fn, bind(resolve, this), bind(reject, this));\n\t}\n\n\tfunction handle(deferred) {\n\t\tvar me = this;\n\t\tif (this._state === null) {\n\t\t\tthis._deferreds.push(deferred);\n\t\t\treturn;\n\t\t}\n\t\tasap(function() {\n\t\t\tvar cb = me._state ? deferred.onFulfilled : deferred.onRejected;\n\t\t\tif (cb === null) {\n\t\t\t\t(me._state ? deferred.resolve : deferred.reject)(me._value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar ret;\n\t\t\ttry {\n\t\t\t\tret = cb(me._value);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tdeferred.reject(e);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdeferred.resolve(ret);\n\t\t});\n\t}\n\n\tfunction resolve(newValue) {\n\t\ttry { //Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n\t\t\tif (newValue === this) throw new TypeError('A promise cannot be resolved with itself.');\n\t\t\tif (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n\t\t\t\tvar then = newValue.then;\n\t\t\t\tif (typeof then === 'function') {\n\t\t\t\t\tdoResolve(bind(then, newValue), bind(resolve, this), bind(reject, this));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._state = true;\n\t\t\tthis._value = newValue;\n\t\t\tfinale.call(this);\n\t\t} catch (e) { reject.call(this, e); }\n\t}\n\n\tfunction reject(newValue) {\n\t\tthis._state = false;\n\t\tthis._value = newValue;\n\t\tfinale.call(this);\n\t}\n\n\tfunction finale() {\n\t\tfor (var i = 0, len = this._deferreds.length; i < len; i++) {\n\t\t\thandle.call(this, this._deferreds[i]);\n\t\t}\n\t\tthis._deferreds = null;\n\t}\n\n\tfunction Handler(onFulfilled, onRejected, resolve, reject){\n\t\tthis.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n\t\tthis.onRejected = typeof onRejected === 'function' ? onRejected : null;\n\t\tthis.resolve = resolve;\n\t\tthis.reject = reject;\n\t}\n\n\t/**\n\t * Take a potentially misbehaving resolver function and make sure\n\t * onFulfilled and onRejected are only called once.\n\t *\n\t * Makes no guarantees about asynchrony.\n\t */\n\tfunction doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t});\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}\n\n\tPromise.prototype['catch'] = function (onRejected) {\n\t\treturn this.then(null, onRejected);\n\t};\n\n\tPromise.prototype.then = function(onFulfilled, onRejected) {\n\t\tvar me = this;\n\t\treturn new Promise(function(resolve, reject) {\n\t\t\thandle.call(me, new Handler(onFulfilled, onRejected, resolve, reject));\n\t\t});\n\t};\n\n\tPromise.all = function () {\n\t\tvar args = Array.prototype.slice.call(arguments.length === 1 && isArray(arguments[0]) ? arguments[0] : arguments);\n\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\tif (args.length === 0) return resolve([]);\n\t\t\tvar remaining = args.length;\n\t\t\tfunction res(i, val) {\n\t\t\t\ttry {\n\t\t\t\t\tif (val && (typeof val === 'object' || typeof val === 'function')) {\n\t\t\t\t\t\tvar then = val.then;\n\t\t\t\t\t\tif (typeof then === 'function') {\n\t\t\t\t\t\t\tthen.call(val, function (val) { res(i, val); }, reject);\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\targs[i] = val;\n\t\t\t\t\tif (--remaining === 0) {\n\t\t\t\t\t\tresolve(args);\n\t\t\t\t\t}\n\t\t\t\t} catch (ex) {\n\t\t\t\t\treject(ex);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i = 0; i < args.length; i++) {\n\t\t\t\tres(i, args[i]);\n\t\t\t}\n\t\t});\n\t};\n\n\tPromise.resolve = function (value) {\n\t\tif (value && typeof value === 'object' && value.constructor === Promise) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn new Promise(function (resolve) {\n\t\t\tresolve(value);\n\t\t});\n\t};\n\n\tPromise.reject = function (value) {\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\treject(value);\n\t\t});\n\t};\n\n\tPromise.race = function (values) {\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\tfor(var i = 0, len = values.length; i < len; i++) {\n\t\t\t\tvalues[i].then(resolve, reject);\n\t\t\t}\n\t\t});\n\t};\n\n\treturn Promise;\n});\n\n/* jshint ignore:end */\n/* eslint-enable */\n\n// Included from: js/tinymce/classes/util/Delay.js\n\n/**\n * Delay.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Utility class for working with delayed actions like setTimeout.\n *\n * @class tinymce.util.Delay\n */\ndefine(\"tinymce/util/Delay\", [\n\t\"tinymce/util/Promise\"\n], function(Promise) {\n\tvar requestAnimationFramePromise;\n\n\tfunction requestAnimationFrame(callback, element) {\n\t\tvar i, requestAnimationFrameFunc = window.requestAnimationFrame, vendors = ['ms', 'moz', 'webkit'];\n\n\t\tfunction featurefill(callback) {\n\t\t\twindow.setTimeout(callback, 0);\n\t\t}\n\n\t\tfor (i = 0; i < vendors.length && !requestAnimationFrameFunc; i++) {\n\t\t\trequestAnimationFrameFunc = window[vendors[i] + 'RequestAnimationFrame'];\n\t\t}\n\n\t\tif (!requestAnimationFrameFunc) {\n\t\t\trequestAnimationFrameFunc = featurefill;\n\t\t}\n\n\t\trequestAnimationFrameFunc(callback, element);\n\t}\n\n\tfunction wrappedSetTimeout(callback, time) {\n\t\tif (typeof time != 'number') {\n\t\t\ttime = 0;\n\t\t}\n\n\t\treturn setTimeout(callback, time);\n\t}\n\n\tfunction wrappedSetInterval(callback, time) {\n\t\tif (typeof time != 'number') {\n\t\t\ttime = 1; // IE 8 needs it to be > 0\n\t\t}\n\n\t\treturn setInterval(callback, time);\n\t}\n\n\tfunction wrappedClearTimeout(id) {\n\t\treturn clearTimeout(id);\n\t}\n\n\tfunction wrappedClearInterval(id) {\n\t\treturn clearInterval(id);\n\t}\n\n\tfunction debounce(callback, time) {\n\t\tvar timer, func;\n\n\t\tfunc = function() {\n\t\t\tvar args = arguments;\n\n\t\t\tclearTimeout(timer);\n\n\t\t\ttimer = wrappedSetTimeout(function() {\n\t\t\t\tcallback.apply(this, args);\n\t\t\t}, time);\n\t\t};\n\n\t\tfunc.stop = function() {\n\t\t\tclearTimeout(timer);\n\t\t};\n\n\t\treturn func;\n\t}\n\n\treturn {\n\t\t/**\n\t\t * Requests an animation frame and fallbacks to a timeout on older browsers.\n\t\t *\n\t\t * @method requestAnimationFrame\n\t\t * @param {function} callback Callback to execute when a new frame is available.\n\t\t * @param {DOMElement} element Optional element to scope it to.\n\t\t */\n\t\trequestAnimationFrame: function(callback, element) {\n\t\t\tif (requestAnimationFramePromise) {\n\t\t\t\trequestAnimationFramePromise.then(callback);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\trequestAnimationFramePromise = new Promise(function(resolve) {\n\t\t\t\tif (!element) {\n\t\t\t\t\telement = document.body;\n\t\t\t\t}\n\n\t\t\t\trequestAnimationFrame(resolve, element);\n\t\t\t}).then(callback);\n\t\t},\n\n\t\t/**\n\t\t * Sets a timer in ms and executes the specified callback when the timer runs out.\n\t\t *\n\t\t * @method setTimeout\n\t\t * @param {function} callback Callback to execute when timer runs out.\n\t\t * @param {Number} time Optional time to wait before the callback is executed, defaults to 0.\n\t\t * @return {Number} Timeout id number.\n\t\t */\n\t\tsetTimeout: wrappedSetTimeout,\n\n\t\t/**\n\t\t * Sets an interval timer in ms and executes the specified callback at every interval of that time.\n\t\t *\n\t\t * @method setInterval\n\t\t * @param {function} callback Callback to execute when interval time runs out.\n\t\t * @param {Number} time Optional time to wait before the callback is executed, defaults to 0.\n\t\t * @return {Number} Timeout id number.\n\t\t */\n\t\tsetInterval: wrappedSetInterval,\n\n\t\t/**\n\t\t * Sets an editor timeout it's similar to setTimeout except that it checks if the editor instance is\n\t\t * still alive when the callback gets executed.\n\t\t *\n\t\t * @method setEditorTimeout\n\t\t * @param {tinymce.Editor} editor Editor instance to check the removed state on.\n\t\t * @param {function} callback Callback to execute when timer runs out.\n\t\t * @param {Number} time Optional time to wait before the callback is executed, defaults to 0.\n\t\t * @return {Number} Timeout id number.\n\t\t */\n\t\tsetEditorTimeout: function(editor, callback, time) {\n\t\t\treturn wrappedSetTimeout(function() {\n\t\t\t\tif (!editor.removed) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}, time);\n\t\t},\n\n\t\t/**\n\t\t * Sets an interval timer it's similar to setInterval except that it checks if the editor instance is\n\t\t * still alive when the callback gets executed.\n\t\t *\n\t\t * @method setEditorInterval\n\t\t * @param {function} callback Callback to execute when interval time runs out.\n\t\t * @param {Number} time Optional time to wait before the callback is executed, defaults to 0.\n\t\t * @return {Number} Timeout id number.\n\t\t */\n\t\tsetEditorInterval: function(editor, callback, time) {\n\t\t\tvar timer;\n\n\t\t\ttimer = wrappedSetInterval(function() {\n\t\t\t\tif (!editor.removed) {\n\t\t\t\t\tcallback();\n\t\t\t\t} else {\n\t\t\t\t\tclearInterval(timer);\n\t\t\t\t}\n\t\t\t}, time);\n\n\t\t\treturn timer;\n\t\t},\n\n\t\t/**\n\t\t * Creates debounced callback function that only gets executed once within the specified time.\n\t\t *\n\t\t * @method debounce\n\t\t * @param {function} callback Callback to execute when timer finishes.\n\t\t * @param {Number} time Optional time to wait before the callback is executed, defaults to 0.\n\t\t * @return {Function} debounced function callback.\n\t\t */\n\t\tdebounce: debounce,\n\n\t\t// Throttle needs to be debounce due to backwards compatibility.\n\t\tthrottle: debounce,\n\n\t\t/**\n\t\t * Clears an interval timer so it won't execute.\n\t\t *\n\t\t * @method clearInterval\n\t\t * @param {Number} Interval timer id number.\n\t\t */\n\t\tclearInterval: wrappedClearInterval,\n\n\t\t/**\n\t\t * Clears an timeout timer so it won't execute.\n\t\t *\n\t\t * @method clearTimeout\n\t\t * @param {Number} Timeout timer id number.\n\t\t */\n\t\tclearTimeout: wrappedClearTimeout\n\t};\n});\n\n// Included from: js/tinymce/classes/Env.js\n\n/**\n * Env.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class contains various environment constants like browser versions etc.\n * Normally you don't want to sniff specific browser versions but sometimes you have\n * to when it's impossible to feature detect. So use this with care.\n *\n * @class tinymce.Env\n * @static\n */\ndefine(\"tinymce/Env\", [], function() {\n\tvar nav = navigator, userAgent = nav.userAgent;\n\tvar opera, webkit, ie, ie11, ie12, gecko, mac, iDevice, android, fileApi, phone, tablet, windowsPhone;\n\n\tfunction matchMediaQuery(query) {\n\t\treturn \"matchMedia\" in window ? matchMedia(query).matches : false;\n\t}\n\n\topera = window.opera && window.opera.buildNumber;\n\tandroid = /Android/.test(userAgent);\n\twebkit = /WebKit/.test(userAgent);\n\tie = !webkit && !opera && (/MSIE/gi).test(userAgent) && (/Explorer/gi).test(nav.appName);\n\tie = ie && /MSIE (\\w+)\\./.exec(userAgent)[1];\n\tie11 = userAgent.indexOf('Trident/') != -1 && (userAgent.indexOf('rv:') != -1 || nav.appName.indexOf('Netscape') != -1) ? 11 : false;\n\tie12 = (userAgent.indexOf('Edge/') != -1 && !ie && !ie11) ? 12 : false;\n\tie = ie || ie11 || ie12;\n\tgecko = !webkit && !ie11 && /Gecko/.test(userAgent);\n\tmac = userAgent.indexOf('Mac') != -1;\n\tiDevice = /(iPad|iPhone)/.test(userAgent);\n\tfileApi = \"FormData\" in window && \"FileReader\" in window && \"URL\" in window && !!URL.createObjectURL;\n\tphone = matchMediaQuery(\"only screen and (max-device-width: 480px)\") && (android || iDevice);\n\ttablet = matchMediaQuery(\"only screen and (min-width: 800px)\") && (android || iDevice);\n\twindowsPhone = userAgent.indexOf('Windows Phone') != -1;\n\n\tif (ie12) {\n\t\twebkit = false;\n\t}\n\n\t// Is a iPad/iPhone and not on iOS5 sniff the WebKit version since older iOS WebKit versions\n\t// says it has contentEditable support but there is no visible caret.\n\tvar contentEditable = !iDevice || fileApi || userAgent.match(/AppleWebKit\\/(\\d*)/)[1] >= 534;\n\n\treturn {\n\t\t/**\n\t\t * Constant that is true if the browser is Opera.\n\t\t *\n\t\t * @property opera\n\t\t * @type Boolean\n\t\t * @final\n\t\t */\n\t\topera: opera,\n\n\t\t/**\n\t\t * Constant that is true if the browser is WebKit (Safari/Chrome).\n\t\t *\n\t\t * @property webKit\n\t\t * @type Boolean\n\t\t * @final\n\t\t */\n\t\twebkit: webkit,\n\n\t\t/**\n\t\t * Constant that is more than zero if the browser is IE.\n\t\t *\n\t\t * @property ie\n\t\t * @type Boolean\n\t\t * @final\n\t\t */\n\t\tie: ie,\n\n\t\t/**\n\t\t * Constant that is true if the browser is Gecko.\n\t\t *\n\t\t * @property gecko\n\t\t * @type Boolean\n\t\t * @final\n\t\t */\n\t\tgecko: gecko,\n\n\t\t/**\n\t\t * Constant that is true if the os is Mac OS.\n\t\t *\n\t\t * @property mac\n\t\t * @type Boolean\n\t\t * @final\n\t\t */\n\t\tmac: mac,\n\n\t\t/**\n\t\t * Constant that is true if the os is iOS.\n\t\t *\n\t\t * @property iOS\n\t\t * @type Boolean\n\t\t * @final\n\t\t */\n\t\tiOS: iDevice,\n\n\t\t/**\n\t\t * Constant that is true if the os is android.\n\t\t *\n\t\t * @property android\n\t\t * @type Boolean\n\t\t * @final\n\t\t */\n\t\tandroid: android,\n\n\t\t/**\n\t\t * Constant that is true if the browser supports editing.\n\t\t *\n\t\t * @property contentEditable\n\t\t * @type Boolean\n\t\t * @final\n\t\t */\n\t\tcontentEditable: contentEditable,\n\n\t\t/**\n\t\t * Transparent image data url.\n\t\t *\n\t\t * @property transparentSrc\n\t\t * @type Boolean\n\t\t * @final\n\t\t */\n\t\ttransparentSrc: \"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\",\n\n\t\t/**\n\t\t * Returns true/false if the browser can or can't place the caret after a inline block like an image.\n\t\t *\n\t\t * @property noCaretAfter\n\t\t * @type Boolean\n\t\t * @final\n\t\t */\n\t\tcaretAfter: ie != 8,\n\n\t\t/**\n\t\t * Constant that is true if the browser supports native DOM Ranges. IE 9+.\n\t\t *\n\t\t * @property range\n\t\t * @type Boolean\n\t\t */\n\t\trange: window.getSelection && \"Range\" in window,\n\n\t\t/**\n\t\t * Returns the IE document mode for non IE browsers this will fake IE 10.\n\t\t *\n\t\t * @property documentMode\n\t\t * @type Number\n\t\t */\n\t\tdocumentMode: ie && !ie12 ? (document.documentMode || 7) : 10,\n\n\t\t/**\n\t\t * Constant that is true if the browser has a modern file api.\n\t\t *\n\t\t * @property fileApi\n\t\t * @type Boolean\n\t\t */\n\t\tfileApi: fileApi,\n\n\t\t/**\n\t\t * Constant that is true if the browser supports contentEditable=false regions.\n\t\t *\n\t\t * @property ceFalse\n\t\t * @type Boolean\n\t\t */\n\t\tceFalse: (ie === false || ie > 8),\n\n\t\t/**\n\t\t * Constant if CSP mode is possible or not. Meaning we can't use script urls for the iframe.\n\t\t */\n\t\tcanHaveCSP: (ie === false || ie > 11),\n\n\t\tdesktop: !phone && !tablet,\n\t\twindowsPhone: windowsPhone\n\t};\n});\n\n// Included from: js/tinymce/classes/dom/EventUtils.js\n\n/**\n * EventUtils.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/*jshint loopfunc:true*/\n/*eslint no-loop-func:0 */\n\n/**\n * This class wraps the browsers native event logic with more convenient methods.\n *\n * @class tinymce.dom.EventUtils\n */\ndefine(\"tinymce/dom/EventUtils\", [\n\t\"tinymce/util/Delay\",\n\t\"tinymce/Env\"\n], function(Delay, Env) {\n\t\"use strict\";\n\n\tvar eventExpandoPrefix = \"mce-data-\";\n\tvar mouseEventRe = /^(?:mouse|contextmenu)|click/;\n\tvar deprecated = {\n\t\tkeyLocation: 1, layerX: 1, layerY: 1, returnValue: 1,\n\t\twebkitMovementX: 1, webkitMovementY: 1, keyIdentifier: 1\n\t};\n\n\t/**\n\t * Binds a native event to a callback on the speified target.\n\t */\n\tfunction addEvent(target, name, callback, capture) {\n\t\tif (target.addEventListener) {\n\t\t\ttarget.addEventListener(name, callback, capture || false);\n\t\t} else if (target.attachEvent) {\n\t\t\ttarget.attachEvent('on' + name, callback);\n\t\t}\n\t}\n\n\t/**\n\t * Unbinds a native event callback on the specified target.\n\t */\n\tfunction removeEvent(target, name, callback, capture) {\n\t\tif (target.removeEventListener) {\n\t\t\ttarget.removeEventListener(name, callback, capture || false);\n\t\t} else if (target.detachEvent) {\n\t\t\ttarget.detachEvent('on' + name, callback);\n\t\t}\n\t}\n\n\t/**\n\t * Gets the event target based on shadow dom properties like path and deepPath.\n\t */\n\tfunction getTargetFromShadowDom(event, defaultTarget) {\n\t\tvar path, target = defaultTarget;\n\n\t\t// When target element is inside Shadow DOM we need to take first element from path\n\t\t// otherwise we'll get Shadow Root parent, not actual target element\n\n\t\t// Normalize target for WebComponents v0 implementation (in Chrome)\n\t\tpath = event.path;\n\t\tif (path && path.length > 0) {\n\t\t\ttarget = path[0];\n\t\t}\n\n\t\t// Normalize target for WebComponents v1 implementation (standard)\n\t\tif (event.deepPath) {\n\t\t\tpath = event.deepPath();\n\t\t\tif (path && path.length > 0) {\n\t\t\t\ttarget = path[0];\n\t\t\t}\n\t\t}\n\n\t\treturn target;\n\t}\n\n\t/**\n\t * Normalizes a native event object or just adds the event specific methods on a custom event.\n\t */\n\tfunction fix(originalEvent, data) {\n\t\tvar name, event = data || {}, undef;\n\n\t\t// Dummy function that gets replaced on the delegation state functions\n\t\tfunction returnFalse() {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Dummy function that gets replaced on the delegation state functions\n\t\tfunction returnTrue() {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Copy all properties from the original event\n\t\tfor (name in originalEvent) {\n\t\t\t// layerX/layerY is deprecated in Chrome and produces a warning\n\t\t\tif (!deprecated[name]) {\n\t\t\t\tevent[name] = originalEvent[name];\n\t\t\t}\n\t\t}\n\n\t\t// Normalize target IE uses srcElement\n\t\tif (!event.target) {\n\t\t\tevent.target = event.srcElement || document;\n\t\t}\n\n\t\t// Experimental shadow dom support\n\t\tif (Env.experimentalShadowDom) {\n\t\t\tevent.target = getTargetFromShadowDom(originalEvent, event.target);\n\t\t}\n\n\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\tif (originalEvent && mouseEventRe.test(originalEvent.type) && originalEvent.pageX === undef && originalEvent.clientX !== undef) {\n\t\t\tvar eventDoc = event.target.ownerDocument || document;\n\t\t\tvar doc = eventDoc.documentElement;\n\t\t\tvar body = eventDoc.body;\n\n\t\t\tevent.pageX = originalEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) -\n\t\t\t\t(doc && doc.clientLeft || body && body.clientLeft || 0);\n\n\t\t\tevent.pageY = originalEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) -\n\t\t\t\t(doc && doc.clientTop || body && body.clientTop || 0);\n\t\t}\n\n\t\t// Add preventDefault method\n\t\tevent.preventDefault = function() {\n\t\t\tevent.isDefaultPrevented = returnTrue;\n\n\t\t\t// Execute preventDefault on the original event object\n\t\t\tif (originalEvent) {\n\t\t\t\tif (originalEvent.preventDefault) {\n\t\t\t\t\toriginalEvent.preventDefault();\n\t\t\t\t} else {\n\t\t\t\t\toriginalEvent.returnValue = false; // IE\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Add stopPropagation\n\t\tevent.stopPropagation = function() {\n\t\t\tevent.isPropagationStopped = returnTrue;\n\n\t\t\t// Execute stopPropagation on the original event object\n\t\t\tif (originalEvent) {\n\t\t\t\tif (originalEvent.stopPropagation) {\n\t\t\t\t\toriginalEvent.stopPropagation();\n\t\t\t\t} else {\n\t\t\t\t\toriginalEvent.cancelBubble = true; // IE\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Add stopImmediatePropagation\n\t\tevent.stopImmediatePropagation = function() {\n\t\t\tevent.isImmediatePropagationStopped = returnTrue;\n\t\t\tevent.stopPropagation();\n\t\t};\n\n\t\t// Add event delegation states\n\t\tif (!event.isDefaultPrevented) {\n\t\t\tevent.isDefaultPrevented = returnFalse;\n\t\t\tevent.isPropagationStopped = returnFalse;\n\t\t\tevent.isImmediatePropagationStopped = returnFalse;\n\t\t}\n\n\t\t// Add missing metaKey for IE 8\n\t\tif (typeof event.metaKey == 'undefined') {\n\t\t\tevent.metaKey = false;\n\t\t}\n\n\t\treturn event;\n\t}\n\n\t/**\n\t * Bind a DOMContentLoaded event across browsers and executes the callback once the page DOM is initialized.\n\t * It will also set/check the domLoaded state of the event_utils instance so ready isn't called multiple times.\n\t */\n\tfunction bindOnReady(win, callback, eventUtils) {\n\t\tvar doc = win.document, event = {type: 'ready'};\n\n\t\tif (eventUtils.domLoaded) {\n\t\t\tcallback(event);\n\t\t\treturn;\n\t\t}\n\n\t\t// Gets called when the DOM is ready\n\t\tfunction readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}\n\n\t\tfunction waitForDomLoaded() {\n\t\t\t// Check complete or interactive state if there is a body\n\t\t\t// element on some iframes IE 8 will produce a null body\n\t\t\tif (doc.readyState === \"complete\" || (doc.readyState === \"interactive\" && doc.body)) {\n\t\t\t\tremoveEvent(doc, \"readystatechange\", waitForDomLoaded);\n\t\t\t\treadyHandler();\n\t\t\t}\n\t\t}\n\n\t\tfunction tryScroll() {\n\t\t\ttry {\n\t\t\t\t// If IE is used, use the trick by Diego Perini licensed under MIT by request to the author.\n\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\t\t\tdoc.documentElement.doScroll(\"left\");\n\t\t\t} catch (ex) {\n\t\t\t\tDelay.setTimeout(tryScroll);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treadyHandler();\n\t\t}\n\n\t\t// Use W3C method\n\t\tif (doc.addEventListener) {\n\t\t\tif (doc.readyState === \"complete\") {\n\t\t\t\treadyHandler();\n\t\t\t} else {\n\t\t\t\taddEvent(win, 'DOMContentLoaded', readyHandler);\n\t\t\t}\n\t\t} else {\n\t\t\t// Use IE method\n\t\t\taddEvent(doc, \"readystatechange\", waitForDomLoaded);\n\n\t\t\t// Wait until we can scroll, when we can the DOM is initialized\n\t\t\tif (doc.documentElement.doScroll && win.self === win.top) {\n\t\t\t\ttryScroll();\n\t\t\t}\n\t\t}\n\n\t\t// Fallback if any of the above methods should fail for some odd reason\n\t\taddEvent(win, 'load', readyHandler);\n\t}\n\n\t/**\n\t * This class enables you to bind/unbind native events to elements and normalize it's behavior across browsers.\n\t */\n\tfunction EventUtils() {\n\t\tvar self = this, events = {}, count, expando, hasFocusIn, hasMouseEnterLeave, mouseEnterLeave;\n\n\t\texpando = eventExpandoPrefix + (+new Date()).toString(32);\n\t\thasMouseEnterLeave = \"onmouseenter\" in document.documentElement;\n\t\thasFocusIn = \"onfocusin\" in document.documentElement;\n\t\tmouseEnterLeave = {mouseenter: 'mouseover', mouseleave: 'mouseout'};\n\t\tcount = 1;\n\n\t\t// State if the DOMContentLoaded was executed or not\n\t\tself.domLoaded = false;\n\t\tself.events = events;\n\n\t\t/**\n\t\t * Executes all event handler callbacks for a specific event.\n\t\t *\n\t\t * @private\n\t\t * @param {Event} evt Event object.\n\t\t * @param {String} id Expando id value to look for.\n\t\t */\n\t\tfunction executeHandlers(evt, id) {\n\t\t\tvar callbackList, i, l, callback, container = events[id];\n\n\t\t\tcallbackList = container && container[evt.type];\n\t\t\tif (callbackList) {\n\t\t\t\tfor (i = 0, l = callbackList.length; i < l; i++) {\n\t\t\t\t\tcallback = callbackList[i];\n\n\t\t\t\t\t// Check if callback exists might be removed if a unbind is called inside the callback\n\t\t\t\t\tif (callback && callback.func.call(callback.scope, evt) === false) {\n\t\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Should we stop propagation to immediate listeners\n\t\t\t\t\tif (evt.isImmediatePropagationStopped()) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Binds a callback to an event on the specified target.\n\t\t *\n\t\t * @method bind\n\t\t * @param {Object} target Target node/window or custom object.\n\t\t * @param {String} names Name of the event to bind.\n\t\t * @param {function} callback Callback function to execute when the event occurs.\n\t\t * @param {Object} scope Scope to call the callback function on, defaults to target.\n\t\t * @return {function} Callback function that got bound.\n\t\t */\n\t\tself.bind = function(target, names, callback, scope) {\n\t\t\tvar id, callbackList, i, name, fakeName, nativeHandler, capture, win = window;\n\n\t\t\t// Native event handler function patches the event and executes the callbacks for the expando\n\t\t\tfunction defaultNativeHandler(evt) {\n\t\t\t\texecuteHandlers(fix(evt || win.event), id);\n\t\t\t}\n\n\t\t\t// Don't bind to text nodes or comments\n\t\t\tif (!target || target.nodeType === 3 || target.nodeType === 8) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Create or get events id for the target\n\t\t\tif (!target[expando]) {\n\t\t\t\tid = count++;\n\t\t\t\ttarget[expando] = id;\n\t\t\t\tevents[id] = {};\n\t\t\t} else {\n\t\t\t\tid = target[expando];\n\t\t\t}\n\n\t\t\t// Setup the specified scope or use the target as a default\n\t\t\tscope = scope || target;\n\n\t\t\t// Split names and bind each event, enables you to bind multiple events with one call\n\t\t\tnames = names.split(' ');\n\t\t\ti = names.length;\n\t\t\twhile (i--) {\n\t\t\t\tname = names[i];\n\t\t\t\tnativeHandler = defaultNativeHandler;\n\t\t\t\tfakeName = capture = false;\n\n\t\t\t\t// Use ready instead of DOMContentLoaded\n\t\t\t\tif (name === \"DOMContentLoaded\") {\n\t\t\t\t\tname = \"ready\";\n\t\t\t\t}\n\n\t\t\t\t// DOM is already ready\n\t\t\t\tif (self.domLoaded && name === \"ready\" && target.readyState == 'complete') {\n\t\t\t\t\tcallback.call(scope, fix({type: name}));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Handle mouseenter/mouseleaver\n\t\t\t\tif (!hasMouseEnterLeave) {\n\t\t\t\t\tfakeName = mouseEnterLeave[name];\n\n\t\t\t\t\tif (fakeName) {\n\t\t\t\t\t\tnativeHandler = function(evt) {\n\t\t\t\t\t\t\tvar current, related;\n\n\t\t\t\t\t\t\tcurrent = evt.currentTarget;\n\t\t\t\t\t\t\trelated = evt.relatedTarget;\n\n\t\t\t\t\t\t\t// Check if related is inside the current target if it's not then the event should\n\t\t\t\t\t\t\t// be ignored since it's a mouseover/mouseout inside the element\n\t\t\t\t\t\t\tif (related && current.contains) {\n\t\t\t\t\t\t\t\t// Use contains for performance\n\t\t\t\t\t\t\t\trelated = current.contains(related);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twhile (related && related !== current) {\n\t\t\t\t\t\t\t\t\trelated = related.parentNode;\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\t// Fire fake event\n\t\t\t\t\t\t\tif (!related) {\n\t\t\t\t\t\t\t\tevt = fix(evt || win.event);\n\t\t\t\t\t\t\t\tevt.type = evt.type === 'mouseout' ? 'mouseleave' : 'mouseenter';\n\t\t\t\t\t\t\t\tevt.target = current;\n\t\t\t\t\t\t\t\texecuteHandlers(evt, id);\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// Fake bubbling of focusin/focusout\n\t\t\t\tif (!hasFocusIn && (name === \"focusin\" || name === \"focusout\")) {\n\t\t\t\t\tcapture = true;\n\t\t\t\t\tfakeName = name === \"focusin\" ? \"focus\" : \"blur\";\n\t\t\t\t\tnativeHandler = function(evt) {\n\t\t\t\t\t\tevt = fix(evt || win.event);\n\t\t\t\t\t\tevt.type = evt.type === 'focus' ? 'focusin' : 'focusout';\n\t\t\t\t\t\texecuteHandlers(evt, id);\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Setup callback list and bind native event\n\t\t\t\tcallbackList = events[id][name];\n\t\t\t\tif (!callbackList) {\n\t\t\t\t\tevents[id][name] = callbackList = [{func: callback, scope: scope}];\n\t\t\t\t\tcallbackList.fakeName = fakeName;\n\t\t\t\t\tcallbackList.capture = capture;\n\t\t\t\t\t//callbackList.callback = callback;\n\n\t\t\t\t\t// Add the nativeHandler to the callback list so that we can later unbind it\n\t\t\t\t\tcallbackList.nativeHandler = nativeHandler;\n\n\t\t\t\t\t// Check if the target has native events support\n\n\t\t\t\t\tif (name === \"ready\") {\n\t\t\t\t\t\tbindOnReady(target, nativeHandler, self);\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddEvent(target, fakeName || name, nativeHandler, capture);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (name === \"ready\" && self.domLoaded) {\n\t\t\t\t\t\tcallback({type: name});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If it already has an native handler then just push the callback\n\t\t\t\t\t\tcallbackList.push({func: callback, scope: scope});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttarget = callbackList = 0; // Clean memory for IE\n\n\t\t\treturn callback;\n\t\t};\n\n\t\t/**\n\t\t * Unbinds the specified event by name, name and callback or all events on the target.\n\t\t *\n\t\t * @method unbind\n\t\t * @param {Object} target Target node/window or custom object.\n\t\t * @param {String} names Optional event name to unbind.\n\t\t * @param {function} callback Optional callback function to unbind.\n\t\t * @return {EventUtils} Event utils instance.\n\t\t */\n\t\tself.unbind = function(target, names, callback) {\n\t\t\tvar id, callbackList, i, ci, name, eventMap;\n\n\t\t\t// Don't bind to text nodes or comments\n\t\t\tif (!target || target.nodeType === 3 || target.nodeType === 8) {\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\t// Unbind event or events if the target has the expando\n\t\t\tid = target[expando];\n\t\t\tif (id) {\n\t\t\t\teventMap = events[id];\n\n\t\t\t\t// Specific callback\n\t\t\t\tif (names) {\n\t\t\t\t\tnames = names.split(' ');\n\t\t\t\t\ti = names.length;\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tname = names[i];\n\t\t\t\t\t\tcallbackList = eventMap[name];\n\n\t\t\t\t\t\t// Unbind the event if it exists in the map\n\t\t\t\t\t\tif (callbackList) {\n\t\t\t\t\t\t\t// Remove specified callback\n\t\t\t\t\t\t\tif (callback) {\n\t\t\t\t\t\t\t\tci = callbackList.length;\n\t\t\t\t\t\t\t\twhile (ci--) {\n\t\t\t\t\t\t\t\t\tif (callbackList[ci].func === callback) {\n\t\t\t\t\t\t\t\t\t\tvar nativeHandler = callbackList.nativeHandler;\n\t\t\t\t\t\t\t\t\t\tvar fakeName = callbackList.fakeName, capture = callbackList.capture;\n\n\t\t\t\t\t\t\t\t\t\t// Clone callbackList since unbind inside a callback would otherwise break the handlers loop\n\t\t\t\t\t\t\t\t\t\tcallbackList = callbackList.slice(0, ci).concat(callbackList.slice(ci + 1));\n\t\t\t\t\t\t\t\t\t\tcallbackList.nativeHandler = nativeHandler;\n\t\t\t\t\t\t\t\t\t\tcallbackList.fakeName = fakeName;\n\t\t\t\t\t\t\t\t\t\tcallbackList.capture = capture;\n\n\t\t\t\t\t\t\t\t\t\teventMap[name] = callbackList;\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\n\t\t\t\t\t\t\t// Remove all callbacks if there isn't a specified callback or there is no callbacks left\n\t\t\t\t\t\t\tif (!callback || callbackList.length === 0) {\n\t\t\t\t\t\t\t\tdelete eventMap[name];\n\t\t\t\t\t\t\t\tremoveEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture);\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} else {\n\t\t\t\t\t// All events for a specific element\n\t\t\t\t\tfor (name in eventMap) {\n\t\t\t\t\t\tcallbackList = eventMap[name];\n\t\t\t\t\t\tremoveEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture);\n\t\t\t\t\t}\n\n\t\t\t\t\teventMap = {};\n\t\t\t\t}\n\n\t\t\t\t// Check if object is empty, if it isn't then we won't remove the expando map\n\t\t\t\tfor (name in eventMap) {\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\n\t\t\t\t// Delete event object\n\t\t\t\tdelete events[id];\n\n\t\t\t\t// Remove expando from target\n\t\t\t\ttry {\n\t\t\t\t\t// IE will fail here since it can't delete properties from window\n\t\t\t\t\tdelete target[expando];\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// IE will set it to null\n\t\t\t\t\ttarget[expando] = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn self;\n\t\t};\n\n\t\t/**\n\t\t * Fires the specified event on the specified target.\n\t\t *\n\t\t * @method fire\n\t\t * @param {Object} target Target node/window or custom object.\n\t\t * @param {String} name Event name to fire.\n\t\t * @param {Object} args Optional arguments to send to the observers.\n\t\t * @return {EventUtils} Event utils instance.\n\t\t */\n\t\tself.fire = function(target, name, args) {\n\t\t\tvar id;\n\n\t\t\t// Don't bind to text nodes or comments\n\t\t\tif (!target || target.nodeType === 3 || target.nodeType === 8) {\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\t// Build event object by patching the args\n\t\t\targs = fix(null, args);\n\t\t\targs.type = name;\n\t\t\targs.target = target;\n\n\t\t\tdo {\n\t\t\t\t// Found an expando that means there is listeners to execute\n\t\t\t\tid = target[expando];\n\t\t\t\tif (id) {\n\t\t\t\t\texecuteHandlers(args, id);\n\t\t\t\t}\n\n\t\t\t\t// Walk up the DOM\n\t\t\t\ttarget = target.parentNode || target.ownerDocument || target.defaultView || target.parentWindow;\n\t\t\t} while (target && !args.isPropagationStopped());\n\n\t\t\treturn self;\n\t\t};\n\n\t\t/**\n\t\t * Removes all bound event listeners for the specified target. This will also remove any bound\n\t\t * listeners to child nodes within that target.\n\t\t *\n\t\t * @method clean\n\t\t * @param {Object} target Target node/window object.\n\t\t * @return {EventUtils} Event utils instance.\n\t\t */\n\t\tself.clean = function(target) {\n\t\t\tvar i, children, unbind = self.unbind;\n\n\t\t\t// Don't bind to text nodes or comments\n\t\t\tif (!target || target.nodeType === 3 || target.nodeType === 8) {\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\t// Unbind any element on the specified target\n\t\t\tif (target[expando]) {\n\t\t\t\tunbind(target);\n\t\t\t}\n\n\t\t\t// Target doesn't have getElementsByTagName it's probably a window object then use it's document to find the children\n\t\t\tif (!target.getElementsByTagName) {\n\t\t\t\ttarget = target.document;\n\t\t\t}\n\n\t\t\t// Remove events from each child element\n\t\t\tif (target && target.getElementsByTagName) {\n\t\t\t\tunbind(target);\n\n\t\t\t\tchildren = target.getElementsByTagName('*');\n\t\t\t\ti = children.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\ttarget = children[i];\n\n\t\t\t\t\tif (target[expando]) {\n\t\t\t\t\t\tunbind(target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn self;\n\t\t};\n\n\t\t/**\n\t\t * Destroys the event object. Call this on IE to remove memory leaks.\n\t\t */\n\t\tself.destroy = function() {\n\t\t\tevents = {};\n\t\t};\n\n\t\t// Legacy function for canceling events\n\t\tself.cancel = function(e) {\n\t\t\tif (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopImmediatePropagation();\n\t\t\t}\n\n\t\t\treturn false;\n\t\t};\n\t}\n\n\tEventUtils.Event = new EventUtils();\n\tEventUtils.Event.bind(window, 'ready', function() {});\n\n\treturn EventUtils;\n});\n\n// Included from: js/tinymce/classes/dom/Sizzle.js\n\n/**\n * Sizzle.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n *\n * @ignore-file\n */\n\n/*jshint bitwise:false, expr:true, noempty:false, sub:true, eqnull:true, latedef:false, maxlen:255 */\n/*eslint-disable */\n\n/**\n * Sizzle CSS Selector Engine v@VERSION\n * http://sizzlejs.com/\n *\n * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: @DATE\n */\ndefine(\"tinymce/dom/Sizzle\", [], function() {\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\" + -(new Date()),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tstrundefined = typeof undefined,\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf if we can't use a native one\n\tindexOf = arr.indexOf || function( elem ) {\n\t\tvar i = 0,\n\t\t\tlen = this.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( this[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\trescape = /'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t};\n\n// 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 match, elem, m, nodeType,\n\t\t// QSA vars\n\t\ti, groups, old, nid, newContext, newSelector;\n\n\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\n\tcontext = context || document;\n\tresults = results || [];\n\n\tif ( !selector || typeof selector !== \"string\" ) {\n\t\treturn results;\n\t}\n\n\tif ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {\n\t\treturn [];\n\t}\n\n\tif ( documentIsHTML && !seed ) {\n\n\t\t// Shortcuts\n\t\tif ( (match = rquickExpr.exec( selector )) ) {\n\t\t\t// Speed-up: Sizzle(\"#ID\")\n\t\t\tif ( (m = match[1]) ) {\n\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\telem = context.getElementById( m );\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document (jQuery #6963)\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\t\t\t\t\t\t// Handle the case where IE, Opera, and Webkit return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id === m ) {\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} else {\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Context is not a document\n\t\t\t\t\tif ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&\n\t\t\t\t\t\tcontains( context, elem ) && elem.id === m ) {\n\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Speed-up: Sizzle(\"TAG\")\n\t\t\t} else if ( match[2] ) {\n\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\treturn results;\n\n\t\t\t// Speed-up: Sizzle(\".CLASS\")\n\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName ) {\n\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\treturn results;\n\t\t\t}\n\t\t}\n\n\t\t// QSA path\n\t\tif ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\t\t\tnid = old = expando;\n\t\t\tnewContext = context;\n\t\t\tnewSelector = nodeType === 9 && selector;\n\n\t\t\t// qSA works strangely on Element-rooted queries\n\t\t\t// We can work around this by specifying an extra ID on the root\n\t\t\t// and working up from there (Thanks to Andrew Dupont for the technique)\n\t\t\t// IE 8 doesn't work on object elements\n\t\t\tif ( nodeType === 1 && context.nodeName.toLowerCase() !== \"object\" ) {\n\t\t\t\tgroups = tokenize( selector );\n\n\t\t\t\tif ( (old = context.getAttribute(\"id\")) ) {\n\t\t\t\t\tnid = old.replace( rescape, \"\\\\$&\" );\n\t\t\t\t} else {\n\t\t\t\t\tcontext.setAttribute( \"id\", nid );\n\t\t\t\t}\n\t\t\t\tnid = \"[id='\" + nid + \"'] \";\n\n\t\t\t\ti = groups.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tgroups[i] = nid + toSelector( groups[i] );\n\t\t\t\t}\n\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;\n\t\t\t\tnewSelector = groups.join(\",\");\n\t\t\t}\n\n\t\t\tif ( newSelector ) {\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch(qsaError) {\n\t\t\t\t} finally {\n\t\t\t\t\tif ( !old ) {\n\t\t\t\t\t\tcontext.removeAttribute(\"id\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {Function(string, Object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = attrs.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== strundefined && 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,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc,\n\t\tparent = doc.defaultView;\n\n\tfunction getTop(win) {\n\t\t// Edge throws a lovely Object expected if you try to get top on a detached reference see #2642\n\t\ttry {\n\t\t\treturn win.top;\n\t\t} catch (ex) {\n\t\t\t// Ignore\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t// If no document and documentElement is available, return\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Set our document\n\tdocument = doc;\n\tdocElem = doc.documentElement;\n\n\t// Support tests\n\tdocumentIsHTML = !isXML( doc );\n\n\t// Support: IE>8\n\t// If iframe document is assigned to \"document\" variable and if iframe has been reloaded,\n\t// IE will throw \"permission denied\" error when accessing \"document\" variable, see jQuery #13936\n\t// IE6-8 do not support the defaultView property so parent will be undefined\n\tif ( parent && parent !== getTop(parent) ) {\n\t\t// IE11 does not have attachEvent, so all must suffer\n\t\tif ( parent.addEventListener ) {\n\t\t\tparent.addEventListener( \"unload\", function() {\n\t\t\t\tsetDocument();\n\t\t\t}, false );\n\t\t} else if ( parent.attachEvent ) {\n\t\t\tparent.attachEvent( \"onunload\", function() {\n\t\t\t\tsetDocument();\n\t\t\t});\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 (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = \"i\";\n\t\treturn !div.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( doc.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( doc.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !doc.getElementsByName || !doc.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 !== strundefined && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\treturn m && m.parentNode ? [ 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 !== strundefined && elem.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 !== strundefined ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\t\t\t}\n\t\t} :\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\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 ( documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdiv.innerHTML = \"\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( div.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = doc.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tdiv.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( div.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully does not implement inclusive descendent\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 === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === doc || 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.call( sortInput, a ) - indexOf.call( 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 === doc ? -1 :\n\t\t\t\tb === doc ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( 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 doc;\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( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch(e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== strundefined && 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 + \" \" ).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, outerCache, node, diff, 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\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 ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {\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\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || (parent[ expando ] = {});\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[0] === dirruns && cache[1];\n\t\t\t\t\t\t\tdiff = cache[0] === dirruns && 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\touterCache[ 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// Use previously-cached element index if available\n\t\t\t\t\t\t} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {\n\t\t\t\t\t\t\tdiff = cache[1];\n\n\t\t\t\t\t\t// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t} else {\n\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\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\tif ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {\n\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\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\tbreak;\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.call( 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\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, 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 dir 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\t\t\t\t\t\tif ( (oldCache = outerCache[ dir ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\touterCache[ dir ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf.call( 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.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\treturn ( !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} ];\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;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Keep `i` a string if there are no elements so `matchedCount` will be \"00\" below\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: ) 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\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context, 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// Apply set filters to unmatched elements\n\t\t\tmatchedCount += i;\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 no seed and only one group\n\tif ( match.length === 1 ) {\n\n\t\t// Take a shortcut and set the context if the root 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\trsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = \"\";\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = \"\";\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\n// EXPOSE\nreturn Sizzle;\n});\n\n/*eslint-enable */\n\n// Included from: js/tinymce/classes/util/Arr.js\n\n/**\n * Arr.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Array utility class.\n *\n * @private\n * @class tinymce.util.Arr\n */\ndefine(\"tinymce/util/Arr\", [], function() {\n\tvar isArray = Array.isArray || function(obj) {\n\t\treturn Object.prototype.toString.call(obj) === \"[object Array]\";\n\t};\n\n\tfunction toArray(obj) {\n\t\tvar array = obj, i, l;\n\n\t\tif (!isArray(obj)) {\n\t\t\tarray = [];\n\t\t\tfor (i = 0, l = obj.length; i < l; i++) {\n\t\t\t\tarray[i] = obj[i];\n\t\t\t}\n\t\t}\n\n\t\treturn array;\n\t}\n\n\tfunction each(o, cb, s) {\n\t\tvar n, l;\n\n\t\tif (!o) {\n\t\t\treturn 0;\n\t\t}\n\n\t\ts = s || o;\n\n\t\tif (o.length !== undefined) {\n\t\t\t// Indexed arrays, needed for Safari\n\t\t\tfor (n = 0, l = o.length; n < l; n++) {\n\t\t\t\tif (cb.call(s, o[n], n, o) === false) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Hashtables\n\t\t\tfor (n in o) {\n\t\t\t\tif (o.hasOwnProperty(n)) {\n\t\t\t\t\tif (cb.call(s, o[n], n, o) === false) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tfunction map(array, callback) {\n\t\tvar out = [];\n\n\t\teach(array, function(item, index) {\n\t\t\tout.push(callback(item, index, array));\n\t\t});\n\n\t\treturn out;\n\t}\n\n\tfunction filter(a, f) {\n\t\tvar o = [];\n\n\t\teach(a, function(v, index) {\n\t\t\tif (!f || f(v, index, a)) {\n\t\t\t\to.push(v);\n\t\t\t}\n\t\t});\n\n\t\treturn o;\n\t}\n\n\tfunction indexOf(a, v) {\n\t\tvar i, l;\n\n\t\tif (a) {\n\t\t\tfor (i = 0, l = a.length; i < l; i++) {\n\t\t\t\tif (a[i] === v) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\tfunction reduce(collection, iteratee, accumulator, thisArg) {\n\t\tvar i = 0;\n\n\t\tif (arguments.length < 3) {\n\t\t\taccumulator = collection[0];\n\t\t}\n\n\t\tfor (; i < collection.length; i++) {\n\t\t\taccumulator = iteratee.call(thisArg, accumulator, collection[i], i);\n\t\t}\n\n\t\treturn accumulator;\n\t}\n\n\tfunction findIndex(array, predicate, thisArg) {\n\t\tvar i, l;\n\n\t\tfor (i = 0, l = array.length; i < l; i++) {\n\t\t\tif (predicate.call(thisArg, array[i], i, array)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\tfunction find(array, predicate, thisArg) {\n\t\tvar idx = findIndex(array, predicate, thisArg);\n\n\t\tif (idx !== -1) {\n\t\t\treturn array[idx];\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tfunction last(collection) {\n\t\treturn collection[collection.length - 1];\n\t}\n\n\treturn {\n\t\tisArray: isArray,\n\t\ttoArray: toArray,\n\t\teach: each,\n\t\tmap: map,\n\t\tfilter: filter,\n\t\tindexOf: indexOf,\n\t\treduce: reduce,\n\t\tfindIndex: findIndex,\n\t\tfind: find,\n\t\tlast: last\n\t};\n});\n\n// Included from: js/tinymce/classes/util/Tools.js\n\n/**\n * Tools.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class contains various utlity functions. These are also exposed\n * directly on the tinymce namespace.\n *\n * @class tinymce.util.Tools\n */\ndefine(\"tinymce/util/Tools\", [\n\t\"tinymce/Env\",\n\t\"tinymce/util/Arr\"\n], function(Env, Arr) {\n\t/**\n\t * Removes whitespace from the beginning and end of a string.\n\t *\n\t * @method trim\n\t * @param {String} s String to remove whitespace from.\n\t * @return {String} New string with removed whitespace.\n\t */\n\tvar whiteSpaceRegExp = /^\\s*|\\s*$/g;\n\n\tfunction trim(str) {\n\t\treturn (str === null || str === undefined) ? '' : (\"\" + str).replace(whiteSpaceRegExp, '');\n\t}\n\n\t/**\n\t * Checks if a object is of a specific type for example an array.\n\t *\n\t * @method is\n\t * @param {Object} obj Object to check type of.\n\t * @param {string} type Optional type to check for.\n\t * @return {Boolean} true/false if the object is of the specified type.\n\t */\n\tfunction is(obj, type) {\n\t\tif (!type) {\n\t\t\treturn obj !== undefined;\n\t\t}\n\n\t\tif (type == 'array' && Arr.isArray(obj)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn typeof obj == type;\n\t}\n\n\t/**\n\t * Makes a name/object map out of an array with names.\n\t *\n\t * @method makeMap\n\t * @param {Array/String} items Items to make map out of.\n\t * @param {String} delim Optional delimiter to split string by.\n\t * @param {Object} map Optional map to add items to.\n\t * @return {Object} Name/value map of items.\n\t */\n\tfunction makeMap(items, delim, map) {\n\t\tvar i;\n\n\t\titems = items || [];\n\t\tdelim = delim || ',';\n\n\t\tif (typeof items == \"string\") {\n\t\t\titems = items.split(delim);\n\t\t}\n\n\t\tmap = map || {};\n\n\t\ti = items.length;\n\t\twhile (i--) {\n\t\t\tmap[items[i]] = {};\n\t\t}\n\n\t\treturn map;\n\t}\n\n\t/**\n\t * JavaScript does not protect hasOwnProperty method, so it is possible to overwrite it. This is\n\t * object independent version.\n\t *\n\t * @param {Object} obj\n\t * @param {String} prop\n\t * @returns {Boolean}\n\t */\n\tfunction hasOwnProperty(obj, prop) {\n\t\treturn Object.prototype.hasOwnProperty.call(obj, prop);\n\t}\n\n\t/**\n\t * Creates a class, subclass or static singleton.\n\t * More details on this method can be found in the Wiki.\n\t *\n\t * @method create\n\t * @param {String} s Class name, inheritance and prefix.\n\t * @param {Object} p Collection of methods to add to the class.\n\t * @param {Object} root Optional root object defaults to the global window object.\n\t * @example\n\t * // Creates a basic class\n\t * tinymce.create('tinymce.somepackage.SomeClass', {\n\t * SomeClass: function() {\n\t * // Class constructor\n\t * },\n\t *\n\t * method: function() {\n\t * // Some method\n\t * }\n\t * });\n\t *\n\t * // Creates a basic subclass class\n\t * tinymce.create('tinymce.somepackage.SomeSubClass:tinymce.somepackage.SomeClass', {\n\t * SomeSubClass: function() {\n\t * // Class constructor\n\t * this.parent(); // Call parent constructor\n\t * },\n\t *\n\t * method: function() {\n\t * // Some method\n\t * this.parent(); // Call parent method\n\t * },\n\t *\n\t * 'static': {\n\t * staticMethod: function() {\n\t * // Static method\n\t * }\n\t * }\n\t * });\n\t *\n\t * // Creates a singleton/static class\n\t * tinymce.create('static tinymce.somepackage.SomeSingletonClass', {\n\t * method: function() {\n\t * // Some method\n\t * }\n\t * });\n\t */\n\tfunction create(s, p, root) {\n\t\tvar self = this, sp, ns, cn, scn, c, de = 0;\n\n\t\t// Parse : :\n\t\ts = /^((static) )?([\\w.]+)(:([\\w.]+))?/.exec(s);\n\t\tcn = s[3].match(/(^|\\.)(\\w+)$/i)[2]; // Class name\n\n\t\t// Create namespace for new class\n\t\tns = self.createNS(s[3].replace(/\\.\\w+$/, ''), root);\n\n\t\t// Class already exists\n\t\tif (ns[cn]) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make pure static class\n\t\tif (s[2] == 'static') {\n\t\t\tns[cn] = p;\n\n\t\t\tif (this.onCreate) {\n\t\t\t\tthis.onCreate(s[2], s[3], ns[cn]);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Create default constructor\n\t\tif (!p[cn]) {\n\t\t\tp[cn] = function() {};\n\t\t\tde = 1;\n\t\t}\n\n\t\t// Add constructor and methods\n\t\tns[cn] = p[cn];\n\t\tself.extend(ns[cn].prototype, p);\n\n\t\t// Extend\n\t\tif (s[5]) {\n\t\t\tsp = self.resolve(s[5]).prototype;\n\t\t\tscn = s[5].match(/\\.(\\w+)$/i)[1]; // Class name\n\n\t\t\t// Extend constructor\n\t\t\tc = ns[cn];\n\t\t\tif (de) {\n\t\t\t\t// Add passthrough constructor\n\t\t\t\tns[cn] = function() {\n\t\t\t\t\treturn sp[scn].apply(this, arguments);\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Add inherit constructor\n\t\t\t\tns[cn] = function() {\n\t\t\t\t\tthis.parent = sp[scn];\n\t\t\t\t\treturn c.apply(this, arguments);\n\t\t\t\t};\n\t\t\t}\n\t\t\tns[cn].prototype[cn] = ns[cn];\n\n\t\t\t// Add super methods\n\t\t\tself.each(sp, function(f, n) {\n\t\t\t\tns[cn].prototype[n] = sp[n];\n\t\t\t});\n\n\t\t\t// Add overridden methods\n\t\t\tself.each(p, function(f, n) {\n\t\t\t\t// Extend methods if needed\n\t\t\t\tif (sp[n]) {\n\t\t\t\t\tns[cn].prototype[n] = function() {\n\t\t\t\t\t\tthis.parent = sp[n];\n\t\t\t\t\t\treturn f.apply(this, arguments);\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tif (n != cn) {\n\t\t\t\t\t\tns[cn].prototype[n] = f;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Add static methods\n\t\t/*jshint sub:true*/\n\t\t/*eslint dot-notation:0*/\n\t\tself.each(p['static'], function(f, n) {\n\t\t\tns[cn][n] = f;\n\t\t});\n\t}\n\n\tfunction extend(obj, ext) {\n\t\tvar i, l, name, args = arguments, value;\n\n\t\tfor (i = 1, l = args.length; i < l; i++) {\n\t\t\text = args[i];\n\t\t\tfor (name in ext) {\n\t\t\t\tif (ext.hasOwnProperty(name)) {\n\t\t\t\t\tvalue = ext[name];\n\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\tobj[name] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t}\n\n\t/**\n\t * Executed the specified function for each item in a object tree.\n\t *\n\t * @method walk\n\t * @param {Object} o Object tree to walk though.\n\t * @param {function} f Function to call for each item.\n\t * @param {String} n Optional name of collection inside the objects to walk for example childNodes.\n\t * @param {String} s Optional scope to execute the function in.\n\t */\n\tfunction walk(o, f, n, s) {\n\t\ts = s || this;\n\n\t\tif (o) {\n\t\t\tif (n) {\n\t\t\t\to = o[n];\n\t\t\t}\n\n\t\t\tArr.each(o, function(o, i) {\n\t\t\t\tif (f.call(s, o, i, n) === false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\twalk(o, f, n, s);\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Creates a namespace on a specific object.\n\t *\n\t * @method createNS\n\t * @param {String} n Namespace to create for example a.b.c.d.\n\t * @param {Object} o Optional object to add namespace to, defaults to window.\n\t * @return {Object} New namespace object the last item in path.\n\t * @example\n\t * // Create some namespace\n\t * tinymce.createNS('tinymce.somepackage.subpackage');\n\t *\n\t * // Add a singleton\n\t * var tinymce.somepackage.subpackage.SomeSingleton = {\n\t * method: function() {\n\t * // Some method\n\t * }\n\t * };\n\t */\n\tfunction createNS(n, o) {\n\t\tvar i, v;\n\n\t\to = o || window;\n\n\t\tn = n.split('.');\n\t\tfor (i = 0; i < n.length; i++) {\n\t\t\tv = n[i];\n\n\t\t\tif (!o[v]) {\n\t\t\t\to[v] = {};\n\t\t\t}\n\n\t\t\to = o[v];\n\t\t}\n\n\t\treturn o;\n\t}\n\n\t/**\n\t * Resolves a string and returns the object from a specific structure.\n\t *\n\t * @method resolve\n\t * @param {String} n Path to resolve for example a.b.c.d.\n\t * @param {Object} o Optional object to search though, defaults to window.\n\t * @return {Object} Last object in path or null if it couldn't be resolved.\n\t * @example\n\t * // Resolve a path into an object reference\n\t * var obj = tinymce.resolve('a.b.c.d');\n\t */\n\tfunction resolve(n, o) {\n\t\tvar i, l;\n\n\t\to = o || window;\n\n\t\tn = n.split('.');\n\t\tfor (i = 0, l = n.length; i < l; i++) {\n\t\t\to = o[n[i]];\n\n\t\t\tif (!o) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn o;\n\t}\n\n\t/**\n\t * Splits a string but removes the whitespace before and after each value.\n\t *\n\t * @method explode\n\t * @param {string} s String to split.\n\t * @param {string} d Delimiter to split by.\n\t * @example\n\t * // Split a string into an array with a,b,c\n\t * var arr = tinymce.explode('a, b, c');\n\t */\n\tfunction explode(s, d) {\n\t\tif (!s || is(s, 'array')) {\n\t\t\treturn s;\n\t\t}\n\n\t\treturn Arr.map(s.split(d || ','), trim);\n\t}\n\n\tfunction _addCacheSuffix(url) {\n\t\tvar cacheSuffix = Env.cacheSuffix;\n\n\t\tif (cacheSuffix) {\n\t\t\turl += (url.indexOf('?') === -1 ? '?' : '&') + cacheSuffix;\n\t\t}\n\n\t\treturn url;\n\t}\n\n\treturn {\n\t\ttrim: trim,\n\n\t\t/**\n\t\t * Returns true/false if the object is an array or not.\n\t\t *\n\t\t * @method isArray\n\t\t * @param {Object} obj Object to check.\n\t\t * @return {boolean} true/false state if the object is an array or not.\n\t\t */\n\t\tisArray: Arr.isArray,\n\n\t\tis: is,\n\n\t\t/**\n\t\t * Converts the specified object into a real JavaScript array.\n\t\t *\n\t\t * @method toArray\n\t\t * @param {Object} obj Object to convert into array.\n\t\t * @return {Array} Array object based in input.\n\t\t */\n\t\ttoArray: Arr.toArray,\n\t\tmakeMap: makeMap,\n\n\t\t/**\n\t\t * Performs an iteration of all items in a collection such as an object or array. This method will execure the\n\t\t * callback function for each item in the collection, if the callback returns false the iteration will terminate.\n\t\t * The callback has the following format: cb(value, key_or_index).\n\t\t *\n\t\t * @method each\n\t\t * @param {Object} o Collection to iterate.\n\t\t * @param {function} cb Callback function to execute for each item.\n\t\t * @param {Object} s Optional scope to execute the callback in.\n\t\t * @example\n\t\t * // Iterate an array\n\t\t * tinymce.each([1,2,3], function(v, i) {\n\t\t * console.debug(\"Value: \" + v + \", Index: \" + i);\n\t\t * });\n\t\t *\n\t\t * // Iterate an object\n\t\t * tinymce.each({a: 1, b: 2, c: 3], function(v, k) {\n\t\t * console.debug(\"Value: \" + v + \", Key: \" + k);\n\t\t * });\n\t\t */\n\t\teach: Arr.each,\n\n\t\t/**\n\t\t * Creates a new array by the return value of each iteration function call. This enables you to convert\n\t\t * one array list into another.\n\t\t *\n\t\t * @method map\n\t\t * @param {Array} array Array of items to iterate.\n\t\t * @param {function} callback Function to call for each item. It's return value will be the new value.\n\t\t * @return {Array} Array with new values based on function return values.\n\t\t */\n\t\tmap: Arr.map,\n\n\t\t/**\n\t\t * Filters out items from the input array by calling the specified function for each item.\n\t\t * If the function returns false the item will be excluded if it returns true it will be included.\n\t\t *\n\t\t * @method grep\n\t\t * @param {Array} a Array of items to loop though.\n\t\t * @param {function} f Function to call for each item. Include/exclude depends on it's return value.\n\t\t * @return {Array} New array with values imported and filtered based in input.\n\t\t * @example\n\t\t * // Filter out some items, this will return an array with 4 and 5\n\t\t * var items = tinymce.grep([1,2,3,4,5], function(v) {return v > 3;});\n\t\t */\n\t\tgrep: Arr.filter,\n\n\t\t/**\n\t\t * Returns an index of the item or -1 if item is not present in the array.\n\t\t *\n\t\t * @method inArray\n\t\t * @param {any} item Item to search for.\n\t\t * @param {Array} arr Array to search in.\n\t\t * @return {Number} index of the item or -1 if item was not found.\n\t\t */\n\t\tinArray: Arr.indexOf,\n\n\t\thasOwn: hasOwnProperty,\n\n\t\textend: extend,\n\t\tcreate: create,\n\t\twalk: walk,\n\t\tcreateNS: createNS,\n\t\tresolve: resolve,\n\t\texplode: explode,\n\t\t_addCacheSuffix: _addCacheSuffix\n\t};\n});\n\n// Included from: js/tinymce/classes/dom/DomQuery.js\n\n/**\n * DomQuery.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class mimics most of the jQuery API:\n *\n * This is whats currently implemented:\n * - Utility functions\n * - DOM traversial\n * - DOM manipulation\n * - Event binding\n *\n * This is not currently implemented:\n * - Dimension\n * - Ajax\n * - Animation\n * - Advanced chaining\n *\n * @example\n * var $ = tinymce.dom.DomQuery;\n * $('p').attr('attr', 'value').addClass('class');\n *\n * @class tinymce.dom.DomQuery\n */\ndefine(\"tinymce/dom/DomQuery\", [\n\t\"tinymce/dom/EventUtils\",\n\t\"tinymce/dom/Sizzle\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/Env\"\n], function(EventUtils, Sizzle, Tools, Env) {\n\tvar doc = document, push = Array.prototype.push, slice = Array.prototype.slice;\n\tvar rquickExpr = /^(?:[^#<]*(<[\\w\\W]+>)[^>]*$|#([\\w\\-]*)$)/;\n\tvar Event = EventUtils.Event, undef;\n\tvar skipUniques = Tools.makeMap('children,contents,next,prev');\n\n\tfunction isDefined(obj) {\n\t\treturn typeof obj !== 'undefined';\n\t}\n\n\tfunction isString(obj) {\n\t\treturn typeof obj === 'string';\n\t}\n\n\tfunction isWindow(obj) {\n\t\treturn obj && obj == obj.window;\n\t}\n\n\tfunction createFragment(html, fragDoc) {\n\t\tvar frag, node, container;\n\n\t\tfragDoc = fragDoc || doc;\n\t\tcontainer = fragDoc.createElement('div');\n\t\tfrag = fragDoc.createDocumentFragment();\n\t\tcontainer.innerHTML = html;\n\n\t\twhile ((node = container.firstChild)) {\n\t\t\tfrag.appendChild(node);\n\t\t}\n\n\t\treturn frag;\n\t}\n\n\tfunction domManipulate(targetNodes, sourceItem, callback, reverse) {\n\t\tvar i;\n\n\t\tif (isString(sourceItem)) {\n\t\t\tsourceItem = createFragment(sourceItem, getElementDocument(targetNodes[0]));\n\t\t} else if (sourceItem.length && !sourceItem.nodeType) {\n\t\t\tsourceItem = DomQuery.makeArray(sourceItem);\n\n\t\t\tif (reverse) {\n\t\t\t\tfor (i = sourceItem.length - 1; i >= 0; i--) {\n\t\t\t\t\tdomManipulate(targetNodes, sourceItem[i], callback, reverse);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (i = 0; i < sourceItem.length; i++) {\n\t\t\t\t\tdomManipulate(targetNodes, sourceItem[i], callback, reverse);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn targetNodes;\n\t\t}\n\n\t\tif (sourceItem.nodeType) {\n\t\t\ti = targetNodes.length;\n\t\t\twhile (i--) {\n\t\t\t\tcallback.call(targetNodes[i], sourceItem);\n\t\t\t}\n\t\t}\n\n\t\treturn targetNodes;\n\t}\n\n\tfunction hasClass(node, className) {\n\t\treturn node && className && (' ' + node.className + ' ').indexOf(' ' + className + ' ') !== -1;\n\t}\n\n\tfunction wrap(elements, wrapper, all) {\n\t\tvar lastParent, newWrapper;\n\n\t\twrapper = DomQuery(wrapper)[0];\n\n\t\telements.each(function() {\n\t\t\tvar self = this;\n\n\t\t\tif (!all || lastParent != self.parentNode) {\n\t\t\t\tlastParent = self.parentNode;\n\t\t\t\tnewWrapper = wrapper.cloneNode(false);\n\t\t\t\tself.parentNode.insertBefore(newWrapper, self);\n\t\t\t\tnewWrapper.appendChild(self);\n\t\t\t} else {\n\t\t\t\tnewWrapper.appendChild(self);\n\t\t\t}\n\t\t});\n\n\t\treturn elements;\n\t}\n\n\tvar numericCssMap = Tools.makeMap('fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom', ' ');\n\tvar booleanMap = Tools.makeMap('checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected', ' ');\n\tvar propFix = {\n\t\t'for': 'htmlFor',\n\t\t'class': 'className',\n\t\t'readonly': 'readOnly'\n\t};\n\tvar cssFix = {\n\t\t'float': 'cssFloat'\n\t};\n\n\tvar attrHooks = {}, cssHooks = {};\n\n\tfunction DomQuery(selector, context) {\n\t\t/*eslint new-cap:0 */\n\t\treturn new DomQuery.fn.init(selector, context);\n\t}\n\n\tfunction inArray(item, array) {\n\t\tvar i;\n\n\t\tif (array.indexOf) {\n\t\t\treturn array.indexOf(item);\n\t\t}\n\n\t\ti = array.length;\n\t\twhile (i--) {\n\t\t\tif (array[i] === item) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\tvar whiteSpaceRegExp = /^\\s*|\\s*$/g;\n\n\tfunction trim(str) {\n\t\treturn (str === null || str === undef) ? '' : (\"\" + str).replace(whiteSpaceRegExp, '');\n\t}\n\n\tfunction each(obj, callback) {\n\t\tvar length, key, i, undef, value;\n\n\t\tif (obj) {\n\t\t\tlength = obj.length;\n\n\t\t\tif (length === undef) {\n\t\t\t\t// Loop object items\n\t\t\t\tfor (key in obj) {\n\t\t\t\t\tif (obj.hasOwnProperty(key)) {\n\t\t\t\t\t\tvalue = obj[key];\n\t\t\t\t\t\tif (callback.call(value, key, value) === false) {\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}\n\t\t\t} else {\n\t\t\t\t// Loop array items\n\t\t\t\tfor (i = 0; i < length; i++) {\n\t\t\t\t\tvalue = obj[i];\n\t\t\t\t\tif (callback.call(value, i, value) === false) {\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 obj;\n\t}\n\n\tfunction grep(array, callback) {\n\t\tvar out = [];\n\n\t\teach(array, function(i, item) {\n\t\t\tif (callback(item, i)) {\n\t\t\t\tout.push(item);\n\t\t\t}\n\t\t});\n\n\t\treturn out;\n\t}\n\n\tfunction getElementDocument(element) {\n\t\tif (!element) {\n\t\t\treturn doc;\n\t\t}\n\n\t\tif (element.nodeType == 9) {\n\t\t\treturn element;\n\t\t}\n\n\t\treturn element.ownerDocument;\n\t}\n\n\tDomQuery.fn = DomQuery.prototype = {\n\t\tconstructor: DomQuery,\n\n\t\t/**\n\t\t * Selector for the current set.\n\t\t *\n\t\t * @property selector\n\t\t * @type String\n\t\t */\n\t\tselector: \"\",\n\n\t\t/**\n\t\t * Context used to create the set.\n\t\t *\n\t\t * @property context\n\t\t * @type Element\n\t\t */\n\t\tcontext: null,\n\n\t\t/**\n\t\t * Number of items in the current set.\n\t\t *\n\t\t * @property length\n\t\t * @type Number\n\t\t */\n\t\tlength: 0,\n\n\t\t/**\n\t\t * Constructs a new DomQuery instance with the specified selector or context.\n\t\t *\n\t\t * @constructor\n\t\t * @method init\n\t\t * @param {String/Array/DomQuery} selector Optional CSS selector/Array or array like object or HTML string.\n\t\t * @param {Document/Element} context Optional context to search in.\n\t\t */\n\t\tinit: function(selector, context) {\n\t\t\tvar self = this, match, node;\n\n\t\t\tif (!selector) {\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\tif (selector.nodeType) {\n\t\t\t\tself.context = self[0] = selector;\n\t\t\t\tself.length = 1;\n\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\tif (context && context.nodeType) {\n\t\t\t\tself.context = context;\n\t\t\t} else {\n\t\t\t\tif (context) {\n\t\t\t\t\treturn DomQuery(selector).attr(context);\n\t\t\t\t}\n\n\t\t\t\tself.context = context = document;\n\t\t\t}\n\n\t\t\tif (isString(selector)) {\n\t\t\t\tself.selector = selector;\n\n\t\t\t\tif (selector.charAt(0) === \"<\" && selector.charAt(selector.length - 1) === \">\" && selector.length >= 3) {\n\t\t\t\t\tmatch = [null, selector, null];\n\t\t\t\t} else {\n\t\t\t\t\tmatch = rquickExpr.exec(selector);\n\t\t\t\t}\n\n\t\t\t\tif (match) {\n\t\t\t\t\tif (match[1]) {\n\t\t\t\t\t\tnode = createFragment(selector, getElementDocument(context)).firstChild;\n\n\t\t\t\t\t\twhile (node) {\n\t\t\t\t\t\t\tpush.call(self, node);\n\t\t\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode = getElementDocument(context).getElementById(match[2]);\n\n\t\t\t\t\t\tif (!node) {\n\t\t\t\t\t\t\treturn self;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node.id !== match[2]) {\n\t\t\t\t\t\t\treturn self.find(selector);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tself.length = 1;\n\t\t\t\t\t\tself[0] = node;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn DomQuery(context).find(selector);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.add(selector, false);\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Converts the current set to an array.\n\t\t *\n\t\t * @method toArray\n\t\t * @return {Array} Array of all nodes in set.\n\t\t */\n\t\ttoArray: function() {\n\t\t\treturn Tools.toArray(this);\n\t\t},\n\n\t\t/**\n\t\t * Adds new nodes to the set.\n\t\t *\n\t\t * @method add\n\t\t * @param {Array/tinymce.dom.DomQuery} items Array of all nodes to add to set.\n\t\t * @param {Boolean} sort Optional sort flag that enables sorting of elements.\n\t\t * @return {tinymce.dom.DomQuery} New instance with nodes added.\n\t\t */\n\t\tadd: function(items, sort) {\n\t\t\tvar self = this, nodes, i;\n\n\t\t\tif (isString(items)) {\n\t\t\t\treturn self.add(DomQuery(items));\n\t\t\t}\n\n\t\t\tif (sort !== false) {\n\t\t\t\tnodes = DomQuery.unique(self.toArray().concat(DomQuery.makeArray(items)));\n\t\t\t\tself.length = nodes.length;\n\t\t\t\tfor (i = 0; i < nodes.length; i++) {\n\t\t\t\t\tself[i] = nodes[i];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpush.apply(self, DomQuery.makeArray(items));\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Sets/gets attributes on the elements in the current set.\n\t\t *\n\t\t * @method attr\n\t\t * @param {String/Object} name Name of attribute to get or an object with attributes to set.\n\t\t * @param {String} value Optional value to set.\n\t\t * @return {tinymce.dom.DomQuery/String} Current set or the specified attribute when only the name is specified.\n\t\t */\n\t\tattr: function(name, value) {\n\t\t\tvar self = this, hook;\n\n\t\t\tif (typeof name === \"object\") {\n\t\t\t\teach(name, function(name, value) {\n\t\t\t\t\tself.attr(name, value);\n\t\t\t\t});\n\t\t\t} else if (isDefined(value)) {\n\t\t\t\tthis.each(function() {\n\t\t\t\t\tvar hook;\n\n\t\t\t\t\tif (this.nodeType === 1) {\n\t\t\t\t\t\thook = attrHooks[name];\n\t\t\t\t\t\tif (hook && hook.set) {\n\t\t\t\t\t\t\thook.set(this, value);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (value === null) {\n\t\t\t\t\t\t\tthis.removeAttribute(name, 2);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.setAttribute(name, value, 2);\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\tif (self[0] && self[0].nodeType === 1) {\n\t\t\t\t\thook = attrHooks[name];\n\t\t\t\t\tif (hook && hook.get) {\n\t\t\t\t\t\treturn hook.get(self[0], name);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (booleanMap[name]) {\n\t\t\t\t\t\treturn self.prop(name) ? name : undef;\n\t\t\t\t\t}\n\n\t\t\t\t\tvalue = self[0].getAttribute(name, 2);\n\n\t\t\t\t\tif (value === null) {\n\t\t\t\t\t\tvalue = undef;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Removes attributse on the elements in the current set.\n\t\t *\n\t\t * @method removeAttr\n\t\t * @param {String/Object} name Name of attribute to remove.\n\t\t * @return {tinymce.dom.DomQuery/String} Current set.\n\t\t */\n\t\tremoveAttr: function(name) {\n\t\t\treturn this.attr(name, null);\n\t\t},\n\n\t\t/**\n\t\t * Sets/gets properties on the elements in the current set.\n\t\t *\n\t\t * @method attr\n\t\t * @param {String/Object} name Name of property to get or an object with properties to set.\n\t\t * @param {String} value Optional value to set.\n\t\t * @return {tinymce.dom.DomQuery/String} Current set or the specified property when only the name is specified.\n\t\t */\n\t\tprop: function(name, value) {\n\t\t\tvar self = this;\n\n\t\t\tname = propFix[name] || name;\n\n\t\t\tif (typeof name === \"object\") {\n\t\t\t\teach(name, function(name, value) {\n\t\t\t\t\tself.prop(name, value);\n\t\t\t\t});\n\t\t\t} else if (isDefined(value)) {\n\t\t\t\tthis.each(function() {\n\t\t\t\t\tif (this.nodeType == 1) {\n\t\t\t\t\t\tthis[name] = value;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (self[0] && self[0].nodeType && name in self[0]) {\n\t\t\t\t\treturn self[0][name];\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Sets/gets styles on the elements in the current set.\n\t\t *\n\t\t * @method css\n\t\t * @param {String/Object} name Name of style to get or an object with styles to set.\n\t\t * @param {String} value Optional value to set.\n\t\t * @return {tinymce.dom.DomQuery/String} Current set or the specified style when only the name is specified.\n\t\t */\n\t\tcss: function(name, value) {\n\t\t\tvar self = this, elm, hook;\n\n\t\t\tfunction camel(name) {\n\t\t\t\treturn name.replace(/-(\\D)/g, function(a, b) {\n\t\t\t\t\treturn b.toUpperCase();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfunction dashed(name) {\n\t\t\t\treturn name.replace(/[A-Z]/g, function(a) {\n\t\t\t\t\treturn '-' + a;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (typeof name === \"object\") {\n\t\t\t\teach(name, function(name, value) {\n\t\t\t\t\tself.css(name, value);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (isDefined(value)) {\n\t\t\t\t\tname = camel(name);\n\n\t\t\t\t\t// Default px suffix on these\n\t\t\t\t\tif (typeof value === 'number' && !numericCssMap[name]) {\n\t\t\t\t\t\tvalue += 'px';\n\t\t\t\t\t}\n\n\t\t\t\t\tself.each(function() {\n\t\t\t\t\t\tvar style = this.style;\n\n\t\t\t\t\t\thook = cssHooks[name];\n\t\t\t\t\t\tif (hook && hook.set) {\n\t\t\t\t\t\t\thook.set(this, value);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tthis.style[cssFix[name] || name] = value;\n\t\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t\t// Ignore\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (value === null || value === '') {\n\t\t\t\t\t\t\tif (style.removeProperty) {\n\t\t\t\t\t\t\t\tstyle.removeProperty(dashed(name));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tstyle.removeAttribute(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} else {\n\t\t\t\t\telm = self[0];\n\n\t\t\t\t\thook = cssHooks[name];\n\t\t\t\t\tif (hook && hook.get) {\n\t\t\t\t\t\treturn hook.get(elm);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (elm.ownerDocument.defaultView) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn elm.ownerDocument.defaultView.getComputedStyle(elm, null).getPropertyValue(dashed(name));\n\t\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t\treturn undef;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (elm.currentStyle) {\n\t\t\t\t\t\treturn elm.currentStyle[camel(name)];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Removes all nodes in set from the document.\n\t\t *\n\t\t * @method remove\n\t\t * @return {tinymce.dom.DomQuery} Current set with the removed nodes.\n\t\t */\n\t\tremove: function() {\n\t\t\tvar self = this, node, i = this.length;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = self[i];\n\t\t\t\tEvent.clean(node);\n\n\t\t\t\tif (node.parentNode) {\n\t\t\t\t\tnode.parentNode.removeChild(node);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Empties all elements in set.\n\t\t *\n\t\t * @method empty\n\t\t * @return {tinymce.dom.DomQuery} Current set with the empty nodes.\n\t\t */\n\t\tempty: function() {\n\t\t\tvar self = this, node, i = this.length;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = self[i];\n\t\t\t\twhile (node.firstChild) {\n\t\t\t\t\tnode.removeChild(node.firstChild);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Sets or gets the HTML of the current set or first set node.\n\t\t *\n\t\t * @method html\n\t\t * @param {String} value Optional innerHTML value to set on each element.\n\t\t * @return {tinymce.dom.DomQuery/String} Current set or the innerHTML of the first element.\n\t\t */\n\t\thtml: function(value) {\n\t\t\tvar self = this, i;\n\n\t\t\tif (isDefined(value)) {\n\t\t\t\ti = self.length;\n\n\t\t\t\ttry {\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tself[i].innerHTML = value;\n\t\t\t\t\t}\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Workaround for \"Unknown runtime error\" when DIV is added to P on IE\n\t\t\t\t\tDomQuery(self[i]).empty().append(value);\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\treturn self[0] ? self[0].innerHTML : '';\n\t\t},\n\n\t\t/**\n\t\t * Sets or gets the text of the current set or first set node.\n\t\t *\n\t\t * @method text\n\t\t * @param {String} value Optional innerText value to set on each element.\n\t\t * @return {tinymce.dom.DomQuery/String} Current set or the innerText of the first element.\n\t\t */\n\t\ttext: function(value) {\n\t\t\tvar self = this, i;\n\n\t\t\tif (isDefined(value)) {\n\t\t\t\ti = self.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\tif (\"innerText\" in self[i]) {\n\t\t\t\t\t\tself[i].innerText = value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself[0].textContent = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\treturn self[0] ? (self[0].innerText || self[0].textContent) : '';\n\t\t},\n\n\t\t/**\n\t\t * Appends the specified node/html or node set to the current set nodes.\n\t\t *\n\t\t * @method append\n\t\t * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to append to each element in set.\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\tappend: function() {\n\t\t\treturn domManipulate(this, arguments, function(node) {\n\t\t\t\t// Either element or Shadow Root\n\t\t\t\tif (this.nodeType === 1 || (this.host && this.host.nodeType === 1)) {\n\t\t\t\t\tthis.appendChild(node);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Prepends the specified node/html or node set to the current set nodes.\n\t\t *\n\t\t * @method prepend\n\t\t * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to prepend to each element in set.\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\tprepend: function() {\n\t\t\treturn domManipulate(this, arguments, function(node) {\n\t\t\t\t// Either element or Shadow Root\n\t\t\t\tif (this.nodeType === 1 || (this.host && this.host.nodeType === 1)) {\n\t\t\t\t\tthis.insertBefore(node, this.firstChild);\n\t\t\t\t}\n\t\t\t}, true);\n\t\t},\n\n\t\t/**\n\t\t * Adds the specified elements before current set nodes.\n\t\t *\n\t\t * @method before\n\t\t * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to add before to each element in set.\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\tbefore: function() {\n\t\t\tvar self = this;\n\n\t\t\tif (self[0] && self[0].parentNode) {\n\t\t\t\treturn domManipulate(self, arguments, function(node) {\n\t\t\t\t\tthis.parentNode.insertBefore(node, this);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Adds the specified elements after current set nodes.\n\t\t *\n\t\t * @method after\n\t\t * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to add after to each element in set.\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\tafter: function() {\n\t\t\tvar self = this;\n\n\t\t\tif (self[0] && self[0].parentNode) {\n\t\t\t\treturn domManipulate(self, arguments, function(node) {\n\t\t\t\t\tthis.parentNode.insertBefore(node, this.nextSibling);\n\t\t\t\t}, true);\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Appends the specified set nodes to the specified selector/instance.\n\t\t *\n\t\t * @method appendTo\n\t\t * @param {String/Element/Array/tinymce.dom.DomQuery} val Item to append the current set to.\n\t\t * @return {tinymce.dom.DomQuery} Current set with the appended nodes.\n\t\t */\n\t\tappendTo: function(val) {\n\t\t\tDomQuery(val).append(this);\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Prepends the specified set nodes to the specified selector/instance.\n\t\t *\n\t\t * @method prependTo\n\t\t * @param {String/Element/Array/tinymce.dom.DomQuery} val Item to prepend the current set to.\n\t\t * @return {tinymce.dom.DomQuery} Current set with the prepended nodes.\n\t\t */\n\t\tprependTo: function(val) {\n\t\t\tDomQuery(val).prepend(this);\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Replaces the nodes in set with the specified content.\n\t\t *\n\t\t * @method replaceWith\n\t\t * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to replace nodes with.\n\t\t * @return {tinymce.dom.DomQuery} Set with replaced nodes.\n\t\t */\n\t\treplaceWith: function(content) {\n\t\t\treturn this.before(content).remove();\n\t\t},\n\n\t\t/**\n\t\t * Wraps all elements in set with the specified wrapper.\n\t\t *\n\t\t * @method wrap\n\t\t * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to wrap nodes with.\n\t\t * @return {tinymce.dom.DomQuery} Set with wrapped nodes.\n\t\t */\n\t\twrap: function(content) {\n\t\t\treturn wrap(this, content);\n\t\t},\n\n\t\t/**\n\t\t * Wraps all nodes in set with the specified wrapper. If the nodes are siblings all of them\n\t\t * will be wrapped in the same wrapper.\n\t\t *\n\t\t * @method wrapAll\n\t\t * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to wrap nodes with.\n\t\t * @return {tinymce.dom.DomQuery} Set with wrapped nodes.\n\t\t */\n\t\twrapAll: function(content) {\n\t\t\treturn wrap(this, content, true);\n\t\t},\n\n\t\t/**\n\t\t * Wraps all elements inner contents in set with the specified wrapper.\n\t\t *\n\t\t * @method wrapInner\n\t\t * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to wrap nodes with.\n\t\t * @return {tinymce.dom.DomQuery} Set with wrapped nodes.\n\t\t */\n\t\twrapInner: function(content) {\n\t\t\tthis.each(function() {\n\t\t\t\tDomQuery(this).contents().wrapAll(content);\n\t\t\t});\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Unwraps all elements by removing the parent element of each item in set.\n\t\t *\n\t\t * @method unwrap\n\t\t * @return {tinymce.dom.DomQuery} Set with unwrapped nodes.\n\t\t */\n\t\tunwrap: function() {\n\t\t\treturn this.parent().each(function() {\n\t\t\t\tDomQuery(this).replaceWith(this.childNodes);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Clones all nodes in set.\n\t\t *\n\t\t * @method clone\n\t\t * @return {tinymce.dom.DomQuery} Set with cloned nodes.\n\t\t */\n\t\tclone: function() {\n\t\t\tvar result = [];\n\n\t\t\tthis.each(function() {\n\t\t\t\tresult.push(this.cloneNode(true));\n\t\t\t});\n\n\t\t\treturn DomQuery(result);\n\t\t},\n\n\t\t/**\n\t\t * Adds the specified class name to the current set elements.\n\t\t *\n\t\t * @method addClass\n\t\t * @param {String} className Class name to add.\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\taddClass: function(className) {\n\t\t\treturn this.toggleClass(className, true);\n\t\t},\n\n\t\t/**\n\t\t * Removes the specified class name to the current set elements.\n\t\t *\n\t\t * @method removeClass\n\t\t * @param {String} className Class name to remove.\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\tremoveClass: function(className) {\n\t\t\treturn this.toggleClass(className, false);\n\t\t},\n\n\t\t/**\n\t\t * Toggles the specified class name on the current set elements.\n\t\t *\n\t\t * @method toggleClass\n\t\t * @param {String} className Class name to add/remove.\n\t\t * @param {Boolean} state Optional state to toggle on/off.\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\ttoggleClass: function(className, state) {\n\t\t\tvar self = this;\n\n\t\t\t// Functions are not supported\n\t\t\tif (typeof className != 'string') {\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\tif (className.indexOf(' ') !== -1) {\n\t\t\t\teach(className.split(' '), function() {\n\t\t\t\t\tself.toggleClass(this, state);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tself.each(function(index, node) {\n\t\t\t\t\tvar existingClassName, classState;\n\n\t\t\t\t\tclassState = hasClass(node, className);\n\t\t\t\t\tif (classState !== state) {\n\t\t\t\t\t\texistingClassName = node.className;\n\n\t\t\t\t\t\tif (classState) {\n\t\t\t\t\t\t\tnode.className = trim((\" \" + existingClassName + \" \").replace(' ' + className + ' ', ' '));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnode.className += existingClassName ? ' ' + className : className;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the first item in set has the specified class.\n\t\t *\n\t\t * @method hasClass\n\t\t * @param {String} className Class name to check for.\n\t\t * @return {Boolean} True/false if the set has the specified class.\n\t\t */\n\t\thasClass: function(className) {\n\t\t\treturn hasClass(this[0], className);\n\t\t},\n\n\t\t/**\n\t\t * Executes the callback function for each item DomQuery collection. If you return false in the\n\t\t * callback it will break the loop.\n\t\t *\n\t\t * @method each\n\t\t * @param {function} callback Callback function to execute for each item.\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\teach: function(callback) {\n\t\t\treturn each(this, callback);\n\t\t},\n\n\t\t/**\n\t\t * Binds an event with callback function to the elements in set.\n\t\t *\n\t\t * @method on\n\t\t * @param {String} name Name of the event to bind.\n\t\t * @param {function} callback Callback function to execute when the event occurs.\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\ton: function(name, callback) {\n\t\t\treturn this.each(function() {\n\t\t\t\tEvent.bind(this, name, callback);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Unbinds an event with callback function to the elements in set.\n\t\t *\n\t\t * @method off\n\t\t * @param {String} name Optional name of the event to bind.\n\t\t * @param {function} callback Optional callback function to execute when the event occurs.\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\toff: function(name, callback) {\n\t\t\treturn this.each(function() {\n\t\t\t\tEvent.unbind(this, name, callback);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Triggers the specified event by name or event object.\n\t\t *\n\t\t * @method trigger\n\t\t * @param {String/Object} name Name of the event to trigger or event object.\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\ttrigger: function(name) {\n\t\t\treturn this.each(function() {\n\t\t\t\tif (typeof name == 'object') {\n\t\t\t\t\tEvent.fire(this, name.type, name);\n\t\t\t\t} else {\n\t\t\t\t\tEvent.fire(this, name);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Shows all elements in set.\n\t\t *\n\t\t * @method show\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\tshow: function() {\n\t\t\treturn this.css('display', '');\n\t\t},\n\n\t\t/**\n\t\t * Hides all elements in set.\n\t\t *\n\t\t * @method hide\n\t\t * @return {tinymce.dom.DomQuery} Current set.\n\t\t */\n\t\thide: function() {\n\t\t\treturn this.css('display', 'none');\n\t\t},\n\n\t\t/**\n\t\t * Slices the current set.\n\t\t *\n\t\t * @method slice\n\t\t * @param {Number} start Start index to slice at.\n\t\t * @param {Number} end Optional end index to end slice at.\n\t\t * @return {tinymce.dom.DomQuery} Sliced set.\n\t\t */\n\t\tslice: function() {\n\t\t\treturn new DomQuery(slice.apply(this, arguments));\n\t\t},\n\n\t\t/**\n\t\t * Makes the set equal to the specified index.\n\t\t *\n\t\t * @method eq\n\t\t * @param {Number} index Index to set it equal to.\n\t\t * @return {tinymce.dom.DomQuery} Single item set.\n\t\t */\n\t\teq: function(index) {\n\t\t\treturn index === -1 ? this.slice(index) : this.slice(index, +index + 1);\n\t\t},\n\n\t\t/**\n\t\t * Makes the set equal to first element in set.\n\t\t *\n\t\t * @method first\n\t\t * @return {tinymce.dom.DomQuery} Single item set.\n\t\t */\n\t\tfirst: function() {\n\t\t\treturn this.eq(0);\n\t\t},\n\n\t\t/**\n\t\t * Makes the set equal to last element in set.\n\t\t *\n\t\t * @method last\n\t\t * @return {tinymce.dom.DomQuery} Single item set.\n\t\t */\n\t\tlast: function() {\n\t\t\treturn this.eq(-1);\n\t\t},\n\n\t\t/**\n\t\t * Finds elements by the specified selector for each element in set.\n\t\t *\n\t\t * @method find\n\t\t * @param {String} selector Selector to find elements by.\n\t\t * @return {tinymce.dom.DomQuery} Set with matches elements.\n\t\t */\n\t\tfind: function(selector) {\n\t\t\tvar i, l, ret = [];\n\n\t\t\tfor (i = 0, l = this.length; i < l; i++) {\n\t\t\t\tDomQuery.find(selector, this[i], ret);\n\t\t\t}\n\n\t\t\treturn DomQuery(ret);\n\t\t},\n\n\t\t/**\n\t\t * Filters the current set with the specified selector.\n\t\t *\n\t\t * @method filter\n\t\t * @param {String/function} selector Selector to filter elements by.\n\t\t * @return {tinymce.dom.DomQuery} Set with filtered elements.\n\t\t */\n\t\tfilter: function(selector) {\n\t\t\tif (typeof selector == 'function') {\n\t\t\t\treturn DomQuery(grep(this.toArray(), function(item, i) {\n\t\t\t\t\treturn selector(i, item);\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\treturn DomQuery(DomQuery.filter(selector, this.toArray()));\n\t\t},\n\n\t\t/**\n\t\t * Gets the current node or any parent matching the specified selector.\n\t\t *\n\t\t * @method closest\n\t\t * @param {String/Element/tinymce.dom.DomQuery} selector Selector or element to find.\n\t\t * @return {tinymce.dom.DomQuery} Set with closest elements.\n\t\t */\n\t\tclosest: function(selector) {\n\t\t\tvar result = [];\n\n\t\t\tif (selector instanceof DomQuery) {\n\t\t\t\tselector = selector[0];\n\t\t\t}\n\n\t\t\tthis.each(function(i, node) {\n\t\t\t\twhile (node) {\n\t\t\t\t\tif (typeof selector == 'string' && DomQuery(node).is(selector)) {\n\t\t\t\t\t\tresult.push(node);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (node == selector) {\n\t\t\t\t\t\tresult.push(node);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn DomQuery(result);\n\t\t},\n\n\t\t/**\n\t\t * Returns the offset of the first element in set or sets the top/left css properties of all elements in set.\n\t\t *\n\t\t * @method offset\n\t\t * @param {Object} offset Optional offset object to set on each item.\n\t\t * @return {Object/tinymce.dom.DomQuery} Returns the first element offset or the current set if you specified an offset.\n\t\t */\n\t\toffset: function(offset) {\n\t\t\tvar elm, doc, docElm;\n\t\t\tvar x = 0, y = 0, pos;\n\n\t\t\tif (!offset) {\n\t\t\t\telm = this[0];\n\n\t\t\t\tif (elm) {\n\t\t\t\t\tdoc = elm.ownerDocument;\n\t\t\t\t\tdocElm = doc.documentElement;\n\n\t\t\t\t\tif (elm.getBoundingClientRect) {\n\t\t\t\t\t\tpos = elm.getBoundingClientRect();\n\t\t\t\t\t\tx = pos.left + (docElm.scrollLeft || doc.body.scrollLeft) - docElm.clientLeft;\n\t\t\t\t\t\ty = pos.top + (docElm.scrollTop || doc.body.scrollTop) - docElm.clientTop;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tleft: x,\n\t\t\t\t\ttop: y\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn this.css(offset);\n\t\t},\n\n\t\tpush: push,\n\t\tsort: [].sort,\n\t\tsplice: [].splice\n\t};\n\n\t// Static members\n\tTools.extend(DomQuery, {\n\t\t/**\n\t\t * Extends the specified object with one or more objects.\n\t\t *\n\t\t * @static\n\t\t * @method extend\n\t\t * @param {Object} target Target object to extend with new items.\n\t\t * @param {Object..} object Object to extend the target with.\n\t\t * @return {Object} Extended input object.\n\t\t */\n\t\textend: Tools.extend,\n\n\t\t/**\n\t\t * Creates an array out of an array like object.\n\t\t *\n\t\t * @static\n\t\t * @method makeArray\n\t\t * @param {Object} object Object to convert to array.\n\t\t * @return {Array} Array produced from object.\n\t\t */\n\t\tmakeArray: function(object) {\n\t\t\tif (isWindow(object) || object.nodeType) {\n\t\t\t\treturn [object];\n\t\t\t}\n\n\t\t\treturn Tools.toArray(object);\n\t\t},\n\n\t\t/**\n\t\t * Returns the index of the specified item inside the array.\n\t\t *\n\t\t * @static\n\t\t * @method inArray\n\t\t * @param {Object} item Item to look for.\n\t\t * @param {Array} array Array to look for item in.\n\t\t * @return {Number} Index of the item or -1.\n\t\t */\n\t\tinArray: inArray,\n\n\t\t/**\n\t\t * Returns true/false if the specified object is an array or not.\n\t\t *\n\t\t * @static\n\t\t * @method isArray\n\t\t * @param {Object} array Object to check if it's an array or not.\n\t\t * @return {Boolean} True/false if the object is an array.\n\t\t */\n\t\tisArray: Tools.isArray,\n\n\t\t/**\n\t\t * Executes the callback function for each item in array/object. If you return false in the\n\t\t * callback it will break the loop.\n\t\t *\n\t\t * @static\n\t\t * @method each\n\t\t * @param {Object} obj Object to iterate.\n\t\t * @param {function} callback Callback function to execute for each item.\n\t\t */\n\t\teach: each,\n\n\t\t/**\n\t\t * Removes whitespace from the beginning and end of a string.\n\t\t *\n\t\t * @static\n\t\t * @method trim\n\t\t * @param {String} str String to remove whitespace from.\n\t\t * @return {String} New string with removed whitespace.\n\t\t */\n\t\ttrim: trim,\n\n\t\t/**\n\t\t * Filters out items from the input array by calling the specified function for each item.\n\t\t * If the function returns false the item will be excluded if it returns true it will be included.\n\t\t *\n\t\t * @static\n\t\t * @method grep\n\t\t * @param {Array} array Array of items to loop though.\n\t\t * @param {function} callback Function to call for each item. Include/exclude depends on it's return value.\n\t\t * @return {Array} New array with values imported and filtered based in input.\n\t\t * @example\n\t\t * // Filter out some items, this will return an array with 4 and 5\n\t\t * var items = DomQuery.grep([1, 2, 3, 4, 5], function(v) {return v > 3;});\n\t\t */\n\t\tgrep: grep,\n\n\t\t// Sizzle\n\t\tfind: Sizzle,\n\t\texpr: Sizzle.selectors,\n\t\tunique: Sizzle.uniqueSort,\n\t\ttext: Sizzle.getText,\n\t\tcontains: Sizzle.contains,\n\t\tfilter: function(expr, elems, not) {\n\t\t\tvar i = elems.length;\n\n\t\t\tif (not) {\n\t\t\t\texpr = \":not(\" + expr + \")\";\n\t\t\t}\n\n\t\t\twhile (i--) {\n\t\t\t\tif (elems[i].nodeType != 1) {\n\t\t\t\t\telems.splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (elems.length === 1) {\n\t\t\t\telems = DomQuery.find.matchesSelector(elems[0], expr) ? [elems[0]] : [];\n\t\t\t} else {\n\t\t\t\telems = DomQuery.find.matches(expr, elems);\n\t\t\t}\n\n\t\t\treturn elems;\n\t\t}\n\t});\n\n\tfunction dir(el, prop, until) {\n\t\tvar matched = [], cur = el[prop];\n\n\t\tif (typeof until != 'string' && until instanceof DomQuery) {\n\t\t\tuntil = until[0];\n\t\t}\n\n\t\twhile (cur && cur.nodeType !== 9) {\n\t\t\tif (until !== undefined) {\n\t\t\t\tif (cur === until) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (typeof until == 'string' && DomQuery(cur).is(until)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (cur.nodeType === 1) {\n\t\t\t\tmatched.push(cur);\n\t\t\t}\n\n\t\t\tcur = cur[prop];\n\t\t}\n\n\t\treturn matched;\n\t}\n\n\tfunction sibling(node, siblingName, nodeType, until) {\n\t\tvar result = [];\n\n\t\tif (until instanceof DomQuery) {\n\t\t\tuntil = until[0];\n\t\t}\n\n\t\tfor (; node; node = node[siblingName]) {\n\t\t\tif (nodeType && node.nodeType !== nodeType) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (until !== undefined) {\n\t\t\t\tif (node === until) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (typeof until == 'string' && DomQuery(node).is(until)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult.push(node);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tfunction firstSibling(node, siblingName, nodeType) {\n\t\tfor (node = node[siblingName]; node; node = node[siblingName]) {\n\t\t\tif (node.nodeType == nodeType) {\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\teach({\n\t\t/**\n\t\t * Returns a new collection with the parent of each item in current collection matching the optional selector.\n\t\t *\n\t\t * @method parent\n\t\t * @param {Element/tinymce.dom.DomQuery} node Node to match parents against.\n\t\t * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching parents.\n\t\t */\n\t\tparent: function(node) {\n\t\t\tvar parent = node.parentNode;\n\n\t\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t\t},\n\n\t\t/**\n\t\t * Returns a new collection with the all the parents of each item in current collection matching the optional selector.\n\t\t *\n\t\t * @method parents\n\t\t * @param {Element/tinymce.dom.DomQuery} node Node to match parents against.\n\t\t * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching parents.\n\t\t */\n\t\tparents: function(node) {\n\t\t\treturn dir(node, \"parentNode\");\n\t\t},\n\n\t\t/**\n\t\t * Returns a new collection with next sibling of each item in current collection matching the optional selector.\n\t\t *\n\t\t * @method next\n\t\t * @param {Element/tinymce.dom.DomQuery} node Node to match the next element against.\n\t\t * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.\n\t\t */\n\t\tnext: function(node) {\n\t\t\treturn firstSibling(node, 'nextSibling', 1);\n\t\t},\n\n\t\t/**\n\t\t * Returns a new collection with previous sibling of each item in current collection matching the optional selector.\n\t\t *\n\t\t * @method prev\n\t\t * @param {Element/tinymce.dom.DomQuery} node Node to match the previous element against.\n\t\t * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.\n\t\t */\n\t\tprev: function(node) {\n\t\t\treturn firstSibling(node, 'previousSibling', 1);\n\t\t},\n\n\t\t/**\n\t\t * Returns all child elements matching the optional selector.\n\t\t *\n\t\t * @method children\n\t\t * @param {Element/tinymce.dom.DomQuery} node Node to match the elements against.\n\t\t * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.\n\t\t */\n\t\tchildren: function(node) {\n\t\t\treturn sibling(node.firstChild, 'nextSibling', 1);\n\t\t},\n\n\t\t/**\n\t\t * Returns all child nodes matching the optional selector.\n\t\t *\n\t\t * @method contents\n\t\t * @param {Element/tinymce.dom.DomQuery} node Node to get the contents of.\n\t\t * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.\n\t\t */\n\t\tcontents: function(node) {\n\t\t\treturn Tools.toArray((node.nodeName === \"iframe\" ? node.contentDocument || node.contentWindow.document : node).childNodes);\n\t\t}\n\t}, function(name, fn) {\n\t\tDomQuery.fn[name] = function(selector) {\n\t\t\tvar self = this, result = [];\n\n\t\t\tself.each(function() {\n\t\t\t\tvar nodes = fn.call(result, this, selector, result);\n\n\t\t\t\tif (nodes) {\n\t\t\t\t\tif (DomQuery.isArray(nodes)) {\n\t\t\t\t\t\tresult.push.apply(result, nodes);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.push(nodes);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// If traversing on multiple elements we might get the same elements twice\n\t\t\tif (this.length > 1) {\n\t\t\t\tif (!skipUniques[name]) {\n\t\t\t\t\tresult = DomQuery.unique(result);\n\t\t\t\t}\n\n\t\t\t\tif (name.indexOf('parents') === 0) {\n\t\t\t\t\tresult = result.reverse();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult = DomQuery(result);\n\n\t\t\tif (selector) {\n\t\t\t\treturn result.filter(selector);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t});\n\n\teach({\n\t\t/**\n\t\t * Returns a new collection with the all the parents until the matching selector/element\n\t\t * of each item in current collection matching the optional selector.\n\t\t *\n\t\t * @method parentsUntil\n\t\t * @param {Element/tinymce.dom.DomQuery} node Node to find parent of.\n\t\t * @param {String/Element/tinymce.dom.DomQuery} until Until the matching selector or element.\n\t\t * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching parents.\n\t\t */\n\t\tparentsUntil: function(node, until) {\n\t\t\treturn dir(node, \"parentNode\", until);\n\t\t},\n\n\t\t/**\n\t\t * Returns a new collection with all next siblings of each item in current collection matching the optional selector.\n\t\t *\n\t\t * @method nextUntil\n\t\t * @param {Element/tinymce.dom.DomQuery} node Node to find next siblings on.\n\t\t * @param {String/Element/tinymce.dom.DomQuery} until Until the matching selector or element.\n\t\t * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.\n\t\t */\n\t\tnextUntil: function(node, until) {\n\t\t\treturn sibling(node, 'nextSibling', 1, until).slice(1);\n\t\t},\n\n\t\t/**\n\t\t * Returns a new collection with all previous siblings of each item in current collection matching the optional selector.\n\t\t *\n\t\t * @method prevUntil\n\t\t * @param {Element/tinymce.dom.DomQuery} node Node to find previous siblings on.\n\t\t * @param {String/Element/tinymce.dom.DomQuery} until Until the matching selector or element.\n\t\t * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.\n\t\t */\n\t\tprevUntil: function(node, until) {\n\t\t\treturn sibling(node, 'previousSibling', 1, until).slice(1);\n\t\t}\n\t}, function(name, fn) {\n\t\tDomQuery.fn[name] = function(selector, filter) {\n\t\t\tvar self = this, result = [];\n\n\t\t\tself.each(function() {\n\t\t\t\tvar nodes = fn.call(result, this, selector, result);\n\n\t\t\t\tif (nodes) {\n\t\t\t\t\tif (DomQuery.isArray(nodes)) {\n\t\t\t\t\t\tresult.push.apply(result, nodes);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.push(nodes);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// If traversing on multiple elements we might get the same elements twice\n\t\t\tif (this.length > 1) {\n\t\t\t\tresult = DomQuery.unique(result);\n\n\t\t\t\tif (name.indexOf('parents') === 0 || name === 'prevUntil') {\n\t\t\t\t\tresult = result.reverse();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult = DomQuery(result);\n\n\t\t\tif (filter) {\n\t\t\t\treturn result.filter(filter);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t});\n\n\t/**\n\t * Returns true/false if the current set items matches the selector.\n\t *\n\t * @method is\n\t * @param {String} selector Selector to match the elements against.\n\t * @return {Boolean} True/false if the current set matches the selector.\n\t */\n\tDomQuery.fn.is = function(selector) {\n\t\treturn !!selector && this.filter(selector).length > 0;\n\t};\n\n\tDomQuery.fn.init.prototype = DomQuery.fn;\n\n\tDomQuery.overrideDefaults = function(callback) {\n\t\tvar defaults;\n\n\t\tfunction sub(selector, context) {\n\t\t\tdefaults = defaults || callback();\n\n\t\t\tif (arguments.length === 0) {\n\t\t\t\tselector = defaults.element;\n\t\t\t}\n\n\t\t\tif (!context) {\n\t\t\t\tcontext = defaults.context;\n\t\t\t}\n\n\t\t\treturn new sub.fn.init(selector, context);\n\t\t}\n\n\t\tDomQuery.extend(sub, this);\n\n\t\treturn sub;\n\t};\n\n\tfunction appendHooks(targetHooks, prop, hooks) {\n\t\teach(hooks, function(name, func) {\n\t\t\ttargetHooks[name] = targetHooks[name] || {};\n\t\t\ttargetHooks[name][prop] = func;\n\t\t});\n\t}\n\n\tif (Env.ie && Env.ie < 8) {\n\t\tappendHooks(attrHooks, 'get', {\n\t\t\tmaxlength: function(elm) {\n\t\t\t\tvar value = elm.maxLength;\n\n\t\t\t\tif (value === 0x7fffffff) {\n\t\t\t\t\treturn undef;\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t},\n\n\t\t\tsize: function(elm) {\n\t\t\t\tvar value = elm.size;\n\n\t\t\t\tif (value === 20) {\n\t\t\t\t\treturn undef;\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t},\n\n\t\t\t'class': function(elm) {\n\t\t\t\treturn elm.className;\n\t\t\t},\n\n\t\t\tstyle: function(elm) {\n\t\t\t\tvar value = elm.style.cssText;\n\n\t\t\t\tif (value.length === 0) {\n\t\t\t\t\treturn undef;\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t}\n\t\t});\n\n\t\tappendHooks(attrHooks, 'set', {\n\t\t\t'class': function(elm, value) {\n\t\t\t\telm.className = value;\n\t\t\t},\n\n\t\t\tstyle: function(elm, value) {\n\t\t\t\telm.style.cssText = value;\n\t\t\t}\n\t\t});\n\t}\n\n\tif (Env.ie && Env.ie < 9) {\n\t\t/*jshint sub:true */\n\t\t/*eslint dot-notation: 0*/\n\t\tcssFix['float'] = 'styleFloat';\n\n\t\tappendHooks(cssHooks, 'set', {\n\t\t\topacity: function(elm, value) {\n\t\t\t\tvar style = elm.style;\n\n\t\t\t\tif (value === null || value === '') {\n\t\t\t\t\tstyle.removeAttribute('filter');\n\t\t\t\t} else {\n\t\t\t\t\tstyle.zoom = 1;\n\t\t\t\t\tstyle.filter = 'alpha(opacity=' + (value * 100) + ')';\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tDomQuery.attrHooks = attrHooks;\n\tDomQuery.cssHooks = cssHooks;\n\n\treturn DomQuery;\n});\n\n// Included from: js/tinymce/classes/html/Styles.js\n\n/**\n * Styles.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class is used to parse CSS styles it also compresses styles to reduce the output size.\n *\n * @example\n * var Styles = new tinymce.html.Styles({\n * url_converter: function(url) {\n * return url;\n * }\n * });\n *\n * styles = Styles.parse('border: 1px solid red');\n * styles.color = 'red';\n *\n * console.log(new tinymce.html.StyleSerializer().serialize(styles));\n *\n * @class tinymce.html.Styles\n * @version 3.4\n */\ndefine(\"tinymce/html/Styles\", [], function() {\n\treturn function(settings, schema) {\n\t\t/*jshint maxlen:255 */\n\t\t/*eslint max-len:0 */\n\t\tvar rgbRegExp = /rgb\\s*\\(\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*\\)/gi,\n\t\t\turlOrStrRegExp = /(?:url(?:(?:\\(\\s*\\\"([^\\\"]+)\\\"\\s*\\))|(?:\\(\\s*\\'([^\\']+)\\'\\s*\\))|(?:\\(\\s*([^)\\s]+)\\s*\\))))|(?:\\'([^\\']+)\\')|(?:\\\"([^\\\"]+)\\\")/gi,\n\t\t\tstyleRegExp = /\\s*([^:]+):\\s*([^;]+);?/g,\n\t\t\ttrimRightRegExp = /\\s+$/,\n\t\t\ti, encodingLookup = {}, encodingItems, validStyles, invalidStyles, invisibleChar = '\\uFEFF';\n\n\t\tsettings = settings || {};\n\n\t\tif (schema) {\n\t\t\tvalidStyles = schema.getValidStyles();\n\t\t\tinvalidStyles = schema.getInvalidStyles();\n\t\t}\n\n\t\tencodingItems = ('\\\\\" \\\\\\' \\\\; \\\\: ; : ' + invisibleChar).split(' ');\n\t\tfor (i = 0; i < encodingItems.length; i++) {\n\t\t\tencodingLookup[encodingItems[i]] = invisibleChar + i;\n\t\t\tencodingLookup[invisibleChar + i] = encodingItems[i];\n\t\t}\n\n\t\tfunction toHex(match, r, g, b) {\n\t\t\tfunction hex(val) {\n\t\t\t\tval = parseInt(val, 10).toString(16);\n\n\t\t\t\treturn val.length > 1 ? val : '0' + val; // 0 -> 00\n\t\t\t}\n\n\t\t\treturn '#' + hex(r) + hex(g) + hex(b);\n\t\t}\n\n\t\treturn {\n\t\t\t/**\n\t\t\t * Parses the specified RGB color value and returns a hex version of that color.\n\t\t\t *\n\t\t\t * @method toHex\n\t\t\t * @param {String} color RGB string value like rgb(1,2,3)\n\t\t\t * @return {String} Hex version of that RGB value like #FF00FF.\n\t\t\t */\n\t\t\ttoHex: function(color) {\n\t\t\t\treturn color.replace(rgbRegExp, toHex);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Parses the specified style value into an object collection. This parser will also\n\t\t\t * merge and remove any redundant items that browsers might have added. It will also convert non hex\n\t\t\t * colors to hex values. Urls inside the styles will also be converted to absolute/relative based on settings.\n\t\t\t *\n\t\t\t * @method parse\n\t\t\t * @param {String} css Style value to parse for example: border:1px solid red;.\n\t\t\t * @return {Object} Object representation of that style like {border: '1px solid red'}\n\t\t\t */\n\t\t\tparse: function(css) {\n\t\t\t\tvar styles = {}, matches, name, value, isEncoded, urlConverter = settings.url_converter;\n\t\t\t\tvar urlConverterScope = settings.url_converter_scope || this;\n\n\t\t\t\tfunction compress(prefix, suffix, noJoin) {\n\t\t\t\t\tvar top, right, bottom, left;\n\n\t\t\t\t\ttop = styles[prefix + '-top' + suffix];\n\t\t\t\t\tif (!top) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tright = styles[prefix + '-right' + suffix];\n\t\t\t\t\tif (!right) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tbottom = styles[prefix + '-bottom' + suffix];\n\t\t\t\t\tif (!bottom) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tleft = styles[prefix + '-left' + suffix];\n\t\t\t\t\tif (!left) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar box = [top, right, bottom, left];\n\t\t\t\t\ti = box.length - 1;\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tif (box[i] !== box[i + 1]) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (i > -1 && noJoin) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstyles[prefix + suffix] = i == -1 ? box[0] : box.join(' ');\n\t\t\t\t\tdelete styles[prefix + '-top' + suffix];\n\t\t\t\t\tdelete styles[prefix + '-right' + suffix];\n\t\t\t\t\tdelete styles[prefix + '-bottom' + suffix];\n\t\t\t\t\tdelete styles[prefix + '-left' + suffix];\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Checks if the specific style can be compressed in other words if all border-width are equal.\n\t\t\t\t */\n\t\t\t\tfunction canCompress(key) {\n\t\t\t\t\tvar value = styles[key], i;\n\n\t\t\t\t\tif (!value) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvalue = value.split(' ');\n\t\t\t\t\ti = value.length;\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tif (value[i] !== value[0]) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tstyles[key] = value[0];\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Compresses multiple styles into one style.\n\t\t\t\t */\n\t\t\t\tfunction compress2(target, a, b, c) {\n\t\t\t\t\tif (!canCompress(a)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!canCompress(b)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!canCompress(c)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Compress\n\t\t\t\t\tstyles[target] = styles[a] + ' ' + styles[b] + ' ' + styles[c];\n\t\t\t\t\tdelete styles[a];\n\t\t\t\t\tdelete styles[b];\n\t\t\t\t\tdelete styles[c];\n\t\t\t\t}\n\n\t\t\t\t// Encodes the specified string by replacing all \\\" \\' ; : with _\n\t\t\t\tfunction encode(str) {\n\t\t\t\t\tisEncoded = true;\n\n\t\t\t\t\treturn encodingLookup[str];\n\t\t\t\t}\n\n\t\t\t\t// Decodes the specified string by replacing all _ with it's original value \\\" \\' etc\n\t\t\t\t// It will also decode the \\\" \\' if keep_slashes is set to fale or omitted\n\t\t\t\tfunction decode(str, keep_slashes) {\n\t\t\t\t\tif (isEncoded) {\n\t\t\t\t\t\tstr = str.replace(/\\uFEFF[0-9]/g, function(str) {\n\t\t\t\t\t\t\treturn encodingLookup[str];\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!keep_slashes) {\n\t\t\t\t\t\tstr = str.replace(/\\\\([\\'\\\";:])/g, \"$1\");\n\t\t\t\t\t}\n\n\t\t\t\t\treturn str;\n\t\t\t\t}\n\n\t\t\t\tfunction decodeSingleHexSequence(escSeq) {\n\t\t\t\t\treturn String.fromCharCode(parseInt(escSeq.slice(1), 16));\n\t\t\t\t}\n\n\t\t\t\tfunction decodeHexSequences(value) {\n\t\t\t\t\treturn value.replace(/\\\\[0-9a-f]+/gi, decodeSingleHexSequence);\n\t\t\t\t}\n\n\t\t\t\tfunction processUrl(match, url, url2, url3, str, str2) {\n\t\t\t\t\tstr = str || str2;\n\n\t\t\t\t\tif (str) {\n\t\t\t\t\t\tstr = decode(str);\n\n\t\t\t\t\t\t// Force strings into single quote format\n\t\t\t\t\t\treturn \"'\" + str.replace(/\\'/g, \"\\\\'\") + \"'\";\n\t\t\t\t\t}\n\n\t\t\t\t\turl = decode(url || url2 || url3);\n\n\t\t\t\t\tif (!settings.allow_script_urls) {\n\t\t\t\t\t\tvar scriptUrl = url.replace(/[\\s\\r\\n]+/g, '');\n\n\t\t\t\t\t\tif (/(java|vb)script:/i.test(scriptUrl)) {\n\t\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!settings.allow_svg_data_urls && /^data:image\\/svg/i.test(scriptUrl)) {\n\t\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Convert the URL to relative/absolute depending on config\n\t\t\t\t\tif (urlConverter) {\n\t\t\t\t\t\turl = urlConverter.call(urlConverterScope, url, 'style');\n\t\t\t\t\t}\n\n\t\t\t\t\t// Output new URL format\n\t\t\t\t\treturn \"url('\" + url.replace(/\\'/g, \"\\\\'\") + \"')\";\n\t\t\t\t}\n\n\t\t\t\tif (css) {\n\t\t\t\t\tcss = css.replace(/[\\u0000-\\u001F]/g, '');\n\n\t\t\t\t\t// Encode \\\" \\' % and ; and : inside strings so they don't interfere with the style parsing\n\t\t\t\t\tcss = css.replace(/\\\\[\\\"\\';:\\uFEFF]/g, encode).replace(/\\\"[^\\\"]+\\\"|\\'[^\\']+\\'/g, function(str) {\n\t\t\t\t\t\treturn str.replace(/[;:]/g, encode);\n\t\t\t\t\t});\n\n\t\t\t\t\t// Parse styles\n\t\t\t\t\twhile ((matches = styleRegExp.exec(css))) {\n\t\t\t\t\t\tstyleRegExp.lastIndex = matches.index + matches[0].length;\n\t\t\t\t\t\tname = matches[1].replace(trimRightRegExp, '').toLowerCase();\n\t\t\t\t\t\tvalue = matches[2].replace(trimRightRegExp, '');\n\n\t\t\t\t\t\tif (name && value) {\n\t\t\t\t\t\t\t// Decode escaped sequences like \\65 -> e\n\t\t\t\t\t\t\tname = decodeHexSequences(name);\n\t\t\t\t\t\t\tvalue = decodeHexSequences(value);\n\n\t\t\t\t\t\t\t// Skip properties with double quotes and sequences like \\\" \\' in their names\n\t\t\t\t\t\t\t// See 'mXSS Attacks: Attacking well-secured Web-Applications by using innerHTML Mutations'\n\t\t\t\t\t\t\t// https://cure53.de/fp170.pdf\n\t\t\t\t\t\t\tif (name.indexOf(invisibleChar) !== -1 || name.indexOf('\"') !== -1) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Don't allow behavior name or expression/comments within the values\n\t\t\t\t\t\t\tif (!settings.allow_script_urls && (name == \"behavior\" || /expression\\s*\\(|\\/\\*|\\*\\//.test(value))) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Opera will produce 700 instead of bold in their style values\n\t\t\t\t\t\t\tif (name === 'font-weight' && value === '700') {\n\t\t\t\t\t\t\t\tvalue = 'bold';\n\t\t\t\t\t\t\t} else if (name === 'color' || name === 'background-color') { // Lowercase colors like RED\n\t\t\t\t\t\t\t\tvalue = value.toLowerCase();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert RGB colors to HEX\n\t\t\t\t\t\t\tvalue = value.replace(rgbRegExp, toHex);\n\n\t\t\t\t\t\t\t// Convert URLs and force them into url('value') format\n\t\t\t\t\t\t\tvalue = value.replace(urlOrStrRegExp, processUrl);\n\t\t\t\t\t\t\tstyles[name] = isEncoded ? decode(value, true) : value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Compress the styles to reduce it's size for example IE will expand styles\n\t\t\t\t\tcompress(\"border\", \"\", true);\n\t\t\t\t\tcompress(\"border\", \"-width\");\n\t\t\t\t\tcompress(\"border\", \"-color\");\n\t\t\t\t\tcompress(\"border\", \"-style\");\n\t\t\t\t\tcompress(\"padding\", \"\");\n\t\t\t\t\tcompress(\"margin\", \"\");\n\t\t\t\t\tcompress2('border', 'border-width', 'border-style', 'border-color');\n\n\t\t\t\t\t// Remove pointless border, IE produces these\n\t\t\t\t\tif (styles.border === 'medium none') {\n\t\t\t\t\t\tdelete styles.border;\n\t\t\t\t\t}\n\n\t\t\t\t\t// IE 11 will produce a border-image: none when getting the style attribute from

      \n\t\t\t\t\t// So let us assume it shouldn't be there\n\t\t\t\t\tif (styles['border-image'] === 'none') {\n\t\t\t\t\t\tdelete styles['border-image'];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn styles;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Serializes the specified style object into a string.\n\t\t\t *\n\t\t\t * @method serialize\n\t\t\t * @param {Object} styles Object to serialize as string for example: {border: '1px solid red'}\n\t\t\t * @param {String} elementName Optional element name, if specified only the styles that matches the schema will be serialized.\n\t\t\t * @return {String} String representation of the style object for example: border: 1px solid red.\n\t\t\t */\n\t\t\tserialize: function(styles, elementName) {\n\t\t\t\tvar css = '', name, value;\n\n\t\t\t\tfunction serializeStyles(name) {\n\t\t\t\t\tvar styleList, i, l, value;\n\n\t\t\t\t\tstyleList = validStyles[name];\n\t\t\t\t\tif (styleList) {\n\t\t\t\t\t\tfor (i = 0, l = styleList.length; i < l; i++) {\n\t\t\t\t\t\t\tname = styleList[i];\n\t\t\t\t\t\t\tvalue = styles[name];\n\n\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\tcss += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';\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\tfunction isValid(name, elementName) {\n\t\t\t\t\tvar styleMap;\n\n\t\t\t\t\tstyleMap = invalidStyles['*'];\n\t\t\t\t\tif (styleMap && styleMap[name]) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tstyleMap = invalidStyles[elementName];\n\t\t\t\t\tif (styleMap && styleMap[name]) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Serialize styles according to schema\n\t\t\t\tif (elementName && validStyles) {\n\t\t\t\t\t// Serialize global styles and element specific styles\n\t\t\t\t\tserializeStyles('*');\n\t\t\t\t\tserializeStyles(elementName);\n\t\t\t\t} else {\n\t\t\t\t\t// Output the styles in the order they are inside the object\n\t\t\t\t\tfor (name in styles) {\n\t\t\t\t\t\tvalue = styles[name];\n\n\t\t\t\t\t\tif (value && (!invalidStyles || isValid(name, elementName))) {\n\t\t\t\t\t\t\tcss += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn css;\n\t\t\t}\n\t\t};\n\t};\n});\n\n// Included from: js/tinymce/classes/dom/TreeWalker.js\n\n/**\n * TreeWalker.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * TreeWalker class enables you to walk the DOM in a linear manner.\n *\n * @class tinymce.dom.TreeWalker\n * @example\n * var walker = new tinymce.dom.TreeWalker(startNode);\n *\n * do {\n * console.log(walker.current());\n * } while (walker.next());\n */\ndefine(\"tinymce/dom/TreeWalker\", [], function() {\n\t/**\n\t * Constructs a new TreeWalker instance.\n\t *\n\t * @constructor\n\t * @method TreeWalker\n\t * @param {Node} startNode Node to start walking from.\n\t * @param {node} rootNode Optional root node to never walk out of.\n\t */\n\treturn function(startNode, rootNode) {\n\t\tvar node = startNode;\n\n\t\tfunction findSibling(node, startName, siblingName, shallow) {\n\t\t\tvar sibling, parent;\n\n\t\t\tif (node) {\n\t\t\t\t// Walk into nodes if it has a start\n\t\t\t\tif (!shallow && node[startName]) {\n\t\t\t\t\treturn node[startName];\n\t\t\t\t}\n\n\t\t\t\t// Return the sibling if it has one\n\t\t\t\tif (node != rootNode) {\n\t\t\t\t\tsibling = node[siblingName];\n\t\t\t\t\tif (sibling) {\n\t\t\t\t\t\treturn sibling;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Walk up the parents to look for siblings\n\t\t\t\t\tfor (parent = node.parentNode; parent && parent != rootNode; parent = parent.parentNode) {\n\t\t\t\t\t\tsibling = parent[siblingName];\n\t\t\t\t\t\tif (sibling) {\n\t\t\t\t\t\t\treturn sibling;\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\tfunction findPreviousNode(node, startName, siblingName, shallow) {\n\t\t\tvar sibling, parent, child;\n\n\t\t\tif (node) {\n\t\t\t\tsibling = node[siblingName];\n\t\t\t\tif (rootNode && sibling === rootNode) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (sibling) {\n\t\t\t\t\tif (!shallow) {\n\t\t\t\t\t\t// Walk up the parents to look for siblings\n\t\t\t\t\t\tfor (child = sibling[startName]; child; child = child[startName]) {\n\t\t\t\t\t\t\tif (!child[startName]) {\n\t\t\t\t\t\t\t\treturn child;\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 sibling;\n\t\t\t\t}\n\n\t\t\t\tparent = node.parentNode;\n\t\t\t\tif (parent && parent !== rootNode) {\n\t\t\t\t\treturn parent;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Returns the current node.\n\t\t *\n\t\t * @method current\n\t\t * @return {Node} Current node where the walker is.\n\t\t */\n\t\tthis.current = function() {\n\t\t\treturn node;\n\t\t};\n\n\t\t/**\n\t\t * Walks to the next node in tree.\n\t\t *\n\t\t * @method next\n\t\t * @return {Node} Current node where the walker is after moving to the next node.\n\t\t */\n\t\tthis.next = function(shallow) {\n\t\t\tnode = findSibling(node, 'firstChild', 'nextSibling', shallow);\n\t\t\treturn node;\n\t\t};\n\n\t\t/**\n\t\t * Walks to the previous node in tree.\n\t\t *\n\t\t * @method prev\n\t\t * @return {Node} Current node where the walker is after moving to the previous node.\n\t\t */\n\t\tthis.prev = function(shallow) {\n\t\t\tnode = findSibling(node, 'lastChild', 'previousSibling', shallow);\n\t\t\treturn node;\n\t\t};\n\n\t\tthis.prev2 = function(shallow) {\n\t\t\tnode = findPreviousNode(node, 'lastChild', 'previousSibling', shallow);\n\t\t\treturn node;\n\t\t};\n\t};\n});\n\n// Included from: js/tinymce/classes/dom/Range.js\n\n/**\n * Range.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Old IE Range.\n *\n * @private\n * @class tinymce.dom.Range\n */\ndefine(\"tinymce/dom/Range\", [\n\t\"tinymce/util/Tools\"\n], function(Tools) {\n\t// Range constructor\n\tfunction Range(dom) {\n\t\tvar self = this,\n\t\t\tdoc = dom.doc,\n\t\t\tEXTRACT = 0,\n\t\t\tCLONE = 1,\n\t\t\tDELETE = 2,\n\t\t\tTRUE = true,\n\t\t\tFALSE = false,\n\t\t\tSTART_OFFSET = 'startOffset',\n\t\t\tSTART_CONTAINER = 'startContainer',\n\t\t\tEND_CONTAINER = 'endContainer',\n\t\t\tEND_OFFSET = 'endOffset',\n\t\t\textend = Tools.extend,\n\t\t\tnodeIndex = dom.nodeIndex;\n\n\t\tfunction createDocumentFragment() {\n\t\t\treturn doc.createDocumentFragment();\n\t\t}\n\n\t\tfunction setStart(n, o) {\n\t\t\t_setEndPoint(TRUE, n, o);\n\t\t}\n\n\t\tfunction setEnd(n, o) {\n\t\t\t_setEndPoint(FALSE, n, o);\n\t\t}\n\n\t\tfunction setStartBefore(n) {\n\t\t\tsetStart(n.parentNode, nodeIndex(n));\n\t\t}\n\n\t\tfunction setStartAfter(n) {\n\t\t\tsetStart(n.parentNode, nodeIndex(n) + 1);\n\t\t}\n\n\t\tfunction setEndBefore(n) {\n\t\t\tsetEnd(n.parentNode, nodeIndex(n));\n\t\t}\n\n\t\tfunction setEndAfter(n) {\n\t\t\tsetEnd(n.parentNode, nodeIndex(n) + 1);\n\t\t}\n\n\t\tfunction collapse(ts) {\n\t\t\tif (ts) {\n\t\t\t\tself[END_CONTAINER] = self[START_CONTAINER];\n\t\t\t\tself[END_OFFSET] = self[START_OFFSET];\n\t\t\t} else {\n\t\t\t\tself[START_CONTAINER] = self[END_CONTAINER];\n\t\t\t\tself[START_OFFSET] = self[END_OFFSET];\n\t\t\t}\n\n\t\t\tself.collapsed = TRUE;\n\t\t}\n\n\t\tfunction selectNode(n) {\n\t\t\tsetStartBefore(n);\n\t\t\tsetEndAfter(n);\n\t\t}\n\n\t\tfunction selectNodeContents(n) {\n\t\t\tsetStart(n, 0);\n\t\t\tsetEnd(n, n.nodeType === 1 ? n.childNodes.length : n.nodeValue.length);\n\t\t}\n\n\t\tfunction compareBoundaryPoints(h, r) {\n\t\t\tvar sc = self[START_CONTAINER], so = self[START_OFFSET], ec = self[END_CONTAINER], eo = self[END_OFFSET],\n\t\t\trsc = r.startContainer, rso = r.startOffset, rec = r.endContainer, reo = r.endOffset;\n\n\t\t\t// Check START_TO_START\n\t\t\tif (h === 0) {\n\t\t\t\treturn _compareBoundaryPoints(sc, so, rsc, rso);\n\t\t\t}\n\n\t\t\t// Check START_TO_END\n\t\t\tif (h === 1) {\n\t\t\t\treturn _compareBoundaryPoints(ec, eo, rsc, rso);\n\t\t\t}\n\n\t\t\t// Check END_TO_END\n\t\t\tif (h === 2) {\n\t\t\t\treturn _compareBoundaryPoints(ec, eo, rec, reo);\n\t\t\t}\n\n\t\t\t// Check END_TO_START\n\t\t\tif (h === 3) {\n\t\t\t\treturn _compareBoundaryPoints(sc, so, rec, reo);\n\t\t\t}\n\t\t}\n\n\t\tfunction deleteContents() {\n\t\t\t_traverse(DELETE);\n\t\t}\n\n\t\tfunction extractContents() {\n\t\t\treturn _traverse(EXTRACT);\n\t\t}\n\n\t\tfunction cloneContents() {\n\t\t\treturn _traverse(CLONE);\n\t\t}\n\n\t\tfunction insertNode(n) {\n\t\t\tvar startContainer = this[START_CONTAINER],\n\t\t\t\tstartOffset = this[START_OFFSET], nn, o;\n\n\t\t\t// Node is TEXT_NODE or CDATA\n\t\t\tif ((startContainer.nodeType === 3 || startContainer.nodeType === 4) && startContainer.nodeValue) {\n\t\t\t\tif (!startOffset) {\n\t\t\t\t\t// At the start of text\n\t\t\t\t\tstartContainer.parentNode.insertBefore(n, startContainer);\n\t\t\t\t} else if (startOffset >= startContainer.nodeValue.length) {\n\t\t\t\t\t// At the end of text\n\t\t\t\t\tdom.insertAfter(n, startContainer);\n\t\t\t\t} else {\n\t\t\t\t\t// Middle, need to split\n\t\t\t\t\tnn = startContainer.splitText(startOffset);\n\t\t\t\t\tstartContainer.parentNode.insertBefore(n, nn);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Insert element node\n\t\t\t\tif (startContainer.childNodes.length > 0) {\n\t\t\t\t\to = startContainer.childNodes[startOffset];\n\t\t\t\t}\n\n\t\t\t\tif (o) {\n\t\t\t\t\tstartContainer.insertBefore(n, o);\n\t\t\t\t} else {\n\t\t\t\t\tif (startContainer.nodeType == 3) {\n\t\t\t\t\t\tdom.insertAfter(n, startContainer);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstartContainer.appendChild(n);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction surroundContents(n) {\n\t\t\tvar f = self.extractContents();\n\n\t\t\tself.insertNode(n);\n\t\t\tn.appendChild(f);\n\t\t\tself.selectNode(n);\n\t\t}\n\n\t\tfunction cloneRange() {\n\t\t\treturn extend(new Range(dom), {\n\t\t\t\tstartContainer: self[START_CONTAINER],\n\t\t\t\tstartOffset: self[START_OFFSET],\n\t\t\t\tendContainer: self[END_CONTAINER],\n\t\t\t\tendOffset: self[END_OFFSET],\n\t\t\t\tcollapsed: self.collapsed,\n\t\t\t\tcommonAncestorContainer: self.commonAncestorContainer\n\t\t\t});\n\t\t}\n\n\t\t// Private methods\n\n\t\tfunction _getSelectedNode(container, offset) {\n\t\t\tvar child;\n\n\t\t\t// TEXT_NODE\n\t\t\tif (container.nodeType == 3) {\n\t\t\t\treturn container;\n\t\t\t}\n\n\t\t\tif (offset < 0) {\n\t\t\t\treturn container;\n\t\t\t}\n\n\t\t\tchild = container.firstChild;\n\t\t\twhile (child && offset > 0) {\n\t\t\t\t--offset;\n\t\t\t\tchild = child.nextSibling;\n\t\t\t}\n\n\t\t\tif (child) {\n\t\t\t\treturn child;\n\t\t\t}\n\n\t\t\treturn container;\n\t\t}\n\n\t\tfunction _isCollapsed() {\n\t\t\treturn (self[START_CONTAINER] == self[END_CONTAINER] && self[START_OFFSET] == self[END_OFFSET]);\n\t\t}\n\n\t\tfunction _compareBoundaryPoints(containerA, offsetA, containerB, offsetB) {\n\t\t\tvar c, offsetC, n, cmnRoot, childA, childB;\n\n\t\t\t// In the first case the boundary-points have the same container. A is before B\n\t\t\t// if its offset is less than the offset of B, A is equal to B if its offset is\n\t\t\t// equal to the offset of B, and A is after B if its offset is greater than the\n\t\t\t// offset of B.\n\t\t\tif (containerA == containerB) {\n\t\t\t\tif (offsetA == offsetB) {\n\t\t\t\t\treturn 0; // equal\n\t\t\t\t}\n\n\t\t\t\tif (offsetA < offsetB) {\n\t\t\t\t\treturn -1; // before\n\t\t\t\t}\n\n\t\t\t\treturn 1; // after\n\t\t\t}\n\n\t\t\t// In the second case a child node C of the container of A is an ancestor\n\t\t\t// container of B. In this case, A is before B if the offset of A is less than or\n\t\t\t// equal to the index of the child node C and A is after B otherwise.\n\t\t\tc = containerB;\n\t\t\twhile (c && c.parentNode != containerA) {\n\t\t\t\tc = c.parentNode;\n\t\t\t}\n\n\t\t\tif (c) {\n\t\t\t\toffsetC = 0;\n\t\t\t\tn = containerA.firstChild;\n\n\t\t\t\twhile (n != c && offsetC < offsetA) {\n\t\t\t\t\toffsetC++;\n\t\t\t\t\tn = n.nextSibling;\n\t\t\t\t}\n\n\t\t\t\tif (offsetA <= offsetC) {\n\t\t\t\t\treturn -1; // before\n\t\t\t\t}\n\n\t\t\t\treturn 1; // after\n\t\t\t}\n\n\t\t\t// In the third case a child node C of the container of B is an ancestor container\n\t\t\t// of A. In this case, A is before B if the index of the child node C is less than\n\t\t\t// the offset of B and A is after B otherwise.\n\t\t\tc = containerA;\n\t\t\twhile (c && c.parentNode != containerB) {\n\t\t\t\tc = c.parentNode;\n\t\t\t}\n\n\t\t\tif (c) {\n\t\t\t\toffsetC = 0;\n\t\t\t\tn = containerB.firstChild;\n\n\t\t\t\twhile (n != c && offsetC < offsetB) {\n\t\t\t\t\toffsetC++;\n\t\t\t\t\tn = n.nextSibling;\n\t\t\t\t}\n\n\t\t\t\tif (offsetC < offsetB) {\n\t\t\t\t\treturn -1; // before\n\t\t\t\t}\n\n\t\t\t\treturn 1; // after\n\t\t\t}\n\n\t\t\t// In the fourth case, none of three other cases hold: the containers of A and B\n\t\t\t// are siblings or descendants of sibling nodes. In this case, A is before B if\n\t\t\t// the container of A is before the container of B in a pre-order traversal of the\n\t\t\t// Ranges' context tree and A is after B otherwise.\n\t\t\tcmnRoot = dom.findCommonAncestor(containerA, containerB);\n\t\t\tchildA = containerA;\n\n\t\t\twhile (childA && childA.parentNode != cmnRoot) {\n\t\t\t\tchildA = childA.parentNode;\n\t\t\t}\n\n\t\t\tif (!childA) {\n\t\t\t\tchildA = cmnRoot;\n\t\t\t}\n\n\t\t\tchildB = containerB;\n\t\t\twhile (childB && childB.parentNode != cmnRoot) {\n\t\t\t\tchildB = childB.parentNode;\n\t\t\t}\n\n\t\t\tif (!childB) {\n\t\t\t\tchildB = cmnRoot;\n\t\t\t}\n\n\t\t\tif (childA == childB) {\n\t\t\t\treturn 0; // equal\n\t\t\t}\n\n\t\t\tn = cmnRoot.firstChild;\n\t\t\twhile (n) {\n\t\t\t\tif (n == childA) {\n\t\t\t\t\treturn -1; // before\n\t\t\t\t}\n\n\t\t\t\tif (n == childB) {\n\t\t\t\t\treturn 1; // after\n\t\t\t\t}\n\n\t\t\t\tn = n.nextSibling;\n\t\t\t}\n\t\t}\n\n\t\tfunction _setEndPoint(st, n, o) {\n\t\t\tvar ec, sc;\n\n\t\t\tif (st) {\n\t\t\t\tself[START_CONTAINER] = n;\n\t\t\t\tself[START_OFFSET] = o;\n\t\t\t} else {\n\t\t\t\tself[END_CONTAINER] = n;\n\t\t\t\tself[END_OFFSET] = o;\n\t\t\t}\n\n\t\t\t// If one boundary-point of a Range is set to have a root container\n\t\t\t// other than the current one for the Range, the Range is collapsed to\n\t\t\t// the new position. This enforces the restriction that both boundary-\n\t\t\t// points of a Range must have the same root container.\n\t\t\tec = self[END_CONTAINER];\n\t\t\twhile (ec.parentNode) {\n\t\t\t\tec = ec.parentNode;\n\t\t\t}\n\n\t\t\tsc = self[START_CONTAINER];\n\t\t\twhile (sc.parentNode) {\n\t\t\t\tsc = sc.parentNode;\n\t\t\t}\n\n\t\t\tif (sc == ec) {\n\t\t\t\t// The start position of a Range is guaranteed to never be after the\n\t\t\t\t// end position. To enforce this restriction, if the start is set to\n\t\t\t\t// be at a position after the end, the Range is collapsed to that\n\t\t\t\t// position.\n\t\t\t\tif (_compareBoundaryPoints(self[START_CONTAINER], self[START_OFFSET], self[END_CONTAINER], self[END_OFFSET]) > 0) {\n\t\t\t\t\tself.collapse(st);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tself.collapse(st);\n\t\t\t}\n\n\t\t\tself.collapsed = _isCollapsed();\n\t\t\tself.commonAncestorContainer = dom.findCommonAncestor(self[START_CONTAINER], self[END_CONTAINER]);\n\t\t}\n\n\t\tfunction _traverse(how) {\n\t\t\tvar c, endContainerDepth = 0, startContainerDepth = 0, p, depthDiff, startNode, endNode, sp, ep;\n\n\t\t\tif (self[START_CONTAINER] == self[END_CONTAINER]) {\n\t\t\t\treturn _traverseSameContainer(how);\n\t\t\t}\n\n\t\t\tfor (c = self[END_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) {\n\t\t\t\tif (p == self[START_CONTAINER]) {\n\t\t\t\t\treturn _traverseCommonStartContainer(c, how);\n\t\t\t\t}\n\n\t\t\t\t++endContainerDepth;\n\t\t\t}\n\n\t\t\tfor (c = self[START_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) {\n\t\t\t\tif (p == self[END_CONTAINER]) {\n\t\t\t\t\treturn _traverseCommonEndContainer(c, how);\n\t\t\t\t}\n\n\t\t\t\t++startContainerDepth;\n\t\t\t}\n\n\t\t\tdepthDiff = startContainerDepth - endContainerDepth;\n\n\t\t\tstartNode = self[START_CONTAINER];\n\t\t\twhile (depthDiff > 0) {\n\t\t\t\tstartNode = startNode.parentNode;\n\t\t\t\tdepthDiff--;\n\t\t\t}\n\n\t\t\tendNode = self[END_CONTAINER];\n\t\t\twhile (depthDiff < 0) {\n\t\t\t\tendNode = endNode.parentNode;\n\t\t\t\tdepthDiff++;\n\t\t\t}\n\n\t\t\t// ascend the ancestor hierarchy until we have a common parent.\n\t\t\tfor (sp = startNode.parentNode, ep = endNode.parentNode; sp != ep; sp = sp.parentNode, ep = ep.parentNode) {\n\t\t\t\tstartNode = sp;\n\t\t\t\tendNode = ep;\n\t\t\t}\n\n\t\t\treturn _traverseCommonAncestors(startNode, endNode, how);\n\t\t}\n\n\t\tfunction _traverseSameContainer(how) {\n\t\t\tvar frag, s, sub, n, cnt, sibling, xferNode, start, len;\n\n\t\t\tif (how != DELETE) {\n\t\t\t\tfrag = createDocumentFragment();\n\t\t\t}\n\n\t\t\t// If selection is empty, just return the fragment\n\t\t\tif (self[START_OFFSET] == self[END_OFFSET]) {\n\t\t\t\treturn frag;\n\t\t\t}\n\n\t\t\t// Text node needs special case handling\n\t\t\tif (self[START_CONTAINER].nodeType == 3) { // TEXT_NODE\n\t\t\t\t// get the substring\n\t\t\t\ts = self[START_CONTAINER].nodeValue;\n\t\t\t\tsub = s.substring(self[START_OFFSET], self[END_OFFSET]);\n\n\t\t\t\t// set the original text node to its new value\n\t\t\t\tif (how != CLONE) {\n\t\t\t\t\tn = self[START_CONTAINER];\n\t\t\t\t\tstart = self[START_OFFSET];\n\t\t\t\t\tlen = self[END_OFFSET] - self[START_OFFSET];\n\n\t\t\t\t\tif (start === 0 && len >= n.nodeValue.length - 1) {\n\t\t\t\t\t\tn.parentNode.removeChild(n);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tn.deleteData(start, len);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Nothing is partially selected, so collapse to start point\n\t\t\t\t\tself.collapse(TRUE);\n\t\t\t\t}\n\n\t\t\t\tif (how == DELETE) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (sub.length > 0) {\n\t\t\t\t\tfrag.appendChild(doc.createTextNode(sub));\n\t\t\t\t}\n\n\t\t\t\treturn frag;\n\t\t\t}\n\n\t\t\t// Copy nodes between the start/end offsets.\n\t\t\tn = _getSelectedNode(self[START_CONTAINER], self[START_OFFSET]);\n\t\t\tcnt = self[END_OFFSET] - self[START_OFFSET];\n\n\t\t\twhile (n && cnt > 0) {\n\t\t\t\tsibling = n.nextSibling;\n\t\t\t\txferNode = _traverseFullySelected(n, how);\n\n\t\t\t\tif (frag) {\n\t\t\t\t\tfrag.appendChild(xferNode);\n\t\t\t\t}\n\n\t\t\t\t--cnt;\n\t\t\t\tn = sibling;\n\t\t\t}\n\n\t\t\t// Nothing is partially selected, so collapse to start point\n\t\t\tif (how != CLONE) {\n\t\t\t\tself.collapse(TRUE);\n\t\t\t}\n\n\t\t\treturn frag;\n\t\t}\n\n\t\tfunction _traverseCommonStartContainer(endAncestor, how) {\n\t\t\tvar frag, n, endIdx, cnt, sibling, xferNode;\n\n\t\t\tif (how != DELETE) {\n\t\t\t\tfrag = createDocumentFragment();\n\t\t\t}\n\n\t\t\tn = _traverseRightBoundary(endAncestor, how);\n\n\t\t\tif (frag) {\n\t\t\t\tfrag.appendChild(n);\n\t\t\t}\n\n\t\t\tendIdx = nodeIndex(endAncestor);\n\t\t\tcnt = endIdx - self[START_OFFSET];\n\n\t\t\tif (cnt <= 0) {\n\t\t\t\t// Collapse to just before the endAncestor, which\n\t\t\t\t// is partially selected.\n\t\t\t\tif (how != CLONE) {\n\t\t\t\t\tself.setEndBefore(endAncestor);\n\t\t\t\t\tself.collapse(FALSE);\n\t\t\t\t}\n\n\t\t\t\treturn frag;\n\t\t\t}\n\n\t\t\tn = endAncestor.previousSibling;\n\t\t\twhile (cnt > 0) {\n\t\t\t\tsibling = n.previousSibling;\n\t\t\t\txferNode = _traverseFullySelected(n, how);\n\n\t\t\t\tif (frag) {\n\t\t\t\t\tfrag.insertBefore(xferNode, frag.firstChild);\n\t\t\t\t}\n\n\t\t\t\t--cnt;\n\t\t\t\tn = sibling;\n\t\t\t}\n\n\t\t\t// Collapse to just before the endAncestor, which\n\t\t\t// is partially selected.\n\t\t\tif (how != CLONE) {\n\t\t\t\tself.setEndBefore(endAncestor);\n\t\t\t\tself.collapse(FALSE);\n\t\t\t}\n\n\t\t\treturn frag;\n\t\t}\n\n\t\tfunction _traverseCommonEndContainer(startAncestor, how) {\n\t\t\tvar frag, startIdx, n, cnt, sibling, xferNode;\n\n\t\t\tif (how != DELETE) {\n\t\t\t\tfrag = createDocumentFragment();\n\t\t\t}\n\n\t\t\tn = _traverseLeftBoundary(startAncestor, how);\n\t\t\tif (frag) {\n\t\t\t\tfrag.appendChild(n);\n\t\t\t}\n\n\t\t\tstartIdx = nodeIndex(startAncestor);\n\t\t\t++startIdx; // Because we already traversed it\n\n\t\t\tcnt = self[END_OFFSET] - startIdx;\n\t\t\tn = startAncestor.nextSibling;\n\t\t\twhile (n && cnt > 0) {\n\t\t\t\tsibling = n.nextSibling;\n\t\t\t\txferNode = _traverseFullySelected(n, how);\n\n\t\t\t\tif (frag) {\n\t\t\t\t\tfrag.appendChild(xferNode);\n\t\t\t\t}\n\n\t\t\t\t--cnt;\n\t\t\t\tn = sibling;\n\t\t\t}\n\n\t\t\tif (how != CLONE) {\n\t\t\t\tself.setStartAfter(startAncestor);\n\t\t\t\tself.collapse(TRUE);\n\t\t\t}\n\n\t\t\treturn frag;\n\t\t}\n\n\t\tfunction _traverseCommonAncestors(startAncestor, endAncestor, how) {\n\t\t\tvar n, frag, startOffset, endOffset, cnt, sibling, nextSibling;\n\n\t\t\tif (how != DELETE) {\n\t\t\t\tfrag = createDocumentFragment();\n\t\t\t}\n\n\t\t\tn = _traverseLeftBoundary(startAncestor, how);\n\t\t\tif (frag) {\n\t\t\t\tfrag.appendChild(n);\n\t\t\t}\n\n\t\t\tstartOffset = nodeIndex(startAncestor);\n\t\t\tendOffset = nodeIndex(endAncestor);\n\t\t\t++startOffset;\n\n\t\t\tcnt = endOffset - startOffset;\n\t\t\tsibling = startAncestor.nextSibling;\n\n\t\t\twhile (cnt > 0) {\n\t\t\t\tnextSibling = sibling.nextSibling;\n\t\t\t\tn = _traverseFullySelected(sibling, how);\n\n\t\t\t\tif (frag) {\n\t\t\t\t\tfrag.appendChild(n);\n\t\t\t\t}\n\n\t\t\t\tsibling = nextSibling;\n\t\t\t\t--cnt;\n\t\t\t}\n\n\t\t\tn = _traverseRightBoundary(endAncestor, how);\n\n\t\t\tif (frag) {\n\t\t\t\tfrag.appendChild(n);\n\t\t\t}\n\n\t\t\tif (how != CLONE) {\n\t\t\t\tself.setStartAfter(startAncestor);\n\t\t\t\tself.collapse(TRUE);\n\t\t\t}\n\n\t\t\treturn frag;\n\t\t}\n\n\t\tfunction _traverseRightBoundary(root, how) {\n\t\t\tvar next = _getSelectedNode(self[END_CONTAINER], self[END_OFFSET] - 1), parent, clonedParent;\n\t\t\tvar prevSibling, clonedChild, clonedGrandParent, isFullySelected = next != self[END_CONTAINER];\n\n\t\t\tif (next == root) {\n\t\t\t\treturn _traverseNode(next, isFullySelected, FALSE, how);\n\t\t\t}\n\n\t\t\tparent = next.parentNode;\n\t\t\tclonedParent = _traverseNode(parent, FALSE, FALSE, how);\n\n\t\t\twhile (parent) {\n\t\t\t\twhile (next) {\n\t\t\t\t\tprevSibling = next.previousSibling;\n\t\t\t\t\tclonedChild = _traverseNode(next, isFullySelected, FALSE, how);\n\n\t\t\t\t\tif (how != DELETE) {\n\t\t\t\t\t\tclonedParent.insertBefore(clonedChild, clonedParent.firstChild);\n\t\t\t\t\t}\n\n\t\t\t\t\tisFullySelected = TRUE;\n\t\t\t\t\tnext = prevSibling;\n\t\t\t\t}\n\n\t\t\t\tif (parent == root) {\n\t\t\t\t\treturn clonedParent;\n\t\t\t\t}\n\n\t\t\t\tnext = parent.previousSibling;\n\t\t\t\tparent = parent.parentNode;\n\n\t\t\t\tclonedGrandParent = _traverseNode(parent, FALSE, FALSE, how);\n\n\t\t\t\tif (how != DELETE) {\n\t\t\t\t\tclonedGrandParent.appendChild(clonedParent);\n\t\t\t\t}\n\n\t\t\t\tclonedParent = clonedGrandParent;\n\t\t\t}\n\t\t}\n\n\t\tfunction _traverseLeftBoundary(root, how) {\n\t\t\tvar next = _getSelectedNode(self[START_CONTAINER], self[START_OFFSET]), isFullySelected = next != self[START_CONTAINER];\n\t\t\tvar parent, clonedParent, nextSibling, clonedChild, clonedGrandParent;\n\n\t\t\tif (next == root) {\n\t\t\t\treturn _traverseNode(next, isFullySelected, TRUE, how);\n\t\t\t}\n\n\t\t\tparent = next.parentNode;\n\t\t\tclonedParent = _traverseNode(parent, FALSE, TRUE, how);\n\n\t\t\twhile (parent) {\n\t\t\t\twhile (next) {\n\t\t\t\t\tnextSibling = next.nextSibling;\n\t\t\t\t\tclonedChild = _traverseNode(next, isFullySelected, TRUE, how);\n\n\t\t\t\t\tif (how != DELETE) {\n\t\t\t\t\t\tclonedParent.appendChild(clonedChild);\n\t\t\t\t\t}\n\n\t\t\t\t\tisFullySelected = TRUE;\n\t\t\t\t\tnext = nextSibling;\n\t\t\t\t}\n\n\t\t\t\tif (parent == root) {\n\t\t\t\t\treturn clonedParent;\n\t\t\t\t}\n\n\t\t\t\tnext = parent.nextSibling;\n\t\t\t\tparent = parent.parentNode;\n\n\t\t\t\tclonedGrandParent = _traverseNode(parent, FALSE, TRUE, how);\n\n\t\t\t\tif (how != DELETE) {\n\t\t\t\t\tclonedGrandParent.appendChild(clonedParent);\n\t\t\t\t}\n\n\t\t\t\tclonedParent = clonedGrandParent;\n\t\t\t}\n\t\t}\n\n\t\tfunction _traverseNode(n, isFullySelected, isLeft, how) {\n\t\t\tvar txtValue, newNodeValue, oldNodeValue, offset, newNode;\n\n\t\t\tif (isFullySelected) {\n\t\t\t\treturn _traverseFullySelected(n, how);\n\t\t\t}\n\n\t\t\t// TEXT_NODE\n\t\t\tif (n.nodeType == 3) {\n\t\t\t\ttxtValue = n.nodeValue;\n\n\t\t\t\tif (isLeft) {\n\t\t\t\t\toffset = self[START_OFFSET];\n\t\t\t\t\tnewNodeValue = txtValue.substring(offset);\n\t\t\t\t\toldNodeValue = txtValue.substring(0, offset);\n\t\t\t\t} else {\n\t\t\t\t\toffset = self[END_OFFSET];\n\t\t\t\t\tnewNodeValue = txtValue.substring(0, offset);\n\t\t\t\t\toldNodeValue = txtValue.substring(offset);\n\t\t\t\t}\n\n\t\t\t\tif (how != CLONE) {\n\t\t\t\t\tn.nodeValue = oldNodeValue;\n\t\t\t\t}\n\n\t\t\t\tif (how == DELETE) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tnewNode = dom.clone(n, FALSE);\n\t\t\t\tnewNode.nodeValue = newNodeValue;\n\n\t\t\t\treturn newNode;\n\t\t\t}\n\n\t\t\tif (how == DELETE) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn dom.clone(n, FALSE);\n\t\t}\n\n\t\tfunction _traverseFullySelected(n, how) {\n\t\t\tif (how != DELETE) {\n\t\t\t\treturn how == CLONE ? dom.clone(n, TRUE) : n;\n\t\t\t}\n\n\t\t\tn.parentNode.removeChild(n);\n\t\t}\n\n\t\tfunction toStringIE() {\n\t\t\treturn dom.create('body', null, cloneContents()).outerText;\n\t\t}\n\n\t\textend(self, {\n\t\t\t// Initial states\n\t\t\tstartContainer: doc,\n\t\t\tstartOffset: 0,\n\t\t\tendContainer: doc,\n\t\t\tendOffset: 0,\n\t\t\tcollapsed: TRUE,\n\t\t\tcommonAncestorContainer: doc,\n\n\t\t\t// Range constants\n\t\t\tSTART_TO_START: 0,\n\t\t\tSTART_TO_END: 1,\n\t\t\tEND_TO_END: 2,\n\t\t\tEND_TO_START: 3,\n\n\t\t\t// Public methods\n\t\t\tsetStart: setStart,\n\t\t\tsetEnd: setEnd,\n\t\t\tsetStartBefore: setStartBefore,\n\t\t\tsetStartAfter: setStartAfter,\n\t\t\tsetEndBefore: setEndBefore,\n\t\t\tsetEndAfter: setEndAfter,\n\t\t\tcollapse: collapse,\n\t\t\tselectNode: selectNode,\n\t\t\tselectNodeContents: selectNodeContents,\n\t\t\tcompareBoundaryPoints: compareBoundaryPoints,\n\t\t\tdeleteContents: deleteContents,\n\t\t\textractContents: extractContents,\n\t\t\tcloneContents: cloneContents,\n\t\t\tinsertNode: insertNode,\n\t\t\tsurroundContents: surroundContents,\n\t\t\tcloneRange: cloneRange,\n\t\t\ttoStringIE: toStringIE\n\t\t});\n\n\t\treturn self;\n\t}\n\n\t// Older IE versions doesn't let you override toString by it's constructor so we have to stick it in the prototype\n\tRange.prototype.toString = function() {\n\t\treturn this.toStringIE();\n\t};\n\n\treturn Range;\n});\n\n// Included from: js/tinymce/classes/html/Entities.js\n\n/**\n * Entities.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/*jshint bitwise:false */\n/*eslint no-bitwise:0 */\n\n/**\n * Entity encoder class.\n *\n * @class tinymce.html.Entities\n * @static\n * @version 3.4\n */\ndefine(\"tinymce/html/Entities\", [\n\t\"tinymce/util/Tools\"\n], function(Tools) {\n\tvar makeMap = Tools.makeMap;\n\n\tvar namedEntities, baseEntities, reverseEntities,\n\t\tattrsCharsRegExp = /[&<>\\\"\\u0060\\u007E-\\uD7FF\\uE000-\\uFFEF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\n\t\ttextCharsRegExp = /[<>&\\u007E-\\uD7FF\\uE000-\\uFFEF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\n\t\trawCharsRegExp = /[<>&\\\"\\']/g,\n\t\tentityRegExp = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi,\n\t\tasciiMap = {\n\t\t\t128: \"\\u20AC\", 130: \"\\u201A\", 131: \"\\u0192\", 132: \"\\u201E\", 133: \"\\u2026\", 134: \"\\u2020\",\n\t\t\t135: \"\\u2021\", 136: \"\\u02C6\", 137: \"\\u2030\", 138: \"\\u0160\", 139: \"\\u2039\", 140: \"\\u0152\",\n\t\t\t142: \"\\u017D\", 145: \"\\u2018\", 146: \"\\u2019\", 147: \"\\u201C\", 148: \"\\u201D\", 149: \"\\u2022\",\n\t\t\t150: \"\\u2013\", 151: \"\\u2014\", 152: \"\\u02DC\", 153: \"\\u2122\", 154: \"\\u0161\", 155: \"\\u203A\",\n\t\t\t156: \"\\u0153\", 158: \"\\u017E\", 159: \"\\u0178\"\n\t\t};\n\n\t// Raw entities\n\tbaseEntities = {\n\t\t'\\\"': '"', // Needs to be escaped since the YUI compressor would otherwise break the code\n\t\t\"'\": ''',\n\t\t'<': '<',\n\t\t'>': '>',\n\t\t'&': '&',\n\t\t'\\u0060': '`'\n\t};\n\n\t// Reverse lookup table for raw entities\n\treverseEntities = {\n\t\t'<': '<',\n\t\t'>': '>',\n\t\t'&': '&',\n\t\t'"': '\"',\n\t\t''': \"'\"\n\t};\n\n\t// Decodes text by using the browser\n\tfunction nativeDecode(text) {\n\t\tvar elm;\n\n\t\telm = document.createElement(\"div\");\n\t\telm.innerHTML = text;\n\n\t\treturn elm.textContent || elm.innerText || text;\n\t}\n\n\t// Build a two way lookup table for the entities\n\tfunction buildEntitiesLookup(items, radix) {\n\t\tvar i, chr, entity, lookup = {};\n\n\t\tif (items) {\n\t\t\titems = items.split(',');\n\t\t\tradix = radix || 10;\n\n\t\t\t// Build entities lookup table\n\t\t\tfor (i = 0; i < items.length; i += 2) {\n\t\t\t\tchr = String.fromCharCode(parseInt(items[i], radix));\n\n\t\t\t\t// Only add non base entities\n\t\t\t\tif (!baseEntities[chr]) {\n\t\t\t\t\tentity = '&' + items[i + 1] + ';';\n\t\t\t\t\tlookup[chr] = entity;\n\t\t\t\t\tlookup[entity] = chr;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn lookup;\n\t\t}\n\t}\n\n\t// Unpack entities lookup where the numbers are in radix 32 to reduce the size\n\tnamedEntities = buildEntitiesLookup(\n\t\t'50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,' +\n\t\t'5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,' +\n\t\t'5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,' +\n\t\t'5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,' +\n\t\t'68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,' +\n\t\t'6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,' +\n\t\t'6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,' +\n\t\t'75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,' +\n\t\t'7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,' +\n\t\t'7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,' +\n\t\t'sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,' +\n\t\t'st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,' +\n\t\t't9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,' +\n\t\t'tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,' +\n\t\t'u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,' +\n\t\t'81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,' +\n\t\t'8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,' +\n\t\t'8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,' +\n\t\t'8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,' +\n\t\t'8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,' +\n\t\t'nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,' +\n\t\t'rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,' +\n\t\t'Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,' +\n\t\t'80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,' +\n\t\t'811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro', 32);\n\n\tvar Entities = {\n\t\t/**\n\t\t * Encodes the specified string using raw entities. This means only the required XML base entities will be encoded.\n\t\t *\n\t\t * @method encodeRaw\n\t\t * @param {String} text Text to encode.\n\t\t * @param {Boolean} attr Optional flag to specify if the text is attribute contents.\n\t\t * @return {String} Entity encoded text.\n\t\t */\n\t\tencodeRaw: function(text, attr) {\n\t\t\treturn text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {\n\t\t\t\treturn baseEntities[chr] || chr;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Encoded the specified text with both the attributes and text entities. This function will produce larger text contents\n\t\t * since it doesn't know if the context is within a attribute or text node. This was added for compatibility\n\t\t * and is exposed as the DOMUtils.encode function.\n\t\t *\n\t\t * @method encodeAllRaw\n\t\t * @param {String} text Text to encode.\n\t\t * @return {String} Entity encoded text.\n\t\t */\n\t\tencodeAllRaw: function(text) {\n\t\t\treturn ('' + text).replace(rawCharsRegExp, function(chr) {\n\t\t\t\treturn baseEntities[chr] || chr;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Encodes the specified string using numeric entities. The core entities will be\n\t\t * encoded as named ones but all non lower ascii characters will be encoded into numeric entities.\n\t\t *\n\t\t * @method encodeNumeric\n\t\t * @param {String} text Text to encode.\n\t\t * @param {Boolean} attr Optional flag to specify if the text is attribute contents.\n\t\t * @return {String} Entity encoded text.\n\t\t */\n\t\tencodeNumeric: function(text, attr) {\n\t\t\treturn text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {\n\t\t\t\t// Multi byte sequence convert it to a single entity\n\t\t\t\tif (chr.length > 1) {\n\t\t\t\t\treturn '&#' + (((chr.charCodeAt(0) - 0xD800) * 0x400) + (chr.charCodeAt(1) - 0xDC00) + 0x10000) + ';';\n\t\t\t\t}\n\n\t\t\t\treturn baseEntities[chr] || '&#' + chr.charCodeAt(0) + ';';\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Encodes the specified string using named entities. The core entities will be encoded\n\t\t * as named ones but all non lower ascii characters will be encoded into named entities.\n\t\t *\n\t\t * @method encodeNamed\n\t\t * @param {String} text Text to encode.\n\t\t * @param {Boolean} attr Optional flag to specify if the text is attribute contents.\n\t\t * @param {Object} entities Optional parameter with entities to use.\n\t\t * @return {String} Entity encoded text.\n\t\t */\n\t\tencodeNamed: function(text, attr, entities) {\n\t\t\tentities = entities || namedEntities;\n\n\t\t\treturn text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {\n\t\t\t\treturn baseEntities[chr] || entities[chr] || chr;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Returns an encode function based on the name(s) and it's optional entities.\n\t\t *\n\t\t * @method getEncodeFunc\n\t\t * @param {String} name Comma separated list of encoders for example named,numeric.\n\t\t * @param {String} entities Optional parameter with entities to use instead of the built in set.\n\t\t * @return {function} Encode function to be used.\n\t\t */\n\t\tgetEncodeFunc: function(name, entities) {\n\t\t\tentities = buildEntitiesLookup(entities) || namedEntities;\n\n\t\t\tfunction encodeNamedAndNumeric(text, attr) {\n\t\t\t\treturn text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {\n\t\t\t\t\treturn baseEntities[chr] || entities[chr] || '&#' + chr.charCodeAt(0) + ';' || chr;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfunction encodeCustomNamed(text, attr) {\n\t\t\t\treturn Entities.encodeNamed(text, attr, entities);\n\t\t\t}\n\n\t\t\t// Replace + with , to be compatible with previous TinyMCE versions\n\t\t\tname = makeMap(name.replace(/\\+/g, ','));\n\n\t\t\t// Named and numeric encoder\n\t\t\tif (name.named && name.numeric) {\n\t\t\t\treturn encodeNamedAndNumeric;\n\t\t\t}\n\n\t\t\t// Named encoder\n\t\t\tif (name.named) {\n\t\t\t\t// Custom names\n\t\t\t\tif (entities) {\n\t\t\t\t\treturn encodeCustomNamed;\n\t\t\t\t}\n\n\t\t\t\treturn Entities.encodeNamed;\n\t\t\t}\n\n\t\t\t// Numeric\n\t\t\tif (name.numeric) {\n\t\t\t\treturn Entities.encodeNumeric;\n\t\t\t}\n\n\t\t\t// Raw encoder\n\t\t\treturn Entities.encodeRaw;\n\t\t},\n\n\t\t/**\n\t\t * Decodes the specified string, this will replace entities with raw UTF characters.\n\t\t *\n\t\t * @method decode\n\t\t * @param {String} text Text to entity decode.\n\t\t * @return {String} Entity decoded string.\n\t\t */\n\t\tdecode: function(text) {\n\t\t\treturn text.replace(entityRegExp, function(all, numeric) {\n\t\t\t\tif (numeric) {\n\t\t\t\t\tif (numeric.charAt(0).toLowerCase() === 'x') {\n\t\t\t\t\t\tnumeric = parseInt(numeric.substr(1), 16);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnumeric = parseInt(numeric, 10);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support upper UTF\n\t\t\t\t\tif (numeric > 0xFFFF) {\n\t\t\t\t\t\tnumeric -= 0x10000;\n\n\t\t\t\t\t\treturn String.fromCharCode(0xD800 + (numeric >> 10), 0xDC00 + (numeric & 0x3FF));\n\t\t\t\t\t}\n\n\t\t\t\t\treturn asciiMap[numeric] || String.fromCharCode(numeric);\n\t\t\t\t}\n\n\t\t\t\treturn reverseEntities[all] || namedEntities[all] || nativeDecode(all);\n\t\t\t});\n\t\t}\n\t};\n\n\treturn Entities;\n});\n\n// Included from: js/tinymce/classes/dom/StyleSheetLoader.js\n\n/**\n * StyleSheetLoader.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class handles loading of external stylesheets and fires events when these are loaded.\n *\n * @class tinymce.dom.StyleSheetLoader\n * @private\n */\ndefine(\"tinymce/dom/StyleSheetLoader\", [\n\t\"tinymce/util/Tools\",\n\t\"tinymce/util/Delay\"\n], function(Tools, Delay) {\n\t\"use strict\";\n\n\treturn function(document, settings) {\n\t\tvar idCount = 0, loadedStates = {}, maxLoadTime;\n\n\t\tsettings = settings || {};\n\t\tmaxLoadTime = settings.maxLoadTime || 5000;\n\n\t\tfunction appendToHead(node) {\n\t\t\tdocument.getElementsByTagName('head')[0].appendChild(node);\n\t\t}\n\n\t\t/**\n\t\t * Loads the specified css style sheet file and call the loadedCallback once it's finished loading.\n\t\t *\n\t\t * @method load\n\t\t * @param {String} url Url to be loaded.\n\t\t * @param {Function} loadedCallback Callback to be executed when loaded.\n\t\t * @param {Function} errorCallback Callback to be executed when failed loading.\n\t\t */\n\t\tfunction load(url, loadedCallback, errorCallback) {\n\t\t\tvar link, style, startTime, state;\n\n\t\t\tfunction passed() {\n\t\t\t\tvar callbacks = state.passed, i = callbacks.length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tcallbacks[i]();\n\t\t\t\t}\n\n\t\t\t\tstate.status = 2;\n\t\t\t\tstate.passed = [];\n\t\t\t\tstate.failed = [];\n\t\t\t}\n\n\t\t\tfunction failed() {\n\t\t\t\tvar callbacks = state.failed, i = callbacks.length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tcallbacks[i]();\n\t\t\t\t}\n\n\t\t\t\tstate.status = 3;\n\t\t\t\tstate.passed = [];\n\t\t\t\tstate.failed = [];\n\t\t\t}\n\n\t\t\t// Sniffs for older WebKit versions that have the link.onload but a broken one\n\t\t\tfunction isOldWebKit() {\n\t\t\t\tvar webKitChunks = navigator.userAgent.match(/WebKit\\/(\\d*)/);\n\t\t\t\treturn !!(webKitChunks && webKitChunks[1] < 536);\n\t\t\t}\n\n\t\t\t// Calls the waitCallback until the test returns true or the timeout occurs\n\t\t\tfunction wait(testCallback, waitCallback) {\n\t\t\t\tif (!testCallback()) {\n\t\t\t\t\t// Wait for timeout\n\t\t\t\t\tif ((new Date().getTime()) - startTime < maxLoadTime) {\n\t\t\t\t\t\tDelay.setTimeout(waitCallback);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfailed();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Workaround for WebKit that doesn't properly support the onload event for link elements\n\t\t\t// Or WebKit that fires the onload event before the StyleSheet is added to the document\n\t\t\tfunction waitForWebKitLinkLoaded() {\n\t\t\t\twait(function() {\n\t\t\t\t\tvar styleSheets = document.styleSheets, styleSheet, i = styleSheets.length, owner;\n\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tstyleSheet = styleSheets[i];\n\t\t\t\t\t\towner = styleSheet.ownerNode ? styleSheet.ownerNode : styleSheet.owningElement;\n\t\t\t\t\t\tif (owner && owner.id === link.id) {\n\t\t\t\t\t\t\tpassed();\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}, waitForWebKitLinkLoaded);\n\t\t\t}\n\n\t\t\t// Workaround for older Geckos that doesn't have any onload event for StyleSheets\n\t\t\tfunction waitForGeckoLinkLoaded() {\n\t\t\t\twait(function() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Accessing the cssRules will throw an exception until the CSS file is loaded\n\t\t\t\t\t\tvar cssRules = style.sheet.cssRules;\n\t\t\t\t\t\tpassed();\n\t\t\t\t\t\treturn !!cssRules;\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t// Ignore\n\t\t\t\t\t}\n\t\t\t\t}, waitForGeckoLinkLoaded);\n\t\t\t}\n\n\t\t\turl = Tools._addCacheSuffix(url);\n\n\t\t\tif (!loadedStates[url]) {\n\t\t\t\tstate = {\n\t\t\t\t\tpassed: [],\n\t\t\t\t\tfailed: []\n\t\t\t\t};\n\n\t\t\t\tloadedStates[url] = state;\n\t\t\t} else {\n\t\t\t\tstate = loadedStates[url];\n\t\t\t}\n\n\t\t\tif (loadedCallback) {\n\t\t\t\tstate.passed.push(loadedCallback);\n\t\t\t}\n\n\t\t\tif (errorCallback) {\n\t\t\t\tstate.failed.push(errorCallback);\n\t\t\t}\n\n\t\t\t// Is loading wait for it to pass\n\t\t\tif (state.status == 1) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Has finished loading and was success\n\t\t\tif (state.status == 2) {\n\t\t\t\tpassed();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Has finished loading and was a failure\n\t\t\tif (state.status == 3) {\n\t\t\t\tfailed();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Start loading\n\t\t\tstate.status = 1;\n\t\t\tlink = document.createElement('link');\n\t\t\tlink.rel = 'stylesheet';\n\t\t\tlink.type = 'text/css';\n\t\t\tlink.id = 'u' + (idCount++);\n\t\t\tlink.async = false;\n\t\t\tlink.defer = false;\n\t\t\tstartTime = new Date().getTime();\n\n\t\t\t// Feature detect onload on link element and sniff older webkits since it has an broken onload event\n\t\t\tif (\"onload\" in link && !isOldWebKit()) {\n\t\t\t\tlink.onload = waitForWebKitLinkLoaded;\n\t\t\t\tlink.onerror = failed;\n\t\t\t} else {\n\t\t\t\t// Sniff for old Firefox that doesn't support the onload event on link elements\n\t\t\t\t// TODO: Remove this in the future when everyone uses modern browsers\n\t\t\t\tif (navigator.userAgent.indexOf(\"Firefox\") > 0) {\n\t\t\t\t\tstyle = document.createElement('style');\n\t\t\t\t\tstyle.textContent = '@import \"' + url + '\"';\n\t\t\t\t\twaitForGeckoLinkLoaded();\n\t\t\t\t\tappendToHead(style);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Use the id owner on older webkits\n\t\t\t\twaitForWebKitLinkLoaded();\n\t\t\t}\n\n\t\t\tappendToHead(link);\n\t\t\tlink.href = url;\n\t\t}\n\n\t\tthis.load = load;\n\t};\n});\n\n// Included from: js/tinymce/classes/dom/DOMUtils.js\n\n/**\n * DOMUtils.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Utility class for various DOM manipulation and retrieval functions.\n *\n * @class tinymce.dom.DOMUtils\n * @example\n * // Add a class to an element by id in the page\n * tinymce.DOM.addClass('someid', 'someclass');\n *\n * // Add a class to an element by id inside the editor\n * tinymce.activeEditor.dom.addClass('someid', 'someclass');\n */\ndefine(\"tinymce/dom/DOMUtils\", [\n\t\"tinymce/dom/Sizzle\",\n\t\"tinymce/dom/DomQuery\",\n\t\"tinymce/html/Styles\",\n\t\"tinymce/dom/EventUtils\",\n\t\"tinymce/dom/TreeWalker\",\n\t\"tinymce/dom/Range\",\n\t\"tinymce/html/Entities\",\n\t\"tinymce/Env\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/dom/StyleSheetLoader\"\n], function(Sizzle, $, Styles, EventUtils, TreeWalker, Range, Entities, Env, Tools, StyleSheetLoader) {\n\t// Shorten names\n\tvar each = Tools.each, is = Tools.is, grep = Tools.grep, trim = Tools.trim;\n\tvar isIE = Env.ie;\n\tvar simpleSelectorRe = /^([a-z0-9],?)+$/i;\n\tvar whiteSpaceRegExp = /^[ \\t\\r\\n]*$/;\n\n\tfunction setupAttrHooks(domUtils, settings) {\n\t\tvar attrHooks = {}, keepValues = settings.keep_values, keepUrlHook;\n\n\t\tkeepUrlHook = {\n\t\t\tset: function($elm, value, name) {\n\t\t\t\tif (settings.url_converter) {\n\t\t\t\t\tvalue = settings.url_converter.call(settings.url_converter_scope || domUtils, value, name, $elm[0]);\n\t\t\t\t}\n\n\t\t\t\t$elm.attr('data-mce-' + name, value).attr(name, value);\n\t\t\t},\n\n\t\t\tget: function($elm, name) {\n\t\t\t\treturn $elm.attr('data-mce-' + name) || $elm.attr(name);\n\t\t\t}\n\t\t};\n\n\t\tattrHooks = {\n\t\t\tstyle: {\n\t\t\t\tset: function($elm, value) {\n\t\t\t\t\tif (value !== null && typeof value === 'object') {\n\t\t\t\t\t\t$elm.css(value);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (keepValues) {\n\t\t\t\t\t\t$elm.attr('data-mce-style', value);\n\t\t\t\t\t}\n\n\t\t\t\t\t$elm.attr('style', value);\n\t\t\t\t},\n\n\t\t\t\tget: function($elm) {\n\t\t\t\t\tvar value = $elm.attr('data-mce-style') || $elm.attr('style');\n\n\t\t\t\t\tvalue = domUtils.serializeStyle(domUtils.parseStyle(value), $elm[0].nodeName);\n\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif (keepValues) {\n\t\t\tattrHooks.href = attrHooks.src = keepUrlHook;\n\t\t}\n\n\t\treturn attrHooks;\n\t}\n\n\tfunction updateInternalStyleAttr(domUtils, $elm) {\n\t\tvar value = $elm.attr('style');\n\n\t\tvalue = domUtils.serializeStyle(domUtils.parseStyle(value), $elm[0].nodeName);\n\n\t\tif (!value) {\n\t\t\tvalue = null;\n\t\t}\n\n\t\t$elm.attr('data-mce-style', value);\n\t}\n\n\tfunction nodeIndex(node, normalized) {\n\t\tvar idx = 0, lastNodeType, nodeType;\n\n\t\tif (node) {\n\t\t\tfor (lastNodeType = node.nodeType, node = node.previousSibling; node; node = node.previousSibling) {\n\t\t\t\tnodeType = node.nodeType;\n\n\t\t\t\t// Normalize text nodes\n\t\t\t\tif (normalized && nodeType == 3) {\n\t\t\t\t\tif (nodeType == lastNodeType || !node.nodeValue.length) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tidx++;\n\t\t\t\tlastNodeType = nodeType;\n\t\t\t}\n\t\t}\n\n\t\treturn idx;\n\t}\n\n\t/**\n\t * Constructs a new DOMUtils instance. Consult the Wiki for more details on settings etc for this class.\n\t *\n\t * @constructor\n\t * @method DOMUtils\n\t * @param {Document} doc Document reference to bind the utility class to.\n\t * @param {settings} settings Optional settings collection.\n\t */\n\tfunction DOMUtils(doc, settings) {\n\t\tvar self = this, blockElementsMap;\n\n\t\tself.doc = doc;\n\t\tself.win = window;\n\t\tself.files = {};\n\t\tself.counter = 0;\n\t\tself.stdMode = !isIE || doc.documentMode >= 8;\n\t\tself.boxModel = !isIE || doc.compatMode == \"CSS1Compat\" || self.stdMode;\n\t\tself.styleSheetLoader = new StyleSheetLoader(doc);\n\t\tself.boundEvents = [];\n\t\tself.settings = settings = settings || {};\n\t\tself.schema = settings.schema;\n\t\tself.styles = new Styles({\n\t\t\turl_converter: settings.url_converter,\n\t\t\turl_converter_scope: settings.url_converter_scope\n\t\t}, settings.schema);\n\n\t\tself.fixDoc(doc);\n\t\tself.events = settings.ownEvents ? new EventUtils(settings.proxy) : EventUtils.Event;\n\t\tself.attrHooks = setupAttrHooks(self, settings);\n\t\tblockElementsMap = settings.schema ? settings.schema.getBlockElements() : {};\n\t\tself.$ = $.overrideDefaults(function() {\n\t\t\treturn {\n\t\t\t\tcontext: doc,\n\t\t\t\telement: self.getRoot()\n\t\t\t};\n\t\t});\n\n\t\t/**\n\t\t * Returns true/false if the specified element is a block element or not.\n\t\t *\n\t\t * @method isBlock\n\t\t * @param {Node/String} node Element/Node to check.\n\t\t * @return {Boolean} True/False state if the node is a block element or not.\n\t\t */\n\t\tself.isBlock = function(node) {\n\t\t\t// Fix for #5446\n\t\t\tif (!node) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// This function is called in module pattern style since it might be executed with the wrong this scope\n\t\t\tvar type = node.nodeType;\n\n\t\t\t// If it's a node then check the type and use the nodeName\n\t\t\tif (type) {\n\t\t\t\treturn !!(type === 1 && blockElementsMap[node.nodeName]);\n\t\t\t}\n\n\t\t\treturn !!blockElementsMap[node];\n\t\t};\n\t}\n\n\tDOMUtils.prototype = {\n\t\t$$: function(elm) {\n\t\t\tif (typeof elm == 'string') {\n\t\t\t\telm = this.get(elm);\n\t\t\t}\n\n\t\t\treturn this.$(elm);\n\t\t},\n\n\t\troot: null,\n\n\t\tfixDoc: function(doc) {\n\t\t\tvar settings = this.settings, name;\n\n\t\t\tif (isIE && settings.schema) {\n\t\t\t\t// Add missing HTML 4/5 elements to IE\n\t\t\t\t('abbr article aside audio canvas ' +\n\t\t\t\t'details figcaption figure footer ' +\n\t\t\t\t'header hgroup mark menu meter nav ' +\n\t\t\t\t'output progress section summary ' +\n\t\t\t\t'time video').replace(/\\w+/g, function(name) {\n\t\t\t\t\tdoc.createElement(name);\n\t\t\t\t});\n\n\t\t\t\t// Create all custom elements\n\t\t\t\tfor (name in settings.schema.getCustomElements()) {\n\t\t\t\t\tdoc.createElement(name);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tclone: function(node, deep) {\n\t\t\tvar self = this, clone, doc;\n\n\t\t\t// TODO: Add feature detection here in the future\n\t\t\tif (!isIE || node.nodeType !== 1 || deep) {\n\t\t\t\treturn node.cloneNode(deep);\n\t\t\t}\n\n\t\t\tdoc = self.doc;\n\n\t\t\t// Make a HTML5 safe shallow copy\n\t\t\tif (!deep) {\n\t\t\t\tclone = doc.createElement(node.nodeName);\n\n\t\t\t\t// Copy attribs\n\t\t\t\teach(self.getAttribs(node), function(attr) {\n\t\t\t\t\tself.setAttrib(clone, attr.nodeName, self.getAttrib(node, attr.nodeName));\n\t\t\t\t});\n\n\t\t\t\treturn clone;\n\t\t\t}\n\n\t\t\treturn clone.firstChild;\n\t\t},\n\n\t\t/**\n\t\t * Returns the root node of the document. This is normally the body but might be a DIV. Parents like getParent will not\n\t\t * go above the point of this root node.\n\t\t *\n\t\t * @method getRoot\n\t\t * @return {Element} Root element for the utility class.\n\t\t */\n\t\tgetRoot: function() {\n\t\t\tvar self = this;\n\n\t\t\treturn self.settings.root_element || self.doc.body;\n\t\t},\n\n\t\t/**\n\t\t * Returns the viewport of the window.\n\t\t *\n\t\t * @method getViewPort\n\t\t * @param {Window} win Optional window to get viewport of.\n\t\t * @return {Object} Viewport object with fields x, y, w and h.\n\t\t */\n\t\tgetViewPort: function(win) {\n\t\t\tvar doc, rootElm;\n\n\t\t\twin = !win ? this.win : win;\n\t\t\tdoc = win.document;\n\t\t\trootElm = this.boxModel ? doc.documentElement : doc.body;\n\n\t\t\t// Returns viewport size excluding scrollbars\n\t\t\treturn {\n\t\t\t\tx: win.pageXOffset || rootElm.scrollLeft,\n\t\t\t\ty: win.pageYOffset || rootElm.scrollTop,\n\t\t\t\tw: win.innerWidth || rootElm.clientWidth,\n\t\t\t\th: win.innerHeight || rootElm.clientHeight\n\t\t\t};\n\t\t},\n\n\t\t/**\n\t\t * Returns the rectangle for a specific element.\n\t\t *\n\t\t * @method getRect\n\t\t * @param {Element/String} elm Element object or element ID to get rectangle from.\n\t\t * @return {object} Rectangle for specified element object with x, y, w, h fields.\n\t\t */\n\t\tgetRect: function(elm) {\n\t\t\tvar self = this, pos, size;\n\n\t\t\telm = self.get(elm);\n\t\t\tpos = self.getPos(elm);\n\t\t\tsize = self.getSize(elm);\n\n\t\t\treturn {\n\t\t\t\tx: pos.x, y: pos.y,\n\t\t\t\tw: size.w, h: size.h\n\t\t\t};\n\t\t},\n\n\t\t/**\n\t\t * Returns the size dimensions of the specified element.\n\t\t *\n\t\t * @method getSize\n\t\t * @param {Element/String} elm Element object or element ID to get rectangle from.\n\t\t * @return {object} Rectangle for specified element object with w, h fields.\n\t\t */\n\t\tgetSize: function(elm) {\n\t\t\tvar self = this, w, h;\n\n\t\t\telm = self.get(elm);\n\t\t\tw = self.getStyle(elm, 'width');\n\t\t\th = self.getStyle(elm, 'height');\n\n\t\t\t// Non pixel value, then force offset/clientWidth\n\t\t\tif (w.indexOf('px') === -1) {\n\t\t\t\tw = 0;\n\t\t\t}\n\n\t\t\t// Non pixel value, then force offset/clientWidth\n\t\t\tif (h.indexOf('px') === -1) {\n\t\t\t\th = 0;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tw: parseInt(w, 10) || elm.offsetWidth || elm.clientWidth,\n\t\t\t\th: parseInt(h, 10) || elm.offsetHeight || elm.clientHeight\n\t\t\t};\n\t\t},\n\n\t\t/**\n\t\t * Returns a node by the specified selector function. This function will\n\t\t * loop through all parent nodes and call the specified function for each node.\n\t\t * If the function then returns true indicating that it has found what it was looking for, the loop execution will then end\n\t\t * and the node it found will be returned.\n\t\t *\n\t\t * @method getParent\n\t\t * @param {Node/String} node DOM node to search parents on or ID string.\n\t\t * @param {function} selector Selection function or CSS selector to execute on each node.\n\t\t * @param {Node} root Optional root element, never go beyond this point.\n\t\t * @return {Node} DOM Node or null if it wasn't found.\n\t\t */\n\t\tgetParent: function(node, selector, root) {\n\t\t\treturn this.getParents(node, selector, root, false);\n\t\t},\n\n\t\t/**\n\t\t * Returns a node list of all parents matching the specified selector function or pattern.\n\t\t * If the function then returns true indicating that it has found what it was looking for and that node will be collected.\n\t\t *\n\t\t * @method getParents\n\t\t * @param {Node/String} node DOM node to search parents on or ID string.\n\t\t * @param {function} selector Selection function to execute on each node or CSS pattern.\n\t\t * @param {Node} root Optional root element, never go beyond this point.\n\t\t * @return {Array} Array of nodes or null if it wasn't found.\n\t\t */\n\t\tgetParents: function(node, selector, root, collect) {\n\t\t\tvar self = this, selectorVal, result = [];\n\n\t\t\tnode = self.get(node);\n\t\t\tcollect = collect === undefined;\n\n\t\t\t// Default root on inline mode\n\t\t\troot = root || (self.getRoot().nodeName != 'BODY' ? self.getRoot().parentNode : null);\n\n\t\t\t// Wrap node name as func\n\t\t\tif (is(selector, 'string')) {\n\t\t\t\tselectorVal = selector;\n\n\t\t\t\tif (selector === '*') {\n\t\t\t\t\tselector = function(node) {\n\t\t\t\t\t\treturn node.nodeType == 1;\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tselector = function(node) {\n\t\t\t\t\t\treturn self.is(node, selectorVal);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile (node) {\n\t\t\t\tif (node == root || !node.nodeType || node.nodeType === 9) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (!selector || selector(node)) {\n\t\t\t\t\tif (collect) {\n\t\t\t\t\t\tresult.push(node);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tnode = node.parentNode;\n\t\t\t}\n\n\t\t\treturn collect ? result : null;\n\t\t},\n\n\t\t/**\n\t\t * Returns the specified element by ID or the input element if it isn't a string.\n\t\t *\n\t\t * @method get\n\t\t * @param {String/Element} n Element id to look for or element to just pass though.\n\t\t * @return {Element} Element matching the specified id or null if it wasn't found.\n\t\t */\n\t\tget: function(elm) {\n\t\t\tvar name;\n\n\t\t\tif (elm && this.doc && typeof elm == 'string') {\n\t\t\t\tname = elm;\n\t\t\t\telm = this.doc.getElementById(elm);\n\n\t\t\t\t// IE and Opera returns meta elements when they match the specified input ID, but getElementsByName seems to do the trick\n\t\t\t\tif (elm && elm.id !== name) {\n\t\t\t\t\treturn this.doc.getElementsByName(name)[1];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn elm;\n\t\t},\n\n\t\t/**\n\t\t * Returns the next node that matches selector or function\n\t\t *\n\t\t * @method getNext\n\t\t * @param {Node} node Node to find siblings from.\n\t\t * @param {String/function} selector Selector CSS expression or function.\n\t\t * @return {Node} Next node item matching the selector or null if it wasn't found.\n\t\t */\n\t\tgetNext: function(node, selector) {\n\t\t\treturn this._findSib(node, selector, 'nextSibling');\n\t\t},\n\n\t\t/**\n\t\t * Returns the previous node that matches selector or function\n\t\t *\n\t\t * @method getPrev\n\t\t * @param {Node} node Node to find siblings from.\n\t\t * @param {String/function} selector Selector CSS expression or function.\n\t\t * @return {Node} Previous node item matching the selector or null if it wasn't found.\n\t\t */\n\t\tgetPrev: function(node, selector) {\n\t\t\treturn this._findSib(node, selector, 'previousSibling');\n\t\t},\n\n\t\t// #ifndef jquery\n\n\t\t/**\n\t\t * Selects specific elements by a CSS level 3 pattern. For example \"div#a1 p.test\".\n\t\t * This function is optimized for the most common patterns needed in TinyMCE but it also performs well enough\n\t\t * on more complex patterns.\n\t\t *\n\t\t * @method select\n\t\t * @param {String} selector CSS level 3 pattern to select/find elements by.\n\t\t * @param {Object} scope Optional root element/scope element to search in.\n\t\t * @return {Array} Array with all matched elements.\n\t\t * @example\n\t\t * // Adds a class to all paragraphs in the currently active editor\n\t\t * tinymce.activeEditor.dom.addClass(tinymce.activeEditor.dom.select('p'), 'someclass');\n\t\t *\n\t\t * // Adds a class to all spans that have the test class in the currently active editor\n\t\t * tinymce.activeEditor.dom.addClass(tinymce.activeEditor.dom.select('span.test'), 'someclass')\n\t\t */\n\t\tselect: function(selector, scope) {\n\t\t\tvar self = this;\n\n\t\t\t/*eslint new-cap:0 */\n\t\t\treturn Sizzle(selector, self.get(scope) || self.settings.root_element || self.doc, []);\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the specified element matches the specified css pattern.\n\t\t *\n\t\t * @method is\n\t\t * @param {Node/NodeList} elm DOM node to match or an array of nodes to match.\n\t\t * @param {String} selector CSS pattern to match the element against.\n\t\t */\n\t\tis: function(elm, selector) {\n\t\t\tvar i;\n\n\t\t\t// If it isn't an array then try to do some simple selectors instead of Sizzle for to boost performance\n\t\t\tif (elm.length === undefined) {\n\t\t\t\t// Simple all selector\n\t\t\t\tif (selector === '*') {\n\t\t\t\t\treturn elm.nodeType == 1;\n\t\t\t\t}\n\n\t\t\t\t// Simple selector just elements\n\t\t\t\tif (simpleSelectorRe.test(selector)) {\n\t\t\t\t\tselector = selector.toLowerCase().split(/,/);\n\t\t\t\t\telm = elm.nodeName.toLowerCase();\n\n\t\t\t\t\tfor (i = selector.length - 1; i >= 0; i--) {\n\t\t\t\t\t\tif (selector[i] == elm) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Is non element\n\t\t\tif (elm.nodeType && elm.nodeType != 1) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar elms = elm.nodeType ? [elm] : elm;\n\n\t\t\t/*eslint new-cap:0 */\n\t\t\treturn Sizzle(selector, elms[0].ownerDocument || elms[0], null, elms).length > 0;\n\t\t},\n\n\t\t// #endif\n\n\t\t/**\n\t\t * Adds the specified element to another element or elements.\n\t\t *\n\t\t * @method add\n\t\t * @param {String/Element/Array} parentElm Element id string, DOM node element or array of ids or elements to add to.\n\t\t * @param {String/Element} name Name of new element to add or existing element to add.\n\t\t * @param {Object} attrs Optional object collection with arguments to add to the new element(s).\n\t\t * @param {String} html Optional inner HTML contents to add for each element.\n\t\t * @param {Boolean} create Optional flag if the element should be created or added.\n\t\t * @return {Element/Array} Element that got created, or an array of created elements if multiple input elements\n\t\t * were passed in.\n\t\t * @example\n\t\t * // Adds a new paragraph to the end of the active editor\n\t\t * tinymce.activeEditor.dom.add(tinymce.activeEditor.getBody(), 'p', {title: 'my title'}, 'Some content');\n\t\t */\n\t\tadd: function(parentElm, name, attrs, html, create) {\n\t\t\tvar self = this;\n\n\t\t\treturn this.run(parentElm, function(parentElm) {\n\t\t\t\tvar newElm;\n\n\t\t\t\tnewElm = is(name, 'string') ? self.doc.createElement(name) : name;\n\t\t\t\tself.setAttribs(newElm, attrs);\n\n\t\t\t\tif (html) {\n\t\t\t\t\tif (html.nodeType) {\n\t\t\t\t\t\tnewElm.appendChild(html);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.setHTML(newElm, html);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn !create ? parentElm.appendChild(newElm) : newElm;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Creates a new element.\n\t\t *\n\t\t * @method create\n\t\t * @param {String} name Name of new element.\n\t\t * @param {Object} attrs Optional object name/value collection with element attributes.\n\t\t * @param {String} html Optional HTML string to set as inner HTML of the element.\n\t\t * @return {Element} HTML DOM node element that got created.\n\t\t * @example\n\t\t * // Adds an element where the caret/selection is in the active editor\n\t\t * var el = tinymce.activeEditor.dom.create('div', {id: 'test', 'class': 'myclass'}, 'some content');\n\t\t * tinymce.activeEditor.selection.setNode(el);\n\t\t */\n\t\tcreate: function(name, attrs, html) {\n\t\t\treturn this.add(this.doc.createElement(name), name, attrs, html, 1);\n\t\t},\n\n\t\t/**\n\t\t * Creates HTML string for element. The element will be closed unless an empty inner HTML string is passed in.\n\t\t *\n\t\t * @method createHTML\n\t\t * @param {String} name Name of new element.\n\t\t * @param {Object} attrs Optional object name/value collection with element attributes.\n\t\t * @param {String} html Optional HTML string to set as inner HTML of the element.\n\t\t * @return {String} String with new HTML element, for example: test.\n\t\t * @example\n\t\t * // Creates a html chunk and inserts it at the current selection/caret location\n\t\t * tinymce.activeEditor.selection.setContent(tinymce.activeEditor.dom.createHTML('a', {href: 'test.html'}, 'some line'));\n\t\t */\n\t\tcreateHTML: function(name, attrs, html) {\n\t\t\tvar outHtml = '', key;\n\n\t\t\toutHtml += '<' + name;\n\n\t\t\tfor (key in attrs) {\n\t\t\t\tif (attrs.hasOwnProperty(key) && attrs[key] !== null && typeof attrs[key] != 'undefined') {\n\t\t\t\t\toutHtml += ' ' + key + '=\"' + this.encode(attrs[key]) + '\"';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// A call to tinymce.is doesn't work for some odd reason on IE9 possible bug inside their JS runtime\n\t\t\tif (typeof html != \"undefined\") {\n\t\t\t\treturn outHtml + '>' + html + '';\n\t\t\t}\n\n\t\t\treturn outHtml + ' />';\n\t\t},\n\n\t\t/**\n\t\t * Creates a document fragment out of the specified HTML string.\n\t\t *\n\t\t * @method createFragment\n\t\t * @param {String} html Html string to create fragment from.\n\t\t * @return {DocumentFragment} Document fragment node.\n\t\t */\n\t\tcreateFragment: function(html) {\n\t\t\tvar frag, node, doc = this.doc, container;\n\n\t\t\tcontainer = doc.createElement(\"div\");\n\t\t\tfrag = doc.createDocumentFragment();\n\n\t\t\tif (html) {\n\t\t\t\tcontainer.innerHTML = html;\n\t\t\t}\n\n\t\t\twhile ((node = container.firstChild)) {\n\t\t\t\tfrag.appendChild(node);\n\t\t\t}\n\n\t\t\treturn frag;\n\t\t},\n\n\t\t/**\n\t\t * Removes/deletes the specified element(s) from the DOM.\n\t\t *\n\t\t * @method remove\n\t\t * @param {String/Element/Array} node ID of element or DOM element object or array containing multiple elements/ids.\n\t\t * @param {Boolean} keepChildren Optional state to keep children or not. If set to true all children will be\n\t\t * placed at the location of the removed element.\n\t\t * @return {Element/Array} HTML DOM element that got removed, or an array of removed elements if multiple input elements\n\t\t * were passed in.\n\t\t * @example\n\t\t * // Removes all paragraphs in the active editor\n\t\t * tinymce.activeEditor.dom.remove(tinymce.activeEditor.dom.select('p'));\n\t\t *\n\t\t * // Removes an element by id in the document\n\t\t * tinymce.DOM.remove('mydiv');\n\t\t */\n\t\tremove: function(node, keepChildren) {\n\t\t\tnode = this.$$(node);\n\n\t\t\tif (keepChildren) {\n\t\t\t\tnode.each(function() {\n\t\t\t\t\tvar child;\n\n\t\t\t\t\twhile ((child = this.firstChild)) {\n\t\t\t\t\t\tif (child.nodeType == 3 && child.data.length === 0) {\n\t\t\t\t\t\t\tthis.removeChild(child);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.parentNode.insertBefore(child, this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}).remove();\n\t\t\t} else {\n\t\t\t\tnode.remove();\n\t\t\t}\n\n\t\t\treturn node.length > 1 ? node.toArray() : node[0];\n\t\t},\n\n\t\t/**\n\t\t * Sets the CSS style value on a HTML element. The name can be a camelcase string\n\t\t * or the CSS style name like background-color.\n\t\t *\n\t\t * @method setStyle\n\t\t * @param {String/Element/Array} elm HTML element/Array of elements to set CSS style value on.\n\t\t * @param {String} name Name of the style value to set.\n\t\t * @param {String} value Value to set on the style.\n\t\t * @example\n\t\t * // Sets a style value on all paragraphs in the currently active editor\n\t\t * tinymce.activeEditor.dom.setStyle(tinymce.activeEditor.dom.select('p'), 'background-color', 'red');\n\t\t *\n\t\t * // Sets a style value to an element by id in the current document\n\t\t * tinymce.DOM.setStyle('mydiv', 'background-color', 'red');\n\t\t */\n\t\tsetStyle: function(elm, name, value) {\n\t\t\telm = this.$$(elm).css(name, value);\n\n\t\t\tif (this.settings.update_styles) {\n\t\t\t\tupdateInternalStyleAttr(this, elm);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns the current style or runtime/computed value of an element.\n\t\t *\n\t\t * @method getStyle\n\t\t * @param {String/Element} elm HTML element or element id string to get style from.\n\t\t * @param {String} name Style name to return.\n\t\t * @param {Boolean} computed Computed style.\n\t\t * @return {String} Current style or computed style value of an element.\n\t\t */\n\t\tgetStyle: function(elm, name, computed) {\n\t\t\telm = this.$$(elm);\n\n\t\t\tif (computed) {\n\t\t\t\treturn elm.css(name);\n\t\t\t}\n\n\t\t\t// Camelcase it, if needed\n\t\t\tname = name.replace(/-(\\D)/g, function(a, b) {\n\t\t\t\treturn b.toUpperCase();\n\t\t\t});\n\n\t\t\tif (name == 'float') {\n\t\t\t\tname = Env.ie && Env.ie < 12 ? 'styleFloat' : 'cssFloat';\n\t\t\t}\n\n\t\t\treturn elm[0] && elm[0].style ? elm[0].style[name] : undefined;\n\t\t},\n\n\t\t/**\n\t\t * Sets multiple styles on the specified element(s).\n\t\t *\n\t\t * @method setStyles\n\t\t * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set styles on.\n\t\t * @param {Object} styles Name/Value collection of style items to add to the element(s).\n\t\t * @example\n\t\t * // Sets styles on all paragraphs in the currently active editor\n\t\t * tinymce.activeEditor.dom.setStyles(tinymce.activeEditor.dom.select('p'), {'background-color': 'red', 'color': 'green'});\n\t\t *\n\t\t * // Sets styles to an element by id in the current document\n\t\t * tinymce.DOM.setStyles('mydiv', {'background-color': 'red', 'color': 'green'});\n\t\t */\n\t\tsetStyles: function(elm, styles) {\n\t\t\telm = this.$$(elm).css(styles);\n\n\t\t\tif (this.settings.update_styles) {\n\t\t\t\tupdateInternalStyleAttr(this, elm);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Removes all attributes from an element or elements.\n\t\t *\n\t\t * @method removeAllAttribs\n\t\t * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to remove attributes from.\n\t\t */\n\t\tremoveAllAttribs: function(e) {\n\t\t\treturn this.run(e, function(e) {\n\t\t\t\tvar i, attrs = e.attributes;\n\t\t\t\tfor (i = attrs.length - 1; i >= 0; i--) {\n\t\t\t\t\te.removeAttributeNode(attrs.item(i));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Sets the specified attribute of an element or elements.\n\t\t *\n\t\t * @method setAttrib\n\t\t * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set attribute on.\n\t\t * @param {String} name Name of attribute to set.\n\t\t * @param {String} value Value to set on the attribute - if this value is falsy like null, 0 or '' it will remove\n\t\t * the attribute instead.\n\t\t * @example\n\t\t * // Sets class attribute on all paragraphs in the active editor\n\t\t * tinymce.activeEditor.dom.setAttrib(tinymce.activeEditor.dom.select('p'), 'class', 'myclass');\n\t\t *\n\t\t * // Sets class attribute on a specific element in the current page\n\t\t * tinymce.dom.setAttrib('mydiv', 'class', 'myclass');\n\t\t */\n\t\tsetAttrib: function(elm, name, value) {\n\t\t\tvar self = this, originalValue, hook, settings = self.settings;\n\n\t\t\tif (value === '') {\n\t\t\t\tvalue = null;\n\t\t\t}\n\n\t\t\telm = self.$$(elm);\n\t\t\toriginalValue = elm.attr(name);\n\n\t\t\tif (!elm.length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\thook = self.attrHooks[name];\n\t\t\tif (hook && hook.set) {\n\t\t\t\thook.set(elm, value, name);\n\t\t\t} else {\n\t\t\t\telm.attr(name, value);\n\t\t\t}\n\n\t\t\tif (originalValue != value && settings.onSetAttrib) {\n\t\t\t\tsettings.onSetAttrib({\n\t\t\t\t\tattrElm: elm,\n\t\t\t\t\tattrName: name,\n\t\t\t\t\tattrValue: value\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Sets two or more specified attributes of an element or elements.\n\t\t *\n\t\t * @method setAttribs\n\t\t * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set attributes on.\n\t\t * @param {Object} attrs Name/Value collection of attribute items to add to the element(s).\n\t\t * @example\n\t\t * // Sets class and title attributes on all paragraphs in the active editor\n\t\t * tinymce.activeEditor.dom.setAttribs(tinymce.activeEditor.dom.select('p'), {'class': 'myclass', title: 'some title'});\n\t\t *\n\t\t * // Sets class and title attributes on a specific element in the current page\n\t\t * tinymce.DOM.setAttribs('mydiv', {'class': 'myclass', title: 'some title'});\n\t\t */\n\t\tsetAttribs: function(elm, attrs) {\n\t\t\tvar self = this;\n\n\t\t\tself.$$(elm).each(function(i, node) {\n\t\t\t\teach(attrs, function(value, name) {\n\t\t\t\t\tself.setAttrib(node, name, value);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Returns the specified attribute by name.\n\t\t *\n\t\t * @method getAttrib\n\t\t * @param {String/Element} elm Element string id or DOM element to get attribute from.\n\t\t * @param {String} name Name of attribute to get.\n\t\t * @param {String} defaultVal Optional default value to return if the attribute didn't exist.\n\t\t * @return {String} Attribute value string, default value or null if the attribute wasn't found.\n\t\t */\n\t\tgetAttrib: function(elm, name, defaultVal) {\n\t\t\tvar self = this, hook, value;\n\n\t\t\telm = self.$$(elm);\n\n\t\t\tif (elm.length) {\n\t\t\t\thook = self.attrHooks[name];\n\n\t\t\t\tif (hook && hook.get) {\n\t\t\t\t\tvalue = hook.get(elm, name);\n\t\t\t\t} else {\n\t\t\t\t\tvalue = elm.attr(name);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof value == 'undefined') {\n\t\t\t\tvalue = defaultVal || '';\n\t\t\t}\n\n\t\t\treturn value;\n\t\t},\n\n\t\t/**\n\t\t * Returns the absolute x, y position of a node. The position will be returned in an object with x, y fields.\n\t\t *\n\t\t * @method getPos\n\t\t * @param {Element/String} elm HTML element or element id to get x, y position from.\n\t\t * @param {Element} rootElm Optional root element to stop calculations at.\n\t\t * @return {object} Absolute position of the specified element object with x, y fields.\n\t\t */\n\t\tgetPos: function(elm, rootElm) {\n\t\t\tvar self = this, x = 0, y = 0, offsetParent, doc = self.doc, body = doc.body, pos;\n\n\t\t\telm = self.get(elm);\n\t\t\trootElm = rootElm || body;\n\n\t\t\tif (elm) {\n\t\t\t\t// Use getBoundingClientRect if it exists since it's faster than looping offset nodes\n\t\t\t\t// Fallback to offsetParent calculations if the body isn't static better since it stops at the body root\n\t\t\t\tif (rootElm === body && elm.getBoundingClientRect && $(body).css('position') === 'static') {\n\t\t\t\t\tpos = elm.getBoundingClientRect();\n\t\t\t\t\trootElm = self.boxModel ? doc.documentElement : body;\n\n\t\t\t\t\t// Add scroll offsets from documentElement or body since IE with the wrong box model will use d.body and so do WebKit\n\t\t\t\t\t// Also remove the body/documentelement clientTop/clientLeft on IE 6, 7 since they offset the position\n\t\t\t\t\tx = pos.left + (doc.documentElement.scrollLeft || body.scrollLeft) - rootElm.clientLeft;\n\t\t\t\t\ty = pos.top + (doc.documentElement.scrollTop || body.scrollTop) - rootElm.clientTop;\n\n\t\t\t\t\treturn {x: x, y: y};\n\t\t\t\t}\n\n\t\t\t\toffsetParent = elm;\n\t\t\t\twhile (offsetParent && offsetParent != rootElm && offsetParent.nodeType) {\n\t\t\t\t\tx += offsetParent.offsetLeft || 0;\n\t\t\t\t\ty += offsetParent.offsetTop || 0;\n\t\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t\t}\n\n\t\t\t\toffsetParent = elm.parentNode;\n\t\t\t\twhile (offsetParent && offsetParent != rootElm && offsetParent.nodeType) {\n\t\t\t\t\tx -= offsetParent.scrollLeft || 0;\n\t\t\t\t\ty -= offsetParent.scrollTop || 0;\n\t\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {x: x, y: y};\n\t\t},\n\n\t\t/**\n\t\t * Parses the specified style value into an object collection. This parser will also\n\t\t * merge and remove any redundant items that browsers might have added. It will also convert non-hex\n\t\t * colors to hex values. Urls inside the styles will also be converted to absolute/relative based on settings.\n\t\t *\n\t\t * @method parseStyle\n\t\t * @param {String} cssText Style value to parse, for example: border:1px solid red;.\n\t\t * @return {Object} Object representation of that style, for example: {border: '1px solid red'}\n\t\t */\n\t\tparseStyle: function(cssText) {\n\t\t\treturn this.styles.parse(cssText);\n\t\t},\n\n\t\t/**\n\t\t * Serializes the specified style object into a string.\n\t\t *\n\t\t * @method serializeStyle\n\t\t * @param {Object} styles Object to serialize as string, for example: {border: '1px solid red'}\n\t\t * @param {String} name Optional element name.\n\t\t * @return {String} String representation of the style object, for example: border: 1px solid red.\n\t\t */\n\t\tserializeStyle: function(styles, name) {\n\t\t\treturn this.styles.serialize(styles, name);\n\t\t},\n\n\t\t/**\n\t\t * Adds a style element at the top of the document with the specified cssText content.\n\t\t *\n\t\t * @method addStyle\n\t\t * @param {String} cssText CSS Text style to add to top of head of document.\n\t\t */\n\t\taddStyle: function(cssText) {\n\t\t\tvar self = this, doc = self.doc, head, styleElm;\n\n\t\t\t// Prevent inline from loading the same styles twice\n\t\t\tif (self !== DOMUtils.DOM && doc === document) {\n\t\t\t\tvar addedStyles = DOMUtils.DOM.addedStyles;\n\n\t\t\t\taddedStyles = addedStyles || [];\n\t\t\t\tif (addedStyles[cssText]) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taddedStyles[cssText] = true;\n\t\t\t\tDOMUtils.DOM.addedStyles = addedStyles;\n\t\t\t}\n\n\t\t\t// Create style element if needed\n\t\t\tstyleElm = doc.getElementById('mceDefaultStyles');\n\t\t\tif (!styleElm) {\n\t\t\t\tstyleElm = doc.createElement('style');\n\t\t\t\tstyleElm.id = 'mceDefaultStyles';\n\t\t\t\tstyleElm.type = 'text/css';\n\n\t\t\t\thead = doc.getElementsByTagName('head')[0];\n\t\t\t\tif (head.firstChild) {\n\t\t\t\t\thead.insertBefore(styleElm, head.firstChild);\n\t\t\t\t} else {\n\t\t\t\t\thead.appendChild(styleElm);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Append style data to old or new style element\n\t\t\tif (styleElm.styleSheet) {\n\t\t\t\tstyleElm.styleSheet.cssText += cssText;\n\t\t\t} else {\n\t\t\t\tstyleElm.appendChild(doc.createTextNode(cssText));\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Imports/loads the specified CSS file into the document bound to the class.\n\t\t *\n\t\t * @method loadCSS\n\t\t * @param {String} url URL to CSS file to load.\n\t\t * @example\n\t\t * // Loads a CSS file dynamically into the current document\n\t\t * tinymce.DOM.loadCSS('somepath/some.css');\n\t\t *\n\t\t * // Loads a CSS file into the currently active editor instance\n\t\t * tinymce.activeEditor.dom.loadCSS('somepath/some.css');\n\t\t *\n\t\t * // Loads a CSS file into an editor instance by id\n\t\t * tinymce.get('someid').dom.loadCSS('somepath/some.css');\n\t\t *\n\t\t * // Loads multiple CSS files into the current document\n\t\t * tinymce.DOM.loadCSS('somepath/some.css,somepath/someother.css');\n\t\t */\n\t\tloadCSS: function(url) {\n\t\t\tvar self = this, doc = self.doc, head;\n\n\t\t\t// Prevent inline from loading the same CSS file twice\n\t\t\tif (self !== DOMUtils.DOM && doc === document) {\n\t\t\t\tDOMUtils.DOM.loadCSS(url);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!url) {\n\t\t\t\turl = '';\n\t\t\t}\n\n\t\t\thead = doc.getElementsByTagName('head')[0];\n\n\t\t\teach(url.split(','), function(url) {\n\t\t\t\tvar link;\n\n\t\t\t\turl = Tools._addCacheSuffix(url);\n\n\t\t\t\tif (self.files[url]) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tself.files[url] = true;\n\t\t\t\tlink = self.create('link', {rel: 'stylesheet', href: url});\n\n\t\t\t\t// IE 8 has a bug where dynamically loading stylesheets would produce a 1 item remaining bug\n\t\t\t\t// This fix seems to resolve that issue by recalcing the document once a stylesheet finishes loading\n\t\t\t\t// It's ugly but it seems to work fine.\n\t\t\t\tif (isIE && doc.documentMode && doc.recalc) {\n\t\t\t\t\tlink.onload = function() {\n\t\t\t\t\t\tif (doc.recalc) {\n\t\t\t\t\t\t\tdoc.recalc();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlink.onload = null;\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\thead.appendChild(link);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Adds a class to the specified element or elements.\n\t\t *\n\t\t * @method addClass\n\t\t * @param {String/Element/Array} elm Element ID string or DOM element or array with elements or IDs.\n\t\t * @param {String} cls Class name to add to each element.\n\t\t * @return {String/Array} String with new class value or array with new class values for all elements.\n\t\t * @example\n\t\t * // Adds a class to all paragraphs in the active editor\n\t\t * tinymce.activeEditor.dom.addClass(tinymce.activeEditor.dom.select('p'), 'myclass');\n\t\t *\n\t\t * // Adds a class to a specific element in the current page\n\t\t * tinymce.DOM.addClass('mydiv', 'myclass');\n\t\t */\n\t\taddClass: function(elm, cls) {\n\t\t\tthis.$$(elm).addClass(cls);\n\t\t},\n\n\t\t/**\n\t\t * Removes a class from the specified element or elements.\n\t\t *\n\t\t * @method removeClass\n\t\t * @param {String/Element/Array} elm Element ID string or DOM element or array with elements or IDs.\n\t\t * @param {String} cls Class name to remove from each element.\n\t\t * @return {String/Array} String of remaining class name(s), or an array of strings if multiple input elements\n\t\t * were passed in.\n\t\t * @example\n\t\t * // Removes a class from all paragraphs in the active editor\n\t\t * tinymce.activeEditor.dom.removeClass(tinymce.activeEditor.dom.select('p'), 'myclass');\n\t\t *\n\t\t * // Removes a class from a specific element in the current page\n\t\t * tinymce.DOM.removeClass('mydiv', 'myclass');\n\t\t */\n\t\tremoveClass: function(elm, cls) {\n\t\t\tthis.toggleClass(elm, cls, false);\n\t\t},\n\n\t\t/**\n\t\t * Returns true if the specified element has the specified class.\n\t\t *\n\t\t * @method hasClass\n\t\t * @param {String/Element} elm HTML element or element id string to check CSS class on.\n\t\t * @param {String} cls CSS class to check for.\n\t\t * @return {Boolean} true/false if the specified element has the specified class.\n\t\t */\n\t\thasClass: function(elm, cls) {\n\t\t\treturn this.$$(elm).hasClass(cls);\n\t\t},\n\n\t\t/**\n\t\t * Toggles the specified class on/off.\n\t\t *\n\t\t * @method toggleClass\n\t\t * @param {Element} elm Element to toggle class on.\n\t\t * @param {[type]} cls Class to toggle on/off.\n\t\t * @param {[type]} state Optional state to set.\n\t\t */\n\t\ttoggleClass: function(elm, cls, state) {\n\t\t\tthis.$$(elm).toggleClass(cls, state).each(function() {\n\t\t\t\tif (this.className === '') {\n\t\t\t\t\t$(this).attr('class', null);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Shows the specified element(s) by ID by setting the \"display\" style.\n\t\t *\n\t\t * @method show\n\t\t * @param {String/Element/Array} elm ID of DOM element or DOM element or array with elements or IDs to show.\n\t\t */\n\t\tshow: function(elm) {\n\t\t\tthis.$$(elm).show();\n\t\t},\n\n\t\t/**\n\t\t * Hides the specified element(s) by ID by setting the \"display\" style.\n\t\t *\n\t\t * @method hide\n\t\t * @param {String/Element/Array} elm ID of DOM element or DOM element or array with elements or IDs to hide.\n\t\t * @example\n\t\t * // Hides an element by id in the document\n\t\t * tinymce.DOM.hide('myid');\n\t\t */\n\t\thide: function(elm) {\n\t\t\tthis.$$(elm).hide();\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the element is hidden or not by checking the \"display\" style.\n\t\t *\n\t\t * @method isHidden\n\t\t * @param {String/Element} elm Id or element to check display state on.\n\t\t * @return {Boolean} true/false if the element is hidden or not.\n\t\t */\n\t\tisHidden: function(elm) {\n\t\t\treturn this.$$(elm).css('display') == 'none';\n\t\t},\n\n\t\t/**\n\t\t * Returns a unique id. This can be useful when generating elements on the fly.\n\t\t * This method will not check if the element already exists.\n\t\t *\n\t\t * @method uniqueId\n\t\t * @param {String} prefix Optional prefix to add in front of all ids - defaults to \"mce_\".\n\t\t * @return {String} Unique id.\n\t\t */\n\t\tuniqueId: function(prefix) {\n\t\t\treturn (!prefix ? 'mce_' : prefix) + (this.counter++);\n\t\t},\n\n\t\t/**\n\t\t * Sets the specified HTML content inside the element or elements. The HTML will first be processed. This means\n\t\t * URLs will get converted, hex color values fixed etc. Check processHTML for details.\n\t\t *\n\t\t * @method setHTML\n\t\t * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set HTML inside of.\n\t\t * @param {String} html HTML content to set as inner HTML of the element.\n\t\t * @example\n\t\t * // Sets the inner HTML of all paragraphs in the active editor\n\t\t * tinymce.activeEditor.dom.setHTML(tinymce.activeEditor.dom.select('p'), 'some inner html');\n\t\t *\n\t\t * // Sets the inner HTML of an element by id in the document\n\t\t * tinymce.DOM.setHTML('mydiv', 'some inner html');\n\t\t */\n\t\tsetHTML: function(elm, html) {\n\t\t\telm = this.$$(elm);\n\n\t\t\tif (isIE) {\n\t\t\t\telm.each(function(i, target) {\n\t\t\t\t\tif (target.canHaveHTML === false) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove all child nodes, IE keeps empty text nodes in DOM\n\t\t\t\t\twhile (target.firstChild) {\n\t\t\t\t\t\ttarget.removeChild(target.firstChild);\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// IE will remove comments from the beginning\n\t\t\t\t\t\t// unless you padd the contents with something\n\t\t\t\t\t\ttarget.innerHTML = '
      ' + html;\n\t\t\t\t\t\ttarget.removeChild(target.firstChild);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t// IE sometimes produces an unknown runtime error on innerHTML if it's a div inside a p\n\t\t\t\t\t\t$('
      ').html('
      ' + html).contents().slice(1).appendTo(target);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn html;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\telm.html(html);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns the outer HTML of an element.\n\t\t *\n\t\t * @method getOuterHTML\n\t\t * @param {String/Element} elm Element ID or element object to get outer HTML from.\n\t\t * @return {String} Outer HTML string.\n\t\t * @example\n\t\t * tinymce.DOM.getOuterHTML(editorElement);\n\t\t * tinymce.activeEditor.getOuterHTML(tinymce.activeEditor.getBody());\n\t\t */\n\t\tgetOuterHTML: function(elm) {\n\t\t\telm = this.get(elm);\n\n\t\t\t// Older FF doesn't have outerHTML 3.6 is still used by some orgaizations\n\t\t\treturn elm.nodeType == 1 && \"outerHTML\" in elm ? elm.outerHTML : $('
      ').append($(elm).clone()).html();\n\t\t},\n\n\t\t/**\n\t\t * Sets the specified outer HTML on an element or elements.\n\t\t *\n\t\t * @method setOuterHTML\n\t\t * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set outer HTML on.\n\t\t * @param {Object} html HTML code to set as outer value for the element.\n\t\t * @example\n\t\t * // Sets the outer HTML of all paragraphs in the active editor\n\t\t * tinymce.activeEditor.dom.setOuterHTML(tinymce.activeEditor.dom.select('p'), '
      some html
      ');\n\t\t *\n\t\t * // Sets the outer HTML of an element by id in the document\n\t\t * tinymce.DOM.setOuterHTML('mydiv', '
      some html
      ');\n\t\t */\n\t\tsetOuterHTML: function(elm, html) {\n\t\t\tvar self = this;\n\n\t\t\tself.$$(elm).each(function() {\n\t\t\t\ttry {\n\t\t\t\t\t// Older FF doesn't have outerHTML 3.6 is still used by some organizations\n\t\t\t\t\tif (\"outerHTML\" in this) {\n\t\t\t\t\t\tthis.outerHTML = html;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Ignore\n\t\t\t\t}\n\n\t\t\t\t// OuterHTML for IE it sometimes produces an \"unknown runtime error\"\n\t\t\t\tself.remove($(this).html(html), true);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Entity decodes a string. This method decodes any HTML entities, such as å.\n\t\t *\n\t\t * @method decode\n\t\t * @param {String} s String to decode entities on.\n\t\t * @return {String} Entity decoded string.\n\t\t */\n\t\tdecode: Entities.decode,\n\n\t\t/**\n\t\t * Entity encodes a string. This method encodes the most common entities, such as <>\"&.\n\t\t *\n\t\t * @method encode\n\t\t * @param {String} text String to encode with entities.\n\t\t * @return {String} Entity encoded string.\n\t\t */\n\t\tencode: Entities.encodeAllRaw,\n\n\t\t/**\n\t\t * Inserts an element after the reference element.\n\t\t *\n\t\t * @method insertAfter\n\t\t * @param {Element} node Element to insert after the reference.\n\t\t * @param {Element/String/Array} referenceNode Reference element, element id or array of elements to insert after.\n\t\t * @return {Element/Array} Element that got added or an array with elements.\n\t\t */\n\t\tinsertAfter: function(node, referenceNode) {\n\t\t\treferenceNode = this.get(referenceNode);\n\n\t\t\treturn this.run(node, function(node) {\n\t\t\t\tvar parent, nextSibling;\n\n\t\t\t\tparent = referenceNode.parentNode;\n\t\t\t\tnextSibling = referenceNode.nextSibling;\n\n\t\t\t\tif (nextSibling) {\n\t\t\t\t\tparent.insertBefore(node, nextSibling);\n\t\t\t\t} else {\n\t\t\t\t\tparent.appendChild(node);\n\t\t\t\t}\n\n\t\t\t\treturn node;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Replaces the specified element or elements with the new element specified. The new element will\n\t\t * be cloned if multiple input elements are passed in.\n\t\t *\n\t\t * @method replace\n\t\t * @param {Element} newElm New element to replace old ones with.\n\t\t * @param {Element/String/Array} oldElm Element DOM node, element id or array of elements or ids to replace.\n\t\t * @param {Boolean} keepChildren Optional keep children state, if set to true child nodes from the old object will be added\n\t\t * to new ones.\n\t\t */\n\t\treplace: function(newElm, oldElm, keepChildren) {\n\t\t\tvar self = this;\n\n\t\t\treturn self.run(oldElm, function(oldElm) {\n\t\t\t\tif (is(oldElm, 'array')) {\n\t\t\t\t\tnewElm = newElm.cloneNode(true);\n\t\t\t\t}\n\n\t\t\t\tif (keepChildren) {\n\t\t\t\t\teach(grep(oldElm.childNodes), function(node) {\n\t\t\t\t\t\tnewElm.appendChild(node);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn oldElm.parentNode.replaceChild(newElm, oldElm);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Renames the specified element and keeps its attributes and children.\n\t\t *\n\t\t * @method rename\n\t\t * @param {Element} elm Element to rename.\n\t\t * @param {String} name Name of the new element.\n\t\t * @return {Element} New element or the old element if it needed renaming.\n\t\t */\n\t\trename: function(elm, name) {\n\t\t\tvar self = this, newElm;\n\n\t\t\tif (elm.nodeName != name.toUpperCase()) {\n\t\t\t\t// Rename block element\n\t\t\t\tnewElm = self.create(name);\n\n\t\t\t\t// Copy attribs to new block\n\t\t\t\teach(self.getAttribs(elm), function(attrNode) {\n\t\t\t\t\tself.setAttrib(newElm, attrNode.nodeName, self.getAttrib(elm, attrNode.nodeName));\n\t\t\t\t});\n\n\t\t\t\t// Replace block\n\t\t\t\tself.replace(newElm, elm, 1);\n\t\t\t}\n\n\t\t\treturn newElm || elm;\n\t\t},\n\n\t\t/**\n\t\t * Find the common ancestor of two elements. This is a shorter method than using the DOM Range logic.\n\t\t *\n\t\t * @method findCommonAncestor\n\t\t * @param {Element} a Element to find common ancestor of.\n\t\t * @param {Element} b Element to find common ancestor of.\n\t\t * @return {Element} Common ancestor element of the two input elements.\n\t\t */\n\t\tfindCommonAncestor: function(a, b) {\n\t\t\tvar ps = a, pe;\n\n\t\t\twhile (ps) {\n\t\t\t\tpe = b;\n\n\t\t\t\twhile (pe && ps != pe) {\n\t\t\t\t\tpe = pe.parentNode;\n\t\t\t\t}\n\n\t\t\t\tif (ps == pe) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tps = ps.parentNode;\n\t\t\t}\n\n\t\t\tif (!ps && a.ownerDocument) {\n\t\t\t\treturn a.ownerDocument.documentElement;\n\t\t\t}\n\n\t\t\treturn ps;\n\t\t},\n\n\t\t/**\n\t\t * Parses the specified RGB color value and returns a hex version of that color.\n\t\t *\n\t\t * @method toHex\n\t\t * @param {String} rgbVal RGB string value like rgb(1,2,3)\n\t\t * @return {String} Hex version of that RGB value like #FF00FF.\n\t\t */\n\t\ttoHex: function(rgbVal) {\n\t\t\treturn this.styles.toHex(Tools.trim(rgbVal));\n\t\t},\n\n\t\t/**\n\t\t * Executes the specified function on the element by id or dom element node or array of elements/id.\n\t\t *\n\t\t * @method run\n\t\t * @param {String/Element/Array} elm ID or DOM element object or array with ids or elements.\n\t\t * @param {function} func Function to execute for each item.\n\t\t * @param {Object} scope Optional scope to execute the function in.\n\t\t * @return {Object/Array} Single object, or an array of objects if multiple input elements were passed in.\n\t\t */\n\t\trun: function(elm, func, scope) {\n\t\t\tvar self = this, result;\n\n\t\t\tif (typeof elm === 'string') {\n\t\t\t\telm = self.get(elm);\n\t\t\t}\n\n\t\t\tif (!elm) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tscope = scope || this;\n\t\t\tif (!elm.nodeType && (elm.length || elm.length === 0)) {\n\t\t\t\tresult = [];\n\n\t\t\t\teach(elm, function(elm, i) {\n\t\t\t\t\tif (elm) {\n\t\t\t\t\t\tif (typeof elm == 'string') {\n\t\t\t\t\t\t\telm = self.get(elm);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresult.push(func.call(scope, elm, i));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\treturn func.call(scope, elm);\n\t\t},\n\n\t\t/**\n\t\t * Returns a NodeList with attributes for the element.\n\t\t *\n\t\t * @method getAttribs\n\t\t * @param {HTMLElement/string} elm Element node or string id to get attributes from.\n\t\t * @return {NodeList} NodeList with attributes.\n\t\t */\n\t\tgetAttribs: function(elm) {\n\t\t\tvar attrs;\n\n\t\t\telm = this.get(elm);\n\n\t\t\tif (!elm) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tif (isIE) {\n\t\t\t\tattrs = [];\n\n\t\t\t\t// Object will throw exception in IE\n\t\t\t\tif (elm.nodeName == 'OBJECT') {\n\t\t\t\t\treturn elm.attributes;\n\t\t\t\t}\n\n\t\t\t\t// IE doesn't keep the selected attribute if you clone option elements\n\t\t\t\tif (elm.nodeName === 'OPTION' && this.getAttrib(elm, 'selected')) {\n\t\t\t\t\tattrs.push({specified: 1, nodeName: 'selected'});\n\t\t\t\t}\n\n\t\t\t\t// It's crazy that this is faster in IE but it's because it returns all attributes all the time\n\t\t\t\tvar attrRegExp = /<\\/?[\\w:\\-]+ ?|=[\\\"][^\\\"]+\\\"|=\\'[^\\']+\\'|=[\\w\\-]+|>/gi;\n\t\t\t\telm.cloneNode(false).outerHTML.replace(attrRegExp, '').replace(/[\\w:\\-]+/gi, function(a) {\n\t\t\t\t\tattrs.push({specified: 1, nodeName: a});\n\t\t\t\t});\n\n\t\t\t\treturn attrs;\n\t\t\t}\n\n\t\t\treturn elm.attributes;\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the specified node is to be considered empty or not.\n\t\t *\n\t\t * @example\n\t\t * tinymce.DOM.isEmpty(node, {img: true});\n\t\t * @method isEmpty\n\t\t * @param {Object} elements Optional name/value object with elements that are automatically treated as non-empty elements.\n\t\t * @return {Boolean} true/false if the node is empty or not.\n\t\t */\n\t\tisEmpty: function(node, elements) {\n\t\t\tvar self = this, i, attributes, type, whitespace, walker, name, brCount = 0;\n\n\t\t\tnode = node.firstChild;\n\t\t\tif (node) {\n\t\t\t\twalker = new TreeWalker(node, node.parentNode);\n\t\t\t\telements = elements || (self.schema ? self.schema.getNonEmptyElements() : null);\n\t\t\t\twhitespace = self.schema ? self.schema.getWhiteSpaceElements() : {};\n\n\t\t\t\tdo {\n\t\t\t\t\ttype = node.nodeType;\n\n\t\t\t\t\tif (type === 1) {\n\t\t\t\t\t\t// Ignore bogus elements\n\t\t\t\t\t\tvar bogusVal = node.getAttribute('data-mce-bogus');\n\t\t\t\t\t\tif (bogusVal) {\n\t\t\t\t\t\t\tnode = walker.next(bogusVal === 'all');\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Keep empty elements like \n\t\t\t\t\t\tname = node.nodeName.toLowerCase();\n\t\t\t\t\t\tif (elements && elements[name]) {\n\t\t\t\t\t\t\t// Ignore single BR elements in blocks like


      or


      \n\t\t\t\t\t\t\tif (name === 'br') {\n\t\t\t\t\t\t\t\tbrCount++;\n\t\t\t\t\t\t\t\tnode = walker.next();\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Keep elements with data-bookmark attributes or name attribute like \n\t\t\t\t\t\tattributes = self.getAttribs(node);\n\t\t\t\t\t\ti = attributes.length;\n\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\tname = attributes[i].nodeName;\n\t\t\t\t\t\t\tif (name === \"name\" || name === 'data-mce-bookmark') {\n\t\t\t\t\t\t\t\treturn false;\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// Keep comment nodes\n\t\t\t\t\tif (type == 8) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Keep non whitespace text nodes\n\t\t\t\t\tif (type === 3 && !whiteSpaceRegExp.test(node.nodeValue)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Keep whitespace preserve elements\n\t\t\t\t\tif (type === 3 && node.parentNode && whitespace[node.parentNode.nodeName] && whiteSpaceRegExp.test(node.nodeValue)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = walker.next();\n\t\t\t\t} while (node);\n\t\t\t}\n\n\t\t\treturn brCount <= 1;\n\t\t},\n\n\t\t/**\n\t\t * Creates a new DOM Range object. This will use the native DOM Range API if it's\n\t\t * available. If it's not, it will fall back to the custom TinyMCE implementation.\n\t\t *\n\t\t * @method createRng\n\t\t * @return {DOMRange} DOM Range object.\n\t\t * @example\n\t\t * var rng = tinymce.DOM.createRng();\n\t\t * alert(rng.startContainer + \",\" + rng.startOffset);\n\t\t */\n\t\tcreateRng: function() {\n\t\t\tvar doc = this.doc;\n\n\t\t\treturn doc.createRange ? doc.createRange() : new Range(this);\n\t\t},\n\n\t\t/**\n\t\t * Returns the index of the specified node within its parent.\n\t\t *\n\t\t * @method nodeIndex\n\t\t * @param {Node} node Node to look for.\n\t\t * @param {boolean} normalized Optional true/false state if the index is what it would be after a normalization.\n\t\t * @return {Number} Index of the specified node.\n\t\t */\n\t\tnodeIndex: nodeIndex,\n\n\t\t/**\n\t\t * Splits an element into two new elements and places the specified split\n\t\t * element or elements between the new ones. For example splitting the paragraph at the bold element in\n\t\t * this example

      abcabc123

      would produce

      abc

      abc

      123

      .\n\t\t *\n\t\t * @method split\n\t\t * @param {Element} parentElm Parent element to split.\n\t\t * @param {Element} splitElm Element to split at.\n\t\t * @param {Element} replacementElm Optional replacement element to replace the split element with.\n\t\t * @return {Element} Returns the split element or the replacement element if that is specified.\n\t\t */\n\t\tsplit: function(parentElm, splitElm, replacementElm) {\n\t\t\tvar self = this, r = self.createRng(), bef, aft, pa;\n\n\t\t\t// W3C valid browsers tend to leave empty nodes to the left/right side of the contents - this makes sense\n\t\t\t// but we don't want that in our code since it serves no purpose for the end user\n\t\t\t// For example splitting this html at the bold element:\n\t\t\t//

      text 1CHOPtext 2

      \n\t\t\t// would produce:\n\t\t\t//

      text 1

      CHOP

      text 2

      \n\t\t\t// this function will then trim off empty edges and produce:\n\t\t\t//

      text 1

      CHOP

      text 2

      \n\t\t\tfunction trimNode(node) {\n\t\t\t\tvar i, children = node.childNodes, type = node.nodeType;\n\n\t\t\t\tfunction surroundedBySpans(node) {\n\t\t\t\t\tvar previousIsSpan = node.previousSibling && node.previousSibling.nodeName == 'SPAN';\n\t\t\t\t\tvar nextIsSpan = node.nextSibling && node.nextSibling.nodeName == 'SPAN';\n\t\t\t\t\treturn previousIsSpan && nextIsSpan;\n\t\t\t\t}\n\n\t\t\t\tif (type == 1 && node.getAttribute('data-mce-type') == 'bookmark') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfor (i = children.length - 1; i >= 0; i--) {\n\t\t\t\t\ttrimNode(children[i]);\n\t\t\t\t}\n\n\t\t\t\tif (type != 9) {\n\t\t\t\t\t// Keep non whitespace text nodes\n\t\t\t\t\tif (type == 3 && node.nodeValue.length > 0) {\n\t\t\t\t\t\t// If parent element isn't a block or there isn't any useful contents for example \"

      \"\n\t\t\t\t\t\t// Also keep text nodes with only spaces if surrounded by spans.\n\t\t\t\t\t\t// eg. \"

      a b

      \" should keep space between a and b\n\t\t\t\t\t\tvar trimmedLength = trim(node.nodeValue).length;\n\t\t\t\t\t\tif (!self.isBlock(node.parentNode) || trimmedLength > 0 || trimmedLength === 0 && surroundedBySpans(node)) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type == 1) {\n\t\t\t\t\t\t// If the only child is a bookmark then move it up\n\t\t\t\t\t\tchildren = node.childNodes;\n\n\t\t\t\t\t\t// TODO fix this complex if\n\t\t\t\t\t\tif (children.length == 1 && children[0] && children[0].nodeType == 1 &&\n\t\t\t\t\t\t\tchildren[0].getAttribute('data-mce-type') == 'bookmark') {\n\t\t\t\t\t\t\tnode.parentNode.insertBefore(children[0], node);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Keep non empty elements or img, hr etc\n\t\t\t\t\t\tif (children.length || /^(br|hr|input|img)$/i.test(node.nodeName)) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tself.remove(node);\n\t\t\t\t}\n\n\t\t\t\treturn node;\n\t\t\t}\n\n\t\t\tif (parentElm && splitElm) {\n\t\t\t\t// Get before chunk\n\t\t\t\tr.setStart(parentElm.parentNode, self.nodeIndex(parentElm));\n\t\t\t\tr.setEnd(splitElm.parentNode, self.nodeIndex(splitElm));\n\t\t\t\tbef = r.extractContents();\n\n\t\t\t\t// Get after chunk\n\t\t\t\tr = self.createRng();\n\t\t\t\tr.setStart(splitElm.parentNode, self.nodeIndex(splitElm) + 1);\n\t\t\t\tr.setEnd(parentElm.parentNode, self.nodeIndex(parentElm) + 1);\n\t\t\t\taft = r.extractContents();\n\n\t\t\t\t// Insert before chunk\n\t\t\t\tpa = parentElm.parentNode;\n\t\t\t\tpa.insertBefore(trimNode(bef), parentElm);\n\n\t\t\t\t// Insert middle chunk\n\t\t\t\tif (replacementElm) {\n\t\t\t\t\tpa.insertBefore(replacementElm, parentElm);\n\t\t\t\t\t//pa.replaceChild(replacementElm, splitElm);\n\t\t\t\t} else {\n\t\t\t\t\tpa.insertBefore(splitElm, parentElm);\n\t\t\t\t}\n\n\t\t\t\t// Insert after chunk\n\t\t\t\tpa.insertBefore(trimNode(aft), parentElm);\n\t\t\t\tself.remove(parentElm);\n\n\t\t\t\treturn replacementElm || splitElm;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Adds an event handler to the specified object.\n\t\t *\n\t\t * @method bind\n\t\t * @param {Element/Document/Window/Array} target Target element to bind events to.\n\t\t * handler to or an array of elements/ids/documents.\n\t\t * @param {String} name Name of event handler to add, for example: click.\n\t\t * @param {function} func Function to execute when the event occurs.\n\t\t * @param {Object} scope Optional scope to execute the function in.\n\t\t * @return {function} Function callback handler the same as the one passed in.\n\t\t */\n\t\tbind: function(target, name, func, scope) {\n\t\t\tvar self = this;\n\n\t\t\tif (Tools.isArray(target)) {\n\t\t\t\tvar i = target.length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\ttarget[i] = self.bind(target[i], name, func, scope);\n\t\t\t\t}\n\n\t\t\t\treturn target;\n\t\t\t}\n\n\t\t\t// Collect all window/document events bound by editor instance\n\t\t\tif (self.settings.collect && (target === self.doc || target === self.win)) {\n\t\t\t\tself.boundEvents.push([target, name, func, scope]);\n\t\t\t}\n\n\t\t\treturn self.events.bind(target, name, func, scope || self);\n\t\t},\n\n\t\t/**\n\t\t * Removes the specified event handler by name and function from an element or collection of elements.\n\t\t *\n\t\t * @method unbind\n\t\t * @param {Element/Document/Window/Array} target Target element to unbind events on.\n\t\t * @param {String} name Event handler name, for example: \"click\"\n\t\t * @param {function} func Function to remove.\n\t\t * @return {bool/Array} Bool state of true if the handler was removed, or an array of states if multiple input elements\n\t\t * were passed in.\n\t\t */\n\t\tunbind: function(target, name, func) {\n\t\t\tvar self = this, i;\n\n\t\t\tif (Tools.isArray(target)) {\n\t\t\t\ti = target.length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\ttarget[i] = self.unbind(target[i], name, func);\n\t\t\t\t}\n\n\t\t\t\treturn target;\n\t\t\t}\n\n\t\t\t// Remove any bound events matching the input\n\t\t\tif (self.boundEvents && (target === self.doc || target === self.win)) {\n\t\t\t\ti = self.boundEvents.length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tvar item = self.boundEvents[i];\n\n\t\t\t\t\tif (target == item[0] && (!name || name == item[1]) && (!func || func == item[2])) {\n\t\t\t\t\t\tthis.events.unbind(item[0], item[1], item[2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this.events.unbind(target, name, func);\n\t\t},\n\n\t\t/**\n\t\t * Fires the specified event name with object on target.\n\t\t *\n\t\t * @method fire\n\t\t * @param {Node/Document/Window} target Target element or object to fire event on.\n\t\t * @param {String} name Name of the event to fire.\n\t\t * @param {Object} evt Event object to send.\n\t\t * @return {Event} Event object.\n\t\t */\n\t\tfire: function(target, name, evt) {\n\t\t\treturn this.events.fire(target, name, evt);\n\t\t},\n\n\t\t// Returns the content editable state of a node\n\t\tgetContentEditable: function(node) {\n\t\t\tvar contentEditable;\n\n\t\t\t// Check type\n\t\t\tif (!node || node.nodeType != 1) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Check for fake content editable\n\t\t\tcontentEditable = node.getAttribute(\"data-mce-contenteditable\");\n\t\t\tif (contentEditable && contentEditable !== \"inherit\") {\n\t\t\t\treturn contentEditable;\n\t\t\t}\n\n\t\t\t// Check for real content editable\n\t\t\treturn node.contentEditable !== \"inherit\" ? node.contentEditable : null;\n\t\t},\n\n\t\tgetContentEditableParent: function(node) {\n\t\t\tvar root = this.getRoot(), state = null;\n\n\t\t\tfor (; node && node !== root; node = node.parentNode) {\n\t\t\t\tstate = this.getContentEditable(node);\n\n\t\t\t\tif (state !== null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn state;\n\t\t},\n\n\t\t/**\n\t\t * Destroys all internal references to the DOM to solve IE leak issues.\n\t\t *\n\t\t * @method destroy\n\t\t */\n\t\tdestroy: function() {\n\t\t\tvar self = this;\n\n\t\t\t// Unbind all events bound to window/document by editor instance\n\t\t\tif (self.boundEvents) {\n\t\t\t\tvar i = self.boundEvents.length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tvar item = self.boundEvents[i];\n\t\t\t\t\tthis.events.unbind(item[0], item[1], item[2]);\n\t\t\t\t}\n\n\t\t\t\tself.boundEvents = null;\n\t\t\t}\n\n\t\t\t// Restore sizzle document to window.document\n\t\t\t// Since the current document might be removed producing \"Permission denied\" on IE see #6325\n\t\t\tif (Sizzle.setDocument) {\n\t\t\t\tSizzle.setDocument();\n\t\t\t}\n\n\t\t\tself.win = self.doc = self.root = self.events = self.frag = null;\n\t\t},\n\n\t\tisChildOf: function(node, parent) {\n\t\t\twhile (node) {\n\t\t\t\tif (parent === node) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tnode = node.parentNode;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\n\t\t// #ifdef debug\n\n\t\tdumpRng: function(r) {\n\t\t\treturn (\n\t\t\t\t'startContainer: ' + r.startContainer.nodeName +\n\t\t\t\t', startOffset: ' + r.startOffset +\n\t\t\t\t', endContainer: ' + r.endContainer.nodeName +\n\t\t\t\t', endOffset: ' + r.endOffset\n\t\t\t);\n\t\t},\n\n\t\t// #endif\n\n\t\t_findSib: function(node, selector, name) {\n\t\t\tvar self = this, func = selector;\n\n\t\t\tif (node) {\n\t\t\t\t// If expression make a function of it using is\n\t\t\t\tif (typeof func == 'string') {\n\t\t\t\t\tfunc = function(node) {\n\t\t\t\t\t\treturn self.is(node, selector);\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Loop all siblings\n\t\t\t\tfor (node = node[name]; node; node = node[name]) {\n\t\t\t\t\tif (func(node)) {\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\t};\n\n\t/**\n\t * Instance of DOMUtils for the current document.\n\t *\n\t * @static\n\t * @property DOM\n\t * @type tinymce.dom.DOMUtils\n\t * @example\n\t * // Example of how to add a class to some element by id\n\t * tinymce.DOM.addClass('someid', 'someclass');\n\t */\n\tDOMUtils.DOM = new DOMUtils(document);\n\tDOMUtils.nodeIndex = nodeIndex;\n\n\treturn DOMUtils;\n});\n\n// Included from: js/tinymce/classes/dom/ScriptLoader.js\n\n/**\n * ScriptLoader.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/*globals console*/\n\n/**\n * This class handles asynchronous/synchronous loading of JavaScript files it will execute callbacks\n * when various items gets loaded. This class is useful to load external JavaScript files.\n *\n * @class tinymce.dom.ScriptLoader\n * @example\n * // Load a script from a specific URL using the global script loader\n * tinymce.ScriptLoader.load('somescript.js');\n *\n * // Load a script using a unique instance of the script loader\n * var scriptLoader = new tinymce.dom.ScriptLoader();\n *\n * scriptLoader.load('somescript.js');\n *\n * // Load multiple scripts\n * var scriptLoader = new tinymce.dom.ScriptLoader();\n *\n * scriptLoader.add('somescript1.js');\n * scriptLoader.add('somescript2.js');\n * scriptLoader.add('somescript3.js');\n *\n * scriptLoader.loadQueue(function() {\n * alert('All scripts are now loaded.');\n * });\n */\ndefine(\"tinymce/dom/ScriptLoader\", [\n\t\"tinymce/dom/DOMUtils\",\n\t\"tinymce/util/Tools\"\n], function(DOMUtils, Tools) {\n\tvar DOM = DOMUtils.DOM;\n\tvar each = Tools.each, grep = Tools.grep;\n\n\tvar isFunction = function (f) {\n\t\treturn typeof f === 'function';\n\t};\n\n\tfunction ScriptLoader() {\n\t\tvar QUEUED = 0,\n\t\t\tLOADING = 1,\n\t\t\tLOADED = 2,\n\t\t\tFAILED = 3,\n\t\t\tstates = {},\n\t\t\tqueue = [],\n\t\t\tscriptLoadedCallbacks = {},\n\t\t\tqueueLoadedCallbacks = [],\n\t\t\tloading = 0,\n\t\t\tundef;\n\n\t\t/**\n\t\t * Loads a specific script directly without adding it to the load queue.\n\t\t *\n\t\t * @method load\n\t\t * @param {String} url Absolute URL to script to add.\n\t\t * @param {function} callback Optional success callback function when the script loaded successfully.\n\t\t * @param {function} callback Optional failure callback function when the script failed to load.\n\t\t */\n\t\tfunction loadScript(url, success, failure) {\n\t\t\tvar dom = DOM, elm, id;\n\n\t\t\t// Execute callback when script is loaded\n\t\t\tfunction done() {\n\t\t\t\tdom.remove(id);\n\n\t\t\t\tif (elm) {\n\t\t\t\t\telm.onreadystatechange = elm.onload = elm = null;\n\t\t\t\t}\n\n\t\t\t\tsuccess();\n\t\t\t}\n\n\t\t\tfunction error() {\n\t\t\t\t/*eslint no-console:0 */\n\n\t\t\t\t// We can't mark it as done if there is a load error since\n\t\t\t\t// A) We don't want to produce 404 errors on the server and\n\t\t\t\t// B) the onerror event won't fire on all browsers.\n\t\t\t\t// done();\n\n\t\t\t\tif (isFunction(failure)) {\n\t\t\t\t\tfailure();\n\t\t\t\t} else {\n\t\t\t\t\t// Report the error so it's easier for people to spot loading errors\n\t\t\t\t\tif (typeof console !== \"undefined\" && console.log) {\n\t\t\t\t\t\tconsole.log(\"Failed to load script: \" + url);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tid = dom.uniqueId();\n\n\t\t\t// Create new script element\n\t\t\telm = document.createElement('script');\n\t\t\telm.id = id;\n\t\t\telm.type = 'text/javascript';\n\t\t\telm.src = Tools._addCacheSuffix(url);\n\n\t\t\t// Seems that onreadystatechange works better on IE 10 onload seems to fire incorrectly\n\t\t\tif (\"onreadystatechange\" in elm) {\n\t\t\t\telm.onreadystatechange = function() {\n\t\t\t\t\tif (/loaded|complete/.test(elm.readyState)) {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\telm.onload = done;\n\t\t\t}\n\n\t\t\t// Add onerror event will get fired on some browsers but not all of them\n\t\t\telm.onerror = error;\n\n\t\t\t// Add script to document\n\t\t\t(document.getElementsByTagName('head')[0] || document.body).appendChild(elm);\n\t\t}\n\n\t\t/**\n\t\t * Returns true/false if a script has been loaded or not.\n\t\t *\n\t\t * @method isDone\n\t\t * @param {String} url URL to check for.\n\t\t * @return {Boolean} true/false if the URL is loaded.\n\t\t */\n\t\tthis.isDone = function(url) {\n\t\t\treturn states[url] == LOADED;\n\t\t};\n\n\t\t/**\n\t\t * Marks a specific script to be loaded. This can be useful if a script got loaded outside\n\t\t * the script loader or to skip it from loading some script.\n\t\t *\n\t\t * @method markDone\n\t\t * @param {string} url Absolute URL to the script to mark as loaded.\n\t\t */\n\t\tthis.markDone = function(url) {\n\t\t\tstates[url] = LOADED;\n\t\t};\n\n\t\t/**\n\t\t * Adds a specific script to the load queue of the script loader.\n\t\t *\n\t\t * @method add\n\t\t * @param {String} url Absolute URL to script to add.\n\t\t * @param {function} success Optional success callback function to execute when the script loades successfully.\n\t\t * @param {Object} scope Optional scope to execute callback in.\n\t\t * @param {function} failure Optional failure callback function to execute when the script failed to load.\n\t\t */\n\t\tthis.add = this.load = function(url, success, scope, failure) {\n\t\t\tvar state = states[url];\n\n\t\t\t// Add url to load queue\n\t\t\tif (state == undef) {\n\t\t\t\tqueue.push(url);\n\t\t\t\tstates[url] = QUEUED;\n\t\t\t}\n\n\t\t\tif (success) {\n\t\t\t\t// Store away callback for later execution\n\t\t\t\tif (!scriptLoadedCallbacks[url]) {\n\t\t\t\t\tscriptLoadedCallbacks[url] = [];\n\t\t\t\t}\n\n\t\t\t\tscriptLoadedCallbacks[url].push({\n\t\t\t\t\tsuccess: success,\n\t\t\t\t\tfailure: failure,\n\t\t\t\t\tscope: scope || this\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tthis.remove = function(url) {\n\t\t\tdelete states[url];\n\t\t\tdelete scriptLoadedCallbacks[url];\n\t\t};\n\n\t\t/**\n\t\t * Starts the loading of the queue.\n\t\t *\n\t\t * @method loadQueue\n\t\t * @param {function} success Optional callback to execute when all queued items are loaded.\n\t\t * @param {function} failure Optional callback to execute when queued items failed to load.\n\t\t * @param {Object} scope Optional scope to execute the callback in.\n\t\t */\n\t\tthis.loadQueue = function(success, scope, failure) {\n\t\t\tthis.loadScripts(queue, success, scope, failure);\n\t\t};\n\n\t\t/**\n\t\t * Loads the specified queue of files and executes the callback ones they are loaded.\n\t\t * This method is generally not used outside this class but it might be useful in some scenarios.\n\t\t *\n\t\t * @method loadScripts\n\t\t * @param {Array} scripts Array of queue items to load.\n\t\t * @param {function} callback Optional callback to execute when scripts is loaded successfully.\n\t\t * @param {Object} scope Optional scope to execute callback in.\n\t\t * @param {function} callback Optional callback to execute if scripts failed to load.\n\t\t */\n\t\tthis.loadScripts = function(scripts, success, scope, failure) {\n\t\t\tvar loadScripts, failures = [];\n\n\t\t\tfunction execCallbacks(name, url) {\n\t\t\t\t// Execute URL callback functions\n\t\t\t\teach(scriptLoadedCallbacks[url], function(callback) {\n\t\t\t\t\tif (isFunction(callback[name])) {\n\t\t\t\t\t\tcallback[name].call(callback.scope);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tscriptLoadedCallbacks[url] = undef;\n\t\t\t}\n\n\t\t\tqueueLoadedCallbacks.push({\n\t\t\t\tsuccess: success,\n\t\t\t\tfailure: failure,\n\t\t\t\tscope: scope || this\n\t\t\t});\n\n\t\t\tloadScripts = function() {\n\t\t\t\tvar loadingScripts = grep(scripts);\n\n\t\t\t\t// Current scripts has been handled\n\t\t\t\tscripts.length = 0;\n\n\t\t\t\t// Load scripts that needs to be loaded\n\t\t\t\teach(loadingScripts, function(url) {\n\t\t\t\t\t// Script is already loaded then execute script callbacks directly\n\t\t\t\t\tif (states[url] === LOADED) {\n\t\t\t\t\t\texecCallbacks('success', url);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (states[url] === FAILED) {\n\t\t\t\t\t\texecCallbacks('failure', url);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Is script not loading then start loading it\n\t\t\t\t\tif (states[url] !== LOADING) {\n\t\t\t\t\t\tstates[url] = LOADING;\n\t\t\t\t\t\tloading++;\n\n\t\t\t\t\t\tloadScript(url, function() {\n\t\t\t\t\t\t\tstates[url] = LOADED;\n\t\t\t\t\t\t\tloading--;\n\n\t\t\t\t\t\t\texecCallbacks('success', url);\n\n\t\t\t\t\t\t\t// Load more scripts if they where added by the recently loaded script\n\t\t\t\t\t\t\tloadScripts();\n\t\t\t\t\t\t}, function () {\n\t\t\t\t\t\t\tstates[url] = FAILED;\n\t\t\t\t\t\t\tloading--;\n\n\t\t\t\t\t\t\tfailures.push(url);\n\t\t\t\t\t\t\texecCallbacks('failure', url);\n\n\t\t\t\t\t\t\t// Load more scripts if they where added by the recently loaded script\n\t\t\t\t\t\t\tloadScripts();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// No scripts are currently loading then execute all pending queue loaded callbacks\n\t\t\t\tif (!loading) {\n\t\t\t\t\teach(queueLoadedCallbacks, function(callback) {\n\t\t\t\t\t\tif (failures.length === 0) {\n\t\t\t\t\t\t\tif (isFunction(callback.success)) {\n\t\t\t\t\t\t\t\tcallback.success.call(callback.scope);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (isFunction(callback.failure)) {\n\t\t\t\t\t\t\t\tcallback.failure.call(callback.scope, failures);\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\tqueueLoadedCallbacks.length = 0;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tloadScripts();\n\t\t};\n\t}\n\n\tScriptLoader.ScriptLoader = new ScriptLoader();\n\n\treturn ScriptLoader;\n});\n\n// Included from: js/tinymce/classes/AddOnManager.js\n\n/**\n * AddOnManager.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class handles the loading of themes/plugins or other add-ons and their language packs.\n *\n * @class tinymce.AddOnManager\n */\ndefine(\"tinymce/AddOnManager\", [\n\t\"tinymce/dom/ScriptLoader\",\n\t\"tinymce/util/Tools\"\n], function(ScriptLoader, Tools) {\n\tvar each = Tools.each;\n\n\tfunction AddOnManager() {\n\t\tvar self = this;\n\n\t\tself.items = [];\n\t\tself.urls = {};\n\t\tself.lookup = {};\n\t}\n\n\tAddOnManager.prototype = {\n\t\t/**\n\t\t * Returns the specified add on by the short name.\n\t\t *\n\t\t * @method get\n\t\t * @param {String} name Add-on to look for.\n\t\t * @return {tinymce.Theme/tinymce.Plugin} Theme or plugin add-on instance or undefined.\n\t\t */\n\t\tget: function(name) {\n\t\t\tif (this.lookup[name]) {\n\t\t\t\treturn this.lookup[name].instance;\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t},\n\n\t\tdependencies: function(name) {\n\t\t\tvar result;\n\n\t\t\tif (this.lookup[name]) {\n\t\t\t\tresult = this.lookup[name].dependencies;\n\t\t\t}\n\n\t\t\treturn result || [];\n\t\t},\n\n\t\t/**\n\t\t * Loads a language pack for the specified add-on.\n\t\t *\n\t\t * @method requireLangPack\n\t\t * @param {String} name Short name of the add-on.\n\t\t * @param {String} languages Optional comma or space separated list of languages to check if it matches the name.\n\t\t */\n\t\trequireLangPack: function(name, languages) {\n\t\t\tvar language = AddOnManager.language;\n\n\t\t\tif (language && AddOnManager.languageLoad !== false) {\n\t\t\t\tif (languages) {\n\t\t\t\t\tlanguages = ',' + languages + ',';\n\n\t\t\t\t\t// Load short form sv.js or long form sv_SE.js\n\t\t\t\t\tif (languages.indexOf(',' + language.substr(0, 2) + ',') != -1) {\n\t\t\t\t\t\tlanguage = language.substr(0, 2);\n\t\t\t\t\t} else if (languages.indexOf(',' + language + ',') == -1) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tScriptLoader.ScriptLoader.add(this.urls[name] + '/langs/' + language + '.js');\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Adds a instance of the add-on by it's short name.\n\t\t *\n\t\t * @method add\n\t\t * @param {String} id Short name/id for the add-on.\n\t\t * @param {tinymce.Theme/tinymce.Plugin} addOn Theme or plugin to add.\n\t\t * @return {tinymce.Theme/tinymce.Plugin} The same theme or plugin instance that got passed in.\n\t\t * @example\n\t\t * // Create a simple plugin\n\t\t * tinymce.create('tinymce.plugins.TestPlugin', {\n\t\t * TestPlugin: function(ed, url) {\n\t\t * ed.on('click', function(e) {\n\t\t * ed.windowManager.alert('Hello World!');\n\t\t * });\n\t\t * }\n\t\t * });\n\t\t *\n\t\t * // Register plugin using the add method\n\t\t * tinymce.PluginManager.add('test', tinymce.plugins.TestPlugin);\n\t\t *\n\t\t * // Initialize TinyMCE\n\t\t * tinymce.init({\n\t\t * ...\n\t\t * plugins: '-test' // Init the plugin but don't try to load it\n\t\t * });\n\t\t */\n\t\tadd: function(id, addOn, dependencies) {\n\t\t\tthis.items.push(addOn);\n\t\t\tthis.lookup[id] = {instance: addOn, dependencies: dependencies};\n\n\t\t\treturn addOn;\n\t\t},\n\n\t\tremove: function(name) {\n\t\t\tdelete this.urls[name];\n\t\t\tdelete this.lookup[name];\n\t\t},\n\n\t\tcreateUrl: function(baseUrl, dep) {\n\t\t\tif (typeof dep === \"object\") {\n\t\t\t\treturn dep;\n\t\t\t}\n\n\t\t\treturn {prefix: baseUrl.prefix, resource: dep, suffix: baseUrl.suffix};\n\t\t},\n\n\t\t/**\n\t\t * Add a set of components that will make up the add-on. Using the url of the add-on name as the base url.\n\t\t * This should be used in development mode. A new compressor/javascript munger process will ensure that the\n\t\t * components are put together into the plugin.js file and compressed correctly.\n\t\t *\n\t\t * @method addComponents\n\t\t * @param {String} pluginName name of the plugin to load scripts from (will be used to get the base url for the plugins).\n\t\t * @param {Array} scripts Array containing the names of the scripts to load.\n\t\t */\n\t\taddComponents: function(pluginName, scripts) {\n\t\t\tvar pluginUrl = this.urls[pluginName];\n\n\t\t\teach(scripts, function(script) {\n\t\t\t\tScriptLoader.ScriptLoader.add(pluginUrl + \"/\" + script);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Loads an add-on from a specific url.\n\t\t *\n\t\t * @method load\n\t\t * @param {String} name Short name of the add-on that gets loaded.\n\t\t * @param {String} addOnUrl URL to the add-on that will get loaded.\n\t\t * @param {function} success Optional success callback to execute when an add-on is loaded.\n\t\t * @param {Object} scope Optional scope to execute the callback in.\n\t\t * @param {function} failure Optional failure callback to execute when an add-on failed to load.\n\t\t * @example\n\t\t * // Loads a plugin from an external URL\n\t\t * tinymce.PluginManager.load('myplugin', '/some/dir/someplugin/plugin.js');\n\t\t *\n\t\t * // Initialize TinyMCE\n\t\t * tinymce.init({\n\t\t * ...\n\t\t * plugins: '-myplugin' // Don't try to load it again\n\t\t * });\n\t\t */\n\t\tload: function(name, addOnUrl, success, scope, failure) {\n\t\t\tvar self = this, url = addOnUrl;\n\n\t\t\tfunction loadDependencies() {\n\t\t\t\tvar dependencies = self.dependencies(name);\n\n\t\t\t\teach(dependencies, function(dep) {\n\t\t\t\t\tvar newUrl = self.createUrl(addOnUrl, dep);\n\n\t\t\t\t\tself.load(newUrl.resource, newUrl, undefined, undefined);\n\t\t\t\t});\n\n\t\t\t\tif (success) {\n\t\t\t\t\tif (scope) {\n\t\t\t\t\t\tsuccess.call(scope);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsuccess.call(ScriptLoader);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (self.urls[name]) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (typeof addOnUrl === \"object\") {\n\t\t\t\turl = addOnUrl.prefix + addOnUrl.resource + addOnUrl.suffix;\n\t\t\t}\n\n\t\t\tif (url.indexOf('/') !== 0 && url.indexOf('://') == -1) {\n\t\t\t\turl = AddOnManager.baseURL + '/' + url;\n\t\t\t}\n\n\t\t\tself.urls[name] = url.substring(0, url.lastIndexOf('/'));\n\n\t\t\tif (self.lookup[name]) {\n\t\t\t\tloadDependencies();\n\t\t\t} else {\n\t\t\t\tScriptLoader.ScriptLoader.add(url, loadDependencies, scope, failure);\n\t\t\t}\n\t\t}\n\t};\n\n\tAddOnManager.PluginManager = new AddOnManager();\n\tAddOnManager.ThemeManager = new AddOnManager();\n\n\treturn AddOnManager;\n});\n\n/**\n * TinyMCE theme class.\n *\n * @class tinymce.Theme\n */\n\n/**\n * This method is responsible for rendering/generating the overall user interface with toolbars, buttons, iframe containers etc.\n *\n * @method renderUI\n * @param {Object} obj Object parameter containing the targetNode DOM node that will be replaced visually with an editor instance.\n * @return {Object} an object with items like iframeContainer, editorContainer, sizeContainer, deltaWidth, deltaHeight.\n */\n\n/**\n * Plugin base class, this is a pseudo class that describes how a plugin is to be created for TinyMCE. The methods below are all optional.\n *\n * @class tinymce.Plugin\n * @example\n * tinymce.PluginManager.add('example', function(editor, url) {\n * // Add a button that opens a window\n * editor.addButton('example', {\n * text: 'My button',\n * icon: false,\n * onclick: function() {\n * // Open window\n * editor.windowManager.open({\n * title: 'Example plugin',\n * body: [\n * {type: 'textbox', name: 'title', label: 'Title'}\n * ],\n * onsubmit: function(e) {\n * // Insert content when the window form is submitted\n * editor.insertContent('Title: ' + e.data.title);\n * }\n * });\n * }\n * });\n *\n * // Adds a menu item to the tools menu\n * editor.addMenuItem('example', {\n * text: 'Example plugin',\n * context: 'tools',\n * onclick: function() {\n * // Open window with a specific url\n * editor.windowManager.open({\n * title: 'TinyMCE site',\n * url: 'http://www.tinymce.com',\n * width: 800,\n * height: 600,\n * buttons: [{\n * text: 'Close',\n * onclick: 'close'\n * }]\n * });\n * }\n * });\n * });\n */\n\n// Included from: js/tinymce/classes/dom/NodeType.js\n\n/**\n * NodeType.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Contains various node validation functions.\n *\n * @private\n * @class tinymce.dom.NodeType\n */\ndefine(\"tinymce/dom/NodeType\", [], function() {\n\tfunction isNodeType(type) {\n\t\treturn function(node) {\n\t\t\treturn !!node && node.nodeType == type;\n\t\t};\n\t}\n\n\tvar isElement = isNodeType(1);\n\n\tfunction matchNodeNames(names) {\n\t\tnames = names.toLowerCase().split(' ');\n\n\t\treturn function(node) {\n\t\t\tvar i, name;\n\n\t\t\tif (node && node.nodeType) {\n\t\t\t\tname = node.nodeName.toLowerCase();\n\n\t\t\t\tfor (i = 0; i < names.length; i++) {\n\t\t\t\t\tif (name === names[i]) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t};\n\t}\n\n\tfunction matchStyleValues(name, values) {\n\t\tvalues = values.toLowerCase().split(' ');\n\n\t\treturn function(node) {\n\t\t\tvar i, cssValue;\n\n\t\t\tif (isElement(node)) {\n\t\t\t\tfor (i = 0; i < values.length; i++) {\n\t\t\t\t\tcssValue = getComputedStyle(node, null).getPropertyValue(name);\n\t\t\t\t\tif (cssValue === values[i]) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t};\n\t}\n\n\tfunction hasPropValue(propName, propValue) {\n\t\treturn function(node) {\n\t\t\treturn isElement(node) && node[propName] === propValue;\n\t\t};\n\t}\n\n\tfunction hasAttributeValue(attrName, attrValue) {\n\t\treturn function(node) {\n\t\t\treturn isElement(node) && node.getAttribute(attrName) === attrValue;\n\t\t};\n\t}\n\n\tfunction isBogus(node) {\n\t\treturn isElement(node) && node.hasAttribute('data-mce-bogus');\n\t}\n\n\tfunction hasContentEditableState(value) {\n\t\treturn function(node) {\n\t\t\tif (isElement(node)) {\n\t\t\t\tif (node.contentEditable === value) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (node.getAttribute('data-mce-contenteditable') === value) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t};\n\t}\n\n\treturn {\n\t\tisText: isNodeType(3),\n\t\tisElement: isElement,\n\t\tisComment: isNodeType(8),\n\t\tisBr: matchNodeNames('br'),\n\t\tisContentEditableTrue: hasContentEditableState('true'),\n\t\tisContentEditableFalse: hasContentEditableState('false'),\n\t\tmatchNodeNames: matchNodeNames,\n\t\thasPropValue: hasPropValue,\n\t\thasAttributeValue: hasAttributeValue,\n\t\tmatchStyleValues: matchStyleValues,\n\t\tisBogus: isBogus\n\t};\n});\n\n// Included from: js/tinymce/classes/text/Zwsp.js\n\n/**\n * Zwsp.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Utility functions for working with zero width space\n * characters used as character containers etc.\n *\n * @private\n * @class tinymce.text.Zwsp\n * @example\n * var isZwsp = Zwsp.isZwsp('\\uFEFF');\n * var abc = Zwsp.trim('a\\uFEFFc');\n */\ndefine(\"tinymce/text/Zwsp\", [], function() {\n\tvar ZWSP = '\\uFEFF';\n\n\tfunction isZwsp(chr) {\n\t\treturn chr == ZWSP;\n\t}\n\n\tfunction trim(str) {\n\t\treturn str.replace(new RegExp(ZWSP, 'g'), '');\n\t}\n\n\treturn {\n\t\tisZwsp: isZwsp,\n\t\tZWSP: ZWSP,\n\t\ttrim: trim\n\t};\n});\n\n// Included from: js/tinymce/classes/caret/CaretContainer.js\n\n/**\n * CaretContainer.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This module handles caret containers. A caret container is a node that\n * holds the caret for positional purposes.\n *\n * @private\n * @class tinymce.caret.CaretContainer\n */\ndefine(\"tinymce/caret/CaretContainer\", [\n\t\"tinymce/dom/NodeType\",\n\t\"tinymce/text/Zwsp\"\n], function(NodeType, Zwsp) {\n\tvar isElement = NodeType.isElement,\n\t\tisText = NodeType.isText;\n\n\tfunction isCaretContainerBlock(node) {\n\t\tif (isText(node)) {\n\t\t\tnode = node.parentNode;\n\t\t}\n\n\t\treturn isElement(node) && node.hasAttribute('data-mce-caret');\n\t}\n\n\tfunction isCaretContainerInline(node) {\n\t\treturn isText(node) && Zwsp.isZwsp(node.data);\n\t}\n\n\tfunction isCaretContainer(node) {\n\t\treturn isCaretContainerBlock(node) || isCaretContainerInline(node);\n\t}\n\n\tfunction removeNode(node) {\n\t\tvar parentNode = node.parentNode;\n\t\tif (parentNode) {\n\t\t\tparentNode.removeChild(node);\n\t\t}\n\t}\n\n\tfunction getNodeValue(node) {\n\t\ttry {\n\t\t\treturn node.nodeValue;\n\t\t} catch (ex) {\n\t\t\t// IE sometimes produces \"Invalid argument\" on nodes\n\t\t\treturn \"\";\n\t\t}\n\t}\n\n\tfunction setNodeValue(node, text) {\n\t\tif (text.length === 0) {\n\t\t\tremoveNode(node);\n\t\t} else {\n\t\t\tnode.nodeValue = text;\n\t\t}\n\t}\n\n\tfunction insertInline(node, before) {\n\t\tvar doc, sibling, textNode, parentNode;\n\n\t\tdoc = node.ownerDocument;\n\t\ttextNode = doc.createTextNode(Zwsp.ZWSP);\n\t\tparentNode = node.parentNode;\n\n\t\tif (!before) {\n\t\t\tsibling = node.nextSibling;\n\t\t\tif (isText(sibling)) {\n\t\t\t\tif (isCaretContainer(sibling)) {\n\t\t\t\t\treturn sibling;\n\t\t\t\t}\n\n\t\t\t\tif (startsWithCaretContainer(sibling)) {\n\t\t\t\t\tsibling.splitText(1);\n\t\t\t\t\treturn sibling;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (node.nextSibling) {\n\t\t\t\tparentNode.insertBefore(textNode, node.nextSibling);\n\t\t\t} else {\n\t\t\t\tparentNode.appendChild(textNode);\n\t\t\t}\n\t\t} else {\n\t\t\tsibling = node.previousSibling;\n\t\t\tif (isText(sibling)) {\n\t\t\t\tif (isCaretContainer(sibling)) {\n\t\t\t\t\treturn sibling;\n\t\t\t\t}\n\n\t\t\t\tif (endsWithCaretContainer(sibling)) {\n\t\t\t\t\treturn sibling.splitText(sibling.data.length - 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tparentNode.insertBefore(textNode, node);\n\t\t}\n\n\t\treturn textNode;\n\t}\n\n\tfunction createBogusBr() {\n\t\tvar br = document.createElement('br');\n\t\tbr.setAttribute('data-mce-bogus', '1');\n\t\treturn br;\n\t}\n\n\tfunction insertBlock(blockName, node, before) {\n\t\tvar doc, blockNode, parentNode;\n\n\t\tdoc = node.ownerDocument;\n\t\tblockNode = doc.createElement(blockName);\n\t\tblockNode.setAttribute('data-mce-caret', before ? 'before' : 'after');\n\t\tblockNode.setAttribute('data-mce-bogus', 'all');\n\t\tblockNode.appendChild(createBogusBr());\n\t\tparentNode = node.parentNode;\n\n\t\tif (!before) {\n\t\t\tif (node.nextSibling) {\n\t\t\t\tparentNode.insertBefore(blockNode, node.nextSibling);\n\t\t\t} else {\n\t\t\t\tparentNode.appendChild(blockNode);\n\t\t\t}\n\t\t} else {\n\t\t\tparentNode.insertBefore(blockNode, node);\n\t\t}\n\n\t\treturn blockNode;\n\t}\n\n\tfunction hasContent(node) {\n\t\treturn node.firstChild !== node.lastChild || !NodeType.isBr(node.firstChild);\n\t}\n\n\tfunction remove(caretContainerNode) {\n\t\tif (isElement(caretContainerNode) && isCaretContainer(caretContainerNode)) {\n\t\t\tif (hasContent(caretContainerNode)) {\n\t\t\t\tcaretContainerNode.removeAttribute('data-mce-caret');\n\t\t\t} else {\n\t\t\t\tremoveNode(caretContainerNode);\n\t\t\t}\n\t\t}\n\n\t\tif (isText(caretContainerNode)) {\n\t\t\tvar text = Zwsp.trim(getNodeValue(caretContainerNode));\n\t\t\tsetNodeValue(caretContainerNode, text);\n\t\t}\n\t}\n\n\tfunction startsWithCaretContainer(node) {\n\t\treturn isText(node) && node.data[0] == Zwsp.ZWSP;\n\t}\n\n\tfunction endsWithCaretContainer(node) {\n\t\treturn isText(node) && node.data[node.data.length - 1] == Zwsp.ZWSP;\n\t}\n\n\tfunction trimBogusBr(elm) {\n\t\tvar brs = elm.getElementsByTagName('br');\n\t\tvar lastBr = brs[brs.length - 1];\n\t\tif (NodeType.isBogus(lastBr)) {\n\t\t\tlastBr.parentNode.removeChild(lastBr);\n\t\t}\n\t}\n\n\tfunction showCaretContainerBlock(caretContainer) {\n\t\tif (caretContainer && caretContainer.hasAttribute('data-mce-caret')) {\n\t\t\ttrimBogusBr(caretContainer);\n\t\t\tcaretContainer.removeAttribute('data-mce-caret');\n\t\t\tcaretContainer.removeAttribute('data-mce-bogus');\n\t\t\tcaretContainer.removeAttribute('style');\n\t\t\tcaretContainer.removeAttribute('_moz_abspos');\n\t\t\treturn caretContainer;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tisCaretContainer: isCaretContainer,\n\t\tisCaretContainerBlock: isCaretContainerBlock,\n\t\tisCaretContainerInline: isCaretContainerInline,\n\t\tshowCaretContainerBlock: showCaretContainerBlock,\n\t\tinsertInline: insertInline,\n\t\tinsertBlock: insertBlock,\n\t\thasContent: hasContent,\n\t\tremove: remove,\n\t\tstartsWithCaretContainer: startsWithCaretContainer,\n\t\tendsWithCaretContainer: endsWithCaretContainer\n\t};\n});\n\n// Included from: js/tinymce/classes/dom/RangeUtils.js\n\n/**\n * RangeUtils.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class contains a few utility methods for ranges.\n *\n * @class tinymce.dom.RangeUtils\n */\ndefine(\"tinymce/dom/RangeUtils\", [\n\t\"tinymce/util/Tools\",\n\t\"tinymce/dom/TreeWalker\",\n\t\"tinymce/dom/NodeType\",\n\t\"tinymce/dom/Range\",\n\t\"tinymce/caret/CaretContainer\"\n], function(Tools, TreeWalker, NodeType, Range, CaretContainer) {\n\tvar each = Tools.each,\n\t\tisContentEditableTrue = NodeType.isContentEditableTrue,\n\t\tisContentEditableFalse = NodeType.isContentEditableFalse,\n\t\tisCaretContainer = CaretContainer.isCaretContainer;\n\n\tfunction hasCeProperty(node) {\n\t\treturn isContentEditableTrue(node) || isContentEditableFalse(node);\n\t}\n\n\tfunction getEndChild(container, index) {\n\t\tvar childNodes = container.childNodes;\n\n\t\tindex--;\n\n\t\tif (index > childNodes.length - 1) {\n\t\t\tindex = childNodes.length - 1;\n\t\t} else if (index < 0) {\n\t\t\tindex = 0;\n\t\t}\n\n\t\treturn childNodes[index] || container;\n\t}\n\n\tfunction findParent(node, rootNode, predicate) {\n\t\twhile (node && node !== rootNode) {\n\t\t\tif (predicate(node)) {\n\t\t\t\treturn node;\n\t\t\t}\n\n\t\t\tnode = node.parentNode;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction hasParent(node, rootNode, predicate) {\n\t\treturn findParent(node, rootNode, predicate) !== null;\n\t}\n\n\tfunction isFormatterCaret(node) {\n\t\treturn node.id === '_mce_caret';\n\t}\n\n\tfunction isCeFalseCaretContainer(node, rootNode) {\n\t\treturn isCaretContainer(node) && hasParent(node, rootNode, isFormatterCaret) === false;\n\t}\n\n\tfunction RangeUtils(dom) {\n\t\t/**\n\t\t * Walks the specified range like object and executes the callback for each sibling collection it finds.\n\t\t *\n\t\t * @private\n\t\t * @method walk\n\t\t * @param {Object} rng Range like object.\n\t\t * @param {function} callback Callback function to execute for each sibling collection.\n\t\t */\n\t\tthis.walk = function(rng, callback) {\n\t\t\tvar startContainer = rng.startContainer,\n\t\t\t\tstartOffset = rng.startOffset,\n\t\t\t\tendContainer = rng.endContainer,\n\t\t\t\tendOffset = rng.endOffset,\n\t\t\t\tancestor, startPoint,\n\t\t\t\tendPoint, node, parent, siblings, nodes;\n\n\t\t\t// Handle table cell selection the table plugin enables\n\t\t\t// you to fake select table cells and perform formatting actions on them\n\t\t\tnodes = dom.select('td[data-mce-selected],th[data-mce-selected]');\n\t\t\tif (nodes.length > 0) {\n\t\t\t\teach(nodes, function(node) {\n\t\t\t\t\tcallback([node]);\n\t\t\t\t});\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Excludes start/end text node if they are out side the range\n\t\t\t *\n\t\t\t * @private\n\t\t\t * @param {Array} nodes Nodes to exclude items from.\n\t\t\t * @return {Array} Array with nodes excluding the start/end container if needed.\n\t\t\t */\n\t\t\tfunction exclude(nodes) {\n\t\t\t\tvar node;\n\n\t\t\t\t// First node is excluded\n\t\t\t\tnode = nodes[0];\n\t\t\t\tif (node.nodeType === 3 && node === startContainer && startOffset >= node.nodeValue.length) {\n\t\t\t\t\tnodes.splice(0, 1);\n\t\t\t\t}\n\n\t\t\t\t// Last node is excluded\n\t\t\t\tnode = nodes[nodes.length - 1];\n\t\t\t\tif (endOffset === 0 && nodes.length > 0 && node === endContainer && node.nodeType === 3) {\n\t\t\t\t\tnodes.splice(nodes.length - 1, 1);\n\t\t\t\t}\n\n\t\t\t\treturn nodes;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Collects siblings\n\t\t\t *\n\t\t\t * @private\n\t\t\t * @param {Node} node Node to collect siblings from.\n\t\t\t * @param {String} name Name of the sibling to check for.\n\t\t\t * @param {Node} end_node\n\t\t\t * @return {Array} Array of collected siblings.\n\t\t\t */\n\t\t\tfunction collectSiblings(node, name, end_node) {\n\t\t\t\tvar siblings = [];\n\n\t\t\t\tfor (; node && node != end_node; node = node[name]) {\n\t\t\t\t\tsiblings.push(node);\n\t\t\t\t}\n\n\t\t\t\treturn siblings;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Find an end point this is the node just before the common ancestor root.\n\t\t\t *\n\t\t\t * @private\n\t\t\t * @param {Node} node Node to start at.\n\t\t\t * @param {Node} root Root/ancestor element to stop just before.\n\t\t\t * @return {Node} Node just before the root element.\n\t\t\t */\n\t\t\tfunction findEndPoint(node, root) {\n\t\t\t\tdo {\n\t\t\t\t\tif (node.parentNode == root) {\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t} while (node);\n\t\t\t}\n\n\t\t\tfunction walkBoundary(start_node, end_node, next) {\n\t\t\t\tvar siblingName = next ? 'nextSibling' : 'previousSibling';\n\n\t\t\t\tfor (node = start_node, parent = node.parentNode; node && node != end_node; node = parent) {\n\t\t\t\t\tparent = node.parentNode;\n\t\t\t\t\tsiblings = collectSiblings(node == start_node ? node : node[siblingName], siblingName);\n\n\t\t\t\t\tif (siblings.length) {\n\t\t\t\t\t\tif (!next) {\n\t\t\t\t\t\t\tsiblings.reverse();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcallback(exclude(siblings));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If index based start position then resolve it\n\t\t\tif (startContainer.nodeType == 1 && startContainer.hasChildNodes()) {\n\t\t\t\tstartContainer = startContainer.childNodes[startOffset];\n\t\t\t}\n\n\t\t\t// If index based end position then resolve it\n\t\t\tif (endContainer.nodeType == 1 && endContainer.hasChildNodes()) {\n\t\t\t\tendContainer = getEndChild(endContainer, endOffset);\n\t\t\t}\n\n\t\t\t// Same container\n\t\t\tif (startContainer == endContainer) {\n\t\t\t\treturn callback(exclude([startContainer]));\n\t\t\t}\n\n\t\t\t// Find common ancestor and end points\n\t\t\tancestor = dom.findCommonAncestor(startContainer, endContainer);\n\n\t\t\t// Process left side\n\t\t\tfor (node = startContainer; node; node = node.parentNode) {\n\t\t\t\tif (node === endContainer) {\n\t\t\t\t\treturn walkBoundary(startContainer, ancestor, true);\n\t\t\t\t}\n\n\t\t\t\tif (node === ancestor) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Process right side\n\t\t\tfor (node = endContainer; node; node = node.parentNode) {\n\t\t\t\tif (node === startContainer) {\n\t\t\t\t\treturn walkBoundary(endContainer, ancestor);\n\t\t\t\t}\n\n\t\t\t\tif (node === ancestor) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Find start/end point\n\t\t\tstartPoint = findEndPoint(startContainer, ancestor) || startContainer;\n\t\t\tendPoint = findEndPoint(endContainer, ancestor) || endContainer;\n\n\t\t\t// Walk left leaf\n\t\t\twalkBoundary(startContainer, startPoint, true);\n\n\t\t\t// Walk the middle from start to end point\n\t\t\tsiblings = collectSiblings(\n\t\t\t\tstartPoint == startContainer ? startPoint : startPoint.nextSibling,\n\t\t\t\t'nextSibling',\n\t\t\t\tendPoint == endContainer ? endPoint.nextSibling : endPoint\n\t\t\t);\n\n\t\t\tif (siblings.length) {\n\t\t\t\tcallback(exclude(siblings));\n\t\t\t}\n\n\t\t\t// Walk right leaf\n\t\t\twalkBoundary(endContainer, endPoint);\n\t\t};\n\n\t\t/**\n\t\t * Splits the specified range at it's start/end points.\n\t\t *\n\t\t * @private\n\t\t * @param {Range/RangeObject} rng Range to split.\n\t\t * @return {Object} Range position object.\n\t\t */\n\t\tthis.split = function(rng) {\n\t\t\tvar startContainer = rng.startContainer,\n\t\t\t\tstartOffset = rng.startOffset,\n\t\t\t\tendContainer = rng.endContainer,\n\t\t\t\tendOffset = rng.endOffset;\n\n\t\t\tfunction splitText(node, offset) {\n\t\t\t\treturn node.splitText(offset);\n\t\t\t}\n\n\t\t\t// Handle single text node\n\t\t\tif (startContainer == endContainer && startContainer.nodeType == 3) {\n\t\t\t\tif (startOffset > 0 && startOffset < startContainer.nodeValue.length) {\n\t\t\t\t\tendContainer = splitText(startContainer, startOffset);\n\t\t\t\t\tstartContainer = endContainer.previousSibling;\n\n\t\t\t\t\tif (endOffset > startOffset) {\n\t\t\t\t\t\tendOffset = endOffset - startOffset;\n\t\t\t\t\t\tstartContainer = endContainer = splitText(endContainer, endOffset).previousSibling;\n\t\t\t\t\t\tendOffset = endContainer.nodeValue.length;\n\t\t\t\t\t\tstartOffset = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendOffset = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Split startContainer text node if needed\n\t\t\t\tif (startContainer.nodeType == 3 && startOffset > 0 && startOffset < startContainer.nodeValue.length) {\n\t\t\t\t\tstartContainer = splitText(startContainer, startOffset);\n\t\t\t\t\tstartOffset = 0;\n\t\t\t\t}\n\n\t\t\t\t// Split endContainer text node if needed\n\t\t\t\tif (endContainer.nodeType == 3 && endOffset > 0 && endOffset < endContainer.nodeValue.length) {\n\t\t\t\t\tendContainer = splitText(endContainer, endOffset).previousSibling;\n\t\t\t\t\tendOffset = endContainer.nodeValue.length;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tstartContainer: startContainer,\n\t\t\t\tstartOffset: startOffset,\n\t\t\t\tendContainer: endContainer,\n\t\t\t\tendOffset: endOffset\n\t\t\t};\n\t\t};\n\n\t\t/**\n\t\t * Normalizes the specified range by finding the closest best suitable caret location.\n\t\t *\n\t\t * @private\n\t\t * @param {Range} rng Range to normalize.\n\t\t * @return {Boolean} True/false if the specified range was normalized or not.\n\t\t */\n\t\tthis.normalize = function(rng) {\n\t\t\tvar normalized, collapsed;\n\n\t\t\tfunction normalizeEndPoint(start) {\n\t\t\t\tvar container, offset, walker, body = dom.getRoot(), node, nonEmptyElementsMap;\n\t\t\t\tvar directionLeft, isAfterNode;\n\n\t\t\t\tfunction isTableCell(node) {\n\t\t\t\t\treturn node && /^(TD|TH|CAPTION)$/.test(node.nodeName);\n\t\t\t\t}\n\n\t\t\t\tfunction hasBrBeforeAfter(node, left) {\n\t\t\t\t\tvar walker = new TreeWalker(node, dom.getParent(node.parentNode, dom.isBlock) || body);\n\n\t\t\t\t\twhile ((node = walker[left ? 'prev' : 'next']())) {\n\t\t\t\t\t\tif (node.nodeName === \"BR\") {\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\n\t\t\t\tfunction hasContentEditableFalseParent(node) {\n\t\t\t\t\twhile (node && node != body) {\n\t\t\t\t\t\tif (isContentEditableFalse(node)) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tfunction isPrevNode(node, name) {\n\t\t\t\t\treturn node.previousSibling && node.previousSibling.nodeName == name;\n\t\t\t\t}\n\n\t\t\t\t// Walks the dom left/right to find a suitable text node to move the endpoint into\n\t\t\t\t// It will only walk within the current parent block or body and will stop if it hits a block or a BR/IMG\n\t\t\t\tfunction findTextNodeRelative(left, startNode) {\n\t\t\t\t\tvar walker, lastInlineElement, parentBlockContainer;\n\n\t\t\t\t\tstartNode = startNode || container;\n\t\t\t\t\tparentBlockContainer = dom.getParent(startNode.parentNode, dom.isBlock) || body;\n\n\t\t\t\t\t// Lean left before the BR element if it's the only BR within a block element. Gecko bug: #6680\n\t\t\t\t\t// This:


      |

      becomes

      |

      \n\t\t\t\t\tif (left && startNode.nodeName == 'BR' && isAfterNode && dom.isEmpty(parentBlockContainer)) {\n\t\t\t\t\t\tcontainer = startNode.parentNode;\n\t\t\t\t\t\toffset = dom.nodeIndex(startNode);\n\t\t\t\t\t\tnormalized = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Walk left until we hit a text node we can move to or a block/br/img\n\t\t\t\t\twalker = new TreeWalker(startNode, parentBlockContainer);\n\t\t\t\t\twhile ((node = walker[left ? 'prev' : 'next']())) {\n\t\t\t\t\t\t// Break if we hit a non content editable node\n\t\t\t\t\t\tif (dom.getContentEditableParent(node) === \"false\" || isCeFalseCaretContainer(node, dom.getRoot())) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Found text node that has a length\n\t\t\t\t\t\tif (node.nodeType === 3 && node.nodeValue.length > 0) {\n\t\t\t\t\t\t\tcontainer = node;\n\t\t\t\t\t\t\toffset = left ? node.nodeValue.length : 0;\n\t\t\t\t\t\t\tnormalized = true;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Break if we find a block or a BR/IMG/INPUT etc\n\t\t\t\t\t\tif (dom.isBlock(node) || nonEmptyElementsMap[node.nodeName.toLowerCase()]) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastInlineElement = node;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only fetch the last inline element when in caret mode for now\n\t\t\t\t\tif (collapsed && lastInlineElement) {\n\t\t\t\t\t\tcontainer = lastInlineElement;\n\t\t\t\t\t\tnormalized = true;\n\t\t\t\t\t\toffset = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcontainer = rng[(start ? 'start' : 'end') + 'Container'];\n\t\t\t\toffset = rng[(start ? 'start' : 'end') + 'Offset'];\n\t\t\t\tisAfterNode = container.nodeType == 1 && offset === container.childNodes.length;\n\t\t\t\tnonEmptyElementsMap = dom.schema.getNonEmptyElements();\n\t\t\t\tdirectionLeft = start;\n\n\t\t\t\tif (isCaretContainer(container)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (container.nodeType == 1 && offset > container.childNodes.length - 1) {\n\t\t\t\t\tdirectionLeft = false;\n\t\t\t\t}\n\n\t\t\t\t// If the container is a document move it to the body element\n\t\t\t\tif (container.nodeType === 9) {\n\t\t\t\t\tcontainer = dom.getRoot();\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\n\t\t\t\t// If the container is body try move it into the closest text node or position\n\t\t\t\tif (container === body) {\n\t\t\t\t\t// If start is before/after a image, table etc\n\t\t\t\t\tif (directionLeft) {\n\t\t\t\t\t\tnode = container.childNodes[offset > 0 ? offset - 1 : 0];\n\t\t\t\t\t\tif (node) {\n\t\t\t\t\t\t\tif (isCaretContainer(node)) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (nonEmptyElementsMap[node.nodeName] || node.nodeName == \"TABLE\") {\n\t\t\t\t\t\t\t\treturn;\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// Resolve the index\n\t\t\t\t\tif (container.hasChildNodes()) {\n\t\t\t\t\t\toffset = Math.min(!directionLeft && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1);\n\t\t\t\t\t\tcontainer = container.childNodes[offset];\n\t\t\t\t\t\toffset = 0;\n\n\t\t\t\t\t\t// Don't normalize non collapsed selections like

      [a

      ]\n\t\t\t\t\t\tif (!collapsed && container === body.lastChild && container.nodeName === 'TABLE') {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (hasContentEditableFalseParent(container) || isCaretContainer(container)) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Don't walk into elements that doesn't have any child nodes like a IMG\n\t\t\t\t\t\tif (container.hasChildNodes() && !/TABLE/.test(container.nodeName)) {\n\t\t\t\t\t\t\t// Walk the DOM to find a text node to place the caret at or a BR\n\t\t\t\t\t\t\tnode = container;\n\t\t\t\t\t\t\twalker = new TreeWalker(container, body);\n\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tif (isContentEditableFalse(node) || isCaretContainer(node)) {\n\t\t\t\t\t\t\t\t\tnormalized = false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Found a text node use that position\n\t\t\t\t\t\t\t\tif (node.nodeType === 3 && node.nodeValue.length > 0) {\n\t\t\t\t\t\t\t\t\toffset = directionLeft ? 0 : node.nodeValue.length;\n\t\t\t\t\t\t\t\t\tcontainer = node;\n\t\t\t\t\t\t\t\t\tnormalized = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Found a BR/IMG element that we can place the caret before\n\t\t\t\t\t\t\t\tif (nonEmptyElementsMap[node.nodeName.toLowerCase()] && !isTableCell(node)) {\n\t\t\t\t\t\t\t\t\toffset = dom.nodeIndex(node);\n\t\t\t\t\t\t\t\t\tcontainer = node.parentNode;\n\n\t\t\t\t\t\t\t\t\t// Put caret after image when moving the end point\n\t\t\t\t\t\t\t\t\tif (node.nodeName == \"IMG\" && !directionLeft) {\n\t\t\t\t\t\t\t\t\t\toffset++;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tnormalized = true;\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} while ((node = (directionLeft ? walker.next() : walker.prev())));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Lean the caret to the left if possible\n\t\t\t\tif (collapsed) {\n\t\t\t\t\t// So this: x|x\n\t\t\t\t\t// Becomes: x|x\n\t\t\t\t\t// Seems that only gecko has issues with this\n\t\t\t\t\tif (container.nodeType === 3 && offset === 0) {\n\t\t\t\t\t\tfindTextNodeRelative(true);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lean left into empty inline elements when the caret is before a BR\n\t\t\t\t\t// So this: |
      \n\t\t\t\t\t// Becomes: |
      \n\t\t\t\t\t// Seems that only gecko has issues with this.\n\t\t\t\t\t// Special edge case for

      x|

      since we don't want

      x|

      \n\t\t\t\t\tif (container.nodeType === 1) {\n\t\t\t\t\t\tnode = container.childNodes[offset];\n\n\t\t\t\t\t\t// Offset is after the containers last child\n\t\t\t\t\t\t// then use the previous child for normalization\n\t\t\t\t\t\tif (!node) {\n\t\t\t\t\t\t\tnode = container.childNodes[offset - 1];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node && node.nodeName === 'BR' && !isPrevNode(node, 'A') &&\n\t\t\t\t\t\t\t!hasBrBeforeAfter(node) && !hasBrBeforeAfter(node, true)) {\n\t\t\t\t\t\t\tfindTextNodeRelative(true, node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Lean the start of the selection right if possible\n\t\t\t\t// So this: x[x]\n\t\t\t\t// Becomes: x[x]\n\t\t\t\tif (directionLeft && !collapsed && container.nodeType === 3 && offset === container.nodeValue.length) {\n\t\t\t\t\tfindTextNodeRelative(false);\n\t\t\t\t}\n\n\t\t\t\t// Set endpoint if it was normalized\n\t\t\t\tif (normalized) {\n\t\t\t\t\trng['set' + (start ? 'Start' : 'End')](container, offset);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcollapsed = rng.collapsed;\n\n\t\t\tnormalizeEndPoint(true);\n\n\t\t\tif (!collapsed) {\n\t\t\t\tnormalizeEndPoint();\n\t\t\t}\n\n\t\t\t// If it was collapsed then make sure it still is\n\t\t\tif (normalized && collapsed) {\n\t\t\t\trng.collapse(true);\n\t\t\t}\n\n\t\t\treturn normalized;\n\t\t};\n\t}\n\n\t/**\n\t * Compares two ranges and checks if they are equal.\n\t *\n\t * @static\n\t * @method compareRanges\n\t * @param {DOMRange} rng1 First range to compare.\n\t * @param {DOMRange} rng2 First range to compare.\n\t * @return {Boolean} true/false if the ranges are equal.\n\t */\n\tRangeUtils.compareRanges = function(rng1, rng2) {\n\t\tif (rng1 && rng2) {\n\t\t\t// Compare native IE ranges\n\t\t\tif (rng1.item || rng1.duplicate) {\n\t\t\t\t// Both are control ranges and the selected element matches\n\t\t\t\tif (rng1.item && rng2.item && rng1.item(0) === rng2.item(0)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Both are text ranges and the range matches\n\t\t\t\tif (rng1.isEqual && rng2.isEqual && rng2.isEqual(rng1)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Compare w3c ranges\n\t\t\t\treturn rng1.startContainer == rng2.startContainer && rng1.startOffset == rng2.startOffset;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\t/**\n\t * Finds the closest selection rect tries to get the range from that.\n\t */\n\tfunction findClosestIeRange(clientX, clientY, doc) {\n\t\tvar element, rng, rects;\n\n\t\telement = doc.elementFromPoint(clientX, clientY);\n\t\trng = doc.body.createTextRange();\n\n\t\tif (!element || element.tagName == 'HTML') {\n\t\t\telement = doc.body;\n\t\t}\n\n\t\trng.moveToElementText(element);\n\t\trects = Tools.toArray(rng.getClientRects());\n\n\t\trects = rects.sort(function(a, b) {\n\t\t\ta = Math.abs(Math.max(a.top - clientY, a.bottom - clientY));\n\t\t\tb = Math.abs(Math.max(b.top - clientY, b.bottom - clientY));\n\n\t\t\treturn a - b;\n\t\t});\n\n\t\tif (rects.length > 0) {\n\t\t\tclientY = (rects[0].bottom + rects[0].top) / 2;\n\n\t\t\ttry {\n\t\t\t\trng.moveToPoint(clientX, clientY);\n\t\t\t\trng.collapse(true);\n\n\t\t\t\treturn rng;\n\t\t\t} catch (ex) {\n\t\t\t\t// At least we tried\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction moveOutOfContentEditableFalse(rng, rootNode) {\n\t\tvar parentElement = rng && rng.parentElement ? rng.parentElement() : null;\n\t\treturn isContentEditableFalse(findParent(parentElement, rootNode, hasCeProperty)) ? null : rng;\n\t}\n\n\t/**\n\t * Gets the caret range for the given x/y location.\n\t *\n\t * @static\n\t * @method getCaretRangeFromPoint\n\t * @param {Number} clientX X coordinate for range\n\t * @param {Number} clientY Y coordinate for range\n\t * @param {Document} doc Document that x/y are relative to\n\t * @returns {Range} caret range\n\t */\n\tRangeUtils.getCaretRangeFromPoint = function(clientX, clientY, doc) {\n\t\tvar rng, point;\n\n\t\tif (doc.caretPositionFromPoint) {\n\t\t\tpoint = doc.caretPositionFromPoint(clientX, clientY);\n\t\t\trng = doc.createRange();\n\t\t\trng.setStart(point.offsetNode, point.offset);\n\t\t\trng.collapse(true);\n\t\t} else if (doc.caretRangeFromPoint) {\n\t\t\trng = doc.caretRangeFromPoint(clientX, clientY);\n\t\t} else if (doc.body.createTextRange) {\n\t\t\trng = doc.body.createTextRange();\n\n\t\t\ttry {\n\t\t\t\trng.moveToPoint(clientX, clientY);\n\t\t\t\trng.collapse(true);\n\t\t\t} catch (ex) {\n\t\t\t\trng = findClosestIeRange(clientX, clientY, doc);\n\t\t\t}\n\n\t\t\treturn moveOutOfContentEditableFalse(rng, doc.body);\n\t\t}\n\n\t\treturn rng;\n\t};\n\n\tRangeUtils.getSelectedNode = function(range) {\n\t\tvar startContainer = range.startContainer,\n\t\t\tstartOffset = range.startOffset;\n\n\t\tif (startContainer.hasChildNodes() && range.endOffset == startOffset + 1) {\n\t\t\treturn startContainer.childNodes[startOffset];\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tRangeUtils.getNode = function(container, offset) {\n\t\tif (container.nodeType == 1 && container.hasChildNodes()) {\n\t\t\tif (offset >= container.childNodes.length) {\n\t\t\t\toffset = container.childNodes.length - 1;\n\t\t\t}\n\n\t\t\tcontainer = container.childNodes[offset];\n\t\t}\n\n\t\treturn container;\n\t};\n\n\treturn RangeUtils;\n});\n\n// Included from: js/tinymce/classes/NodeChange.js\n\n/**\n * NodeChange.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class handles the nodechange event dispatching both manual and through selection change events.\n *\n * @class tinymce.NodeChange\n * @private\n */\ndefine(\"tinymce/NodeChange\", [\n\t\"tinymce/dom/RangeUtils\",\n\t\"tinymce/Env\",\n\t\"tinymce/util/Delay\"\n], function(RangeUtils, Env, Delay) {\n\treturn function(editor) {\n\t\tvar lastRng, lastPath = [];\n\n\t\t/**\n\t\t * Returns true/false if the current element path has been changed or not.\n\t\t *\n\t\t * @private\n\t\t * @return {Boolean} True if the element path is the same false if it's not.\n\t\t */\n\t\tfunction isSameElementPath(startElm) {\n\t\t\tvar i, currentPath;\n\n\t\t\tcurrentPath = editor.$(startElm).parentsUntil(editor.getBody()).add(startElm);\n\t\t\tif (currentPath.length === lastPath.length) {\n\t\t\t\tfor (i = currentPath.length; i >= 0; i--) {\n\t\t\t\t\tif (currentPath[i] !== lastPath[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i === -1) {\n\t\t\t\t\tlastPath = currentPath;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlastPath = currentPath;\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Gecko doesn't support the \"selectionchange\" event\n\t\tif (!('onselectionchange' in editor.getDoc())) {\n\t\t\teditor.on('NodeChange Click MouseUp KeyUp Focus', function(e) {\n\t\t\t\tvar nativeRng, fakeRng;\n\n\t\t\t\t// Since DOM Ranges mutate on modification\n\t\t\t\t// of the DOM we need to clone it's contents\n\t\t\t\tnativeRng = editor.selection.getRng();\n\t\t\t\tfakeRng = {\n\t\t\t\t\tstartContainer: nativeRng.startContainer,\n\t\t\t\t\tstartOffset: nativeRng.startOffset,\n\t\t\t\t\tendContainer: nativeRng.endContainer,\n\t\t\t\t\tendOffset: nativeRng.endOffset\n\t\t\t\t};\n\n\t\t\t\t// Always treat nodechange as a selectionchange since applying\n\t\t\t\t// formatting to the current range wouldn't update the range but it's parent\n\t\t\t\tif (e.type == 'nodechange' || !RangeUtils.compareRanges(fakeRng, lastRng)) {\n\t\t\t\t\teditor.fire('SelectionChange');\n\t\t\t\t}\n\n\t\t\t\tlastRng = fakeRng;\n\t\t\t});\n\t\t}\n\n\t\t// IE has a bug where it fires a selectionchange on right click that has a range at the start of the body\n\t\t// When the contextmenu event fires the selection is located at the right location\n\t\teditor.on('contextmenu', function() {\n\t\t\teditor.fire('SelectionChange');\n\t\t});\n\n\t\t// Selection change is delayed ~200ms on IE when you click inside the current range\n\t\teditor.on('SelectionChange', function() {\n\t\t\tvar startElm = editor.selection.getStart(true);\n\n\t\t\t// IE 8 will fire a selectionchange event with an incorrect selection\n\t\t\t// when focusing out of table cells. Click inside cell -> toolbar = Invalid SelectionChange event\n\t\t\tif (!Env.range && editor.selection.isCollapsed()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!isSameElementPath(startElm) && editor.dom.isChildOf(startElm, editor.getBody())) {\n\t\t\t\teditor.nodeChanged({selectionChange: true});\n\t\t\t}\n\t\t});\n\n\t\t// Fire an extra nodeChange on mouseup for compatibility reasons\n\t\teditor.on('MouseUp', function(e) {\n\t\t\tif (!e.isDefaultPrevented()) {\n\t\t\t\t// Delay nodeChanged call for WebKit edge case issue where the range\n\t\t\t\t// isn't updated until after you click outside a selected image\n\t\t\t\tif (editor.selection.getNode().nodeName == 'IMG') {\n\t\t\t\t\tDelay.setEditorTimeout(editor, function() {\n\t\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * Dispatches out a onNodeChange event to all observers. This method should be called when you\n\t\t * need to update the UI states or element path etc.\n\t\t *\n\t\t * @method nodeChanged\n\t\t * @param {Object} args Optional args to pass to NodeChange event handlers.\n\t\t */\n\t\tthis.nodeChanged = function(args) {\n\t\t\tvar selection = editor.selection, node, parents, root;\n\n\t\t\t// Fix for bug #1896577 it seems that this can not be fired while the editor is loading\n\t\t\tif (editor.initialized && selection && !editor.settings.disable_nodechange && !editor.readonly) {\n\t\t\t\t// Get start node\n\t\t\t\troot = editor.getBody();\n\t\t\t\tnode = selection.getStart() || root;\n\n\t\t\t\t// Make sure the node is within the editor root or is the editor root\n\t\t\t\tif (node.ownerDocument != editor.getDoc() || !editor.dom.isChildOf(node, root)) {\n\t\t\t\t\tnode = root;\n\t\t\t\t}\n\n\t\t\t\t// Edge case for

      |

      \n\t\t\t\tif (node.nodeName == 'IMG' && selection.isCollapsed()) {\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t}\n\n\t\t\t\t// Get parents and add them to object\n\t\t\t\tparents = [];\n\t\t\t\teditor.dom.getParent(node, function(node) {\n\t\t\t\t\tif (node === root) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\tparents.push(node);\n\t\t\t\t});\n\n\t\t\t\targs = args || {};\n\t\t\t\targs.element = node;\n\t\t\t\targs.parents = parents;\n\n\t\t\t\teditor.fire('NodeChange', args);\n\t\t\t}\n\t\t};\n\t};\n});\n\n// Included from: js/tinymce/classes/html/Node.js\n\n/**\n * Node.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class is a minimalistic implementation of a DOM like node used by the DomParser class.\n *\n * @example\n * var node = new tinymce.html.Node('strong', 1);\n * someRoot.append(node);\n *\n * @class tinymce.html.Node\n * @version 3.4\n */\ndefine(\"tinymce/html/Node\", [], function() {\n\tvar whiteSpaceRegExp = /^[ \\t\\r\\n]*$/, typeLookup = {\n\t\t'#text': 3,\n\t\t'#comment': 8,\n\t\t'#cdata': 4,\n\t\t'#pi': 7,\n\t\t'#doctype': 10,\n\t\t'#document-fragment': 11\n\t};\n\n\t// Walks the tree left/right\n\tfunction walk(node, root_node, prev) {\n\t\tvar sibling, parent, startName = prev ? 'lastChild' : 'firstChild', siblingName = prev ? 'prev' : 'next';\n\n\t\t// Walk into nodes if it has a start\n\t\tif (node[startName]) {\n\t\t\treturn node[startName];\n\t\t}\n\n\t\t// Return the sibling if it has one\n\t\tif (node !== root_node) {\n\t\t\tsibling = node[siblingName];\n\n\t\t\tif (sibling) {\n\t\t\t\treturn sibling;\n\t\t\t}\n\n\t\t\t// Walk up the parents to look for siblings\n\t\t\tfor (parent = node.parent; parent && parent !== root_node; parent = parent.parent) {\n\t\t\t\tsibling = parent[siblingName];\n\n\t\t\t\tif (sibling) {\n\t\t\t\t\treturn sibling;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Constructs a new Node instance.\n\t *\n\t * @constructor\n\t * @method Node\n\t * @param {String} name Name of the node type.\n\t * @param {Number} type Numeric type representing the node.\n\t */\n\tfunction Node(name, type) {\n\t\tthis.name = name;\n\t\tthis.type = type;\n\n\t\tif (type === 1) {\n\t\t\tthis.attributes = [];\n\t\t\tthis.attributes.map = {};\n\t\t}\n\t}\n\n\tNode.prototype = {\n\t\t/**\n\t\t * Replaces the current node with the specified one.\n\t\t *\n\t\t * @example\n\t\t * someNode.replace(someNewNode);\n\t\t *\n\t\t * @method replace\n\t\t * @param {tinymce.html.Node} node Node to replace the current node with.\n\t\t * @return {tinymce.html.Node} The old node that got replaced.\n\t\t */\n\t\treplace: function(node) {\n\t\t\tvar self = this;\n\n\t\t\tif (node.parent) {\n\t\t\t\tnode.remove();\n\t\t\t}\n\n\t\t\tself.insert(node, self);\n\t\t\tself.remove();\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Gets/sets or removes an attribute by name.\n\t\t *\n\t\t * @example\n\t\t * someNode.attr(\"name\", \"value\"); // Sets an attribute\n\t\t * console.log(someNode.attr(\"name\")); // Gets an attribute\n\t\t * someNode.attr(\"name\", null); // Removes an attribute\n\t\t *\n\t\t * @method attr\n\t\t * @param {String} name Attribute name to set or get.\n\t\t * @param {String} value Optional value to set.\n\t\t * @return {String/tinymce.html.Node} String or undefined on a get operation or the current node on a set operation.\n\t\t */\n\t\tattr: function(name, value) {\n\t\t\tvar self = this, attrs, i, undef;\n\n\t\t\tif (typeof name !== \"string\") {\n\t\t\t\tfor (i in name) {\n\t\t\t\t\tself.attr(i, name[i]);\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\tif ((attrs = self.attributes)) {\n\t\t\t\tif (value !== undef) {\n\t\t\t\t\t// Remove attribute\n\t\t\t\t\tif (value === null) {\n\t\t\t\t\t\tif (name in attrs.map) {\n\t\t\t\t\t\t\tdelete attrs.map[name];\n\n\t\t\t\t\t\t\ti = attrs.length;\n\t\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\t\tif (attrs[i].name === name) {\n\t\t\t\t\t\t\t\t\tattrs = attrs.splice(i, 1);\n\t\t\t\t\t\t\t\t\treturn self;\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\treturn self;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set attribute\n\t\t\t\t\tif (name in attrs.map) {\n\t\t\t\t\t\t// Set attribute\n\t\t\t\t\t\ti = attrs.length;\n\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\tif (attrs[i].name === name) {\n\t\t\t\t\t\t\t\tattrs[i].value = value;\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} else {\n\t\t\t\t\t\tattrs.push({name: name, value: value});\n\t\t\t\t\t}\n\n\t\t\t\t\tattrs.map[name] = value;\n\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\n\t\t\t\treturn attrs.map[name];\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Does a shallow clones the node into a new node. It will also exclude id attributes since\n\t\t * there should only be one id per document.\n\t\t *\n\t\t * @example\n\t\t * var clonedNode = node.clone();\n\t\t *\n\t\t * @method clone\n\t\t * @return {tinymce.html.Node} New copy of the original node.\n\t\t */\n\t\tclone: function() {\n\t\t\tvar self = this, clone = new Node(self.name, self.type), i, l, selfAttrs, selfAttr, cloneAttrs;\n\n\t\t\t// Clone element attributes\n\t\t\tif ((selfAttrs = self.attributes)) {\n\t\t\t\tcloneAttrs = [];\n\t\t\t\tcloneAttrs.map = {};\n\n\t\t\t\tfor (i = 0, l = selfAttrs.length; i < l; i++) {\n\t\t\t\t\tselfAttr = selfAttrs[i];\n\n\t\t\t\t\t// Clone everything except id\n\t\t\t\t\tif (selfAttr.name !== 'id') {\n\t\t\t\t\t\tcloneAttrs[cloneAttrs.length] = {name: selfAttr.name, value: selfAttr.value};\n\t\t\t\t\t\tcloneAttrs.map[selfAttr.name] = selfAttr.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tclone.attributes = cloneAttrs;\n\t\t\t}\n\n\t\t\tclone.value = self.value;\n\t\t\tclone.shortEnded = self.shortEnded;\n\n\t\t\treturn clone;\n\t\t},\n\n\t\t/**\n\t\t * Wraps the node in in another node.\n\t\t *\n\t\t * @example\n\t\t * node.wrap(wrapperNode);\n\t\t *\n\t\t * @method wrap\n\t\t */\n\t\twrap: function(wrapper) {\n\t\t\tvar self = this;\n\n\t\t\tself.parent.insert(wrapper, self);\n\t\t\twrapper.append(self);\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Unwraps the node in other words it removes the node but keeps the children.\n\t\t *\n\t\t * @example\n\t\t * node.unwrap();\n\t\t *\n\t\t * @method unwrap\n\t\t */\n\t\tunwrap: function() {\n\t\t\tvar self = this, node, next;\n\n\t\t\tfor (node = self.firstChild; node;) {\n\t\t\t\tnext = node.next;\n\t\t\t\tself.insert(node, self, true);\n\t\t\t\tnode = next;\n\t\t\t}\n\n\t\t\tself.remove();\n\t\t},\n\n\t\t/**\n\t\t * Removes the node from it's parent.\n\t\t *\n\t\t * @example\n\t\t * node.remove();\n\t\t *\n\t\t * @method remove\n\t\t * @return {tinymce.html.Node} Current node that got removed.\n\t\t */\n\t\tremove: function() {\n\t\t\tvar self = this, parent = self.parent, next = self.next, prev = self.prev;\n\n\t\t\tif (parent) {\n\t\t\t\tif (parent.firstChild === self) {\n\t\t\t\t\tparent.firstChild = next;\n\n\t\t\t\t\tif (next) {\n\t\t\t\t\t\tnext.prev = null;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tprev.next = next;\n\t\t\t\t}\n\n\t\t\t\tif (parent.lastChild === self) {\n\t\t\t\t\tparent.lastChild = prev;\n\n\t\t\t\t\tif (prev) {\n\t\t\t\t\t\tprev.next = null;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnext.prev = prev;\n\t\t\t\t}\n\n\t\t\t\tself.parent = self.next = self.prev = null;\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Appends a new node as a child of the current node.\n\t\t *\n\t\t * @example\n\t\t * node.append(someNode);\n\t\t *\n\t\t * @method append\n\t\t * @param {tinymce.html.Node} node Node to append as a child of the current one.\n\t\t * @return {tinymce.html.Node} The node that got appended.\n\t\t */\n\t\tappend: function(node) {\n\t\t\tvar self = this, last;\n\n\t\t\tif (node.parent) {\n\t\t\t\tnode.remove();\n\t\t\t}\n\n\t\t\tlast = self.lastChild;\n\t\t\tif (last) {\n\t\t\t\tlast.next = node;\n\t\t\t\tnode.prev = last;\n\t\t\t\tself.lastChild = node;\n\t\t\t} else {\n\t\t\t\tself.lastChild = self.firstChild = node;\n\t\t\t}\n\n\t\t\tnode.parent = self;\n\n\t\t\treturn node;\n\t\t},\n\n\t\t/**\n\t\t * Inserts a node at a specific position as a child of the current node.\n\t\t *\n\t\t * @example\n\t\t * parentNode.insert(newChildNode, oldChildNode);\n\t\t *\n\t\t * @method insert\n\t\t * @param {tinymce.html.Node} node Node to insert as a child of the current node.\n\t\t * @param {tinymce.html.Node} ref_node Reference node to set node before/after.\n\t\t * @param {Boolean} before Optional state to insert the node before the reference node.\n\t\t * @return {tinymce.html.Node} The node that got inserted.\n\t\t */\n\t\tinsert: function(node, ref_node, before) {\n\t\t\tvar parent;\n\n\t\t\tif (node.parent) {\n\t\t\t\tnode.remove();\n\t\t\t}\n\n\t\t\tparent = ref_node.parent || this;\n\n\t\t\tif (before) {\n\t\t\t\tif (ref_node === parent.firstChild) {\n\t\t\t\t\tparent.firstChild = node;\n\t\t\t\t} else {\n\t\t\t\t\tref_node.prev.next = node;\n\t\t\t\t}\n\n\t\t\t\tnode.prev = ref_node.prev;\n\t\t\t\tnode.next = ref_node;\n\t\t\t\tref_node.prev = node;\n\t\t\t} else {\n\t\t\t\tif (ref_node === parent.lastChild) {\n\t\t\t\t\tparent.lastChild = node;\n\t\t\t\t} else {\n\t\t\t\t\tref_node.next.prev = node;\n\t\t\t\t}\n\n\t\t\t\tnode.next = ref_node.next;\n\t\t\t\tnode.prev = ref_node;\n\t\t\t\tref_node.next = node;\n\t\t\t}\n\n\t\t\tnode.parent = parent;\n\n\t\t\treturn node;\n\t\t},\n\n\t\t/**\n\t\t * Get all children by name.\n\t\t *\n\t\t * @method getAll\n\t\t * @param {String} name Name of the child nodes to collect.\n\t\t * @return {Array} Array with child nodes matchin the specified name.\n\t\t */\n\t\tgetAll: function(name) {\n\t\t\tvar self = this, node, collection = [];\n\n\t\t\tfor (node = self.firstChild; node; node = walk(node, self)) {\n\t\t\t\tif (node.name === name) {\n\t\t\t\t\tcollection.push(node);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn collection;\n\t\t},\n\n\t\t/**\n\t\t * Removes all children of the current node.\n\t\t *\n\t\t * @method empty\n\t\t * @return {tinymce.html.Node} The current node that got cleared.\n\t\t */\n\t\tempty: function() {\n\t\t\tvar self = this, nodes, i, node;\n\n\t\t\t// Remove all children\n\t\t\tif (self.firstChild) {\n\t\t\t\tnodes = [];\n\n\t\t\t\t// Collect the children\n\t\t\t\tfor (node = self.firstChild; node; node = walk(node, self)) {\n\t\t\t\t\tnodes.push(node);\n\t\t\t\t}\n\n\t\t\t\t// Remove the children\n\t\t\t\ti = nodes.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\tnode = nodes[i];\n\t\t\t\t\tnode.parent = node.firstChild = node.lastChild = node.next = node.prev = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tself.firstChild = self.lastChild = null;\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the node is to be considered empty or not.\n\t\t *\n\t\t * @example\n\t\t * node.isEmpty({img: true});\n\t\t * @method isEmpty\n\t\t * @param {Object} elements Name/value object with elements that are automatically treated as non empty elements.\n\t\t * @param {Object} whitespace Name/value object with elements that are automatically treated whitespace preservables.\n\t\t * @return {Boolean} true/false if the node is empty or not.\n\t\t */\n\t\tisEmpty: function(elements, whitespace) {\n\t\t\tvar self = this, node = self.firstChild, i, name;\n\n\t\t\twhitespace = whitespace || {};\n\n\t\t\tif (node) {\n\t\t\t\tdo {\n\t\t\t\t\tif (node.type === 1) {\n\t\t\t\t\t\t// Ignore bogus elements\n\t\t\t\t\t\tif (node.attributes.map['data-mce-bogus']) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Keep empty elements like \n\t\t\t\t\t\tif (elements[node.name]) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Keep bookmark nodes and name attribute like \n\t\t\t\t\t\ti = node.attributes.length;\n\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\tname = node.attributes[i].name;\n\t\t\t\t\t\t\tif (name === \"name\" || name.indexOf('data-mce-bookmark') === 0) {\n\t\t\t\t\t\t\t\treturn false;\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// Keep comments\n\t\t\t\t\tif (node.type === 8) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Keep non whitespace text nodes\n\t\t\t\t\tif (node.type === 3 && !whiteSpaceRegExp.test(node.value)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Keep whitespace preserve elements\n\t\t\t\t\tif (node.type === 3 && node.parent && whitespace[node.parent.name] && whiteSpaceRegExp.test(node.value)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} while ((node = walk(node, self)));\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\t/**\n\t\t * Walks to the next or previous node and returns that node or null if it wasn't found.\n\t\t *\n\t\t * @method walk\n\t\t * @param {Boolean} prev Optional previous node state defaults to false.\n\t\t * @return {tinymce.html.Node} Node that is next to or previous of the current node.\n\t\t */\n\t\twalk: function(prev) {\n\t\t\treturn walk(this, null, prev);\n\t\t}\n\t};\n\n\t/**\n\t * Creates a node of a specific type.\n\t *\n\t * @static\n\t * @method create\n\t * @param {String} name Name of the node type to create for example \"b\" or \"#text\".\n\t * @param {Object} attrs Name/value collection of attributes that will be applied to elements.\n\t */\n\tNode.create = function(name, attrs) {\n\t\tvar node, attrName;\n\n\t\t// Create node\n\t\tnode = new Node(name, typeLookup[name] || 1);\n\n\t\t// Add attributes if needed\n\t\tif (attrs) {\n\t\t\tfor (attrName in attrs) {\n\t\t\t\tnode.attr(attrName, attrs[attrName]);\n\t\t\t}\n\t\t}\n\n\t\treturn node;\n\t};\n\n\treturn Node;\n});\n\n// Included from: js/tinymce/classes/html/Schema.js\n\n/**\n * Schema.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Schema validator class.\n *\n * @class tinymce.html.Schema\n * @example\n * if (tinymce.activeEditor.schema.isValidChild('p', 'span'))\n * alert('span is valid child of p.');\n *\n * if (tinymce.activeEditor.schema.getElementRule('p'))\n * alert('P is a valid element.');\n *\n * @class tinymce.html.Schema\n * @version 3.4\n */\ndefine(\"tinymce/html/Schema\", [\n\t\"tinymce/util/Tools\"\n], function(Tools) {\n\tvar mapCache = {}, dummyObj = {};\n\tvar makeMap = Tools.makeMap, each = Tools.each, extend = Tools.extend, explode = Tools.explode, inArray = Tools.inArray;\n\n\tfunction split(items, delim) {\n\t\titems = Tools.trim(items);\n\t\treturn items ? items.split(delim || ' ') : [];\n\t}\n\n\t/**\n\t * Builds a schema lookup table\n\t *\n\t * @private\n\t * @param {String} type html4, html5 or html5-strict schema type.\n\t * @return {Object} Schema lookup table.\n\t */\n\tfunction compileSchema(type) {\n\t\tvar schema = {}, globalAttributes, blockContent;\n\t\tvar phrasingContent, flowContent, html4BlockContent, html4PhrasingContent;\n\n\t\tfunction add(name, attributes, children) {\n\t\t\tvar ni, attributesOrder, element;\n\n\t\t\tfunction arrayToMap(array, obj) {\n\t\t\t\tvar map = {}, i, l;\n\n\t\t\t\tfor (i = 0, l = array.length; i < l; i++) {\n\t\t\t\t\tmap[array[i]] = obj || {};\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\tchildren = children || [];\n\t\t\tattributes = attributes || \"\";\n\n\t\t\tif (typeof children === \"string\") {\n\t\t\t\tchildren = split(children);\n\t\t\t}\n\n\t\t\tname = split(name);\n\t\t\tni = name.length;\n\t\t\twhile (ni--) {\n\t\t\t\tattributesOrder = split([globalAttributes, attributes].join(' '));\n\n\t\t\t\telement = {\n\t\t\t\t\tattributes: arrayToMap(attributesOrder),\n\t\t\t\t\tattributesOrder: attributesOrder,\n\t\t\t\t\tchildren: arrayToMap(children, dummyObj)\n\t\t\t\t};\n\n\t\t\t\tschema[name[ni]] = element;\n\t\t\t}\n\t\t}\n\n\t\tfunction addAttrs(name, attributes) {\n\t\t\tvar ni, schemaItem, i, l;\n\n\t\t\tname = split(name);\n\t\t\tni = name.length;\n\t\t\tattributes = split(attributes);\n\t\t\twhile (ni--) {\n\t\t\t\tschemaItem = schema[name[ni]];\n\t\t\t\tfor (i = 0, l = attributes.length; i < l; i++) {\n\t\t\t\t\tschemaItem.attributes[attributes[i]] = {};\n\t\t\t\t\tschemaItem.attributesOrder.push(attributes[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Use cached schema\n\t\tif (mapCache[type]) {\n\t\t\treturn mapCache[type];\n\t\t}\n\n\t\t// Attributes present on all elements\n\t\tglobalAttributes = \"id accesskey class dir lang style tabindex title\";\n\n\t\t// Event attributes can be opt-in/opt-out\n\t\t/*eventAttributes = split(\"onabort onblur oncancel oncanplay oncanplaythrough onchange onclick onclose oncontextmenu oncuechange \" +\n\t\t \"ondblclick ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop ondurationchange onemptied onended \" +\n\t\t \"onerror onfocus oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata onloadedmetadata onloadstart \" +\n\t\t \"onmousedown onmousemove onmouseout onmouseover onmouseup onmousewheel onpause onplay onplaying onprogress onratechange \" +\n\t\t \"onreset onscroll onseeked onseeking onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate onvolumechange \" +\n\t\t \"onwaiting\"\n\t\t );*/\n\n\t\t// Block content elements\n\t\tblockContent =\n\t\t\t\"address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul\";\n\n\t\t// Phrasing content elements from the HTML5 spec (inline)\n\t\tphrasingContent =\n\t\t\t\"a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd \" +\n\t\t\t\"label map noscript object q s samp script select small span strong sub sup \" +\n\t\t\t\"textarea u var #text #comment\"\n\t\t;\n\n\t\t// Add HTML5 items to globalAttributes, blockContent, phrasingContent\n\t\tif (type != \"html4\") {\n\t\t\tglobalAttributes += \" contenteditable contextmenu draggable dropzone \" +\n\t\t\t\t\"hidden spellcheck translate\";\n\t\t\tblockContent += \" article aside details dialog figure header footer hgroup section nav\";\n\t\t\tphrasingContent += \" audio canvas command datalist mark meter output picture \" +\n\t\t\t\t\"progress time wbr video ruby bdi keygen\";\n\t\t}\n\n\t\t// Add HTML4 elements unless it's html5-strict\n\t\tif (type != \"html5-strict\") {\n\t\t\tglobalAttributes += \" xml:lang\";\n\n\t\t\thtml4PhrasingContent = \"acronym applet basefont big font strike tt\";\n\t\t\tphrasingContent = [phrasingContent, html4PhrasingContent].join(' ');\n\n\t\t\teach(split(html4PhrasingContent), function(name) {\n\t\t\t\tadd(name, \"\", phrasingContent);\n\t\t\t});\n\n\t\t\thtml4BlockContent = \"center dir isindex noframes\";\n\t\t\tblockContent = [blockContent, html4BlockContent].join(' ');\n\n\t\t\t// Flow content elements from the HTML5 spec (block+inline)\n\t\t\tflowContent = [blockContent, phrasingContent].join(' ');\n\n\t\t\teach(split(html4BlockContent), function(name) {\n\t\t\t\tadd(name, \"\", flowContent);\n\t\t\t});\n\t\t}\n\n\t\t// Flow content elements from the HTML5 spec (block+inline)\n\t\tflowContent = flowContent || [blockContent, phrasingContent].join(\" \");\n\n\t\t// HTML4 base schema TODO: Move HTML5 specific attributes to HTML5 specific if statement\n\t\t// Schema items , , \n\t\tadd(\"html\", \"manifest\", \"head body\");\n\t\tadd(\"head\", \"\", \"base command link meta noscript script style title\");\n\t\tadd(\"title hr noscript br\");\n\t\tadd(\"base\", \"href target\");\n\t\tadd(\"link\", \"href rel media hreflang type sizes hreflang\");\n\t\tadd(\"meta\", \"name http-equiv content charset\");\n\t\tadd(\"style\", \"media type scoped\");\n\t\tadd(\"script\", \"src async defer type charset\");\n\t\tadd(\"body\", \"onafterprint onbeforeprint onbeforeunload onblur onerror onfocus \" +\n\t\t\"onhashchange onload onmessage onoffline ononline onpagehide onpageshow \" +\n\t\t\"onpopstate onresize onscroll onstorage onunload\", flowContent);\n\t\tadd(\"address dt dd div caption\", \"\", flowContent);\n\t\tadd(\"h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn\", \"\", phrasingContent);\n\t\tadd(\"blockquote\", \"cite\", flowContent);\n\t\tadd(\"ol\", \"reversed start type\", \"li\");\n\t\tadd(\"ul\", \"\", \"li\");\n\t\tadd(\"li\", \"value\", flowContent);\n\t\tadd(\"dl\", \"\", \"dt dd\");\n\t\tadd(\"a\", \"href target rel media hreflang type\", phrasingContent);\n\t\tadd(\"q\", \"cite\", phrasingContent);\n\t\tadd(\"ins del\", \"cite datetime\", flowContent);\n\t\tadd(\"img\", \"src sizes srcset alt usemap ismap width height\");\n\t\tadd(\"iframe\", \"src name width height\", flowContent);\n\t\tadd(\"embed\", \"src type width height\");\n\t\tadd(\"object\", \"data type typemustmatch name usemap form width height\", [flowContent, \"param\"].join(' '));\n\t\tadd(\"param\", \"name value\");\n\t\tadd(\"map\", \"name\", [flowContent, \"area\"].join(' '));\n\t\tadd(\"area\", \"alt coords shape href target rel media hreflang type\");\n\t\tadd(\"table\", \"border\", \"caption colgroup thead tfoot tbody tr\" + (type == \"html4\" ? \" col\" : \"\"));\n\t\tadd(\"colgroup\", \"span\", \"col\");\n\t\tadd(\"col\", \"span\");\n\t\tadd(\"tbody thead tfoot\", \"\", \"tr\");\n\t\tadd(\"tr\", \"\", \"td th\");\n\t\tadd(\"td\", \"colspan rowspan headers\", flowContent);\n\t\tadd(\"th\", \"colspan rowspan headers scope abbr\", flowContent);\n\t\tadd(\"form\", \"accept-charset action autocomplete enctype method name novalidate target\", flowContent);\n\t\tadd(\"fieldset\", \"disabled form name\", [flowContent, \"legend\"].join(' '));\n\t\tadd(\"label\", \"form for\", phrasingContent);\n\t\tadd(\"input\", \"accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate \" +\n\t\t\t\t\"formtarget height list max maxlength min multiple name pattern readonly required size src step type value width\"\n\t\t);\n\t\tadd(\"button\", \"disabled form formaction formenctype formmethod formnovalidate formtarget name type value\",\n\t\t\ttype == \"html4\" ? flowContent : phrasingContent);\n\t\tadd(\"select\", \"disabled form multiple name required size\", \"option optgroup\");\n\t\tadd(\"optgroup\", \"disabled label\", \"option\");\n\t\tadd(\"option\", \"disabled label selected value\");\n\t\tadd(\"textarea\", \"cols dirname disabled form maxlength name readonly required rows wrap\");\n\t\tadd(\"menu\", \"type label\", [flowContent, \"li\"].join(' '));\n\t\tadd(\"noscript\", \"\", flowContent);\n\n\t\t// Extend with HTML5 elements\n\t\tif (type != \"html4\") {\n\t\t\tadd(\"wbr\");\n\t\t\tadd(\"ruby\", \"\", [phrasingContent, \"rt rp\"].join(' '));\n\t\t\tadd(\"figcaption\", \"\", flowContent);\n\t\t\tadd(\"mark rt rp summary bdi\", \"\", phrasingContent);\n\t\t\tadd(\"canvas\", \"width height\", flowContent);\n\t\t\tadd(\"video\", \"src crossorigin poster preload autoplay mediagroup loop \" +\n\t\t\t\t\"muted controls width height buffered\", [flowContent, \"track source\"].join(' '));\n\t\t\tadd(\"audio\", \"src crossorigin preload autoplay mediagroup loop muted controls \" +\n\t\t\t\t\"buffered volume\", [flowContent, \"track source\"].join(' '));\n\t\t\tadd(\"picture\", \"\", \"img source\");\n\t\t\tadd(\"source\", \"src srcset type media sizes\");\n\t\t\tadd(\"track\", \"kind src srclang label default\");\n\t\t\tadd(\"datalist\", \"\", [phrasingContent, \"option\"].join(' '));\n\t\t\tadd(\"article section nav aside header footer\", \"\", flowContent);\n\t\t\tadd(\"hgroup\", \"\", \"h1 h2 h3 h4 h5 h6\");\n\t\t\tadd(\"figure\", \"\", [flowContent, \"figcaption\"].join(' '));\n\t\t\tadd(\"time\", \"datetime\", phrasingContent);\n\t\t\tadd(\"dialog\", \"open\", flowContent);\n\t\t\tadd(\"command\", \"type label icon disabled checked radiogroup command\");\n\t\t\tadd(\"output\", \"for form name\", phrasingContent);\n\t\t\tadd(\"progress\", \"value max\", phrasingContent);\n\t\t\tadd(\"meter\", \"value min max low high optimum\", phrasingContent);\n\t\t\tadd(\"details\", \"open\", [flowContent, \"summary\"].join(' '));\n\t\t\tadd(\"keygen\", \"autofocus challenge disabled form keytype name\");\n\t\t}\n\n\t\t// Extend with HTML4 attributes unless it's html5-strict\n\t\tif (type != \"html5-strict\") {\n\t\t\taddAttrs(\"script\", \"language xml:space\");\n\t\t\taddAttrs(\"style\", \"xml:space\");\n\t\t\taddAttrs(\"object\", \"declare classid code codebase codetype archive standby align border hspace vspace\");\n\t\t\taddAttrs(\"embed\", \"align name hspace vspace\");\n\t\t\taddAttrs(\"param\", \"valuetype type\");\n\t\t\taddAttrs(\"a\", \"charset name rev shape coords\");\n\t\t\taddAttrs(\"br\", \"clear\");\n\t\t\taddAttrs(\"applet\", \"codebase archive code object alt name width height align hspace vspace\");\n\t\t\taddAttrs(\"img\", \"name longdesc align border hspace vspace\");\n\t\t\taddAttrs(\"iframe\", \"longdesc frameborder marginwidth marginheight scrolling align\");\n\t\t\taddAttrs(\"font basefont\", \"size color face\");\n\t\t\taddAttrs(\"input\", \"usemap align\");\n\t\t\taddAttrs(\"select\", \"onchange\");\n\t\t\taddAttrs(\"textarea\");\n\t\t\taddAttrs(\"h1 h2 h3 h4 h5 h6 div p legend caption\", \"align\");\n\t\t\taddAttrs(\"ul\", \"type compact\");\n\t\t\taddAttrs(\"li\", \"type\");\n\t\t\taddAttrs(\"ol dl menu dir\", \"compact\");\n\t\t\taddAttrs(\"pre\", \"width xml:space\");\n\t\t\taddAttrs(\"hr\", \"align noshade size width\");\n\t\t\taddAttrs(\"isindex\", \"prompt\");\n\t\t\taddAttrs(\"table\", \"summary width frame rules cellspacing cellpadding align bgcolor\");\n\t\t\taddAttrs(\"col\", \"width align char charoff valign\");\n\t\t\taddAttrs(\"colgroup\", \"width align char charoff valign\");\n\t\t\taddAttrs(\"thead\", \"align char charoff valign\");\n\t\t\taddAttrs(\"tr\", \"align char charoff valign bgcolor\");\n\t\t\taddAttrs(\"th\", \"axis align char charoff valign nowrap bgcolor width height\");\n\t\t\taddAttrs(\"form\", \"accept\");\n\t\t\taddAttrs(\"td\", \"abbr axis scope align char charoff valign nowrap bgcolor width height\");\n\t\t\taddAttrs(\"tfoot\", \"align char charoff valign\");\n\t\t\taddAttrs(\"tbody\", \"align char charoff valign\");\n\t\t\taddAttrs(\"area\", \"nohref\");\n\t\t\taddAttrs(\"body\", \"background bgcolor text link vlink alink\");\n\t\t}\n\n\t\t// Extend with HTML5 attributes unless it's html4\n\t\tif (type != \"html4\") {\n\t\t\taddAttrs(\"input button select textarea\", \"autofocus\");\n\t\t\taddAttrs(\"input textarea\", \"placeholder\");\n\t\t\taddAttrs(\"a\", \"download\");\n\t\t\taddAttrs(\"link script img\", \"crossorigin\");\n\t\t\taddAttrs(\"iframe\", \"sandbox seamless allowfullscreen\"); // Excluded: srcdoc\n\t\t}\n\n\t\t// Special: iframe, ruby, video, audio, label\n\n\t\t// Delete children of the same name from it's parent\n\t\t// For example: form can't have a child of the name form\n\t\teach(split('a form meter progress dfn'), function(name) {\n\t\t\tif (schema[name]) {\n\t\t\t\tdelete schema[name].children[name];\n\t\t\t}\n\t\t});\n\n\t\t// Delete header, footer, sectioning and heading content descendants\n\t\t/*each('dt th address', function(name) {\n\t\t delete schema[name].children[name];\n\t\t });*/\n\n\t\t// Caption can't have tables\n\t\tdelete schema.caption.children.table;\n\n\t\t// Delete scripts by default due to possible XSS\n\t\tdelete schema.script;\n\n\t\t// TODO: LI:s can only have value if parent is OL\n\n\t\t// TODO: Handle transparent elements\n\t\t// a ins del canvas map\n\n\t\tmapCache[type] = schema;\n\n\t\treturn schema;\n\t}\n\n\tfunction compileElementMap(value, mode) {\n\t\tvar styles;\n\n\t\tif (value) {\n\t\t\tstyles = {};\n\n\t\t\tif (typeof value == 'string') {\n\t\t\t\tvalue = {\n\t\t\t\t\t'*': value\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Convert styles into a rule list\n\t\t\teach(value, function(value, key) {\n\t\t\t\tstyles[key] = styles[key.toUpperCase()] = mode == 'map' ? makeMap(value, /[, ]/) : explode(value, /[, ]/);\n\t\t\t});\n\t\t}\n\n\t\treturn styles;\n\t}\n\n\t/**\n\t * Constructs a new Schema instance.\n\t *\n\t * @constructor\n\t * @method Schema\n\t * @param {Object} settings Name/value settings object.\n\t */\n\treturn function(settings) {\n\t\tvar self = this, elements = {}, children = {}, patternElements = [], validStyles, invalidStyles, schemaItems;\n\t\tvar whiteSpaceElementsMap, selfClosingElementsMap, shortEndedElementsMap, boolAttrMap, validClasses;\n\t\tvar blockElementsMap, nonEmptyElementsMap, moveCaretBeforeOnEnterElementsMap, textBlockElementsMap, textInlineElementsMap;\n\t\tvar customElementsMap = {}, specialElements = {};\n\n\t\t// Creates an lookup table map object for the specified option or the default value\n\t\tfunction createLookupTable(option, default_value, extendWith) {\n\t\t\tvar value = settings[option];\n\n\t\t\tif (!value) {\n\t\t\t\t// Get cached default map or make it if needed\n\t\t\t\tvalue = mapCache[option];\n\n\t\t\t\tif (!value) {\n\t\t\t\t\tvalue = makeMap(default_value, ' ', makeMap(default_value.toUpperCase(), ' '));\n\t\t\t\t\tvalue = extend(value, extendWith);\n\n\t\t\t\t\tmapCache[option] = value;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Create custom map\n\t\t\t\tvalue = makeMap(value, /[, ]/, makeMap(value.toUpperCase(), /[, ]/));\n\t\t\t}\n\n\t\t\treturn value;\n\t\t}\n\n\t\tsettings = settings || {};\n\t\tschemaItems = compileSchema(settings.schema);\n\n\t\t// Allow all elements and attributes if verify_html is set to false\n\t\tif (settings.verify_html === false) {\n\t\t\tsettings.valid_elements = '*[*]';\n\t\t}\n\n\t\tvalidStyles = compileElementMap(settings.valid_styles);\n\t\tinvalidStyles = compileElementMap(settings.invalid_styles, 'map');\n\t\tvalidClasses = compileElementMap(settings.valid_classes, 'map');\n\n\t\t// Setup map objects\n\t\twhiteSpaceElementsMap = createLookupTable(\n\t\t\t'whitespace_elements',\n\t\t\t'pre script noscript style textarea video audio iframe object code'\n\t\t);\n\t\tselfClosingElementsMap = createLookupTable('self_closing_elements', 'colgroup dd dt li option p td tfoot th thead tr');\n\t\tshortEndedElementsMap = createLookupTable('short_ended_elements', 'area base basefont br col frame hr img input isindex link ' +\n\t\t'meta param embed source wbr track');\n\t\tboolAttrMap = createLookupTable('boolean_attributes', 'checked compact declare defer disabled ismap multiple nohref noresize ' +\n\t\t'noshade nowrap readonly selected autoplay loop controls');\n\t\tnonEmptyElementsMap = createLookupTable('non_empty_elements', 'td th iframe video audio object ' +\n\t\t'script pre code', shortEndedElementsMap);\n\t\tmoveCaretBeforeOnEnterElementsMap = createLookupTable('move_caret_before_on_enter_elements', 'table', nonEmptyElementsMap);\n\t\ttextBlockElementsMap = createLookupTable('text_block_elements', 'h1 h2 h3 h4 h5 h6 p div address pre form ' +\n\t\t'blockquote center dir fieldset header footer article section hgroup aside nav figure');\n\t\tblockElementsMap = createLookupTable('block_elements', 'hr table tbody thead tfoot ' +\n\t\t'th tr td li ol ul caption dl dt dd noscript menu isindex option ' +\n\t\t'datalist select optgroup figcaption', textBlockElementsMap);\n\t\ttextInlineElementsMap = createLookupTable('text_inline_elements', 'span strong b em i font strike u var cite ' +\n\t\t'dfn code mark q sup sub samp');\n\n\t\teach((settings.special || 'script noscript iframe noframes noembed title style textarea xmp').split(' '), function(name) {\n\t\t\tspecialElements[name] = new RegExp('<\\/' + name + '[^>]*>', 'gi');\n\t\t});\n\n\t\t// Converts a wildcard expression string to a regexp for example *a will become /.*a/.\n\t\tfunction patternToRegExp(str) {\n\t\t\treturn new RegExp('^' + str.replace(/([?+*])/g, '.$1') + '$');\n\t\t}\n\n\t\t// Parses the specified valid_elements string and adds to the current rules\n\t\t// This function is a bit hard to read since it's heavily optimized for speed\n\t\tfunction addValidElements(validElements) {\n\t\t\tvar ei, el, ai, al, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,\n\t\t\t\tprefix, outputName, globalAttributes, globalAttributesOrder, key, value,\n\t\t\t\telementRuleRegExp = /^([#+\\-])?([^\\[!\\/]+)(?:\\/([^\\[!]+))?(?:(!?)\\[([^\\]]+)\\])?$/,\n\t\t\t\tattrRuleRegExp = /^([!\\-])?(\\w+::\\w+|[^=:<]+)?(?:([=:<])(.*))?$/,\n\t\t\t\thasPatternsRegExp = /[*?+]/;\n\n\t\t\tif (validElements) {\n\t\t\t\t// Split valid elements into an array with rules\n\t\t\t\tvalidElements = split(validElements, ',');\n\n\t\t\t\tif (elements['@']) {\n\t\t\t\t\tglobalAttributes = elements['@'].attributes;\n\t\t\t\t\tglobalAttributesOrder = elements['@'].attributesOrder;\n\t\t\t\t}\n\n\t\t\t\t// Loop all rules\n\t\t\t\tfor (ei = 0, el = validElements.length; ei < el; ei++) {\n\t\t\t\t\t// Parse element rule\n\t\t\t\t\tmatches = elementRuleRegExp.exec(validElements[ei]);\n\t\t\t\t\tif (matches) {\n\t\t\t\t\t\t// Setup local names for matches\n\t\t\t\t\t\tprefix = matches[1];\n\t\t\t\t\t\telementName = matches[2];\n\t\t\t\t\t\toutputName = matches[3];\n\t\t\t\t\t\tattrData = matches[5];\n\n\t\t\t\t\t\t// Create new attributes and attributesOrder\n\t\t\t\t\t\tattributes = {};\n\t\t\t\t\t\tattributesOrder = [];\n\n\t\t\t\t\t\t// Create the new element\n\t\t\t\t\t\telement = {\n\t\t\t\t\t\t\tattributes: attributes,\n\t\t\t\t\t\t\tattributesOrder: attributesOrder\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// Padd empty elements prefix\n\t\t\t\t\t\tif (prefix === '#') {\n\t\t\t\t\t\t\telement.paddEmpty = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Remove empty elements prefix\n\t\t\t\t\t\tif (prefix === '-') {\n\t\t\t\t\t\t\telement.removeEmpty = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (matches[4] === '!') {\n\t\t\t\t\t\t\telement.removeEmptyAttrs = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Copy attributes from global rule into current rule\n\t\t\t\t\t\tif (globalAttributes) {\n\t\t\t\t\t\t\tfor (key in globalAttributes) {\n\t\t\t\t\t\t\t\tattributes[key] = globalAttributes[key];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tattributesOrder.push.apply(attributesOrder, globalAttributesOrder);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Attributes defined\n\t\t\t\t\t\tif (attrData) {\n\t\t\t\t\t\t\tattrData = split(attrData, '|');\n\t\t\t\t\t\t\tfor (ai = 0, al = attrData.length; ai < al; ai++) {\n\t\t\t\t\t\t\t\tmatches = attrRuleRegExp.exec(attrData[ai]);\n\t\t\t\t\t\t\t\tif (matches) {\n\t\t\t\t\t\t\t\t\tattr = {};\n\t\t\t\t\t\t\t\t\tattrType = matches[1];\n\t\t\t\t\t\t\t\t\tattrName = matches[2].replace(/::/g, ':');\n\t\t\t\t\t\t\t\t\tprefix = matches[3];\n\t\t\t\t\t\t\t\t\tvalue = matches[4];\n\n\t\t\t\t\t\t\t\t\t// Required\n\t\t\t\t\t\t\t\t\tif (attrType === '!') {\n\t\t\t\t\t\t\t\t\t\telement.attributesRequired = element.attributesRequired || [];\n\t\t\t\t\t\t\t\t\t\telement.attributesRequired.push(attrName);\n\t\t\t\t\t\t\t\t\t\tattr.required = true;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Denied from global\n\t\t\t\t\t\t\t\t\tif (attrType === '-') {\n\t\t\t\t\t\t\t\t\t\tdelete attributes[attrName];\n\t\t\t\t\t\t\t\t\t\tattributesOrder.splice(inArray(attributesOrder, attrName), 1);\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Default value\n\t\t\t\t\t\t\t\t\tif (prefix) {\n\t\t\t\t\t\t\t\t\t\t// Default value\n\t\t\t\t\t\t\t\t\t\tif (prefix === '=') {\n\t\t\t\t\t\t\t\t\t\t\telement.attributesDefault = element.attributesDefault || [];\n\t\t\t\t\t\t\t\t\t\t\telement.attributesDefault.push({name: attrName, value: value});\n\t\t\t\t\t\t\t\t\t\t\tattr.defaultValue = value;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Forced value\n\t\t\t\t\t\t\t\t\t\tif (prefix === ':') {\n\t\t\t\t\t\t\t\t\t\t\telement.attributesForced = element.attributesForced || [];\n\t\t\t\t\t\t\t\t\t\t\telement.attributesForced.push({name: attrName, value: value});\n\t\t\t\t\t\t\t\t\t\t\tattr.forcedValue = value;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Required values\n\t\t\t\t\t\t\t\t\t\tif (prefix === '<') {\n\t\t\t\t\t\t\t\t\t\t\tattr.validValues = makeMap(value, '?');\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\t\t// Check for attribute patterns\n\t\t\t\t\t\t\t\t\tif (hasPatternsRegExp.test(attrName)) {\n\t\t\t\t\t\t\t\t\t\telement.attributePatterns = element.attributePatterns || [];\n\t\t\t\t\t\t\t\t\t\tattr.pattern = patternToRegExp(attrName);\n\t\t\t\t\t\t\t\t\t\telement.attributePatterns.push(attr);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// Add attribute to order list if it doesn't already exist\n\t\t\t\t\t\t\t\t\t\tif (!attributes[attrName]) {\n\t\t\t\t\t\t\t\t\t\t\tattributesOrder.push(attrName);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tattributes[attrName] = attr;\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// Global rule, store away these for later usage\n\t\t\t\t\t\tif (!globalAttributes && elementName == '@') {\n\t\t\t\t\t\t\tglobalAttributes = attributes;\n\t\t\t\t\t\t\tglobalAttributesOrder = attributesOrder;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Handle substitute elements such as b/strong\n\t\t\t\t\t\tif (outputName) {\n\t\t\t\t\t\t\telement.outputName = elementName;\n\t\t\t\t\t\t\telements[outputName] = element;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Add pattern or exact element\n\t\t\t\t\t\tif (hasPatternsRegExp.test(elementName)) {\n\t\t\t\t\t\t\telement.pattern = patternToRegExp(elementName);\n\t\t\t\t\t\t\tpatternElements.push(element);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telements[elementName] = element;\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\tfunction setValidElements(validElements) {\n\t\t\telements = {};\n\t\t\tpatternElements = [];\n\n\t\t\taddValidElements(validElements);\n\n\t\t\teach(schemaItems, function(element, name) {\n\t\t\t\tchildren[name] = element.children;\n\t\t\t});\n\t\t}\n\n\t\t// Adds custom non HTML elements to the schema\n\t\tfunction addCustomElements(customElements) {\n\t\t\tvar customElementRegExp = /^(~)?(.+)$/;\n\n\t\t\tif (customElements) {\n\t\t\t\t// Flush cached items since we are altering the default maps\n\t\t\t\tmapCache.text_block_elements = mapCache.block_elements = null;\n\n\t\t\t\teach(split(customElements, ','), function(rule) {\n\t\t\t\t\tvar matches = customElementRegExp.exec(rule),\n\t\t\t\t\t\tinline = matches[1] === '~',\n\t\t\t\t\t\tcloneName = inline ? 'span' : 'div',\n\t\t\t\t\t\tname = matches[2];\n\n\t\t\t\t\tchildren[name] = children[cloneName];\n\t\t\t\t\tcustomElementsMap[name] = cloneName;\n\n\t\t\t\t\t// If it's not marked as inline then add it to valid block elements\n\t\t\t\t\tif (!inline) {\n\t\t\t\t\t\tblockElementsMap[name.toUpperCase()] = {};\n\t\t\t\t\t\tblockElementsMap[name] = {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add elements clone if needed\n\t\t\t\t\tif (!elements[name]) {\n\t\t\t\t\t\tvar customRule = elements[cloneName];\n\n\t\t\t\t\t\tcustomRule = extend({}, customRule);\n\t\t\t\t\t\tdelete customRule.removeEmptyAttrs;\n\t\t\t\t\t\tdelete customRule.removeEmpty;\n\n\t\t\t\t\t\telements[name] = customRule;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add custom elements at span/div positions\n\t\t\t\t\teach(children, function(element, elmName) {\n\t\t\t\t\t\tif (element[cloneName]) {\n\t\t\t\t\t\t\tchildren[elmName] = element = extend({}, children[elmName]);\n\t\t\t\t\t\t\telement[name] = element[cloneName];\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// Adds valid children to the schema object\n\t\tfunction addValidChildren(validChildren) {\n\t\t\tvar childRuleRegExp = /^([+\\-]?)(\\w+)\\[([^\\]]+)\\]$/;\n\n\t\t\t// Invalidate the schema cache if the schema is mutated\n\t\t\tmapCache[settings.schema] = null;\n\n\t\t\tif (validChildren) {\n\t\t\t\teach(split(validChildren, ','), function(rule) {\n\t\t\t\t\tvar matches = childRuleRegExp.exec(rule), parent, prefix;\n\n\t\t\t\t\tif (matches) {\n\t\t\t\t\t\tprefix = matches[1];\n\n\t\t\t\t\t\t// Add/remove items from default\n\t\t\t\t\t\tif (prefix) {\n\t\t\t\t\t\t\tparent = children[matches[2]];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparent = children[matches[2]] = {'#comment': {}};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tparent = children[matches[2]];\n\n\t\t\t\t\t\teach(split(matches[3], '|'), function(child) {\n\t\t\t\t\t\t\tif (prefix === '-') {\n\t\t\t\t\t\t\t\tdelete parent[child];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tparent[child] = {};\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\t\tfunction getElementRule(name) {\n\t\t\tvar element = elements[name], i;\n\n\t\t\t// Exact match found\n\t\t\tif (element) {\n\t\t\t\treturn element;\n\t\t\t}\n\n\t\t\t// No exact match then try the patterns\n\t\t\ti = patternElements.length;\n\t\t\twhile (i--) {\n\t\t\t\telement = patternElements[i];\n\n\t\t\t\tif (element.pattern.test(name)) {\n\t\t\t\t\treturn element;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!settings.valid_elements) {\n\t\t\t// No valid elements defined then clone the elements from the schema spec\n\t\t\teach(schemaItems, function(element, name) {\n\t\t\t\telements[name] = {\n\t\t\t\t\tattributes: element.attributes,\n\t\t\t\t\tattributesOrder: element.attributesOrder\n\t\t\t\t};\n\n\t\t\t\tchildren[name] = element.children;\n\t\t\t});\n\n\t\t\t// Switch these on HTML4\n\t\t\tif (settings.schema != \"html5\") {\n\t\t\t\teach(split('strong/b em/i'), function(item) {\n\t\t\t\t\titem = split(item, '/');\n\t\t\t\t\telements[item[1]].outputName = item[0];\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Add default alt attribute for images, removed since alt=\"\" is treated as presentational.\n\t\t\t// elements.img.attributesDefault = [{name: 'alt', value: ''}];\n\n\t\t\t// Remove these if they are empty by default\n\t\t\teach(split('ol ul sub sup blockquote span font a table tbody tr strong em b i'), function(name) {\n\t\t\t\tif (elements[name]) {\n\t\t\t\t\telements[name].removeEmpty = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Padd these by default\n\t\t\teach(split('p h1 h2 h3 h4 h5 h6 th td pre div address caption'), function(name) {\n\t\t\t\telements[name].paddEmpty = true;\n\t\t\t});\n\n\t\t\t// Remove these if they have no attributes\n\t\t\teach(split('span'), function(name) {\n\t\t\t\telements[name].removeEmptyAttrs = true;\n\t\t\t});\n\n\t\t\t// Remove these by default\n\t\t\t// TODO: Reenable in 4.1\n\t\t\t/*each(split('script style'), function(name) {\n\t\t\t delete elements[name];\n\t\t\t });*/\n\t\t} else {\n\t\t\tsetValidElements(settings.valid_elements);\n\t\t}\n\n\t\taddCustomElements(settings.custom_elements);\n\t\taddValidChildren(settings.valid_children);\n\t\taddValidElements(settings.extended_valid_elements);\n\n\t\t// Todo: Remove this when we fix list handling to be valid\n\t\taddValidChildren('+ol[ul|ol],+ul[ul|ol]');\n\n\n\t\t// Some elements are not valid by themselves - require parents\n\t\teach({\n\t\t\tdd: 'dl',\n\t\t\tdt: 'dl',\n\t\t\tli: 'ul ol',\n\t\t\ttd: 'tr',\n\t\t\tth: 'tr',\n\t\t\ttr: 'tbody thead tfoot',\n\t\t\ttbody: 'table',\n\t\t\tthead: 'table',\n\t\t\ttfoot: 'table',\n\t\t\tlegend: 'fieldset',\n\t\t\tarea: 'map',\n\t\t\tparam: 'video audio object'\n\t\t}, function(parents, item) {\n\t\t\tif (elements[item]) {\n\t\t\t\telements[item].parentsRequired = split(parents);\n\t\t\t}\n\t\t});\n\n\n\t\t// Delete invalid elements\n\t\tif (settings.invalid_elements) {\n\t\t\teach(explode(settings.invalid_elements), function(item) {\n\t\t\t\tif (elements[item]) {\n\t\t\t\t\tdelete elements[item];\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// If the user didn't allow span only allow internal spans\n\t\tif (!getElementRule('span')) {\n\t\t\taddValidElements('span[!data-mce-type|*]');\n\t\t}\n\n\t\t/**\n\t\t * Name/value map object with valid parents and children to those parents.\n\t\t *\n\t\t * @example\n\t\t * children = {\n\t\t * div:{p:{}, h1:{}}\n\t\t * };\n\t\t * @field children\n\t\t * @type Object\n\t\t */\n\t\tself.children = children;\n\n\t\t/**\n\t\t * Name/value map object with valid styles for each element.\n\t\t *\n\t\t * @method getValidStyles\n\t\t * @type Object\n\t\t */\n\t\tself.getValidStyles = function() {\n\t\t\treturn validStyles;\n\t\t};\n\n\t\t/**\n\t\t * Name/value map object with valid styles for each element.\n\t\t *\n\t\t * @method getInvalidStyles\n\t\t * @type Object\n\t\t */\n\t\tself.getInvalidStyles = function() {\n\t\t\treturn invalidStyles;\n\t\t};\n\n\t\t/**\n\t\t * Name/value map object with valid classes for each element.\n\t\t *\n\t\t * @method getValidClasses\n\t\t * @type Object\n\t\t */\n\t\tself.getValidClasses = function() {\n\t\t\treturn validClasses;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with boolean attributes.\n\t\t *\n\t\t * @method getBoolAttrs\n\t\t * @return {Object} Name/value lookup map for boolean attributes.\n\t\t */\n\t\tself.getBoolAttrs = function() {\n\t\t\treturn boolAttrMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with block elements.\n\t\t *\n\t\t * @method getBlockElements\n\t\t * @return {Object} Name/value lookup map for block elements.\n\t\t */\n\t\tself.getBlockElements = function() {\n\t\t\treturn blockElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with text block elements. Such as: p,h1-h6,div,address\n\t\t *\n\t\t * @method getTextBlockElements\n\t\t * @return {Object} Name/value lookup map for block elements.\n\t\t */\n\t\tself.getTextBlockElements = function() {\n\t\t\treturn textBlockElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map of inline text format nodes for example strong/span or ins.\n\t\t *\n\t\t * @method getTextInlineElements\n\t\t * @return {Object} Name/value lookup map for text format elements.\n\t\t */\n\t\tself.getTextInlineElements = function() {\n\t\t\treturn textInlineElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with short ended elements such as BR or IMG.\n\t\t *\n\t\t * @method getShortEndedElements\n\t\t * @return {Object} Name/value lookup map for short ended elements.\n\t\t */\n\t\tself.getShortEndedElements = function() {\n\t\t\treturn shortEndedElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with self closing tags such as
    • .\n\t\t *\n\t\t * @method getSelfClosingElements\n\t\t * @return {Object} Name/value lookup map for self closing tags elements.\n\t\t */\n\t\tself.getSelfClosingElements = function() {\n\t\t\treturn selfClosingElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with elements that should be treated as contents regardless if it has text\n\t\t * content in them or not such as TD, VIDEO or IMG.\n\t\t *\n\t\t * @method getNonEmptyElements\n\t\t * @return {Object} Name/value lookup map for non empty elements.\n\t\t */\n\t\tself.getNonEmptyElements = function() {\n\t\t\treturn nonEmptyElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with elements that the caret should be moved in front of after enter is\n\t\t * pressed\n\t\t *\n\t\t * @method getMoveCaretBeforeOnEnterElements\n\t\t * @return {Object} Name/value lookup map for elements to place the caret in front of.\n\t\t */\n\t\tself.getMoveCaretBeforeOnEnterElements = function() {\n\t\t\treturn moveCaretBeforeOnEnterElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with elements where white space is to be preserved like PRE or SCRIPT.\n\t\t *\n\t\t * @method getWhiteSpaceElements\n\t\t * @return {Object} Name/value lookup map for white space elements.\n\t\t */\n\t\tself.getWhiteSpaceElements = function() {\n\t\t\treturn whiteSpaceElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with special elements. These are elements that needs to be parsed\n\t\t * in a special way such as script, style, textarea etc. The map object values\n\t\t * are regexps used to find the end of the element.\n\t\t *\n\t\t * @method getSpecialElements\n\t\t * @return {Object} Name/value lookup map for special elements.\n\t\t */\n\t\tself.getSpecialElements = function() {\n\t\t\treturn specialElements;\n\t\t};\n\n\t\t/**\n\t\t * Returns true/false if the specified element and it's child is valid or not\n\t\t * according to the schema.\n\t\t *\n\t\t * @method isValidChild\n\t\t * @param {String} name Element name to check for.\n\t\t * @param {String} child Element child to verify.\n\t\t * @return {Boolean} True/false if the element is a valid child of the specified parent.\n\t\t */\n\t\tself.isValidChild = function(name, child) {\n\t\t\tvar parent = children[name];\n\n\t\t\treturn !!(parent && parent[child]);\n\t\t};\n\n\t\t/**\n\t\t * Returns true/false if the specified element name and optional attribute is\n\t\t * valid according to the schema.\n\t\t *\n\t\t * @method isValid\n\t\t * @param {String} name Name of element to check.\n\t\t * @param {String} attr Optional attribute name to check for.\n\t\t * @return {Boolean} True/false if the element and attribute is valid.\n\t\t */\n\t\tself.isValid = function(name, attr) {\n\t\t\tvar attrPatterns, i, rule = getElementRule(name);\n\n\t\t\t// Check if it's a valid element\n\t\t\tif (rule) {\n\t\t\t\tif (attr) {\n\t\t\t\t\t// Check if attribute name exists\n\t\t\t\t\tif (rule.attributes[attr]) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check if attribute matches a regexp pattern\n\t\t\t\t\tattrPatterns = rule.attributePatterns;\n\t\t\t\t\tif (attrPatterns) {\n\t\t\t\t\t\ti = attrPatterns.length;\n\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\tif (attrPatterns[i].pattern.test(name)) {\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} else {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// No match\n\t\t\treturn false;\n\t\t};\n\n\t\t/**\n\t\t * Returns true/false if the specified element is valid or not\n\t\t * according to the schema.\n\t\t *\n\t\t * @method getElementRule\n\t\t * @param {String} name Element name to check for.\n\t\t * @return {Object} Element object or undefined if the element isn't valid.\n\t\t */\n\t\tself.getElementRule = getElementRule;\n\n\t\t/**\n\t\t * Returns an map object of all custom elements.\n\t\t *\n\t\t * @method getCustomElements\n\t\t * @return {Object} Name/value map object of all custom elements.\n\t\t */\n\t\tself.getCustomElements = function() {\n\t\t\treturn customElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Parses a valid elements string and adds it to the schema. The valid elements\n\t\t * format is for example \"element[attr=default|otherattr]\".\n\t\t * Existing rules will be replaced with the ones specified, so this extends the schema.\n\t\t *\n\t\t * @method addValidElements\n\t\t * @param {String} valid_elements String in the valid elements format to be parsed.\n\t\t */\n\t\tself.addValidElements = addValidElements;\n\n\t\t/**\n\t\t * Parses a valid elements string and sets it to the schema. The valid elements\n\t\t * format is for example \"element[attr=default|otherattr]\".\n\t\t * Existing rules will be replaced with the ones specified, so this extends the schema.\n\t\t *\n\t\t * @method setValidElements\n\t\t * @param {String} valid_elements String in the valid elements format to be parsed.\n\t\t */\n\t\tself.setValidElements = setValidElements;\n\n\t\t/**\n\t\t * Adds custom non HTML elements to the schema.\n\t\t *\n\t\t * @method addCustomElements\n\t\t * @param {String} custom_elements Comma separated list of custom elements to add.\n\t\t */\n\t\tself.addCustomElements = addCustomElements;\n\n\t\t/**\n\t\t * Parses a valid children string and adds them to the schema structure. The valid children\n\t\t * format is for example: \"element[child1|child2]\".\n\t\t *\n\t\t * @method addValidChildren\n\t\t * @param {String} valid_children Valid children elements string to parse\n\t\t */\n\t\tself.addValidChildren = addValidChildren;\n\n\t\tself.elements = elements;\n\t};\n});\n\n// Included from: js/tinymce/classes/html/SaxParser.js\n\n/**\n * SaxParser.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/*eslint max-depth:[2, 9] */\n\n/**\n * This class parses HTML code using pure JavaScript and executes various events for each item it finds. It will\n * always execute the events in the right order for tag soup code like

      . It will also remove elements\n * and attributes that doesn't fit the schema if the validate setting is enabled.\n *\n * @example\n * var parser = new tinymce.html.SaxParser({\n * validate: true,\n *\n * comment: function(text) {\n * console.log('Comment:', text);\n * },\n *\n * cdata: function(text) {\n * console.log('CDATA:', text);\n * },\n *\n * text: function(text, raw) {\n * console.log('Text:', text, 'Raw:', raw);\n * },\n *\n * start: function(name, attrs, empty) {\n * console.log('Start:', name, attrs, empty);\n * },\n *\n * end: function(name) {\n * console.log('End:', name);\n * },\n *\n * pi: function(name, text) {\n * console.log('PI:', name, text);\n * },\n *\n * doctype: function(text) {\n * console.log('DocType:', text);\n * }\n * }, schema);\n * @class tinymce.html.SaxParser\n * @version 3.4\n */\ndefine(\"tinymce/html/SaxParser\", [\n\t\"tinymce/html/Schema\",\n\t\"tinymce/html/Entities\",\n\t\"tinymce/util/Tools\"\n], function(Schema, Entities, Tools) {\n\tvar each = Tools.each;\n\n\tfunction trimComments(text) {\n\t\tvar sanitizedText = text;\n\t\twhile (/.\n\t\t\t *\n\t\t\t * @method cdata\n\t\t\t * @param {String} text String to write out inside the comment.\n\t\t\t */\n\t\t\tcomment: function(text) {\n\t\t\t\thtml.push('');\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Writes a PI node such as .\n\t\t\t *\n\t\t\t * @method pi\n\t\t\t * @param {String} name Name of the pi.\n\t\t\t * @param {String} text String to write out inside the pi.\n\t\t\t */\n\t\t\tpi: function(name, text) {\n\t\t\t\tif (text) {\n\t\t\t\t\thtml.push('');\n\t\t\t\t} else {\n\t\t\t\t\thtml.push('');\n\t\t\t\t}\n\n\t\t\t\tif (indent) {\n\t\t\t\t\thtml.push('\\n');\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Writes a doctype node such as .\n\t\t\t *\n\t\t\t * @method doctype\n\t\t\t * @param {String} text String to write out inside the doctype.\n\t\t\t */\n\t\t\tdoctype: function(text) {\n\t\t\t\thtml.push('', indent ? '\\n' : '');\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Resets the internal buffer if one wants to reuse the writer.\n\t\t\t *\n\t\t\t * @method reset\n\t\t\t */\n\t\t\treset: function() {\n\t\t\t\thtml.length = 0;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the contents that got serialized.\n\t\t\t *\n\t\t\t * @method getContent\n\t\t\t * @return {String} HTML contents that got written down.\n\t\t\t */\n\t\t\tgetContent: function() {\n\t\t\t\treturn html.join('').replace(/\\n$/, '');\n\t\t\t}\n\t\t};\n\t};\n});\n\n// Included from: js/tinymce/classes/html/Serializer.js\n\n/**\n * Serializer.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class is used to serialize down the DOM tree into a string using a Writer instance.\n *\n *\n * @example\n * new tinymce.html.Serializer().serialize(new tinymce.html.DomParser().parse('

      text

      '));\n * @class tinymce.html.Serializer\n * @version 3.4\n */\ndefine(\"tinymce/html/Serializer\", [\n\t\"tinymce/html/Writer\",\n\t\"tinymce/html/Schema\"\n], function(Writer, Schema) {\n\t/**\n\t * Constructs a new Serializer instance.\n\t *\n\t * @constructor\n\t * @method Serializer\n\t * @param {Object} settings Name/value settings object.\n\t * @param {tinymce.html.Schema} schema Schema instance to use.\n\t */\n\treturn function(settings, schema) {\n\t\tvar self = this, writer = new Writer(settings);\n\n\t\tsettings = settings || {};\n\t\tsettings.validate = \"validate\" in settings ? settings.validate : true;\n\n\t\tself.schema = schema = schema || new Schema();\n\t\tself.writer = writer;\n\n\t\t/**\n\t\t * Serializes the specified node into a string.\n\t\t *\n\t\t * @example\n\t\t * new tinymce.html.Serializer().serialize(new tinymce.html.DomParser().parse('

      text

      '));\n\t\t * @method serialize\n\t\t * @param {tinymce.html.Node} node Node instance to serialize.\n\t\t * @return {String} String with HTML based on DOM tree.\n\t\t */\n\t\tself.serialize = function(node) {\n\t\t\tvar handlers, validate;\n\n\t\t\tvalidate = settings.validate;\n\n\t\t\thandlers = {\n\t\t\t\t// #text\n\t\t\t\t3: function(node) {\n\t\t\t\t\twriter.text(node.value, node.raw);\n\t\t\t\t},\n\n\t\t\t\t// #comment\n\t\t\t\t8: function(node) {\n\t\t\t\t\twriter.comment(node.value);\n\t\t\t\t},\n\n\t\t\t\t// Processing instruction\n\t\t\t\t7: function(node) {\n\t\t\t\t\twriter.pi(node.name, node.value);\n\t\t\t\t},\n\n\t\t\t\t// Doctype\n\t\t\t\t10: function(node) {\n\t\t\t\t\twriter.doctype(node.value);\n\t\t\t\t},\n\n\t\t\t\t// CDATA\n\t\t\t\t4: function(node) {\n\t\t\t\t\twriter.cdata(node.value);\n\t\t\t\t},\n\n\t\t\t\t// Document fragment\n\t\t\t\t11: function(node) {\n\t\t\t\t\tif ((node = node.firstChild)) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\twalk(node);\n\t\t\t\t\t\t} while ((node = node.next));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\twriter.reset();\n\n\t\t\tfunction walk(node) {\n\t\t\t\tvar handler = handlers[node.type], name, isEmpty, attrs, attrName, attrValue, sortedAttrs, i, l, elementRule;\n\n\t\t\t\tif (!handler) {\n\t\t\t\t\tname = node.name;\n\t\t\t\t\tisEmpty = node.shortEnded;\n\t\t\t\t\tattrs = node.attributes;\n\n\t\t\t\t\t// Sort attributes\n\t\t\t\t\tif (validate && attrs && attrs.length > 1) {\n\t\t\t\t\t\tsortedAttrs = [];\n\t\t\t\t\t\tsortedAttrs.map = {};\n\n\t\t\t\t\t\telementRule = schema.getElementRule(node.name);\n\t\t\t\t\t\tif (elementRule) {\n\t\t\t\t\t\t\tfor (i = 0, l = elementRule.attributesOrder.length; i < l; i++) {\n\t\t\t\t\t\t\t\tattrName = elementRule.attributesOrder[i];\n\n\t\t\t\t\t\t\t\tif (attrName in attrs.map) {\n\t\t\t\t\t\t\t\t\tattrValue = attrs.map[attrName];\n\t\t\t\t\t\t\t\t\tsortedAttrs.map[attrName] = attrValue;\n\t\t\t\t\t\t\t\t\tsortedAttrs.push({name: attrName, value: attrValue});\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\tfor (i = 0, l = attrs.length; i < l; i++) {\n\t\t\t\t\t\t\t\tattrName = attrs[i].name;\n\n\t\t\t\t\t\t\t\tif (!(attrName in sortedAttrs.map)) {\n\t\t\t\t\t\t\t\t\tattrValue = attrs.map[attrName];\n\t\t\t\t\t\t\t\t\tsortedAttrs.map[attrName] = attrValue;\n\t\t\t\t\t\t\t\t\tsortedAttrs.push({name: attrName, value: attrValue});\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\tattrs = sortedAttrs;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\twriter.start(node.name, attrs, isEmpty);\n\n\t\t\t\t\tif (!isEmpty) {\n\t\t\t\t\t\tif ((node = node.firstChild)) {\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\twalk(node);\n\t\t\t\t\t\t\t} while ((node = node.next));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twriter.end(name);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thandler(node);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Serialize element and treat all non elements as fragments\n\t\t\tif (node.type == 1 && !settings.inner) {\n\t\t\t\twalk(node);\n\t\t\t} else {\n\t\t\t\thandlers[11](node);\n\t\t\t}\n\n\t\t\treturn writer.getContent();\n\t\t};\n\t};\n});\n\n// Included from: js/tinymce/classes/dom/Serializer.js\n\n/**\n * Serializer.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class is used to serialize DOM trees into a string. Consult the TinyMCE Wiki API for\n * more details and examples on how to use this class.\n *\n * @class tinymce.dom.Serializer\n */\ndefine(\"tinymce/dom/Serializer\", [\n\t\"tinymce/dom/DOMUtils\",\n\t\"tinymce/html/DomParser\",\n\t\"tinymce/html/SaxParser\",\n\t\"tinymce/html/Entities\",\n\t\"tinymce/html/Serializer\",\n\t\"tinymce/html/Node\",\n\t\"tinymce/html/Schema\",\n\t\"tinymce/Env\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/text/Zwsp\"\n], function(DOMUtils, DomParser, SaxParser, Entities, Serializer, Node, Schema, Env, Tools, Zwsp) {\n\tvar each = Tools.each, trim = Tools.trim;\n\tvar DOM = DOMUtils.DOM;\n\n\t/**\n\t * IE 11 has a fantastic bug where it will produce two trailing BR elements to iframe bodies when\n\t * the iframe is hidden by display: none on a parent container. The DOM is actually out of sync\n\t * with innerHTML in this case. It's like IE adds shadow DOM BR elements that appears on innerHTML\n\t * but not as the lastChild of the body. So this fix simply removes the last two\n\t * BR elements at the end of the document.\n\t *\n\t * Example of what happens: text becomes text

      \n\t */\n\tfunction trimTrailingBr(rootNode) {\n\t\tvar brNode1, brNode2;\n\n\t\tfunction isBr(node) {\n\t\t\treturn node && node.name === 'br';\n\t\t}\n\n\t\tbrNode1 = rootNode.lastChild;\n\t\tif (isBr(brNode1)) {\n\t\t\tbrNode2 = brNode1.prev;\n\n\t\t\tif (isBr(brNode2)) {\n\t\t\t\tbrNode1.remove();\n\t\t\t\tbrNode2.remove();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Constructs a new DOM serializer class.\n\t *\n\t * @constructor\n\t * @method Serializer\n\t * @param {Object} settings Serializer settings object.\n\t * @param {tinymce.Editor} editor Optional editor to bind events to and get schema/dom from.\n\t */\n\treturn function(settings, editor) {\n\t\tvar dom, schema, htmlParser, tempAttrs = [\"data-mce-selected\"];\n\n\t\tif (editor) {\n\t\t\tdom = editor.dom;\n\t\t\tschema = editor.schema;\n\t\t}\n\n\t\tfunction trimHtml(html) {\n\t\t\tvar trimContentRegExp = new RegExp([\n\t\t\t\t']+data-mce-bogus[^>]+>[\\u200B\\uFEFF]+<\\\\/span>', // Trim bogus spans like caret containers\n\t\t\t\t'\\\\s?(' + tempAttrs.join('|') + ')=\"[^\"]+\"' // Trim temporaty data-mce prefixed attributes like data-mce-selected\n\t\t\t].join('|'), 'gi');\n\n\t\t\thtml = Zwsp.trim(html.replace(trimContentRegExp, ''));\n\n\t\t\treturn html;\n\t\t}\n\n\t\tfunction trimContent(html) {\n\t\t\tvar content = html;\n\t\t\tvar bogusAllRegExp = /<(\\w+) [^>]*data-mce-bogus=\"all\"[^>]*>/g;\n\t\t\tvar endTagIndex, index, matchLength, matches, shortEndedElements, schema = editor.schema;\n\n\t\t\tcontent = trimHtml(content);\n\t\t\tshortEndedElements = schema.getShortEndedElements();\n\n\t\t\t// Remove all bogus elements marked with \"all\"\n\t\t\twhile ((matches = bogusAllRegExp.exec(content))) {\n\t\t\t\tindex = bogusAllRegExp.lastIndex;\n\t\t\t\tmatchLength = matches[0].length;\n\n\t\t\t\tif (shortEndedElements[matches[1]]) {\n\t\t\t\t\tendTagIndex = index;\n\t\t\t\t} else {\n\t\t\t\t\tendTagIndex = SaxParser.findEndTag(schema, content, index);\n\t\t\t\t}\n\n\t\t\t\tcontent = content.substring(0, index - matchLength) + content.substring(endTagIndex);\n\t\t\t\tbogusAllRegExp.lastIndex = index - matchLength;\n\t\t\t}\n\n\t\t\treturn content;\n\t\t}\n\n\t\t/**\n\t\t * Returns a trimmed version of the editor contents to be used for the undo level. This\n\t\t * will remove any data-mce-bogus=\"all\" marked elements since these are used for UI it will also\n\t\t * remove the data-mce-selected attributes used for selection of objects and caret containers.\n\t\t * It will keep all data-mce-bogus=\"1\" elements since these can be used to place the caret etc and will\n\t\t * be removed by the serialization logic when you save.\n\t\t *\n\t\t * @private\n\t\t * @return {String} HTML contents of the editor excluding some internal bogus elements.\n\t\t */\n\t\tfunction getTrimmedContent() {\n\t\t\treturn trimContent(editor.getBody().innerHTML);\n\t\t}\n\n\t\tfunction addTempAttr(name) {\n\t\t\tif (Tools.inArray(tempAttrs, name) === -1) {\n\t\t\t\thtmlParser.addAttributeFilter(name, function(nodes, name) {\n\t\t\t\t\tvar i = nodes.length;\n\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tnodes[i].attr(name, null);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\ttempAttrs.push(name);\n\t\t\t}\n\t\t}\n\n\t\t// Default DOM and Schema if they are undefined\n\t\tdom = dom || DOM;\n\t\tschema = schema || new Schema(settings);\n\t\tsettings.entity_encoding = settings.entity_encoding || 'named';\n\t\tsettings.remove_trailing_brs = \"remove_trailing_brs\" in settings ? settings.remove_trailing_brs : true;\n\n\t\thtmlParser = new DomParser(settings, schema);\n\n\t\t// Convert tabindex back to elements when serializing contents\n\t\thtmlParser.addAttributeFilter('data-mce-tabindex', function(nodes, name) {\n\t\t\tvar i = nodes.length, node;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\t\t\t\tnode.attr('tabindex', node.attributes.map['data-mce-tabindex']);\n\t\t\t\tnode.attr(name, null);\n\t\t\t}\n\t\t});\n\n\t\t// Convert move data-mce-src, data-mce-href and data-mce-style into nodes or process them if needed\n\t\thtmlParser.addAttributeFilter('src,href,style', function(nodes, name) {\n\t\t\tvar i = nodes.length, node, value, internalName = 'data-mce-' + name;\n\t\t\tvar urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope, undef;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\n\t\t\t\tvalue = node.attributes.map[internalName];\n\t\t\t\tif (value !== undef) {\n\t\t\t\t\t// Set external name to internal value and remove internal\n\t\t\t\t\tnode.attr(name, value.length > 0 ? value : null);\n\t\t\t\t\tnode.attr(internalName, null);\n\t\t\t\t} else {\n\t\t\t\t\t// No internal attribute found then convert the value we have in the DOM\n\t\t\t\t\tvalue = node.attributes.map[name];\n\n\t\t\t\t\tif (name === \"style\") {\n\t\t\t\t\t\tvalue = dom.serializeStyle(dom.parseStyle(value), node.name);\n\t\t\t\t\t} else if (urlConverter) {\n\t\t\t\t\t\tvalue = urlConverter.call(urlConverterScope, value, name, node.name);\n\t\t\t\t\t}\n\n\t\t\t\t\tnode.attr(name, value.length > 0 ? value : null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Remove internal classes mceItem<..> or mceSelected\n\t\thtmlParser.addAttributeFilter('class', function(nodes) {\n\t\t\tvar i = nodes.length, node, value;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\t\t\t\tvalue = node.attr('class');\n\n\t\t\t\tif (value) {\n\t\t\t\t\tvalue = node.attr('class').replace(/(?:^|\\s)mce-item-\\w+(?!\\S)/g, '');\n\t\t\t\t\tnode.attr('class', value.length > 0 ? value : null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Remove bookmark elements\n\t\thtmlParser.addAttributeFilter('data-mce-type', function(nodes, name, args) {\n\t\t\tvar i = nodes.length, node;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\n\t\t\t\tif (node.attributes.map['data-mce-type'] === 'bookmark' && !args.cleanup) {\n\t\t\t\t\tnode.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\thtmlParser.addNodeFilter('noscript', function(nodes) {\n\t\t\tvar i = nodes.length, node;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i].firstChild;\n\n\t\t\t\tif (node) {\n\t\t\t\t\tnode.value = Entities.decode(node.value);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Force script into CDATA sections and remove the mce- prefix also add comments around styles\n\t\thtmlParser.addNodeFilter('script,style', function(nodes, name) {\n\t\t\tvar i = nodes.length, node, value, type;\n\n\t\t\tfunction trim(value) {\n\t\t\t\t/*jshint maxlen:255 */\n\t\t\t\t/*eslint max-len:0 */\n\t\t\t\treturn value.replace(/()/g, '\\n')\n\t\t\t\t\t\t.replace(/^[\\r\\n]*|[\\r\\n]*$/g, '')\n\t\t\t\t\t\t.replace(/^\\s*(()?|\\s*\\/\\/\\s*\\]\\]>(-->)?|\\/\\/\\s*(-->)?|\\]\\]>|\\/\\*\\s*-->\\s*\\*\\/|\\s*-->\\s*)\\s*$/g, '');\n\t\t\t}\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\t\t\t\tvalue = node.firstChild ? node.firstChild.value : '';\n\n\t\t\t\tif (name === \"script\") {\n\t\t\t\t\t// Remove mce- prefix from script elements and remove default type since the user specified\n\t\t\t\t\t// a script element without type attribute\n\t\t\t\t\ttype = node.attr('type');\n\t\t\t\t\tif (type) {\n\t\t\t\t\t\tnode.attr('type', type == 'mce-no/type' ? null : type.replace(/^mce\\-/, ''));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (value.length > 0) {\n\t\t\t\t\t\tnode.firstChild.value = '// ';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (value.length > 0) {\n\t\t\t\t\t\tnode.firstChild.value = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Convert comments to cdata and handle protected comments\n\t\thtmlParser.addNodeFilter('#comment', function(nodes) {\n\t\t\tvar i = nodes.length, node;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\n\t\t\t\tif (node.value.indexOf('[CDATA[') === 0) {\n\t\t\t\t\tnode.name = '#cdata';\n\t\t\t\t\tnode.type = 4;\n\t\t\t\t\tnode.value = node.value.replace(/^\\[CDATA\\[|\\]\\]$/g, '');\n\t\t\t\t} else if (node.value.indexOf('mce:protected ') === 0) {\n\t\t\t\t\tnode.name = \"#text\";\n\t\t\t\t\tnode.type = 3;\n\t\t\t\t\tnode.raw = true;\n\t\t\t\t\tnode.value = unescape(node.value).substr(14);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\thtmlParser.addNodeFilter('xml:namespace,input', function(nodes, name) {\n\t\t\tvar i = nodes.length, node;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\t\t\t\tif (node.type === 7) {\n\t\t\t\t\tnode.remove();\n\t\t\t\t} else if (node.type === 1) {\n\t\t\t\t\tif (name === \"input\" && !(\"type\" in node.attributes.map)) {\n\t\t\t\t\t\tnode.attr('type', 'text');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Remove internal data attributes\n\t\thtmlParser.addAttributeFilter(\n\t\t\t'data-mce-src,data-mce-href,data-mce-style,' +\n\t\t\t'data-mce-selected,data-mce-expando,' +\n\t\t\t'data-mce-type,data-mce-resize',\n\n\t\t\tfunction(nodes, name) {\n\t\t\t\tvar i = nodes.length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tnodes[i].attr(name, null);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\t// Return public methods\n\t\treturn {\n\t\t\t/**\n\t\t\t * Schema instance that was used to when the Serializer was constructed.\n\t\t\t *\n\t\t\t * @field {tinymce.html.Schema} schema\n\t\t\t */\n\t\t\tschema: schema,\n\n\t\t\t/**\n\t\t\t * Adds a node filter function to the parser used by the serializer, the parser will collect the specified nodes by name\n\t\t\t * and then execute the callback ones it has finished parsing the document.\n\t\t\t *\n\t\t\t * @example\n\t\t\t * parser.addNodeFilter('p,h1', function(nodes, name) {\n\t\t\t *\t\tfor (var i = 0; i < nodes.length; i++) {\n\t\t\t *\t\t\tconsole.log(nodes[i].name);\n\t\t\t *\t\t}\n\t\t\t * });\n\t\t\t * @method addNodeFilter\n\t\t\t * @method {String} name Comma separated list of nodes to collect.\n\t\t\t * @param {function} callback Callback function to execute once it has collected nodes.\n\t\t\t */\n\t\t\taddNodeFilter: htmlParser.addNodeFilter,\n\n\t\t\t/**\n\t\t\t * Adds a attribute filter function to the parser used by the serializer, the parser will\n\t\t\t * collect nodes that has the specified attributes\n\t\t\t * and then execute the callback ones it has finished parsing the document.\n\t\t\t *\n\t\t\t * @example\n\t\t\t * parser.addAttributeFilter('src,href', function(nodes, name) {\n\t\t\t *\t\tfor (var i = 0; i < nodes.length; i++) {\n\t\t\t *\t\t\tconsole.log(nodes[i].name);\n\t\t\t *\t\t}\n\t\t\t * });\n\t\t\t * @method addAttributeFilter\n\t\t\t * @method {String} name Comma separated list of nodes to collect.\n\t\t\t * @param {function} callback Callback function to execute once it has collected nodes.\n\t\t\t */\n\t\t\taddAttributeFilter: htmlParser.addAttributeFilter,\n\n\t\t\t/**\n\t\t\t * Serializes the specified browser DOM node into a HTML string.\n\t\t\t *\n\t\t\t * @method serialize\n\t\t\t * @param {DOMNode} node DOM node to serialize.\n\t\t\t * @param {Object} args Arguments option that gets passed to event handlers.\n\t\t\t */\n\t\t\tserialize: function(node, args) {\n\t\t\t\tvar self = this, impl, doc, oldDoc, htmlSerializer, content, rootNode;\n\n\t\t\t\t// Explorer won't clone contents of script and style and the\n\t\t\t\t// selected index of select elements are cleared on a clone operation.\n\t\t\t\tif (Env.ie && dom.select('script,style,select,map').length > 0) {\n\t\t\t\t\tcontent = node.innerHTML;\n\t\t\t\t\tnode = node.cloneNode(false);\n\t\t\t\t\tdom.setHTML(node, content);\n\t\t\t\t} else {\n\t\t\t\t\tnode = node.cloneNode(true);\n\t\t\t\t}\n\n\t\t\t\t// Nodes needs to be attached to something in WebKit/Opera\n\t\t\t\t// This fix will make DOM ranges and make Sizzle happy!\n\t\t\t\timpl = document.implementation;\n\t\t\t\tif (impl.createHTMLDocument) {\n\t\t\t\t\t// Create an empty HTML document\n\t\t\t\t\tdoc = impl.createHTMLDocument(\"\");\n\n\t\t\t\t\t// Add the element or it's children if it's a body element to the new document\n\t\t\t\t\teach(node.nodeName == 'BODY' ? node.childNodes : [node], function(node) {\n\t\t\t\t\t\tdoc.body.appendChild(doc.importNode(node, true));\n\t\t\t\t\t});\n\n\t\t\t\t\t// Grab first child or body element for serialization\n\t\t\t\t\tif (node.nodeName != 'BODY') {\n\t\t\t\t\t\tnode = doc.body.firstChild;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode = doc.body;\n\t\t\t\t\t}\n\n\t\t\t\t\t// set the new document in DOMUtils so createElement etc works\n\t\t\t\t\toldDoc = dom.doc;\n\t\t\t\t\tdom.doc = doc;\n\t\t\t\t}\n\n\t\t\t\targs = args || {};\n\t\t\t\targs.format = args.format || 'html';\n\n\t\t\t\t// Don't wrap content if we want selected html\n\t\t\t\tif (args.selection) {\n\t\t\t\t\targs.forced_root_block = '';\n\t\t\t\t}\n\n\t\t\t\t// Pre process\n\t\t\t\tif (!args.no_events) {\n\t\t\t\t\targs.node = node;\n\t\t\t\t\tself.onPreProcess(args);\n\t\t\t\t}\n\n\t\t\t\t// Parse HTML\n\t\t\t\trootNode = htmlParser.parse(trim(args.getInner ? node.innerHTML : dom.getOuterHTML(node)), args);\n\t\t\t\ttrimTrailingBr(rootNode);\n\n\t\t\t\t// Serialize HTML\n\t\t\t\thtmlSerializer = new Serializer(settings, schema);\n\t\t\t\targs.content = htmlSerializer.serialize(rootNode);\n\n\t\t\t\t// Replace all BOM characters for now until we can find a better solution\n\t\t\t\tif (!args.cleanup) {\n\t\t\t\t\targs.content = Zwsp.trim(args.content);\n\t\t\t\t\targs.content = args.content.replace(/\\uFEFF/g, '');\n\t\t\t\t}\n\n\t\t\t\t// Post process\n\t\t\t\tif (!args.no_events) {\n\t\t\t\t\tself.onPostProcess(args);\n\t\t\t\t}\n\n\t\t\t\t// Restore the old document if it was changed\n\t\t\t\tif (oldDoc) {\n\t\t\t\t\tdom.doc = oldDoc;\n\t\t\t\t}\n\n\t\t\t\targs.node = null;\n\n\t\t\t\treturn args.content;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Adds valid elements rules to the serializers schema instance this enables you to specify things\n\t\t\t * like what elements should be outputted and what attributes specific elements might have.\n\t\t\t * Consult the Wiki for more details on this format.\n\t\t\t *\n\t\t\t * @method addRules\n\t\t\t * @param {String} rules Valid elements rules string to add to schema.\n\t\t\t */\n\t\t\taddRules: function(rules) {\n\t\t\t\tschema.addValidElements(rules);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Sets the valid elements rules to the serializers schema instance this enables you to specify things\n\t\t\t * like what elements should be outputted and what attributes specific elements might have.\n\t\t\t * Consult the Wiki for more details on this format.\n\t\t\t *\n\t\t\t * @method setRules\n\t\t\t * @param {String} rules Valid elements rules string.\n\t\t\t */\n\t\t\tsetRules: function(rules) {\n\t\t\t\tschema.setValidElements(rules);\n\t\t\t},\n\n\t\t\tonPreProcess: function(args) {\n\t\t\t\tif (editor) {\n\t\t\t\t\teditor.fire('PreProcess', args);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tonPostProcess: function(args) {\n\t\t\t\tif (editor) {\n\t\t\t\t\teditor.fire('PostProcess', args);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Adds a temporary internal attribute these attributes will get removed on undo and\n\t\t\t * when getting contents out of the editor.\n\t\t\t *\n\t\t\t * @method addTempAttr\n\t\t\t * @param {String} name string\n\t\t\t */\n\t\t\taddTempAttr: addTempAttr,\n\n\t\t\t// Internal\n\t\t\ttrimHtml: trimHtml,\n\t\t\tgetTrimmedContent: getTrimmedContent,\n\t\t\ttrimContent: trimContent\n\t\t};\n\t};\n});\n\n// Included from: js/tinymce/classes/dom/TridentSelection.js\n\n/**\n * TridentSelection.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Selection class for old explorer versions. This one fakes the\n * native selection object available on modern browsers.\n *\n * @private\n * @class tinymce.dom.TridentSelection\n */\ndefine(\"tinymce/dom/TridentSelection\", [], function() {\n\tfunction Selection(selection) {\n\t\tvar self = this, dom = selection.dom, FALSE = false;\n\n\t\tfunction getPosition(rng, start) {\n\t\t\tvar checkRng, startIndex = 0, endIndex, inside,\n\t\t\t\tchildren, child, offset, index, position = -1, parent;\n\n\t\t\t// Setup test range, collapse it and get the parent\n\t\t\tcheckRng = rng.duplicate();\n\t\t\tcheckRng.collapse(start);\n\t\t\tparent = checkRng.parentElement();\n\n\t\t\t// Check if the selection is within the right document\n\t\t\tif (parent.ownerDocument !== selection.dom.doc) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// IE will report non editable elements as it's parent so look for an editable one\n\t\t\twhile (parent.contentEditable === \"false\") {\n\t\t\t\tparent = parent.parentNode;\n\t\t\t}\n\n\t\t\t// If parent doesn't have any children then return that we are inside the element\n\t\t\tif (!parent.hasChildNodes()) {\n\t\t\t\treturn {node: parent, inside: 1};\n\t\t\t}\n\n\t\t\t// Setup node list and endIndex\n\t\t\tchildren = parent.children;\n\t\t\tendIndex = children.length - 1;\n\n\t\t\t// Perform a binary search for the position\n\t\t\twhile (startIndex <= endIndex) {\n\t\t\t\tindex = Math.floor((startIndex + endIndex) / 2);\n\n\t\t\t\t// Move selection to node and compare the ranges\n\t\t\t\tchild = children[index];\n\t\t\t\tcheckRng.moveToElementText(child);\n\t\t\t\tposition = checkRng.compareEndPoints(start ? 'StartToStart' : 'EndToEnd', rng);\n\n\t\t\t\t// Before/after or an exact match\n\t\t\t\tif (position > 0) {\n\t\t\t\t\tendIndex = index - 1;\n\t\t\t\t} else if (position < 0) {\n\t\t\t\t\tstartIndex = index + 1;\n\t\t\t\t} else {\n\t\t\t\t\treturn {node: child};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if child position is before or we didn't find a position\n\t\t\tif (position < 0) {\n\t\t\t\t// No element child was found use the parent element and the offset inside that\n\t\t\t\tif (!child) {\n\t\t\t\t\tcheckRng.moveToElementText(parent);\n\t\t\t\t\tcheckRng.collapse(true);\n\t\t\t\t\tchild = parent;\n\t\t\t\t\tinside = true;\n\t\t\t\t} else {\n\t\t\t\t\tcheckRng.collapse(false);\n\t\t\t\t}\n\n\t\t\t\t// Walk character by character in text node until we hit the selected range endpoint,\n\t\t\t\t// hit the end of document or parent isn't the right one\n\t\t\t\t// We need to walk char by char since rng.text or rng.htmlText will trim line endings\n\t\t\t\toffset = 0;\n\t\t\t\twhile (checkRng.compareEndPoints(start ? 'StartToStart' : 'StartToEnd', rng) !== 0) {\n\t\t\t\t\tif (checkRng.move('character', 1) === 0 || parent != checkRng.parentElement()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\toffset++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Child position is after the selection endpoint\n\t\t\t\tcheckRng.collapse(true);\n\n\t\t\t\t// Walk character by character in text node until we hit the selected range endpoint, hit\n\t\t\t\t// the end of document or parent isn't the right one\n\t\t\t\toffset = 0;\n\t\t\t\twhile (checkRng.compareEndPoints(start ? 'StartToStart' : 'StartToEnd', rng) !== 0) {\n\t\t\t\t\tif (checkRng.move('character', -1) === 0 || parent != checkRng.parentElement()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\toffset++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {node: child, position: position, offset: offset, inside: inside};\n\t\t}\n\n\t\t// Returns a W3C DOM compatible range object by using the IE Range API\n\t\tfunction getRange() {\n\t\t\tvar ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed, tmpRange, element2, bookmark;\n\n\t\t\t// If selection is outside the current document just return an empty range\n\t\t\telement = ieRange.item ? ieRange.item(0) : ieRange.parentElement();\n\t\t\tif (element.ownerDocument != dom.doc) {\n\t\t\t\treturn domRange;\n\t\t\t}\n\n\t\t\tcollapsed = selection.isCollapsed();\n\n\t\t\t// Handle control selection\n\t\t\tif (ieRange.item) {\n\t\t\t\tdomRange.setStart(element.parentNode, dom.nodeIndex(element));\n\t\t\t\tdomRange.setEnd(domRange.startContainer, domRange.startOffset + 1);\n\n\t\t\t\treturn domRange;\n\t\t\t}\n\n\t\t\tfunction findEndPoint(start) {\n\t\t\t\tvar endPoint = getPosition(ieRange, start), container, offset, textNodeOffset = 0, sibling, undef, nodeValue;\n\n\t\t\t\tcontainer = endPoint.node;\n\t\t\t\toffset = endPoint.offset;\n\n\t\t\t\tif (endPoint.inside && !container.hasChildNodes()) {\n\t\t\t\t\tdomRange[start ? 'setStart' : 'setEnd'](container, 0);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (offset === undef) {\n\t\t\t\t\tdomRange[start ? 'setStartBefore' : 'setEndAfter'](container);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (endPoint.position < 0) {\n\t\t\t\t\tsibling = endPoint.inside ? container.firstChild : container.nextSibling;\n\n\t\t\t\t\tif (!sibling) {\n\t\t\t\t\t\tdomRange[start ? 'setStartAfter' : 'setEndAfter'](container);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!offset) {\n\t\t\t\t\t\tif (sibling.nodeType == 3) {\n\t\t\t\t\t\t\tdomRange[start ? 'setStart' : 'setEnd'](sibling, 0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdomRange[start ? 'setStartBefore' : 'setEndBefore'](sibling);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Find the text node and offset\n\t\t\t\t\twhile (sibling) {\n\t\t\t\t\t\tif (sibling.nodeType == 3) {\n\t\t\t\t\t\t\tnodeValue = sibling.nodeValue;\n\t\t\t\t\t\t\ttextNodeOffset += nodeValue.length;\n\n\t\t\t\t\t\t\t// We are at or passed the position we where looking for\n\t\t\t\t\t\t\tif (textNodeOffset >= offset) {\n\t\t\t\t\t\t\t\tcontainer = sibling;\n\t\t\t\t\t\t\t\ttextNodeOffset -= offset;\n\t\t\t\t\t\t\t\ttextNodeOffset = nodeValue.length - textNodeOffset;\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\n\t\t\t\t\t\tsibling = sibling.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Find the text node and offset\n\t\t\t\t\tsibling = container.previousSibling;\n\n\t\t\t\t\tif (!sibling) {\n\t\t\t\t\t\treturn domRange[start ? 'setStartBefore' : 'setEndBefore'](container);\n\t\t\t\t\t}\n\n\t\t\t\t\t// If there isn't any text to loop then use the first position\n\t\t\t\t\tif (!offset) {\n\t\t\t\t\t\tif (container.nodeType == 3) {\n\t\t\t\t\t\t\tdomRange[start ? 'setStart' : 'setEnd'](sibling, container.nodeValue.length);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdomRange[start ? 'setStartAfter' : 'setEndAfter'](sibling);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (sibling) {\n\t\t\t\t\t\tif (sibling.nodeType == 3) {\n\t\t\t\t\t\t\ttextNodeOffset += sibling.nodeValue.length;\n\n\t\t\t\t\t\t\t// We are at or passed the position we where looking for\n\t\t\t\t\t\t\tif (textNodeOffset >= offset) {\n\t\t\t\t\t\t\t\tcontainer = sibling;\n\t\t\t\t\t\t\t\ttextNodeOffset -= offset;\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\n\t\t\t\t\t\tsibling = sibling.previousSibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdomRange[start ? 'setStart' : 'setEnd'](container, textNodeOffset);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// Find start point\n\t\t\t\tfindEndPoint(true);\n\n\t\t\t\t// Find end point if needed\n\t\t\t\tif (!collapsed) {\n\t\t\t\t\tfindEndPoint();\n\t\t\t\t}\n\t\t\t} catch (ex) {\n\t\t\t\t// IE has a nasty bug where text nodes might throw \"invalid argument\" when you\n\t\t\t\t// access the nodeValue or other properties of text nodes. This seems to happen when\n\t\t\t\t// text nodes are split into two nodes by a delete/backspace call.\n\t\t\t\t// So let us detect and try to fix it.\n\t\t\t\tif (ex.number == -2147024809) {\n\t\t\t\t\t// Get the current selection\n\t\t\t\t\tbookmark = self.getBookmark(2);\n\n\t\t\t\t\t// Get start element\n\t\t\t\t\ttmpRange = ieRange.duplicate();\n\t\t\t\t\ttmpRange.collapse(true);\n\t\t\t\t\telement = tmpRange.parentElement();\n\n\t\t\t\t\t// Get end element\n\t\t\t\t\tif (!collapsed) {\n\t\t\t\t\t\ttmpRange = ieRange.duplicate();\n\t\t\t\t\t\ttmpRange.collapse(false);\n\t\t\t\t\t\telement2 = tmpRange.parentElement();\n\t\t\t\t\t\telement2.innerHTML = element2.innerHTML;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove the broken elements\n\t\t\t\t\telement.innerHTML = element.innerHTML;\n\n\t\t\t\t\t// Restore the selection\n\t\t\t\t\tself.moveToBookmark(bookmark);\n\n\t\t\t\t\t// Since the range has moved we need to re-get it\n\t\t\t\t\tieRange = selection.getRng();\n\n\t\t\t\t\t// Find start point\n\t\t\t\t\tfindEndPoint(true);\n\n\t\t\t\t\t// Find end point if needed\n\t\t\t\t\tif (!collapsed) {\n\t\t\t\t\t\tfindEndPoint();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow ex; // Throw other errors\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn domRange;\n\t\t}\n\n\t\tthis.getBookmark = function(type) {\n\t\t\tvar rng = selection.getRng(), bookmark = {};\n\n\t\t\tfunction getIndexes(node) {\n\t\t\t\tvar parent, root, children, i, indexes = [];\n\n\t\t\t\tparent = node.parentNode;\n\t\t\t\troot = dom.getRoot().parentNode;\n\n\t\t\t\twhile (parent != root && parent.nodeType !== 9) {\n\t\t\t\t\tchildren = parent.children;\n\n\t\t\t\t\ti = children.length;\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tif (node === children[i]) {\n\t\t\t\t\t\t\tindexes.push(i);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = parent;\n\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t}\n\n\t\t\t\treturn indexes;\n\t\t\t}\n\n\t\t\tfunction getBookmarkEndPoint(start) {\n\t\t\t\tvar position;\n\n\t\t\t\tposition = getPosition(rng, start);\n\t\t\t\tif (position) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tposition: position.position,\n\t\t\t\t\t\toffset: position.offset,\n\t\t\t\t\t\tindexes: getIndexes(position.node),\n\t\t\t\t\t\tinside: position.inside\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Non ubstructive bookmark\n\t\t\tif (type === 2) {\n\t\t\t\t// Handle text selection\n\t\t\t\tif (!rng.item) {\n\t\t\t\t\tbookmark.start = getBookmarkEndPoint(true);\n\n\t\t\t\t\tif (!selection.isCollapsed()) {\n\t\t\t\t\t\tbookmark.end = getBookmarkEndPoint();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tbookmark.start = {ctrl: true, indexes: getIndexes(rng.item(0))};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn bookmark;\n\t\t};\n\n\t\tthis.moveToBookmark = function(bookmark) {\n\t\t\tvar rng, body = dom.doc.body;\n\n\t\t\tfunction resolveIndexes(indexes) {\n\t\t\t\tvar node, i, idx, children;\n\n\t\t\t\tnode = dom.getRoot();\n\t\t\t\tfor (i = indexes.length - 1; i >= 0; i--) {\n\t\t\t\t\tchildren = node.children;\n\t\t\t\t\tidx = indexes[i];\n\n\t\t\t\t\tif (idx <= children.length - 1) {\n\t\t\t\t\t\tnode = children[idx];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn node;\n\t\t\t}\n\n\t\t\tfunction setBookmarkEndPoint(start) {\n\t\t\t\tvar endPoint = bookmark[start ? 'start' : 'end'], moveLeft, moveRng, undef, offset;\n\n\t\t\t\tif (endPoint) {\n\t\t\t\t\tmoveLeft = endPoint.position > 0;\n\n\t\t\t\t\tmoveRng = body.createTextRange();\n\t\t\t\t\tmoveRng.moveToElementText(resolveIndexes(endPoint.indexes));\n\n\t\t\t\t\toffset = endPoint.offset;\n\t\t\t\t\tif (offset !== undef) {\n\t\t\t\t\t\tmoveRng.collapse(endPoint.inside || moveLeft);\n\t\t\t\t\t\tmoveRng.moveStart('character', moveLeft ? -offset : offset);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmoveRng.collapse(start);\n\t\t\t\t\t}\n\n\t\t\t\t\trng.setEndPoint(start ? 'StartToStart' : 'EndToStart', moveRng);\n\n\t\t\t\t\tif (start) {\n\t\t\t\t\t\trng.collapse(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (bookmark.start) {\n\t\t\t\tif (bookmark.start.ctrl) {\n\t\t\t\t\trng = body.createControlRange();\n\t\t\t\t\trng.addElement(resolveIndexes(bookmark.start.indexes));\n\t\t\t\t\trng.select();\n\t\t\t\t} else {\n\t\t\t\t\trng = body.createTextRange();\n\t\t\t\t\tsetBookmarkEndPoint(true);\n\t\t\t\t\tsetBookmarkEndPoint();\n\t\t\t\t\trng.select();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.addRange = function(rng) {\n\t\t\tvar ieRng, ctrlRng, startContainer, startOffset, endContainer, endOffset, sibling,\n\t\t\t\tdoc = selection.dom.doc, body = doc.body, nativeRng, ctrlElm;\n\n\t\t\tfunction setEndPoint(start) {\n\t\t\t\tvar container, offset, marker, tmpRng, nodes;\n\n\t\t\t\tmarker = dom.create('a');\n\t\t\t\tcontainer = start ? startContainer : endContainer;\n\t\t\t\toffset = start ? startOffset : endOffset;\n\t\t\t\ttmpRng = ieRng.duplicate();\n\n\t\t\t\tif (container == doc || container == doc.documentElement) {\n\t\t\t\t\tcontainer = body;\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\n\t\t\t\tif (container.nodeType == 3) {\n\t\t\t\t\tcontainer.parentNode.insertBefore(marker, container);\n\t\t\t\t\ttmpRng.moveToElementText(marker);\n\t\t\t\t\ttmpRng.moveStart('character', offset);\n\t\t\t\t\tdom.remove(marker);\n\t\t\t\t\tieRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', tmpRng);\n\t\t\t\t} else {\n\t\t\t\t\tnodes = container.childNodes;\n\n\t\t\t\t\tif (nodes.length) {\n\t\t\t\t\t\tif (offset >= nodes.length) {\n\t\t\t\t\t\t\tdom.insertAfter(marker, nodes[nodes.length - 1]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontainer.insertBefore(marker, nodes[offset]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttmpRng.moveToElementText(marker);\n\t\t\t\t\t} else if (container.canHaveHTML) {\n\t\t\t\t\t\t// Empty node selection for example
      |
      \n\t\t\t\t\t\t// Setting innerHTML with a span marker then remove that marker seems to keep empty block elements open\n\t\t\t\t\t\tcontainer.innerHTML = '';\n\t\t\t\t\t\tmarker = container.firstChild;\n\t\t\t\t\t\ttmpRng.moveToElementText(marker);\n\t\t\t\t\t\ttmpRng.collapse(FALSE); // Collapse false works better than true for some odd reason\n\t\t\t\t\t}\n\n\t\t\t\t\tieRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', tmpRng);\n\t\t\t\t\tdom.remove(marker);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Setup some shorter versions\n\t\t\tstartContainer = rng.startContainer;\n\t\t\tstartOffset = rng.startOffset;\n\t\t\tendContainer = rng.endContainer;\n\t\t\tendOffset = rng.endOffset;\n\t\t\tieRng = body.createTextRange();\n\n\t\t\t// If single element selection then try making a control selection out of it\n\t\t\tif (startContainer == endContainer && startContainer.nodeType == 1) {\n\t\t\t\t// Trick to place the caret inside an empty block element like

      \n\t\t\t\tif (startOffset == endOffset && !startContainer.hasChildNodes()) {\n\t\t\t\t\tif (startContainer.canHaveHTML) {\n\t\t\t\t\t\t// Check if previous sibling is an empty block if it is then we need to render it\n\t\t\t\t\t\t// IE would otherwise move the caret into the sibling instead of the empty startContainer see: #5236\n\t\t\t\t\t\t// Example this:

      |

      would become this:

      |

      \n\t\t\t\t\t\tsibling = startContainer.previousSibling;\n\t\t\t\t\t\tif (sibling && !sibling.hasChildNodes() && dom.isBlock(sibling)) {\n\t\t\t\t\t\t\tsibling.innerHTML = '';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsibling = null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstartContainer.innerHTML = '';\n\t\t\t\t\t\tieRng.moveToElementText(startContainer.lastChild);\n\t\t\t\t\t\tieRng.select();\n\t\t\t\t\t\tdom.doc.selection.clear();\n\t\t\t\t\t\tstartContainer.innerHTML = '';\n\n\t\t\t\t\t\tif (sibling) {\n\t\t\t\t\t\t\tsibling.innerHTML = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstartOffset = dom.nodeIndex(startContainer);\n\t\t\t\t\tstartContainer = startContainer.parentNode;\n\t\t\t\t}\n\n\t\t\t\tif (startOffset == endOffset - 1) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tctrlElm = startContainer.childNodes[startOffset];\n\t\t\t\t\t\tctrlRng = body.createControlRange();\n\t\t\t\t\t\tctrlRng.addElement(ctrlElm);\n\t\t\t\t\t\tctrlRng.select();\n\n\t\t\t\t\t\t// Check if the range produced is on the correct element and is a control range\n\t\t\t\t\t\t// On IE 8 it will select the parent contentEditable container if you select an inner element see: #5398\n\t\t\t\t\t\tnativeRng = selection.getRng();\n\t\t\t\t\t\tif (nativeRng.item && ctrlElm === nativeRng.item(0)) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t// Ignore\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set start/end point of selection\n\t\t\tsetEndPoint(true);\n\t\t\tsetEndPoint();\n\n\t\t\t// Select the new range and scroll it into view\n\t\t\tieRng.select();\n\t\t};\n\n\t\t// Expose range method\n\t\tthis.getRangeAt = getRange;\n\t}\n\n\treturn Selection;\n});\n\n// Included from: js/tinymce/classes/util/VK.js\n\n/**\n * VK.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This file exposes a set of the common KeyCodes for use. Please grow it as needed.\n */\ndefine(\"tinymce/util/VK\", [\n\t\"tinymce/Env\"\n], function(Env) {\n\treturn {\n\t\tBACKSPACE: 8,\n\t\tDELETE: 46,\n\t\tDOWN: 40,\n\t\tENTER: 13,\n\t\tLEFT: 37,\n\t\tRIGHT: 39,\n\t\tSPACEBAR: 32,\n\t\tTAB: 9,\n\t\tUP: 38,\n\n\t\tmodifierPressed: function(e) {\n\t\t\treturn e.shiftKey || e.ctrlKey || e.altKey || this.metaKeyPressed(e);\n\t\t},\n\n\t\tmetaKeyPressed: function(e) {\n\t\t\t// Check if ctrl or meta key is pressed. Edge case for AltGr on Windows where it produces ctrlKey+altKey states\n\t\t\treturn (Env.mac ? e.metaKey : e.ctrlKey && !e.altKey);\n\t\t}\n\t};\n});\n\n// Included from: js/tinymce/classes/dom/ControlSelection.js\n\n/**\n * ControlSelection.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class handles control selection of elements. Controls are elements\n * that can be resized and needs to be selected as a whole. It adds custom resize handles\n * to all browser engines that support properly disabling the built in resize logic.\n *\n * @class tinymce.dom.ControlSelection\n */\ndefine(\"tinymce/dom/ControlSelection\", [\n\t\"tinymce/util/VK\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/util/Delay\",\n\t\"tinymce/Env\",\n\t\"tinymce/dom/NodeType\"\n], function(VK, Tools, Delay, Env, NodeType) {\n\tvar isContentEditableFalse = NodeType.isContentEditableFalse;\n\tvar isContentEditableTrue = NodeType.isContentEditableTrue;\n\n\tfunction getContentEditableRoot(root, node) {\n\t\twhile (node && node != root) {\n\t\t\tif (isContentEditableTrue(node) || isContentEditableFalse(node)) {\n\t\t\t\treturn node;\n\t\t\t}\n\n\t\t\tnode = node.parentNode;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\treturn function(selection, editor) {\n\t\tvar dom = editor.dom, each = Tools.each;\n\t\tvar selectedElm, selectedElmGhost, resizeHelper, resizeHandles, selectedHandle, lastMouseDownEvent;\n\t\tvar startX, startY, selectedElmX, selectedElmY, startW, startH, ratio, resizeStarted;\n\t\tvar width, height, editableDoc = editor.getDoc(), rootDocument = document, isIE = Env.ie && Env.ie < 11;\n\t\tvar abs = Math.abs, round = Math.round, rootElement = editor.getBody(), startScrollWidth, startScrollHeight;\n\n\t\t// Details about each resize handle how to scale etc\n\t\tresizeHandles = {\n\t\t\t// Name: x multiplier, y multiplier, delta size x, delta size y\n\t\t\t/*n: [0.5, 0, 0, -1],\n\t\t\te: [1, 0.5, 1, 0],\n\t\t\ts: [0.5, 1, 0, 1],\n\t\t\tw: [0, 0.5, -1, 0],*/\n\t\t\tnw: [0, 0, -1, -1],\n\t\t\tne: [1, 0, 1, -1],\n\t\t\tse: [1, 1, 1, 1],\n\t\t\tsw: [0, 1, -1, 1]\n\t\t};\n\n\t\t// Add CSS for resize handles, cloned element and selected\n\t\tvar rootClass = '.mce-content-body';\n\t\teditor.contentStyles.push(\n\t\t\trootClass + ' div.mce-resizehandle {' +\n\t\t\t\t'position: absolute;' +\n\t\t\t\t'border: 1px solid black;' +\n\t\t\t\t'box-sizing: box-sizing;' +\n\t\t\t\t'background: #FFF;' +\n\t\t\t\t'width: 7px;' +\n\t\t\t\t'height: 7px;' +\n\t\t\t\t'z-index: 10000' +\n\t\t\t'}' +\n\t\t\trootClass + ' .mce-resizehandle:hover {' +\n\t\t\t\t'background: #000' +\n\t\t\t'}' +\n\t\t\trootClass + ' img[data-mce-selected],' + rootClass + ' hr[data-mce-selected] {' +\n\t\t\t\t'outline: 1px solid black;' +\n\t\t\t\t'resize: none' + // Have been talks about implementing this in browsers\n\t\t\t'}' +\n\t\t\trootClass + ' .mce-clonedresizable {' +\n\t\t\t\t'position: absolute;' +\n\t\t\t\t(Env.gecko ? '' : 'outline: 1px dashed black;') + // Gecko produces trails while resizing\n\t\t\t\t'opacity: .5;' +\n\t\t\t\t'filter: alpha(opacity=50);' +\n\t\t\t\t'z-index: 10000' +\n\t\t\t'}' +\n\t\t\trootClass + ' .mce-resize-helper {' +\n\t\t\t\t'background: #555;' +\n\t\t\t\t'background: rgba(0,0,0,0.75);' +\n\t\t\t\t'border-radius: 3px;' +\n\t\t\t\t'border: 1px;' +\n\t\t\t\t'color: white;' +\n\t\t\t\t'display: none;' +\n\t\t\t\t'font-family: sans-serif;' +\n\t\t\t\t'font-size: 12px;' +\n\t\t\t\t'white-space: nowrap;' +\n\t\t\t\t'line-height: 14px;' +\n\t\t\t\t'margin: 5px 10px;' +\n\t\t\t\t'padding: 5px;' +\n\t\t\t\t'position: absolute;' +\n\t\t\t\t'z-index: 10001' +\n\t\t\t'}'\n\t\t);\n\n\t\tfunction isResizable(elm) {\n\t\t\tvar selector = editor.settings.object_resizing;\n\n\t\t\tif (selector === false || Env.iOS) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (typeof selector != 'string') {\n\t\t\t\tselector = 'table,img,div';\n\t\t\t}\n\n\t\t\tif (elm.getAttribute('data-mce-resize') === 'false') {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (elm == editor.getBody()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn editor.dom.is(elm, selector);\n\t\t}\n\n\t\tfunction resizeGhostElement(e) {\n\t\t\tvar deltaX, deltaY, proportional;\n\t\t\tvar resizeHelperX, resizeHelperY;\n\n\t\t\t// Calc new width/height\n\t\t\tdeltaX = e.screenX - startX;\n\t\t\tdeltaY = e.screenY - startY;\n\n\t\t\t// Calc new size\n\t\t\twidth = deltaX * selectedHandle[2] + startW;\n\t\t\theight = deltaY * selectedHandle[3] + startH;\n\n\t\t\t// Never scale down lower than 5 pixels\n\t\t\twidth = width < 5 ? 5 : width;\n\t\t\theight = height < 5 ? 5 : height;\n\n\t\t\tif (selectedElm.nodeName == \"IMG\" && editor.settings.resize_img_proportional !== false) {\n\t\t\t\tproportional = !VK.modifierPressed(e);\n\t\t\t} else {\n\t\t\t\tproportional = VK.modifierPressed(e) || (selectedElm.nodeName == \"IMG\" && selectedHandle[2] * selectedHandle[3] !== 0);\n\t\t\t}\n\n\t\t\t// Constrain proportions\n\t\t\tif (proportional) {\n\t\t\t\tif (abs(deltaX) > abs(deltaY)) {\n\t\t\t\t\theight = round(width * ratio);\n\t\t\t\t\twidth = round(height / ratio);\n\t\t\t\t} else {\n\t\t\t\t\twidth = round(height / ratio);\n\t\t\t\t\theight = round(width * ratio);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update ghost size\n\t\t\tdom.setStyles(selectedElmGhost, {\n\t\t\t\twidth: width,\n\t\t\t\theight: height\n\t\t\t});\n\n\t\t\t// Update resize helper position\n\t\t\tresizeHelperX = selectedHandle.startPos.x + deltaX;\n\t\t\tresizeHelperY = selectedHandle.startPos.y + deltaY;\n\t\t\tresizeHelperX = resizeHelperX > 0 ? resizeHelperX : 0;\n\t\t\tresizeHelperY = resizeHelperY > 0 ? resizeHelperY : 0;\n\n\t\t\tdom.setStyles(resizeHelper, {\n\t\t\t\tleft: resizeHelperX,\n\t\t\t\ttop: resizeHelperY,\n\t\t\t\tdisplay: 'block'\n\t\t\t});\n\n\t\t\tresizeHelper.innerHTML = width + ' × ' + height;\n\n\t\t\t// Update ghost X position if needed\n\t\t\tif (selectedHandle[2] < 0 && selectedElmGhost.clientWidth <= width) {\n\t\t\t\tdom.setStyle(selectedElmGhost, 'left', selectedElmX + (startW - width));\n\t\t\t}\n\n\t\t\t// Update ghost Y position if needed\n\t\t\tif (selectedHandle[3] < 0 && selectedElmGhost.clientHeight <= height) {\n\t\t\t\tdom.setStyle(selectedElmGhost, 'top', selectedElmY + (startH - height));\n\t\t\t}\n\n\t\t\t// Calculate how must overflow we got\n\t\t\tdeltaX = rootElement.scrollWidth - startScrollWidth;\n\t\t\tdeltaY = rootElement.scrollHeight - startScrollHeight;\n\n\t\t\t// Re-position the resize helper based on the overflow\n\t\t\tif (deltaX + deltaY !== 0) {\n\t\t\t\tdom.setStyles(resizeHelper, {\n\t\t\t\t\tleft: resizeHelperX - deltaX,\n\t\t\t\t\ttop: resizeHelperY - deltaY\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!resizeStarted) {\n\t\t\t\teditor.fire('ObjectResizeStart', {target: selectedElm, width: startW, height: startH});\n\t\t\t\tresizeStarted = true;\n\t\t\t}\n\t\t}\n\n\t\tfunction endGhostResize() {\n\t\t\tresizeStarted = false;\n\n\t\t\tfunction setSizeProp(name, value) {\n\t\t\t\tif (value) {\n\t\t\t\t\t// Resize by using style or attribute\n\t\t\t\t\tif (selectedElm.style[name] || !editor.schema.isValid(selectedElm.nodeName.toLowerCase(), name)) {\n\t\t\t\t\t\tdom.setStyle(selectedElm, name, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdom.setAttrib(selectedElm, name, value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set width/height properties\n\t\t\tsetSizeProp('width', width);\n\t\t\tsetSizeProp('height', height);\n\n\t\t\tdom.unbind(editableDoc, 'mousemove', resizeGhostElement);\n\t\t\tdom.unbind(editableDoc, 'mouseup', endGhostResize);\n\n\t\t\tif (rootDocument != editableDoc) {\n\t\t\t\tdom.unbind(rootDocument, 'mousemove', resizeGhostElement);\n\t\t\t\tdom.unbind(rootDocument, 'mouseup', endGhostResize);\n\t\t\t}\n\n\t\t\t// Remove ghost/helper and update resize handle positions\n\t\t\tdom.remove(selectedElmGhost);\n\t\t\tdom.remove(resizeHelper);\n\n\t\t\tif (!isIE || selectedElm.nodeName == \"TABLE\") {\n\t\t\t\tshowResizeRect(selectedElm);\n\t\t\t}\n\n\t\t\teditor.fire('ObjectResized', {target: selectedElm, width: width, height: height});\n\t\t\tdom.setAttrib(selectedElm, 'style', dom.getAttrib(selectedElm, 'style'));\n\t\t\teditor.nodeChanged();\n\t\t}\n\n\t\tfunction showResizeRect(targetElm, mouseDownHandleName, mouseDownEvent) {\n\t\t\tvar position, targetWidth, targetHeight, e, rect;\n\n\t\t\thideResizeRect();\n\t\t\tunbindResizeHandleEvents();\n\n\t\t\t// Get position and size of target\n\t\t\tposition = dom.getPos(targetElm, rootElement);\n\t\t\tselectedElmX = position.x;\n\t\t\tselectedElmY = position.y;\n\t\t\trect = targetElm.getBoundingClientRect(); // Fix for Gecko offsetHeight for table with caption\n\t\t\ttargetWidth = rect.width || (rect.right - rect.left);\n\t\t\ttargetHeight = rect.height || (rect.bottom - rect.top);\n\n\t\t\t// Reset width/height if user selects a new image/table\n\t\t\tif (selectedElm != targetElm) {\n\t\t\t\tdetachResizeStartListener();\n\t\t\t\tselectedElm = targetElm;\n\t\t\t\twidth = height = 0;\n\t\t\t}\n\n\t\t\t// Makes it possible to disable resizing\n\t\t\te = editor.fire('ObjectSelected', {target: targetElm});\n\n\t\t\tif (isResizable(targetElm) && !e.isDefaultPrevented()) {\n\t\t\t\teach(resizeHandles, function(handle, name) {\n\t\t\t\t\tvar handleElm;\n\n\t\t\t\t\tfunction startDrag(e) {\n\t\t\t\t\t\tstartX = e.screenX;\n\t\t\t\t\t\tstartY = e.screenY;\n\t\t\t\t\t\tstartW = selectedElm.clientWidth;\n\t\t\t\t\t\tstartH = selectedElm.clientHeight;\n\t\t\t\t\t\tratio = startH / startW;\n\t\t\t\t\t\tselectedHandle = handle;\n\n\t\t\t\t\t\thandle.startPos = {\n\t\t\t\t\t\t\tx: targetWidth * handle[0] + selectedElmX,\n\t\t\t\t\t\t\ty: targetHeight * handle[1] + selectedElmY\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tstartScrollWidth = rootElement.scrollWidth;\n\t\t\t\t\t\tstartScrollHeight = rootElement.scrollHeight;\n\n\t\t\t\t\t\tselectedElmGhost = selectedElm.cloneNode(true);\n\t\t\t\t\t\tdom.addClass(selectedElmGhost, 'mce-clonedresizable');\n\t\t\t\t\t\tdom.setAttrib(selectedElmGhost, 'data-mce-bogus', 'all');\n\t\t\t\t\t\tselectedElmGhost.contentEditable = false; // Hides IE move layer cursor\n\t\t\t\t\t\tselectedElmGhost.unSelectabe = true;\n\t\t\t\t\t\tdom.setStyles(selectedElmGhost, {\n\t\t\t\t\t\t\tleft: selectedElmX,\n\t\t\t\t\t\t\ttop: selectedElmY,\n\t\t\t\t\t\t\tmargin: 0\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tselectedElmGhost.removeAttribute('data-mce-selected');\n\t\t\t\t\t\trootElement.appendChild(selectedElmGhost);\n\n\t\t\t\t\t\tdom.bind(editableDoc, 'mousemove', resizeGhostElement);\n\t\t\t\t\t\tdom.bind(editableDoc, 'mouseup', endGhostResize);\n\n\t\t\t\t\t\tif (rootDocument != editableDoc) {\n\t\t\t\t\t\t\tdom.bind(rootDocument, 'mousemove', resizeGhostElement);\n\t\t\t\t\t\t\tdom.bind(rootDocument, 'mouseup', endGhostResize);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresizeHelper = dom.add(rootElement, 'div', {\n\t\t\t\t\t\t\t'class': 'mce-resize-helper',\n\t\t\t\t\t\t\t'data-mce-bogus': 'all'\n\t\t\t\t\t\t}, startW + ' × ' + startH);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (mouseDownHandleName) {\n\t\t\t\t\t\t// Drag started by IE native resizestart\n\t\t\t\t\t\tif (name == mouseDownHandleName) {\n\t\t\t\t\t\t\tstartDrag(mouseDownEvent);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get existing or render resize handle\n\t\t\t\t\thandleElm = dom.get('mceResizeHandle' + name);\n\t\t\t\t\tif (handleElm) {\n\t\t\t\t\t\tdom.remove(handleElm);\n\t\t\t\t\t}\n\n\t\t\t\t\thandleElm = dom.add(rootElement, 'div', {\n\t\t\t\t\t\tid: 'mceResizeHandle' + name,\n\t\t\t\t\t\t'data-mce-bogus': 'all',\n\t\t\t\t\t\t'class': 'mce-resizehandle',\n\t\t\t\t\t\tunselectable: true,\n\t\t\t\t\t\tstyle: 'cursor:' + name + '-resize; margin:0; padding:0'\n\t\t\t\t\t});\n\n\t\t\t\t\t// Hides IE move layer cursor\n\t\t\t\t\t// If we set it on Chrome we get this wounderful bug: #6725\n\t\t\t\t\t// Edge doesn't have this issue however setting contenteditable\n\t\t\t\t\t// will move the selection to that element on Edge 17 see #TINY-1679\n\t\t\t\t\tif (Env.ie === 11) {\n\t\t\t\t\t\thandleElm.contentEditable = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tdom.bind(handleElm, 'mousedown', function(e) {\n\t\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tstartDrag(e);\n\t\t\t\t\t});\n\n\t\t\t\t\thandle.elm = handleElm;\n\n\t\t\t\t\t// Position element\n\t\t\t\t\tdom.setStyles(handleElm, {\n\t\t\t\t\t\tleft: (targetWidth * handle[0] + selectedElmX) - (handleElm.offsetWidth / 2),\n\t\t\t\t\t\ttop: (targetHeight * handle[1] + selectedElmY) - (handleElm.offsetHeight / 2)\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\thideResizeRect();\n\t\t\t}\n\n\t\t\tselectedElm.setAttribute('data-mce-selected', '1');\n\t\t}\n\n\t\tfunction hideResizeRect() {\n\t\t\tvar name, handleElm;\n\n\t\t\tunbindResizeHandleEvents();\n\n\t\t\tif (selectedElm) {\n\t\t\t\tselectedElm.removeAttribute('data-mce-selected');\n\t\t\t}\n\n\t\t\tfor (name in resizeHandles) {\n\t\t\t\thandleElm = dom.get('mceResizeHandle' + name);\n\t\t\t\tif (handleElm) {\n\t\t\t\t\tdom.unbind(handleElm);\n\t\t\t\t\tdom.remove(handleElm);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction updateResizeRect(e) {\n\t\t\tvar startElm, controlElm;\n\n\t\t\tfunction isChildOrEqual(node, parent) {\n\t\t\t\tif (node) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (node === parent) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while ((node = node.parentNode));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Ignore all events while resizing or if the editor instance was removed\n\t\t\tif (resizeStarted || editor.removed) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Remove data-mce-selected from all elements since they might have been copied using Ctrl+c/v\n\t\t\teach(dom.select('img[data-mce-selected],hr[data-mce-selected]'), function(img) {\n\t\t\t\timg.removeAttribute('data-mce-selected');\n\t\t\t});\n\n\t\t\tcontrolElm = e.type == 'mousedown' ? e.target : selection.getNode();\n\t\t\tcontrolElm = dom.$(controlElm).closest(isIE ? 'table' : 'table,img,hr')[0];\n\n\t\t\tif (isChildOrEqual(controlElm, rootElement)) {\n\t\t\t\tdisableGeckoResize();\n\t\t\t\tstartElm = selection.getStart(true);\n\n\t\t\t\tif (isChildOrEqual(startElm, controlElm) && isChildOrEqual(selection.getEnd(true), controlElm)) {\n\t\t\t\t\tif (!isIE || (controlElm != startElm && startElm.nodeName !== 'IMG')) {\n\t\t\t\t\t\tshowResizeRect(controlElm);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thideResizeRect();\n\t\t}\n\n\t\tfunction attachEvent(elm, name, func) {\n\t\t\tif (elm && elm.attachEvent) {\n\t\t\t\telm.attachEvent('on' + name, func);\n\t\t\t}\n\t\t}\n\n\t\tfunction detachEvent(elm, name, func) {\n\t\t\tif (elm && elm.detachEvent) {\n\t\t\t\telm.detachEvent('on' + name, func);\n\t\t\t}\n\t\t}\n\n\t\tfunction resizeNativeStart(e) {\n\t\t\tvar target = e.srcElement, pos, name, corner, cornerX, cornerY, relativeX, relativeY;\n\n\t\t\tpos = target.getBoundingClientRect();\n\t\t\trelativeX = lastMouseDownEvent.clientX - pos.left;\n\t\t\trelativeY = lastMouseDownEvent.clientY - pos.top;\n\n\t\t\t// Figure out what corner we are draging on\n\t\t\tfor (name in resizeHandles) {\n\t\t\t\tcorner = resizeHandles[name];\n\n\t\t\t\tcornerX = target.offsetWidth * corner[0];\n\t\t\t\tcornerY = target.offsetHeight * corner[1];\n\n\t\t\t\tif (abs(cornerX - relativeX) < 8 && abs(cornerY - relativeY) < 8) {\n\t\t\t\t\tselectedHandle = corner;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove native selection and let the magic begin\n\t\t\tresizeStarted = true;\n\t\t\teditor.fire('ObjectResizeStart', {\n\t\t\t\ttarget: selectedElm,\n\t\t\t\twidth: selectedElm.clientWidth,\n\t\t\t\theight: selectedElm.clientHeight\n\t\t\t});\n\t\t\teditor.getDoc().selection.empty();\n\t\t\tshowResizeRect(target, name, lastMouseDownEvent);\n\t\t}\n\n\t\tfunction preventDefault(e) {\n\t\t\tif (e.preventDefault) {\n\t\t\t\te.preventDefault();\n\t\t\t} else {\n\t\t\t\te.returnValue = false; // IE\n\t\t\t}\n\t\t}\n\n\t\tfunction isWithinContentEditableFalse(elm) {\n\t\t\treturn isContentEditableFalse(getContentEditableRoot(editor.getBody(), elm));\n\t\t}\n\n\t\tfunction nativeControlSelect(e) {\n\t\t\tvar target = e.srcElement;\n\n\t\t\tif (isWithinContentEditableFalse(target)) {\n\t\t\t\tpreventDefault(e);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (target != selectedElm) {\n\t\t\t\teditor.fire('ObjectSelected', {target: target});\n\t\t\t\tdetachResizeStartListener();\n\n\t\t\t\tif (target.id.indexOf('mceResizeHandle') === 0) {\n\t\t\t\t\te.returnValue = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (target.nodeName == 'IMG' || target.nodeName == 'TABLE') {\n\t\t\t\t\thideResizeRect();\n\t\t\t\t\tselectedElm = target;\n\t\t\t\t\tattachEvent(target, 'resizestart', resizeNativeStart);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction detachResizeStartListener() {\n\t\t\tdetachEvent(selectedElm, 'resizestart', resizeNativeStart);\n\t\t}\n\n\t\tfunction unbindResizeHandleEvents() {\n\t\t\tfor (var name in resizeHandles) {\n\t\t\t\tvar handle = resizeHandles[name];\n\n\t\t\t\tif (handle.elm) {\n\t\t\t\t\tdom.unbind(handle.elm);\n\t\t\t\t\tdelete handle.elm;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction disableGeckoResize() {\n\t\t\ttry {\n\t\t\t\t// Disable object resizing on Gecko\n\t\t\t\teditor.getDoc().execCommand('enableObjectResizing', false, false);\n\t\t\t} catch (ex) {\n\t\t\t\t// Ignore\n\t\t\t}\n\t\t}\n\n\t\tfunction controlSelect(elm) {\n\t\t\tvar ctrlRng;\n\n\t\t\tif (!isIE) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tctrlRng = editableDoc.body.createControlRange();\n\n\t\t\ttry {\n\t\t\t\tctrlRng.addElement(elm);\n\t\t\t\tctrlRng.select();\n\t\t\t\treturn true;\n\t\t\t} catch (ex) {\n\t\t\t\t// Ignore since the element can't be control selected for example a P tag\n\t\t\t}\n\t\t}\n\n\t\teditor.on('init', function() {\n\t\t\tif (isIE) {\n\t\t\t\t// Hide the resize rect on resize and reselect the image\n\t\t\t\teditor.on('ObjectResized', function(e) {\n\t\t\t\t\tif (e.target.nodeName != 'TABLE') {\n\t\t\t\t\t\thideResizeRect();\n\t\t\t\t\t\tcontrolSelect(e.target);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tattachEvent(rootElement, 'controlselect', nativeControlSelect);\n\n\t\t\t\teditor.on('mousedown', function(e) {\n\t\t\t\t\tlastMouseDownEvent = e;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tdisableGeckoResize();\n\n\t\t\t\t// Sniff sniff, hard to feature detect this stuff\n\t\t\t\tif (Env.ie >= 11) {\n\t\t\t\t\t// Needs to be mousedown for drag/drop to work on IE 11\n\t\t\t\t\t// Needs to be click on Edge to properly select images\n\t\t\t\t\teditor.on('mousedown click', function(e) {\n\t\t\t\t\t\tvar target = e.target, nodeName = target.nodeName;\n\n\t\t\t\t\t\tif (!resizeStarted && /^(TABLE|IMG|HR)$/.test(nodeName) && !isWithinContentEditableFalse(target)) {\n\t\t\t\t\t\t\teditor.selection.select(target, nodeName == 'TABLE');\n\n\t\t\t\t\t\t\t// Only fire once since nodeChange is expensive\n\t\t\t\t\t\t\tif (e.type == 'mousedown') {\n\t\t\t\t\t\t\t\teditor.nodeChanged();\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\teditor.dom.bind(rootElement, 'mscontrolselect', function(e) {\n\t\t\t\t\t\tfunction delayedSelect(node) {\n\t\t\t\t\t\t\tDelay.setEditorTimeout(editor, function() {\n\t\t\t\t\t\t\t\teditor.selection.select(node);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isWithinContentEditableFalse(e.target)) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tdelayedSelect(e.target);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (/^(TABLE|IMG|HR)$/.test(e.target.nodeName)) {\n\t\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t\t// This moves the selection from being a control selection to a text like selection like in WebKit #6753\n\t\t\t\t\t\t\t// TODO: Fix this the day IE works like other browsers without this nasty native ugly control selections.\n\t\t\t\t\t\t\tif (e.target.tagName == 'IMG') {\n\t\t\t\t\t\t\t\tdelayedSelect(e.target);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar throttledUpdateResizeRect = Delay.throttle(function(e) {\n\t\t\t\tif (!editor.composing) {\n\t\t\t\t\tupdateResizeRect(e);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\teditor.on('nodechange ResizeEditor ResizeWindow drop', throttledUpdateResizeRect);\n\n\t\t\t// Update resize rect while typing in a table\n\t\t\teditor.on('keyup compositionend', function(e) {\n\t\t\t\t// Don't update the resize rect while composing since it blows away the IME see: #2710\n\t\t\t\tif (selectedElm && selectedElm.nodeName == \"TABLE\") {\n\t\t\t\t\tthrottledUpdateResizeRect(e);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\teditor.on('hide blur', hideResizeRect);\n\n\t\t\t// Hide rect on focusout since it would float on top of windows otherwise\n\t\t\t//editor.on('focusout', hideResizeRect);\n\t\t});\n\n\t\teditor.on('remove', unbindResizeHandleEvents);\n\n\t\tfunction destroy() {\n\t\t\tselectedElm = selectedElmGhost = null;\n\n\t\t\tif (isIE) {\n\t\t\t\tdetachResizeStartListener();\n\t\t\t\tdetachEvent(rootElement, 'controlselect', nativeControlSelect);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tisResizable: isResizable,\n\t\t\tshowResizeRect: showResizeRect,\n\t\t\thideResizeRect: hideResizeRect,\n\t\t\tupdateResizeRect: updateResizeRect,\n\t\t\tcontrolSelect: controlSelect,\n\t\t\tdestroy: destroy\n\t\t};\n\t};\n});\n\n// Included from: js/tinymce/classes/util/Fun.js\n\n/**\n * Fun.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Functional utility class.\n *\n * @private\n * @class tinymce.util.Fun\n */\ndefine(\"tinymce/util/Fun\", [], function() {\n\tvar slice = [].slice;\n\n\tfunction constant(value) {\n\t\treturn function() {\n\t\t\treturn value;\n\t\t};\n\t}\n\n\tfunction negate(predicate) {\n\t\treturn function(x) {\n\t\t\treturn !predicate(x);\n\t\t};\n\t}\n\n\tfunction compose(f, g) {\n\t\treturn function(x) {\n\t\t\treturn f(g(x));\n\t\t};\n\t}\n\n\tfunction or() {\n\t\tvar args = slice.call(arguments);\n\n\t\treturn function(x) {\n\t\t\tfor (var i = 0; i < args.length; i++) {\n\t\t\t\tif (args[i](x)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t};\n\t}\n\n\tfunction and() {\n\t\tvar args = slice.call(arguments);\n\n\t\treturn function(x) {\n\t\t\tfor (var i = 0; i < args.length; i++) {\n\t\t\t\tif (!args[i](x)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\t}\n\n\tfunction curry(fn) {\n\t\tvar args = slice.call(arguments);\n\n\t\tif (args.length - 1 >= fn.length) {\n\t\t\treturn fn.apply(this, args.slice(1));\n\t\t}\n\n\t\treturn function() {\n\t\t\tvar tempArgs = args.concat([].slice.call(arguments));\n\t\t\treturn curry.apply(this, tempArgs);\n\t\t};\n\t}\n\n\tfunction noop() {\n\t}\n\n\treturn {\n\t\tconstant: constant,\n\t\tnegate: negate,\n\t\tand: and,\n\t\tor: or,\n\t\tcurry: curry,\n\t\tcompose: compose,\n\t\tnoop: noop\n\t};\n});\n\n// Included from: js/tinymce/classes/caret/CaretCandidate.js\n\n/**\n * CaretCandidate.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This module contains logic for handling caret candidates. A caret candidate is\n * for example text nodes, images, input elements, cE=false elements etc.\n *\n * @private\n * @class tinymce.caret.CaretCandidate\n */\ndefine(\"tinymce/caret/CaretCandidate\", [\n\t\"tinymce/dom/NodeType\",\n\t\"tinymce/util/Arr\",\n\t\"tinymce/caret/CaretContainer\"\n], function(NodeType, Arr, CaretContainer) {\n\tvar isContentEditableTrue = NodeType.isContentEditableTrue,\n\t\tisContentEditableFalse = NodeType.isContentEditableFalse,\n\t\tisBr = NodeType.isBr,\n\t\tisText = NodeType.isText,\n\t\tisInvalidTextElement = NodeType.matchNodeNames('script style textarea'),\n\t\tisAtomicInline = NodeType.matchNodeNames('img input textarea hr iframe video audio object'),\n\t\tisTable = NodeType.matchNodeNames('table'),\n\t\tisCaretContainer = CaretContainer.isCaretContainer;\n\n\tfunction isCaretCandidate(node) {\n\t\tif (isCaretContainer(node)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (isText(node)) {\n\t\t\tif (isInvalidTextElement(node.parentNode)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn isAtomicInline(node) || isBr(node) || isTable(node) || isContentEditableFalse(node);\n\t}\n\n\tfunction isInEditable(node, rootNode) {\n\t\tfor (node = node.parentNode; node && node != rootNode; node = node.parentNode) {\n\t\t\tif (isContentEditableFalse(node)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (isContentEditableTrue(node)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction isAtomicContentEditableFalse(node) {\n\t\tif (!isContentEditableFalse(node)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn Arr.reduce(node.getElementsByTagName('*'), function(result, elm) {\n\t\t\treturn result || isContentEditableTrue(elm);\n\t\t}, false) !== true;\n\t}\n\n\tfunction isAtomic(node) {\n\t\treturn isAtomicInline(node) || isAtomicContentEditableFalse(node);\n\t}\n\n\tfunction isEditableCaretCandidate(node, rootNode) {\n\t\treturn isCaretCandidate(node) && isInEditable(node, rootNode);\n\t}\n\n\treturn {\n\t\tisCaretCandidate: isCaretCandidate,\n\t\tisInEditable: isInEditable,\n\t\tisAtomic: isAtomic,\n\t\tisEditableCaretCandidate: isEditableCaretCandidate\n\t};\n});\n\n// Included from: js/tinymce/classes/geom/ClientRect.js\n\n/**\n * ClientRect.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Utility functions for working with client rects.\n *\n * @private\n * @class tinymce.geom.ClientRect\n */\ndefine(\"tinymce/geom/ClientRect\", [], function() {\n\tvar round = Math.round;\n\n\tfunction clone(rect) {\n\t\tif (!rect) {\n\t\t\treturn {left: 0, top: 0, bottom: 0, right: 0, width: 0, height: 0};\n\t\t}\n\n\t\treturn {\n\t\t\tleft: round(rect.left),\n\t\t\ttop: round(rect.top),\n\t\t\tbottom: round(rect.bottom),\n\t\t\tright: round(rect.right),\n\t\t\twidth: round(rect.width),\n\t\t\theight: round(rect.height)\n\t\t};\n\t}\n\n\tfunction collapse(clientRect, toStart) {\n\t\tclientRect = clone(clientRect);\n\n\t\tif (toStart) {\n\t\t\tclientRect.right = clientRect.left;\n\t\t} else {\n\t\t\tclientRect.left = clientRect.left + clientRect.width;\n\t\t\tclientRect.right = clientRect.left;\n\t\t}\n\n\t\tclientRect.width = 0;\n\n\t\treturn clientRect;\n\t}\n\n\tfunction isEqual(rect1, rect2) {\n\t\treturn (\n\t\t\trect1.left === rect2.left &&\n\t\t\trect1.top === rect2.top &&\n\t\t\trect1.bottom === rect2.bottom &&\n\t\t\trect1.right === rect2.right\n\t\t);\n\t}\n\n\tfunction isValidOverflow(overflowY, clientRect1, clientRect2) {\n\t\treturn overflowY >= 0 && overflowY <= Math.min(clientRect1.height, clientRect2.height) / 2;\n\n\t}\n\n\tfunction isAbove(clientRect1, clientRect2) {\n\t\tif (clientRect1.bottom < clientRect2.top) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (clientRect1.top > clientRect2.bottom) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn isValidOverflow(clientRect2.top - clientRect1.bottom, clientRect1, clientRect2);\n\t}\n\n\tfunction isBelow(clientRect1, clientRect2) {\n\t\tif (clientRect1.top > clientRect2.bottom) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (clientRect1.bottom < clientRect2.top) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn isValidOverflow(clientRect2.bottom - clientRect1.top, clientRect1, clientRect2);\n\t}\n\n\tfunction isLeft(clientRect1, clientRect2) {\n\t\treturn clientRect1.left < clientRect2.left;\n\t}\n\n\tfunction isRight(clientRect1, clientRect2) {\n\t\treturn clientRect1.right > clientRect2.right;\n\t}\n\n\tfunction compare(clientRect1, clientRect2) {\n\t\tif (isAbove(clientRect1, clientRect2)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (isBelow(clientRect1, clientRect2)) {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (isLeft(clientRect1, clientRect2)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (isRight(clientRect1, clientRect2)) {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\tfunction containsXY(clientRect, clientX, clientY) {\n\t\treturn (\n\t\t\tclientX >= clientRect.left &&\n\t\t\tclientX <= clientRect.right &&\n\t\t\tclientY >= clientRect.top &&\n\t\t\tclientY <= clientRect.bottom\n\t\t);\n\t}\n\n\treturn {\n\t\tclone: clone,\n\t\tcollapse: collapse,\n\t\tisEqual: isEqual,\n\t\tisAbove: isAbove,\n\t\tisBelow: isBelow,\n\t\tisLeft: isLeft,\n\t\tisRight: isRight,\n\t\tcompare: compare,\n\t\tcontainsXY: containsXY\n\t};\n});\n\n// Included from: js/tinymce/classes/text/ExtendingChar.js\n\n/**\n * ExtendingChar.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class contains logic for detecting extending characters.\n *\n * @private\n * @class tinymce.text.ExtendingChar\n * @example\n * var isExtending = ExtendingChar.isExtendingChar('a');\n */\ndefine(\"tinymce/text/ExtendingChar\", [], function() {\n\t// Generated from: http://www.unicode.org/Public/UNIDATA/DerivedCoreProperties.txt\n\t// Only includes the characters in that fit into UCS-2 16 bit\n\tvar extendingChars = new RegExp(\n\t\t\"[\\u0300-\\u036F\\u0483-\\u0487\\u0488-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1-\\u05C2\\u05C4-\\u05C5\\u05C7\\u0610-\\u061A\" +\n\t\t\"\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7-\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\" +\n\t\t\"\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E3-\\u0902\\u093A\\u093C\" +\n\t\t\"\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962-\\u0963\\u0981\\u09BC\\u09BE\\u09C1-\\u09C4\\u09CD\\u09D7\\u09E2-\\u09E3\" +\n\t\t\"\\u0A01-\\u0A02\\u0A3C\\u0A41-\\u0A42\\u0A47-\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70-\\u0A71\\u0A75\\u0A81-\\u0A82\\u0ABC\" +\n\t\t\"\\u0AC1-\\u0AC5\\u0AC7-\\u0AC8\\u0ACD\\u0AE2-\\u0AE3\\u0B01\\u0B3C\\u0B3E\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B57\" +\n\t\t\"\\u0B62-\\u0B63\\u0B82\\u0BBE\\u0BC0\\u0BCD\\u0BD7\\u0C00\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55-\\u0C56\" +\n\t\t\"\\u0C62-\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC2\\u0CC6\\u0CCC-\\u0CCD\\u0CD5-\\u0CD6\\u0CE2-\\u0CE3\\u0D01\\u0D3E\\u0D41-\\u0D44\" +\n\t\t\"\\u0D4D\\u0D57\\u0D62-\\u0D63\\u0DCA\\u0DCF\\u0DD2-\\u0DD4\\u0DD6\\u0DDF\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\" +\n\t\t\"\\u0EBB-\\u0EBC\\u0EC8-\\u0ECD\\u0F18-\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86-\\u0F87\\u0F8D-\\u0F97\" +\n\t\t\"\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039-\\u103A\\u103D-\\u103E\\u1058-\\u1059\\u105E-\\u1060\\u1071-\\u1074\" +\n\t\t\"\\u1082\\u1085-\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752-\\u1753\\u1772-\\u1773\\u17B4-\\u17B5\" +\n\t\t\"\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u1922\\u1927-\\u1928\\u1932\\u1939-\\u193B\\u1A17-\\u1A18\" +\n\t\t\"\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ABD\\u1ABE\\u1B00-\\u1B03\\u1B34\" +\n\t\t\"\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80-\\u1B81\\u1BA2-\\u1BA5\\u1BA8-\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8-\\u1BE9\" +\n\t\t\"\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8-\\u1CF9\" +\n\t\t\"\\u1DC0-\\u1DF5\\u1DFC-\\u1DFF\\u200C-\\u200D\\u20D0-\\u20DC\\u20DD-\\u20E0\\u20E1\\u20E2-\\u20E4\\u20E5-\\u20F0\\u2CEF-\\u2CF1\" +\n\t\t\"\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u302E-\\u302F\\u3099-\\u309A\\uA66F\\uA670-\\uA672\\uA674-\\uA67D\\uA69E-\\uA69F\\uA6F0-\\uA6F1\" +\n\t\t\"\\uA802\\uA806\\uA80B\\uA825-\\uA826\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\" +\n\t\t\"\\uA9E5\\uAA29-\\uAA2E\\uAA31-\\uAA32\\uAA35-\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7-\\uAAB8\\uAABE-\\uAABF\\uAAC1\" +\n\t\t\"\\uAAEC-\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFF9E-\\uFF9F]\"\n\t);\n\n\tfunction isExtendingChar(ch) {\n\t\treturn typeof ch == \"string\" && ch.charCodeAt(0) >= 768 && extendingChars.test(ch);\n\t}\n\n\treturn {\n\t\tisExtendingChar: isExtendingChar\n\t};\n});\n\n// Included from: js/tinymce/classes/caret/CaretPosition.js\n\n/**\n * CaretPosition.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This module contains logic for creating caret positions within a document a caretposition\n * is similar to a DOMRange object but it doesn't have two endpoints and is also more lightweight\n * since it's now updated live when the DOM changes.\n *\n * @private\n * @class tinymce.caret.CaretPosition\n * @example\n * var caretPos1 = new CaretPosition(container, offset);\n * var caretPos2 = CaretPosition.fromRangeStart(someRange);\n */\ndefine(\"tinymce/caret/CaretPosition\", [\n\t\"tinymce/util/Fun\",\n\t\"tinymce/dom/NodeType\",\n\t\"tinymce/dom/DOMUtils\",\n\t\"tinymce/dom/RangeUtils\",\n\t\"tinymce/caret/CaretCandidate\",\n\t\"tinymce/geom/ClientRect\",\n\t\"tinymce/text/ExtendingChar\"\n], function(Fun, NodeType, DOMUtils, RangeUtils, CaretCandidate, ClientRect, ExtendingChar) {\n\tvar isElement = NodeType.isElement,\n\t\tisCaretCandidate = CaretCandidate.isCaretCandidate,\n\t\tisBlock = NodeType.matchStyleValues('display', 'block table'),\n\t\tisFloated = NodeType.matchStyleValues('float', 'left right'),\n\t\tisValidElementCaretCandidate = Fun.and(isElement, isCaretCandidate, Fun.negate(isFloated)),\n\t\tisNotPre = Fun.negate(NodeType.matchStyleValues('white-space', 'pre pre-line pre-wrap')),\n\t\tisText = NodeType.isText,\n\t\tisBr = NodeType.isBr,\n\t\tnodeIndex = DOMUtils.nodeIndex,\n\t\tresolveIndex = RangeUtils.getNode;\n\n\tfunction createRange(doc) {\n\t\treturn \"createRange\" in doc ? doc.createRange() : DOMUtils.DOM.createRng();\n\t}\n\n\tfunction isWhiteSpace(chr) {\n\t\treturn chr && /[\\r\\n\\t ]/.test(chr);\n\t}\n\n\tfunction isHiddenWhiteSpaceRange(range) {\n\t\tvar container = range.startContainer,\n\t\t\toffset = range.startOffset,\n\t\t\ttext;\n\n\t\tif (isWhiteSpace(range.toString()) && isNotPre(container.parentNode)) {\n\t\t\ttext = container.data;\n\n\t\t\tif (isWhiteSpace(text[offset - 1]) || isWhiteSpace(text[offset + 1])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tfunction getCaretPositionClientRects(caretPosition) {\n\t\tvar clientRects = [], beforeNode, node;\n\n\t\t// Hack for older WebKit versions that doesn't\n\t\t// support getBoundingClientRect on BR elements\n\t\tfunction getBrClientRect(brNode) {\n\t\t\tvar doc = brNode.ownerDocument,\n\t\t\t\trng = createRange(doc),\n\t\t\t\tnbsp = doc.createTextNode('\\u00a0'),\n\t\t\t\tparentNode = brNode.parentNode,\n\t\t\t\tclientRect;\n\n\t\t\tparentNode.insertBefore(nbsp, brNode);\n\t\t\trng.setStart(nbsp, 0);\n\t\t\trng.setEnd(nbsp, 1);\n\t\t\tclientRect = ClientRect.clone(rng.getBoundingClientRect());\n\t\t\tparentNode.removeChild(nbsp);\n\n\t\t\treturn clientRect;\n\t\t}\n\n\t\tfunction getBoundingClientRect(item) {\n\t\t\tvar clientRect, clientRects;\n\n\t\t\tclientRects = item.getClientRects();\n\t\t\tif (clientRects.length > 0) {\n\t\t\t\tclientRect = ClientRect.clone(clientRects[0]);\n\t\t\t} else {\n\t\t\t\tclientRect = ClientRect.clone(item.getBoundingClientRect());\n\t\t\t}\n\n\t\t\tif (isBr(item) && clientRect.left === 0) {\n\t\t\t\treturn getBrClientRect(item);\n\t\t\t}\n\n\t\t\treturn clientRect;\n\t\t}\n\n\t\tfunction collapseAndInflateWidth(clientRect, toStart) {\n\t\t\tclientRect = ClientRect.collapse(clientRect, toStart);\n\t\t\tclientRect.width = 1;\n\t\t\tclientRect.right = clientRect.left + 1;\n\n\t\t\treturn clientRect;\n\t\t}\n\n\t\tfunction addUniqueAndValidRect(clientRect) {\n\t\t\tif (clientRect.height === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (clientRects.length > 0) {\n\t\t\t\tif (ClientRect.isEqual(clientRect, clientRects[clientRects.length - 1])) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tclientRects.push(clientRect);\n\t\t}\n\n\t\tfunction addCharacterOffset(container, offset) {\n\t\t\tvar range = createRange(container.ownerDocument);\n\n\t\t\tif (offset < container.data.length) {\n\t\t\t\tif (ExtendingChar.isExtendingChar(container.data[offset])) {\n\t\t\t\t\treturn clientRects;\n\t\t\t\t}\n\n\t\t\t\t// WebKit returns two client rects for a position after an extending\n\t\t\t\t// character a\\uxxx|b so expand on \"b\" and collapse to start of \"b\" box\n\t\t\t\tif (ExtendingChar.isExtendingChar(container.data[offset - 1])) {\n\t\t\t\t\trange.setStart(container, offset);\n\t\t\t\t\trange.setEnd(container, offset + 1);\n\n\t\t\t\t\tif (!isHiddenWhiteSpaceRange(range)) {\n\t\t\t\t\t\taddUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(range), false));\n\t\t\t\t\t\treturn clientRects;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (offset > 0) {\n\t\t\t\trange.setStart(container, offset - 1);\n\t\t\t\trange.setEnd(container, offset);\n\n\t\t\t\tif (!isHiddenWhiteSpaceRange(range)) {\n\t\t\t\t\taddUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(range), false));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (offset < container.data.length) {\n\t\t\t\trange.setStart(container, offset);\n\t\t\t\trange.setEnd(container, offset + 1);\n\n\t\t\t\tif (!isHiddenWhiteSpaceRange(range)) {\n\t\t\t\t\taddUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(range), true));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isText(caretPosition.container())) {\n\t\t\taddCharacterOffset(caretPosition.container(), caretPosition.offset());\n\t\t\treturn clientRects;\n\t\t}\n\n\t\tif (isElement(caretPosition.container())) {\n\t\t\tif (caretPosition.isAtEnd()) {\n\t\t\t\tnode = resolveIndex(caretPosition.container(), caretPosition.offset());\n\t\t\t\tif (isText(node)) {\n\t\t\t\t\taddCharacterOffset(node, node.data.length);\n\t\t\t\t}\n\n\t\t\t\tif (isValidElementCaretCandidate(node) && !isBr(node)) {\n\t\t\t\t\taddUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(node), false));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode = resolveIndex(caretPosition.container(), caretPosition.offset());\n\t\t\t\tif (isText(node)) {\n\t\t\t\t\taddCharacterOffset(node, 0);\n\t\t\t\t}\n\n\t\t\t\tif (isValidElementCaretCandidate(node) && caretPosition.isAtEnd()) {\n\t\t\t\t\taddUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(node), false));\n\t\t\t\t\treturn clientRects;\n\t\t\t\t}\n\n\t\t\t\tbeforeNode = resolveIndex(caretPosition.container(), caretPosition.offset() - 1);\n\t\t\t\tif (isValidElementCaretCandidate(beforeNode) && !isBr(beforeNode)) {\n\t\t\t\t\tif (isBlock(beforeNode) || isBlock(node) || !isValidElementCaretCandidate(node)) {\n\t\t\t\t\t\taddUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(beforeNode), false));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (isValidElementCaretCandidate(node)) {\n\t\t\t\t\taddUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(node), true));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn clientRects;\n\t}\n\n\t/**\n\t * Represents a location within the document by a container and an offset.\n\t *\n\t * @constructor\n\t * @param {Node} container Container node.\n\t * @param {Number} offset Offset within that container node.\n\t * @param {Array} clientRects Optional client rects array for the position.\n\t */\n\tfunction CaretPosition(container, offset, clientRects) {\n\t\tfunction isAtStart() {\n\t\t\tif (isText(container)) {\n\t\t\t\treturn offset === 0;\n\t\t\t}\n\n\t\t\treturn offset === 0;\n\t\t}\n\n\t\tfunction isAtEnd() {\n\t\t\tif (isText(container)) {\n\t\t\t\treturn offset >= container.data.length;\n\t\t\t}\n\n\t\t\treturn offset >= container.childNodes.length;\n\t\t}\n\n\t\tfunction toRange() {\n\t\t\tvar range;\n\n\t\t\trange = createRange(container.ownerDocument);\n\t\t\trange.setStart(container, offset);\n\t\t\trange.setEnd(container, offset);\n\n\t\t\treturn range;\n\t\t}\n\n\t\tfunction getClientRects() {\n\t\t\tif (!clientRects) {\n\t\t\t\tclientRects = getCaretPositionClientRects(new CaretPosition(container, offset));\n\t\t\t}\n\n\t\t\treturn clientRects;\n\t\t}\n\n\t\tfunction isVisible() {\n\t\t\treturn getClientRects().length > 0;\n\t\t}\n\n\t\tfunction isEqual(caretPosition) {\n\t\t\treturn caretPosition && container === caretPosition.container() && offset === caretPosition.offset();\n\t\t}\n\n\t\tfunction getNode(before) {\n\t\t\treturn resolveIndex(container, before ? offset - 1 : offset);\n\t\t}\n\n\t\treturn {\n\t\t\t/**\n\t\t\t * Returns the container node.\n\t\t\t *\n\t\t\t * @method container\n\t\t\t * @return {Node} Container node.\n\t\t\t */\n\t\t\tcontainer: Fun.constant(container),\n\n\t\t\t/**\n\t\t\t * Returns the offset within the container node.\n\t\t\t *\n\t\t\t * @method offset\n\t\t\t * @return {Number} Offset within the container node.\n\t\t\t */\n\t\t\toffset: Fun.constant(offset),\n\n\t\t\t/**\n\t\t\t * Returns a range out of a the caret position.\n\t\t\t *\n\t\t\t * @method toRange\n\t\t\t * @return {DOMRange} range for the caret position.\n\t\t\t */\n\t\t\ttoRange: toRange,\n\n\t\t\t/**\n\t\t\t * Returns the client rects for the caret position. Might be multiple rects between\n\t\t\t * block elements.\n\t\t\t *\n\t\t\t * @method getClientRects\n\t\t\t * @return {Array} Array of client rects.\n\t\t\t */\n\t\t\tgetClientRects: getClientRects,\n\n\t\t\t/**\n\t\t\t * Returns true if the caret location is visible/displayed on screen.\n\t\t\t *\n\t\t\t * @method isVisible\n\t\t\t * @return {Boolean} true/false if the position is visible or not.\n\t\t\t */\n\t\t\tisVisible: isVisible,\n\n\t\t\t/**\n\t\t\t * Returns true if the caret location is at the beginning of text node or container.\n\t\t\t *\n\t\t\t * @method isVisible\n\t\t\t * @return {Boolean} true/false if the position is at the beginning.\n\t\t\t */\n\t\t\tisAtStart: isAtStart,\n\n\t\t\t/**\n\t\t\t * Returns true if the caret location is at the end of text node or container.\n\t\t\t *\n\t\t\t * @method isVisible\n\t\t\t * @return {Boolean} true/false if the position is at the end.\n\t\t\t */\n\t\t\tisAtEnd: isAtEnd,\n\n\t\t\t/**\n\t\t\t * Compares the caret position to another caret position. This will only compare the\n\t\t\t * container and offset not it's visual position.\n\t\t\t *\n\t\t\t * @method isEqual\n\t\t\t * @param {tinymce.caret.CaretPosition} caretPosition Caret position to compare with.\n\t\t\t * @return {Boolean} true if the caret positions are equal.\n\t\t\t */\n\t\t\tisEqual: isEqual,\n\n\t\t\t/**\n\t\t\t * Returns the closest resolved node from a node index. That means if you have an offset after the\n\t\t\t * last node in a container it will return that last node.\n\t\t\t *\n\t\t\t * @method getNode\n\t\t\t * @return {Node} Node that is closest to the index.\n\t\t\t */\n\t\t\tgetNode: getNode\n\t\t};\n\t}\n\n\t/**\n\t * Creates a caret position from the start of a range.\n\t *\n\t * @method fromRangeStart\n\t * @param {DOMRange} range DOM Range to create caret position from.\n\t * @return {tinymce.caret.CaretPosition} Caret position from the start of DOM range.\n\t */\n\tCaretPosition.fromRangeStart = function(range) {\n\t\treturn new CaretPosition(range.startContainer, range.startOffset);\n\t};\n\n\t/**\n\t * Creates a caret position from the end of a range.\n\t *\n\t * @method fromRangeEnd\n\t * @param {DOMRange} range DOM Range to create caret position from.\n\t * @return {tinymce.caret.CaretPosition} Caret position from the end of DOM range.\n\t */\n\tCaretPosition.fromRangeEnd = function(range) {\n\t\treturn new CaretPosition(range.endContainer, range.endOffset);\n\t};\n\n\t/**\n\t * Creates a caret position from a node and places the offset after it.\n\t *\n\t * @method after\n\t * @param {Node} node Node to get caret position from.\n\t * @return {tinymce.caret.CaretPosition} Caret position from the node.\n\t */\n\tCaretPosition.after = function(node) {\n\t\treturn new CaretPosition(node.parentNode, nodeIndex(node) + 1);\n\t};\n\n\t/**\n\t * Creates a caret position from a node and places the offset before it.\n\t *\n\t * @method before\n\t * @param {Node} node Node to get caret position from.\n\t * @return {tinymce.caret.CaretPosition} Caret position from the node.\n\t */\n\tCaretPosition.before = function(node) {\n\t\treturn new CaretPosition(node.parentNode, nodeIndex(node));\n\t};\n\n\treturn CaretPosition;\n});\n\n// Included from: js/tinymce/classes/caret/CaretBookmark.js\n\n/**\n * CaretBookmark.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This module creates or resolves xpath like string representation of a CaretPositions.\n *\n * The format is a / separated list of chunks with:\n * [index|after|before]\n *\n * For example:\n * p[0]/b[0]/text()[0],1 =

      a|c

      \n * p[0]/img[0],before =

      |

      \n * p[0]/img[0],after =

      |

      \n *\n * @private\n * @static\n * @class tinymce.caret.CaretBookmark\n * @example\n * var bookmark = CaretBookmark.create(rootElm, CaretPosition.before(rootElm.firstChild));\n * var caretPosition = CaretBookmark.resolve(bookmark);\n */\ndefine('tinymce/caret/CaretBookmark', [\n\t'tinymce/dom/NodeType',\n\t'tinymce/dom/DOMUtils',\n\t'tinymce/util/Fun',\n\t'tinymce/util/Arr',\n\t'tinymce/caret/CaretPosition'\n], function(NodeType, DomUtils, Fun, Arr, CaretPosition) {\n\tvar isText = NodeType.isText,\n\t\tisBogus = NodeType.isBogus,\n\t\tnodeIndex = DomUtils.nodeIndex;\n\n\tfunction normalizedParent(node) {\n\t\tvar parentNode = node.parentNode;\n\n\t\tif (isBogus(parentNode)) {\n\t\t\treturn normalizedParent(parentNode);\n\t\t}\n\n\t\treturn parentNode;\n\t}\n\n\tfunction getChildNodes(node) {\n\t\tif (!node) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn Arr.reduce(node.childNodes, function(result, node) {\n\t\t\tif (isBogus(node) && node.nodeName != 'BR') {\n\t\t\t\tresult = result.concat(getChildNodes(node));\n\t\t\t} else {\n\t\t\t\tresult.push(node);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}, []);\n\t}\n\n\tfunction normalizedTextOffset(textNode, offset) {\n\t\twhile ((textNode = textNode.previousSibling)) {\n\t\t\tif (!isText(textNode)) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\toffset += textNode.data.length;\n\t\t}\n\n\t\treturn offset;\n\t}\n\n\tfunction equal(targetValue) {\n\t\treturn function(value) {\n\t\t\treturn targetValue === value;\n\t\t};\n\t}\n\n\tfunction normalizedNodeIndex(node) {\n\t\tvar nodes, index, numTextFragments;\n\n\t\tnodes = getChildNodes(normalizedParent(node));\n\t\tindex = Arr.findIndex(nodes, equal(node), node);\n\t\tnodes = nodes.slice(0, index + 1);\n\t\tnumTextFragments = Arr.reduce(nodes, function(result, node, i) {\n\t\t\tif (isText(node) && isText(nodes[i - 1])) {\n\t\t\t\tresult++;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}, 0);\n\n\t\tnodes = Arr.filter(nodes, NodeType.matchNodeNames(node.nodeName));\n\t\tindex = Arr.findIndex(nodes, equal(node), node);\n\n\t\treturn index - numTextFragments;\n\t}\n\n\tfunction createPathItem(node) {\n\t\tvar name;\n\n\t\tif (isText(node)) {\n\t\t\tname = 'text()';\n\t\t} else {\n\t\t\tname = node.nodeName.toLowerCase();\n\t\t}\n\n\t\treturn name + '[' + normalizedNodeIndex(node) + ']';\n\t}\n\n\tfunction parentsUntil(rootNode, node, predicate) {\n\t\tvar parents = [];\n\n\t\tfor (node = node.parentNode; node != rootNode; node = node.parentNode) {\n\t\t\tif (predicate && predicate(node)) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tparents.push(node);\n\t\t}\n\n\t\treturn parents;\n\t}\n\n\tfunction create(rootNode, caretPosition) {\n\t\tvar container, offset, path = [],\n\t\t\toutputOffset, childNodes, parents;\n\n\t\tcontainer = caretPosition.container();\n\t\toffset = caretPosition.offset();\n\n\t\tif (isText(container)) {\n\t\t\toutputOffset = normalizedTextOffset(container, offset);\n\t\t} else {\n\t\t\tchildNodes = container.childNodes;\n\t\t\tif (offset >= childNodes.length) {\n\t\t\t\toutputOffset = 'after';\n\t\t\t\toffset = childNodes.length - 1;\n\t\t\t} else {\n\t\t\t\toutputOffset = 'before';\n\t\t\t}\n\n\t\t\tcontainer = childNodes[offset];\n\t\t}\n\n\t\tpath.push(createPathItem(container));\n\t\tparents = parentsUntil(rootNode, container);\n\t\tparents = Arr.filter(parents, Fun.negate(NodeType.isBogus));\n\t\tpath = path.concat(Arr.map(parents, function(node) {\n\t\t\treturn createPathItem(node);\n\t\t}));\n\n\t\treturn path.reverse().join('/') + ',' + outputOffset;\n\t}\n\n\tfunction resolvePathItem(node, name, index) {\n\t\tvar nodes = getChildNodes(node);\n\n\t\tnodes = Arr.filter(nodes, function(node, index) {\n\t\t\treturn !isText(node) || !isText(nodes[index - 1]);\n\t\t});\n\n\t\tnodes = Arr.filter(nodes, NodeType.matchNodeNames(name));\n\t\treturn nodes[index];\n\t}\n\n\tfunction findTextPosition(container, offset) {\n\t\tvar node = container, targetOffset = 0, dataLen;\n\n\t\twhile (isText(node)) {\n\t\t\tdataLen = node.data.length;\n\n\t\t\tif (offset >= targetOffset && offset <= targetOffset + dataLen) {\n\t\t\t\tcontainer = node;\n\t\t\t\toffset = offset - targetOffset;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (!isText(node.nextSibling)) {\n\t\t\t\tcontainer = node;\n\t\t\t\toffset = dataLen;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttargetOffset += dataLen;\n\t\t\tnode = node.nextSibling;\n\t\t}\n\n\t\tif (offset > container.data.length) {\n\t\t\toffset = container.data.length;\n\t\t}\n\n\t\treturn new CaretPosition(container, offset);\n\t}\n\n\tfunction resolve(rootNode, path) {\n\t\tvar parts, container, offset;\n\n\t\tif (!path) {\n\t\t\treturn null;\n\t\t}\n\n\t\tparts = path.split(',');\n\t\tpath = parts[0].split('/');\n\t\toffset = parts.length > 1 ? parts[1] : 'before';\n\n\t\tcontainer = Arr.reduce(path, function(result, value) {\n\t\t\tvalue = /([\\w\\-\\(\\)]+)\\[([0-9]+)\\]/.exec(value);\n\t\t\tif (!value) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (value[1] === 'text()') {\n\t\t\t\tvalue[1] = '#text';\n\t\t\t}\n\n\t\t\treturn resolvePathItem(result, value[1], parseInt(value[2], 10));\n\t\t}, rootNode);\n\n\t\tif (!container) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!isText(container)) {\n\t\t\tif (offset === 'after') {\n\t\t\t\toffset = nodeIndex(container) + 1;\n\t\t\t} else {\n\t\t\t\toffset = nodeIndex(container);\n\t\t\t}\n\n\t\t\treturn new CaretPosition(container.parentNode, offset);\n\t\t}\n\n\t\treturn findTextPosition(container, parseInt(offset, 10));\n\t}\n\n\treturn {\n\t\t/**\n\t\t * Create a xpath bookmark location for the specified caret position.\n\t\t *\n\t\t * @method create\n\t\t * @param {Node} rootNode Root node to create bookmark within.\n\t\t * @param {tinymce.caret.CaretPosition} caretPosition Caret position within the root node.\n\t\t * @return {String} String xpath like location of caret position.\n\t\t */\n\t\tcreate: create,\n\n\t\t/**\n\t\t * Resolves a xpath like bookmark location to the a caret position.\n\t\t *\n\t\t * @method resolve\n\t\t * @param {Node} rootNode Root node to resolve xpath bookmark within.\n\t\t * @param {String} bookmark Bookmark string to resolve.\n\t\t * @return {tinymce.caret.CaretPosition} Caret position resolved from xpath like bookmark.\n\t\t */\n\t\tresolve: resolve\n\t};\n});\n\n// Included from: js/tinymce/classes/dom/BookmarkManager.js\n\n/**\n * BookmarkManager.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class handles selection bookmarks.\n *\n * @class tinymce.dom.BookmarkManager\n */\ndefine(\"tinymce/dom/BookmarkManager\", [\n\t\"tinymce/Env\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/caret/CaretContainer\",\n\t\"tinymce/caret/CaretBookmark\",\n\t\"tinymce/caret/CaretPosition\",\n\t\"tinymce/dom/NodeType\",\n\t\"tinymce/dom/RangeUtils\"\n], function(Env, Tools, CaretContainer, CaretBookmark, CaretPosition, NodeType, RangeUtils) {\n\tvar isContentEditableFalse = NodeType.isContentEditableFalse;\n\n\t/**\n\t * Constructs a new BookmarkManager instance for a specific selection instance.\n\t *\n\t * @constructor\n\t * @method BookmarkManager\n\t * @param {tinymce.dom.Selection} selection Selection instance to handle bookmarks for.\n\t */\n\tfunction BookmarkManager(selection) {\n\t\tvar dom = selection.dom;\n\n\t\t/**\n\t\t * Returns a bookmark location for the current selection. This bookmark object\n\t\t * can then be used to restore the selection after some content modification to the document.\n\t\t *\n\t\t * @method getBookmark\n\t\t * @param {Number} type Optional state if the bookmark should be simple or not. Default is complex.\n\t\t * @param {Boolean} normalized Optional state that enables you to get a position that it would be after normalization.\n\t\t * @return {Object} Bookmark object, use moveToBookmark with this object to restore the selection.\n\t\t * @example\n\t\t * // Stores a bookmark of the current selection\n\t\t * var bm = tinymce.activeEditor.selection.getBookmark();\n\t\t *\n\t\t * tinymce.activeEditor.setContent(tinymce.activeEditor.getContent() + 'Some new content');\n\t\t *\n\t\t * // Restore the selection bookmark\n\t\t * tinymce.activeEditor.selection.moveToBookmark(bm);\n\t\t */\n\t\tthis.getBookmark = function(type, normalized) {\n\t\t\tvar rng, rng2, id, collapsed, name, element, chr = '', styles;\n\n\t\t\tfunction findIndex(name, element) {\n\t\t\t\tvar count = 0;\n\n\t\t\t\tTools.each(dom.select(name), function(node) {\n\t\t\t\t\tif (node.getAttribute('data-mce-bogus') === 'all') {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (node == element) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tcount++;\n\t\t\t\t});\n\n\t\t\t\treturn count;\n\t\t\t}\n\n\t\t\tfunction normalizeTableCellSelection(rng) {\n\t\t\t\tfunction moveEndPoint(start) {\n\t\t\t\t\tvar container, offset, childNodes, prefix = start ? 'start' : 'end';\n\n\t\t\t\t\tcontainer = rng[prefix + 'Container'];\n\t\t\t\t\toffset = rng[prefix + 'Offset'];\n\n\t\t\t\t\tif (container.nodeType == 1 && container.nodeName == \"TR\") {\n\t\t\t\t\t\tchildNodes = container.childNodes;\n\t\t\t\t\t\tcontainer = childNodes[Math.min(start ? offset : offset - 1, childNodes.length - 1)];\n\t\t\t\t\t\tif (container) {\n\t\t\t\t\t\t\toffset = start ? 0 : container.childNodes.length;\n\t\t\t\t\t\t\trng['set' + (start ? 'Start' : 'End')](container, offset);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tmoveEndPoint(true);\n\t\t\t\tmoveEndPoint();\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\tfunction getLocation(rng) {\n\t\t\t\tvar root = dom.getRoot(), bookmark = {};\n\n\t\t\t\tfunction getPoint(rng, start) {\n\t\t\t\t\tvar container = rng[start ? 'startContainer' : 'endContainer'],\n\t\t\t\t\t\toffset = rng[start ? 'startOffset' : 'endOffset'], point = [], node, childNodes, after = 0;\n\n\t\t\t\t\tif (container.nodeType == 3) {\n\t\t\t\t\t\tif (normalized) {\n\t\t\t\t\t\t\tfor (node = container.previousSibling; node && node.nodeType == 3; node = node.previousSibling) {\n\t\t\t\t\t\t\t\toffset += node.nodeValue.length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpoint.push(offset);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchildNodes = container.childNodes;\n\n\t\t\t\t\t\tif (offset >= childNodes.length && childNodes.length) {\n\t\t\t\t\t\t\tafter = 1;\n\t\t\t\t\t\t\toffset = Math.max(0, childNodes.length - 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpoint.push(dom.nodeIndex(childNodes[offset], normalized) + after);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (; container && container != root; container = container.parentNode) {\n\t\t\t\t\t\tpoint.push(dom.nodeIndex(container, normalized));\n\t\t\t\t\t}\n\n\t\t\t\t\treturn point;\n\t\t\t\t}\n\n\t\t\t\tbookmark.start = getPoint(rng, true);\n\n\t\t\t\tif (!selection.isCollapsed()) {\n\t\t\t\t\tbookmark.end = getPoint(rng);\n\t\t\t\t}\n\n\t\t\t\treturn bookmark;\n\t\t\t}\n\n\t\t\tfunction findAdjacentContentEditableFalseElm(rng) {\n\t\t\t\tfunction findSibling(node, offset) {\n\t\t\t\t\tvar sibling;\n\n\t\t\t\t\tif (NodeType.isElement(node)) {\n\t\t\t\t\t\tnode = RangeUtils.getNode(node, offset);\n\t\t\t\t\t\tif (isContentEditableFalse(node)) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (CaretContainer.isCaretContainer(node)) {\n\t\t\t\t\t\tif (NodeType.isText(node) && CaretContainer.isCaretContainerBlock(node)) {\n\t\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsibling = node.previousSibling;\n\t\t\t\t\t\tif (isContentEditableFalse(sibling)) {\n\t\t\t\t\t\t\treturn sibling;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsibling = node.nextSibling;\n\t\t\t\t\t\tif (isContentEditableFalse(sibling)) {\n\t\t\t\t\t\t\treturn sibling;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn findSibling(rng.startContainer, rng.startOffset) || findSibling(rng.endContainer, rng.endOffset);\n\t\t\t}\n\n\t\t\tif (type == 2) {\n\t\t\t\telement = selection.getNode();\n\t\t\t\tname = element ? element.nodeName : null;\n\t\t\t\trng = selection.getRng();\n\n\t\t\t\tif (isContentEditableFalse(element) || name == 'IMG') {\n\t\t\t\t\treturn {name: name, index: findIndex(name, element)};\n\t\t\t\t}\n\n\t\t\t\tif (selection.tridentSel) {\n\t\t\t\t\treturn selection.tridentSel.getBookmark(type);\n\t\t\t\t}\n\n\t\t\t\telement = findAdjacentContentEditableFalseElm(rng);\n\t\t\t\tif (element) {\n\t\t\t\t\tname = element.tagName;\n\t\t\t\t\treturn {name: name, index: findIndex(name, element)};\n\t\t\t\t}\n\n\t\t\t\treturn getLocation(rng);\n\t\t\t}\n\n\t\t\tif (type == 3) {\n\t\t\t\trng = selection.getRng();\n\n\t\t\t\treturn {\n\t\t\t\t\tstart: CaretBookmark.create(dom.getRoot(), CaretPosition.fromRangeStart(rng)),\n\t\t\t\t\tend: CaretBookmark.create(dom.getRoot(), CaretPosition.fromRangeEnd(rng))\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Handle simple range\n\t\t\tif (type) {\n\t\t\t\treturn {rng: selection.getRng()};\n\t\t\t}\n\n\t\t\trng = selection.getRng();\n\t\t\tid = dom.uniqueId();\n\t\t\tcollapsed = selection.isCollapsed();\n\t\t\tstyles = 'overflow:hidden;line-height:0px';\n\n\t\t\t// Explorer method\n\t\t\tif (rng.duplicate || rng.item) {\n\t\t\t\t// Text selection\n\t\t\t\tif (!rng.item) {\n\t\t\t\t\trng2 = rng.duplicate();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Insert start marker\n\t\t\t\t\t\trng.collapse();\n\t\t\t\t\t\trng.pasteHTML('' + chr + '');\n\n\t\t\t\t\t\t// Insert end marker\n\t\t\t\t\t\tif (!collapsed) {\n\t\t\t\t\t\t\trng2.collapse(false);\n\n\t\t\t\t\t\t\t// Detect the empty space after block elements in IE and move the\n\t\t\t\t\t\t\t// end back one character

      ] becomes

      ]

      \n\t\t\t\t\t\t\trng.moveToElementText(rng2.parentElement());\n\t\t\t\t\t\t\tif (rng.compareEndPoints('StartToEnd', rng2) === 0) {\n\t\t\t\t\t\t\t\trng2.move('character', -1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\trng2.pasteHTML('' + chr + '');\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t// IE might throw unspecified error so lets ignore it\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Control selection\n\t\t\t\t\telement = rng.item(0);\n\t\t\t\t\tname = element.nodeName;\n\n\t\t\t\t\treturn {name: name, index: findIndex(name, element)};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\telement = selection.getNode();\n\t\t\t\tname = element.nodeName;\n\t\t\t\tif (name == 'IMG') {\n\t\t\t\t\treturn {name: name, index: findIndex(name, element)};\n\t\t\t\t}\n\n\t\t\t\t// W3C method\n\t\t\t\trng2 = normalizeTableCellSelection(rng.cloneRange());\n\n\t\t\t\t// Insert end marker\n\t\t\t\tif (!collapsed) {\n\t\t\t\t\trng2.collapse(false);\n\t\t\t\t\trng2.insertNode(dom.create('span', {'data-mce-type': \"bookmark\", id: id + '_end', style: styles}, chr));\n\t\t\t\t}\n\n\t\t\t\trng = normalizeTableCellSelection(rng);\n\t\t\t\trng.collapse(true);\n\t\t\t\trng.insertNode(dom.create('span', {'data-mce-type': \"bookmark\", id: id + '_start', style: styles}, chr));\n\t\t\t}\n\n\t\t\tselection.moveToBookmark({id: id, keep: 1});\n\n\t\t\treturn {id: id};\n\t\t};\n\n\t\t/**\n\t\t * Restores the selection to the specified bookmark.\n\t\t *\n\t\t * @method moveToBookmark\n\t\t * @param {Object} bookmark Bookmark to restore selection from.\n\t\t * @return {Boolean} true/false if it was successful or not.\n\t\t * @example\n\t\t * // Stores a bookmark of the current selection\n\t\t * var bm = tinymce.activeEditor.selection.getBookmark();\n\t\t *\n\t\t * tinymce.activeEditor.setContent(tinymce.activeEditor.getContent() + 'Some new content');\n\t\t *\n\t\t * // Restore the selection bookmark\n\t\t * tinymce.activeEditor.selection.moveToBookmark(bm);\n\t\t */\n\t\tthis.moveToBookmark = function(bookmark) {\n\t\t\tvar rng, root, startContainer, endContainer, startOffset, endOffset;\n\n\t\t\tfunction setEndPoint(start) {\n\t\t\t\tvar point = bookmark[start ? 'start' : 'end'], i, node, offset, children;\n\n\t\t\t\tif (point) {\n\t\t\t\t\toffset = point[0];\n\n\t\t\t\t\t// Find container node\n\t\t\t\t\tfor (node = root, i = point.length - 1; i >= 1; i--) {\n\t\t\t\t\t\tchildren = node.childNodes;\n\n\t\t\t\t\t\tif (point[i] > children.length - 1) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode = children[point[i]];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Move text offset to best suitable location\n\t\t\t\t\tif (node.nodeType === 3) {\n\t\t\t\t\t\toffset = Math.min(point[0], node.nodeValue.length);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Move element offset to best suitable location\n\t\t\t\t\tif (node.nodeType === 1) {\n\t\t\t\t\t\toffset = Math.min(point[0], node.childNodes.length);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set offset within container node\n\t\t\t\t\tif (start) {\n\t\t\t\t\t\trng.setStart(node, offset);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setEnd(node, offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tfunction restoreEndPoint(suffix) {\n\t\t\t\tvar marker = dom.get(bookmark.id + '_' + suffix), node, idx, next, prev, keep = bookmark.keep;\n\n\t\t\t\tif (marker) {\n\t\t\t\t\tnode = marker.parentNode;\n\n\t\t\t\t\tif (suffix == 'start') {\n\t\t\t\t\t\tif (!keep) {\n\t\t\t\t\t\t\tidx = dom.nodeIndex(marker);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnode = marker.firstChild;\n\t\t\t\t\t\t\tidx = 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstartContainer = endContainer = node;\n\t\t\t\t\t\tstartOffset = endOffset = idx;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!keep) {\n\t\t\t\t\t\t\tidx = dom.nodeIndex(marker);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnode = marker.firstChild;\n\t\t\t\t\t\t\tidx = 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tendContainer = node;\n\t\t\t\t\t\tendOffset = idx;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!keep) {\n\t\t\t\t\t\tprev = marker.previousSibling;\n\t\t\t\t\t\tnext = marker.nextSibling;\n\n\t\t\t\t\t\t// Remove all marker text nodes\n\t\t\t\t\t\tTools.each(Tools.grep(marker.childNodes), function(node) {\n\t\t\t\t\t\t\tif (node.nodeType == 3) {\n\t\t\t\t\t\t\t\tnode.nodeValue = node.nodeValue.replace(/\\uFEFF/g, '');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// Remove marker but keep children if for example contents where inserted into the marker\n\t\t\t\t\t\t// Also remove duplicated instances of the marker for example by a\n\t\t\t\t\t\t// split operation or by WebKit auto split on paste feature\n\t\t\t\t\t\twhile ((marker = dom.get(bookmark.id + '_' + suffix))) {\n\t\t\t\t\t\t\tdom.remove(marker, 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If siblings are text nodes then merge them unless it's Opera since it some how removes the node\n\t\t\t\t\t\t// and we are sniffing since adding a lot of detection code for a browser with 3% of the market\n\t\t\t\t\t\t// isn't worth the effort. Sorry, Opera but it's just a fact\n\t\t\t\t\t\tif (prev && next && prev.nodeType == next.nodeType && prev.nodeType == 3 && !Env.opera) {\n\t\t\t\t\t\t\tidx = prev.nodeValue.length;\n\t\t\t\t\t\t\tprev.appendData(next.nodeValue);\n\t\t\t\t\t\t\tdom.remove(next);\n\n\t\t\t\t\t\t\tif (suffix == 'start') {\n\t\t\t\t\t\t\t\tstartContainer = endContainer = prev;\n\t\t\t\t\t\t\t\tstartOffset = endOffset = idx;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tendContainer = prev;\n\t\t\t\t\t\t\t\tendOffset = idx;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction addBogus(node) {\n\t\t\t\t// Adds a bogus BR element for empty block elements\n\t\t\t\tif (dom.isBlock(node) && !node.innerHTML && !Env.ie) {\n\t\t\t\t\tnode.innerHTML = '
      ';\n\t\t\t\t}\n\n\t\t\t\treturn node;\n\t\t\t}\n\n\t\t\tfunction resolveCaretPositionBookmark() {\n\t\t\t\tvar rng, pos;\n\n\t\t\t\trng = dom.createRng();\n\t\t\t\tpos = CaretBookmark.resolve(dom.getRoot(), bookmark.start);\n\t\t\t\trng.setStart(pos.container(), pos.offset());\n\n\t\t\t\tpos = CaretBookmark.resolve(dom.getRoot(), bookmark.end);\n\t\t\t\trng.setEnd(pos.container(), pos.offset());\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\tif (bookmark) {\n\t\t\t\tif (Tools.isArray(bookmark.start)) {\n\t\t\t\t\trng = dom.createRng();\n\t\t\t\t\troot = dom.getRoot();\n\n\t\t\t\t\tif (selection.tridentSel) {\n\t\t\t\t\t\treturn selection.tridentSel.moveToBookmark(bookmark);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (setEndPoint(true) && setEndPoint()) {\n\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof bookmark.start == 'string') {\n\t\t\t\t\tselection.setRng(resolveCaretPositionBookmark(bookmark));\n\t\t\t\t} else if (bookmark.id) {\n\t\t\t\t\t// Restore start/end points\n\t\t\t\t\trestoreEndPoint('start');\n\t\t\t\t\trestoreEndPoint('end');\n\n\t\t\t\t\tif (startContainer) {\n\t\t\t\t\t\trng = dom.createRng();\n\t\t\t\t\t\trng.setStart(addBogus(startContainer), startOffset);\n\t\t\t\t\t\trng.setEnd(addBogus(endContainer), endOffset);\n\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t}\n\t\t\t\t} else if (bookmark.name) {\n\t\t\t\t\tselection.select(dom.select(bookmark.name)[bookmark.index]);\n\t\t\t\t} else if (bookmark.rng) {\n\t\t\t\t\tselection.setRng(bookmark.rng);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Returns true/false if the specified node is a bookmark node or not.\n\t *\n\t * @static\n\t * @method isBookmarkNode\n\t * @param {DOMNode} node DOM Node to check if it's a bookmark node or not.\n\t * @return {Boolean} true/false if the node is a bookmark node or not.\n\t */\n\tBookmarkManager.isBookmarkNode = function(node) {\n\t\treturn node && node.tagName === 'SPAN' && node.getAttribute('data-mce-type') === 'bookmark';\n\t};\n\n\treturn BookmarkManager;\n});\n\n// Included from: js/tinymce/classes/dom/Selection.js\n\n/**\n * Selection.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class handles text and control selection it's an crossbrowser utility class.\n * Consult the TinyMCE Wiki API for more details and examples on how to use this class.\n *\n * @class tinymce.dom.Selection\n * @example\n * // Getting the currently selected node for the active editor\n * alert(tinymce.activeEditor.selection.getNode().nodeName);\n */\ndefine(\"tinymce/dom/Selection\", [\n\t\"tinymce/dom/TreeWalker\",\n\t\"tinymce/dom/TridentSelection\",\n\t\"tinymce/dom/ControlSelection\",\n\t\"tinymce/dom/RangeUtils\",\n\t\"tinymce/dom/BookmarkManager\",\n\t\"tinymce/dom/NodeType\",\n\t\"tinymce/html/Serializer\",\n\t\"tinymce/Env\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/caret/CaretPosition\"\n], function(TreeWalker, TridentSelection, ControlSelection, RangeUtils, BookmarkManager, NodeType, Serializer, Env, Tools, CaretPosition) {\n\tvar each = Tools.each, trim = Tools.trim, extend = Tools.extend;\n\tvar isIE = Env.ie;\n\n\t/**\n\t * Constructs a new selection instance.\n\t *\n\t * @constructor\n\t * @method Selection\n\t * @param {tinymce.dom.DOMUtils} dom DOMUtils object reference.\n\t * @param {Window} win Window to bind the selection object to.\n\t * @param {tinymce.Editor} editor Editor instance of the selection.\n\t * @param {tinymce.dom.Serializer} serializer DOM serialization class to use for getContent.\n\t */\n\tfunction Selection(dom, win, serializer, editor) {\n\t\tvar self = this;\n\n\t\tself.dom = dom;\n\t\tself.win = win;\n\t\tself.serializer = serializer;\n\t\tself.editor = editor;\n\t\tself.bookmarkManager = new BookmarkManager(self);\n\t\tself.controlSelection = new ControlSelection(self, editor);\n\n\t\t// No W3C Range support\n\t\tif (!self.win.getSelection) {\n\t\t\tself.tridentSel = new TridentSelection(self);\n\t\t}\n\t}\n\n\tSelection.prototype = {\n\t\t/**\n\t\t * Move the selection cursor range to the specified node and offset.\n\t\t * If there is no node specified it will move it to the first suitable location within the body.\n\t\t *\n\t\t * @method setCursorLocation\n\t\t * @param {Node} node Optional node to put the cursor in.\n\t\t * @param {Number} offset Optional offset from the start of the node to put the cursor at.\n\t\t */\n\t\tsetCursorLocation: function(node, offset) {\n\t\t\tvar self = this, rng = self.dom.createRng();\n\n\t\t\tif (!node) {\n\t\t\t\tself._moveEndPoint(rng, self.editor.getBody(), true);\n\t\t\t\tself.setRng(rng);\n\t\t\t} else {\n\t\t\t\trng.setStart(node, offset);\n\t\t\t\trng.setEnd(node, offset);\n\t\t\t\tself.setRng(rng);\n\t\t\t\tself.collapse(false);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns the selected contents using the DOM serializer passed in to this class.\n\t\t *\n\t\t * @method getContent\n\t\t * @param {Object} args Optional settings class with for example output format text or html.\n\t\t * @return {String} Selected contents in for example HTML format.\n\t\t * @example\n\t\t * // Alerts the currently selected contents\n\t\t * alert(tinymce.activeEditor.selection.getContent());\n\t\t *\n\t\t * // Alerts the currently selected contents as plain text\n\t\t * alert(tinymce.activeEditor.selection.getContent({format: 'text'}));\n\t\t */\n\t\tgetContent: function(args) {\n\t\t\tvar self = this, rng = self.getRng(), tmpElm = self.dom.create(\"body\");\n\t\t\tvar se = self.getSel(), whiteSpaceBefore, whiteSpaceAfter, fragment;\n\n\t\t\targs = args || {};\n\t\t\twhiteSpaceBefore = whiteSpaceAfter = '';\n\t\t\targs.get = true;\n\t\t\targs.format = args.format || 'html';\n\t\t\targs.selection = true;\n\t\t\tself.editor.fire('BeforeGetContent', args);\n\n\t\t\tif (args.format == 'text') {\n\t\t\t\treturn self.isCollapsed() ? '' : (rng.text || (se.toString ? se.toString() : ''));\n\t\t\t}\n\n\t\t\tif (rng.cloneContents) {\n\t\t\t\tfragment = rng.cloneContents();\n\n\t\t\t\tif (fragment) {\n\t\t\t\t\ttmpElm.appendChild(fragment);\n\t\t\t\t}\n\t\t\t} else if (rng.item !== undefined || rng.htmlText !== undefined) {\n\t\t\t\t// IE will produce invalid markup if elements are present that\n\t\t\t\t// it doesn't understand like custom elements or HTML5 elements.\n\t\t\t\t// Adding a BR in front of the contents and then remoiving it seems to fix it though.\n\t\t\t\ttmpElm.innerHTML = '
      ' + (rng.item ? rng.item(0).outerHTML : rng.htmlText);\n\t\t\t\ttmpElm.removeChild(tmpElm.firstChild);\n\t\t\t} else {\n\t\t\t\ttmpElm.innerHTML = rng.toString();\n\t\t\t}\n\n\t\t\t// Keep whitespace before and after\n\t\t\tif (/^\\s/.test(tmpElm.innerHTML)) {\n\t\t\t\twhiteSpaceBefore = ' ';\n\t\t\t}\n\n\t\t\tif (/\\s+$/.test(tmpElm.innerHTML)) {\n\t\t\t\twhiteSpaceAfter = ' ';\n\t\t\t}\n\n\t\t\targs.getInner = true;\n\n\t\t\targs.content = self.isCollapsed() ? '' : whiteSpaceBefore + self.serializer.serialize(tmpElm, args) + whiteSpaceAfter;\n\t\t\tself.editor.fire('GetContent', args);\n\n\t\t\treturn args.content;\n\t\t},\n\n\t\t/**\n\t\t * Sets the current selection to the specified content. If any contents is selected it will be replaced\n\t\t * with the contents passed in to this function. If there is no selection the contents will be inserted\n\t\t * where the caret is placed in the editor/page.\n\t\t *\n\t\t * @method setContent\n\t\t * @param {String} content HTML contents to set could also be other formats depending on settings.\n\t\t * @param {Object} args Optional settings object with for example data format.\n\t\t * @example\n\t\t * // Inserts some HTML contents at the current selection\n\t\t * tinymce.activeEditor.selection.setContent('Some contents');\n\t\t */\n\t\tsetContent: function(content, args) {\n\t\t\tvar self = this, rng = self.getRng(), caretNode, doc = self.win.document, frag, temp;\n\n\t\t\targs = args || {format: 'html'};\n\t\t\targs.set = true;\n\t\t\targs.selection = true;\n\t\t\targs.content = content;\n\n\t\t\t// Dispatch before set content event\n\t\t\tif (!args.no_events) {\n\t\t\t\tself.editor.fire('BeforeSetContent', args);\n\t\t\t}\n\n\t\t\tif (args.format !== 'raw') {\n\t\t\t\tvar node = self.editor.parser.parse(args.content, extend({isRootContent: true, forced_root_block: false}, args));\n\t\t\t\tcontent = new Serializer({validate: self.editor.settings.validate}, self.editor.schema).serialize(node);\n\t\t\t} else {\n\t\t\t\tcontent = args.content;\n\t\t\t}\n\n\t\t\tif (rng.insertNode) {\n\t\t\t\t// Make caret marker since insertNode places the caret in the beginning of text after insert\n\t\t\t\tcontent += '_';\n\n\t\t\t\t// Delete and insert new node\n\t\t\t\tif (rng.startContainer == doc && rng.endContainer == doc) {\n\t\t\t\t\t// WebKit will fail if the body is empty since the range is then invalid and it can't insert contents\n\t\t\t\t\tdoc.body.innerHTML = content;\n\t\t\t\t} else {\n\t\t\t\t\trng.deleteContents();\n\n\t\t\t\t\tif (doc.body.childNodes.length === 0) {\n\t\t\t\t\t\tdoc.body.innerHTML = content;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// createContextualFragment doesn't exists in IE 9 DOMRanges\n\t\t\t\t\t\tif (rng.createContextualFragment) {\n\t\t\t\t\t\t\trng.insertNode(rng.createContextualFragment(content));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Fake createContextualFragment call in IE 9\n\t\t\t\t\t\t\tfrag = doc.createDocumentFragment();\n\t\t\t\t\t\t\ttemp = doc.createElement('div');\n\n\t\t\t\t\t\t\tfrag.appendChild(temp);\n\t\t\t\t\t\t\ttemp.outerHTML = content;\n\n\t\t\t\t\t\t\trng.insertNode(frag);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Move to caret marker\n\t\t\t\tcaretNode = self.dom.get('__caret');\n\n\t\t\t\t// Make sure we wrap it compleatly, Opera fails with a simple select call\n\t\t\t\trng = doc.createRange();\n\t\t\t\trng.setStartBefore(caretNode);\n\t\t\t\trng.setEndBefore(caretNode);\n\t\t\t\tself.setRng(rng);\n\n\t\t\t\t// Remove the caret position\n\t\t\t\tself.dom.remove('__caret');\n\n\t\t\t\ttry {\n\t\t\t\t\tself.setRng(rng);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Might fail on Opera for some odd reason\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (rng.item) {\n\t\t\t\t\t// Delete content and get caret text selection\n\t\t\t\t\tdoc.execCommand('Delete', false, null);\n\t\t\t\t\trng = self.getRng();\n\t\t\t\t}\n\n\t\t\t\t// Explorer removes spaces from the beginning of pasted contents\n\t\t\t\tif (/^\\s+/.test(content)) {\n\t\t\t\t\trng.pasteHTML('_' + content);\n\t\t\t\t\tself.dom.remove('__mce_tmp');\n\t\t\t\t} else {\n\t\t\t\t\trng.pasteHTML(content);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Dispatch set content event\n\t\t\tif (!args.no_events) {\n\t\t\t\tself.editor.fire('SetContent', args);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns the start element of a selection range. If the start is in a text\n\t\t * node the parent element will be returned.\n\t\t *\n\t\t * @method getStart\n\t\t * @param {Boolean} real Optional state to get the real parent when the selection is collapsed not the closest element.\n\t\t * @return {Element} Start element of selection range.\n\t\t */\n\t\tgetStart: function(real) {\n\t\t\tvar self = this, rng = self.getRng(), startElement, parentElement, checkRng, node;\n\n\t\t\tif (rng.duplicate || rng.item) {\n\t\t\t\t// Control selection, return first item\n\t\t\t\tif (rng.item) {\n\t\t\t\t\treturn rng.item(0);\n\t\t\t\t}\n\n\t\t\t\t// Get start element\n\t\t\t\tcheckRng = rng.duplicate();\n\t\t\t\tcheckRng.collapse(1);\n\t\t\t\tstartElement = checkRng.parentElement();\n\t\t\t\tif (startElement.ownerDocument !== self.dom.doc) {\n\t\t\t\t\tstartElement = self.dom.getRoot();\n\t\t\t\t}\n\n\t\t\t\t// Check if range parent is inside the start element, then return the inner parent element\n\t\t\t\t// This will fix issues when a single element is selected, IE would otherwise return the wrong start element\n\t\t\t\tparentElement = node = rng.parentElement();\n\t\t\t\twhile ((node = node.parentNode)) {\n\t\t\t\t\tif (node == startElement) {\n\t\t\t\t\t\tstartElement = parentElement;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn startElement;\n\t\t\t}\n\n\t\t\tstartElement = rng.startContainer;\n\n\t\t\tif (startElement.nodeType == 1 && startElement.hasChildNodes()) {\n\t\t\t\tif (!real || !rng.collapsed) {\n\t\t\t\t\tstartElement = startElement.childNodes[Math.min(startElement.childNodes.length - 1, rng.startOffset)];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (startElement && startElement.nodeType == 3) {\n\t\t\t\treturn startElement.parentNode;\n\t\t\t}\n\n\t\t\treturn startElement;\n\t\t},\n\n\t\t/**\n\t\t * Returns the end element of a selection range. If the end is in a text\n\t\t * node the parent element will be returned.\n\t\t *\n\t\t * @method getEnd\n\t\t * @param {Boolean} real Optional state to get the real parent when the selection is collapsed not the closest element.\n\t\t * @return {Element} End element of selection range.\n\t\t */\n\t\tgetEnd: function(real) {\n\t\t\tvar self = this, rng = self.getRng(), endElement, endOffset;\n\n\t\t\tif (rng.duplicate || rng.item) {\n\t\t\t\tif (rng.item) {\n\t\t\t\t\treturn rng.item(0);\n\t\t\t\t}\n\n\t\t\t\trng = rng.duplicate();\n\t\t\t\trng.collapse(0);\n\t\t\t\tendElement = rng.parentElement();\n\t\t\t\tif (endElement.ownerDocument !== self.dom.doc) {\n\t\t\t\t\tendElement = self.dom.getRoot();\n\t\t\t\t}\n\n\t\t\t\tif (endElement && endElement.nodeName == 'BODY') {\n\t\t\t\t\treturn endElement.lastChild || endElement;\n\t\t\t\t}\n\n\t\t\t\treturn endElement;\n\t\t\t}\n\n\t\t\tendElement = rng.endContainer;\n\t\t\tendOffset = rng.endOffset;\n\n\t\t\tif (endElement.nodeType == 1 && endElement.hasChildNodes()) {\n\t\t\t\tif (!real || !rng.collapsed) {\n\t\t\t\t\tendElement = endElement.childNodes[endOffset > 0 ? endOffset - 1 : endOffset];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (endElement && endElement.nodeType == 3) {\n\t\t\t\treturn endElement.parentNode;\n\t\t\t}\n\n\t\t\treturn endElement;\n\t\t},\n\n\t\t/**\n\t\t * Returns a bookmark location for the current selection. This bookmark object\n\t\t * can then be used to restore the selection after some content modification to the document.\n\t\t *\n\t\t * @method getBookmark\n\t\t * @param {Number} type Optional state if the bookmark should be simple or not. Default is complex.\n\t\t * @param {Boolean} normalized Optional state that enables you to get a position that it would be after normalization.\n\t\t * @return {Object} Bookmark object, use moveToBookmark with this object to restore the selection.\n\t\t * @example\n\t\t * // Stores a bookmark of the current selection\n\t\t * var bm = tinymce.activeEditor.selection.getBookmark();\n\t\t *\n\t\t * tinymce.activeEditor.setContent(tinymce.activeEditor.getContent() + 'Some new content');\n\t\t *\n\t\t * // Restore the selection bookmark\n\t\t * tinymce.activeEditor.selection.moveToBookmark(bm);\n\t\t */\n\t\tgetBookmark: function(type, normalized) {\n\t\t\treturn this.bookmarkManager.getBookmark(type, normalized);\n\t\t},\n\n\t\t/**\n\t\t * Restores the selection to the specified bookmark.\n\t\t *\n\t\t * @method moveToBookmark\n\t\t * @param {Object} bookmark Bookmark to restore selection from.\n\t\t * @return {Boolean} true/false if it was successful or not.\n\t\t * @example\n\t\t * // Stores a bookmark of the current selection\n\t\t * var bm = tinymce.activeEditor.selection.getBookmark();\n\t\t *\n\t\t * tinymce.activeEditor.setContent(tinymce.activeEditor.getContent() + 'Some new content');\n\t\t *\n\t\t * // Restore the selection bookmark\n\t\t * tinymce.activeEditor.selection.moveToBookmark(bm);\n\t\t */\n\t\tmoveToBookmark: function(bookmark) {\n\t\t\treturn this.bookmarkManager.moveToBookmark(bookmark);\n\t\t},\n\n\t\t/**\n\t\t * Selects the specified element. This will place the start and end of the selection range around the element.\n\t\t *\n\t\t * @method select\n\t\t * @param {Element} node HTML DOM element to select.\n\t\t * @param {Boolean} content Optional bool state if the contents should be selected or not on non IE browser.\n\t\t * @return {Element} Selected element the same element as the one that got passed in.\n\t\t * @example\n\t\t * // Select the first paragraph in the active editor\n\t\t * tinymce.activeEditor.selection.select(tinymce.activeEditor.dom.select('p')[0]);\n\t\t */\n\t\tselect: function(node, content) {\n\t\t\tvar self = this, dom = self.dom, rng = dom.createRng(), idx;\n\n\t\t\t// Clear stored range set by FocusManager\n\t\t\tself.lastFocusBookmark = null;\n\n\t\t\tif (node) {\n\t\t\t\tif (!content && self.controlSelection.controlSelect(node)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tidx = dom.nodeIndex(node);\n\t\t\t\trng.setStart(node.parentNode, idx);\n\t\t\t\trng.setEnd(node.parentNode, idx + 1);\n\n\t\t\t\t// Find first/last text node or BR element\n\t\t\t\tif (content) {\n\t\t\t\t\tself._moveEndPoint(rng, node, true);\n\t\t\t\t\tself._moveEndPoint(rng, node);\n\t\t\t\t}\n\n\t\t\t\tself.setRng(rng);\n\t\t\t}\n\n\t\t\treturn node;\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the selection range is collapsed or not. Collapsed means if it's a caret or a larger selection.\n\t\t *\n\t\t * @method isCollapsed\n\t\t * @return {Boolean} true/false state if the selection range is collapsed or not.\n\t\t * Collapsed means if it's a caret or a larger selection.\n\t\t */\n\t\tisCollapsed: function() {\n\t\t\tvar self = this, rng = self.getRng(), sel = self.getSel();\n\n\t\t\tif (!rng || rng.item) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (rng.compareEndPoints) {\n\t\t\t\treturn rng.compareEndPoints('StartToEnd', rng) === 0;\n\t\t\t}\n\n\t\t\treturn !sel || rng.collapsed;\n\t\t},\n\n\t\t/**\n\t\t * Collapse the selection to start or end of range.\n\t\t *\n\t\t * @method collapse\n\t\t * @param {Boolean} toStart Optional boolean state if to collapse to end or not. Defaults to false.\n\t\t */\n\t\tcollapse: function(toStart) {\n\t\t\tvar self = this, rng = self.getRng(), node;\n\n\t\t\t// Control range on IE\n\t\t\tif (rng.item) {\n\t\t\t\tnode = rng.item(0);\n\t\t\t\trng = self.win.document.body.createTextRange();\n\t\t\t\trng.moveToElementText(node);\n\t\t\t}\n\n\t\t\trng.collapse(!!toStart);\n\t\t\tself.setRng(rng);\n\t\t},\n\n\t\t/**\n\t\t * Returns the browsers internal selection object.\n\t\t *\n\t\t * @method getSel\n\t\t * @return {Selection} Internal browser selection object.\n\t\t */\n\t\tgetSel: function() {\n\t\t\tvar win = this.win;\n\n\t\t\treturn win.getSelection ? win.getSelection() : win.document.selection;\n\t\t},\n\n\t\t/**\n\t\t * Returns the browsers internal range object.\n\t\t *\n\t\t * @method getRng\n\t\t * @param {Boolean} w3c Forces a compatible W3C range on IE.\n\t\t * @return {Range} Internal browser range object.\n\t\t * @see http://www.quirksmode.org/dom/range_intro.html\n\t\t * @see http://www.dotvoid.com/2001/03/using-the-range-object-in-mozilla/\n\t\t */\n\t\tgetRng: function(w3c) {\n\t\t\tvar self = this, selection, rng, elm, doc, ieRng, evt;\n\n\t\t\tfunction tryCompareBoundaryPoints(how, sourceRange, destinationRange) {\n\t\t\t\ttry {\n\t\t\t\t\treturn sourceRange.compareBoundaryPoints(how, destinationRange);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Gecko throws wrong document exception if the range points\n\t\t\t\t\t// to nodes that where removed from the dom #6690\n\t\t\t\t\t// Browsers should mutate existing DOMRange instances so that they always point\n\t\t\t\t\t// to something in the document this is not the case in Gecko works fine in IE/WebKit/Blink\n\t\t\t\t\t// For performance reasons just return -1\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!self.win) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tdoc = self.win.document;\n\n\t\t\tif (typeof doc === 'undefined' || doc === null) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Use last rng passed from FocusManager if it's available this enables\n\t\t\t// calls to editor.selection.getStart() to work when caret focus is lost on IE\n\t\t\tif (!w3c && self.lastFocusBookmark) {\n\t\t\t\tvar bookmark = self.lastFocusBookmark;\n\n\t\t\t\t// Convert bookmark to range IE 11 fix\n\t\t\t\tif (bookmark.startContainer) {\n\t\t\t\t\trng = doc.createRange();\n\t\t\t\t\trng.setStart(bookmark.startContainer, bookmark.startOffset);\n\t\t\t\t\trng.setEnd(bookmark.endContainer, bookmark.endOffset);\n\t\t\t\t} else {\n\t\t\t\t\trng = bookmark;\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\t// Found tridentSel object then we need to use that one\n\t\t\tif (w3c && self.tridentSel) {\n\t\t\t\treturn self.tridentSel.getRangeAt(0);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tif ((selection = self.getSel())) {\n\t\t\t\t\tif (selection.rangeCount > 0) {\n\t\t\t\t\t\trng = selection.getRangeAt(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng = selection.createRange ? selection.createRange() : doc.createRange();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (ex) {\n\t\t\t\t// IE throws unspecified error here if TinyMCE is placed in a frame/iframe\n\t\t\t}\n\n\t\t\tevt = self.editor.fire('GetSelectionRange', {range: rng});\n\t\t\tif (evt.range !== rng) {\n\t\t\t\treturn evt.range;\n\t\t\t}\n\n\t\t\t// We have W3C ranges and it's IE then fake control selection since IE9 doesn't handle that correctly yet\n\t\t\t// IE 11 doesn't support the selection object so we check for that as well\n\t\t\tif (isIE && rng && rng.setStart && doc.selection) {\n\t\t\t\ttry {\n\t\t\t\t\t// IE will sometimes throw an exception here\n\t\t\t\t\tieRng = doc.selection.createRange();\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Ignore\n\t\t\t\t}\n\n\t\t\t\tif (ieRng && ieRng.item) {\n\t\t\t\t\telm = ieRng.item(0);\n\t\t\t\t\trng = doc.createRange();\n\t\t\t\t\trng.setStartBefore(elm);\n\t\t\t\t\trng.setEndAfter(elm);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// No range found then create an empty one\n\t\t\t// This can occur when the editor is placed in a hidden container element on Gecko\n\t\t\t// Or on IE when there was an exception\n\t\t\tif (!rng) {\n\t\t\t\trng = doc.createRange ? doc.createRange() : doc.body.createTextRange();\n\t\t\t}\n\n\t\t\t// If range is at start of document then move it to start of body\n\t\t\tif (rng.setStart && rng.startContainer.nodeType === 9 && rng.collapsed) {\n\t\t\t\telm = self.dom.getRoot();\n\t\t\t\trng.setStart(elm, 0);\n\t\t\t\trng.setEnd(elm, 0);\n\t\t\t}\n\n\t\t\tif (self.selectedRange && self.explicitRange) {\n\t\t\t\tif (tryCompareBoundaryPoints(rng.START_TO_START, rng, self.selectedRange) === 0 &&\n\t\t\t\t\ttryCompareBoundaryPoints(rng.END_TO_END, rng, self.selectedRange) === 0) {\n\t\t\t\t\t// Safari, Opera and Chrome only ever select text which causes the range to change.\n\t\t\t\t\t// This lets us use the originally set range if the selection hasn't been changed by the user.\n\t\t\t\t\trng = self.explicitRange;\n\t\t\t\t} else {\n\t\t\t\t\tself.selectedRange = null;\n\t\t\t\t\tself.explicitRange = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn rng;\n\t\t},\n\n\t\t/**\n\t\t * Changes the selection to the specified DOM range.\n\t\t *\n\t\t * @method setRng\n\t\t * @param {Range} rng Range to select.\n\t\t * @param {Boolean} forward Optional boolean if the selection is forwards or backwards.\n\t\t */\n\t\tsetRng: function(rng, forward) {\n\t\t\tvar self = this, sel, node, evt;\n\n\t\t\tif (!rng) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Is IE specific range\n\t\t\tif (rng.select) {\n\t\t\t\tself.explicitRange = null;\n\n\t\t\t\ttry {\n\t\t\t\t\trng.select();\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Needed for some odd IE bug #1843306\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!self.tridentSel) {\n\t\t\t\tsel = self.getSel();\n\n\t\t\t\tevt = self.editor.fire('SetSelectionRange', {range: rng});\n\t\t\t\trng = evt.range;\n\n\t\t\t\tif (sel) {\n\t\t\t\t\tself.explicitRange = rng;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsel.removeAllRanges();\n\t\t\t\t\t\tsel.addRange(rng);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t// IE might throw errors here if the editor is within a hidden container and selection is changed\n\t\t\t\t\t}\n\n\t\t\t\t\t// Forward is set to false and we have an extend function\n\t\t\t\t\tif (forward === false && sel.extend) {\n\t\t\t\t\t\tsel.collapse(rng.endContainer, rng.endOffset);\n\t\t\t\t\t\tsel.extend(rng.startContainer, rng.startOffset);\n\t\t\t\t\t}\n\n\t\t\t\t\t// adding range isn't always successful so we need to check range count otherwise an exception can occur\n\t\t\t\t\tself.selectedRange = sel.rangeCount > 0 ? sel.getRangeAt(0) : null;\n\t\t\t\t}\n\n\t\t\t\t// WebKit egde case selecting images works better using setBaseAndExtent when the image is floated\n\t\t\t\tif (!rng.collapsed && rng.startContainer == rng.endContainer && sel.setBaseAndExtent && !Env.ie) {\n\t\t\t\t\tif (rng.endOffset - rng.startOffset < 2) {\n\t\t\t\t\t\tif (rng.startContainer.hasChildNodes()) {\n\t\t\t\t\t\t\tnode = rng.startContainer.childNodes[rng.startOffset];\n\t\t\t\t\t\t\tif (node && node.tagName == 'IMG') {\n\t\t\t\t\t\t\t\tsel.setBaseAndExtent(\n\t\t\t\t\t\t\t\t\trng.startContainer,\n\t\t\t\t\t\t\t\t\trng.startOffset,\n\t\t\t\t\t\t\t\t\trng.endContainer,\n\t\t\t\t\t\t\t\t\trng.endOffset\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t// Since the setBaseAndExtent is fixed in more recent Blink versions we\n\t\t\t\t\t\t\t\t// need to detect if it's doing the wrong thing and falling back to the\n\t\t\t\t\t\t\t\t// crazy incorrect behavior api call since that seems to be the only way\n\t\t\t\t\t\t\t\t// to get it to work on Safari WebKit as of 2017-02-23\n\t\t\t\t\t\t\t\tif (sel.anchorNode !== rng.startContainer || sel.focusNode !== rng.endContainer) {\n\t\t\t\t\t\t\t\t\tsel.setBaseAndExtent(node, 0, node, 1);\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\tself.editor.fire('AfterSetSelectionRange', {range: rng});\n\t\t\t} else {\n\t\t\t\t// Is W3C Range fake range on IE\n\t\t\t\tif (rng.cloneRange) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tself.tridentSel.addRange(rng);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t//IE9 throws an error here if called before selection is placed in the editor\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Sets the current selection to the specified DOM element.\n\t\t *\n\t\t * @method setNode\n\t\t * @param {Element} elm Element to set as the contents of the selection.\n\t\t * @return {Element} Returns the element that got passed in.\n\t\t * @example\n\t\t * // Inserts a DOM node at current selection/caret location\n\t\t * tinymce.activeEditor.selection.setNode(tinymce.activeEditor.dom.create('img', {src: 'some.gif', title: 'some title'}));\n\t\t */\n\t\tsetNode: function(elm) {\n\t\t\tvar self = this;\n\n\t\t\tself.setContent(self.dom.getOuterHTML(elm));\n\n\t\t\treturn elm;\n\t\t},\n\n\t\t/**\n\t\t * Returns the currently selected element or the common ancestor element for both start and end of the selection.\n\t\t *\n\t\t * @method getNode\n\t\t * @return {Element} Currently selected element or common ancestor element.\n\t\t * @example\n\t\t * // Alerts the currently selected elements node name\n\t\t * alert(tinymce.activeEditor.selection.getNode().nodeName);\n\t\t */\n\t\tgetNode: function() {\n\t\t\tvar self = this, rng = self.getRng(), elm;\n\t\t\tvar startContainer, endContainer, startOffset, endOffset, root = self.dom.getRoot();\n\n\t\t\tfunction skipEmptyTextNodes(node, forwards) {\n\t\t\t\tvar orig = node;\n\n\t\t\t\twhile (node && node.nodeType === 3 && node.length === 0) {\n\t\t\t\t\tnode = forwards ? node.nextSibling : node.previousSibling;\n\t\t\t\t}\n\n\t\t\t\treturn node || orig;\n\t\t\t}\n\n\t\t\t// Range maybe lost after the editor is made visible again\n\t\t\tif (!rng) {\n\t\t\t\treturn root;\n\t\t\t}\n\n\t\t\tstartContainer = rng.startContainer;\n\t\t\tendContainer = rng.endContainer;\n\t\t\tstartOffset = rng.startOffset;\n\t\t\tendOffset = rng.endOffset;\n\n\t\t\tif (rng.setStart) {\n\t\t\t\telm = rng.commonAncestorContainer;\n\n\t\t\t\t// Handle selection a image or other control like element such as anchors\n\t\t\t\tif (!rng.collapsed) {\n\t\t\t\t\tif (startContainer == endContainer) {\n\t\t\t\t\t\tif (endOffset - startOffset < 2) {\n\t\t\t\t\t\t\tif (startContainer.hasChildNodes()) {\n\t\t\t\t\t\t\t\telm = startContainer.childNodes[startOffset];\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// If the anchor node is a element instead of a text node then return this element\n\t\t\t\t\t//if (tinymce.isWebKit && sel.anchorNode && sel.anchorNode.nodeType == 1)\n\t\t\t\t\t//\treturn sel.anchorNode.childNodes[sel.anchorOffset];\n\n\t\t\t\t\t// Handle cases where the selection is immediately wrapped around a node and return that node instead of it's parent.\n\t\t\t\t\t// This happens when you double click an underlined word in FireFox.\n\t\t\t\t\tif (startContainer.nodeType === 3 && endContainer.nodeType === 3) {\n\t\t\t\t\t\tif (startContainer.length === startOffset) {\n\t\t\t\t\t\t\tstartContainer = skipEmptyTextNodes(startContainer.nextSibling, true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstartContainer = startContainer.parentNode;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (endOffset === 0) {\n\t\t\t\t\t\t\tendContainer = skipEmptyTextNodes(endContainer.previousSibling, false);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tendContainer = endContainer.parentNode;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (startContainer && startContainer === endContainer) {\n\t\t\t\t\t\t\treturn startContainer;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (elm && elm.nodeType == 3) {\n\t\t\t\t\treturn elm.parentNode;\n\t\t\t\t}\n\n\t\t\t\treturn elm;\n\t\t\t}\n\n\t\t\telm = rng.item ? rng.item(0) : rng.parentElement();\n\n\t\t\t// IE 7 might return elements outside the iframe\n\t\t\tif (elm.ownerDocument !== self.win.document) {\n\t\t\t\telm = root;\n\t\t\t}\n\n\t\t\treturn elm;\n\t\t},\n\n\t\tgetSelectedBlocks: function(startElm, endElm) {\n\t\t\tvar self = this, dom = self.dom, node, root, selectedBlocks = [];\n\n\t\t\troot = dom.getRoot();\n\t\t\tstartElm = dom.getParent(startElm || self.getStart(), dom.isBlock);\n\t\t\tendElm = dom.getParent(endElm || self.getEnd(), dom.isBlock);\n\n\t\t\tif (startElm && startElm != root) {\n\t\t\t\tselectedBlocks.push(startElm);\n\t\t\t}\n\n\t\t\tif (startElm && endElm && startElm != endElm) {\n\t\t\t\tnode = startElm;\n\n\t\t\t\tvar walker = new TreeWalker(startElm, root);\n\t\t\t\twhile ((node = walker.next()) && node != endElm) {\n\t\t\t\t\tif (dom.isBlock(node)) {\n\t\t\t\t\t\tselectedBlocks.push(node);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (endElm && startElm != endElm && endElm != root) {\n\t\t\t\tselectedBlocks.push(endElm);\n\t\t\t}\n\n\t\t\treturn selectedBlocks;\n\t\t},\n\n\t\tisForward: function() {\n\t\t\tvar dom = this.dom, sel = this.getSel(), anchorRange, focusRange;\n\n\t\t\t// No support for selection direction then always return true\n\t\t\tif (!sel || !sel.anchorNode || !sel.focusNode) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tanchorRange = dom.createRng();\n\t\t\tanchorRange.setStart(sel.anchorNode, sel.anchorOffset);\n\t\t\tanchorRange.collapse(true);\n\n\t\t\tfocusRange = dom.createRng();\n\t\t\tfocusRange.setStart(sel.focusNode, sel.focusOffset);\n\t\t\tfocusRange.collapse(true);\n\n\t\t\treturn anchorRange.compareBoundaryPoints(anchorRange.START_TO_START, focusRange) <= 0;\n\t\t},\n\n\t\tnormalize: function() {\n\t\t\tvar self = this, rng = self.getRng();\n\n\t\t\tif (Env.range && new RangeUtils(self.dom).normalize(rng)) {\n\t\t\t\tself.setRng(rng, self.isForward());\n\t\t\t}\n\n\t\t\treturn rng;\n\t\t},\n\n\t\t/**\n\t\t * Executes callback when the current selection starts/stops matching the specified selector. The current\n\t\t * state will be passed to the callback as it's first argument.\n\t\t *\n\t\t * @method selectorChanged\n\t\t * @param {String} selector CSS selector to check for.\n\t\t * @param {function} callback Callback with state and args when the selector is matches or not.\n\t\t */\n\t\tselectorChanged: function(selector, callback) {\n\t\t\tvar self = this, currentSelectors;\n\n\t\t\tif (!self.selectorChangedData) {\n\t\t\t\tself.selectorChangedData = {};\n\t\t\t\tcurrentSelectors = {};\n\n\t\t\t\tself.editor.on('NodeChange', function(e) {\n\t\t\t\t\tvar node = e.element, dom = self.dom, parents = dom.getParents(node, null, dom.getRoot()), matchedSelectors = {};\n\n\t\t\t\t\t// Check for new matching selectors\n\t\t\t\t\teach(self.selectorChangedData, function(callbacks, selector) {\n\t\t\t\t\t\teach(parents, function(node) {\n\t\t\t\t\t\t\tif (dom.is(node, selector)) {\n\t\t\t\t\t\t\t\tif (!currentSelectors[selector]) {\n\t\t\t\t\t\t\t\t\t// Execute callbacks\n\t\t\t\t\t\t\t\t\teach(callbacks, function(callback) {\n\t\t\t\t\t\t\t\t\t\tcallback(true, {node: node, selector: selector, parents: parents});\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tcurrentSelectors[selector] = callbacks;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tmatchedSelectors[selector] = callbacks;\n\t\t\t\t\t\t\t\treturn false;\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// Check if current selectors still match\n\t\t\t\t\teach(currentSelectors, function(callbacks, selector) {\n\t\t\t\t\t\tif (!matchedSelectors[selector]) {\n\t\t\t\t\t\t\tdelete currentSelectors[selector];\n\n\t\t\t\t\t\t\teach(callbacks, function(callback) {\n\t\t\t\t\t\t\t\tcallback(false, {node: node, selector: selector, parents: parents});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Add selector listeners\n\t\t\tif (!self.selectorChangedData[selector]) {\n\t\t\t\tself.selectorChangedData[selector] = [];\n\t\t\t}\n\n\t\t\tself.selectorChangedData[selector].push(callback);\n\n\t\t\treturn self;\n\t\t},\n\n\t\tgetScrollContainer: function() {\n\t\t\tvar scrollContainer, node = this.dom.getRoot();\n\n\t\t\twhile (node && node.nodeName != 'BODY') {\n\t\t\t\tif (node.scrollHeight > node.clientHeight) {\n\t\t\t\t\tscrollContainer = node;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tnode = node.parentNode;\n\t\t\t}\n\n\t\t\treturn scrollContainer;\n\t\t},\n\n\t\tscrollIntoView: function(elm, alignToTop) {\n\t\t\tvar y, viewPort, self = this, dom = self.dom, root = dom.getRoot(), viewPortY, viewPortH, offsetY = 0;\n\n\t\t\tfunction getPos(elm) {\n\t\t\t\tvar x = 0, y = 0;\n\n\t\t\t\tvar offsetParent = elm;\n\t\t\t\twhile (offsetParent && offsetParent.nodeType) {\n\t\t\t\t\tx += offsetParent.offsetLeft || 0;\n\t\t\t\t\ty += offsetParent.offsetTop || 0;\n\t\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t\t}\n\n\t\t\t\treturn {x: x, y: y};\n\t\t\t}\n\n\t\t\tif (!NodeType.isElement(elm)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (alignToTop === false) {\n\t\t\t\toffsetY = elm.offsetHeight;\n\t\t\t}\n\n\t\t\tif (root.nodeName != 'BODY') {\n\t\t\t\tvar scrollContainer = self.getScrollContainer();\n\t\t\t\tif (scrollContainer) {\n\t\t\t\t\ty = getPos(elm).y - getPos(scrollContainer).y + offsetY;\n\t\t\t\t\tviewPortH = scrollContainer.clientHeight;\n\t\t\t\t\tviewPortY = scrollContainer.scrollTop;\n\t\t\t\t\tif (y < viewPortY || y + 25 > viewPortY + viewPortH) {\n\t\t\t\t\t\tscrollContainer.scrollTop = y < viewPortY ? y : y - viewPortH + 25;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tviewPort = dom.getViewPort(self.editor.getWin());\n\t\t\ty = dom.getPos(elm).y + offsetY;\n\t\t\tviewPortY = viewPort.y;\n\t\t\tviewPortH = viewPort.h;\n\t\t\tif (y < viewPort.y || y + 25 > viewPortY + viewPortH) {\n\t\t\t\tself.editor.getWin().scrollTo(0, y < viewPortY ? y : y - viewPortH + 25);\n\t\t\t}\n\t\t},\n\n\t\tplaceCaretAt: function(clientX, clientY) {\n\t\t\tthis.setRng(RangeUtils.getCaretRangeFromPoint(clientX, clientY, this.editor.getDoc()));\n\t\t},\n\n\t\t_moveEndPoint: function(rng, node, start) {\n\t\t\tvar root = node, walker = new TreeWalker(node, root);\n\t\t\tvar nonEmptyElementsMap = this.dom.schema.getNonEmptyElements();\n\n\t\t\tdo {\n\t\t\t\t// Text node\n\t\t\t\tif (node.nodeType == 3 && trim(node.nodeValue).length !== 0) {\n\t\t\t\t\tif (start) {\n\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setEnd(node, node.nodeValue.length);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// BR/IMG/INPUT elements but not table cells\n\t\t\t\tif (nonEmptyElementsMap[node.nodeName] && !/^(TD|TH)$/.test(node.nodeName)) {\n\t\t\t\t\tif (start) {\n\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (node.nodeName == 'BR') {\n\t\t\t\t\t\t\trng.setEndBefore(node);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setEndAfter(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Found empty text block old IE can place the selection inside those\n\t\t\t\tif (Env.ie && Env.ie < 11 && this.dom.isBlock(node) && this.dom.isEmpty(node)) {\n\t\t\t\t\tif (start) {\n\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setEnd(node, 0);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} while ((node = (start ? walker.next() : walker.prev())));\n\n\t\t\t// Failed to find any text node or other suitable location then move to the root of body\n\t\t\tif (root.nodeName == 'BODY') {\n\t\t\t\tif (start) {\n\t\t\t\t\trng.setStart(root, 0);\n\t\t\t\t} else {\n\t\t\t\t\trng.setEnd(root, root.childNodes.length);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tgetBoundingClientRect: function() {\n\t\t\tvar rng = this.getRng();\n\t\t\treturn rng.collapsed ? CaretPosition.fromRangeStart(rng).getClientRects()[0] : rng.getBoundingClientRect();\n\t\t},\n\n\t\tdestroy: function() {\n\t\t\tthis.win = null;\n\t\t\tthis.controlSelection.destroy();\n\t\t}\n\t};\n\n\treturn Selection;\n});\n\n// Included from: js/tinymce/classes/dom/ElementUtils.js\n\n/**\n * ElementUtils.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Utility class for various element specific functions.\n *\n * @private\n * @class tinymce.dom.ElementUtils\n */\ndefine(\"tinymce/dom/ElementUtils\", [\n\t\"tinymce/dom/BookmarkManager\",\n\t\"tinymce/util/Tools\"\n], function(BookmarkManager, Tools) {\n\tvar each = Tools.each;\n\n\tfunction ElementUtils(dom) {\n\t\t/**\n\t\t * Compares two nodes and checks if it's attributes and styles matches.\n\t\t * This doesn't compare classes as items since their order is significant.\n\t\t *\n\t\t * @method compare\n\t\t * @param {Node} node1 First node to compare with.\n\t\t * @param {Node} node2 Second node to compare with.\n\t\t * @return {boolean} True/false if the nodes are the same or not.\n\t\t */\n\t\tthis.compare = function(node1, node2) {\n\t\t\t// Not the same name\n\t\t\tif (node1.nodeName != node2.nodeName) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Returns all the nodes attributes excluding internal ones, styles and classes.\n\t\t\t *\n\t\t\t * @private\n\t\t\t * @param {Node} node Node to get attributes from.\n\t\t\t * @return {Object} Name/value object with attributes and attribute values.\n\t\t\t */\n\t\t\tfunction getAttribs(node) {\n\t\t\t\tvar attribs = {};\n\n\t\t\t\teach(dom.getAttribs(node), function(attr) {\n\t\t\t\t\tvar name = attr.nodeName.toLowerCase();\n\n\t\t\t\t\t// Don't compare internal attributes or style\n\t\t\t\t\tif (name.indexOf('_') !== 0 && name !== 'style' && name.indexOf('data-') !== 0) {\n\t\t\t\t\t\tattribs[name] = dom.getAttrib(node, name);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn attribs;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Compares two objects checks if it's key + value exists in the other one.\n\t\t\t *\n\t\t\t * @private\n\t\t\t * @param {Object} obj1 First object to compare.\n\t\t\t * @param {Object} obj2 Second object to compare.\n\t\t\t * @return {boolean} True/false if the objects matches or not.\n\t\t\t */\n\t\t\tfunction compareObjects(obj1, obj2) {\n\t\t\t\tvar value, name;\n\n\t\t\t\tfor (name in obj1) {\n\t\t\t\t\t// Obj1 has item obj2 doesn't have\n\t\t\t\t\tif (obj1.hasOwnProperty(name)) {\n\t\t\t\t\t\tvalue = obj2[name];\n\n\t\t\t\t\t\t// Obj2 doesn't have obj1 item\n\t\t\t\t\t\tif (typeof value == \"undefined\") {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Obj2 item has a different value\n\t\t\t\t\t\tif (obj1[name] != value) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Delete similar value\n\t\t\t\t\t\tdelete obj2[name];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Check if obj 2 has something obj 1 doesn't have\n\t\t\t\tfor (name in obj2) {\n\t\t\t\t\t// Obj2 has item obj1 doesn't have\n\t\t\t\t\tif (obj2.hasOwnProperty(name)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Attribs are not the same\n\t\t\tif (!compareObjects(getAttribs(node1), getAttribs(node2))) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Styles are not the same\n\t\t\tif (!compareObjects(dom.parseStyle(dom.getAttrib(node1, 'style')), dom.parseStyle(dom.getAttrib(node2, 'style')))) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn !BookmarkManager.isBookmarkNode(node1) && !BookmarkManager.isBookmarkNode(node2);\n\t\t};\n\t}\n\n\treturn ElementUtils;\n});\n\n// Included from: js/tinymce/classes/fmt/Preview.js\n\n/**\n * Preview.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Internal class for generating previews styles for formats.\n *\n * Example:\n * Preview.getCssText(editor, 'bold');\n *\n * @private\n * @class tinymce.fmt.Preview\n */\ndefine(\"tinymce/fmt/Preview\", [\n\t\"tinymce/dom/DOMUtils\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/html/Schema\"\n], function(DOMUtils, Tools, Schema) {\n\tvar each = Tools.each;\n\tvar dom = DOMUtils.DOM;\n\n\tfunction parsedSelectorToHtml(ancestry, editor) {\n\t\tvar elm, item, fragment;\n\t\tvar schema = editor && editor.schema || new Schema({});\n\n\t\tfunction decorate(elm, item) {\n\t\t\tif (item.classes.length) {\n\t\t\t\tdom.addClass(elm, item.classes.join(' '));\n\t\t\t}\n\t\t\tdom.setAttribs(elm, item.attrs);\n\t\t}\n\n\t\tfunction createElement(sItem) {\n\t\t\tvar elm;\n\n\t\t\titem = typeof sItem === 'string' ? {\n\t\t\t\tname: sItem,\n\t\t\t\tclasses: [],\n\t\t\t\tattrs: {}\n\t\t\t} : sItem;\n\n\t\t\telm = dom.create(item.name);\n\t\t\tdecorate(elm, item);\n\t\t\treturn elm;\n\t\t}\n\n\t\tfunction getRequiredParent(elm, candidate) {\n\t\t\tvar name = typeof elm !== 'string' ? elm.nodeName.toLowerCase() : elm;\n\t\t\tvar elmRule = schema.getElementRule(name);\n\t\t\tvar parentsRequired = elmRule.parentsRequired;\n\n\t\t\tif (parentsRequired && parentsRequired.length) {\n\t\t\t\treturn candidate && Tools.inArray(parentsRequired, candidate) !== -1 ? candidate : parentsRequired[0];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfunction wrapInHtml(elm, ancestry, siblings) {\n\t\t\tvar parent, parentCandidate, parentRequired;\n\t\t\tvar ancestor = ancestry.length && ancestry[0];\n\t\t\tvar ancestorName = ancestor && ancestor.name;\n\n\t\t\tparentRequired = getRequiredParent(elm, ancestorName);\n\n\t\t\tif (parentRequired) {\n\t\t\t\tif (ancestorName == parentRequired) {\n\t\t\t\t\tparentCandidate = ancestry[0];\n\t\t\t\t\tancestry = ancestry.slice(1);\n\t\t\t\t} else {\n\t\t\t\t\tparentCandidate = parentRequired;\n\t\t\t\t}\n\t\t\t} else if (ancestor) {\n\t\t\t\tparentCandidate = ancestry[0];\n\t\t\t\tancestry = ancestry.slice(1);\n\t\t\t} else if (!siblings) {\n\t\t\t\treturn elm;\n\t\t\t}\n\n\t\t\tif (parentCandidate) {\n\t\t\t\tparent = createElement(parentCandidate);\n\t\t\t\tparent.appendChild(elm);\n\t\t\t}\n\n\t\t\tif (siblings) {\n\t\t\t\tif (!parent) {\n\t\t\t\t\t// if no more ancestry, wrap in generic div\n\t\t\t\t\tparent = dom.create('div');\n\t\t\t\t\tparent.appendChild(elm);\n\t\t\t\t}\n\n\t\t\t\tTools.each(siblings, function(sibling) {\n\t\t\t\t\tvar siblingElm = createElement(sibling);\n\t\t\t\t\tparent.insertBefore(siblingElm, elm);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn wrapInHtml(parent, ancestry, parentCandidate && parentCandidate.siblings);\n\t\t}\n\n\t\tif (ancestry && ancestry.length) {\n\t\t\titem = ancestry[0];\n\t\t\telm = createElement(item);\n\t\t\tfragment = dom.create('div');\n\t\t\tfragment.appendChild(wrapInHtml(elm, ancestry.slice(1), item.siblings));\n\t\t\treturn fragment;\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}\n\n\n\tfunction selectorToHtml(selector, editor) {\n\t\treturn parsedSelectorToHtml(parseSelector(selector), editor);\n\t}\n\n\n\tfunction parseSelectorItem(item) {\n\t\tvar tagName;\n\t\tvar obj = {\n\t\t\tclasses: [],\n\t\t\tattrs: {}\n\t\t};\n\n\t\titem = obj.selector = Tools.trim(item);\n\n\t\tif (item !== '*') {\n\t\t\t// matching IDs, CLASSes, ATTRIBUTES and PSEUDOs\n\t\t\ttagName = item.replace(/(?:([#\\.]|::?)([\\w\\-]+)|(\\[)([^\\]]+)\\]?)/g, function($0, $1, $2, $3, $4) {\n\t\t\t\tswitch ($1) {\n\t\t\t\t\tcase '#':\n\t\t\t\t\t\tobj.attrs.id = $2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '.':\n\t\t\t\t\t\tobj.classes.push($2);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ':':\n\t\t\t\t\t\tif (Tools.inArray('checked disabled enabled read-only required'.split(' '), $2) !== -1) {\n\t\t\t\t\t\t\tobj.attrs[$2] = $2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// atribute matched\n\t\t\t\tif ($3 == '[') {\n\t\t\t\t\tvar m = $4.match(/([\\w\\-]+)(?:\\=\\\"([^\\\"]+))?/);\n\t\t\t\t\tif (m) {\n\t\t\t\t\t\tobj.attrs[m[1]] = m[2];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn '';\n\t\t\t});\n\t\t}\n\n\t\tobj.name = tagName || 'div';\n\t\treturn obj;\n\t}\n\n\n\tfunction parseSelector(selector) {\n\t\tif (!selector || typeof selector !== 'string') {\n\t\t\treturn [];\n\t\t}\n\n\t\t// take into account only first one\n\t\tselector = selector.split(/\\s*,\\s*/)[0];\n\n\t\t// tighten\n\t\tselector = selector.replace(/\\s*(~\\+|~|\\+|>)\\s*/g, '$1');\n\n\t\t// split either on > or on space, but not the one inside brackets\n\t\treturn Tools.map(selector.split(/(?:>|\\s+(?![^\\[\\]]+\\]))/), function(item) {\n\t\t\t// process each sibling selector separately\n\t\t\tvar siblings = Tools.map(item.split(/(?:~\\+|~|\\+)/), parseSelectorItem);\n\t\t\tvar obj = siblings.pop(); // the last one is our real target\n\n\t\t\tif (siblings.length) {\n\t\t\t\tobj.siblings = siblings;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}).reverse();\n\t}\n\n\n\tfunction getCssText(editor, format) {\n\t\tvar name, previewFrag, previewElm, items;\n\t\tvar previewCss = '', parentFontSize, previewStyles;\n\n\t\tpreviewStyles = editor.settings.preview_styles;\n\n\t\t// No preview forced\n\t\tif (previewStyles === false) {\n\t\t\treturn '';\n\t\t}\n\n\t\t// Default preview\n\t\tif (typeof previewStyles !== 'string') {\n\t\t\tpreviewStyles = 'font-family font-size font-weight font-style text-decoration ' +\n\t\t\t\t'text-transform color background-color border border-radius outline text-shadow';\n\t\t}\n\n\t\t// Removes any variables since these can't be previewed\n\t\tfunction removeVars(val) {\n\t\t\treturn val.replace(/%(\\w+)/g, '');\n\t\t}\n\n\t\t// Create block/inline element to use for preview\n\t\tif (typeof format == \"string\") {\n\t\t\tformat = editor.formatter.get(format);\n\t\t\tif (!format) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tformat = format[0];\n\t\t}\n\n\t\t// Format specific preview override\n\t\t// TODO: This should probably be further reduced by the previewStyles option\n\t\tif ('preview' in format) {\n\t\t\tpreviewStyles = format.preview;\n\t\t\tif (previewStyles === false) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\n\t\tname = format.block || format.inline || 'span';\n\n\t\titems = parseSelector(format.selector);\n\t\tif (items.length) {\n\t\t\tif (!items[0].name) { // e.g. something like ul > .someClass was provided\n\t\t\t\titems[0].name = name;\n\t\t\t}\n\t\t\tname = format.selector;\n\t\t\tpreviewFrag = parsedSelectorToHtml(items, editor);\n\t\t} else {\n\t\t\tpreviewFrag = parsedSelectorToHtml([name], editor);\n\t\t}\n\n\t\tpreviewElm = dom.select(name, previewFrag)[0] || previewFrag.firstChild;\n\n\t\t// Add format styles to preview element\n\t\teach(format.styles, function(value, name) {\n\t\t\tvalue = removeVars(value);\n\n\t\t\tif (value) {\n\t\t\t\tdom.setStyle(previewElm, name, value);\n\t\t\t}\n\t\t});\n\n\t\t// Add attributes to preview element\n\t\teach(format.attributes, function(value, name) {\n\t\t\tvalue = removeVars(value);\n\n\t\t\tif (value) {\n\t\t\t\tdom.setAttrib(previewElm, name, value);\n\t\t\t}\n\t\t});\n\n\t\t// Add classes to preview element\n\t\teach(format.classes, function(value) {\n\t\t\tvalue = removeVars(value);\n\n\t\t\tif (!dom.hasClass(previewElm, value)) {\n\t\t\t\tdom.addClass(previewElm, value);\n\t\t\t}\n\t\t});\n\n\t\teditor.fire('PreviewFormats');\n\n\t\t// Add the previewElm outside the visual area\n\t\tdom.setStyles(previewFrag, {position: 'absolute', left: -0xFFFF});\n\t\teditor.getBody().appendChild(previewFrag);\n\n\t\t// Get parent container font size so we can compute px values out of em/% for older IE:s\n\t\tparentFontSize = dom.getStyle(editor.getBody(), 'fontSize', true);\n\t\tparentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0;\n\n\t\teach(previewStyles.split(' '), function(name) {\n\t\t\tvar value = dom.getStyle(previewElm, name, true);\n\n\t\t\t// If background is transparent then check if the body has a background color we can use\n\t\t\tif (name == 'background-color' && /transparent|rgba\\s*\\([^)]+,\\s*0\\)/.test(value)) {\n\t\t\t\tvalue = dom.getStyle(editor.getBody(), name, true);\n\n\t\t\t\t// Ignore white since it's the default color, not the nicest fix\n\t\t\t\t// TODO: Fix this by detecting runtime style\n\t\t\t\tif (dom.toHex(value).toLowerCase() == '#ffffff') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (name == 'color') {\n\t\t\t\t// Ignore black since it's the default color, not the nicest fix\n\t\t\t\t// TODO: Fix this by detecting runtime style\n\t\t\t\tif (dom.toHex(value).toLowerCase() == '#000000') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Old IE won't calculate the font size so we need to do that manually\n\t\t\tif (name == 'font-size') {\n\t\t\t\tif (/em|%$/.test(value)) {\n\t\t\t\t\tif (parentFontSize === 0) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Convert font size from em/% to px\n\t\t\t\t\tvalue = parseFloat(value, 10) / (/%$/.test(value) ? 100 : 1);\n\t\t\t\t\tvalue = (value * parentFontSize) + 'px';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (name == \"border\" && value) {\n\t\t\t\tpreviewCss += 'padding:0 2px;';\n\t\t\t}\n\n\t\t\tpreviewCss += name + ':' + value + ';';\n\t\t});\n\n\t\teditor.fire('AfterPreviewFormats');\n\n\t\t//previewCss += 'line-height:normal';\n\n\t\tdom.remove(previewFrag);\n\n\t\treturn previewCss;\n\t}\n\n\treturn {\n\t\tgetCssText: getCssText,\n\t\tparseSelector: parseSelector,\n\t\tselectorToHtml: selectorToHtml\n\t};\n});\n\n// Included from: js/tinymce/classes/fmt/Hooks.js\n\n/**\n * Hooks.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2016 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Internal class for overriding formatting.\n *\n * @private\n * @class tinymce.fmt.Hooks\n */\ndefine(\"tinymce/fmt/Hooks\", [\n\t\"tinymce/util/Arr\",\n\t\"tinymce/dom/NodeType\",\n\t\"tinymce/dom/DomQuery\"\n], function(Arr, NodeType, $) {\n\tvar postProcessHooks = {}, filter = Arr.filter, each = Arr.each;\n\n\tfunction addPostProcessHook(name, hook) {\n\t\tvar hooks = postProcessHooks[name];\n\n\t\tif (!hooks) {\n\t\t\tpostProcessHooks[name] = hooks = [];\n\t\t}\n\n\t\tpostProcessHooks[name].push(hook);\n\t}\n\n\tfunction postProcess(name, editor) {\n\t\teach(postProcessHooks[name], function(hook) {\n\t\t\thook(editor);\n\t\t});\n\t}\n\n\taddPostProcessHook(\"pre\", function(editor) {\n\t\tvar rng = editor.selection.getRng(), isPre, blocks;\n\n\t\tfunction hasPreSibling(pre) {\n\t\t\treturn isPre(pre.previousSibling) && Arr.indexOf(blocks, pre.previousSibling) != -1;\n\t\t}\n\n\t\tfunction joinPre(pre1, pre2) {\n\t\t\t$(pre2).remove();\n\t\t\t$(pre1).append('

      ').append(pre2.childNodes);\n\t\t}\n\n\t\tisPre = NodeType.matchNodeNames('pre');\n\n\t\tif (!rng.collapsed) {\n\t\t\tblocks = editor.selection.getSelectedBlocks();\n\n\t\t\teach(filter(filter(blocks, isPre), hasPreSibling), function(pre) {\n\t\t\t\tjoinPre(pre.previousSibling, pre);\n\t\t\t});\n\t\t}\n\t});\n\n\treturn {\n\t\tpostProcess: postProcess\n\t};\n});\n\n// Included from: js/tinymce/classes/Formatter.js\n\n/**\n * Formatter.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Text formatter engine class. This class is used to apply formats like bold, italic, font size\n * etc to the current selection or specific nodes. This engine was built to replace the browser's\n * default formatting logic for execCommand due to its inconsistent and buggy behavior.\n *\n * @class tinymce.Formatter\n * @example\n * tinymce.activeEditor.formatter.register('mycustomformat', {\n * inline: 'span',\n * styles: {color: '#ff0000'}\n * });\n *\n * tinymce.activeEditor.formatter.apply('mycustomformat');\n */\ndefine(\"tinymce/Formatter\", [\n\t\"tinymce/dom/TreeWalker\",\n\t\"tinymce/dom/RangeUtils\",\n\t\"tinymce/dom/BookmarkManager\",\n\t\"tinymce/dom/ElementUtils\",\n\t\"tinymce/util/Fun\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/fmt/Preview\",\n\t\"tinymce/fmt/Hooks\"\n], function(TreeWalker, RangeUtils, BookmarkManager, ElementUtils, Fun, Tools, Preview, Hooks) {\n\t/**\n\t * Constructs a new formatter instance.\n\t *\n\t * @constructor Formatter\n\t * @param {tinymce.Editor} ed Editor instance to construct the formatter engine to.\n\t */\n\treturn function(ed) {\n\t\tvar formats = {},\n\t\t\tdom = ed.dom,\n\t\t\tselection = ed.selection,\n\t\t\trangeUtils = new RangeUtils(dom),\n\t\t\tisValid = ed.schema.isValidChild,\n\t\t\tisBlock = dom.isBlock,\n\t\t\tforcedRootBlock = ed.settings.forced_root_block,\n\t\t\tnodeIndex = dom.nodeIndex,\n\t\t\tINVISIBLE_CHAR = '\\uFEFF',\n\t\t\tMCE_ATTR_RE = /^(src|href|style)$/,\n\t\t\tFALSE = false,\n\t\t\tTRUE = true,\n\t\t\tformatChangeData,\n\t\t\tundef,\n\t\t\tgetContentEditable = dom.getContentEditable,\n\t\t\tdisableCaretContainer,\n\t\t\tmarkCaretContainersBogus,\n\t\t\tisBookmarkNode = BookmarkManager.isBookmarkNode;\n\n\t\tvar each = Tools.each,\n\t\t\tgrep = Tools.grep,\n\t\t\twalk = Tools.walk,\n\t\t\textend = Tools.extend;\n\n\t\tfunction isTextBlock(name) {\n\t\t\tif (name.nodeType) {\n\t\t\t\tname = name.nodeName;\n\t\t\t}\n\n\t\t\treturn !!ed.schema.getTextBlockElements()[name.toLowerCase()];\n\t\t}\n\n\t\tfunction isTableCell(node) {\n\t\t\treturn /^(TH|TD)$/.test(node.nodeName);\n\t\t}\n\n\t\tfunction isInlineBlock(node) {\n\t\t\treturn node && /^(IMG)$/.test(node.nodeName);\n\t\t}\n\n\t\tfunction getParents(node, selector) {\n\t\t\treturn dom.getParents(node, selector, dom.getRoot());\n\t\t}\n\n\t\tfunction isCaretNode(node) {\n\t\t\treturn node.nodeType === 1 && node.id === '_mce_caret';\n\t\t}\n\n\t\tfunction defaultFormats() {\n\t\t\tregister({\n\t\t\t\tvaligntop: [\n\t\t\t\t\t{selector: 'td,th', styles: {'verticalAlign': 'top'}}\n\t\t\t\t],\n\n\t\t\t\tvalignmiddle: [\n\t\t\t\t\t{selector: 'td,th', styles: {'verticalAlign': 'middle'}}\n\t\t\t\t],\n\n\t\t\t\tvalignbottom: [\n\t\t\t\t\t{selector: 'td,th', styles: {'verticalAlign': 'bottom'}}\n\t\t\t\t],\n\n\t\t\t\talignleft: [\n\t\t\t\t\t{\n\t\t\t\t\t\tselector: 'figure.image',\n\t\t\t\t\t\tcollapsed: false,\n\t\t\t\t\t\tclasses: 'align-left',\n\t\t\t\t\t\tceFalseOverride: true,\n\t\t\t\t\t\tpreview: 'font-family font-size'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tselector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttextAlign: 'left'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tinherit: false,\n\t\t\t\t\t\tpreview: false,\n\t\t\t\t\t\tdefaultBlock: 'div'\n\t\t\t\t\t},\n\t\t\t\t\t{selector: 'img,table', collapsed: false, styles: {'float': 'left'}, preview: 'font-family font-size'}\n\t\t\t\t],\n\n\t\t\t\taligncenter: [\n\t\t\t\t\t{\n\t\t\t\t\t\tselector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttextAlign: 'center'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tinherit: false,\n\t\t\t\t\t\tpreview: false,\n\t\t\t\t\t\tdefaultBlock: 'div'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tselector: 'figure.image',\n\t\t\t\t\t\tcollapsed: false,\n\t\t\t\t\t\tclasses: 'align-center',\n\t\t\t\t\t\tceFalseOverride: true,\n\t\t\t\t\t\tpreview: 'font-family font-size'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tselector: 'img',\n\t\t\t\t\t\tcollapsed: false,\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\tdisplay: 'block',\n\t\t\t\t\t\t\tmarginLeft: 'auto',\n\t\t\t\t\t\t\tmarginRight: 'auto'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpreview: false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tselector: 'table',\n\t\t\t\t\t\tcollapsed: false,\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\tmarginLeft: 'auto',\n\t\t\t\t\t\t\tmarginRight: 'auto'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpreview: 'font-family font-size'\n\t\t\t\t\t}\n\t\t\t\t],\n\n\t\t\t\talignright: [\n\t\t\t\t\t{\n\t\t\t\t\t\tselector: 'figure.image',\n\t\t\t\t\t\tcollapsed: false,\n\t\t\t\t\t\tclasses: 'align-right',\n\t\t\t\t\t\tceFalseOverride: true,\n\t\t\t\t\t\tpreview: 'font-family font-size'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tselector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttextAlign: 'right'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tinherit: false,\n\t\t\t\t\t\tpreview: 'font-family font-size',\n\t\t\t\t\t\tdefaultBlock: 'div'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tselector: 'img,table',\n\t\t\t\t\t\tcollapsed: false,\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\t'float': 'right'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpreview: 'font-family font-size'\n\t\t\t\t\t}\n\t\t\t\t],\n\n\t\t\t\talignjustify: [\n\t\t\t\t\t{\n\t\t\t\t\t\tselector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttextAlign: 'justify'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tinherit: false,\n\t\t\t\t\t\tdefaultBlock: 'div',\n\t\t\t\t\t\tpreview: 'font-family font-size'\n\t\t\t\t\t}\n\t\t\t\t],\n\n\t\t\t\tbold: [\n\t\t\t\t\t{inline: 'strong', remove: 'all'},\n\t\t\t\t\t{inline: 'span', styles: {fontWeight: 'bold'}},\n\t\t\t\t\t{inline: 'b', remove: 'all'}\n\t\t\t\t],\n\n\t\t\t\titalic: [\n\t\t\t\t\t{inline: 'em', remove: 'all'},\n\t\t\t\t\t{inline: 'span', styles: {fontStyle: 'italic'}},\n\t\t\t\t\t{inline: 'i', remove: 'all'}\n\t\t\t\t],\n\n\t\t\t\tunderline: [\n\t\t\t\t\t{inline: 'span', styles: {textDecoration: 'underline'}, exact: true},\n\t\t\t\t\t{inline: 'u', remove: 'all'}\n\t\t\t\t],\n\n\t\t\t\tstrikethrough: [\n\t\t\t\t\t{inline: 'span', styles: {textDecoration: 'line-through'}, exact: true},\n\t\t\t\t\t{inline: 'strike', remove: 'all'}\n\t\t\t\t],\n\n\t\t\t\tforecolor: {inline: 'span', styles: {color: '%value'}, links: true, remove_similar: true},\n\t\t\t\thilitecolor: {inline: 'span', styles: {backgroundColor: '%value'}, links: true, remove_similar: true},\n\t\t\t\tfontname: {inline: 'span', styles: {fontFamily: '%value'}},\n\t\t\t\tfontsize: {inline: 'span', styles: {fontSize: '%value'}},\n\t\t\t\tfontsize_class: {inline: 'span', attributes: {'class': '%value'}},\n\t\t\t\tblockquote: {block: 'blockquote', wrapper: 1, remove: 'all'},\n\t\t\t\tsubscript: {inline: 'sub'},\n\t\t\t\tsuperscript: {inline: 'sup'},\n\t\t\t\tcode: {inline: 'code'},\n\n\t\t\t\tlink: {inline: 'a', selector: 'a', remove: 'all', split: true, deep: true,\n\t\t\t\t\tonmatch: function() {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t},\n\n\t\t\t\t\tonformat: function(elm, fmt, vars) {\n\t\t\t\t\t\teach(vars, function(value, key) {\n\t\t\t\t\t\t\tdom.setAttrib(elm, key, value);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tremoveformat: [\n\t\t\t\t\t{\n\t\t\t\t\t\tselector: 'b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins',\n\t\t\t\t\t\tremove: 'all',\n\t\t\t\t\t\tsplit: true,\n\t\t\t\t\t\texpand: false,\n\t\t\t\t\t\tblock_expand: true,\n\t\t\t\t\t\tdeep: true\n\t\t\t\t\t},\n\t\t\t\t\t{selector: 'span', attributes: ['style', 'class'], remove: 'empty', split: true, expand: false, deep: true},\n\t\t\t\t\t{selector: '*', attributes: ['style', 'class'], split: false, expand: false, deep: true}\n\t\t\t\t]\n\t\t\t});\n\n\t\t\t// Register default block formats\n\t\t\teach('p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp'.split(/\\s/), function(name) {\n\t\t\t\tregister(name, {block: name, remove: 'all'});\n\t\t\t});\n\n\t\t\t// Register user defined formats\n\t\t\tregister(ed.settings.formats);\n\t\t}\n\n\t\tfunction addKeyboardShortcuts() {\n\t\t\t// Add some inline shortcuts\n\t\t\ted.addShortcut('meta+b', 'bold_desc', 'Bold');\n\t\t\ted.addShortcut('meta+i', 'italic_desc', 'Italic');\n\t\t\ted.addShortcut('meta+u', 'underline_desc', 'Underline');\n\n\t\t\t// BlockFormat shortcuts keys\n\t\t\tfor (var i = 1; i <= 6; i++) {\n\t\t\t\ted.addShortcut('access+' + i, '', ['FormatBlock', false, 'h' + i]);\n\t\t\t}\n\n\t\t\ted.addShortcut('access+7', '', ['FormatBlock', false, 'p']);\n\t\t\ted.addShortcut('access+8', '', ['FormatBlock', false, 'div']);\n\t\t\ted.addShortcut('access+9', '', ['FormatBlock', false, 'address']);\n\t\t}\n\n\t\t// Public functions\n\n\t\t/**\n\t\t * Returns the format by name or all formats if no name is specified.\n\t\t *\n\t\t * @method get\n\t\t * @param {String} name Optional name to retrieve by.\n\t\t * @return {Array/Object} Array/Object with all registered formats or a specific format.\n\t\t */\n\t\tfunction get(name) {\n\t\t\treturn name ? formats[name] : formats;\n\t\t}\n\n\t\t/**\n\t\t * Registers a specific format by name.\n\t\t *\n\t\t * @method register\n\t\t * @param {Object/String} name Name of the format for example \"bold\".\n\t\t * @param {Object/Array} format Optional format object or array of format variants\n\t\t * can only be omitted if the first arg is an object.\n\t\t */\n\t\tfunction register(name, format) {\n\t\t\tif (name) {\n\t\t\t\tif (typeof name !== 'string') {\n\t\t\t\t\teach(name, function(format, name) {\n\t\t\t\t\t\tregister(name, format);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t// Force format into array and add it to internal collection\n\t\t\t\t\tformat = format.length ? format : [format];\n\n\t\t\t\t\teach(format, function(format) {\n\t\t\t\t\t\t// Set deep to false by default on selector formats this to avoid removing\n\t\t\t\t\t\t// alignment on images inside paragraphs when alignment is changed on paragraphs\n\t\t\t\t\t\tif (format.deep === undef) {\n\t\t\t\t\t\t\tformat.deep = !format.selector;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Default to true\n\t\t\t\t\t\tif (format.split === undef) {\n\t\t\t\t\t\t\tformat.split = !format.selector || format.inline;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Default to true\n\t\t\t\t\t\tif (format.remove === undef && format.selector && !format.inline) {\n\t\t\t\t\t\t\tformat.remove = 'none';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Mark format as a mixed format inline + block level\n\t\t\t\t\t\tif (format.selector && format.inline) {\n\t\t\t\t\t\t\tformat.mixed = true;\n\t\t\t\t\t\t\tformat.block_expand = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Split classes if needed\n\t\t\t\t\t\tif (typeof format.classes === 'string') {\n\t\t\t\t\t\t\tformat.classes = format.classes.split(/\\s+/);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tformats[name] = format;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Unregister a specific format by name.\n\t\t *\n\t\t * @method unregister\n\t\t * @param {String} name Name of the format for example \"bold\".\n\t\t */\n\t\tfunction unregister(name) {\n\t\t\tif (name && formats[name]) {\n\t\t\t\tdelete formats[name];\n\t\t\t}\n\n\t\t\treturn formats;\n\t\t}\n\n\t\tfunction matchesUnInheritedFormatSelector(node, name) {\n\t\t\tvar formatList = get(name);\n\n\t\t\tif (formatList) {\n\t\t\t\tfor (var i = 0; i < formatList.length; i++) {\n\t\t\t\t\tif (formatList[i].inherit === false && dom.is(node, formatList[i].selector)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction getTextDecoration(node) {\n\t\t\tvar decoration;\n\n\t\t\ted.dom.getParent(node, function(n) {\n\t\t\t\tdecoration = ed.dom.getStyle(n, 'text-decoration');\n\t\t\t\treturn decoration && decoration !== 'none';\n\t\t\t});\n\n\t\t\treturn decoration;\n\t\t}\n\n\t\tfunction processUnderlineAndColor(node) {\n\t\t\tvar textDecoration;\n\t\t\tif (node.nodeType === 1 && node.parentNode && node.parentNode.nodeType === 1) {\n\t\t\t\ttextDecoration = getTextDecoration(node.parentNode);\n\t\t\t\tif (ed.dom.getStyle(node, 'color') && textDecoration) {\n\t\t\t\t\ted.dom.setStyle(node, 'text-decoration', textDecoration);\n\t\t\t\t} else if (ed.dom.getStyle(node, 'text-decoration') === textDecoration) {\n\t\t\t\t\ted.dom.setStyle(node, 'text-decoration', null);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Applies the specified format to the current selection or specified node.\n\t\t *\n\t\t * @method apply\n\t\t * @param {String} name Name of format to apply.\n\t\t * @param {Object} vars Optional list of variables to replace within format before applying it.\n\t\t * @param {Node} node Optional node to apply the format to defaults to current selection.\n\t\t */\n\t\tfunction apply(name, vars, node) {\n\t\t\tvar formatList = get(name), format = formatList[0], bookmark, rng, isCollapsed = !node && selection.isCollapsed();\n\n\t\t\tfunction setElementFormat(elm, fmt) {\n\t\t\t\tfmt = fmt || format;\n\n\t\t\t\tif (elm) {\n\t\t\t\t\tif (fmt.onformat) {\n\t\t\t\t\t\tfmt.onformat(elm, fmt, vars, node);\n\t\t\t\t\t}\n\n\t\t\t\t\teach(fmt.styles, function(value, name) {\n\t\t\t\t\t\tdom.setStyle(elm, name, replaceVars(value, vars));\n\t\t\t\t\t});\n\n\t\t\t\t\t// Needed for the WebKit span spam bug\n\t\t\t\t\t// TODO: Remove this once WebKit/Blink fixes this\n\t\t\t\t\tif (fmt.styles) {\n\t\t\t\t\t\tvar styleVal = dom.getAttrib(elm, 'style');\n\n\t\t\t\t\t\tif (styleVal) {\n\t\t\t\t\t\t\telm.setAttribute('data-mce-style', styleVal);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\teach(fmt.attributes, function(value, name) {\n\t\t\t\t\t\tdom.setAttrib(elm, name, replaceVars(value, vars));\n\t\t\t\t\t});\n\n\t\t\t\t\teach(fmt.classes, function(value) {\n\t\t\t\t\t\tvalue = replaceVars(value, vars);\n\n\t\t\t\t\t\tif (!dom.hasClass(elm, value)) {\n\t\t\t\t\t\t\tdom.addClass(elm, value);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction applyNodeStyle(formatList, node) {\n\t\t\t\tvar found = false;\n\n\t\t\t\tif (!format.selector) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Look for matching formats\n\t\t\t\teach(formatList, function(format) {\n\t\t\t\t\t// Check collapsed state if it exists\n\t\t\t\t\tif ('collapsed' in format && format.collapsed !== isCollapsed) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dom.is(node, format.selector) && !isCaretNode(node)) {\n\t\t\t\t\t\tsetElementFormat(node, format);\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn found;\n\t\t\t}\n\n\t\t\t// This converts:

      [a

      ]b

      ->

      [a]

      b

      \n\t\t\tfunction adjustSelectionToVisibleSelection() {\n\t\t\t\tfunction findSelectionEnd(start, end) {\n\t\t\t\t\tvar walker = new TreeWalker(end);\n\t\t\t\t\tfor (node = walker.prev2(); node; node = walker.prev2()) {\n\t\t\t\t\t\tif (node.nodeType == 3 && node.data.length > 0) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node.childNodes.length > 1 || node == start || node.tagName == 'BR') {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Adjust selection so that a end container with a end offset of zero is not included in the selection\n\t\t\t\t// as this isn't visible to the user.\n\t\t\t\tvar rng = ed.selection.getRng();\n\t\t\t\tvar start = rng.startContainer;\n\t\t\t\tvar end = rng.endContainer;\n\n\t\t\t\tif (start != end && rng.endOffset === 0) {\n\t\t\t\t\tvar newEnd = findSelectionEnd(start, end);\n\t\t\t\t\tvar endOffset = newEnd.nodeType == 3 ? newEnd.data.length : newEnd.childNodes.length;\n\n\t\t\t\t\trng.setEnd(newEnd, endOffset);\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\tfunction applyRngStyle(rng, bookmark, node_specific) {\n\t\t\t\tvar newWrappers = [], wrapName, wrapElm, contentEditable = true;\n\n\t\t\t\t// Setup wrapper element\n\t\t\t\twrapName = format.inline || format.block;\n\t\t\t\twrapElm = dom.create(wrapName);\n\t\t\t\tsetElementFormat(wrapElm);\n\n\t\t\t\trangeUtils.walk(rng, function(nodes) {\n\t\t\t\t\tvar currentWrapElm;\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Process a list of nodes wrap them.\n\t\t\t\t\t */\n\t\t\t\t\tfunction process(node) {\n\t\t\t\t\t\tvar nodeName, parentName, hasContentEditableState, lastContentEditable;\n\n\t\t\t\t\t\tlastContentEditable = contentEditable;\n\t\t\t\t\t\tnodeName = node.nodeName.toLowerCase();\n\t\t\t\t\t\tparentName = node.parentNode.nodeName.toLowerCase();\n\n\t\t\t\t\t\t// Node has a contentEditable value\n\t\t\t\t\t\tif (node.nodeType === 1 && getContentEditable(node)) {\n\t\t\t\t\t\t\tlastContentEditable = contentEditable;\n\t\t\t\t\t\t\tcontentEditable = getContentEditable(node) === \"true\";\n\t\t\t\t\t\t\thasContentEditableState = true; // We don't want to wrap the container only it's children\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Stop wrapping on br elements\n\t\t\t\t\t\tif (isEq(nodeName, 'br')) {\n\t\t\t\t\t\t\tcurrentWrapElm = 0;\n\n\t\t\t\t\t\t\t// Remove any br elements when we wrap things\n\t\t\t\t\t\t\tif (format.block) {\n\t\t\t\t\t\t\t\tdom.remove(node);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If node is wrapper type\n\t\t\t\t\t\tif (format.wrapper && matchNode(node, name, vars)) {\n\t\t\t\t\t\t\tcurrentWrapElm = 0;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Can we rename the block\n\t\t\t\t\t\t// TODO: Break this if up, too complex\n\t\t\t\t\t\tif (contentEditable && !hasContentEditableState && format.block &&\n\t\t\t\t\t\t\t!format.wrapper && isTextBlock(nodeName) && isValid(parentName, wrapName)) {\n\t\t\t\t\t\t\tnode = dom.rename(node, wrapName);\n\t\t\t\t\t\t\tsetElementFormat(node);\n\t\t\t\t\t\t\tnewWrappers.push(node);\n\t\t\t\t\t\t\tcurrentWrapElm = 0;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Handle selector patterns\n\t\t\t\t\t\tif (format.selector) {\n\t\t\t\t\t\t\tvar found = applyNodeStyle(formatList, node);\n\n\t\t\t\t\t\t\t// Continue processing if a selector match wasn't found and a inline element is defined\n\t\t\t\t\t\t\tif (!format.inline || found) {\n\t\t\t\t\t\t\t\tcurrentWrapElm = 0;\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Is it valid to wrap this item\n\t\t\t\t\t\t// TODO: Break this if up, too complex\n\t\t\t\t\t\tif (contentEditable && !hasContentEditableState && isValid(wrapName, nodeName) && isValid(parentName, wrapName) &&\n\t\t\t\t\t\t\t\t!(!node_specific && node.nodeType === 3 &&\n\t\t\t\t\t\t\t\tnode.nodeValue.length === 1 &&\n\t\t\t\t\t\t\t\tnode.nodeValue.charCodeAt(0) === 65279) &&\n\t\t\t\t\t\t\t\t!isCaretNode(node) &&\n\t\t\t\t\t\t\t\t(!format.inline || !isBlock(node))) {\n\t\t\t\t\t\t\t// Start wrapping\n\t\t\t\t\t\t\tif (!currentWrapElm) {\n\t\t\t\t\t\t\t\t// Wrap the node\n\t\t\t\t\t\t\t\tcurrentWrapElm = dom.clone(wrapElm, FALSE);\n\t\t\t\t\t\t\t\tnode.parentNode.insertBefore(currentWrapElm, node);\n\t\t\t\t\t\t\t\tnewWrappers.push(currentWrapElm);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcurrentWrapElm.appendChild(node);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Start a new wrapper for possible children\n\t\t\t\t\t\t\tcurrentWrapElm = 0;\n\n\t\t\t\t\t\t\teach(grep(node.childNodes), process);\n\n\t\t\t\t\t\t\tif (hasContentEditableState) {\n\t\t\t\t\t\t\t\tcontentEditable = lastContentEditable; // Restore last contentEditable state from stack\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// End the last wrapper\n\t\t\t\t\t\t\tcurrentWrapElm = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Process siblings from range\n\t\t\t\t\teach(nodes, process);\n\t\t\t\t});\n\n\t\t\t\t// Apply formats to links as well to get the color of the underline to change as well\n\t\t\t\tif (format.links === true) {\n\t\t\t\t\teach(newWrappers, function(node) {\n\t\t\t\t\t\tfunction process(node) {\n\t\t\t\t\t\t\tif (node.nodeName === 'A') {\n\t\t\t\t\t\t\t\tsetElementFormat(node, format);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\teach(grep(node.childNodes), process);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tprocess(node);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Cleanup\n\t\t\t\teach(newWrappers, function(node) {\n\t\t\t\t\tvar childCount;\n\n\t\t\t\t\tfunction getChildCount(node) {\n\t\t\t\t\t\tvar count = 0;\n\n\t\t\t\t\t\teach(node.childNodes, function(node) {\n\t\t\t\t\t\t\tif (!isWhiteSpaceNode(node) && !isBookmarkNode(node)) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn count;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction getChildElementNode(root) {\n\t\t\t\t\t\tvar child = false;\n\t\t\t\t\t\teach(root.childNodes, function(node) {\n\t\t\t\t\t\t\tif (isElementNode(node)) {\n\t\t\t\t\t\t\t\tchild = node;\n\t\t\t\t\t\t\t\treturn false; // break loop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn child;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction matchNestedWrapper(node, filter) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif (getChildCount(node) !== 1) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tnode = getChildElementNode(node);\n\t\t\t\t\t\t\tif (!node) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else if (filter(node)) {\n\t\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (node);\n\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction mergeStyles(node) {\n\t\t\t\t\t\tvar child, clone;\n\n\t\t\t\t\t\tchild = getChildElementNode(node);\n\n\t\t\t\t\t\t// If child was found and of the same type as the current node\n\t\t\t\t\t\tif (child && !isBookmarkNode(child) && matchName(child, format)) {\n\t\t\t\t\t\t\tclone = dom.clone(child, FALSE);\n\t\t\t\t\t\t\tsetElementFormat(clone);\n\n\t\t\t\t\t\t\tdom.replace(clone, node, TRUE);\n\t\t\t\t\t\t\tdom.remove(child, 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn clone || node;\n\t\t\t\t\t}\n\n\t\t\t\t\tchildCount = getChildCount(node);\n\n\t\t\t\t\t// Remove empty nodes but only if there is multiple wrappers and they are not block\n\t\t\t\t\t// elements so never remove single

      since that would remove the\n\t\t\t\t\t// current empty block element where the caret is at\n\t\t\t\t\tif ((newWrappers.length > 1 || !isBlock(node)) && childCount === 0) {\n\t\t\t\t\t\tdom.remove(node, 1);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (format.inline || format.wrapper) {\n\t\t\t\t\t\t// Merges the current node with it's children of similar type to reduce the number of elements\n\t\t\t\t\t\tif (!format.exact && childCount === 1) {\n\t\t\t\t\t\t\tnode = mergeStyles(node);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Remove/merge children\n\t\t\t\t\t\teach(formatList, function(format) {\n\t\t\t\t\t\t\t// Merge all children of similar type will move styles from child to parent\n\t\t\t\t\t\t\t// this: text\n\t\t\t\t\t\t\t// will become: text\n\t\t\t\t\t\t\teach(dom.select(format.inline, node), function(child) {\n\t\t\t\t\t\t\t\tif (isBookmarkNode(child)) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tremoveFormat(format, vars, child, format.exact ? child : null);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// Remove format if direct parent already has the same format\n\t\t\t\t\t\tif (matchNode(node.parentNode, name, vars)) {\n\t\t\t\t\t\t\tif (removeFormat(format, vars, node)) {\n\t\t\t\t\t\t\t\tnode = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Remove format if any ancestor already has the same format\n\t\t\t\t\t\tif (format.merge_with_parents) {\n\t\t\t\t\t\t\tdom.getParent(node.parentNode, function(parent) {\n\t\t\t\t\t\t\t\tif (matchNode(parent, name, vars)) {\n\t\t\t\t\t\t\t\t\tif (removeFormat(format, vars, node)) {\n\t\t\t\t\t\t\t\t\t\tnode = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn TRUE;\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// fontSize defines the line height for the whole branch of nested style wrappers,\n\t\t\t\t\t\t// therefore it should be set on the outermost wrapper\n\t\t\t\t\t\tif (!isBlock(node) && !getStyle(node, 'fontSize')) {\n\t\t\t\t\t\t\tvar styleNode = matchNestedWrapper(node, hasStyle('fontSize'));\n\t\t\t\t\t\t\tif (styleNode) {\n\t\t\t\t\t\t\t\tapply('fontsize', {value: getStyle(styleNode, 'fontSize')}, node);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Merge next and previous siblings if they are similar texttext becomes texttext\n\t\t\t\t\t\tif (node && format.merge_siblings !== false) {\n\t\t\t\t\t\t\tnode = mergeSiblings(getNonWhiteSpaceSibling(node), node);\n\t\t\t\t\t\t\tnode = mergeSiblings(node, getNonWhiteSpaceSibling(node, TRUE));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (getContentEditable(selection.getNode()) === \"false\") {\n\t\t\t\tnode = selection.getNode();\n\t\t\t\tfor (var i = 0, l = formatList.length; i < l; i++) {\n\t\t\t\t\tif (formatList[i].ceFalseOverride && dom.is(node, formatList[i].selector)) {\n\t\t\t\t\t\tsetElementFormat(node, formatList[i]);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (format) {\n\t\t\t\tif (node) {\n\t\t\t\t\tif (node.nodeType) {\n\t\t\t\t\t\tif (!applyNodeStyle(formatList, node)) {\n\t\t\t\t\t\t\trng = dom.createRng();\n\t\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\t\trng.setEndAfter(node);\n\t\t\t\t\t\t\tapplyRngStyle(expandRng(rng, formatList), null, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyRngStyle(node, null, true);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!isCollapsed || !format.inline || dom.select('td[data-mce-selected],th[data-mce-selected]').length) {\n\t\t\t\t\t\t// Obtain selection node before selection is unselected by applyRngStyle()\n\t\t\t\t\t\tvar curSelNode = ed.selection.getNode();\n\n\t\t\t\t\t\t// If the formats have a default block and we can't find a parent block then\n\t\t\t\t\t\t// start wrapping it with a DIV this is for forced_root_blocks: false\n\t\t\t\t\t\t// It's kind of a hack but people should be using the default block type P since all desktop editors work that way\n\t\t\t\t\t\tif (!forcedRootBlock && formatList[0].defaultBlock && !dom.getParent(curSelNode, dom.isBlock)) {\n\t\t\t\t\t\t\tapply(formatList[0].defaultBlock);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Apply formatting to selection\n\t\t\t\t\t\ted.selection.setRng(adjustSelectionToVisibleSelection());\n\t\t\t\t\t\tbookmark = selection.getBookmark();\n\t\t\t\t\t\tapplyRngStyle(expandRng(selection.getRng(TRUE), formatList), bookmark);\n\n\t\t\t\t\t\tif (format.styles) {\n\t\t\t\t\t\t\t// Colored nodes should be underlined so that the color of the underline matches the text color.\n\t\t\t\t\t\t\tif (format.styles.color || format.styles.textDecoration) {\n\t\t\t\t\t\t\t\twalk(curSelNode, processUnderlineAndColor, 'childNodes');\n\t\t\t\t\t\t\t\tprocessUnderlineAndColor(curSelNode);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// nodes with font-size should have their own background color as well to fit the line-height (see TINY-882)\n\t\t\t\t\t\t\tif (format.styles.backgroundColor) {\n\t\t\t\t\t\t\t\tprocessChildElements(curSelNode,\n\t\t\t\t\t\t\t\t\thasStyle('fontSize'),\n\t\t\t\t\t\t\t\t\tapplyStyle('backgroundColor', replaceVars(format.styles.backgroundColor, vars))\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\tselection.moveToBookmark(bookmark);\n\t\t\t\t\t\tmoveStart(selection.getRng(TRUE));\n\t\t\t\t\t\ted.nodeChanged();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tperformCaretAction('apply', name, vars);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tHooks.postProcess(name, ed);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Removes the specified format from the current selection or specified node.\n\t\t *\n\t\t * @method remove\n\t\t * @param {String} name Name of format to remove.\n\t\t * @param {Object} vars Optional list of variables to replace within format before removing it.\n\t\t * @param {Node/Range} node Optional node or DOM range to remove the format from defaults to current selection.\n\t\t */\n\t\tfunction remove(name, vars, node, similar) {\n\t\t\tvar formatList = get(name), format = formatList[0], bookmark, rng, contentEditable = true;\n\n\t\t\t// Merges the styles for each node\n\t\t\tfunction process(node) {\n\t\t\t\tvar children, i, l, lastContentEditable, hasContentEditableState;\n\n\t\t\t\t// Node has a contentEditable value\n\t\t\t\tif (node.nodeType === 1 && getContentEditable(node)) {\n\t\t\t\t\tlastContentEditable = contentEditable;\n\t\t\t\t\tcontentEditable = getContentEditable(node) === \"true\";\n\t\t\t\t\thasContentEditableState = true; // We don't want to wrap the container only it's children\n\t\t\t\t}\n\n\t\t\t\t// Grab the children first since the nodelist might be changed\n\t\t\t\tchildren = grep(node.childNodes);\n\n\t\t\t\t// Process current node\n\t\t\t\tif (contentEditable && !hasContentEditableState) {\n\t\t\t\t\tfor (i = 0, l = formatList.length; i < l; i++) {\n\t\t\t\t\t\tif (removeFormat(formatList[i], vars, node, node)) {\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}\n\n\t\t\t\t// Process the children\n\t\t\t\tif (format.deep) {\n\t\t\t\t\tif (children.length) {\n\t\t\t\t\t\tfor (i = 0, l = children.length; i < l; i++) {\n\t\t\t\t\t\t\tprocess(children[i]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (hasContentEditableState) {\n\t\t\t\t\t\t\tcontentEditable = lastContentEditable; // Restore last contentEditable state from stack\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction findFormatRoot(container) {\n\t\t\t\tvar formatRoot;\n\n\t\t\t\t// Find format root\n\t\t\t\teach(getParents(container.parentNode).reverse(), function(parent) {\n\t\t\t\t\tvar format;\n\n\t\t\t\t\t// Find format root element\n\t\t\t\t\tif (!formatRoot && parent.id != '_start' && parent.id != '_end') {\n\t\t\t\t\t\t// Is the node matching the format we are looking for\n\t\t\t\t\t\tformat = matchNode(parent, name, vars, similar);\n\t\t\t\t\t\tif (format && format.split !== false) {\n\t\t\t\t\t\t\tformatRoot = parent;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn formatRoot;\n\t\t\t}\n\n\t\t\tfunction wrapAndSplit(formatRoot, container, target, split) {\n\t\t\t\tvar parent, clone, lastClone, firstClone, i, formatRootParent;\n\n\t\t\t\t// Format root found then clone formats and split it\n\t\t\t\tif (formatRoot) {\n\t\t\t\t\tformatRootParent = formatRoot.parentNode;\n\n\t\t\t\t\tfor (parent = container.parentNode; parent && parent != formatRootParent; parent = parent.parentNode) {\n\t\t\t\t\t\tclone = dom.clone(parent, FALSE);\n\n\t\t\t\t\t\tfor (i = 0; i < formatList.length; i++) {\n\t\t\t\t\t\t\tif (removeFormat(formatList[i], vars, clone, clone)) {\n\t\t\t\t\t\t\t\tclone = 0;\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\n\t\t\t\t\t\t// Build wrapper node\n\t\t\t\t\t\tif (clone) {\n\t\t\t\t\t\t\tif (lastClone) {\n\t\t\t\t\t\t\t\tclone.appendChild(lastClone);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!firstClone) {\n\t\t\t\t\t\t\t\tfirstClone = clone;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tlastClone = clone;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never split block elements if the format is mixed\n\t\t\t\t\tif (split && (!format.mixed || !isBlock(formatRoot))) {\n\t\t\t\t\t\tcontainer = dom.split(formatRoot, container);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Wrap container in cloned formats\n\t\t\t\t\tif (lastClone) {\n\t\t\t\t\t\ttarget.parentNode.insertBefore(lastClone, target);\n\t\t\t\t\t\tfirstClone.appendChild(target);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn container;\n\t\t\t}\n\n\t\t\tfunction splitToFormatRoot(container) {\n\t\t\t\treturn wrapAndSplit(findFormatRoot(container), container, container, true);\n\t\t\t}\n\n\t\t\tfunction unwrap(start) {\n\t\t\t\tvar node = dom.get(start ? '_start' : '_end'),\n\t\t\t\t\tout = node[start ? 'firstChild' : 'lastChild'];\n\n\t\t\t\t// If the end is placed within the start the result will be removed\n\t\t\t\t// So this checks if the out node is a bookmark node if it is it\n\t\t\t\t// checks for another more suitable node\n\t\t\t\tif (isBookmarkNode(out)) {\n\t\t\t\t\tout = out[start ? 'firstChild' : 'lastChild'];\n\t\t\t\t}\n\n\t\t\t\t// Since dom.remove removes empty text nodes then we need to try to find a better node\n\t\t\t\tif (out.nodeType == 3 && out.data.length === 0) {\n\t\t\t\t\tout = start ? node.previousSibling || node.nextSibling : node.nextSibling || node.previousSibling;\n\t\t\t\t}\n\n\t\t\t\tdom.remove(node, true);\n\n\t\t\t\treturn out;\n\t\t\t}\n\n\t\t\tfunction removeRngStyle(rng) {\n\t\t\t\tvar startContainer, endContainer;\n\t\t\t\tvar commonAncestorContainer = rng.commonAncestorContainer;\n\n\t\t\t\trng = expandRng(rng, formatList, TRUE);\n\n\t\t\t\tif (format.split) {\n\t\t\t\t\tstartContainer = getContainer(rng, TRUE);\n\t\t\t\t\tendContainer = getContainer(rng);\n\n\t\t\t\t\tif (startContainer != endContainer) {\n\t\t\t\t\t\t// WebKit will render the table incorrectly if we wrap a TH or TD in a SPAN\n\t\t\t\t\t\t// so let's see if we can use the first child instead\n\t\t\t\t\t\t// This will happen if you triple click a table cell and use remove formatting\n\t\t\t\t\t\tif (/^(TR|TH|TD)$/.test(startContainer.nodeName) && startContainer.firstChild) {\n\t\t\t\t\t\t\tif (startContainer.nodeName == \"TR\") {\n\t\t\t\t\t\t\t\tstartContainer = startContainer.firstChild.firstChild || startContainer;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tstartContainer = startContainer.firstChild || startContainer;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Try to adjust endContainer as well if cells on the same row were selected - bug #6410\n\t\t\t\t\t\tif (commonAncestorContainer &&\n\t\t\t\t\t\t\t/^T(HEAD|BODY|FOOT|R)$/.test(commonAncestorContainer.nodeName) &&\n\t\t\t\t\t\t\tisTableCell(endContainer) && endContainer.firstChild) {\n\t\t\t\t\t\t\tendContainer = endContainer.firstChild || endContainer;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (dom.isChildOf(startContainer, endContainer) && !isBlock(endContainer) &&\n\t\t\t\t\t\t\t!isTableCell(startContainer) && !isTableCell(endContainer)) {\n\t\t\t\t\t\t\tstartContainer = wrap(startContainer, 'span', {id: '_start', 'data-mce-type': 'bookmark'});\n\t\t\t\t\t\t\tsplitToFormatRoot(startContainer);\n\t\t\t\t\t\t\tstartContainer = unwrap(TRUE);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Wrap start/end nodes in span element since these might be cloned/moved\n\t\t\t\t\t\tstartContainer = wrap(startContainer, 'span', {id: '_start', 'data-mce-type': 'bookmark'});\n\t\t\t\t\t\tendContainer = wrap(endContainer, 'span', {id: '_end', 'data-mce-type': 'bookmark'});\n\n\t\t\t\t\t\t// Split start/end\n\t\t\t\t\t\tsplitToFormatRoot(startContainer);\n\t\t\t\t\t\tsplitToFormatRoot(endContainer);\n\n\t\t\t\t\t\t// Unwrap start/end to get real elements again\n\t\t\t\t\t\tstartContainer = unwrap(TRUE);\n\t\t\t\t\t\tendContainer = unwrap();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstartContainer = endContainer = splitToFormatRoot(startContainer);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update range positions since they might have changed after the split operations\n\t\t\t\t\trng.startContainer = startContainer.parentNode ? startContainer.parentNode : startContainer;\n\t\t\t\t\trng.startOffset = nodeIndex(startContainer);\n\t\t\t\t\trng.endContainer = endContainer.parentNode ? endContainer.parentNode : endContainer;\n\t\t\t\t\trng.endOffset = nodeIndex(endContainer) + 1;\n\t\t\t\t}\n\n\t\t\t\t// Remove items between start/end\n\t\t\t\trangeUtils.walk(rng, function(nodes) {\n\t\t\t\t\teach(nodes, function(node) {\n\t\t\t\t\t\tprocess(node);\n\n\t\t\t\t\t\t// Remove parent span if it only contains text-decoration: underline, yet a parent node is also underlined.\n\t\t\t\t\t\tif (node.nodeType === 1 && ed.dom.getStyle(node, 'text-decoration') === 'underline' &&\n\t\t\t\t\t\t\tnode.parentNode && getTextDecoration(node.parentNode) === 'underline') {\n\t\t\t\t\t\t\tremoveFormat({\n\t\t\t\t\t\t\t\t'deep': false,\n\t\t\t\t\t\t\t\t'exact': true,\n\t\t\t\t\t\t\t\t'inline': 'span',\n\t\t\t\t\t\t\t\t'styles': {\n\t\t\t\t\t\t\t\t\t'textDecoration': 'underline'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, null, node);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Handle node\n\t\t\tif (node) {\n\t\t\t\tif (node.nodeType) {\n\t\t\t\t\trng = dom.createRng();\n\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\trng.setEndAfter(node);\n\t\t\t\t\tremoveRngStyle(rng);\n\t\t\t\t} else {\n\t\t\t\t\tremoveRngStyle(node);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (getContentEditable(selection.getNode()) === \"false\") {\n\t\t\t\tnode = selection.getNode();\n\t\t\t\tfor (var i = 0, l = formatList.length; i < l; i++) {\n\t\t\t\t\tif (formatList[i].ceFalseOverride) {\n\t\t\t\t\t\tif (removeFormat(formatList[i], vars, node, node)) {\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}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!selection.isCollapsed() || !format.inline || dom.select('td[data-mce-selected],th[data-mce-selected]').length) {\n\t\t\t\tbookmark = selection.getBookmark();\n\t\t\t\tremoveRngStyle(selection.getRng(TRUE));\n\t\t\t\tselection.moveToBookmark(bookmark);\n\n\t\t\t\t// Check if start element still has formatting then we are at: \"text|text\"\n\t\t\t\t// and need to move the start into the next text node\n\t\t\t\tif (format.inline && match(name, vars, selection.getStart())) {\n\t\t\t\t\tmoveStart(selection.getRng(true));\n\t\t\t\t}\n\n\t\t\t\ted.nodeChanged();\n\t\t\t} else {\n\t\t\t\tperformCaretAction('remove', name, vars, similar);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Toggles the specified format on/off.\n\t\t *\n\t\t * @method toggle\n\t\t * @param {String} name Name of format to apply/remove.\n\t\t * @param {Object} vars Optional list of variables to replace within format before applying/removing it.\n\t\t * @param {Node} node Optional node to apply the format to or remove from. Defaults to current selection.\n\t\t */\n\t\tfunction toggle(name, vars, node) {\n\t\t\tvar fmt = get(name);\n\n\t\t\tif (match(name, vars, node) && (!('toggle' in fmt[0]) || fmt[0].toggle)) {\n\t\t\t\tremove(name, vars, node);\n\t\t\t} else {\n\t\t\t\tapply(name, vars, node);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return true/false if the specified node has the specified format.\n\t\t *\n\t\t * @method matchNode\n\t\t * @param {Node} node Node to check the format on.\n\t\t * @param {String} name Format name to check.\n\t\t * @param {Object} vars Optional list of variables to replace before checking it.\n\t\t * @param {Boolean} similar Match format that has similar properties.\n\t\t * @return {Object} Returns the format object it matches or undefined if it doesn't match.\n\t\t */\n\t\tfunction matchNode(node, name, vars, similar) {\n\t\t\tvar formatList = get(name), format, i, classes;\n\n\t\t\tfunction matchItems(node, format, item_name) {\n\t\t\t\tvar key, value, items = format[item_name], i;\n\n\t\t\t\t// Custom match\n\t\t\t\tif (format.onmatch) {\n\t\t\t\t\treturn format.onmatch(node, format, item_name);\n\t\t\t\t}\n\n\t\t\t\t// Check all items\n\t\t\t\tif (items) {\n\t\t\t\t\t// Non indexed object\n\t\t\t\t\tif (items.length === undef) {\n\t\t\t\t\t\tfor (key in items) {\n\t\t\t\t\t\t\tif (items.hasOwnProperty(key)) {\n\t\t\t\t\t\t\t\tif (item_name === 'attributes') {\n\t\t\t\t\t\t\t\t\tvalue = dom.getAttrib(node, key);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tvalue = getStyle(node, key);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (similar && !value && !format.exact) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ((!similar || format.exact) && !isEq(value, normalizeStyleValue(replaceVars(items[key], vars), key))) {\n\t\t\t\t\t\t\t\t\treturn;\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} else {\n\t\t\t\t\t\t// Only one match needed for indexed arrays\n\t\t\t\t\t\tfor (i = 0; i < items.length; i++) {\n\t\t\t\t\t\t\tif (item_name === 'attributes' ? dom.getAttrib(node, items[i]) : getStyle(node, items[i])) {\n\t\t\t\t\t\t\t\treturn format;\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\treturn format;\n\t\t\t}\n\n\t\t\tif (formatList && node) {\n\t\t\t\t// Check each format in list\n\t\t\t\tfor (i = 0; i < formatList.length; i++) {\n\t\t\t\t\tformat = formatList[i];\n\n\t\t\t\t\t// Name name, attributes, styles and classes\n\t\t\t\t\tif (matchName(node, format) && matchItems(node, format, 'attributes') && matchItems(node, format, 'styles')) {\n\t\t\t\t\t\t// Match classes\n\t\t\t\t\t\tif ((classes = format.classes)) {\n\t\t\t\t\t\t\tfor (i = 0; i < classes.length; i++) {\n\t\t\t\t\t\t\t\tif (!dom.hasClass(node, classes[i])) {\n\t\t\t\t\t\t\t\t\treturn;\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\treturn format;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Matches the current selection or specified node against the specified format name.\n\t\t *\n\t\t * @method match\n\t\t * @param {String} name Name of format to match.\n\t\t * @param {Object} vars Optional list of variables to replace before checking it.\n\t\t * @param {Node} node Optional node to check.\n\t\t * @return {boolean} true/false if the specified selection/node matches the format.\n\t\t */\n\t\tfunction match(name, vars, node) {\n\t\t\tvar startNode;\n\n\t\t\tfunction matchParents(node) {\n\t\t\t\tvar root = dom.getRoot();\n\n\t\t\t\tif (node === root) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Find first node with similar format settings\n\t\t\t\tnode = dom.getParent(node, function(node) {\n\t\t\t\t\tif (matchesUnInheritedFormatSelector(node, name)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn node.parentNode === root || !!matchNode(node, name, vars, true);\n\t\t\t\t});\n\n\t\t\t\t// Do an exact check on the similar format element\n\t\t\t\treturn matchNode(node, name, vars);\n\t\t\t}\n\n\t\t\t// Check specified node\n\t\t\tif (node) {\n\t\t\t\treturn matchParents(node);\n\t\t\t}\n\n\t\t\t// Check selected node\n\t\t\tnode = selection.getNode();\n\t\t\tif (matchParents(node)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\n\t\t\t// Check start node if it's different\n\t\t\tstartNode = selection.getStart();\n\t\t\tif (startNode != node) {\n\t\t\t\tif (matchParents(startNode)) {\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t/**\n\t\t * Matches the current selection against the array of formats and returns a new array with matching formats.\n\t\t *\n\t\t * @method matchAll\n\t\t * @param {Array} names Name of format to match.\n\t\t * @param {Object} vars Optional list of variables to replace before checking it.\n\t\t * @return {Array} Array with matched formats.\n\t\t */\n\t\tfunction matchAll(names, vars) {\n\t\t\tvar startElement, matchedFormatNames = [], checkedMap = {};\n\n\t\t\t// Check start of selection for formats\n\t\t\tstartElement = selection.getStart();\n\t\t\tdom.getParent(startElement, function(node) {\n\t\t\t\tvar i, name;\n\n\t\t\t\tfor (i = 0; i < names.length; i++) {\n\t\t\t\t\tname = names[i];\n\n\t\t\t\t\tif (!checkedMap[name] && matchNode(node, name, vars)) {\n\t\t\t\t\t\tcheckedMap[name] = true;\n\t\t\t\t\t\tmatchedFormatNames.push(name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, dom.getRoot());\n\n\t\t\treturn matchedFormatNames;\n\t\t}\n\n\t\t/**\n\t\t * Returns true/false if the specified format can be applied to the current selection or not. It\n\t\t * will currently only check the state for selector formats, it returns true on all other format types.\n\t\t *\n\t\t * @method canApply\n\t\t * @param {String} name Name of format to check.\n\t\t * @return {boolean} true/false if the specified format can be applied to the current selection/node.\n\t\t */\n\t\tfunction canApply(name) {\n\t\t\tvar formatList = get(name), startNode, parents, i, x, selector;\n\n\t\t\tif (formatList) {\n\t\t\t\tstartNode = selection.getStart();\n\t\t\t\tparents = getParents(startNode);\n\n\t\t\t\tfor (x = formatList.length - 1; x >= 0; x--) {\n\t\t\t\t\tselector = formatList[x].selector;\n\n\t\t\t\t\t// Format is not selector based then always return TRUE\n\t\t\t\t\t// Is it has a defaultBlock then it's likely it can be applied for example align on a non block element line\n\t\t\t\t\tif (!selector || formatList[x].defaultBlock) {\n\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (i = parents.length - 1; i >= 0; i--) {\n\t\t\t\t\t\tif (dom.is(parents[i], selector)) {\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}\n\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t/**\n\t\t * Executes the specified callback when the current selection matches the formats or not.\n\t\t *\n\t\t * @method formatChanged\n\t\t * @param {String} formats Comma separated list of formats to check for.\n\t\t * @param {function} callback Callback with state and args when the format is changed/toggled on/off.\n\t\t * @param {Boolean} similar True/false state if the match should handle similar or exact formats.\n\t\t */\n\t\tfunction formatChanged(formats, callback, similar) {\n\t\t\tvar currentFormats;\n\n\t\t\t// Setup format node change logic\n\t\t\tif (!formatChangeData) {\n\t\t\t\tformatChangeData = {};\n\t\t\t\tcurrentFormats = {};\n\n\t\t\t\ted.on('NodeChange', function(e) {\n\t\t\t\t\tvar parents = getParents(e.element), matchedFormats = {};\n\n\t\t\t\t\t// Ignore bogus nodes like the tag created by moveStart()\n\t\t\t\t\tparents = Tools.grep(parents, function(node) {\n\t\t\t\t\t\treturn node.nodeType == 1 && !node.getAttribute('data-mce-bogus');\n\t\t\t\t\t});\n\n\t\t\t\t\t// Check for new formats\n\t\t\t\t\teach(formatChangeData, function(callbacks, format) {\n\t\t\t\t\t\teach(parents, function(node) {\n\t\t\t\t\t\t\tif (matchNode(node, format, {}, callbacks.similar)) {\n\t\t\t\t\t\t\t\tif (!currentFormats[format]) {\n\t\t\t\t\t\t\t\t\t// Execute callbacks\n\t\t\t\t\t\t\t\t\teach(callbacks, function(callback) {\n\t\t\t\t\t\t\t\t\t\tcallback(true, {node: node, format: format, parents: parents});\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tcurrentFormats[format] = callbacks;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tmatchedFormats[format] = callbacks;\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (matchesUnInheritedFormatSelector(node, format)) {\n\t\t\t\t\t\t\t\treturn false;\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// Check if current formats still match\n\t\t\t\t\teach(currentFormats, function(callbacks, format) {\n\t\t\t\t\t\tif (!matchedFormats[format]) {\n\t\t\t\t\t\t\tdelete currentFormats[format];\n\n\t\t\t\t\t\t\teach(callbacks, function(callback) {\n\t\t\t\t\t\t\t\tcallback(false, {node: e.element, format: format, parents: parents});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Add format listeners\n\t\t\teach(formats.split(','), function(format) {\n\t\t\t\tif (!formatChangeData[format]) {\n\t\t\t\t\tformatChangeData[format] = [];\n\t\t\t\t\tformatChangeData[format].similar = similar;\n\t\t\t\t}\n\n\t\t\t\tformatChangeData[format].push(callback);\n\t\t\t});\n\n\t\t\treturn this;\n\t\t}\n\n\t\t/**\n\t\t * Returns a preview css text for the specified format.\n\t\t *\n\t\t * @method getCssText\n\t\t * @param {String/Object} format Format to generate preview css text for.\n\t\t * @return {String} Css text for the specified format.\n\t\t * @example\n\t\t * var cssText1 = editor.formatter.getCssText('bold');\n\t\t * var cssText2 = editor.formatter.getCssText({inline: 'b'});\n\t\t */\n\t\tfunction getCssText(format) {\n\t\t\treturn Preview.getCssText(ed, format);\n\t\t}\n\n\t\t// Expose to public\n\t\textend(this, {\n\t\t\tget: get,\n\t\t\tregister: register,\n\t\t\tunregister: unregister,\n\t\t\tapply: apply,\n\t\t\tremove: remove,\n\t\t\ttoggle: toggle,\n\t\t\tmatch: match,\n\t\t\tmatchAll: matchAll,\n\t\t\tmatchNode: matchNode,\n\t\t\tcanApply: canApply,\n\t\t\tformatChanged: formatChanged,\n\t\t\tgetCssText: getCssText\n\t\t});\n\n\t\t// Initialize\n\t\tdefaultFormats();\n\t\taddKeyboardShortcuts();\n\t\ted.on('BeforeGetContent', function(e) {\n\t\t\tif (markCaretContainersBogus && e.format != 'raw') {\n\t\t\t\tmarkCaretContainersBogus();\n\t\t\t}\n\t\t});\n\t\ted.on('mouseup keydown', function(e) {\n\t\t\tif (disableCaretContainer) {\n\t\t\t\tdisableCaretContainer(e);\n\t\t\t}\n\t\t});\n\n\t\t// Private functions\n\n\t\t/**\n\t\t * Checks if the specified nodes name matches the format inline/block or selector.\n\t\t *\n\t\t * @private\n\t\t * @param {Node} node Node to match against the specified format.\n\t\t * @param {Object} format Format object o match with.\n\t\t * @return {boolean} true/false if the format matches.\n\t\t */\n\t\tfunction matchName(node, format) {\n\t\t\t// Check for inline match\n\t\t\tif (isEq(node, format.inline)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\n\t\t\t// Check for block match\n\t\t\tif (isEq(node, format.block)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\n\t\t\t// Check for selector match\n\t\t\tif (format.selector) {\n\t\t\t\treturn node.nodeType == 1 && dom.is(node, format.selector);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Compares two string/nodes regardless of their case.\n\t\t *\n\t\t * @private\n\t\t * @param {String/Node} str1 Node or string to compare.\n\t\t * @param {String/Node} str2 Node or string to compare.\n\t\t * @return {boolean} True/false if they match.\n\t\t */\n\t\tfunction isEq(str1, str2) {\n\t\t\tstr1 = str1 || '';\n\t\t\tstr2 = str2 || '';\n\n\t\t\tstr1 = '' + (str1.nodeName || str1);\n\t\t\tstr2 = '' + (str2.nodeName || str2);\n\n\t\t\treturn str1.toLowerCase() == str2.toLowerCase();\n\t\t}\n\n\t\tfunction processChildElements(node, filter, process) {\n\t\t\teach(node.childNodes, function(node) {\n\t\t\t\tif (isElementNode(node)) {\n\t\t\t\t\tif (filter(node)) {\n\t\t\t\t\t\tprocess(node);\n\t\t\t\t\t}\n\t\t\t\t\tif (node.hasChildNodes()) {\n\t\t\t\t\t\tprocessChildElements(node, filter, process);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tfunction isElementNode(node) {\n\t\t\treturn node.nodeType == 1 && !isBookmarkNode(node) && !isWhiteSpaceNode(node) && !isCaretNode(node);\n\t\t}\n\n\t\tfunction hasStyle(name) {\n\t\t\treturn Fun.curry(function(name, node) {\n\t\t\t\treturn !!(node && getStyle(node, name));\n\t\t\t}, name);\n\t\t}\n\n\t\tfunction applyStyle(name, value) {\n\t\t\treturn Fun.curry(function(name, value, node) {\n\t\t\t\tdom.setStyle(node, name, value);\n\t\t\t}, name, value);\n\t\t}\n\n\t\t/**\n\t\t * Returns the style by name on the specified node. This method modifies the style\n\t\t * contents to make it more easy to match. This will resolve a few browser issues.\n\t\t *\n\t\t * @private\n\t\t * @param {Node} node to get style from.\n\t\t * @param {String} name Style name to get.\n\t\t * @return {String} Style item value.\n\t\t */\n\t\tfunction getStyle(node, name) {\n\t\t\treturn normalizeStyleValue(dom.getStyle(node, name), name);\n\t\t}\n\n\t\t/**\n\t\t * Normalize style value by name. This method modifies the style contents\n\t\t * to make it more easy to match. This will resolve a few browser issues.\n\t\t *\n\t\t * @private\n\t\t * @param {String} value Value to get style from.\n\t\t * @param {String} name Style name to get.\n\t\t * @return {String} Style item value.\n\t\t */\n\t\tfunction normalizeStyleValue(value, name) {\n\t\t\t// Force the format to hex\n\t\t\tif (name == 'color' || name == 'backgroundColor') {\n\t\t\t\tvalue = dom.toHex(value);\n\t\t\t}\n\n\t\t\t// Opera will return bold as 700\n\t\t\tif (name == 'fontWeight' && value == 700) {\n\t\t\t\tvalue = 'bold';\n\t\t\t}\n\n\t\t\t// Normalize fontFamily so \"'Font name', Font\" becomes: \"Font name,Font\"\n\t\t\tif (name == 'fontFamily') {\n\t\t\t\tvalue = value.replace(/[\\'\\\"]/g, '').replace(/,\\s+/g, ',');\n\t\t\t}\n\n\t\t\treturn '' + value;\n\t\t}\n\n\t\t/**\n\t\t * Replaces variables in the value. The variable format is %var.\n\t\t *\n\t\t * @private\n\t\t * @param {String} value Value to replace variables in.\n\t\t * @param {Object} vars Name/value array with variables to replace.\n\t\t * @return {String} New value with replaced variables.\n\t\t */\n\t\tfunction replaceVars(value, vars) {\n\t\t\tif (typeof value != \"string\") {\n\t\t\t\tvalue = value(vars);\n\t\t\t} else if (vars) {\n\t\t\t\tvalue = value.replace(/%(\\w+)/g, function(str, name) {\n\t\t\t\t\treturn vars[name] || str;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn value;\n\t\t}\n\n\t\tfunction isWhiteSpaceNode(node) {\n\t\t\treturn node && node.nodeType === 3 && /^([\\t \\r\\n]+|)$/.test(node.nodeValue);\n\t\t}\n\n\t\tfunction wrap(node, name, attrs) {\n\t\t\tvar wrapper = dom.create(name, attrs);\n\n\t\t\tnode.parentNode.insertBefore(wrapper, node);\n\t\t\twrapper.appendChild(node);\n\n\t\t\treturn wrapper;\n\t\t}\n\n\t\t/**\n\t\t * Expands the specified range like object to depending on format.\n\t\t *\n\t\t * For example on block formats it will move the start/end position\n\t\t * to the beginning of the current block.\n\t\t *\n\t\t * @private\n\t\t * @param {Object} rng Range like object.\n\t\t * @param {Array} format Array with formats to expand by.\n\t\t * @param {Boolean} remove\n\t\t * @return {Object} Expanded range like object.\n\t\t */\n\t\tfunction expandRng(rng, format, remove) {\n\t\t\tvar lastIdx, leaf, endPoint,\n\t\t\t\tstartContainer = rng.startContainer,\n\t\t\t\tstartOffset = rng.startOffset,\n\t\t\t\tendContainer = rng.endContainer,\n\t\t\t\tendOffset = rng.endOffset;\n\n\t\t\t// This function walks up the tree if there is no siblings before/after the node\n\t\t\tfunction findParentContainer(start) {\n\t\t\t\tvar container, parent, sibling, siblingName, root;\n\n\t\t\t\tcontainer = parent = start ? startContainer : endContainer;\n\t\t\t\tsiblingName = start ? 'previousSibling' : 'nextSibling';\n\t\t\t\troot = dom.getRoot();\n\n\t\t\t\tfunction isBogusBr(node) {\n\t\t\t\t\treturn node.nodeName == \"BR\" && node.getAttribute('data-mce-bogus') && !node.nextSibling;\n\t\t\t\t}\n\n\t\t\t\t// If it's a text node and the offset is inside the text\n\t\t\t\tif (container.nodeType == 3 && !isWhiteSpaceNode(container)) {\n\t\t\t\t\tif (start ? startOffset > 0 : endOffset < container.nodeValue.length) {\n\t\t\t\t\t\treturn container;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/*eslint no-constant-condition:0 */\n\t\t\t\twhile (true) {\n\t\t\t\t\t// Stop expanding on block elements\n\t\t\t\t\tif (!format[0].block_expand && isBlock(parent)) {\n\t\t\t\t\t\treturn parent;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Walk left/right\n\t\t\t\t\tfor (sibling = parent[siblingName]; sibling; sibling = sibling[siblingName]) {\n\t\t\t\t\t\tif (!isBookmarkNode(sibling) && !isWhiteSpaceNode(sibling) && !isBogusBr(sibling)) {\n\t\t\t\t\t\t\treturn parent;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check if we can move up are we at root level or body level\n\t\t\t\t\tif (parent == root || parent.parentNode == root) {\n\t\t\t\t\t\tcontainer = parent;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t}\n\n\t\t\t\treturn container;\n\t\t\t}\n\n\t\t\t// This function walks down the tree to find the leaf at the selection.\n\t\t\t// The offset is also returned as if node initially a leaf, the offset may be in the middle of the text node.\n\t\t\tfunction findLeaf(node, offset) {\n\t\t\t\tif (offset === undef) {\n\t\t\t\t\toffset = node.nodeType === 3 ? node.length : node.childNodes.length;\n\t\t\t\t}\n\n\t\t\t\twhile (node && node.hasChildNodes()) {\n\t\t\t\t\tnode = node.childNodes[offset];\n\t\t\t\t\tif (node) {\n\t\t\t\t\t\toffset = node.nodeType === 3 ? node.length : node.childNodes.length;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn {node: node, offset: offset};\n\t\t\t}\n\n\t\t\t// If index based start position then resolve it\n\t\t\tif (startContainer.nodeType == 1 && startContainer.hasChildNodes()) {\n\t\t\t\tlastIdx = startContainer.childNodes.length - 1;\n\t\t\t\tstartContainer = startContainer.childNodes[startOffset > lastIdx ? lastIdx : startOffset];\n\n\t\t\t\tif (startContainer.nodeType == 3) {\n\t\t\t\t\tstartOffset = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If index based end position then resolve it\n\t\t\tif (endContainer.nodeType == 1 && endContainer.hasChildNodes()) {\n\t\t\t\tlastIdx = endContainer.childNodes.length - 1;\n\t\t\t\tendContainer = endContainer.childNodes[endOffset > lastIdx ? lastIdx : endOffset - 1];\n\n\t\t\t\tif (endContainer.nodeType == 3) {\n\t\t\t\t\tendOffset = endContainer.nodeValue.length;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Expands the node to the closes contentEditable false element if it exists\n\t\t\tfunction findParentContentEditable(node) {\n\t\t\t\tvar parent = node;\n\n\t\t\t\twhile (parent) {\n\t\t\t\t\tif (parent.nodeType === 1 && getContentEditable(parent)) {\n\t\t\t\t\t\treturn getContentEditable(parent) === \"false\" ? parent : node;\n\t\t\t\t\t}\n\n\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t}\n\n\t\t\t\treturn node;\n\t\t\t}\n\n\t\t\tfunction findWordEndPoint(container, offset, start) {\n\t\t\t\tvar walker, node, pos, lastTextNode;\n\n\t\t\t\tfunction findSpace(node, offset) {\n\t\t\t\t\tvar pos, pos2, str = node.nodeValue;\n\n\t\t\t\t\tif (typeof offset == \"undefined\") {\n\t\t\t\t\t\toffset = start ? str.length : 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (start) {\n\t\t\t\t\t\tpos = str.lastIndexOf(' ', offset);\n\t\t\t\t\t\tpos2 = str.lastIndexOf('\\u00a0', offset);\n\t\t\t\t\t\tpos = pos > pos2 ? pos : pos2;\n\n\t\t\t\t\t\t// Include the space on remove to avoid tag soup\n\t\t\t\t\t\tif (pos !== -1 && !remove) {\n\t\t\t\t\t\t\tpos++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpos = str.indexOf(' ', offset);\n\t\t\t\t\t\tpos2 = str.indexOf('\\u00a0', offset);\n\t\t\t\t\t\tpos = pos !== -1 && (pos2 === -1 || pos < pos2) ? pos : pos2;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn pos;\n\t\t\t\t}\n\n\t\t\t\tif (container.nodeType === 3) {\n\t\t\t\t\tpos = findSpace(container, offset);\n\n\t\t\t\t\tif (pos !== -1) {\n\t\t\t\t\t\treturn {container: container, offset: pos};\n\t\t\t\t\t}\n\n\t\t\t\t\tlastTextNode = container;\n\t\t\t\t}\n\n\t\t\t\t// Walk the nodes inside the block\n\t\t\t\twalker = new TreeWalker(container, dom.getParent(container, isBlock) || ed.getBody());\n\t\t\t\twhile ((node = walker[start ? 'prev' : 'next']())) {\n\t\t\t\t\tif (node.nodeType === 3) {\n\t\t\t\t\t\tlastTextNode = node;\n\t\t\t\t\t\tpos = findSpace(node);\n\n\t\t\t\t\t\tif (pos !== -1) {\n\t\t\t\t\t\t\treturn {container: node, offset: pos};\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (isBlock(node)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (lastTextNode) {\n\t\t\t\t\tif (start) {\n\t\t\t\t\t\toffset = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toffset = lastTextNode.length;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {container: lastTextNode, offset: offset};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction findSelectorEndPoint(container, sibling_name) {\n\t\t\t\tvar parents, i, y, curFormat;\n\n\t\t\t\tif (container.nodeType == 3 && container.nodeValue.length === 0 && container[sibling_name]) {\n\t\t\t\t\tcontainer = container[sibling_name];\n\t\t\t\t}\n\n\t\t\t\tparents = getParents(container);\n\t\t\t\tfor (i = 0; i < parents.length; i++) {\n\t\t\t\t\tfor (y = 0; y < format.length; y++) {\n\t\t\t\t\t\tcurFormat = format[y];\n\n\t\t\t\t\t\t// If collapsed state is set then skip formats that doesn't match that\n\t\t\t\t\t\tif (\"collapsed\" in curFormat && curFormat.collapsed !== rng.collapsed) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (dom.is(parents[i], curFormat.selector)) {\n\t\t\t\t\t\t\treturn parents[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn container;\n\t\t\t}\n\n\t\t\tfunction findBlockEndPoint(container, sibling_name) {\n\t\t\t\tvar node, root = dom.getRoot();\n\n\t\t\t\t// Expand to block of similar type\n\t\t\t\tif (!format[0].wrapper) {\n\t\t\t\t\tnode = dom.getParent(container, format[0].block, root);\n\t\t\t\t}\n\n\t\t\t\t// Expand to first wrappable block element or any block element\n\t\t\t\tif (!node) {\n\t\t\t\t\tnode = dom.getParent(container.nodeType == 3 ? container.parentNode : container, function(node) {\n\t\t\t\t\t\t// Fixes #6183 where it would expand to editable parent element in inline mode\n\t\t\t\t\t\treturn node != root && isTextBlock(node);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Exclude inner lists from wrapping\n\t\t\t\tif (node && format[0].wrapper) {\n\t\t\t\t\tnode = getParents(node, 'ul,ol').reverse()[0] || node;\n\t\t\t\t}\n\n\t\t\t\t// Didn't find a block element look for first/last wrappable element\n\t\t\t\tif (!node) {\n\t\t\t\t\tnode = container;\n\n\t\t\t\t\twhile (node[sibling_name] && !isBlock(node[sibling_name])) {\n\t\t\t\t\t\tnode = node[sibling_name];\n\n\t\t\t\t\t\t// Break on BR but include it will be removed later on\n\t\t\t\t\t\t// we can't remove it now since we need to check if it can be wrapped\n\t\t\t\t\t\tif (isEq(node, 'br')) {\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}\n\n\t\t\t\treturn node || container;\n\t\t\t}\n\n\t\t\t// Expand to closest contentEditable element\n\t\t\tstartContainer = findParentContentEditable(startContainer);\n\t\t\tendContainer = findParentContentEditable(endContainer);\n\n\t\t\t// Exclude bookmark nodes if possible\n\t\t\tif (isBookmarkNode(startContainer.parentNode) || isBookmarkNode(startContainer)) {\n\t\t\t\tstartContainer = isBookmarkNode(startContainer) ? startContainer : startContainer.parentNode;\n\t\t\t\tstartContainer = startContainer.nextSibling || startContainer;\n\n\t\t\t\tif (startContainer.nodeType == 3) {\n\t\t\t\t\tstartOffset = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isBookmarkNode(endContainer.parentNode) || isBookmarkNode(endContainer)) {\n\t\t\t\tendContainer = isBookmarkNode(endContainer) ? endContainer : endContainer.parentNode;\n\t\t\t\tendContainer = endContainer.previousSibling || endContainer;\n\n\t\t\t\tif (endContainer.nodeType == 3) {\n\t\t\t\t\tendOffset = endContainer.length;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (format[0].inline) {\n\t\t\t\tif (rng.collapsed) {\n\t\t\t\t\t// Expand left to closest word boundary\n\t\t\t\t\tendPoint = findWordEndPoint(startContainer, startOffset, true);\n\t\t\t\t\tif (endPoint) {\n\t\t\t\t\t\tstartContainer = endPoint.container;\n\t\t\t\t\t\tstartOffset = endPoint.offset;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Expand right to closest word boundary\n\t\t\t\t\tendPoint = findWordEndPoint(endContainer, endOffset);\n\t\t\t\t\tif (endPoint) {\n\t\t\t\t\t\tendContainer = endPoint.container;\n\t\t\t\t\t\tendOffset = endPoint.offset;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Avoid applying formatting to a trailing space.\n\t\t\t\tleaf = findLeaf(endContainer, endOffset);\n\t\t\t\tif (leaf.node) {\n\t\t\t\t\twhile (leaf.node && leaf.offset === 0 && leaf.node.previousSibling) {\n\t\t\t\t\t\tleaf = findLeaf(leaf.node.previousSibling);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (leaf.node && leaf.offset > 0 && leaf.node.nodeType === 3 &&\n\t\t\t\t\t\t\tleaf.node.nodeValue.charAt(leaf.offset - 1) === ' ') {\n\n\t\t\t\t\t\tif (leaf.offset > 1) {\n\t\t\t\t\t\t\tendContainer = leaf.node;\n\t\t\t\t\t\t\tendContainer.splitText(leaf.offset - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Move start/end point up the tree if the leaves are sharp and if we are in different containers\n\t\t\t// Example * becomes !: !

      *texttext*

      !\n\t\t\t// This will reduce the number of wrapper elements that needs to be created\n\t\t\t// Move start point up the tree\n\t\t\tif (format[0].inline || format[0].block_expand) {\n\t\t\t\tif (!format[0].inline || (startContainer.nodeType != 3 || startOffset === 0)) {\n\t\t\t\t\tstartContainer = findParentContainer(true);\n\t\t\t\t}\n\n\t\t\t\tif (!format[0].inline || (endContainer.nodeType != 3 || endOffset === endContainer.nodeValue.length)) {\n\t\t\t\t\tendContainer = findParentContainer();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Expand start/end container to matching selector\n\t\t\tif (format[0].selector && format[0].expand !== FALSE && !format[0].inline) {\n\t\t\t\t// Find new startContainer/endContainer if there is better one\n\t\t\t\tstartContainer = findSelectorEndPoint(startContainer, 'previousSibling');\n\t\t\t\tendContainer = findSelectorEndPoint(endContainer, 'nextSibling');\n\t\t\t}\n\n\t\t\t// Expand start/end container to matching block element or text node\n\t\t\tif (format[0].block || format[0].selector) {\n\t\t\t\t// Find new startContainer/endContainer if there is better one\n\t\t\t\tstartContainer = findBlockEndPoint(startContainer, 'previousSibling');\n\t\t\t\tendContainer = findBlockEndPoint(endContainer, 'nextSibling');\n\n\t\t\t\t// Non block element then try to expand up the leaf\n\t\t\t\tif (format[0].block) {\n\t\t\t\t\tif (!isBlock(startContainer)) {\n\t\t\t\t\t\tstartContainer = findParentContainer(true);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isBlock(endContainer)) {\n\t\t\t\t\t\tendContainer = findParentContainer();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Setup index for startContainer\n\t\t\tif (startContainer.nodeType == 1) {\n\t\t\t\tstartOffset = nodeIndex(startContainer);\n\t\t\t\tstartContainer = startContainer.parentNode;\n\t\t\t}\n\n\t\t\t// Setup index for endContainer\n\t\t\tif (endContainer.nodeType == 1) {\n\t\t\t\tendOffset = nodeIndex(endContainer) + 1;\n\t\t\t\tendContainer = endContainer.parentNode;\n\t\t\t}\n\n\t\t\t// Return new range like object\n\t\t\treturn {\n\t\t\t\tstartContainer: startContainer,\n\t\t\t\tstartOffset: startOffset,\n\t\t\t\tendContainer: endContainer,\n\t\t\t\tendOffset: endOffset\n\t\t\t};\n\t\t}\n\n\t\tfunction isColorFormatAndAnchor(node, format) {\n\t\t\treturn format.links && node.tagName == 'A';\n\t\t}\n\n\t\t/**\n\t\t * Removes the specified format for the specified node. It will also remove the node if it doesn't have\n\t\t * any attributes if the format specifies it to do so.\n\t\t *\n\t\t * @private\n\t\t * @param {Object} format Format object with items to remove from node.\n\t\t * @param {Object} vars Name/value object with variables to apply to format.\n\t\t * @param {Node} node Node to remove the format styles on.\n\t\t * @param {Node} compare_node Optional compare node, if specified the styles will be compared to that node.\n\t\t * @return {Boolean} True/false if the node was removed or not.\n\t\t */\n\t\tfunction removeFormat(format, vars, node, compare_node) {\n\t\t\tvar i, attrs, stylesModified;\n\n\t\t\t// Check if node matches format\n\t\t\tif (!matchName(node, format) && !isColorFormatAndAnchor(node, format)) {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t// Should we compare with format attribs and styles\n\t\t\tif (format.remove != 'all') {\n\t\t\t\t// Remove styles\n\t\t\t\teach(format.styles, function(value, name) {\n\t\t\t\t\tvalue = normalizeStyleValue(replaceVars(value, vars), name);\n\n\t\t\t\t\t// Indexed array\n\t\t\t\t\tif (typeof name === 'number') {\n\t\t\t\t\t\tname = value;\n\t\t\t\t\t\tcompare_node = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (format.remove_similar || (!compare_node || isEq(getStyle(compare_node, name), value))) {\n\t\t\t\t\t\tdom.setStyle(node, name, '');\n\t\t\t\t\t}\n\n\t\t\t\t\tstylesModified = 1;\n\t\t\t\t});\n\n\t\t\t\t// Remove style attribute if it's empty\n\t\t\t\tif (stylesModified && dom.getAttrib(node, 'style') === '') {\n\t\t\t\t\tnode.removeAttribute('style');\n\t\t\t\t\tnode.removeAttribute('data-mce-style');\n\t\t\t\t}\n\n\t\t\t\t// Remove attributes\n\t\t\t\teach(format.attributes, function(value, name) {\n\t\t\t\t\tvar valueOut;\n\n\t\t\t\t\tvalue = replaceVars(value, vars);\n\n\t\t\t\t\t// Indexed array\n\t\t\t\t\tif (typeof name === 'number') {\n\t\t\t\t\t\tname = value;\n\t\t\t\t\t\tcompare_node = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!compare_node || isEq(dom.getAttrib(compare_node, name), value)) {\n\t\t\t\t\t\t// Keep internal classes\n\t\t\t\t\t\tif (name == 'class') {\n\t\t\t\t\t\t\tvalue = dom.getAttrib(node, name);\n\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t// Build new class value where everything is removed except the internal prefixed classes\n\t\t\t\t\t\t\t\tvalueOut = '';\n\t\t\t\t\t\t\t\teach(value.split(/\\s+/), function(cls) {\n\t\t\t\t\t\t\t\t\tif (/mce\\-\\w+/.test(cls)) {\n\t\t\t\t\t\t\t\t\t\tvalueOut += (valueOut ? ' ' : '') + cls;\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// We got some internal classes left\n\t\t\t\t\t\t\t\tif (valueOut) {\n\t\t\t\t\t\t\t\t\tdom.setAttrib(node, name, valueOut);\n\t\t\t\t\t\t\t\t\treturn;\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// IE6 has a bug where the attribute doesn't get removed correctly\n\t\t\t\t\t\tif (name == \"class\") {\n\t\t\t\t\t\t\tnode.removeAttribute('className');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Remove mce prefixed attributes\n\t\t\t\t\t\tif (MCE_ATTR_RE.test(name)) {\n\t\t\t\t\t\t\tnode.removeAttribute('data-mce-' + name);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode.removeAttribute(name);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Remove classes\n\t\t\t\teach(format.classes, function(value) {\n\t\t\t\t\tvalue = replaceVars(value, vars);\n\n\t\t\t\t\tif (!compare_node || dom.hasClass(compare_node, value)) {\n\t\t\t\t\t\tdom.removeClass(node, value);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Check for non internal attributes\n\t\t\t\tattrs = dom.getAttribs(node);\n\t\t\t\tfor (i = 0; i < attrs.length; i++) {\n\t\t\t\t\tvar attrName = attrs[i].nodeName;\n\t\t\t\t\tif (attrName.indexOf('_') !== 0 && attrName.indexOf('data-') !== 0) {\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// Remove the inline child if it's empty for example or \n\t\t\tif (format.remove != 'none') {\n\t\t\t\tremoveNode(node, format);\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Removes the node and wrap it's children in paragraphs before doing so or\n\t\t * appends BR elements to the beginning/end of the block element if forcedRootBlocks is disabled.\n\t\t *\n\t\t * If the div in the node below gets removed:\n\t\t * text
      text
      text\n\t\t *\n\t\t * Output becomes:\n\t\t * text

      text
      text\n\t\t *\n\t\t * So when the div is removed the result is:\n\t\t * text
      text
      text\n\t\t *\n\t\t * @private\n\t\t * @param {Node} node Node to remove + apply BR/P elements to.\n\t\t * @param {Object} format Format rule.\n\t\t * @return {Node} Input node.\n\t\t */\n\t\tfunction removeNode(node, format) {\n\t\t\tvar parentNode = node.parentNode, rootBlockElm;\n\n\t\t\tfunction find(node, next, inc) {\n\t\t\t\tnode = getNonWhiteSpaceSibling(node, next, inc);\n\n\t\t\t\treturn !node || (node.nodeName == 'BR' || isBlock(node));\n\t\t\t}\n\n\t\t\tif (format.block) {\n\t\t\t\tif (!forcedRootBlock) {\n\t\t\t\t\t// Append BR elements if needed before we remove the block\n\t\t\t\t\tif (isBlock(node) && !isBlock(parentNode)) {\n\t\t\t\t\t\tif (!find(node, FALSE) && !find(node.firstChild, TRUE, 1)) {\n\t\t\t\t\t\t\tnode.insertBefore(dom.create('br'), node.firstChild);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!find(node, TRUE) && !find(node.lastChild, FALSE, 1)) {\n\t\t\t\t\t\t\tnode.appendChild(dom.create('br'));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Wrap the block in a forcedRootBlock if we are at the root of document\n\t\t\t\t\tif (parentNode == dom.getRoot()) {\n\t\t\t\t\t\tif (!format.list_block || !isEq(node, format.list_block)) {\n\t\t\t\t\t\t\teach(grep(node.childNodes), function(node) {\n\t\t\t\t\t\t\t\tif (isValid(forcedRootBlock, node.nodeName.toLowerCase())) {\n\t\t\t\t\t\t\t\t\tif (!rootBlockElm) {\n\t\t\t\t\t\t\t\t\t\trootBlockElm = wrap(node, forcedRootBlock);\n\t\t\t\t\t\t\t\t\t\tdom.setAttribs(rootBlockElm, ed.settings.forced_root_block_attrs);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\trootBlockElm.appendChild(node);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\trootBlockElm = 0;\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\t\t\t}\n\n\t\t\t// Never remove nodes that isn't the specified inline element if a selector is specified too\n\t\t\tif (format.selector && format.inline && !isEq(format.inline, node)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdom.remove(node, 1);\n\t\t}\n\n\t\t/**\n\t\t * Returns the next/previous non whitespace node.\n\t\t *\n\t\t * @private\n\t\t * @param {Node} node Node to start at.\n\t\t * @param {boolean} next (Optional) Include next or previous node defaults to previous.\n\t\t * @param {boolean} inc (Optional) Include the current node in checking. Defaults to false.\n\t\t * @return {Node} Next or previous node or undefined if it wasn't found.\n\t\t */\n\t\tfunction getNonWhiteSpaceSibling(node, next, inc) {\n\t\t\tif (node) {\n\t\t\t\tnext = next ? 'nextSibling' : 'previousSibling';\n\n\t\t\t\tfor (node = inc ? node : node[next]; node; node = node[next]) {\n\t\t\t\t\tif (node.nodeType == 1 || !isWhiteSpaceNode(node)) {\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Merges the next/previous sibling element if they match.\n\t\t *\n\t\t * @private\n\t\t * @param {Node} prev Previous node to compare/merge.\n\t\t * @param {Node} next Next node to compare/merge.\n\t\t * @return {Node} Next node if we didn't merge and prev node if we did.\n\t\t */\n\t\tfunction mergeSiblings(prev, next) {\n\t\t\tvar sibling, tmpSibling, elementUtils = new ElementUtils(dom);\n\n\t\t\tfunction findElementSibling(node, sibling_name) {\n\t\t\t\tfor (sibling = node; sibling; sibling = sibling[sibling_name]) {\n\t\t\t\t\tif (sibling.nodeType == 3 && sibling.nodeValue.length !== 0) {\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (sibling.nodeType == 1 && !isBookmarkNode(sibling)) {\n\t\t\t\t\t\treturn sibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn node;\n\t\t\t}\n\n\t\t\t// Check if next/prev exists and that they are elements\n\t\t\tif (prev && next) {\n\t\t\t\t// If previous sibling is empty then jump over it\n\t\t\t\tprev = findElementSibling(prev, 'previousSibling');\n\t\t\t\tnext = findElementSibling(next, 'nextSibling');\n\n\t\t\t\t// Compare next and previous nodes\n\t\t\t\tif (elementUtils.compare(prev, next)) {\n\t\t\t\t\t// Append nodes between\n\t\t\t\t\tfor (sibling = prev.nextSibling; sibling && sibling != next;) {\n\t\t\t\t\t\ttmpSibling = sibling;\n\t\t\t\t\t\tsibling = sibling.nextSibling;\n\t\t\t\t\t\tprev.appendChild(tmpSibling);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove next node\n\t\t\t\t\tdom.remove(next);\n\n\t\t\t\t\t// Move children into prev node\n\t\t\t\t\teach(grep(next.childNodes), function(node) {\n\t\t\t\t\t\tprev.appendChild(node);\n\t\t\t\t\t});\n\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn next;\n\t\t}\n\n\t\tfunction getContainer(rng, start) {\n\t\t\tvar container, offset, lastIdx;\n\n\t\t\tcontainer = rng[start ? 'startContainer' : 'endContainer'];\n\t\t\toffset = rng[start ? 'startOffset' : 'endOffset'];\n\n\t\t\tif (container.nodeType == 1) {\n\t\t\t\tlastIdx = container.childNodes.length - 1;\n\n\t\t\t\tif (!start && offset) {\n\t\t\t\t\toffset--;\n\t\t\t\t}\n\n\t\t\t\tcontainer = container.childNodes[offset > lastIdx ? lastIdx : offset];\n\t\t\t}\n\n\t\t\t// If start text node is excluded then walk to the next node\n\t\t\tif (container.nodeType === 3 && start && offset >= container.nodeValue.length) {\n\t\t\t\tcontainer = new TreeWalker(container, ed.getBody()).next() || container;\n\t\t\t}\n\n\t\t\t// If end text node is excluded then walk to the previous node\n\t\t\tif (container.nodeType === 3 && !start && offset === 0) {\n\t\t\t\tcontainer = new TreeWalker(container, ed.getBody()).prev() || container;\n\t\t\t}\n\n\t\t\treturn container;\n\t\t}\n\n\t\tfunction performCaretAction(type, name, vars, similar) {\n\t\t\tvar caretContainerId = '_mce_caret', debug = ed.settings.caret_debug;\n\n\t\t\t// Creates a caret container bogus element\n\t\t\tfunction createCaretContainer(fill) {\n\t\t\t\tvar caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true, style: debug ? 'color:red' : ''});\n\n\t\t\t\tif (fill) {\n\t\t\t\t\tcaretContainer.appendChild(ed.getDoc().createTextNode(INVISIBLE_CHAR));\n\t\t\t\t}\n\n\t\t\t\treturn caretContainer;\n\t\t\t}\n\n\t\t\tfunction isCaretContainerEmpty(node, nodes) {\n\t\t\t\twhile (node) {\n\t\t\t\t\tif ((node.nodeType === 3 && node.nodeValue !== INVISIBLE_CHAR) || node.childNodes.length > 1) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Collect nodes\n\t\t\t\t\tif (nodes && node.nodeType === 1) {\n\t\t\t\t\t\tnodes.push(node);\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.firstChild;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Returns any parent caret container element\n\t\t\tfunction getParentCaretContainer(node) {\n\t\t\t\twhile (node) {\n\t\t\t\t\tif (node.id === caretContainerId) {\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Finds the first text node in the specified node\n\t\t\tfunction findFirstTextNode(node) {\n\t\t\t\tvar walker;\n\n\t\t\t\tif (node) {\n\t\t\t\t\twalker = new TreeWalker(node, node);\n\n\t\t\t\t\tfor (node = walker.current(); node; node = walker.next()) {\n\t\t\t\t\t\tif (node.nodeType === 3) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Removes the caret container for the specified node or all on the current document\n\t\t\tfunction removeCaretContainer(node, move_caret) {\n\t\t\t\tvar child, rng;\n\n\t\t\t\tif (!node) {\n\t\t\t\t\tnode = getParentCaretContainer(selection.getStart());\n\n\t\t\t\t\tif (!node) {\n\t\t\t\t\t\twhile ((node = dom.get(caretContainerId))) {\n\t\t\t\t\t\t\tremoveCaretContainer(node, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\trng = selection.getRng(true);\n\n\t\t\t\t\tif (isCaretContainerEmpty(node)) {\n\t\t\t\t\t\tif (move_caret !== false) {\n\t\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\t\trng.setEndBefore(node);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdom.remove(node);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild = findFirstTextNode(node);\n\n\t\t\t\t\t\tif (child.nodeValue.charAt(0) === INVISIBLE_CHAR) {\n\t\t\t\t\t\t\tchild.deleteData(0, 1);\n\n\t\t\t\t\t\t\t// Fix for bug #6976\n\t\t\t\t\t\t\tif (rng.startContainer == child && rng.startOffset > 0) {\n\t\t\t\t\t\t\t\trng.setStart(child, rng.startOffset - 1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (rng.endContainer == child && rng.endOffset > 0) {\n\t\t\t\t\t\t\t\trng.setEnd(child, rng.endOffset - 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdom.remove(node, 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Applies formatting to the caret position\n\t\t\tfunction applyCaretFormat() {\n\t\t\t\tvar rng, caretContainer, textNode, offset, bookmark, container, text;\n\n\t\t\t\trng = selection.getRng(true);\n\t\t\t\toffset = rng.startOffset;\n\t\t\t\tcontainer = rng.startContainer;\n\t\t\t\ttext = container.nodeValue;\n\n\t\t\t\tcaretContainer = getParentCaretContainer(selection.getStart());\n\t\t\t\tif (caretContainer) {\n\t\t\t\t\ttextNode = findFirstTextNode(caretContainer);\n\t\t\t\t}\n\n\t\t\t\t// Expand to word if caret is in the middle of a text node and the char before/after is a alpha numeric character\n\t\t\t\tvar wordcharRegex = /[^\\s\\u00a0\\u00ad\\u200b\\ufeff]/;\n\t\t\t\tif (text && offset > 0 && offset < text.length &&\n\t\t\t\t\twordcharRegex.test(text.charAt(offset)) && wordcharRegex.test(text.charAt(offset - 1))) {\n\t\t\t\t\t// Get bookmark of caret position\n\t\t\t\t\tbookmark = selection.getBookmark();\n\n\t\t\t\t\t// Collapse bookmark range (WebKit)\n\t\t\t\t\trng.collapse(true);\n\n\t\t\t\t\t// Expand the range to the closest word and split it at those points\n\t\t\t\t\trng = expandRng(rng, get(name));\n\t\t\t\t\trng = rangeUtils.split(rng);\n\n\t\t\t\t\t// Apply the format to the range\n\t\t\t\t\tapply(name, vars, rng);\n\n\t\t\t\t\t// Move selection back to caret position\n\t\t\t\t\tselection.moveToBookmark(bookmark);\n\t\t\t\t} else {\n\t\t\t\t\tif (!caretContainer || textNode.nodeValue !== INVISIBLE_CHAR) {\n\t\t\t\t\t\tcaretContainer = createCaretContainer(true);\n\t\t\t\t\t\ttextNode = caretContainer.firstChild;\n\n\t\t\t\t\t\trng.insertNode(caretContainer);\n\t\t\t\t\t\toffset = 1;\n\n\t\t\t\t\t\tapply(name, vars, caretContainer);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapply(name, vars, caretContainer);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Move selection to text node\n\t\t\t\t\tselection.setCursorLocation(textNode, offset);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction removeCaretFormat() {\n\t\t\t\tvar rng = selection.getRng(true), container, offset, bookmark,\n\t\t\t\t\thasContentAfter, node, formatNode, parents = [], i, caretContainer;\n\n\t\t\t\tcontainer = rng.startContainer;\n\t\t\t\toffset = rng.startOffset;\n\t\t\t\tnode = container;\n\n\t\t\t\tif (container.nodeType == 3) {\n\t\t\t\t\tif (offset != container.nodeValue.length) {\n\t\t\t\t\t\thasContentAfter = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t}\n\n\t\t\t\twhile (node) {\n\t\t\t\t\tif (matchNode(node, name, vars, similar)) {\n\t\t\t\t\t\tformatNode = node;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (node.nextSibling) {\n\t\t\t\t\t\thasContentAfter = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tparents.push(node);\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t}\n\n\t\t\t\t// Node doesn't have the specified format\n\t\t\t\tif (!formatNode) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Is there contents after the caret then remove the format on the element\n\t\t\t\tif (hasContentAfter) {\n\t\t\t\t\t// Get bookmark of caret position\n\t\t\t\t\tbookmark = selection.getBookmark();\n\n\t\t\t\t\t// Collapse bookmark range (WebKit)\n\t\t\t\t\trng.collapse(true);\n\n\t\t\t\t\t// Expand the range to the closest word and split it at those points\n\t\t\t\t\trng = expandRng(rng, get(name), true);\n\t\t\t\t\trng = rangeUtils.split(rng);\n\n\t\t\t\t\t// Remove the format from the range\n\t\t\t\t\tremove(name, vars, rng);\n\n\t\t\t\t\t// Move selection back to caret position\n\t\t\t\t\tselection.moveToBookmark(bookmark);\n\t\t\t\t} else {\n\t\t\t\t\tcaretContainer = createCaretContainer();\n\n\t\t\t\t\tnode = caretContainer;\n\t\t\t\t\tfor (i = parents.length - 1; i >= 0; i--) {\n\t\t\t\t\t\tnode.appendChild(dom.clone(parents[i], false));\n\t\t\t\t\t\tnode = node.firstChild;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Insert invisible character into inner most format element\n\t\t\t\t\tnode.appendChild(dom.doc.createTextNode(INVISIBLE_CHAR));\n\t\t\t\t\tnode = node.firstChild;\n\n\t\t\t\t\tvar block = dom.getParent(formatNode, isTextBlock);\n\n\t\t\t\t\tif (block && dom.isEmpty(block)) {\n\t\t\t\t\t\t// Replace formatNode with caretContainer when removing format from empty block like

      |

      \n\t\t\t\t\t\tformatNode.parentNode.replaceChild(caretContainer, formatNode);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Insert caret container after the formatted node\n\t\t\t\t\t\tdom.insertAfter(caretContainer, formatNode);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Move selection to text node\n\t\t\t\t\tselection.setCursorLocation(node, 1);\n\n\t\t\t\t\t// If the formatNode is empty, we can remove it safely.\n\t\t\t\t\tif (dom.isEmpty(formatNode)) {\n\t\t\t\t\t\tdom.remove(formatNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Checks if the parent caret container node isn't empty if that is the case it\n\t\t\t// will remove the bogus state on all children that isn't empty\n\t\t\tfunction unmarkBogusCaretParents() {\n\t\t\t\tvar caretContainer;\n\n\t\t\t\tcaretContainer = getParentCaretContainer(selection.getStart());\n\t\t\t\tif (caretContainer && !dom.isEmpty(caretContainer)) {\n\t\t\t\t\twalk(caretContainer, function(node) {\n\t\t\t\t\t\tif (node.nodeType == 1 && node.id !== caretContainerId && !dom.isEmpty(node)) {\n\t\t\t\t\t\t\tdom.setAttrib(node, 'data-mce-bogus', null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 'childNodes');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Only bind the caret events once\n\t\t\tif (!ed._hasCaretEvents) {\n\t\t\t\t// Mark current caret container elements as bogus when getting the contents so we don't end up with empty elements\n\t\t\t\tmarkCaretContainersBogus = function() {\n\t\t\t\t\tvar nodes = [], i;\n\n\t\t\t\t\tif (isCaretContainerEmpty(getParentCaretContainer(selection.getStart()), nodes)) {\n\t\t\t\t\t\t// Mark children\n\t\t\t\t\t\ti = nodes.length;\n\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\tdom.setAttrib(nodes[i], 'data-mce-bogus', '1');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tdisableCaretContainer = function(e) {\n\t\t\t\t\tvar keyCode = e.keyCode;\n\n\t\t\t\t\tremoveCaretContainer();\n\n\t\t\t\t\t// Remove caret container if it's empty\n\t\t\t\t\tif (keyCode == 8 && selection.isCollapsed() && selection.getStart().innerHTML == INVISIBLE_CHAR) {\n\t\t\t\t\t\tremoveCaretContainer(getParentCaretContainer(selection.getStart()));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove caret container on keydown and it's left/right arrow keys\n\t\t\t\t\tif (keyCode == 37 || keyCode == 39) {\n\t\t\t\t\t\tremoveCaretContainer(getParentCaretContainer(selection.getStart()));\n\t\t\t\t\t}\n\n\t\t\t\t\tunmarkBogusCaretParents();\n\t\t\t\t};\n\n\t\t\t\t// Remove bogus state if they got filled by contents using editor.selection.setContent\n\t\t\t\ted.on('SetContent', function(e) {\n\t\t\t\t\tif (e.selection) {\n\t\t\t\t\t\tunmarkBogusCaretParents();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ted._hasCaretEvents = true;\n\t\t\t}\n\n\t\t\t// Do apply or remove caret format\n\t\t\tif (type == \"apply\") {\n\t\t\t\tapplyCaretFormat();\n\t\t\t} else {\n\t\t\t\tremoveCaretFormat();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Moves the start to the first suitable text node.\n\t\t */\n\t\tfunction moveStart(rng) {\n\t\t\tvar container = rng.startContainer,\n\t\t\t\t\toffset = rng.startOffset, isAtEndOfText,\n\t\t\t\t\twalker, node, nodes, tmpNode;\n\n\t\t\tif (rng.startContainer == rng.endContainer) {\n\t\t\t\tif (isInlineBlock(rng.startContainer.childNodes[rng.startOffset])) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Convert text node into index if possible\n\t\t\tif (container.nodeType == 3 && offset >= container.nodeValue.length) {\n\t\t\t\t// Get the parent container location and walk from there\n\t\t\t\toffset = nodeIndex(container);\n\t\t\t\tcontainer = container.parentNode;\n\t\t\t\tisAtEndOfText = true;\n\t\t\t}\n\n\t\t\t// Move startContainer/startOffset in to a suitable node\n\t\t\tif (container.nodeType == 1) {\n\t\t\t\tnodes = container.childNodes;\n\t\t\t\tcontainer = nodes[Math.min(offset, nodes.length - 1)];\n\t\t\t\twalker = new TreeWalker(container, dom.getParent(container, dom.isBlock));\n\n\t\t\t\t// If offset is at end of the parent node walk to the next one\n\t\t\t\tif (offset > nodes.length - 1 || isAtEndOfText) {\n\t\t\t\t\twalker.next();\n\t\t\t\t}\n\n\t\t\t\tfor (node = walker.current(); node; node = walker.next()) {\n\t\t\t\t\tif (node.nodeType == 3 && !isWhiteSpaceNode(node)) {\n\t\t\t\t\t\t// IE has a \"neat\" feature where it moves the start node into the closest element\n\t\t\t\t\t\t// we can avoid this by inserting an element before it and then remove it after we set the selection\n\t\t\t\t\t\ttmpNode = dom.create('a', {'data-mce-bogus': 'all'}, INVISIBLE_CHAR);\n\t\t\t\t\t\tnode.parentNode.insertBefore(tmpNode, node);\n\n\t\t\t\t\t\t// Set selection and remove tmpNode\n\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t\tdom.remove(tmpNode);\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n});\n\n// Included from: js/tinymce/classes/undo/Diff.js\n\n/**\n * Diff.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2016 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * JS Implementation of the O(ND) Difference Algorithm by Eugene W. Myers.\n *\n * @class tinymce.undo.Diff\n * @private\n */\ndefine(\"tinymce/undo/Diff\", [\n], function () {\n\tvar KEEP = 0, INSERT = 1, DELETE = 2;\n\n\tvar diff = function (left, right) {\n\t\tvar size = left.length + right.length + 2;\n\t\tvar vDown = new Array(size);\n\t\tvar vUp = new Array(size);\n\n\t\tvar snake = function (start, end, diag) {\n\t\t\treturn {\n\t\t\t\tstart: start,\n\t\t\t\tend: end,\n\t\t\t\tdiag: diag\n\t\t\t};\n\t\t};\n\n\t\tvar buildScript = function (start1, end1, start2, end2, script) {\n\t\t\tvar middle = getMiddleSnake(start1, end1, start2, end2);\n\n\t\t\tif (middle === null || middle.start === end1 && middle.diag === end1 - end2 ||\n\t\t\t\tmiddle.end === start1 && middle.diag === start1 - start2) {\n\t\t\t\tvar i = start1;\n\t\t\t\tvar j = start2;\n\t\t\t\twhile (i < end1 || j < end2) {\n\t\t\t\t\tif (i < end1 && j < end2 && left[i] === right[j]) {\n\t\t\t\t\t\tscript.push([KEEP, left[i]]);\n\t\t\t\t\t\t++i;\n\t\t\t\t\t\t++j;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (end1 - start1 > end2 - start2) {\n\t\t\t\t\t\t\tscript.push([DELETE, left[i]]);\n\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tscript.push([INSERT, right[j]]);\n\t\t\t\t\t\t\t++j;\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\tbuildScript(start1, middle.start, start2, middle.start - middle.diag, script);\n\t\t\t\tfor (var i2 = middle.start; i2 < middle.end; ++i2) {\n\t\t\t\t\tscript.push([KEEP, left[i2]]);\n\t\t\t\t}\n\t\t\t\tbuildScript(middle.end, end1, middle.end - middle.diag, end2, script);\n\t\t\t}\n\t\t};\n\n\t\tvar buildSnake = function (start, diag, end1, end2) {\n\t\t\tvar end = start;\n\t\t\twhile (end - diag < end2 && end < end1 && left[end] === right[end - diag]) {\n\t\t\t\t++end;\n\t\t\t}\n\t\t\treturn snake(start, end, diag);\n\t\t};\n\n\t\tvar getMiddleSnake = function (start1, end1, start2, end2) {\n\t\t\t// Myers Algorithm\n\t\t\t// Initialisations\n\t\t\tvar m = end1 - start1;\n\t\t\tvar n = end2 - start2;\n\t\t\tif (m === 0 || n === 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar delta = m - n;\n\t\t\tvar sum = n + m;\n\t\t\tvar offset = (sum % 2 === 0 ? sum : sum + 1) / 2;\n\t\t\tvDown[1 + offset] = start1;\n\t\t\tvUp[1 + offset] = end1 + 1;\n\n\t\t\tfor (var d = 0; d <= offset; ++d) {\n\t\t\t\t// Down\n\t\t\t\tfor (var k = -d; k <= d; k += 2) {\n\t\t\t\t\t// First step\n\n\t\t\t\t\tvar i = k + offset;\n\t\t\t\t\tif (k === -d || k != d && vDown[i - 1] < vDown[i + 1]) {\n\t\t\t\t\t\tvDown[i] = vDown[i + 1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvDown[i] = vDown[i - 1] + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar x = vDown[i];\n\t\t\t\t\tvar y = x - start1 + start2 - k;\n\n\t\t\t\t\twhile (x < end1 && y < end2 && left[x] === right[y]) {\n\t\t\t\t\t\tvDown[i] = ++x;\n\t\t\t\t\t\t++y;\n\t\t\t\t\t}\n\t\t\t\t\t// Second step\n\t\t\t\t\tif (delta % 2 != 0 && delta - d <= k && k <= delta + d) {\n\t\t\t\t\t\tif (vUp[i - delta] <= vDown[i]) {\n\t\t\t\t\t\t\treturn buildSnake(vUp[i - delta], k + start1 - start2, end1, end2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Up\n\t\t\t\tfor (k = delta - d; k <= delta + d; k += 2) {\n\t\t\t\t\t// First step\n\t\t\t\t\ti = k + offset - delta;\n\t\t\t\t\tif (k === delta - d || k != delta + d && vUp[i + 1] <= vUp[i - 1]) {\n\t\t\t\t\t\tvUp[i] = vUp[i + 1] - 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvUp[i] = vUp[i - 1];\n\t\t\t\t\t}\n\n\t\t\t\t\tx = vUp[i] - 1;\n\t\t\t\t\ty = x - start1 + start2 - k;\n\t\t\t\t\twhile (x >= start1 && y >= start2 && left[x] === right[y]) {\n\t\t\t\t\t\tvUp[i] = x--;\n\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t\t// Second step\n\t\t\t\t\tif (delta % 2 === 0 && -d <= k && k <= d) {\n\t\t\t\t\t\tif (vUp[i] <= vDown[i + delta]) {\n\t\t\t\t\t\t\treturn buildSnake(vUp[i], k + start1 - start2, end1, end2);\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\tvar script = [];\n\t\tbuildScript(0, left.length, 0, right.length, script);\n\t\treturn script;\n\t};\n\n\treturn {\n\t\tKEEP: KEEP,\n\t\tDELETE: DELETE,\n\t\tINSERT: INSERT,\n\t\tdiff: diff\n\t};\n});\n\n// Included from: js/tinymce/classes/undo/Fragments.js\n\n/**\n * Fragments.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2016 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This module reads and applies html fragments from/to dom nodes.\n *\n * @class tinymce.undo.Fragments\n * @private\n */\ndefine(\"tinymce/undo/Fragments\", [\n\t\"tinymce/util/Arr\",\n\t\"tinymce/html/Entities\",\n\t\"tinymce/undo/Diff\"\n], function (Arr, Entities, Diff) {\n\tvar getOuterHtml = function (elm) {\n\t\tif (elm.nodeType === 1) {\n\t\t\treturn elm.outerHTML;\n\t\t} else if (elm.nodeType === 3) {\n\t\t\treturn Entities.encodeRaw(elm.data, false);\n\t\t} else if (elm.nodeType === 8) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn '';\n\t};\n\n\tvar createFragment = function(html) {\n\t\tvar frag, node, container;\n\n\t\tcontainer = document.createElement(\"div\");\n\t\tfrag = document.createDocumentFragment();\n\n\t\tif (html) {\n\t\t\tcontainer.innerHTML = html;\n\t\t}\n\n\t\twhile ((node = container.firstChild)) {\n\t\t\tfrag.appendChild(node);\n\t\t}\n\n\t\treturn frag;\n\t};\n\n\tvar insertAt = function (elm, html, index) {\n\t\tvar fragment = createFragment(html);\n\t\tif (elm.hasChildNodes() && index < elm.childNodes.length) {\n\t\t\tvar target = elm.childNodes[index];\n\t\t\ttarget.parentNode.insertBefore(fragment, target);\n\t\t} else {\n\t\t\telm.appendChild(fragment);\n\t\t}\n\t};\n\n\tvar removeAt = function (elm, index) {\n\t\tif (elm.hasChildNodes() && index < elm.childNodes.length) {\n\t\t\tvar target = elm.childNodes[index];\n\t\t\ttarget.parentNode.removeChild(target);\n\t\t}\n\t};\n\n\tvar applyDiff = function (diff, elm) {\n\t\tvar index = 0;\n\t\tArr.each(diff, function (action) {\n\t\t\tif (action[0] === Diff.KEEP) {\n\t\t\t\tindex++;\n\t\t\t} else if (action[0] === Diff.INSERT) {\n\t\t\t\tinsertAt(elm, action[1], index);\n\t\t\t\tindex++;\n\t\t\t} else if (action[0] === Diff.DELETE) {\n\t\t\t\tremoveAt(elm, index);\n\t\t\t}\n\t\t});\n\t};\n\n\tvar read = function (elm) {\n\t\treturn Arr.map(elm.childNodes, getOuterHtml);\n\t};\n\n\tvar write = function (fragments, elm) {\n\t\tvar currentFragments = Arr.map(elm.childNodes, getOuterHtml);\n\t\tapplyDiff(Diff.diff(currentFragments, fragments), elm);\n\t\treturn elm;\n\t};\n\n\treturn {\n\t\tread: read,\n\t\twrite: write\n\t};\n});\n\n// Included from: js/tinymce/classes/undo/Levels.js\n\n/**\n * Levels.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2016 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This module handles getting/setting undo levels to/from editor instances.\n *\n * @class tinymce.undo.Levels\n * @private\n */\ndefine(\"tinymce/undo/Levels\", [\n\t\"tinymce/util/Arr\",\n\t\"tinymce/undo/Fragments\"\n], function (Arr, Fragments) {\n\tvar hasIframes = function (html) {\n\t\treturn html.indexOf('') !== -1;\n\t};\n\n\tvar createFragmentedLevel = function (fragments) {\n\t\treturn {\n\t\t\ttype: 'fragmented',\n\t\t\tfragments: fragments,\n\t\t\tcontent: '',\n\t\t\tbookmark: null,\n\t\t\tbeforeBookmark: null\n\t\t};\n\t};\n\n\tvar createCompleteLevel = function (content) {\n\t\treturn {\n\t\t\ttype: 'complete',\n\t\t\tfragments: null,\n\t\t\tcontent: content,\n\t\t\tbookmark: null,\n\t\t\tbeforeBookmark: null\n\t\t};\n\t};\n\n\tvar createFromEditor = function (editor) {\n\t\tvar fragments, content, trimmedFragments;\n\n\t\tfragments = Fragments.read(editor.getBody());\n\t\ttrimmedFragments = Arr.map(fragments, function (html) {\n\t\t\treturn editor.serializer.trimContent(html);\n\t\t});\n\t\tcontent = trimmedFragments.join('');\n\n\t\treturn hasIframes(content) ? createFragmentedLevel(trimmedFragments) : createCompleteLevel(content);\n\t};\n\n\tvar applyToEditor = function (editor, level, before) {\n\t\tif (level.type === 'fragmented') {\n\t\t\tFragments.write(level.fragments, editor.getBody());\n\t\t} else {\n\t\t\teditor.setContent(level.content, {format: 'raw'});\n\t\t}\n\n\t\teditor.selection.moveToBookmark(before ? level.beforeBookmark : level.bookmark);\n\t};\n\n\tvar getLevelContent = function (level) {\n\t\treturn level.type === 'fragmented' ? level.fragments.join('') : level.content;\n\t};\n\n\tvar isEq = function (level1, level2) {\n\t\treturn getLevelContent(level1) === getLevelContent(level2);\n\t};\n\n\treturn {\n\t\tcreateFragmentedLevel: createFragmentedLevel,\n\t\tcreateCompleteLevel: createCompleteLevel,\n\t\tcreateFromEditor: createFromEditor,\n\t\tapplyToEditor: applyToEditor,\n\t\tisEq: isEq\n\t};\n});\n\n// Included from: js/tinymce/classes/UndoManager.js\n\n/**\n * UndoManager.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class handles the undo/redo history levels for the editor. Since the built-in undo/redo has major drawbacks a custom one was needed.\n *\n * @class tinymce.UndoManager\n */\ndefine(\"tinymce/UndoManager\", [\n\t\"tinymce/util/VK\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/undo/Levels\"\n], function(VK, Tools, Levels) {\n\treturn function(editor) {\n\t\tvar self = this, index = 0, data = [], beforeBookmark, isFirstTypedCharacter, locks = 0;\n\n\t\tfunction setDirty(state) {\n\t\t\teditor.setDirty(state);\n\t\t}\n\n\t\tfunction addNonTypingUndoLevel(e) {\n\t\t\tself.typing = false;\n\t\t\tself.add({}, e);\n\t\t}\n\n\t\tfunction endTyping() {\n\t\t\tif (self.typing) {\n\t\t\t\tself.typing = false;\n\t\t\t\tself.add();\n\t\t\t}\n\t\t}\n\n\t\t// Add initial undo level when the editor is initialized\n\t\teditor.on('init', function() {\n\t\t\tself.add();\n\t\t});\n\n\t\t// Get position before an execCommand is processed\n\t\teditor.on('BeforeExecCommand', function(e) {\n\t\t\tvar cmd = e.command;\n\n\t\t\tif (cmd !== 'Undo' && cmd !== 'Redo' && cmd !== 'mceRepaint') {\n\t\t\t\tendTyping();\n\t\t\t\tself.beforeChange();\n\t\t\t}\n\t\t});\n\n\t\t// Add undo level after an execCommand call was made\n\t\teditor.on('ExecCommand', function(e) {\n\t\t\tvar cmd = e.command;\n\n\t\t\tif (cmd !== 'Undo' && cmd !== 'Redo' && cmd !== 'mceRepaint') {\n\t\t\t\taddNonTypingUndoLevel(e);\n\t\t\t}\n\t\t});\n\n\t\teditor.on('ObjectResizeStart Cut', function() {\n\t\t\tself.beforeChange();\n\t\t});\n\n\t\teditor.on('SaveContent ObjectResized blur', addNonTypingUndoLevel);\n\t\teditor.on('DragEnd', addNonTypingUndoLevel);\n\n\t\teditor.on('KeyUp', function(e) {\n\t\t\tvar keyCode = e.keyCode;\n\n\t\t\t// If key is prevented then don't add undo level\n\t\t\t// This would happen on keyboard shortcuts for example\n\t\t\tif (e.isDefaultPrevented()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode === 45 || e.ctrlKey) {\n\t\t\t\taddNonTypingUndoLevel();\n\t\t\t\teditor.nodeChanged();\n\t\t\t}\n\n\t\t\tif (keyCode === 46 || keyCode === 8) {\n\t\t\t\teditor.nodeChanged();\n\t\t\t}\n\n\t\t\t// Fire a TypingUndo event on the first character entered\n\t\t\tif (isFirstTypedCharacter && self.typing) {\n\t\t\t\t// Make it dirty if the content was changed after typing the first character\n\t\t\t\tif (!editor.isDirty()) {\n\t\t\t\t\tsetDirty(data[0] && !Levels.isEq(Levels.createFromEditor(editor), data[0]));\n\n\t\t\t\t\t// Fire initial change event\n\t\t\t\t\tif (editor.isDirty()) {\n\t\t\t\t\t\teditor.fire('change', {level: data[0], lastLevel: null});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\teditor.fire('TypingUndo');\n\t\t\t\tisFirstTypedCharacter = false;\n\t\t\t\teditor.nodeChanged();\n\t\t\t}\n\t\t});\n\n\t\teditor.on('KeyDown', function(e) {\n\t\t\tvar keyCode = e.keyCode;\n\n\t\t\t// If key is prevented then don't add undo level\n\t\t\t// This would happen on keyboard shortcuts for example\n\t\t\tif (e.isDefaultPrevented()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Is character position keys left,right,up,down,home,end,pgdown,pgup,enter\n\t\t\tif ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode === 45) {\n\t\t\t\tif (self.typing) {\n\t\t\t\t\taddNonTypingUndoLevel(e);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If key isn't Ctrl+Alt/AltGr\n\t\t\tvar modKey = (e.ctrlKey && !e.altKey) || e.metaKey;\n\t\t\tif ((keyCode < 16 || keyCode > 20) && keyCode !== 224 && keyCode !== 91 && !self.typing && !modKey) {\n\t\t\t\tself.beforeChange();\n\t\t\t\tself.typing = true;\n\t\t\t\tself.add({}, e);\n\t\t\t\tisFirstTypedCharacter = true;\n\t\t\t}\n\t\t});\n\n\t\teditor.on('MouseDown', function(e) {\n\t\t\tif (self.typing) {\n\t\t\t\taddNonTypingUndoLevel(e);\n\t\t\t}\n\t\t});\n\n\t\t// Add keyboard shortcuts for undo/redo keys\n\t\teditor.addShortcut('meta+z', '', 'Undo');\n\t\teditor.addShortcut('meta+y,meta+shift+z', '', 'Redo');\n\n\t\teditor.on('AddUndo Undo Redo ClearUndos', function(e) {\n\t\t\tif (!e.isDefaultPrevented()) {\n\t\t\t\teditor.nodeChanged();\n\t\t\t}\n\t\t});\n\n\t\t/*eslint consistent-this:0 */\n\t\tself = {\n\t\t\t// Explode for debugging reasons\n\t\t\tdata: data,\n\n\t\t\t/**\n\t\t\t * State if the user is currently typing or not. This will add a typing operation into one undo\n\t\t\t * level instead of one new level for each keystroke.\n\t\t\t *\n\t\t\t * @field {Boolean} typing\n\t\t\t */\n\t\t\ttyping: false,\n\n\t\t\t/**\n\t\t\t * Stores away a bookmark to be used when performing an undo action so that the selection is before\n\t\t\t * the change has been made.\n\t\t\t *\n\t\t\t * @method beforeChange\n\t\t\t */\n\t\t\tbeforeChange: function() {\n\t\t\t\tif (!locks) {\n\t\t\t\t\tbeforeBookmark = editor.selection.getBookmark(2, true);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Adds a new undo level/snapshot to the undo list.\n\t\t\t *\n\t\t\t * @method add\n\t\t\t * @param {Object} level Optional undo level object to add.\n\t\t\t * @param {DOMEvent} event Optional event responsible for the creation of the undo level.\n\t\t\t * @return {Object} Undo level that got added or null it a level wasn't needed.\n\t\t\t */\n\t\t\tadd: function(level, event) {\n\t\t\t\tvar i, settings = editor.settings, lastLevel, currentLevel;\n\n\t\t\t\tcurrentLevel = Levels.createFromEditor(editor);\n\t\t\t\tlevel = level || {};\n\t\t\t\tlevel = Tools.extend(level, currentLevel);\n\n\t\t\t\tif (locks || editor.removed) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tlastLevel = data[index];\n\t\t\t\tif (editor.fire('BeforeAddUndo', {level: level, lastLevel: lastLevel, originalEvent: event}).isDefaultPrevented()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Add undo level if needed\n\t\t\t\tif (lastLevel && Levels.isEq(lastLevel, level)) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Set before bookmark on previous level\n\t\t\t\tif (data[index]) {\n\t\t\t\t\tdata[index].beforeBookmark = beforeBookmark;\n\t\t\t\t}\n\n\t\t\t\t// Time to compress\n\t\t\t\tif (settings.custom_undo_redo_levels) {\n\t\t\t\t\tif (data.length > settings.custom_undo_redo_levels) {\n\t\t\t\t\t\tfor (i = 0; i < data.length - 1; i++) {\n\t\t\t\t\t\t\tdata[i] = data[i + 1];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdata.length--;\n\t\t\t\t\t\tindex = data.length;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Get a non intrusive normalized bookmark\n\t\t\t\tlevel.bookmark = editor.selection.getBookmark(2, true);\n\n\t\t\t\t// Crop array if needed\n\t\t\t\tif (index < data.length - 1) {\n\t\t\t\t\tdata.length = index + 1;\n\t\t\t\t}\n\n\t\t\t\tdata.push(level);\n\t\t\t\tindex = data.length - 1;\n\n\t\t\t\tvar args = {level: level, lastLevel: lastLevel, originalEvent: event};\n\n\t\t\t\teditor.fire('AddUndo', args);\n\n\t\t\t\tif (index > 0) {\n\t\t\t\t\tsetDirty(true);\n\t\t\t\t\teditor.fire('change', args);\n\t\t\t\t}\n\n\t\t\t\treturn level;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Undoes the last action.\n\t\t\t *\n\t\t\t * @method undo\n\t\t\t * @return {Object} Undo level or null if no undo was performed.\n\t\t\t */\n\t\t\tundo: function() {\n\t\t\t\tvar level;\n\n\t\t\t\tif (self.typing) {\n\t\t\t\t\tself.add();\n\t\t\t\t\tself.typing = false;\n\t\t\t\t}\n\n\t\t\t\tif (index > 0) {\n\t\t\t\t\tlevel = data[--index];\n\t\t\t\t\tLevels.applyToEditor(editor, level, true);\n\t\t\t\t\tsetDirty(true);\n\t\t\t\t\teditor.fire('undo', {level: level});\n\t\t\t\t}\n\n\t\t\t\treturn level;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Redoes the last action.\n\t\t\t *\n\t\t\t * @method redo\n\t\t\t * @return {Object} Redo level or null if no redo was performed.\n\t\t\t */\n\t\t\tredo: function() {\n\t\t\t\tvar level;\n\n\t\t\t\tif (index < data.length - 1) {\n\t\t\t\t\tlevel = data[++index];\n\t\t\t\t\tLevels.applyToEditor(editor, level, false);\n\t\t\t\t\tsetDirty(true);\n\t\t\t\t\teditor.fire('redo', {level: level});\n\t\t\t\t}\n\n\t\t\t\treturn level;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Removes all undo levels.\n\t\t\t *\n\t\t\t * @method clear\n\t\t\t */\n\t\t\tclear: function() {\n\t\t\t\tdata = [];\n\t\t\t\tindex = 0;\n\t\t\t\tself.typing = false;\n\t\t\t\tself.data = data;\n\t\t\t\teditor.fire('ClearUndos');\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns true/false if the undo manager has any undo levels.\n\t\t\t *\n\t\t\t * @method hasUndo\n\t\t\t * @return {Boolean} true/false if the undo manager has any undo levels.\n\t\t\t */\n\t\t\thasUndo: function() {\n\t\t\t\t// Has undo levels or typing and content isn't the same as the initial level\n\t\t\t\treturn index > 0 || (self.typing && data[0] && !Levels.isEq(Levels.createFromEditor(editor), data[0]));\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns true/false if the undo manager has any redo levels.\n\t\t\t *\n\t\t\t * @method hasRedo\n\t\t\t * @return {Boolean} true/false if the undo manager has any redo levels.\n\t\t\t */\n\t\t\thasRedo: function() {\n\t\t\t\treturn index < data.length - 1 && !self.typing;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Executes the specified mutator function as an undo transaction. The selection\n\t\t\t * before the modification will be stored to the undo stack and if the DOM changes\n\t\t\t * it will add a new undo level. Any methods within the translation that adds undo levels will\n\t\t\t * be ignored. So a translation can include calls to execCommand or editor.insertContent.\n\t\t\t *\n\t\t\t * @method transact\n\t\t\t * @param {function} callback Function that gets executed and has dom manipulation logic in it.\n\t\t\t * @return {Object} Undo level that got added or null it a level wasn't needed.\n\t\t\t */\n\t\t\ttransact: function(callback) {\n\t\t\t\tendTyping();\n\t\t\t\tself.beforeChange();\n\n\t\t\t\ttry {\n\t\t\t\t\tlocks++;\n\t\t\t\t\tcallback();\n\t\t\t\t} finally {\n\t\t\t\t\tlocks--;\n\t\t\t\t}\n\n\t\t\t\treturn self.add();\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Adds an extra \"hidden\" undo level by first applying the first mutation and store that to the undo stack\n\t\t\t * then roll back that change and do the second mutation on top of the stack. This will produce an extra\n\t\t\t * undo level that the user doesn't see until they undo.\n\t\t\t *\n\t\t\t * @method extra\n\t\t\t * @param {function} callback1 Function that does mutation but gets stored as a \"hidden\" extra undo level.\n\t\t\t * @param {function} callback2 Function that does mutation but gets displayed to the user.\n\t\t\t */\n\t\t\textra: function (callback1, callback2) {\n\t\t\t\tvar lastLevel, bookmark;\n\n\t\t\t\tif (self.transact(callback1)) {\n\t\t\t\t\tbookmark = data[index].bookmark;\n\t\t\t\t\tlastLevel = data[index - 1];\n\t\t\t\t\tLevels.applyToEditor(editor, lastLevel, true);\n\n\t\t\t\t\tif (self.transact(callback2)) {\n\t\t\t\t\t\tdata[index - 1].beforeBookmark = bookmark;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\treturn self;\n\t};\n});\n\n// Included from: js/tinymce/classes/EnterKey.js\n\n/**\n * EnterKey.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Contains logic for handling the enter key to split/generate block elements.\n *\n * @private\n * @class tinymce.EnterKey\n */\ndefine(\"tinymce/EnterKey\", [\n\t\"tinymce/dom/TreeWalker\",\n\t\"tinymce/dom/RangeUtils\",\n\t\"tinymce/caret/CaretContainer\",\n\t\"tinymce/Env\"\n], function(TreeWalker, RangeUtils, CaretContainer, Env) {\n\tvar isIE = Env.ie && Env.ie < 11;\n\n\treturn function(editor) {\n\t\tvar dom = editor.dom, selection = editor.selection, settings = editor.settings;\n\t\tvar undoManager = editor.undoManager, schema = editor.schema, nonEmptyElementsMap = schema.getNonEmptyElements(),\n\t\t\tmoveCaretBeforeOnEnterElementsMap = schema.getMoveCaretBeforeOnEnterElements();\n\n\t\tfunction handleEnterKey(evt) {\n\t\t\tvar rng, tmpRng, editableRoot, container, offset, parentBlock, documentMode, shiftKey,\n\t\t\t\tnewBlock, fragment, containerBlock, parentBlockName, containerBlockName, newBlockName, isAfterLastNodeInContainer;\n\n\t\t\t// Returns true if the block can be split into two blocks or not\n\t\t\tfunction canSplitBlock(node) {\n\t\t\t\treturn node &&\n\t\t\t\t\tdom.isBlock(node) &&\n\t\t\t\t\t!/^(TD|TH|CAPTION|FORM)$/.test(node.nodeName) &&\n\t\t\t\t\t!/^(fixed|absolute)/i.test(node.style.position) &&\n\t\t\t\t\tdom.getContentEditable(node) !== \"true\";\n\t\t\t}\n\n\t\t\tfunction isTableCell(node) {\n\t\t\t\treturn node && /^(TD|TH|CAPTION)$/.test(node.nodeName);\n\t\t\t}\n\n\t\t\t// Renders empty block on IE\n\t\t\tfunction renderBlockOnIE(block) {\n\t\t\t\tvar oldRng;\n\n\t\t\t\tif (dom.isBlock(block)) {\n\t\t\t\t\toldRng = selection.getRng();\n\t\t\t\t\tblock.appendChild(dom.create('span', null, '\\u00a0'));\n\t\t\t\t\tselection.select(block);\n\t\t\t\t\tblock.lastChild.outerHTML = '';\n\t\t\t\t\tselection.setRng(oldRng);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove the first empty inline element of the block so this:

      x

      becomes this:

      x

      \n\t\t\tfunction trimInlineElementsOnLeftSideOfBlock(block) {\n\t\t\t\tvar node = block, firstChilds = [], i;\n\n\t\t\t\tif (!node) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Find inner most first child ex:

      *

      \n\t\t\t\twhile ((node = node.firstChild)) {\n\t\t\t\t\tif (dom.isBlock(node)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (node.nodeType == 1 && !nonEmptyElementsMap[node.nodeName.toLowerCase()]) {\n\t\t\t\t\t\tfirstChilds.push(node);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ti = firstChilds.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\tnode = firstChilds[i];\n\t\t\t\t\tif (!node.hasChildNodes() || (node.firstChild == node.lastChild && node.firstChild.nodeValue === '')) {\n\t\t\t\t\t\tdom.remove(node);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Remove
      see #5381\n\t\t\t\t\t\tif (node.nodeName == \"A\" && (node.innerText || node.textContent) === ' ') {\n\t\t\t\t\t\t\tdom.remove(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Moves the caret to a suitable position within the root for example in the first non\n\t\t\t// pure whitespace text node or before an image\n\t\t\tfunction moveToCaretPosition(root) {\n\t\t\t\tvar walker, node, rng, lastNode = root, tempElm;\n\t\t\t\tfunction firstNonWhiteSpaceNodeSibling(node) {\n\t\t\t\t\twhile (node) {\n\t\t\t\t\t\tif (node.nodeType == 1 || (node.nodeType == 3 && node.data && /[\\r\\n\\s]/.test(node.data))) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!root) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Old IE versions doesn't properly render blocks with br elements in them\n\t\t\t\t// For example


      wont be rendered correctly in a contentEditable area\n\t\t\t\t// until you remove the br producing

      \n\t\t\t\tif (Env.ie && Env.ie < 9 && parentBlock && parentBlock.firstChild) {\n\t\t\t\t\tif (parentBlock.firstChild == parentBlock.lastChild && parentBlock.firstChild.tagName == 'BR') {\n\t\t\t\t\t\tdom.remove(parentBlock.firstChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (/^(LI|DT|DD)$/.test(root.nodeName)) {\n\t\t\t\t\tvar firstChild = firstNonWhiteSpaceNodeSibling(root.firstChild);\n\n\t\t\t\t\tif (firstChild && /^(UL|OL|DL)$/.test(firstChild.nodeName)) {\n\t\t\t\t\t\troot.insertBefore(dom.doc.createTextNode('\\u00a0'), root.firstChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trng = dom.createRng();\n\n\t\t\t\t// Normalize whitespace to remove empty text nodes. Fix for: #6904\n\t\t\t\t// Gecko will be able to place the caret in empty text nodes but it won't render propery\n\t\t\t\t// Older IE versions will sometimes crash so for now ignore all IE versions\n\t\t\t\tif (!Env.ie) {\n\t\t\t\t\troot.normalize();\n\t\t\t\t}\n\n\t\t\t\tif (root.hasChildNodes()) {\n\t\t\t\t\twalker = new TreeWalker(root, root);\n\n\t\t\t\t\twhile ((node = walker.current())) {\n\t\t\t\t\t\tif (node.nodeType == 3) {\n\t\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\t\trng.setEnd(node, 0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]) {\n\t\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\t\trng.setEndBefore(node);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastNode = node;\n\t\t\t\t\t\tnode = walker.next();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!node) {\n\t\t\t\t\t\trng.setStart(lastNode, 0);\n\t\t\t\t\t\trng.setEnd(lastNode, 0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (root.nodeName == 'BR') {\n\t\t\t\t\t\tif (root.nextSibling && dom.isBlock(root.nextSibling)) {\n\t\t\t\t\t\t\t// Trick on older IE versions to render the caret before the BR between two lists\n\t\t\t\t\t\t\tif (!documentMode || documentMode < 9) {\n\t\t\t\t\t\t\t\ttempElm = dom.create('br');\n\t\t\t\t\t\t\t\troot.parentNode.insertBefore(tempElm, root);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\trng.setStartBefore(root);\n\t\t\t\t\t\t\trng.setEndBefore(root);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setStartAfter(root);\n\t\t\t\t\t\t\trng.setEndAfter(root);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setStart(root, 0);\n\t\t\t\t\t\trng.setEnd(root, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tselection.setRng(rng);\n\n\t\t\t\t// Remove tempElm created for old IE:s\n\t\t\t\tdom.remove(tempElm);\n\t\t\t\tselection.scrollIntoView(root);\n\t\t\t}\n\n\t\t\tfunction setForcedBlockAttrs(node) {\n\t\t\t\tvar forcedRootBlockName = settings.forced_root_block;\n\n\t\t\t\tif (forcedRootBlockName && forcedRootBlockName.toLowerCase() === node.tagName.toLowerCase()) {\n\t\t\t\t\tdom.setAttribs(node, settings.forced_root_block_attrs);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction emptyBlock(elm) {\n\t\t\t\t// BR is needed in empty blocks on non IE browsers\n\t\t\t\telm.innerHTML = !isIE ? '
      ' : '';\n\t\t\t}\n\n\t\t\t// Creates a new block element by cloning the current one or creating a new one if the name is specified\n\t\t\t// This function will also copy any text formatting from the parent block and add it to the new one\n\t\t\tfunction createNewBlock(name) {\n\t\t\t\tvar node = container, block, clonedNode, caretNode, textInlineElements = schema.getTextInlineElements();\n\n\t\t\t\tif (name || parentBlockName == \"TABLE\") {\n\t\t\t\t\tblock = dom.create(name || newBlockName);\n\t\t\t\t\tsetForcedBlockAttrs(block);\n\t\t\t\t} else {\n\t\t\t\t\tblock = parentBlock.cloneNode(false);\n\t\t\t\t}\n\n\t\t\t\tcaretNode = block;\n\n\t\t\t\t// Clone any parent styles\n\t\t\t\tif (settings.keep_styles !== false) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (textInlineElements[node.nodeName]) {\n\t\t\t\t\t\t\t// Never clone a caret containers\n\t\t\t\t\t\t\tif (node.id == '_mce_caret') {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tclonedNode = node.cloneNode(false);\n\t\t\t\t\t\t\tdom.setAttrib(clonedNode, 'id', ''); // Remove ID since it needs to be document unique\n\n\t\t\t\t\t\t\tif (block.hasChildNodes()) {\n\t\t\t\t\t\t\t\tclonedNode.appendChild(block.firstChild);\n\t\t\t\t\t\t\t\tblock.appendChild(clonedNode);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcaretNode = clonedNode;\n\t\t\t\t\t\t\t\tblock.appendChild(clonedNode);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} while ((node = node.parentNode) && node != editableRoot);\n\t\t\t\t}\n\n\t\t\t\t// BR is needed in empty blocks on non IE browsers\n\t\t\t\tif (!isIE) {\n\t\t\t\t\tcaretNode.innerHTML = '
      ';\n\t\t\t\t}\n\n\t\t\t\treturn block;\n\t\t\t}\n\n\t\t\t// Returns true/false if the caret is at the start/end of the parent block element\n\t\t\tfunction isCaretAtStartOrEndOfBlock(start) {\n\t\t\t\tvar walker, node, name;\n\n\t\t\t\t// Caret is in the middle of a text node like \"a|b\"\n\t\t\t\tif (container.nodeType == 3 && (start ? offset > 0 : offset < container.nodeValue.length)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// If after the last element in block node edge case for #5091\n\t\t\t\tif (container.parentNode == parentBlock && isAfterLastNodeInContainer && !start) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// If the caret if before the first element in parentBlock\n\t\t\t\tif (start && container.nodeType == 1 && container == parentBlock.firstChild) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Caret can be before/after a table\n\t\t\t\tif (container.nodeName === \"TABLE\" || (container.previousSibling && container.previousSibling.nodeName == \"TABLE\")) {\n\t\t\t\t\treturn (isAfterLastNodeInContainer && !start) || (!isAfterLastNodeInContainer && start);\n\t\t\t\t}\n\n\t\t\t\t// Walk the DOM and look for text nodes or non empty elements\n\t\t\t\twalker = new TreeWalker(container, parentBlock);\n\n\t\t\t\t// If caret is in beginning or end of a text block then jump to the next/previous node\n\t\t\t\tif (container.nodeType == 3) {\n\t\t\t\t\tif (start && offset === 0) {\n\t\t\t\t\t\twalker.prev();\n\t\t\t\t\t} else if (!start && offset == container.nodeValue.length) {\n\t\t\t\t\t\twalker.next();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twhile ((node = walker.current())) {\n\t\t\t\t\tif (node.nodeType === 1) {\n\t\t\t\t\t\t// Ignore bogus elements\n\t\t\t\t\t\tif (!node.getAttribute('data-mce-bogus')) {\n\t\t\t\t\t\t\t// Keep empty elements like but not trailing br:s like

      text|

      \n\t\t\t\t\t\t\tname = node.nodeName.toLowerCase();\n\t\t\t\t\t\t\tif (nonEmptyElementsMap[name] && name !== 'br') {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (node.nodeType === 3 && !/^[ \\t\\r\\n]*$/.test(node.nodeValue)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (start) {\n\t\t\t\t\t\twalker.prev();\n\t\t\t\t\t} else {\n\t\t\t\t\t\twalker.next();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Wraps any text nodes or inline elements in the specified forced root block name\n\t\t\tfunction wrapSelfAndSiblingsInDefaultBlock(container, offset) {\n\t\t\t\tvar newBlock, parentBlock, startNode, node, next, rootBlockName, blockName = newBlockName || 'P';\n\n\t\t\t\t// Not in a block element or in a table cell or caption\n\t\t\t\tparentBlock = dom.getParent(container, dom.isBlock);\n\t\t\t\tif (!parentBlock || !canSplitBlock(parentBlock)) {\n\t\t\t\t\tparentBlock = parentBlock || editableRoot;\n\n\t\t\t\t\tif (parentBlock == editor.getBody() || isTableCell(parentBlock)) {\n\t\t\t\t\t\trootBlockName = parentBlock.nodeName.toLowerCase();\n\t\t\t\t\t} else {\n\t\t\t\t\t\trootBlockName = parentBlock.parentNode.nodeName.toLowerCase();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!parentBlock.hasChildNodes()) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tparentBlock.appendChild(newBlock);\n\t\t\t\t\t\trng.setStart(newBlock, 0);\n\t\t\t\t\t\trng.setEnd(newBlock, 0);\n\t\t\t\t\t\treturn newBlock;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Find parent that is the first child of parentBlock\n\t\t\t\t\tnode = container;\n\t\t\t\t\twhile (node.parentNode != parentBlock) {\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Loop left to find start node start wrapping at\n\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\tstartNode = node;\n\t\t\t\t\t\tnode = node.previousSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (startNode && schema.isValidChild(rootBlockName, blockName.toLowerCase())) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tstartNode.parentNode.insertBefore(newBlock, startNode);\n\n\t\t\t\t\t\t// Start wrapping until we hit a block\n\t\t\t\t\t\tnode = startNode;\n\t\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\t\tnext = node.nextSibling;\n\t\t\t\t\t\t\tnewBlock.appendChild(node);\n\t\t\t\t\t\t\tnode = next;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Restore range to it's past location\n\t\t\t\t\t\trng.setStart(container, offset);\n\t\t\t\t\t\trng.setEnd(container, offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn container;\n\t\t\t}\n\n\t\t\t// Inserts a block or br before/after or in the middle of a split list of the LI is empty\n\t\t\tfunction handleEmptyListItem() {\n\t\t\t\tfunction isFirstOrLastLi(first) {\n\t\t\t\t\tvar node = containerBlock[first ? 'firstChild' : 'lastChild'];\n\n\t\t\t\t\t// Find first/last element since there might be whitespace there\n\t\t\t\t\twhile (node) {\n\t\t\t\t\t\tif (node.nodeType == 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode = node[first ? 'nextSibling' : 'previousSibling'];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn node === parentBlock;\n\t\t\t\t}\n\n\t\t\t\tfunction getContainerBlock() {\n\t\t\t\t\tvar containerBlockParent = containerBlock.parentNode;\n\n\t\t\t\t\tif (/^(LI|DT|DD)$/.test(containerBlockParent.nodeName)) {\n\t\t\t\t\t\treturn containerBlockParent;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn containerBlock;\n\t\t\t\t}\n\n\t\t\t\tif (containerBlock == editor.getBody()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Check if we are in an nested list\n\t\t\t\tvar containerBlockParentName = containerBlock.parentNode.nodeName;\n\t\t\t\tif (/^(OL|UL|LI)$/.test(containerBlockParentName)) {\n\t\t\t\t\tnewBlockName = 'LI';\n\t\t\t\t}\n\n\t\t\t\tnewBlock = newBlockName ? createNewBlock(newBlockName) : dom.create('BR');\n\n\t\t\t\tif (isFirstOrLastLi(true) && isFirstOrLastLi()) {\n\t\t\t\t\tif (containerBlockParentName == 'LI') {\n\t\t\t\t\t\t// Nested list is inside a LI\n\t\t\t\t\t\tdom.insertAfter(newBlock, getContainerBlock());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Is first and last list item then replace the OL/UL with a text block\n\t\t\t\t\t\tdom.replace(newBlock, containerBlock);\n\t\t\t\t\t}\n\t\t\t\t} else if (isFirstOrLastLi(true)) {\n\t\t\t\t\tif (containerBlockParentName == 'LI') {\n\t\t\t\t\t\t// List nested in an LI then move the list to a new sibling LI\n\t\t\t\t\t\tdom.insertAfter(newBlock, getContainerBlock());\n\t\t\t\t\t\tnewBlock.appendChild(dom.doc.createTextNode(' ')); // Needed for IE so the caret can be placed\n\t\t\t\t\t\tnewBlock.appendChild(containerBlock);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// First LI in list then remove LI and add text block before list\n\t\t\t\t\t\tcontainerBlock.parentNode.insertBefore(newBlock, containerBlock);\n\t\t\t\t\t}\n\t\t\t\t} else if (isFirstOrLastLi()) {\n\t\t\t\t\t// Last LI in list then remove LI and add text block after list\n\t\t\t\t\tdom.insertAfter(newBlock, getContainerBlock());\n\t\t\t\t\trenderBlockOnIE(newBlock);\n\t\t\t\t} else {\n\t\t\t\t\t// Middle LI in list the split the list and insert a text block in the middle\n\t\t\t\t\t// Extract after fragment and insert it after the current block\n\t\t\t\t\tcontainerBlock = getContainerBlock();\n\t\t\t\t\ttmpRng = rng.cloneRange();\n\t\t\t\t\ttmpRng.setStartAfter(parentBlock);\n\t\t\t\t\ttmpRng.setEndAfter(containerBlock);\n\t\t\t\t\tfragment = tmpRng.extractContents();\n\n\t\t\t\t\tif (newBlockName == 'LI' && fragment.firstChild.nodeName == 'LI') {\n\t\t\t\t\t\tnewBlock = fragment.firstChild;\n\t\t\t\t\t\tdom.insertAfter(fragment, containerBlock);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdom.insertAfter(fragment, containerBlock);\n\t\t\t\t\t\tdom.insertAfter(newBlock, containerBlock);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdom.remove(parentBlock);\n\t\t\t\tmoveToCaretPosition(newBlock);\n\t\t\t\tundoManager.add();\n\t\t\t}\n\n\t\t\t// Inserts a BR element if the forced_root_block option is set to false or empty string\n\t\t\tfunction insertBr() {\n\t\t\t\teditor.execCommand(\"InsertLineBreak\", false, evt);\n\t\t\t}\n\n\t\t\t// Trims any linebreaks at the beginning of node user for example when pressing enter in a PRE element\n\t\t\tfunction trimLeadingLineBreaks(node) {\n\t\t\t\tdo {\n\t\t\t\t\tif (node.nodeType === 3) {\n\t\t\t\t\t\tnode.nodeValue = node.nodeValue.replace(/^[\\r\\n]+/, '');\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.firstChild;\n\t\t\t\t} while (node);\n\t\t\t}\n\n\t\t\tfunction getEditableRoot(node) {\n\t\t\t\tvar root = dom.getRoot(), parent, editableRoot;\n\n\t\t\t\t// Get all parents until we hit a non editable parent or the root\n\t\t\t\tparent = node;\n\t\t\t\twhile (parent !== root && dom.getContentEditable(parent) !== \"false\") {\n\t\t\t\t\tif (dom.getContentEditable(parent) === \"true\") {\n\t\t\t\t\t\teditableRoot = parent;\n\t\t\t\t\t}\n\n\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t}\n\n\t\t\t\treturn parent !== root ? editableRoot : root;\n\t\t\t}\n\n\t\t\t// Adds a BR at the end of blocks that only contains an IMG or INPUT since\n\t\t\t// these might be floated and then they won't expand the block\n\t\t\tfunction addBrToBlockIfNeeded(block) {\n\t\t\t\tvar lastChild;\n\n\t\t\t\t// IE will render the blocks correctly other browsers needs a BR\n\t\t\t\tif (!isIE) {\n\t\t\t\t\tblock.normalize(); // Remove empty text nodes that got left behind by the extract\n\n\t\t\t\t\t// Check if the block is empty or contains a floated last child\n\t\t\t\t\tlastChild = block.lastChild;\n\t\t\t\t\tif (!lastChild || (/^(left|right)$/gi.test(dom.getStyle(lastChild, 'float', true)))) {\n\t\t\t\t\t\tdom.add(block, 'br');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction insertNewBlockAfter() {\n\t\t\t\t// If the caret is at the end of a header we produce a P tag after it similar to Word unless we are in a hgroup\n\t\t\t\tif (/^(H[1-6]|PRE|FIGURE)$/.test(parentBlockName) && containerBlockName != 'HGROUP') {\n\t\t\t\t\tnewBlock = createNewBlock(newBlockName);\n\t\t\t\t} else {\n\t\t\t\t\tnewBlock = createNewBlock();\n\t\t\t\t}\n\n\t\t\t\t// Split the current container block element if enter is pressed inside an empty inner block element\n\t\t\t\tif (settings.end_container_on_empty_block && canSplitBlock(containerBlock) && dom.isEmpty(parentBlock)) {\n\t\t\t\t\t// Split container block for example a BLOCKQUOTE at the current blockParent location for example a P\n\t\t\t\t\tnewBlock = dom.split(containerBlock, parentBlock);\n\t\t\t\t} else {\n\t\t\t\t\tdom.insertAfter(newBlock, parentBlock);\n\t\t\t\t}\n\n\t\t\t\tmoveToCaretPosition(newBlock);\n\t\t\t}\n\n\t\t\trng = selection.getRng(true);\n\n\t\t\t// Event is blocked by some other handler for example the lists plugin\n\t\t\tif (evt.isDefaultPrevented()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Delete any selected contents\n\t\t\tif (!rng.collapsed) {\n\t\t\t\teditor.execCommand('Delete');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Setup range items and newBlockName\n\t\t\tnew RangeUtils(dom).normalize(rng);\n\t\t\tcontainer = rng.startContainer;\n\t\t\toffset = rng.startOffset;\n\t\t\tnewBlockName = (settings.force_p_newlines ? 'p' : '') || settings.forced_root_block;\n\t\t\tnewBlockName = newBlockName ? newBlockName.toUpperCase() : '';\n\t\t\tdocumentMode = dom.doc.documentMode;\n\t\t\tshiftKey = evt.shiftKey;\n\n\t\t\t// Resolve node index\n\t\t\tif (container.nodeType == 1 && container.hasChildNodes()) {\n\t\t\t\tisAfterLastNodeInContainer = offset > container.childNodes.length - 1;\n\n\t\t\t\tcontainer = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;\n\t\t\t\tif (isAfterLastNodeInContainer && container.nodeType == 3) {\n\t\t\t\t\toffset = container.nodeValue.length;\n\t\t\t\t} else {\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Get editable root node, normally the body element but sometimes a div or span\n\t\t\teditableRoot = getEditableRoot(container);\n\n\t\t\t// If there is no editable root then enter is done inside a contentEditable false element\n\t\t\tif (!editableRoot) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tundoManager.beforeChange();\n\n\t\t\t// If editable root isn't block nor the root of the editor\n\t\t\tif (!dom.isBlock(editableRoot) && editableRoot != dom.getRoot()) {\n\t\t\t\tif (!newBlockName || shiftKey) {\n\t\t\t\t\tinsertBr();\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Wrap the current node and it's sibling in a default block if it's needed.\n\t\t\t// for example this text|text2 will become this

      text|text2

      \n\t\t\t// This won't happen if root blocks are disabled or the shiftKey is pressed\n\t\t\tif ((newBlockName && !shiftKey) || (!newBlockName && shiftKey)) {\n\t\t\t\tcontainer = wrapSelfAndSiblingsInDefaultBlock(container, offset);\n\t\t\t}\n\n\t\t\t// Find parent block and setup empty block paddings\n\t\t\tparentBlock = dom.getParent(container, dom.isBlock);\n\t\t\tcontainerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null;\n\n\t\t\t// Setup block names\n\t\t\tparentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5\n\t\t\tcontainerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5\n\n\t\t\t// Enter inside block contained within a LI then split or insert before/after LI\n\t\t\tif (containerBlockName == 'LI' && !evt.ctrlKey) {\n\t\t\t\tparentBlock = containerBlock;\n\t\t\t\tparentBlockName = containerBlockName;\n\t\t\t}\n\n\t\t\tif (editor.undoManager.typing) {\n\t\t\t\teditor.undoManager.typing = false;\n\t\t\t\teditor.undoManager.add();\n\t\t\t}\n\n\t\t\t// Handle enter in list item\n\t\t\tif (/^(LI|DT|DD)$/.test(parentBlockName)) {\n\t\t\t\tif (!newBlockName && shiftKey) {\n\t\t\t\t\tinsertBr();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Handle enter inside an empty list item\n\t\t\t\tif (dom.isEmpty(parentBlock)) {\n\t\t\t\t\thandleEmptyListItem();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Don't split PRE tags but insert a BR instead easier when writing code samples etc\n\t\t\tif (parentBlockName == 'PRE' && settings.br_in_pre !== false) {\n\t\t\t\tif (!shiftKey) {\n\t\t\t\t\tinsertBr();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If no root block is configured then insert a BR by default or if the shiftKey is pressed\n\t\t\t\tif ((!newBlockName && !shiftKey && parentBlockName != 'LI') || (newBlockName && shiftKey)) {\n\t\t\t\t\tinsertBr();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If parent block is root then never insert new blocks\n\t\t\tif (newBlockName && parentBlock === editor.getBody()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Default block name if it's not configured\n\t\t\tnewBlockName = newBlockName || 'P';\n\n\t\t\t// Insert new block before/after the parent block depending on caret location\n\t\t\tif (CaretContainer.isCaretContainerBlock(parentBlock)) {\n\t\t\t\tnewBlock = CaretContainer.showCaretContainerBlock(parentBlock);\n\t\t\t\tif (dom.isEmpty(parentBlock)) {\n\t\t\t\t\temptyBlock(parentBlock);\n\t\t\t\t}\n\t\t\t\tmoveToCaretPosition(newBlock);\n\t\t\t} else if (isCaretAtStartOrEndOfBlock()) {\n\t\t\t\tinsertNewBlockAfter();\n\t\t\t} else if (isCaretAtStartOrEndOfBlock(true)) {\n\t\t\t\t// Insert new block before\n\t\t\t\tnewBlock = parentBlock.parentNode.insertBefore(createNewBlock(), parentBlock);\n\t\t\t\trenderBlockOnIE(newBlock);\n\t\t\t\tmoveToCaretPosition(parentBlock);\n\t\t\t} else {\n\t\t\t\t// Extract after fragment and insert it after the current block\n\t\t\t\ttmpRng = rng.cloneRange();\n\t\t\t\ttmpRng.setEndAfter(parentBlock);\n\t\t\t\tfragment = tmpRng.extractContents();\n\t\t\t\ttrimLeadingLineBreaks(fragment);\n\t\t\t\tnewBlock = fragment.firstChild;\n\t\t\t\tdom.insertAfter(fragment, parentBlock);\n\t\t\t\ttrimInlineElementsOnLeftSideOfBlock(newBlock);\n\t\t\t\taddBrToBlockIfNeeded(parentBlock);\n\n\t\t\t\tif (dom.isEmpty(parentBlock)) {\n\t\t\t\t\temptyBlock(parentBlock);\n\t\t\t\t}\n\n\t\t\t\tnewBlock.normalize();\n\n\t\t\t\t// New block might become empty if it's

      a |

      \n\t\t\t\tif (dom.isEmpty(newBlock)) {\n\t\t\t\t\tdom.remove(newBlock);\n\t\t\t\t\tinsertNewBlockAfter();\n\t\t\t\t} else {\n\t\t\t\t\tmoveToCaretPosition(newBlock);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdom.setAttrib(newBlock, 'id', ''); // Remove ID since it needs to be document unique\n\n\t\t\t// Allow custom handling of new blocks\n\t\t\teditor.fire('NewBlock', {newBlock: newBlock});\n\n\t\t\tundoManager.typing = false;\n\t\t\tundoManager.add();\n\t\t}\n\n\t\teditor.on('keydown', function(evt) {\n\t\t\tif (evt.keyCode == 13) {\n\t\t\t\tif (handleEnterKey(evt) !== false) {\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n});\n\n// Included from: js/tinymce/classes/ForceBlocks.js\n\n/**\n * ForceBlocks.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Makes sure that everything gets wrapped in paragraphs.\n *\n * @private\n * @class tinymce.ForceBlocks\n */\ndefine(\"tinymce/ForceBlocks\", [], function() {\n\treturn function(editor) {\n\t\tvar settings = editor.settings, dom = editor.dom, selection = editor.selection;\n\t\tvar schema = editor.schema, blockElements = schema.getBlockElements();\n\n\t\tfunction addRootBlocks() {\n\t\t\tvar node = selection.getStart(), rootNode = editor.getBody(), rng;\n\t\t\tvar startContainer, startOffset, endContainer, endOffset, rootBlockNode;\n\t\t\tvar tempNode, offset = -0xFFFFFF, wrapped, restoreSelection;\n\t\t\tvar tmpRng, rootNodeName, forcedRootBlock;\n\n\t\t\tforcedRootBlock = settings.forced_root_block;\n\n\t\t\tif (!node || node.nodeType !== 1 || !forcedRootBlock) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check if node is wrapped in block\n\t\t\twhile (node && node != rootNode) {\n\t\t\t\tif (blockElements[node.nodeName]) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tnode = node.parentNode;\n\t\t\t}\n\n\t\t\t// Get current selection\n\t\t\trng = selection.getRng();\n\t\t\tif (rng.setStart) {\n\t\t\t\tstartContainer = rng.startContainer;\n\t\t\t\tstartOffset = rng.startOffset;\n\t\t\t\tendContainer = rng.endContainer;\n\t\t\t\tendOffset = rng.endOffset;\n\n\t\t\t\ttry {\n\t\t\t\t\trestoreSelection = editor.getDoc().activeElement === rootNode;\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// IE throws unspecified error here sometimes\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Force control range into text range\n\t\t\t\tif (rng.item) {\n\t\t\t\t\tnode = rng.item(0);\n\t\t\t\t\trng = editor.getDoc().body.createTextRange();\n\t\t\t\t\trng.moveToElementText(node);\n\t\t\t\t}\n\n\t\t\t\trestoreSelection = rng.parentElement().ownerDocument === editor.getDoc();\n\t\t\t\ttmpRng = rng.duplicate();\n\t\t\t\ttmpRng.collapse(true);\n\t\t\t\tstartOffset = tmpRng.move('character', offset) * -1;\n\n\t\t\t\tif (!tmpRng.collapsed) {\n\t\t\t\t\ttmpRng = rng.duplicate();\n\t\t\t\t\ttmpRng.collapse(false);\n\t\t\t\t\tendOffset = (tmpRng.move('character', offset) * -1) - startOffset;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Wrap non block elements and text nodes\n\t\t\tnode = rootNode.firstChild;\n\t\t\trootNodeName = rootNode.nodeName.toLowerCase();\n\t\t\twhile (node) {\n\t\t\t\t// TODO: Break this up, too complex\n\t\t\t\tif (((node.nodeType === 3 || (node.nodeType == 1 && !blockElements[node.nodeName]))) &&\n\t\t\t\t\tschema.isValidChild(rootNodeName, forcedRootBlock.toLowerCase())) {\n\t\t\t\t\t// Remove empty text nodes\n\t\t\t\t\tif (node.nodeType === 3 && node.nodeValue.length === 0) {\n\t\t\t\t\t\ttempNode = node;\n\t\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\t\tdom.remove(tempNode);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!rootBlockNode) {\n\t\t\t\t\t\trootBlockNode = dom.create(forcedRootBlock, editor.settings.forced_root_block_attrs);\n\t\t\t\t\t\tnode.parentNode.insertBefore(rootBlockNode, node);\n\t\t\t\t\t\twrapped = true;\n\t\t\t\t\t}\n\n\t\t\t\t\ttempNode = node;\n\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\trootBlockNode.appendChild(tempNode);\n\t\t\t\t} else {\n\t\t\t\t\trootBlockNode = null;\n\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wrapped && restoreSelection) {\n\t\t\t\tif (rng.setStart) {\n\t\t\t\t\trng.setStart(startContainer, startOffset);\n\t\t\t\t\trng.setEnd(endContainer, endOffset);\n\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t} else {\n\t\t\t\t\t// Only select if the previous selection was inside the document to prevent auto focus in quirks mode\n\t\t\t\t\ttry {\n\t\t\t\t\t\trng = editor.getDoc().body.createTextRange();\n\t\t\t\t\t\trng.moveToElementText(rootNode);\n\t\t\t\t\t\trng.collapse(true);\n\t\t\t\t\t\trng.moveStart('character', startOffset);\n\n\t\t\t\t\t\tif (endOffset > 0) {\n\t\t\t\t\t\t\trng.moveEnd('character', endOffset);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trng.select();\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t// Ignore\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\teditor.nodeChanged();\n\t\t\t}\n\t\t}\n\n\t\t// Force root blocks\n\t\tif (settings.forced_root_block) {\n\t\t\teditor.on('NodeChange', addRootBlocks);\n\t\t}\n\t};\n});\n\n// Included from: js/tinymce/classes/caret/CaretUtils.js\n\n/**\n * CaretUtils.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Utility functions shared by the caret logic.\n *\n * @private\n * @class tinymce.caret.CaretUtils\n */\ndefine(\"tinymce/caret/CaretUtils\", [\n\t\"tinymce/util/Fun\",\n\t\"tinymce/dom/TreeWalker\",\n\t\"tinymce/dom/NodeType\",\n\t\"tinymce/caret/CaretPosition\",\n\t\"tinymce/caret/CaretContainer\",\n\t\"tinymce/caret/CaretCandidate\"\n], function(Fun, TreeWalker, NodeType, CaretPosition, CaretContainer, CaretCandidate) {\n\tvar isContentEditableTrue = NodeType.isContentEditableTrue,\n\t\tisContentEditableFalse = NodeType.isContentEditableFalse,\n\t\tisBlockLike = NodeType.matchStyleValues('display', 'block table table-cell table-caption'),\n\t\tisCaretContainer = CaretContainer.isCaretContainer,\n\t\tisCaretContainerBlock = CaretContainer.isCaretContainerBlock,\n\t\tcurry = Fun.curry,\n\t\tisElement = NodeType.isElement,\n\t\tisCaretCandidate = CaretCandidate.isCaretCandidate;\n\n\tfunction isForwards(direction) {\n\t\treturn direction > 0;\n\t}\n\n\tfunction isBackwards(direction) {\n\t\treturn direction < 0;\n\t}\n\n\tfunction skipCaretContainers(walk, shallow) {\n\t\tvar node;\n\n\t\twhile ((node = walk(shallow))) {\n\t\t\tif (!isCaretContainerBlock(node)) {\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction findNode(node, direction, predicateFn, rootNode, shallow) {\n\t\tvar walker = new TreeWalker(node, rootNode);\n\n\t\tif (isBackwards(direction)) {\n\t\t\tif (isContentEditableFalse(node) || isCaretContainerBlock(node)) {\n\t\t\t\tnode = skipCaretContainers(walker.prev, true);\n\t\t\t\tif (predicateFn(node)) {\n\t\t\t\t\treturn node;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile ((node = skipCaretContainers(walker.prev, shallow))) {\n\t\t\t\tif (predicateFn(node)) {\n\t\t\t\t\treturn node;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isForwards(direction)) {\n\t\t\tif (isContentEditableFalse(node) || isCaretContainerBlock(node)) {\n\t\t\t\tnode = skipCaretContainers(walker.next, true);\n\t\t\t\tif (predicateFn(node)) {\n\t\t\t\t\treturn node;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile ((node = skipCaretContainers(walker.next, shallow))) {\n\t\t\t\tif (predicateFn(node)) {\n\t\t\t\t\treturn node;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction getEditingHost(node, rootNode) {\n\t\tfor (node = node.parentNode; node && node != rootNode; node = node.parentNode) {\n\t\t\tif (isContentEditableTrue(node)) {\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode;\n\t}\n\n\tfunction getParentBlock(node, rootNode) {\n\t\twhile (node && node != rootNode) {\n\t\t\tif (isBlockLike(node)) {\n\t\t\t\treturn node;\n\t\t\t}\n\n\t\t\tnode = node.parentNode;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction isInSameBlock(caretPosition1, caretPosition2, rootNode) {\n\t\treturn getParentBlock(caretPosition1.container(), rootNode) == getParentBlock(caretPosition2.container(), rootNode);\n\t}\n\n\tfunction isInSameEditingHost(caretPosition1, caretPosition2, rootNode) {\n\t\treturn getEditingHost(caretPosition1.container(), rootNode) == getEditingHost(caretPosition2.container(), rootNode);\n\t}\n\n\tfunction getChildNodeAtRelativeOffset(relativeOffset, caretPosition) {\n\t\tvar container, offset;\n\n\t\tif (!caretPosition) {\n\t\t\treturn null;\n\t\t}\n\n\t\tcontainer = caretPosition.container();\n\t\toffset = caretPosition.offset();\n\n\t\tif (!isElement(container)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn container.childNodes[offset + relativeOffset];\n\t}\n\n\tfunction beforeAfter(before, node) {\n\t\tvar range = node.ownerDocument.createRange();\n\n\t\tif (before) {\n\t\t\trange.setStartBefore(node);\n\t\t\trange.setEndBefore(node);\n\t\t} else {\n\t\t\trange.setStartAfter(node);\n\t\t\trange.setEndAfter(node);\n\t\t}\n\n\t\treturn range;\n\t}\n\n\tfunction isNodesInSameBlock(rootNode, node1, node2) {\n\t\treturn getParentBlock(node1, rootNode) == getParentBlock(node2, rootNode);\n\t}\n\n\tfunction lean(left, rootNode, node) {\n\t\tvar sibling, siblingName;\n\n\t\tif (left) {\n\t\t\tsiblingName = 'previousSibling';\n\t\t} else {\n\t\t\tsiblingName = 'nextSibling';\n\t\t}\n\n\t\twhile (node && node != rootNode) {\n\t\t\tsibling = node[siblingName];\n\n\t\t\tif (isCaretContainer(sibling)) {\n\t\t\t\tsibling = sibling[siblingName];\n\t\t\t}\n\n\t\t\tif (isContentEditableFalse(sibling)) {\n\t\t\t\tif (isNodesInSameBlock(rootNode, sibling, node)) {\n\t\t\t\t\treturn sibling;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (isCaretCandidate(sibling)) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tnode = node.parentNode;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tvar before = curry(beforeAfter, true);\n\tvar after = curry(beforeAfter, false);\n\n\tfunction normalizeRange(direction, rootNode, range) {\n\t\tvar node, container, offset, location;\n\t\tvar leanLeft = curry(lean, true, rootNode);\n\t\tvar leanRight = curry(lean, false, rootNode);\n\n\t\tcontainer = range.startContainer;\n\t\toffset = range.startOffset;\n\n\t\tif (CaretContainer.isCaretContainerBlock(container)) {\n\t\t\tif (!isElement(container)) {\n\t\t\t\tcontainer = container.parentNode;\n\t\t\t}\n\n\t\t\tlocation = container.getAttribute('data-mce-caret');\n\n\t\t\tif (location == 'before') {\n\t\t\t\tnode = container.nextSibling;\n\t\t\t\tif (isContentEditableFalse(node)) {\n\t\t\t\t\treturn before(node);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (location == 'after') {\n\t\t\t\tnode = container.previousSibling;\n\t\t\t\tif (isContentEditableFalse(node)) {\n\t\t\t\t\treturn after(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!range.collapsed) {\n\t\t\treturn range;\n\t\t}\n\n\t\tif (NodeType.isText(container)) {\n\t\t\tif (isCaretContainer(container)) {\n\t\t\t\tif (direction === 1) {\n\t\t\t\t\tnode = leanRight(container);\n\t\t\t\t\tif (node) {\n\t\t\t\t\t\treturn before(node);\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = leanLeft(container);\n\t\t\t\t\tif (node) {\n\t\t\t\t\t\treturn after(node);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (direction === -1) {\n\t\t\t\t\tnode = leanLeft(container);\n\t\t\t\t\tif (node) {\n\t\t\t\t\t\treturn after(node);\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = leanRight(container);\n\t\t\t\t\tif (node) {\n\t\t\t\t\t\treturn before(node);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn range;\n\t\t\t}\n\n\t\t\tif (CaretContainer.endsWithCaretContainer(container) && offset >= container.data.length - 1) {\n\t\t\t\tif (direction === 1) {\n\t\t\t\t\tnode = leanRight(container);\n\t\t\t\t\tif (node) {\n\t\t\t\t\t\treturn before(node);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn range;\n\t\t\t}\n\n\t\t\tif (CaretContainer.startsWithCaretContainer(container) && offset <= 1) {\n\t\t\t\tif (direction === -1) {\n\t\t\t\t\tnode = leanLeft(container);\n\t\t\t\t\tif (node) {\n\t\t\t\t\t\treturn after(node);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn range;\n\t\t\t}\n\n\t\t\tif (offset === container.data.length) {\n\t\t\t\tnode = leanRight(container);\n\t\t\t\tif (node) {\n\t\t\t\t\treturn before(node);\n\t\t\t\t}\n\n\t\t\t\treturn range;\n\t\t\t}\n\n\t\t\tif (offset === 0) {\n\t\t\t\tnode = leanLeft(container);\n\t\t\t\tif (node) {\n\t\t\t\t\treturn after(node);\n\t\t\t\t}\n\n\t\t\t\treturn range;\n\t\t\t}\n\t\t}\n\n\t\treturn range;\n\t}\n\n\tfunction isNextToContentEditableFalse(relativeOffset, caretPosition) {\n\t\treturn isContentEditableFalse(getChildNodeAtRelativeOffset(relativeOffset, caretPosition));\n\t}\n\n\treturn {\n\t\tisForwards: isForwards,\n\t\tisBackwards: isBackwards,\n\t\tfindNode: findNode,\n\t\tgetEditingHost: getEditingHost,\n\t\tgetParentBlock: getParentBlock,\n\t\tisInSameBlock: isInSameBlock,\n\t\tisInSameEditingHost: isInSameEditingHost,\n\t\tisBeforeContentEditableFalse: curry(isNextToContentEditableFalse, 0),\n\t\tisAfterContentEditableFalse: curry(isNextToContentEditableFalse, -1),\n\t\tnormalizeRange: normalizeRange\n\t};\n});\n\n// Included from: js/tinymce/classes/caret/CaretWalker.js\n\n/**\n * CaretWalker.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This module contains logic for moving around a virtual caret in logical order within a DOM element.\n *\n * It ignores the most obvious invalid caret locations such as within a script element or within a\n * contentEditable=false element but it will return locations that isn't possible to render visually.\n *\n * @private\n * @class tinymce.caret.CaretWalker\n * @example\n * var caretWalker = new CaretWalker(rootElm);\n *\n * var prevLogicalCaretPosition = caretWalker.prev(CaretPosition.fromRangeStart(range));\n * var nextLogicalCaretPosition = caretWalker.next(CaretPosition.fromRangeEnd(range));\n */\ndefine(\"tinymce/caret/CaretWalker\", [\n\t\"tinymce/dom/NodeType\",\n\t\"tinymce/caret/CaretCandidate\",\n\t\"tinymce/caret/CaretPosition\",\n\t\"tinymce/caret/CaretUtils\",\n\t\"tinymce/util/Arr\",\n\t\"tinymce/util/Fun\"\n], function(NodeType, CaretCandidate, CaretPosition, CaretUtils, Arr, Fun) {\n\tvar isContentEditableFalse = NodeType.isContentEditableFalse,\n\t\tisText = NodeType.isText,\n\t\tisElement = NodeType.isElement,\n\t\tisBr = NodeType.isBr,\n\t\tisForwards = CaretUtils.isForwards,\n\t\tisBackwards = CaretUtils.isBackwards,\n\t\tisCaretCandidate = CaretCandidate.isCaretCandidate,\n\t\tisAtomic = CaretCandidate.isAtomic,\n\t\tisEditableCaretCandidate = CaretCandidate.isEditableCaretCandidate;\n\n\tfunction getParents(node, rootNode) {\n\t\tvar parents = [];\n\n\t\twhile (node && node != rootNode) {\n\t\t\tparents.push(node);\n\t\t\tnode = node.parentNode;\n\t\t}\n\n\t\treturn parents;\n\t}\n\n\tfunction nodeAtIndex(container, offset) {\n\t\tif (container.hasChildNodes() && offset < container.childNodes.length) {\n\t\t\treturn container.childNodes[offset];\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction getCaretCandidatePosition(direction, node) {\n\t\tif (isForwards(direction)) {\n\t\t\tif (isCaretCandidate(node.previousSibling) && !isText(node.previousSibling)) {\n\t\t\t\treturn CaretPosition.before(node);\n\t\t\t}\n\n\t\t\tif (isText(node)) {\n\t\t\t\treturn CaretPosition(node, 0);\n\t\t\t}\n\t\t}\n\n\t\tif (isBackwards(direction)) {\n\t\t\tif (isCaretCandidate(node.nextSibling) && !isText(node.nextSibling)) {\n\t\t\t\treturn CaretPosition.after(node);\n\t\t\t}\n\n\t\t\tif (isText(node)) {\n\t\t\t\treturn CaretPosition(node, node.data.length);\n\t\t\t}\n\t\t}\n\n\t\tif (isBackwards(direction)) {\n\t\t\tif (isBr(node)) {\n\t\t\t\treturn CaretPosition.before(node);\n\t\t\t}\n\n\t\t\treturn CaretPosition.after(node);\n\t\t}\n\n\t\treturn CaretPosition.before(node);\n\t}\n\n\t// Jumps over BR elements

      |

      a

      ->


      |a

      \n\tfunction isBrBeforeBlock(node, rootNode) {\n\t\tvar next;\n\n\t\tif (!NodeType.isBr(node)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tnext = findCaretPosition(1, CaretPosition.after(node), rootNode);\n\t\tif (!next) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !CaretUtils.isInSameBlock(CaretPosition.before(node), CaretPosition.before(next), rootNode);\n\t}\n\n\tfunction findCaretPosition(direction, startCaretPosition, rootNode) {\n\t\tvar container, offset, node, nextNode, innerNode,\n\t\t\trootContentEditableFalseElm, caretPosition;\n\n\t\tif (!isElement(rootNode) || !startCaretPosition) {\n\t\t\treturn null;\n\t\t}\n\n\t\tcaretPosition = startCaretPosition;\n\t\tcontainer = caretPosition.container();\n\t\toffset = caretPosition.offset();\n\n\t\tif (isText(container)) {\n\t\t\tif (isBackwards(direction) && offset > 0) {\n\t\t\t\treturn CaretPosition(container, --offset);\n\t\t\t}\n\n\t\t\tif (isForwards(direction) && offset < container.length) {\n\t\t\t\treturn CaretPosition(container, ++offset);\n\t\t\t}\n\n\t\t\tnode = container;\n\t\t} else {\n\t\t\tif (isBackwards(direction) && offset > 0) {\n\t\t\t\tnextNode = nodeAtIndex(container, offset - 1);\n\t\t\t\tif (isCaretCandidate(nextNode)) {\n\t\t\t\t\tif (!isAtomic(nextNode)) {\n\t\t\t\t\t\tinnerNode = CaretUtils.findNode(nextNode, direction, isEditableCaretCandidate, nextNode);\n\t\t\t\t\t\tif (innerNode) {\n\t\t\t\t\t\t\tif (isText(innerNode)) {\n\t\t\t\t\t\t\t\treturn CaretPosition(innerNode, innerNode.data.length);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn CaretPosition.after(innerNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isText(nextNode)) {\n\t\t\t\t\t\treturn CaretPosition(nextNode, nextNode.data.length);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn CaretPosition.before(nextNode);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isForwards(direction) && offset < container.childNodes.length) {\n\t\t\t\tnextNode = nodeAtIndex(container, offset);\n\t\t\t\tif (isCaretCandidate(nextNode)) {\n\t\t\t\t\tif (isBrBeforeBlock(nextNode, rootNode)) {\n\t\t\t\t\t\treturn findCaretPosition(direction, CaretPosition.after(nextNode), rootNode);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isAtomic(nextNode)) {\n\t\t\t\t\t\tinnerNode = CaretUtils.findNode(nextNode, direction, isEditableCaretCandidate, nextNode);\n\t\t\t\t\t\tif (innerNode) {\n\t\t\t\t\t\t\tif (isText(innerNode)) {\n\t\t\t\t\t\t\t\treturn CaretPosition(innerNode, 0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn CaretPosition.before(innerNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isText(nextNode)) {\n\t\t\t\t\t\treturn CaretPosition(nextNode, 0);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn CaretPosition.after(nextNode);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnode = caretPosition.getNode();\n\t\t}\n\n\t\tif ((isForwards(direction) && caretPosition.isAtEnd()) || (isBackwards(direction) && caretPosition.isAtStart())) {\n\t\t\tnode = CaretUtils.findNode(node, direction, Fun.constant(true), rootNode, true);\n\t\t\tif (isEditableCaretCandidate(node)) {\n\t\t\t\treturn getCaretCandidatePosition(direction, node);\n\t\t\t}\n\t\t}\n\n\t\tnextNode = CaretUtils.findNode(node, direction, isEditableCaretCandidate, rootNode);\n\n\t\trootContentEditableFalseElm = Arr.last(Arr.filter(getParents(container, rootNode), isContentEditableFalse));\n\t\tif (rootContentEditableFalseElm && (!nextNode || !rootContentEditableFalseElm.contains(nextNode))) {\n\t\t\tif (isForwards(direction)) {\n\t\t\t\tcaretPosition = CaretPosition.after(rootContentEditableFalseElm);\n\t\t\t} else {\n\t\t\t\tcaretPosition = CaretPosition.before(rootContentEditableFalseElm);\n\t\t\t}\n\n\t\t\treturn caretPosition;\n\t\t}\n\n\t\tif (nextNode) {\n\t\t\treturn getCaretCandidatePosition(direction, nextNode);\n\t\t}\n\n\t\treturn null;\n\t}\n\n\treturn function(rootNode) {\n\t\treturn {\n\t\t\t/**\n\t\t\t * Returns the next logical caret position from the specificed input\n\t\t\t * caretPoisiton or null if there isn't any more positions left for example\n\t\t\t * at the end specified root element.\n\t\t\t *\n\t\t\t * @method next\n\t\t\t * @param {tinymce.caret.CaretPosition} caretPosition Caret position to start from.\n\t\t\t * @return {tinymce.caret.CaretPosition} CaretPosition or null if no position was found.\n\t\t\t */\n\t\t\tnext: function(caretPosition) {\n\t\t\t\treturn findCaretPosition(1, caretPosition, rootNode);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the previous logical caret position from the specificed input\n\t\t\t * caretPoisiton or null if there isn't any more positions left for example\n\t\t\t * at the end specified root element.\n\t\t\t *\n\t\t\t * @method prev\n\t\t\t * @param {tinymce.caret.CaretPosition} caretPosition Caret position to start from.\n\t\t\t * @return {tinymce.caret.CaretPosition} CaretPosition or null if no position was found.\n\t\t\t */\n\t\t\tprev: function(caretPosition) {\n\t\t\t\treturn findCaretPosition(-1, caretPosition, rootNode);\n\t\t\t}\n\t\t};\n\t};\n});\n\n// Included from: js/tinymce/classes/InsertList.js\n\n/**\n * InsertList.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2016 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Handles inserts of lists into the editor instance.\n *\n * @class tinymce.InsertList\n * @private\n */\ndefine(\"tinymce/InsertList\", [\n\t\"tinymce/util/Tools\",\n\t\"tinymce/caret/CaretWalker\",\n\t\"tinymce/caret/CaretPosition\"\n], function(Tools, CaretWalker, CaretPosition) {\n\tvar isListFragment = function(fragment) {\n\t\tvar firstChild = fragment.firstChild;\n\t\tvar lastChild = fragment.lastChild;\n\n\t\t// Skip meta since it's likely
        ..
      \n\t\tif (firstChild && firstChild.name === 'meta') {\n\t\t\tfirstChild = firstChild.next;\n\t\t}\n\n\t\t// Skip mce_marker since it's likely
        ..
      \n\t\tif (lastChild && lastChild.attr('id') === 'mce_marker') {\n\t\t\tlastChild = lastChild.prev;\n\t\t}\n\n\t\tif (!firstChild || firstChild !== lastChild) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn firstChild.name === 'ul' || firstChild.name === 'ol';\n\t};\n\n\tvar cleanupDomFragment = function (domFragment) {\n\t\tvar firstChild = domFragment.firstChild;\n\t\tvar lastChild = domFragment.lastChild;\n\n\t\t// TODO: remove the meta tag from paste logic\n\t\tif (firstChild && firstChild.nodeName === 'META') {\n\t\t\tfirstChild.parentNode.removeChild(firstChild);\n\t\t}\n\n\t\tif (lastChild && lastChild.id === 'mce_marker') {\n\t\t\tlastChild.parentNode.removeChild(lastChild);\n\t\t}\n\n\t\treturn domFragment;\n\t};\n\n\tvar toDomFragment = function(dom, serializer, fragment) {\n\t\tvar html = serializer.serialize(fragment);\n\t\tvar domFragment = dom.createFragment(html);\n\n\t\treturn cleanupDomFragment(domFragment);\n\t};\n\n\tvar listItems = function(elm) {\n\t\treturn Tools.grep(elm.childNodes, function(child) {\n\t\t\treturn child.nodeName === 'LI';\n\t\t});\n\t};\n\n\tvar isEmpty = function (elm) {\n\t\treturn !elm.firstChild;\n\t};\n\n\tvar trimListItems = function(elms) {\n\t\treturn elms.length > 0 && isEmpty(elms[elms.length - 1]) ? elms.slice(0, -1) : elms;\n\t};\n\n\tvar getParentLi = function(dom, node) {\n\t\tvar parentBlock = dom.getParent(node, dom.isBlock);\n\t\treturn parentBlock && parentBlock.nodeName === 'LI' ? parentBlock : null;\n\t};\n\n\tvar isParentBlockLi = function(dom, node) {\n\t\treturn !!getParentLi(dom, node);\n\t};\n\n\tvar getSplit = function(parentNode, rng) {\n\t\tvar beforeRng = rng.cloneRange();\n\t\tvar afterRng = rng.cloneRange();\n\n\t\tbeforeRng.setStartBefore(parentNode);\n\t\tafterRng.setEndAfter(parentNode);\n\n\t\treturn [\n\t\t\tbeforeRng.cloneContents(),\n\t\t\tafterRng.cloneContents()\n\t\t];\n\t};\n\n\tvar findFirstIn = function(node, rootNode) {\n\t\tvar caretPos = CaretPosition.before(node);\n\t\tvar caretWalker = new CaretWalker(rootNode);\n\t\tvar newCaretPos = caretWalker.next(caretPos);\n\n\t\treturn newCaretPos ? newCaretPos.toRange() : null;\n\t};\n\n\tvar findLastOf = function(node, rootNode) {\n\t\tvar caretPos = CaretPosition.after(node);\n\t\tvar caretWalker = new CaretWalker(rootNode);\n\t\tvar newCaretPos = caretWalker.prev(caretPos);\n\n\t\treturn newCaretPos ? newCaretPos.toRange() : null;\n\t};\n\n\tvar insertMiddle = function(target, elms, rootNode, rng) {\n\t\tvar parts = getSplit(target, rng);\n\t\tvar parentElm = target.parentNode;\n\n\t\tparentElm.insertBefore(parts[0], target);\n\t\tTools.each(elms, function(li) {\n\t\t\tparentElm.insertBefore(li, target);\n\t\t});\n\t\tparentElm.insertBefore(parts[1], target);\n\t\tparentElm.removeChild(target);\n\n\t\treturn findLastOf(elms[elms.length - 1], rootNode);\n\t};\n\n\tvar insertBefore = function(target, elms, rootNode) {\n\t\tvar parentElm = target.parentNode;\n\n\t\tTools.each(elms, function(elm) {\n\t\t\tparentElm.insertBefore(elm, target);\n\t\t});\n\n\t\treturn findFirstIn(target, rootNode);\n\t};\n\n\tvar insertAfter = function(target, elms, rootNode, dom) {\n\t\tdom.insertAfter(elms.reverse(), target);\n\t\treturn findLastOf(elms[0], rootNode);\n\t};\n\n\tvar insertAtCaret = function(serializer, dom, rng, fragment) {\n\t\tvar domFragment = toDomFragment(dom, serializer, fragment);\n\t\tvar liTarget = getParentLi(dom, rng.startContainer);\n\t\tvar liElms = trimListItems(listItems(domFragment.firstChild));\n\t\tvar BEGINNING = 1, END = 2;\n\t\tvar rootNode = dom.getRoot();\n\n\t\tvar isAt = function(location) {\n\t\t\tvar caretPos = CaretPosition.fromRangeStart(rng);\n\t\t\tvar caretWalker = new CaretWalker(dom.getRoot());\n\t\t\tvar newPos = location === BEGINNING ? caretWalker.prev(caretPos) : caretWalker.next(caretPos);\n\n\t\t\treturn newPos ? getParentLi(dom, newPos.getNode()) !== liTarget : true;\n\t\t};\n\n\t\tif (isAt(BEGINNING)) {\n\t\t\treturn insertBefore(liTarget, liElms, rootNode);\n\t\t} else if (isAt(END)) {\n\t\t\treturn insertAfter(liTarget, liElms, rootNode, dom);\n\t\t}\n\n\t\treturn insertMiddle(liTarget, liElms, rootNode, rng);\n\t};\n\n\treturn {\n\t\tisListFragment: isListFragment,\n\t\tinsertAtCaret: insertAtCaret,\n\t\tisParentBlockLi: isParentBlockLi,\n\t\ttrimListItems: trimListItems,\n\t\tlistItems: listItems\n\t};\n});\n\n// Included from: js/tinymce/classes/InsertContent.js\n\n/**\n * InsertContent.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2016 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Handles inserts of contents into the editor instance.\n *\n * @class tinymce.InsertContent\n * @private\n */\ndefine(\"tinymce/InsertContent\", [\n\t\"tinymce/Env\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/html/Serializer\",\n\t\"tinymce/caret/CaretWalker\",\n\t\"tinymce/caret/CaretPosition\",\n\t\"tinymce/dom/ElementUtils\",\n\t\"tinymce/dom/NodeType\",\n\t\"tinymce/InsertList\"\n], function(Env, Tools, Serializer, CaretWalker, CaretPosition, ElementUtils, NodeType, InsertList) {\n\tvar isTableCell = NodeType.matchNodeNames('td th');\n\n\tvar validInsertion = function (editor, value, parentNode) {\n\t\t// Should never insert content into bogus elements, since these can\n\t\t// be resize handles or similar\n\t\tif (parentNode.getAttribute('data-mce-bogus') === 'all') {\n\t\t\tparentNode.parentNode.insertBefore(editor.dom.createFragment(value), parentNode);\n\t\t} else {\n\t\t\t// Check if parent is empty or only has one BR element then set the innerHTML of that parent\n\t\t\tvar node = parentNode.firstChild;\n\t\t\tvar node2 = parentNode.lastChild;\n\t\t\tif (!node || (node === node2 && node.nodeName === 'BR')) {///\n\t\t\t\teditor.dom.setHTML(parentNode, value);\n\t\t\t} else {\n\t\t\t\teditor.selection.setContent(value);\n\t\t\t}\n\t\t}\n\t};\n\n\tvar insertHtmlAtCaret = function(editor, value, details) {\n\t\tvar parser, serializer, parentNode, rootNode, fragment, args;\n\t\tvar marker, rng, node, node2, bookmarkHtml, merge;\n\t\tvar textInlineElements = editor.schema.getTextInlineElements();\n\t\tvar selection = editor.selection, dom = editor.dom;\n\n\t\tfunction trimOrPaddLeftRight(html) {\n\t\t\tvar rng, container, offset;\n\n\t\t\trng = selection.getRng(true);\n\t\t\tcontainer = rng.startContainer;\n\t\t\toffset = rng.startOffset;\n\n\t\t\tfunction hasSiblingText(siblingName) {\n\t\t\t\treturn container[siblingName] && container[siblingName].nodeType == 3;\n\t\t\t}\n\n\t\t\tif (container.nodeType == 3) {\n\t\t\t\tif (offset > 0) {\n\t\t\t\t\thtml = html.replace(/^ /, ' ');\n\t\t\t\t} else if (!hasSiblingText('previousSibling')) {\n\t\t\t\t\thtml = html.replace(/^ /, ' ');\n\t\t\t\t}\n\n\t\t\t\tif (offset < container.length) {\n\t\t\t\t\thtml = html.replace(/ (
      |)$/, ' ');\n\t\t\t\t} else if (!hasSiblingText('nextSibling')) {\n\t\t\t\t\thtml = html.replace(/( | )(
      |)$/, ' ');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn html;\n\t\t}\n\n\t\t// Removes   from a [b] c -> a  c -> a c\n\t\tfunction trimNbspAfterDeleteAndPaddValue() {\n\t\t\tvar rng, container, offset;\n\n\t\t\trng = selection.getRng(true);\n\t\t\tcontainer = rng.startContainer;\n\t\t\toffset = rng.startOffset;\n\n\t\t\tif (container.nodeType == 3 && rng.collapsed) {\n\t\t\t\tif (container.data[offset] === '\\u00a0') {\n\t\t\t\t\tcontainer.deleteData(offset, 1);\n\n\t\t\t\t\tif (!/[\\u00a0| ]$/.test(value)) {\n\t\t\t\t\t\tvalue += ' ';\n\t\t\t\t\t}\n\t\t\t\t} else if (container.data[offset - 1] === '\\u00a0') {\n\t\t\t\t\tcontainer.deleteData(offset - 1, 1);\n\n\t\t\t\t\tif (!/[\\u00a0| ]$/.test(value)) {\n\t\t\t\t\t\tvalue = ' ' + value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction reduceInlineTextElements() {\n\t\t\tif (merge) {\n\t\t\t\tvar root = editor.getBody(), elementUtils = new ElementUtils(dom);\n\n\t\t\t\tTools.each(dom.select('*[data-mce-fragment]'), function(node) {\n\t\t\t\t\tfor (var testNode = node.parentNode; testNode && testNode != root; testNode = testNode.parentNode) {\n\t\t\t\t\t\tif (textInlineElements[node.nodeName.toLowerCase()] && elementUtils.compare(testNode, node)) {\n\t\t\t\t\t\t\tdom.remove(node, true);\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\tfunction markFragmentElements(fragment) {\n\t\t\tvar node = fragment;\n\n\t\t\twhile ((node = node.walk())) {\n\t\t\t\tif (node.type === 1) {\n\t\t\t\t\tnode.attr('data-mce-fragment', '1');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction umarkFragmentElements(elm) {\n\t\t\tTools.each(elm.getElementsByTagName('*'), function(elm) {\n\t\t\t\telm.removeAttribute('data-mce-fragment');\n\t\t\t});\n\t\t}\n\n\t\tfunction isPartOfFragment(node) {\n\t\t\treturn !!node.getAttribute('data-mce-fragment');\n\t\t}\n\n\t\tfunction canHaveChildren(node) {\n\t\t\treturn node && !editor.schema.getShortEndedElements()[node.nodeName];\n\t\t}\n\n\t\tfunction moveSelectionToMarker(marker) {\n\t\t\tvar parentEditableFalseElm, parentBlock, nextRng;\n\n\t\t\tfunction getContentEditableFalseParent(node) {\n\t\t\t\tvar root = editor.getBody();\n\n\t\t\t\tfor (; node && node !== root; node = node.parentNode) {\n\t\t\t\t\tif (editor.dom.getContentEditable(node) === 'false') {\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (!marker) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tselection.scrollIntoView(marker);\n\n\t\t\t// If marker is in cE=false then move selection to that element instead\n\t\t\tparentEditableFalseElm = getContentEditableFalseParent(marker);\n\t\t\tif (parentEditableFalseElm) {\n\t\t\t\tdom.remove(marker);\n\t\t\t\tselection.select(parentEditableFalseElm);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Move selection before marker and remove it\n\t\t\trng = dom.createRng();\n\n\t\t\t// If previous sibling is a text node set the selection to the end of that node\n\t\t\tnode = marker.previousSibling;\n\t\t\tif (node && node.nodeType == 3) {\n\t\t\t\trng.setStart(node, node.nodeValue.length);\n\n\t\t\t\t// TODO: Why can't we normalize on IE\n\t\t\t\tif (!Env.ie) {\n\t\t\t\t\tnode2 = marker.nextSibling;\n\t\t\t\t\tif (node2 && node2.nodeType == 3) {\n\t\t\t\t\t\tnode.appendData(node2.data);\n\t\t\t\t\t\tnode2.parentNode.removeChild(node2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If the previous sibling isn't a text node or doesn't exist set the selection before the marker node\n\t\t\t\trng.setStartBefore(marker);\n\t\t\t\trng.setEndBefore(marker);\n\t\t\t}\n\n\t\t\tfunction findNextCaretRng(rng) {\n\t\t\t\tvar caretPos = CaretPosition.fromRangeStart(rng);\n\t\t\t\tvar caretWalker = new CaretWalker(editor.getBody());\n\n\t\t\t\tcaretPos = caretWalker.next(caretPos);\n\t\t\t\tif (caretPos) {\n\t\t\t\t\treturn caretPos.toRange();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove the marker node and set the new range\n\t\t\tparentBlock = dom.getParent(marker, dom.isBlock);\n\t\t\tdom.remove(marker);\n\n\t\t\tif (parentBlock && dom.isEmpty(parentBlock)) {\n\t\t\t\teditor.$(parentBlock).empty();\n\n\t\t\t\trng.setStart(parentBlock, 0);\n\t\t\t\trng.setEnd(parentBlock, 0);\n\n\t\t\t\tif (!isTableCell(parentBlock) && !isPartOfFragment(parentBlock) && (nextRng = findNextCaretRng(rng))) {\n\t\t\t\t\trng = nextRng;\n\t\t\t\t\tdom.remove(parentBlock);\n\t\t\t\t} else {\n\t\t\t\t\tdom.add(parentBlock, dom.create('br', {'data-mce-bogus': '1'}));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tselection.setRng(rng);\n\t\t}\n\n\t\t// Check for whitespace before/after value\n\t\tif (/^ | $/.test(value)) {\n\t\t\tvalue = trimOrPaddLeftRight(value);\n\t\t}\n\n\t\t// Setup parser and serializer\n\t\tparser = editor.parser;\n\t\tmerge = details.merge;\n\n\t\tserializer = new Serializer({\n\t\t\tvalidate: editor.settings.validate\n\t\t}, editor.schema);\n\t\tbookmarkHtml = '​';\n\n\t\t// Run beforeSetContent handlers on the HTML to be inserted\n\t\targs = {content: value, format: 'html', selection: true};\n\t\teditor.fire('BeforeSetContent', args);\n\t\tvalue = args.content;\n\n\t\t// Add caret at end of contents if it's missing\n\t\tif (value.indexOf('{$caret}') == -1) {\n\t\t\tvalue += '{$caret}';\n\t\t}\n\n\t\t// Replace the caret marker with a span bookmark element\n\t\tvalue = value.replace(/\\{\\$caret\\}/, bookmarkHtml);\n\n\t\t// If selection is at |

      then move it into

      |

      \n\t\trng = selection.getRng();\n\t\tvar caretElement = rng.startContainer || (rng.parentElement ? rng.parentElement() : null);\n\t\tvar body = editor.getBody();\n\t\tif (caretElement === body && selection.isCollapsed()) {\n\t\t\tif (dom.isBlock(body.firstChild) && canHaveChildren(body.firstChild) && dom.isEmpty(body.firstChild)) {\n\t\t\t\trng = dom.createRng();\n\t\t\t\trng.setStart(body.firstChild, 0);\n\t\t\t\trng.setEnd(body.firstChild, 0);\n\t\t\t\tselection.setRng(rng);\n\t\t\t}\n\t\t}\n\n\t\t// Insert node maker where we will insert the new HTML and get it's parent\n\t\tif (!selection.isCollapsed()) {\n\t\t\t// Fix for #2595 seems that delete removes one extra character on\n\t\t\t// WebKit for some odd reason if you double click select a word\n\t\t\teditor.selection.setRng(editor.selection.getRng());\n\t\t\teditor.getDoc().execCommand('Delete', false, null);\n\t\t\ttrimNbspAfterDeleteAndPaddValue();\n\t\t}\n\n\t\tparentNode = selection.getNode();\n\n\t\t// Parse the fragment within the context of the parent node\n\t\tvar parserArgs = {context: parentNode.nodeName.toLowerCase(), data: details.data};\n\t\tfragment = parser.parse(value, parserArgs);\n\n\t\t// Custom handling of lists\n\t\tif (details.paste === true && InsertList.isListFragment(fragment) && InsertList.isParentBlockLi(dom, parentNode)) {\n\t\t\trng = InsertList.insertAtCaret(serializer, dom, editor.selection.getRng(true), fragment);\n\t\t\teditor.selection.setRng(rng);\n\t\t\teditor.fire('SetContent', args);\n\t\t\treturn;\n\t\t}\n\n\t\tmarkFragmentElements(fragment);\n\n\t\t// Move the caret to a more suitable location\n\t\tnode = fragment.lastChild;\n\t\tif (node.attr('id') == 'mce_marker') {\n\t\t\tmarker = node;\n\n\t\t\tfor (node = node.prev; node; node = node.walk(true)) {\n\t\t\t\tif (node.type == 3 || !dom.isBlock(node.name)) {\n\t\t\t\t\tif (editor.schema.isValidChild(node.parent.name, 'span')) {\n\t\t\t\t\t\tnode.parent.insert(marker, node, node.name === 'br');\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\teditor._selectionOverrides.showBlockCaretContainer(parentNode);\n\n\t\t// If parser says valid we can insert the contents into that parent\n\t\tif (!parserArgs.invalid) {\n\t\t\tvalue = serializer.serialize(fragment);\n\t\t\tvalidInsertion(editor, value, parentNode);\n\t\t} else {\n\t\t\t// If the fragment was invalid within that context then we need\n\t\t\t// to parse and process the parent it's inserted into\n\n\t\t\t// Insert bookmark node and get the parent\n\t\t\tselection.setContent(bookmarkHtml);\n\t\t\tparentNode = selection.getNode();\n\t\t\trootNode = editor.getBody();\n\n\t\t\t// Opera will return the document node when selection is in root\n\t\t\tif (parentNode.nodeType == 9) {\n\t\t\t\tparentNode = node = rootNode;\n\t\t\t} else {\n\t\t\t\tnode = parentNode;\n\t\t\t}\n\n\t\t\t// Find the ancestor just before the root element\n\t\t\twhile (node !== rootNode) {\n\t\t\t\tparentNode = node;\n\t\t\t\tnode = node.parentNode;\n\t\t\t}\n\n\t\t\t// Get the outer/inner HTML depending on if we are in the root and parser and serialize that\n\t\t\tvalue = parentNode == rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode);\n\t\t\tvalue = serializer.serialize(\n\t\t\t\tparser.parse(\n\t\t\t\t\t// Need to replace by using a function since $ in the contents would otherwise be a problem\n\t\t\t\t\tvalue.replace(//i, function() {\n\t\t\t\t\t\treturn serializer.serialize(fragment);\n\t\t\t\t\t})\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Set the inner/outer HTML depending on if we are in the root or not\n\t\t\tif (parentNode == rootNode) {\n\t\t\t\tdom.setHTML(rootNode, value);\n\t\t\t} else {\n\t\t\t\tdom.setOuterHTML(parentNode, value);\n\t\t\t}\n\t\t}\n\n\t\treduceInlineTextElements();\n\t\tmoveSelectionToMarker(dom.get('mce_marker'));\n\t\tumarkFragmentElements(editor.getBody());\n\t\teditor.fire('SetContent', args);\n\t\teditor.addVisual();\n\t};\n\n\tvar processValue = function (value) {\n\t\tvar details;\n\n\t\tif (typeof value !== 'string') {\n\t\t\tdetails = Tools.extend({\n\t\t\t\tpaste: value.paste,\n\t\t\t\tdata: {\n\t\t\t\t\tpaste: value.paste\n\t\t\t\t}\n\t\t\t}, value);\n\n\t\t\treturn {\n\t\t\t\tcontent: value.content,\n\t\t\t\tdetails: details\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tcontent: value,\n\t\t\tdetails: {}\n\t\t};\n\t};\n\n\tvar insertAtCaret = function (editor, value) {\n\t\tvar result = processValue(value);\n\t\tinsertHtmlAtCaret(editor, result.content, result.details);\n\t};\n\n\treturn {\n\t\tinsertAtCaret: insertAtCaret\n\t};\n});\n\n// Included from: js/tinymce/classes/EditorCommands.js\n\n/**\n * EditorCommands.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class enables you to add custom editor commands and it contains\n * overrides for native browser commands to address various bugs and issues.\n *\n * @class tinymce.EditorCommands\n */\ndefine(\"tinymce/EditorCommands\", [\n\t\"tinymce/Env\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/dom/RangeUtils\",\n\t\"tinymce/dom/TreeWalker\",\n\t\"tinymce/InsertContent\",\n\t\"tinymce/dom/NodeType\"\n], function(Env, Tools, RangeUtils, TreeWalker, InsertContent, NodeType) {\n\t// Added for compression purposes\n\tvar each = Tools.each, extend = Tools.extend;\n\tvar map = Tools.map, inArray = Tools.inArray, explode = Tools.explode;\n\tvar isOldIE = Env.ie && Env.ie < 11;\n\tvar TRUE = true, FALSE = false;\n\n\treturn function(editor) {\n\t\tvar dom, selection, formatter,\n\t\t\tcommands = {state: {}, exec: {}, value: {}},\n\t\t\tsettings = editor.settings,\n\t\t\tbookmark;\n\n\t\teditor.on('PreInit', function() {\n\t\t\tdom = editor.dom;\n\t\t\tselection = editor.selection;\n\t\t\tsettings = editor.settings;\n\t\t\tformatter = editor.formatter;\n\t\t});\n\n\t\t/**\n\t\t * Executes the specified command.\n\t\t *\n\t\t * @method execCommand\n\t\t * @param {String} command Command to execute.\n\t\t * @param {Boolean} ui Optional user interface state.\n\t\t * @param {Object} value Optional value for command.\n\t\t * @param {Object} args Optional extra arguments to the execCommand.\n\t\t * @return {Boolean} true/false if the command was found or not.\n\t\t */\n\t\tfunction execCommand(command, ui, value, args) {\n\t\t\tvar func, customCommand, state = 0;\n\n\t\t\tif (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(command) && (!args || !args.skip_focus)) {\n\t\t\t\teditor.focus();\n\t\t\t}\n\n\t\t\targs = editor.fire('BeforeExecCommand', {command: command, ui: ui, value: value});\n\t\t\tif (args.isDefaultPrevented()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tcustomCommand = command.toLowerCase();\n\t\t\tif ((func = commands.exec[customCommand])) {\n\t\t\t\tfunc(customCommand, ui, value);\n\t\t\t\teditor.fire('ExecCommand', {command: command, ui: ui, value: value});\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Plugin commands\n\t\t\teach(editor.plugins, function(p) {\n\t\t\t\tif (p.execCommand && p.execCommand(command, ui, value)) {\n\t\t\t\t\teditor.fire('ExecCommand', {command: command, ui: ui, value: value});\n\t\t\t\t\tstate = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (state) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\t// Theme commands\n\t\t\tif (editor.theme && editor.theme.execCommand && editor.theme.execCommand(command, ui, value)) {\n\t\t\t\teditor.fire('ExecCommand', {command: command, ui: ui, value: value});\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Browser commands\n\t\t\ttry {\n\t\t\t\tstate = editor.getDoc().execCommand(command, ui, value);\n\t\t\t} catch (ex) {\n\t\t\t\t// Ignore old IE errors\n\t\t\t}\n\n\t\t\tif (state) {\n\t\t\t\teditor.fire('ExecCommand', {command: command, ui: ui, value: value});\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Queries the current state for a command for example if the current selection is \"bold\".\n\t\t *\n\t\t * @method queryCommandState\n\t\t * @param {String} command Command to check the state of.\n\t\t * @return {Boolean/Number} true/false if the selected contents is bold or not, -1 if it's not found.\n\t\t */\n\t\tfunction queryCommandState(command) {\n\t\t\tvar func;\n\n\t\t\t// Is hidden then return undefined\n\t\t\tif (editor.quirks.isHidden()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcommand = command.toLowerCase();\n\t\t\tif ((func = commands.state[command])) {\n\t\t\t\treturn func(command);\n\t\t\t}\n\n\t\t\t// Browser commands\n\t\t\ttry {\n\t\t\t\treturn editor.getDoc().queryCommandState(command);\n\t\t\t} catch (ex) {\n\t\t\t\t// Fails sometimes see bug: 1896577\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Queries the command value for example the current fontsize.\n\t\t *\n\t\t * @method queryCommandValue\n\t\t * @param {String} command Command to check the value of.\n\t\t * @return {Object} Command value of false if it's not found.\n\t\t */\n\t\tfunction queryCommandValue(command) {\n\t\t\tvar func;\n\n\t\t\t// Is hidden then return undefined\n\t\t\tif (editor.quirks.isHidden()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcommand = command.toLowerCase();\n\t\t\tif ((func = commands.value[command])) {\n\t\t\t\treturn func(command);\n\t\t\t}\n\n\t\t\t// Browser commands\n\t\t\ttry {\n\t\t\t\treturn editor.getDoc().queryCommandValue(command);\n\t\t\t} catch (ex) {\n\t\t\t\t// Fails sometimes see bug: 1896577\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Adds commands to the command collection.\n\t\t *\n\t\t * @method addCommands\n\t\t * @param {Object} command_list Name/value collection with commands to add, the names can also be comma separated.\n\t\t * @param {String} type Optional type to add, defaults to exec. Can be value or state as well.\n\t\t */\n\t\tfunction addCommands(command_list, type) {\n\t\t\ttype = type || 'exec';\n\n\t\t\teach(command_list, function(callback, command) {\n\t\t\t\teach(command.toLowerCase().split(','), function(command) {\n\t\t\t\t\tcommands[type][command] = callback;\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tfunction addCommand(command, callback, scope) {\n\t\t\tcommand = command.toLowerCase();\n\t\t\tcommands.exec[command] = function(command, ui, value, args) {\n\t\t\t\treturn callback.call(scope || editor, ui, value, args);\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Returns true/false if the command is supported or not.\n\t\t *\n\t\t * @method queryCommandSupported\n\t\t * @param {String} command Command that we check support for.\n\t\t * @return {Boolean} true/false if the command is supported or not.\n\t\t */\n\t\tfunction queryCommandSupported(command) {\n\t\t\tcommand = command.toLowerCase();\n\n\t\t\tif (commands.exec[command]) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Browser commands\n\t\t\ttry {\n\t\t\t\treturn editor.getDoc().queryCommandSupported(command);\n\t\t\t} catch (ex) {\n\t\t\t\t// Fails sometimes see bug: 1896577\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction addQueryStateHandler(command, callback, scope) {\n\t\t\tcommand = command.toLowerCase();\n\t\t\tcommands.state[command] = function() {\n\t\t\t\treturn callback.call(scope || editor);\n\t\t\t};\n\t\t}\n\n\t\tfunction addQueryValueHandler(command, callback, scope) {\n\t\t\tcommand = command.toLowerCase();\n\t\t\tcommands.value[command] = function() {\n\t\t\t\treturn callback.call(scope || editor);\n\t\t\t};\n\t\t}\n\n\t\tfunction hasCustomCommand(command) {\n\t\t\tcommand = command.toLowerCase();\n\t\t\treturn !!commands.exec[command];\n\t\t}\n\n\t\t// Expose public methods\n\t\textend(this, {\n\t\t\texecCommand: execCommand,\n\t\t\tqueryCommandState: queryCommandState,\n\t\t\tqueryCommandValue: queryCommandValue,\n\t\t\tqueryCommandSupported: queryCommandSupported,\n\t\t\taddCommands: addCommands,\n\t\t\taddCommand: addCommand,\n\t\t\taddQueryStateHandler: addQueryStateHandler,\n\t\t\taddQueryValueHandler: addQueryValueHandler,\n\t\t\thasCustomCommand: hasCustomCommand\n\t\t});\n\n\t\t// Private methods\n\n\t\tfunction execNativeCommand(command, ui, value) {\n\t\t\tif (ui === undefined) {\n\t\t\t\tui = FALSE;\n\t\t\t}\n\n\t\t\tif (value === undefined) {\n\t\t\t\tvalue = null;\n\t\t\t}\n\n\t\t\treturn editor.getDoc().execCommand(command, ui, value);\n\t\t}\n\n\t\tfunction isFormatMatch(name) {\n\t\t\treturn formatter.match(name);\n\t\t}\n\n\t\tfunction toggleFormat(name, value) {\n\t\t\tformatter.toggle(name, value ? {value: value} : undefined);\n\t\t\teditor.nodeChanged();\n\t\t}\n\n\t\tfunction storeSelection(type) {\n\t\t\tbookmark = selection.getBookmark(type);\n\t\t}\n\n\t\tfunction restoreSelection() {\n\t\t\tselection.moveToBookmark(bookmark);\n\t\t}\n\n\t\t// Add execCommand overrides\n\t\taddCommands({\n\t\t\t// Ignore these, added for compatibility\n\t\t\t'mceResetDesignMode,mceBeginUndoLevel': function() {},\n\n\t\t\t// Add undo manager logic\n\t\t\t'mceEndUndoLevel,mceAddUndoLevel': function() {\n\t\t\t\teditor.undoManager.add();\n\t\t\t},\n\n\t\t\t'Cut,Copy,Paste': function(command) {\n\t\t\t\tvar doc = editor.getDoc(), failed;\n\n\t\t\t\t// Try executing the native command\n\t\t\t\ttry {\n\t\t\t\t\texecNativeCommand(command);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Command failed\n\t\t\t\t\tfailed = TRUE;\n\t\t\t\t}\n\n\t\t\t\t// Chrome reports the paste command as supported however older IE:s will return false for cut/paste\n\t\t\t\tif (command === 'paste' && !doc.queryCommandEnabled(command)) {\n\t\t\t\t\tfailed = true;\n\t\t\t\t}\n\n\t\t\t\t// Present alert message about clipboard access not being available\n\t\t\t\tif (failed || !doc.queryCommandSupported(command)) {\n\t\t\t\t\tvar msg = editor.translate(\n\t\t\t\t\t\t\"Your browser doesn't support direct access to the clipboard. \" +\n\t\t\t\t\t\t\"Please use the Ctrl+X/C/V keyboard shortcuts instead.\"\n\t\t\t\t\t);\n\n\t\t\t\t\tif (Env.mac) {\n\t\t\t\t\t\tmsg = msg.replace(/Ctrl\\+/g, '\\u2318+');\n\t\t\t\t\t}\n\n\t\t\t\t\teditor.notificationManager.open({text: msg, type: 'error'});\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// Override unlink command\n\t\t\tunlink: function() {\n\t\t\t\tif (selection.isCollapsed()) {\n\t\t\t\t\tvar elm = editor.dom.getParent(editor.selection.getStart(), 'a');\n\t\t\t\t\tif (elm) {\n\t\t\t\t\t\teditor.dom.remove(elm, true);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tformatter.remove(\"link\");\n\t\t\t},\n\n\t\t\t// Override justify commands to use the text formatter engine\n\t\t\t'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone': function(command) {\n\t\t\t\tvar align = command.substring(7);\n\n\t\t\t\tif (align == 'full') {\n\t\t\t\t\talign = 'justify';\n\t\t\t\t}\n\n\t\t\t\t// Remove all other alignments first\n\t\t\t\teach('left,center,right,justify'.split(','), function(name) {\n\t\t\t\t\tif (align != name) {\n\t\t\t\t\t\tformatter.remove('align' + name);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (align != 'none') {\n\t\t\t\t\ttoggleFormat('align' + align);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// Override list commands to fix WebKit bug\n\t\t\t'InsertUnorderedList,InsertOrderedList': function(command) {\n\t\t\t\tvar listElm, listParent;\n\n\t\t\t\texecNativeCommand(command);\n\n\t\t\t\t// WebKit produces lists within block elements so we need to split them\n\t\t\t\t// we will replace the native list creation logic to custom logic later on\n\t\t\t\t// TODO: Remove this when the list creation logic is removed\n\t\t\t\tlistElm = dom.getParent(selection.getNode(), 'ol,ul');\n\t\t\t\tif (listElm) {\n\t\t\t\t\tlistParent = listElm.parentNode;\n\n\t\t\t\t\t// If list is within a text block then split that block\n\t\t\t\t\tif (/^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)) {\n\t\t\t\t\t\tstoreSelection();\n\t\t\t\t\t\tdom.split(listParent, listElm);\n\t\t\t\t\t\trestoreSelection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// Override commands to use the text formatter engine\n\t\t\t'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': function(command) {\n\t\t\t\ttoggleFormat(command);\n\t\t\t},\n\n\t\t\t// Override commands to use the text formatter engine\n\t\t\t'ForeColor,HiliteColor,FontName': function(command, ui, value) {\n\t\t\t\ttoggleFormat(command, value);\n\t\t\t},\n\n\t\t\tFontSize: function(command, ui, value) {\n\t\t\t\tvar fontClasses, fontSizes;\n\n\t\t\t\t// Convert font size 1-7 to styles\n\t\t\t\tif (value >= 1 && value <= 7) {\n\t\t\t\t\tfontSizes = explode(settings.font_size_style_values);\n\t\t\t\t\tfontClasses = explode(settings.font_size_classes);\n\n\t\t\t\t\tif (fontClasses) {\n\t\t\t\t\t\tvalue = fontClasses[value - 1] || value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue = fontSizes[value - 1] || value;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttoggleFormat(command, value);\n\t\t\t},\n\n\t\t\tRemoveFormat: function(command) {\n\t\t\t\tformatter.remove(command);\n\t\t\t},\n\n\t\t\tmceBlockQuote: function() {\n\t\t\t\ttoggleFormat('blockquote');\n\t\t\t},\n\n\t\t\tFormatBlock: function(command, ui, value) {\n\t\t\t\treturn toggleFormat(value || 'p');\n\t\t\t},\n\n\t\t\tmceCleanup: function() {\n\t\t\t\tvar bookmark = selection.getBookmark();\n\n\t\t\t\teditor.setContent(editor.getContent({cleanup: TRUE}), {cleanup: TRUE});\n\n\t\t\t\tselection.moveToBookmark(bookmark);\n\t\t\t},\n\n\t\t\tmceRemoveNode: function(command, ui, value) {\n\t\t\t\tvar node = value || selection.getNode();\n\n\t\t\t\t// Make sure that the body node isn't removed\n\t\t\t\tif (node != editor.getBody()) {\n\t\t\t\t\tstoreSelection();\n\t\t\t\t\teditor.dom.remove(node, TRUE);\n\t\t\t\t\trestoreSelection();\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tmceSelectNodeDepth: function(command, ui, value) {\n\t\t\t\tvar counter = 0;\n\n\t\t\t\tdom.getParent(selection.getNode(), function(node) {\n\t\t\t\t\tif (node.nodeType == 1 && counter++ == value) {\n\t\t\t\t\t\tselection.select(node);\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\t\t\t\t}, editor.getBody());\n\t\t\t},\n\n\t\t\tmceSelectNode: function(command, ui, value) {\n\t\t\t\tselection.select(value);\n\t\t\t},\n\n\t\t\tmceInsertContent: function(command, ui, value) {\n\t\t\t\tInsertContent.insertAtCaret(editor, value);\n\t\t\t},\n\n\t\t\tmceInsertRawHTML: function(command, ui, value) {\n\t\t\t\tselection.setContent('tiny_mce_marker');\n\t\t\t\teditor.setContent(\n\t\t\t\t\teditor.getContent().replace(/tiny_mce_marker/g, function() {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t},\n\n\t\t\tmceToggleFormat: function(command, ui, value) {\n\t\t\t\ttoggleFormat(value);\n\t\t\t},\n\n\t\t\tmceSetContent: function(command, ui, value) {\n\t\t\t\teditor.setContent(value);\n\t\t\t},\n\n\t\t\t'Indent,Outdent': function(command) {\n\t\t\t\tvar intentValue, indentUnit, value;\n\n\t\t\t\t// Setup indent level\n\t\t\t\tintentValue = settings.indentation;\n\t\t\t\tindentUnit = /[a-z%]+$/i.exec(intentValue);\n\t\t\t\tintentValue = parseInt(intentValue, 10);\n\n\t\t\t\tif (!queryCommandState('InsertUnorderedList') && !queryCommandState('InsertOrderedList')) {\n\t\t\t\t\t// If forced_root_blocks is set to false we don't have a block to indent so lets create a div\n\t\t\t\t\tif (!settings.forced_root_block && !dom.getParent(selection.getNode(), dom.isBlock)) {\n\t\t\t\t\t\tformatter.apply('div');\n\t\t\t\t\t}\n\n\t\t\t\t\teach(selection.getSelectedBlocks(), function(element) {\n\t\t\t\t\t\tif (dom.getContentEditable(element) === \"false\") {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (element.nodeName !== \"LI\") {\n\t\t\t\t\t\t\tvar indentStyleName = editor.getParam('indent_use_margin', false) ? 'margin' : 'padding';\n\t\t\t\t\t\t\tindentStyleName = element.nodeName === 'TABLE' ? 'margin' : indentStyleName;\n\t\t\t\t\t\t\tindentStyleName += dom.getStyle(element, 'direction', true) == 'rtl' ? 'Right' : 'Left';\n\n\t\t\t\t\t\t\tif (command == 'outdent') {\n\t\t\t\t\t\t\t\tvalue = Math.max(0, parseInt(element.style[indentStyleName] || 0, 10) - intentValue);\n\t\t\t\t\t\t\t\tdom.setStyle(element, indentStyleName, value ? value + indentUnit : '');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvalue = (parseInt(element.style[indentStyleName] || 0, 10) + intentValue) + indentUnit;\n\t\t\t\t\t\t\t\tdom.setStyle(element, indentStyleName, value);\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} else {\n\t\t\t\t\texecNativeCommand(command);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tmceRepaint: function() {\n\t\t\t},\n\n\t\t\tInsertHorizontalRule: function() {\n\t\t\t\teditor.execCommand('mceInsertContent', false, '
      ');\n\t\t\t},\n\n\t\t\tmceToggleVisualAid: function() {\n\t\t\t\teditor.hasVisual = !editor.hasVisual;\n\t\t\t\teditor.addVisual();\n\t\t\t},\n\n\t\t\tmceReplaceContent: function(command, ui, value) {\n\t\t\t\teditor.execCommand('mceInsertContent', false, value.replace(/\\{\\$selection\\}/g, selection.getContent({format: 'text'})));\n\t\t\t},\n\n\t\t\tmceInsertLink: function(command, ui, value) {\n\t\t\t\tvar anchor;\n\n\t\t\t\tif (typeof value == 'string') {\n\t\t\t\t\tvalue = {href: value};\n\t\t\t\t}\n\n\t\t\t\tanchor = dom.getParent(selection.getNode(), 'a');\n\n\t\t\t\t// Spaces are never valid in URLs and it's a very common mistake for people to make so we fix it here.\n\t\t\t\tvalue.href = value.href.replace(' ', '%20');\n\n\t\t\t\t// Remove existing links if there could be child links or that the href isn't specified\n\t\t\t\tif (!anchor || !value.href) {\n\t\t\t\t\tformatter.remove('link');\n\t\t\t\t}\n\n\t\t\t\t// Apply new link to selection\n\t\t\t\tif (value.href) {\n\t\t\t\t\tformatter.apply('link', value, anchor);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tselectAll: function() {\n\t\t\t\tvar root = dom.getRoot(), rng;\n\n\t\t\t\tif (selection.getRng().setStart) {\n\t\t\t\t\tvar editingHost = dom.getParent(selection.getStart(), NodeType.isContentEditableTrue);\n\t\t\t\t\tif (editingHost) {\n\t\t\t\t\t\trng = dom.createRng();\n\t\t\t\t\t\trng.selectNodeContents(editingHost);\n\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// IE will render it's own root level block elements and sometimes\n\t\t\t\t\t// even put font elements in them when the user starts typing. So we need to\n\t\t\t\t\t// move the selection to a more suitable element from this:\n\t\t\t\t\t// |

      to this:

      |

      \n\t\t\t\t\trng = selection.getRng();\n\t\t\t\t\tif (!rng.item) {\n\t\t\t\t\t\trng.moveToElementText(root);\n\t\t\t\t\t\trng.select();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t\"delete\": function() {\n\t\t\t\texecNativeCommand(\"Delete\");\n\n\t\t\t\t// Check if body is empty after the delete call if so then set the contents\n\t\t\t\t// to an empty string and move the caret to any block produced by that operation\n\t\t\t\t// this fixes the issue with root blocks not being properly produced after a delete call on IE\n\t\t\t\tvar body = editor.getBody();\n\n\t\t\t\tif (dom.isEmpty(body)) {\n\t\t\t\t\teditor.setContent('');\n\n\t\t\t\t\tif (body.firstChild && dom.isBlock(body.firstChild)) {\n\t\t\t\t\t\teditor.selection.setCursorLocation(body.firstChild, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\teditor.selection.setCursorLocation(body, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tmceNewDocument: function() {\n\t\t\t\teditor.setContent('');\n\t\t\t},\n\n\t\t\tInsertLineBreak: function(command, ui, value) {\n\t\t\t\t// We load the current event in from EnterKey.js when appropriate to heed\n\t\t\t\t// certain event-specific variations such as ctrl-enter in a list\n\t\t\t\tvar evt = value;\n\t\t\t\tvar brElm, extraBr, marker;\n\t\t\t\tvar rng = selection.getRng(true);\n\t\t\t\tnew RangeUtils(dom).normalize(rng);\n\n\t\t\t\tvar offset = rng.startOffset;\n\t\t\t\tvar container = rng.startContainer;\n\n\t\t\t\t// Resolve node index\n\t\t\t\tif (container.nodeType == 1 && container.hasChildNodes()) {\n\t\t\t\t\tvar isAfterLastNodeInContainer = offset > container.childNodes.length - 1;\n\n\t\t\t\t\tcontainer = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;\n\t\t\t\t\tif (isAfterLastNodeInContainer && container.nodeType == 3) {\n\t\t\t\t\t\toffset = container.nodeValue.length;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toffset = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar parentBlock = dom.getParent(container, dom.isBlock);\n\t\t\t\tvar parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5\n\t\t\t\tvar containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null;\n\t\t\t\tvar containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5\n\n\t\t\t\t// Enter inside block contained within a LI then split or insert before/after LI\n\t\t\t\tvar isControlKey = evt && evt.ctrlKey;\n\t\t\t\tif (containerBlockName == 'LI' && !isControlKey) {\n\t\t\t\t\tparentBlock = containerBlock;\n\t\t\t\t\tparentBlockName = containerBlockName;\n\t\t\t\t}\n\n\t\t\t\t// Walks the parent block to the right and look for BR elements\n\t\t\t\tfunction hasRightSideContent() {\n\t\t\t\t\tvar walker = new TreeWalker(container, parentBlock), node;\n\t\t\t\t\tvar nonEmptyElementsMap = editor.schema.getNonEmptyElements();\n\n\t\t\t\t\twhile ((node = walker.next())) {\n\t\t\t\t\t\tif (nonEmptyElementsMap[node.nodeName.toLowerCase()] || node.length > 0) {\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\n\t\t\t\tif (container && container.nodeType == 3 && offset >= container.nodeValue.length) {\n\t\t\t\t\t// Insert extra BR element at the end block elements\n\t\t\t\t\tif (!isOldIE && !hasRightSideContent()) {\n\t\t\t\t\t\tbrElm = dom.create('br');\n\t\t\t\t\t\trng.insertNode(brElm);\n\t\t\t\t\t\trng.setStartAfter(brElm);\n\t\t\t\t\t\trng.setEndAfter(brElm);\n\t\t\t\t\t\textraBr = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbrElm = dom.create('br');\n\t\t\t\trng.insertNode(brElm);\n\n\t\t\t\t// Rendering modes below IE8 doesn't display BR elements in PRE unless we have a \\n before it\n\t\t\t\tvar documentMode = dom.doc.documentMode;\n\t\t\t\tif (isOldIE && parentBlockName == 'PRE' && (!documentMode || documentMode < 8)) {\n\t\t\t\t\tbrElm.parentNode.insertBefore(dom.doc.createTextNode('\\r'), brElm);\n\t\t\t\t}\n\n\t\t\t\t// Insert temp marker and scroll to that\n\t\t\t\tmarker = dom.create('span', {}, ' ');\n\t\t\t\tbrElm.parentNode.insertBefore(marker, brElm);\n\t\t\t\tselection.scrollIntoView(marker);\n\t\t\t\tdom.remove(marker);\n\n\t\t\t\tif (!extraBr) {\n\t\t\t\t\trng.setStartAfter(brElm);\n\t\t\t\t\trng.setEndAfter(brElm);\n\t\t\t\t} else {\n\t\t\t\t\trng.setStartBefore(brElm);\n\t\t\t\t\trng.setEndBefore(brElm);\n\t\t\t\t}\n\n\t\t\t\tselection.setRng(rng);\n\t\t\t\teditor.undoManager.add();\n\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t});\n\n\t\t// Add queryCommandState overrides\n\t\taddCommands({\n\t\t\t// Override justify commands\n\t\t\t'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull': function(command) {\n\t\t\t\tvar name = 'align' + command.substring(7);\n\t\t\t\tvar nodes = selection.isCollapsed() ? [dom.getParent(selection.getNode(), dom.isBlock)] : selection.getSelectedBlocks();\n\t\t\t\tvar matches = map(nodes, function(node) {\n\t\t\t\t\treturn !!formatter.matchNode(node, name);\n\t\t\t\t});\n\t\t\t\treturn inArray(matches, TRUE) !== -1;\n\t\t\t},\n\n\t\t\t'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': function(command) {\n\t\t\t\treturn isFormatMatch(command);\n\t\t\t},\n\n\t\t\tmceBlockQuote: function() {\n\t\t\t\treturn isFormatMatch('blockquote');\n\t\t\t},\n\n\t\t\tOutdent: function() {\n\t\t\t\tvar node;\n\n\t\t\t\tif (settings.inline_styles) {\n\t\t\t\t\tif ((node = dom.getParent(selection.getStart(), dom.isBlock)) && parseInt(node.style.paddingLeft, 10) > 0) {\n\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((node = dom.getParent(selection.getEnd(), dom.isBlock)) && parseInt(node.style.paddingLeft, 10) > 0) {\n\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tqueryCommandState('InsertUnorderedList') ||\n\t\t\t\t\tqueryCommandState('InsertOrderedList') ||\n\t\t\t\t\t(!settings.inline_styles && !!dom.getParent(selection.getNode(), 'BLOCKQUOTE'))\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t'InsertUnorderedList,InsertOrderedList': function(command) {\n\t\t\t\tvar list = dom.getParent(selection.getNode(), 'ul,ol');\n\n\t\t\t\treturn list &&\n\t\t\t\t\t(\n\t\t\t\t\t\tcommand === 'insertunorderedlist' && list.tagName === 'UL' ||\n\t\t\t\t\t\tcommand === 'insertorderedlist' && list.tagName === 'OL'\n\t\t\t\t\t);\n\t\t\t}\n\t\t}, 'state');\n\n\t\t// Add queryCommandValue overrides\n\t\taddCommands({\n\t\t\t'FontSize,FontName': function(command) {\n\t\t\t\tvar value = 0, parent;\n\n\t\t\t\tif ((parent = dom.getParent(selection.getNode(), 'span'))) {\n\t\t\t\t\tif (command == 'fontsize') {\n\t\t\t\t\t\tvalue = parent.style.fontSize;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue = parent.style.fontFamily.replace(/, /g, ',').replace(/[\\'\\\"]/g, '').toLowerCase();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}, 'value');\n\n\t\t// Add undo manager logic\n\t\taddCommands({\n\t\t\tUndo: function() {\n\t\t\t\teditor.undoManager.undo();\n\t\t\t},\n\n\t\t\tRedo: function() {\n\t\t\t\teditor.undoManager.redo();\n\t\t\t}\n\t\t});\n\t};\n});\n\n// Included from: js/tinymce/classes/util/URI.js\n\n/**\n * URI.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class handles parsing, modification and serialization of URI/URL strings.\n * @class tinymce.util.URI\n */\ndefine(\"tinymce/util/URI\", [\n\t\"tinymce/util/Tools\"\n], function(Tools) {\n\tvar each = Tools.each, trim = Tools.trim;\n\tvar queryParts = \"source protocol authority userInfo user password host port relative path directory file query anchor\".split(' ');\n\tvar DEFAULT_PORTS = {\n\t\t'ftp': 21,\n\t\t'http': 80,\n\t\t'https': 443,\n\t\t'mailto': 25\n\t};\n\n\t/**\n\t * Constructs a new URI instance.\n\t *\n\t * @constructor\n\t * @method URI\n\t * @param {String} url URI string to parse.\n\t * @param {Object} settings Optional settings object.\n\t */\n\tfunction URI(url, settings) {\n\t\tvar self = this, baseUri, base_url;\n\n\t\turl = trim(url);\n\t\tsettings = self.settings = settings || {};\n\t\tbaseUri = settings.base_uri;\n\n\t\t// Strange app protocol that isn't http/https or local anchor\n\t\t// For example: mailto,skype,tel etc.\n\t\tif (/^([\\w\\-]+):([^\\/]{2})/i.test(url) || /^\\s*#/.test(url)) {\n\t\t\tself.source = url;\n\t\t\treturn;\n\t\t}\n\n\t\tvar isProtocolRelative = url.indexOf('//') === 0;\n\n\t\t// Absolute path with no host, fake host and protocol\n\t\tif (url.indexOf('/') === 0 && !isProtocolRelative) {\n\t\t\turl = (baseUri ? baseUri.protocol || 'http' : 'http') + '://mce_host' + url;\n\t\t}\n\n\t\t// Relative path http:// or protocol relative //path\n\t\tif (!/^[\\w\\-]*:?\\/\\//.test(url)) {\n\t\t\tbase_url = settings.base_uri ? settings.base_uri.path : new URI(location.href).directory;\n\t\t\tif (settings.base_uri.protocol === \"\") {\n\t\t\t\turl = '//mce_host' + self.toAbsPath(base_url, url);\n\t\t\t} else {\n\t\t\t\turl = /([^#?]*)([#?]?.*)/.exec(url);\n\t\t\t\turl = ((baseUri && baseUri.protocol) || 'http') + '://mce_host' + self.toAbsPath(base_url, url[1]) + url[2];\n\t\t\t}\n\t\t}\n\n\t\t// Parse URL (Credits goes to Steave, http://blog.stevenlevithan.com/archives/parseuri)\n\t\turl = url.replace(/@@/g, '(mce_at)'); // Zope 3 workaround, they use @@something\n\n\t\t/*jshint maxlen: 255 */\n\t\t/*eslint max-len: 0 */\n\t\turl = /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/.exec(url);\n\n\t\teach(queryParts, function(v, i) {\n\t\t\tvar part = url[i];\n\n\t\t\t// Zope 3 workaround, they use @@something\n\t\t\tif (part) {\n\t\t\t\tpart = part.replace(/\\(mce_at\\)/g, '@@');\n\t\t\t}\n\n\t\t\tself[v] = part;\n\t\t});\n\n\t\tif (baseUri) {\n\t\t\tif (!self.protocol) {\n\t\t\t\tself.protocol = baseUri.protocol;\n\t\t\t}\n\n\t\t\tif (!self.userInfo) {\n\t\t\t\tself.userInfo = baseUri.userInfo;\n\t\t\t}\n\n\t\t\tif (!self.port && self.host === 'mce_host') {\n\t\t\t\tself.port = baseUri.port;\n\t\t\t}\n\n\t\t\tif (!self.host || self.host === 'mce_host') {\n\t\t\t\tself.host = baseUri.host;\n\t\t\t}\n\n\t\t\tself.source = '';\n\t\t}\n\n\t\tif (isProtocolRelative) {\n\t\t\tself.protocol = '';\n\t\t}\n\n\t\t//t.path = t.path || '/';\n\t}\n\n\tURI.prototype = {\n\t\t/**\n\t\t * Sets the internal path part of the URI.\n\t\t *\n\t\t * @method setPath\n\t\t * @param {string} path Path string to set.\n\t\t */\n\t\tsetPath: function(path) {\n\t\t\tvar self = this;\n\n\t\t\tpath = /^(.*?)\\/?(\\w+)?$/.exec(path);\n\n\t\t\t// Update path parts\n\t\t\tself.path = path[0];\n\t\t\tself.directory = path[1];\n\t\t\tself.file = path[2];\n\n\t\t\t// Rebuild source\n\t\t\tself.source = '';\n\t\t\tself.getURI();\n\t\t},\n\n\t\t/**\n\t\t * Converts the specified URI into a relative URI based on the current URI instance location.\n\t\t *\n\t\t * @method toRelative\n\t\t * @param {String} uri URI to convert into a relative path/URI.\n\t\t * @return {String} Relative URI from the point specified in the current URI instance.\n\t\t * @example\n\t\t * // Converts an absolute URL to an relative URL url will be somedir/somefile.htm\n\t\t * var url = new tinymce.util.URI('http://www.site.com/dir/').toRelative('http://www.site.com/dir/somedir/somefile.htm');\n\t\t */\n\t\ttoRelative: function(uri) {\n\t\t\tvar self = this, output;\n\n\t\t\tif (uri === \"./\") {\n\t\t\t\treturn uri;\n\t\t\t}\n\n\t\t\turi = new URI(uri, {base_uri: self});\n\n\t\t\t// Not on same domain/port or protocol\n\t\t\tif ((uri.host != 'mce_host' && self.host != uri.host && uri.host) || self.port != uri.port ||\n\t\t\t\t(self.protocol != uri.protocol && uri.protocol !== \"\")) {\n\t\t\t\treturn uri.getURI();\n\t\t\t}\n\n\t\t\tvar tu = self.getURI(), uu = uri.getURI();\n\n\t\t\t// Allow usage of the base_uri when relative_urls = true\n\t\t\tif (tu == uu || (tu.charAt(tu.length - 1) == \"/\" && tu.substr(0, tu.length - 1) == uu)) {\n\t\t\t\treturn tu;\n\t\t\t}\n\n\t\t\toutput = self.toRelPath(self.path, uri.path);\n\n\t\t\t// Add query\n\t\t\tif (uri.query) {\n\t\t\t\toutput += '?' + uri.query;\n\t\t\t}\n\n\t\t\t// Add anchor\n\t\t\tif (uri.anchor) {\n\t\t\t\toutput += '#' + uri.anchor;\n\t\t\t}\n\n\t\t\treturn output;\n\t\t},\n\n\t\t/**\n\t\t * Converts the specified URI into a absolute URI based on the current URI instance location.\n\t\t *\n\t\t * @method toAbsolute\n\t\t * @param {String} uri URI to convert into a relative path/URI.\n\t\t * @param {Boolean} noHost No host and protocol prefix.\n\t\t * @return {String} Absolute URI from the point specified in the current URI instance.\n\t\t * @example\n\t\t * // Converts an relative URL to an absolute URL url will be http://www.site.com/dir/somedir/somefile.htm\n\t\t * var url = new tinymce.util.URI('http://www.site.com/dir/').toAbsolute('somedir/somefile.htm');\n\t\t */\n\t\ttoAbsolute: function(uri, noHost) {\n\t\t\turi = new URI(uri, {base_uri: this});\n\n\t\t\treturn uri.getURI(noHost && this.isSameOrigin(uri));\n\t\t},\n\n\t\t/**\n\t\t * Determine whether the given URI has the same origin as this URI. Based on RFC-6454.\n\t\t * Supports default ports for protocols listed in DEFAULT_PORTS. Unsupported protocols will fail safe: they\n\t\t * won't match, if the port specifications differ.\n\t\t *\n\t\t * @method isSameOrigin\n\t\t * @param {tinymce.util.URI} uri Uri instance to compare.\n\t\t * @returns {Boolean} True if the origins are the same.\n\t\t */\n\t\tisSameOrigin: function(uri) {\n\t\t\tif (this.host == uri.host && this.protocol == uri.protocol) {\n\t\t\t\tif (this.port == uri.port) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tvar defaultPort = DEFAULT_PORTS[this.protocol];\n\t\t\t\tif (defaultPort && ((this.port || defaultPort) == (uri.port || defaultPort))) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * Converts a absolute path into a relative path.\n\t\t *\n\t\t * @method toRelPath\n\t\t * @param {String} base Base point to convert the path from.\n\t\t * @param {String} path Absolute path to convert into a relative path.\n\t\t */\n\t\ttoRelPath: function(base, path) {\n\t\t\tvar items, breakPoint = 0, out = '', i, l;\n\n\t\t\t// Split the paths\n\t\t\tbase = base.substring(0, base.lastIndexOf('/'));\n\t\t\tbase = base.split('/');\n\t\t\titems = path.split('/');\n\n\t\t\tif (base.length >= items.length) {\n\t\t\t\tfor (i = 0, l = base.length; i < l; i++) {\n\t\t\t\t\tif (i >= items.length || base[i] != items[i]) {\n\t\t\t\t\t\tbreakPoint = i + 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (base.length < items.length) {\n\t\t\t\tfor (i = 0, l = items.length; i < l; i++) {\n\t\t\t\t\tif (i >= base.length || base[i] != items[i]) {\n\t\t\t\t\t\tbreakPoint = i + 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (breakPoint === 1) {\n\t\t\t\treturn path;\n\t\t\t}\n\n\t\t\tfor (i = 0, l = base.length - (breakPoint - 1); i < l; i++) {\n\t\t\t\tout += \"../\";\n\t\t\t}\n\n\t\t\tfor (i = breakPoint - 1, l = items.length; i < l; i++) {\n\t\t\t\tif (i != breakPoint - 1) {\n\t\t\t\t\tout += \"/\" + items[i];\n\t\t\t\t} else {\n\t\t\t\t\tout += items[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn out;\n\t\t},\n\n\t\t/**\n\t\t * Converts a relative path into a absolute path.\n\t\t *\n\t\t * @method toAbsPath\n\t\t * @param {String} base Base point to convert the path from.\n\t\t * @param {String} path Relative path to convert into an absolute path.\n\t\t */\n\t\ttoAbsPath: function(base, path) {\n\t\t\tvar i, nb = 0, o = [], tr, outPath;\n\n\t\t\t// Split paths\n\t\t\ttr = /\\/$/.test(path) ? '/' : '';\n\t\t\tbase = base.split('/');\n\t\t\tpath = path.split('/');\n\n\t\t\t// Remove empty chunks\n\t\t\teach(base, function(k) {\n\t\t\t\tif (k) {\n\t\t\t\t\to.push(k);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tbase = o;\n\n\t\t\t// Merge relURLParts chunks\n\t\t\tfor (i = path.length - 1, o = []; i >= 0; i--) {\n\t\t\t\t// Ignore empty or .\n\t\t\t\tif (path[i].length === 0 || path[i] === \".\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Is parent\n\t\t\t\tif (path[i] === '..') {\n\t\t\t\t\tnb++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Move up\n\t\t\t\tif (nb > 0) {\n\t\t\t\t\tnb--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\to.push(path[i]);\n\t\t\t}\n\n\t\t\ti = base.length - nb;\n\n\t\t\t// If /a/b/c or /\n\t\t\tif (i <= 0) {\n\t\t\t\toutPath = o.reverse().join('/');\n\t\t\t} else {\n\t\t\t\toutPath = base.slice(0, i).join('/') + '/' + o.reverse().join('/');\n\t\t\t}\n\n\t\t\t// Add front / if it's needed\n\t\t\tif (outPath.indexOf('/') !== 0) {\n\t\t\t\toutPath = '/' + outPath;\n\t\t\t}\n\n\t\t\t// Add traling / if it's needed\n\t\t\tif (tr && outPath.lastIndexOf('/') !== outPath.length - 1) {\n\t\t\t\toutPath += tr;\n\t\t\t}\n\n\t\t\treturn outPath;\n\t\t},\n\n\t\t/**\n\t\t * Returns the full URI of the internal structure.\n\t\t *\n\t\t * @method getURI\n\t\t * @param {Boolean} noProtoHost Optional no host and protocol part. Defaults to false.\n\t\t */\n\t\tgetURI: function(noProtoHost) {\n\t\t\tvar s, self = this;\n\n\t\t\t// Rebuild source\n\t\t\tif (!self.source || noProtoHost) {\n\t\t\t\ts = '';\n\n\t\t\t\tif (!noProtoHost) {\n\t\t\t\t\tif (self.protocol) {\n\t\t\t\t\t\ts += self.protocol + '://';\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts += '//';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (self.userInfo) {\n\t\t\t\t\t\ts += self.userInfo + '@';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (self.host) {\n\t\t\t\t\t\ts += self.host;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (self.port) {\n\t\t\t\t\t\ts += ':' + self.port;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (self.path) {\n\t\t\t\t\ts += self.path;\n\t\t\t\t}\n\n\t\t\t\tif (self.query) {\n\t\t\t\t\ts += '?' + self.query;\n\t\t\t\t}\n\n\t\t\t\tif (self.anchor) {\n\t\t\t\t\ts += '#' + self.anchor;\n\t\t\t\t}\n\n\t\t\t\tself.source = s;\n\t\t\t}\n\n\t\t\treturn self.source;\n\t\t}\n\t};\n\n\tURI.parseDataUri = function(uri) {\n\t\tvar type, matches;\n\n\t\turi = decodeURIComponent(uri).split(',');\n\n\t\tmatches = /data:([^;]+)/.exec(uri[0]);\n\t\tif (matches) {\n\t\t\ttype = matches[1];\n\t\t}\n\n\t\treturn {\n\t\t\ttype: type,\n\t\t\tdata: uri[1]\n\t\t};\n\t};\n\n\tURI.getDocumentBaseUrl = function(loc) {\n\t\tvar baseUrl;\n\n\t\t// Pass applewebdata:// and other non web protocols though\n\t\tif (loc.protocol.indexOf('http') !== 0 && loc.protocol !== 'file:') {\n\t\t\tbaseUrl = loc.href;\n\t\t} else {\n\t\t\tbaseUrl = loc.protocol + '//' + loc.host + loc.pathname;\n\t\t}\n\n\t\tif (/^[^:]+:\\/\\/\\/?[^\\/]+\\//.test(baseUrl)) {\n\t\t\tbaseUrl = baseUrl.replace(/[\\?#].*$/, '').replace(/[\\/\\\\][^\\/]+$/, '');\n\n\t\t\tif (!/[\\/\\\\]$/.test(baseUrl)) {\n\t\t\t\tbaseUrl += '/';\n\t\t\t}\n\t\t}\n\n\t\treturn baseUrl;\n\t};\n\n\treturn URI;\n});\n\n// Included from: js/tinymce/classes/util/Class.js\n\n/**\n * Class.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This utilitiy class is used for easier inheritance.\n *\n * Features:\n * * Exposed super functions: this._super();\n * * Mixins\n * * Dummy functions\n * * Property functions: var value = object.value(); and object.value(newValue);\n * * Static functions\n * * Defaults settings\n */\ndefine(\"tinymce/util/Class\", [\n\t\"tinymce/util/Tools\"\n], function(Tools) {\n\tvar each = Tools.each, extend = Tools.extend;\n\n\tvar extendClass, initializing;\n\n\tfunction Class() {\n\t}\n\n\t// Provides classical inheritance, based on code made by John Resig\n\tClass.extend = extendClass = function(prop) {\n\t\tvar self = this, _super = self.prototype, prototype, name, member;\n\n\t\t// The dummy class constructor\n\t\tfunction Class() {\n\t\t\tvar i, mixins, mixin, self = this;\n\n\t\t\t// All construction is actually done in the init method\n\t\t\tif (!initializing) {\n\t\t\t\t// Run class constuctor\n\t\t\t\tif (self.init) {\n\t\t\t\t\tself.init.apply(self, arguments);\n\t\t\t\t}\n\n\t\t\t\t// Run mixin constructors\n\t\t\t\tmixins = self.Mixins;\n\t\t\t\tif (mixins) {\n\t\t\t\t\ti = mixins.length;\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tmixin = mixins[i];\n\t\t\t\t\t\tif (mixin.init) {\n\t\t\t\t\t\t\tmixin.init.apply(self, arguments);\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// Dummy function, needs to be extended in order to provide functionality\n\t\tfunction dummy() {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Creates a overloaded method for the class\n\t\t// this enables you to use this._super(); to call the super function\n\t\tfunction createMethod(name, fn) {\n\t\t\treturn function() {\n\t\t\t\tvar self = this, tmp = self._super, ret;\n\n\t\t\t\tself._super = _super[name];\n\t\t\t\tret = fn.apply(self, arguments);\n\t\t\t\tself._super = tmp;\n\n\t\t\t\treturn ret;\n\t\t\t};\n\t\t}\n\n\t\t// Instantiate a base class (but only create the instance,\n\t\t// don't run the init constructor)\n\t\tinitializing = true;\n\n\t\t/*eslint new-cap:0 */\n\t\tprototype = new self();\n\t\tinitializing = false;\n\n\t\t// Add mixins\n\t\tif (prop.Mixins) {\n\t\t\teach(prop.Mixins, function(mixin) {\n\t\t\t\tfor (var name in mixin) {\n\t\t\t\t\tif (name !== \"init\") {\n\t\t\t\t\t\tprop[name] = mixin[name];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (_super.Mixins) {\n\t\t\t\tprop.Mixins = _super.Mixins.concat(prop.Mixins);\n\t\t\t}\n\t\t}\n\n\t\t// Generate dummy methods\n\t\tif (prop.Methods) {\n\t\t\teach(prop.Methods.split(','), function(name) {\n\t\t\t\tprop[name] = dummy;\n\t\t\t});\n\t\t}\n\n\t\t// Generate property methods\n\t\tif (prop.Properties) {\n\t\t\teach(prop.Properties.split(','), function(name) {\n\t\t\t\tvar fieldName = '_' + name;\n\n\t\t\t\tprop[name] = function(value) {\n\t\t\t\t\tvar self = this, undef;\n\n\t\t\t\t\t// Set value\n\t\t\t\t\tif (value !== undef) {\n\t\t\t\t\t\tself[fieldName] = value;\n\n\t\t\t\t\t\treturn self;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get value\n\t\t\t\t\treturn self[fieldName];\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\n\t\t// Static functions\n\t\tif (prop.Statics) {\n\t\t\teach(prop.Statics, function(func, name) {\n\t\t\t\tClass[name] = func;\n\t\t\t});\n\t\t}\n\n\t\t// Default settings\n\t\tif (prop.Defaults && _super.Defaults) {\n\t\t\tprop.Defaults = extend({}, _super.Defaults, prop.Defaults);\n\t\t}\n\n\t\t// Copy the properties over onto the new prototype\n\t\tfor (name in prop) {\n\t\t\tmember = prop[name];\n\n\t\t\tif (typeof member == \"function\" && _super[name]) {\n\t\t\t\tprototype[name] = createMethod(name, member);\n\t\t\t} else {\n\t\t\t\tprototype[name] = member;\n\t\t\t}\n\t\t}\n\n\t\t// Populate our constructed prototype object\n\t\tClass.prototype = prototype;\n\n\t\t// Enforce the constructor to be what we expect\n\t\tClass.constructor = Class;\n\n\t\t// And make this class extendible\n\t\tClass.extend = extendClass;\n\n\t\treturn Class;\n\t};\n\n\treturn Class;\n});\n\n// Included from: js/tinymce/classes/util/EventDispatcher.js\n\n/**\n * EventDispatcher.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class lets you add/remove and fire events by name on the specified scope. This makes\n * it easy to add event listener logic to any class.\n *\n * @class tinymce.util.EventDispatcher\n * @example\n * var eventDispatcher = new EventDispatcher();\n *\n * eventDispatcher.on('click', function() {console.log('data');});\n * eventDispatcher.fire('click', {data: 123});\n */\ndefine(\"tinymce/util/EventDispatcher\", [\n\t\"tinymce/util/Tools\"\n], function(Tools) {\n\tvar nativeEvents = Tools.makeMap(\n\t\t\"focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange \" +\n\t\t\"mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover \" +\n\t\t\"draggesture dragdrop drop drag submit \" +\n\t\t\"compositionstart compositionend compositionupdate touchstart touchmove touchend\",\n\t\t' '\n\t);\n\n\tfunction Dispatcher(settings) {\n\t\tvar self = this, scope, bindings = {}, toggleEvent;\n\n\t\tfunction returnFalse() {\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction returnTrue() {\n\t\t\treturn true;\n\t\t}\n\n\t\tsettings = settings || {};\n\t\tscope = settings.scope || self;\n\t\ttoggleEvent = settings.toggleEvent || returnFalse;\n\n\t\t/**\n\t\t * Fires the specified event by name.\n\t\t *\n\t\t * @method fire\n\t\t * @param {String} name Name of the event to fire.\n\t\t * @param {Object?} args Event arguments.\n\t\t * @return {Object} Event args instance passed in.\n\t\t * @example\n\t\t * instance.fire('event', {...});\n\t\t */\n\t\tfunction fire(name, args) {\n\t\t\tvar handlers, i, l, callback;\n\n\t\t\tname = name.toLowerCase();\n\t\t\targs = args || {};\n\t\t\targs.type = name;\n\n\t\t\t// Setup target is there isn't one\n\t\t\tif (!args.target) {\n\t\t\t\targs.target = scope;\n\t\t\t}\n\n\t\t\t// Add event delegation methods if they are missing\n\t\t\tif (!args.preventDefault) {\n\t\t\t\t// Add preventDefault method\n\t\t\t\targs.preventDefault = function() {\n\t\t\t\t\targs.isDefaultPrevented = returnTrue;\n\t\t\t\t};\n\n\t\t\t\t// Add stopPropagation\n\t\t\t\targs.stopPropagation = function() {\n\t\t\t\t\targs.isPropagationStopped = returnTrue;\n\t\t\t\t};\n\n\t\t\t\t// Add stopImmediatePropagation\n\t\t\t\targs.stopImmediatePropagation = function() {\n\t\t\t\t\targs.isImmediatePropagationStopped = returnTrue;\n\t\t\t\t};\n\n\t\t\t\t// Add event delegation states\n\t\t\t\targs.isDefaultPrevented = returnFalse;\n\t\t\t\targs.isPropagationStopped = returnFalse;\n\t\t\t\targs.isImmediatePropagationStopped = returnFalse;\n\t\t\t}\n\n\t\t\tif (settings.beforeFire) {\n\t\t\t\tsettings.beforeFire(args);\n\t\t\t}\n\n\t\t\thandlers = bindings[name];\n\t\t\tif (handlers) {\n\t\t\t\tfor (i = 0, l = handlers.length; i < l; i++) {\n\t\t\t\t\tcallback = handlers[i];\n\n\t\t\t\t\t// Unbind handlers marked with \"once\"\n\t\t\t\t\tif (callback.once) {\n\t\t\t\t\t\toff(name, callback.func);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Stop immediate propagation if needed\n\t\t\t\t\tif (args.isImmediatePropagationStopped()) {\n\t\t\t\t\t\targs.stopPropagation();\n\t\t\t\t\t\treturn args;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If callback returns false then prevent default and stop all propagation\n\t\t\t\t\tif (callback.func.call(scope, args) === false) {\n\t\t\t\t\t\targs.preventDefault();\n\t\t\t\t\t\treturn args;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn args;\n\t\t}\n\n\t\t/**\n\t\t * Binds an event listener to a specific event by name.\n\t\t *\n\t\t * @method on\n\t\t * @param {String} name Event name or space separated list of events to bind.\n\t\t * @param {callback} callback Callback to be executed when the event occurs.\n\t\t * @param {Boolean} first Optional flag if the event should be prepended. Use this with care.\n\t\t * @return {Object} Current class instance.\n\t\t * @example\n\t\t * instance.on('event', function(e) {\n\t\t * // Callback logic\n\t\t * });\n\t\t */\n\t\tfunction on(name, callback, prepend, extra) {\n\t\t\tvar handlers, names, i;\n\n\t\t\tif (callback === false) {\n\t\t\t\tcallback = returnFalse;\n\t\t\t}\n\n\t\t\tif (callback) {\n\t\t\t\tcallback = {\n\t\t\t\t\tfunc: callback\n\t\t\t\t};\n\n\t\t\t\tif (extra) {\n\t\t\t\t\tTools.extend(callback, extra);\n\t\t\t\t}\n\n\t\t\t\tnames = name.toLowerCase().split(' ');\n\t\t\t\ti = names.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\tname = names[i];\n\t\t\t\t\thandlers = bindings[name];\n\t\t\t\t\tif (!handlers) {\n\t\t\t\t\t\thandlers = bindings[name] = [];\n\t\t\t\t\t\ttoggleEvent(name, true);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (prepend) {\n\t\t\t\t\t\thandlers.unshift(callback);\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandlers.push(callback);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn self;\n\t\t}\n\n\t\t/**\n\t\t * Unbinds an event listener to a specific event by name.\n\t\t *\n\t\t * @method off\n\t\t * @param {String?} name Name of the event to unbind.\n\t\t * @param {callback?} callback Callback to unbind.\n\t\t * @return {Object} Current class instance.\n\t\t * @example\n\t\t * // Unbind specific callback\n\t\t * instance.off('event', handler);\n\t\t *\n\t\t * // Unbind all listeners by name\n\t\t * instance.off('event');\n\t\t *\n\t\t * // Unbind all events\n\t\t * instance.off();\n\t\t */\n\t\tfunction off(name, callback) {\n\t\t\tvar i, handlers, bindingName, names, hi;\n\n\t\t\tif (name) {\n\t\t\t\tnames = name.toLowerCase().split(' ');\n\t\t\t\ti = names.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\tname = names[i];\n\t\t\t\t\thandlers = bindings[name];\n\n\t\t\t\t\t// Unbind all handlers\n\t\t\t\t\tif (!name) {\n\t\t\t\t\t\tfor (bindingName in bindings) {\n\t\t\t\t\t\t\ttoggleEvent(bindingName, false);\n\t\t\t\t\t\t\tdelete bindings[bindingName];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn self;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (handlers) {\n\t\t\t\t\t\t// Unbind all by name\n\t\t\t\t\t\tif (!callback) {\n\t\t\t\t\t\t\thandlers.length = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Unbind specific ones\n\t\t\t\t\t\t\thi = handlers.length;\n\t\t\t\t\t\t\twhile (hi--) {\n\t\t\t\t\t\t\t\tif (handlers[hi].func === callback) {\n\t\t\t\t\t\t\t\t\thandlers = handlers.slice(0, hi).concat(handlers.slice(hi + 1));\n\t\t\t\t\t\t\t\t\tbindings[name] = handlers;\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\tif (!handlers.length) {\n\t\t\t\t\t\t\ttoggleEvent(name, false);\n\t\t\t\t\t\t\tdelete bindings[name];\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\tfor (name in bindings) {\n\t\t\t\t\ttoggleEvent(name, false);\n\t\t\t\t}\n\n\t\t\t\tbindings = {};\n\t\t\t}\n\n\t\t\treturn self;\n\t\t}\n\n\t\t/**\n\t\t * Binds an event listener to a specific event by name\n\t\t * and automatically unbind the event once the callback fires.\n\t\t *\n\t\t * @method once\n\t\t * @param {String} name Event name or space separated list of events to bind.\n\t\t * @param {callback} callback Callback to be executed when the event occurs.\n\t\t * @param {Boolean} first Optional flag if the event should be prepended. Use this with care.\n\t\t * @return {Object} Current class instance.\n\t\t * @example\n\t\t * instance.once('event', function(e) {\n\t\t * // Callback logic\n\t\t * });\n\t\t */\n\t\tfunction once(name, callback, prepend) {\n\t\t\treturn on(name, callback, prepend, {once: true});\n\t\t}\n\n\t\t/**\n\t\t * Returns true/false if the dispatcher has a event of the specified name.\n\t\t *\n\t\t * @method has\n\t\t * @param {String} name Name of the event to check for.\n\t\t * @return {Boolean} true/false if the event exists or not.\n\t\t */\n\t\tfunction has(name) {\n\t\t\tname = name.toLowerCase();\n\t\t\treturn !(!bindings[name] || bindings[name].length === 0);\n\t\t}\n\n\t\t// Expose\n\t\tself.fire = fire;\n\t\tself.on = on;\n\t\tself.off = off;\n\t\tself.once = once;\n\t\tself.has = has;\n\t}\n\n\t/**\n\t * Returns true/false if the specified event name is a native browser event or not.\n\t *\n\t * @method isNative\n\t * @param {String} name Name to check if it's native.\n\t * @return {Boolean} true/false if the event is native or not.\n\t * @static\n\t */\n\tDispatcher.isNative = function(name) {\n\t\treturn !!nativeEvents[name.toLowerCase()];\n\t};\n\n\treturn Dispatcher;\n});\n\n// Included from: js/tinymce/classes/data/Binding.js\n\n/**\n * Binding.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class gets dynamically extended to provide a binding between two models. This makes it possible to\n * sync the state of two properties in two models by a layer of abstraction.\n *\n * @private\n * @class tinymce.data.Binding\n */\ndefine(\"tinymce/data/Binding\", [], function() {\n\t/**\n\t * Constructs a new bidning.\n\t *\n\t * @constructor\n\t * @method Binding\n\t * @param {Object} settings Settings to the binding.\n\t */\n\tfunction Binding(settings) {\n\t\tthis.create = settings.create;\n\t}\n\n\t/**\n\t * Creates a binding for a property on a model.\n\t *\n\t * @method create\n\t * @param {tinymce.data.ObservableObject} model Model to create binding to.\n\t * @param {String} name Name of property to bind.\n\t * @return {tinymce.data.Binding} Binding instance.\n\t */\n\tBinding.create = function(model, name) {\n\t\treturn new Binding({\n\t\t\tcreate: function(otherModel, otherName) {\n\t\t\t\tvar bindings;\n\n\t\t\t\tfunction fromSelfToOther(e) {\n\t\t\t\t\totherModel.set(otherName, e.value);\n\t\t\t\t}\n\n\t\t\t\tfunction fromOtherToSelf(e) {\n\t\t\t\t\tmodel.set(name, e.value);\n\t\t\t\t}\n\n\t\t\t\totherModel.on('change:' + otherName, fromOtherToSelf);\n\t\t\t\tmodel.on('change:' + name, fromSelfToOther);\n\n\t\t\t\t// Keep track of the bindings\n\t\t\t\tbindings = otherModel._bindings;\n\n\t\t\t\tif (!bindings) {\n\t\t\t\t\tbindings = otherModel._bindings = [];\n\n\t\t\t\t\totherModel.on('destroy', function() {\n\t\t\t\t\t\tvar i = bindings.length;\n\n\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\tbindings[i]();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tbindings.push(function() {\n\t\t\t\t\tmodel.off('change:' + name, fromSelfToOther);\n\t\t\t\t});\n\n\t\t\t\treturn model.get(name);\n\t\t\t}\n\t\t});\n\t};\n\n\treturn Binding;\n});\n\n// Included from: js/tinymce/classes/util/Observable.js\n\n/**\n * Observable.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This mixin will add event binding logic to classes.\n *\n * @mixin tinymce.util.Observable\n */\ndefine(\"tinymce/util/Observable\", [\n\t\"tinymce/util/EventDispatcher\"\n], function(EventDispatcher) {\n\tfunction getEventDispatcher(obj) {\n\t\tif (!obj._eventDispatcher) {\n\t\t\tobj._eventDispatcher = new EventDispatcher({\n\t\t\t\tscope: obj,\n\t\t\t\ttoggleEvent: function(name, state) {\n\t\t\t\t\tif (EventDispatcher.isNative(name) && obj.toggleNativeEvent) {\n\t\t\t\t\t\tobj.toggleNativeEvent(name, state);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn obj._eventDispatcher;\n\t}\n\n\treturn {\n\t\t/**\n\t\t * Fires the specified event by name. Consult the\n\t\t * event reference for more details on each event.\n\t\t *\n\t\t * @method fire\n\t\t * @param {String} name Name of the event to fire.\n\t\t * @param {Object?} args Event arguments.\n\t\t * @param {Boolean?} bubble True/false if the event is to be bubbled.\n\t\t * @return {Object} Event args instance passed in.\n\t\t * @example\n\t\t * instance.fire('event', {...});\n\t\t */\n\t\tfire: function(name, args, bubble) {\n\t\t\tvar self = this;\n\n\t\t\t// Prevent all events except the remove event after the instance has been removed\n\t\t\tif (self.removed && name !== \"remove\") {\n\t\t\t\treturn args;\n\t\t\t}\n\n\t\t\targs = getEventDispatcher(self).fire(name, args, bubble);\n\n\t\t\t// Bubble event up to parents\n\t\t\tif (bubble !== false && self.parent) {\n\t\t\t\tvar parent = self.parent();\n\t\t\t\twhile (parent && !args.isPropagationStopped()) {\n\t\t\t\t\tparent.fire(name, args, false);\n\t\t\t\t\tparent = parent.parent();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn args;\n\t\t},\n\n\t\t/**\n\t\t * Binds an event listener to a specific event by name. Consult the\n\t\t * event reference for more details on each event.\n\t\t *\n\t\t * @method on\n\t\t * @param {String} name Event name or space separated list of events to bind.\n\t\t * @param {callback} callback Callback to be executed when the event occurs.\n\t\t * @param {Boolean} first Optional flag if the event should be prepended. Use this with care.\n\t\t * @return {Object} Current class instance.\n\t\t * @example\n\t\t * instance.on('event', function(e) {\n\t\t * // Callback logic\n\t\t * });\n\t\t */\n\t\ton: function(name, callback, prepend) {\n\t\t\treturn getEventDispatcher(this).on(name, callback, prepend);\n\t\t},\n\n\t\t/**\n\t\t * Unbinds an event listener to a specific event by name. Consult the\n\t\t * event reference for more details on each event.\n\t\t *\n\t\t * @method off\n\t\t * @param {String?} name Name of the event to unbind.\n\t\t * @param {callback?} callback Callback to unbind.\n\t\t * @return {Object} Current class instance.\n\t\t * @example\n\t\t * // Unbind specific callback\n\t\t * instance.off('event', handler);\n\t\t *\n\t\t * // Unbind all listeners by name\n\t\t * instance.off('event');\n\t\t *\n\t\t * // Unbind all events\n\t\t * instance.off();\n\t\t */\n\t\toff: function(name, callback) {\n\t\t\treturn getEventDispatcher(this).off(name, callback);\n\t\t},\n\n\t\t/**\n\t\t * Bind the event callback and once it fires the callback is removed. Consult the\n\t\t * event reference for more details on each event.\n\t\t *\n\t\t * @method once\n\t\t * @param {String} name Name of the event to bind.\n\t\t * @param {callback} callback Callback to bind only once.\n\t\t * @return {Object} Current class instance.\n\t\t */\n\t\tonce: function(name, callback) {\n\t\t\treturn getEventDispatcher(this).once(name, callback);\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the object has a event of the specified name.\n\t\t *\n\t\t * @method hasEventListeners\n\t\t * @param {String} name Name of the event to check for.\n\t\t * @return {Boolean} true/false if the event exists or not.\n\t\t */\n\t\thasEventListeners: function(name) {\n\t\t\treturn getEventDispatcher(this).has(name);\n\t\t}\n\t};\n});\n\n// Included from: js/tinymce/classes/data/ObservableObject.js\n\n/**\n * ObservableObject.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class is a object that is observable when properties changes a change event gets emitted.\n *\n * @private\n * @class tinymce.data.ObservableObject\n */\ndefine(\"tinymce/data/ObservableObject\", [\n\t\"tinymce/data/Binding\",\n\t\"tinymce/util/Observable\",\n\t\"tinymce/util/Class\",\n\t\"tinymce/util/Tools\"\n], function(Binding, Observable, Class, Tools) {\n\tfunction isNode(node) {\n\t\treturn node.nodeType > 0;\n\t}\n\n\t// Todo: Maybe this should be shallow compare since it might be huge object references\n\tfunction isEqual(a, b) {\n\t\tvar k, checked;\n\n\t\t// Strict equals\n\t\tif (a === b) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Compare null\n\t\tif (a === null || b === null) {\n\t\t\treturn a === b;\n\t\t}\n\n\t\t// Compare number, boolean, string, undefined\n\t\tif (typeof a !== \"object\" || typeof b !== \"object\") {\n\t\t\treturn a === b;\n\t\t}\n\n\t\t// Compare arrays\n\t\tif (Tools.isArray(b)) {\n\t\t\tif (a.length !== b.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tk = a.length;\n\t\t\twhile (k--) {\n\t\t\t\tif (!isEqual(a[k], b[k])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Shallow compare nodes\n\t\tif (isNode(a) || isNode(b)) {\n\t\t\treturn a === b;\n\t\t}\n\n\t\t// Compare objects\n\t\tchecked = {};\n\t\tfor (k in b) {\n\t\t\tif (!isEqual(a[k], b[k])) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tchecked[k] = true;\n\t\t}\n\n\t\tfor (k in a) {\n\t\t\tif (!checked[k] && !isEqual(a[k], b[k])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn Class.extend({\n\t\tMixins: [Observable],\n\n\t\t/**\n\t\t * Constructs a new observable object instance.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} data Initial data for the object.\n\t\t */\n\t\tinit: function(data) {\n\t\t\tvar name, value;\n\n\t\t\tdata = data || {};\n\n\t\t\tfor (name in data) {\n\t\t\t\tvalue = data[name];\n\n\t\t\t\tif (value instanceof Binding) {\n\t\t\t\t\tdata[name] = value.create(this, name);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.data = data;\n\t\t},\n\n\t\t/**\n\t\t * Sets a property on the value this will call\n\t\t * observers if the value is a change from the current value.\n\t\t *\n\t\t * @method set\n\t\t * @param {String/object} name Name of the property to set or a object of items to set.\n\t\t * @param {Object} value Value to set for the property.\n\t\t * @return {tinymce.data.ObservableObject} Observable object instance.\n\t\t */\n\t\tset: function(name, value) {\n\t\t\tvar key, args, oldValue = this.data[name];\n\n\t\t\tif (value instanceof Binding) {\n\t\t\t\tvalue = value.create(this, name);\n\t\t\t}\n\n\t\t\tif (typeof name === \"object\") {\n\t\t\t\tfor (key in name) {\n\t\t\t\t\tthis.set(key, name[key]);\n\t\t\t\t}\n\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tif (!isEqual(oldValue, value)) {\n\t\t\t\tthis.data[name] = value;\n\n\t\t\t\targs = {\n\t\t\t\t\ttarget: this,\n\t\t\t\t\tname: name,\n\t\t\t\t\tvalue: value,\n\t\t\t\t\toldValue: oldValue\n\t\t\t\t};\n\n\t\t\t\tthis.fire('change:' + name, args);\n\t\t\t\tthis.fire('change', args);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Gets a property by name.\n\t\t *\n\t\t * @method get\n\t\t * @param {String} name Name of the property to get.\n\t\t * @return {Object} Object value of propery.\n\t\t */\n\t\tget: function(name) {\n\t\t\treturn this.data[name];\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the specified property exists.\n\t\t *\n\t\t * @method has\n\t\t * @param {String} name Name of the property to check for.\n\t\t * @return {Boolean} true/false if the item exists.\n\t\t */\n\t\thas: function(name) {\n\t\t\treturn name in this.data;\n\t\t},\n\n\t\t/**\n\t\t * Returns a dynamic property binding for the specified property name. This makes\n\t\t * it possible to sync the state of two properties in two ObservableObject instances.\n\t\t *\n\t\t * @method bind\n\t\t * @param {String} name Name of the property to sync with the property it's inserted to.\n\t\t * @return {tinymce.data.Binding} Data binding instance.\n\t\t */\n\t\tbind: function(name) {\n\t\t\treturn Binding.create(this, name);\n\t\t},\n\n\t\t/**\n\t\t * Destroys the observable object and fires the \"destroy\"\n\t\t * event and clean up any internal resources.\n\t\t *\n\t\t * @method destroy\n\t\t */\n\t\tdestroy: function() {\n\t\t\tthis.fire('destroy');\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Selector.js\n\n/**\n * Selector.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/*eslint no-nested-ternary:0 */\n\n/**\n * Selector engine, enables you to select controls by using CSS like expressions.\n * We currently only support basic CSS expressions to reduce the size of the core\n * and the ones we support should be enough for most cases.\n *\n * @example\n * Supported expressions:\n * element\n * element#name\n * element.class\n * element[attr]\n * element[attr*=value]\n * element[attr~=value]\n * element[attr!=value]\n * element[attr^=value]\n * element[attr$=value]\n * element:\n * element:not()\n * element:first\n * element:last\n * element:odd\n * element:even\n * element element\n * element > element\n *\n * @class tinymce.ui.Selector\n */\ndefine(\"tinymce/ui/Selector\", [\n\t\"tinymce/util/Class\"\n], function(Class) {\n\t\"use strict\";\n\n\t/**\n\t * Produces an array with a unique set of objects. It will not compare the values\n\t * but the references of the objects.\n\t *\n\t * @private\n\t * @method unqiue\n\t * @param {Array} array Array to make into an array with unique items.\n\t * @return {Array} Array with unique items.\n\t */\n\tfunction unique(array) {\n\t\tvar uniqueItems = [], i = array.length, item;\n\n\t\twhile (i--) {\n\t\t\titem = array[i];\n\n\t\t\tif (!item.__checked) {\n\t\t\t\tuniqueItems.push(item);\n\t\t\t\titem.__checked = 1;\n\t\t\t}\n\t\t}\n\n\t\ti = uniqueItems.length;\n\t\twhile (i--) {\n\t\t\tdelete uniqueItems[i].__checked;\n\t\t}\n\n\t\treturn uniqueItems;\n\t}\n\n\tvar expression = /^([\\w\\\\*]+)?(?:#([\\w\\-\\\\]+))?(?:\\.([\\w\\\\\\.]+))?(?:\\[\\@?([\\w\\\\]+)([\\^\\$\\*!~]?=)([\\w\\\\]+)\\])?(?:\\:(.+))?/i;\n\n\t/*jshint maxlen:255 */\n\t/*eslint max-len:0 */\n\tvar chunker = /((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^\\[\\]]*\\]|['\"][^'\"]*['\"]|[^\\[\\]'\"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g,\n\t\twhiteSpace = /^\\s*|\\s*$/g,\n\t\tCollection;\n\n\tvar Selector = Class.extend({\n\t\t/**\n\t\t * Constructs a new Selector instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method init\n\t\t * @param {String} selector CSS like selector expression.\n\t\t */\n\t\tinit: function(selector) {\n\t\t\tvar match = this.match;\n\n\t\t\tfunction compileNameFilter(name) {\n\t\t\t\tif (name) {\n\t\t\t\t\tname = name.toLowerCase();\n\n\t\t\t\t\treturn function(item) {\n\t\t\t\t\t\treturn name === '*' || item.type === name;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction compileIdFilter(id) {\n\t\t\t\tif (id) {\n\t\t\t\t\treturn function(item) {\n\t\t\t\t\t\treturn item._name === id;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction compileClassesFilter(classes) {\n\t\t\t\tif (classes) {\n\t\t\t\t\tclasses = classes.split('.');\n\n\t\t\t\t\treturn function(item) {\n\t\t\t\t\t\tvar i = classes.length;\n\n\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\tif (!item.classes.contains(classes[i])) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction compileAttrFilter(name, cmp, check) {\n\t\t\t\tif (name) {\n\t\t\t\t\treturn function(item) {\n\t\t\t\t\t\tvar value = item[name] ? item[name]() : '';\n\n\t\t\t\t\t\treturn !cmp ? !!check :\n\t\t\t\t\t\t\tcmp === \"=\" ? value === check :\n\t\t\t\t\t\t\tcmp === \"*=\" ? value.indexOf(check) >= 0 :\n\t\t\t\t\t\t\tcmp === \"~=\" ? (\" \" + value + \" \").indexOf(\" \" + check + \" \") >= 0 :\n\t\t\t\t\t\t\tcmp === \"!=\" ? value != check :\n\t\t\t\t\t\t\tcmp === \"^=\" ? value.indexOf(check) === 0 :\n\t\t\t\t\t\t\tcmp === \"$=\" ? value.substr(value.length - check.length) === check :\n\t\t\t\t\t\t\tfalse;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction compilePsuedoFilter(name) {\n\t\t\t\tvar notSelectors;\n\n\t\t\t\tif (name) {\n\t\t\t\t\tname = /(?:not\\((.+)\\))|(.+)/i.exec(name);\n\n\t\t\t\t\tif (!name[1]) {\n\t\t\t\t\t\tname = name[2];\n\n\t\t\t\t\t\treturn function(item, index, length) {\n\t\t\t\t\t\t\treturn name === 'first' ? index === 0 :\n\t\t\t\t\t\t\t\tname === 'last' ? index === length - 1 :\n\t\t\t\t\t\t\t\tname === 'even' ? index % 2 === 0 :\n\t\t\t\t\t\t\t\tname === 'odd' ? index % 2 === 1 :\n\t\t\t\t\t\t\t\titem[name] ? item[name]() :\n\t\t\t\t\t\t\t\tfalse;\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Compile not expression\n\t\t\t\t\tnotSelectors = parseChunks(name[1], []);\n\n\t\t\t\t\treturn function(item) {\n\t\t\t\t\t\treturn !match(item, notSelectors);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction compile(selector, filters, direct) {\n\t\t\t\tvar parts;\n\n\t\t\t\tfunction add(filter) {\n\t\t\t\t\tif (filter) {\n\t\t\t\t\t\tfilters.push(filter);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Parse expression into parts\n\t\t\t\tparts = expression.exec(selector.replace(whiteSpace, ''));\n\n\t\t\t\tadd(compileNameFilter(parts[1]));\n\t\t\t\tadd(compileIdFilter(parts[2]));\n\t\t\t\tadd(compileClassesFilter(parts[3]));\n\t\t\t\tadd(compileAttrFilter(parts[4], parts[5], parts[6]));\n\t\t\t\tadd(compilePsuedoFilter(parts[7]));\n\n\t\t\t\t// Mark the filter with pseudo for performance\n\t\t\t\tfilters.pseudo = !!parts[7];\n\t\t\t\tfilters.direct = direct;\n\n\t\t\t\treturn filters;\n\t\t\t}\n\n\t\t\t// Parser logic based on Sizzle by John Resig\n\t\t\tfunction parseChunks(selector, selectors) {\n\t\t\t\tvar parts = [], extra, matches, i;\n\n\t\t\t\tdo {\n\t\t\t\t\tchunker.exec(\"\");\n\t\t\t\t\tmatches = chunker.exec(selector);\n\n\t\t\t\t\tif (matches) {\n\t\t\t\t\t\tselector = matches[3];\n\t\t\t\t\t\tparts.push(matches[1]);\n\n\t\t\t\t\t\tif (matches[2]) {\n\t\t\t\t\t\t\textra = matches[3];\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} while (matches);\n\n\t\t\t\tif (extra) {\n\t\t\t\t\tparseChunks(extra, selectors);\n\t\t\t\t}\n\n\t\t\t\tselector = [];\n\t\t\t\tfor (i = 0; i < parts.length; i++) {\n\t\t\t\t\tif (parts[i] != '>') {\n\t\t\t\t\t\tselector.push(compile(parts[i], [], parts[i - 1] === '>'));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tselectors.push(selector);\n\n\t\t\t\treturn selectors;\n\t\t\t}\n\n\t\t\tthis._selectors = parseChunks(selector, []);\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the selector matches the specified control.\n\t\t *\n\t\t * @method match\n\t\t * @param {tinymce.ui.Control} control Control to match against the selector.\n\t\t * @param {Array} selectors Optional array of selectors, mostly used internally.\n\t\t * @return {Boolean} true/false state if the control matches or not.\n\t\t */\n\t\tmatch: function(control, selectors) {\n\t\t\tvar i, l, si, sl, selector, fi, fl, filters, index, length, siblings, count, item;\n\n\t\t\tselectors = selectors || this._selectors;\n\t\t\tfor (i = 0, l = selectors.length; i < l; i++) {\n\t\t\t\tselector = selectors[i];\n\t\t\t\tsl = selector.length;\n\t\t\t\titem = control;\n\t\t\t\tcount = 0;\n\n\t\t\t\tfor (si = sl - 1; si >= 0; si--) {\n\t\t\t\t\tfilters = selector[si];\n\n\t\t\t\t\twhile (item) {\n\t\t\t\t\t\t// Find the index and length since a pseudo filter like :first needs it\n\t\t\t\t\t\tif (filters.pseudo) {\n\t\t\t\t\t\t\tsiblings = item.parent().items();\n\t\t\t\t\t\t\tindex = length = siblings.length;\n\t\t\t\t\t\t\twhile (index--) {\n\t\t\t\t\t\t\t\tif (siblings[index] === item) {\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\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (fi = 0, fl = filters.length; fi < fl; fi++) {\n\t\t\t\t\t\t\tif (!filters[fi](item, index, length)) {\n\t\t\t\t\t\t\t\tfi = fl + 1;\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\n\t\t\t\t\t\tif (fi === fl) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// If it didn't match the right most expression then\n\t\t\t\t\t\t\t// break since it's no point looking at the parents\n\t\t\t\t\t\t\tif (si === sl - 1) {\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\n\t\t\t\t\t\titem = item.parent();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If we found all selectors then return true otherwise continue looking\n\t\t\t\tif (count === sl) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * Returns a tinymce.ui.Collection with matches of the specified selector inside the specified container.\n\t\t *\n\t\t * @method find\n\t\t * @param {tinymce.ui.Control} container Container to look for items in.\n\t\t * @return {tinymce.ui.Collection} Collection with matched elements.\n\t\t */\n\t\tfind: function(container) {\n\t\t\tvar matches = [], i, l, selectors = this._selectors;\n\n\t\t\tfunction collect(items, selector, index) {\n\t\t\t\tvar i, l, fi, fl, item, filters = selector[index];\n\n\t\t\t\tfor (i = 0, l = items.length; i < l; i++) {\n\t\t\t\t\titem = items[i];\n\n\t\t\t\t\t// Run each filter against the item\n\t\t\t\t\tfor (fi = 0, fl = filters.length; fi < fl; fi++) {\n\t\t\t\t\t\tif (!filters[fi](item, i, l)) {\n\t\t\t\t\t\t\tfi = fl + 1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// All filters matched the item\n\t\t\t\t\tif (fi === fl) {\n\t\t\t\t\t\t// Matched item is on the last expression like: panel toolbar [button]\n\t\t\t\t\t\tif (index == selector.length - 1) {\n\t\t\t\t\t\t\tmatches.push(item);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Collect next expression type\n\t\t\t\t\t\t\tif (item.items) {\n\t\t\t\t\t\t\t\tcollect(item.items(), selector, index + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (filters.direct) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Collect child items\n\t\t\t\t\tif (item.items) {\n\t\t\t\t\t\tcollect(item.items(), selector, index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (container.items) {\n\t\t\t\tfor (i = 0, l = selectors.length; i < l; i++) {\n\t\t\t\t\tcollect(container.items(), selectors[i], 0);\n\t\t\t\t}\n\n\t\t\t\t// Unique the matches if needed\n\t\t\t\tif (l > 1) {\n\t\t\t\t\tmatches = unique(matches);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Fix for circular reference\n\t\t\tif (!Collection) {\n\t\t\t\t// TODO: Fix me!\n\t\t\t\tCollection = Selector.Collection;\n\t\t\t}\n\n\t\t\treturn new Collection(matches);\n\t\t}\n\t});\n\n\treturn Selector;\n});\n\n// Included from: js/tinymce/classes/ui/Collection.js\n\n/**\n * Collection.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Control collection, this class contains control instances and it enables you to\n * perform actions on all the contained items. This is very similar to how jQuery works.\n *\n * @example\n * someCollection.show().disabled(true);\n *\n * @class tinymce.ui.Collection\n */\ndefine(\"tinymce/ui/Collection\", [\n\t\"tinymce/util/Tools\",\n\t\"tinymce/ui/Selector\",\n\t\"tinymce/util/Class\"\n], function(Tools, Selector, Class) {\n\t\"use strict\";\n\n\tvar Collection, proto, push = Array.prototype.push, slice = Array.prototype.slice;\n\n\tproto = {\n\t\t/**\n\t\t * Current number of contained control instances.\n\t\t *\n\t\t * @field length\n\t\t * @type Number\n\t\t */\n\t\tlength: 0,\n\n\t\t/**\n\t\t * Constructor for the collection.\n\t\t *\n\t\t * @constructor\n\t\t * @method init\n\t\t * @param {Array} items Optional array with items to add.\n\t\t */\n\t\tinit: function(items) {\n\t\t\tif (items) {\n\t\t\t\tthis.add(items);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Adds new items to the control collection.\n\t\t *\n\t\t * @method add\n\t\t * @param {Array} items Array if items to add to collection.\n\t\t * @return {tinymce.ui.Collection} Current collection instance.\n\t\t */\n\t\tadd: function(items) {\n\t\t\tvar self = this;\n\n\t\t\t// Force single item into array\n\t\t\tif (!Tools.isArray(items)) {\n\t\t\t\tif (items instanceof Collection) {\n\t\t\t\t\tself.add(items.toArray());\n\t\t\t\t} else {\n\t\t\t\t\tpush.call(self, items);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpush.apply(self, items);\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Sets the contents of the collection. This will remove any existing items\n\t\t * and replace them with the ones specified in the input array.\n\t\t *\n\t\t * @method set\n\t\t * @param {Array} items Array with items to set into the Collection.\n\t\t * @return {tinymce.ui.Collection} Collection instance.\n\t\t */\n\t\tset: function(items) {\n\t\t\tvar self = this, len = self.length, i;\n\n\t\t\tself.length = 0;\n\t\t\tself.add(items);\n\n\t\t\t// Remove old entries\n\t\t\tfor (i = self.length; i < len; i++) {\n\t\t\t\tdelete self[i];\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Filters the collection item based on the specified selector expression or selector function.\n\t\t *\n\t\t * @method filter\n\t\t * @param {String} selector Selector expression to filter items by.\n\t\t * @return {tinymce.ui.Collection} Collection containing the filtered items.\n\t\t */\n\t\tfilter: function(selector) {\n\t\t\tvar self = this, i, l, matches = [], item, match;\n\n\t\t\t// Compile string into selector expression\n\t\t\tif (typeof selector === \"string\") {\n\t\t\t\tselector = new Selector(selector);\n\n\t\t\t\tmatch = function(item) {\n\t\t\t\t\treturn selector.match(item);\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Use selector as matching function\n\t\t\t\tmatch = selector;\n\t\t\t}\n\n\t\t\tfor (i = 0, l = self.length; i < l; i++) {\n\t\t\t\titem = self[i];\n\n\t\t\t\tif (match(item)) {\n\t\t\t\t\tmatches.push(item);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new Collection(matches);\n\t\t},\n\n\t\t/**\n\t\t * Slices the items within the collection.\n\t\t *\n\t\t * @method slice\n\t\t * @param {Number} index Index to slice at.\n\t\t * @param {Number} len Optional length to slice.\n\t\t * @return {tinymce.ui.Collection} Current collection.\n\t\t */\n\t\tslice: function() {\n\t\t\treturn new Collection(slice.apply(this, arguments));\n\t\t},\n\n\t\t/**\n\t\t * Makes the current collection equal to the specified index.\n\t\t *\n\t\t * @method eq\n\t\t * @param {Number} index Index of the item to set the collection to.\n\t\t * @return {tinymce.ui.Collection} Current collection.\n\t\t */\n\t\teq: function(index) {\n\t\t\treturn index === -1 ? this.slice(index) : this.slice(index, +index + 1);\n\t\t},\n\n\t\t/**\n\t\t * Executes the specified callback on each item in collection.\n\t\t *\n\t\t * @method each\n\t\t * @param {function} callback Callback to execute for each item in collection.\n\t\t * @return {tinymce.ui.Collection} Current collection instance.\n\t\t */\n\t\teach: function(callback) {\n\t\t\tTools.each(this, callback);\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Returns an JavaScript array object of the contents inside the collection.\n\t\t *\n\t\t * @method toArray\n\t\t * @return {Array} Array with all items from collection.\n\t\t */\n\t\ttoArray: function() {\n\t\t\treturn Tools.toArray(this);\n\t\t},\n\n\t\t/**\n\t\t * Finds the index of the specified control or return -1 if it isn't in the collection.\n\t\t *\n\t\t * @method indexOf\n\t\t * @param {Control} ctrl Control instance to look for.\n\t\t * @return {Number} Index of the specified control or -1.\n\t\t */\n\t\tindexOf: function(ctrl) {\n\t\t\tvar self = this, i = self.length;\n\n\t\t\twhile (i--) {\n\t\t\t\tif (self[i] === ctrl) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn i;\n\t\t},\n\n\t\t/**\n\t\t * Returns a new collection of the contents in reverse order.\n\t\t *\n\t\t * @method reverse\n\t\t * @return {tinymce.ui.Collection} Collection instance with reversed items.\n\t\t */\n\t\treverse: function() {\n\t\t\treturn new Collection(Tools.toArray(this).reverse());\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the class exists or not.\n\t\t *\n\t\t * @method hasClass\n\t\t * @param {String} cls Class to check for.\n\t\t * @return {Boolean} true/false state if the class exists or not.\n\t\t */\n\t\thasClass: function(cls) {\n\t\t\treturn this[0] ? this[0].classes.contains(cls) : false;\n\t\t},\n\n\t\t/**\n\t\t * Sets/gets the specific property on the items in the collection. The same as executing control.();\n\t\t *\n\t\t * @method prop\n\t\t * @param {String} name Property name to get/set.\n\t\t * @param {Object} value Optional object value to set.\n\t\t * @return {tinymce.ui.Collection} Current collection instance or value of the first item on a get operation.\n\t\t */\n\t\tprop: function(name, value) {\n\t\t\tvar self = this, undef, item;\n\n\t\t\tif (value !== undef) {\n\t\t\t\tself.each(function(item) {\n\t\t\t\t\tif (item[name]) {\n\t\t\t\t\t\titem[name](value);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\titem = self[0];\n\n\t\t\tif (item && item[name]) {\n\t\t\t\treturn item[name]();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Executes the specific function name with optional arguments an all items in collection if it exists.\n\t\t *\n\t\t * @example collection.exec(\"myMethod\", arg1, arg2, arg3);\n\t\t * @method exec\n\t\t * @param {String} name Name of the function to execute.\n\t\t * @param {Object} ... Multiple arguments to pass to each function.\n\t\t * @return {tinymce.ui.Collection} Current collection.\n\t\t */\n\t\texec: function(name) {\n\t\t\tvar self = this, args = Tools.toArray(arguments).slice(1);\n\n\t\t\tself.each(function(item) {\n\t\t\t\tif (item[name]) {\n\t\t\t\t\titem[name].apply(item, args);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Remove all items from collection and DOM.\n\t\t *\n\t\t * @method remove\n\t\t * @return {tinymce.ui.Collection} Current collection.\n\t\t */\n\t\tremove: function() {\n\t\t\tvar i = this.length;\n\n\t\t\twhile (i--) {\n\t\t\t\tthis[i].remove();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Adds a class to all items in the collection.\n\t\t *\n\t\t * @method addClass\n\t\t * @param {String} cls Class to add to each item.\n\t\t * @return {tinymce.ui.Collection} Current collection instance.\n\t\t */\n\t\taddClass: function(cls) {\n\t\t\treturn this.each(function(item) {\n\t\t\t\titem.classes.add(cls);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Removes the specified class from all items in collection.\n\t\t *\n\t\t * @method removeClass\n\t\t * @param {String} cls Class to remove from each item.\n\t\t * @return {tinymce.ui.Collection} Current collection instance.\n\t\t */\n\t\tremoveClass: function(cls) {\n\t\t\treturn this.each(function(item) {\n\t\t\t\titem.classes.remove(cls);\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Fires the specified event by name and arguments on the control. This will execute all\n\t\t * bound event handlers.\n\t\t *\n\t\t * @method fire\n\t\t * @param {String} name Name of the event to fire.\n\t\t * @param {Object} args Optional arguments to pass to the event.\n\t\t * @return {tinymce.ui.Collection} Current collection instance.\n\t\t */\n\t\t// fire: function(event, args) {}, -- Generated by code below\n\n\t\t/**\n\t\t * Binds a callback to the specified event. This event can both be\n\t\t * native browser events like \"click\" or custom ones like PostRender.\n\t\t *\n\t\t * The callback function will have two parameters the first one being the control that received the event\n\t\t * the second one will be the event object either the browsers native event object or a custom JS object.\n\t\t *\n\t\t * @method on\n\t\t * @param {String} name Name of the event to bind. For example \"click\".\n\t\t * @param {String/function} callback Callback function to execute ones the event occurs.\n\t\t * @return {tinymce.ui.Collection} Current collection instance.\n\t\t */\n\t\t// on: function(name, callback) {}, -- Generated by code below\n\n\t\t/**\n\t\t * Unbinds the specified event and optionally a specific callback. If you omit the name\n\t\t * parameter all event handlers will be removed. If you omit the callback all event handles\n\t\t * by the specified name will be removed.\n\t\t *\n\t\t * @method off\n\t\t * @param {String} name Optional name for the event to unbind.\n\t\t * @param {function} callback Optional callback function to unbind.\n\t\t * @return {tinymce.ui.Collection} Current collection instance.\n\t\t */\n\t\t// off: function(name, callback) {}, -- Generated by code below\n\n\t\t/**\n\t\t * Shows the items in the current collection.\n\t\t *\n\t\t * @method show\n\t\t * @return {tinymce.ui.Collection} Current collection instance.\n\t\t */\n\t\t// show: function() {}, -- Generated by code below\n\n\t\t/**\n\t\t * Hides the items in the current collection.\n\t\t *\n\t\t * @method hide\n\t\t * @return {tinymce.ui.Collection} Current collection instance.\n\t\t */\n\t\t// hide: function() {}, -- Generated by code below\n\n\t\t/**\n\t\t * Sets/gets the text contents of the items in the current collection.\n\t\t *\n\t\t * @method text\n\t\t * @return {tinymce.ui.Collection} Current collection instance or text value of the first item on a get operation.\n\t\t */\n\t\t// text: function(value) {}, -- Generated by code below\n\n\t\t/**\n\t\t * Sets/gets the name contents of the items in the current collection.\n\t\t *\n\t\t * @method name\n\t\t * @return {tinymce.ui.Collection} Current collection instance or name value of the first item on a get operation.\n\t\t */\n\t\t// name: function(value) {}, -- Generated by code below\n\n\t\t/**\n\t\t * Sets/gets the disabled state on the items in the current collection.\n\t\t *\n\t\t * @method disabled\n\t\t * @return {tinymce.ui.Collection} Current collection instance or disabled state of the first item on a get operation.\n\t\t */\n\t\t// disabled: function(state) {}, -- Generated by code below\n\n\t\t/**\n\t\t * Sets/gets the active state on the items in the current collection.\n\t\t *\n\t\t * @method active\n\t\t * @return {tinymce.ui.Collection} Current collection instance or active state of the first item on a get operation.\n\t\t */\n\t\t// active: function(state) {}, -- Generated by code below\n\n\t\t/**\n\t\t * Sets/gets the selected state on the items in the current collection.\n\t\t *\n\t\t * @method selected\n\t\t * @return {tinymce.ui.Collection} Current collection instance or selected state of the first item on a get operation.\n\t\t */\n\t\t// selected: function(state) {}, -- Generated by code below\n\n\t\t/**\n\t\t * Sets/gets the selected state on the items in the current collection.\n\t\t *\n\t\t * @method visible\n\t\t * @return {tinymce.ui.Collection} Current collection instance or visible state of the first item on a get operation.\n\t\t */\n\t\t// visible: function(state) {}, -- Generated by code below\n\t};\n\n\t// Extend tinymce.ui.Collection prototype with some generated control specific methods\n\tTools.each('fire on off show hide append prepend before after reflow'.split(' '), function(name) {\n\t\tproto[name] = function() {\n\t\t\tvar args = Tools.toArray(arguments);\n\n\t\t\tthis.each(function(ctrl) {\n\t\t\t\tif (name in ctrl) {\n\t\t\t\t\tctrl[name].apply(ctrl, args);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn this;\n\t\t};\n\t});\n\n\t// Extend tinymce.ui.Collection prototype with some property methods\n\tTools.each('text name disabled active selected checked visible parent value data'.split(' '), function(name) {\n\t\tproto[name] = function(value) {\n\t\t\treturn this.prop(name, value);\n\t\t};\n\t});\n\n\t// Create class based on the new prototype\n\tCollection = Class.extend(proto);\n\n\t// Stick Collection into Selector to prevent circual references\n\tSelector.Collection = Collection;\n\n\treturn Collection;\n});\n\n// Included from: js/tinymce/classes/ui/DomUtils.js\n\n/**\n * DomUtils.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Private UI DomUtils proxy.\n *\n * @private\n * @class tinymce.ui.DomUtils\n */\ndefine(\"tinymce/ui/DomUtils\", [\n\t\"tinymce/Env\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/dom/DOMUtils\"\n], function(Env, Tools, DOMUtils) {\n\t\"use strict\";\n\n\tvar count = 0;\n\n\tvar funcs = {\n\t\tid: function() {\n\t\t\treturn 'mceu_' + (count++);\n\t\t},\n\n\t\tcreate: function(name, attrs, children) {\n\t\t\tvar elm = document.createElement(name);\n\n\t\t\tDOMUtils.DOM.setAttribs(elm, attrs);\n\n\t\t\tif (typeof children === 'string') {\n\t\t\t\telm.innerHTML = children;\n\t\t\t} else {\n\t\t\t\tTools.each(children, function(child) {\n\t\t\t\t\tif (child.nodeType) {\n\t\t\t\t\t\telm.appendChild(child);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn elm;\n\t\t},\n\n\t\tcreateFragment: function(html) {\n\t\t\treturn DOMUtils.DOM.createFragment(html);\n\t\t},\n\n\t\tgetWindowSize: function() {\n\t\t\treturn DOMUtils.DOM.getViewPort();\n\t\t},\n\n\t\tgetSize: function(elm) {\n\t\t\tvar width, height;\n\n\t\t\tif (elm.getBoundingClientRect) {\n\t\t\t\tvar rect = elm.getBoundingClientRect();\n\n\t\t\t\twidth = Math.max(rect.width || (rect.right - rect.left), elm.offsetWidth);\n\t\t\t\theight = Math.max(rect.height || (rect.bottom - rect.bottom), elm.offsetHeight);\n\t\t\t} else {\n\t\t\t\twidth = elm.offsetWidth;\n\t\t\t\theight = elm.offsetHeight;\n\t\t\t}\n\n\t\t\treturn {width: width, height: height};\n\t\t},\n\n\t\tgetPos: function(elm, root) {\n\t\t\treturn DOMUtils.DOM.getPos(elm, root || funcs.getContainer());\n\t\t},\n\n\t\tgetContainer: function () {\n\t\t\treturn Env.container ? Env.container : document.body;\n\t\t},\n\n\t\tgetViewPort: function(win) {\n\t\t\treturn DOMUtils.DOM.getViewPort(win);\n\t\t},\n\n\t\tget: function(id) {\n\t\t\treturn document.getElementById(id);\n\t\t},\n\n\t\taddClass: function(elm, cls) {\n\t\t\treturn DOMUtils.DOM.addClass(elm, cls);\n\t\t},\n\n\t\tremoveClass: function(elm, cls) {\n\t\t\treturn DOMUtils.DOM.removeClass(elm, cls);\n\t\t},\n\n\t\thasClass: function(elm, cls) {\n\t\t\treturn DOMUtils.DOM.hasClass(elm, cls);\n\t\t},\n\n\t\ttoggleClass: function(elm, cls, state) {\n\t\t\treturn DOMUtils.DOM.toggleClass(elm, cls, state);\n\t\t},\n\n\t\tcss: function(elm, name, value) {\n\t\t\treturn DOMUtils.DOM.setStyle(elm, name, value);\n\t\t},\n\n\t\tgetRuntimeStyle: function(elm, name) {\n\t\t\treturn DOMUtils.DOM.getStyle(elm, name, true);\n\t\t},\n\n\t\ton: function(target, name, callback, scope) {\n\t\t\treturn DOMUtils.DOM.bind(target, name, callback, scope);\n\t\t},\n\n\t\toff: function(target, name, callback) {\n\t\t\treturn DOMUtils.DOM.unbind(target, name, callback);\n\t\t},\n\n\t\tfire: function(target, name, args) {\n\t\t\treturn DOMUtils.DOM.fire(target, name, args);\n\t\t},\n\n\t\tinnerHtml: function(elm, html) {\n\t\t\t// Workaround for
      in

      bug on IE 8 #6178\n\t\t\tDOMUtils.DOM.setHTML(elm, html);\n\t\t}\n\t};\n\n\treturn funcs;\n});\n\n// Included from: js/tinymce/classes/ui/BoxUtils.js\n\n/**\n * BoxUtils.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Utility class for box parsing and measuring.\n *\n * @private\n * @class tinymce.ui.BoxUtils\n */\ndefine(\"tinymce/ui/BoxUtils\", [\n], function() {\n\t\"use strict\";\n\n\treturn {\n\t\t/**\n\t\t * Parses the specified box value. A box value contains 1-4 properties in clockwise order.\n\t\t *\n\t\t * @method parseBox\n\t\t * @param {String/Number} value Box value \"0 1 2 3\" or \"0\" etc.\n\t\t * @return {Object} Object with top/right/bottom/left properties.\n\t\t * @private\n\t\t */\n\t\tparseBox: function(value) {\n\t\t\tvar len, radix = 10;\n\n\t\t\tif (!value) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (typeof value === \"number\") {\n\t\t\t\tvalue = value || 0;\n\n\t\t\t\treturn {\n\t\t\t\t\ttop: value,\n\t\t\t\t\tleft: value,\n\t\t\t\t\tbottom: value,\n\t\t\t\t\tright: value\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvalue = value.split(' ');\n\t\t\tlen = value.length;\n\n\t\t\tif (len === 1) {\n\t\t\t\tvalue[1] = value[2] = value[3] = value[0];\n\t\t\t} else if (len === 2) {\n\t\t\t\tvalue[2] = value[0];\n\t\t\t\tvalue[3] = value[1];\n\t\t\t} else if (len === 3) {\n\t\t\t\tvalue[3] = value[1];\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttop: parseInt(value[0], radix) || 0,\n\t\t\t\tright: parseInt(value[1], radix) || 0,\n\t\t\t\tbottom: parseInt(value[2], radix) || 0,\n\t\t\t\tleft: parseInt(value[3], radix) || 0\n\t\t\t};\n\t\t},\n\n\t\tmeasureBox: function(elm, prefix) {\n\t\t\tfunction getStyle(name) {\n\t\t\t\tvar defaultView = document.defaultView;\n\n\t\t\t\tif (defaultView) {\n\t\t\t\t\t// Remove camelcase\n\t\t\t\t\tname = name.replace(/[A-Z]/g, function(a) {\n\t\t\t\t\t\treturn '-' + a;\n\t\t\t\t\t});\n\n\t\t\t\t\treturn defaultView.getComputedStyle(elm, null).getPropertyValue(name);\n\t\t\t\t}\n\n\t\t\t\treturn elm.currentStyle[name];\n\t\t\t}\n\n\t\t\tfunction getSide(name) {\n\t\t\t\tvar val = parseFloat(getStyle(name), 10);\n\n\t\t\t\treturn isNaN(val) ? 0 : val;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttop: getSide(prefix + \"TopWidth\"),\n\t\t\t\tright: getSide(prefix + \"RightWidth\"),\n\t\t\t\tbottom: getSide(prefix + \"BottomWidth\"),\n\t\t\t\tleft: getSide(prefix + \"LeftWidth\")\n\t\t\t};\n\t\t}\n\t};\n});\n\n// Included from: js/tinymce/classes/ui/ClassList.js\n\n/**\n * ClassList.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Handles adding and removal of classes.\n *\n * @private\n * @class tinymce.ui.ClassList\n */\ndefine(\"tinymce/ui/ClassList\", [\n\t\"tinymce/util/Tools\"\n], function(Tools) {\n\t\"use strict\";\n\n\tfunction noop() {\n\t}\n\n\t/**\n\t * Constructs a new class list the specified onchange\n\t * callback will be executed when the class list gets modifed.\n\t *\n\t * @constructor ClassList\n\t * @param {function} onchange Onchange callback to be executed.\n\t */\n\tfunction ClassList(onchange) {\n\t\tthis.cls = [];\n\t\tthis.cls._map = {};\n\t\tthis.onchange = onchange || noop;\n\t\tthis.prefix = '';\n\t}\n\n\tTools.extend(ClassList.prototype, {\n\t\t/**\n\t\t * Adds a new class to the class list.\n\t\t *\n\t\t * @method add\n\t\t * @param {String} cls Class to be added.\n\t\t * @return {tinymce.ui.ClassList} Current class list instance.\n\t\t */\n\t\tadd: function(cls) {\n\t\t\tif (cls && !this.contains(cls)) {\n\t\t\t\tthis.cls._map[cls] = true;\n\t\t\t\tthis.cls.push(cls);\n\t\t\t\tthis._change();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Removes the specified class from the class list.\n\t\t *\n\t\t * @method remove\n\t\t * @param {String} cls Class to be removed.\n\t\t * @return {tinymce.ui.ClassList} Current class list instance.\n\t\t */\n\t\tremove: function(cls) {\n\t\t\tif (this.contains(cls)) {\n\t\t\t\tfor (var i = 0; i < this.cls.length; i++) {\n\t\t\t\t\tif (this.cls[i] === cls) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.cls.splice(i, 1);\n\t\t\t\tdelete this.cls._map[cls];\n\t\t\t\tthis._change();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Toggles a class in the class list.\n\t\t *\n\t\t * @method toggle\n\t\t * @param {String} cls Class to be added/removed.\n\t\t * @param {Boolean} state Optional state if it should be added/removed.\n\t\t * @return {tinymce.ui.ClassList} Current class list instance.\n\t\t */\n\t\ttoggle: function(cls, state) {\n\t\t\tvar curState = this.contains(cls);\n\n\t\t\tif (curState !== state) {\n\t\t\t\tif (curState) {\n\t\t\t\t\tthis.remove(cls);\n\t\t\t\t} else {\n\t\t\t\t\tthis.add(cls);\n\t\t\t\t}\n\n\t\t\t\tthis._change();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Returns true if the class list has the specified class.\n\t\t *\n\t\t * @method contains\n\t\t * @param {String} cls Class to look for.\n\t\t * @return {Boolean} true/false if the class exists or not.\n\t\t */\n\t\tcontains: function(cls) {\n\t\t\treturn !!this.cls._map[cls];\n\t\t},\n\n\t\t/**\n\t\t * Returns a space separated list of classes.\n\t\t *\n\t\t * @method toString\n\t\t * @return {String} Space separated list of classes.\n\t\t */\n\n\t\t_change: function() {\n\t\t\tdelete this.clsValue;\n\t\t\tthis.onchange.call(this);\n\t\t}\n\t});\n\n\t// IE 8 compatibility\n\tClassList.prototype.toString = function() {\n\t\tvar value;\n\n\t\tif (this.clsValue) {\n\t\t\treturn this.clsValue;\n\t\t}\n\n\t\tvalue = '';\n\t\tfor (var i = 0; i < this.cls.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tvalue += ' ';\n\t\t\t}\n\n\t\t\tvalue += this.prefix + this.cls[i];\n\t\t}\n\n\t\treturn value;\n\t};\n\n\treturn ClassList;\n});\n\n// Included from: js/tinymce/classes/ui/ReflowQueue.js\n\n/**\n * ReflowQueue.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class will automatically reflow controls on the next animation frame within a few milliseconds on older browsers.\n * If the user manually reflows then the automatic reflow will be cancelled. This class is used internally when various control states\n * changes that triggers a reflow.\n *\n * @class tinymce.ui.ReflowQueue\n * @static\n */\ndefine(\"tinymce/ui/ReflowQueue\", [\n\t\"tinymce/util/Delay\"\n], function(Delay) {\n\tvar dirtyCtrls = {}, animationFrameRequested;\n\n\treturn {\n\t\t/**\n\t\t * Adds a control to the next automatic reflow call. This is the control that had a state\n\t\t * change for example if the control was hidden/shown.\n\t\t *\n\t\t * @method add\n\t\t * @param {tinymce.ui.Control} ctrl Control to add to queue.\n\t\t */\n\t\tadd: function(ctrl) {\n\t\t\tvar parent = ctrl.parent();\n\n\t\t\tif (parent) {\n\t\t\t\tif (!parent._layout || parent._layout.isNative()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (!dirtyCtrls[parent._id]) {\n\t\t\t\t\tdirtyCtrls[parent._id] = parent;\n\t\t\t\t}\n\n\t\t\t\tif (!animationFrameRequested) {\n\t\t\t\t\tanimationFrameRequested = true;\n\n\t\t\t\t\tDelay.requestAnimationFrame(function() {\n\t\t\t\t\t\tvar id, ctrl;\n\n\t\t\t\t\t\tanimationFrameRequested = false;\n\n\t\t\t\t\t\tfor (id in dirtyCtrls) {\n\t\t\t\t\t\t\tctrl = dirtyCtrls[id];\n\n\t\t\t\t\t\t\tif (ctrl.state.get('rendered')) {\n\t\t\t\t\t\t\t\tctrl.reflow();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdirtyCtrls = {};\n\t\t\t\t\t}, document.body);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Removes the specified control from the automatic reflow. This will happen when for example the user\n\t\t * manually triggers a reflow.\n\t\t *\n\t\t * @method remove\n\t\t * @param {tinymce.ui.Control} ctrl Control to remove from queue.\n\t\t */\n\t\tremove: function(ctrl) {\n\t\t\tif (dirtyCtrls[ctrl._id]) {\n\t\t\t\tdelete dirtyCtrls[ctrl._id];\n\t\t\t}\n\t\t}\n\t};\n});\n\n// Included from: js/tinymce/classes/ui/Control.js\n\n/**\n * Control.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/*eslint consistent-this:0 */\n\n/**\n * This is the base class for all controls and containers. All UI control instances inherit\n * from this one as it has the base logic needed by all of them.\n *\n * @class tinymce.ui.Control\n */\ndefine(\"tinymce/ui/Control\", [\n\t\"tinymce/util/Class\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/util/EventDispatcher\",\n\t\"tinymce/data/ObservableObject\",\n\t\"tinymce/ui/Collection\",\n\t\"tinymce/ui/DomUtils\",\n\t\"tinymce/dom/DomQuery\",\n\t\"tinymce/ui/BoxUtils\",\n\t\"tinymce/ui/ClassList\",\n\t\"tinymce/ui/ReflowQueue\"\n], function(Class, Tools, EventDispatcher, ObservableObject, Collection, DomUtils, $, BoxUtils, ClassList, ReflowQueue) {\n\t\"use strict\";\n\n\tvar hasMouseWheelEventSupport = \"onmousewheel\" in document;\n\tvar hasWheelEventSupport = false;\n\tvar classPrefix = \"mce-\";\n\tvar Control, idCounter = 0;\n\n\tvar proto = {\n\t\tStatics: {\n\t\t\tclassPrefix: classPrefix\n\t\t},\n\n\t\tisRtl: function() {\n\t\t\treturn Control.rtl;\n\t\t},\n\n\t\t/**\n\t\t * Class/id prefix to use for all controls.\n\t\t *\n\t\t * @final\n\t\t * @field {String} classPrefix\n\t\t */\n\t\tclassPrefix: classPrefix,\n\n\t\t/**\n\t\t * Constructs a new control instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {String} style Style CSS properties to add.\n\t\t * @setting {String} border Border box values example: 1 1 1 1\n\t\t * @setting {String} padding Padding box values example: 1 1 1 1\n\t\t * @setting {String} margin Margin box values example: 1 1 1 1\n\t\t * @setting {Number} minWidth Minimal width for the control.\n\t\t * @setting {Number} minHeight Minimal height for the control.\n\t\t * @setting {String} classes Space separated list of classes to add.\n\t\t * @setting {String} role WAI-ARIA role to use for control.\n\t\t * @setting {Boolean} hidden Is the control hidden by default.\n\t\t * @setting {Boolean} disabled Is the control disabled by default.\n\t\t * @setting {String} name Name of the control instance.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this, classes, defaultClasses;\n\n\t\t\tfunction applyClasses(classes) {\n\t\t\t\tvar i;\n\n\t\t\t\tclasses = classes.split(' ');\n\t\t\t\tfor (i = 0; i < classes.length; i++) {\n\t\t\t\t\tself.classes.add(classes[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tself.settings = settings = Tools.extend({}, self.Defaults, settings);\n\n\t\t\t// Initial states\n\t\t\tself._id = settings.id || ('mceu_' + (idCounter++));\n\t\t\tself._aria = {role: settings.role};\n\t\t\tself._elmCache = {};\n\t\t\tself.$ = $;\n\n\t\t\tself.state = new ObservableObject({\n\t\t\t\tvisible: true,\n\t\t\t\tactive: false,\n\t\t\t\tdisabled: false,\n\t\t\t\tvalue: ''\n\t\t\t});\n\n\t\t\tself.data = new ObservableObject(settings.data);\n\n\t\t\tself.classes = new ClassList(function() {\n\t\t\t\tif (self.state.get('rendered')) {\n\t\t\t\t\tself.getEl().className = this.toString();\n\t\t\t\t}\n\t\t\t});\n\t\t\tself.classes.prefix = self.classPrefix;\n\n\t\t\t// Setup classes\n\t\t\tclasses = settings.classes;\n\t\t\tif (classes) {\n\t\t\t\tif (self.Defaults) {\n\t\t\t\t\tdefaultClasses = self.Defaults.classes;\n\n\t\t\t\t\tif (defaultClasses && classes != defaultClasses) {\n\t\t\t\t\t\tapplyClasses(defaultClasses);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tapplyClasses(classes);\n\t\t\t}\n\n\t\t\tTools.each('title text name visible disabled active value'.split(' '), function(name) {\n\t\t\t\tif (name in settings) {\n\t\t\t\t\tself[name](settings[name]);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.on('click', function() {\n\t\t\t\tif (self.disabled()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t/**\n\t\t\t * Name/value object with settings for the current control.\n\t\t\t *\n\t\t\t * @field {Object} settings\n\t\t\t */\n\t\t\tself.settings = settings;\n\n\t\t\tself.borderBox = BoxUtils.parseBox(settings.border);\n\t\t\tself.paddingBox = BoxUtils.parseBox(settings.padding);\n\t\t\tself.marginBox = BoxUtils.parseBox(settings.margin);\n\n\t\t\tif (settings.hidden) {\n\t\t\t\tself.hide();\n\t\t\t}\n\t\t},\n\n\t\t// Will generate getter/setter methods for these properties\n\t\tProperties: 'parent,name',\n\n\t\t/**\n\t\t * Returns the root element to render controls into.\n\t\t *\n\t\t * @method getContainerElm\n\t\t * @return {Element} HTML DOM element to render into.\n\t\t */\n\t\tgetContainerElm: function() {\n\t\t\treturn DomUtils.getContainer();\n\t\t},\n\n\t\t/**\n\t\t * Returns a control instance for the current DOM element.\n\t\t *\n\t\t * @method getParentCtrl\n\t\t * @param {Element} elm HTML dom element to get parent control from.\n\t\t * @return {tinymce.ui.Control} Control instance or undefined.\n\t\t */\n\t\tgetParentCtrl: function(elm) {\n\t\t\tvar ctrl, lookup = this.getRoot().controlIdLookup;\n\n\t\t\twhile (elm && lookup) {\n\t\t\t\tctrl = lookup[elm.id];\n\t\t\t\tif (ctrl) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\telm = elm.parentNode;\n\t\t\t}\n\n\t\t\treturn ctrl;\n\t\t},\n\n\t\t/**\n\t\t * Initializes the current controls layout rect.\n\t\t * This will be executed by the layout managers to determine the\n\t\t * default minWidth/minHeight etc.\n\t\t *\n\t\t * @method initLayoutRect\n\t\t * @return {Object} Layout rect instance.\n\t\t */\n\t\tinitLayoutRect: function() {\n\t\t\tvar self = this, settings = self.settings, borderBox, layoutRect;\n\t\t\tvar elm = self.getEl(), width, height, minWidth, minHeight, autoResize;\n\t\t\tvar startMinWidth, startMinHeight, initialSize;\n\n\t\t\t// Measure the current element\n\t\t\tborderBox = self.borderBox = self.borderBox || BoxUtils.measureBox(elm, 'border');\n\t\t\tself.paddingBox = self.paddingBox || BoxUtils.measureBox(elm, 'padding');\n\t\t\tself.marginBox = self.marginBox || BoxUtils.measureBox(elm, 'margin');\n\t\t\tinitialSize = DomUtils.getSize(elm);\n\n\t\t\t// Setup minWidth/minHeight and width/height\n\t\t\tstartMinWidth = settings.minWidth;\n\t\t\tstartMinHeight = settings.minHeight;\n\t\t\tminWidth = startMinWidth || initialSize.width;\n\t\t\tminHeight = startMinHeight || initialSize.height;\n\t\t\twidth = settings.width;\n\t\t\theight = settings.height;\n\t\t\tautoResize = settings.autoResize;\n\t\t\tautoResize = typeof autoResize != \"undefined\" ? autoResize : !width && !height;\n\n\t\t\twidth = width || minWidth;\n\t\t\theight = height || minHeight;\n\n\t\t\tvar deltaW = borderBox.left + borderBox.right;\n\t\t\tvar deltaH = borderBox.top + borderBox.bottom;\n\n\t\t\tvar maxW = settings.maxWidth || 0xFFFF;\n\t\t\tvar maxH = settings.maxHeight || 0xFFFF;\n\n\t\t\t// Setup initial layout rect\n\t\t\tself._layoutRect = layoutRect = {\n\t\t\t\tx: settings.x || 0,\n\t\t\t\ty: settings.y || 0,\n\t\t\t\tw: width,\n\t\t\t\th: height,\n\t\t\t\tdeltaW: deltaW,\n\t\t\t\tdeltaH: deltaH,\n\t\t\t\tcontentW: width - deltaW,\n\t\t\t\tcontentH: height - deltaH,\n\t\t\t\tinnerW: width - deltaW,\n\t\t\t\tinnerH: height - deltaH,\n\t\t\t\tstartMinWidth: startMinWidth || 0,\n\t\t\t\tstartMinHeight: startMinHeight || 0,\n\t\t\t\tminW: Math.min(minWidth, maxW),\n\t\t\t\tminH: Math.min(minHeight, maxH),\n\t\t\t\tmaxW: maxW,\n\t\t\t\tmaxH: maxH,\n\t\t\t\tautoResize: autoResize,\n\t\t\t\tscrollW: 0\n\t\t\t};\n\n\t\t\tself._lastLayoutRect = {};\n\n\t\t\treturn layoutRect;\n\t\t},\n\n\t\t/**\n\t\t * Getter/setter for the current layout rect.\n\t\t *\n\t\t * @method layoutRect\n\t\t * @param {Object} [newRect] Optional new layout rect.\n\t\t * @return {tinymce.ui.Control/Object} Current control or rect object.\n\t\t */\n\t\tlayoutRect: function(newRect) {\n\t\t\tvar self = this, curRect = self._layoutRect, lastLayoutRect, size, deltaWidth, deltaHeight, undef, repaintControls;\n\n\t\t\t// Initialize default layout rect\n\t\t\tif (!curRect) {\n\t\t\t\tcurRect = self.initLayoutRect();\n\t\t\t}\n\n\t\t\t// Set new rect values\n\t\t\tif (newRect) {\n\t\t\t\t// Calc deltas between inner and outer sizes\n\t\t\t\tdeltaWidth = curRect.deltaW;\n\t\t\t\tdeltaHeight = curRect.deltaH;\n\n\t\t\t\t// Set x position\n\t\t\t\tif (newRect.x !== undef) {\n\t\t\t\t\tcurRect.x = newRect.x;\n\t\t\t\t}\n\n\t\t\t\t// Set y position\n\t\t\t\tif (newRect.y !== undef) {\n\t\t\t\t\tcurRect.y = newRect.y;\n\t\t\t\t}\n\n\t\t\t\t// Set minW\n\t\t\t\tif (newRect.minW !== undef) {\n\t\t\t\t\tcurRect.minW = newRect.minW;\n\t\t\t\t}\n\n\t\t\t\t// Set minH\n\t\t\t\tif (newRect.minH !== undef) {\n\t\t\t\t\tcurRect.minH = newRect.minH;\n\t\t\t\t}\n\n\t\t\t\t// Set new width and calculate inner width\n\t\t\t\tsize = newRect.w;\n\t\t\t\tif (size !== undef) {\n\t\t\t\t\tsize = size < curRect.minW ? curRect.minW : size;\n\t\t\t\t\tsize = size > curRect.maxW ? curRect.maxW : size;\n\t\t\t\t\tcurRect.w = size;\n\t\t\t\t\tcurRect.innerW = size - deltaWidth;\n\t\t\t\t}\n\n\t\t\t\t// Set new height and calculate inner height\n\t\t\t\tsize = newRect.h;\n\t\t\t\tif (size !== undef) {\n\t\t\t\t\tsize = size < curRect.minH ? curRect.minH : size;\n\t\t\t\t\tsize = size > curRect.maxH ? curRect.maxH : size;\n\t\t\t\t\tcurRect.h = size;\n\t\t\t\t\tcurRect.innerH = size - deltaHeight;\n\t\t\t\t}\n\n\t\t\t\t// Set new inner width and calculate width\n\t\t\t\tsize = newRect.innerW;\n\t\t\t\tif (size !== undef) {\n\t\t\t\t\tsize = size < curRect.minW - deltaWidth ? curRect.minW - deltaWidth : size;\n\t\t\t\t\tsize = size > curRect.maxW - deltaWidth ? curRect.maxW - deltaWidth : size;\n\t\t\t\t\tcurRect.innerW = size;\n\t\t\t\t\tcurRect.w = size + deltaWidth;\n\t\t\t\t}\n\n\t\t\t\t// Set new height and calculate inner height\n\t\t\t\tsize = newRect.innerH;\n\t\t\t\tif (size !== undef) {\n\t\t\t\t\tsize = size < curRect.minH - deltaHeight ? curRect.minH - deltaHeight : size;\n\t\t\t\t\tsize = size > curRect.maxH - deltaHeight ? curRect.maxH - deltaHeight : size;\n\t\t\t\t\tcurRect.innerH = size;\n\t\t\t\t\tcurRect.h = size + deltaHeight;\n\t\t\t\t}\n\n\t\t\t\t// Set new contentW\n\t\t\t\tif (newRect.contentW !== undef) {\n\t\t\t\t\tcurRect.contentW = newRect.contentW;\n\t\t\t\t}\n\n\t\t\t\t// Set new contentH\n\t\t\t\tif (newRect.contentH !== undef) {\n\t\t\t\t\tcurRect.contentH = newRect.contentH;\n\t\t\t\t}\n\n\t\t\t\t// Compare last layout rect with the current one to see if we need to repaint or not\n\t\t\t\tlastLayoutRect = self._lastLayoutRect;\n\t\t\t\tif (lastLayoutRect.x !== curRect.x || lastLayoutRect.y !== curRect.y ||\n\t\t\t\t\tlastLayoutRect.w !== curRect.w || lastLayoutRect.h !== curRect.h) {\n\t\t\t\t\trepaintControls = Control.repaintControls;\n\n\t\t\t\t\tif (repaintControls) {\n\t\t\t\t\t\tif (repaintControls.map && !repaintControls.map[self._id]) {\n\t\t\t\t\t\t\trepaintControls.push(self);\n\t\t\t\t\t\t\trepaintControls.map[self._id] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlastLayoutRect.x = curRect.x;\n\t\t\t\t\tlastLayoutRect.y = curRect.y;\n\t\t\t\t\tlastLayoutRect.w = curRect.w;\n\t\t\t\t\tlastLayoutRect.h = curRect.h;\n\t\t\t\t}\n\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\treturn curRect;\n\t\t},\n\n\t\t/**\n\t\t * Repaints the control after a layout operation.\n\t\t *\n\t\t * @method repaint\n\t\t */\n\t\trepaint: function() {\n\t\t\tvar self = this, style, bodyStyle, bodyElm, rect, borderBox;\n\t\t\tvar borderW, borderH, lastRepaintRect, round, value;\n\n\t\t\t// Use Math.round on all values on IE < 9\n\t\t\tround = !document.createRange ? Math.round : function(value) {\n\t\t\t\treturn value;\n\t\t\t};\n\n\t\t\tstyle = self.getEl().style;\n\t\t\trect = self._layoutRect;\n\t\t\tlastRepaintRect = self._lastRepaintRect || {};\n\n\t\t\tborderBox = self.borderBox;\n\t\t\tborderW = borderBox.left + borderBox.right;\n\t\t\tborderH = borderBox.top + borderBox.bottom;\n\n\t\t\tif (rect.x !== lastRepaintRect.x) {\n\t\t\t\tstyle.left = round(rect.x) + 'px';\n\t\t\t\tlastRepaintRect.x = rect.x;\n\t\t\t}\n\n\t\t\tif (rect.y !== lastRepaintRect.y) {\n\t\t\t\tstyle.top = round(rect.y) + 'px';\n\t\t\t\tlastRepaintRect.y = rect.y;\n\t\t\t}\n\n\t\t\tif (rect.w !== lastRepaintRect.w) {\n\t\t\t\tvalue = round(rect.w - borderW);\n\t\t\t\tstyle.width = (value >= 0 ? value : 0) + 'px';\n\t\t\t\tlastRepaintRect.w = rect.w;\n\t\t\t}\n\n\t\t\tif (rect.h !== lastRepaintRect.h) {\n\t\t\t\tvalue = round(rect.h - borderH);\n\t\t\t\tstyle.height = (value >= 0 ? value : 0) + 'px';\n\t\t\t\tlastRepaintRect.h = rect.h;\n\t\t\t}\n\n\t\t\t// Update body if needed\n\t\t\tif (self._hasBody && rect.innerW !== lastRepaintRect.innerW) {\n\t\t\t\tvalue = round(rect.innerW);\n\n\t\t\t\tbodyElm = self.getEl('body');\n\t\t\t\tif (bodyElm) {\n\t\t\t\t\tbodyStyle = bodyElm.style;\n\t\t\t\t\tbodyStyle.width = (value >= 0 ? value : 0) + 'px';\n\t\t\t\t}\n\n\t\t\t\tlastRepaintRect.innerW = rect.innerW;\n\t\t\t}\n\n\t\t\tif (self._hasBody && rect.innerH !== lastRepaintRect.innerH) {\n\t\t\t\tvalue = round(rect.innerH);\n\n\t\t\t\tbodyElm = bodyElm || self.getEl('body');\n\t\t\t\tif (bodyElm) {\n\t\t\t\t\tbodyStyle = bodyStyle || bodyElm.style;\n\t\t\t\t\tbodyStyle.height = (value >= 0 ? value : 0) + 'px';\n\t\t\t\t}\n\n\t\t\t\tlastRepaintRect.innerH = rect.innerH;\n\t\t\t}\n\n\t\t\tself._lastRepaintRect = lastRepaintRect;\n\t\t\tself.fire('repaint', {}, false);\n\t\t},\n\n\t\t/**\n\t\t * Updates the controls layout rect by re-measuing it.\n\t\t */\n\t\tupdateLayoutRect: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.parent()._lastRect = null;\n\n\t\t\tDomUtils.css(self.getEl(), {width: '', height: ''});\n\n\t\t\tself._layoutRect = self._lastRepaintRect = self._lastLayoutRect = null;\n\t\t\tself.initLayoutRect();\n\t\t},\n\n\t\t/**\n\t\t * Binds a callback to the specified event. This event can both be\n\t\t * native browser events like \"click\" or custom ones like PostRender.\n\t\t *\n\t\t * The callback function will be passed a DOM event like object that enables yout do stop propagation.\n\t\t *\n\t\t * @method on\n\t\t * @param {String} name Name of the event to bind. For example \"click\".\n\t\t * @param {String/function} callback Callback function to execute ones the event occurs.\n\t\t * @return {tinymce.ui.Control} Current control object.\n\t\t */\n\t\ton: function(name, callback) {\n\t\t\tvar self = this;\n\n\t\t\tfunction resolveCallbackName(name) {\n\t\t\t\tvar callback, scope;\n\n\t\t\t\tif (typeof name != 'string') {\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\n\t\t\t\treturn function(e) {\n\t\t\t\t\tif (!callback) {\n\t\t\t\t\t\tself.parentsAndSelf().each(function(ctrl) {\n\t\t\t\t\t\t\tvar callbacks = ctrl.settings.callbacks;\n\n\t\t\t\t\t\t\tif (callbacks && (callback = callbacks[name])) {\n\t\t\t\t\t\t\t\tscope = ctrl;\n\t\t\t\t\t\t\t\treturn false;\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\tif (!callback) {\n\t\t\t\t\t\te.action = name;\n\t\t\t\t\t\tthis.fire('execute', e);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn callback.call(scope, e);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tgetEventDispatcher(self).on(name, resolveCallbackName(callback));\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Unbinds the specified event and optionally a specific callback. If you omit the name\n\t\t * parameter all event handlers will be removed. If you omit the callback all event handles\n\t\t * by the specified name will be removed.\n\t\t *\n\t\t * @method off\n\t\t * @param {String} [name] Name for the event to unbind.\n\t\t * @param {function} [callback] Callback function to unbind.\n\t\t * @return {tinymce.ui.Control} Current control object.\n\t\t */\n\t\toff: function(name, callback) {\n\t\t\tgetEventDispatcher(this).off(name, callback);\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Fires the specified event by name and arguments on the control. This will execute all\n\t\t * bound event handlers.\n\t\t *\n\t\t * @method fire\n\t\t * @param {String} name Name of the event to fire.\n\t\t * @param {Object} [args] Arguments to pass to the event.\n\t\t * @param {Boolean} [bubble] Value to control bubbling. Defaults to true.\n\t\t * @return {Object} Current arguments object.\n\t\t */\n\t\tfire: function(name, args, bubble) {\n\t\t\tvar self = this;\n\n\t\t\targs = args || {};\n\n\t\t\tif (!args.control) {\n\t\t\t\targs.control = self;\n\t\t\t}\n\n\t\t\targs = getEventDispatcher(self).fire(name, args);\n\n\t\t\t// Bubble event up to parents\n\t\t\tif (bubble !== false && self.parent) {\n\t\t\t\tvar parent = self.parent();\n\t\t\t\twhile (parent && !args.isPropagationStopped()) {\n\t\t\t\t\tparent.fire(name, args, false);\n\t\t\t\t\tparent = parent.parent();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn args;\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the specified event has any listeners.\n\t\t *\n\t\t * @method hasEventListeners\n\t\t * @param {String} name Name of the event to check for.\n\t\t * @return {Boolean} True/false state if the event has listeners.\n\t\t */\n\t\thasEventListeners: function(name) {\n\t\t\treturn getEventDispatcher(this).has(name);\n\t\t},\n\n\t\t/**\n\t\t * Returns a control collection with all parent controls.\n\t\t *\n\t\t * @method parents\n\t\t * @param {String} selector Optional selector expression to find parents.\n\t\t * @return {tinymce.ui.Collection} Collection with all parent controls.\n\t\t */\n\t\tparents: function(selector) {\n\t\t\tvar self = this, ctrl, parents = new Collection();\n\n\t\t\t// Add each parent to collection\n\t\t\tfor (ctrl = self.parent(); ctrl; ctrl = ctrl.parent()) {\n\t\t\t\tparents.add(ctrl);\n\t\t\t}\n\n\t\t\t// Filter away everything that doesn't match the selector\n\t\t\tif (selector) {\n\t\t\t\tparents = parents.filter(selector);\n\t\t\t}\n\n\t\t\treturn parents;\n\t\t},\n\n\t\t/**\n\t\t * Returns the current control and it's parents.\n\t\t *\n\t\t * @method parentsAndSelf\n\t\t * @param {String} selector Optional selector expression to find parents.\n\t\t * @return {tinymce.ui.Collection} Collection with all parent controls.\n\t\t */\n\t\tparentsAndSelf: function(selector) {\n\t\t\treturn new Collection(this).add(this.parents(selector));\n\t\t},\n\n\t\t/**\n\t\t * Returns the control next to the current control.\n\t\t *\n\t\t * @method next\n\t\t * @return {tinymce.ui.Control} Next control instance.\n\t\t */\n\t\tnext: function() {\n\t\t\tvar parentControls = this.parent().items();\n\n\t\t\treturn parentControls[parentControls.indexOf(this) + 1];\n\t\t},\n\n\t\t/**\n\t\t * Returns the control previous to the current control.\n\t\t *\n\t\t * @method prev\n\t\t * @return {tinymce.ui.Control} Previous control instance.\n\t\t */\n\t\tprev: function() {\n\t\t\tvar parentControls = this.parent().items();\n\n\t\t\treturn parentControls[parentControls.indexOf(this) - 1];\n\t\t},\n\n\t\t/**\n\t\t * Sets the inner HTML of the control element.\n\t\t *\n\t\t * @method innerHtml\n\t\t * @param {String} html Html string to set as inner html.\n\t\t * @return {tinymce.ui.Control} Current control object.\n\t\t */\n\t\tinnerHtml: function(html) {\n\t\t\tthis.$el.html(html);\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Returns the control DOM element or sub element.\n\t\t *\n\t\t * @method getEl\n\t\t * @param {String} [suffix] Suffix to get element by.\n\t\t * @return {Element} HTML DOM element for the current control or it's children.\n\t\t */\n\t\tgetEl: function(suffix) {\n\t\t\tvar id = suffix ? this._id + '-' + suffix : this._id;\n\n\t\t\tif (!this._elmCache[id]) {\n\t\t\t\tthis._elmCache[id] = $('#' + id)[0];\n\t\t\t}\n\n\t\t\treturn this._elmCache[id];\n\t\t},\n\n\t\t/**\n\t\t * Sets the visible state to true.\n\t\t *\n\t\t * @method show\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tshow: function() {\n\t\t\treturn this.visible(true);\n\t\t},\n\n\t\t/**\n\t\t * Sets the visible state to false.\n\t\t *\n\t\t * @method hide\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\thide: function() {\n\t\t\treturn this.visible(false);\n\t\t},\n\n\t\t/**\n\t\t * Focuses the current control.\n\t\t *\n\t\t * @method focus\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tfocus: function() {\n\t\t\ttry {\n\t\t\t\tthis.getEl().focus();\n\t\t\t} catch (ex) {\n\t\t\t\t// Ignore IE error\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Blurs the current control.\n\t\t *\n\t\t * @method blur\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tblur: function() {\n\t\t\tthis.getEl().blur();\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Sets the specified aria property.\n\t\t *\n\t\t * @method aria\n\t\t * @param {String} name Name of the aria property to set.\n\t\t * @param {String} value Value of the aria property.\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\taria: function(name, value) {\n\t\t\tvar self = this, elm = self.getEl(self.ariaTarget);\n\n\t\t\tif (typeof value === \"undefined\") {\n\t\t\t\treturn self._aria[name];\n\t\t\t}\n\n\t\t\tself._aria[name] = value;\n\n\t\t\tif (self.state.get('rendered')) {\n\t\t\t\telm.setAttribute(name == 'role' ? name : 'aria-' + name, value);\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Encodes the specified string with HTML entities. It will also\n\t\t * translate the string to different languages.\n\t\t *\n\t\t * @method encode\n\t\t * @param {String/Object/Array} text Text to entity encode.\n\t\t * @param {Boolean} [translate=true] False if the contents shouldn't be translated.\n\t\t * @return {String} Encoded and possible traslated string.\n\t\t */\n\t\tencode: function(text, translate) {\n\t\t\tif (translate !== false) {\n\t\t\t\ttext = this.translate(text);\n\t\t\t}\n\n\t\t\treturn (text || '').replace(/[&<>\"]/g, function(match) {\n\t\t\t\treturn '&#' + match.charCodeAt(0) + ';';\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Returns the translated string.\n\t\t *\n\t\t * @method translate\n\t\t * @param {String} text Text to translate.\n\t\t * @return {String} Translated string or the same as the input.\n\t\t */\n\t\ttranslate: function(text) {\n\t\t\treturn Control.translate ? Control.translate(text) : text;\n\t\t},\n\n\t\t/**\n\t\t * Adds items before the current control.\n\t\t *\n\t\t * @method before\n\t\t * @param {Array/tinymce.ui.Collection} items Array of items to prepend before this control.\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tbefore: function(items) {\n\t\t\tvar self = this, parent = self.parent();\n\n\t\t\tif (parent) {\n\t\t\t\tparent.insert(items, parent.items().indexOf(self), true);\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Adds items after the current control.\n\t\t *\n\t\t * @method after\n\t\t * @param {Array/tinymce.ui.Collection} items Array of items to append after this control.\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tafter: function(items) {\n\t\t\tvar self = this, parent = self.parent();\n\n\t\t\tif (parent) {\n\t\t\t\tparent.insert(items, parent.items().indexOf(self));\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Removes the current control from DOM and from UI collections.\n\t\t *\n\t\t * @method remove\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tremove: function() {\n\t\t\tvar self = this, elm = self.getEl(), parent = self.parent(), newItems, i;\n\n\t\t\tif (self.items) {\n\t\t\t\tvar controls = self.items().toArray();\n\t\t\t\ti = controls.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\tcontrols[i].remove();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (parent && parent.items) {\n\t\t\t\tnewItems = [];\n\n\t\t\t\tparent.items().each(function(item) {\n\t\t\t\t\tif (item !== self) {\n\t\t\t\t\t\tnewItems.push(item);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tparent.items().set(newItems);\n\t\t\t\tparent._lastRect = null;\n\t\t\t}\n\n\t\t\tif (self._eventsRoot && self._eventsRoot == self) {\n\t\t\t\t$(elm).off();\n\t\t\t}\n\n\t\t\tvar lookup = self.getRoot().controlIdLookup;\n\t\t\tif (lookup) {\n\t\t\t\tdelete lookup[self._id];\n\t\t\t}\n\n\t\t\tif (elm && elm.parentNode) {\n\t\t\t\telm.parentNode.removeChild(elm);\n\t\t\t}\n\n\t\t\tself.state.set('rendered', false);\n\t\t\tself.state.destroy();\n\n\t\t\tself.fire('remove');\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Renders the control before the specified element.\n\t\t *\n\t\t * @method renderBefore\n\t\t * @param {Element} elm Element to render before.\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\trenderBefore: function(elm) {\n\t\t\t$(elm).before(this.renderHtml());\n\t\t\tthis.postRender();\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Renders the control to the specified element.\n\t\t *\n\t\t * @method renderBefore\n\t\t * @param {Element} elm Element to render to.\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\trenderTo: function(elm) {\n\t\t\t$(elm || this.getContainerElm()).append(this.renderHtml());\n\t\t\tthis.postRender();\n\t\t\treturn this;\n\t\t},\n\n\t\tpreRender: function() {\n\t\t},\n\n\t\trender: function() {\n\t\t},\n\n\t\trenderHtml: function() {\n\t\t\treturn '

      ';\n\t\t},\n\n\t\t/**\n\t\t * Post render method. Called after the control has been rendered to the target.\n\t\t *\n\t\t * @method postRender\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this, settings = self.settings, elm, box, parent, name, parentEventsRoot;\n\n\t\t\tself.$el = $(self.getEl());\n\t\t\tself.state.set('rendered', true);\n\n\t\t\t// Bind on settings\n\t\t\tfor (name in settings) {\n\t\t\t\tif (name.indexOf(\"on\") === 0) {\n\t\t\t\t\tself.on(name.substr(2), settings[name]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (self._eventsRoot) {\n\t\t\t\tfor (parent = self.parent(); !parentEventsRoot && parent; parent = parent.parent()) {\n\t\t\t\t\tparentEventsRoot = parent._eventsRoot;\n\t\t\t\t}\n\n\t\t\t\tif (parentEventsRoot) {\n\t\t\t\t\tfor (name in parentEventsRoot._nativeEvents) {\n\t\t\t\t\t\tself._nativeEvents[name] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbindPendingEvents(self);\n\n\t\t\tif (settings.style) {\n\t\t\t\telm = self.getEl();\n\t\t\t\tif (elm) {\n\t\t\t\t\telm.setAttribute('style', settings.style);\n\t\t\t\t\telm.style.cssText = settings.style;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (self.settings.border) {\n\t\t\t\tbox = self.borderBox;\n\t\t\t\tself.$el.css({\n\t\t\t\t\t'border-top-width': box.top,\n\t\t\t\t\t'border-right-width': box.right,\n\t\t\t\t\t'border-bottom-width': box.bottom,\n\t\t\t\t\t'border-left-width': box.left\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Add instance to lookup\n\t\t\tvar root = self.getRoot();\n\t\t\tif (!root.controlIdLookup) {\n\t\t\t\troot.controlIdLookup = {};\n\t\t\t}\n\n\t\t\troot.controlIdLookup[self._id] = self;\n\n\t\t\tfor (var key in self._aria) {\n\t\t\t\tself.aria(key, self._aria[key]);\n\t\t\t}\n\n\t\t\tif (self.state.get('visible') === false) {\n\t\t\t\tself.getEl().style.display = 'none';\n\t\t\t}\n\n\t\t\tself.bindStates();\n\n\t\t\tself.state.on('change:visible', function(e) {\n\t\t\t\tvar state = e.value, parentCtrl;\n\n\t\t\t\tif (self.state.get('rendered')) {\n\t\t\t\t\tself.getEl().style.display = state === false ? 'none' : '';\n\n\t\t\t\t\t// Need to force a reflow here on IE 8\n\t\t\t\t\tself.getEl().getBoundingClientRect();\n\t\t\t\t}\n\n\t\t\t\t// Parent container needs to reflow\n\t\t\t\tparentCtrl = self.parent();\n\t\t\t\tif (parentCtrl) {\n\t\t\t\t\tparentCtrl._lastRect = null;\n\t\t\t\t}\n\n\t\t\t\tself.fire(state ? 'show' : 'hide');\n\n\t\t\t\tReflowQueue.add(self);\n\t\t\t});\n\n\t\t\tself.fire('postrender', {}, false);\n\t\t},\n\n\t\tbindStates: function() {\n\t\t},\n\n\t\t/**\n\t\t * Scrolls the current control into view.\n\t\t *\n\t\t * @method scrollIntoView\n\t\t * @param {String} align Alignment in view top|center|bottom.\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tscrollIntoView: function(align) {\n\t\t\tfunction getOffset(elm, rootElm) {\n\t\t\t\tvar x, y, parent = elm;\n\n\t\t\t\tx = y = 0;\n\t\t\t\twhile (parent && parent != rootElm && parent.nodeType) {\n\t\t\t\t\tx += parent.offsetLeft || 0;\n\t\t\t\t\ty += parent.offsetTop || 0;\n\t\t\t\t\tparent = parent.offsetParent;\n\t\t\t\t}\n\n\t\t\t\treturn {x: x, y: y};\n\t\t\t}\n\n\t\t\tvar elm = this.getEl(), parentElm = elm.parentNode;\n\t\t\tvar x, y, width, height, parentWidth, parentHeight;\n\t\t\tvar pos = getOffset(elm, parentElm);\n\n\t\t\tx = pos.x;\n\t\t\ty = pos.y;\n\t\t\twidth = elm.offsetWidth;\n\t\t\theight = elm.offsetHeight;\n\t\t\tparentWidth = parentElm.clientWidth;\n\t\t\tparentHeight = parentElm.clientHeight;\n\n\t\t\tif (align == \"end\") {\n\t\t\t\tx -= parentWidth - width;\n\t\t\t\ty -= parentHeight - height;\n\t\t\t} else if (align == \"center\") {\n\t\t\t\tx -= (parentWidth / 2) - (width / 2);\n\t\t\t\ty -= (parentHeight / 2) - (height / 2);\n\t\t\t}\n\n\t\t\tparentElm.scrollLeft = x;\n\t\t\tparentElm.scrollTop = y;\n\n\t\t\treturn this;\n\t\t},\n\n\t\tgetRoot: function() {\n\t\t\tvar ctrl = this, rootControl, parents = [];\n\n\t\t\twhile (ctrl) {\n\t\t\t\tif (ctrl.rootControl) {\n\t\t\t\t\trootControl = ctrl.rootControl;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tparents.push(ctrl);\n\t\t\t\trootControl = ctrl;\n\t\t\t\tctrl = ctrl.parent();\n\t\t\t}\n\n\t\t\tif (!rootControl) {\n\t\t\t\trootControl = this;\n\t\t\t}\n\n\t\t\tvar i = parents.length;\n\t\t\twhile (i--) {\n\t\t\t\tparents[i].rootControl = rootControl;\n\t\t\t}\n\n\t\t\treturn rootControl;\n\t\t},\n\n\t\t/**\n\t\t * Reflows the current control and it's parents.\n\t\t * This should be used after you for example append children to the current control so\n\t\t * that the layout managers know that they need to reposition everything.\n\t\t *\n\t\t * @example\n\t\t * container.append({type: 'button', text: 'My button'}).reflow();\n\t\t *\n\t\t * @method reflow\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\treflow: function() {\n\t\t\tReflowQueue.remove(this);\n\n\t\t\tvar parent = this.parent();\n\t\t\tif (parent._layout && !parent._layout.isNative()) {\n\t\t\t\tparent.reflow();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\n\t\t/**\n\t\t * Sets/gets the parent container for the control.\n\t\t *\n\t\t * @method parent\n\t\t * @param {tinymce.ui.Container} parent Optional parent to set.\n\t\t * @return {tinymce.ui.Control} Parent control or the current control on a set action.\n\t\t */\n\t\t// parent: function(parent) {} -- Generated\n\n\t\t/**\n\t\t * Sets/gets the text for the control.\n\t\t *\n\t\t * @method text\n\t\t * @param {String} value Value to set to control.\n\t\t * @return {String/tinymce.ui.Control} Current control on a set operation or current value on a get.\n\t\t */\n\t\t// text: function(value) {} -- Generated\n\n\t\t/**\n\t\t * Sets/gets the disabled state on the control.\n\t\t *\n\t\t * @method disabled\n\t\t * @param {Boolean} state Value to set to control.\n\t\t * @return {Boolean/tinymce.ui.Control} Current control on a set operation or current state on a get.\n\t\t */\n\t\t// disabled: function(state) {} -- Generated\n\n\t\t/**\n\t\t * Sets/gets the active for the control.\n\t\t *\n\t\t * @method active\n\t\t * @param {Boolean} state Value to set to control.\n\t\t * @return {Boolean/tinymce.ui.Control} Current control on a set operation or current state on a get.\n\t\t */\n\t\t// active: function(state) {} -- Generated\n\n\t\t/**\n\t\t * Sets/gets the name for the control.\n\t\t *\n\t\t * @method name\n\t\t * @param {String} value Value to set to control.\n\t\t * @return {String/tinymce.ui.Control} Current control on a set operation or current value on a get.\n\t\t */\n\t\t// name: function(value) {} -- Generated\n\n\t\t/**\n\t\t * Sets/gets the title for the control.\n\t\t *\n\t\t * @method title\n\t\t * @param {String} value Value to set to control.\n\t\t * @return {String/tinymce.ui.Control} Current control on a set operation or current value on a get.\n\t\t */\n\t\t// title: function(value) {} -- Generated\n\n\t\t/**\n\t\t * Sets/gets the visible for the control.\n\t\t *\n\t\t * @method visible\n\t\t * @param {Boolean} state Value to set to control.\n\t\t * @return {Boolean/tinymce.ui.Control} Current control on a set operation or current state on a get.\n\t\t */\n\t\t// visible: function(value) {} -- Generated\n\t};\n\n\t/**\n\t * Setup state properties.\n\t */\n\tTools.each('text title visible disabled active value'.split(' '), function(name) {\n\t\tproto[name] = function(value) {\n\t\t\tif (arguments.length === 0) {\n\t\t\t\treturn this.state.get(name);\n\t\t\t}\n\n\t\t\tif (typeof value != \"undefined\") {\n\t\t\t\tthis.state.set(name, value);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\t});\n\n\tControl = Class.extend(proto);\n\n\tfunction getEventDispatcher(obj) {\n\t\tif (!obj._eventDispatcher) {\n\t\t\tobj._eventDispatcher = new EventDispatcher({\n\t\t\t\tscope: obj,\n\t\t\t\ttoggleEvent: function(name, state) {\n\t\t\t\t\tif (state && EventDispatcher.isNative(name)) {\n\t\t\t\t\t\tif (!obj._nativeEvents) {\n\t\t\t\t\t\t\tobj._nativeEvents = {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tobj._nativeEvents[name] = true;\n\n\t\t\t\t\t\tif (obj.state.get('rendered')) {\n\t\t\t\t\t\t\tbindPendingEvents(obj);\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\treturn obj._eventDispatcher;\n\t}\n\n\tfunction bindPendingEvents(eventCtrl) {\n\t\tvar i, l, parents, eventRootCtrl, nativeEvents, name;\n\n\t\tfunction delegate(e) {\n\t\t\tvar control = eventCtrl.getParentCtrl(e.target);\n\n\t\t\tif (control) {\n\t\t\t\tcontrol.fire(e.type, e);\n\t\t\t}\n\t\t}\n\n\t\tfunction mouseLeaveHandler() {\n\t\t\tvar ctrl = eventRootCtrl._lastHoverCtrl;\n\n\t\t\tif (ctrl) {\n\t\t\t\tctrl.fire(\"mouseleave\", {target: ctrl.getEl()});\n\n\t\t\t\tctrl.parents().each(function(ctrl) {\n\t\t\t\t\tctrl.fire(\"mouseleave\", {target: ctrl.getEl()});\n\t\t\t\t});\n\n\t\t\t\teventRootCtrl._lastHoverCtrl = null;\n\t\t\t}\n\t\t}\n\n\t\tfunction mouseEnterHandler(e) {\n\t\t\tvar ctrl = eventCtrl.getParentCtrl(e.target), lastCtrl = eventRootCtrl._lastHoverCtrl, idx = 0, i, parents, lastParents;\n\n\t\t\t// Over on a new control\n\t\t\tif (ctrl !== lastCtrl) {\n\t\t\t\teventRootCtrl._lastHoverCtrl = ctrl;\n\n\t\t\t\tparents = ctrl.parents().toArray().reverse();\n\t\t\t\tparents.push(ctrl);\n\n\t\t\t\tif (lastCtrl) {\n\t\t\t\t\tlastParents = lastCtrl.parents().toArray().reverse();\n\t\t\t\t\tlastParents.push(lastCtrl);\n\n\t\t\t\t\tfor (idx = 0; idx < lastParents.length; idx++) {\n\t\t\t\t\t\tif (parents[idx] !== lastParents[idx]) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (i = lastParents.length - 1; i >= idx; i--) {\n\t\t\t\t\t\tlastCtrl = lastParents[i];\n\t\t\t\t\t\tlastCtrl.fire(\"mouseleave\", {\n\t\t\t\t\t\t\ttarget: lastCtrl.getEl()\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (i = idx; i < parents.length; i++) {\n\t\t\t\t\tctrl = parents[i];\n\t\t\t\t\tctrl.fire(\"mouseenter\", {\n\t\t\t\t\t\ttarget: ctrl.getEl()\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction fixWheelEvent(e) {\n\t\t\te.preventDefault();\n\n\t\t\tif (e.type == \"mousewheel\") {\n\t\t\t\te.deltaY = -1 / 40 * e.wheelDelta;\n\n\t\t\t\tif (e.wheelDeltaX) {\n\t\t\t\t\te.deltaX = -1 / 40 * e.wheelDeltaX;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\te.deltaX = 0;\n\t\t\t\te.deltaY = e.detail;\n\t\t\t}\n\n\t\t\te = eventCtrl.fire(\"wheel\", e);\n\t\t}\n\n\t\tnativeEvents = eventCtrl._nativeEvents;\n\t\tif (nativeEvents) {\n\t\t\t// Find event root element if it exists\n\t\t\tparents = eventCtrl.parents().toArray();\n\t\t\tparents.unshift(eventCtrl);\n\t\t\tfor (i = 0, l = parents.length; !eventRootCtrl && i < l; i++) {\n\t\t\t\teventRootCtrl = parents[i]._eventsRoot;\n\t\t\t}\n\n\t\t\t// Event root wasn't found the use the root control\n\t\t\tif (!eventRootCtrl) {\n\t\t\t\teventRootCtrl = parents[parents.length - 1] || eventCtrl;\n\t\t\t}\n\n\t\t\t// Set the eventsRoot property on children that didn't have it\n\t\t\teventCtrl._eventsRoot = eventRootCtrl;\n\t\t\tfor (l = i, i = 0; i < l; i++) {\n\t\t\t\tparents[i]._eventsRoot = eventRootCtrl;\n\t\t\t}\n\n\t\t\tvar eventRootDelegates = eventRootCtrl._delegates;\n\t\t\tif (!eventRootDelegates) {\n\t\t\t\teventRootDelegates = eventRootCtrl._delegates = {};\n\t\t\t}\n\n\t\t\t// Bind native event delegates\n\t\t\tfor (name in nativeEvents) {\n\t\t\t\tif (!nativeEvents) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (name === \"wheel\" && !hasWheelEventSupport) {\n\t\t\t\t\tif (hasMouseWheelEventSupport) {\n\t\t\t\t\t\t$(eventCtrl.getEl()).on(\"mousewheel\", fixWheelEvent);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$(eventCtrl.getEl()).on(\"DOMMouseScroll\", fixWheelEvent);\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Special treatment for mousenter/mouseleave since these doesn't bubble\n\t\t\t\tif (name === \"mouseenter\" || name === \"mouseleave\") {\n\t\t\t\t\t// Fake mousenter/mouseleave\n\t\t\t\t\tif (!eventRootCtrl._hasMouseEnter) {\n\t\t\t\t\t\t$(eventRootCtrl.getEl()).on(\"mouseleave\", mouseLeaveHandler).on(\"mouseover\", mouseEnterHandler);\n\t\t\t\t\t\teventRootCtrl._hasMouseEnter = 1;\n\t\t\t\t\t}\n\t\t\t\t} else if (!eventRootDelegates[name]) {\n\t\t\t\t\t$(eventRootCtrl.getEl()).on(name, delegate);\n\t\t\t\t\teventRootDelegates[name] = true;\n\t\t\t\t}\n\n\t\t\t\t// Remove the event once it's bound\n\t\t\t\tnativeEvents[name] = false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn Control;\n});\n\n// Included from: js/tinymce/classes/ui/Factory.js\n\n/**\n * Factory.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/*global tinymce:true */\n\n/**\n * This class is a factory for control instances. This enables you\n * to create instances of controls without having to require the UI controls directly.\n *\n * It also allow you to override or add new control types.\n *\n * @class tinymce.ui.Factory\n */\ndefine(\"tinymce/ui/Factory\", [], function() {\n\t\"use strict\";\n\n\tvar types = {}, namespaceInit;\n\n\treturn {\n\t\t/**\n\t\t * Adds a new control instance type to the factory.\n\t\t *\n\t\t * @method add\n\t\t * @param {String} type Type name for example \"button\".\n\t\t * @param {function} typeClass Class type function.\n\t\t */\n\t\tadd: function(type, typeClass) {\n\t\t\ttypes[type.toLowerCase()] = typeClass;\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the specified type exists or not.\n\t\t *\n\t\t * @method has\n\t\t * @param {String} type Type to look for.\n\t\t * @return {Boolean} true/false if the control by name exists.\n\t\t */\n\t\thas: function(type) {\n\t\t\treturn !!types[type.toLowerCase()];\n\t\t},\n\n\t\t/**\n\t\t * Creates a new control instance based on the settings provided. The instance created will be\n\t\t * based on the specified type property it can also create whole structures of components out of\n\t\t * the specified JSON object.\n\t\t *\n\t\t * @example\n\t\t * tinymce.ui.Factory.create({\n\t\t * type: 'button',\n\t\t * text: 'Hello world!'\n\t\t * });\n\t\t *\n\t\t * @method create\n\t\t * @param {Object/String} settings Name/Value object with items used to create the type.\n\t\t * @return {tinymce.ui.Control} Control instance based on the specified type.\n\t\t */\n\t\tcreate: function(type, settings) {\n\t\t\tvar ControlType, name, namespace;\n\n\t\t\t// Build type lookup\n\t\t\tif (!namespaceInit) {\n\t\t\t\tnamespace = tinymce.ui;\n\n\t\t\t\tfor (name in namespace) {\n\t\t\t\t\ttypes[name.toLowerCase()] = namespace[name];\n\t\t\t\t}\n\n\t\t\t\tnamespaceInit = true;\n\t\t\t}\n\n\t\t\t// If string is specified then use it as the type\n\t\t\tif (typeof type == 'string') {\n\t\t\t\tsettings = settings || {};\n\t\t\t\tsettings.type = type;\n\t\t\t} else {\n\t\t\t\tsettings = type;\n\t\t\t\ttype = settings.type;\n\t\t\t}\n\n\t\t\t// Find control type\n\t\t\ttype = type.toLowerCase();\n\t\t\tControlType = types[type];\n\n\t\t\t// #if debug\n\n\t\t\tif (!ControlType) {\n\t\t\t\tthrow new Error(\"Could not find control by type: \" + type);\n\t\t\t}\n\n\t\t\t// #endif\n\n\t\t\tControlType = new ControlType(settings);\n\t\t\tControlType.type = type; // Set the type on the instance, this will be used by the Selector engine\n\n\t\t\treturn ControlType;\n\t\t}\n\t};\n});\n\n// Included from: js/tinymce/classes/ui/KeyboardNavigation.js\n\n/**\n * KeyboardNavigation.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class handles keyboard navigation of controls and elements.\n *\n * @class tinymce.ui.KeyboardNavigation\n */\ndefine(\"tinymce/ui/KeyboardNavigation\", [\n], function() {\n\t\"use strict\";\n\n\t/**\n\t * This class handles all keyboard navigation for WAI-ARIA support. Each root container\n\t * gets an instance of this class.\n\t *\n\t * @constructor\n\t */\n\treturn function(settings) {\n\t\tvar root = settings.root, focusedElement, focusedControl;\n\n\t\tfunction isElement(node) {\n\t\t\treturn node && node.nodeType === 1;\n\t\t}\n\n\t\ttry {\n\t\t\tfocusedElement = document.activeElement;\n\t\t} catch (ex) {\n\t\t\t// IE sometimes fails to return a proper element\n\t\t\tfocusedElement = document.body;\n\t\t}\n\n\t\tfocusedControl = root.getParentCtrl(focusedElement);\n\n\t\t/**\n\t\t * Returns the currently focused elements wai aria role of the currently\n\t\t * focused element or specified element.\n\t\t *\n\t\t * @private\n\t\t * @param {Element} elm Optional element to get role from.\n\t\t * @return {String} Role of specified element.\n\t\t */\n\t\tfunction getRole(elm) {\n\t\t\telm = elm || focusedElement;\n\n\t\t\tif (isElement(elm)) {\n\t\t\t\treturn elm.getAttribute('role');\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n\t\t * Returns the wai role of the parent element of the currently\n\t\t * focused element or specified element.\n\t\t *\n\t\t * @private\n\t\t * @param {Element} elm Optional element to get parent role from.\n\t\t * @return {String} Role of the first parent that has a role.\n\t\t */\n\t\tfunction getParentRole(elm) {\n\t\t\tvar role, parent = elm || focusedElement;\n\n\t\t\twhile ((parent = parent.parentNode)) {\n\t\t\t\tif ((role = getRole(parent))) {\n\t\t\t\t\treturn role;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Returns a wai aria property by name for example aria-selected.\n\t\t *\n\t\t * @private\n\t\t * @param {String} name Name of the aria property to get for example \"disabled\".\n\t\t * @return {String} Aria property value.\n\t\t */\n\t\tfunction getAriaProp(name) {\n\t\t\tvar elm = focusedElement;\n\n\t\t\tif (isElement(elm)) {\n\t\t\t\treturn elm.getAttribute('aria-' + name);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Is the element a text input element or not.\n\t\t *\n\t\t * @private\n\t\t * @param {Element} elm Element to check if it's an text input element or not.\n\t\t * @return {Boolean} True/false if the element is a text element or not.\n\t\t */\n\t\tfunction isTextInputElement(elm) {\n\t\t\tvar tagName = elm.tagName.toUpperCase();\n\n\t\t\t// Notice: since type can be \"email\" etc we don't check the type\n\t\t\t// So all input elements gets treated as text input elements\n\t\t\treturn tagName == \"INPUT\" || tagName == \"TEXTAREA\" || tagName == \"SELECT\";\n\t\t}\n\n\t\t/**\n\t\t * Returns true/false if the specified element can be focused or not.\n\t\t *\n\t\t * @private\n\t\t * @param {Element} elm DOM element to check if it can be focused or not.\n\t\t * @return {Boolean} True/false if the element can have focus.\n\t\t */\n\t\tfunction canFocus(elm) {\n\t\t\tif (isTextInputElement(elm) && !elm.hidden) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(getRole(elm))) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Returns an array of focusable visible elements within the specified container element.\n\t\t *\n\t\t * @private\n\t\t * @param {Element} elm DOM element to find focusable elements within.\n\t\t * @return {Array} Array of focusable elements.\n\t\t */\n\t\tfunction getFocusElements(elm) {\n\t\t\tvar elements = [];\n\n\t\t\tfunction collect(elm) {\n\t\t\t\tif (elm.nodeType != 1 || elm.style.display == 'none' || elm.disabled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (canFocus(elm)) {\n\t\t\t\t\telements.push(elm);\n\t\t\t\t}\n\n\t\t\t\tfor (var i = 0; i < elm.childNodes.length; i++) {\n\t\t\t\t\tcollect(elm.childNodes[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcollect(elm || root.getEl());\n\n\t\t\treturn elements;\n\t\t}\n\n\t\t/**\n\t\t * Returns the navigation root control for the specified control. The navigation root\n\t\t * is the control that the keyboard navigation gets scoped to for example a menubar or toolbar group.\n\t\t * It will look for parents of the specified target control or the currently focused control if this option is omitted.\n\t\t *\n\t\t * @private\n\t\t * @param {tinymce.ui.Control} targetControl Optional target control to find root of.\n\t\t * @return {tinymce.ui.Control} Navigation root control.\n\t\t */\n\t\tfunction getNavigationRoot(targetControl) {\n\t\t\tvar navigationRoot, controls;\n\n\t\t\ttargetControl = targetControl || focusedControl;\n\t\t\tcontrols = targetControl.parents().toArray();\n\t\t\tcontrols.unshift(targetControl);\n\n\t\t\tfor (var i = 0; i < controls.length; i++) {\n\t\t\t\tnavigationRoot = controls[i];\n\n\t\t\t\tif (navigationRoot.settings.ariaRoot) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn navigationRoot;\n\t\t}\n\n\t\t/**\n\t\t * Focuses the first item in the specified targetControl element or the last aria index if the\n\t\t * navigation root has the ariaRemember option enabled.\n\t\t *\n\t\t * @private\n\t\t * @param {tinymce.ui.Control} targetControl Target control to focus the first item in.\n\t\t */\n\t\tfunction focusFirst(targetControl) {\n\t\t\tvar navigationRoot = getNavigationRoot(targetControl);\n\t\t\tvar focusElements = getFocusElements(navigationRoot.getEl());\n\n\t\t\tif (navigationRoot.settings.ariaRemember && \"lastAriaIndex\" in navigationRoot) {\n\t\t\t\tmoveFocusToIndex(navigationRoot.lastAriaIndex, focusElements);\n\t\t\t} else {\n\t\t\t\tmoveFocusToIndex(0, focusElements);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Moves the focus to the specified index within the elements list.\n\t\t * This will scope the index to the size of the element list if it changed.\n\t\t *\n\t\t * @private\n\t\t * @param {Number} idx Specified index to move to.\n\t\t * @param {Array} elements Array with dom elements to move focus within.\n\t\t * @return {Number} Input index or a changed index if it was out of range.\n\t\t */\n\t\tfunction moveFocusToIndex(idx, elements) {\n\t\t\tif (idx < 0) {\n\t\t\t\tidx = elements.length - 1;\n\t\t\t} else if (idx >= elements.length) {\n\t\t\t\tidx = 0;\n\t\t\t}\n\n\t\t\tif (elements[idx]) {\n\t\t\t\telements[idx].focus();\n\t\t\t}\n\n\t\t\treturn idx;\n\t\t}\n\n\t\t/**\n\t\t * Moves the focus forwards or backwards.\n\t\t *\n\t\t * @private\n\t\t * @param {Number} dir Direction to move in positive means forward, negative means backwards.\n\t\t * @param {Array} elements Optional array of elements to move within defaults to the current navigation roots elements.\n\t\t */\n\t\tfunction moveFocus(dir, elements) {\n\t\t\tvar idx = -1, navigationRoot = getNavigationRoot();\n\n\t\t\telements = elements || getFocusElements(navigationRoot.getEl());\n\n\t\t\tfor (var i = 0; i < elements.length; i++) {\n\t\t\t\tif (elements[i] === focusedElement) {\n\t\t\t\t\tidx = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tidx += dir;\n\t\t\tnavigationRoot.lastAriaIndex = moveFocusToIndex(idx, elements);\n\t\t}\n\n\t\t/**\n\t\t * Moves the focus to the left this is called by the left key.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tfunction left() {\n\t\t\tvar parentRole = getParentRole();\n\n\t\t\tif (parentRole == \"tablist\") {\n\t\t\t\tmoveFocus(-1, getFocusElements(focusedElement.parentNode));\n\t\t\t} else if (focusedControl.parent().submenu) {\n\t\t\t\tcancel();\n\t\t\t} else {\n\t\t\t\tmoveFocus(-1);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Moves the focus to the right this is called by the right key.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tfunction right() {\n\t\t\tvar role = getRole(), parentRole = getParentRole();\n\n\t\t\tif (parentRole == \"tablist\") {\n\t\t\t\tmoveFocus(1, getFocusElements(focusedElement.parentNode));\n\t\t\t} else if (role == \"menuitem\" && parentRole == \"menu\" && getAriaProp('haspopup')) {\n\t\t\t\tenter();\n\t\t\t} else {\n\t\t\t\tmoveFocus(1);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Moves the focus to the up this is called by the up key.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tfunction up() {\n\t\t\tmoveFocus(-1);\n\t\t}\n\n\t\t/**\n\t\t * Moves the focus to the up this is called by the down key.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tfunction down() {\n\t\t\tvar role = getRole(), parentRole = getParentRole();\n\n\t\t\tif (role == \"menuitem\" && parentRole == \"menubar\") {\n\t\t\t\tenter();\n\t\t\t} else if (role == \"button\" && getAriaProp('haspopup')) {\n\t\t\t\tenter({key: 'down'});\n\t\t\t} else {\n\t\t\t\tmoveFocus(1);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Moves the focus to the next item or previous item depending on shift key.\n\t\t *\n\t\t * @private\n\t\t * @param {DOMEvent} e DOM event object.\n\t\t */\n\t\tfunction tab(e) {\n\t\t\tvar parentRole = getParentRole();\n\n\t\t\tif (parentRole == \"tablist\") {\n\t\t\t\tvar elm = getFocusElements(focusedControl.getEl('body'))[0];\n\n\t\t\t\tif (elm) {\n\t\t\t\t\telm.focus();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmoveFocus(e.shiftKey ? -1 : 1);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Calls the cancel event on the currently focused control. This is normally done using the Esc key.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tfunction cancel() {\n\t\t\tfocusedControl.fire('cancel');\n\t\t}\n\n\t\t/**\n\t\t * Calls the click event on the currently focused control. This is normally done using the Enter/Space keys.\n\t\t *\n\t\t * @private\n\t\t * @param {Object} aria Optional aria data to pass along with the enter event.\n\t\t */\n\t\tfunction enter(aria) {\n\t\t\taria = aria || {};\n\t\t\tfocusedControl.fire('click', {target: focusedElement, aria: aria});\n\t\t}\n\n\t\troot.on('keydown', function(e) {\n\t\t\tfunction handleNonTabOrEscEvent(e, handler) {\n\t\t\t\t// Ignore non tab keys for text elements\n\t\t\t\tif (isTextInputElement(focusedElement)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (getRole(focusedElement) === 'slider') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (handler(e) !== false) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (e.isDefaultPrevented()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tswitch (e.keyCode) {\n\t\t\t\tcase 37: // DOM_VK_LEFT\n\t\t\t\t\thandleNonTabOrEscEvent(e, left);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 39: // DOM_VK_RIGHT\n\t\t\t\t\thandleNonTabOrEscEvent(e, right);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 38: // DOM_VK_UP\n\t\t\t\t\thandleNonTabOrEscEvent(e, up);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 40: // DOM_VK_DOWN\n\t\t\t\t\thandleNonTabOrEscEvent(e, down);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 27: // DOM_VK_ESCAPE\n\t\t\t\t\tcancel();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 14: // DOM_VK_ENTER\n\t\t\t\tcase 13: // DOM_VK_RETURN\n\t\t\t\tcase 32: // DOM_VK_SPACE\n\t\t\t\t\thandleNonTabOrEscEvent(e, enter);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 9: // DOM_VK_TAB\n\t\t\t\t\tif (tab(e) !== false) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\n\t\troot.on('focusin', function(e) {\n\t\t\tfocusedElement = e.target;\n\t\t\tfocusedControl = e.control;\n\t\t});\n\n\t\treturn {\n\t\t\tfocusFirst: focusFirst\n\t\t};\n\t};\n});\n\n// Included from: js/tinymce/classes/ui/Container.js\n\n/**\n * Container.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Container control. This is extended by all controls that can have\n * children such as panels etc. You can also use this class directly as an\n * generic container instance. The container doesn't have any specific role or style.\n *\n * @-x-less Container.less\n * @class tinymce.ui.Container\n * @extends tinymce.ui.Control\n */\ndefine(\"tinymce/ui/Container\", [\n\t\"tinymce/ui/Control\",\n\t\"tinymce/ui/Collection\",\n\t\"tinymce/ui/Selector\",\n\t\"tinymce/ui/Factory\",\n\t\"tinymce/ui/KeyboardNavigation\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/dom/DomQuery\",\n\t\"tinymce/ui/ClassList\",\n\t\"tinymce/ui/ReflowQueue\"\n], function(Control, Collection, Selector, Factory, KeyboardNavigation, Tools, $, ClassList, ReflowQueue) {\n\t\"use strict\";\n\n\tvar selectorCache = {};\n\n\treturn Control.extend({\n\t\t/**\n\t\t * Constructs a new control instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {Array} items Items to add to container in JSON format or control instances.\n\t\t * @setting {String} layout Layout manager by name to use.\n\t\t * @setting {Object} defaults Default settings to apply to all items.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\t\t\tsettings = self.settings;\n\n\t\t\tif (settings.fixed) {\n\t\t\t\tself.state.set('fixed', true);\n\t\t\t}\n\n\t\t\tself._items = new Collection();\n\n\t\t\tif (self.isRtl()) {\n\t\t\t\tself.classes.add('rtl');\n\t\t\t}\n\n\t\t\tself.bodyClasses = new ClassList(function() {\n\t\t\t\tif (self.state.get('rendered')) {\n\t\t\t\t\tself.getEl('body').className = this.toString();\n\t\t\t\t}\n\t\t\t});\n\t\t\tself.bodyClasses.prefix = self.classPrefix;\n\n\t\t\tself.classes.add('container');\n\t\t\tself.bodyClasses.add('container-body');\n\n\t\t\tif (settings.containerCls) {\n\t\t\t\tself.classes.add(settings.containerCls);\n\t\t\t}\n\n\t\t\tself._layout = Factory.create((settings.layout || '') + 'layout');\n\n\t\t\tif (self.settings.items) {\n\t\t\t\tself.add(self.settings.items);\n\t\t\t} else {\n\t\t\t\tself.add(self.render());\n\t\t\t}\n\n\t\t\t// TODO: Fix this!\n\t\t\tself._hasBody = true;\n\t\t},\n\n\t\t/**\n\t\t * Returns a collection of child items that the container currently have.\n\t\t *\n\t\t * @method items\n\t\t * @return {tinymce.ui.Collection} Control collection direct child controls.\n\t\t */\n\t\titems: function() {\n\t\t\treturn this._items;\n\t\t},\n\n\t\t/**\n\t\t * Find child controls by selector.\n\t\t *\n\t\t * @method find\n\t\t * @param {String} selector Selector CSS pattern to find children by.\n\t\t * @return {tinymce.ui.Collection} Control collection with child controls.\n\t\t */\n\t\tfind: function(selector) {\n\t\t\tselector = selectorCache[selector] = selectorCache[selector] || new Selector(selector);\n\n\t\t\treturn selector.find(this);\n\t\t},\n\n\t\t/**\n\t\t * Adds one or many items to the current container. This will create instances of\n\t\t * the object representations if needed.\n\t\t *\n\t\t * @method add\n\t\t * @param {Array/Object/tinymce.ui.Control} items Array or item that will be added to the container.\n\t\t * @return {tinymce.ui.Collection} Current collection control.\n\t\t */\n\t\tadd: function(items) {\n\t\t\tvar self = this;\n\n\t\t\tself.items().add(self.create(items)).parent(self);\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Focuses the current container instance. This will look\n\t\t * for the first control in the container and focus that.\n\t\t *\n\t\t * @method focus\n\t\t * @param {Boolean} keyboard Optional true/false if the focus was a keyboard focus or not.\n\t\t * @return {tinymce.ui.Collection} Current instance.\n\t\t */\n\t\tfocus: function(keyboard) {\n\t\t\tvar self = this, focusCtrl, keyboardNav, items;\n\n\t\t\tif (keyboard) {\n\t\t\t\tkeyboardNav = self.keyboardNav || self.parents().eq(-1)[0].keyboardNav;\n\n\t\t\t\tif (keyboardNav) {\n\t\t\t\t\tkeyboardNav.focusFirst(self);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\titems = self.find('*');\n\n\t\t\t// TODO: Figure out a better way to auto focus alert dialog buttons\n\t\t\tif (self.statusbar) {\n\t\t\t\titems.add(self.statusbar.items());\n\t\t\t}\n\n\t\t\titems.each(function(ctrl) {\n\t\t\t\tif (ctrl.settings.autofocus) {\n\t\t\t\t\tfocusCtrl = null;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (ctrl.canFocus) {\n\t\t\t\t\tfocusCtrl = focusCtrl || ctrl;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (focusCtrl) {\n\t\t\t\tfocusCtrl.focus();\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Replaces the specified child control with a new control.\n\t\t *\n\t\t * @method replace\n\t\t * @param {tinymce.ui.Control} oldItem Old item to be replaced.\n\t\t * @param {tinymce.ui.Control} newItem New item to be inserted.\n\t\t */\n\t\treplace: function(oldItem, newItem) {\n\t\t\tvar ctrlElm, items = this.items(), i = items.length;\n\n\t\t\t// Replace the item in collection\n\t\t\twhile (i--) {\n\t\t\t\tif (items[i] === oldItem) {\n\t\t\t\t\titems[i] = newItem;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i >= 0) {\n\t\t\t\t// Remove new item from DOM\n\t\t\t\tctrlElm = newItem.getEl();\n\t\t\t\tif (ctrlElm) {\n\t\t\t\t\tctrlElm.parentNode.removeChild(ctrlElm);\n\t\t\t\t}\n\n\t\t\t\t// Remove old item from DOM\n\t\t\t\tctrlElm = oldItem.getEl();\n\t\t\t\tif (ctrlElm) {\n\t\t\t\t\tctrlElm.parentNode.removeChild(ctrlElm);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Adopt the item\n\t\t\tnewItem.parent(this);\n\t\t},\n\n\t\t/**\n\t\t * Creates the specified items. If any of the items is plain JSON style objects\n\t\t * it will convert these into real tinymce.ui.Control instances.\n\t\t *\n\t\t * @method create\n\t\t * @param {Array} items Array of items to convert into control instances.\n\t\t * @return {Array} Array with control instances.\n\t\t */\n\t\tcreate: function(items) {\n\t\t\tvar self = this, settings, ctrlItems = [];\n\n\t\t\t// Non array structure, then force it into an array\n\t\t\tif (!Tools.isArray(items)) {\n\t\t\t\titems = [items];\n\t\t\t}\n\n\t\t\t// Add default type to each child control\n\t\t\tTools.each(items, function(item) {\n\t\t\t\tif (item) {\n\t\t\t\t\t// Construct item if needed\n\t\t\t\t\tif (!(item instanceof Control)) {\n\t\t\t\t\t\t// Name only then convert it to an object\n\t\t\t\t\t\tif (typeof item == \"string\") {\n\t\t\t\t\t\t\titem = {type: item};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Create control instance based on input settings and default settings\n\t\t\t\t\t\tsettings = Tools.extend({}, self.settings.defaults, item);\n\t\t\t\t\t\titem.type = settings.type = settings.type || item.type || self.settings.defaultType ||\n\t\t\t\t\t\t\t(settings.defaults ? settings.defaults.type : null);\n\t\t\t\t\t\titem = Factory.create(settings);\n\t\t\t\t\t}\n\n\t\t\t\t\tctrlItems.push(item);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn ctrlItems;\n\t\t},\n\n\t\t/**\n\t\t * Renders new control instances.\n\t\t *\n\t\t * @private\n\t\t */\n\t\trenderNew: function() {\n\t\t\tvar self = this;\n\n\t\t\t// Render any new items\n\t\t\tself.items().each(function(ctrl, index) {\n\t\t\t\tvar containerElm;\n\n\t\t\t\tctrl.parent(self);\n\n\t\t\t\tif (!ctrl.state.get('rendered')) {\n\t\t\t\t\tcontainerElm = self.getEl('body');\n\n\t\t\t\t\t// Insert or append the item\n\t\t\t\t\tif (containerElm.hasChildNodes() && index <= containerElm.childNodes.length - 1) {\n\t\t\t\t\t\t$(containerElm.childNodes[index]).before(ctrl.renderHtml());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$(containerElm).append(ctrl.renderHtml());\n\t\t\t\t\t}\n\n\t\t\t\t\tctrl.postRender();\n\t\t\t\t\tReflowQueue.add(ctrl);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself._layout.applyClasses(self.items().filter(':visible'));\n\t\t\tself._lastRect = null;\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Appends new instances to the current container.\n\t\t *\n\t\t * @method append\n\t\t * @param {Array/tinymce.ui.Collection} items Array if controls to append.\n\t\t * @return {tinymce.ui.Container} Current container instance.\n\t\t */\n\t\tappend: function(items) {\n\t\t\treturn this.add(items).renderNew();\n\t\t},\n\n\t\t/**\n\t\t * Prepends new instances to the current container.\n\t\t *\n\t\t * @method prepend\n\t\t * @param {Array/tinymce.ui.Collection} items Array if controls to prepend.\n\t\t * @return {tinymce.ui.Container} Current container instance.\n\t\t */\n\t\tprepend: function(items) {\n\t\t\tvar self = this;\n\n\t\t\tself.items().set(self.create(items).concat(self.items().toArray()));\n\n\t\t\treturn self.renderNew();\n\t\t},\n\n\t\t/**\n\t\t * Inserts an control at a specific index.\n\t\t *\n\t\t * @method insert\n\t\t * @param {Array/tinymce.ui.Collection} items Array if controls to insert.\n\t\t * @param {Number} index Index to insert controls at.\n\t\t * @param {Boolean} [before=false] Inserts controls before the index.\n\t\t */\n\t\tinsert: function(items, index, before) {\n\t\t\tvar self = this, curItems, beforeItems, afterItems;\n\n\t\t\titems = self.create(items);\n\t\t\tcurItems = self.items();\n\n\t\t\tif (!before && index < curItems.length - 1) {\n\t\t\t\tindex += 1;\n\t\t\t}\n\n\t\t\tif (index >= 0 && index < curItems.length) {\n\t\t\t\tbeforeItems = curItems.slice(0, index).toArray();\n\t\t\t\tafterItems = curItems.slice(index).toArray();\n\t\t\t\tcurItems.set(beforeItems.concat(items, afterItems));\n\t\t\t}\n\n\t\t\treturn self.renderNew();\n\t\t},\n\n\t\t/**\n\t\t * Populates the form fields from the specified JSON data object.\n\t\t *\n\t\t * Control items in the form that matches the data will have it's value set.\n\t\t *\n\t\t * @method fromJSON\n\t\t * @param {Object} data JSON data object to set control values by.\n\t\t * @return {tinymce.ui.Container} Current form instance.\n\t\t */\n\t\tfromJSON: function(data) {\n\t\t\tvar self = this;\n\n\t\t\tfor (var name in data) {\n\t\t\t\tself.find('#' + name).value(data[name]);\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Serializes the form into a JSON object by getting all items\n\t\t * that has a name and a value.\n\t\t *\n\t\t * @method toJSON\n\t\t * @return {Object} JSON object with form data.\n\t\t */\n\t\ttoJSON: function() {\n\t\t\tvar self = this, data = {};\n\n\t\t\tself.find('*').each(function(ctrl) {\n\t\t\t\tvar name = ctrl.name(), value = ctrl.value();\n\n\t\t\t\tif (name && typeof value != \"undefined\") {\n\t\t\t\t\tdata[name] = value;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn data;\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, layout = self._layout, role = this.settings.role;\n\n\t\t\tself.preRender();\n\t\t\tlayout.preRender(self);\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\t(self.settings.html || '') + layout.renderHtml(self) +\n\t\t\t\t\t'
      ' +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Post render method. Called after the control has been rendered to the target.\n\t\t *\n\t\t * @method postRender\n\t\t * @return {tinymce.ui.Container} Current combobox instance.\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this, box;\n\n\t\t\tself.items().exec('postRender');\n\t\t\tself._super();\n\n\t\t\tself._layout.postRender(self);\n\t\t\tself.state.set('rendered', true);\n\n\t\t\tif (self.settings.style) {\n\t\t\t\tself.$el.css(self.settings.style);\n\t\t\t}\n\n\t\t\tif (self.settings.border) {\n\t\t\t\tbox = self.borderBox;\n\t\t\t\tself.$el.css({\n\t\t\t\t\t'border-top-width': box.top,\n\t\t\t\t\t'border-right-width': box.right,\n\t\t\t\t\t'border-bottom-width': box.bottom,\n\t\t\t\t\t'border-left-width': box.left\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!self.parent()) {\n\t\t\t\tself.keyboardNav = new KeyboardNavigation({\n\t\t\t\t\troot: self\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Initializes the current controls layout rect.\n\t\t * This will be executed by the layout managers to determine the\n\t\t * default minWidth/minHeight etc.\n\t\t *\n\t\t * @method initLayoutRect\n\t\t * @return {Object} Layout rect instance.\n\t\t */\n\t\tinitLayoutRect: function() {\n\t\t\tvar self = this, layoutRect = self._super();\n\n\t\t\t// Recalc container size by asking layout manager\n\t\t\tself._layout.recalc(self);\n\n\t\t\treturn layoutRect;\n\t\t},\n\n\t\t/**\n\t\t * Recalculates the positions of the controls in the current container.\n\t\t * This is invoked by the reflow method and shouldn't be called directly.\n\t\t *\n\t\t * @method recalc\n\t\t */\n\t\trecalc: function() {\n\t\t\tvar self = this, rect = self._layoutRect, lastRect = self._lastRect;\n\n\t\t\tif (!lastRect || lastRect.w != rect.w || lastRect.h != rect.h) {\n\t\t\t\tself._layout.recalc(self);\n\t\t\t\trect = self.layoutRect();\n\t\t\t\tself._lastRect = {x: rect.x, y: rect.y, w: rect.w, h: rect.h};\n\t\t\t\treturn true;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Reflows the current container and it's children and possible parents.\n\t\t * This should be used after you for example append children to the current control so\n\t\t * that the layout managers know that they need to reposition everything.\n\t\t *\n\t\t * @example\n\t\t * container.append({type: 'button', text: 'My button'}).reflow();\n\t\t *\n\t\t * @method reflow\n\t\t * @return {tinymce.ui.Container} Current container instance.\n\t\t */\n\t\treflow: function() {\n\t\t\tvar i;\n\n\t\t\tReflowQueue.remove(this);\n\n\t\t\tif (this.visible()) {\n\t\t\t\tControl.repaintControls = [];\n\t\t\t\tControl.repaintControls.map = {};\n\n\t\t\t\tthis.recalc();\n\t\t\t\ti = Control.repaintControls.length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tControl.repaintControls[i].repaint();\n\t\t\t\t}\n\n\t\t\t\t// TODO: Fix me!\n\t\t\t\tif (this.settings.layout !== \"flow\" && this.settings.layout !== \"stack\") {\n\t\t\t\t\tthis.repaint();\n\t\t\t\t}\n\n\t\t\t\tControl.repaintControls = [];\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/DragHelper.js\n\n/**\n * DragHelper.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Drag/drop helper class.\n *\n * @example\n * var dragHelper = new tinymce.ui.DragHelper('mydiv', {\n * start: function(evt) {\n * },\n *\n * drag: function(evt) {\n * },\n *\n * end: function(evt) {\n * }\n * });\n *\n * @class tinymce.ui.DragHelper\n */\ndefine(\"tinymce/ui/DragHelper\", [\n\t\"tinymce/dom/DomQuery\"\n], function($) {\n\t\"use strict\";\n\n\tfunction getDocumentSize(doc) {\n\t\tvar documentElement, body, scrollWidth, clientWidth;\n\t\tvar offsetWidth, scrollHeight, clientHeight, offsetHeight, max = Math.max;\n\n\t\tdocumentElement = doc.documentElement;\n\t\tbody = doc.body;\n\n\t\tscrollWidth = max(documentElement.scrollWidth, body.scrollWidth);\n\t\tclientWidth = max(documentElement.clientWidth, body.clientWidth);\n\t\toffsetWidth = max(documentElement.offsetWidth, body.offsetWidth);\n\n\t\tscrollHeight = max(documentElement.scrollHeight, body.scrollHeight);\n\t\tclientHeight = max(documentElement.clientHeight, body.clientHeight);\n\t\toffsetHeight = max(documentElement.offsetHeight, body.offsetHeight);\n\n\t\treturn {\n\t\t\twidth: scrollWidth < offsetWidth ? clientWidth : scrollWidth,\n\t\t\theight: scrollHeight < offsetHeight ? clientHeight : scrollHeight\n\t\t};\n\t}\n\n\tfunction updateWithTouchData(e) {\n\t\tvar keys, i;\n\n\t\tif (e.changedTouches) {\n\t\t\tkeys = \"screenX screenY pageX pageY clientX clientY\".split(' ');\n\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\te[keys[i]] = e.changedTouches[0][keys[i]];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn function(id, settings) {\n\t\tvar $eventOverlay, doc = settings.document || document, downButton, start, stop, drag, startX, startY;\n\n\t\tsettings = settings || {};\n\n\t\tfunction getHandleElm() {\n\t\t\treturn doc.getElementById(settings.handle || id);\n\t\t}\n\n\t\tstart = function(e) {\n\t\t\tvar docSize = getDocumentSize(doc), handleElm, cursor;\n\n\t\t\tupdateWithTouchData(e);\n\n\t\t\te.preventDefault();\n\t\t\tdownButton = e.button;\n\t\t\thandleElm = getHandleElm();\n\t\t\tstartX = e.screenX;\n\t\t\tstartY = e.screenY;\n\n\t\t\t// Grab cursor from handle so we can place it on overlay\n\t\t\tif (window.getComputedStyle) {\n\t\t\t\tcursor = window.getComputedStyle(handleElm, null).getPropertyValue(\"cursor\");\n\t\t\t} else {\n\t\t\t\tcursor = handleElm.runtimeStyle.cursor;\n\t\t\t}\n\n\t\t\t$eventOverlay = $('
      ').css({\n\t\t\t\tposition: \"absolute\",\n\t\t\t\ttop: 0, left: 0,\n\t\t\t\twidth: docSize.width,\n\t\t\t\theight: docSize.height,\n\t\t\t\tzIndex: 0x7FFFFFFF,\n\t\t\t\topacity: 0.0001,\n\t\t\t\tcursor: cursor\n\t\t\t}).appendTo(doc.body);\n\n\t\t\t$(doc).on('mousemove touchmove', drag).on('mouseup touchend', stop);\n\n\t\t\tsettings.start(e);\n\t\t};\n\n\t\tdrag = function(e) {\n\t\t\tupdateWithTouchData(e);\n\n\t\t\tif (e.button !== downButton) {\n\t\t\t\treturn stop(e);\n\t\t\t}\n\n\t\t\te.deltaX = e.screenX - startX;\n\t\t\te.deltaY = e.screenY - startY;\n\n\t\t\te.preventDefault();\n\t\t\tsettings.drag(e);\n\t\t};\n\n\t\tstop = function(e) {\n\t\t\tupdateWithTouchData(e);\n\n\t\t\t$(doc).off('mousemove touchmove', drag).off('mouseup touchend', stop);\n\n\t\t\t$eventOverlay.remove();\n\n\t\t\tif (settings.stop) {\n\t\t\t\tsettings.stop(e);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Destroys the drag/drop helper instance.\n\t\t *\n\t\t * @method destroy\n\t\t */\n\t\tthis.destroy = function() {\n\t\t\t$(getHandleElm()).off();\n\t\t};\n\n\t\t$(getHandleElm()).on('mousedown touchstart', start);\n\t};\n});\n\n// Included from: js/tinymce/classes/ui/Scrollable.js\n\n/**\n * Scrollable.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This mixin makes controls scrollable using custom scrollbars.\n *\n * @-x-less Scrollable.less\n * @mixin tinymce.ui.Scrollable\n */\ndefine(\"tinymce/ui/Scrollable\", [\n\t\"tinymce/dom/DomQuery\",\n\t\"tinymce/ui/DragHelper\"\n], function($, DragHelper) {\n\t\"use strict\";\n\n\treturn {\n\t\tinit: function() {\n\t\t\tvar self = this;\n\t\t\tself.on('repaint', self.renderScroll);\n\t\t},\n\n\t\trenderScroll: function() {\n\t\t\tvar self = this, margin = 2;\n\n\t\t\tfunction repaintScroll() {\n\t\t\t\tvar hasScrollH, hasScrollV, bodyElm;\n\n\t\t\t\tfunction repaintAxis(axisName, posName, sizeName, contentSizeName, hasScroll, ax) {\n\t\t\t\t\tvar containerElm, scrollBarElm, scrollThumbElm;\n\t\t\t\t\tvar containerSize, scrollSize, ratio, rect;\n\t\t\t\t\tvar posNameLower, sizeNameLower;\n\n\t\t\t\t\tscrollBarElm = self.getEl('scroll' + axisName);\n\t\t\t\t\tif (scrollBarElm) {\n\t\t\t\t\t\tposNameLower = posName.toLowerCase();\n\t\t\t\t\t\tsizeNameLower = sizeName.toLowerCase();\n\n\t\t\t\t\t\t$(self.getEl('absend')).css(posNameLower, self.layoutRect()[contentSizeName] - 1);\n\n\t\t\t\t\t\tif (!hasScroll) {\n\t\t\t\t\t\t\t$(scrollBarElm).css('display', 'none');\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$(scrollBarElm).css('display', 'block');\n\t\t\t\t\t\tcontainerElm = self.getEl('body');\n\t\t\t\t\t\tscrollThumbElm = self.getEl('scroll' + axisName + \"t\");\n\t\t\t\t\t\tcontainerSize = containerElm[\"client\" + sizeName] - (margin * 2);\n\t\t\t\t\t\tcontainerSize -= hasScrollH && hasScrollV ? scrollBarElm[\"client\" + ax] : 0;\n\t\t\t\t\t\tscrollSize = containerElm[\"scroll\" + sizeName];\n\t\t\t\t\t\tratio = containerSize / scrollSize;\n\n\t\t\t\t\t\trect = {};\n\t\t\t\t\t\trect[posNameLower] = containerElm[\"offset\" + posName] + margin;\n\t\t\t\t\t\trect[sizeNameLower] = containerSize;\n\t\t\t\t\t\t$(scrollBarElm).css(rect);\n\n\t\t\t\t\t\trect = {};\n\t\t\t\t\t\trect[posNameLower] = containerElm[\"scroll\" + posName] * ratio;\n\t\t\t\t\t\trect[sizeNameLower] = containerSize * ratio;\n\t\t\t\t\t\t$(scrollThumbElm).css(rect);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbodyElm = self.getEl('body');\n\t\t\t\thasScrollH = bodyElm.scrollWidth > bodyElm.clientWidth;\n\t\t\t\thasScrollV = bodyElm.scrollHeight > bodyElm.clientHeight;\n\n\t\t\t\trepaintAxis(\"h\", \"Left\", \"Width\", \"contentW\", hasScrollH, \"Height\");\n\t\t\t\trepaintAxis(\"v\", \"Top\", \"Height\", \"contentH\", hasScrollV, \"Width\");\n\t\t\t}\n\n\t\t\tfunction addScroll() {\n\t\t\t\tfunction addScrollAxis(axisName, posName, sizeName, deltaPosName, ax) {\n\t\t\t\t\tvar scrollStart, axisId = self._id + '-scroll' + axisName, prefix = self.classPrefix;\n\n\t\t\t\t\t$(self.getEl()).append(\n\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\n\t\t\t\t\tself.draghelper = new DragHelper(axisId + 't', {\n\t\t\t\t\t\tstart: function() {\n\t\t\t\t\t\t\tscrollStart = self.getEl('body')[\"scroll\" + posName];\n\t\t\t\t\t\t\t$('#' + axisId).addClass(prefix + 'active');\n\t\t\t\t\t\t},\n\n\t\t\t\t\t\tdrag: function(e) {\n\t\t\t\t\t\t\tvar ratio, hasScrollH, hasScrollV, containerSize, layoutRect = self.layoutRect();\n\n\t\t\t\t\t\t\thasScrollH = layoutRect.contentW > layoutRect.innerW;\n\t\t\t\t\t\t\thasScrollV = layoutRect.contentH > layoutRect.innerH;\n\t\t\t\t\t\t\tcontainerSize = self.getEl('body')[\"client\" + sizeName] - (margin * 2);\n\t\t\t\t\t\t\tcontainerSize -= hasScrollH && hasScrollV ? self.getEl('scroll' + axisName)[\"client\" + ax] : 0;\n\n\t\t\t\t\t\t\tratio = containerSize / self.getEl('body')[\"scroll\" + sizeName];\n\t\t\t\t\t\t\tself.getEl('body')[\"scroll\" + posName] = scrollStart + (e[\"delta\" + deltaPosName] / ratio);\n\t\t\t\t\t\t},\n\n\t\t\t\t\t\tstop: function() {\n\t\t\t\t\t\t\t$('#' + axisId).removeClass(prefix + 'active');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tself.classes.add('scroll');\n\n\t\t\t\taddScrollAxis(\"v\", \"Top\", \"Height\", \"Y\", \"Width\");\n\t\t\t\taddScrollAxis(\"h\", \"Left\", \"Width\", \"X\", \"Height\");\n\t\t\t}\n\n\t\t\tif (self.settings.autoScroll) {\n\t\t\t\tif (!self._hasScroll) {\n\t\t\t\t\tself._hasScroll = true;\n\t\t\t\t\taddScroll();\n\n\t\t\t\t\tself.on('wheel', function(e) {\n\t\t\t\t\t\tvar bodyEl = self.getEl('body');\n\n\t\t\t\t\t\tbodyEl.scrollLeft += (e.deltaX || 0) * 10;\n\t\t\t\t\t\tbodyEl.scrollTop += e.deltaY * 10;\n\n\t\t\t\t\t\trepaintScroll();\n\t\t\t\t\t});\n\n\t\t\t\t\t$(self.getEl('body')).on(\"scroll\", repaintScroll);\n\t\t\t\t}\n\n\t\t\t\trepaintScroll();\n\t\t\t}\n\t\t}\n\t};\n});\n\n// Included from: js/tinymce/classes/ui/Panel.js\n\n/**\n * Panel.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new panel.\n *\n * @-x-less Panel.less\n * @class tinymce.ui.Panel\n * @extends tinymce.ui.Container\n * @mixes tinymce.ui.Scrollable\n */\ndefine(\"tinymce/ui/Panel\", [\n\t\"tinymce/ui/Container\",\n\t\"tinymce/ui/Scrollable\"\n], function(Container, Scrollable) {\n\t\"use strict\";\n\n\treturn Container.extend({\n\t\tDefaults: {\n\t\t\tlayout: 'fit',\n\t\t\tcontainerCls: 'panel'\n\t\t},\n\n\t\tMixins: [Scrollable],\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, layout = self._layout, innerHtml = self.settings.html;\n\n\t\t\tself.preRender();\n\t\t\tlayout.preRender(self);\n\n\t\t\tif (typeof innerHtml == \"undefined\") {\n\t\t\t\tinnerHtml = (\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\tlayout.renderHtml(self) +\n\t\t\t\t\t'
      '\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (typeof innerHtml == 'function') {\n\t\t\t\t\tinnerHtml = innerHtml.call(self);\n\t\t\t\t}\n\n\t\t\t\tself._hasBody = false;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t(self._preBodyHtml || '') +\n\t\t\t\t\tinnerHtml +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Movable.js\n\n/**\n * Movable.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Movable mixin. Makes controls movable absolute and relative to other elements.\n *\n * @mixin tinymce.ui.Movable\n */\ndefine(\"tinymce/ui/Movable\", [\n\t\"tinymce/ui/DomUtils\"\n], function(DomUtils) {\n\t\"use strict\";\n\n\tfunction calculateRelativePosition(ctrl, targetElm, rel) {\n\t\tvar ctrlElm, pos, x, y, selfW, selfH, targetW, targetH, viewport, size;\n\n\t\tviewport = DomUtils.getViewPort();\n\n\t\t// Get pos of target\n\t\tpos = DomUtils.getPos(targetElm);\n\t\tx = pos.x;\n\t\ty = pos.y;\n\n\t\tif (ctrl.state.get('fixed') && DomUtils.getRuntimeStyle(document.body, 'position') == 'static') {\n\t\t\tx -= viewport.x;\n\t\t\ty -= viewport.y;\n\t\t}\n\n\t\t// Get size of self\n\t\tctrlElm = ctrl.getEl();\n\t\tsize = DomUtils.getSize(ctrlElm);\n\t\tselfW = size.width;\n\t\tselfH = size.height;\n\n\t\t// Get size of target\n\t\tsize = DomUtils.getSize(targetElm);\n\t\ttargetW = size.width;\n\t\ttargetH = size.height;\n\n\t\t// Parse align string\n\t\trel = (rel || '').split('');\n\n\t\t// Target corners\n\t\tif (rel[0] === 'b') {\n\t\t\ty += targetH;\n\t\t}\n\n\t\tif (rel[1] === 'r') {\n\t\t\tx += targetW;\n\t\t}\n\n\t\tif (rel[0] === 'c') {\n\t\t\ty += Math.round(targetH / 2);\n\t\t}\n\n\t\tif (rel[1] === 'c') {\n\t\t\tx += Math.round(targetW / 2);\n\t\t}\n\n\t\t// Self corners\n\t\tif (rel[3] === 'b') {\n\t\t\ty -= selfH;\n\t\t}\n\n\t\tif (rel[4] === 'r') {\n\t\t\tx -= selfW;\n\t\t}\n\n\t\tif (rel[3] === 'c') {\n\t\t\ty -= Math.round(selfH / 2);\n\t\t}\n\n\t\tif (rel[4] === 'c') {\n\t\t\tx -= Math.round(selfW / 2);\n\t\t}\n\n\t\treturn {\n\t\t\tx: x,\n\t\t\ty: y,\n\t\t\tw: selfW,\n\t\t\th: selfH\n\t\t};\n\t}\n\n\treturn {\n\t\t/**\n\t\t * Tests various positions to get the most suitable one.\n\t\t *\n\t\t * @method testMoveRel\n\t\t * @param {DOMElement} elm Element to position against.\n\t\t * @param {Array} rels Array with relative positions.\n\t\t * @return {String} Best suitable relative position.\n\t\t */\n\t\ttestMoveRel: function(elm, rels) {\n\t\t\tvar viewPortRect = DomUtils.getViewPort();\n\n\t\t\tfor (var i = 0; i < rels.length; i++) {\n\t\t\t\tvar pos = calculateRelativePosition(this, elm, rels[i]);\n\n\t\t\t\tif (this.state.get('fixed')) {\n\t\t\t\t\tif (pos.x > 0 && pos.x + pos.w < viewPortRect.w && pos.y > 0 && pos.y + pos.h < viewPortRect.h) {\n\t\t\t\t\t\treturn rels[i];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (pos.x > viewPortRect.x && pos.x + pos.w < viewPortRect.w + viewPortRect.x &&\n\t\t\t\t\t\tpos.y > viewPortRect.y && pos.y + pos.h < viewPortRect.h + viewPortRect.y) {\n\t\t\t\t\t\treturn rels[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn rels[0];\n\t\t},\n\n\t\t/**\n\t\t * Move relative to the specified element.\n\t\t *\n\t\t * @method moveRel\n\t\t * @param {Element} elm Element to move relative to.\n\t\t * @param {String} rel Relative mode. For example: br-tl.\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tmoveRel: function(elm, rel) {\n\t\t\tif (typeof rel != 'string') {\n\t\t\t\trel = this.testMoveRel(elm, rel);\n\t\t\t}\n\n\t\t\tvar pos = calculateRelativePosition(this, elm, rel);\n\t\t\treturn this.moveTo(pos.x, pos.y);\n\t\t},\n\n\t\t/**\n\t\t * Move by a relative x, y values.\n\t\t *\n\t\t * @method moveBy\n\t\t * @param {Number} dx Relative x position.\n\t\t * @param {Number} dy Relative y position.\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tmoveBy: function(dx, dy) {\n\t\t\tvar self = this, rect = self.layoutRect();\n\n\t\t\tself.moveTo(rect.x + dx, rect.y + dy);\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Move to absolute position.\n\t\t *\n\t\t * @method moveTo\n\t\t * @param {Number} x Absolute x position.\n\t\t * @param {Number} y Absolute y position.\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tmoveTo: function(x, y) {\n\t\t\tvar self = this;\n\n\t\t\t// TODO: Move this to some global class\n\t\t\tfunction constrain(value, max, size) {\n\t\t\t\tif (value < 0) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\tif (value + size > max) {\n\t\t\t\t\tvalue = max - size;\n\t\t\t\t\treturn value < 0 ? 0 : value;\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\tif (self.settings.constrainToViewport) {\n\t\t\t\tvar viewPortRect = DomUtils.getViewPort(window);\n\t\t\t\tvar layoutRect = self.layoutRect();\n\n\t\t\t\tx = constrain(x, viewPortRect.w + viewPortRect.x, layoutRect.w);\n\t\t\t\ty = constrain(y, viewPortRect.h + viewPortRect.y, layoutRect.h);\n\t\t\t}\n\n\t\t\tif (self.state.get('rendered')) {\n\t\t\t\tself.layoutRect({x: x, y: y}).repaint();\n\t\t\t} else {\n\t\t\t\tself.settings.x = x;\n\t\t\t\tself.settings.y = y;\n\t\t\t}\n\n\t\t\tself.fire('move', {x: x, y: y});\n\n\t\t\treturn self;\n\t\t}\n\t};\n});\n\n// Included from: js/tinymce/classes/ui/Resizable.js\n\n/**\n * Resizable.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Resizable mixin. Enables controls to be resized.\n *\n * @mixin tinymce.ui.Resizable\n */\ndefine(\"tinymce/ui/Resizable\", [\n\t\"tinymce/ui/DomUtils\"\n], function(DomUtils) {\n\t\"use strict\";\n\n\treturn {\n\t\t/**\n\t\t * Resizes the control to contents.\n\t\t *\n\t\t * @method resizeToContent\n\t\t */\n\t\tresizeToContent: function() {\n\t\t\tthis._layoutRect.autoResize = true;\n\t\t\tthis._lastRect = null;\n\t\t\tthis.reflow();\n\t\t},\n\n\t\t/**\n\t\t * Resizes the control to a specific width/height.\n\t\t *\n\t\t * @method resizeTo\n\t\t * @param {Number} w Control width.\n\t\t * @param {Number} h Control height.\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tresizeTo: function(w, h) {\n\t\t\t// TODO: Fix hack\n\t\t\tif (w <= 1 || h <= 1) {\n\t\t\t\tvar rect = DomUtils.getWindowSize();\n\n\t\t\t\tw = w <= 1 ? w * rect.w : w;\n\t\t\t\th = h <= 1 ? h * rect.h : h;\n\t\t\t}\n\n\t\t\tthis._layoutRect.autoResize = false;\n\t\t\treturn this.layoutRect({minW: w, minH: h, w: w, h: h}).reflow();\n\t\t},\n\n\t\t/**\n\t\t * Resizes the control to a specific relative width/height.\n\t\t *\n\t\t * @method resizeBy\n\t\t * @param {Number} dw Relative control width.\n\t\t * @param {Number} dh Relative control height.\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tresizeBy: function(dw, dh) {\n\t\t\tvar self = this, rect = self.layoutRect();\n\n\t\t\treturn self.resizeTo(rect.w + dw, rect.h + dh);\n\t\t}\n\t};\n});\n\n// Included from: js/tinymce/classes/ui/FloatPanel.js\n\n/**\n * FloatPanel.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class creates a floating panel.\n *\n * @-x-less FloatPanel.less\n * @class tinymce.ui.FloatPanel\n * @extends tinymce.ui.Panel\n * @mixes tinymce.ui.Movable\n * @mixes tinymce.ui.Resizable\n */\ndefine(\"tinymce/ui/FloatPanel\", [\n\t\"tinymce/ui/Panel\",\n\t\"tinymce/ui/Movable\",\n\t\"tinymce/ui/Resizable\",\n\t\"tinymce/ui/DomUtils\",\n\t\"tinymce/dom/DomQuery\",\n\t\"tinymce/util/Delay\"\n], function(Panel, Movable, Resizable, DomUtils, $, Delay) {\n\t\"use strict\";\n\n\tvar documentClickHandler, documentScrollHandler, windowResizeHandler, visiblePanels = [];\n\tvar zOrder = [], hasModal;\n\n\tfunction isChildOf(ctrl, parent) {\n\t\twhile (ctrl) {\n\t\t\tif (ctrl == parent) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tctrl = ctrl.parent();\n\t\t}\n\t}\n\n\tfunction skipOrHidePanels(e) {\n\t\t// Hide any float panel when a click/focus out is out side that float panel and the\n\t\t// float panels direct parent for example a click on a menu button\n\t\tvar i = visiblePanels.length;\n\n\t\twhile (i--) {\n\t\t\tvar panel = visiblePanels[i], clickCtrl = panel.getParentCtrl(e.target);\n\n\t\t\tif (panel.settings.autohide) {\n\t\t\t\tif (clickCtrl) {\n\t\t\t\t\tif (isChildOf(clickCtrl, panel) || panel.parent() === clickCtrl) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\te = panel.fire('autohide', {target: e.target});\n\t\t\t\tif (!e.isDefaultPrevented()) {\n\t\t\t\t\tpanel.hide();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction bindDocumentClickHandler() {\n\n\t\tif (!documentClickHandler) {\n\t\t\tdocumentClickHandler = function(e) {\n\t\t\t\t// Gecko fires click event and in the wrong order on Mac so lets normalize\n\t\t\t\tif (e.button == 2) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tskipOrHidePanels(e);\n\t\t\t};\n\n\t\t\t$(document).on('click touchstart', documentClickHandler);\n\t\t}\n\t}\n\n\tfunction bindDocumentScrollHandler() {\n\t\tif (!documentScrollHandler) {\n\t\t\tdocumentScrollHandler = function() {\n\t\t\t\tvar i;\n\n\t\t\t\ti = visiblePanels.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\trepositionPanel(visiblePanels[i]);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t$(window).on('scroll', documentScrollHandler);\n\t\t}\n\t}\n\n\tfunction bindWindowResizeHandler() {\n\t\tif (!windowResizeHandler) {\n\t\t\tvar docElm = document.documentElement, clientWidth = docElm.clientWidth, clientHeight = docElm.clientHeight;\n\n\t\t\twindowResizeHandler = function() {\n\t\t\t\t// Workaround for #7065 IE 7 fires resize events event though the window wasn't resized\n\t\t\t\tif (!document.all || clientWidth != docElm.clientWidth || clientHeight != docElm.clientHeight) {\n\t\t\t\t\tclientWidth = docElm.clientWidth;\n\t\t\t\t\tclientHeight = docElm.clientHeight;\n\t\t\t\t\tFloatPanel.hideAll();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t$(window).on('resize', windowResizeHandler);\n\t\t}\n\t}\n\n\t/**\n\t * Repositions the panel to the top of page if the panel is outside of the visual viewport. It will\n\t * also reposition all child panels of the current panel.\n\t */\n\tfunction repositionPanel(panel) {\n\t\tvar scrollY = DomUtils.getViewPort().y;\n\n\t\tfunction toggleFixedChildPanels(fixed, deltaY) {\n\t\t\tvar parent;\n\n\t\t\tfor (var i = 0; i < visiblePanels.length; i++) {\n\t\t\t\tif (visiblePanels[i] != panel) {\n\t\t\t\t\tparent = visiblePanels[i].parent();\n\n\t\t\t\t\twhile (parent && (parent = parent.parent())) {\n\t\t\t\t\t\tif (parent == panel) {\n\t\t\t\t\t\t\tvisiblePanels[i].fixed(fixed).moveBy(0, deltaY).repaint();\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\tif (panel.settings.autofix) {\n\t\t\tif (!panel.state.get('fixed')) {\n\t\t\t\tpanel._autoFixY = panel.layoutRect().y;\n\n\t\t\t\tif (panel._autoFixY < scrollY) {\n\t\t\t\t\tpanel.fixed(true).layoutRect({y: 0}).repaint();\n\t\t\t\t\ttoggleFixedChildPanels(true, scrollY - panel._autoFixY);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (panel._autoFixY > scrollY) {\n\t\t\t\t\tpanel.fixed(false).layoutRect({y: panel._autoFixY}).repaint();\n\t\t\t\t\ttoggleFixedChildPanels(false, panel._autoFixY - scrollY);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction addRemove(add, ctrl) {\n\t\tvar i, zIndex = FloatPanel.zIndex || 0xFFFF, topModal;\n\n\t\tif (add) {\n\t\t\tzOrder.push(ctrl);\n\t\t} else {\n\t\t\ti = zOrder.length;\n\n\t\t\twhile (i--) {\n\t\t\t\tif (zOrder[i] === ctrl) {\n\t\t\t\t\tzOrder.splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (zOrder.length) {\n\t\t\tfor (i = 0; i < zOrder.length; i++) {\n\t\t\t\tif (zOrder[i].modal) {\n\t\t\t\t\tzIndex++;\n\t\t\t\t\ttopModal = zOrder[i];\n\t\t\t\t}\n\n\t\t\t\tzOrder[i].getEl().style.zIndex = zIndex;\n\t\t\t\tzOrder[i].zIndex = zIndex;\n\t\t\t\tzIndex++;\n\t\t\t}\n\t\t}\n\n\t\tvar modalBlockEl = $('#' + ctrl.classPrefix + 'modal-block', ctrl.getContainerElm())[0];\n\n\t\tif (topModal) {\n\t\t\t$(modalBlockEl).css('z-index', topModal.zIndex - 1);\n\t\t} else if (modalBlockEl) {\n\t\t\tmodalBlockEl.parentNode.removeChild(modalBlockEl);\n\t\t\thasModal = false;\n\t\t}\n\n\t\tFloatPanel.currentZIndex = zIndex;\n\t}\n\n\tvar FloatPanel = Panel.extend({\n\t\tMixins: [Movable, Resizable],\n\n\t\t/**\n\t\t * Constructs a new control instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {Boolean} autohide Automatically hide the panel.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\t\t\tself._eventsRoot = self;\n\n\t\t\tself.classes.add('floatpanel');\n\n\t\t\t// Hide floatpanes on click out side the root button\n\t\t\tif (settings.autohide) {\n\t\t\t\tbindDocumentClickHandler();\n\t\t\t\tbindWindowResizeHandler();\n\t\t\t\tvisiblePanels.push(self);\n\t\t\t}\n\n\t\t\tif (settings.autofix) {\n\t\t\t\tbindDocumentScrollHandler();\n\n\t\t\t\tself.on('move', function() {\n\t\t\t\t\trepositionPanel(this);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tself.on('postrender show', function(e) {\n\t\t\t\tif (e.control == self) {\n\t\t\t\t\tvar $modalBlockEl, prefix = self.classPrefix;\n\n\t\t\t\t\tif (self.modal && !hasModal) {\n\t\t\t\t\t\t$modalBlockEl = $('#' + prefix + 'modal-block', self.getContainerElm());\n\t\t\t\t\t\tif (!$modalBlockEl[0]) {\n\t\t\t\t\t\t\t$modalBlockEl = $(\n\t\t\t\t\t\t\t\t'
      '\n\t\t\t\t\t\t\t).appendTo(self.getContainerElm());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tDelay.setTimeout(function() {\n\t\t\t\t\t\t\t$modalBlockEl.addClass(prefix + 'in');\n\t\t\t\t\t\t\t$(self.getEl()).addClass(prefix + 'in');\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\thasModal = true;\n\t\t\t\t\t}\n\n\t\t\t\t\taddRemove(true, self);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.on('show', function() {\n\t\t\t\tself.parents().each(function(ctrl) {\n\t\t\t\t\tif (ctrl.state.get('fixed')) {\n\t\t\t\t\t\tself.fixed(true);\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\tif (settings.popover) {\n\t\t\t\tself._preBodyHtml = '
      ';\n\t\t\t\tself.classes.add('popover').add('bottom').add(self.isRtl() ? 'end' : 'start');\n\t\t\t}\n\n\t\t\tself.aria('label', settings.ariaLabel);\n\t\t\tself.aria('labelledby', self._id);\n\t\t\tself.aria('describedby', self.describedBy || self._id + '-none');\n\t\t},\n\n\t\tfixed: function(state) {\n\t\t\tvar self = this;\n\n\t\t\tif (self.state.get('fixed') != state) {\n\t\t\t\tif (self.state.get('rendered')) {\n\t\t\t\t\tvar viewport = DomUtils.getViewPort();\n\n\t\t\t\t\tif (state) {\n\t\t\t\t\t\tself.layoutRect().y -= viewport.y;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.layoutRect().y += viewport.y;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tself.classes.toggle('fixed', state);\n\t\t\t\tself.state.set('fixed', state);\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Shows the current float panel.\n\t\t *\n\t\t * @method show\n\t\t * @return {tinymce.ui.FloatPanel} Current floatpanel instance.\n\t\t */\n\t\tshow: function() {\n\t\t\tvar self = this, i, state = self._super();\n\n\t\t\ti = visiblePanels.length;\n\t\t\twhile (i--) {\n\t\t\t\tif (visiblePanels[i] === self) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i === -1) {\n\t\t\t\tvisiblePanels.push(self);\n\t\t\t}\n\n\t\t\treturn state;\n\t\t},\n\n\t\t/**\n\t\t * Hides the current float panel.\n\t\t *\n\t\t * @method hide\n\t\t * @return {tinymce.ui.FloatPanel} Current floatpanel instance.\n\t\t */\n\t\thide: function() {\n\t\t\tremoveVisiblePanel(this);\n\t\t\taddRemove(false, this);\n\n\t\t\treturn this._super();\n\t\t},\n\n\t\t/**\n\t\t * Hide all visible float panels with he autohide setting enabled. This is for\n\t\t * manually hiding floating menus or panels.\n\t\t *\n\t\t * @method hideAll\n\t\t */\n\t\thideAll: function() {\n\t\t\tFloatPanel.hideAll();\n\t\t},\n\n\t\t/**\n\t\t * Closes the float panel. This will remove the float panel from page and fire the close event.\n\t\t *\n\t\t * @method close\n\t\t */\n\t\tclose: function() {\n\t\t\tvar self = this;\n\n\t\t\tif (!self.fire('close').isDefaultPrevented()) {\n\t\t\t\tself.remove();\n\t\t\t\taddRemove(false, self);\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Removes the float panel from page.\n\t\t *\n\t\t * @method remove\n\t\t */\n\t\tremove: function() {\n\t\t\tremoveVisiblePanel(this);\n\t\t\tthis._super();\n\t\t},\n\n\t\tpostRender: function() {\n\t\t\tvar self = this;\n\n\t\t\tif (self.settings.bodyRole) {\n\t\t\t\tthis.getEl('body').setAttribute('role', self.settings.bodyRole);\n\t\t\t}\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n\n\t/**\n\t * Hide all visible float panels with he autohide setting enabled. This is for\n\t * manually hiding floating menus or panels.\n\t *\n\t * @static\n\t * @method hideAll\n\t */\n\tFloatPanel.hideAll = function() {\n\t\tvar i = visiblePanels.length;\n\n\t\twhile (i--) {\n\t\t\tvar panel = visiblePanels[i];\n\n\t\t\tif (panel && panel.settings.autohide) {\n\t\t\t\tpanel.hide();\n\t\t\t\tvisiblePanels.splice(i, 1);\n\t\t\t}\n\t\t}\n\t};\n\n\tfunction removeVisiblePanel(panel) {\n\t\tvar i;\n\n\t\ti = visiblePanels.length;\n\t\twhile (i--) {\n\t\t\tif (visiblePanels[i] === panel) {\n\t\t\t\tvisiblePanels.splice(i, 1);\n\t\t\t}\n\t\t}\n\n\t\ti = zOrder.length;\n\t\twhile (i--) {\n\t\t\tif (zOrder[i] === panel) {\n\t\t\t\tzOrder.splice(i, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn FloatPanel;\n});\n\n// Included from: js/tinymce/classes/ui/Window.js\n\n/**\n * Window.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new window.\n *\n * @-x-less Window.less\n * @class tinymce.ui.Window\n * @extends tinymce.ui.FloatPanel\n */\ndefine(\"tinymce/ui/Window\", [\n\t\"tinymce/ui/FloatPanel\",\n\t\"tinymce/ui/Panel\",\n\t\"tinymce/ui/DomUtils\",\n\t\"tinymce/dom/DomQuery\",\n\t\"tinymce/ui/DragHelper\",\n\t\"tinymce/ui/BoxUtils\",\n\t\"tinymce/Env\",\n\t\"tinymce/util/Delay\"\n], function(FloatPanel, Panel, DomUtils, $, DragHelper, BoxUtils, Env, Delay) {\n\t\"use strict\";\n\n\tvar windows = [], oldMetaValue = '';\n\n\tfunction toggleFullScreenState(state) {\n\t\tvar noScaleMetaValue = 'width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0',\n\t\t\tviewport = $(\"meta[name=viewport]\")[0],\n\t\t\tcontentValue;\n\n\t\tif (Env.overrideViewPort === false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!viewport) {\n\t\t\tviewport = document.createElement('meta');\n\t\t\tviewport.setAttribute('name', 'viewport');\n\t\t\tdocument.getElementsByTagName('head')[0].appendChild(viewport);\n\t\t}\n\n\t\tcontentValue = viewport.getAttribute('content');\n\t\tif (contentValue && typeof oldMetaValue != 'undefined') {\n\t\t\toldMetaValue = contentValue;\n\t\t}\n\n\t\tviewport.setAttribute('content', state ? noScaleMetaValue : oldMetaValue);\n\t}\n\n\tfunction toggleBodyFullScreenClasses(classPrefix, state) {\n\t\tif (checkFullscreenWindows() && state === false) {\n\t\t\t$([document.documentElement, document.body]).removeClass(classPrefix + 'fullscreen');\n\t\t}\n\t}\n\n\tfunction checkFullscreenWindows() {\n\t\tfor (var i = 0; i < windows.length; i++) {\n\t\t\tif (windows[i]._fullscreen) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tfunction handleWindowResize() {\n\t\tif (!Env.desktop) {\n\t\t\tvar lastSize = {\n\t\t\t\tw: window.innerWidth,\n\t\t\t\th: window.innerHeight\n\t\t\t};\n\n\t\t\tDelay.setInterval(function() {\n\t\t\t\tvar w = window.innerWidth,\n\t\t\t\t\th = window.innerHeight;\n\n\t\t\t\tif (lastSize.w != w || lastSize.h != h) {\n\t\t\t\t\tlastSize = {\n\t\t\t\t\t\tw: w,\n\t\t\t\t\t\th: h\n\t\t\t\t\t};\n\n\t\t\t\t\t$(window).trigger('resize');\n\t\t\t\t}\n\t\t\t}, 100);\n\t\t}\n\n\t\tfunction reposition() {\n\t\t\tvar i, rect = DomUtils.getWindowSize(), layoutRect;\n\n\t\t\tfor (i = 0; i < windows.length; i++) {\n\t\t\t\tlayoutRect = windows[i].layoutRect();\n\n\t\t\t\twindows[i].moveTo(\n\t\t\t\t\twindows[i].settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2),\n\t\t\t\t\twindows[i].settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$(window).on('resize', reposition);\n\t}\n\n\tvar Window = FloatPanel.extend({\n\t\tmodal: true,\n\n\t\tDefaults: {\n\t\t\tborder: 1,\n\t\t\tlayout: 'flex',\n\t\t\tcontainerCls: 'panel',\n\t\t\trole: 'dialog',\n\t\t\tcallbacks: {\n\t\t\t\tsubmit: function() {\n\t\t\t\t\tthis.fire('submit', {data: this.toJSON()});\n\t\t\t\t},\n\n\t\t\t\tclose: function() {\n\t\t\t\t\tthis.close();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\n\t\t\tif (self.isRtl()) {\n\t\t\t\tself.classes.add('rtl');\n\t\t\t}\n\n\t\t\tself.classes.add('window');\n\t\t\tself.bodyClasses.add('window-body');\n\t\t\tself.state.set('fixed', true);\n\n\t\t\t// Create statusbar\n\t\t\tif (settings.buttons) {\n\t\t\t\tself.statusbar = new Panel({\n\t\t\t\t\tlayout: 'flex',\n\t\t\t\t\tborder: '1 0 0 0',\n\t\t\t\t\tspacing: 3,\n\t\t\t\t\tpadding: 10,\n\t\t\t\t\talign: 'center',\n\t\t\t\t\tpack: self.isRtl() ? 'start' : 'end',\n\t\t\t\t\tdefaults: {\n\t\t\t\t\t\ttype: 'button'\n\t\t\t\t\t},\n\t\t\t\t\titems: settings.buttons\n\t\t\t\t});\n\n\t\t\t\tself.statusbar.classes.add('foot');\n\t\t\t\tself.statusbar.parent(self);\n\t\t\t}\n\n\t\t\tself.on('click', function(e) {\n\t\t\t\tvar closeClass = self.classPrefix + 'close';\n\n\t\t\t\tif (DomUtils.hasClass(e.target, closeClass) || DomUtils.hasClass(e.target.parentNode, closeClass)) {\n\t\t\t\t\tself.close();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.on('cancel', function() {\n\t\t\t\tself.close();\n\t\t\t});\n\n\t\t\tself.aria('describedby', self.describedBy || self._id + '-none');\n\t\t\tself.aria('label', settings.title);\n\t\t\tself._fullscreen = false;\n\t\t},\n\n\t\t/**\n\t\t * Recalculates the positions of the controls in the current container.\n\t\t * This is invoked by the reflow method and shouldn't be called directly.\n\t\t *\n\t\t * @method recalc\n\t\t */\n\t\trecalc: function() {\n\t\t\tvar self = this, statusbar = self.statusbar, layoutRect, width, x, needsRecalc;\n\n\t\t\tif (self._fullscreen) {\n\t\t\t\tself.layoutRect(DomUtils.getWindowSize());\n\t\t\t\tself.layoutRect().contentH = self.layoutRect().innerH;\n\t\t\t}\n\n\t\t\tself._super();\n\n\t\t\tlayoutRect = self.layoutRect();\n\n\t\t\t// Resize window based on title width\n\t\t\tif (self.settings.title && !self._fullscreen) {\n\t\t\t\twidth = layoutRect.headerW;\n\t\t\t\tif (width > layoutRect.w) {\n\t\t\t\t\tx = layoutRect.x - Math.max(0, width / 2);\n\t\t\t\t\tself.layoutRect({w: width, x: x});\n\t\t\t\t\tneedsRecalc = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Resize window based on statusbar width\n\t\t\tif (statusbar) {\n\t\t\t\tstatusbar.layoutRect({w: self.layoutRect().innerW}).recalc();\n\n\t\t\t\twidth = statusbar.layoutRect().minW + layoutRect.deltaW;\n\t\t\t\tif (width > layoutRect.w) {\n\t\t\t\t\tx = layoutRect.x - Math.max(0, width - layoutRect.w);\n\t\t\t\t\tself.layoutRect({w: width, x: x});\n\t\t\t\t\tneedsRecalc = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Recalc body and disable auto resize\n\t\t\tif (needsRecalc) {\n\t\t\t\tself.recalc();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Initializes the current controls layout rect.\n\t\t * This will be executed by the layout managers to determine the\n\t\t * default minWidth/minHeight etc.\n\t\t *\n\t\t * @method initLayoutRect\n\t\t * @return {Object} Layout rect instance.\n\t\t */\n\t\tinitLayoutRect: function() {\n\t\t\tvar self = this, layoutRect = self._super(), deltaH = 0, headEl;\n\n\t\t\t// Reserve vertical space for title\n\t\t\tif (self.settings.title && !self._fullscreen) {\n\t\t\t\theadEl = self.getEl('head');\n\n\t\t\t\tvar size = DomUtils.getSize(headEl);\n\n\t\t\t\tlayoutRect.headerW = size.width;\n\t\t\t\tlayoutRect.headerH = size.height;\n\n\t\t\t\tdeltaH += layoutRect.headerH;\n\t\t\t}\n\n\t\t\t// Reserve vertical space for statusbar\n\t\t\tif (self.statusbar) {\n\t\t\t\tdeltaH += self.statusbar.layoutRect().h;\n\t\t\t}\n\n\t\t\tlayoutRect.deltaH += deltaH;\n\t\t\tlayoutRect.minH += deltaH;\n\t\t\t//layoutRect.innerH -= deltaH;\n\t\t\tlayoutRect.h += deltaH;\n\n\t\t\tvar rect = DomUtils.getWindowSize();\n\n\t\t\tlayoutRect.x = self.settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2);\n\t\t\tlayoutRect.y = self.settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2);\n\n\t\t\treturn layoutRect;\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, layout = self._layout, id = self._id, prefix = self.classPrefix;\n\t\t\tvar settings = self.settings, headerHtml = '', footerHtml = '', html = settings.html;\n\n\t\t\tself.preRender();\n\t\t\tlayout.preRender(self);\n\n\t\t\tif (settings.title) {\n\t\t\t\theaderHtml = (\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\t'
      ' + self.encode(settings.title) + '
      ' +\n\t\t\t\t\t\t'
      ' +\n\t\t\t\t\t\t'' +\n\t\t\t\t\t'
      '\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (settings.url) {\n\t\t\t\thtml = '';\n\t\t\t}\n\n\t\t\tif (typeof html == \"undefined\") {\n\t\t\t\thtml = layout.renderHtml(self);\n\t\t\t}\n\n\t\t\tif (self.statusbar) {\n\t\t\t\tfooterHtml = self.statusbar.renderHtml();\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\theaderHtml +\n\t\t\t\t\t\t'
      ' +\n\t\t\t\t\t\t\thtml +\n\t\t\t\t\t\t'
      ' +\n\t\t\t\t\t\tfooterHtml +\n\t\t\t\t\t'
      ' +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Switches the window fullscreen mode.\n\t\t *\n\t\t * @method fullscreen\n\t\t * @param {Boolean} state True/false state.\n\t\t * @return {tinymce.ui.Window} Current window instance.\n\t\t */\n\t\tfullscreen: function(state) {\n\t\t\tvar self = this, documentElement = document.documentElement, slowRendering, prefix = self.classPrefix, layoutRect;\n\n\t\t\tif (state != self._fullscreen) {\n\t\t\t\t$(window).on('resize', function() {\n\t\t\t\t\tvar time;\n\n\t\t\t\t\tif (self._fullscreen) {\n\t\t\t\t\t\t// Time the layout time if it's to slow use a timeout to not hog the CPU\n\t\t\t\t\t\tif (!slowRendering) {\n\t\t\t\t\t\t\ttime = new Date().getTime();\n\n\t\t\t\t\t\t\tvar rect = DomUtils.getWindowSize();\n\t\t\t\t\t\t\tself.moveTo(0, 0).resizeTo(rect.w, rect.h);\n\n\t\t\t\t\t\t\tif ((new Date().getTime()) - time > 50) {\n\t\t\t\t\t\t\t\tslowRendering = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!self._timer) {\n\t\t\t\t\t\t\t\tself._timer = Delay.setTimeout(function() {\n\t\t\t\t\t\t\t\t\tvar rect = DomUtils.getWindowSize();\n\t\t\t\t\t\t\t\t\tself.moveTo(0, 0).resizeTo(rect.w, rect.h);\n\n\t\t\t\t\t\t\t\t\tself._timer = 0;\n\t\t\t\t\t\t\t\t}, 50);\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\tlayoutRect = self.layoutRect();\n\t\t\t\tself._fullscreen = state;\n\n\t\t\t\tif (!state) {\n\t\t\t\t\tself.borderBox = BoxUtils.parseBox(self.settings.border);\n\t\t\t\t\tself.getEl('head').style.display = '';\n\t\t\t\t\tlayoutRect.deltaH += layoutRect.headerH;\n\t\t\t\t\t$([documentElement, document.body]).removeClass(prefix + 'fullscreen');\n\t\t\t\t\tself.classes.remove('fullscreen');\n\t\t\t\t\tself.moveTo(self._initial.x, self._initial.y).resizeTo(self._initial.w, self._initial.h);\n\t\t\t\t} else {\n\t\t\t\t\tself._initial = {x: layoutRect.x, y: layoutRect.y, w: layoutRect.w, h: layoutRect.h};\n\n\t\t\t\t\tself.borderBox = BoxUtils.parseBox('0');\n\t\t\t\t\tself.getEl('head').style.display = 'none';\n\t\t\t\t\tlayoutRect.deltaH -= layoutRect.headerH + 2;\n\t\t\t\t\t$([documentElement, document.body]).addClass(prefix + 'fullscreen');\n\t\t\t\t\tself.classes.add('fullscreen');\n\n\t\t\t\t\tvar rect = DomUtils.getWindowSize();\n\t\t\t\t\tself.moveTo(0, 0).resizeTo(rect.w, rect.h);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn self.reflow();\n\t\t},\n\n\t\t/**\n\t\t * Called after the control has been rendered.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this, startPos;\n\n\t\t\tsetTimeout(function() {\n\t\t\t\tself.classes.add('in');\n\t\t\t\tself.fire('open');\n\t\t\t}, 0);\n\n\t\t\tself._super();\n\n\t\t\tif (self.statusbar) {\n\t\t\t\tself.statusbar.postRender();\n\t\t\t}\n\n\t\t\tself.focus();\n\n\t\t\tthis.dragHelper = new DragHelper(self._id + '-dragh', {\n\t\t\t\tstart: function() {\n\t\t\t\t\tstartPos = {\n\t\t\t\t\t\tx: self.layoutRect().x,\n\t\t\t\t\t\ty: self.layoutRect().y\n\t\t\t\t\t};\n\t\t\t\t},\n\n\t\t\t\tdrag: function(e) {\n\t\t\t\t\tself.moveTo(startPos.x + e.deltaX, startPos.y + e.deltaY);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.on('submit', function(e) {\n\t\t\t\tif (!e.isDefaultPrevented()) {\n\t\t\t\t\tself.close();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\twindows.push(self);\n\t\t\ttoggleFullScreenState(true);\n\t\t},\n\n\t\t/**\n\t\t * Fires a submit event with the serialized form.\n\t\t *\n\t\t * @method submit\n\t\t * @return {Object} Event arguments object.\n\t\t */\n\t\tsubmit: function() {\n\t\t\treturn this.fire('submit', {data: this.toJSON()});\n\t\t},\n\n\t\t/**\n\t\t * Removes the current control from DOM and from UI collections.\n\t\t *\n\t\t * @method remove\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tremove: function() {\n\t\t\tvar self = this, i;\n\n\t\t\tself.dragHelper.destroy();\n\t\t\tself._super();\n\n\t\t\tif (self.statusbar) {\n\t\t\t\tthis.statusbar.remove();\n\t\t\t}\n\n\t\t\ttoggleBodyFullScreenClasses(self.classPrefix, false);\n\n\t\t\ti = windows.length;\n\t\t\twhile (i--) {\n\t\t\t\tif (windows[i] === self) {\n\t\t\t\t\twindows.splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttoggleFullScreenState(windows.length > 0);\n\t\t},\n\n\t\t/**\n\t\t * Returns the contentWindow object of the iframe if it exists.\n\t\t *\n\t\t * @method getContentWindow\n\t\t * @return {Window} window object or null.\n\t\t */\n\t\tgetContentWindow: function() {\n\t\t\tvar ifr = this.getEl().getElementsByTagName('iframe')[0];\n\t\t\treturn ifr ? ifr.contentWindow : null;\n\t\t}\n\t});\n\n\thandleWindowResize();\n\n\treturn Window;\n});\n\n// Included from: js/tinymce/classes/ui/MessageBox.js\n\n/**\n * MessageBox.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class is used to create MessageBoxes like alerts/confirms etc.\n *\n * @class tinymce.ui.MessageBox\n * @extends tinymce.ui.FloatPanel\n */\ndefine(\"tinymce/ui/MessageBox\", [\n\t\"tinymce/ui/Window\"\n], function(Window) {\n\t\"use strict\";\n\n\tvar MessageBox = Window.extend({\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tsettings = {\n\t\t\t\tborder: 1,\n\t\t\t\tpadding: 20,\n\t\t\t\tlayout: 'flex',\n\t\t\t\tpack: \"center\",\n\t\t\t\talign: \"center\",\n\t\t\t\tcontainerCls: 'panel',\n\t\t\t\tautoScroll: true,\n\t\t\t\tbuttons: {type: \"button\", text: \"Ok\", action: \"ok\"},\n\t\t\t\titems: {\n\t\t\t\t\ttype: \"label\",\n\t\t\t\t\tmultiline: true,\n\t\t\t\t\tmaxWidth: 500,\n\t\t\t\t\tmaxHeight: 200\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._super(settings);\n\t\t},\n\n\t\tStatics: {\n\t\t\t/**\n\t\t\t * Ok buttons constant.\n\t\t\t *\n\t\t\t * @static\n\t\t\t * @final\n\t\t\t * @field {Number} OK\n\t\t\t */\n\t\t\tOK: 1,\n\n\t\t\t/**\n\t\t\t * Ok/cancel buttons constant.\n\t\t\t *\n\t\t\t * @static\n\t\t\t * @final\n\t\t\t * @field {Number} OK_CANCEL\n\t\t\t */\n\t\t\tOK_CANCEL: 2,\n\n\t\t\t/**\n\t\t\t * yes/no buttons constant.\n\t\t\t *\n\t\t\t * @static\n\t\t\t * @final\n\t\t\t * @field {Number} YES_NO\n\t\t\t */\n\t\t\tYES_NO: 3,\n\n\t\t\t/**\n\t\t\t * yes/no/cancel buttons constant.\n\t\t\t *\n\t\t\t * @static\n\t\t\t * @final\n\t\t\t * @field {Number} YES_NO_CANCEL\n\t\t\t */\n\t\t\tYES_NO_CANCEL: 4,\n\n\t\t\t/**\n\t\t\t * Constructs a new message box and renders it to the body element.\n\t\t\t *\n\t\t\t * @static\n\t\t\t * @method msgBox\n\t\t\t * @param {Object} settings Name/value object with settings.\n\t\t\t */\n\t\t\tmsgBox: function(settings) {\n\t\t\t\tvar buttons, callback = settings.callback || function() {};\n\n\t\t\t\tfunction createButton(text, status, primary) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\ttext: text,\n\t\t\t\t\t\tsubtype: primary ? 'primary' : '',\n\t\t\t\t\t\tonClick: function(e) {\n\t\t\t\t\t\t\te.control.parents()[1].close();\n\t\t\t\t\t\t\tcallback(status);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tswitch (settings.buttons) {\n\t\t\t\t\tcase MessageBox.OK_CANCEL:\n\t\t\t\t\t\tbuttons = [\n\t\t\t\t\t\t\tcreateButton('Ok', true, true),\n\t\t\t\t\t\t\tcreateButton('Cancel', false)\n\t\t\t\t\t\t];\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase MessageBox.YES_NO:\n\t\t\t\t\tcase MessageBox.YES_NO_CANCEL:\n\t\t\t\t\t\tbuttons = [\n\t\t\t\t\t\t\tcreateButton('Yes', 1, true),\n\t\t\t\t\t\t\tcreateButton('No', 0)\n\t\t\t\t\t\t];\n\n\t\t\t\t\t\tif (settings.buttons == MessageBox.YES_NO_CANCEL) {\n\t\t\t\t\t\t\tbuttons.push(createButton('Cancel', -1));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbuttons = [\n\t\t\t\t\t\t\tcreateButton('Ok', true, true)\n\t\t\t\t\t\t];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\treturn new Window({\n\t\t\t\t\tpadding: 20,\n\t\t\t\t\tx: settings.x,\n\t\t\t\t\ty: settings.y,\n\t\t\t\t\tminWidth: 300,\n\t\t\t\t\tminHeight: 100,\n\t\t\t\t\tlayout: \"flex\",\n\t\t\t\t\tpack: \"center\",\n\t\t\t\t\talign: \"center\",\n\t\t\t\t\tbuttons: buttons,\n\t\t\t\t\ttitle: settings.title,\n\t\t\t\t\trole: 'alertdialog',\n\t\t\t\t\titems: {\n\t\t\t\t\t\ttype: \"label\",\n\t\t\t\t\t\tmultiline: true,\n\t\t\t\t\t\tmaxWidth: 500,\n\t\t\t\t\t\tmaxHeight: 200,\n\t\t\t\t\t\ttext: settings.text\n\t\t\t\t\t},\n\t\t\t\t\tonPostRender: function() {\n\t\t\t\t\t\tthis.aria('describedby', this.items()[0]._id);\n\t\t\t\t\t},\n\t\t\t\t\tonClose: settings.onClose,\n\t\t\t\t\tonCancel: function() {\n\t\t\t\t\t\tcallback(false);\n\t\t\t\t\t}\n\t\t\t\t}).renderTo(document.body).reflow();\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Creates a new alert dialog.\n\t\t\t *\n\t\t\t * @method alert\n\t\t\t * @param {Object} settings Settings for the alert dialog.\n\t\t\t * @param {function} [callback] Callback to execute when the user makes a choice.\n\t\t\t */\n\t\t\talert: function(settings, callback) {\n\t\t\t\tif (typeof settings == \"string\") {\n\t\t\t\t\tsettings = {text: settings};\n\t\t\t\t}\n\n\t\t\t\tsettings.callback = callback;\n\t\t\t\treturn MessageBox.msgBox(settings);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Creates a new confirm dialog.\n\t\t\t *\n\t\t\t * @method confirm\n\t\t\t * @param {Object} settings Settings for the confirm dialog.\n\t\t\t * @param {function} [callback] Callback to execute when the user makes a choice.\n\t\t\t */\n\t\t\tconfirm: function(settings, callback) {\n\t\t\t\tif (typeof settings == \"string\") {\n\t\t\t\t\tsettings = {text: settings};\n\t\t\t\t}\n\n\t\t\t\tsettings.callback = callback;\n\t\t\t\tsettings.buttons = MessageBox.OK_CANCEL;\n\n\t\t\t\treturn MessageBox.msgBox(settings);\n\t\t\t}\n\t\t}\n\t});\n\n\treturn MessageBox;\n});\n\n// Included from: js/tinymce/classes/WindowManager.js\n\n/**\n * WindowManager.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class handles the creation of native windows and dialogs. This class can be extended to provide for example inline dialogs.\n *\n * @class tinymce.WindowManager\n * @example\n * // Opens a new dialog with the file.htm file and the size 320x240\n * // It also adds a custom parameter this can be retrieved by using tinyMCEPopup.getWindowArg inside the dialog.\n * tinymce.activeEditor.windowManager.open({\n * url: 'file.htm',\n * width: 320,\n * height: 240\n * }, {\n * custom_param: 1\n * });\n *\n * // Displays an alert box using the active editors window manager instance\n * tinymce.activeEditor.windowManager.alert('Hello world!');\n *\n * // Displays an confirm box and an alert message will be displayed depending on what you choose in the confirm\n * tinymce.activeEditor.windowManager.confirm(\"Do you want to do something\", function(s) {\n * if (s)\n * tinymce.activeEditor.windowManager.alert(\"Ok\");\n * else\n * tinymce.activeEditor.windowManager.alert(\"Cancel\");\n * });\n */\ndefine(\"tinymce/WindowManager\", [\n\t\"tinymce/ui/Window\",\n\t\"tinymce/ui/MessageBox\"\n], function(Window, MessageBox) {\n\treturn function(editor) {\n\t\tvar self = this, windows = [];\n\n\t\tfunction getTopMostWindow() {\n\t\t\tif (windows.length) {\n\t\t\t\treturn windows[windows.length - 1];\n\t\t\t}\n\t\t}\n\n\t\tfunction fireOpenEvent(win) {\n\t\t\teditor.fire('OpenWindow', {\n\t\t\t\twin: win\n\t\t\t});\n\t\t}\n\n\t\tfunction fireCloseEvent(win) {\n\t\t\teditor.fire('CloseWindow', {\n\t\t\t\twin: win\n\t\t\t});\n\t\t}\n\n\t\tself.windows = windows;\n\n\t\teditor.on('remove', function() {\n\t\t\tvar i = windows.length;\n\n\t\t\twhile (i--) {\n\t\t\t\twindows[i].close();\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * Opens a new window.\n\t\t *\n\t\t * @method open\n\t\t * @param {Object} args Optional name/value settings collection contains things like width/height/url etc.\n\t\t * @param {Object} params Options like title, file, width, height etc.\n\t\t * @option {String} title Window title.\n\t\t * @option {String} file URL of the file to open in the window.\n\t\t * @option {Number} width Width in pixels.\n\t\t * @option {Number} height Height in pixels.\n\t\t * @option {Boolean} autoScroll Specifies whether the popup window can have scrollbars if required (i.e. content\n\t\t * larger than the popup size specified).\n\t\t */\n\t\tself.open = function(args, params) {\n\t\t\tvar win;\n\n\t\t\teditor.editorManager.setActive(editor);\n\n\t\t\targs.title = args.title || ' ';\n\n\t\t\t// Handle URL\n\t\t\targs.url = args.url || args.file; // Legacy\n\t\t\tif (args.url) {\n\t\t\t\targs.width = parseInt(args.width || 320, 10);\n\t\t\t\targs.height = parseInt(args.height || 240, 10);\n\t\t\t}\n\n\t\t\t// Handle body\n\t\t\tif (args.body) {\n\t\t\t\targs.items = {\n\t\t\t\t\tdefaults: args.defaults,\n\t\t\t\t\ttype: args.bodyType || 'form',\n\t\t\t\t\titems: args.body,\n\t\t\t\t\tdata: args.data,\n\t\t\t\t\tcallbacks: args.commands\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (!args.url && !args.buttons) {\n\t\t\t\targs.buttons = [\n\t\t\t\t\t{text: 'Ok', subtype: 'primary', onclick: function() {\n\t\t\t\t\t\twin.find('form')[0].submit();\n\t\t\t\t\t}},\n\n\t\t\t\t\t{text: 'Cancel', onclick: function() {\n\t\t\t\t\t\twin.close();\n\t\t\t\t\t}}\n\t\t\t\t];\n\t\t\t}\n\n\t\t\twin = new Window(args);\n\t\t\twindows.push(win);\n\n\t\t\twin.on('close', function() {\n\t\t\t\tvar i = windows.length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tif (windows[i] === win) {\n\t\t\t\t\t\twindows.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!windows.length) {\n\t\t\t\t\teditor.focus();\n\t\t\t\t}\n\n\t\t\t\tfireCloseEvent(win);\n\t\t\t});\n\n\t\t\t// Handle data\n\t\t\tif (args.data) {\n\t\t\t\twin.on('postRender', function() {\n\t\t\t\t\tthis.find('*').each(function(ctrl) {\n\t\t\t\t\t\tvar name = ctrl.name();\n\n\t\t\t\t\t\tif (name in args.data) {\n\t\t\t\t\t\t\tctrl.value(args.data[name]);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// store args and parameters\n\t\t\twin.features = args || {};\n\t\t\twin.params = params || {};\n\n\t\t\t// Takes a snapshot in the FocusManager of the selection before focus is lost to dialog\n\t\t\tif (windows.length === 1) {\n\t\t\t\teditor.nodeChanged();\n\t\t\t}\n\n\t\t\twin = win.renderTo().reflow();\n\n\t\t\tfireOpenEvent(win);\n\n\t\t\treturn win;\n\t\t};\n\n\t\t/**\n\t\t * Creates a alert dialog. Please don't use the blocking behavior of this\n\t\t * native version use the callback method instead then it can be extended.\n\t\t *\n\t\t * @method alert\n\t\t * @param {String} message Text to display in the new alert dialog.\n\t\t * @param {function} callback Callback function to be executed after the user has selected ok.\n\t\t * @param {Object} scope Optional scope to execute the callback in.\n\t\t * @example\n\t\t * // Displays an alert box using the active editors window manager instance\n\t\t * tinymce.activeEditor.windowManager.alert('Hello world!');\n\t\t */\n\t\tself.alert = function(message, callback, scope) {\n\t\t\tvar win;\n\n\t\t\twin = MessageBox.alert(message, function() {\n\t\t\t\tif (callback) {\n\t\t\t\t\tcallback.call(scope || this);\n\t\t\t\t} else {\n\t\t\t\t\teditor.focus();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\twin.on('close', function() {\n\t\t\t\tfireCloseEvent(win);\n\t\t\t});\n\n\t\t\tfireOpenEvent(win);\n\t\t};\n\n\t\t/**\n\t\t * Creates a confirm dialog. Please don't use the blocking behavior of this\n\t\t * native version use the callback method instead then it can be extended.\n\t\t *\n\t\t * @method confirm\n\t\t * @param {String} message Text to display in the new confirm dialog.\n\t\t * @param {function} callback Callback function to be executed after the user has selected ok or cancel.\n\t\t * @param {Object} scope Optional scope to execute the callback in.\n\t\t * @example\n\t\t * // Displays an confirm box and an alert message will be displayed depending on what you choose in the confirm\n\t\t * tinymce.activeEditor.windowManager.confirm(\"Do you want to do something\", function(s) {\n\t\t * if (s)\n\t\t * tinymce.activeEditor.windowManager.alert(\"Ok\");\n\t\t * else\n\t\t * tinymce.activeEditor.windowManager.alert(\"Cancel\");\n\t\t * });\n\t\t */\n\t\tself.confirm = function(message, callback, scope) {\n\t\t\tvar win;\n\n\t\t\twin = MessageBox.confirm(message, function(state) {\n\t\t\t\tcallback.call(scope || this, state);\n\t\t\t});\n\n\t\t\twin.on('close', function() {\n\t\t\t\tfireCloseEvent(win);\n\t\t\t});\n\n\t\t\tfireOpenEvent(win);\n\t\t};\n\n\t\t/**\n\t\t * Closes the top most window.\n\t\t *\n\t\t * @method close\n\t\t */\n\t\tself.close = function() {\n\t\t\tif (getTopMostWindow()) {\n\t\t\t\tgetTopMostWindow().close();\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Returns the params of the last window open call. This can be used in iframe based\n\t\t * dialog to get params passed from the tinymce plugin.\n\t\t *\n\t\t * @example\n\t\t * var dialogArguments = top.tinymce.activeEditor.windowManager.getParams();\n\t\t *\n\t\t * @method getParams\n\t\t * @return {Object} Name/value object with parameters passed from windowManager.open call.\n\t\t */\n\t\tself.getParams = function() {\n\t\t\treturn getTopMostWindow() ? getTopMostWindow().params : null;\n\t\t};\n\n\t\t/**\n\t\t * Sets the params of the last opened window.\n\t\t *\n\t\t * @method setParams\n\t\t * @param {Object} params Params object to set for the last opened window.\n\t\t */\n\t\tself.setParams = function(params) {\n\t\t\tif (getTopMostWindow()) {\n\t\t\t\tgetTopMostWindow().params = params;\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Returns the currently opened window objects.\n\t\t *\n\t\t * @method getWindows\n\t\t * @return {Array} Array of the currently opened windows.\n\t\t */\n\t\tself.getWindows = function() {\n\t\t\treturn windows;\n\t\t};\n\t};\n});\n\n// Included from: js/tinymce/classes/ui/Tooltip.js\n\n/**\n * Tooltip.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a tooltip instance.\n *\n * @-x-less ToolTip.less\n * @class tinymce.ui.ToolTip\n * @extends tinymce.ui.Control\n * @mixes tinymce.ui.Movable\n */\ndefine(\"tinymce/ui/Tooltip\", [\n\t\"tinymce/ui/Control\",\n\t\"tinymce/ui/Movable\"\n], function(Control, Movable) {\n\treturn Control.extend({\n\t\tMixins: [Movable],\n\n\t\tDefaults: {\n\t\t\tclasses: 'widget tooltip tooltip-n'\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, prefix = self.classPrefix;\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t'
      ' + self.encode(self.state.get('text')) + '
      ' +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.state.on('change:text', function(e) {\n\t\t\t\tself.getEl().lastChild.innerHTML = self.encode(e.value);\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t},\n\n\t\t/**\n\t\t * Repaints the control after a layout operation.\n\t\t *\n\t\t * @method repaint\n\t\t */\n\t\trepaint: function() {\n\t\t\tvar self = this, style, rect;\n\n\t\t\tstyle = self.getEl().style;\n\t\t\trect = self._layoutRect;\n\n\t\t\tstyle.left = rect.x + 'px';\n\t\t\tstyle.top = rect.y + 'px';\n\t\t\tstyle.zIndex = 0xFFFF + 0xFFFF;\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Widget.js\n\n/**\n * Widget.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Widget base class a widget is a control that has a tooltip and some basic states.\n *\n * @class tinymce.ui.Widget\n * @extends tinymce.ui.Control\n */\ndefine(\"tinymce/ui/Widget\", [\n\t\"tinymce/ui/Control\",\n\t\"tinymce/ui/Tooltip\"\n], function(Control, Tooltip) {\n\t\"use strict\";\n\n\tvar tooltip;\n\n\tvar Widget = Control.extend({\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {String} tooltip Tooltip text to display when hovering.\n\t\t * @setting {Boolean} autofocus True if the control should be focused when rendered.\n\t\t * @setting {String} text Text to display inside widget.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\t\t\tsettings = self.settings;\n\t\t\tself.canFocus = true;\n\n\t\t\tif (settings.tooltip && Widget.tooltips !== false) {\n\t\t\t\tself.on('mouseenter', function(e) {\n\t\t\t\t\tvar tooltip = self.tooltip().moveTo(-0xFFFF);\n\n\t\t\t\t\tif (e.control == self) {\n\t\t\t\t\t\tvar rel = tooltip.text(settings.tooltip).show().testMoveRel(self.getEl(), ['bc-tc', 'bc-tl', 'bc-tr']);\n\n\t\t\t\t\t\ttooltip.classes.toggle('tooltip-n', rel == 'bc-tc');\n\t\t\t\t\t\ttooltip.classes.toggle('tooltip-nw', rel == 'bc-tl');\n\t\t\t\t\t\ttooltip.classes.toggle('tooltip-ne', rel == 'bc-tr');\n\n\t\t\t\t\t\ttooltip.moveRel(self.getEl(), rel);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttooltip.hide();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tself.on('mouseleave mousedown click', function() {\n\t\t\t\t\tself.tooltip().hide();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tself.aria('label', settings.ariaLabel || settings.tooltip);\n\t\t},\n\n\t\t/**\n\t\t * Returns the current tooltip instance.\n\t\t *\n\t\t * @method tooltip\n\t\t * @return {tinymce.ui.Tooltip} Tooltip instance.\n\t\t */\n\t\ttooltip: function() {\n\t\t\tif (!tooltip) {\n\t\t\t\ttooltip = new Tooltip({type: 'tooltip'});\n\t\t\t\ttooltip.renderTo();\n\t\t\t}\n\n\t\t\treturn tooltip;\n\t\t},\n\n\t\t/**\n\t\t * Called after the control has been rendered.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this, settings = self.settings;\n\n\t\t\tself._super();\n\n\t\t\tif (!self.parent() && (settings.width || settings.height)) {\n\t\t\t\tself.initLayoutRect();\n\t\t\t\tself.repaint();\n\t\t\t}\n\n\t\t\tif (settings.autofocus) {\n\t\t\t\tself.focus();\n\t\t\t}\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tfunction disable(state) {\n\t\t\t\tself.aria('disabled', state);\n\t\t\t\tself.classes.toggle('disabled', state);\n\t\t\t}\n\n\t\t\tfunction active(state) {\n\t\t\t\tself.aria('pressed', state);\n\t\t\t\tself.classes.toggle('active', state);\n\t\t\t}\n\n\t\t\tself.state.on('change:disabled', function(e) {\n\t\t\t\tdisable(e.value);\n\t\t\t});\n\n\t\t\tself.state.on('change:active', function(e) {\n\t\t\t\tactive(e.value);\n\t\t\t});\n\n\t\t\tif (self.state.get('disabled')) {\n\t\t\t\tdisable(true);\n\t\t\t}\n\n\t\t\tif (self.state.get('active')) {\n\t\t\t\tactive(true);\n\t\t\t}\n\n\t\t\treturn self._super();\n\t\t},\n\n\t\t/**\n\t\t * Removes the current control from DOM and from UI collections.\n\t\t *\n\t\t * @method remove\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tremove: function() {\n\t\t\tthis._super();\n\n\t\t\tif (tooltip) {\n\t\t\t\ttooltip.remove();\n\t\t\t\ttooltip = null;\n\t\t\t}\n\t\t}\n\t});\n\n\treturn Widget;\n});\n\n// Included from: js/tinymce/classes/ui/Progress.js\n\n/**\n * Progress.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Progress control.\n *\n * @-x-less Progress.less\n * @class tinymce.ui.Progress\n * @extends tinymce.ui.Control\n */\ndefine(\"tinymce/ui/Progress\", [\n\t\"tinymce/ui/Widget\"\n], function(Widget) {\n\t\"use strict\";\n\n\treturn Widget.extend({\n\t\tDefaults: {\n\t\t\tvalue: 0\n\t\t},\n\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\t\t\tself.classes.add('progress');\n\n\t\t\tif (!self.settings.filter) {\n\t\t\t\tself.settings.filter = function(value) {\n\t\t\t\t\treturn Math.round(value);\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\n\t\trenderHtml: function() {\n\t\t\tvar self = this, id = self._id, prefix = this.classPrefix;\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\t'
      ' +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t'
      0%
      ' +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t},\n\n\t\tpostRender: function() {\n\t\t\tvar self = this;\n\n\t\t\tself._super();\n\t\t\tself.value(self.settings.value);\n\n\t\t\treturn self;\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tfunction setValue(value) {\n\t\t\t\tvalue = self.settings.filter(value);\n\t\t\t\tself.getEl().lastChild.innerHTML = value + '%';\n\t\t\t\tself.getEl().firstChild.firstChild.style.width = value + '%';\n\t\t\t}\n\n\t\t\tself.state.on('change:value', function(e) {\n\t\t\t\tsetValue(e.value);\n\t\t\t});\n\n\t\t\tsetValue(self.state.get('value'));\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Notification.js\n\n/**\n * Notification.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a notification instance.\n *\n * @-x-less Notification.less\n * @class tinymce.ui.Notification\n * @extends tinymce.ui.Container\n * @mixes tinymce.ui.Movable\n */\ndefine(\"tinymce/ui/Notification\", [\n\t\"tinymce/ui/Control\",\n\t\"tinymce/ui/Movable\",\n\t\"tinymce/ui/Progress\",\n\t\"tinymce/util/Delay\"\n], function(Control, Movable, Progress, Delay) {\n\treturn Control.extend({\n\t\tMixins: [Movable],\n\n\t\tDefaults: {\n\t\t\tclasses: 'widget notification'\n\t\t},\n\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\n\t\t\tif (settings.text) {\n\t\t\t\tself.text(settings.text);\n\t\t\t}\n\n\t\t\tif (settings.icon) {\n\t\t\t\tself.icon = settings.icon;\n\t\t\t}\n\n\t\t\tif (settings.color) {\n\t\t\t\tself.color = settings.color;\n\t\t\t}\n\n\t\t\tif (settings.type) {\n\t\t\t\tself.classes.add('notification-' + settings.type);\n\t\t\t}\n\n\t\t\tif (settings.timeout && (settings.timeout < 0 || settings.timeout > 0) && !settings.closeButton) {\n\t\t\t\tself.closeButton = false;\n\t\t\t} else {\n\t\t\t\tself.classes.add('has-close');\n\t\t\t\tself.closeButton = true;\n\t\t\t}\n\n\t\t\tif (settings.progressBar) {\n\t\t\t\tself.progressBar = new Progress();\n\t\t\t}\n\n\t\t\tself.on('click', function(e) {\n\t\t\t\tif (e.target.className.indexOf(self.classPrefix + 'close') != -1) {\n\t\t\t\t\tself.close();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, prefix = self.classPrefix, icon = '', closeButton = '', progressBar = '', notificationStyle = '';\n\n\t\t\tif (self.icon) {\n\t\t\t\ticon = '';\n\t\t\t}\n\n\t\t\tif (self.color) {\n\t\t\t\tnotificationStyle = ' style=\"background-color: ' + self.color + '\"';\n\t\t\t}\n\n\t\t\tif (self.closeButton) {\n\t\t\t\tcloseButton = '';\n\t\t\t}\n\n\t\t\tif (self.progressBar) {\n\t\t\t\tprogressBar = self.progressBar.renderHtml();\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\ticon +\n\t\t\t\t\t'
      ' + self.state.get('text') + '
      ' +\n\t\t\t\t\tprogressBar +\n\t\t\t\t\tcloseButton +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t},\n\n\t\tpostRender: function() {\n\t\t\tvar self = this;\n\n\t\t\tDelay.setTimeout(function() {\n\t\t\t\tself.$el.addClass(self.classPrefix + 'in');\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.state.on('change:text', function(e) {\n\t\t\t\tself.getEl().childNodes[1].innerHTML = e.value;\n\t\t\t});\n\t\t\tif (self.progressBar) {\n\t\t\t\tself.progressBar.bindStates();\n\t\t\t}\n\t\t\treturn self._super();\n\t\t},\n\n\t\tclose: function() {\n\t\t\tvar self = this;\n\n\t\t\tif (!self.fire('close').isDefaultPrevented()) {\n\t\t\t\tself.remove();\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Repaints the control after a layout operation.\n\t\t *\n\t\t * @method repaint\n\t\t */\n\t\trepaint: function() {\n\t\t\tvar self = this, style, rect;\n\n\t\t\tstyle = self.getEl().style;\n\t\t\trect = self._layoutRect;\n\n\t\t\tstyle.left = rect.x + 'px';\n\t\t\tstyle.top = rect.y + 'px';\n\n\t\t\t// Hardcoded arbitrary z-value because we want the\n\t\t\t// notifications under the other windows\n\t\t\tstyle.zIndex = 0xFFFF - 1;\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/NotificationManager.js\n\n/**\n * NotificationManager.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class handles the creation of TinyMCE's notifications.\n *\n * @class tinymce.notificationManager\n * @example\n * // Opens a new notification of type \"error\" with text \"An error occurred.\"\n * tinymce.activeEditor.notificationManager.open({\n * text: 'An error occurred.',\n * type: 'error'\n * });\n */\ndefine(\"tinymce/NotificationManager\", [\n\t\"tinymce/ui/Notification\",\n\t\"tinymce/util/Delay\",\n\t\"tinymce/util/Tools\"\n], function(Notification, Delay, Tools) {\n\treturn function(editor) {\n\t\tvar self = this, notifications = [];\n\n\t\tfunction getLastNotification() {\n\t\t\tif (notifications.length) {\n\t\t\t\treturn notifications[notifications.length - 1];\n\t\t\t}\n\t\t}\n\n\t\tself.notifications = notifications;\n\n\t\tfunction resizeWindowEvent() {\n\t\t\tDelay.requestAnimationFrame(function() {\n\t\t\t\tprePositionNotifications();\n\t\t\t\tpositionNotifications();\n\t\t\t});\n\t\t}\n\n\t\t// Since the viewport will change based on the present notifications, we need to move them all to the\n\t\t// top left of the viewport to give an accurate size measurement so we can position them later.\n\t\tfunction prePositionNotifications() {\n\t\t\tfor (var i = 0; i < notifications.length; i++) {\n\t\t\t\tnotifications[i].moveTo(0, 0);\n\t\t\t}\n\t\t}\n\n\t\tfunction positionNotifications() {\n\t\t\tif (notifications.length > 0) {\n\t\t\t\tvar firstItem = notifications.slice(0, 1)[0];\n\t\t\t\tvar container = editor.inline ? editor.getElement() : editor.getContentAreaContainer();\n\t\t\t\tfirstItem.moveRel(container, 'tc-tc');\n\t\t\t\tif (notifications.length > 1) {\n\t\t\t\t\tfor (var i = 1; i < notifications.length; i++) {\n\t\t\t\t\t\tnotifications[i].moveRel(notifications[i - 1].getEl(), 'bc-tc');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\teditor.on('remove', function() {\n\t\t\tvar i = notifications.length;\n\n\t\t\twhile (i--) {\n\t\t\t\tnotifications[i].close();\n\t\t\t}\n\t\t});\n\n\t\teditor.on('ResizeEditor', positionNotifications);\n\t\teditor.on('ResizeWindow', resizeWindowEvent);\n\n\t\t/**\n\t\t * Opens a new notification.\n\t\t *\n\t\t * @method open\n\t\t * @param {Object} args Optional name/value settings collection contains things like timeout/color/message etc.\n\t\t */\n\t\tself.open = function(args) {\n\t\t\t// Never open notification if editor has been removed.\n\t\t\tif (editor.removed) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar notif;\n\n\t\t\teditor.editorManager.setActive(editor);\n\n\t\t\tvar duplicate = findDuplicateMessage(notifications, args);\n\n\t\t\tif (duplicate === null) {\n\t\t\t\tnotif = new Notification(args);\n\t\t\t\tnotifications.push(notif);\n\n\t\t\t\t//If we have a timeout value\n\t\t\t\tif (args.timeout > 0) {\n\t\t\t\t\t\tnotif.timer = setTimeout(function() {\n\t\t\t\t\t\t\tnotif.close();\n\t\t\t\t\t\t}, args.timeout);\n\t\t\t\t}\n\n\t\t\t\tnotif.on('close', function() {\n\t\t\t\t\tvar i = notifications.length;\n\n\t\t\t\t\tif (notif.timer) {\n\t\t\t\t\t\teditor.getWin().clearTimeout(notif.timer);\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tif (notifications[i] === notif) {\n\t\t\t\t\t\t\tnotifications.splice(i, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tpositionNotifications();\n\t\t\t\t});\n\n\t\t\t\tnotif.renderTo();\n\n\t\t\t\tpositionNotifications();\n\t\t\t} else {\n\t\t\t\tnotif = duplicate;\n\t\t\t}\n\n\t\t\treturn notif;\n\t\t};\n\n\t\t/**\n\t\t * Closes the top most notification.\n\t\t *\n\t\t * @method close\n\t\t */\n\t\tself.close = function() {\n\t\t\tif (getLastNotification()) {\n\t\t\t\tgetLastNotification().close();\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Returns the currently opened notification objects.\n\t\t *\n\t\t * @method getNotifications\n\t\t * @return {Array} Array of the currently opened notifications.\n\t\t */\n\t\tself.getNotifications = function() {\n\t\t\treturn notifications;\n\t\t};\n\n\t\teditor.on('SkinLoaded', function() {\n\t\t\tvar serviceMessage = editor.settings.service_message;\n\n\t\t\tif (serviceMessage) {\n\t\t\t\teditor.notificationManager.open({\n\t\t\t\t\ttext: serviceMessage,\n\t\t\t\t\ttype: 'warning',\n\t\t\t\t\ttimeout: 0,\n\t\t\t\t\ticon: ''\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * Finds any existing notification with the same properties as the new one.\n\t\t * Returns either the found notification or null.\n\t\t *\n\t\t * @param {Notification[]} notificationArray - Array of current notifications\n\t\t * @param {type: string, } newNotification - New notification object\n\t\t * @returns {?Notification}\n\t\t */\n\t\tfunction findDuplicateMessage(notificationArray, newNotification) {\n\t\t\tif (!isPlainTextNotification(newNotification)) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar filteredNotifications = Tools.grep(notificationArray, function (notification) {\n\t\t\t\treturn isSameNotification(newNotification, notification);\n\t\t\t});\n\n\t\t\treturn filteredNotifications.length === 0 ? null : filteredNotifications[0];\n\t\t}\n\n\t\t/**\n\t\t * Checks if the passed in args object has the same\n\t\t * type and text properties as the sent in notification.\n\t\t *\n\t\t * @param {type: string, text: string} a - New notification args object\n\t\t * @param {Notification} b - Old notification\n\t\t * @returns {boolean}\n\t\t */\n\t\tfunction isSameNotification(a, b) {\n\t\t\treturn a.type === b.settings.type && a.text === b.settings.text;\n\t\t}\n\n\t\t/**\n\t\t * Checks that the notification does not have a progressBar\n\t\t * or timeour property.\n\t\t *\n\t\t * @param {Notification} notification - Notification to check\n\t\t * @returns {boolean}\n\t\t */\n\t\tfunction isPlainTextNotification(notification) {\n\t\t\treturn !notification.progressBar && !notification.timeout;\n\t\t}\n\n\t\t//self.positionNotifications = positionNotifications;\n\t};\n});\n\n// Included from: js/tinymce/classes/dom/NodePath.js\n\n/**\n * NodePath.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Handles paths of nodes within an element.\n *\n * @private\n * @class tinymce.dom.NodePath\n */\ndefine(\"tinymce/dom/NodePath\", [\n\t\"tinymce/dom/DOMUtils\"\n], function(DOMUtils) {\n\tfunction create(rootNode, targetNode, normalized) {\n\t\tvar path = [];\n\n\t\tfor (; targetNode && targetNode != rootNode; targetNode = targetNode.parentNode) {\n\t\t\tpath.push(DOMUtils.nodeIndex(targetNode, normalized));\n\t\t}\n\n\t\treturn path;\n\t}\n\n\tfunction resolve(rootNode, path) {\n\t\tvar i, node, children;\n\n\t\tfor (node = rootNode, i = path.length - 1; i >= 0; i--) {\n\t\t\tchildren = node.childNodes;\n\n\t\t\tif (path[i] > children.length - 1) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tnode = children[path[i]];\n\t\t}\n\n\t\treturn node;\n\t}\n\n\treturn {\n\t\tcreate: create,\n\t\tresolve: resolve\n\t};\n});\n\n// Included from: js/tinymce/classes/util/Quirks.js\n\n/**\n * Quirks.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n *\n * @ignore-file\n */\n\n/**\n * This file includes fixes for various browser quirks it's made to make it easy to add/remove browser specific fixes.\n *\n * @private\n * @class tinymce.util.Quirks\n */\ndefine(\"tinymce/util/Quirks\", [\n\t\"tinymce/util/VK\",\n\t\"tinymce/dom/RangeUtils\",\n\t\"tinymce/dom/TreeWalker\",\n\t\"tinymce/dom/NodePath\",\n\t\"tinymce/html/Node\",\n\t\"tinymce/html/Entities\",\n\t\"tinymce/Env\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/util/Delay\",\n\t\"tinymce/caret/CaretContainer\",\n\t\"tinymce/caret/CaretPosition\",\n\t\"tinymce/caret/CaretWalker\"\n], function(VK, RangeUtils, TreeWalker, NodePath, Node, Entities, Env, Tools, Delay, CaretContainer, CaretPosition, CaretWalker) {\n\treturn function(editor) {\n\t\tvar each = Tools.each, $ = editor.$;\n\t\tvar BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE, dom = editor.dom, selection = editor.selection,\n\t\t\tsettings = editor.settings, parser = editor.parser, serializer = editor.serializer;\n\t\tvar isGecko = Env.gecko, isIE = Env.ie, isWebKit = Env.webkit;\n\t\tvar mceInternalUrlPrefix = 'data:text/mce-internal,';\n\t\tvar mceInternalDataType = isIE ? 'Text' : 'URL';\n\n\t\t/**\n\t\t * Executes a command with a specific state this can be to enable/disable browser editing features.\n\t\t */\n\t\tfunction setEditorCommandState(cmd, state) {\n\t\t\ttry {\n\t\t\t\teditor.getDoc().execCommand(cmd, false, state);\n\t\t\t} catch (ex) {\n\t\t\t\t// Ignore\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Returns current IE document mode.\n\t\t */\n\t\tfunction getDocumentMode() {\n\t\t\tvar documentMode = editor.getDoc().documentMode;\n\n\t\t\treturn documentMode ? documentMode : 6;\n\t\t}\n\n\t\t/**\n\t\t * Returns true/false if the event is prevented or not.\n\t\t *\n\t\t * @private\n\t\t * @param {Event} e Event object.\n\t\t * @return {Boolean} true/false if the event is prevented or not.\n\t\t */\n\t\tfunction isDefaultPrevented(e) {\n\t\t\treturn e.isDefaultPrevented();\n\t\t}\n\n\t\t/**\n\t\t * Sets Text/URL data on the event's dataTransfer object to a special data:text/mce-internal url.\n\t\t * This is to workaround the inability to set custom contentType on IE and Safari.\n\t\t * The editor's selected content is encoded into this url so drag and drop between editors will work.\n\t\t *\n\t\t * @private\n\t\t * @param {DragEvent} e Event object\n\t\t */\n\t\tfunction setMceInternalContent(e) {\n\t\t\tvar selectionHtml, internalContent;\n\n\t\t\tif (e.dataTransfer) {\n\t\t\t\tif (editor.selection.isCollapsed() && e.target.tagName == 'IMG') {\n\t\t\t\t\tselection.select(e.target);\n\t\t\t\t}\n\n\t\t\t\tselectionHtml = editor.selection.getContent();\n\n\t\t\t\t// Safari/IE doesn't support custom dataTransfer items so we can only use URL and Text\n\t\t\t\tif (selectionHtml.length > 0) {\n\t\t\t\t\tinternalContent = mceInternalUrlPrefix + escape(editor.id) + ',' + escape(selectionHtml);\n\t\t\t\t\te.dataTransfer.setData(mceInternalDataType, internalContent);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Gets content of special data:text/mce-internal url on the event's dataTransfer object.\n\t\t * This is to workaround the inability to set custom contentType on IE and Safari.\n\t\t * The editor's selected content is encoded into this url so drag and drop between editors will work.\n\t\t *\n\t\t * @private\n\t\t * @param {DragEvent} e Event object\n\t\t * @returns {String} mce-internal content\n\t\t */\n\t\tfunction getMceInternalContent(e) {\n\t\t\tvar internalContent;\n\n\t\t\tif (e.dataTransfer) {\n\t\t\t\tinternalContent = e.dataTransfer.getData(mceInternalDataType);\n\n\t\t\t\tif (internalContent && internalContent.indexOf(mceInternalUrlPrefix) >= 0) {\n\t\t\t\t\tinternalContent = internalContent.substr(mceInternalUrlPrefix.length).split(',');\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tid: unescape(internalContent[0]),\n\t\t\t\t\t\thtml: unescape(internalContent[1])\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n\t\t * Inserts contents using the paste clipboard command if it's available if it isn't it will fallback\n\t\t * to the core command.\n\t\t *\n\t\t * @private\n\t\t * @param {String} content Content to insert at selection.\n\t\t */\n\t\tfunction insertClipboardContents(content) {\n\t\t\tif (editor.queryCommandSupported('mceInsertClipboardContent')) {\n\t\t\t\teditor.execCommand('mceInsertClipboardContent', false, {content: content});\n\t\t\t} else {\n\t\t\t\teditor.execCommand('mceInsertContent', false, content);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fixes a WebKit bug when deleting contents using backspace or delete key.\n\t\t * WebKit will produce a span element if you delete across two block elements.\n\t\t *\n\t\t * Example:\n\t\t *

      a

      |b

      \n\t\t *\n\t\t * Will produce this on backspace:\n\t\t *

      a\">b

      \n\t\t *\n\t\t * This fixes the backspace to produce:\n\t\t *

      a|b

      \n\t\t *\n\t\t * See bug: https://bugs.webkit.org/show_bug.cgi?id=45784\n\t\t *\n\t\t * This fixes the following delete scenarios:\n\t\t * 1. Delete by pressing backspace key.\n\t\t * 2. Delete by pressing delete key.\n\t\t * 3. Delete by pressing backspace key with ctrl/cmd (Word delete).\n\t\t * 4. Delete by pressing delete key with ctrl/cmd (Word delete).\n\t\t * 5. Delete by drag/dropping contents inside the editor.\n\t\t * 6. Delete by using Cut Ctrl+X/Cmd+X.\n\t\t * 7. Delete by selecting contents and writing a character.\n\t\t *\n\t\t * This code is a ugly hack since writing full custom delete logic for just this bug\n\t\t * fix seemed like a huge task. I hope we can remove this before the year 2030.\n\t\t */\n\t\tfunction cleanupStylesWhenDeleting() {\n\t\t\tvar doc = editor.getDoc(), dom = editor.dom, selection = editor.selection;\n\t\t\tvar MutationObserver = window.MutationObserver, olderWebKit, dragStartRng;\n\n\t\t\t// Add mini polyfill for older WebKits\n\t\t\t// TODO: Remove this when old Safari versions gets updated\n\t\t\tif (!MutationObserver) {\n\t\t\t\tolderWebKit = true;\n\n\t\t\t\tMutationObserver = function() {\n\t\t\t\t\tvar records = [], target;\n\n\t\t\t\t\tfunction nodeInsert(e) {\n\t\t\t\t\t\tvar target = e.relatedNode || e.target;\n\t\t\t\t\t\trecords.push({target: target, addedNodes: [target]});\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction attrModified(e) {\n\t\t\t\t\t\tvar target = e.relatedNode || e.target;\n\t\t\t\t\t\trecords.push({target: target, attributeName: e.attrName});\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.observe = function(node) {\n\t\t\t\t\t\ttarget = node;\n\t\t\t\t\t\ttarget.addEventListener('DOMSubtreeModified', nodeInsert, false);\n\t\t\t\t\t\ttarget.addEventListener('DOMNodeInsertedIntoDocument', nodeInsert, false);\n\t\t\t\t\t\ttarget.addEventListener('DOMNodeInserted', nodeInsert, false);\n\t\t\t\t\t\ttarget.addEventListener('DOMAttrModified', attrModified, false);\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.disconnect = function() {\n\t\t\t\t\t\ttarget.removeEventListener('DOMSubtreeModified', nodeInsert, false);\n\t\t\t\t\t\ttarget.removeEventListener('DOMNodeInsertedIntoDocument', nodeInsert, false);\n\t\t\t\t\t\ttarget.removeEventListener('DOMNodeInserted', nodeInsert, false);\n\t\t\t\t\t\ttarget.removeEventListener('DOMAttrModified', attrModified, false);\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.takeRecords = function() {\n\t\t\t\t\t\treturn records;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tfunction isTrailingBr(node) {\n\t\t\t\tvar blockElements = dom.schema.getBlockElements(), rootNode = editor.getBody();\n\n\t\t\t\tif (node.nodeName != 'BR') {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tfor (; node != rootNode && !blockElements[node.nodeName]; node = node.parentNode) {\n\t\t\t\t\tif (node.nextSibling) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tfunction isSiblingsIgnoreWhiteSpace(node1, node2) {\n\t\t\t\tvar node;\n\n\t\t\t\tfor (node = node1.nextSibling; node && node != node2; node = node.nextSibling) {\n\t\t\t\t\tif (node.nodeType == 3 && $.trim(node.data).length === 0) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (node !== node2) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn node === node2;\n\t\t\t}\n\n\t\t\tfunction findCaretNode(node, forward, startNode) {\n\t\t\t\tvar walker, current, nonEmptyElements;\n\n\t\t\t\t// Protect against the possibility we are asked to find a caret node relative\n\t\t\t\t// to a node that is no longer in the DOM tree. In this case attempting to\n\t\t\t\t// select on any match leads to a scenario where selection is completely removed\n\t\t\t\t// from the editor. This scenario is met in real world at a minimum on\n\t\t\t\t// WebKit browsers when selecting all and Cmd-X cutting to delete content.\n\t\t\t\tif (!dom.isChildOf(node, editor.getBody())) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tnonEmptyElements = dom.schema.getNonEmptyElements();\n\n\t\t\t\twalker = new TreeWalker(startNode || node, node);\n\n\t\t\t\twhile ((current = walker[forward ? 'next' : 'prev']())) {\n\t\t\t\t\tif (nonEmptyElements[current.nodeName] && !isTrailingBr(current)) {\n\t\t\t\t\t\treturn current;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (current.nodeType == 3 && current.data.length > 0) {\n\t\t\t\t\t\treturn current;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction deleteRangeBetweenTextBlocks(rng) {\n\t\t\t\tvar startBlock, endBlock, caretNodeBefore, caretNodeAfter, textBlockElements;\n\n\t\t\t\tif (rng.collapsed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tstartBlock = dom.getParent(RangeUtils.getNode(rng.startContainer, rng.startOffset), dom.isBlock);\n\t\t\t\tendBlock = dom.getParent(RangeUtils.getNode(rng.endContainer, rng.endOffset), dom.isBlock);\n\t\t\t\ttextBlockElements = editor.schema.getTextBlockElements();\n\n\t\t\t\tif (startBlock == endBlock) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (!textBlockElements[startBlock.nodeName] || !textBlockElements[endBlock.nodeName]) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (dom.getContentEditable(startBlock) === \"false\" || dom.getContentEditable(endBlock) === \"false\") {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\trng.deleteContents();\n\n\t\t\t\tcaretNodeBefore = findCaretNode(startBlock, false);\n\t\t\t\tcaretNodeAfter = findCaretNode(endBlock, true);\n\n\t\t\t\tif (!dom.isEmpty(endBlock)) {\n\t\t\t\t\t$(startBlock).append(endBlock.childNodes);\n\t\t\t\t}\n\n\t\t\t\t$(endBlock).remove();\n\n\t\t\t\tif (caretNodeBefore) {\n\t\t\t\t\tif (caretNodeBefore.nodeType == 1) {\n\t\t\t\t\t\tif (caretNodeBefore.nodeName == \"BR\") {\n\t\t\t\t\t\t\trng.setStartBefore(caretNodeBefore);\n\t\t\t\t\t\t\trng.setEndBefore(caretNodeBefore);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setStartAfter(caretNodeBefore);\n\t\t\t\t\t\t\trng.setEndAfter(caretNodeBefore);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setStart(caretNodeBefore, caretNodeBefore.data.length);\n\t\t\t\t\t\trng.setEnd(caretNodeBefore, caretNodeBefore.data.length);\n\t\t\t\t\t}\n\t\t\t\t} else if (caretNodeAfter) {\n\t\t\t\t\tif (caretNodeAfter.nodeType == 1) {\n\t\t\t\t\t\trng.setStartBefore(caretNodeAfter);\n\t\t\t\t\t\trng.setEndBefore(caretNodeAfter);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setStart(caretNodeAfter, 0);\n\t\t\t\t\t\trng.setEnd(caretNodeAfter, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tselection.setRng(rng);\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tfunction expandBetweenBlocks(rng, isForward) {\n\t\t\t\tvar caretNode, targetCaretNode, textBlock, targetTextBlock, container, offset;\n\n\t\t\t\tif (!rng.collapsed) {\n\t\t\t\t\treturn rng;\n\t\t\t\t}\n\n\t\t\t\tcontainer = rng.startContainer;\n\t\t\t\toffset = rng.startOffset;\n\n\t\t\t\tif (container.nodeType == 3) {\n\t\t\t\t\tif (isForward) {\n\t\t\t\t\t\tif (offset < container.data.length) {\n\t\t\t\t\t\t\treturn rng;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (offset > 0) {\n\t\t\t\t\t\t\treturn rng;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcaretNode = RangeUtils.getNode(container, offset);\n\t\t\t\ttextBlock = dom.getParent(caretNode, dom.isBlock);\n\t\t\t\ttargetCaretNode = findCaretNode(editor.getBody(), isForward, caretNode);\n\t\t\t\ttargetTextBlock = dom.getParent(targetCaretNode, dom.isBlock);\n\t\t\t\tvar isAfter = container.nodeType === 1 && offset > container.childNodes.length - 1;\n\n\t\t\t\tif (!caretNode || !targetCaretNode) {\n\t\t\t\t\treturn rng;\n\t\t\t\t}\n\n\t\t\t\tif (targetTextBlock && textBlock != targetTextBlock) {\n\t\t\t\t\tif (!isForward) {\n\t\t\t\t\t\tif (!isSiblingsIgnoreWhiteSpace(targetTextBlock, textBlock)) {\n\t\t\t\t\t\t\treturn rng;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (targetCaretNode.nodeType == 1) {\n\t\t\t\t\t\t\tif (targetCaretNode.nodeName == \"BR\") {\n\t\t\t\t\t\t\t\trng.setStartBefore(targetCaretNode);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\trng.setStartAfter(targetCaretNode);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setStart(targetCaretNode, targetCaretNode.data.length);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (caretNode.nodeType == 1) {\n\t\t\t\t\t\t\tif (isAfter) {\n\t\t\t\t\t\t\t\trng.setEndAfter(caretNode);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\trng.setEndBefore(caretNode);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setEndBefore(caretNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!isSiblingsIgnoreWhiteSpace(textBlock, targetTextBlock)) {\n\t\t\t\t\t\t\treturn rng;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (caretNode.nodeType == 1) {\n\t\t\t\t\t\t\tif (caretNode.nodeName == \"BR\") {\n\t\t\t\t\t\t\t\trng.setStartBefore(caretNode);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\trng.setStartAfter(caretNode);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setStart(caretNode, caretNode.data.length);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (targetCaretNode.nodeType == 1) {\n\t\t\t\t\t\t\trng.setEnd(targetCaretNode, 0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setEndBefore(targetCaretNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\tfunction handleTextBlockMergeDelete(isForward) {\n\t\t\t\tvar rng = selection.getRng();\n\n\t\t\t\trng = expandBetweenBlocks(rng, isForward);\n\n\t\t\t\tif (deleteRangeBetweenTextBlocks(rng)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * This retains the formatting if the last character is to be deleted.\n\t\t\t *\n\t\t\t * Backspace on this:

      a|

      would become

      |

      in WebKit.\n\t\t\t * With this patch:

      |

      \n\t\t\t */\n\t\t\tfunction handleLastBlockCharacterDelete(isForward, rng) {\n\t\t\t\tvar path, blockElm, newBlockElm, clonedBlockElm, sibling,\n\t\t\t\t\tcontainer, offset, br, currentFormatNodes;\n\n\t\t\t\tfunction cloneTextBlockWithFormats(blockElm, node) {\n\t\t\t\t\tcurrentFormatNodes = $(node).parents().filter(function(idx, node) {\n\t\t\t\t\t\treturn !!editor.schema.getTextInlineElements()[node.nodeName];\n\t\t\t\t\t});\n\n\t\t\t\t\tnewBlockElm = blockElm.cloneNode(false);\n\n\t\t\t\t\tcurrentFormatNodes = Tools.map(currentFormatNodes, function(formatNode) {\n\t\t\t\t\t\tformatNode = formatNode.cloneNode(false);\n\n\t\t\t\t\t\tif (newBlockElm.hasChildNodes()) {\n\t\t\t\t\t\t\tformatNode.appendChild(newBlockElm.firstChild);\n\t\t\t\t\t\t\tnewBlockElm.appendChild(formatNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewBlockElm.appendChild(formatNode);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnewBlockElm.appendChild(formatNode);\n\n\t\t\t\t\t\treturn formatNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tif (currentFormatNodes.length) {\n\t\t\t\t\t\tbr = dom.create('br');\n\t\t\t\t\t\tcurrentFormatNodes[0].appendChild(br);\n\t\t\t\t\t\tdom.replace(newBlockElm, blockElm);\n\n\t\t\t\t\t\trng.setStartBefore(br);\n\t\t\t\t\t\trng.setEndBefore(br);\n\t\t\t\t\t\teditor.selection.setRng(rng);\n\n\t\t\t\t\t\treturn br;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tfunction isTextBlock(node) {\n\t\t\t\t\treturn node && editor.schema.getTextBlockElements()[node.tagName];\n\t\t\t\t}\n\n\t\t\t\tif (!rng.collapsed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tcontainer = rng.startContainer;\n\t\t\t\toffset = rng.startOffset;\n\t\t\t\tblockElm = dom.getParent(container, dom.isBlock);\n\t\t\t\tif (!isTextBlock(blockElm)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (container.nodeType == 1) {\n\t\t\t\t\tcontainer = container.childNodes[offset];\n\t\t\t\t\tif (container && container.tagName != 'BR') {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isForward) {\n\t\t\t\t\t\tsibling = blockElm.nextSibling;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsibling = blockElm.previousSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dom.isEmpty(blockElm) && isTextBlock(sibling) && dom.isEmpty(sibling)) {\n\t\t\t\t\t\tif (cloneTextBlockWithFormats(blockElm, container)) {\n\t\t\t\t\t\t\tdom.remove(sibling);\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} else if (container.nodeType == 3) {\n\t\t\t\t\tpath = NodePath.create(blockElm, container);\n\t\t\t\t\tclonedBlockElm = blockElm.cloneNode(true);\n\t\t\t\t\tcontainer = NodePath.resolve(clonedBlockElm, path);\n\n\t\t\t\t\tif (isForward) {\n\t\t\t\t\t\tif (offset >= container.data.length) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontainer.deleteData(offset, 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (offset <= 0) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontainer.deleteData(offset - 1, 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dom.isEmpty(clonedBlockElm)) {\n\t\t\t\t\t\treturn cloneTextBlockWithFormats(blockElm, container);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction customDelete(isForward) {\n\t\t\t\tvar mutationObserver, rng, caretElement;\n\n\t\t\t\tif (handleTextBlockMergeDelete(isForward)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tTools.each(editor.getBody().getElementsByTagName('*'), function(elm) {\n\t\t\t\t\t// Mark existing spans\n\t\t\t\t\tif (elm.tagName == 'SPAN') {\n\t\t\t\t\t\telm.setAttribute('mce-data-marked', 1);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Make sure all elements has a data-mce-style attribute\n\t\t\t\t\tif (!elm.hasAttribute('data-mce-style') && elm.hasAttribute('style')) {\n\t\t\t\t\t\teditor.dom.setAttrib(elm, 'style', editor.dom.getAttrib(elm, 'style'));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Observe added nodes and style attribute changes\n\t\t\t\tmutationObserver = new MutationObserver(function() {});\n\t\t\t\tmutationObserver.observe(editor.getDoc(), {\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tsubtree: true,\n\t\t\t\t\tattributeFilter: ['style']\n\t\t\t\t});\n\n\t\t\t\teditor.getDoc().execCommand(isForward ? 'ForwardDelete' : 'Delete', false, null);\n\n\t\t\t\trng = editor.selection.getRng();\n\t\t\t\tcaretElement = rng.startContainer.parentNode;\n\n\t\t\t\tTools.each(mutationObserver.takeRecords(), function(record) {\n\t\t\t\t\tif (!dom.isChildOf(record.target, editor.getBody())) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Restore style attribute to previous value\n\t\t\t\t\tif (record.attributeName == \"style\") {\n\t\t\t\t\t\tvar oldValue = record.target.getAttribute('data-mce-style');\n\n\t\t\t\t\t\tif (oldValue) {\n\t\t\t\t\t\t\trecord.target.setAttribute(\"style\", oldValue);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trecord.target.removeAttribute(\"style\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove all spans that aren't marked and retain selection\n\t\t\t\t\tTools.each(record.addedNodes, function(node) {\n\t\t\t\t\t\tif (node.nodeName == \"SPAN\" && !node.getAttribute('mce-data-marked')) {\n\t\t\t\t\t\t\tvar offset, container;\n\n\t\t\t\t\t\t\tif (node == caretElement) {\n\t\t\t\t\t\t\t\toffset = rng.startOffset;\n\t\t\t\t\t\t\t\tcontainer = node.firstChild;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tdom.remove(node, true);\n\n\t\t\t\t\t\t\tif (container) {\n\t\t\t\t\t\t\t\trng.setStart(container, offset);\n\t\t\t\t\t\t\t\trng.setEnd(container, offset);\n\t\t\t\t\t\t\t\teditor.selection.setRng(rng);\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\tmutationObserver.disconnect();\n\n\t\t\t\t// Remove any left over marks\n\t\t\t\tTools.each(editor.dom.select('span[mce-data-marked]'), function(span) {\n\t\t\t\t\tspan.removeAttribute('mce-data-marked');\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfunction transactCustomDelete(isForward) {\n\t\t\t\teditor.undoManager.transact(function () {\n\t\t\t\t\tcustomDelete(isForward);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\teditor.on('keydown', function(e) {\n\t\t\t\tvar isForward = e.keyCode == DELETE, isMetaOrCtrl = e.ctrlKey || e.metaKey;\n\n\t\t\t\tif (!isDefaultPrevented(e) && (isForward || e.keyCode == BACKSPACE)) {\n\t\t\t\t\tvar rng = editor.selection.getRng(), container = rng.startContainer, offset = rng.startOffset;\n\n\t\t\t\t\t// Shift+Delete is cut\n\t\t\t\t\tif (isForward && e.shiftKey) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (handleLastBlockCharacterDelete(isForward, rng)) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Ignore non meta delete in the where there is text before/after the caret\n\t\t\t\t\tif (!isMetaOrCtrl && rng.collapsed && container.nodeType == 3) {\n\t\t\t\t\t\tif (isForward ? offset < container.data.length : offset > 0) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tif (isMetaOrCtrl) {\n\t\t\t\t\t\teditor.selection.getSel().modify(\"extend\", isForward ? \"forward\" : \"backward\", e.metaKey ? \"lineboundary\" : \"word\");\n\t\t\t\t\t}\n\n\t\t\t\t\tcustomDelete(isForward);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Handle case where text is deleted by typing over\n\t\t\teditor.on('keypress', function(e) {\n\t\t\t\tif (!isDefaultPrevented(e) && !selection.isCollapsed() && e.charCode > 31 && !VK.metaKeyPressed(e)) {\n\t\t\t\t\tvar rng, currentFormatNodes, fragmentNode, blockParent, caretNode, charText;\n\n\t\t\t\t\trng = editor.selection.getRng();\n\t\t\t\t\tcharText = String.fromCharCode(e.charCode);\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t// Keep track of current format nodes\n\t\t\t\t\tcurrentFormatNodes = $(rng.startContainer).parents().filter(function(idx, node) {\n\t\t\t\t\t\treturn !!editor.schema.getTextInlineElements()[node.nodeName];\n\t\t\t\t\t});\n\n\t\t\t\t\tcustomDelete(true);\n\n\t\t\t\t\t// Check if the browser removed them\n\t\t\t\t\tcurrentFormatNodes = currentFormatNodes.filter(function(idx, node) {\n\t\t\t\t\t\treturn !$.contains(editor.getBody(), node);\n\t\t\t\t\t});\n\n\t\t\t\t\t// Then re-add them\n\t\t\t\t\tif (currentFormatNodes.length) {\n\t\t\t\t\t\tfragmentNode = dom.createFragment();\n\n\t\t\t\t\t\tcurrentFormatNodes.each(function(idx, formatNode) {\n\t\t\t\t\t\t\tformatNode = formatNode.cloneNode(false);\n\n\t\t\t\t\t\t\tif (fragmentNode.hasChildNodes()) {\n\t\t\t\t\t\t\t\tformatNode.appendChild(fragmentNode.firstChild);\n\t\t\t\t\t\t\t\tfragmentNode.appendChild(formatNode);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcaretNode = formatNode;\n\t\t\t\t\t\t\t\tfragmentNode.appendChild(formatNode);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfragmentNode.appendChild(formatNode);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcaretNode.appendChild(editor.getDoc().createTextNode(charText));\n\n\t\t\t\t\t\t// Prevent edge case where older WebKit would add an extra BR element\n\t\t\t\t\t\tblockParent = dom.getParent(rng.startContainer, dom.isBlock);\n\t\t\t\t\t\tif (dom.isEmpty(blockParent)) {\n\t\t\t\t\t\t\t$(blockParent).empty().append(fragmentNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.insertNode(fragmentNode);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trng.setStart(caretNode.firstChild, 1);\n\t\t\t\t\t\trng.setEnd(caretNode.firstChild, 1);\n\t\t\t\t\t\teditor.selection.setRng(rng);\n\t\t\t\t\t} else {\n\t\t\t\t\t\teditor.selection.setContent(charText);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\teditor.addCommand('Delete', function() {\n\t\t\t\tcustomDelete();\n\t\t\t});\n\n\t\t\teditor.addCommand('ForwardDelete', function() {\n\t\t\t\tcustomDelete(true);\n\t\t\t});\n\n\t\t\t// Older WebKits doesn't properly handle the clipboard so we can't add the rest\n\t\t\tif (olderWebKit) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\teditor.on('dragstart', function(e) {\n\t\t\t\tdragStartRng = selection.getRng();\n\t\t\t\tsetMceInternalContent(e);\n\t\t\t});\n\n\t\t\teditor.on('drop', function(e) {\n\t\t\t\tif (!isDefaultPrevented(e)) {\n\t\t\t\t\tvar internalContent = getMceInternalContent(e);\n\n\t\t\t\t\tif (internalContent) {\n\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t// Safari has a weird issue where drag/dropping images sometimes\n\t\t\t\t\t\t// produces a green plus icon. When this happens the caretRangeFromPoint\n\t\t\t\t\t\t// will return \"null\" even though the x, y coordinate is correct.\n\t\t\t\t\t\t// But if we detach the insert from the drop event we will get a proper range\n\t\t\t\t\t\tDelay.setEditorTimeout(editor, function() {\n\t\t\t\t\t\t\tvar pointRng = RangeUtils.getCaretRangeFromPoint(e.x, e.y, doc);\n\n\t\t\t\t\t\t\tif (dragStartRng) {\n\t\t\t\t\t\t\t\tselection.setRng(dragStartRng);\n\t\t\t\t\t\t\t\tdragStartRng = null;\n\t\t\t\t\t\t\t\ttransactCustomDelete();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tselection.setRng(pointRng);\n\t\t\t\t\t\t\tinsertClipboardContents(internalContent.html);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\teditor.on('cut', function(e) {\n\t\t\t\tif (!isDefaultPrevented(e) && e.clipboardData && !editor.selection.isCollapsed()) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.clipboardData.clearData();\n\t\t\t\t\te.clipboardData.setData('text/html', editor.selection.getContent());\n\t\t\t\t\te.clipboardData.setData('text/plain', editor.selection.getContent({format: 'text'}));\n\n\t\t\t\t\t// Needed delay for https://code.google.com/p/chromium/issues/detail?id=363288#c3\n\t\t\t\t\t// Nested delete/forwardDelete not allowed on execCommand(\"cut\")\n\t\t\t\t\t// This is ugly but not sure how to work around it otherwise\n\t\t\t\t\tDelay.setEditorTimeout(editor, function() {\n\t\t\t\t\t\ttransactCustomDelete(true);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Makes sure that the editor body becomes empty when backspace or delete is pressed in empty editors.\n\t\t *\n\t\t * For example:\n\t\t *

      |

      \n\t\t *\n\t\t * Or:\n\t\t *

      |

      \n\t\t *\n\t\t * Or:\n\t\t * [

      ]\n\t\t */\n\t\tfunction emptyEditorWhenDeleting() {\n\t\t\tfunction serializeRng(rng) {\n\t\t\t\tvar body = dom.create(\"body\");\n\t\t\t\tvar contents = rng.cloneContents();\n\t\t\t\tbody.appendChild(contents);\n\t\t\t\treturn selection.serializer.serialize(body, {format: 'html'});\n\t\t\t}\n\n\t\t\tfunction allContentsSelected(rng) {\n\t\t\t\tif (!rng.setStart) {\n\t\t\t\t\tif (rng.item) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar bodyRng = rng.duplicate();\n\t\t\t\t\tbodyRng.moveToElementText(editor.getBody());\n\t\t\t\t\treturn RangeUtils.compareRanges(rng, bodyRng);\n\t\t\t\t}\n\n\t\t\t\tvar selection = serializeRng(rng);\n\n\t\t\t\tvar allRng = dom.createRng();\n\t\t\t\tallRng.selectNode(editor.getBody());\n\n\t\t\t\tvar allSelection = serializeRng(allRng);\n\t\t\t\treturn selection === allSelection;\n\t\t\t}\n\n\t\t\teditor.on('keydown', function(e) {\n\t\t\t\tvar keyCode = e.keyCode, isCollapsed, body;\n\n\t\t\t\t// Empty the editor if it's needed for example backspace at

      |

      \n\t\t\t\tif (!isDefaultPrevented(e) && (keyCode == DELETE || keyCode == BACKSPACE)) {\n\t\t\t\t\tisCollapsed = editor.selection.isCollapsed();\n\t\t\t\t\tbody = editor.getBody();\n\n\t\t\t\t\t// Selection is collapsed but the editor isn't empty\n\t\t\t\t\tif (isCollapsed && !dom.isEmpty(body)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Selection isn't collapsed but not all the contents is selected\n\t\t\t\t\tif (!isCollapsed && !allContentsSelected(editor.selection.getRng())) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Manually empty the editor\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\teditor.setContent('');\n\n\t\t\t\t\tif (body.firstChild && dom.isBlock(body.firstChild)) {\n\t\t\t\t\t\teditor.selection.setCursorLocation(body.firstChild, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\teditor.selection.setCursorLocation(body, 0);\n\t\t\t\t\t}\n\n\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * WebKit doesn't select all the nodes in the body when you press Ctrl+A.\n\t\t * IE selects more than the contents [

      a

      ] instead of

      [a] see bug #6438\n\t\t * This selects the whole body so that backspace/delete logic will delete everything\n\t\t */\n\t\tfunction selectAll() {\n\t\t\teditor.shortcuts.add('meta+a', null, 'SelectAll');\n\t\t}\n\n\t\t/**\n\t\t * WebKit has a weird issue where it some times fails to properly convert keypresses to input method keystrokes.\n\t\t * The IME on Mac doesn't initialize when it doesn't fire a proper focus event.\n\t\t *\n\t\t * This seems to happen when the user manages to click the documentElement element then the window doesn't get proper focus until\n\t\t * you enter a character into the editor.\n\t\t *\n\t\t * It also happens when the first focus in made to the body.\n\t\t *\n\t\t * See: https://bugs.webkit.org/show_bug.cgi?id=83566\n\t\t */\n\t\tfunction inputMethodFocus() {\n\t\t\tif (!editor.settings.content_editable) {\n\t\t\t\t// Case 1 IME doesn't initialize if you focus the document\n\t\t\t\t// Disabled since it was interferring with the cE=false logic\n\t\t\t\t// Also coultn't reproduce the issue on Safari 9\n\t\t\t\t/*dom.bind(editor.getDoc(), 'focusin', function() {\n\t\t\t\t\tselection.setRng(selection.getRng());\n\t\t\t\t});*/\n\n\t\t\t\t// Case 2 IME doesn't initialize if you click the documentElement it also doesn't properly fire the focusin event\n\t\t\t\t// Needs to be both down/up due to weird rendering bug on Chrome Windows\n\t\t\t\tdom.bind(editor.getDoc(), 'mousedown mouseup', function(e) {\n\t\t\t\t\tvar rng;\n\n\t\t\t\t\tif (e.target == editor.getDoc().documentElement) {\n\t\t\t\t\t\trng = selection.getRng();\n\t\t\t\t\t\teditor.getBody().focus();\n\n\t\t\t\t\t\tif (e.type == 'mousedown') {\n\t\t\t\t\t\t\tif (CaretContainer.isCaretContainer(rng.startContainer)) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Edge case for mousedown, drag select and mousedown again within selection on Chrome Windows to render caret\n\t\t\t\t\t\t\tselection.placeCaretAt(e.clientX, e.clientY);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselection.setRng(rng);\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/**\n\t\t * Backspacing in FireFox/IE from a paragraph into a horizontal rule results in a floating text node because the\n\t\t * browser just deletes the paragraph - the browser fails to merge the text node with a horizontal rule so it is\n\t\t * left there. TinyMCE sees a floating text node and wraps it in a paragraph on the key up event (ForceBlocks.js\n\t\t * addRootBlocks), meaning the action does nothing. With this code, FireFox/IE matche the behaviour of other\n\t\t * browsers.\n\t\t *\n\t\t * It also fixes a bug on Firefox where it's impossible to delete HR elements.\n\t\t */\n\t\tfunction removeHrOnBackspace() {\n\t\t\teditor.on('keydown', function(e) {\n\t\t\t\tif (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {\n\t\t\t\t\t// Check if there is any HR elements this is faster since getRng on IE 7 & 8 is slow\n\t\t\t\t\tif (!editor.getBody().getElementsByTagName('hr').length) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (selection.isCollapsed() && selection.getRng(true).startOffset === 0) {\n\t\t\t\t\t\tvar node = selection.getNode();\n\t\t\t\t\t\tvar previousSibling = node.previousSibling;\n\n\t\t\t\t\t\tif (node.nodeName == 'HR') {\n\t\t\t\t\t\t\tdom.remove(node);\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === \"hr\") {\n\t\t\t\t\t\t\tdom.remove(previousSibling);\n\t\t\t\t\t\t\te.preventDefault();\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/**\n\t\t * Firefox 3.x has an issue where the body element won't get proper focus if you click out\n\t\t * side it's rectangle.\n\t\t */\n\t\tfunction focusBody() {\n\t\t\t// Fix for a focus bug in FF 3.x where the body element\n\t\t\t// wouldn't get proper focus if the user clicked on the HTML element\n\t\t\tif (!window.Range.prototype.getClientRects) { // Detect getClientRects got introduced in FF 4\n\t\t\t\teditor.on('mousedown', function(e) {\n\t\t\t\t\tif (!isDefaultPrevented(e) && e.target.nodeName === \"HTML\") {\n\t\t\t\t\t\tvar body = editor.getBody();\n\n\t\t\t\t\t\t// Blur the body it's focused but not correctly focused\n\t\t\t\t\t\tbody.blur();\n\n\t\t\t\t\t\t// Refocus the body after a little while\n\t\t\t\t\t\tDelay.setEditorTimeout(editor, function() {\n\t\t\t\t\t\t\tbody.focus();\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/**\n\t\t * WebKit has a bug where it isn't possible to select image, hr or anchor elements\n\t\t * by clicking on them so we need to fake that.\n\t\t */\n\t\tfunction selectControlElements() {\n\t\t\teditor.on('click', function(e) {\n\t\t\t\tvar target = e.target;\n\n\t\t\t\t// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250\n\t\t\t\t// WebKit can't even do simple things like selecting an image\n\t\t\t\tif (/^(IMG|HR)$/.test(target.nodeName) && dom.getContentEditableParent(target) !== \"false\") {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.select(target);\n\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t}\n\n\t\t\t\tif (target.nodeName == 'A' && dom.hasClass(target, 'mce-item-anchor')) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.select(target);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Fixes a Gecko bug where the style attribute gets added to the wrong element when deleting between two block elements.\n\t\t *\n\t\t * Fixes do backspace/delete on this:\n\t\t *

      bla[ck

      r]ed

      \n\t\t *\n\t\t * Would become:\n\t\t *

      bla|ed

      \n\t\t *\n\t\t * Instead of:\n\t\t *

      bla|ed

      \n\t\t */\n\t\tfunction removeStylesWhenDeletingAcrossBlockElements() {\n\t\t\tfunction getAttributeApplyFunction() {\n\t\t\t\tvar template = dom.getAttribs(selection.getStart().cloneNode(false));\n\n\t\t\t\treturn function() {\n\t\t\t\t\tvar target = selection.getStart();\n\n\t\t\t\t\tif (target !== editor.getBody()) {\n\t\t\t\t\t\tdom.setAttrib(target, \"style\", null);\n\n\t\t\t\t\t\teach(template, function(attr) {\n\t\t\t\t\t\t\ttarget.setAttributeNode(attr.cloneNode(true));\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tfunction isSelectionAcrossElements() {\n\t\t\t\treturn !selection.isCollapsed() &&\n\t\t\t\t\tdom.getParent(selection.getStart(), dom.isBlock) != dom.getParent(selection.getEnd(), dom.isBlock);\n\t\t\t}\n\n\t\t\teditor.on('keypress', function(e) {\n\t\t\t\tvar applyAttributes;\n\n\t\t\t\tif (!isDefaultPrevented(e) && (e.keyCode == 8 || e.keyCode == 46) && isSelectionAcrossElements()) {\n\t\t\t\t\tapplyAttributes = getAttributeApplyFunction();\n\t\t\t\t\teditor.getDoc().execCommand('delete', false, null);\n\t\t\t\t\tapplyAttributes();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tdom.bind(editor.getDoc(), 'cut', function(e) {\n\t\t\t\tvar applyAttributes;\n\n\t\t\t\tif (!isDefaultPrevented(e) && isSelectionAcrossElements()) {\n\t\t\t\t\tapplyAttributes = getAttributeApplyFunction();\n\n\t\t\t\t\tDelay.setEditorTimeout(editor, function() {\n\t\t\t\t\t\tapplyAttributes();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Screen readers on IE needs to have the role application set on the body.\n\t\t */\n\t\tfunction ensureBodyHasRoleApplication() {\n\t\t\tdocument.body.setAttribute(\"role\", \"application\");\n\t\t}\n\n\t\t/**\n\t\t * Backspacing into a table behaves differently depending upon browser type.\n\t\t * Therefore, disable Backspace when cursor immediately follows a table.\n\t\t */\n\t\tfunction disableBackspaceIntoATable() {\n\t\t\teditor.on('keydown', function(e) {\n\t\t\t\tif (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {\n\t\t\t\t\tif (selection.isCollapsed() && selection.getRng(true).startOffset === 0) {\n\t\t\t\t\t\tvar previousSibling = selection.getNode().previousSibling;\n\t\t\t\t\t\tif (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === \"table\") {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\treturn false;\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/**\n\t\t * Old IE versions can't properly render BR elements in PRE tags white in contentEditable mode. So this\n\t\t * logic adds a \\n before the BR so that it will get rendered.\n\t\t */\n\t\tfunction addNewLinesBeforeBrInPre() {\n\t\t\t// IE8+ rendering mode does the right thing with BR in PRE\n\t\t\tif (getDocumentMode() > 7) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Enable display: none in area and add a specific class that hides all BR elements in PRE to\n\t\t\t// avoid the caret from getting stuck at the BR elements while pressing the right arrow key\n\t\t\tsetEditorCommandState('RespectVisibilityInDesign', true);\n\t\t\teditor.contentStyles.push('.mceHideBrInPre pre br {display: none}');\n\t\t\tdom.addClass(editor.getBody(), 'mceHideBrInPre');\n\n\t\t\t// Adds a \\n before all BR elements in PRE to get them visual\n\t\t\tparser.addNodeFilter('pre', function(nodes) {\n\t\t\t\tvar i = nodes.length, brNodes, j, brElm, sibling;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tbrNodes = nodes[i].getAll('br');\n\t\t\t\t\tj = brNodes.length;\n\t\t\t\t\twhile (j--) {\n\t\t\t\t\t\tbrElm = brNodes[j];\n\n\t\t\t\t\t\t// Add \\n before BR in PRE elements on older IE:s so the new lines get rendered\n\t\t\t\t\t\tsibling = brElm.prev;\n\t\t\t\t\t\tif (sibling && sibling.type === 3 && sibling.value.charAt(sibling.value - 1) != '\\n') {\n\t\t\t\t\t\t\tsibling.value += '\\n';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbrElm.parent.insert(new Node('#text', 3), brElm, true).value = '\\n';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Removes any \\n before BR elements in PRE since other browsers and in contentEditable=false mode they will be visible\n\t\t\tserializer.addNodeFilter('pre', function(nodes) {\n\t\t\t\tvar i = nodes.length, brNodes, j, brElm, sibling;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tbrNodes = nodes[i].getAll('br');\n\t\t\t\t\tj = brNodes.length;\n\t\t\t\t\twhile (j--) {\n\t\t\t\t\t\tbrElm = brNodes[j];\n\t\t\t\t\t\tsibling = brElm.prev;\n\t\t\t\t\t\tif (sibling && sibling.type == 3) {\n\t\t\t\t\t\t\tsibling.value = sibling.value.replace(/\\r?\\n$/, '');\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/**\n\t\t * Moves style width/height to attribute width/height when the user resizes an image on IE.\n\t\t */\n\t\tfunction removePreSerializedStylesWhenSelectingControls() {\n\t\t\tdom.bind(editor.getBody(), 'mouseup', function() {\n\t\t\t\tvar value, node = selection.getNode();\n\n\t\t\t\t// Moved styles to attributes on IMG eements\n\t\t\t\tif (node.nodeName == 'IMG') {\n\t\t\t\t\t// Convert style width to width attribute\n\t\t\t\t\tif ((value = dom.getStyle(node, 'width'))) {\n\t\t\t\t\t\tdom.setAttrib(node, 'width', value.replace(/[^0-9%]+/g, ''));\n\t\t\t\t\t\tdom.setStyle(node, 'width', '');\n\t\t\t\t\t}\n\n\t\t\t\t\t// Convert style height to height attribute\n\t\t\t\t\tif ((value = dom.getStyle(node, 'height'))) {\n\t\t\t\t\t\tdom.setAttrib(node, 'height', value.replace(/[^0-9%]+/g, ''));\n\t\t\t\t\t\tdom.setStyle(node, 'height', '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Removes a blockquote when backspace is pressed at the beginning of it.\n\t\t *\n\t\t * For example:\n\t\t *

      |x

      \n\t\t *\n\t\t * Becomes:\n\t\t *

      |x

      \n\t\t */\n\t\tfunction removeBlockQuoteOnBackSpace() {\n\t\t\t// Add block quote deletion handler\n\t\t\teditor.on('keydown', function(e) {\n\t\t\t\tvar rng, container, offset, root, parent;\n\n\t\t\t\tif (isDefaultPrevented(e) || e.keyCode != VK.BACKSPACE) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\trng = selection.getRng();\n\t\t\t\tcontainer = rng.startContainer;\n\t\t\t\toffset = rng.startOffset;\n\t\t\t\troot = dom.getRoot();\n\t\t\t\tparent = container;\n\n\t\t\t\tif (!rng.collapsed || offset !== 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\twhile (parent && parent.parentNode && parent.parentNode.firstChild == parent && parent.parentNode != root) {\n\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t}\n\n\t\t\t\t// Is the cursor at the beginning of a blockquote?\n\t\t\t\tif (parent.tagName === 'BLOCKQUOTE') {\n\t\t\t\t\t// Remove the blockquote\n\t\t\t\t\teditor.formatter.toggle('blockquote', null, parent);\n\n\t\t\t\t\t// Move the caret to the beginning of container\n\t\t\t\t\trng = dom.createRng();\n\t\t\t\t\trng.setStart(container, 0);\n\t\t\t\t\trng.setEnd(container, 0);\n\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Sets various Gecko editing options on mouse down and before a execCommand to disable inline table editing that is broken etc.\n\t\t */\n\t\tfunction setGeckoEditingOptions() {\n\t\t\tfunction setOpts() {\n\t\t\t\trefreshContentEditable();\n\n\t\t\t\tsetEditorCommandState(\"StyleWithCSS\", false);\n\t\t\t\tsetEditorCommandState(\"enableInlineTableEditing\", false);\n\n\t\t\t\tif (!settings.object_resizing) {\n\t\t\t\t\tsetEditorCommandState(\"enableObjectResizing\", false);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!settings.readonly) {\n\t\t\t\teditor.on('BeforeExecCommand MouseDown', setOpts);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fixes a gecko link bug, when a link is placed at the end of block elements there is\n\t\t * no way to move the caret behind the link. This fix adds a bogus br element after the link.\n\t\t *\n\t\t * For example this:\n\t\t *

      x

      \n\t\t *\n\t\t * Becomes this:\n\t\t *

      x

      \n\t\t */\n\t\tfunction addBrAfterLastLinks() {\n\t\t\tfunction fixLinks() {\n\t\t\t\teach(dom.select('a'), function(node) {\n\t\t\t\t\tvar parentNode = node.parentNode, root = dom.getRoot();\n\n\t\t\t\t\tif (parentNode.lastChild === node) {\n\t\t\t\t\t\twhile (parentNode && !dom.isBlock(parentNode)) {\n\t\t\t\t\t\t\tif (parentNode.parentNode.lastChild !== parentNode || parentNode === root) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tparentNode = parentNode.parentNode;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdom.add(parentNode, 'br', {'data-mce-bogus': 1});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\teditor.on('SetContent ExecCommand', function(e) {\n\t\t\t\tif (e.type == \"setcontent\" || e.command === 'mceInsertLink') {\n\t\t\t\t\tfixLinks();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * WebKit will produce DIV elements here and there by default. But since TinyMCE uses paragraphs by\n\t\t * default we want to change that behavior.\n\t\t */\n\t\tfunction setDefaultBlockType() {\n\t\t\tif (settings.forced_root_block) {\n\t\t\t\teditor.on('init', function() {\n\t\t\t\t\tsetEditorCommandState('DefaultParagraphSeparator', settings.forced_root_block);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Deletes the selected image on IE instead of navigating to previous page.\n\t\t */\n\t\tfunction deleteControlItemOnBackSpace() {\n\t\t\teditor.on('keydown', function(e) {\n\t\t\t\tvar rng;\n\n\t\t\t\tif (!isDefaultPrevented(e) && e.keyCode == BACKSPACE) {\n\t\t\t\t\trng = editor.getDoc().selection.createRange();\n\t\t\t\t\tif (rng && rng.item) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\teditor.undoManager.beforeChange();\n\t\t\t\t\t\tdom.remove(rng.item(0));\n\t\t\t\t\t\teditor.undoManager.add();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * IE10 doesn't properly render block elements with the right height until you add contents to them.\n\t\t * This fixes that by adding a padding-right to all empty text block elements.\n\t\t * See: https://connect.microsoft.com/IE/feedback/details/743881\n\t\t */\n\t\tfunction renderEmptyBlocksFix() {\n\t\t\tvar emptyBlocksCSS;\n\n\t\t\t// IE10+\n\t\t\tif (getDocumentMode() >= 10) {\n\t\t\t\temptyBlocksCSS = '';\n\t\t\t\teach('p div h1 h2 h3 h4 h5 h6'.split(' '), function(name, i) {\n\t\t\t\t\temptyBlocksCSS += (i > 0 ? ',' : '') + name + ':empty';\n\t\t\t\t});\n\n\t\t\t\teditor.contentStyles.push(emptyBlocksCSS + '{padding-right: 1px !important}');\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Old IE versions can't retain contents within noscript elements so this logic will store the contents\n\t\t * as a attribute and the insert that value as it's raw text when the DOM is serialized.\n\t\t */\n\t\tfunction keepNoScriptContents() {\n\t\t\tif (getDocumentMode() < 9) {\n\t\t\t\tparser.addNodeFilter('noscript', function(nodes) {\n\t\t\t\t\tvar i = nodes.length, node, textNode;\n\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tnode = nodes[i];\n\t\t\t\t\t\ttextNode = node.firstChild;\n\n\t\t\t\t\t\tif (textNode) {\n\t\t\t\t\t\t\tnode.attr('data-mce-innertext', textNode.value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tserializer.addNodeFilter('noscript', function(nodes) {\n\t\t\t\t\tvar i = nodes.length, node, textNode, value;\n\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tnode = nodes[i];\n\t\t\t\t\t\ttextNode = nodes[i].firstChild;\n\n\t\t\t\t\t\tif (textNode) {\n\t\t\t\t\t\t\ttextNode.value = Entities.decode(textNode.value);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Old IE can't retain noscript value so an attribute is used to store it\n\t\t\t\t\t\t\tvalue = node.attributes.map['data-mce-innertext'];\n\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\tnode.attr('data-mce-innertext', null);\n\t\t\t\t\t\t\t\ttextNode = new Node('#text', 3);\n\t\t\t\t\t\t\t\ttextNode.value = value;\n\t\t\t\t\t\t\t\ttextNode.raw = true;\n\t\t\t\t\t\t\t\tnode.append(textNode);\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\t\t/**\n\t\t * IE has an issue where you can't select/move the caret by clicking outside the body if the document is in standards mode.\n\t\t */\n\t\tfunction fixCaretSelectionOfDocumentElementOnIe() {\n\t\t\tvar doc = dom.doc, body = doc.body, started, startRng, htmlElm;\n\n\t\t\t// Return range from point or null if it failed\n\t\t\tfunction rngFromPoint(x, y) {\n\t\t\t\tvar rng = body.createTextRange();\n\n\t\t\t\ttry {\n\t\t\t\t\trng.moveToPoint(x, y);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// IE sometimes throws and exception, so lets just ignore it\n\t\t\t\t\trng = null;\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\t// Fires while the selection is changing\n\t\t\tfunction selectionChange(e) {\n\t\t\t\tvar pointRng;\n\n\t\t\t\t// Check if the button is down or not\n\t\t\t\tif (e.button) {\n\t\t\t\t\t// Create range from mouse position\n\t\t\t\t\tpointRng = rngFromPoint(e.x, e.y);\n\n\t\t\t\t\tif (pointRng) {\n\t\t\t\t\t\t// Check if pointRange is before/after selection then change the endPoint\n\t\t\t\t\t\tif (pointRng.compareEndPoints('StartToStart', startRng) > 0) {\n\t\t\t\t\t\t\tpointRng.setEndPoint('StartToStart', startRng);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpointRng.setEndPoint('EndToEnd', startRng);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpointRng.select();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tendSelection();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Removes listeners\n\t\t\tfunction endSelection() {\n\t\t\t\tvar rng = doc.selection.createRange();\n\n\t\t\t\t// If the range is collapsed then use the last start range\n\t\t\t\tif (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0) {\n\t\t\t\t\tstartRng.select();\n\t\t\t\t}\n\n\t\t\t\tdom.unbind(doc, 'mouseup', endSelection);\n\t\t\t\tdom.unbind(doc, 'mousemove', selectionChange);\n\t\t\t\tstartRng = started = 0;\n\t\t\t}\n\n\t\t\t// Make HTML element unselectable since we are going to handle selection by hand\n\t\t\tdoc.documentElement.unselectable = true;\n\n\t\t\t// Detect when user selects outside BODY\n\t\t\tdom.bind(doc, 'mousedown contextmenu', function(e) {\n\t\t\t\tif (e.target.nodeName === 'HTML') {\n\t\t\t\t\tif (started) {\n\t\t\t\t\t\tendSelection();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML\n\t\t\t\t\thtmlElm = doc.documentElement;\n\t\t\t\t\tif (htmlElm.scrollHeight > htmlElm.clientHeight) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstarted = 1;\n\t\t\t\t\t// Setup start position\n\t\t\t\t\tstartRng = rngFromPoint(e.x, e.y);\n\t\t\t\t\tif (startRng) {\n\t\t\t\t\t\t// Listen for selection change events\n\t\t\t\t\t\tdom.bind(doc, 'mouseup', endSelection);\n\t\t\t\t\t\tdom.bind(doc, 'mousemove', selectionChange);\n\n\t\t\t\t\t\tdom.getRoot().focus();\n\t\t\t\t\t\tstartRng.select();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Fixes selection issues where the caret can be placed between two inline elements like a|b\n\t\t * this fix will lean the caret right into the closest inline element.\n\t\t */\n\t\tfunction normalizeSelection() {\n\t\t\t// Normalize selection for example a|a becomes a|a except for Ctrl+A since it selects everything\n\t\t\teditor.on('keyup focusin mouseup', function(e) {\n\t\t\t\tif (e.keyCode != 65 || !VK.metaKeyPressed(e)) {\n\t\t\t\t\tselection.normalize();\n\t\t\t\t}\n\t\t\t}, true);\n\t\t}\n\n\t\t/**\n\t\t * Forces Gecko to render a broken image icon if it fails to load an image.\n\t\t */\n\t\tfunction showBrokenImageIcon() {\n\t\t\teditor.contentStyles.push(\n\t\t\t\t'img:-moz-broken {' +\n\t\t\t\t\t'-moz-force-broken-image-icon:1;' +\n\t\t\t\t\t'min-width:24px;' +\n\t\t\t\t\t'min-height:24px' +\n\t\t\t\t'}'\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * iOS has a bug where it's impossible to type if the document has a touchstart event\n\t\t * bound and the user touches the document while having the on screen keyboard visible.\n\t\t *\n\t\t * The touch event moves the focus to the parent document while having the caret inside the iframe\n\t\t * this fix moves the focus back into the iframe document.\n\t\t */\n\t\tfunction restoreFocusOnKeyDown() {\n\t\t\tif (!editor.inline) {\n\t\t\t\teditor.on('keydown', function() {\n\t\t\t\t\tif (document.activeElement == document.body) {\n\t\t\t\t\t\teditor.getWin().focus();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * IE 11 has an annoying issue where you can't move focus into the editor\n\t\t * by clicking on the white area HTML element. We used to be able to to fix this with\n\t\t * the fixCaretSelectionOfDocumentElementOnIe fix. But since M$ removed the selection\n\t\t * object it's not possible anymore. So we need to hack in a ungly CSS to force the\n\t\t * body to be at least 150px. If the user clicks the HTML element out side this 150px region\n\t\t * we simply move the focus into the first paragraph. Not ideal since you loose the\n\t\t * positioning of the caret but good enough for most cases.\n\t\t */\n\t\tfunction bodyHeight() {\n\t\t\tif (!editor.inline) {\n\t\t\t\teditor.contentStyles.push('body {min-height: 150px}');\n\t\t\t\teditor.on('click', function(e) {\n\t\t\t\t\tvar rng;\n\n\t\t\t\t\tif (e.target.nodeName == 'HTML') {\n\t\t\t\t\t\t// Edge seems to only need focus if we set the range\n\t\t\t\t\t\t// the caret will become invisible and moved out of the iframe!!\n\t\t\t\t\t\tif (Env.ie > 11) {\n\t\t\t\t\t\t\teditor.getBody().focus();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Need to store away non collapsed ranges since the focus call will mess that up see #7382\n\t\t\t\t\t\trng = editor.selection.getRng();\n\t\t\t\t\t\teditor.getBody().focus();\n\t\t\t\t\t\teditor.selection.setRng(rng);\n\t\t\t\t\t\teditor.selection.normalize();\n\t\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Firefox on Mac OS will move the browser back to the previous page if you press CMD+Left arrow.\n\t\t * You might then loose all your work so we need to block that behavior and replace it with our own.\n\t\t */\n\t\tfunction blockCmdArrowNavigation() {\n\t\t\tif (Env.mac) {\n\t\t\t\teditor.on('keydown', function(e) {\n\t\t\t\t\tif (VK.metaKeyPressed(e) && !e.shiftKey && (e.keyCode == 37 || e.keyCode == 39)) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\teditor.selection.getSel().modify('move', e.keyCode == 37 ? 'backward' : 'forward', 'lineboundary');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Disables the autolinking in IE 9+ this is then re-enabled by the autolink plugin.\n\t\t */\n\t\tfunction disableAutoUrlDetect() {\n\t\t\tsetEditorCommandState(\"AutoUrlDetect\", false);\n\t\t}\n\n\t\t/**\n\t\t * iOS 7.1 introduced two new bugs:\n\t\t * 1) It's possible to open links within a contentEditable area by clicking on them.\n\t\t * 2) If you hold down the finger it will display the link/image touch callout menu.\n\t\t */\n\t\tfunction tapLinksAndImages() {\n\t\t\teditor.on('click', function(e) {\n\t\t\t\tvar elm = e.target;\n\n\t\t\t\tdo {\n\t\t\t\t\tif (elm.tagName === 'A') {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} while ((elm = elm.parentNode));\n\t\t\t});\n\n\t\t\teditor.contentStyles.push('.mce-content-body {-webkit-touch-callout: none}');\n\t\t}\n\n\t\t/**\n\t\t * iOS Safari and possible other browsers have a bug where it won't fire\n\t\t * a click event when a contentEditable is focused. This function fakes click events\n\t\t * by using touchstart/touchend and measuring the time and distance travelled.\n\t\t */\n\t\t/*\n\t\tfunction touchClickEvent() {\n\t\t\teditor.on('touchstart', function(e) {\n\t\t\t\tvar elm, time, startTouch, changedTouches;\n\n\t\t\t\telm = e.target;\n\t\t\t\ttime = new Date().getTime();\n\t\t\t\tchangedTouches = e.changedTouches;\n\n\t\t\t\tif (!changedTouches || changedTouches.length > 1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tstartTouch = changedTouches[0];\n\n\t\t\t\teditor.once('touchend', function(e) {\n\t\t\t\t\tvar endTouch = e.changedTouches[0], args;\n\n\t\t\t\t\tif (new Date().getTime() - time > 500) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (Math.abs(startTouch.clientX - endTouch.clientX) > 5) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (Math.abs(startTouch.clientY - endTouch.clientY) > 5) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\targs = {\n\t\t\t\t\t\ttarget: elm\n\t\t\t\t\t};\n\n\t\t\t\t\teach('pageX pageY clientX clientY screenX screenY'.split(' '), function(key) {\n\t\t\t\t\t\targs[key] = endTouch[key];\n\t\t\t\t\t});\n\n\t\t\t\t\targs = editor.fire('click', args);\n\n\t\t\t\t\tif (!args.isDefaultPrevented()) {\n\t\t\t\t\t\t// iOS WebKit can't place the caret properly once\n\t\t\t\t\t\t// you bind touch events so we need to do this manually\n\t\t\t\t\t\t// TODO: Expand to the closest word? Touble tap still works.\n\t\t\t\t\t\teditor.selection.placeCaretAt(endTouch.clientX, endTouch.clientY);\n\t\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\t*/\n\n\t\t/**\n\t\t * WebKit has a bug where it will allow forms to be submitted if they are inside a contentEditable element.\n\t\t * For example this:
      ' +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this, $ = self.$, textCls = self.classPrefix + 'txt';\n\n\t\t\tfunction setButtonText(text) {\n\t\t\t\tvar $span = $('span.' + textCls, self.getEl());\n\n\t\t\t\tif (text) {\n\t\t\t\t\tif (!$span[0]) {\n\t\t\t\t\t\t$('button:first', self.getEl()).append('');\n\t\t\t\t\t\t$span = $('span.' + textCls, self.getEl());\n\t\t\t\t\t}\n\n\t\t\t\t\t$span.html(self.encode(text));\n\t\t\t\t} else {\n\t\t\t\t\t$span.remove();\n\t\t\t\t}\n\n\t\t\t\tself.classes.toggle('btn-has-text', !!text);\n\t\t\t}\n\n\t\t\tself.state.on('change:text', function(e) {\n\t\t\t\tsetButtonText(e.value);\n\t\t\t});\n\n\t\t\tself.state.on('change:icon', function(e) {\n\t\t\t\tvar icon = e.value, prefix = self.classPrefix;\n\n\t\t\t\tself.settings.icon = icon;\n\t\t\t\ticon = icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';\n\n\t\t\t\tvar btnElm = self.getEl().firstChild, iconElm = btnElm.getElementsByTagName('i')[0];\n\n\t\t\t\tif (icon) {\n\t\t\t\t\tif (!iconElm || iconElm != btnElm.firstChild) {\n\t\t\t\t\t\ticonElm = document.createElement('i');\n\t\t\t\t\t\tbtnElm.insertBefore(iconElm, btnElm.firstChild);\n\t\t\t\t\t}\n\n\t\t\t\t\ticonElm.className = icon;\n\t\t\t\t} else if (iconElm) {\n\t\t\t\t\tbtnElm.removeChild(iconElm);\n\t\t\t\t}\n\n\t\t\t\tsetButtonText(self.state.get('text'));\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/ButtonGroup.js\n\n/**\n * ButtonGroup.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This control enables you to put multiple buttons into a group. This is\n * useful when you want to combine similar toolbar buttons into a group.\n *\n * @example\n * // Create and render a buttongroup with two buttons to the body element\n * tinymce.ui.Factory.create({\n * type: 'buttongroup',\n * items: [\n * {text: 'Button A'},\n * {text: 'Button B'}\n * ]\n * }).renderTo(document.body);\n *\n * @-x-less ButtonGroup.less\n * @class tinymce.ui.ButtonGroup\n * @extends tinymce.ui.Container\n */\ndefine(\"tinymce/ui/ButtonGroup\", [\n\t\"tinymce/ui/Container\"\n], function(Container) {\n\t\"use strict\";\n\n\treturn Container.extend({\n\t\tDefaults: {\n\t\t\tdefaultType: 'button',\n\t\t\trole: 'group'\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, layout = self._layout;\n\n\t\t\tself.classes.add('btn-group');\n\t\t\tself.preRender();\n\t\t\tlayout.preRender(self);\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\t(self.settings.html || '') + layout.renderHtml(self) +\n\t\t\t\t\t'
      ' +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Checkbox.js\n\n/**\n * Checkbox.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This control creates a custom checkbox.\n *\n * @example\n * // Create and render a checkbox to the body element\n * tinymce.ui.Factory.create({\n * type: 'checkbox',\n * checked: true,\n * text: 'My checkbox'\n * }).renderTo(document.body);\n *\n * @-x-less Checkbox.less\n * @class tinymce.ui.Checkbox\n * @extends tinymce.ui.Widget\n */\ndefine(\"tinymce/ui/Checkbox\", [\n\t\"tinymce/ui/Widget\"\n], function(Widget) {\n\t\"use strict\";\n\n\treturn Widget.extend({\n\t\tDefaults: {\n\t\t\tclasses: \"checkbox\",\n\t\t\trole: \"checkbox\",\n\t\t\tchecked: false\n\t\t},\n\n\t\t/**\n\t\t * Constructs a new Checkbox instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {Boolean} checked True if the checkbox should be checked by default.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\n\t\t\tself.on('click mousedown', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t});\n\n\t\t\tself.on('click', function(e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tif (!self.disabled()) {\n\t\t\t\t\tself.checked(!self.checked());\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.checked(self.settings.checked);\n\t\t},\n\n\t\t/**\n\t\t * Getter/setter function for the checked state.\n\t\t *\n\t\t * @method checked\n\t\t * @param {Boolean} [state] State to be set.\n\t\t * @return {Boolean|tinymce.ui.Checkbox} True/false or checkbox if it's a set operation.\n\t\t */\n\t\tchecked: function(state) {\n\t\t\tif (!arguments.length) {\n\t\t\t\treturn this.state.get('checked');\n\t\t\t}\n\n\t\t\tthis.state.set('checked', state);\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Getter/setter function for the value state.\n\t\t *\n\t\t * @method value\n\t\t * @param {Boolean} [state] State to be set.\n\t\t * @return {Boolean|tinymce.ui.Checkbox} True/false or checkbox if it's a set operation.\n\t\t */\n\t\tvalue: function(state) {\n\t\t\tif (!arguments.length) {\n\t\t\t\treturn this.checked();\n\t\t\t}\n\n\t\t\treturn this.checked(state);\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, id = self._id, prefix = self.classPrefix;\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t'' +\n\t\t\t\t\t'' + self.encode(self.state.get('text')) + '' +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tfunction checked(state) {\n\t\t\t\tself.classes.toggle(\"checked\", state);\n\t\t\t\tself.aria('checked', state);\n\t\t\t}\n\n\t\t\tself.state.on('change:text', function(e) {\n\t\t\t\tself.getEl('al').firstChild.data = self.translate(e.value);\n\t\t\t});\n\n\t\t\tself.state.on('change:checked change:value', function(e) {\n\t\t\t\tself.fire('change');\n\t\t\t\tchecked(e.value);\n\t\t\t});\n\n\t\t\tself.state.on('change:icon', function(e) {\n\t\t\t\tvar icon = e.value, prefix = self.classPrefix;\n\n\t\t\t\tif (typeof icon == 'undefined') {\n\t\t\t\t\treturn self.settings.icon;\n\t\t\t\t}\n\n\t\t\t\tself.settings.icon = icon;\n\t\t\t\ticon = icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';\n\n\t\t\t\tvar btnElm = self.getEl().firstChild, iconElm = btnElm.getElementsByTagName('i')[0];\n\n\t\t\t\tif (icon) {\n\t\t\t\t\tif (!iconElm || iconElm != btnElm.firstChild) {\n\t\t\t\t\t\ticonElm = document.createElement('i');\n\t\t\t\t\t\tbtnElm.insertBefore(iconElm, btnElm.firstChild);\n\t\t\t\t\t}\n\n\t\t\t\t\ticonElm.className = icon;\n\t\t\t\t} else if (iconElm) {\n\t\t\t\t\tbtnElm.removeChild(iconElm);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (self.state.get('checked')) {\n\t\t\t\tchecked(true);\n\t\t\t}\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/ComboBox.js\n\n/**\n * ComboBox.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class creates a combobox control. Select box that you select a value from or\n * type a value into.\n *\n * @-x-less ComboBox.less\n * @class tinymce.ui.ComboBox\n * @extends tinymce.ui.Widget\n */\ndefine(\"tinymce/ui/ComboBox\", [\n\t\"tinymce/ui/Widget\",\n\t\"tinymce/ui/Factory\",\n\t\"tinymce/ui/DomUtils\",\n\t\"tinymce/dom/DomQuery\",\n\t\"tinymce/util/VK\",\n\t\"tinymce/util/Tools\"\n], function(Widget, Factory, DomUtils, $, VK, Tools) {\n\t\"use strict\";\n\n\treturn Widget.extend({\n\t\t/**\n\t\t * Constructs a new control instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {String} placeholder Placeholder text to display.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\t\t\tsettings = self.settings;\n\n\t\t\tself.classes.add('combobox');\n\t\t\tself.subinput = true;\n\t\t\tself.ariaTarget = 'inp'; // TODO: Figure out a better way\n\n\t\t\tsettings.menu = settings.menu || settings.values;\n\n\t\t\tif (settings.menu) {\n\t\t\t\tsettings.icon = 'caret';\n\t\t\t}\n\n\t\t\tself.on('click', function(e) {\n\t\t\t\tvar elm = e.target, root = self.getEl();\n\n\t\t\t\tif (!$.contains(root, elm) && elm != root) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\twhile (elm && elm != root) {\n\t\t\t\t\tif (elm.id && elm.id.indexOf('-open') != -1) {\n\t\t\t\t\t\tself.fire('action');\n\n\t\t\t\t\t\tif (settings.menu) {\n\t\t\t\t\t\t\tself.showMenu();\n\n\t\t\t\t\t\t\tif (e.aria) {\n\t\t\t\t\t\t\t\tself.menu.items()[0].focus();\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\telm = elm.parentNode;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// TODO: Rework this\n\t\t\tself.on('keydown', function(e) {\n\t\t\t\tvar rootControl;\n\n\t\t\t\tif (e.keyCode == 13 && e.target.nodeName === 'INPUT') {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t// Find root control that we can do toJSON on\n\t\t\t\t\tself.parents().reverse().each(function(ctrl) {\n\t\t\t\t\t\tif (ctrl.toJSON) {\n\t\t\t\t\t\t\trootControl = ctrl;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// Fire event on current text box with the serialized data of the whole form\n\t\t\t\t\tself.fire('submit', {data: rootControl.toJSON()});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.on('keyup', function(e) {\n\t\t\t\tif (e.target.nodeName == \"INPUT\") {\n\t\t\t\t\tvar oldValue = self.state.get('value');\n\t\t\t\t\tvar newValue = e.target.value;\n\n\t\t\t\t\tif (newValue !== oldValue) {\n\t\t\t\t\t\tself.state.set('value', newValue);\n\t\t\t\t\t\tself.fire('autocomplete', e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.on('mouseover', function(e) {\n\t\t\t\tvar tooltip = self.tooltip().moveTo(-0xFFFF);\n\n\t\t\t\tif (self.statusLevel() && e.target.className.indexOf(self.classPrefix + 'status') !== -1) {\n\t\t\t\t\tvar statusMessage = self.statusMessage() || 'Ok';\n\t\t\t\t\tvar rel = tooltip.text(statusMessage).show().testMoveRel(e.target, ['bc-tc', 'bc-tl', 'bc-tr']);\n\n\t\t\t\t\ttooltip.classes.toggle('tooltip-n', rel == 'bc-tc');\n\t\t\t\t\ttooltip.classes.toggle('tooltip-nw', rel == 'bc-tl');\n\t\t\t\t\ttooltip.classes.toggle('tooltip-ne', rel == 'bc-tr');\n\n\t\t\t\t\ttooltip.moveRel(e.target, rel);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tstatusLevel: function (value) {\n\t\t\tif (arguments.length > 0) {\n\t\t\t\tthis.state.set('statusLevel', value);\n\t\t\t}\n\n\t\t\treturn this.state.get('statusLevel');\n\t\t},\n\n\t\tstatusMessage: function (value) {\n\t\t\tif (arguments.length > 0) {\n\t\t\t\tthis.state.set('statusMessage', value);\n\t\t\t}\n\n\t\t\treturn this.state.get('statusMessage');\n\t\t},\n\n\t\tshowMenu: function() {\n\t\t\tvar self = this, settings = self.settings, menu;\n\n\t\t\tif (!self.menu) {\n\t\t\t\tmenu = settings.menu || [];\n\n\t\t\t\t// Is menu array then auto constuct menu control\n\t\t\t\tif (menu.length) {\n\t\t\t\t\tmenu = {\n\t\t\t\t\t\ttype: 'menu',\n\t\t\t\t\t\titems: menu\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tmenu.type = menu.type || 'menu';\n\t\t\t\t}\n\n\t\t\t\tself.menu = Factory.create(menu).parent(self).renderTo(self.getContainerElm());\n\t\t\t\tself.fire('createmenu');\n\t\t\t\tself.menu.reflow();\n\t\t\t\tself.menu.on('cancel', function(e) {\n\t\t\t\t\tif (e.control === self.menu) {\n\t\t\t\t\t\tself.focus();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tself.menu.on('show hide', function(e) {\n\t\t\t\t\te.control.items().each(function(ctrl) {\n\t\t\t\t\t\tctrl.active(ctrl.value() == self.value());\n\t\t\t\t\t});\n\t\t\t\t}).fire('show');\n\n\t\t\t\tself.menu.on('select', function(e) {\n\t\t\t\t\tself.value(e.control.value());\n\t\t\t\t});\n\n\t\t\t\tself.on('focusin', function(e) {\n\t\t\t\t\tif (e.target.tagName.toUpperCase() == 'INPUT') {\n\t\t\t\t\t\tself.menu.hide();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tself.aria('expanded', true);\n\t\t\t}\n\n\t\t\tself.menu.show();\n\t\t\tself.menu.layoutRect({w: self.layoutRect().w});\n\t\t\tself.menu.moveRel(self.getEl(), self.isRtl() ? ['br-tr', 'tr-br'] : ['bl-tl', 'tl-bl']);\n\t\t},\n\n\t\t/**\n\t\t * Focuses the input area of the control.\n\t\t *\n\t\t * @method focus\n\t\t */\n\t\tfocus: function() {\n\t\t\tthis.getEl('inp').focus();\n\t\t},\n\n\t\t/**\n\t\t * Repaints the control after a layout operation.\n\t\t *\n\t\t * @method repaint\n\t\t */\n\t\trepaint: function() {\n\t\t\tvar self = this, elm = self.getEl(), openElm = self.getEl('open'), rect = self.layoutRect();\n\t\t\tvar width, lineHeight, innerPadding = 0, inputElm = elm.firstChild;\n\n\t\t\tif (self.statusLevel() && self.statusLevel() !== 'none') {\n\t\t\t\tinnerPadding = (\n\t\t\t\t\tparseInt(DomUtils.getRuntimeStyle(inputElm, 'padding-right'), 10) -\n\t\t\t\t\tparseInt(DomUtils.getRuntimeStyle(inputElm, 'padding-left'), 10)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (openElm) {\n\t\t\t\twidth = rect.w - DomUtils.getSize(openElm).width - 10;\n\t\t\t} else {\n\t\t\t\twidth = rect.w - 10;\n\t\t\t}\n\n\t\t\t// Detect old IE 7+8 add lineHeight to align caret vertically in the middle\n\t\t\tvar doc = document;\n\t\t\tif (doc.all && (!doc.documentMode || doc.documentMode <= 8)) {\n\t\t\t\tlineHeight = (self.layoutRect().h - 2) + 'px';\n\t\t\t}\n\n\t\t\t$(inputElm).css({\n\t\t\t\twidth: width - innerPadding,\n\t\t\t\tlineHeight: lineHeight\n\t\t\t});\n\n\t\t\tself._super();\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Post render method. Called after the control has been rendered to the target.\n\t\t *\n\t\t * @method postRender\n\t\t * @return {tinymce.ui.ComboBox} Current combobox instance.\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this;\n\n\t\t\t$(this.getEl('inp')).on('change', function(e) {\n\t\t\t\tself.state.set('value', e.target.value);\n\t\t\t\tself.fire('change', e);\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, id = self._id, settings = self.settings, prefix = self.classPrefix;\n\t\t\tvar value = self.state.get('value') || '';\n\t\t\tvar icon, text, openBtnHtml = '', extraAttrs = '', statusHtml = '';\n\n\t\t\tif (\"spellcheck\" in settings) {\n\t\t\t\textraAttrs += ' spellcheck=\"' + settings.spellcheck + '\"';\n\t\t\t}\n\n\t\t\tif (settings.maxLength) {\n\t\t\t\textraAttrs += ' maxlength=\"' + settings.maxLength + '\"';\n\t\t\t}\n\n\t\t\tif (settings.size) {\n\t\t\t\textraAttrs += ' size=\"' + settings.size + '\"';\n\t\t\t}\n\n\t\t\tif (settings.subtype) {\n\t\t\t\textraAttrs += ' type=\"' + settings.subtype + '\"';\n\t\t\t}\n\n\t\t\tstatusHtml = '';\n\n\t\t\tif (self.disabled()) {\n\t\t\t\textraAttrs += ' disabled=\"disabled\"';\n\t\t\t}\n\n\t\t\ticon = settings.icon;\n\t\t\tif (icon && icon != 'caret') {\n\t\t\t\ticon = prefix + 'ico ' + prefix + 'i-' + settings.icon;\n\t\t\t}\n\n\t\t\ttext = self.state.get('text');\n\n\t\t\tif (icon || text) {\n\t\t\t\topenBtnHtml = (\n\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\tself.classes.add('has-open');\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t'' +\n\t\t\t\t\tstatusHtml +\n\t\t\t\t\topenBtnHtml +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t},\n\n\t\tvalue: function(value) {\n\t\t\tif (arguments.length) {\n\t\t\t\tthis.state.set('value', value);\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\t// Make sure the real state is in sync\n\t\t\tif (this.state.get('rendered')) {\n\t\t\t\tthis.state.set('value', this.getEl('inp').value);\n\t\t\t}\n\n\t\t\treturn this.state.get('value');\n\t\t},\n\n\t\tshowAutoComplete: function (items, term) {\n\t\t\tvar self = this;\n\n\t\t\tif (items.length === 0) {\n\t\t\t\tself.hideMenu();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar insert = function (value, title) {\n\t\t\t\treturn function () {\n\t\t\t\t\tself.fire('selectitem', {\n\t\t\t\t\t\ttitle: title,\n\t\t\t\t\t\tvalue: value\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t};\n\n\t\t\tif (self.menu) {\n\t\t\t\tself.menu.items().remove();\n\t\t\t} else {\n\t\t\t\tself.menu = Factory.create({\n\t\t\t\t\ttype: 'menu',\n\t\t\t\t\tclasses: 'combobox-menu',\n\t\t\t\t\tlayout: 'flow'\n\t\t\t\t}).parent(self).renderTo();\n\t\t\t}\n\n\t\t\tTools.each(items, function (item) {\n\t\t\t\tself.menu.add({\n\t\t\t\t\ttext: item.title,\n\t\t\t\t\turl: item.previewUrl,\n\t\t\t\t\tmatch: term,\n\t\t\t\t\tclasses: 'menu-item-ellipsis',\n\t\t\t\t\tonclick: insert(item.value, item.title)\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tself.menu.renderNew();\n\t\t\tself.hideMenu();\n\n\t\t\tself.menu.on('cancel', function(e) {\n\t\t\t\tif (e.control.parent() === self.menu) {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\tself.focus();\n\t\t\t\t\tself.hideMenu();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.menu.on('select', function() {\n\t\t\t\tself.focus();\n\t\t\t});\n\n\t\t\tvar maxW = self.layoutRect().w;\n\t\t\tself.menu.layoutRect({w: maxW, minW: 0, maxW: maxW});\n\t\t\tself.menu.reflow();\n\t\t\tself.menu.show();\n\t\t\tself.menu.moveRel(self.getEl(), self.isRtl() ? ['br-tr', 'tr-br'] : ['bl-tl', 'tl-bl']);\n\t\t},\n\n\t\thideMenu: function() {\n\t\t\tif (this.menu) {\n\t\t\t\tthis.menu.hide();\n\t\t\t}\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.state.on('change:value', function(e) {\n\t\t\t\tif (self.getEl('inp').value != e.value) {\n\t\t\t\t\tself.getEl('inp').value = e.value;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.state.on('change:disabled', function(e) {\n\t\t\t\tself.getEl('inp').disabled = e.value;\n\t\t\t});\n\n\t\t\tself.state.on('change:statusLevel', function(e) {\n\t\t\t\tvar statusIconElm = self.getEl('status');\n\t\t\t\tvar prefix = self.classPrefix, value = e.value;\n\n\t\t\t\tDomUtils.css(statusIconElm, 'display', value === 'none' ? 'none' : '');\n\t\t\t\tDomUtils.toggleClass(statusIconElm, prefix + 'i-checkmark', value === 'ok');\n\t\t\t\tDomUtils.toggleClass(statusIconElm, prefix + 'i-warning', value === 'warn');\n\t\t\t\tDomUtils.toggleClass(statusIconElm, prefix + 'i-error', value === 'error');\n\t\t\t\tself.classes.toggle('has-status', value !== 'none');\n\t\t\t\tself.repaint();\n\t\t\t});\n\n\t\t\tDomUtils.on(self.getEl('status'), 'mouseleave', function () {\n\t\t\t\tself.tooltip().hide();\n\t\t\t});\n\n\t\t\tself.on('cancel', function (e) {\n\t\t\t\tif (self.menu && self.menu.visible()) {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\tself.hideMenu();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar focusIdx = function (idx, menu) {\n\t\t\t\tif (menu && menu.items().length > 0) {\n\t\t\t\t\tmenu.items().eq(idx)[0].focus();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tself.on('keydown', function (e) {\n\t\t\t\tvar keyCode = e.keyCode;\n\n\t\t\t\tif (e.target.nodeName === 'INPUT') {\n\t\t\t\t\tif (keyCode === VK.DOWN) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tself.fire('autocomplete');\n\t\t\t\t\t\tfocusIdx(0, self.menu);\n\t\t\t\t\t} else if (keyCode === VK.UP) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tfocusIdx(-1, self.menu);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t},\n\n\t\tremove: function() {\n\t\t\t$(this.getEl('inp')).off();\n\n\t\t\tif (this.menu) {\n\t\t\t\tthis.menu.remove();\n\t\t\t}\n\n\t\t\tthis._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/ColorBox.js\n\n/**\n * ColorBox.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This widget lets you enter colors and browse for colors by pressing the color button. It also displays\n * a preview of the current color.\n *\n * @-x-less ColorBox.less\n * @class tinymce.ui.ColorBox\n * @extends tinymce.ui.ComboBox\n */\ndefine(\"tinymce/ui/ColorBox\", [\n\t\"tinymce/ui/ComboBox\"\n], function(ComboBox) {\n\t\"use strict\";\n\n\treturn ComboBox.extend({\n\t\t/**\n\t\t * Constructs a new control instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tsettings.spellcheck = false;\n\n\t\t\tif (settings.onaction) {\n\t\t\t\tsettings.icon = 'none';\n\t\t\t}\n\n\t\t\tself._super(settings);\n\n\t\t\tself.classes.add('colorbox');\n\t\t\tself.on('change keyup postrender', function() {\n\t\t\t\tself.repaintColor(self.value());\n\t\t\t});\n\t\t},\n\n\t\trepaintColor: function(value) {\n\t\t\tvar openElm = this.getEl('open');\n\t\t\tvar elm = openElm ? openElm.getElementsByTagName('i')[0] : null;\n\n\t\t\tif (elm) {\n\t\t\t\ttry {\n\t\t\t\t\telm.style.background = value;\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Ignore\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.state.on('change:value', function(e) {\n\t\t\t\tif (self.state.get('rendered')) {\n\t\t\t\t\tself.repaintColor(e.value);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/PanelButton.js\n\n/**\n * PanelButton.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new panel button.\n *\n * @class tinymce.ui.PanelButton\n * @extends tinymce.ui.Button\n */\ndefine(\"tinymce/ui/PanelButton\", [\n\t\"tinymce/ui/Button\",\n\t\"tinymce/ui/FloatPanel\"\n], function(Button, FloatPanel) {\n\t\"use strict\";\n\n\treturn Button.extend({\n\t\t/**\n\t\t * Shows the panel for the button.\n\t\t *\n\t\t * @method showPanel\n\t\t */\n\t\tshowPanel: function() {\n\t\t\tvar self = this, settings = self.settings;\n\n\t\t\tself.active(true);\n\n\t\t\tif (!self.panel) {\n\t\t\t\tvar panelSettings = settings.panel;\n\n\t\t\t\t// Wrap panel in grid layout if type if specified\n\t\t\t\t// This makes it possible to add forms or other containers directly in the panel option\n\t\t\t\tif (panelSettings.type) {\n\t\t\t\t\tpanelSettings = {\n\t\t\t\t\t\tlayout: 'grid',\n\t\t\t\t\t\titems: panelSettings\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tpanelSettings.role = panelSettings.role || 'dialog';\n\t\t\t\tpanelSettings.popover = true;\n\t\t\t\tpanelSettings.autohide = true;\n\t\t\t\tpanelSettings.ariaRoot = true;\n\n\t\t\t\tself.panel = new FloatPanel(panelSettings).on('hide', function() {\n\t\t\t\t\tself.active(false);\n\t\t\t\t}).on('cancel', function(e) {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\tself.focus();\n\t\t\t\t\tself.hidePanel();\n\t\t\t\t}).parent(self).renderTo(self.getContainerElm());\n\n\t\t\t\tself.panel.fire('show');\n\t\t\t\tself.panel.reflow();\n\t\t\t} else {\n\t\t\t\tself.panel.show();\n\t\t\t}\n\n\t\t\tself.panel.moveRel(self.getEl(), settings.popoverAlign || (self.isRtl() ? ['bc-tr', 'bc-tc'] : ['bc-tl', 'bc-tc']));\n\t\t},\n\n\t\t/**\n\t\t * Hides the panel for the button.\n\t\t *\n\t\t * @method hidePanel\n\t\t */\n\t\thidePanel: function() {\n\t\t\tvar self = this;\n\n\t\t\tif (self.panel) {\n\t\t\t\tself.panel.hide();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Called after the control has been rendered.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.aria('haspopup', true);\n\n\t\t\tself.on('click', function(e) {\n\t\t\t\tif (e.control === self) {\n\t\t\t\t\tif (self.panel && self.panel.visible()) {\n\t\t\t\t\t\tself.hidePanel();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.showPanel();\n\t\t\t\t\t\tself.panel.focus(!!e.aria);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t},\n\n\t\tremove: function() {\n\t\t\tif (this.panel) {\n\t\t\t\tthis.panel.remove();\n\t\t\t\tthis.panel = null;\n\t\t\t}\n\n\t\t\treturn this._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/ColorButton.js\n\n/**\n * ColorButton.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class creates a color button control. This is a split button in which the main\n * button has a visual representation of the currently selected color. When clicked\n * the caret button displays a color picker, allowing the user to select a new color.\n *\n * @-x-less ColorButton.less\n * @class tinymce.ui.ColorButton\n * @extends tinymce.ui.PanelButton\n */\ndefine(\"tinymce/ui/ColorButton\", [\n\t\"tinymce/ui/PanelButton\",\n\t\"tinymce/dom/DOMUtils\"\n], function(PanelButton, DomUtils) {\n\t\"use strict\";\n\n\tvar DOM = DomUtils.DOM;\n\n\treturn PanelButton.extend({\n\t\t/**\n\t\t * Constructs a new ColorButton instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tthis._super(settings);\n\t\t\tthis.classes.add('colorbutton');\n\t\t},\n\n\t\t/**\n\t\t * Getter/setter for the current color.\n\t\t *\n\t\t * @method color\n\t\t * @param {String} [color] Color to set.\n\t\t * @return {String|tinymce.ui.ColorButton} Current color or current instance.\n\t\t */\n\t\tcolor: function(color) {\n\t\t\tif (color) {\n\t\t\t\tthis._color = color;\n\t\t\t\tthis.getEl('preview').style.backgroundColor = color;\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\treturn this._color;\n\t\t},\n\n\t\t/**\n\t\t * Resets the current color.\n\t\t *\n\t\t * @method resetColor\n\t\t * @return {tinymce.ui.ColorButton} Current instance.\n\t\t */\n\t\tresetColor: function() {\n\t\t\tthis._color = null;\n\t\t\tthis.getEl('preview').style.backgroundColor = null;\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, id = self._id, prefix = self.classPrefix, text = self.state.get('text');\n\t\t\tvar icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';\n\t\t\tvar image = self.settings.image ? ' style=\"background-image: url(\\'' + self.settings.image + '\\')\"' : '',\n\t\t\t\ttextHtml = '';\n\n\t\t\tif (text) {\n\t\t\t\tself.classes.add('btn-has-text');\n\t\t\t\ttextHtml = '' + self.encode(text) + '';\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\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/**\n\t\t * Called after the control has been rendered.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this, onClickHandler = self.settings.onclick;\n\n\t\t\tself.on('click', function(e) {\n\t\t\t\tif (e.aria && e.aria.key == 'down') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (e.control == self && !DOM.getParent(e.target, '.' + self.classPrefix + 'open')) {\n\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\tonClickHandler.call(self, e);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tdelete self.settings.onclick;\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/util/Color.js\n\n/**\n * Color.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class lets you parse/serialize colors and convert rgb/hsb.\n *\n * @class tinymce.util.Color\n * @example\n * var white = new tinymce.util.Color({r: 255, g: 255, b: 255});\n * var red = new tinymce.util.Color('#FF0000');\n *\n * console.log(white.toHex(), red.toHsv());\n */\ndefine(\"tinymce/util/Color\", [], function() {\n\tvar min = Math.min, max = Math.max, round = Math.round;\n\n\t/**\n\t * Constructs a new color instance.\n\t *\n\t * @constructor\n\t * @method Color\n\t * @param {String} value Optional initial value to parse.\n\t */\n\tfunction Color(value) {\n\t\tvar self = this, r = 0, g = 0, b = 0;\n\n\t\tfunction rgb2hsv(r, g, b) {\n\t\t\tvar h, s, v, d, minRGB, maxRGB;\n\n\t\t\th = 0;\n\t\t\ts = 0;\n\t\t\tv = 0;\n\t\t\tr = r / 255;\n\t\t\tg = g / 255;\n\t\t\tb = b / 255;\n\n\t\t\tminRGB = min(r, min(g, b));\n\t\t\tmaxRGB = max(r, max(g, b));\n\n\t\t\tif (minRGB == maxRGB) {\n\t\t\t\tv = minRGB;\n\n\t\t\t\treturn {\n\t\t\t\t\th: 0,\n\t\t\t\t\ts: 0,\n\t\t\t\t\tv: v * 100\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/*eslint no-nested-ternary:0 */\n\t\t\td = (r == minRGB) ? g - b : ((b == minRGB) ? r - g : b - r);\n\t\t\th = (r == minRGB) ? 3 : ((b == minRGB) ? 1 : 5);\n\t\t\th = 60 * (h - d / (maxRGB - minRGB));\n\t\t\ts = (maxRGB - minRGB) / maxRGB;\n\t\t\tv = maxRGB;\n\n\t\t\treturn {\n\t\t\t\th: round(h),\n\t\t\t\ts: round(s * 100),\n\t\t\t\tv: round(v * 100)\n\t\t\t};\n\t\t}\n\n\t\tfunction hsvToRgb(hue, saturation, brightness) {\n\t\t\tvar side, chroma, x, match;\n\n\t\t\thue = (parseInt(hue, 10) || 0) % 360;\n\t\t\tsaturation = parseInt(saturation, 10) / 100;\n\t\t\tbrightness = parseInt(brightness, 10) / 100;\n\t\t\tsaturation = max(0, min(saturation, 1));\n\t\t\tbrightness = max(0, min(brightness, 1));\n\n\t\t\tif (saturation === 0) {\n\t\t\t\tr = g = b = round(255 * brightness);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tside = hue / 60;\n\t\t\tchroma = brightness * saturation;\n\t\t\tx = chroma * (1 - Math.abs(side % 2 - 1));\n\t\t\tmatch = brightness - chroma;\n\n\t\t\tswitch (Math.floor(side)) {\n\t\t\t\tcase 0:\n\t\t\t\t\tr = chroma;\n\t\t\t\t\tg = x;\n\t\t\t\t\tb = 0;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tr = x;\n\t\t\t\t\tg = chroma;\n\t\t\t\t\tb = 0;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\tr = 0;\n\t\t\t\t\tg = chroma;\n\t\t\t\t\tb = x;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\tr = 0;\n\t\t\t\t\tg = x;\n\t\t\t\t\tb = chroma;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 4:\n\t\t\t\t\tr = x;\n\t\t\t\t\tg = 0;\n\t\t\t\t\tb = chroma;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 5:\n\t\t\t\t\tr = chroma;\n\t\t\t\t\tg = 0;\n\t\t\t\t\tb = x;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = g = b = 0;\n\t\t\t}\n\n\t\t\tr = round(255 * (r + match));\n\t\t\tg = round(255 * (g + match));\n\t\t\tb = round(255 * (b + match));\n\t\t}\n\n\t\t/**\n\t\t * Returns the hex string of the current color. For example: #ff00ff\n\t\t *\n\t\t * @method toHex\n\t\t * @return {String} Hex string of current color.\n\t\t */\n\t\tfunction toHex() {\n\t\t\tfunction hex(val) {\n\t\t\t\tval = parseInt(val, 10).toString(16);\n\n\t\t\t\treturn val.length > 1 ? val : '0' + val;\n\t\t\t}\n\n\t\t\treturn '#' + hex(r) + hex(g) + hex(b);\n\t\t}\n\n\t\t/**\n\t\t * Returns the r, g, b values of the color. Each channel has a range from 0-255.\n\t\t *\n\t\t * @method toRgb\n\t\t * @return {Object} Object with r, g, b fields.\n\t\t */\n\t\tfunction toRgb() {\n\t\t\treturn {\n\t\t\t\tr: r,\n\t\t\t\tg: g,\n\t\t\t\tb: b\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Returns the h, s, v values of the color. Ranges: h=0-360, s=0-100, v=0-100.\n\t\t *\n\t\t * @method toHsv\n\t\t * @return {Object} Object with h, s, v fields.\n\t\t */\n\t\tfunction toHsv() {\n\t\t\treturn rgb2hsv(r, g, b);\n\t\t}\n\n\t\t/**\n\t\t * Parses the specified value and populates the color instance.\n\t\t *\n\t\t * Supported format examples:\n\t\t * * rbg(255,0,0)\n\t\t * * #ff0000\n\t\t * * #fff\n\t\t * * {r: 255, g: 0, b: 0}\n\t\t * * {h: 360, s: 100, v: 100}\n\t\t *\n\t\t * @method parse\n\t\t * @param {Object/String} value Color value to parse.\n\t\t * @return {tinymce.util.Color} Current color instance.\n\t\t */\n\t\tfunction parse(value) {\n\t\t\tvar matches;\n\n\t\t\tif (typeof value == 'object') {\n\t\t\t\tif (\"r\" in value) {\n\t\t\t\t\tr = value.r;\n\t\t\t\t\tg = value.g;\n\t\t\t\t\tb = value.b;\n\t\t\t\t} else if (\"v\" in value) {\n\t\t\t\t\thsvToRgb(value.h, value.s, value.v);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ((matches = /rgb\\s*\\(\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9]+)[^\\)]*\\)/gi.exec(value))) {\n\t\t\t\t\tr = parseInt(matches[1], 10);\n\t\t\t\t\tg = parseInt(matches[2], 10);\n\t\t\t\t\tb = parseInt(matches[3], 10);\n\t\t\t\t} else if ((matches = /#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(value))) {\n\t\t\t\t\tr = parseInt(matches[1], 16);\n\t\t\t\t\tg = parseInt(matches[2], 16);\n\t\t\t\t\tb = parseInt(matches[3], 16);\n\t\t\t\t} else if ((matches = /#([0-F])([0-F])([0-F])/gi.exec(value))) {\n\t\t\t\t\tr = parseInt(matches[1] + matches[1], 16);\n\t\t\t\t\tg = parseInt(matches[2] + matches[2], 16);\n\t\t\t\t\tb = parseInt(matches[3] + matches[3], 16);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tr = r < 0 ? 0 : (r > 255 ? 255 : r);\n\t\t\tg = g < 0 ? 0 : (g > 255 ? 255 : g);\n\t\t\tb = b < 0 ? 0 : (b > 255 ? 255 : b);\n\n\t\t\treturn self;\n\t\t}\n\n\t\tif (value) {\n\t\t\tparse(value);\n\t\t}\n\n\t\tself.toRgb = toRgb;\n\t\tself.toHsv = toHsv;\n\t\tself.toHex = toHex;\n\t\tself.parse = parse;\n\t}\n\n\treturn Color;\n});\n\n// Included from: js/tinymce/classes/ui/ColorPicker.js\n\n/**\n * ColorPicker.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Color picker widget lets you select colors.\n *\n * @-x-less ColorPicker.less\n * @class tinymce.ui.ColorPicker\n * @extends tinymce.ui.Widget\n */\ndefine(\"tinymce/ui/ColorPicker\", [\n\t\"tinymce/ui/Widget\",\n\t\"tinymce/ui/DragHelper\",\n\t\"tinymce/ui/DomUtils\",\n\t\"tinymce/util/Color\"\n], function(Widget, DragHelper, DomUtils, Color) {\n\t\"use strict\";\n\n\treturn Widget.extend({\n\t\tDefaults: {\n\t\t\tclasses: \"widget colorpicker\"\n\t\t},\n\n\t\t/**\n\t\t * Constructs a new colorpicker instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {String} color Initial color value.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tthis._super(settings);\n\t\t},\n\n\t\tpostRender: function() {\n\t\t\tvar self = this, color = self.color(), hsv, hueRootElm, huePointElm, svRootElm, svPointElm;\n\n\t\t\thueRootElm = self.getEl('h');\n\t\t\thuePointElm = self.getEl('hp');\n\t\t\tsvRootElm = self.getEl('sv');\n\t\t\tsvPointElm = self.getEl('svp');\n\n\t\t\tfunction getPos(elm, event) {\n\t\t\t\tvar pos = DomUtils.getPos(elm), x, y;\n\n\t\t\t\tx = event.pageX - pos.x;\n\t\t\t\ty = event.pageY - pos.y;\n\n\t\t\t\tx = Math.max(0, Math.min(x / elm.clientWidth, 1));\n\t\t\t\ty = Math.max(0, Math.min(y / elm.clientHeight, 1));\n\n\t\t\t\treturn {\n\t\t\t\t\tx: x,\n\t\t\t\t\ty: y\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tfunction updateColor(hsv, hueUpdate) {\n\t\t\t\tvar hue = (360 - hsv.h) / 360;\n\n\t\t\t\tDomUtils.css(huePointElm, {\n\t\t\t\t\ttop: (hue * 100) + '%'\n\t\t\t\t});\n\n\t\t\t\tif (!hueUpdate) {\n\t\t\t\t\tDomUtils.css(svPointElm, {\n\t\t\t\t\t\tleft: hsv.s + '%',\n\t\t\t\t\t\ttop: (100 - hsv.v) + '%'\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsvRootElm.style.background = new Color({s: 100, v: 100, h: hsv.h}).toHex();\n\t\t\t\tself.color().parse({s: hsv.s, v: hsv.v, h: hsv.h});\n\t\t\t}\n\n\t\t\tfunction updateSaturationAndValue(e) {\n\t\t\t\tvar pos;\n\n\t\t\t\tpos = getPos(svRootElm, e);\n\t\t\t\thsv.s = pos.x * 100;\n\t\t\t\thsv.v = (1 - pos.y) * 100;\n\n\t\t\t\tupdateColor(hsv);\n\t\t\t\tself.fire('change');\n\t\t\t}\n\n\t\t\tfunction updateHue(e) {\n\t\t\t\tvar pos;\n\n\t\t\t\tpos = getPos(hueRootElm, e);\n\t\t\t\thsv = color.toHsv();\n\t\t\t\thsv.h = (1 - pos.y) * 360;\n\t\t\t\tupdateColor(hsv, true);\n\t\t\t\tself.fire('change');\n\t\t\t}\n\n\t\t\tself._repaint = function() {\n\t\t\t\thsv = color.toHsv();\n\t\t\t\tupdateColor(hsv);\n\t\t\t};\n\n\t\t\tself._super();\n\n\t\t\tself._svdraghelper = new DragHelper(self._id + '-sv', {\n\t\t\t\tstart: updateSaturationAndValue,\n\t\t\t\tdrag: updateSaturationAndValue\n\t\t\t});\n\n\t\t\tself._hdraghelper = new DragHelper(self._id + '-h', {\n\t\t\t\tstart: updateHue,\n\t\t\t\tdrag: updateHue\n\t\t\t});\n\n\t\t\tself._repaint();\n\t\t},\n\n\t\trgb: function() {\n\t\t\treturn this.color().toRgb();\n\t\t},\n\n\t\tvalue: function(value) {\n\t\t\tvar self = this;\n\n\t\t\tif (arguments.length) {\n\t\t\t\tself.color().parse(value);\n\n\t\t\t\tif (self._rendered) {\n\t\t\t\t\tself._repaint();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn self.color().toHex();\n\t\t\t}\n\t\t},\n\n\t\tcolor: function() {\n\t\t\tif (!this._color) {\n\t\t\t\tthis._color = new Color();\n\t\t\t}\n\n\t\t\treturn this._color;\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, id = self._id, prefix = self.classPrefix, hueHtml;\n\t\t\tvar stops = '#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000';\n\n\t\t\tfunction getOldIeFallbackHtml() {\n\t\t\t\tvar i, l, html = '', gradientPrefix, stopsList;\n\n\t\t\t\tgradientPrefix = 'filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=';\n\t\t\t\tstopsList = stops.split(',');\n\t\t\t\tfor (i = 0, l = stopsList.length - 1; i < l; i++) {\n\t\t\t\t\thtml += (\n\t\t\t\t\t\t'
      '\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn html;\n\t\t\t}\n\n\t\t\tvar gradientCssText = (\n\t\t\t\t'background: -ms-linear-gradient(top,' + stops + ');' +\n\t\t\t\t'background: linear-gradient(to bottom,' + stops + ');'\n\t\t\t);\n\n\t\t\thueHtml = (\n\t\t\t\t'
      ' +\n\t\t\t\t\tgetOldIeFallbackHtml() +\n\t\t\t\t\t'
      ' +\n\t\t\t\t'
      '\n\t\t\t);\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\t'
      ' +\n\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\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'
      ' +\n\t\t\t\t\thueHtml +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Path.js\n\n/**\n * Path.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new path control.\n *\n * @-x-less Path.less\n * @class tinymce.ui.Path\n * @extends tinymce.ui.Widget\n */\ndefine(\"tinymce/ui/Path\", [\n\t\"tinymce/ui/Widget\"\n], function(Widget) {\n\t\"use strict\";\n\n\treturn Widget.extend({\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {String} delimiter Delimiter to display between row in path.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tif (!settings.delimiter) {\n\t\t\t\tsettings.delimiter = '\\u00BB';\n\t\t\t}\n\n\t\t\tself._super(settings);\n\t\t\tself.classes.add('path');\n\t\t\tself.canFocus = true;\n\n\t\t\tself.on('click', function(e) {\n\t\t\t\tvar index, target = e.target;\n\n\t\t\t\tif ((index = target.getAttribute('data-index'))) {\n\t\t\t\t\tself.fire('select', {value: self.row()[index], index: index});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.row(self.settings.row);\n\t\t},\n\n\t\t/**\n\t\t * Focuses the current control.\n\t\t *\n\t\t * @method focus\n\t\t * @return {tinymce.ui.Control} Current control instance.\n\t\t */\n\t\tfocus: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.getEl().firstChild.focus();\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Sets/gets the data to be used for the path.\n\t\t *\n\t\t * @method row\n\t\t * @param {Array} row Array with row name is rendered to path.\n\t\t */\n\t\trow: function(row) {\n\t\t\tif (!arguments.length) {\n\t\t\t\treturn this.state.get('row');\n\t\t\t}\n\n\t\t\tthis.state.set('row', row);\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this;\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\tself._getDataPathHtml(self.state.get('row')) +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.state.on('change:row', function(e) {\n\t\t\t\tself.innerHtml(self._getDataPathHtml(e.value));\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t},\n\n\t\t_getDataPathHtml: function(data) {\n\t\t\tvar self = this, parts = data || [], i, l, html = '', prefix = self.classPrefix;\n\n\t\t\tfor (i = 0, l = parts.length; i < l; i++) {\n\t\t\t\thtml += (\n\t\t\t\t\t(i > 0 ? '
      ' + self.settings.delimiter + '
      ' : '') +\n\t\t\t\t\t'
      ' + parts[i].name + '
      '\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!html) {\n\t\t\t\thtml = '
      \\u00a0
      ';\n\t\t\t}\n\n\t\t\treturn html;\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/ElementPath.js\n\n/**\n * ElementPath.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This control creates an path for the current selections parent elements in TinyMCE.\n *\n * @class tinymce.ui.ElementPath\n * @extends tinymce.ui.Path\n */\ndefine(\"tinymce/ui/ElementPath\", [\n\t\"tinymce/ui/Path\"\n], function(Path) {\n\treturn Path.extend({\n\t\t/**\n\t\t * Post render method. Called after the control has been rendered to the target.\n\t\t *\n\t\t * @method postRender\n\t\t * @return {tinymce.ui.ElementPath} Current combobox instance.\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this, editor = self.settings.editor;\n\n\t\t\tfunction isHidden(elm) {\n\t\t\t\tif (elm.nodeType === 1) {\n\t\t\t\t\tif (elm.nodeName == \"BR\" || !!elm.getAttribute('data-mce-bogus')) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (elm.getAttribute('data-mce-type') === 'bookmark') {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (editor.settings.elementpath !== false) {\n\t\t\t\tself.on('select', function(e) {\n\t\t\t\t\teditor.focus();\n\t\t\t\t\teditor.selection.select(this.row()[e.index].element);\n\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t});\n\n\t\t\t\teditor.on('nodeChange', function(e) {\n\t\t\t\t\tvar outParents = [], parents = e.parents, i = parents.length;\n\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tif (parents[i].nodeType == 1 && !isHidden(parents[i])) {\n\t\t\t\t\t\t\tvar args = editor.fire('ResolveName', {\n\t\t\t\t\t\t\t\tname: parents[i].nodeName.toLowerCase(),\n\t\t\t\t\t\t\t\ttarget: parents[i]\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (!args.isDefaultPrevented()) {\n\t\t\t\t\t\t\t\toutParents.push({name: args.name, element: parents[i]});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (args.isPropagationStopped()) {\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\n\t\t\t\t\tself.row(outParents);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/FormItem.js\n\n/**\n * FormItem.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class is a container created by the form element with\n * a label and control item.\n *\n * @class tinymce.ui.FormItem\n * @extends tinymce.ui.Container\n * @setting {String} label Label to display for the form item.\n */\ndefine(\"tinymce/ui/FormItem\", [\n\t\"tinymce/ui/Container\"\n], function(Container) {\n\t\"use strict\";\n\n\treturn Container.extend({\n\t\tDefaults: {\n\t\t\tlayout: 'flex',\n\t\t\talign: 'center',\n\t\t\tdefaults: {\n\t\t\t\tflex: 1\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, layout = self._layout, prefix = self.classPrefix;\n\n\t\t\tself.classes.add('formitem');\n\t\t\tlayout.preRender(self);\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t(self.settings.title ? ('
      ' +\n\t\t\t\t\t\tself.settings.title + '
      ') : '') +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\t(self.settings.html || '') + layout.renderHtml(self) +\n\t\t\t\t\t'
      ' +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Form.js\n\n/**\n * Form.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class creates a form container. A form container has the ability\n * to automatically wrap items in tinymce.ui.FormItem instances.\n *\n * Each FormItem instance is a container for the label and the item.\n *\n * @example\n * tinymce.ui.Factory.create({\n * type: 'form',\n * items: [\n * {type: 'textbox', label: 'My text box'}\n * ]\n * }).renderTo(document.body);\n *\n * @class tinymce.ui.Form\n * @extends tinymce.ui.Container\n */\ndefine(\"tinymce/ui/Form\", [\n\t\"tinymce/ui/Container\",\n\t\"tinymce/ui/FormItem\",\n\t\"tinymce/util/Tools\"\n], function(Container, FormItem, Tools) {\n\t\"use strict\";\n\n\treturn Container.extend({\n\t\tDefaults: {\n\t\t\tcontainerCls: 'form',\n\t\t\tlayout: 'flex',\n\t\t\tdirection: 'column',\n\t\t\talign: 'stretch',\n\t\t\tflex: 1,\n\t\t\tpadding: 20,\n\t\t\tlabelGap: 30,\n\t\t\tspacing: 10,\n\t\t\tcallbacks: {\n\t\t\t\tsubmit: function() {\n\t\t\t\t\tthis.submit();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * This method gets invoked before the control is rendered.\n\t\t *\n\t\t * @method preRender\n\t\t */\n\t\tpreRender: function() {\n\t\t\tvar self = this, items = self.items();\n\n\t\t\tif (!self.settings.formItemDefaults) {\n\t\t\t\tself.settings.formItemDefaults = {\n\t\t\t\t\tlayout: 'flex',\n\t\t\t\t\tautoResize: \"overflow\",\n\t\t\t\t\tdefaults: {flex: 1}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Wrap any labeled items in FormItems\n\t\t\titems.each(function(ctrl) {\n\t\t\t\tvar formItem, label = ctrl.settings.label;\n\n\t\t\t\tif (label) {\n\t\t\t\t\tformItem = new FormItem(Tools.extend({\n\t\t\t\t\t\titems: {\n\t\t\t\t\t\t\ttype: 'label',\n\t\t\t\t\t\t\tid: ctrl._id + '-l',\n\t\t\t\t\t\t\ttext: label,\n\t\t\t\t\t\t\tflex: 0,\n\t\t\t\t\t\t\tforId: ctrl._id,\n\t\t\t\t\t\t\tdisabled: ctrl.disabled()\n\t\t\t\t\t\t}\n\t\t\t\t\t}, self.settings.formItemDefaults));\n\n\t\t\t\t\tformItem.type = 'formitem';\n\t\t\t\t\tctrl.aria('labelledby', ctrl._id + '-l');\n\n\t\t\t\t\tif (typeof ctrl.settings.flex == \"undefined\") {\n\t\t\t\t\t\tctrl.settings.flex = 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tself.replace(ctrl, formItem);\n\t\t\t\t\tformItem.add(ctrl);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Fires a submit event with the serialized form.\n\t\t *\n\t\t * @method submit\n\t\t * @return {Object} Event arguments object.\n\t\t */\n\t\tsubmit: function() {\n\t\t\treturn this.fire('submit', {data: this.toJSON()});\n\t\t},\n\n\t\t/**\n\t\t * Post render method. Called after the control has been rendered to the target.\n\t\t *\n\t\t * @method postRender\n\t\t * @return {tinymce.ui.ComboBox} Current combobox instance.\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this;\n\n\t\t\tself._super();\n\t\t\tself.fromJSON(self.settings.data);\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tself._super();\n\n\t\t\tfunction recalcLabels() {\n\t\t\t\tvar maxLabelWidth = 0, labels = [], i, labelGap, items;\n\n\t\t\t\tif (self.settings.labelGapCalc === false) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (self.settings.labelGapCalc == \"children\") {\n\t\t\t\t\titems = self.find('formitem');\n\t\t\t\t} else {\n\t\t\t\t\titems = self.items();\n\t\t\t\t}\n\n\t\t\t\titems.filter('formitem').each(function(item) {\n\t\t\t\t\tvar labelCtrl = item.items()[0], labelWidth = labelCtrl.getEl().clientWidth;\n\n\t\t\t\t\tmaxLabelWidth = labelWidth > maxLabelWidth ? labelWidth : maxLabelWidth;\n\t\t\t\t\tlabels.push(labelCtrl);\n\t\t\t\t});\n\n\t\t\t\tlabelGap = self.settings.labelGap || 0;\n\n\t\t\t\ti = labels.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\tlabels[i].settings.minWidth = maxLabelWidth + labelGap;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tself.on('show', recalcLabels);\n\t\t\trecalcLabels();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/FieldSet.js\n\n/**\n * FieldSet.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class creates fieldset containers.\n *\n * @-x-less FieldSet.less\n * @class tinymce.ui.FieldSet\n * @extends tinymce.ui.Form\n */\ndefine(\"tinymce/ui/FieldSet\", [\n\t\"tinymce/ui/Form\"\n], function(Form) {\n\t\"use strict\";\n\n\treturn Form.extend({\n\t\tDefaults: {\n\t\t\tcontainerCls: 'fieldset',\n\t\t\tlayout: 'flex',\n\t\t\tdirection: 'column',\n\t\t\talign: 'stretch',\n\t\t\tflex: 1,\n\t\t\tpadding: \"25 15 5 15\",\n\t\t\tlabelGap: 30,\n\t\t\tspacing: 10,\n\t\t\tborder: 1\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, layout = self._layout, prefix = self.classPrefix;\n\n\t\t\tself.preRender();\n\t\t\tlayout.preRender(self);\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t(self.settings.title ? ('' +\n\t\t\t\t\t\tself.settings.title + '') : '') +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\t(self.settings.html || '') + layout.renderHtml(self) +\n\t\t\t\t\t'
      ' +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/content/LinkTargets.js\n\n/**\n * LinkTargets.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2016 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This module is enables you to get anything that you can link to in a element.\n *\n * @private\n * @class tinymce.content.LinkTargets\n */\ndefine('tinymce/content/LinkTargets', [\n\t'tinymce/dom/DOMUtils',\n\t'tinymce/util/Fun',\n\t'tinymce/util/Arr',\n\t'tinymce/util/Uuid',\n\t'tinymce/util/Tools',\n\t'tinymce/dom/NodeType'\n], function(\n\tDOMUtils,\n\tFun,\n\tArr,\n\tUuid,\n\tTools,\n\tNodeType\n) {\n\tvar trim = Tools.trim;\n\n\tvar create = function (type, title, url, level, attach) {\n\t\treturn {\n\t\t\ttype: type,\n\t\t\ttitle: title,\n\t\t\turl: url,\n\t\t\tlevel: level,\n\t\t\tattach: attach\n\t\t};\n\t};\n\n\tvar isChildOfContentEditableTrue = function (node) {\n\t\twhile ((node = node.parentNode)) {\n\t\t\tvar value = node.contentEditable;\n\t\t\tif (value && value !== 'inherit') {\n\t\t\t\treturn NodeType.isContentEditableTrue(node);\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tvar select = function (selector, root) {\n\t\treturn DOMUtils.DOM.select(selector, root);\n\t};\n\n\tvar getElementText = function (elm) {\n\t\treturn elm.innerText || elm.textContent;\n\t};\n\n\tvar getOrGenerateId = function (elm) {\n\t\treturn elm.id ? elm.id : Uuid.uuid('h');\n\t};\n\n\tvar isAnchor = function (elm) {\n\t\treturn elm && elm.nodeName === 'A' && (elm.id || elm.name);\n\t};\n\n\tvar isValidAnchor = function (elm) {\n\t\treturn isAnchor(elm) && isEditable(elm);\n\t};\n\n\tvar isHeader = function (elm) {\n\t\treturn elm && /^(H[1-6])$/.test(elm.nodeName);\n\t};\n\n\tvar isEditable = function (elm) {\n\t\treturn isChildOfContentEditableTrue(elm) && !NodeType.isContentEditableFalse(elm);\n\t};\n\n\tvar isValidHeader = function (elm) {\n\t\treturn isHeader(elm) && isEditable(elm);\n\t};\n\n\tvar getLevel = function (elm) {\n\t\treturn isHeader(elm) ? parseInt(elm.nodeName.substr(1), 10) : 0;\n\t};\n\n\tvar headerTarget = function (elm) {\n\t\tvar headerId = getOrGenerateId(elm);\n\n\t\tvar attach = function () {\n\t\t\telm.id = headerId;\n\t\t};\n\n\t\treturn create('header', getElementText(elm), '#' + headerId, getLevel(elm), attach);\n\t};\n\n\tvar anchorTarget = function (elm) {\n\t\tvar anchorId = elm.id || elm.name;\n\t\tvar anchorText = getElementText(elm);\n\n\t\treturn create('anchor', anchorText ? anchorText : '#' + anchorId, '#' + anchorId, 0, Fun.noop);\n\t};\n\n\tvar getHeaderTargets = function (elms) {\n\t\treturn Arr.map(Arr.filter(elms, isValidHeader), headerTarget);\n\t};\n\n\tvar getAnchorTargets = function (elms) {\n\t\treturn Arr.map(Arr.filter(elms, isValidAnchor), anchorTarget);\n\t};\n\n\tvar getTargetElements = function (elm) {\n\t\tvar elms = select('h1,h2,h3,h4,h5,h6,a:not([href])', elm);\n\t\treturn elms;\n\t};\n\n\tvar hasTitle = function (target) {\n\t\treturn trim(target.title).length > 0;\n\t};\n\n\tvar find = function (elm) {\n\t\tvar elms = getTargetElements(elm);\n\t\treturn Arr.filter(getHeaderTargets(elms).concat(getAnchorTargets(elms)), hasTitle);\n\t};\n\n\treturn {\n\t\tfind: find\n\t};\n});\n\n// Included from: js/tinymce/classes/ui/FilePicker.js\n\n/**\n * FilePicker.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/*global tinymce:true */\n\n/**\n * This class creates a file picker control.\n *\n * @class tinymce.ui.FilePicker\n * @extends tinymce.ui.ComboBox\n */\ndefine(\"tinymce/ui/FilePicker\", [\n\t\"tinymce/ui/ComboBox\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/util/Arr\",\n\t\"tinymce/util/Fun\",\n\t\"tinymce/util/VK\",\n\t\"tinymce/content/LinkTargets\"\n], function(ComboBox, Tools, Arr, Fun, VK, LinkTargets) {\n\t\"use strict\";\n\n\tvar history = {};\n\tvar HISTORY_LENGTH = 5;\n\n\tvar toMenuItem = function (target) {\n\t\treturn {\n\t\t\ttitle: target.title,\n\t\t\tvalue: {\n\t\t\t\ttitle: {raw: target.title},\n\t\t\t\turl: target.url,\n\t\t\t\tattach: target.attach\n\t\t\t}\n\t\t};\n\t};\n\n\tvar toMenuItems = function (targets) {\n\t\treturn Tools.map(targets, toMenuItem);\n\t};\n\n\tvar staticMenuItem = function (title, url) {\n\t\treturn {\n\t\t\ttitle: title,\n\t\t\tvalue: {\n\t\t\t\ttitle: title,\n\t\t\t\turl: url,\n\t\t\t\tattach: Fun.noop\n\t\t\t}\n\t\t};\n\t};\n\n\tvar isUniqueUrl = function (url, targets) {\n\t\tvar foundTarget = Arr.find(targets, function (target) {\n\t\t\treturn target.url === url;\n\t\t});\n\n\t\treturn !foundTarget;\n\t};\n\n\tvar getSetting = function (editorSettings, name, defaultValue) {\n\t\tvar value = name in editorSettings ? editorSettings[name] : defaultValue;\n\t\treturn value === false ? null : value;\n\t};\n\n\tvar createMenuItems = function (term, targets, fileType, editorSettings) {\n\t\tvar separator = {title: '-'};\n\n\t\tvar fromHistoryMenuItems = function (history) {\n\t\t\tvar uniqueHistory = Arr.filter(history[fileType], function (url) {\n\t\t\t\treturn isUniqueUrl(url, targets);\n\t\t\t});\n\n\t\t\treturn Tools.map(uniqueHistory, function (url) {\n\t\t\t\treturn {\n\t\t\t\t\ttitle: url,\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\ttitle: url,\n\t\t\t\t\t\turl: url,\n\t\t\t\t\t\tattach: Fun.noop\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t});\n\t\t};\n\n\t\tvar fromMenuItems = function (type) {\n\t\t\tvar filteredTargets = Arr.filter(targets, function (target) {\n\t\t\t\treturn target.type == type;\n\t\t\t});\n\n\t\t\treturn toMenuItems(filteredTargets);\n\t\t};\n\n\t\tvar anchorMenuItems = function () {\n\t\t\tvar anchorMenuItems = fromMenuItems('anchor');\n\t\t\tvar topAnchor = getSetting(editorSettings, 'anchor_top', '#top');\n\t\t\tvar bottomAchor = getSetting(editorSettings, 'anchor_bottom', '#bottom');\n\n\t\t\tif (topAnchor !== null) {\n\t\t\t\tanchorMenuItems.unshift(staticMenuItem('', topAnchor));\n\t\t\t}\n\n\t\t\tif (bottomAchor !== null) {\n\t\t\t\tanchorMenuItems.push(staticMenuItem('', bottomAchor));\n\t\t\t}\n\n\t\t\treturn anchorMenuItems;\n\t\t};\n\n\t\tvar join = function (items) {\n\t\t\treturn Arr.reduce(items, function (a, b) {\n\t\t\t\tvar bothEmpty = a.length === 0 || b.length === 0;\n\t\t\t\treturn bothEmpty ? a.concat(b) : a.concat(separator, b);\n\t\t\t}, []);\n\t\t};\n\n\t\tif (editorSettings.typeahead_urls === false) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn fileType === 'file' ? join([\n\t\t\tfilterByQuery(term, fromHistoryMenuItems(history)),\n\t\t\tfilterByQuery(term, fromMenuItems('header')),\n\t\t\tfilterByQuery(term, anchorMenuItems())\n\t\t]) : filterByQuery(term, fromHistoryMenuItems(history));\n\t};\n\n\tvar addToHistory = function (url, fileType) {\n\t\tvar items = history[fileType];\n\n\t\tif (!/^https?/.test(url)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (items) {\n\t\t\tif (Arr.indexOf(items, url) === -1) {\n\t\t\t\thistory[fileType] = items.slice(0, HISTORY_LENGTH).concat(url);\n\t\t\t}\n\t\t} else {\n\t\t\thistory[fileType] = [url];\n\t\t}\n\t};\n\n\tvar filterByQuery = function (term, menuItems) {\n\t\tvar lowerCaseTerm = term.toLowerCase();\n\t\tvar result = Tools.grep(menuItems, function (item) {\n\t\t\treturn item.title.toLowerCase().indexOf(lowerCaseTerm) !== -1;\n\t\t});\n\n\t\treturn result.length === 1 && result[0].title === term ? [] : result;\n\t};\n\n\tvar getTitle = function (linkDetails) {\n\t\tvar title = linkDetails.title;\n\t\treturn title.raw ? title.raw : title;\n\t};\n\n\tvar setupAutoCompleteHandler = function (ctrl, editorSettings, bodyElm, fileType) {\n\t\tvar autocomplete = function (term) {\n\t\t\tvar linkTargets = LinkTargets.find(bodyElm);\n\t\t\tvar menuItems = createMenuItems(term, linkTargets, fileType, editorSettings);\n\t\t\tctrl.showAutoComplete(menuItems, term);\n\t\t};\n\n\t\tctrl.on('autocomplete', function () {\n\t\t\tautocomplete(ctrl.value());\n\t\t});\n\n\t\tctrl.on('selectitem', function (e) {\n\t\t\tvar linkDetails = e.value;\n\n\t\t\tctrl.value(linkDetails.url);\n\t\t\tvar title = getTitle(linkDetails);\n\n\t\t\tif (fileType === 'image') {\n\t\t\t\tctrl.fire('change', {meta: {alt: title, attach: linkDetails.attach}});\n\t\t\t} else {\n\t\t\t\tctrl.fire('change', {meta: {text: title, attach: linkDetails.attach}});\n\t\t\t}\n\n\t\t\tctrl.focus();\n\t\t});\n\n\t\tctrl.on('click', function (e) {\n\t\t\tif (ctrl.value().length === 0 && e.target.nodeName === 'INPUT') {\n\t\t\t\tautocomplete('');\n\t\t\t}\n\t\t});\n\n\t\tctrl.on('PostRender', function () {\n\t\t\tctrl.getRoot().on('submit', function (e) {\n\t\t\t\tif (!e.isDefaultPrevented()) {\n\t\t\t\t\taddToHistory(ctrl.value(), fileType);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n\n\tvar statusToUiState = function (result) {\n\t\tvar status = result.status, message = result.message;\n\n\t\tif (status === 'valid') {\n\t\t\treturn {status: 'ok', message: message};\n\t\t} else if (status === 'unknown') {\n\t\t\treturn {status: 'warn', message: message};\n\t\t} else if (status === 'invalid') {\n\t\t\treturn {status: 'warn', message: message};\n\t\t} else {\n\t\t\treturn {status: 'none', message: ''};\n\t\t}\n\t};\n\n\tvar setupLinkValidatorHandler = function (ctrl, editorSettings, fileType) {\n\t\tvar validatorHandler = editorSettings.filepicker_validator_handler;\n\t\tif (validatorHandler) {\n\t\t\tvar validateUrl = function (url) {\n\t\t\t\tif (url.length === 0) {\n\t\t\t\t\tctrl.statusLevel('none');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvalidatorHandler({\n\t\t\t\t\turl: url,\n\t\t\t\t\ttype: fileType\n\t\t\t\t}, function (result) {\n\t\t\t\t\tvar uiState = statusToUiState(result);\n\n\t\t\t\t\tctrl.statusMessage(uiState.message);\n\t\t\t\t\tctrl.statusLevel(uiState.status);\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tctrl.state.on('change:value', function (e) {\n\t\t\t\tvalidateUrl(e.value);\n\t\t\t});\n\t\t}\n\t};\n\n\treturn ComboBox.extend({\n\t\t/**\n\t\t * Constructs a new control instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this, editor = tinymce.activeEditor, editorSettings = editor.settings;\n\t\t\tvar actionCallback, fileBrowserCallback, fileBrowserCallbackTypes;\n\t\t\tvar fileType = settings.filetype;\n\n\t\t\tsettings.spellcheck = false;\n\n\t\t\tfileBrowserCallbackTypes = editorSettings.file_picker_types || editorSettings.file_browser_callback_types;\n\t\t\tif (fileBrowserCallbackTypes) {\n\t\t\t\tfileBrowserCallbackTypes = Tools.makeMap(fileBrowserCallbackTypes, /[, ]/);\n\t\t\t}\n\n\t\t\tif (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[fileType]) {\n\t\t\t\tfileBrowserCallback = editorSettings.file_picker_callback;\n\t\t\t\tif (fileBrowserCallback && (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[fileType])) {\n\t\t\t\t\tactionCallback = function() {\n\t\t\t\t\t\tvar meta = self.fire('beforecall').meta;\n\n\t\t\t\t\t\tmeta = Tools.extend({filetype: fileType}, meta);\n\n\t\t\t\t\t\t// file_picker_callback(callback, currentValue, metaData)\n\t\t\t\t\t\tfileBrowserCallback.call(\n\t\t\t\t\t\t\teditor,\n\t\t\t\t\t\t\tfunction(value, meta) {\n\t\t\t\t\t\t\t\tself.value(value).fire('change', {meta: meta});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tself.value(),\n\t\t\t\t\t\t\tmeta\n\t\t\t\t\t\t);\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\t// Legacy callback: file_picker_callback(id, currentValue, filetype, window)\n\t\t\t\t\tfileBrowserCallback = editorSettings.file_browser_callback;\n\t\t\t\t\tif (fileBrowserCallback && (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[fileType])) {\n\t\t\t\t\t\tactionCallback = function() {\n\t\t\t\t\t\t\tfileBrowserCallback(\n\t\t\t\t\t\t\t\tself.getEl('inp').id,\n\t\t\t\t\t\t\t\tself.value(),\n\t\t\t\t\t\t\t\tfileType,\n\t\t\t\t\t\t\t\twindow\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (actionCallback) {\n\t\t\t\tsettings.icon = 'browse';\n\t\t\t\tsettings.onaction = actionCallback;\n\t\t\t}\n\n\t\t\tself._super(settings);\n\n\t\t\tsetupAutoCompleteHandler(self, editorSettings, editor.getBody(), fileType);\n\t\t\tsetupLinkValidatorHandler(self, editorSettings, fileType);\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/FitLayout.js\n\n/**\n * FitLayout.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This layout manager will resize the control to be the size of it's parent container.\n * In other words width: 100% and height: 100%.\n *\n * @-x-less FitLayout.less\n * @class tinymce.ui.FitLayout\n * @extends tinymce.ui.AbsoluteLayout\n */\ndefine(\"tinymce/ui/FitLayout\", [\n\t\"tinymce/ui/AbsoluteLayout\"\n], function(AbsoluteLayout) {\n\t\"use strict\";\n\n\treturn AbsoluteLayout.extend({\n\t\t/**\n\t\t * Recalculates the positions of the controls in the specified container.\n\t\t *\n\t\t * @method recalc\n\t\t * @param {tinymce.ui.Container} container Container instance to recalc.\n\t\t */\n\t\trecalc: function(container) {\n\t\t\tvar contLayoutRect = container.layoutRect(), paddingBox = container.paddingBox;\n\n\t\t\tcontainer.items().filter(':visible').each(function(ctrl) {\n\t\t\t\tctrl.layoutRect({\n\t\t\t\t\tx: paddingBox.left,\n\t\t\t\t\ty: paddingBox.top,\n\t\t\t\t\tw: contLayoutRect.innerW - paddingBox.right - paddingBox.left,\n\t\t\t\t\th: contLayoutRect.innerH - paddingBox.top - paddingBox.bottom\n\t\t\t\t});\n\n\t\t\t\tif (ctrl.recalc) {\n\t\t\t\t\tctrl.recalc();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/FlexLayout.js\n\n/**\n * FlexLayout.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This layout manager works similar to the CSS flex box.\n *\n * @setting {String} direction row|row-reverse|column|column-reverse\n * @setting {Number} flex A positive-number to flex by.\n * @setting {String} align start|end|center|stretch\n * @setting {String} pack start|end|justify\n *\n * @class tinymce.ui.FlexLayout\n * @extends tinymce.ui.AbsoluteLayout\n */\ndefine(\"tinymce/ui/FlexLayout\", [\n\t\"tinymce/ui/AbsoluteLayout\"\n], function(AbsoluteLayout) {\n\t\"use strict\";\n\n\treturn AbsoluteLayout.extend({\n\t\t/**\n\t\t * Recalculates the positions of the controls in the specified container.\n\t\t *\n\t\t * @method recalc\n\t\t * @param {tinymce.ui.Container} container Container instance to recalc.\n\t\t */\n\t\trecalc: function(container) {\n\t\t\t// A ton of variables, needs to be in the same scope for performance\n\t\t\tvar i, l, items, contLayoutRect, contPaddingBox, contSettings, align, pack, spacing, totalFlex, availableSpace, direction;\n\t\t\tvar ctrl, ctrlLayoutRect, ctrlSettings, flex, maxSizeItems = [], size, maxSize, ratio, rect, pos, maxAlignEndPos;\n\t\t\tvar sizeName, minSizeName, posName, maxSizeName, beforeName, innerSizeName, deltaSizeName, contentSizeName;\n\t\t\tvar alignAxisName, alignInnerSizeName, alignSizeName, alignMinSizeName, alignBeforeName, alignAfterName;\n\t\t\tvar alignDeltaSizeName, alignContentSizeName;\n\t\t\tvar max = Math.max, min = Math.min;\n\n\t\t\t// Get container items, properties and settings\n\t\t\titems = container.items().filter(':visible');\n\t\t\tcontLayoutRect = container.layoutRect();\n\t\t\tcontPaddingBox = container.paddingBox;\n\t\t\tcontSettings = container.settings;\n\t\t\tdirection = container.isRtl() ? (contSettings.direction || 'row-reversed') : contSettings.direction;\n\t\t\talign = contSettings.align;\n\t\t\tpack = container.isRtl() ? (contSettings.pack || 'end') : contSettings.pack;\n\t\t\tspacing = contSettings.spacing || 0;\n\n\t\t\tif (direction == \"row-reversed\" || direction == \"column-reverse\") {\n\t\t\t\titems = items.set(items.toArray().reverse());\n\t\t\t\tdirection = direction.split('-')[0];\n\t\t\t}\n\n\t\t\t// Setup axis variable name for row/column direction since the calculations is the same\n\t\t\tif (direction == \"column\") {\n\t\t\t\tposName = \"y\";\n\t\t\t\tsizeName = \"h\";\n\t\t\t\tminSizeName = \"minH\";\n\t\t\t\tmaxSizeName = \"maxH\";\n\t\t\t\tinnerSizeName = \"innerH\";\n\t\t\t\tbeforeName = 'top';\n\t\t\t\tdeltaSizeName = \"deltaH\";\n\t\t\t\tcontentSizeName = \"contentH\";\n\n\t\t\t\talignBeforeName = \"left\";\n\t\t\t\talignSizeName = \"w\";\n\t\t\t\talignAxisName = \"x\";\n\t\t\t\talignInnerSizeName = \"innerW\";\n\t\t\t\talignMinSizeName = \"minW\";\n\t\t\t\talignAfterName = \"right\";\n\t\t\t\talignDeltaSizeName = \"deltaW\";\n\t\t\t\talignContentSizeName = \"contentW\";\n\t\t\t} else {\n\t\t\t\tposName = \"x\";\n\t\t\t\tsizeName = \"w\";\n\t\t\t\tminSizeName = \"minW\";\n\t\t\t\tmaxSizeName = \"maxW\";\n\t\t\t\tinnerSizeName = \"innerW\";\n\t\t\t\tbeforeName = 'left';\n\t\t\t\tdeltaSizeName = \"deltaW\";\n\t\t\t\tcontentSizeName = \"contentW\";\n\n\t\t\t\talignBeforeName = \"top\";\n\t\t\t\talignSizeName = \"h\";\n\t\t\t\talignAxisName = \"y\";\n\t\t\t\talignInnerSizeName = \"innerH\";\n\t\t\t\talignMinSizeName = \"minH\";\n\t\t\t\talignAfterName = \"bottom\";\n\t\t\t\talignDeltaSizeName = \"deltaH\";\n\t\t\t\talignContentSizeName = \"contentH\";\n\t\t\t}\n\n\t\t\t// Figure out total flex, availableSpace and collect any max size elements\n\t\t\tavailableSpace = contLayoutRect[innerSizeName] - contPaddingBox[beforeName] - contPaddingBox[beforeName];\n\t\t\tmaxAlignEndPos = totalFlex = 0;\n\t\t\tfor (i = 0, l = items.length; i < l; i++) {\n\t\t\t\tctrl = items[i];\n\t\t\t\tctrlLayoutRect = ctrl.layoutRect();\n\t\t\t\tctrlSettings = ctrl.settings;\n\t\t\t\tflex = ctrlSettings.flex;\n\t\t\t\tavailableSpace -= (i < l - 1 ? spacing : 0);\n\n\t\t\t\tif (flex > 0) {\n\t\t\t\t\ttotalFlex += flex;\n\n\t\t\t\t\t// Flexed item has a max size then we need to check if we will hit that size\n\t\t\t\t\tif (ctrlLayoutRect[maxSizeName]) {\n\t\t\t\t\t\tmaxSizeItems.push(ctrl);\n\t\t\t\t\t}\n\n\t\t\t\t\tctrlLayoutRect.flex = flex;\n\t\t\t\t}\n\n\t\t\t\tavailableSpace -= ctrlLayoutRect[minSizeName];\n\n\t\t\t\t// Calculate the align end position to be used to check for overflow/underflow\n\t\t\t\tsize = contPaddingBox[alignBeforeName] + ctrlLayoutRect[alignMinSizeName] + contPaddingBox[alignAfterName];\n\t\t\t\tif (size > maxAlignEndPos) {\n\t\t\t\t\tmaxAlignEndPos = size;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Calculate minW/minH\n\t\t\trect = {};\n\t\t\tif (availableSpace < 0) {\n\t\t\t\trect[minSizeName] = contLayoutRect[minSizeName] - availableSpace + contLayoutRect[deltaSizeName];\n\t\t\t} else {\n\t\t\t\trect[minSizeName] = contLayoutRect[innerSizeName] - availableSpace + contLayoutRect[deltaSizeName];\n\t\t\t}\n\n\t\t\trect[alignMinSizeName] = maxAlignEndPos + contLayoutRect[alignDeltaSizeName];\n\n\t\t\trect[contentSizeName] = contLayoutRect[innerSizeName] - availableSpace;\n\t\t\trect[alignContentSizeName] = maxAlignEndPos;\n\t\t\trect.minW = min(rect.minW, contLayoutRect.maxW);\n\t\t\trect.minH = min(rect.minH, contLayoutRect.maxH);\n\t\t\trect.minW = max(rect.minW, contLayoutRect.startMinWidth);\n\t\t\trect.minH = max(rect.minH, contLayoutRect.startMinHeight);\n\n\t\t\t// Resize container container if minSize was changed\n\t\t\tif (contLayoutRect.autoResize && (rect.minW != contLayoutRect.minW || rect.minH != contLayoutRect.minH)) {\n\t\t\t\trect.w = rect.minW;\n\t\t\t\trect.h = rect.minH;\n\n\t\t\t\tcontainer.layoutRect(rect);\n\t\t\t\tthis.recalc(container);\n\n\t\t\t\t// Forced recalc for example if items are hidden/shown\n\t\t\t\tif (container._lastRect === null) {\n\t\t\t\t\tvar parentCtrl = container.parent();\n\t\t\t\t\tif (parentCtrl) {\n\t\t\t\t\t\tparentCtrl._lastRect = null;\n\t\t\t\t\t\tparentCtrl.recalc();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Handle max size elements, check if they will become to wide with current options\n\t\t\tratio = availableSpace / totalFlex;\n\t\t\tfor (i = 0, l = maxSizeItems.length; i < l; i++) {\n\t\t\t\tctrl = maxSizeItems[i];\n\t\t\t\tctrlLayoutRect = ctrl.layoutRect();\n\t\t\t\tmaxSize = ctrlLayoutRect[maxSizeName];\n\t\t\t\tsize = ctrlLayoutRect[minSizeName] + ctrlLayoutRect.flex * ratio;\n\n\t\t\t\tif (size > maxSize) {\n\t\t\t\t\tavailableSpace -= (ctrlLayoutRect[maxSizeName] - ctrlLayoutRect[minSizeName]);\n\t\t\t\t\ttotalFlex -= ctrlLayoutRect.flex;\n\t\t\t\t\tctrlLayoutRect.flex = 0;\n\t\t\t\t\tctrlLayoutRect.maxFlexSize = maxSize;\n\t\t\t\t} else {\n\t\t\t\t\tctrlLayoutRect.maxFlexSize = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Setup new ratio, target layout rect, start position\n\t\t\tratio = availableSpace / totalFlex;\n\t\t\tpos = contPaddingBox[beforeName];\n\t\t\trect = {};\n\n\t\t\t// Handle pack setting moves the start position to end, center\n\t\t\tif (totalFlex === 0) {\n\t\t\t\tif (pack == \"end\") {\n\t\t\t\t\tpos = availableSpace + contPaddingBox[beforeName];\n\t\t\t\t} else if (pack == \"center\") {\n\t\t\t\t\tpos = Math.round(\n\t\t\t\t\t\t(contLayoutRect[innerSizeName] / 2) - ((contLayoutRect[innerSizeName] - availableSpace) / 2)\n\t\t\t\t\t) + contPaddingBox[beforeName];\n\n\t\t\t\t\tif (pos < 0) {\n\t\t\t\t\t\tpos = contPaddingBox[beforeName];\n\t\t\t\t\t}\n\t\t\t\t} else if (pack == \"justify\") {\n\t\t\t\t\tpos = contPaddingBox[beforeName];\n\t\t\t\t\tspacing = Math.floor(availableSpace / (items.length - 1));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Default aligning (start) the other ones needs to be calculated while doing the layout\n\t\t\trect[alignAxisName] = contPaddingBox[alignBeforeName];\n\n\t\t\t// Start laying out controls\n\t\t\tfor (i = 0, l = items.length; i < l; i++) {\n\t\t\t\tctrl = items[i];\n\t\t\t\tctrlLayoutRect = ctrl.layoutRect();\n\t\t\t\tsize = ctrlLayoutRect.maxFlexSize || ctrlLayoutRect[minSizeName];\n\n\t\t\t\t// Align the control on the other axis\n\t\t\t\tif (align === \"center\") {\n\t\t\t\t\trect[alignAxisName] = Math.round((contLayoutRect[alignInnerSizeName] / 2) - (ctrlLayoutRect[alignSizeName] / 2));\n\t\t\t\t} else if (align === \"stretch\") {\n\t\t\t\t\trect[alignSizeName] = max(\n\t\t\t\t\t\tctrlLayoutRect[alignMinSizeName] || 0,\n\t\t\t\t\t\tcontLayoutRect[alignInnerSizeName] - contPaddingBox[alignBeforeName] - contPaddingBox[alignAfterName]\n\t\t\t\t\t);\n\t\t\t\t\trect[alignAxisName] = contPaddingBox[alignBeforeName];\n\t\t\t\t} else if (align === \"end\") {\n\t\t\t\t\trect[alignAxisName] = contLayoutRect[alignInnerSizeName] - ctrlLayoutRect[alignSizeName] - contPaddingBox.top;\n\t\t\t\t}\n\n\t\t\t\t// Calculate new size based on flex\n\t\t\t\tif (ctrlLayoutRect.flex > 0) {\n\t\t\t\t\tsize += ctrlLayoutRect.flex * ratio;\n\t\t\t\t}\n\n\t\t\t\trect[sizeName] = size;\n\t\t\t\trect[posName] = pos;\n\t\t\t\tctrl.layoutRect(rect);\n\n\t\t\t\t// Recalculate containers\n\t\t\t\tif (ctrl.recalc) {\n\t\t\t\t\tctrl.recalc();\n\t\t\t\t}\n\n\t\t\t\t// Move x/y position\n\t\t\t\tpos += size + spacing;\n\t\t\t}\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/FlowLayout.js\n\n/**\n * FlowLayout.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This layout manager will place the controls by using the browsers native layout.\n *\n * @-x-less FlowLayout.less\n * @class tinymce.ui.FlowLayout\n * @extends tinymce.ui.Layout\n */\ndefine(\"tinymce/ui/FlowLayout\", [\n\t\"tinymce/ui/Layout\"\n], function(Layout) {\n\treturn Layout.extend({\n\t\tDefaults: {\n\t\t\tcontainerClass: 'flow-layout',\n\t\t\tcontrolClass: 'flow-layout-item',\n\t\t\tendClass: 'break'\n\t\t},\n\n\t\t/**\n\t\t * Recalculates the positions of the controls in the specified container.\n\t\t *\n\t\t * @method recalc\n\t\t * @param {tinymce.ui.Container} container Container instance to recalc.\n\t\t */\n\t\trecalc: function(container) {\n\t\t\tcontainer.items().filter(':visible').each(function(ctrl) {\n\t\t\t\tif (ctrl.recalc) {\n\t\t\t\t\tctrl.recalc();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tisNative: function() {\n\t\t\treturn true;\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/fmt/FontInfo.js\n\n/**\n * FontInfo.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2016 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Internal class for computing font size for elements.\n *\n * @private\n * @class tinymce.fmt.FontInfo\n */\ndefine(\"tinymce/fmt/FontInfo\", [\n\t\"tinymce/dom/DOMUtils\"\n], function(DOMUtils) {\n\tvar getSpecifiedFontProp = function (propName, rootElm, elm) {\n\t\twhile (elm !== rootElm) {\n\t\t\tif (elm.style[propName]) {\n\t\t\t\treturn elm.style[propName];\n\t\t\t}\n\n\t\t\telm = elm.parentNode;\n\t\t}\n\n\t\treturn '';\n\t};\n\n\tvar toPt = function (fontSize) {\n\t\tif (/[0-9.]+px$/.test(fontSize)) {\n\t\t\treturn Math.round(parseInt(fontSize, 10) * 72 / 96) + 'pt';\n\t\t}\n\n\t\treturn fontSize;\n\t};\n\n\tvar normalizeFontFamily = function (fontFamily) {\n\t\t// 'Font name', Font -> Font name,Font\n\t\treturn fontFamily.replace(/[\\'\\\"]/g, '').replace(/,\\s+/g, ',');\n\t};\n\n\tvar getComputedFontProp = function (propName, elm) {\n\t\treturn DOMUtils.DOM.getStyle(elm, propName, true);\n\t};\n\n\tvar getFontSize = function (rootElm, elm) {\n\t\tvar specifiedFontSize = getSpecifiedFontProp('fontSize', rootElm, elm);\n\t\treturn specifiedFontSize !== '' ? specifiedFontSize : getComputedFontProp('fontSize', elm);\n\t};\n\n\tvar getFontFamily = function (rootElm, elm) {\n\t\tvar specifiedFontSize = getSpecifiedFontProp('fontFamily', rootElm, elm);\n\t\tvar fontValue = specifiedFontSize !== '' ? specifiedFontSize : getComputedFontProp('fontFamily', elm);\n\n\t\treturn fontValue !== undefined ? normalizeFontFamily(fontValue) : '';\n\t};\n\n\treturn {\n\t\tgetFontSize: getFontSize,\n\t\tgetFontFamily: getFontFamily,\n\t\ttoPt: toPt\n\t};\n});\n\n// Included from: js/tinymce/classes/ui/FormatControls.js\n\n/**\n * FormatControls.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Internal class containing all TinyMCE specific control types such as\n * format listboxes, fontlist boxes, toolbar buttons etc.\n *\n * @class tinymce.ui.FormatControls\n */\ndefine(\"tinymce/ui/FormatControls\", [\n\t\"tinymce/ui/Control\",\n\t\"tinymce/ui/Widget\",\n\t\"tinymce/ui/FloatPanel\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/util/Arr\",\n\t\"tinymce/dom/DOMUtils\",\n\t\"tinymce/EditorManager\",\n\t\"tinymce/Env\",\n\t\"tinymce/fmt/FontInfo\"\n], function(Control, Widget, FloatPanel, Tools, Arr, DOMUtils, EditorManager, Env, FontInfo) {\n\tvar each = Tools.each;\n\n\tvar flatten = function (ar) {\n\t\treturn Arr.reduce(ar, function (result, item) {\n\t\t\treturn result.concat(item);\n\t\t}, []);\n\t};\n\n\tEditorManager.on('AddEditor', function(e) {\n\t\tvar editor = e.editor;\n\n\t\tsetupRtlMode(editor);\n\t\tregisterControls(editor);\n\t\tsetupContainer(editor);\n\t});\n\n\tControl.translate = function(text) {\n\t\treturn EditorManager.translate(text);\n\t};\n\n\tWidget.tooltips = !Env.iOS;\n\n\tfunction setupContainer(editor) {\n\t\tif (editor.settings.ui_container) {\n\t\t\tEnv.container = DOMUtils.DOM.select(editor.settings.ui_container)[0];\n\t\t}\n\t}\n\n\tfunction setupRtlMode(editor) {\n\t\teditor.on('ScriptsLoaded', function () {\n\t\t\tif (editor.rtl) {\n\t\t\t\tControl.rtl = true;\n\t\t\t}\n\t\t});\n\t}\n\n\tfunction registerControls(editor) {\n\t\tvar formatMenu;\n\n\t\tfunction createListBoxChangeHandler(items, formatName) {\n\t\t\treturn function() {\n\t\t\t\tvar self = this;\n\n\t\t\t\teditor.on('nodeChange', function(e) {\n\t\t\t\t\tvar formatter = editor.formatter;\n\t\t\t\t\tvar value = null;\n\n\t\t\t\t\teach(e.parents, function(node) {\n\t\t\t\t\t\teach(items, function(item) {\n\t\t\t\t\t\t\tif (formatName) {\n\t\t\t\t\t\t\t\tif (formatter.matchNode(node, formatName, {value: item.value})) {\n\t\t\t\t\t\t\t\t\tvalue = item.value;\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\tif (formatter.matchNode(node, item.value)) {\n\t\t\t\t\t\t\t\t\tvalue = item.value;\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\tif (value) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tself.value(value);\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\n\t\tfunction createFontNameListBoxChangeHandler(items) {\n\t\t\treturn function() {\n\t\t\t\tvar self = this;\n\n\t\t\t\tvar getFirstFont = function (fontFamily) {\n\t\t\t\t\treturn fontFamily ? fontFamily.split(',')[0] : '';\n\t\t\t\t};\n\n\t\t\t\teditor.on('nodeChange', function(e) {\n\t\t\t\t\tvar fontFamily, value = null;\n\n\t\t\t\t\tfontFamily = FontInfo.getFontFamily(editor.getBody(), e.element);\n\n\t\t\t\t\teach(items, function(item) {\n\t\t\t\t\t\tif (item.value.toLowerCase() === fontFamily.toLowerCase()) {\n\t\t\t\t\t\t\tvalue = item.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\teach(items, function(item) {\n\t\t\t\t\t\tif (!value && getFirstFont(item.value).toLowerCase() === getFirstFont(fontFamily).toLowerCase()) {\n\t\t\t\t\t\t\tvalue = item.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tself.value(value);\n\n\t\t\t\t\tif (!value && fontFamily) {\n\t\t\t\t\t\tself.text(getFirstFont(fontFamily));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\n\t\tfunction createFontSizeListBoxChangeHandler(items) {\n\t\t\treturn function() {\n\t\t\t\tvar self = this;\n\n\t\t\t\teditor.on('nodeChange', function(e) {\n\t\t\t\t\tvar px, pt, value = null;\n\n\t\t\t\t\tpx = FontInfo.getFontSize(editor.getBody(), e.element);\n\t\t\t\t\tpt = FontInfo.toPt(px);\n\n\t\t\t\t\teach(items, function(item) {\n\t\t\t\t\t\tif (item.value === px) {\n\t\t\t\t\t\t\tvalue = px;\n\t\t\t\t\t\t} else if (item.value === pt) {\n\t\t\t\t\t\t\tvalue = pt;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tself.value(value);\n\n\t\t\t\t\tif (!value) {\n\t\t\t\t\t\tself.text(pt);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\n\t\tfunction createFormats(formats) {\n\t\t\tformats = formats.replace(/;$/, '').split(';');\n\n\t\t\tvar i = formats.length;\n\t\t\twhile (i--) {\n\t\t\t\tformats[i] = formats[i].split('=');\n\t\t\t}\n\n\t\t\treturn formats;\n\t\t}\n\n\t\tfunction createFormatMenu() {\n\t\t\tvar count = 0, newFormats = [];\n\n\t\t\tvar defaultStyleFormats = [\n\t\t\t\t{title: 'Headings', items: [\n\t\t\t\t\t{title: 'Heading 1', format: 'h1'},\n\t\t\t\t\t{title: 'Heading 2', format: 'h2'},\n\t\t\t\t\t{title: 'Heading 3', format: 'h3'},\n\t\t\t\t\t{title: 'Heading 4', format: 'h4'},\n\t\t\t\t\t{title: 'Heading 5', format: 'h5'},\n\t\t\t\t\t{title: 'Heading 6', format: 'h6'}\n\t\t\t\t]},\n\n\t\t\t\t{title: 'Inline', items: [\n\t\t\t\t\t{title: 'Bold', icon: 'bold', format: 'bold'},\n\t\t\t\t\t{title: 'Italic', icon: 'italic', format: 'italic'},\n\t\t\t\t\t{title: 'Underline', icon: 'underline', format: 'underline'},\n\t\t\t\t\t{title: 'Strikethrough', icon: 'strikethrough', format: 'strikethrough'},\n\t\t\t\t\t{title: 'Superscript', icon: 'superscript', format: 'superscript'},\n\t\t\t\t\t{title: 'Subscript', icon: 'subscript', format: 'subscript'},\n\t\t\t\t\t{title: 'Code', icon: 'code', format: 'code'}\n\t\t\t\t]},\n\n\t\t\t\t{title: 'Blocks', items: [\n\t\t\t\t\t{title: 'Paragraph', format: 'p'},\n\t\t\t\t\t{title: 'Blockquote', format: 'blockquote'},\n\t\t\t\t\t{title: 'Div', format: 'div'},\n\t\t\t\t\t{title: 'Pre', format: 'pre'}\n\t\t\t\t]},\n\n\t\t\t\t{title: 'Alignment', items: [\n\t\t\t\t\t{title: 'Left', icon: 'alignleft', format: 'alignleft'},\n\t\t\t\t\t{title: 'Center', icon: 'aligncenter', format: 'aligncenter'},\n\t\t\t\t\t{title: 'Right', icon: 'alignright', format: 'alignright'},\n\t\t\t\t\t{title: 'Justify', icon: 'alignjustify', format: 'alignjustify'}\n\t\t\t\t]}\n\t\t\t];\n\n\t\t\tfunction createMenu(formats) {\n\t\t\t\tvar menu = [];\n\n\t\t\t\tif (!formats) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\teach(formats, function(format) {\n\t\t\t\t\tvar menuItem = {\n\t\t\t\t\t\ttext: format.title,\n\t\t\t\t\t\ticon: format.icon\n\t\t\t\t\t};\n\n\t\t\t\t\tif (format.items) {\n\t\t\t\t\t\tmenuItem.menu = createMenu(format.items);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar formatName = format.format || \"custom\" + count++;\n\n\t\t\t\t\t\tif (!format.format) {\n\t\t\t\t\t\t\tformat.name = formatName;\n\t\t\t\t\t\t\tnewFormats.push(format);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmenuItem.format = formatName;\n\t\t\t\t\t\tmenuItem.cmd = format.cmd;\n\t\t\t\t\t}\n\n\t\t\t\t\tmenu.push(menuItem);\n\t\t\t\t});\n\n\t\t\t\treturn menu;\n\t\t\t}\n\n\t\t\tfunction createStylesMenu() {\n\t\t\t\tvar menu;\n\n\t\t\t\tif (editor.settings.style_formats_merge) {\n\t\t\t\t\tif (editor.settings.style_formats) {\n\t\t\t\t\t\tmenu = createMenu(defaultStyleFormats.concat(editor.settings.style_formats));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmenu = createMenu(defaultStyleFormats);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmenu = createMenu(editor.settings.style_formats || defaultStyleFormats);\n\t\t\t\t}\n\n\t\t\t\treturn menu;\n\t\t\t}\n\n\t\t\teditor.on('init', function() {\n\t\t\t\teach(newFormats, function(format) {\n\t\t\t\t\teditor.formatter.register(format.name, format);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\ttype: 'menu',\n\t\t\t\titems: createStylesMenu(),\n\t\t\t\tonPostRender: function(e) {\n\t\t\t\t\teditor.fire('renderFormatsMenu', {control: e.control});\n\t\t\t\t},\n\t\t\t\titemDefaults: {\n\t\t\t\t\tpreview: true,\n\n\t\t\t\t\ttextStyle: function() {\n\t\t\t\t\t\tif (this.settings.format) {\n\t\t\t\t\t\t\treturn editor.formatter.getCssText(this.settings.format);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\n\t\t\t\t\tonPostRender: function() {\n\t\t\t\t\t\tvar self = this;\n\n\t\t\t\t\t\tself.parent().on('show', function() {\n\t\t\t\t\t\t\tvar formatName, command;\n\n\t\t\t\t\t\t\tformatName = self.settings.format;\n\t\t\t\t\t\t\tif (formatName) {\n\t\t\t\t\t\t\t\tself.disabled(!editor.formatter.canApply(formatName));\n\t\t\t\t\t\t\t\tself.active(editor.formatter.match(formatName));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcommand = self.settings.cmd;\n\t\t\t\t\t\t\tif (command) {\n\t\t\t\t\t\t\t\tself.active(editor.queryCommandState(command));\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\tonclick: function() {\n\t\t\t\t\t\tif (this.settings.format) {\n\t\t\t\t\t\t\ttoggleFormat(this.settings.format);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (this.settings.cmd) {\n\t\t\t\t\t\t\teditor.execCommand(this.settings.cmd);\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\tformatMenu = createFormatMenu();\n\n\t\tfunction initOnPostRender(name) {\n\t\t\treturn function() {\n\t\t\t\tvar self = this;\n\n\t\t\t\t// TODO: Fix this\n\t\t\t\tif (editor.formatter) {\n\t\t\t\t\teditor.formatter.formatChanged(name, function(state) {\n\t\t\t\t\t\tself.active(state);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\teditor.on('init', function() {\n\t\t\t\t\t\teditor.formatter.formatChanged(name, function(state) {\n\t\t\t\t\t\t\tself.active(state);\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// Simple format controls :\n\t\teach({\n\t\t\tbold: 'Bold',\n\t\t\titalic: 'Italic',\n\t\t\tunderline: 'Underline',\n\t\t\tstrikethrough: 'Strikethrough',\n\t\t\tsubscript: 'Subscript',\n\t\t\tsuperscript: 'Superscript'\n\t\t}, function(text, name) {\n\t\t\teditor.addButton(name, {\n\t\t\t\ttooltip: text,\n\t\t\t\tonPostRender: initOnPostRender(name),\n\t\t\t\tonclick: function() {\n\t\t\t\t\ttoggleFormat(name);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\t// Simple command controls :[,]\n\t\teach({\n\t\t\toutdent: ['Decrease indent', 'Outdent'],\n\t\t\tindent: ['Increase indent', 'Indent'],\n\t\t\tcut: ['Cut', 'Cut'],\n\t\t\tcopy: ['Copy', 'Copy'],\n\t\t\tpaste: ['Paste', 'Paste'],\n\t\t\thelp: ['Help', 'mceHelp'],\n\t\t\tselectall: ['Select all', 'SelectAll'],\n\t\t\tremoveformat: ['Clear formatting', 'RemoveFormat'],\n\t\t\tvisualaid: ['Visual aids', 'mceToggleVisualAid'],\n\t\t\tnewdocument: ['New document', 'mceNewDocument']\n\t\t}, function(item, name) {\n\t\t\teditor.addButton(name, {\n\t\t\t\ttooltip: item[0],\n\t\t\t\tcmd: item[1]\n\t\t\t});\n\t\t});\n\n\t\t// Simple command controls with format state\n\t\teach({\n\t\t\tblockquote: ['Blockquote', 'mceBlockQuote'],\n\t\t\tsubscript: ['Subscript', 'Subscript'],\n\t\t\tsuperscript: ['Superscript', 'Superscript'],\n\t\t\talignleft: ['Align left', 'JustifyLeft'],\n\t\t\taligncenter: ['Align center', 'JustifyCenter'],\n\t\t\talignright: ['Align right', 'JustifyRight'],\n\t\t\talignjustify: ['Justify', 'JustifyFull'],\n\t\t\talignnone: ['No alignment', 'JustifyNone']\n\t\t}, function(item, name) {\n\t\t\teditor.addButton(name, {\n\t\t\t\ttooltip: item[0],\n\t\t\t\tcmd: item[1],\n\t\t\t\tonPostRender: initOnPostRender(name)\n\t\t\t});\n\t\t});\n\n\t\tfunction toggleUndoRedoState(type) {\n\t\t\treturn function() {\n\t\t\t\tvar self = this;\n\n\t\t\t\tfunction checkState() {\n\t\t\t\t\tvar typeFn = type == 'redo' ? 'hasRedo' : 'hasUndo';\n\t\t\t\t\treturn editor.undoManager ? editor.undoManager[typeFn]() : false;\n\t\t\t\t}\n\n\t\t\t\tself.disabled(!checkState());\n\t\t\t\teditor.on('Undo Redo AddUndo TypingUndo ClearUndos SwitchMode', function() {\n\t\t\t\t\tself.disabled(editor.readonly || !checkState());\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\n\t\tfunction toggleVisualAidState() {\n\t\t\tvar self = this;\n\n\t\t\teditor.on('VisualAid', function(e) {\n\t\t\t\tself.active(e.hasVisual);\n\t\t\t});\n\n\t\t\tself.active(editor.hasVisual);\n\t\t}\n\n\t\tvar trimMenuItems = function (menuItems) {\n\t\t\tvar outputMenuItems = menuItems;\n\n\t\t\tif (outputMenuItems.length > 0 && outputMenuItems[0].text === '-') {\n\t\t\t\toutputMenuItems = outputMenuItems.slice(1);\n\t\t\t}\n\n\t\t\tif (outputMenuItems.length > 0 && outputMenuItems[outputMenuItems.length - 1].text === '-') {\n\t\t\t\toutputMenuItems = outputMenuItems.slice(0, outputMenuItems.length - 1);\n\t\t\t}\n\n\t\t\treturn outputMenuItems;\n\t\t};\n\n\t\tvar createCustomMenuItems = function (names) {\n\t\t\tvar items, nameList;\n\n\t\t\tif (typeof names === 'string') {\n\t\t\t\tnameList = names.split(' ');\n\t\t\t} else if (Tools.isArray(names)) {\n\t\t\t\treturn flatten(Tools.map(names, createCustomMenuItems));\n\t\t\t}\n\n\t\t\titems = Tools.grep(nameList, function (name) {\n\t\t\t\treturn name === '|' || name in editor.menuItems;\n\t\t\t});\n\n\t\t\treturn Tools.map(items, function (name) {\n\t\t\t\treturn name === '|' ? {text: '-'} : editor.menuItems[name];\n\t\t\t});\n\t\t};\n\n\t\tvar createContextMenuItems = function (context) {\n\t\t\tvar outputMenuItems = [{text: '-'}];\n\t\t\tvar menuItems = Tools.grep(editor.menuItems, function (menuItem) {\n\t\t\t\treturn menuItem.context === context;\n\t\t\t});\n\n\t\t\tTools.each(menuItems, function (menuItem) {\n\t\t\t\tif (menuItem.separator == 'before') {\n\t\t\t\t\toutputMenuItems.push({text: '|'});\n\t\t\t\t}\n\n\t\t\t\tif (menuItem.prependToContext) {\n\t\t\t\t\toutputMenuItems.unshift(menuItem);\n\t\t\t\t} else {\n\t\t\t\t\toutputMenuItems.push(menuItem);\n\t\t\t\t}\n\n\t\t\t\tif (menuItem.separator == 'after') {\n\t\t\t\t\toutputMenuItems.push({text: '|'});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn outputMenuItems;\n\t\t};\n\n\t\tvar createInsertMenu = function (editorSettings) {\n\t\t\tif (editorSettings.insert_button_items) {\n\t\t\t\treturn trimMenuItems(createCustomMenuItems(editorSettings.insert_button_items));\n\t\t\t} else {\n\t\t\t\treturn trimMenuItems(createContextMenuItems('insert'));\n\t\t\t}\n\t\t};\n\n\t\teditor.addButton('undo', {\n\t\t\ttooltip: 'Undo',\n\t\t\tonPostRender: toggleUndoRedoState('undo'),\n\t\t\tcmd: 'undo'\n\t\t});\n\n\t\teditor.addButton('redo', {\n\t\t\ttooltip: 'Redo',\n\t\t\tonPostRender: toggleUndoRedoState('redo'),\n\t\t\tcmd: 'redo'\n\t\t});\n\n\t\teditor.addMenuItem('newdocument', {\n\t\t\ttext: 'New document',\n\t\t\ticon: 'newdocument',\n\t\t\tcmd: 'mceNewDocument'\n\t\t});\n\n\t\teditor.addMenuItem('undo', {\n\t\t\ttext: 'Undo',\n\t\t\ticon: 'undo',\n\t\t\tshortcut: 'Meta+Z',\n\t\t\tonPostRender: toggleUndoRedoState('undo'),\n\t\t\tcmd: 'undo'\n\t\t});\n\n\t\teditor.addMenuItem('redo', {\n\t\t\ttext: 'Redo',\n\t\t\ticon: 'redo',\n\t\t\tshortcut: 'Meta+Y',\n\t\t\tonPostRender: toggleUndoRedoState('redo'),\n\t\t\tcmd: 'redo'\n\t\t});\n\n\t\teditor.addMenuItem('visualaid', {\n\t\t\ttext: 'Visual aids',\n\t\t\tselectable: true,\n\t\t\tonPostRender: toggleVisualAidState,\n\t\t\tcmd: 'mceToggleVisualAid'\n\t\t});\n\n\t\teditor.addButton('remove', {\n\t\t\ttooltip: 'Remove',\n\t\t\ticon: 'remove',\n\t\t\tcmd: 'Delete'\n\t\t});\n\n\t\teditor.addButton('insert', {\n\t\t\ttype: 'menubutton',\n\t\t\ticon: 'insert',\n\t\t\tmenu: [],\n\t\t\toncreatemenu: function () {\n\t\t\t\tthis.menu.add(createInsertMenu(editor.settings));\n\t\t\t\tthis.menu.renderNew();\n\t\t\t}\n\t\t});\n\n\t\teach({\n\t\t\tcut: ['Cut', 'Cut', 'Meta+X'],\n\t\t\tcopy: ['Copy', 'Copy', 'Meta+C'],\n\t\t\tpaste: ['Paste', 'Paste', 'Meta+V'],\n\t\t\tselectall: ['Select all', 'SelectAll', 'Meta+A'],\n\t\t\tbold: ['Bold', 'Bold', 'Meta+B'],\n\t\t\titalic: ['Italic', 'Italic', 'Meta+I'],\n\t\t\tunderline: ['Underline', 'Underline', 'Meta+U'],\n\t\t\tstrikethrough: ['Strikethrough', 'Strikethrough'],\n\t\t\tsubscript: ['Subscript', 'Subscript'],\n\t\t\tsuperscript: ['Superscript', 'Superscript'],\n\t\t\tremoveformat: ['Clear formatting', 'RemoveFormat']\n\t\t}, function(item, name) {\n\t\t\teditor.addMenuItem(name, {\n\t\t\t\ttext: item[0],\n\t\t\t\ticon: name,\n\t\t\t\tshortcut: item[2],\n\t\t\t\tcmd: item[1]\n\t\t\t});\n\t\t});\n\n\t\teditor.on('mousedown', function() {\n\t\t\tFloatPanel.hideAll();\n\t\t});\n\n\t\tfunction toggleFormat(fmt) {\n\t\t\tif (fmt.control) {\n\t\t\t\tfmt = fmt.control.value();\n\t\t\t}\n\n\t\t\tif (fmt) {\n\t\t\t\teditor.execCommand('mceToggleFormat', false, fmt);\n\t\t\t}\n\t\t}\n\n\t\tfunction hideMenuObjects(menu) {\n\t\t\tvar count = menu.length;\n\n\t\t\tTools.each(menu, function (item) {\n\t\t\t\tif (item.menu) {\n\t\t\t\t\titem.hidden = hideMenuObjects(item.menu) === 0;\n\t\t\t\t}\n\n\t\t\t\tvar formatName = item.format;\n\t\t\t\tif (formatName) {\n\t\t\t\t\titem.hidden = !editor.formatter.canApply(formatName);\n\t\t\t\t}\n\n\t\t\t\tif (item.hidden) {\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn count;\n\t\t}\n\n\t\tfunction hideFormatMenuItems(menu) {\n\t\t\tvar count = menu.items().length;\n\n\t\t\tmenu.items().each(function (item) {\n\t\t\t\tif (item.menu) {\n\t\t\t\t\titem.visible(hideFormatMenuItems(item.menu) > 0);\n\t\t\t\t}\n\n\t\t\t\tif (!item.menu && item.settings.menu) {\n\t\t\t\t\titem.visible(hideMenuObjects(item.settings.menu) > 0);\n\t\t\t\t}\n\n\t\t\t\tvar formatName = item.settings.format;\n\t\t\t\tif (formatName) {\n\t\t\t\t\titem.visible(editor.formatter.canApply(formatName));\n\t\t\t\t}\n\n\t\t\t\tif (!item.visible()) {\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn count;\n\t\t}\n\n\t\teditor.addButton('styleselect', {\n\t\t\ttype: 'menubutton',\n\t\t\ttext: 'Formats',\n\t\t\tmenu: formatMenu,\n\t\t\tonShowMenu: function () {\n\t\t\t\tif (editor.settings.style_formats_autohide) {\n\t\t\t\t\thideFormatMenuItems(this.menu);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\teditor.addButton('formatselect', function() {\n\t\t\tvar items = [], blocks = createFormats(editor.settings.block_formats ||\n\t\t\t\t'Paragraph=p;' +\n\t\t\t\t'Heading 1=h1;' +\n\t\t\t\t'Heading 2=h2;' +\n\t\t\t\t'Heading 3=h3;' +\n\t\t\t\t'Heading 4=h4;' +\n\t\t\t\t'Heading 5=h5;' +\n\t\t\t\t'Heading 6=h6;' +\n\t\t\t\t'Preformatted=pre'\n\t\t\t);\n\n\t\t\teach(blocks, function(block) {\n\t\t\t\titems.push({\n\t\t\t\t\ttext: block[0],\n\t\t\t\t\tvalue: block[1],\n\t\t\t\t\ttextStyle: function() {\n\t\t\t\t\t\treturn editor.formatter.getCssText(block[1]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\ttype: 'listbox',\n\t\t\t\ttext: blocks[0][0],\n\t\t\t\tvalues: items,\n\t\t\t\tfixedWidth: true,\n\t\t\t\tonselect: toggleFormat,\n\t\t\t\tonPostRender: createListBoxChangeHandler(items)\n\t\t\t};\n\t\t});\n\n\t\teditor.addButton('fontselect', function() {\n\t\t\tvar defaultFontsFormats =\n\t\t\t\t'Andale Mono=andale mono,monospace;' +\n\t\t\t\t'Arial=arial,helvetica,sans-serif;' +\n\t\t\t\t'Arial Black=arial black,sans-serif;' +\n\t\t\t\t'Book Antiqua=book antiqua,palatino,serif;' +\n\t\t\t\t'Comic Sans MS=comic sans ms,sans-serif;' +\n\t\t\t\t'Courier New=courier new,courier,monospace;' +\n\t\t\t\t'Georgia=georgia,palatino,serif;' +\n\t\t\t\t'Helvetica=helvetica,arial,sans-serif;' +\n\t\t\t\t'Impact=impact,sans-serif;' +\n\t\t\t\t'Symbol=symbol;' +\n\t\t\t\t'Tahoma=tahoma,arial,helvetica,sans-serif;' +\n\t\t\t\t'Terminal=terminal,monaco,monospace;' +\n\t\t\t\t'Times New Roman=times new roman,times,serif;' +\n\t\t\t\t'Trebuchet MS=trebuchet ms,geneva,sans-serif;' +\n\t\t\t\t'Verdana=verdana,geneva,sans-serif;' +\n\t\t\t\t'Webdings=webdings;' +\n\t\t\t\t'Wingdings=wingdings,zapf dingbats';\n\n\t\t\tvar items = [], fonts = createFormats(editor.settings.font_formats || defaultFontsFormats);\n\n\t\t\teach(fonts, function(font) {\n\t\t\t\titems.push({\n\t\t\t\t\ttext: {raw: font[0]},\n\t\t\t\t\tvalue: font[1],\n\t\t\t\t\ttextStyle: font[1].indexOf('dings') == -1 ? 'font-family:' + font[1] : ''\n\t\t\t\t});\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\ttype: 'listbox',\n\t\t\t\ttext: 'Font Family',\n\t\t\t\ttooltip: 'Font Family',\n\t\t\t\tvalues: items,\n\t\t\t\tfixedWidth: true,\n\t\t\t\tonPostRender: createFontNameListBoxChangeHandler(items),\n\t\t\t\tonselect: function(e) {\n\t\t\t\t\tif (e.control.settings.value) {\n\t\t\t\t\t\teditor.execCommand('FontName', false, e.control.settings.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\n\t\teditor.addButton('fontsizeselect', function() {\n\t\t\tvar items = [], defaultFontsizeFormats = '8pt 10pt 12pt 14pt 18pt 24pt 36pt';\n\t\t\tvar fontsize_formats = editor.settings.fontsize_formats || defaultFontsizeFormats;\n\n\t\t\teach(fontsize_formats.split(' '), function(item) {\n\t\t\t\tvar text = item, value = item;\n\t\t\t\t// Allow text=value font sizes.\n\t\t\t\tvar values = item.split('=');\n\t\t\t\tif (values.length > 1) {\n\t\t\t\t\ttext = values[0];\n\t\t\t\t\tvalue = values[1];\n\t\t\t\t}\n\t\t\t\titems.push({text: text, value: value});\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\ttype: 'listbox',\n\t\t\t\ttext: 'Font Sizes',\n\t\t\t\ttooltip: 'Font Sizes',\n\t\t\t\tvalues: items,\n\t\t\t\tfixedWidth: true,\n\t\t\t\tonPostRender: createFontSizeListBoxChangeHandler(items),\n\t\t\t\tonclick: function(e) {\n\t\t\t\t\tif (e.control.settings.value) {\n\t\t\t\t\t\teditor.execCommand('FontSize', false, e.control.settings.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\n\t\teditor.addMenuItem('formats', {\n\t\t\ttext: 'Formats',\n\t\t\tmenu: formatMenu\n\t\t});\n\t}\n});\n\n// Included from: js/tinymce/classes/ui/GridLayout.js\n\n/**\n * GridLayout.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This layout manager places controls in a grid.\n *\n * @setting {Number} spacing Spacing between controls.\n * @setting {Number} spacingH Horizontal spacing between controls.\n * @setting {Number} spacingV Vertical spacing between controls.\n * @setting {Number} columns Number of columns to use.\n * @setting {String/Array} alignH start|end|center|stretch or array of values for each column.\n * @setting {String/Array} alignV start|end|center|stretch or array of values for each column.\n * @setting {String} pack start|end\n *\n * @class tinymce.ui.GridLayout\n * @extends tinymce.ui.AbsoluteLayout\n */\ndefine(\"tinymce/ui/GridLayout\", [\n\t\"tinymce/ui/AbsoluteLayout\"\n], function(AbsoluteLayout) {\n\t\"use strict\";\n\n\treturn AbsoluteLayout.extend({\n\t\t/**\n\t\t * Recalculates the positions of the controls in the specified container.\n\t\t *\n\t\t * @method recalc\n\t\t * @param {tinymce.ui.Container} container Container instance to recalc.\n\t\t */\n\t\trecalc: function(container) {\n\t\t\tvar settings, rows, cols, items, contLayoutRect, width, height, rect,\n\t\t\t\tctrlLayoutRect, ctrl, x, y, posX, posY, ctrlSettings, contPaddingBox, align, spacingH, spacingV, alignH, alignV, maxX, maxY,\n\t\t\t\tcolWidths = [], rowHeights = [], ctrlMinWidth, ctrlMinHeight, availableWidth, availableHeight, reverseRows, idx;\n\n\t\t\t// Get layout settings\n\t\t\tsettings = container.settings;\n\t\t\titems = container.items().filter(':visible');\n\t\t\tcontLayoutRect = container.layoutRect();\n\t\t\tcols = settings.columns || Math.ceil(Math.sqrt(items.length));\n\t\t\trows = Math.ceil(items.length / cols);\n\t\t\tspacingH = settings.spacingH || settings.spacing || 0;\n\t\t\tspacingV = settings.spacingV || settings.spacing || 0;\n\t\t\talignH = settings.alignH || settings.align;\n\t\t\talignV = settings.alignV || settings.align;\n\t\t\tcontPaddingBox = container.paddingBox;\n\t\t\treverseRows = 'reverseRows' in settings ? settings.reverseRows : container.isRtl();\n\n\t\t\tif (alignH && typeof alignH == \"string\") {\n\t\t\t\talignH = [alignH];\n\t\t\t}\n\n\t\t\tif (alignV && typeof alignV == \"string\") {\n\t\t\t\talignV = [alignV];\n\t\t\t}\n\n\t\t\t// Zero padd columnWidths\n\t\t\tfor (x = 0; x < cols; x++) {\n\t\t\t\tcolWidths.push(0);\n\t\t\t}\n\n\t\t\t// Zero padd rowHeights\n\t\t\tfor (y = 0; y < rows; y++) {\n\t\t\t\trowHeights.push(0);\n\t\t\t}\n\n\t\t\t// Calculate columnWidths and rowHeights\n\t\t\tfor (y = 0; y < rows; y++) {\n\t\t\t\tfor (x = 0; x < cols; x++) {\n\t\t\t\t\tctrl = items[y * cols + x];\n\n\t\t\t\t\t// Out of bounds\n\t\t\t\t\tif (!ctrl) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tctrlLayoutRect = ctrl.layoutRect();\n\t\t\t\t\tctrlMinWidth = ctrlLayoutRect.minW;\n\t\t\t\t\tctrlMinHeight = ctrlLayoutRect.minH;\n\n\t\t\t\t\tcolWidths[x] = ctrlMinWidth > colWidths[x] ? ctrlMinWidth : colWidths[x];\n\t\t\t\t\trowHeights[y] = ctrlMinHeight > rowHeights[y] ? ctrlMinHeight : rowHeights[y];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Calculate maxX\n\t\t\tavailableWidth = contLayoutRect.innerW - contPaddingBox.left - contPaddingBox.right;\n\t\t\tfor (maxX = 0, x = 0; x < cols; x++) {\n\t\t\t\tmaxX += colWidths[x] + (x > 0 ? spacingH : 0);\n\t\t\t\tavailableWidth -= (x > 0 ? spacingH : 0) + colWidths[x];\n\t\t\t}\n\n\t\t\t// Calculate maxY\n\t\t\tavailableHeight = contLayoutRect.innerH - contPaddingBox.top - contPaddingBox.bottom;\n\t\t\tfor (maxY = 0, y = 0; y < rows; y++) {\n\t\t\t\tmaxY += rowHeights[y] + (y > 0 ? spacingV : 0);\n\t\t\t\tavailableHeight -= (y > 0 ? spacingV : 0) + rowHeights[y];\n\t\t\t}\n\n\t\t\tmaxX += contPaddingBox.left + contPaddingBox.right;\n\t\t\tmaxY += contPaddingBox.top + contPaddingBox.bottom;\n\n\t\t\t// Calculate minW/minH\n\t\t\trect = {};\n\t\t\trect.minW = maxX + (contLayoutRect.w - contLayoutRect.innerW);\n\t\t\trect.minH = maxY + (contLayoutRect.h - contLayoutRect.innerH);\n\n\t\t\trect.contentW = rect.minW - contLayoutRect.deltaW;\n\t\t\trect.contentH = rect.minH - contLayoutRect.deltaH;\n\t\t\trect.minW = Math.min(rect.minW, contLayoutRect.maxW);\n\t\t\trect.minH = Math.min(rect.minH, contLayoutRect.maxH);\n\t\t\trect.minW = Math.max(rect.minW, contLayoutRect.startMinWidth);\n\t\t\trect.minH = Math.max(rect.minH, contLayoutRect.startMinHeight);\n\n\t\t\t// Resize container container if minSize was changed\n\t\t\tif (contLayoutRect.autoResize && (rect.minW != contLayoutRect.minW || rect.minH != contLayoutRect.minH)) {\n\t\t\t\trect.w = rect.minW;\n\t\t\t\trect.h = rect.minH;\n\n\t\t\t\tcontainer.layoutRect(rect);\n\t\t\t\tthis.recalc(container);\n\n\t\t\t\t// Forced recalc for example if items are hidden/shown\n\t\t\t\tif (container._lastRect === null) {\n\t\t\t\t\tvar parentCtrl = container.parent();\n\t\t\t\t\tif (parentCtrl) {\n\t\t\t\t\t\tparentCtrl._lastRect = null;\n\t\t\t\t\t\tparentCtrl.recalc();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Update contentW/contentH so absEnd moves correctly\n\t\t\tif (contLayoutRect.autoResize) {\n\t\t\t\trect = container.layoutRect(rect);\n\t\t\t\trect.contentW = rect.minW - contLayoutRect.deltaW;\n\t\t\t\trect.contentH = rect.minH - contLayoutRect.deltaH;\n\t\t\t}\n\n\t\t\tvar flexV;\n\n\t\t\tif (settings.packV == 'start') {\n\t\t\t\tflexV = 0;\n\t\t\t} else {\n\t\t\t\tflexV = availableHeight > 0 ? Math.floor(availableHeight / rows) : 0;\n\t\t\t}\n\n\t\t\t// Calculate totalFlex\n\t\t\tvar totalFlex = 0;\n\t\t\tvar flexWidths = settings.flexWidths;\n\t\t\tif (flexWidths) {\n\t\t\t\tfor (x = 0; x < flexWidths.length; x++) {\n\t\t\t\t\ttotalFlex += flexWidths[x];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttotalFlex = cols;\n\t\t\t}\n\n\t\t\t// Calculate new column widths based on flex values\n\t\t\tvar ratio = availableWidth / totalFlex;\n\t\t\tfor (x = 0; x < cols; x++) {\n\t\t\t\tcolWidths[x] += flexWidths ? flexWidths[x] * ratio : ratio;\n\t\t\t}\n\n\t\t\t// Move/resize controls\n\t\t\tposY = contPaddingBox.top;\n\t\t\tfor (y = 0; y < rows; y++) {\n\t\t\t\tposX = contPaddingBox.left;\n\t\t\t\theight = rowHeights[y] + flexV;\n\n\t\t\t\tfor (x = 0; x < cols; x++) {\n\t\t\t\t\tif (reverseRows) {\n\t\t\t\t\t\tidx = y * cols + cols - 1 - x;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tidx = y * cols + x;\n\t\t\t\t\t}\n\n\t\t\t\t\tctrl = items[idx];\n\n\t\t\t\t\t// No more controls to render then break\n\t\t\t\t\tif (!ctrl) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get control settings and calculate x, y\n\t\t\t\t\tctrlSettings = ctrl.settings;\n\t\t\t\t\tctrlLayoutRect = ctrl.layoutRect();\n\t\t\t\t\twidth = Math.max(colWidths[x], ctrlLayoutRect.startMinWidth);\n\t\t\t\t\tctrlLayoutRect.x = posX;\n\t\t\t\t\tctrlLayoutRect.y = posY;\n\n\t\t\t\t\t// Align control horizontal\n\t\t\t\t\talign = ctrlSettings.alignH || (alignH ? (alignH[x] || alignH[0]) : null);\n\t\t\t\t\tif (align == \"center\") {\n\t\t\t\t\t\tctrlLayoutRect.x = posX + (width / 2) - (ctrlLayoutRect.w / 2);\n\t\t\t\t\t} else if (align == \"right\") {\n\t\t\t\t\t\tctrlLayoutRect.x = posX + width - ctrlLayoutRect.w;\n\t\t\t\t\t} else if (align == \"stretch\") {\n\t\t\t\t\t\tctrlLayoutRect.w = width;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Align control vertical\n\t\t\t\t\talign = ctrlSettings.alignV || (alignV ? (alignV[x] || alignV[0]) : null);\n\t\t\t\t\tif (align == \"center\") {\n\t\t\t\t\t\tctrlLayoutRect.y = posY + (height / 2) - (ctrlLayoutRect.h / 2);\n\t\t\t\t\t} else if (align == \"bottom\") {\n\t\t\t\t\t\tctrlLayoutRect.y = posY + height - ctrlLayoutRect.h;\n\t\t\t\t\t} else if (align == \"stretch\") {\n\t\t\t\t\t\tctrlLayoutRect.h = height;\n\t\t\t\t\t}\n\n\t\t\t\t\tctrl.layoutRect(ctrlLayoutRect);\n\n\t\t\t\t\tposX += width + spacingH;\n\n\t\t\t\t\tif (ctrl.recalc) {\n\t\t\t\t\t\tctrl.recalc();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tposY += height + spacingV;\n\t\t\t}\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Iframe.js\n\n/**\n * Iframe.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/*jshint scripturl:true */\n\n/**\n * This class creates an iframe.\n *\n * @setting {String} url Url to open in the iframe.\n *\n * @-x-less Iframe.less\n * @class tinymce.ui.Iframe\n * @extends tinymce.ui.Widget\n */\ndefine(\"tinymce/ui/Iframe\", [\n\t\"tinymce/ui/Widget\",\n\t\"tinymce/util/Delay\"\n], function(Widget, Delay) {\n\t\"use strict\";\n\n\treturn Widget.extend({\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.classes.add('iframe');\n\t\t\tself.canFocus = false;\n\n\t\t\t/*eslint no-script-url:0 */\n\t\t\treturn (\n\t\t\t\t''\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Setter for the iframe source.\n\t\t *\n\t\t * @method src\n\t\t * @param {String} src Source URL for iframe.\n\t\t */\n\t\tsrc: function(src) {\n\t\t\tthis.getEl().src = src;\n\t\t},\n\n\t\t/**\n\t\t * Inner HTML for the iframe.\n\t\t *\n\t\t * @method html\n\t\t * @param {String} html HTML string to set as HTML inside the iframe.\n\t\t * @param {function} callback Optional callback to execute when the iframe body is filled with contents.\n\t\t * @return {tinymce.ui.Iframe} Current iframe control.\n\t\t */\n\t\thtml: function(html, callback) {\n\t\t\tvar self = this, body = this.getEl().contentWindow.document.body;\n\n\t\t\t// Wait for iframe to initialize IE 10 takes time\n\t\t\tif (!body) {\n\t\t\t\tDelay.setTimeout(function() {\n\t\t\t\t\tself.html(html);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tbody.innerHTML = html;\n\n\t\t\t\tif (callback) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/InfoBox.js\n\n/**\n * InfoBox.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2016 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * ....\n *\n * @-x-less InfoBox.less\n * @class tinymce.ui.InfoBox\n * @extends tinymce.ui.Widget\n */\ndefine(\"tinymce/ui/InfoBox\", [\n\t\"tinymce/ui/Widget\"\n], function(Widget) {\n\t\"use strict\";\n\n\treturn Widget.extend({\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {Boolean} multiline Multiline label.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\t\t\tself.classes.add('widget').add('infobox');\n\t\t\tself.canFocus = false;\n\t\t},\n\n\t\tseverity: function(level) {\n\t\t\tthis.classes.remove('error');\n\t\t\tthis.classes.remove('warning');\n\t\t\tthis.classes.remove('success');\n\t\t\tthis.classes.add(level);\n\t\t},\n\n\t\thelp: function(state) {\n\t\t\tthis.state.set('help', state);\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, prefix = self.classPrefix;\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\tself.encode(self.state.get('text')) +\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\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.state.on('change:text', function(e) {\n\t\t\t\tself.getEl('body').firstChild.data = self.encode(e.value);\n\n\t\t\t\tif (self.state.get('rendered')) {\n\t\t\t\t\tself.updateLayoutRect();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.state.on('change:help', function(e) {\n\t\t\t\tself.classes.toggle('has-help', e.value);\n\n\t\t\t\tif (self.state.get('rendered')) {\n\t\t\t\t\tself.updateLayoutRect();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Label.js\n\n/**\n * Label.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class creates a label element. A label is a simple text control\n * that can be bound to other controls.\n *\n * @-x-less Label.less\n * @class tinymce.ui.Label\n * @extends tinymce.ui.Widget\n */\ndefine(\"tinymce/ui/Label\", [\n\t\"tinymce/ui/Widget\",\n\t\"tinymce/ui/DomUtils\"\n], function(Widget, DomUtils) {\n\t\"use strict\";\n\n\treturn Widget.extend({\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {Boolean} multiline Multiline label.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\t\t\tself.classes.add('widget').add('label');\n\t\t\tself.canFocus = false;\n\n\t\t\tif (settings.multiline) {\n\t\t\t\tself.classes.add('autoscroll');\n\t\t\t}\n\n\t\t\tif (settings.strong) {\n\t\t\t\tself.classes.add('strong');\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Initializes the current controls layout rect.\n\t\t * This will be executed by the layout managers to determine the\n\t\t * default minWidth/minHeight etc.\n\t\t *\n\t\t * @method initLayoutRect\n\t\t * @return {Object} Layout rect instance.\n\t\t */\n\t\tinitLayoutRect: function() {\n\t\t\tvar self = this, layoutRect = self._super();\n\n\t\t\tif (self.settings.multiline) {\n\t\t\t\tvar size = DomUtils.getSize(self.getEl());\n\n\t\t\t\t// Check if the text fits within maxW if not then try word wrapping it\n\t\t\t\tif (size.width > layoutRect.maxW) {\n\t\t\t\t\tlayoutRect.minW = layoutRect.maxW;\n\t\t\t\t\tself.classes.add('multiline');\n\t\t\t\t}\n\n\t\t\t\tself.getEl().style.width = layoutRect.minW + 'px';\n\t\t\t\tlayoutRect.startMinH = layoutRect.h = layoutRect.minH = Math.min(layoutRect.maxH, DomUtils.getSize(self.getEl()).height);\n\t\t\t}\n\n\t\t\treturn layoutRect;\n\t\t},\n\n\t\t/**\n\t\t * Repaints the control after a layout operation.\n\t\t *\n\t\t * @method repaint\n\t\t */\n\t\trepaint: function() {\n\t\t\tvar self = this;\n\n\t\t\tif (!self.settings.multiline) {\n\t\t\t\tself.getEl().style.lineHeight = self.layoutRect().h + 'px';\n\t\t\t}\n\n\t\t\treturn self._super();\n\t\t},\n\n\t\tseverity: function(level) {\n\t\t\tthis.classes.remove('error');\n\t\t\tthis.classes.remove('warning');\n\t\t\tthis.classes.remove('success');\n\t\t\tthis.classes.add(level);\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, targetCtrl, forName, forId = self.settings.forId;\n\n\t\t\tif (!forId && (forName = self.settings.forName)) {\n\t\t\t\ttargetCtrl = self.getRoot().find('#' + forName)[0];\n\n\t\t\t\tif (targetCtrl) {\n\t\t\t\t\tforId = targetCtrl._id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (forId) {\n\t\t\t\treturn (\n\t\t\t\t\t''\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t'' +\n\t\t\t\t\tself.encode(self.state.get('text')) +\n\t\t\t\t''\n\t\t\t);\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.state.on('change:text', function(e) {\n\t\t\t\tself.innerHtml(self.encode(e.value));\n\n\t\t\t\tif (self.state.get('rendered')) {\n\t\t\t\t\tself.updateLayoutRect();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Toolbar.js\n\n/**\n * Toolbar.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new toolbar.\n *\n * @class tinymce.ui.Toolbar\n * @extends tinymce.ui.Container\n */\ndefine(\"tinymce/ui/Toolbar\", [\n\t\"tinymce/ui/Container\"\n], function(Container) {\n\t\"use strict\";\n\n\treturn Container.extend({\n\t\tDefaults: {\n\t\t\trole: 'toolbar',\n\t\t\tlayout: 'flow'\n\t\t},\n\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\t\t\tself.classes.add('toolbar');\n\t\t},\n\n\t\t/**\n\t\t * Called after the control has been rendered.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.items().each(function(ctrl) {\n\t\t\t\tctrl.classes.add('toolbar-item');\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/MenuBar.js\n\n/**\n * MenuBar.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new menubar.\n *\n * @-x-less MenuBar.less\n * @class tinymce.ui.MenuBar\n * @extends tinymce.ui.Container\n */\ndefine(\"tinymce/ui/MenuBar\", [\n\t\"tinymce/ui/Toolbar\"\n], function(Toolbar) {\n\t\"use strict\";\n\n\treturn Toolbar.extend({\n\t\tDefaults: {\n\t\t\trole: 'menubar',\n\t\t\tcontainerCls: 'menubar',\n\t\t\tariaRoot: true,\n\t\t\tdefaults: {\n\t\t\t\ttype: 'menubutton'\n\t\t\t}\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/MenuButton.js\n\n/**\n * MenuButton.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new menu button.\n *\n * @-x-less MenuButton.less\n * @class tinymce.ui.MenuButton\n * @extends tinymce.ui.Button\n */\ndefine(\"tinymce/ui/MenuButton\", [\n\t\"tinymce/ui/Button\",\n\t\"tinymce/ui/Factory\",\n\t\"tinymce/ui/MenuBar\"\n], function(Button, Factory, MenuBar) {\n\t\"use strict\";\n\n\t// TODO: Maybe add as some global function\n\tfunction isChildOf(node, parent) {\n\t\twhile (node) {\n\t\t\tif (parent === node) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tnode = node.parentNode;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tvar MenuButton = Button.extend({\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._renderOpen = true;\n\n\t\t\tself._super(settings);\n\t\t\tsettings = self.settings;\n\n\t\t\tself.classes.add('menubtn');\n\n\t\t\tif (settings.fixedWidth) {\n\t\t\t\tself.classes.add('fixed-width');\n\t\t\t}\n\n\t\t\tself.aria('haspopup', true);\n\n\t\t\tself.state.set('menu', settings.menu || self.render());\n\t\t},\n\n\t\t/**\n\t\t * Shows the menu for the button.\n\t\t *\n\t\t * @method showMenu\n\t\t */\n\t\tshowMenu: function(toggle) {\n\t\t\tvar self = this, menu;\n\n\t\t\tif (self.menu && self.menu.visible() && toggle !== false) {\n\t\t\t\treturn self.hideMenu();\n\t\t\t}\n\n\t\t\tif (!self.menu) {\n\t\t\t\tmenu = self.state.get('menu') || [];\n\n\t\t\t\t// Is menu array then auto constuct menu control\n\t\t\t\tif (menu.length) {\n\t\t\t\t\tmenu = {\n\t\t\t\t\t\ttype: 'menu',\n\t\t\t\t\t\titems: menu\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tmenu.type = menu.type || 'menu';\n\t\t\t\t}\n\n\t\t\t\tif (!menu.renderTo) {\n\t\t\t\t\tself.menu = Factory.create(menu).parent(self).renderTo();\n\t\t\t\t} else {\n\t\t\t\t\tself.menu = menu.parent(self).show().renderTo();\n\t\t\t\t}\n\n\t\t\t\tself.fire('createmenu');\n\t\t\t\tself.menu.reflow();\n\t\t\t\tself.menu.on('cancel', function(e) {\n\t\t\t\t\tif (e.control.parent() === self.menu) {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\tself.focus();\n\t\t\t\t\t\tself.hideMenu();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Move focus to button when a menu item is selected/clicked\n\t\t\t\tself.menu.on('select', function() {\n\t\t\t\t\tself.focus();\n\t\t\t\t});\n\n\t\t\t\tself.menu.on('show hide', function(e) {\n\t\t\t\t\tif (e.control == self.menu) {\n\t\t\t\t\t\tself.activeMenu(e.type == 'show');\n\t\t\t\t\t}\n\n\t\t\t\t\tself.aria('expanded', e.type == 'show');\n\t\t\t\t}).fire('show');\n\t\t\t}\n\n\t\t\tself.menu.show();\n\t\t\tself.menu.layoutRect({w: self.layoutRect().w});\n\t\t\tself.menu.moveRel(self.getEl(), self.isRtl() ? ['br-tr', 'tr-br'] : ['bl-tl', 'tl-bl']);\n\t\t\tself.fire('showmenu');\n\t\t},\n\n\t\t/**\n\t\t * Hides the menu for the button.\n\t\t *\n\t\t * @method hideMenu\n\t\t */\n\t\thideMenu: function() {\n\t\t\tvar self = this;\n\n\t\t\tif (self.menu) {\n\t\t\t\tself.menu.items().each(function(item) {\n\t\t\t\t\tif (item.hideMenu) {\n\t\t\t\t\t\titem.hideMenu();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tself.menu.hide();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Sets the active menu state.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tactiveMenu: function(state) {\n\t\t\tthis.classes.toggle('active', state);\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, id = self._id, prefix = self.classPrefix;\n\t\t\tvar icon = self.settings.icon, image, text = self.state.get('text'),\n\t\t\t\ttextHtml = '';\n\n\t\t\timage = self.settings.image;\n\t\t\tif (image) {\n\t\t\t\ticon = 'none';\n\n\t\t\t\t// Support for [high dpi, low dpi] image sources\n\t\t\t\tif (typeof image != \"string\") {\n\t\t\t\t\timage = window.getSelection ? image[0] : image[1];\n\t\t\t\t}\n\n\t\t\t\timage = ' style=\"background-image: url(\\'' + image + '\\')\"';\n\t\t\t} else {\n\t\t\t\timage = '';\n\t\t\t}\n\n\t\t\tif (text) {\n\t\t\t\tself.classes.add('btn-has-text');\n\t\t\t\ttextHtml = '' + self.encode(text) + '';\n\t\t\t}\n\n\t\t\ticon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';\n\n\t\t\tself.aria('role', self.parent() instanceof MenuBar ? 'menuitem' : 'button');\n\n\t\t\treturn (\n\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/**\n\t\t * Gets invoked after the control has been rendered.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.on('click', function(e) {\n\t\t\t\tif (e.control === self && isChildOf(e.target, self.getEl())) {\n\t\t\t\t\tself.focus();\n\t\t\t\t\tself.showMenu(!e.aria);\n\n\t\t\t\t\tif (e.aria) {\n\t\t\t\t\t\tself.menu.items().filter(':visible')[0].focus();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.on('mouseenter', function(e) {\n\t\t\t\tvar overCtrl = e.control, parent = self.parent(), hasVisibleSiblingMenu;\n\n\t\t\t\tif (overCtrl && parent && overCtrl instanceof MenuButton && overCtrl.parent() == parent) {\n\t\t\t\t\tparent.items().filter('MenuButton').each(function(ctrl) {\n\t\t\t\t\t\tif (ctrl.hideMenu && ctrl != overCtrl) {\n\t\t\t\t\t\t\tif (ctrl.menu && ctrl.menu.visible()) {\n\t\t\t\t\t\t\t\thasVisibleSiblingMenu = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tctrl.hideMenu();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tif (hasVisibleSiblingMenu) {\n\t\t\t\t\t\toverCtrl.focus(); // Fix for: #5887\n\t\t\t\t\t\toverCtrl.showMenu();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.state.on('change:menu', function() {\n\t\t\t\tif (self.menu) {\n\t\t\t\t\tself.menu.remove();\n\t\t\t\t}\n\n\t\t\t\tself.menu = null;\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t},\n\n\t\t/**\n\t\t * Removes the control and it's menus.\n\t\t *\n\t\t * @method remove\n\t\t */\n\t\tremove: function() {\n\t\t\tthis._super();\n\n\t\t\tif (this.menu) {\n\t\t\t\tthis.menu.remove();\n\t\t\t}\n\t\t}\n\t});\n\n\treturn MenuButton;\n});\n\n// Included from: js/tinymce/classes/ui/MenuItem.js\n\n/**\n * MenuItem.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new menu item.\n *\n * @-x-less MenuItem.less\n * @class tinymce.ui.MenuItem\n * @extends tinymce.ui.Control\n */\ndefine(\"tinymce/ui/MenuItem\", [\n\t\"tinymce/ui/Widget\",\n\t\"tinymce/ui/Factory\",\n\t\"tinymce/Env\",\n\t\"tinymce/util/Delay\"\n], function(Widget, Factory, Env, Delay) {\n\t\"use strict\";\n\n\treturn Widget.extend({\n\t\tDefaults: {\n\t\t\tborder: 0,\n\t\t\trole: 'menuitem'\n\t\t},\n\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {Boolean} selectable Selectable menu.\n\t\t * @setting {Array} menu Submenu array with items.\n\t\t * @setting {String} shortcut Shortcut to display for menu item. Example: Ctrl+X\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this, text;\n\n\t\t\tself._super(settings);\n\n\t\t\tsettings = self.settings;\n\n\t\t\tself.classes.add('menu-item');\n\n\t\t\tif (settings.menu) {\n\t\t\t\tself.classes.add('menu-item-expand');\n\t\t\t}\n\n\t\t\tif (settings.preview) {\n\t\t\t\tself.classes.add('menu-item-preview');\n\t\t\t}\n\n\t\t\ttext = self.state.get('text');\n\t\t\tif (text === '-' || text === '|') {\n\t\t\t\tself.classes.add('menu-item-sep');\n\t\t\t\tself.aria('role', 'separator');\n\t\t\t\tself.state.set('text', '-');\n\t\t\t}\n\n\t\t\tif (settings.selectable) {\n\t\t\t\tself.aria('role', 'menuitemcheckbox');\n\t\t\t\tself.classes.add('menu-item-checkbox');\n\t\t\t\tsettings.icon = 'selected';\n\t\t\t}\n\n\t\t\tif (!settings.preview && !settings.selectable) {\n\t\t\t\tself.classes.add('menu-item-normal');\n\t\t\t}\n\n\t\t\tself.on('mousedown', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t});\n\n\t\t\tif (settings.menu && !settings.ariaHideMenu) {\n\t\t\t\tself.aria('haspopup', true);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the menuitem has sub menu.\n\t\t *\n\t\t * @method hasMenus\n\t\t * @return {Boolean} True/false state if it has submenu.\n\t\t */\n\t\thasMenus: function() {\n\t\t\treturn !!this.settings.menu;\n\t\t},\n\n\t\t/**\n\t\t * Shows the menu for the menu item.\n\t\t *\n\t\t * @method showMenu\n\t\t */\n\t\tshowMenu: function() {\n\t\t\tvar self = this, settings = self.settings, menu, parent = self.parent();\n\n\t\t\tparent.items().each(function(ctrl) {\n\t\t\t\tif (ctrl !== self) {\n\t\t\t\t\tctrl.hideMenu();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (settings.menu) {\n\t\t\t\tmenu = self.menu;\n\n\t\t\t\tif (!menu) {\n\t\t\t\t\tmenu = settings.menu;\n\n\t\t\t\t\t// Is menu array then auto constuct menu control\n\t\t\t\t\tif (menu.length) {\n\t\t\t\t\t\tmenu = {\n\t\t\t\t\t\t\ttype: 'menu',\n\t\t\t\t\t\t\titems: menu\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmenu.type = menu.type || 'menu';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (parent.settings.itemDefaults) {\n\t\t\t\t\t\tmenu.itemDefaults = parent.settings.itemDefaults;\n\t\t\t\t\t}\n\n\t\t\t\t\tmenu = self.menu = Factory.create(menu).parent(self).renderTo();\n\t\t\t\t\tmenu.reflow();\n\t\t\t\t\tmenu.on('cancel', function(e) {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\tself.focus();\n\t\t\t\t\t\tmenu.hide();\n\t\t\t\t\t});\n\t\t\t\t\tmenu.on('show hide', function(e) {\n\t\t\t\t\t\tif (e.control.items) {\n\t\t\t\t\t\t\te.control.items().each(function(ctrl) {\n\t\t\t\t\t\t\t\tctrl.active(ctrl.settings.selected);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fire('show');\n\n\t\t\t\t\tmenu.on('hide', function(e) {\n\t\t\t\t\t\tif (e.control === menu) {\n\t\t\t\t\t\t\tself.classes.remove('selected');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tmenu.submenu = true;\n\t\t\t\t} else {\n\t\t\t\t\tmenu.show();\n\t\t\t\t}\n\n\t\t\t\tmenu._parentMenu = parent;\n\n\t\t\t\tmenu.classes.add('menu-sub');\n\n\t\t\t\tvar rel = menu.testMoveRel(\n\t\t\t\t\tself.getEl(),\n\t\t\t\t\tself.isRtl() ? ['tl-tr', 'bl-br', 'tr-tl', 'br-bl'] : ['tr-tl', 'br-bl', 'tl-tr', 'bl-br']\n\t\t\t\t);\n\n\t\t\t\tmenu.moveRel(self.getEl(), rel);\n\t\t\t\tmenu.rel = rel;\n\n\t\t\t\trel = 'menu-sub-' + rel;\n\t\t\t\tmenu.classes.remove(menu._lastRel).add(rel);\n\t\t\t\tmenu._lastRel = rel;\n\n\t\t\t\tself.classes.add('selected');\n\t\t\t\tself.aria('expanded', true);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Hides the menu for the menu item.\n\t\t *\n\t\t * @method hideMenu\n\t\t */\n\t\thideMenu: function() {\n\t\t\tvar self = this;\n\n\t\t\tif (self.menu) {\n\t\t\t\tself.menu.items().each(function(item) {\n\t\t\t\t\tif (item.hideMenu) {\n\t\t\t\t\t\titem.hideMenu();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tself.menu.hide();\n\t\t\t\tself.aria('expanded', false);\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, id = self._id, settings = self.settings, prefix = self.classPrefix, text = self.state.get('text');\n\t\t\tvar icon = self.settings.icon, image = '', shortcut = settings.shortcut;\n\t\t\tvar url = self.encode(settings.url), iconHtml = '';\n\n\t\t\t// Converts shortcut format to Mac/PC variants\n\t\t\tfunction convertShortcut(shortcut) {\n\t\t\t\tvar i, value, replace = {};\n\n\t\t\t\tif (Env.mac) {\n\t\t\t\t\treplace = {\n\t\t\t\t\t\talt: '⌥',\n\t\t\t\t\t\tctrl: '⌘',\n\t\t\t\t\t\tshift: '⇧',\n\t\t\t\t\t\tmeta: '⌘'\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\treplace = {\n\t\t\t\t\t\tmeta: 'Ctrl'\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tshortcut = shortcut.split('+');\n\n\t\t\t\tfor (i = 0; i < shortcut.length; i++) {\n\t\t\t\t\tvalue = replace[shortcut[i].toLowerCase()];\n\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\tshortcut[i] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn shortcut.join('+');\n\t\t\t}\n\n\t\t\tfunction escapeRegExp(str) {\n\t\t\t\treturn str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\t\t\t}\n\n\t\t\tfunction markMatches(text) {\n\t\t\t\tvar match = settings.match || '';\n\n\t\t\t\treturn match ? text.replace(new RegExp(escapeRegExp(match), 'gi'), function (match) {\n\t\t\t\t\treturn '!mce~match[' + match + ']mce~match!';\n\t\t\t\t}) : text;\n\t\t\t}\n\n\t\t\tfunction boldMatches(text) {\n\t\t\t\treturn text.\n\t\t\t\t\treplace(new RegExp(escapeRegExp('!mce~match['), 'g'), '').\n\t\t\t\t\treplace(new RegExp(escapeRegExp(']mce~match!'), 'g'), '');\n\t\t\t}\n\n\t\t\tif (icon) {\n\t\t\t\tself.parent().classes.add('menu-has-icons');\n\t\t\t}\n\n\t\t\tif (settings.image) {\n\t\t\t\timage = ' style=\"background-image: url(\\'' + settings.image + '\\')\"';\n\t\t\t}\n\n\t\t\tif (shortcut) {\n\t\t\t\tshortcut = convertShortcut(shortcut);\n\t\t\t}\n\n\t\t\ticon = prefix + 'ico ' + prefix + 'i-' + (self.settings.icon || 'none');\n\t\t\ticonHtml = (text !== '-' ? '\\u00a0' : '');\n\n\t\t\ttext = boldMatches(self.encode(markMatches(text)));\n\t\t\turl = boldMatches(self.encode(markMatches(url)));\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\ticonHtml +\n\t\t\t\t\t(text !== '-' ? '' + text + '' : '') +\n\t\t\t\t\t(shortcut ? '
      ' + shortcut + '
      ' : '') +\n\t\t\t\t\t(settings.menu ? '
      ' : '') +\n\t\t\t\t\t(url ? '
      ' + url + '
      ' : '') +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Gets invoked after the control has been rendered.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this, settings = self.settings;\n\n\t\t\tvar textStyle = settings.textStyle;\n\t\t\tif (typeof textStyle == \"function\") {\n\t\t\t\ttextStyle = textStyle.call(this);\n\t\t\t}\n\n\t\t\tif (textStyle) {\n\t\t\t\tvar textElm = self.getEl('text');\n\t\t\t\tif (textElm) {\n\t\t\t\t\ttextElm.setAttribute('style', textStyle);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tself.on('mouseenter click', function(e) {\n\t\t\t\tif (e.control === self) {\n\t\t\t\t\tif (!settings.menu && e.type === 'click') {\n\t\t\t\t\t\tself.fire('select');\n\n\t\t\t\t\t\t// Edge will crash if you stress it see #2660\n\t\t\t\t\t\tDelay.requestAnimationFrame(function() {\n\t\t\t\t\t\t\tself.parent().hideAll();\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.showMenu();\n\n\t\t\t\t\t\tif (e.aria) {\n\t\t\t\t\t\t\tself.menu.focus(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself._super();\n\n\t\t\treturn self;\n\t\t},\n\n\t\thover: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.parent().items().each(function(ctrl) {\n\t\t\t\tctrl.classes.remove('selected');\n\t\t\t});\n\n\t\t\tself.classes.toggle('selected', true);\n\n\t\t\treturn self;\n\t\t},\n\n\t\tactive: function(state) {\n\t\t\tif (typeof state != \"undefined\") {\n\t\t\t\tthis.aria('checked', state);\n\t\t\t}\n\n\t\t\treturn this._super(state);\n\t\t},\n\n\t\t/**\n\t\t * Removes the control and it's menus.\n\t\t *\n\t\t * @method remove\n\t\t */\n\t\tremove: function() {\n\t\t\tthis._super();\n\n\t\t\tif (this.menu) {\n\t\t\t\tthis.menu.remove();\n\t\t\t}\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Throbber.js\n\n/**\n * Throbber.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This class enables you to display a Throbber for any element.\n *\n * @-x-less Throbber.less\n * @class tinymce.ui.Throbber\n */\ndefine(\"tinymce/ui/Throbber\", [\n\t\"tinymce/dom/DomQuery\",\n\t\"tinymce/ui/Control\",\n\t\"tinymce/util/Delay\"\n], function($, Control, Delay) {\n\t\"use strict\";\n\n\t/**\n\t * Constructs a new throbber.\n\t *\n\t * @constructor\n\t * @param {Element} elm DOM Html element to display throbber in.\n\t * @param {Boolean} inline Optional true/false state if the throbber should be appended to end of element for infinite scroll.\n\t */\n\treturn function(elm, inline) {\n\t\tvar self = this, state, classPrefix = Control.classPrefix, timer;\n\n\t\t/**\n\t\t * Shows the throbber.\n\t\t *\n\t\t * @method show\n\t\t * @param {Number} [time] Time to wait before showing.\n\t\t * @param {function} [callback] Optional callback to execute when the throbber is shown.\n\t\t * @return {tinymce.ui.Throbber} Current throbber instance.\n\t\t */\n\t\tself.show = function(time, callback) {\n\t\t\tfunction render() {\n\t\t\t\t\tif (state) {\n\t\t\t\t\t\t$(elm).append(\n\t\t\t\t\t\t\t'
      '\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (callback) {\n\t\t\t\t\t\t\tcallback();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tself.hide();\n\n\t\t\tstate = true;\n\n\t\t\tif (time) {\n\t\t\t\ttimer = Delay.setTimeout(render, time);\n\t\t\t} else {\n\t\t\t\trender();\n\t\t\t}\n\n\t\t\treturn self;\n\t\t};\n\n\t\t/**\n\t\t * Hides the throbber.\n\t\t *\n\t\t * @method hide\n\t\t * @return {tinymce.ui.Throbber} Current throbber instance.\n\t\t */\n\t\tself.hide = function() {\n\t\t\tvar child = elm.lastChild;\n\n\t\t\tDelay.clearTimeout(timer);\n\n\t\t\tif (child && child.className.indexOf('throbber') != -1) {\n\t\t\t\tchild.parentNode.removeChild(child);\n\t\t\t}\n\n\t\t\tstate = false;\n\n\t\t\treturn self;\n\t\t};\n\t};\n});\n\n// Included from: js/tinymce/classes/ui/Menu.js\n\n/**\n * Menu.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new menu.\n *\n * @-x-less Menu.less\n * @class tinymce.ui.Menu\n * @extends tinymce.ui.FloatPanel\n */\ndefine(\"tinymce/ui/Menu\", [\n\t\"tinymce/ui/FloatPanel\",\n\t\"tinymce/ui/MenuItem\",\n\t\"tinymce/ui/Throbber\",\n\t\"tinymce/util/Tools\"\n], function(FloatPanel, MenuItem, Throbber, Tools) {\n\t\"use strict\";\n\n\treturn FloatPanel.extend({\n\t\tDefaults: {\n\t\t\tdefaultType: 'menuitem',\n\t\t\tborder: 1,\n\t\t\tlayout: 'stack',\n\t\t\trole: 'application',\n\t\t\tbodyRole: 'menu',\n\t\t\tariaRoot: true\n\t\t},\n\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tsettings.autohide = true;\n\t\t\tsettings.constrainToViewport = true;\n\n\t\t\tif (typeof settings.items === 'function') {\n\t\t\t\tsettings.itemsFactory = settings.items;\n\t\t\t\tsettings.items = [];\n\t\t\t}\n\n\t\t\tif (settings.itemDefaults) {\n\t\t\t\tvar items = settings.items, i = items.length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\titems[i] = Tools.extend({}, settings.itemDefaults, items[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tself._super(settings);\n\t\t\tself.classes.add('menu');\n\t\t},\n\n\t\t/**\n\t\t * Repaints the control after a layout operation.\n\t\t *\n\t\t * @method repaint\n\t\t */\n\t\trepaint: function() {\n\t\t\tthis.classes.toggle('menu-align', true);\n\n\t\t\tthis._super();\n\n\t\t\tthis.getEl().style.height = '';\n\t\t\tthis.getEl('body').style.height = '';\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Hides/closes the menu.\n\t\t *\n\t\t * @method cancel\n\t\t */\n\t\tcancel: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.hideAll();\n\t\t\tself.fire('select');\n\t\t},\n\n\t\t/**\n\t\t * Loads new items from the factory items function.\n\t\t *\n\t\t * @method load\n\t\t */\n\t\tload: function() {\n\t\t\tvar self = this, time, factory;\n\n\t\t\tfunction hideThrobber() {\n\t\t\t\tif (self.throbber) {\n\t\t\t\t\tself.throbber.hide();\n\t\t\t\t\tself.throbber = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfactory = self.settings.itemsFactory;\n\t\t\tif (!factory) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!self.throbber) {\n\t\t\t\tself.throbber = new Throbber(self.getEl('body'), true);\n\n\t\t\t\tif (self.items().length === 0) {\n\t\t\t\t\tself.throbber.show();\n\t\t\t\t\tself.fire('loading');\n\t\t\t\t} else {\n\t\t\t\t\tself.throbber.show(100, function() {\n\t\t\t\t\t\tself.items().remove();\n\t\t\t\t\t\tself.fire('loading');\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tself.on('hide close', hideThrobber);\n\t\t\t}\n\n\t\t\tself.requestTime = time = new Date().getTime();\n\n\t\t\tself.settings.itemsFactory(function(items) {\n\t\t\t\tif (items.length === 0) {\n\t\t\t\t\tself.hide();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (self.requestTime !== time) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tself.getEl().style.width = '';\n\t\t\t\tself.getEl('body').style.width = '';\n\n\t\t\t\thideThrobber();\n\t\t\t\tself.items().remove();\n\t\t\t\tself.getEl('body').innerHTML = '';\n\n\t\t\t\tself.add(items);\n\t\t\t\tself.renderNew();\n\t\t\t\tself.fire('loaded');\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Hide menu and all sub menus.\n\t\t *\n\t\t * @method hideAll\n\t\t */\n\t\thideAll: function() {\n\t\t\tvar self = this;\n\n\t\t\tthis.find('menuitem').exec('hideMenu');\n\n\t\t\treturn self._super();\n\t\t},\n\n\t\t/**\n\t\t * Invoked before the menu is rendered.\n\t\t *\n\t\t * @method preRender\n\t\t */\n\t\tpreRender: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.items().each(function(ctrl) {\n\t\t\t\tvar settings = ctrl.settings;\n\n\t\t\t\tif (settings.icon || settings.image || settings.selectable) {\n\t\t\t\t\tself._hasIcons = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (self.settings.itemsFactory) {\n\t\t\t\tself.on('postrender', function() {\n\t\t\t\t\tif (self.settings.itemsFactory) {\n\t\t\t\t\t\tself.load();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/ListBox.js\n\n/**\n * ListBox.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new list box control.\n *\n * @-x-less ListBox.less\n * @class tinymce.ui.ListBox\n * @extends tinymce.ui.MenuButton\n */\ndefine(\"tinymce/ui/ListBox\", [\n\t\"tinymce/ui/MenuButton\",\n\t\"tinymce/ui/Menu\"\n], function(MenuButton, Menu) {\n\t\"use strict\";\n\n\treturn MenuButton.extend({\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {Array} values Array with values to add to list box.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this, values, selected, selectedText, lastItemCtrl;\n\n\t\t\tfunction setSelected(menuValues) {\n\t\t\t\t// Try to find a selected value\n\t\t\t\tfor (var i = 0; i < menuValues.length; i++) {\n\t\t\t\t\tselected = menuValues[i].selected || settings.value === menuValues[i].value;\n\n\t\t\t\t\tif (selected) {\n\t\t\t\t\t\tselectedText = selectedText || menuValues[i].text;\n\t\t\t\t\t\tself.state.set('value', menuValues[i].value);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the value has a submenu, try to find the selected values in that menu\n\t\t\t\t\tif (menuValues[i].menu) {\n\t\t\t\t\t\tif (setSelected(menuValues[i].menu)) {\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}\n\n\t\t\tself._super(settings);\n\t\t\tsettings = self.settings;\n\n\t\t\tself._values = values = settings.values;\n\t\t\tif (values) {\n\t\t\t\tif (typeof settings.value != \"undefined\") {\n\t\t\t\t\tsetSelected(values);\n\t\t\t\t}\n\n\t\t\t\t// Default with first item\n\t\t\t\tif (!selected && values.length > 0) {\n\t\t\t\t\tselectedText = values[0].text;\n\t\t\t\t\tself.state.set('value', values[0].value);\n\t\t\t\t}\n\n\t\t\t\tself.state.set('menu', values);\n\t\t\t}\n\n\t\t\tself.state.set('text', settings.text || selectedText);\n\n\t\t\tself.classes.add('listbox');\n\n\t\t\tself.on('select', function(e) {\n\t\t\t\tvar ctrl = e.control;\n\n\t\t\t\tif (lastItemCtrl) {\n\t\t\t\t\te.lastControl = lastItemCtrl;\n\t\t\t\t}\n\n\t\t\t\tif (settings.multiple) {\n\t\t\t\t\tctrl.active(!ctrl.active());\n\t\t\t\t} else {\n\t\t\t\t\tself.value(e.control.value());\n\t\t\t\t}\n\n\t\t\t\tlastItemCtrl = ctrl;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Getter/setter function for the control value.\n\t\t *\n\t\t * @method value\n\t\t * @param {String} [value] Value to be set.\n\t\t * @return {Boolean/tinymce.ui.ListBox} Value or self if it's a set operation.\n\t\t */\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tfunction activateMenuItemsByValue(menu, value) {\n\t\t\t\tif (menu instanceof Menu) {\n\t\t\t\t\tmenu.items().each(function(ctrl) {\n\t\t\t\t\t\tif (!ctrl.hasMenus()) {\n\t\t\t\t\t\t\tctrl.active(ctrl.value() === value);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction getSelectedItem(menuValues, value) {\n\t\t\t\tvar selectedItem;\n\n\t\t\t\tif (!menuValues) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfor (var i = 0; i < menuValues.length; i++) {\n\t\t\t\t\tif (menuValues[i].value === value) {\n\t\t\t\t\t\treturn menuValues[i];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (menuValues[i].menu) {\n\t\t\t\t\t\tselectedItem = getSelectedItem(menuValues[i].menu, value);\n\t\t\t\t\t\tif (selectedItem) {\n\t\t\t\t\t\t\treturn selectedItem;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tself.on('show', function(e) {\n\t\t\t\tactivateMenuItemsByValue(e.control, self.value());\n\t\t\t});\n\n\t\t\tself.state.on('change:value', function(e) {\n\t\t\t\tvar selectedItem = getSelectedItem(self.state.get('menu'), e.value);\n\n\t\t\t\tif (selectedItem) {\n\t\t\t\t\tself.text(selectedItem.text);\n\t\t\t\t} else {\n\t\t\t\t\tself.text(self.settings.text);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Radio.js\n\n/**\n * Radio.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new radio button.\n *\n * @-x-less Radio.less\n * @class tinymce.ui.Radio\n * @extends tinymce.ui.Checkbox\n */\ndefine(\"tinymce/ui/Radio\", [\n\t\"tinymce/ui/Checkbox\"\n], function(Checkbox) {\n\t\"use strict\";\n\n\treturn Checkbox.extend({\n\t\tDefaults: {\n\t\t\tclasses: \"radio\",\n\t\t\trole: \"radio\"\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/ResizeHandle.js\n\n/**\n * ResizeHandle.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Renders a resize handle that fires ResizeStart, Resize and ResizeEnd events.\n *\n * @-x-less ResizeHandle.less\n * @class tinymce.ui.ResizeHandle\n * @extends tinymce.ui.Widget\n */\ndefine(\"tinymce/ui/ResizeHandle\", [\n\t\"tinymce/ui/Widget\",\n\t\"tinymce/ui/DragHelper\"\n], function(Widget, DragHelper) {\n\t\"use strict\";\n\n\treturn Widget.extend({\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, prefix = self.classPrefix;\n\n\t\t\tself.classes.add('resizehandle');\n\n\t\t\tif (self.settings.direction == \"both\") {\n\t\t\t\tself.classes.add('resizehandle-both');\n\t\t\t}\n\n\t\t\tself.canFocus = false;\n\n\t\t\treturn (\n\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/**\n\t\t * Called after the control has been rendered.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this;\n\n\t\t\tself._super();\n\n\t\t\tself.resizeDragHelper = new DragHelper(this._id, {\n\t\t\t\tstart: function() {\n\t\t\t\t\tself.fire('ResizeStart');\n\t\t\t\t},\n\n\t\t\t\tdrag: function(e) {\n\t\t\t\t\tif (self.settings.direction != \"both\") {\n\t\t\t\t\t\te.deltaX = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tself.fire('Resize', e);\n\t\t\t\t},\n\n\t\t\t\tstop: function() {\n\t\t\t\t\tself.fire('ResizeEnd');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tremove: function() {\n\t\t\tif (this.resizeDragHelper) {\n\t\t\t\tthis.resizeDragHelper.destroy();\n\t\t\t}\n\n\t\t\treturn this._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/SelectBox.js\n\n/**\n * SelectBox.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new select box control.\n *\n * @-x-less SelectBox.less\n * @class tinymce.ui.SelectBox\n * @extends tinymce.ui.Widget\n */\ndefine(\"tinymce/ui/SelectBox\", [\n\t\"tinymce/ui/Widget\"\n], function(Widget) {\n\t\"use strict\";\n\n\tfunction createOptions(options) {\n\t\tvar strOptions = '';\n\t\tif (options) {\n\t\t\tfor (var i = 0; i < options.length; i++) {\n\t\t\t\tstrOptions += '';\n\t\t\t}\n\t\t}\n\t\treturn strOptions;\n\t}\n\n\treturn Widget.extend({\n\t\tDefaults: {\n\t\t\tclasses: \"selectbox\",\n\t\t\trole: \"selectbox\",\n\t\t\toptions: []\n\t\t},\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {Array} options Array with options to add to the select box.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\n\t\t\tif (self.settings.size) {\n\t\t\t\tself.size = self.settings.size;\n\t\t\t}\n\n\t\t\tif (self.settings.options) {\n\t\t\t\tself._options = self.settings.options;\n\t\t\t}\n\n\t\t\tself.on('keydown', function(e) {\n\t\t\t\tvar rootControl;\n\n\t\t\t\tif (e.keyCode == 13) {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t// Find root control that we can do toJSON on\n\t\t\t\t\tself.parents().reverse().each(function(ctrl) {\n\t\t\t\t\t\tif (ctrl.toJSON) {\n\t\t\t\t\t\t\trootControl = ctrl;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// Fire event on current text box with the serialized data of the whole form\n\t\t\t\t\tself.fire('submit', {data: rootControl.toJSON()});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Getter/setter function for the options state.\n\t\t *\n\t\t * @method options\n\t\t * @param {Array} [state] State to be set.\n\t\t * @return {Array|tinymce.ui.SelectBox} Array of string options.\n\t\t */\n\t\toptions: function(state) {\n\t\t\tif (!arguments.length) {\n\t\t\t\treturn this.state.get('options');\n\t\t\t}\n\n\t\t\tthis.state.set('options', state);\n\n\t\t\treturn this;\n\t\t},\n\n\t\trenderHtml: function() {\n\t\t\tvar self = this, options, size = '';\n\n\t\t\toptions = createOptions(self._options);\n\n\t\t\tif (self.size) {\n\t\t\t\tsize = ' size = \"' + self.size + '\"';\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t''\n\t\t\t);\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.state.on('change:options', function(e) {\n\t\t\t\tself.getEl().innerHTML = createOptions(e.value);\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Slider.js\n\n/**\n * Slider.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Slider control.\n *\n * @-x-less Slider.less\n * @class tinymce.ui.Slider\n * @extends tinymce.ui.Widget\n */\ndefine(\"tinymce/ui/Slider\", [\n\t\"tinymce/ui/Widget\",\n\t\"tinymce/ui/DragHelper\",\n\t\"tinymce/ui/DomUtils\"\n], function(Widget, DragHelper, DomUtils) {\n\t\"use strict\";\n\n\tfunction constrain(value, minVal, maxVal) {\n\t\tif (value < minVal) {\n\t\t\tvalue = minVal;\n\t\t}\n\n\t\tif (value > maxVal) {\n\t\t\tvalue = maxVal;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\tfunction setAriaProp(el, name, value) {\n\t\tel.setAttribute('aria-' + name, value);\n\t}\n\n\tfunction updateSliderHandle(ctrl, value) {\n\t\tvar maxHandlePos, shortSizeName, sizeName, stylePosName, styleValue, handleEl;\n\n\t\tif (ctrl.settings.orientation == \"v\") {\n\t\t\tstylePosName = \"top\";\n\t\t\tsizeName = \"height\";\n\t\t\tshortSizeName = \"h\";\n\t\t} else {\n\t\t\tstylePosName = \"left\";\n\t\t\tsizeName = \"width\";\n\t\t\tshortSizeName = \"w\";\n\t\t}\n\n\t\thandleEl = ctrl.getEl('handle');\n\t\tmaxHandlePos = (ctrl.layoutRect()[shortSizeName] || 100) - DomUtils.getSize(handleEl)[sizeName];\n\n\t\tstyleValue = (maxHandlePos * ((value - ctrl._minValue) / (ctrl._maxValue - ctrl._minValue))) + 'px';\n\t\thandleEl.style[stylePosName] = styleValue;\n\t\thandleEl.style.height = ctrl.layoutRect().h + 'px';\n\n\t\tsetAriaProp(handleEl, 'valuenow', value);\n\t\tsetAriaProp(handleEl, 'valuetext', '' + ctrl.settings.previewFilter(value));\n\t\tsetAriaProp(handleEl, 'valuemin', ctrl._minValue);\n\t\tsetAriaProp(handleEl, 'valuemax', ctrl._maxValue);\n\t}\n\n\treturn Widget.extend({\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tif (!settings.previewFilter) {\n\t\t\t\tsettings.previewFilter = function(value) {\n\t\t\t\t\treturn Math.round(value * 100) / 100.0;\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tself._super(settings);\n\t\t\tself.classes.add('slider');\n\n\t\t\tif (settings.orientation == \"v\") {\n\t\t\t\tself.classes.add('vertical');\n\t\t\t}\n\n\t\t\tself._minValue = settings.minValue || 0;\n\t\t\tself._maxValue = settings.maxValue || 100;\n\t\t\tself._initValue = self.state.get('value');\n\t\t},\n\n\t\trenderHtml: function() {\n\t\t\tvar self = this, id = self._id, prefix = self.classPrefix;\n\n\t\t\treturn (\n\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\treset: function() {\n\t\t\tthis.value(this._initValue).repaint();\n\t\t},\n\n\t\tpostRender: function() {\n\t\t\tvar self = this, minValue, maxValue, screenCordName,\n\t\t\t\t\tstylePosName, sizeName, shortSizeName;\n\n\t\t\tfunction toFraction(min, max, val) {\n\t\t\t\treturn (val + min) / (max - min);\n\t\t\t}\n\n\t\t\tfunction fromFraction(min, max, val) {\n\t\t\t\treturn (val * (max - min)) - min;\n\t\t\t}\n\n\t\t\tfunction handleKeyboard(minValue, maxValue) {\n\t\t\t\tfunction alter(delta) {\n\t\t\t\t\tvar value;\n\n\t\t\t\t\tvalue = self.value();\n\t\t\t\t\tvalue = fromFraction(minValue, maxValue, toFraction(minValue, maxValue, value) + (delta * 0.05));\n\t\t\t\t\tvalue = constrain(value, minValue, maxValue);\n\n\t\t\t\t\tself.value(value);\n\n\t\t\t\t\tself.fire('dragstart', {value: value});\n\t\t\t\t\tself.fire('drag', {value: value});\n\t\t\t\t\tself.fire('dragend', {value: value});\n\t\t\t\t}\n\n\t\t\t\tself.on('keydown', function(e) {\n\t\t\t\t\tswitch (e.keyCode) {\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\talter(-1);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\tcase 40:\n\t\t\t\t\t\t\talter(1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfunction handleDrag(minValue, maxValue, handleEl) {\n\t\t\t\tvar startPos, startHandlePos, maxHandlePos, handlePos, value;\n\n\t\t\t\tself._dragHelper = new DragHelper(self._id, {\n\t\t\t\t\thandle: self._id + \"-handle\",\n\n\t\t\t\t\tstart: function(e) {\n\t\t\t\t\t\tstartPos = e[screenCordName];\n\t\t\t\t\t\tstartHandlePos = parseInt(self.getEl('handle').style[stylePosName], 10);\n\t\t\t\t\t\tmaxHandlePos = (self.layoutRect()[shortSizeName] || 100) - DomUtils.getSize(handleEl)[sizeName];\n\t\t\t\t\t\tself.fire('dragstart', {value: value});\n\t\t\t\t\t},\n\n\t\t\t\t\tdrag: function(e) {\n\t\t\t\t\t\tvar delta = e[screenCordName] - startPos;\n\n\t\t\t\t\t\thandlePos = constrain(startHandlePos + delta, 0, maxHandlePos);\n\t\t\t\t\t\thandleEl.style[stylePosName] = handlePos + 'px';\n\n\t\t\t\t\t\tvalue = minValue + (handlePos / maxHandlePos) * (maxValue - minValue);\n\t\t\t\t\t\tself.value(value);\n\n\t\t\t\t\t\tself.tooltip().text('' + self.settings.previewFilter(value)).show().moveRel(handleEl, 'bc tc');\n\n\t\t\t\t\t\tself.fire('drag', {value: value});\n\t\t\t\t\t},\n\n\t\t\t\t\tstop: function() {\n\t\t\t\t\t\tself.tooltip().hide();\n\t\t\t\t\t\tself.fire('dragend', {value: value});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tminValue = self._minValue;\n\t\t\tmaxValue = self._maxValue;\n\n\t\t\tif (self.settings.orientation == \"v\") {\n\t\t\t\tscreenCordName = \"screenY\";\n\t\t\t\tstylePosName = \"top\";\n\t\t\t\tsizeName = \"height\";\n\t\t\t\tshortSizeName = \"h\";\n\t\t\t} else {\n\t\t\t\tscreenCordName = \"screenX\";\n\t\t\t\tstylePosName = \"left\";\n\t\t\t\tsizeName = \"width\";\n\t\t\t\tshortSizeName = \"w\";\n\t\t\t}\n\n\t\t\tself._super();\n\n\t\t\thandleKeyboard(minValue, maxValue, self.getEl('handle'));\n\t\t\thandleDrag(minValue, maxValue, self.getEl('handle'));\n\t\t},\n\n\t\trepaint: function() {\n\t\t\tthis._super();\n\t\t\tupdateSliderHandle(this, this.value());\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.state.on('change:value', function(e) {\n\t\t\t\tupdateSliderHandle(self, e.value);\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/Spacer.js\n\n/**\n * Spacer.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a spacer. This control is used in flex layouts for example.\n *\n * @-x-less Spacer.less\n * @class tinymce.ui.Spacer\n * @extends tinymce.ui.Widget\n */\ndefine(\"tinymce/ui/Spacer\", [\n\t\"tinymce/ui/Widget\"\n], function(Widget) {\n\t\"use strict\";\n\n\treturn Widget.extend({\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.classes.add('spacer');\n\t\t\tself.canFocus = false;\n\n\t\t\treturn '
      ';\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/SplitButton.js\n\n/**\n * SplitButton.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a split button.\n *\n * @-x-less SplitButton.less\n * @class tinymce.ui.SplitButton\n * @extends tinymce.ui.Button\n */\ndefine(\"tinymce/ui/SplitButton\", [\n\t\"tinymce/ui/MenuButton\",\n\t\"tinymce/ui/DomUtils\",\n\t\"tinymce/dom/DomQuery\"\n], function(MenuButton, DomUtils, $) {\n\treturn MenuButton.extend({\n\t\tDefaults: {\n\t\t\tclasses: \"widget btn splitbtn\",\n\t\t\trole: \"button\"\n\t\t},\n\n\t\t/**\n\t\t * Repaints the control after a layout operation.\n\t\t *\n\t\t * @method repaint\n\t\t */\n\t\trepaint: function() {\n\t\t\tvar self = this, elm = self.getEl(), rect = self.layoutRect(), mainButtonElm, menuButtonElm;\n\n\t\t\tself._super();\n\n\t\t\tmainButtonElm = elm.firstChild;\n\t\t\tmenuButtonElm = elm.lastChild;\n\n\t\t\t$(mainButtonElm).css({\n\t\t\t\twidth: rect.w - DomUtils.getSize(menuButtonElm).width,\n\t\t\t\theight: rect.h - 2\n\t\t\t});\n\n\t\t\t$(menuButtonElm).css({\n\t\t\t\theight: rect.h - 2\n\t\t\t});\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Sets the active menu state.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tactiveMenu: function(state) {\n\t\t\tvar self = this;\n\n\t\t\t$(self.getEl().lastChild).toggleClass(self.classPrefix + 'active', state);\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, id = self._id, prefix = self.classPrefix, image;\n\t\t\tvar icon = self.state.get('icon'), text = self.state.get('text'),\n\t\t\t\ttextHtml = '';\n\n\t\t\timage = self.settings.image;\n\t\t\tif (image) {\n\t\t\t\ticon = 'none';\n\n\t\t\t\t// Support for [high dpi, low dpi] image sources\n\t\t\t\tif (typeof image != \"string\") {\n\t\t\t\t\timage = window.getSelection ? image[0] : image[1];\n\t\t\t\t}\n\n\t\t\t\timage = ' style=\"background-image: url(\\'' + image + '\\')\"';\n\t\t\t} else {\n\t\t\t\timage = '';\n\t\t\t}\n\n\t\t\ticon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';\n\n\t\t\tif (text) {\n\t\t\t\tself.classes.add('btn-has-text');\n\t\t\t\ttextHtml = '' + self.encode(text) + '';\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\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/**\n\t\t * Called after the control has been rendered.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this, onClickHandler = self.settings.onclick;\n\n\t\t\tself.on('click', function(e) {\n\t\t\t\tvar node = e.target;\n\n\t\t\t\tif (e.control == this) {\n\t\t\t\t\t// Find clicks that is on the main button\n\t\t\t\t\twhile (node) {\n\t\t\t\t\t\tif ((e.aria && e.aria.key != 'down') || (node.nodeName == 'BUTTON' && node.className.indexOf('open') == -1)) {\n\t\t\t\t\t\t\te.stopImmediatePropagation();\n\n\t\t\t\t\t\t\tif (onClickHandler) {\n\t\t\t\t\t\t\t\tonClickHandler.call(this, e);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tdelete self.settings.onclick;\n\n\t\t\treturn self._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/StackLayout.js\n\n/**\n * StackLayout.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This layout uses the browsers layout when the items are blocks.\n *\n * @-x-less StackLayout.less\n * @class tinymce.ui.StackLayout\n * @extends tinymce.ui.FlowLayout\n */\ndefine(\"tinymce/ui/StackLayout\", [\n\t\"tinymce/ui/FlowLayout\"\n], function(FlowLayout) {\n\t\"use strict\";\n\n\treturn FlowLayout.extend({\n\t\tDefaults: {\n\t\t\tcontainerClass: 'stack-layout',\n\t\t\tcontrolClass: 'stack-layout-item',\n\t\t\tendClass: 'break'\n\t\t},\n\n\t\tisNative: function() {\n\t\t\treturn true;\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/TabPanel.js\n\n/**\n * TabPanel.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a tab panel control.\n *\n * @-x-less TabPanel.less\n * @class tinymce.ui.TabPanel\n * @extends tinymce.ui.Panel\n *\n * @setting {Number} activeTab Active tab index.\n */\ndefine(\"tinymce/ui/TabPanel\", [\n\t\"tinymce/ui/Panel\",\n\t\"tinymce/dom/DomQuery\",\n\t\"tinymce/ui/DomUtils\"\n], function(Panel, $, DomUtils) {\n\t\"use strict\";\n\n\treturn Panel.extend({\n\t\tDefaults: {\n\t\t\tlayout: 'absolute',\n\t\t\tdefaults: {\n\t\t\t\ttype: 'panel'\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Activates the specified tab by index.\n\t\t *\n\t\t * @method activateTab\n\t\t * @param {Number} idx Index of the tab to activate.\n\t\t */\n\t\tactivateTab: function(idx) {\n\t\t\tvar activeTabElm;\n\n\t\t\tif (this.activeTabId) {\n\t\t\t\tactiveTabElm = this.getEl(this.activeTabId);\n\t\t\t\t$(activeTabElm).removeClass(this.classPrefix + 'active');\n\t\t\t\tactiveTabElm.setAttribute('aria-selected', \"false\");\n\t\t\t}\n\n\t\t\tthis.activeTabId = 't' + idx;\n\n\t\t\tactiveTabElm = this.getEl('t' + idx);\n\t\t\tactiveTabElm.setAttribute('aria-selected', \"true\");\n\t\t\t$(activeTabElm).addClass(this.classPrefix + 'active');\n\n\t\t\tthis.items()[idx].show().fire('showtab');\n\t\t\tthis.reflow();\n\n\t\t\tthis.items().each(function(item, i) {\n\t\t\t\tif (idx != i) {\n\t\t\t\t\titem.hide();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, layout = self._layout, tabsHtml = '', prefix = self.classPrefix;\n\n\t\t\tself.preRender();\n\t\t\tlayout.preRender(self);\n\n\t\t\tself.items().each(function(ctrl, i) {\n\t\t\t\tvar id = self._id + '-t' + i;\n\n\t\t\t\tctrl.aria('role', 'tabpanel');\n\t\t\t\tctrl.aria('labelledby', id);\n\n\t\t\t\ttabsHtml += (\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\tself.encode(ctrl.settings.title) +\n\t\t\t\t\t'
      '\n\t\t\t\t);\n\t\t\t});\n\n\t\t\treturn (\n\t\t\t\t'
      ' +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\ttabsHtml +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t'
      ' +\n\t\t\t\t\t\tlayout.renderHtml(self) +\n\t\t\t\t\t'
      ' +\n\t\t\t\t'
      '\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Called after the control has been rendered.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this;\n\n\t\t\tself._super();\n\n\t\t\tself.settings.activeTab = self.settings.activeTab || 0;\n\t\t\tself.activateTab(self.settings.activeTab);\n\n\t\t\tthis.on('click', function(e) {\n\t\t\t\tvar targetParent = e.target.parentNode;\n\n\t\t\t\tif (targetParent && targetParent.id == self._id + '-head') {\n\t\t\t\t\tvar i = targetParent.childNodes.length;\n\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tif (targetParent.childNodes[i] == e.target) {\n\t\t\t\t\t\t\tself.activateTab(i);\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/**\n\t\t * Initializes the current controls layout rect.\n\t\t * This will be executed by the layout managers to determine the\n\t\t * default minWidth/minHeight etc.\n\t\t *\n\t\t * @method initLayoutRect\n\t\t * @return {Object} Layout rect instance.\n\t\t */\n\t\tinitLayoutRect: function() {\n\t\t\tvar self = this, rect, minW, minH;\n\n\t\t\tminW = DomUtils.getSize(self.getEl('head')).width;\n\t\t\tminW = minW < 0 ? 0 : minW;\n\t\t\tminH = 0;\n\n\t\t\tself.items().each(function(item) {\n\t\t\t\tminW = Math.max(minW, item.layoutRect().minW);\n\t\t\t\tminH = Math.max(minH, item.layoutRect().minH);\n\t\t\t});\n\n\t\t\tself.items().each(function(ctrl) {\n\t\t\t\tctrl.settings.x = 0;\n\t\t\t\tctrl.settings.y = 0;\n\t\t\t\tctrl.settings.w = minW;\n\t\t\t\tctrl.settings.h = minH;\n\n\t\t\t\tctrl.layoutRect({\n\t\t\t\t\tx: 0,\n\t\t\t\t\ty: 0,\n\t\t\t\t\tw: minW,\n\t\t\t\t\th: minH\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tvar headH = DomUtils.getSize(self.getEl('head')).height;\n\n\t\t\tself.settings.minWidth = minW;\n\t\t\tself.settings.minHeight = minH + headH;\n\n\t\t\trect = self._super();\n\t\t\trect.deltaH += headH;\n\t\t\trect.innerH = rect.h - rect.deltaH;\n\n\t\t\treturn rect;\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/ui/TextBox.js\n\n/**\n * TextBox.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * Creates a new textbox.\n *\n * @-x-less TextBox.less\n * @class tinymce.ui.TextBox\n * @extends tinymce.ui.Widget\n */\ndefine(\"tinymce/ui/TextBox\", [\n\t\"tinymce/ui/Widget\",\n\t\"tinymce/util/Tools\",\n\t\"tinymce/ui/DomUtils\"\n], function(Widget, Tools, DomUtils) {\n\treturn Widget.extend({\n\t\t/**\n\t\t * Constructs a instance with the specified settings.\n\t\t *\n\t\t * @constructor\n\t\t * @param {Object} settings Name/value object with settings.\n\t\t * @setting {Boolean} multiline True if the textbox is a multiline control.\n\t\t * @setting {Number} maxLength Max length for the textbox.\n\t\t * @setting {Number} size Size of the textbox in characters.\n\t\t */\n\t\tinit: function(settings) {\n\t\t\tvar self = this;\n\n\t\t\tself._super(settings);\n\n\t\t\tself.classes.add('textbox');\n\n\t\t\tif (settings.multiline) {\n\t\t\t\tself.classes.add('multiline');\n\t\t\t} else {\n\t\t\t\tself.on('keydown', function(e) {\n\t\t\t\t\tvar rootControl;\n\n\t\t\t\t\tif (e.keyCode == 13) {\n\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t// Find root control that we can do toJSON on\n\t\t\t\t\t\tself.parents().reverse().each(function(ctrl) {\n\t\t\t\t\t\t\tif (ctrl.toJSON) {\n\t\t\t\t\t\t\t\trootControl = ctrl;\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// Fire event on current text box with the serialized data of the whole form\n\t\t\t\t\t\tself.fire('submit', {data: rootControl.toJSON()});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tself.on('keyup', function(e) {\n\t\t\t\t\tself.state.set('value', e.target.value);\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Repaints the control after a layout operation.\n\t\t *\n\t\t * @method repaint\n\t\t */\n\t\trepaint: function() {\n\t\t\tvar self = this, style, rect, borderBox, borderW, borderH = 0, lastRepaintRect;\n\n\t\t\tstyle = self.getEl().style;\n\t\t\trect = self._layoutRect;\n\t\t\tlastRepaintRect = self._lastRepaintRect || {};\n\n\t\t\t// Detect old IE 7+8 add lineHeight to align caret vertically in the middle\n\t\t\tvar doc = document;\n\t\t\tif (!self.settings.multiline && doc.all && (!doc.documentMode || doc.documentMode <= 8)) {\n\t\t\t\tstyle.lineHeight = (rect.h - borderH) + 'px';\n\t\t\t}\n\n\t\t\tborderBox = self.borderBox;\n\t\t\tborderW = borderBox.left + borderBox.right + 8;\n\t\t\tborderH = borderBox.top + borderBox.bottom + (self.settings.multiline ? 8 : 0);\n\n\t\t\tif (rect.x !== lastRepaintRect.x) {\n\t\t\t\tstyle.left = rect.x + 'px';\n\t\t\t\tlastRepaintRect.x = rect.x;\n\t\t\t}\n\n\t\t\tif (rect.y !== lastRepaintRect.y) {\n\t\t\t\tstyle.top = rect.y + 'px';\n\t\t\t\tlastRepaintRect.y = rect.y;\n\t\t\t}\n\n\t\t\tif (rect.w !== lastRepaintRect.w) {\n\t\t\t\tstyle.width = (rect.w - borderW) + 'px';\n\t\t\t\tlastRepaintRect.w = rect.w;\n\t\t\t}\n\n\t\t\tif (rect.h !== lastRepaintRect.h) {\n\t\t\t\tstyle.height = (rect.h - borderH) + 'px';\n\t\t\t\tlastRepaintRect.h = rect.h;\n\t\t\t}\n\n\t\t\tself._lastRepaintRect = lastRepaintRect;\n\t\t\tself.fire('repaint', {}, false);\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string.\n\t\t *\n\t\t * @method renderHtml\n\t\t * @return {String} HTML representing the control.\n\t\t */\n\t\trenderHtml: function() {\n\t\t\tvar self = this, settings = self.settings, attrs, elm;\n\n\t\t\tattrs = {\n\t\t\t\tid: self._id,\n\t\t\t\thidefocus: '1'\n\t\t\t};\n\n\t\t\tTools.each([\n\t\t\t\t'rows',\t'spellcheck',\t'maxLength', 'size', 'readonly', 'min',\n\t\t\t\t'max', 'step', 'list', 'pattern', 'placeholder', 'required', 'multiple'\n\t\t\t], function(name) {\n\t\t\t\tattrs[name] = settings[name];\n\t\t\t});\n\n\t\t\tif (self.disabled()) {\n\t\t\t\tattrs.disabled = 'disabled';\n\t\t\t}\n\n\t\t\tif (settings.subtype) {\n\t\t\t\tattrs.type = settings.subtype;\n\t\t\t}\n\n\t\t\telm = DomUtils.create(settings.multiline ? 'textarea' : 'input', attrs);\n\t\t\telm.value = self.state.get('value');\n\t\t\telm.className = self.classes;\n\n\t\t\treturn elm.outerHTML;\n\t\t},\n\n\t\tvalue: function(value) {\n\t\t\tif (arguments.length) {\n\t\t\t\tthis.state.set('value', value);\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\t// Make sure the real state is in sync\n\t\t\tif (this.state.get('rendered')) {\n\t\t\t\tthis.state.set('value', this.getEl().value);\n\t\t\t}\n\n\t\t\treturn this.state.get('value');\n\t\t},\n\n\t\t/**\n\t\t * Called after the control has been rendered.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.getEl().value = self.state.get('value');\n\t\t\tself._super();\n\n\t\t\tself.$el.on('change', function(e) {\n\t\t\t\tself.state.set('value', e.target.value);\n\t\t\t\tself.fire('change', e);\n\t\t\t});\n\t\t},\n\n\t\tbindStates: function() {\n\t\t\tvar self = this;\n\n\t\t\tself.state.on('change:value', function(e) {\n\t\t\t\tif (self.getEl().value != e.value) {\n\t\t\t\t\tself.getEl().value = e.value;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.state.on('change:disabled', function(e) {\n\t\t\t\tself.getEl().disabled = e.value;\n\t\t\t});\n\n\t\t\treturn self._super();\n\t\t},\n\n\t\tremove: function() {\n\t\t\tthis.$el.off();\n\t\t\tthis._super();\n\t\t}\n\t});\n});\n\n// Included from: js/tinymce/classes/Register.js\n\n/**\n * Register.js\n *\n * Released under LGPL License.\n * Copyright (c) 1999-2015 Ephox Corp. All rights reserved\n *\n * License: http://www.tinymce.com/license\n * Contributing: http://www.tinymce.com/contributing\n */\n\n/**\n * This registers tinymce in common module loaders.\n *\n * @private\n * @class tinymce.Register\n */\ndefine(\"tinymce/Register\", [\n], function() {\n\t/*eslint consistent-this: 0 */\n\tvar context = this || window;\n\n\tvar tinymce = function() {\n\t\treturn context.tinymce;\n\t};\n\n\tif (typeof context.define === \"function\") {\n\t\t// Bolt\n\t\tif (!context.define.amd) {\n\t\t\tcontext.define(\"ephox/tinymce\", [], tinymce);\n\t\t}\n\t}\n\n\tif (typeof module === 'object') {\n\t\t/* global module */\n\t\tmodule.exports = window.tinymce;\n\t}\n\n\treturn {};\n});\n\nexpose([\"tinymce/geom/Rect\",\"tinymce/util/Promise\",\"tinymce/util/Delay\",\"tinymce/Env\",\"tinymce/dom/EventUtils\",\"tinymce/dom/Sizzle\",\"tinymce/util/Tools\",\"tinymce/dom/DomQuery\",\"tinymce/html/Styles\",\"tinymce/dom/TreeWalker\",\"tinymce/html/Entities\",\"tinymce/dom/DOMUtils\",\"tinymce/dom/ScriptLoader\",\"tinymce/AddOnManager\",\"tinymce/dom/RangeUtils\",\"tinymce/html/Node\",\"tinymce/html/Schema\",\"tinymce/html/SaxParser\",\"tinymce/html/DomParser\",\"tinymce/html/Writer\",\"tinymce/html/Serializer\",\"tinymce/dom/Serializer\",\"tinymce/util/VK\",\"tinymce/dom/ControlSelection\",\"tinymce/dom/BookmarkManager\",\"tinymce/dom/Selection\",\"tinymce/Formatter\",\"tinymce/UndoManager\",\"tinymce/EditorCommands\",\"tinymce/util/URI\",\"tinymce/util/Class\",\"tinymce/util/EventDispatcher\",\"tinymce/util/Observable\",\"tinymce/ui/Selector\",\"tinymce/ui/Collection\",\"tinymce/ui/ReflowQueue\",\"tinymce/ui/Control\",\"tinymce/ui/Factory\",\"tinymce/ui/KeyboardNavigation\",\"tinymce/ui/Container\",\"tinymce/ui/DragHelper\",\"tinymce/ui/Scrollable\",\"tinymce/ui/Panel\",\"tinymce/ui/Movable\",\"tinymce/ui/Resizable\",\"tinymce/ui/FloatPanel\",\"tinymce/ui/Window\",\"tinymce/ui/MessageBox\",\"tinymce/WindowManager\",\"tinymce/ui/Tooltip\",\"tinymce/ui/Widget\",\"tinymce/ui/Progress\",\"tinymce/ui/Notification\",\"tinymce/NotificationManager\",\"tinymce/EditorObservable\",\"tinymce/Shortcuts\",\"tinymce/Editor\",\"tinymce/util/I18n\",\"tinymce/FocusManager\",\"tinymce/EditorManager\",\"tinymce/util/XHR\",\"tinymce/util/JSON\",\"tinymce/util/JSONRequest\",\"tinymce/util/JSONP\",\"tinymce/util/LocalStorage\",\"tinymce/Compat\",\"tinymce/ui/Layout\",\"tinymce/ui/AbsoluteLayout\",\"tinymce/ui/Button\",\"tinymce/ui/ButtonGroup\",\"tinymce/ui/Checkbox\",\"tinymce/ui/ComboBox\",\"tinymce/ui/ColorBox\",\"tinymce/ui/PanelButton\",\"tinymce/ui/ColorButton\",\"tinymce/util/Color\",\"tinymce/ui/ColorPicker\",\"tinymce/ui/Path\",\"tinymce/ui/ElementPath\",\"tinymce/ui/FormItem\",\"tinymce/ui/Form\",\"tinymce/ui/FieldSet\",\"tinymce/ui/FilePicker\",\"tinymce/ui/FitLayout\",\"tinymce/ui/FlexLayout\",\"tinymce/ui/FlowLayout\",\"tinymce/ui/FormatControls\",\"tinymce/ui/GridLayout\",\"tinymce/ui/Iframe\",\"tinymce/ui/InfoBox\",\"tinymce/ui/Label\",\"tinymce/ui/Toolbar\",\"tinymce/ui/MenuBar\",\"tinymce/ui/MenuButton\",\"tinymce/ui/MenuItem\",\"tinymce/ui/Throbber\",\"tinymce/ui/Menu\",\"tinymce/ui/ListBox\",\"tinymce/ui/Radio\",\"tinymce/ui/ResizeHandle\",\"tinymce/ui/SelectBox\",\"tinymce/ui/Slider\",\"tinymce/ui/Spacer\",\"tinymce/ui/SplitButton\",\"tinymce/ui/StackLayout\",\"tinymce/ui/TabPanel\",\"tinymce/ui/TextBox\"]);\n})(window);\n!function(){var e={},t=function(t){for(var n=e[t],i=n.deps,o=n.defn,a=i.length,s=new Array(a),l=0;l=0;t--)for(n=i.length-1;n>=0;n--)if(i[n].predicate(r[t]))return{toolbar:i[n],element:r[t]};return null};a.on(\"click keyup setContent ObjectResized\",function(e){(\"setcontent\"!==e.type||e.selection)&&n.setEditorTimeout(a,function(){var e;e=x(a.selection.getNode()),e?(y(),b(e)):y()})}),a.on(\"blur hide contextmenu\",y),a.on(\"ObjectResizeStart\",function(){var e=x(a.selection.getNode());e&&e.toolbar.panel&&e.toolbar.panel.hide()}),a.on(\"ResizeEditor ResizeWindow\",h(!0)),a.on(\"nodeChange\",h(!1)),a.on(\"remove\",function(){t.each(p(),function(e){e.panel&&e.panel.remove()}),a.contextToolbars={}}),a.shortcuts.add(\"ctrl+F9\",\"\",function(){var e=x(a.selection.getNode());e&&e.toolbar.panel&&e.toolbar.panel.items()[0].focus()})};return{addContextualToolbars:d}}),a(\"e\",[],function(){var e=function(e,t){return function(){var n=e.find(t)[0];n&&n.focus(!0)}},t=function(t,n){t.shortcuts.add(\"Alt+F9\",\"\",e(n,\"menubar\")),t.shortcuts.add(\"Alt+F10,F10\",\"\",e(n,\"toolbar\")),t.shortcuts.add(\"Alt+F11\",\"\",e(n,\"elementpath\")),n.on(\"cancel\",function(){t.focus()})};return{addKeys:t}}),a(\"f\",[\"8\",\"9\",\"1\"],function(e,t,n){var r=function(e){return{element:function(){return e}}},i=function(e,t,n){var i=e.settings[n];i&&i(r(t.getEl(\"body\")))},o=function(t,n,r){e.each(r,function(e){var r=n.items().filter(\"#\"+e.name)[0];r&&r.visible()&&e.name!==t&&(i(e,r,\"onhide\"),r.visible(!1))})},a=function(e){e.items().each(function(e){e.active(!1)})},s=function(t,n){return e.grep(t,function(e){return e.name===n})[0]},l=function(e,n,r){return function(l){var c=l.control,u=c.parents().filter(\"panel\")[0],d=u.find(\"#\"+n)[0],f=s(r,n);o(n,u,r),a(c.parent()),d&&d.visible()?(i(f,d,\"onhide\"),d.hide(),c.active(!1)):(d?(d.show(),i(f,d,\"onshow\")):(d=t.create({type:\"container\",name:n,layout:\"stack\",classes:\"sidebar-panel\",html:\"\"}),u.prepend(d),i(f,d,\"onrender\"),i(f,d,\"onshow\")),c.active(!0)),e.fire(\"ResizeEditor\")}},c=function(){return!n.ie||n.ie>=11},u=function(e){return!(!c()||!e.sidebars)&&e.sidebars.length>0},d=function(t){var n=e.map(t.sidebars,function(e){var n=e.settings;return{type:\"button\",icon:n.icon,image:n.image,tooltip:n.tooltip,onclick:l(t,e.name,t.sidebars)}});return{type:\"panel\",name:\"sidebar\",layout:\"stack\",classes:\"sidebar\",items:[{type:\"toolbar\",layout:\"stack\",classes:\"sidebar-toolbar\",items:n}]}};return{hasSidebar:u,createSidebar:d}}),a(\"g\",[],function(){var e=function(e){var t=function(){e._skinLoaded=!0,e.fire(\"SkinLoaded\")};return function(){e.initialized?t():e.on(\"init\",t)}};return{fireSkinLoaded:e}}),a(\"6\",[\"a\"],function(e){var t=function(e){return{width:e.clientWidth,height:e.clientHeight}},n=function(n,r,i){var o,a,s,l,c=n.settings;o=n.getContainer(),a=n.getContentAreaContainer().firstChild,s=t(o),l=t(a),null!==r&&(r=Math.max(c.min_width||100,r),r=Math.min(c.max_width||65535,r),e.setStyle(o,\"width\",r+(s.width-l.width)),e.setStyle(a,\"width\",r)),i=Math.max(c.min_height||100,i),i=Math.min(c.max_height||65535,i),e.setStyle(a,\"height\",i),n.fire(\"ResizeEditor\")},r=function(e,t,r){var i=e.getContentAreaContainer();n(e,i.clientWidth+t,i.clientHeight+r)};return{resizeTo:n,resizeBy:r}}),a(\"4\",[\"8\",\"9\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"6\"],function(e,t,n,r,i,o,a,s,l,c){var u=function(e){return function(t){e.find(\"*\").disabled(\"readonly\"===t.mode)}},d=function(e){return{type:\"panel\",name:\"iframe\",layout:\"stack\",classes:\"edit-area\",border:e,html:\"\"}},f=function(e){return{type:\"panel\",layout:\"stack\",classes:\"edit-aria-container\",border:\"1 0 0 0\",items:[d(\"0\"),s.createSidebar(e)]}},p=function(e,p,m){var g,h,v,b=e.settings;return m.skinUiCss&&n.styleSheetLoader.load(m.skinUiCss,l.fireSkinLoaded(e)),g=p.panel=t.create({type:\"panel\",role:\"application\",classes:\"tinymce\",style:\"visibility: hidden\",layout:\"stack\",border:1,items:[b.menubar===!1?null:{type:\"menubar\",border:\"0 0 1 0\",items:i.createMenuButtons(e)},r.createToolbars(e,b.toolbar_items_size),s.hasSidebar(e)?f(e):d(\"1 0 0 0\")]}),b.resize!==!1&&(h={type:\"resizehandle\",direction:b.resize,onResizeStart:function(){var t=e.getContentAreaContainer().firstChild;v={width:t.clientWidth,height:t.clientHeight}},onResize:function(t){\"both\"===b.resize?c.resizeTo(e,v.width+t.deltaX,v.height+t.deltaY):c.resizeTo(e,null,v.height+t.deltaY)}}),b.statusbar!==!1&&g.add({type:\"panel\",name:\"statusbar\",classes:\"statusbar\",layout:\"flow\",border:\"1 0 0 0\",ariaRoot:!0,items:[{type:\"elementpath\",editor:e},h]}),e.fire(\"BeforeRenderUI\"),e.on(\"SwitchMode\",u(g)),g.renderBefore(m.targetNode).reflow(),b.readonly&&e.setMode(\"readonly\"),b.width&&n.setStyle(g.getEl(),\"width\",b.width),e.on(\"remove\",function(){g.remove(),g=null}),a.addKeys(e,g),o.addContextualToolbars(e),{iframeContainer:g.find(\"#iframe\")[0].getEl(),editorContainer:g.getEl()}};return{render:p}}),s(\"h\",tinymce.ui.FloatPanel),a(\"5\",[\"8\",\"9\",\"a\",\"h\",\"b\",\"c\",\"d\",\"e\",\"g\"],function(e,t,n,r,i,o,a,s,l){var c=function(e,c,u){var d,f,p=e.settings;p.fixed_toolbar_container&&(f=n.select(p.fixed_toolbar_container)[0]);var m=function(){if(d&&d.moveRel&&d.visible()&&!d._fixed){var t=e.selection.getScrollContainer(),r=e.getBody(),i=0,o=0;if(t){var a=n.getPos(r),s=n.getPos(t);i=Math.max(0,s.x-a.x),o=Math.max(0,s.y-a.y)}d.fixed(!1).moveRel(r,e.rtl?[\"tr-br\",\"br-tr\"]:[\"tl-bl\",\"bl-tl\",\"tr-br\"]).moveBy(i,o)}},g=function(){d&&(d.show(),m(),n.addClass(e.getBody(),\"mce-edit-focus\"))},h=function(){d&&(d.hide(),r.hideAll(),n.removeClass(e.getBody(),\"mce-edit-focus\"))},v=function(){return d?void(d.visible()||g()):(d=c.panel=t.create({type:f?\"panel\":\"floatpanel\",role:\"application\",classes:\"tinymce tinymce-inline\",layout:\"flex\",direction:\"column\",align:\"stretch\",autohide:!1,autofix:!0,fixed:!!f,border:1,items:[p.menubar===!1?null:{type:\"menubar\",border:\"0 0 1 0\",items:o.createMenuButtons(e)},i.createToolbars(e,p.toolbar_items_size)]}),e.fire(\"BeforeRenderUI\"),d.renderTo(f||document.body).reflow(),s.addKeys(e,d),g(),a.addContextualToolbars(e),e.on(\"nodeChange\",m),e.on(\"activate\",g),e.on(\"deactivate\",h),void e.nodeChanged())};return p.content_editable=!0,e.on(\"focus\",function(){u.skinUiCss?n.styleSheetLoader.load(u.skinUiCss,v,v):v()}),e.on(\"blur hide\",h),e.on(\"remove\",function(){d&&(d.remove(),d=null)}),u.skinUiCss&&n.styleSheetLoader.load(u.skinUiCss,l.fireSkinLoaded(e)),{}};return{render:c}}),s(\"i\",tinymce.ui.Throbber),a(\"7\",[\"i\"],function(e){var t=function(t,n){var r;t.on(\"ProgressState\",function(t){r=r||new e(n.panel.getEl(\"body\")),t.state?r.show(t.time):r.hide()})};return{setup:t}}),a(\"0\",[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\"],function(e,t,n,r,i,o,a){var s=function(n,o,s){var l=n.settings,c=l.skin!==!1&&(l.skin||\"lightgray\");if(c){var u=l.skin_url;u=u?n.documentBaseURI.toAbsolute(u):t.baseURL+\"/skins/\"+c,e.documentMode<=7?s.skinUiCss=u+\"/skin.ie7.min.css\":s.skinUiCss=u+\"/skin.min.css\",n.contentCSS.push(u+\"/content\"+(n.inline?\".inline\":\"\")+\".min.css\")}return a.setup(n,o),l.inline?i.render(n,o,s):r.render(n,o,s)};return n.add(\"modern\",function(e){return{renderUI:function(t){return s(e,this,t)},resizeTo:function(t,n){return o.resizeTo(e,t,n)},resizeBy:function(t,n){return o.resizeBy(e,t,n)}}}),function(){}}),r(\"0\")()}();\ntinymce.PluginManager.add(\"image\",function(e){function t(e,t){function n(e,n){r.parentNode&&r.parentNode.removeChild(r),t({width:e,height:n})}var r=document.createElement(\"img\");r.onload=function(){n(Math.max(r.width,r.clientWidth),Math.max(r.height,r.clientHeight))},r.onerror=function(){n()};var i=r.style;i.visibility=\"hidden\",i.position=\"fixed\",i.bottom=i.left=0,i.width=i.height=\"auto\",document.body.appendChild(r),r.src=e}function n(e,t,n){function r(e,n){return n=n||[],tinymce.each(e,function(e){var i={text:e.text||e.title};e.menu?i.menu=r(e.menu):(i.value=e.value,t(i)),n.push(i)}),n}return r(e,n||[])}function r(t){return function(){var n=e.settings.image_list;\"string\"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):\"function\"==typeof n?n(t):t(n)}}function i(r){function i(){var e,t,n,r;e=f.find(\"#width\")[0],t=f.find(\"#height\")[0],e&&t&&(n=e.value(),r=t.value(),f.find(\"#constrain\")[0].checked()&&g&&h&&n&&r&&(g!=n?(r=Math.round(n/g*r),isNaN(r)||t.value(r)):(n=Math.round(r/h*n),isNaN(n)||e.value(n))),g=n,h=r)}function o(){function t(t){function n(){t.onload=t.onerror=null,e.selection&&(e.selection.select(t),e.nodeChanged())}t.onload=function(){y.width||y.height||!C||x.setAttribs(t,{width:t.clientWidth,height:t.clientHeight}),n()},t.onerror=n}var n,r;u(),i(),y=tinymce.extend(y,f.toJSON()),y.alt||(y.alt=\"\"),y.title||(y.title=\"\"),\"\"===y.width&&(y.width=null),\"\"===y.height&&(y.height=null),y.style||(y.style=null),y={src:y.src,alt:y.alt,title:y.title,width:y.width,height:y.height,style:y.style,caption:y.caption,\"class\":y[\"class\"]},e.undoManager.transact(function(){function i(t){return e.schema.getTextBlockElements()[t.nodeName]}if(!y.src)return void(p&&(x.remove(p),e.focus(),e.nodeChanged()));if(\"\"===y.title&&(y.title=null),p?x.setAttribs(p,y):(y.id=\"__mcenew\",e.focus(),e.selection.setContent(x.createHTML(\"img\",y)),p=x.get(\"__mcenew\"),x.setAttrib(p,\"id\",null)),e.editorUpload.uploadImagesAuto(),y.caption===!1&&x.is(p.parentNode,\"figure.image\")&&(n=p.parentNode,x.insertAfter(p,n),x.remove(n)),y.caption!==!0)t(p);else if(!x.is(p.parentNode,\"figure.image\")){r=p,p=p.cloneNode(!0),n=x.create(\"figure\",{\"class\":\"image\"}),n.appendChild(p),n.appendChild(x.create(\"figcaption\",{contentEditable:!0},\"Caption\")),n.contentEditable=!1;var o=x.getParent(r,i);o?x.split(o,r,n):x.replace(n,r),e.selection.select(n)}})}function a(e){return e&&(e=e.replace(/px$/,\"\")),e}function s(n){var r,i,o,a=n.meta||{};v&&v.value(e.convertURL(this.value(),\"src\")),tinymce.each(a,function(e,t){f.find(\"#\"+t).value(e)}),a.width||a.height||(r=e.convertURL(this.value(),\"src\"),i=e.settings.image_prepend_url,o=new RegExp(\"^(?:[a-z]+:)?//\",\"i\"),i&&!o.test(r)&&r.substring(0,i.length)!==i&&(r=i+r),this.value(r),t(e.documentBaseURI.toAbsolute(this.value()),function(e){e.width&&e.height&&C&&(g=e.width,h=e.height,f.find(\"#width\").value(g),f.find(\"#height\").value(h))}))}function l(e){e.meta=f.toJSON()}function c(e){if(e.margin){var t=e.margin.split(\" \");switch(t.length){case 1:e[\"margin-top\"]=e[\"margin-top\"]||t[0],e[\"margin-right\"]=e[\"margin-right\"]||t[0],e[\"margin-bottom\"]=e[\"margin-bottom\"]||t[0],e[\"margin-left\"]=e[\"margin-left\"]||t[0];break;case 2:e[\"margin-top\"]=e[\"margin-top\"]||t[0],e[\"margin-right\"]=e[\"margin-right\"]||t[1],e[\"margin-bottom\"]=e[\"margin-bottom\"]||t[0],e[\"margin-left\"]=e[\"margin-left\"]||t[1];break;case 3:e[\"margin-top\"]=e[\"margin-top\"]||t[0],e[\"margin-right\"]=e[\"margin-right\"]||t[1],e[\"margin-bottom\"]=e[\"margin-bottom\"]||t[2],e[\"margin-left\"]=e[\"margin-left\"]||t[1];break;case 4:e[\"margin-top\"]=e[\"margin-top\"]||t[0],e[\"margin-right\"]=e[\"margin-right\"]||t[1],e[\"margin-bottom\"]=e[\"margin-bottom\"]||t[2],e[\"margin-left\"]=e[\"margin-left\"]||t[3]}delete e.margin}return e}function u(){function t(e){return e.length>0&&/^[0-9]+$/.test(e)&&(e+=\"px\"),e}if(e.settings.image_advtab){var n=f.toJSON(),r=x.parseStyle(n.style);r=c(r),n.vspace&&(r[\"margin-top\"]=r[\"margin-bottom\"]=t(n.vspace)),n.hspace&&(r[\"margin-left\"]=r[\"margin-right\"]=t(n.hspace)),n.border&&(r[\"border-width\"]=t(n.border)),f.find(\"#style\").value(x.serializeStyle(x.parseStyle(x.serializeStyle(r))))}}function d(){if(e.settings.image_advtab){var t=f.toJSON(),n=x.parseStyle(t.style);f.find(\"#vspace\").value(\"\"),f.find(\"#hspace\").value(\"\"),n=c(n),(n[\"margin-top\"]&&n[\"margin-bottom\"]||n[\"margin-right\"]&&n[\"margin-left\"])&&(n[\"margin-top\"]===n[\"margin-bottom\"]?f.find(\"#vspace\").value(a(n[\"margin-top\"])):f.find(\"#vspace\").value(\"\"),n[\"margin-right\"]===n[\"margin-left\"]?f.find(\"#hspace\").value(a(n[\"margin-right\"])):f.find(\"#hspace\").value(\"\")),n[\"border-width\"]&&f.find(\"#border\").value(a(n[\"border-width\"])),f.find(\"#style\").value(x.serializeStyle(x.parseStyle(x.serializeStyle(n))))}}var f,p,m,g,h,v,b,y={},x=e.dom,C=e.settings.image_dimensions!==!1;p=e.selection.getNode(),m=x.getParent(p,\"figure.image\"),m&&(p=x.select(\"img\",m)[0]),p&&(\"IMG\"!=p.nodeName||p.getAttribute(\"data-mce-object\")||p.getAttribute(\"data-mce-placeholder\"))&&(p=null),p&&(g=x.getAttrib(p,\"width\"),h=x.getAttrib(p,\"height\"),y={src:x.getAttrib(p,\"src\"),alt:x.getAttrib(p,\"alt\"),title:x.getAttrib(p,\"title\"),\"class\":x.getAttrib(p,\"class\"),width:g,height:h,caption:!!m}),r&&(v={type:\"listbox\",label:\"Image list\",values:n(r,function(t){t.value=e.convertURL(t.value||t.url,\"src\")},[{text:\"None\",value:\"\"}]),value:y.src&&e.convertURL(y.src,\"src\"),onselect:function(e){var t=f.find(\"#alt\");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),f.find(\"#src\").value(e.control.value()).fire(\"change\")},onPostRender:function(){v=this}}),e.settings.image_class_list&&(b={name:\"class\",type:\"listbox\",label:\"Class\",values:n(e.settings.image_class_list,function(t){t.value&&(t.textStyle=function(){return e.formatter.getCssText({inline:\"img\",classes:[t.value]})})})});var w=[{name:\"src\",type:\"filepicker\",filetype:\"image\",label:\"Source\",autofocus:!0,onchange:s,onbeforecall:l},v];e.settings.image_description!==!1&&w.push({name:\"alt\",type:\"textbox\",label:\"Image description\"}),e.settings.image_title&&w.push({name:\"title\",type:\"textbox\",label:\"Image Title\"}),C&&w.push({type:\"container\",label:\"Dimensions\",layout:\"flex\",direction:\"row\",align:\"center\",spacing:5,items:[{name:\"width\",type:\"textbox\",maxLength:5,size:3,onchange:i,ariaLabel:\"Width\"},{type:\"label\",text:\"x\"},{name:\"height\",type:\"textbox\",maxLength:5,size:3,onchange:i,ariaLabel:\"Height\"},{name:\"constrain\",type:\"checkbox\",checked:!0,text:\"Constrain proportions\"}]}),w.push(b),e.settings.image_caption&&tinymce.Env.ceFalse&&w.push({name:\"caption\",type:\"checkbox\",label:\"Caption\"}),e.settings.image_advtab?(p&&(p.style.marginLeft&&p.style.marginRight&&p.style.marginLeft===p.style.marginRight&&(y.hspace=a(p.style.marginLeft)),p.style.marginTop&&p.style.marginBottom&&p.style.marginTop===p.style.marginBottom&&(y.vspace=a(p.style.marginTop)),p.style.borderWidth&&(y.border=a(p.style.borderWidth)),y.style=e.dom.serializeStyle(e.dom.parseStyle(e.dom.getAttrib(p,\"style\")))),f=e.windowManager.open({title:\"Insert/edit image\",data:y,bodyType:\"tabpanel\",body:[{title:\"General\",type:\"form\",items:w},{title:\"Advanced\",type:\"form\",pack:\"start\",items:[{label:\"Style\",name:\"style\",type:\"textbox\",onchange:d},{type:\"form\",layout:\"grid\",packV:\"start\",columns:2,padding:0,alignH:[\"left\",\"right\"],defaults:{type:\"textbox\",maxWidth:50,onchange:u},items:[{label:\"Vertical space\",name:\"vspace\"},{label:\"Horizontal space\",name:\"hspace\"},{label:\"Border\",name:\"border\"}]}]}],onSubmit:o})):f=e.windowManager.open({title:\"Insert/edit image\",data:y,body:w,onSubmit:o})}e.on(\"preInit\",function(){function t(e){var t=e.attr(\"class\");return t&&/\\bimage\\b/.test(t)}function n(e){return function(n){function r(t){t.attr(\"contenteditable\",e?\"true\":null)}for(var i,o=n.length;o--;)i=n[o],t(i)&&(i.attr(\"contenteditable\",e?\"false\":null),tinymce.each(i.getAll(\"figcaption\"),r))}}e.parser.addNodeFilter(\"figure\",n(!0)),e.serializer.addNodeFilter(\"figure\",n(!1))}),e.addButton(\"image\",{icon:\"image\",tooltip:\"Insert/edit image\",onclick:r(i),stateSelector:\"img:not([data-mce-object],[data-mce-placeholder]),figure.image\"}),e.addMenuItem(\"image\",{icon:\"image\",text:\"Image\",onclick:r(i),context:\"insert\",prependToContext:!0}),e.addCommand(\"mceImage\",r(i))});\ntinymce.PluginManager.add(\"link\",function(e){function t(e){return e&&\"A\"===e.nodeName&&e.href}function n(e){return tinymce.util.Tools.grep(e,t).length>0}function r(t){return e.dom.getParent(t,\"a[href]\")}function i(){return r(e.selection.getStart())}function o(e){var t=e.getAttribute(\"data-mce-href\");return t?t:e.getAttribute(\"href\")}function a(){var t=e.plugins.contextmenu;return!!t&&t.isContextMenuVisible()}function s(n){var r,i,o;return!!(e.settings.link_context_toolbar&&!a()&&t(n)&&(r=e.selection,i=r.getRng(),o=i.startContainer,3==o.nodeType&&r.isCollapsed()&&i.startOffset>0&&i.startOffset10){var t=document.createElement(\"a\");t.target=\"_blank\",t.href=e,t.rel=\"noreferrer noopener\";var n=document.createEvent(\"MouseEvents\");n.initMouseEvent(\"click\",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),l(t,n)}else{var r=window.open(\"\",\"_blank\");if(r){r.opener=null;var i=r.document;i.open(),i.write(''),i.close()}}}function u(t){if(t){var n=o(t);if(/^#/.test(n)){var r=e.$(n);r.length&&e.selection.scrollIntoView(r[0],!0)}else c(t.href)}}function d(){u(i())}function f(){var t=this,r=function(e){n(e.parents)?t.show():t.hide()};n(e.dom.getParents(e.selection.getStart()))||t.hide(),e.on(\"nodechange\",r),t.on(\"remove\",function(){e.off(\"nodechange\",r)})}function p(t){return function(){var n=e.settings.link_list;\"string\"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):\"function\"==typeof n?n(t):t(n)}}function m(e,t,n){function r(e,n){return n=n||[],tinymce.each(e,function(e){var i={text:e.text||e.title};e.menu?i.menu=r(e.menu):(i.value=e.value,t&&t(i)),n.push(i)}),n}return r(e,n||[])}function g(t){function n(e){var t=d.find(\"#text\");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),d.find(\"#href\").value(e.control.value())}function r(t){var r=[];if(tinymce.each(e.dom.select(\"a:not([href])\"),function(e){var n=e.name||e.id;n&&r.push({text:n,value:\"#\"+n,selected:t.indexOf(\"#\"+n)!=-1})}),r.length)return r.unshift({text:\"None\",value:\"\"}),{name:\"anchor\",type:\"listbox\",label:\"Anchors\",values:r,onselect:n}}function i(){!u&&0===w.text.length&&f&&this.parent().parent().find(\"#text\")[0].value(this.value())}function o(t){var n=t.meta||{};g&&g.value(e.convertURL(this.value(),\"href\")),tinymce.each(t.meta,function(e,t){var n=d.find(\"#\"+t);\"text\"===t?0===u.length&&(n.value(e),w.text=e):n.value(e)}),n.attach&&(h={href:this.value(),attach:n.attach}),n.text||i.call(this)}function a(e){var t=N.getContent();if(/]+>[^<]+<\\/a>$/.test(t)||t.indexOf(\"href=\")==-1))return!1;if(e){var n,r=e.childNodes;if(0===r.length)return!1;for(n=r.length-1;n>=0;n--)if(3!=r[n].nodeType)return!1}return!0}function s(e){e.meta=d.toJSON()}var l,c,u,d,f,p,g,v,b,y,x,C,w={},N=e.selection,k=e.dom;l=N.getNode(),c=k.getParent(l,\"a[href]\"),f=a(),w.text=u=c?c.innerText||c.textContent:N.getContent({format:\"text\"}),w.href=c?k.getAttrib(c,\"href\"):\"\",c?w.target=k.getAttrib(c,\"target\"):e.settings.default_link_target&&(w.target=e.settings.default_link_target),(C=k.getAttrib(c,\"rel\"))&&(w.rel=C),(C=k.getAttrib(c,\"class\"))&&(w[\"class\"]=C),(C=k.getAttrib(c,\"title\"))&&(w.title=C),f&&(p={name:\"text\",type:\"textbox\",size:40,label:\"Text to display\",onchange:function(){w.text=this.value()}}),t&&(g={type:\"listbox\",label:\"Link list\",values:m(t,function(t){t.value=e.convertURL(t.value||t.url,\"href\")},[{text:\"None\",value:\"\"}]),onselect:n,value:e.convertURL(w.href,\"href\"),onPostRender:function(){g=this}}),e.settings.target_list!==!1&&(e.settings.target_list||(e.settings.target_list=[{text:\"None\",value:\"\"},{text:\"New window\",value:\"_blank\"}]),b={name:\"target\",type:\"listbox\",label:\"Target\",values:m(e.settings.target_list)}),e.settings.rel_list&&(v={name:\"rel\",type:\"listbox\",label:\"Rel\",values:m(e.settings.rel_list)}),e.settings.link_class_list&&(y={name:\"class\",type:\"listbox\",label:\"Class\",values:m(e.settings.link_class_list,function(t){t.value&&(t.textStyle=function(){return e.formatter.getCssText({inline:\"a\",classes:[t.value]})})})}),e.settings.link_title!==!1&&(x={name:\"title\",type:\"textbox\",label:\"Title\",value:w.title}),d=e.windowManager.open({title:\"Insert link\",data:w,body:[{name:\"href\",type:\"filepicker\",filetype:\"file\",size:40,autofocus:!0,label:\"Url\",onchange:o,onkeyup:i,onbeforecall:s},p,x,r(w.href),g,v,b,y],onSubmit:function(t){function n(t,n){var r=e.selection.getRng();tinymce.util.Delay.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(r),n(t)})})}function r(e,t){function n(e){return e=r(e),e?[e,i].join(\" \"):i}function r(e){var t=new RegExp(\"(\"+i.replace(\" \",\"|\")+\")\",\"g\");return e&&(e=tinymce.trim(e.replace(t,\"\"))),e?e:null}var i=\"noopener noreferrer\";return t?n(e):r(e)}function i(){var t={href:a,target:w.target?w.target:null,rel:w.rel?w.rel:null,\"class\":w[\"class\"]?w[\"class\"]:null,title:w.title?w.title:null};e.settings.allow_unsafe_link_target||(t.rel=r(t.rel,\"_blank\"==t.target)),a===h.href&&(h.attach(),h={}),c?(e.focus(),f&&w.text!=u&&(\"innerText\"in c?c.innerText=w.text:c.textContent=w.text),k.setAttribs(c,t),N.select(c),e.undoManager.add()):f?e.insertContent(k.createHTML(\"a\",t,k.encode(w.text))):e.execCommand(\"mceInsertLink\",!1,t)}function o(){e.undoManager.transact(i)}var a;return w=tinymce.extend(w,t.data),(a=w.href)?a.indexOf(\"@\")>0&&a.indexOf(\"//\")==-1&&a.indexOf(\"mailto:\")==-1?void n(\"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?\",function(e){e&&(a=\"mailto:\"+a),o()}):e.settings.link_assume_external_targets&&!/^\\w+:/i.test(a)||!e.settings.link_assume_external_targets&&/^\\s*www[\\.|\\d\\.]/i.test(a)?void n(\"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?\",function(e){e&&(a=\"http://\"+a),o()}):void o():void e.execCommand(\"unlink\")}})}var h={},v=function(e){return e.altKey===!0&&e.shiftKey===!1&&e.ctrlKey===!1&&e.metaKey===!1};e.addButton(\"link\",{icon:\"link\",tooltip:\"Insert/edit link\",shortcut:\"Meta+K\",onclick:p(g),stateSelector:\"a[href]\"}),e.addButton(\"unlink\",{icon:\"unlink\",tooltip:\"Remove link\",cmd:\"unlink\",stateSelector:\"a[href]\"}),e.addContextToolbar&&(e.addButton(\"openlink\",{icon:\"newtab\",tooltip:\"Open link\",onclick:d}),e.addContextToolbar(s,\"openlink | link unlink\")),e.addShortcut(\"Meta+K\",\"\",p(g)),e.addCommand(\"mceLink\",p(g)),e.on(\"click\",function(e){var t=r(e.target);t&&tinymce.util.VK.metaKeyPressed(e)&&(e.preventDefault(),u(t))}),e.on(\"keydown\",function(e){var t=i();t&&13===e.keyCode&&v(e)&&(e.preventDefault(),u(t))}),this.showDialog=g,e.addMenuItem(\"openlink\",{text:\"Open link\",icon:\"newtab\",onclick:d,onPostRender:f,prependToContext:!0}),e.addMenuItem(\"link\",{icon:\"link\",text:\"Link\",shortcut:\"Meta+K\",onclick:p(g),stateSelector:\"a[href]\",context:\"insert\",prependToContext:!0})});\ntinymce.PluginManager.add(\"code\",function(e){function t(){var t=e.windowManager.open({title:\"Source code\",body:{type:\"textbox\",name:\"code\",multiline:!0,minWidth:e.getParam(\"code_dialog_width\",600),minHeight:e.getParam(\"code_dialog_height\",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:\"direction: ltr; text-align: left\"},onSubmit:function(t){e.focus(),e.undoManager.transact(function(){e.setContent(t.data.code)}),e.selection.setCursorLocation(),e.nodeChanged()}});t.find(\"#code\").value(e.getContent({source_view:!0}))}e.addCommand(\"mceCodeEditor\",t),e.addButton(\"code\",{icon:\"code\",tooltip:\"Source code\",onclick:t}),e.addMenuItem(\"code\",{icon:\"code\",text:\"Source code\",context:\"tools\",onclick:t})});\n!function(){var e={},t=function(t){for(var n=e[t],i=n.deps,o=n.defn,a=i.length,s=new Array(a),l=0;l0)&&r},c=function(e,t){return e.isChildOf(t,e.getRoot())};return{isTextNode:e,isListNode:t,isListItemNode:n,isBr:r,isFirstChild:i,isLastChild:o,isTextBlock:a,isBogusBr:s,isEmpty:l,isChildOfBody:c}}),s(\"9\",tinymce.dom.TreeWalker),s(\"a\",tinymce.dom.RangeUtils),a(\"b\",[\"2\",\"4\"],function(e,t){var n=function(n){return e.grep(n.selection.getSelectedBlocks(),function(e){return t.isListItemNode(e)})};return{getSelectedListItems:n}}),s(\"h\",tinymce.dom.DOMUtils.DOM),a(\"d\",[\"a\",\"4\"],function(e,t){var n=function(n,r){var i=e.getNode(n,r);if(t.isListItemNode(n)&&t.isTextNode(i)){var o=r>=n.childNodes.length?i.data.length:0;return{container:i,offset:o}}return{container:n,offset:r}},r=function(e){var t=e.cloneRange(),r=n(e.startContainer,e.startOffset);t.setStart(r.container,r.offset);var i=n(e.endContainer,e.endOffset);return t.setEnd(i.container,i.offset),t};return{getNormalizedEndPoint:n,normalizeRange:r}}),a(\"c\",[\"h\",\"4\",\"d\"],function(e,t,n){var r=function(t){var n={},r=function(r){var i,o,a;o=t[r?\"startContainer\":\"endContainer\"],a=t[r?\"startOffset\":\"endOffset\"],1===o.nodeType&&(i=e.create(\"span\",{\"data-mce-type\":\"bookmark\"}),o.hasChildNodes()?(a=Math.min(a,o.childNodes.length-1),r?o.insertBefore(i,o.childNodes[a]):e.insertAfter(i,o.childNodes[a])):o.appendChild(i),o=i,a=0),n[r?\"startContainer\":\"endContainer\"]=o,n[r?\"startOffset\":\"endOffset\"]=a};return r(!0),t.collapsed||r(),n},i=function(t){function r(n){var r,i,o,a=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&\"bookmark\"===t.getAttribute(\"data-mce-type\")||n++,t=t.nextSibling}return-1};r=o=t[n?\"startContainer\":\"endContainer\"],i=t[n?\"startOffset\":\"endOffset\"],r&&(1===r.nodeType&&(i=a(r),r=r.parentNode,e.remove(o)),t[n?\"startContainer\":\"endContainer\"]=r,t[n?\"startOffset\":\"endOffset\"]=i)}r(!0),r();var i=e.createRng();return i.setStart(t.startContainer,t.startOffset),t.endContainer&&i.setEnd(t.endContainer,t.endOffset),n.normalizeRange(i)};return{createBookmark:r,resolveBookmark:i}}),a(\"e\",[\"h\",\"2\",\"4\"],function(e,t,n){var r=function(t,r){var i,o=r.parentNode;\"LI\"===o.nodeName&&o.firstChild===r&&(i=o.previousSibling,i&&\"LI\"===i.nodeName?(i.appendChild(r),n.isEmpty(t,o)&&e.remove(o)):e.setStyle(o,\"listStyleType\",\"none\")),n.isListNode(o)&&(i=o.previousSibling,i&&\"LI\"===i.nodeName&&i.appendChild(r))},i=function(e,n){t.each(t.grep(e.select(\"ol,ul\",n)),function(t){r(e,t)})};return{normalizeList:r,normalizeLists:i}}),s(\"f\",tinymce.dom.BookmarkManager),s(\"j\",tinymce.Env),a(\"i\",[\"h\",\"j\"],function(e,t){var n=function(n,r,i){var o,a,s,l=e.createFragment(),c=n.schema.getBlockElements();if(n.settings.forced_root_block&&(i=i||n.settings.forced_root_block),i&&(a=e.create(i),a.tagName===n.settings.forced_root_block&&e.setAttribs(a,n.settings.forced_root_block_attrs),l.appendChild(a)),r)for(;o=r.firstChild;){var u=o.nodeName;s||\"SPAN\"===u&&\"bookmark\"===o.getAttribute(\"data-mce-type\")||(s=!0),c[u]?(l.appendChild(o),a=null):i?(a||(a=e.create(i),l.appendChild(a)),a.appendChild(o)):l.appendChild(o)}return n.settings.forced_root_block?s||t.ie&&!(t.ie>10)||a.appendChild(e.create(\"br\",{\"data-mce-bogus\":\"1\"})):l.appendChild(e.create(\"br\")),l};return{createNewTextBlock:n}}),a(\"g\",[\"h\",\"2\",\"i\",\"4\"],function(e,t,n,r){var i=function(i,o,a,s){var l,c,u,d,f=function(n){t.each(u,function(e){n.parentNode.insertBefore(e,a.parentNode)}),e.remove(n)};for(u=e.select('span[data-mce-type=\"bookmark\"]',o),s=s||n.createNewTextBlock(i,a),l=e.createRng(),l.setStartAfter(a),l.setEndAfter(o),c=l.extractContents(),d=c.firstChild;d;d=d.firstChild)if(\"LI\"===d.nodeName&&i.dom.isEmpty(d)){e.remove(d);break}i.dom.isEmpty(c)||e.insertAfter(c,o),e.insertAfter(s,o),r.isEmpty(i.dom,a.parentNode)&&f(a.parentNode),e.remove(a),r.isEmpty(i.dom,o)&&e.remove(o)};return{splitList:i}}),a(\"7\",[\"h\",\"4\",\"c\",\"b\",\"g\",\"e\",\"i\"],function(e,t,n,r,i,o,a){var s=function(n,r){t.isEmpty(n,r)&&e.remove(r)},l=function(n,r){var l,c=r.parentNode,u=c.parentNode;return c===n.getBody()||(\"DD\"===r.nodeName?(e.rename(r,\"DT\"),!0):t.isFirstChild(r)&&t.isLastChild(r)?(\"LI\"===u.nodeName?(e.insertAfter(r,u),s(n.dom,u),e.remove(c)):t.isListNode(u)?e.remove(c,!0):(u.insertBefore(a.createNewTextBlock(n,r),c),e.remove(c)),!0):t.isFirstChild(r)?(\"LI\"===u.nodeName?(e.insertAfter(r,u),r.appendChild(c),s(n.dom,u)):t.isListNode(u)?u.insertBefore(r,c):(u.insertBefore(a.createNewTextBlock(n,r),c),e.remove(r)),!0):t.isLastChild(r)?(\"LI\"===u.nodeName?e.insertAfter(r,u):t.isListNode(u)?e.insertAfter(r,c):(e.insertAfter(a.createNewTextBlock(n,r),c),e.remove(r)),!0):(\"LI\"===u.nodeName?(c=u,l=a.createNewTextBlock(n,r,\"LI\")):l=t.isListNode(u)?a.createNewTextBlock(n,r,\"LI\"):a.createNewTextBlock(n,r),i.splitList(n,c,r,l),o.normalizeLists(n.dom,c.parentNode),!0))},c=function(e){var t=r.getSelectedListItems(e);if(t.length){var i,o,a=n.createBookmark(e.selection.getRng(!0)),s=e.getBody();for(i=t.length;i--;)for(var c=t[i].parentNode;c&&c!==s;){for(o=t.length;o--;)if(t[o]===c){t.splice(i,1);break}c=c.parentNode}for(i=0;i0))return l;for(a=n.schema.getNonEmptyElements(),1===l.nodeType&&(l=t.getNode(l,c)),s=new e(l,n.getBody()),o&&i.isBogusBr(n.dom,l)&&s.next();l=s[o?\"next\":\"prev2\"]();){if(\"LI\"===l.nodeName&&!l.hasChildNodes())return l;if(a[l.nodeName])return l;if(3===l.nodeType&&l.data.length>0)return l}},u=function(e,t,n){var r,o,a=t.parentNode;if(i.isChildOfBody(e,t)&&i.isChildOfBody(e,n)){if(i.isListNode(n.lastChild)&&(o=n.lastChild),a===n.lastChild&&i.isBr(a.previousSibling)&&e.remove(a.previousSibling),r=n.lastChild,r&&i.isBr(r)&&t.hasChildNodes()&&e.remove(r),i.isEmpty(e,n,!0)&&e.$(n).empty(),!i.isEmpty(e,t,!0))for(;r=t.firstChild;)n.appendChild(r);o&&n.appendChild(o),e.remove(t),i.isEmpty(e,a)&&a!==e.getRoot()&&e.remove(a)}},d=function(e,t){var n,r,s,d=e.dom,f=e.selection,p=d.getParent(f.getStart(),\"LI\");if(p){if(n=p.parentNode,n===e.getBody()&&i.isEmpty(d,n))return!0;if(r=a.normalizeRange(f.getRng(!0)),s=d.getParent(c(e,r,t),\"LI\"),s&&s!==p){var m=o.createBookmark(r);return t?u(d,s,p):u(d,p,s),e.selection.setRng(o.resolveBookmark(m)),!0}if(!s&&!t&&l.removeList(e,n.nodeName))return!0}return!1},f=function(e,t){var n=e.dom,r=n.getParent(e.selection.getStart(),n.isBlock);if(r&&n.isEmpty(r)){var i=a.normalizeRange(e.selection.getRng(!0)),o=n.getParent(c(e,i,t),\"LI\");if(o)return e.undoManager.transact(function(){n.remove(r),l.mergeWithAdjacentLists(n,o.parentNode),e.selection.select(o,!0),e.selection.collapse(t)}),!0}return!1},p=function(e,t){return d(e,t)||f(e,t)},m=function(e){var t=e.dom.getParent(e.selection.getStart(),\"LI,DT,DD\");return!!(t||r.getSelectedListItems(e).length>0)&&(e.undoManager.transact(function(){e.execCommand(\"Delete\"),s.normalizeLists(e.dom,e.getBody())}),!0)},g=function(e,t){return e.selection.isCollapsed()?p(e,t):m(e)},h=function(e){e.on(\"keydown\",function(t){t.keyCode===n.BACKSPACE?g(e,!1)&&t.preventDefault():t.keyCode===n.DELETE&&g(e,!0)&&t.preventDefault()})};return{setup:h,backspaceDelete:g}}),a(\"6\",[\"h\",\"4\",\"c\",\"b\"],function(e,t,n,r){var i=function(n,r){var i;if(t.isListNode(n)){for(;i=n.firstChild;)r.appendChild(i);e.remove(n)}},o=function(n){var r,o,a;return\"DT\"===n.nodeName?(e.rename(n,\"DD\"),!0):(r=n.previousSibling,r&&t.isListNode(r)?(r.appendChild(n),!0):r&&\"LI\"===r.nodeName&&t.isListNode(r.lastChild)?(r.lastChild.appendChild(n),i(n.lastChild,r.lastChild),!0):(r=n.nextSibling,r&&t.isListNode(r)?(r.insertBefore(n,r.firstChild),!0):(r=n.previousSibling,!(!r||\"LI\"!==r.nodeName)&&(o=e.create(n.parentNode.nodeName),a=e.getStyle(n.parentNode,\"listStyleType\"),a&&e.setStyle(o,\"listStyleType\",a),r.appendChild(o),o.appendChild(n),i(n.lastChild,o),!0))))},a=function(e){var t=r.getSelectedListItems(e);if(t.length){for(var i=n.createBookmark(e.selection.getRng(!0)),a=0;a0&&o[0].nodeName===n)})}},i=function(e,n){var r=e.settings.plugins?e.settings.plugins:\"\";return t.inArray(r.split(/[ ,]/),n)!==-1};i(e,\"advlist\")||(e.addButton(\"numlist\",{title:\"Numbered list\",cmd:\"InsertOrderedList\",onPostRender:n(\"OL\")}),e.addButton(\"bullist\",{title:\"Bullet list\",cmd:\"InsertUnorderedList\",onPostRender:n(\"UL\")})),e.addButton(\"indent\",{icon:\"indent\",title:\"Increase indent\",cmd:\"Indent\",onPostRender:function(t){var n=t.control;e.on(\"nodechange\",function(){for(var t=e.selection.getSelectedBlocks(),i=!1,o=0,a=t.length;!i&&o
      '+(n?\"×\":\"\")+\"
      \"}var r,i,o,a,s,u,d,f,p=this,m=p._id,g=0;for(f=p.settings.origin,r=n(f),r.push({text:tinymce.translate(\"No color\"),color:\"transparent\"}),o='',a=r.length-1,u=0;u\",s=0;sa?o+=\"\":(i=r[d],o+=t(i.color,i.text));o+=\"\"}if(e.settings.color_picker_callback){for(o+='\",o+=\"\",s=0;s\"}return o+=\"
      \"}function i(t,n){e.undoManager.transact(function(){e.focus(),e.formatter.apply(t,{value:n}),e.nodeChanged()})}function o(t){e.undoManager.transact(function(){e.focus(),e.formatter.remove(t,{value:null},null,!0),e.nodeChanged()})}function a(n){function r(e){d.hidePanel(),d.color(e),i(d.settings.format,e)}function a(){d.hidePanel(),d.resetColor(),o(d.settings.format)}function s(e,t){e.style.background=t,e.setAttribute(\"data-mce-color\",t)}var c,u,d=this.parent();u=d.settings.origin,tinymce.DOM.getParent(n.target,\".mce-custom-color-btn\")&&(d.hidePanel(),e.settings.color_picker_callback.call(e,function(e){var t,n,i,o=d.panel.getEl().getElementsByTagName(\"table\")[0];for(t=tinymce.map(o.rows[o.rows.length-1].childNodes,function(e){return e.firstChild}),i=0;i elements.\n */\nangular.module('ui.tinymce', [])\n .value('uiTinymceConfig', {})\n .directive('uiTinymce', ['$rootScope', '$compile', '$timeout', '$window', '$sce', 'uiTinymceConfig', 'uiTinymceService', function($rootScope, $compile, $timeout, $window, $sce, uiTinymceConfig, uiTinymceService) {\n uiTinymceConfig = uiTinymceConfig || {};\n\n if (uiTinymceConfig.baseUrl) {\n tinymce.baseURL = uiTinymceConfig.baseUrl;\n }\n\n return {\n require: ['ngModel', '^?form'],\n priority: 599,\n link: function(scope, element, attrs, ctrls) {\n if (!$window.tinymce) {\n return;\n }\n\n var ngModel = ctrls[0],\n form = ctrls[1] || null;\n\n var expression, options = {\n debounce: true\n }, tinyInstance,\n updateView = function(editor) {\n var content = editor.getContent({format: options.format}).trim();\n content = $sce.trustAsHtml(content);\n\n ngModel.$setViewValue(content);\n if (!$rootScope.$$phase) {\n scope.$digest();\n }\n };\n\n function toggleDisable(disabled) {\n if (disabled) {\n ensureInstance();\n\n if (tinyInstance) {\n tinyInstance.getBody().setAttribute('contenteditable', false);\n }\n } else {\n ensureInstance();\n\n if (tinyInstance && !tinyInstance.settings.readonly && tinyInstance.getDoc()) {\n tinyInstance.getBody().setAttribute('contenteditable', true);\n }\n }\n }\n\n // fetch a unique ID from the service\n var uniqueId = uiTinymceService.getUniqueId();\n attrs.$set('id', uniqueId);\n\n expression = {};\n\n angular.extend(expression, scope.$eval(attrs.uiTinymce));\n\n //Debounce update and save action\n var debouncedUpdate = (function(debouncedUpdateDelay) {\n var debouncedUpdateTimer;\n return function(ed) {\n\t $timeout.cancel(debouncedUpdateTimer);\n\t debouncedUpdateTimer = $timeout(function() {\n return (function(ed) {\n if (ed.isDirty()) {\n ed.save();\n updateView(ed);\n }\n })(ed);\n }, debouncedUpdateDelay);\n };\n })(400);\n\n var setupOptions = {\n // Update model when calling setContent\n // (such as from the source editor popup)\n setup: function(ed) {\n ed.on('init', function() {\n ngModel.$render();\n ngModel.$setPristine();\n ngModel.$setUntouched();\n if (form) {\n form.$setPristine();\n }\n });\n\n // Update model when:\n // - a button has been clicked [ExecCommand]\n // - the editor content has been modified [change]\n // - the node has changed [NodeChange]\n // - an object has been resized (table, image) [ObjectResized]\n ed.on('ExecCommand change NodeChange ObjectResized', function() {\n if (!options.debounce) {\n ed.save();\n updateView(ed);\n \treturn;\n }\n debouncedUpdate(ed);\n });\n\n ed.on('blur', function() {\n element[0].blur();\n ngModel.$setTouched();\n if (!$rootScope.$$phase) {\n scope.$digest();\n }\n });\n\n ed.on('remove', function() {\n element.remove();\n });\n\n if (uiTinymceConfig.setup) {\n uiTinymceConfig.setup(ed, {\n updateView: updateView\n });\n }\n\n if (expression.setup) {\n expression.setup(ed, {\n updateView: updateView\n });\n }\n },\n format: expression.format || 'html',\n selector: '#' + attrs.id\n };\n // extend options with initial uiTinymceConfig and\n // options from directive attribute value\n angular.extend(options, uiTinymceConfig, expression, setupOptions);\n // Wrapped in $timeout due to $tinymce:refresh implementation, requires\n // element to be present in DOM before instantiating editor when\n // re-rendering directive\n $timeout(function() {\n if (options.baseURL){\n tinymce.baseURL = options.baseURL;\n }\n var maybeInitPromise = tinymce.init(options);\n if(maybeInitPromise && typeof maybeInitPromise.then === 'function') {\n maybeInitPromise.then(function() {\n toggleDisable(scope.$eval(attrs.ngDisabled));\n });\n } else {\n toggleDisable(scope.$eval(attrs.ngDisabled));\n }\n });\n\n ngModel.$formatters.unshift(function(modelValue) {\n return modelValue ? $sce.trustAsHtml(modelValue) : '';\n });\n\n ngModel.$parsers.unshift(function(viewValue) {\n return viewValue ? $sce.getTrustedHtml(viewValue) : '';\n });\n\n ngModel.$render = function() {\n ensureInstance();\n\n var viewValue = ngModel.$viewValue ?\n $sce.getTrustedHtml(ngModel.$viewValue) : '';\n\n // instance.getDoc() check is a guard against null value\n // when destruction & recreation of instances happen\n if (tinyInstance &&\n tinyInstance.getDoc()\n ) {\n tinyInstance.setContent(viewValue);\n // Triggering change event due to TinyMCE not firing event &\n // becoming out of sync for change callbacks\n tinyInstance.fire('change');\n }\n };\n\n attrs.$observe('disabled', toggleDisable);\n\n // This block is because of TinyMCE not playing well with removal and\n // recreation of instances, requiring instances to have different\n // selectors in order to render new instances properly\n var unbindEventListener = scope.$on('$tinymce:refresh', function(e, id) {\n var eid = attrs.id;\n if (angular.isUndefined(id) || id === eid) {\n var parentElement = element.parent();\n var clonedElement = element.clone();\n clonedElement.removeAttr('id');\n clonedElement.removeAttr('style');\n clonedElement.removeAttr('aria-hidden');\n tinymce.execCommand('mceRemoveEditor', false, eid);\n parentElement.append($compile(clonedElement)(scope));\n unbindEventListener();\n }\n });\n\n scope.$on('$destroy', function() {\n ensureInstance();\n\n if (tinyInstance) {\n tinyInstance.remove();\n tinyInstance = null;\n }\n });\n\n function ensureInstance() {\n if (!tinyInstance) {\n tinyInstance = tinymce.get(attrs.id);\n }\n }\n }\n };\n }])\n .service('uiTinymceService', [\n /**\n * A service is used to create unique ID's, this prevents duplicate ID's if there are multiple editors on screen.\n */\n function() {\n var UITinymceService = function() {\n \t var ID_ATTR = 'ui-tinymce';\n \t// uniqueId keeps track of the latest assigned ID\n \tvar uniqueId = 0;\n // getUniqueId returns a unique ID\n \tvar getUniqueId = function() {\n uniqueId ++;\n return ID_ATTR + '-' + uniqueId;\n };\n // return the function as a public method of the service\n return {\n \tgetUniqueId: getUniqueId\n };\n };\n // return a new instance of the service\n return new UITinymceService();\n }\n ]);\n"],"sourceRoot":"/source/"}