2 lines
6.0 KiB
JavaScript
2 lines
6.0 KiB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["react","react-router-dom"],t):"object"==typeof exports?exports.ReactRouterBootstrap=t(require("react"),require("react-router-dom")):e.ReactRouterBootstrap=t(e.React,e.ReactRouterDOM)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.LinkContainer=t.IndexLinkContainer=void 0;var o=r(4),a=n(o),i=r(1),c=n(i);t.IndexLinkContainer=a.default,t.LinkContainer=c.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.LinkContainer=void 0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(2),f=n(s),p=r(6),d=n(p),y=r(3),h=function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)},b=t.LinkContainer=function(e){function t(){var r,n,o;a(this,t);for(var c=arguments.length,u=Array(c),l=0;l<c;l++)u[l]=arguments[l];return r=n=i(this,e.call.apply(e,[this].concat(u))),n.handleClick=function(e){var t=n.props,r=t.children,o=t.onClick;if(r.props.onClick&&r.props.onClick(e),o&&o(e),!e.defaultPrevented&&0===e.button&&!h(e)){e.preventDefault();var a=n.props,i=a.replace,c=a.to,u=a.history;i?u.replace(c):u.push(c)}},o=r,i(n,o)}return c(t,e),t.prototype.render=function(){var e=this,t=this.props,r=t.history,n=(t.location,t.match,t.staticContext,t.children),a=(t.replace,t.to),i=t.exact,c=t.strict,s=t.activeClassName,p=t.className,d=t.activeStyle,h=t.style,b=t.isActive,m=o(t,["history","location","match","staticContext","children","replace","to","exact","strict","activeClassName","className","activeStyle","style","isActive"]),v=r.createHref("string"==typeof a?{pathname:a}:a),x=f.default.Children.only(n);return f.default.createElement(y.Route,{path:"object"===("undefined"==typeof a?"undefined":l(a))?a.pathname:a,exact:i,strict:c,children:function(t){var r=t.location,n=t.match,o=!!(b?b(n,r):n);return f.default.cloneElement(x,u({},m,{className:[p,x.props.className,o?s:null].join(" ").trim(),style:o?u({},h,d):h,href:v,onClick:e.handleClick}))}})},t}(s.Component);b.propTypes={history:d.default.shape({push:d.default.func.isRequired,replace:d.default.func.isRequired,createHref:d.default.func.isRequired}).isRequired,location:d.default.object,match:d.default.object,staticContext:d.default.object,children:d.default.element.isRequired,onClick:d.default.func,replace:d.default.bool,to:d.default.oneOfType([d.default.string,d.default.object]).isRequired,exact:d.default.bool,strict:d.default.bool,className:d.default.string,activeClassName:d.default.string,style:d.default.object,activeStyle:d.default.object,isActive:d.default.func},b.defaultProps={replace:!1,exact:!1,strict:!1,activeClassName:"active"},t.default=(0,y.withRouter)(b)},function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.IndexLinkContainer=void 0;var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(2),l=n(u),s=r(3),f=r(1),p=n(f),d=t.IndexLinkContainer=function(e){function t(){return o(this,t),a(this,e.apply(this,arguments))}return i(t,e),t.prototype.render=function(){return l.default.createElement(p.default,c({},this.props,{exact:!0}))},t}(l.default.Component);t.default=(0,s.withRouter)(d)},function(e,t,r){"use strict";function n(){}function o(){}var a=r(7);o.resetWarningCache=n,e.exports=function(){function e(e,t,r,n,o,i){if(i!==a){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:n};return r.PropTypes=r,r}},function(e,t,r){e.exports=r(5)()},function(e,t){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=r}])});
|
|
//# sourceMappingURL=ReactRouterBootstrap.min.js.map
|