2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								/ *  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MIT  License  http : //www.opensource.org/licenses/mit-license.php
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Author  Tobias  Koppers  @ sokra ,  Zackary  Jackson  @ ScriptedAlchemy ,  Marais  Rossouw  @ maraisr 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								* /  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								"use strict" ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-10-26 21:41:46 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								const  {  OriginalSource ,  RawSource  }  =  require ( "webpack-sources" ) ;  
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								const  AsyncDependenciesBlock  =  require ( "../AsyncDependenciesBlock" ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								const  Module  =  require ( "../Module" ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								const  RuntimeGlobals  =  require ( "../RuntimeGlobals" ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								const  Template  =  require ( "../Template" ) ;  
						 
					
						
							
								
									
										
										
										
											2021-11-25 19:05:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								const  StaticExportsDependency  =  require ( "../dependencies/StaticExportsDependency" ) ;  
						 
					
						
							
								
									
										
										
										
											2020-04-17 08:16:09 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								const  makeSerializable  =  require ( "../util/makeSerializable" ) ;  
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								const  ContainerExposedDependency  =  require ( "./ContainerExposedDependency" ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("../ChunkGraph")} ChunkGraph */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("../ChunkGroup")} ChunkGroup */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("../Compilation")} Compilation */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */  
						 
					
						
							
								
									
										
										
										
											2020-05-05 16:43:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */  
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("../RequestShortener")} RequestShortener */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("../WebpackError")} WebpackError */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("../util/Hash")} Hash */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/** @typedef {import("./ContainerEntryDependency")} ContainerEntryDependency */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 21:50:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/ * *  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  @ typedef  { Object }  ExposeOptions 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  @ property  { string [ ] }  import  requests  to  exposed  modules  ( last  one  is  exported ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-29 01:00:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 *  @ property  { string }  name  custom  chunk  name  for  the  exposed  module 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 21:50:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								const  SOURCE _TYPES  =  new  Set ( [ "javascript" ] ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-17 08:16:09 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								class  ContainerEntryModule  extends  Module  {  
						 
					
						
							
								
									
										
										
										
											2020-02-27 01:29:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/ * * 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-05 16:43:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									 *  @ param  { string }  name  container  entry  name 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 21:50:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									 *  @ param  { [ string ,  ExposeOptions ] [ ] }  exposes  list  of  exposed  modules 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-26 23:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									 *  @ param  { string }  shareScope  name  of  the  share  scope 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-27 01:29:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									 * / 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-26 23:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									constructor ( name ,  exposes ,  shareScope )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										super ( "javascript/dynamic" ,  null ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-05 16:43:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										this . _name  =  name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										this . _exposes  =  exposes ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-26 23:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										this . _shareScope  =  shareScope ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/ * * 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-18 17:01:20 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									 *  @ returns  { Set < string > }  types  available  ( do  not  mutate ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									getSourceTypes ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  SOURCE _TYPES ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ returns  { string }  a  unique  identifier  of  the  module 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									identifier ( )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-26 23:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  ` container entry ( ${ this . _shareScope } )  ${ JSON . stringify ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											this . _exposes 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										) } ` ;
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ param  { RequestShortener }  requestShortener  the  request  shortener 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ returns  { string }  a  user  readable  identifier  of  the  module 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									readableIdentifier ( requestShortener )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  ` container entry ` ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-05 16:43:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ param  { LibIdentOptions }  options  options 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ returns  { string  |  null }  an  identifier  for  library  inclusion 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									libIdent ( options )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-14 19:05:28 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  ` ${ this . layer  ?  ` ( ${ this . layer } )/ `  :  "" } webpack/container/entry/ ${ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											this . _name 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} ` ;
 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-05 16:43:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ param  { NeedBuildContext }  context  context  info 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-24 20:27:31 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									 *  @ param  { function ( ( WebpackError  |  null ) = ,  boolean = ) :  void }  callback  callback  function ,  returns  true ,  if  the  module  needs  a  rebuild 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									needBuild ( context ,  callback )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  callback ( null ,  ! this . buildMeta ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ param  { WebpackOptions }  options  webpack  options 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ param  { Compilation }  compilation  the  compilation 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ param  { ResolverWithOptions }  resolver  the  resolver 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ param  { InputFileSystem }  fs  the  file  system 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ param  { function ( WebpackError = ) :  void }  callback  callback  function 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									build ( options ,  compilation ,  resolver ,  fs ,  callback )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										this . buildMeta  =  { } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										this . buildInfo  =  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-11 02:14:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											strict :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											topLevelDeclarations :  new  Set ( [ "moduleMap" ,  "get" ,  "init" ] ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										} ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-25 19:05:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										this . buildMeta . exportsType  =  "namespace" ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										this . clearDependenciesAndBlocks ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 21:50:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										for  ( const  [ name ,  options ]  of  this . _exposes )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											const  block  =  new  AsyncDependenciesBlock ( 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-29 01:00:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													name :  options . name 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 21:50:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{  name  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												options . import [ options . import . length  -  1 ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											let  idx  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											for  ( const  request  of  options . import )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												const  dep  =  new  ContainerExposedDependency ( name ,  request ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												dep . loc  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													name , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													index :  idx ++ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												block . addDependency ( dep ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											this . addBlock ( block ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-25 19:05:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										this . addDependency ( new  StaticExportsDependency ( [ "get" ,  "init" ] ,  false ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										callback ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ param  { CodeGenerationContext }  context  context  for  code  generation 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ returns  { CodeGenerationResult }  result 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									codeGeneration ( {  moduleGraph ,  chunkGraph ,  runtimeTemplate  } )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										const  sources  =  new  Map ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-27 05:32:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										const  runtimeRequirements  =  new  Set ( [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											RuntimeGlobals . definePropertyGetters , 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-29 00:12:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											RuntimeGlobals . hasOwnProperty , 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-27 05:32:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											RuntimeGlobals . exports 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										const  getters  =  [ ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										for  ( const  block  of  this . blocks )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 21:50:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											const  {  dependencies  }  =  block ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											const  modules  =  dependencies . map ( dependency  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												const  dep  =  /** @type {ContainerExposedDependency} */  ( dependency ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												return  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													name :  dep . exposedName , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													module :  moduleGraph . getModule ( dep ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													request :  dep . userRequest 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											let  str ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 21:50:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											if  ( modules . some ( m  =>  ! m . module ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												str  =  runtimeTemplate . throwMissingModuleErrorBlock ( { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 21:50:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													request :  modules . map ( m  =>  m . request ) . join ( ", " ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												str  =  ` return  ${ runtimeTemplate . blockPromise ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													block , 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-29 00:12:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													message :  "" , 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
													chunkGraph , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													runtimeRequirements 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-27 01:29:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												} ) } . then ( $ { runtimeTemplate . returningFunction ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													runtimeTemplate . returningFunction ( 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 21:50:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														` ( ${ modules 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															. map ( ( {  module ,  request  } )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																runtimeTemplate . moduleRaw ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																	module , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																	chunkGraph , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																	request , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																	weak :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																	runtimeRequirements 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																} ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															. join ( ", " ) } ) ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-27 01:29:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													) 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												) } ) ; ` ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											getters . push ( 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 21:50:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												` ${ JSON . stringify ( modules [ 0 ] . name ) } :  ${ runtimeTemplate . basicFunction ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													"" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													str 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												) } ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-29 00:16:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										const  source  =  Template . asString ( [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											` var moduleMap = { ` , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Template . indent ( getters . join ( ",\n" ) ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											"};" , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-16 16:42:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											` var get =  ${ runtimeTemplate . basicFunction ( "module, getScope" ,  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												` ${ RuntimeGlobals . currentRemoteGetScope }  = getScope; ` , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												// reusing the getScope variable to avoid creating a new var (and module is also used later)
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												"getScope = (" , 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-29 00:16:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												Template . indent ( [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													` ${ RuntimeGlobals . hasOwnProperty } (moduleMap, module) ` , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													Template . indent ( [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														"? moduleMap[module]()" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														` : Promise.resolve().then( ${ runtimeTemplate . basicFunction ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															"" , 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-05 20:45:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
															"throw new Error('Module \"' + module + '\" does not exist in container.');" 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-29 00:16:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														) } ) ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													] ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												] ) , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-16 16:42:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												");" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												` ${ RuntimeGlobals . currentRemoteGetScope }  = undefined; ` , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												"return getScope;" 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-29 00:16:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											] ) } ; ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-16 16:42:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											` var init =  ${ runtimeTemplate . basicFunction ( "shareScope, initScope" ,  [ 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-03 23:14:11 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												` if (! ${ RuntimeGlobals . shareScopeMap } ) return; ` , 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-26 23:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												` var name =  ${ JSON . stringify ( this . _shareScope ) } ` , 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-19 12:52:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												` var oldScope =  ${ RuntimeGlobals . shareScopeMap } [name]; ` , 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-26 23:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												` if(oldScope && oldScope !== shareScope) throw new Error("Container initialization failed as it has already been initialized with a different share scope"); ` , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												` ${ RuntimeGlobals . shareScopeMap } [name] = shareScope; ` , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-16 16:42:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												` return  ${ RuntimeGlobals . initializeSharing } (name, initScope); ` 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-26 23:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											] ) } ; ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-29 00:16:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											"" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											"// This exports getters to disallow modifications" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											` ${ RuntimeGlobals . definePropertyGetters } (exports, { ` , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Template . indent ( [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												` get:  ${ runtimeTemplate . returningFunction ( "get" ) } , ` , 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-26 23:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												` init:  ${ runtimeTemplate . returningFunction ( "init" ) } ` 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-29 00:16:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											] ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											"});" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										sources . set ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											"javascript" , 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-26 21:41:46 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											this . useSourceMap  ||  this . useSimpleSourceMap 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												?  new  OriginalSource ( source ,  "webpack/container-entry" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												:  new  RawSource ( source ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 07:30:34 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											sources , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											runtimeRequirements 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ param  { string = }  type  the  source  type  for  which  the  size  should  be  estimated 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  @ returns  { number }  the  estimated  size  of  the  module  ( must  be  non - zero ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									size ( type )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  42 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-17 08:16:09 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									serialize ( context )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										const  {  write  }  =  context ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-26 23:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										write ( this . _name ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-05 16:43:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										write ( this . _exposes ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-26 23:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										write ( this . _shareScope ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-17 08:16:09 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										super . serialize ( context ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-26 23:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  deserialize ( context )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-17 08:16:09 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										const  {  read  }  =  context ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-26 23:11:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										const  obj  =  new  ContainerEntryModule ( read ( ) ,  read ( ) ,  read ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										obj . deserialize ( context ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  obj ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-17 08:16:09 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								makeSerializable (  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ContainerEntryModule , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									"webpack/lib/container/ContainerEntryModule" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								module . exports  =  ContainerEntryModule ;