File: /home/accemeff/vendor/craftcms/cms/lib/yii2-pjax/jquery.pjax.js.map
{"version":3,"sources":["jquery.pjax.js"],"names":["$","fnPjax","selector","container","options","optionsFor","handler","event","opts","extend","history","this","attr","handleClick","removeClass","off","on","link","currentTarget","$link","parseInt","data","tagName","toUpperCase","which","metaKey","ctrlKey","shiftKey","altKey","location","protocol","hostname","href","indexOf","stripHash","isDefaultPrevented","defaults","url","target","clickEvent","Event","trigger","pjax","preventDefault","handleSubmit","result","form","$form","type","undefined","window","FormData","processData","contentType","find","length","serializeArray","ajaxSettings","isFunction","hash","parseURL","containerType","timeoutTimer","context","fire","args","props","relatedTarget","isArray","grep","obj","name","push","value","_pjax","beforeSend","xhr","settings","timeout","setRequestHeader","ieRedirectCompatibility","ua","navigator","userAgent","setTimeout","abort","requestUrl","stripInternalParams","complete","textStatus","clearTimeout","error","errorThrown","extractContainer","redirect","status","allowed","replaceRedirect","locationReplace","pushRedirect","pushState","replace","success","previousState","state","currentVersion","version","latestVersion","getResponseHeader","contents","id","uniqueId","title","fragment","cache","replaceState","contains","document","activeElement","blur","e","html","autofocusEl","last","focus","scripts","existingScripts","i","next","script","src","filter","getScript","done","fail","head","appendChild","append","call","executeScriptTags","links","existingLinks","each","alreadyLoadedLinks","loadLinkTags","scrollTo","decodeURIComponent","slice","getElementById","getElementsByName","offset","top","scrollOffset","scrollTop","readyState","skipOuterContainers","abortXHR","ajax","cacheMapping","cacheBackStack","trimCacheStack","cacheForwardStack","maxCacheLength","cachePush","cloneContents","pjaxReload","initialPop","initialURL","initialState","onPjaxPopstate","direction","containerSelector","pushStack","popStack","pop","cachePop","popstateEvent","beforeReplaceEvent","offsetHeight","fallbackPjax","method","action","style","toLowerCase","split","index","pair","key","body","submit","onreadystatechange","noop","Date","getTime","cloned","clone","_data","search","a","createElement","isPlainObject","findAll","elems","add","parseHTML","$head","$body","fullDocument","test","serverUrl","match","text","$fragment","first","not","is","remove","trim","stack","shift","findVersion","enable","fn","disable","click","reload","dataType","inAr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,KAAKuL,OAAS,WAAa/K,OAAOrB,SAASoM,UAE7CjO,EAAEkD,QAAQnC,IAAI,gBAAiB0J,GAM7BzK,EAAEO,MAAM2D,OAASlE,EAAEmO,QAAQ,QAASnO,EAAEO,MAAM2D,OAAS,EACvDlE,EAAEO,MAAM2D,MAAMM,KAAK,SACR,UAAWxE,EAAEwC,MAAM4L,WAC9BpO,EAAEO,MAAM8N,QAAQ,SAIlBrO,EAAEsO,QAAQ5L,KACRQ,OAAOxC,SAAWwC,OAAOxC,QAAQ0F,WAAalD,OAAOxC,QAAQyG,eAE5DjC,UAAUC,UAAU+H,MAAM,6DAEzBlN,EAAEsO,QAAQ5L,KACZmL,IAEAE,IAh/BF,CAm/BGQ","file":"jquery.pjax.js","sourcesContent":["/*!\n * Copyright 2012, Chris Wanstrath\n * Released under the MIT License\n * https://github.com/defunkt/jquery-pjax\n */\n\n(function($){\n\n// When called on a container with a selector, fetches the href with\n// ajax into the container or with the data-pjax attribute on the link\n// itself.\n//\n// Tries to make sure the back button and ctrl+click work the way\n// you'd expect.\n//\n// Exported as $.fn.pjax\n//\n// Accepts a jQuery ajax options object that may include these\n// pjax specific options:\n//\n//\n// container - String selector for the element where to place the response body.\n// push - Whether to pushState the URL. Defaults to true (of course).\n// replace - Want to use replaceState instead? That's cool.\n// history - Work with window.history. Defaults to true\n// cache - Whether to cache pages HTML. Defaults to true\n// pushRedirect - Whether to add a browser history entry upon redirect. Defaults to false.\n// replaceRedirect - Whether to replace URL without adding a browser history entry upon redirect. Defaults to true.\n// skipOuterContainers - When pjax containers are nested and this option is true,\n// the closest pjax block will handle the event. Otherwise, the top\n// container will handle the event. Defaults to false.\n// ieRedirectCompatibility - Whether to add `X-Ie-Redirect-Compatibility` header for the request on IE.\n// See https://github.com/yiisoft/jquery-pjax/issues/37\n//\n// For convenience the second parameter can be either the container or\n// the options object.\n//\n// Returns the jQuery object\nfunction fnPjax(selector, container, options) {\n options = optionsFor(container, options)\n var handler = function(event) {\n var opts = options\n if (!opts.container) {\n opts = $.extend({history: true}, options)\n opts.container = $(this).attr('data-pjax')\n }\n handleClick(event, opts)\n }\n $(selector).removeClass('data-pjax');\n return this\n .off('click.pjax', selector, handler)\n .on('click.pjax', selector, handler);\n}\n\n// Public: pjax on click handler\n//\n// Exported as $.pjax.click.\n//\n// event - \"click\" jQuery.Event\n// options - pjax options\n//\n// If the click event target has 'data-pjax=\"0\"' attribute, the event is ignored, and no pjax call is made.\n//\n// Examples\n//\n// $(document).on('click', 'a', $.pjax.click)\n// // is the same as\n// $(document).pjax('a')\n//\n// Returns nothing.\nfunction handleClick(event, container, options) {\n options = optionsFor(container, options)\n\n var link = event.currentTarget\n var $link = $(link)\n\n // Ignore links with data-pjax=\"0\"\n if (parseInt($link.data('pjax')) === 0) {\n return\n }\n\n if (link.tagName.toUpperCase() !== 'A')\n throw \"$.fn.pjax or $.pjax.click requires an anchor element\"\n\n // Middle click, cmd click, and ctrl click should open\n // links in a new tab as normal.\n if ( event.which > 1 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey )\n return\n\n // Ignore cross origin links\n if ( location.protocol !== link.protocol || location.hostname !== link.hostname )\n return\n\n // Ignore case when a hash is being tacked on the current URL\n if ( link.href.indexOf('#') > -1 && stripHash(link) == stripHash(location) )\n return\n\n // Ignore event with default prevented\n if (event.isDefaultPrevented())\n return\n\n var defaults = {\n url: link.href,\n container: $link.attr('data-pjax'),\n target: link\n }\n\n var opts = $.extend({}, defaults, options)\n var clickEvent = $.Event('pjax:click')\n $link.trigger(clickEvent, [opts])\n\n if (!clickEvent.isDefaultPrevented()) {\n pjax(opts)\n event.preventDefault()\n $link.trigger('pjax:clicked', [opts])\n }\n}\n\n// Public: pjax on form submit handler\n//\n// Exported as $.pjax.submit\n//\n// event - \"click\" jQuery.Event\n// options - pjax options\n//\n// Examples\n//\n// $(document).on('submit', 'form', function(event) {\n// $.pjax.submit(event, '[data-pjax-container]')\n// })\n//\n// Returns nothing.\nfunction handleSubmit(event, container, options) {\n // check result of previous handlers\n if (event.result === false)\n return false;\n\n options = optionsFor(container, options)\n\n var form = event.currentTarget\n var $form = $(form)\n\n if (form.tagName.toUpperCase() !== 'FORM')\n throw \"$.pjax.submit requires a form element\"\n\n var defaults = {\n type: ($form.attr('method') || 'GET').toUpperCase(),\n url: $form.attr('action'),\n container: $form.attr('data-pjax'),\n target: form\n }\n\n if (defaults.type !== 'GET' && window.FormData !== undefined) {\n defaults.data = new FormData(form)\n defaults.processData = false\n defaults.contentType = false\n } else {\n // Can't handle file uploads, exit\n if ($form.find(':file').length) {\n return\n }\n\n // Fallback to manually serializing the fields\n defaults.data = $form.serializeArray()\n }\n\n pjax($.extend({}, defaults, options))\n\n event.preventDefault()\n}\n\n// Loads a URL with ajax, puts the response body inside a container,\n// then pushState()'s the loaded URL.\n//\n// Works just like $.ajax in that it accepts a jQuery ajax\n// settings object (with keys like url, type, data, etc).\n//\n// Accepts these extra keys:\n//\n// container - String selector for where to stick the response body.\n// push - Whether to pushState the URL. Defaults to true (of course).\n// replace - Want to use replaceState instead? That's cool.\n//\n// Use it just like $.ajax:\n//\n// var xhr = $.pjax({ url: this.href, container: '#main' })\n// console.log( xhr.readyState )\n//\n// Returns whatever $.ajax returns.\nfunction pjax(options) {\n options = $.extend(true, {}, $.ajaxSettings, pjax.defaults, options)\n\n if ($.isFunction(options.url)) {\n options.url = options.url()\n }\n\n var hash = parseURL(options.url).hash\n\n var containerType = $.type(options.container)\n if (containerType !== 'string') {\n throw \"expected string value for 'container' option; got \" + containerType\n }\n var context = options.context = $(options.container)\n if (!context.length) {\n throw \"the container selector '\" + options.container + \"' did not match anything\"\n }\n\n // We want the browser to maintain two separate internal caches: one\n // for pjax'd partial page loads and one for normal page loads.\n // Without adding this secret parameter, some browsers will often\n // confuse the two.\n if (!options.data) options.data = {}\n if ($.isArray(options.data)) {\n options.data = $.grep(options.data, function(obj) { return '_pjax' !== obj.name })\n options.data.push({name: '_pjax', value: options.container})\n } else {\n options.data._pjax = options.container\n }\n\n function fire(type, args, props) {\n if (!props) props = {}\n props.relatedTarget = options.target\n var event = $.Event(type, props)\n context.trigger(event, args)\n return !event.isDefaultPrevented()\n }\n\n var timeoutTimer\n\n options.beforeSend = function(xhr, settings) {\n // No timeout for non-GET requests\n // Its not safe to request the resource again with a fallback method.\n if (settings.type !== 'GET') {\n settings.timeout = 0\n }\n\n xhr.setRequestHeader('X-PJAX', 'true')\n xhr.setRequestHeader('X-PJAX-Container', options.container)\n\n if (settings.ieRedirectCompatibility) {\n var ua = window.navigator.userAgent\n if (ua.indexOf('MSIE ') > 0 || ua.indexOf('Trident/') > 0 || ua.indexOf('Edge/') > 0) {\n xhr.setRequestHeader('X-Ie-Redirect-Compatibility', 'true')\n }\n }\n\n if (!fire('pjax:beforeSend', [xhr, settings]))\n return false\n\n if (settings.timeout > 0) {\n timeoutTimer = setTimeout(function() {\n if (fire('pjax:timeout', [xhr, options]))\n xhr.abort('timeout')\n }, settings.timeout)\n\n // Clear timeout setting so jquerys internal timeout isn't invoked\n settings.timeout = 0\n }\n\n var url = parseURL(settings.url)\n if (hash) url.hash = hash\n options.requestUrl = stripInternalParams(url)\n }\n\n options.complete = function(xhr, textStatus) {\n if (timeoutTimer)\n clearTimeout(timeoutTimer)\n\n fire('pjax:complete', [xhr, textStatus, options])\n\n fire('pjax:end', [xhr, options])\n }\n\n options.error = function(xhr, textStatus, errorThrown) {\n var container = extractContainer(\"\", xhr, options)\n // Check redirect status code\n var redirect = xhr.status >= 301 && xhr.status <= 303\n // Do not fire pjax::error in case of redirect\n var allowed = redirect || fire('pjax:error', [xhr, textStatus, errorThrown, options])\n if (redirect || options.type == 'GET' && textStatus !== 'abort' && allowed) {\n if (options.replaceRedirect) {\n locationReplace(container.url)\n } else if (options.pushRedirect) {\n window.history.pushState(null, \"\", container.url)\n window.location.replace(container.url)\n }\n }\n }\n\n options.success = function(data, status, xhr) {\n var previousState = pjax.state\n\n // If $.pjax.defaults.version is a function, invoke it first.\n // Otherwise it can be a static string.\n var currentVersion = typeof $.pjax.defaults.version === 'function' ?\n $.pjax.defaults.version() :\n $.pjax.defaults.version\n\n var latestVersion = xhr.getResponseHeader('X-PJAX-Version')\n\n var container = extractContainer(data, xhr, options)\n\n var url = parseURL(container.url)\n if (hash) {\n url.hash = hash\n container.url = url.href\n }\n\n // If there is a layout version mismatch, hard load the new url\n if (currentVersion && latestVersion && currentVersion !== latestVersion) {\n locationReplace(container.url)\n return\n }\n\n // If the new response is missing a body, hard load the page\n if (!container.contents) {\n locationReplace(container.url)\n return\n }\n\n pjax.state = {\n id: options.id || uniqueId(),\n url: container.url,\n title: container.title,\n container: options.container,\n fragment: options.fragment,\n timeout: options.timeout,\n cache: options.cache\n }\n\n if (options.history && (options.push || options.replace)) {\n window.history.replaceState(pjax.state, container.title, container.url)\n }\n\n // Only blur the focus if the focused element is within the container.\n var blurFocus = $.contains(context, document.activeElement)\n\n // Clear out any focused controls before inserting new page contents.\n if (blurFocus) {\n try {\n document.activeElement.blur()\n } catch (e) { /* ignore */ }\n }\n\n if (container.title) document.title = container.title\n\n fire('pjax:beforeReplace', [container.contents, options], {\n state: pjax.state,\n previousState: previousState\n })\n context.html(container.contents)\n\n // FF bug: Won't autofocus fields that are inserted via JS.\n // This behavior is incorrect. So if theres no current focus, autofocus\n // the last field.\n //\n // http://www.w3.org/html/wg/drafts/html/master/forms.html\n var autofocusEl = context.find('input[autofocus], textarea[autofocus]').last()[0]\n if (autofocusEl && document.activeElement !== autofocusEl) {\n autofocusEl.focus()\n }\n\n executeScriptTags(container.scripts, context)\n loadLinkTags(container.links)\n\n \n if (typeof options.scrollTo === 'function') {\n var scrollTo = options.scrollTo(context, hash)\n } else {\n var scrollTo = options.scrollTo\n // Ensure browser scrolls to the element referenced by the URL anchor\n if (hash || true === scrollTo) {\n var name = decodeURIComponent(hash.slice(1))\n var target = true === scrollTo ? context : (document.getElementById(name) || document.getElementsByName(name)[0])\n if (target) scrollTo = $(target).offset().top\n }\n }\n\n if (typeof options.scrollOffset === 'function')\n var scrollOffset = options.scrollOffset(scrollTo)\n else \n var scrollOffset = options.scrollOffset\n \n if (typeof scrollTo === 'number') {\n scrollTo = scrollTo + scrollOffset;\n if (scrollTo < 0) scrollTo = 0\n $(window).scrollTop(scrollTo)\n }\n\n fire('pjax:success', [data, status, xhr, options])\n }\n\n\n // Initialize pjax.state for the initial page load. Assume we're\n // using the container and options of the link we're loading for the\n // back button to the initial page. This ensures good back button\n // behavior.\n if (!pjax.state) {\n pjax.state = {\n id: uniqueId(),\n url: window.location.href,\n title: document.title,\n container: options.container,\n fragment: options.fragment,\n timeout: options.timeout,\n cache: options.cache\n }\n if (options.history)\n window.history.replaceState(pjax.state, document.title)\n }\n\n // New request can not override the existing one when option skipOuterContainers is set to true\n if (pjax.xhr && pjax.xhr.readyState < 4 && pjax.options.skipOuterContainers) {\n return\n }\n // Cancel the current request if we're already pjaxing\n abortXHR(pjax.xhr)\n\n pjax.options = options\n var xhr = pjax.xhr = $.ajax(options)\n\n if (xhr.readyState > 0) {\n if (options.history && (options.push && !options.replace)) {\n // Cache current container element before replacing it\n cachePush(pjax.state.id, [options.container, cloneContents(context)])\n\n window.history.pushState(null, \"\", options.requestUrl)\n }\n\n fire('pjax:start', [xhr, options])\n fire('pjax:send', [xhr, options])\n }\n\n return pjax.xhr\n}\n\n// Public: Reload current page with pjax.\n//\n// Returns whatever $.pjax returns.\nfunction pjaxReload(container, options) {\n var defaults = {\n url: window.location.href,\n push: false,\n replace: true,\n scrollTo: false\n }\n\n return pjax($.extend(defaults, optionsFor(container, options)))\n}\n\n// Internal: Hard replace current state with url.\n//\n// Work for around WebKit\n// https://bugs.webkit.org/show_bug.cgi?id=93506\n//\n// Returns nothing.\nfunction locationReplace(url) {\n if (!pjax.options.history) return\n window.history.replaceState(null, \"\", pjax.state.url)\n window.location.replace(url)\n}\n\n\nvar initialPop = true\nvar initialURL = window.location.href\nvar initialState = window.history.state\n\n// Initialize $.pjax.state if possible\n// Happens when reloading a page and coming forward from a different\n// session history.\nif (initialState && initialState.container) {\n pjax.state = initialState\n}\n\n// Non-webkit browsers don't fire an initial popstate event\nif ('state' in window.history) {\n initialPop = false\n}\n\n// popstate handler takes care of the back and forward buttons\n//\n// You probably shouldn't use pjax on pages with other pushState\n// stuff yet.\nfunction onPjaxPopstate(event) {\n\n // Hitting back or forward should override any pending PJAX request.\n if (!initialPop) {\n abortXHR(pjax.xhr)\n }\n\n var previousState = pjax.state\n var state = event.state\n var direction\n\n if (state && state.container) {\n // When coming forward from a separate history session, will get an\n // initial pop with a state we are already at. Skip reloading the current\n // page.\n if (initialPop && initialURL == state.url) return\n\n if (previousState) {\n // If popping back to the same state, just skip.\n // Could be clicking back from hashchange rather than a pushState.\n if (previousState.id === state.id) return\n\n // Since state IDs always increase, we can deduce the navigation direction\n direction = previousState.id < state.id ? 'forward' : 'back'\n }\n\n var cache = cacheMapping[state.id] || []\n var containerSelector = cache[0] || state.container\n var container = $(containerSelector), contents = cache[1]\n\n if (container.length) {\n var options = {\n id: state.id,\n url: state.url,\n container: containerSelector,\n push: false,\n fragment: state.fragment,\n timeout: state.timeout,\n cache: state.cache,\n scrollTo: false\n }\n\n if (previousState && options.cache) {\n // Cache current container before replacement and inform the\n // cache which direction the history shifted.\n cachePop(direction, previousState.id, [containerSelector, cloneContents(container)])\n }\n\n var popstateEvent = $.Event('pjax:popstate', {\n state: state,\n direction: direction\n })\n container.trigger(popstateEvent)\n\n if (contents) {\n container.trigger('pjax:start', [null, options])\n\n pjax.state = state\n if (state.title) document.title = state.title\n var beforeReplaceEvent = $.Event('pjax:beforeReplace', {\n state: state,\n previousState: previousState\n })\n container.trigger(beforeReplaceEvent, [contents, options])\n container.html(contents)\n\n container.trigger('pjax:end', [null, options])\n } else {\n pjax(options)\n }\n\n // Force reflow/relayout before the browser tries to restore the\n // scroll position.\n container[0].offsetHeight // eslint-disable-line no-unused-expressions\n } else {\n locationReplace(location.href)\n }\n }\n initialPop = false\n}\n\n// Fallback version of main pjax function for browsers that don't\n// support pushState.\n//\n// Returns nothing since it retriggers a hard form submission.\nfunction fallbackPjax(options) {\n var url = $.isFunction(options.url) ? options.url() : options.url,\n method = options.type ? options.type.toUpperCase() : 'GET'\n\n var form = $('<form>', {\n method: method === 'GET' ? 'GET' : 'POST',\n action: url,\n style: 'display:none'\n })\n\n if (method !== 'GET' && method !== 'POST') {\n form.append($('<input>', {\n type: 'hidden',\n name: '_method',\n value: method.toLowerCase()\n }))\n }\n\n var data = options.data\n if (typeof data === 'string') {\n $.each(data.split('&'), function(index, value) {\n var pair = value.split('=')\n form.append($('<input>', {type: 'hidden', name: pair[0], value: pair[1]}))\n })\n } else if ($.isArray(data)) {\n $.each(data, function(index, value) {\n form.append($('<input>', {type: 'hidden', name: value.name, value: value.value}))\n })\n } else if (typeof data === 'object') {\n var key\n for (key in data)\n form.append($('<input>', {type: 'hidden', name: key, value: data[key]}))\n }\n\n $(document.body).append(form)\n form.submit()\n}\n\n// Internal: Abort an XmlHttpRequest if it hasn't been completed,\n// also removing its event handlers.\nfunction abortXHR(xhr) {\n if ( xhr && xhr.readyState < 4) {\n xhr.onreadystatechange = $.noop\n xhr.abort()\n }\n}\n\n// Internal: Generate unique id for state object.\n//\n// Use a timestamp instead of a counter since ids should still be\n// unique across page loads.\n//\n// Returns Number.\nfunction uniqueId() {\n return (new Date).getTime()\n}\n\nfunction cloneContents(container) {\n var cloned = container.clone()\n // Unmark script tags as already being eval'd so they can get executed again\n // when restored from cache. HAXX: Uses jQuery internal method.\n cloned.find('script').each(function(){\n if (!this.src) $._data(this, 'globalEval', false)\n })\n return cloned.contents()\n}\n\n// Internal: Strip internal query params from parsed URL.\n//\n// Returns sanitized url.href String.\nfunction stripInternalParams(url) {\n url.search = url.search.replace(/([?&])(_pjax|_)=[^&]*/g, '').replace(/^&/, '')\n return url.href.replace(/\\?($|#)/, '$1')\n}\n\n// Internal: Parse URL components and returns a Locationish object.\n//\n// url - String URL\n//\n// Returns HTMLAnchorElement that acts like Location.\nfunction parseURL(url) {\n var a = document.createElement('a')\n a.href = url\n return a\n}\n\n// Internal: Return the `href` component of given URL object with the hash\n// portion removed.\n//\n// location - Location or HTMLAnchorElement\n//\n// Returns String\nfunction stripHash(location) {\n return location.href.replace(/#.*/, '')\n}\n\n// Internal: Build options Object for arguments.\n//\n// For convenience the first parameter can be either the container or\n// the options object.\n//\n// Examples\n//\n// optionsFor('#container')\n// // => {container: '#container'}\n//\n// optionsFor('#container', {push: true})\n// // => {container: '#container', push: true}\n//\n// optionsFor({container: '#container', push: true})\n// // => {container: '#container', push: true}\n//\n// Returns options Object.\nfunction optionsFor(container, options) {\n if (container && options) {\n options = $.extend({}, options)\n options.container = container\n return options\n } else if ($.isPlainObject(container)) {\n return container\n } else {\n return {container: container}\n }\n}\n\n// Internal: Filter and find all elements matching the selector.\n//\n// Where $.fn.find only matches descendants, findAll will test all the\n// top level elements in the jQuery object as well.\n//\n// elems - jQuery object of Elements\n// selector - String selector to match\n//\n// Returns a jQuery object.\nfunction findAll(elems, selector) {\n return elems.filter(selector).add(elems.find(selector))\n}\n\nfunction parseHTML(html) {\n return $.parseHTML(html, document, true)\n}\n\n// Internal: Extracts container and metadata from response.\n//\n// 1. Extracts X-PJAX-URL header if set\n// 2. Extracts inline <title> tags\n// 3. Builds response Element and extracts fragment if set\n//\n// data - String response data\n// xhr - XHR response\n// options - pjax options Object\n//\n// Returns an Object with url, title, and contents keys.\nfunction extractContainer(data, xhr, options) {\n var obj = {}, fullDocument = /<html/i.test(data)\n\n // Prefer X-PJAX-URL header if it was set, otherwise fallback to\n // using the original requested url.\n var serverUrl = xhr.getResponseHeader('X-PJAX-URL')\n obj.url = serverUrl ? stripInternalParams(parseURL(serverUrl)) : options.requestUrl\n\n var $head, $body\n // Attempt to parse response html into elements\n if (fullDocument) {\n $body = $(parseHTML(data.match(/<body[^>]*>([\\s\\S.]*)<\\/body>/i)[0]))\n var head = data.match(/<head[^>]*>([\\s\\S.]*)<\\/head>/i)\n $head = head != null ? $(parseHTML(head[0])) : $body\n } else {\n $head = $body = $(parseHTML(data))\n }\n\n // If response data is empty, return fast\n if ($body.length === 0)\n return obj\n\n // If there's a <title> tag in the header, use it as\n // the page's title.\n obj.title = findAll($head, 'title').last().text()\n\n if (options.fragment) {\n var $fragment = $body\n // If they specified a fragment, look for it in the response\n // and pull it out.\n if (options.fragment !== 'body') {\n $fragment = findAll($fragment, options.fragment).first()\n }\n\n if ($fragment.length) {\n obj.contents = options.fragment === 'body' ? $fragment : $fragment.contents()\n\n // If there's no title, look for data-title and title attributes\n // on the fragment\n if (!obj.title)\n obj.title = $fragment.attr('title') || $fragment.data('title')\n }\n\n } else if (!fullDocument) {\n obj.contents = $body\n }\n\n // Clean up any <title> tags\n if (obj.contents) {\n // Remove any parent title elements\n obj.contents = obj.contents.not(function() { return $(this).is('title') })\n\n // Then scrub any titles from their descendants\n obj.contents.find('title').remove()\n\n // Gather all script elements\n obj.scripts = findAll(obj.contents, 'script').remove()\n obj.contents = obj.contents.not(obj.scripts)\n\n // Gather all link[href] elements\n obj.links = findAll(obj.contents, 'link[href]').remove()\n obj.contents = obj.contents.not(obj.links)\n }\n\n // Trim any whitespace off the title\n if (obj.title) obj.title = $.trim(obj.title)\n\n return obj\n}\n\n// Load an execute scripts using standard script request.\n//\n// Avoids jQuery's traditional $.getScript which does a XHR request and\n// globalEval.\n//\n// scripts - jQuery object of script Elements\n// context - jQuery object whose context is `document` and has a selector\n//\n// Returns nothing.\nfunction executeScriptTags(scripts, context) {\n if (!scripts) return\n\n var existingScripts = $('script[src]')\n\n var cb = function (next) {\n var src = this.src\n var matchedScripts = existingScripts.filter(function () {\n return this.src === src\n })\n\n if (matchedScripts.length) {\n next()\n return\n }\n\n if (src) {\n $.getScript(src).done(next).fail(next)\n document.head.appendChild(this)\n } else {\n context.append(this)\n next()\n }\n }\n\n var i = 0\n var next = function () {\n if (i >= scripts.length) {\n return\n }\n var script = scripts[i]\n i++\n cb.call(script, next)\n }\n next()\n}\n\n// Load an links using standard request.\n//\n// links - jQuery object of link Elements\n//\n// Returns nothing.\nfunction loadLinkTags(links) {\n if (!links) return\n\n var existingLinks = $('link[href]')\n\n links.each(function() {\n var href = this.href,\n alreadyLoadedLinks = existingLinks.filter(function() {\n return this.href === href\n })\n if (alreadyLoadedLinks.length) return\n\n document.head.appendChild(this)\n })\n}\n\n// Internal: History DOM caching class.\nvar cacheMapping = {}\nvar cacheForwardStack = []\nvar cacheBackStack = []\n\n// Push previous state id and container contents into the history\n// cache. Should be called in conjunction with `pushState` to save the\n// previous container contents.\n//\n// id - State ID Number\n// value - DOM Element to cache\n//\n// Returns nothing.\nfunction cachePush(id, value) {\n if (!pjax.options.cache) {\n return\n }\n cacheMapping[id] = value\n cacheBackStack.push(id)\n\n // Remove all entries in forward history stack after pushing a new page.\n trimCacheStack(cacheForwardStack, 0)\n\n // Trim back history stack to max cache length.\n trimCacheStack(cacheBackStack, pjax.defaults.maxCacheLength)\n}\n\n// Shifts cache from directional history cache. Should be\n// called on `popstate` with the previous state id and container\n// contents.\n//\n// direction - \"forward\" or \"back\" String\n// id - State ID Number\n// value - DOM Element to cache\n//\n// Returns nothing.\nfunction cachePop(direction, id, value) {\n var pushStack, popStack\n cacheMapping[id] = value\n\n if (direction === 'forward') {\n pushStack = cacheBackStack\n popStack = cacheForwardStack\n } else {\n pushStack = cacheForwardStack\n popStack = cacheBackStack\n }\n\n pushStack.push(id)\n id = popStack.pop()\n if (id) delete cacheMapping[id]\n\n // Trim whichever stack we just pushed to to max cache length.\n trimCacheStack(pushStack, pjax.defaults.maxCacheLength)\n}\n\n// Trim a cache stack (either cacheBackStack or cacheForwardStack) to be no\n// longer than the specified length, deleting cached DOM elements as necessary.\n//\n// stack - Array of state IDs\n// length - Maximum length to trim to\n//\n// Returns nothing.\nfunction trimCacheStack(stack, length) {\n while (stack.length > length)\n delete cacheMapping[stack.shift()]\n}\n\n// Public: Find version identifier for the initial page load.\n//\n// Returns String version or undefined.\nfunction findVersion() {\n return $('meta').filter(function() {\n var name = $(this).attr('http-equiv')\n return name && name.toUpperCase() === 'X-PJAX-VERSION'\n }).attr('content')\n}\n\n// Install pjax functions on $.pjax to enable pushState behavior.\n//\n// Does nothing if already enabled.\n//\n// Examples\n//\n// $.pjax.enable()\n//\n// Returns nothing.\nfunction enable() {\n $.fn.pjax = fnPjax\n $.pjax = pjax\n $.pjax.enable = $.noop\n $.pjax.disable = disable\n $.pjax.click = handleClick\n $.pjax.submit = handleSubmit\n $.pjax.reload = pjaxReload\n $.pjax.defaults = {\n\thistory: true,\n\tcache: true,\n timeout: 650,\n push: true,\n replace: false,\n type: 'GET',\n dataType: 'html',\n scrollTo: 0,\n scrollOffset: 0,\n maxCacheLength: 20,\n version: findVersion,\n pushRedirect: false,\n replaceRedirect: true,\n skipOuterContainers: false,\n ieRedirectCompatibility: true\n }\n $(window).on('popstate.pjax', onPjaxPopstate)\n}\n\n// Disable pushState behavior.\n//\n// This is the case when a browser doesn't support pushState. It is\n// sometimes useful to disable pushState for debugging on a modern\n// browser.\n//\n// Examples\n//\n// $.pjax.disable()\n//\n// Returns nothing.\nfunction disable() {\n $.fn.pjax = function() { return this }\n $.pjax = fallbackPjax\n $.pjax.enable = enable\n $.pjax.disable = $.noop\n $.pjax.click = $.noop\n $.pjax.submit = $.noop\n $.pjax.reload = function() { window.location.reload() }\n\n $(window).off('popstate.pjax', onPjaxPopstate)\n}\n\n\n// Add the state property to jQuery's event object so we can use it in\n// $(window).bind('popstate')\nif ($.event.props && $.inArray('state', $.event.props) < 0) {\n $.event.props.push('state')\n} else if (!('state' in $.Event.prototype)) {\n $.event.addProp('state')\n}\n\n// Is pjax supported by this browser?\n$.support.pjax =\n window.history && window.history.pushState && window.history.replaceState &&\n // pushState isn't reliable on iOS until 5.\n !navigator.userAgent.match(/((iPod|iPhone|iPad).+\\bOS\\s+[1-4]\\D|WebApps\\/.+CFNetwork)/)\n\nif ($.support.pjax) {\n enable()\n} else {\n disable()\n}\n\n})(jQuery)\n"]}