1
1
"use strict" ;
2
2
3
+ function _typeof ( o ) { "@babel/helpers - typeof" ; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( o ) { return typeof o ; } : function ( o ) { return o && "function" == typeof Symbol && o . constructor === Symbol && o !== Symbol . prototype ? "symbol" : typeof o ; } , _typeof ( o ) ; }
3
4
Object . defineProperty ( exports , "__esModule" , {
4
5
value : true
5
6
} ) ;
6
7
exports [ "default" ] = void 0 ;
7
-
8
8
var _react = _interopRequireDefault ( require ( "react" ) ) ;
9
-
10
9
function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { "default" : obj } ; }
11
-
12
- function _typeof ( obj ) { if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
13
-
14
10
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
15
-
16
- function _defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } }
17
-
18
- function _createClass ( Constructor , protoProps , staticProps ) { if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) _defineProperties ( Constructor , staticProps ) ; return Constructor ; }
19
-
20
- function _possibleConstructorReturn ( self , call ) { if ( call && ( _typeof ( call ) === "object" || typeof call === "function" ) ) { return call ; } return _assertThisInitialized ( self ) ; }
21
-
11
+ function _defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , _toPropertyKey ( descriptor . key ) , descriptor ) ; } }
12
+ function _createClass ( Constructor , protoProps , staticProps ) { if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) _defineProperties ( Constructor , staticProps ) ; Object . defineProperty ( Constructor , "prototype" , { writable : false } ) ; return Constructor ; }
13
+ function _toPropertyKey ( arg ) { var key = _toPrimitive ( arg , "string" ) ; return _typeof ( key ) === "symbol" ? key : String ( key ) ; }
14
+ function _toPrimitive ( input , hint ) { if ( _typeof ( input ) !== "object" || input === null ) return input ; var prim = input [ Symbol . toPrimitive ] ; if ( prim !== undefined ) { var res = prim . call ( input , hint || "default" ) ; if ( _typeof ( res ) !== "object" ) return res ; throw new TypeError ( "@@toPrimitive must return a primitive value." ) ; } return ( hint === "string" ? String : Number ) ( input ) ; }
15
+ function _inherits ( subClass , superClass ) { if ( typeof superClass !== "function" && superClass !== null ) { throw new TypeError ( "Super expression must either be null or a function" ) ; } subClass . prototype = Object . create ( superClass && superClass . prototype , { constructor : { value : subClass , writable : true , configurable : true } } ) ; Object . defineProperty ( subClass , "prototype" , { writable : false } ) ; if ( superClass ) _setPrototypeOf ( subClass , superClass ) ; }
16
+ function _setPrototypeOf ( o , p ) { _setPrototypeOf = Object . setPrototypeOf ? Object . setPrototypeOf . bind ( ) : function _setPrototypeOf ( o , p ) { o . __proto__ = p ; return o ; } ; return _setPrototypeOf ( o , p ) ; }
17
+ function _createSuper ( Derived ) { var hasNativeReflectConstruct = _isNativeReflectConstruct ( ) ; return function _createSuperInternal ( ) { var Super = _getPrototypeOf ( Derived ) , result ; if ( hasNativeReflectConstruct ) { var NewTarget = _getPrototypeOf ( this ) . constructor ; result = Reflect . construct ( Super , arguments , NewTarget ) ; } else { result = Super . apply ( this , arguments ) ; } return _possibleConstructorReturn ( this , result ) ; } ; }
18
+ function _possibleConstructorReturn ( self , call ) { if ( call && ( _typeof ( call ) === "object" || typeof call === "function" ) ) { return call ; } else if ( call !== void 0 ) { throw new TypeError ( "Derived constructors may only return object or undefined" ) ; } return _assertThisInitialized ( self ) ; }
22
19
function _assertThisInitialized ( self ) { if ( self === void 0 ) { throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; } return self ; }
23
-
24
- function _getPrototypeOf ( o ) { _getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf : function _getPrototypeOf ( o ) { return o . __proto__ || Object . getPrototypeOf ( o ) ; } ; return _getPrototypeOf ( o ) ; }
25
-
26
- function _inherits ( subClass , superClass ) { if ( typeof superClass !== "function" && superClass !== null ) { throw new TypeError ( "Super expression must either be null or a function" ) ; } subClass . prototype = Object . create ( superClass && superClass . prototype , { constructor : { value : subClass , writable : true , configurable : true } } ) ; if ( superClass ) _setPrototypeOf ( subClass , superClass ) ; }
27
-
28
- function _setPrototypeOf ( o , p ) { _setPrototypeOf = Object . setPrototypeOf || function _setPrototypeOf ( o , p ) { o . __proto__ = p ; return o ; } ; return _setPrototypeOf ( o , p ) ; }
29
-
20
+ function _isNativeReflectConstruct ( ) { if ( typeof Reflect === "undefined" || ! Reflect . construct ) return false ; if ( Reflect . construct . sham ) return false ; if ( typeof Proxy === "function" ) return true ; try { Boolean . prototype . valueOf . call ( Reflect . construct ( Boolean , [ ] , function ( ) { } ) ) ; return true ; } catch ( e ) { return false ; } }
21
+ function _getPrototypeOf ( o ) { _getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf . bind ( ) : function _getPrototypeOf ( o ) { return o . __proto__ || Object . getPrototypeOf ( o ) ; } ; return _getPrototypeOf ( o ) ; }
30
22
var DefaultWrapper = function DefaultWrapper ( props ) {
31
- return _react [ "default" ] . createElement ( "div" , null , props . children ) ;
23
+ return /*#__PURE__*/ _react [ "default" ] . createElement ( "div" , null , props . children ) ;
32
24
} ;
33
-
34
- var ComponentRenderer =
35
- /*#__PURE__*/
36
- function ( _React$Component ) {
25
+ var ComponentRenderer = /*#__PURE__*/ function ( _React$Component ) {
37
26
_inherits ( ComponentRenderer , _React$Component ) ;
38
-
27
+ var _super = _createSuper ( ComponentRenderer ) ;
39
28
function ComponentRenderer ( props ) {
40
29
var _this ;
41
-
42
30
_classCallCheck ( this , ComponentRenderer ) ;
43
-
44
- _this = _possibleConstructorReturn ( this , _getPrototypeOf ( ComponentRenderer ) . call ( this , props ) ) ;
31
+ _this = _super . call ( this , props ) ;
45
32
_this . Wrapper = window . _CustomWrapper || DefaultWrapper ;
46
33
_this . state = {
47
34
hasError : false ,
48
35
error : null
49
36
} ;
50
37
return _this ;
51
38
}
52
-
53
39
_createClass ( ComponentRenderer , [ {
54
40
key : "componentDidCatch" ,
55
41
value : function componentDidCatch ( error ) {
@@ -59,12 +45,9 @@ function (_React$Component) {
59
45
key : "render" ,
60
46
value : function render ( ) {
61
47
var children = this . props . children ;
62
- return _react [ "default" ] . createElement ( this . Wrapper , this . props , children ) ;
48
+ return /*#__PURE__*/ _react [ "default" ] . createElement ( this . Wrapper , this . props , children ) ;
63
49
}
64
50
} ] ) ;
65
-
66
51
return ComponentRenderer ;
67
52
} ( _react [ "default" ] . Component ) ;
68
-
69
- var _default = ComponentRenderer ;
70
- exports [ "default" ] = _default ;
53
+ var _default = exports [ "default" ] = ComponentRenderer ;
0 commit comments