Comparing version 2.0.0-rc2 to 2.0.0-rc3
@@ -0,2 +1,15 @@ | ||
## [HEAD] | ||
> Unreleased | ||
- **Bugfix:** Don't convert same-path `PUSH` to `REPLACE` when `location.state` changes ([#179]) | ||
- **Bugfix:** Re-enable browser history on Chrome iOS ([#208]) | ||
- **Bugfix:** Properly support location descriptors in `history.createLocation` ([#200]) | ||
[HEAD]: https://github.com/rackt/history/compare/latest...HEAD | ||
[#179]: https://github.com/rackt/history/pull/179 | ||
[#208]: https://github.com/rackt/history/pull/208 | ||
[#200]: https://github.com/rackt/history/pull/200 | ||
## [v2.0.0-rc2] | ||
> Jan 9, 2016 | ||
@@ -3,0 +16,0 @@ - Add back deprecation warnings |
@@ -133,3 +133,3 @@ 'use strict'; | ||
if (nextPath === prevPath) nextLocation.action = REPLACE; | ||
if (nextPath === prevPath && deepEqual(location.state, nextLocation.state)) nextLocation.action = REPLACE; | ||
} | ||
@@ -136,0 +136,0 @@ |
@@ -64,7 +64,2 @@ 'use strict'; | ||
} | ||
// FIXME: Work around our browser history not working correctly on Chrome | ||
// iOS: https://github.com/rackt/react-router/issues/2565 | ||
if (ua.indexOf('CriOS') !== -1) { | ||
return false; | ||
} | ||
return window.history && 'pushState' in window.history; | ||
@@ -71,0 +66,0 @@ } |
@@ -90,4 +90,8 @@ 'use strict'; | ||
function createLocation() { | ||
return addBasename(history.createLocation.apply(history, arguments)); | ||
function createLocation(location) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args))); | ||
} | ||
@@ -94,0 +98,0 @@ |
@@ -118,4 +118,12 @@ 'use strict'; | ||
function createLocation() { | ||
return addQuery(history.createLocation.apply(history, arguments)); | ||
function createLocation(location) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args)); | ||
if (location.query) { | ||
fullLocation.query = location.query; | ||
} | ||
return addQuery(fullLocation); | ||
} | ||
@@ -122,0 +130,0 @@ |
@@ -156,3 +156,3 @@ 'use strict'; | ||
if (nextPath === prevPath) nextLocation.action = _Actions.REPLACE; | ||
if (nextPath === prevPath && _deepEqual2['default'](location.state, nextLocation.state)) nextLocation.action = _Actions.REPLACE; | ||
} | ||
@@ -159,0 +159,0 @@ |
@@ -65,7 +65,2 @@ 'use strict'; | ||
} | ||
// FIXME: Work around our browser history not working correctly on Chrome | ||
// iOS: https://github.com/rackt/react-router/issues/2565 | ||
if (ua.indexOf('CriOS') !== -1) { | ||
return false; | ||
} | ||
return window.history && 'pushState' in window.history; | ||
@@ -72,0 +67,0 @@ } |
@@ -106,4 +106,8 @@ 'use strict'; | ||
function createLocation() { | ||
return addBasename(history.createLocation.apply(history, arguments)); | ||
function createLocation(location) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args))); | ||
} | ||
@@ -110,0 +114,0 @@ |
@@ -134,4 +134,12 @@ 'use strict'; | ||
function createLocation() { | ||
return addQuery(history.createLocation.apply(history, arguments)); | ||
function createLocation(location) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args)); | ||
if (location.query) { | ||
fullLocation.query = location.query; | ||
} | ||
return addQuery(fullLocation); | ||
} | ||
@@ -138,0 +146,0 @@ |
The MIT License (MIT) | ||
Copyright (c) 2015 Michael Jackson | ||
Copyright (c) 2015-2016 Michael Jackson | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
@@ -1,11 +0,27 @@ | ||
var execSync = require('child_process').execSync | ||
var stat = require('fs').stat | ||
function exec(command) { | ||
execSync(command, { stdio: [0, 1, 2] }) | ||
} | ||
stat('lib', function (error, stat) { | ||
if (error || !stat.isDirectory()) { | ||
console.warn( | ||
'-'.repeat(79) + '\n' + | ||
'Built output not found. It looks like you might be attempting to install\n' + | ||
'history from GitHub. React Router sources need to be transpiled before use. We\n'+ | ||
'will now make a best-efforts attempt to transpile the code. This will only work\n' + | ||
'if your development environment is set up appropriately.\n' + | ||
'-'.repeat(79) | ||
) | ||
stat('lib', function (error, stat) { | ||
if (error || !stat.isDirectory()) | ||
exec('npm run build') | ||
try { | ||
var execSync = require('child_process').execSync | ||
execSync('npm run build', { stdio: [ 0, 1, 2 ] }) | ||
} catch (e) { | ||
console.error( | ||
'-'.repeat(79) + '\n' + | ||
'Failed to build history automatically. Please install history from npm, or\n' + | ||
'clone the repo locally and build the library manually.\n' + | ||
'-'.repeat(79) | ||
) | ||
throw(e) | ||
} | ||
} | ||
}) |
{ | ||
"name": "history", | ||
"version": "2.0.0-rc2", | ||
"version": "2.0.0-rc3", | ||
"description": "A minimal, functional history implementation for JavaScript", | ||
@@ -10,2 +10,3 @@ "files": [ | ||
"lib", | ||
"modules/*.js", | ||
"npm-scripts", | ||
@@ -15,2 +16,3 @@ "umd" | ||
"main": "lib/index", | ||
"jsnext:main": "es6/index", | ||
"repository": { | ||
@@ -17,0 +19,0 @@ "type": "git", |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.History=t():e.History=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(2),o=r(a),u=n(12),i=r(u),s=n(17),f=r(s);t.createHistory=f["default"];var c=n(18),l=r(c);t.createHashHistory=l["default"];var d=n(19),p=r(d);t.createMemoryHistory=p["default"];var h=n(22),g=r(h);t.useBasename=g["default"];var v=n(14),y=r(v);t.useBeforeUnload=y["default"];var m=n(15),w=r(m);t.useQueries=w["default"];var O=n(4),_=r(O);t.Actions=_["default"];var b=n(20),P=r(b);t.enableBeforeUnload=P["default"];var S=n(21),x=r(S);t.enableQueries=x["default"];var H=o["default"](i["default"],"Using createLocation without a history instance is deprecated; please use history.createLocation instead");t.createLocation=H},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){return function(){return e.apply(this,arguments)}}t.__esModule=!0;var o=n(1);r(o);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=i["default"](e),n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substring(a),t=t.substring(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substring(o),t=t.substring(0,o)),""===t&&(t="/"),{pathname:t,search:n,hash:r}}t.__esModule=!0;var o=n(1),u=(r(o),n(13)),i=r(u);t["default"]=a,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n="PUSH";t.PUSH=n;var r="REPLACE";t.REPLACE=r;var a="POP";t.POP=a,t["default"]={PUSH:n,REPLACE:r,POP:a}},function(e,t){"use strict";t.__esModule=!0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.canUseDOM=n},function(e,t){"use strict";function n(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function r(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)}function a(){return window.location.href.split("#")[1]||""}function o(e){window.location.replace(window.location.pathname+window.location.search+"#"+e)}function u(){return window.location.pathname+window.location.search+window.location.hash}function i(e){e&&window.history.go(e)}function s(e,t){t(window.confirm(e))}function f(){var e=navigator.userAgent;return-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone")?-1!==e.indexOf("CriOS")?!1:window.history&&"pushState"in window.history:!1}function c(){var e=navigator.userAgent;return-1===e.indexOf("Firefox")}t.__esModule=!0,t.addEventListener=n,t.removeEventListener=r,t.getHashPath=a,t.replaceHashPath=o,t.getWindowPath=u,t.go=i,t.getUserConfirmation=s,t.supportsHistory=f,t.supportsGoWithoutReloadUsingHash=c},function(e,t,n){"use strict";var r=function(e,t,n,r,a,o,u,i){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,r,a,o,u,i],c=0;s=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return f[c++]}))}throw s.framesToPop=1,s}};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,n){var r=e(t,n);e.length<2&&n(r)}t.__esModule=!0;var o=n(1);r(o);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){return s+e}function o(e,t){try{null==t?window.sessionStorage.removeItem(a(e)):window.sessionStorage.setItem(a(e),JSON.stringify(t))}catch(n){if(n.name===c)return;if(n.name===f&&0===window.sessionStorage.length)return;throw n}}function u(e){var t=void 0;try{t=window.sessionStorage.getItem(a(e))}catch(n){if(n.name===c)return null}if(t)try{return JSON.parse(t)}catch(n){}return null}t.__esModule=!0,t.saveState=o,t.readState=u;var i=n(1),s=(r(i),"@@History/"),f="QuotaExceededError",c="SecurityError"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){function t(e){return s.canUseDOM?void 0:i["default"](!1),n.listen(e)}var n=l["default"](o({getUserConfirmation:f.getUserConfirmation},e,{go:f.go}));return o({},n,{listen:t})}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(7),i=r(u),s=n(5),f=n(6),c=n(11),l=r(c);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){return Math.random().toString(36).substr(2,e)}function o(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.key===t.key&&c["default"](e.state,t.state)}function u(){function e(e){return R.push(e),function(){R=R.filter(function(t){return t!==e})}}function t(){return I&&I.action===d.POP?q.indexOf(I.key):Q?q.indexOf(Q.key):-1}function n(e){var n=t();Q=e,Q.action===d.PUSH?q=[].concat(q.slice(0,n+1),[Q.key]):Q.action===d.REPLACE&&(q[n]=Q.key),D.forEach(function(e){e(Q)})}function r(e){if(D.push(e),Q)e(Q);else{var t=U();q=[t.key],n(t)}return function(){D=D.filter(function(t){return t!==e})}}function u(e,t){l.loopAsync(R.length,function(t,n,r){v["default"](R[t],e,function(e){null!=e?r(e):n()})},function(e){C&&"string"==typeof e?C(e,function(e){t(e!==!1)}):t(e!==!1)})}function s(e){Q&&o(Q,e)||(I=e,u(e,function(t){if(I===e)if(t){if(e.action===d.PUSH){var r=w(Q),a=w(e);a===r&&(e.action=d.REPLACE)}L(e)!==!1&&n(e)}else if(Q&&e.action===d.POP){var o=q.indexOf(Q.key),u=q.indexOf(e.key);-1!==o&&-1!==u&&B(o-u)}}))}function f(e){s(P(e,d.PUSH,y()))}function c(e){s(P(e,d.REPLACE,y()))}function p(){B(-1)}function g(){B(1)}function y(){return a(T)}function w(e){if(null==e||"string"==typeof e)return e;var t=e.pathname,n=e.search,r=e.hash,a=t;return n&&(a+=n),r&&(a+=r),a}function b(e){return w(e)}function P(e,t){var n=arguments.length<=2||void 0===arguments[2]?y():arguments[2];return"object"==typeof t&&("string"==typeof e&&(e=m["default"](e)),e=i({},e,{state:t}),t=n,n=arguments[3]||y()),h["default"](e,t,n)}function S(e){Q?(x(Q,e),n(Q)):x(U(),e)}function x(e,t){e.state=i({},e.state,t),A(e.key,e.state)}function H(e){-1===R.indexOf(e)&&R.push(e)}function k(e){R=R.filter(function(t){return t!==e})}function M(e,t){"string"==typeof t&&(t=m["default"](t)),f(i({state:e},t))}function j(e,t){"string"==typeof t&&(t=m["default"](t)),c(i({state:e},t))}var E=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],U=E.getCurrentLocation,L=E.finishTransition,A=E.saveState,B=E.go,T=E.keyLength,C=E.getUserConfirmation;"number"!=typeof T&&(T=_);var R=[],q=[],D=[],Q=void 0,I=void 0;return{listenBefore:e,listen:r,transitionTo:s,push:f,replace:c,go:B,goBack:p,goForward:g,createKey:y,createPath:w,createHref:b,createLocation:P,setState:O["default"](S,"setState is deprecated; use location.key to save state instead"),registerTransitionHook:O["default"](H,"registerTransitionHook is deprecated; use listenBefore instead"),unregisterTransitionHook:O["default"](k,"unregisterTransitionHook is deprecated; use the callback returned from listenBefore instead"),pushState:O["default"](M,"pushState is deprecated; use push instead"),replaceState:O["default"](j,"replaceState is deprecated; use replace instead")}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(1),f=(r(s),n(23)),c=r(f),l=n(16),d=n(4),p=n(12),h=r(p),g=n(8),v=r(g),y=n(3),m=r(y),w=n(2),O=r(w),_=6;t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?"/":arguments[0],t=arguments.length<=1||void 0===arguments[1]?i.POP:arguments[1],n=arguments.length<=2||void 0===arguments[2]?null:arguments[2],r=arguments.length<=3||void 0===arguments[3]?null:arguments[3];"string"==typeof e&&(e=f["default"](e)),"object"==typeof t&&(e=o({},e,{state:t}),t=n||i.POP,n=r);var a=e.pathname||"/",u=e.search||"",s=e.hash||"",c=e.state||null;return{pathname:a,search:u,hash:s,state:c,action:t,key:n}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(1),i=(r(u),n(4)),s=n(3),f=r(s);t["default"]=a,e.exports=t["default"]},function(e,t){"use strict";function n(e){var t=e.match(/^https?:\/\/[^\/]*/);return null==t?e:e.substring(t[0].length)}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){function t(t){var n=e();return"string"==typeof n?((t||window.event).returnValue=n,n):void 0}return f.addEventListener(window,"beforeunload",t),function(){f.removeEventListener(window,"beforeunload",t)}}function o(e){return function(t){function n(){for(var e=void 0,t=0,n=d.length;null==e&&n>t;++t)e=d[t].call();return e}function r(e){return d.push(e),1===d.length&&s.canUseDOM&&(c=a(n)),function(){d=d.filter(function(t){return t!==e}),0===d.length&&c&&(c(),c=null)}}function o(e){s.canUseDOM&&-1===d.indexOf(e)&&(d.push(e),1===d.length&&(c=a(n)))}function i(e){d.length>0&&(d=d.filter(function(t){return t!==e}),0===d.length&&c())}var f=e(t),c=void 0,d=[];return u({},f,{listenBeforeUnload:r,registerBeforeUnloadHook:l["default"](o,"registerBeforeUnloadHook is deprecated; use listenBeforeUnload instead"),unregisterBeforeUnloadHook:l["default"](i,"unregisterBeforeUnloadHook is deprecated; use the callback returned from listenBeforeUnload instead")})}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),s=(r(i),n(5)),f=n(6),c=n(2),l=r(c);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return f.stringify(e).replace(/%20/g,"+")}function u(e){return function(){function t(e){if(null==e.query){var t=e.search;e.query=b(t.substring(1)),e[v]={search:t,searchBase:""}}return e}function n(e,t){var n,r=void 0;if(!t||""===(r=_(t)))return e;"string"==typeof e&&(e=p["default"](e));var a=e[v],o=void 0;o=a&&e.search===a.search?a.searchBase:e.search||"";var u=o+(o?"&":"?")+r;return i({},e,(n={search:u},n[v]={search:u,searchBase:o},n))}function r(e){return S.listenBefore(function(n,r){l["default"](e,t(n),r)})}function u(e){return S.listen(function(n){e(t(n))})}function s(e){S.push(n(e,e.query))}function f(e){S.replace(n(e,e.query))}function c(e,t){return S.createPath(n(e,t||e.query))}function d(e,t){return S.createHref(n(e,t||e.query))}function h(){return t(S.createLocation.apply(S,arguments))}function m(e,t,n){"string"==typeof t&&(t=p["default"](t)),s(i({state:e},t,{query:n}))}function w(e,t,n){"string"==typeof t&&(t=p["default"](t)),f(i({state:e},t,{query:n}))}var O=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_=O.stringifyQuery,b=O.parseQueryString,P=a(O,["stringifyQuery","parseQueryString"]),S=e(P);return"function"!=typeof _&&(_=o),"function"!=typeof b&&(b=y),i({},S,{listenBefore:r,listen:u,push:s,replace:f,createPath:c,createHref:d,createLocation:h,pushState:g["default"](m,"pushState is deprecated; use push instead"),replaceState:g["default"](w,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(1),f=(r(s),n(26)),c=n(8),l=r(c),d=n(3),p=r(d),h=n(2),g=r(h),v="$searchBase",y=f.parse;t["default"]=u,e.exports=t["default"]},function(e,t){"use strict";function n(e,t,n){function r(){u=!0,n.apply(this,arguments)}function a(){u||(e>o?t.call(this,o++,a,r):r.apply(this,arguments))}var o=0,u=!1;a()}t.__esModule=!0,t.loopAsync=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(){function e(e){e=e||window.history.state||{};var t=c.getWindowPath(),n=e,r=n.key,a=void 0;r?a=l.readState(r):(a=null,r=w.createKey(),y&&window.history.replaceState(o({},e,{key:r}),null,t));var u=g["default"](t);return w.createLocation(o({},u,{state:a}),void 0,r)}function t(t){function n(t){void 0!==t.state&&r(e(t.state))}var r=t.transitionTo;return c.addEventListener(window,"popstate",n),function(){c.removeEventListener(window,"popstate",n)}}function n(e){var t=e.basename,n=e.pathname,r=e.search,a=e.hash,o=e.state,u=e.action,i=e.key;if(u!==s.POP){l.saveState(i,o);var f=(t||"")+n+r+a,c={key:i};if(u===s.PUSH){if(m)return window.location.href=f,!1;window.history.pushState(c,null,f)}else{if(m)return window.location.replace(f),!1;window.history.replaceState(c,null,f)}}}function r(e){1===++O&&(_=t(w));var n=w.listenBefore(e);return function(){n(),0===--O&&_()}}function a(e){1===++O&&(_=t(w));var n=w.listen(e);return function(){n(),0===--O&&_()}}function u(e){1===++O&&(_=t(w)),w.registerTransitionHook(e)}function d(e){w.unregisterTransitionHook(e),0===--O&&_()}var h=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];f.canUseDOM?void 0:i["default"](!1);var v=h.forceRefresh,y=c.supportsHistory(),m=!y||v,w=p["default"](o({},h,{getCurrentLocation:e,finishTransition:n,saveState:l.saveState})),O=0,_=void 0;return o({},w,{listenBefore:r,listen:a,registerTransitionHook:u,unregisterTransitionHook:d})}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(7),i=r(u),s=n(4),f=n(5),c=n(6),l=n(9),d=n(10),p=r(d),h=n(3),g=r(h);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){return"string"==typeof e&&"/"===e.charAt(0)}function o(){var e=v.getHashPath();return a(e)?!0:(v.replaceHashPath("/"+e),!1)}function u(e,t,n){return e+(-1===e.indexOf("?")?"?":"&")+(t+"="+n)}function i(e,t){return e.replace(new RegExp("[?&]?"+t+"=[a-zA-Z0-9]+"),"")}function s(e,t){var n=e.match(new RegExp("\\?.*?\\b"+t+"=(.+?)\\b"));return n&&n[1]}function f(){function e(){var e=v.getHashPath(),t=void 0,n=void 0;k?(t=s(e,k),e=i(e,k),t?n=y.readState(t):(n=null,t=M.createKey(),v.replaceHashPath(u(e,k,t)))):t=n=null;var r=_["default"](e);return M.createLocation(c({},r,{state:n}),void 0,t)}function t(t){function n(){o()&&r(e())}var r=t.transitionTo;return o(),v.addEventListener(window,"hashchange",n),function(){v.removeEventListener(window,"hashchange",n)}}function n(e){var t=e.basename,n=e.pathname,r=e.search,a=e.state,o=e.action,i=e.key;if(o!==h.POP){var s=(t||"")+n+r;k?(s=u(s,k,i),y.saveState(i,a)):e.key=e.state=null;var f=v.getHashPath();o===h.PUSH?f!==s&&(window.location.hash=s):f!==s&&v.replaceHashPath(s)}}function r(e){1===++j&&(E=t(M));var n=M.listenBefore(e);return function(){n(),0===--j&&E()}}function a(e){1===++j&&(E=t(M));var n=M.listen(e);return function(){n(),0===--j&&E()}}function f(e){M.push(e)}function l(e){M.replace(e)}function d(e){M.go(e)}function m(e){return"#"+M.createHref(e)}function O(e){1===++j&&(E=t(M)),M.registerTransitionHook(e)}function P(e){M.unregisterTransitionHook(e),0===--j&&E()}function S(e,t){M.pushState(e,t)}function x(e,t){M.replaceState(e,t)}var H=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];g.canUseDOM?void 0:p["default"](!1);var k=H.queryKey;(void 0===k||k)&&(k="string"==typeof k?k:b);var M=w["default"](c({},H,{getCurrentLocation:e,finishTransition:n,saveState:y.saveState})),j=0,E=void 0;v.supportsGoWithoutReloadUsingHash();return c({},M,{listenBefore:r,listen:a,push:f,replace:l,go:d,createHref:m,registerTransitionHook:O,unregisterTransitionHook:P,pushState:S,replaceState:x})}t.__esModule=!0;var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(1),d=(r(l),n(7)),p=r(d),h=n(4),g=n(5),v=n(6),y=n(9),m=n(10),w=r(m),O=n(3),_=r(O),b="_k";t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){return e.filter(function(e){return e.state}).reduce(function(e,t){return e[t.key]=t.state,e},{})}function o(){function e(e,t){y[e]=t}function t(e){return y[e]}function n(){var e=g[v],n=e.key,r=e.basename,a=e.pathname,o=e.search,i=(r||"")+a+(o||""),s=void 0;n?s=t(n):(s=null,n=l.createKey(),e.key=n);var f=h["default"](i);return l.createLocation(u({},f,{state:s}),void 0,n)}function r(e){var t=v+e;return t>=0&&t<g.length}function o(e){if(e){if(!r(e))return;v+=e;var t=n();l.transitionTo(u({},t,{action:c.POP}))}}function i(t){switch(t.action){case c.PUSH:v+=1,v<g.length&&g.splice(v),g.push(t),e(t.key,t.state);break;case c.REPLACE:g[v]=t,e(t.key,t.state)}}var s=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];Array.isArray(s)?s={entries:s}:"string"==typeof s&&(s={entries:[s]});var l=d["default"](u({},s,{getCurrentLocation:n,finishTransition:i,saveState:e,go:o})),p=s,g=p.entries,v=p.current;"string"==typeof g?g=[g]:Array.isArray(g)||(g=["/"]),g=g.map(function(e){var t=l.createKey();return"string"==typeof e?{pathname:e,key:t}:"object"==typeof e&&e?u({},e,{key:t}):void f["default"](!1)}),null==v?v=g.length-1:v>=0&&v<g.length?void 0:f["default"](!1);var y=a(g);return l}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),s=(r(i),n(7)),f=r(s),c=n(4),l=n(11),d=r(l),p=n(3),h=r(p);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(2),o=r(a),u=n(14),i=r(u);t["default"]=o["default"](i["default"],"enableBeforeUnload is deprecated, use useBeforeUnload instead"),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(2),o=r(a),u=n(15),i=r(u);t["default"]=o["default"](i["default"],"enableQueries is deprecated, use useQueries instead"),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return function(){function t(e){return O&&null==e.basename&&(0===e.pathname.indexOf(O)?(e.pathname=e.pathname.substring(O.length),e.basename=O,""===e.pathname&&(e.pathname="/")):e.basename=""),e}function n(e){if(!O)return e;"string"==typeof e&&(e=p["default"](e));var t=e.pathname,n="/"===O.slice(-1)?O:O+"/",r="/"===t.charAt(0)?t.slice(1):t,a=n+r;return u({},e,{pathname:a})}function r(e){return b.listenBefore(function(n,r){f["default"](e,t(n),r)})}function o(e){return b.listen(function(n){e(t(n))})}function s(e){b.push(n(e))}function c(e){b.replace(n(e))}function d(e){return b.createPath(n(e))}function h(e){return b.createHref(n(e))}function v(){return t(b.createLocation.apply(b,arguments))}function y(e,t){"string"==typeof t&&(t=p["default"](t)),s(u({state:e},t))}function m(e,t){"string"==typeof t&&(t=p["default"](t)),c(u({state:e},t))}var w=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],O=w.basename,_=a(w,["basename"]),b=e(_);if(null==O&&i.canUseDOM){var P=document.getElementsByTagName("base")[0];P&&(O=l["default"](P.href))}return u({},b,{listenBefore:r,listen:o,push:s,replace:c,createPath:d,createHref:h,createLocation:v,pushState:g["default"](y,"pushState is deprecated; use push instead"),replaceState:g["default"](m,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(5),s=n(8),f=r(s),c=n(13),l=r(c),d=n(3),p=r(d),h=n(2),g=r(h);t["default"]=o,e.exports=t["default"]},function(e,t,n){function r(e){return null===e||void 0===e}function a(e){return e&&"object"==typeof e&&"number"==typeof e.length?"function"!=typeof e.copy||"function"!=typeof e.slice?!1:e.length>0&&"number"!=typeof e[0]?!1:!0:!1}function o(e,t,n){var o,c;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(s(e))return s(t)?(e=u.call(e),t=u.call(t),f(e,t,n)):!1;if(a(e)){if(!a(t))return!1;if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}try{var l=i(e),d=i(t)}catch(p){return!1}if(l.length!=d.length)return!1;for(l.sort(),d.sort(),o=l.length-1;o>=0;o--)if(l[o]!=d[o])return!1;for(o=l.length-1;o>=0;o--)if(c=l[o],!f(e[c],t[c],n))return!1;return typeof e==typeof t}var u=Array.prototype.slice,i=n(25),s=n(24),f=e.exports=function(e,t,n){return n||(n={}),e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:o(e,t,n)}},function(e,t){function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var a="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();t=e.exports=a?n:r,t.supported=n,t.unsupported=r},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}t=e.exports="function"==typeof Object.keys?Object.keys:n,t.shim=n},function(e,t,n){"use strict";var r=n(27);t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e){return"string"!=typeof e?{}:(e=e.trim().replace(/^(\?|#|&)/,""),e?e.split("&").reduce(function(e,t){var n=t.replace(/\+/g," ").split("="),r=n.shift(),a=n.length>0?n.join("="):void 0;return r=decodeURIComponent(r),a=void 0===a?null:decodeURIComponent(a),e.hasOwnProperty(r)?Array.isArray(e[r])?e[r].push(a):e[r]=[e[r],a]:e[r]=a,e},{}):{})},t.stringify=function(e){return e?Object.keys(e).sort().map(function(t){var n=e[t];return void 0===n?"":null===n?t:Array.isArray(n)?n.sort().map(function(e){return r(t)+"="+r(e)}).join("&"):r(t)+"="+r(n)}).filter(function(e){return e.length>0}).join("&"):""}},function(e,t){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16)})}}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.History=t():e.History=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(2),o=r(a),u=n(12),i=r(u),s=n(17),f=r(s);t.createHistory=f["default"];var c=n(18),l=r(c);t.createHashHistory=l["default"];var d=n(19),p=r(d);t.createMemoryHistory=p["default"];var h=n(22),g=r(h);t.useBasename=g["default"];var v=n(14),y=r(v);t.useBeforeUnload=y["default"];var m=n(15),w=r(m);t.useQueries=w["default"];var O=n(4),_=r(O);t.Actions=_["default"];var b=n(20),P=r(b);t.enableBeforeUnload=P["default"];var S=n(21),x=r(S);t.enableQueries=x["default"];var H=o["default"](i["default"],"Using createLocation without a history instance is deprecated; please use history.createLocation instead");t.createLocation=H},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){return function(){return e.apply(this,arguments)}}t.__esModule=!0;var o=n(1);r(o);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=i["default"](e),n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substring(a),t=t.substring(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substring(o),t=t.substring(0,o)),""===t&&(t="/"),{pathname:t,search:n,hash:r}}t.__esModule=!0;var o=n(1),u=(r(o),n(13)),i=r(u);t["default"]=a,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n="PUSH";t.PUSH=n;var r="REPLACE";t.REPLACE=r;var a="POP";t.POP=a,t["default"]={PUSH:n,REPLACE:r,POP:a}},function(e,t){"use strict";t.__esModule=!0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.canUseDOM=n},function(e,t){"use strict";function n(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function r(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)}function a(){return window.location.href.split("#")[1]||""}function o(e){window.location.replace(window.location.pathname+window.location.search+"#"+e)}function u(){return window.location.pathname+window.location.search+window.location.hash}function i(e){e&&window.history.go(e)}function s(e,t){t(window.confirm(e))}function f(){var e=navigator.userAgent;return-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone")?window.history&&"pushState"in window.history:!1}function c(){var e=navigator.userAgent;return-1===e.indexOf("Firefox")}t.__esModule=!0,t.addEventListener=n,t.removeEventListener=r,t.getHashPath=a,t.replaceHashPath=o,t.getWindowPath=u,t.go=i,t.getUserConfirmation=s,t.supportsHistory=f,t.supportsGoWithoutReloadUsingHash=c},function(e,t,n){"use strict";var r=function(e,t,n,r,a,o,u,i){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,r,a,o,u,i],c=0;s=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return f[c++]}))}throw s.framesToPop=1,s}};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,n){var r=e(t,n);e.length<2&&n(r)}t.__esModule=!0;var o=n(1);r(o);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){return s+e}function o(e,t){try{null==t?window.sessionStorage.removeItem(a(e)):window.sessionStorage.setItem(a(e),JSON.stringify(t))}catch(n){if(n.name===c)return;if(n.name===f&&0===window.sessionStorage.length)return;throw n}}function u(e){var t=void 0;try{t=window.sessionStorage.getItem(a(e))}catch(n){if(n.name===c)return null}if(t)try{return JSON.parse(t)}catch(n){}return null}t.__esModule=!0,t.saveState=o,t.readState=u;var i=n(1),s=(r(i),"@@History/"),f="QuotaExceededError",c="SecurityError"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){function t(e){return s.canUseDOM?void 0:i["default"](!1),n.listen(e)}var n=l["default"](o({getUserConfirmation:f.getUserConfirmation},e,{go:f.go}));return o({},n,{listen:t})}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(7),i=r(u),s=n(5),f=n(6),c=n(11),l=r(c);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){return Math.random().toString(36).substr(2,e)}function o(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.key===t.key&&c["default"](e.state,t.state)}function u(){function e(e){return q.push(e),function(){q=q.filter(function(t){return t!==e})}}function t(){return K&&K.action===d.POP?D.indexOf(K.key):I?D.indexOf(I.key):-1}function n(e){var n=t();I=e,I.action===d.PUSH?D=[].concat(D.slice(0,n+1),[I.key]):I.action===d.REPLACE&&(D[n]=I.key),Q.forEach(function(e){e(I)})}function r(e){if(Q.push(e),I)e(I);else{var t=L();D=[t.key],n(t)}return function(){Q=Q.filter(function(t){return t!==e})}}function u(e,t){l.loopAsync(q.length,function(t,n,r){v["default"](q[t],e,function(e){null!=e?r(e):n()})},function(e){R&&"string"==typeof e?R(e,function(e){t(e!==!1)}):t(e!==!1)})}function s(e){I&&o(I,e)||(K=e,u(e,function(t){if(K===e)if(t){if(e.action===d.PUSH){var r=b(I),a=b(e);a===r&&c["default"](I.state,e.state)&&(e.action=d.REPLACE)}A(e)!==!1&&n(e)}else if(I&&e.action===d.POP){var o=D.indexOf(I.key),u=D.indexOf(e.key);-1!==o&&-1!==u&&T(o-u)}}))}function f(e){s(S(e,d.PUSH,w()))}function p(e){s(S(e,d.REPLACE,w()))}function g(){T(-1)}function y(){T(1)}function w(){return a(C)}function b(e){if(null==e||"string"==typeof e)return e;var t=e.pathname,n=e.search,r=e.hash,a=t;return n&&(a+=n),r&&(a+=r),a}function P(e){return b(e)}function S(e,t){var n=arguments.length<=2||void 0===arguments[2]?w():arguments[2];return"object"==typeof t&&("string"==typeof e&&(e=m["default"](e)),e=i({},e,{state:t}),t=n,n=arguments[3]||w()),h["default"](e,t,n)}function x(e){I?(H(I,e),n(I)):H(L(),e)}function H(e,t){e.state=i({},e.state,t),B(e.key,e.state)}function k(e){-1===q.indexOf(e)&&q.push(e)}function M(e){q=q.filter(function(t){return t!==e})}function j(e,t){"string"==typeof t&&(t=m["default"](t)),f(i({state:e},t))}function E(e,t){"string"==typeof t&&(t=m["default"](t)),p(i({state:e},t))}var U=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],L=U.getCurrentLocation,A=U.finishTransition,B=U.saveState,T=U.go,C=U.keyLength,R=U.getUserConfirmation;"number"!=typeof C&&(C=_);var q=[],D=[],Q=[],I=void 0,K=void 0;return{listenBefore:e,listen:r,transitionTo:s,push:f,replace:p,go:T,goBack:g,goForward:y,createKey:w,createPath:b,createHref:P,createLocation:S,setState:O["default"](x,"setState is deprecated; use location.key to save state instead"),registerTransitionHook:O["default"](k,"registerTransitionHook is deprecated; use listenBefore instead"),unregisterTransitionHook:O["default"](M,"unregisterTransitionHook is deprecated; use the callback returned from listenBefore instead"),pushState:O["default"](j,"pushState is deprecated; use push instead"),replaceState:O["default"](E,"replaceState is deprecated; use replace instead")}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(1),f=(r(s),n(23)),c=r(f),l=n(16),d=n(4),p=n(12),h=r(p),g=n(8),v=r(g),y=n(3),m=r(y),w=n(2),O=r(w),_=6;t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?"/":arguments[0],t=arguments.length<=1||void 0===arguments[1]?i.POP:arguments[1],n=arguments.length<=2||void 0===arguments[2]?null:arguments[2],r=arguments.length<=3||void 0===arguments[3]?null:arguments[3];"string"==typeof e&&(e=f["default"](e)),"object"==typeof t&&(e=o({},e,{state:t}),t=n||i.POP,n=r);var a=e.pathname||"/",u=e.search||"",s=e.hash||"",c=e.state||null;return{pathname:a,search:u,hash:s,state:c,action:t,key:n}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(1),i=(r(u),n(4)),s=n(3),f=r(s);t["default"]=a,e.exports=t["default"]},function(e,t){"use strict";function n(e){var t=e.match(/^https?:\/\/[^\/]*/);return null==t?e:e.substring(t[0].length)}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){function t(t){var n=e();return"string"==typeof n?((t||window.event).returnValue=n,n):void 0}return f.addEventListener(window,"beforeunload",t),function(){f.removeEventListener(window,"beforeunload",t)}}function o(e){return function(t){function n(){for(var e=void 0,t=0,n=d.length;null==e&&n>t;++t)e=d[t].call();return e}function r(e){return d.push(e),1===d.length&&s.canUseDOM&&(c=a(n)),function(){d=d.filter(function(t){return t!==e}),0===d.length&&c&&(c(),c=null)}}function o(e){s.canUseDOM&&-1===d.indexOf(e)&&(d.push(e),1===d.length&&(c=a(n)))}function i(e){d.length>0&&(d=d.filter(function(t){return t!==e}),0===d.length&&c())}var f=e(t),c=void 0,d=[];return u({},f,{listenBeforeUnload:r,registerBeforeUnloadHook:l["default"](o,"registerBeforeUnloadHook is deprecated; use listenBeforeUnload instead"),unregisterBeforeUnloadHook:l["default"](i,"unregisterBeforeUnloadHook is deprecated; use the callback returned from listenBeforeUnload instead")})}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),s=(r(i),n(5)),f=n(6),c=n(2),l=r(c);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return f.stringify(e).replace(/%20/g,"+")}function u(e){return function(){function t(e){if(null==e.query){var t=e.search;e.query=b(t.substring(1)),e[v]={search:t,searchBase:""}}return e}function n(e,t){var n,r=void 0;if(!t||""===(r=_(t)))return e;"string"==typeof e&&(e=p["default"](e));var a=e[v],o=void 0;o=a&&e.search===a.search?a.searchBase:e.search||"";var u=o+(o?"&":"?")+r;return i({},e,(n={search:u},n[v]={search:u,searchBase:o},n))}function r(e){return S.listenBefore(function(n,r){l["default"](e,t(n),r)})}function u(e){return S.listen(function(n){e(t(n))})}function s(e){S.push(n(e,e.query))}function f(e){S.replace(n(e,e.query))}function c(e,t){return S.createPath(n(e,t||e.query))}function d(e,t){return S.createHref(n(e,t||e.query))}function h(e){for(var r=arguments.length,a=Array(r>1?r-1:0),o=1;r>o;o++)a[o-1]=arguments[o];var u=S.createLocation.apply(S,[n(e,e.query)].concat(a));return e.query&&(u.query=e.query),t(u)}function m(e,t,n){"string"==typeof t&&(t=p["default"](t)),s(i({state:e},t,{query:n}))}function w(e,t,n){"string"==typeof t&&(t=p["default"](t)),f(i({state:e},t,{query:n}))}var O=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_=O.stringifyQuery,b=O.parseQueryString,P=a(O,["stringifyQuery","parseQueryString"]),S=e(P);return"function"!=typeof _&&(_=o),"function"!=typeof b&&(b=y),i({},S,{listenBefore:r,listen:u,push:s,replace:f,createPath:c,createHref:d,createLocation:h,pushState:g["default"](m,"pushState is deprecated; use push instead"),replaceState:g["default"](w,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(1),f=(r(s),n(26)),c=n(8),l=r(c),d=n(3),p=r(d),h=n(2),g=r(h),v="$searchBase",y=f.parse;t["default"]=u,e.exports=t["default"]},function(e,t){"use strict";function n(e,t,n){function r(){u=!0,n.apply(this,arguments)}function a(){u||(e>o?t.call(this,o++,a,r):r.apply(this,arguments))}var o=0,u=!1;a()}t.__esModule=!0,t.loopAsync=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(){function e(e){e=e||window.history.state||{};var t=c.getWindowPath(),n=e,r=n.key,a=void 0;r?a=l.readState(r):(a=null,r=w.createKey(),y&&window.history.replaceState(o({},e,{key:r}),null,t));var u=g["default"](t);return w.createLocation(o({},u,{state:a}),void 0,r)}function t(t){function n(t){void 0!==t.state&&r(e(t.state))}var r=t.transitionTo;return c.addEventListener(window,"popstate",n),function(){c.removeEventListener(window,"popstate",n)}}function n(e){var t=e.basename,n=e.pathname,r=e.search,a=e.hash,o=e.state,u=e.action,i=e.key;if(u!==s.POP){l.saveState(i,o);var f=(t||"")+n+r+a,c={key:i};if(u===s.PUSH){if(m)return window.location.href=f,!1;window.history.pushState(c,null,f)}else{if(m)return window.location.replace(f),!1;window.history.replaceState(c,null,f)}}}function r(e){1===++O&&(_=t(w));var n=w.listenBefore(e);return function(){n(),0===--O&&_()}}function a(e){1===++O&&(_=t(w));var n=w.listen(e);return function(){n(),0===--O&&_()}}function u(e){1===++O&&(_=t(w)),w.registerTransitionHook(e)}function d(e){w.unregisterTransitionHook(e),0===--O&&_()}var h=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];f.canUseDOM?void 0:i["default"](!1);var v=h.forceRefresh,y=c.supportsHistory(),m=!y||v,w=p["default"](o({},h,{getCurrentLocation:e,finishTransition:n,saveState:l.saveState})),O=0,_=void 0;return o({},w,{listenBefore:r,listen:a,registerTransitionHook:u,unregisterTransitionHook:d})}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(7),i=r(u),s=n(4),f=n(5),c=n(6),l=n(9),d=n(10),p=r(d),h=n(3),g=r(h);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){return"string"==typeof e&&"/"===e.charAt(0)}function o(){var e=v.getHashPath();return a(e)?!0:(v.replaceHashPath("/"+e),!1)}function u(e,t,n){return e+(-1===e.indexOf("?")?"?":"&")+(t+"="+n)}function i(e,t){return e.replace(new RegExp("[?&]?"+t+"=[a-zA-Z0-9]+"),"")}function s(e,t){var n=e.match(new RegExp("\\?.*?\\b"+t+"=(.+?)\\b"));return n&&n[1]}function f(){function e(){var e=v.getHashPath(),t=void 0,n=void 0;k?(t=s(e,k),e=i(e,k),t?n=y.readState(t):(n=null,t=M.createKey(),v.replaceHashPath(u(e,k,t)))):t=n=null;var r=_["default"](e);return M.createLocation(c({},r,{state:n}),void 0,t)}function t(t){function n(){o()&&r(e())}var r=t.transitionTo;return o(),v.addEventListener(window,"hashchange",n),function(){v.removeEventListener(window,"hashchange",n)}}function n(e){var t=e.basename,n=e.pathname,r=e.search,a=e.state,o=e.action,i=e.key;if(o!==h.POP){var s=(t||"")+n+r;k?(s=u(s,k,i),y.saveState(i,a)):e.key=e.state=null;var f=v.getHashPath();o===h.PUSH?f!==s&&(window.location.hash=s):f!==s&&v.replaceHashPath(s)}}function r(e){1===++j&&(E=t(M));var n=M.listenBefore(e);return function(){n(),0===--j&&E()}}function a(e){1===++j&&(E=t(M));var n=M.listen(e);return function(){n(),0===--j&&E()}}function f(e){M.push(e)}function l(e){M.replace(e)}function d(e){M.go(e)}function m(e){return"#"+M.createHref(e)}function O(e){1===++j&&(E=t(M)),M.registerTransitionHook(e)}function P(e){M.unregisterTransitionHook(e),0===--j&&E()}function S(e,t){M.pushState(e,t)}function x(e,t){M.replaceState(e,t)}var H=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];g.canUseDOM?void 0:p["default"](!1);var k=H.queryKey;(void 0===k||k)&&(k="string"==typeof k?k:b);var M=w["default"](c({},H,{getCurrentLocation:e,finishTransition:n,saveState:y.saveState})),j=0,E=void 0;v.supportsGoWithoutReloadUsingHash();return c({},M,{listenBefore:r,listen:a,push:f,replace:l,go:d,createHref:m,registerTransitionHook:O,unregisterTransitionHook:P,pushState:S,replaceState:x})}t.__esModule=!0;var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(1),d=(r(l),n(7)),p=r(d),h=n(4),g=n(5),v=n(6),y=n(9),m=n(10),w=r(m),O=n(3),_=r(O),b="_k";t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){return e.filter(function(e){return e.state}).reduce(function(e,t){return e[t.key]=t.state,e},{})}function o(){function e(e,t){y[e]=t}function t(e){return y[e]}function n(){var e=g[v],n=e.key,r=e.basename,a=e.pathname,o=e.search,i=(r||"")+a+(o||""),s=void 0;n?s=t(n):(s=null,n=l.createKey(),e.key=n);var f=h["default"](i);return l.createLocation(u({},f,{state:s}),void 0,n)}function r(e){var t=v+e;return t>=0&&t<g.length}function o(e){if(e){if(!r(e))return;v+=e;var t=n();l.transitionTo(u({},t,{action:c.POP}))}}function i(t){switch(t.action){case c.PUSH:v+=1,v<g.length&&g.splice(v),g.push(t),e(t.key,t.state);break;case c.REPLACE:g[v]=t,e(t.key,t.state)}}var s=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];Array.isArray(s)?s={entries:s}:"string"==typeof s&&(s={entries:[s]});var l=d["default"](u({},s,{getCurrentLocation:n,finishTransition:i,saveState:e,go:o})),p=s,g=p.entries,v=p.current;"string"==typeof g?g=[g]:Array.isArray(g)||(g=["/"]),g=g.map(function(e){var t=l.createKey();return"string"==typeof e?{pathname:e,key:t}:"object"==typeof e&&e?u({},e,{key:t}):void f["default"](!1)}),null==v?v=g.length-1:v>=0&&v<g.length?void 0:f["default"](!1);var y=a(g);return l}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),s=(r(i),n(7)),f=r(s),c=n(4),l=n(11),d=r(l),p=n(3),h=r(p);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(2),o=r(a),u=n(14),i=r(u);t["default"]=o["default"](i["default"],"enableBeforeUnload is deprecated, use useBeforeUnload instead"),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(2),o=r(a),u=n(15),i=r(u);t["default"]=o["default"](i["default"],"enableQueries is deprecated, use useQueries instead"),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return function(){function t(e){return O&&null==e.basename&&(0===e.pathname.indexOf(O)?(e.pathname=e.pathname.substring(O.length),e.basename=O,""===e.pathname&&(e.pathname="/")):e.basename=""),e}function n(e){if(!O)return e;"string"==typeof e&&(e=p["default"](e));var t=e.pathname,n="/"===O.slice(-1)?O:O+"/",r="/"===t.charAt(0)?t.slice(1):t,a=n+r;return u({},e,{pathname:a})}function r(e){return b.listenBefore(function(n,r){f["default"](e,t(n),r)})}function o(e){return b.listen(function(n){e(t(n))})}function s(e){b.push(n(e))}function c(e){b.replace(n(e))}function d(e){return b.createPath(n(e))}function h(e){return b.createHref(n(e))}function v(e){for(var r=arguments.length,a=Array(r>1?r-1:0),o=1;r>o;o++)a[o-1]=arguments[o];return t(b.createLocation.apply(b,[n(e)].concat(a)))}function y(e,t){"string"==typeof t&&(t=p["default"](t)),s(u({state:e},t))}function m(e,t){"string"==typeof t&&(t=p["default"](t)),c(u({state:e},t))}var w=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],O=w.basename,_=a(w,["basename"]),b=e(_);if(null==O&&i.canUseDOM){var P=document.getElementsByTagName("base")[0];P&&(O=l["default"](P.href))}return u({},b,{listenBefore:r,listen:o,push:s,replace:c,createPath:d,createHref:h,createLocation:v,pushState:g["default"](y,"pushState is deprecated; use push instead"),replaceState:g["default"](m,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(5),s=n(8),f=r(s),c=n(13),l=r(c),d=n(3),p=r(d),h=n(2),g=r(h);t["default"]=o,e.exports=t["default"]},function(e,t,n){function r(e){return null===e||void 0===e}function a(e){return e&&"object"==typeof e&&"number"==typeof e.length?"function"!=typeof e.copy||"function"!=typeof e.slice?!1:e.length>0&&"number"!=typeof e[0]?!1:!0:!1}function o(e,t,n){var o,c;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(s(e))return s(t)?(e=u.call(e),t=u.call(t),f(e,t,n)):!1;if(a(e)){if(!a(t))return!1;if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}try{var l=i(e),d=i(t)}catch(p){return!1}if(l.length!=d.length)return!1;for(l.sort(),d.sort(),o=l.length-1;o>=0;o--)if(l[o]!=d[o])return!1;for(o=l.length-1;o>=0;o--)if(c=l[o],!f(e[c],t[c],n))return!1;return typeof e==typeof t}var u=Array.prototype.slice,i=n(25),s=n(24),f=e.exports=function(e,t,n){return n||(n={}),e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:o(e,t,n)}},function(e,t){function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var a="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();t=e.exports=a?n:r,t.supported=n,t.unsupported=r},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}t=e.exports="function"==typeof Object.keys?Object.keys:n,t.shim=n},function(e,t,n){"use strict";var r=n(27);t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e){return"string"!=typeof e?{}:(e=e.trim().replace(/^(\?|#|&)/,""),e?e.split("&").reduce(function(e,t){var n=t.replace(/\+/g," ").split("="),r=n.shift(),a=n.length>0?n.join("="):void 0;return r=decodeURIComponent(r),a=void 0===a?null:decodeURIComponent(a),e.hasOwnProperty(r)?Array.isArray(e[r])?e[r].push(a):e[r]=[e[r],a]:e[r]=a,e},{}):{})},t.stringify=function(e){return e?Object.keys(e).sort().map(function(t){var n=e[t];return void 0===n?"":null===n?t:Array.isArray(n)?n.sort().map(function(e){return r(t)+"="+r(e)}).join("&"):r(t)+"="+r(n)}).filter(function(e){return e.length>0}).join("&"):""}},function(e,t){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16)})}}])}); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
266402
79
5491