@@ -2,24 +2,42 @@ import React from 'react';
22import require$$0 from 'react-dom' ;
33import { Controller } from '@hotwired/stimulus' ;
44
5- var createRoot ;
5+ var client = { } ;
66
7- var m = require$$0 ;
8- if ( process . env . NODE_ENV === 'production' ) {
9- createRoot = m . createRoot ;
10- m . hydrateRoot ;
11- } else {
12- var i = m . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ;
13- createRoot = function ( c , o ) {
14- i . usingClientEntryPoint = true ;
15- try {
16- return m . createRoot ( c , o ) ;
17- } finally {
18- i . usingClientEntryPoint = false ;
19- }
20- } ;
7+ var hasRequiredClient ;
8+
9+ function requireClient ( ) {
10+ if ( hasRequiredClient ) return client ;
11+ hasRequiredClient = 1 ;
12+
13+ var m = require$$0 ;
14+ if ( process . env . NODE_ENV === 'production' ) {
15+ client . createRoot = m . createRoot ;
16+ client . hydrateRoot = m . hydrateRoot ;
17+ } else {
18+ var i = m . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ;
19+ client . createRoot = function ( c , o ) {
20+ i . usingClientEntryPoint = true ;
21+ try {
22+ return m . createRoot ( c , o ) ;
23+ } finally {
24+ i . usingClientEntryPoint = false ;
25+ }
26+ } ;
27+ client . hydrateRoot = function ( c , h , o ) {
28+ i . usingClientEntryPoint = true ;
29+ try {
30+ return m . hydrateRoot ( c , h , o ) ;
31+ } finally {
32+ i . usingClientEntryPoint = false ;
33+ }
34+ } ;
35+ }
36+ return client ;
2137}
2238
39+ var clientExports = requireClient ( ) ;
40+
2341class default_1 extends Controller {
2442 connect ( ) {
2543 const props = this . propsValue ? this . propsValue : null ;
@@ -45,7 +63,7 @@ class default_1 extends Controller {
4563 _renderReactElement ( reactElement ) {
4664 const element = this . element ;
4765 if ( ! element . root ) {
48- element . root = createRoot ( this . element ) ;
66+ element . root = clientExports . createRoot ( this . element ) ;
4967 }
5068 element . root . render ( reactElement ) ;
5169 }
0 commit comments