react-redux-boilerplate-scripts
Version:
react-boilerplate-app-scripts
6 lines • 23.5 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.History=e():t.History=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.locationsAreEqual=e.Actions=e.useQueries=e.useBeforeUnload=e.useBasename=e.createMemoryHistory=e.createHashHistory=e.createHistory=void 0;var i=n(2);Object.defineProperty(e,"locationsAreEqual",{enumerable:!0,get:function(){return i.locationsAreEqual}});var a=n(15),u=o(a),c=n(16),s=o(c),f=n(17),l=o(f),d=n(18),h=o(d),v=n(19),p=o(v),g=n(20),y=o(g),m=n(6),w=r(m);e.createHistory=u.default,e.createHashHistory=s.default,e.createMemoryHistory=l.default,e.useBasename=h.default,e.useBeforeUnload=p.default,e.useQueries=y.default,e.Actions=w},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.createPath=e.parsePath=e.getQueryStringValueFromPath=e.stripQueryStringValueFromPath=e.addQueryStringValueToPath=void 0;var o=n(3),i=(r(o),e.addQueryStringValueToPath=function(t,e,n){var r=a(t),o=r.pathname,i=r.search,c=r.hash;return u({pathname:o,search:i+(i.indexOf("?")===-1?"?":"&")+e+"="+n,hash:c})},e.stripQueryStringValueFromPath=function(t,e){var n=a(t),r=n.pathname,o=n.search,i=n.hash;return u({pathname:r,search:o.replace(new RegExp("([?&])"+e+"=[a-zA-Z0-9]+(&?)"),function(t,e,n){return"?"===e?e:n}),hash:i})},e.getQueryStringValueFromPath=function(t,e){var n=a(t),r=n.search,o=r.match(new RegExp("[?&]"+e+"=([a-zA-Z0-9]+)"));return o&&o[1]},function(t){var e=t.match(/^(https?:)?\/\/[^\/]*/);return null==e?t:t.substring(e[0].length)}),a=e.parsePath=function(t){var e=i(t),n="",r="",o=e.indexOf("#");o!==-1&&(r=e.substring(o),e=e.substring(0,o));var a=e.indexOf("?");return a!==-1&&(n=e.substring(a),e=e.substring(0,a)),""===e&&(e="/"),{pathname:e,search:n,hash:r}},u=e.createPath=function(t){if(null==t||"string"==typeof t)return t;var e=t.basename,n=t.pathname,r=t.search,o=t.hash,i=(e||"")+n;return r&&"?"!==r&&(i+=r),o&&(i+=o),i}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.locationsAreEqual=e.statesAreEqual=e.createLocation=e.createQuery=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(5),u=r(a),c=n(3),s=(r(c),n(1)),f=n(6),l=(e.createQuery=function(t){return i(Object.create(null),t)},e.createLocation=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.POP,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r="string"==typeof t?(0,s.parsePath)(t):t,o=r.pathname||"/",i=r.search||"",a=r.hash||"",u=r.state;return{pathname:o,search:i,hash:a,state:u,action:e,key:n}},function(t){return"[object Date]"===Object.prototype.toString.call(t)}),d=e.statesAreEqual=function t(e,n){if(e===n)return!0;var r="undefined"==typeof e?"undefined":o(e),i="undefined"==typeof n?"undefined":o(n);if(r!==i)return!1;if("function"===r?(0,u.default)(!1):void 0,"object"===r){if(l(e)&&l(n)?(0,u.default)(!1):void 0,!Array.isArray(e)){var a=Object.keys(e),c=Object.keys(n);return a.length===c.length&&a.every(function(r){return t(e[r],n[r])})}return Array.isArray(n)&&e.length===n.length&&e.every(function(e,r){return t(e,n[r])})}return!1};e.locationsAreEqual=function(t,e){return t.key===e.key&&t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&d(t.state,e.state)}},function(t,e,n){"use strict";var r=function(){};t.exports=r},function(t,e){"use strict";e.__esModule=!0;e.addEventListener=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},e.removeEventListener=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},e.supportsHistory=function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)},e.supportsGoWithoutReloadUsingHash=function(){return window.navigator.userAgent.indexOf("Firefox")===-1},e.supportsPopstateOnHashchange=function(){return window.navigator.userAgent.indexOf("Trident")===-1},e.isExtraneousPopstateEvent=function(t){return void 0===t.state&&navigator.userAgent.indexOf("CriOS")===-1}},function(t,e,n){"use strict";var r=function(t,e,n,r,o,i,a,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,u],f=0;c=new Error(e.replace(/%s/g,function(){return s[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};t.exports=r},function(t,e){"use strict";e.__esModule=!0;e.PUSH="PUSH",e.REPLACE="REPLACE",e.POP="POP"},function(t,e){"use strict";e.__esModule=!0;e.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(t,e,n){"use strict";e.__esModule=!0,e.go=e.replaceLocation=e.pushLocation=e.startListener=e.getUserConfirmation=e.getCurrentLocation=void 0;var r=n(2),o=n(4),i=n(11),a=n(1),u=n(7),c="popstate",s="hashchange",f=u.canUseDOM&&!(0,o.supportsPopstateOnHashchange)(),l=function(t){var e=t&&t.key;return(0,r.createLocation)({pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:e?(0,i.readState)(e):void 0},void 0,e)},d=e.getCurrentLocation=function(){var t=void 0;try{t=window.history.state||{}}catch(e){t={}}return l(t)},h=(e.getUserConfirmation=function(t,e){return e(window.confirm(t))},e.startListener=function(t){var e=function(e){(0,o.isExtraneousPopstateEvent)(e)||t(l(e.state))};(0,o.addEventListener)(window,c,e);var n=function(){return t(d())};return f&&(0,o.addEventListener)(window,s,n),function(){(0,o.removeEventListener)(window,c,e),f&&(0,o.removeEventListener)(window,s,n)}},function(t,e){var n=t.state,r=t.key;void 0!==n&&(0,i.saveState)(r,n),e({key:r},(0,a.createPath)(t))});e.pushLocation=function(t){return h(t,function(t,e){return window.history.pushState(t,null,e)})},e.replaceLocation=function(t){return h(t,function(t,e){return window.history.replaceState(t,null,e)})},e.go=function(t){t&&window.history.go(t)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(12),i=n(1),a=n(10),u=r(a),c=n(6),s=n(2),f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getCurrentLocation,n=t.getUserConfirmation,r=t.pushLocation,a=t.replaceLocation,f=t.go,l=t.keyLength,d=void 0,h=void 0,v=[],p=[],g=[],y=function(){return h&&h.action===c.POP?g.indexOf(h.key):d?g.indexOf(d.key):-1},m=function(t){var e=y();d=t,d.action===c.PUSH?g=[].concat(g.slice(0,e+1),[d.key]):d.action===c.REPLACE&&(g[e]=d.key),p.forEach(function(t){return t(d)})},w=function(t){return v.push(t),function(){return v=v.filter(function(e){return e!==t})}},P=function(t){return p.push(t),function(){return p=p.filter(function(e){return e!==t})}},O=function(t,e){(0,o.loopAsync)(v.length,function(e,n,r){(0,u.default)(v[e],t,function(t){return null!=t?r(t):n()})},function(t){n&&"string"==typeof t?n(t,function(t){return e(t!==!1)}):e(t!==!1)})},b=function(t){d&&(0,s.locationsAreEqual)(d,t)||h&&(0,s.locationsAreEqual)(h,t)||(h=t,O(t,function(e){if(h===t)if(h=null,e){if(t.action===c.PUSH){var n=(0,i.createPath)(d),o=(0,i.createPath)(t);o===n&&(0,s.statesAreEqual)(d.state,t.state)&&(t.action=c.REPLACE)}t.action===c.POP?m(t):t.action===c.PUSH?r(t)!==!1&&m(t):t.action===c.REPLACE&&a(t)!==!1&&m(t)}else if(d&&t.action===c.POP){var u=g.indexOf(d.key),l=g.indexOf(t.key);u!==-1&&l!==-1&&f(u-l)}}))},L=function(t){return b(S(t,c.PUSH))},_=function(t){return b(S(t,c.REPLACE))},j=function(){return f(-1)},E=function(){return f(1)},A=function(){return Math.random().toString(36).substr(2,l||6)},C=function(t){return(0,i.createPath)(t)},S=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A();return(0,s.createLocation)(t,e,n)};return{getCurrentLocation:e,listenBefore:w,listen:P,transitionTo:b,push:L,replace:_,go:f,goBack:j,goForward:E,createKey:A,createPath:i.createPath,createHref:C,createLocation:S}};e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(3),i=(r(o),function(t,e,n){var r=t(e,n);t.length<2&&n(r)});e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.readState=e.saveState=void 0;var o=n(3),i=(r(o),{QuotaExceededError:!0,QUOTA_EXCEEDED_ERR:!0}),a={SecurityError:!0},u="@@History/",c=function(t){return u+t};e.saveState=function(t,e){if(window.sessionStorage)try{null==e?window.sessionStorage.removeItem(c(t)):window.sessionStorage.setItem(c(t),JSON.stringify(e))}catch(t){if(a[t.name])return;if(i[t.name]&&0===window.sessionStorage.length)return;throw t}},e.readState=function(t){var e=void 0;try{e=window.sessionStorage.getItem(c(t))}catch(t){if(a[t.name])return}if(e)try{return JSON.parse(e)}catch(t){}}},function(t,e){"use strict";e.__esModule=!0;e.loopAsync=function(t,e,n){var r=0,o=!1,i=!1,a=!1,u=void 0,c=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return o=!0,i?void(u=e):void n.apply(void 0,e)},s=function s(){if(!o&&(a=!0,!i)){for(i=!0;!o&&r<t&&a;)a=!1,e(r++,s,c);return i=!1,o?void n.apply(void 0,u):void(r>=t&&a&&(o=!0,n()))}};s()}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.replaceLocation=e.pushLocation=e.startListener=e.getCurrentLocation=e.go=e.getUserConfirmation=void 0;var o=n(8);Object.defineProperty(e,"getUserConfirmation",{enumerable:!0,get:function(){return o.getUserConfirmation}}),Object.defineProperty(e,"go",{enumerable:!0,get:function(){return o.go}});var i=n(3),a=(r(i),n(2)),u=n(4),c=n(11),s=n(1),f="hashchange",l=function(){var t=window.location.href,e=t.indexOf("#");return e===-1?"":t.substring(e+1)},d=function(t){return window.location.hash=t},h=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},v=e.getCurrentLocation=function(t,e){var n=t.decodePath(l()),r=(0,s.getQueryStringValueFromPath)(n,e),o=void 0;r&&(n=(0,s.stripQueryStringValueFromPath)(n,e),o=(0,c.readState)(r));var i=(0,s.parsePath)(n);return i.state=o,(0,a.createLocation)(i,void 0,r)},p=void 0,g=(e.startListener=function(t,e,n){var r=function(){var r=l(),o=e.encodePath(r);if(r!==o)h(o);else{var i=v(e,n);if(p&&i.key&&p.key===i.key)return;p=i,t(i)}},o=l(),i=e.encodePath(o);return o!==i&&h(i),(0,u.addEventListener)(window,f,r),function(){return(0,u.removeEventListener)(window,f,r)}},function(t,e,n,r){var o=t.state,i=t.key,a=e.encodePath((0,s.createPath)(t));void 0!==o&&(a=(0,s.addQueryStringValueToPath)(a,n,i),(0,c.saveState)(i,o)),p=t,r(a)});e.pushLocation=function(t,e,n){return g(t,e,n,function(t){l()!==t&&d(t)})},e.replaceLocation=function(t,e,n){return g(t,e,n,function(t){l()!==t&&h(t)})}},function(t,e,n){"use strict";e.__esModule=!0,e.replaceLocation=e.pushLocation=e.getCurrentLocation=e.go=e.getUserConfirmation=void 0;var r=n(8);Object.defineProperty(e,"getUserConfirmation",{enumerable:!0,get:function(){return r.getUserConfirmation}}),Object.defineProperty(e,"go",{enumerable:!0,get:function(){return r.go}});var o=n(2),i=n(1);e.getCurrentLocation=function(){return(0,o.createLocation)(window.location)},e.pushLocation=function(t){return window.location.href=(0,i.createPath)(t),!1},e.replaceLocation=function(t){return window.location.replace((0,i.createPath)(t)),!1}},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(5),u=o(a),c=n(7),s=n(8),f=r(s),l=n(14),d=r(l),h=n(4),v=n(9),p=o(v),g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c.canUseDOM?void 0:(0,u.default)(!1);var e=t.forceRefresh||!(0,h.supportsHistory)(),n=e?d:f,r=n.getUserConfirmation,o=n.getCurrentLocation,a=n.pushLocation,s=n.replaceLocation,l=n.go,v=(0,p.default)(i({getUserConfirmation:r},t,{getCurrentLocation:o,pushLocation:a,replaceLocation:s,go:l})),g=0,y=void 0,m=function(t,e){1===++g&&(y=f.startListener(v.transitionTo));var n=e?v.listenBefore(t):v.listen(t);return function(){n(),0===--g&&y()}},w=function(t){return m(t,!0)},P=function(t){return m(t,!1)};return i({},v,{listenBefore:w,listen:P})};e.default=g},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(3),u=(o(a),n(5)),c=o(u),s=n(7),f=n(4),l=n(13),d=r(l),h=n(9),v=o(h),p="_k",g=function(t){return"/"===t.charAt(0)?t:"/"+t},y={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!"+t},decodePath:function(t){return"!"===t.charAt(0)?t.substring(1):t}},noslash:{encodePath:function(t){return"/"===t.charAt(0)?t.substring(1):t},decodePath:g},slash:{encodePath:g,decodePath:g}},m=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s.canUseDOM?void 0:(0,c.default)(!1);var e=t.queryKey,n=t.hashType;"string"!=typeof e&&(e=p),null==n&&(n="slash"),n in y||(n="slash");var r=y[n],o=d.getUserConfirmation,a=function(){return d.getCurrentLocation(r,e)},u=function(t){return d.pushLocation(t,r,e)},l=function(t){return d.replaceLocation(t,r,e)},h=(0,v.default)(i({getUserConfirmation:o},t,{getCurrentLocation:a,pushLocation:u,replaceLocation:l,go:d.go})),g=0,m=void 0,w=function(t,n){1===++g&&(m=d.startListener(h.transitionTo,r,e));var o=n?h.listenBefore(t):h.listen(t);return function(){o(),0===--g&&m()}},P=function(t){return w(t,!0)},O=function(t){return w(t,!1)},b=((0,f.supportsGoWithoutReloadUsingHash)(),function(t){h.go(t)}),L=function(t){return"#"+r.encodePath(h.createHref(t))};return i({},h,{listenBefore:P,listen:O,go:b,createHref:L})};e.default=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(3),a=(r(i),n(5)),u=r(a),c=n(2),s=n(1),f=n(9),l=r(f),d=n(6),h=function(t){return t.filter(function(t){return t.state}).reduce(function(t,e){return t[e.key]=e.state,t},{})},v=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(t)?t={entries:t}:"string"==typeof t&&(t={entries:[t]});var e=function(){var t=p[g],e=(0,s.createPath)(t),n=void 0,r=void 0;t.key&&(n=t.key,r=w(n));var i=(0,s.parsePath)(e);return(0,c.createLocation)(o({},i,{state:r}),void 0,n)},n=function(t){var e=g+t;return e>=0&&e<p.length},r=function(t){if(t&&n(t)){g+=t;var r=e();f.transitionTo(o({},r,{action:d.POP}))}},i=function(t){g+=1,g<p.length&&p.splice(g),p.push(t),m(t.key,t.state)},a=function(t){p[g]=t,m(t.key,t.state)},f=(0,l.default)(o({},t,{getCurrentLocation:e,pushLocation:i,replaceLocation:a,go:r})),v=t,p=v.entries,g=v.current;"string"==typeof p?p=[p]:Array.isArray(p)||(p=["/"]),p=p.map(function(t){return(0,c.createLocation)(t)}),null==g?g=p.length-1:g>=0&&g<p.length?void 0:(0,u.default)(!1);var y=h(p),m=function(t,e){return y[t]=e},w=function(t){return y[t]};return o({},f,{canGo:n})};e.default=v},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(10),a=r(i),u=n(1),c=function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t(e),r=e.basename,i=function(t){return t?(r&&null==t.basename&&(0===t.pathname.toLowerCase().indexOf(r.toLowerCase())?(t.pathname=t.pathname.substring(r.length),t.basename=r,""===t.pathname&&(t.pathname="/")):t.basename=""),t):t},c=function(t){if(!r)return t;var e="string"==typeof t?(0,u.parsePath)(t):t,n=e.pathname,i="/"===r.slice(-1)?r:r+"/",a="/"===n.charAt(0)?n.slice(1):n,c=i+a;return o({},e,{pathname:c})},s=function(){return i(n.getCurrentLocation())},f=function(t){return n.listenBefore(function(e,n){return(0,a.default)(t,i(e),n)})},l=function(t){return n.listen(function(e){return t(i(e))})},d=function(t){return n.push(c(t))},h=function(t){return n.replace(c(t))},v=function(t){return n.createPath(c(t))},p=function(t){return n.createHref(c(t))},g=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return i(n.createLocation.apply(n,[c(t)].concat(r)))};return o({},n,{getCurrentLocation:s,listenBefore:f,listen:l,push:d,replace:h,createPath:v,createHref:p,createLocation:g})}};e.default=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(5),a=r(i),u=n(4),c=n(7),s=function(t){var e=function(e){var n=t();if("string"==typeof n)return(e||window.event).returnValue=n,n};return(0,u.addEventListener)(window,"beforeunload",e),function(){return(0,u.removeEventListener)(window,"beforeunload",e)}},f=function(t){return c.canUseDOM?void 0:(0,a.default)(!1),function(e){var n=t(e),r=[],i=void 0,a=function(){for(var t=void 0,e=0,n=r.length;null==t&&e<n;++e)t=r[e].call();return t},u=function(t){return 1===r.push(t)&&(i=s(a)),function(){r=r.filter(function(e){return e!==t}),0===r.length&&i&&(i(),i=null)}};return o({},n,{listenBeforeUnload:u})}};e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(22),a=n(10),u=r(a),c=n(2),s=n(1),f=function(t){return(0,i.stringify)(t).replace(/%20/g,"+")},l=i.parse,d=function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t(e),r=e.stringifyQuery,i=e.parseQueryString;"function"!=typeof r&&(r=f),"function"!=typeof i&&(i=l);var a=function(t){return t?(null==t.query&&(t.query=i(t.search.substring(1))),t):t},d=function(t,e){if(null==e)return t;var n="string"==typeof t?(0,s.parsePath)(t):t,i=r(e),a=i?"?"+i:"";return o({},n,{search:a})},h=function(){return a(n.getCurrentLocation())},v=function(t){return n.listenBefore(function(e,n){return(0,u.default)(t,a(e),n)})},p=function(t){return n.listen(function(e){return t(a(e))})},g=function(t){return n.push(d(t,t.query))},y=function(t){return n.replace(d(t,t.query))},m=function(t){return n.createPath(d(t,t.query))},w=function(t){return n.createHref(d(t,t.query))},P=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];var i=n.createLocation.apply(n,[d(t,t.query)].concat(r));return t.query&&(i.query=(0,c.createQuery)(t.query)),a(i)};return o({},n,{getCurrentLocation:h,listenBefore:v,listen:p,push:g,replace:y,createPath:m,createHref:w,createLocation:P})}};e.default=d},function(t,e){/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
;function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){for(var r,u,c=n(t),s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var f in r)i.call(r,f)&&(c[f]=r[f]);if(o){u=o(r);for(var l=0;l<u.length;l++)a.call(r,u[l])&&(c[u[l]]=r[u[l]])}}return c}},function(t,e,n){"use strict";function r(t){switch(t.arrayFormat){case"index":return function(e,n,r){return null===n?[i(e,t),"[",r,"]"].join(""):[i(e,t),"[",i(r,t),"]=",i(n,t)].join("")};case"bracket":return function(e,n){return null===n?i(e,t):[i(e,t),"[]=",i(n,t)].join("")};default:return function(e,n){return null===n?i(e,t):[i(e,t),"=",i(n,t)].join("")}}}function o(t){var e;switch(t.arrayFormat){case"index":return function(t,n,r){return e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===r[t]&&(r[t]={}),void(r[t][e[1]]=n)):void(r[t]=n)};case"bracket":return function(t,n,r){return e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e&&void 0!==r[t]?void(r[t]=[].concat(r[t],n)):void(r[t]=n)};default:return function(t,e,n){return void 0===n[t]?void(n[t]=e):void(n[t]=[].concat(n[t],e))}}}function i(t,e){return e.encode?e.strict?u(t):encodeURIComponent(t):t}function a(t){return Array.isArray(t)?t.sort():"object"==typeof t?a(Object.keys(t)).sort(function(t,e){return Number(t)-Number(e)}).map(function(e){return t[e]}):t}var u=n(23),c=n(21);e.extract=function(t){return t.split("?")[1]||""},e.parse=function(t,e){e=c({arrayFormat:"none"},e);var n=o(e),r=Object.create(null);return"string"!=typeof t?r:(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var e=t.replace(/\+/g," ").split("="),o=e.shift(),i=e.length>0?e.join("="):void 0;i=void 0===i?null:decodeURIComponent(i),n(decodeURIComponent(o),i,r)}),Object.keys(r).sort().reduce(function(t,e){var n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=a(n):t[e]=n,t},Object.create(null))):r},e.stringify=function(t,e){var n={encode:!0,strict:!0,arrayFormat:"none"};e=c(n,e);var o=r(e);return t?Object.keys(t).sort().map(function(n){var r=t[n];if(void 0===r)return"";if(null===r)return i(n,e);if(Array.isArray(r)){var a=[];return r.slice().forEach(function(t){void 0!==t&&a.push(o(n,t,a.length))}),a.join("&")}return i(n,e)+"="+i(r,e)}).filter(function(t){return t.length>0}).join("&"):""}},function(t,e){"use strict";t.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}}])});