YUI.add("pjax-base",function(r,e){var o=r.config.win,t=r.ClassNameManager.getClassName("pjax"),s="navigate";function a(){}a.prototype={initializer:function(){this.publish(s,{defaultFn:this._defNavigateFn}),this.get("html5")&&this._pjaxBindUI()},destructor:function(){this._pjaxEvents&&this._pjaxEvents.detach()},navigate:function(e,t){return e=this._resolveURL(e),!(!this._navigate(e,t)&&(this._hasSameOrigin(e)?!this.get("allowFallThrough")||(o.location=e,0):(r.error("Security error: The new URL must be of the same origin as the current URL."),1)))},_isLinkSameOrigin:function(e){var t=r.getLocation(),a=t.protocol,i=t.hostname,t=parseInt(t.port,10)||null;return e.get("protocol")===a&&e.get("hostname")===i&&(i=parseInt(e.get("port"),10)||null,"http:"===a?(t=t||80,i=i||80):"https:"===a&&(t=t||443,i=i||443),i===t)},_navigate:function(e,t){if(e=this._upgradeURL(e),!this.hasRoute(e))return!1;t=r.merge(t,{url:e});var i,a=this._getURL(),n=e.replace(/(#.*)$/,function(e,t,a){return i=t,e.substring(a)});if(i&&n===a.replace(/#.*$/,"")){if(!this.get("navigateOnHash"))return!1;t.hash=i}return"replace"in t||(t.replace=e===a),this.get("html5")||t.force?this.fire(s,t):o&&(t.replace?o.location.replace(e):o.location=e),!0},_pjaxBindUI:function(){this._pjaxEvents||(this._pjaxEvents=r.one("body").delegate("click",this._onLinkClick,this.get("linkSelector"),this))},_defNavigateFn:function(e){this[e.replace?"replace":"save"](e.url),o&&this.get("scrollToTop")&&setTimeout(function(){o.scroll(0,0)},1)},_onLinkClick:function(e){var t;1!==e.button||e.ctrlKey||e.metaKey||"A"===(t=e.currentTarget).get("tagName").toUpperCase()&&this._isLinkSameOrigin(t)&&(t=t.get("href"))&&this._navigate(t,{originEvent:e})&&e.preventDefault()}},a.ATTRS={linkSelector:{value:"a."+t,writeOnce:"initOnly"},navigateOnHash:{value:!1},scrollToTop:{value:!0},allowFallThrough:{value:!0}},r.PjaxBase=a},"patched-v3.18.7",{requires:["classnamemanager","node-event-delegate","router"]});