YUI.add("history-html5",function(s,t){var e=s.HistoryBase,o=s.Lang,a=s.config.win,i=s.config.useHistoryHTML5,n="popstate",l=e.SRC_REPLACE;function p(){p.superclass.constructor.apply(this,arguments)}s.extend(p,e,{_init:function(t){var e;try{e=a.history.state}catch(i){e=null}s.Object.isEmpty(e)&&(e=null),(t=t||{}).initialState&&"object"===o.type(t.initialState)&&"object"===o.type(e)?this._initialState=s.merge(t.initialState,e):this._initialState=e,s.on("popstate",this._onPopState,a,this),p.superclass._init.apply(this,arguments)},_storeState:function(t,e,i){t!==n&&a.history[t===l?"replaceState":"pushState"](e,i.title||s.config.doc.title||"",i.url||s.config.doc.URL),p.superclass._storeState.apply(this,arguments)},_onPopState:function(t){this._resolveChanges(n,t._event.state||null)}},{NAME:"historyhtml5",SRC_POPSTATE:n}),s.Node.DOM_EVENTS.popstate||(s.Node.DOM_EVENTS.popstate=1),s.HistoryHTML5=p,(!0===i||!1!==i&&e.html5)&&(s.History=p)},"patched-v3.18.4",{optional:["json"],requires:["event-base","history-base","node-base"]});