{"version":3,"sources":["tab.js"],"names":["$","window","document","undefined","Math","self","Function","fn","tab","parameters","returnedValue","$allModules","isFunction","this","moduleSelector","selector","time","Date","getTime","performance","query","arguments","methodInvoked","queryArguments","slice","call","initializedHistory","each","$context","$tabs","activeTabPath","parameterArray","module","historyEvent","settings","isPlainObject","extend","className","metadata","error","eventNamespace","namespace","moduleNamespace","$module","cache","firstLoad","recursionDepth","element","instance","data","initialize","debug","fix","callbacks","determineTabs","context","auto","set","bind","events","history","initializeHistory","instantiate","verbose","destroy","removeData","off","isWindow","on","event","click","$reference","closest","ui","length","parent","childrenOnly","children","tabs","find","onTabLoad","onTabInit","onLoad","legacyLoad","onFirstLoad","legacyInit","address","state","historyType","path","change","tabPath","value","changeTab","preventDefault","pathNames","join","get","initialPath","pageTitle","templates","determineTitle","display","title","refresh","read","cacheKey","add","content","remove","url","replace","apiSettings","loading","$tab","tabElement","isLoading","hasClass","addClass","siblings","removeClass","active","onRequest","pushStateAvailable","pushState","shouldIgnoreLoad","ignoreFirstLoad","remoteContent","pathArray","utilities","pathToArray","defaultPathArray","arrayToPath","index","$anchor","nextPathArray","nextPath","isLastTab","currentPathArray","currentPath","isTab","is","isLastIndex","filterArray","html","activate","all","navigation","fetch","search","missingTab","setTimeout","scrollTo","$element","scrollOffset","offset","top","scrollTop","update","evaluateScripts","cacheType","toLowerCase","empty","append","clone","innerHTML","fullTabPath","requestSettings","cachedContent","dataType","encodeParameters","alwaysRefresh","headers","X-Remote","onSuccess","response","$clone","not","urlData","request","api","existingRequest","$deactiveTabs","deactivate","isActive","onVisible","$navigation","navElement","$deactiveNavigation","tabName","eq","defaultPath","$defaultNav","filter","defaultTab","maxDepth","recursion","$fullPathTab","$simplePathTab","tabPathArray","lastTab","last","keepArray","removeArray","grep","keepValue","inArray","array","isArray","pathName","split","setting","name","internal","silent","log","prototype","console","info","apply","message","currentTime","executionTime","previousTime","push","Name","Arguments","Element","Execution Time","clearTimeout","timer","totalTime","group","table","groupCollapsed","groupEnd","invoke","passedArguments","found","object","depth","camelCaseValue","charAt","toUpperCase","method","tabArray","noContent","loaded","promise","jQuery"],"mappings":";;;;;;;;;CAUC,SAAWA,EAAGC,EAAQC,EAAUC,GAEjC,YAEAF,GAA2B,mBAAVA,IAAyBA,EAAOG,MAAQA,KACrDH,EACgB,mBAARI,OAAuBA,KAAKD,MAAQA,KAC1CC,KACAC,SAAS,iBAGfN,EAAEO,GAAGC,IAAM,SAASC,GAElB,GAeEC,GAbAC,EACMX,EADYA,EAAEY,WAAWC,MACvBZ,EACAY,MAERC,EAAkBH,EAAYI,UAAY,GAC1CC,GAAkB,GAAIC,OAAOC,UAC7BC,KAEAC,EAAkBC,UAAU,GAC5BC,EAAmC,gBAATF,GAC1BG,KAAqBC,MAAMC,KAAKJ,UAAW,GAE3CK,GAAqB,CA4zBvB,OAxzBAf,GACGgB,KAAK,WACJ,GAeEC,GACAC,EAQAC,EACAC,EACAC,EAEAC,EA1BAC,EAAoBlC,EAAEmC,cAAc1B,GAChCT,EAAEoC,QAAO,KAAUpC,EAAEO,GAAGC,IAAI0B,SAAUzB,GACtCT,EAAEoC,UAAWpC,EAAEO,GAAGC,IAAI0B,UAE1BG,EAAkBH,EAASG,UAC3BC,EAAkBJ,EAASI,SAC3BvB,EAAkBmB,EAASnB,SAC3BwB,EAAkBL,EAASK,MAE3BC,EAAkB,IAAMN,EAASO,UACjCC,EAAkB,UAAYR,EAASO,UAEvCE,EAAkB3C,EAAEa,MAIpB+B,KACAC,GAAkB,EAClBC,EAAkB,EAClBC,EAAkBlC,KAClBmC,EAAkBL,EAAQM,KAAKP,EAUjCV,IAEEkB,WAAY,WACVlB,EAAOmB,MAAM,6BAA8BR,GAC3CX,EAAOoB,IAAIC,YACXrB,EAAOsB,gBAEPtB,EAAOmB,MAAM,mBAAoBjB,EAASqB,QAAS1B,GAEhDK,EAASsB,MACVxB,EAAOyB,IAAID,OAEbxB,EAAO0B,KAAKC,SAETzB,EAAS0B,UAAYlC,IACtBM,EAAO6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AkB,EAClB5C,aAAkB,EAElBqC,MAAkB,EAClBI,SAAkB,EAClB4B,YAAkB,OAClBC,MAAkB,EAElBlC,SAAkB,EAClBqB,cAAkB,EAClBuH,SAAkB,GAElBZ,WAAkB,WAElBZ,eAAkB,EAClB/H,OAAkB,EAClBoH,UAAkB,WAClBlC,iBAAkB,EAElBd,aAAkB,EAClB+C,gBAAkB,OAElB3E,YAAc,SAASO,EAAS5D,EAAgBE,KAChDiD,OAAc,SAASS,EAAS5D,EAAgBE,KAChDwJ,UAAc,SAAS9F,EAAS5D,EAAgBE,KAChDyF,UAAc,SAAS/B,EAAS5D,EAAgBE,KAEhDmE,WACEC,eAAgB,SAASgJ,MAG3B9M,OACE6I,IAAa,mDACbgE,OAAa,uCACb9F,WAAa,0DACbgG,UAAa,kDACb7J,KAAa,6CACb2G,UAAa,8BACb/G,WAAa,6EACbF,WAAa,uEACbI,MAAa,sFAGfjD,UACE9B,IAAS,MACT+O,OAAS,SACTC,QAAS,WAGXnN,WACE4E,QAAU,UACVQ,OAAU,UAGZ1G,UACE+D,KAAO,UACPL,GAAO,SAKPgL,OAAQxP,OAAQC","file":"tab.min.js","sourcesContent":["/*!\n * # Semantic UI 2.2.6 - Tab\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n;(function ($, window, document, undefined) {\n\n\"use strict\";\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n ? window\n : (typeof self != 'undefined' && self.Math == Math)\n ? self\n : Function('return this')()\n;\n\n$.fn.tab = function(parameters) {\n\n var\n // use window context if none specified\n $allModules = $.isFunction(this)\n ? $(window)\n : $(this),\n\n moduleSelector = $allModules.selector || '',\n time = new Date().getTime(),\n performance = [],\n\n query = arguments[0],\n methodInvoked = (typeof query == 'string'),\n queryArguments = [].slice.call(arguments, 1),\n\n initializedHistory = false,\n returnedValue\n ;\n\n $allModules\n .each(function() {\n var\n\n settings = ( $.isPlainObject(parameters) )\n ? $.extend(true, {}, $.fn.tab.settings, parameters)\n : $.extend({}, $.fn.tab.settings),\n\n className = settings.className,\n metadata = settings.metadata,\n selector = settings.selector,\n error = settings.error,\n\n eventNamespace = '.' + settings.namespace,\n moduleNamespace = 'module-' + settings.namespace,\n\n $module = $(this),\n $context,\n $tabs,\n\n cache = {},\n firstLoad = true,\n recursionDepth = 0,\n element = this,\n instance = $module.data(moduleNamespace),\n\n activeTabPath,\n parameterArray,\n module,\n\n historyEvent\n\n ;\n\n module = {\n\n initialize: function() {\n module.debug('Initializing tab menu item', $module);\n module.fix.callbacks();\n module.determineTabs();\n\n module.debug('Determining tabs', settings.context, $tabs);\n // set up automatic routing\n if(settings.auto) {\n module.set.auto();\n }\n module.bind.events();\n\n if(settings.history && !initializedHistory) {\n module.initializeHistory();\n initializedHistory = true;\n }\n\n module.instantiate();\n },\n\n instantiate: function () {\n module.verbose('Storing instance of module', module);\n instance = module;\n $module\n .data(moduleNamespace, module)\n ;\n },\n\n destroy: function() {\n module.debug('Destroying tabs', $module);\n $module\n .removeData(moduleNamespace)\n .off(eventNamespace)\n ;\n },\n\n bind: {\n events: function() {\n // if using $.tab don't add events\n if( !$.isWindow( element ) ) {\n module.debug('Attaching tab activation events to element', $module);\n $module\n .on('click' + eventNamespace, module.event.click)\n ;\n }\n }\n },\n\n determineTabs: function() {\n var\n $reference\n ;\n\n // determine tab context\n if(settings.context === 'parent') {\n if($module.closest(selector.ui).length > 0) {\n $reference = $module.closest(selector.ui);\n module.verbose('Using closest UI element as parent', $reference);\n }\n else {\n $reference = $module;\n }\n $context = $reference.parent();\n module.verbose('Determined parent element for creating context', $context);\n }\n else if(settings.context) {\n $context = $(settings.context);\n module.verbose('Using selector for tab context', settings.context, $context);\n }\n else {\n $context = $('body');\n }\n // find tabs\n if(settings.childrenOnly) {\n $tabs = $context.children(selector.tabs);\n module.debug('Searching tab context children for tabs', $context, $tabs);\n }\n else {\n $tabs = $context.find(selector.tabs);\n module.debug('Searching tab context for tabs', $context, $tabs);\n }\n },\n\n fix: {\n callbacks: function() {\n if( $.isPlainObject(parameters) && (parameters.onTabLoad || parameters.onTabInit) ) {\n if(parameters.onTabLoad) {\n parameters.onLoad = parameters.onTabLoad;\n delete parameters.onTabLoad;\n module.error(error.legacyLoad, parameters.onLoad);\n }\n if(parameters.onTabInit) {\n parameters.onFirstLoad = parameters.onTabInit;\n delete parameters.onTabInit;\n module.error(error.legacyInit, parameters.onFirstLoad);\n }\n settings = $.extend(true, {}, $.fn.tab.settings, parameters);\n }\n }\n },\n\n initializeHistory: function() {\n module.debug('Initializing page state');\n if( $.address === undefined ) {\n module.error(error.state);\n return false;\n }\n else {\n if(settings.historyType == 'state') {\n module.debug('Using HTML5 to manage state');\n if(settings.path !== false) {\n $.address\n .history(true)\n .state(settings.path)\n ;\n }\n else {\n module.error(error.path);\n return false;\n }\n }\n $.address\n .bind('change', module.event.history.change)\n ;\n }\n },\n\n event: {\n click: function(event) {\n var\n tabPath = $(this).data(metadata.tab)\n ;\n if(tabPath !== undefined) {\n if(settings.history) {\n module.verbose('Updating page state', event);\n $.address.value(tabPath);\n }\n else {\n module.verbose('Changing tab', event);\n module.changeTab(tabPath);\n }\n event.preventDefault();\n }\n else {\n module.debug('No tab specified');\n }\n },\n history: {\n change: function(event) {\n var\n tabPath = event.pathNames.join('/') || module.get.initialPath(),\n pageTitle = settings.templates.determineTitle(tabPath) || false\n ;\n module.performance.display();\n module.debug('History change event', tabPath, event);\n historyEvent = event;\n if(tabPath !== undefined) {\n module.changeTab(tabPath);\n }\n if(pageTitle) {\n $.address.title(pageTitle);\n }\n }\n }\n },\n\n refresh: function() {\n if(activeTabPath) {\n module.debug('Refreshing tab', activeTabPath);\n module.changeTab(activeTabPath);\n }\n },\n\n cache: {\n\n read: function(cacheKey) {\n return (cacheKey !== undefined)\n ? cache[cacheKey]\n : false\n ;\n },\n add: function(cacheKey, content) {\n cacheKey = cacheKey || activeTabPath;\n module.debug('Adding cached content for', cacheKey);\n cache[cacheKey] = content;\n },\n remove: function(cacheKey) {\n cacheKey = cacheKey || activeTabPath;\n module.debug('Removing cached content for', cacheKey);\n delete cache[cacheKey];\n }\n },\n\n set: {\n auto: function() {\n var\n url = (typeof settings.path == 'string')\n ? settings.path.replace(/\\/$/, '') + '/{$tab}'\n : '/{$tab}'\n ;\n module.verbose('Setting up automatic tab retrieval from server', url);\n if($.isPlainObject(settings.apiSettings)) {\n settings.apiSettings.url = url;\n }\n else {\n settings.apiSettings = {\n url: url\n };\n }\n },\n loading: function(tabPath) {\n var\n $tab = module.get.tabElement(tabPath),\n isLoading = $tab.hasClass(className.loading)\n ;\n if(!isLoading) {\n module.verbose('Setting loading state for', $tab);\n $tab\n .addClass(className.loading)\n .siblings($tabs)\n .removeClass(className.active + ' ' + className.loading)\n ;\n if($tab.length > 0) {\n settings.onRequest.call($tab[0], tabPath);\n }\n }\n },\n state: function(state) {\n $.address.value(state);\n }\n },\n\n changeTab: function(tabPath) {\n var\n pushStateAvailable = (window.history && window.history.pushState),\n shouldIgnoreLoad = (pushStateAvailable && settings.ignoreFirstLoad && firstLoad),\n remoteContent = (settings.auto || $.isPlainObject(settings.apiSettings) ),\n // only add default path if not remote content\n pathArray = (remoteContent && !shouldIgnoreLoad)\n ? module.utilities.pathToArray(tabPath)\n : module.get.defaultPathArray(tabPath)\n ;\n tabPath = module.utilities.arrayToPath(pathArray);\n $.each(pathArray, function(index, tab) {\n var\n currentPathArray = pathArray.slice(0, index + 1),\n currentPath = module.utilities.arrayToPath(currentPathArray),\n\n isTab = module.is.tab(currentPath),\n isLastIndex = (index + 1 == pathArray.length),\n\n $tab = module.get.tabElement(currentPath),\n $anchor,\n nextPathArray,\n nextPath,\n isLastTab\n ;\n module.verbose('Looking for tab', tab);\n if(isTab) {\n module.verbose('Tab was found', tab);\n // scope up\n activeTabPath = currentPath;\n parameterArray = module.utilities.filterArray(pathArray, currentPathArray);\n\n if(isLastIndex) {\n isLastTab = true;\n }\n else {\n nextPathArray = pathArray.slice(0, index + 2);\n nextPath = module.utilities.arrayToPath(nextPathArray);\n isLastTab = ( !module.is.tab(nextPath) );\n if(isLastTab) {\n module.verbose('Tab parameters found', nextPathArray);\n }\n }\n if(isLastTab && remoteContent) {\n if(!shouldIgnoreLoad) {\n module.activate.navigation(currentPath);\n module.fetch.content(currentPath, tabPath);\n }\n else {\n module.debug('Ignoring remote content on first tab load', currentPath);\n firstLoad = false;\n module.cache.add(tabPath, $tab.html());\n module.activate.all(currentPath);\n settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent);\n settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent);\n }\n return false;\n }\n else {\n module.debug('Opened local tab', currentPath);\n module.activate.all(currentPath);\n if( !module.cache.read(currentPath) ) {\n module.cache.add(currentPath, true);\n module.debug('First time tab loaded calling tab init');\n settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent);\n }\n settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent);\n }\n\n }\n else if(tabPath.search('/') == -1 && tabPath !== '') {\n // look for in page anchor\n $anchor = $('#' + tabPath + ', a[name=\"' + tabPath + '\"]');\n currentPath = $anchor.closest('[data-tab]').data(metadata.tab);\n $tab = module.get.tabElement(currentPath);\n // if anchor exists use parent tab\n if($anchor && $anchor.length > 0 && currentPath) {\n module.debug('Anchor link used, opening parent tab', $tab, $anchor);\n if( !$tab.hasClass(className.active) ) {\n setTimeout(function() {\n module.scrollTo($anchor);\n }, 0);\n }\n module.activate.all(currentPath);\n if( !module.cache.read(currentPath) ) {\n module.cache.add(currentPath, true);\n module.debug('First time tab loaded calling tab init');\n settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent);\n }\n settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent);\n return false;\n }\n }\n else {\n module.error(error.missingTab, $module, $context, currentPath);\n return false;\n }\n });\n },\n\n scrollTo: function($element) {\n var\n scrollOffset = ($element && $element.length > 0)\n ? $element.offset().top\n : false\n ;\n if(scrollOffset !== false) {\n module.debug('Forcing scroll to an in-page link in a hidden tab', scrollOffset, $element);\n $(document).scrollTop(scrollOffset);\n }\n },\n\n update: {\n content: function(tabPath, html, evaluateScripts) {\n var\n $tab = module.get.tabElement(tabPath),\n tab = $tab[0]\n ;\n evaluateScripts = (evaluateScripts !== undefined)\n ? evaluateScripts\n : settings.evaluateScripts\n ;\n if(typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && typeof html !== 'string') {\n $tab\n .empty()\n .append($(html).clone(true))\n ;\n }\n else {\n if(evaluateScripts) {\n module.debug('Updating HTML and evaluating inline scripts', tabPath, html);\n $tab.html(html);\n }\n else {\n module.debug('Updating HTML', tabPath, html);\n tab.innerHTML = html;\n }\n }\n }\n },\n\n fetch: {\n\n content: function(tabPath, fullTabPath) {\n var\n $tab = module.get.tabElement(tabPath),\n apiSettings = {\n dataType : 'html',\n encodeParameters : false,\n on : 'now',\n cache : settings.alwaysRefresh,\n headers : {\n 'X-Remote': true\n },\n onSuccess : function(response) {\n if(settings.cacheType == 'response') {\n module.cache.add(fullTabPath, response);\n }\n module.update.content(tabPath, response);\n if(tabPath == activeTabPath) {\n module.debug('Content loaded', tabPath);\n module.activate.tab(tabPath);\n }\n else {\n module.debug('Content loaded in background', tabPath);\n }\n settings.onFirstLoad.call($tab[0], tabPath, parameterArray, historyEvent);\n settings.onLoad.call($tab[0], tabPath, parameterArray, historyEvent);\n\n if(typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && $tab.children().length > 0) {\n setTimeout(function() {\n var\n $clone = $tab.children().clone(true)\n ;\n $clone = $clone.not('script');\n module.cache.add(fullTabPath, $clone);\n }, 0);\n }\n else {\n module.cache.add(fullTabPath, $tab.html());\n }\n },\n urlData: {\n tab: fullTabPath\n }\n },\n request = $tab.api('get request') || false,\n existingRequest = ( request && request.state() === 'pending' ),\n requestSettings,\n cachedContent\n ;\n\n fullTabPath = fullTabPath || tabPath;\n cachedContent = module.cache.read(fullTabPath);\n\n\n if(settings.cache && cachedContent) {\n module.activate.tab(tabPath);\n module.debug('Adding cached content', fullTabPath);\n if(settings.evaluateScripts == 'once') {\n module.update.content(tabPath, cachedContent, false);\n }\n else {\n module.update.content(tabPath, cachedContent);\n }\n settings.onLoad.call($tab[0], tabPath, parameterArray, historyEvent);\n }\n else if(existingRequest) {\n module.set.loading(tabPath);\n module.debug('Content is already loading', fullTabPath);\n }\n else if($.api !== undefined) {\n requestSettings = $.extend(true, {}, settings.apiSettings, apiSettings);\n module.debug('Retrieving remote content', fullTabPath, requestSettings);\n module.set.loading(tabPath);\n $tab.api(requestSettings);\n }\n else {\n module.error(error.api);\n }\n }\n },\n\n activate: {\n all: function(tabPath) {\n module.activate.tab(tabPath);\n module.activate.navigation(tabPath);\n },\n tab: function(tabPath) {\n var\n $tab = module.get.tabElement(tabPath),\n $deactiveTabs = (settings.deactivate == 'siblings')\n ? $tab.siblings($tabs)\n : $tabs.not($tab),\n isActive = $tab.hasClass(className.active)\n ;\n module.verbose('Showing tab content for', $tab);\n if(!isActive) {\n $tab\n .addClass(className.active)\n ;\n $deactiveTabs\n .removeClass(className.active + ' ' + className.loading)\n ;\n if($tab.length > 0) {\n settings.onVisible.call($tab[0], tabPath);\n }\n }\n },\n navigation: function(tabPath) {\n var\n $navigation = module.get.navElement(tabPath),\n $deactiveNavigation = (settings.deactivate == 'siblings')\n ? $navigation.siblings($allModules)\n : $allModules.not($navigation),\n isActive = $navigation.hasClass(className.active)\n ;\n module.verbose('Activating tab navigation for', $navigation, tabPath);\n if(!isActive) {\n $navigation\n .addClass(className.active)\n ;\n $deactiveNavigation\n .removeClass(className.active + ' ' + className.loading)\n ;\n }\n }\n },\n\n deactivate: {\n all: function() {\n module.deactivate.navigation();\n module.deactivate.tabs();\n },\n navigation: function() {\n $allModules\n .removeClass(className.active)\n ;\n },\n tabs: function() {\n $tabs\n .removeClass(className.active + ' ' + className.loading)\n ;\n }\n },\n\n is: {\n tab: function(tabName) {\n return (tabName !== undefined)\n ? ( module.get.tabElement(tabName).length > 0 )\n : false\n ;\n }\n },\n\n get: {\n initialPath: function() {\n return $allModules.eq(0).data(metadata.tab) || $tabs.eq(0).data(metadata.tab);\n },\n path: function() {\n return $.address.value();\n },\n // adds default tabs to tab path\n defaultPathArray: function(tabPath) {\n return module.utilities.pathToArray( module.get.defaultPath(tabPath) );\n },\n defaultPath: function(tabPath) {\n var\n $defaultNav = $allModules.filter('[data-' + metadata.tab + '^=\"' + tabPath + '/\"]').eq(0),\n defaultTab = $defaultNav.data(metadata.tab) || false\n ;\n if( defaultTab ) {\n module.debug('Found default tab', defaultTab);\n if(recursionDepth < settings.maxDepth) {\n recursionDepth++;\n return module.get.defaultPath(defaultTab);\n }\n module.error(error.recursion);\n }\n else {\n module.debug('No default tabs found for', tabPath, $tabs);\n }\n recursionDepth = 0;\n return tabPath;\n },\n navElement: function(tabPath) {\n tabPath = tabPath || activeTabPath;\n return $allModules.filter('[data-' + metadata.tab + '=\"' + tabPath + '\"]');\n },\n tabElement: function(tabPath) {\n var\n $fullPathTab,\n $simplePathTab,\n tabPathArray,\n lastTab\n ;\n tabPath = tabPath || activeTabPath;\n tabPathArray = module.utilities.pathToArray(tabPath);\n lastTab = module.utilities.last(tabPathArray);\n $fullPathTab = $tabs.filter('[data-' + metadata.tab + '=\"' + tabPath + '\"]');\n $simplePathTab = $tabs.filter('[data-' + metadata.tab + '=\"' + lastTab + '\"]');\n return ($fullPathTab.length > 0)\n ? $fullPathTab\n : $simplePathTab\n ;\n },\n tab: function() {\n return activeTabPath;\n }\n },\n\n utilities: {\n filterArray: function(keepArray, removeArray) {\n return $.grep(keepArray, function(keepValue) {\n return ( $.inArray(keepValue, removeArray) == -1);\n });\n },\n last: function(array) {\n return $.isArray(array)\n ? array[ array.length - 1]\n : false\n ;\n },\n pathToArray: function(pathName) {\n if(pathName === undefined) {\n pathName = activeTabPath;\n }\n return typeof pathName == 'string'\n ? pathName.split('/')\n : [pathName]\n ;\n },\n arrayToPath: function(pathArray) {\n return $.isArray(pathArray)\n ? pathArray.join('/')\n : false\n ;\n }\n },\n\n setting: function(name, value) {\n module.debug('Changing setting', name, value);\n if( $.isPlainObject(name) ) {\n $.extend(true, settings, name);\n }\n else if(value !== undefined) {\n if($.isPlainObject(settings[name])) {\n $.extend(true, settings[name], value);\n }\n else {\n settings[name] = value;\n }\n }\n else {\n return settings[name];\n }\n },\n internal: function(name, value) {\n if( $.isPlainObject(name) ) {\n $.extend(true, module, name);\n }\n else if(value !== undefined) {\n module[name] = value;\n }\n else {\n return module[name];\n }\n },\n debug: function() {\n if(!settings.silent && settings.debug) {\n if(settings.performance) {\n module.performance.log(arguments);\n }\n else {\n module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n module.debug.apply(console, arguments);\n }\n }\n },\n verbose: function() {\n if(!settings.silent && settings.verbose && settings.debug) {\n if(settings.performance) {\n module.performance.log(arguments);\n }\n else {\n module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n module.verbose.apply(console, arguments);\n }\n }\n },\n error: function() {\n if(!settings.silent) {\n module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n module.error.apply(console, arguments);\n }\n },\n performance: {\n log: function(message) {\n var\n currentTime,\n executionTime,\n previousTime\n ;\n if(settings.performance) {\n currentTime = new Date().getTime();\n previousTime = time || currentTime;\n executionTime = currentTime - previousTime;\n time = currentTime;\n performance.push({\n 'Name' : message[0],\n 'Arguments' : [].slice.call(message, 1) || '',\n 'Element' : element,\n 'Execution Time' : executionTime\n });\n }\n clearTimeout(module.performance.timer);\n module.performance.timer = setTimeout(module.performance.display, 500);\n },\n display: function() {\n var\n title = settings.name + ':',\n totalTime = 0\n ;\n time = false;\n clearTimeout(module.performance.timer);\n $.each(performance, function(index, data) {\n totalTime += data['Execution Time'];\n });\n title += ' ' + totalTime + 'ms';\n if(moduleSelector) {\n title += ' \\'' + moduleSelector + '\\'';\n }\n if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n console.groupCollapsed(title);\n if(console.table) {\n console.table(performance);\n }\n else {\n $.each(performance, function(index, data) {\n console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n });\n }\n console.groupEnd();\n }\n performance = [];\n }\n },\n invoke: function(query, passedArguments, context) {\n var\n object = instance,\n maxDepth,\n found,\n response\n ;\n passedArguments = passedArguments || queryArguments;\n context = element || context;\n if(typeof query == 'string' && object !== undefined) {\n query = query.split(/[\\. ]/);\n maxDepth = query.length - 1;\n $.each(query, function(depth, value) {\n var camelCaseValue = (depth != maxDepth)\n ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n : query\n ;\n if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n object = object[camelCaseValue];\n }\n else if( object[camelCaseValue] !== undefined ) {\n found = object[camelCaseValue];\n return false;\n }\n else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n object = object[value];\n }\n else if( object[value] !== undefined ) {\n found = object[value];\n return false;\n }\n else {\n module.error(error.method, query);\n return false;\n }\n });\n }\n if ( $.isFunction( found ) ) {\n response = found.apply(context, passedArguments);\n }\n else if(found !== undefined) {\n response = found;\n }\n if($.isArray(returnedValue)) {\n returnedValue.push(response);\n }\n else if(returnedValue !== undefined) {\n returnedValue = [returnedValue, response];\n }\n else if(response !== undefined) {\n returnedValue = response;\n }\n return found;\n }\n };\n if(methodInvoked) {\n if(instance === undefined) {\n module.initialize();\n }\n module.invoke(query);\n }\n else {\n if(instance !== undefined) {\n instance.invoke('destroy');\n }\n module.initialize();\n }\n })\n ;\n return (returnedValue !== undefined)\n ? returnedValue\n : this\n ;\n\n};\n\n// shortcut for tabbed content with no defined navigation\n$.tab = function() {\n $(window).tab.apply(this, arguments);\n};\n\n$.fn.tab.settings = {\n\n name : 'Tab',\n namespace : 'tab',\n\n silent : false,\n debug : false,\n verbose : false,\n performance : true,\n\n auto : false, // uses pjax style endpoints fetching content from same url with remote-content headers\n history : false, // use browser history\n historyType : 'hash', // #/ or html5 state\n path : false, // base path of url\n\n context : false, // specify a context that tabs must appear inside\n childrenOnly : false, // use only tabs that are children of context\n maxDepth : 25, // max depth a tab can be nested\n\n deactivate : 'siblings', // whether tabs should deactivate sibling menu elements or all elements initialized together\n\n alwaysRefresh : false, // load tab content new every tab click\n cache : true, // cache the content requests to pull locally\n cacheType : 'response', // Whether to cache exact response, or to html cache contents after scripts execute\n ignoreFirstLoad : false, // don't load remote content on first load\n\n apiSettings : false, // settings for api call\n evaluateScripts : 'once', // whether inline scripts should be parsed (true/false/once). Once will not re-evaluate on cached content\n\n onFirstLoad : function(tabPath, parameterArray, historyEvent) {}, // called first time loaded\n onLoad : function(tabPath, parameterArray, historyEvent) {}, // called on every load\n onVisible : function(tabPath, parameterArray, historyEvent) {}, // called every time tab visible\n onRequest : function(tabPath, parameterArray, historyEvent) {}, // called ever time a tab beings loading remote content\n\n templates : {\n determineTitle: function(tabArray) {} // returns page title for path\n },\n\n error: {\n api : 'You attempted to load content without API module',\n method : 'The method you called is not defined',\n missingTab : 'Activated tab cannot be found. Tabs are case-sensitive.',\n noContent : 'The tab you specified is missing a content url.',\n path : 'History enabled, but no path was specified',\n recursion : 'Max recursive depth reached',\n legacyInit : 'onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.',\n legacyLoad : 'onTabLoad has been renamed to onLoad in 2.0. Please adjust your code',\n state : 'History requires Asual\\'s Address library '\n },\n\n metadata : {\n tab : 'tab',\n loaded : 'loaded',\n promise: 'promise'\n },\n\n className : {\n loading : 'loading',\n active : 'active'\n },\n\n selector : {\n tabs : '.ui.tab',\n ui : '.ui'\n }\n\n};\n\n})( jQuery, window, document );\n"]}