@ -29,42 +29,75 @@ class DirectionUnitDependentAttribute { 
			
		
	
		
		
			
				
					        return  this ;         return  this ;  
			
		
	
		
		
			
				
					    }     }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					    / * *  
			
		
	
		
		
			
				
					     *   
			
		
	
		
		
			
				
					     *  @ returns  { array < * > }  list  of  attributes  
			
		
	
		
		
			
				
					     * /  
			
		
	
		
		
			
				
					    getOrderedAttributes ( ) {  
			
		
	
		
		
			
				
					        return  [ this . _ fFirst ,  this . _ fSecond ,  this . _ fThird ,  this . _ fForth ] ;  
			
		
	
		
		
			
				
					    }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					    / * *     / * *  
			
		
	
		
		
			
				
					     *  @ returns  { Array < string > }      *  @ returns  { Array < string > }  
			
		
	
		
		
			
				
					     * /      * /  
			
		
	
		
		
			
				
					    getOrderedValues ( )  {     getOrderedValues ( )  {  
			
		
	
		
		
			
				
					
					        return  [ this . _ fFirst  +  this . _ unit ,  this . _ fSecond  +  this . _ unit ,  this . _ fThird  +  this . _ unit ,  this . _ fForth  +  this . _ unit ]         return  this . getOrderedAttributes ( ) . map ( a => a + this . _ unit ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					    }     }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					    / * *     / * *  
			
		
	
		
		
			
				
					     *  Since  the  basic  values  are  from  "first"  to  "fourth" ,  
			
		
	
		
		
			
				
					     *  they  can  be  also  accessed  in  the  ordered  way .   
			
		
	
		
		
			
				
					     *       *   
			
		
	
		
		
			
				
					
					     *  @ param  { SidingRef }  sidingRef       *  Mainly  used  by  the  setup  of  directions  of  subclasses .  
			
				
				
			
		
	
		
		
			
				
					
					     *  @ param  { * }  value      *  @ param  { number }  index  [ 1 , 4 ]  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					     *  @ param  { number }  value   
			
		
	
		
		
			
				
					     *  @ returns  { DirectionUnitDependentAttribute }  this      *  @ returns  { DirectionUnitDependentAttribute }  this  
			
		
	
		
		
			
				
					     * /      * /  
			
		
	
		
		
			
				
					
					    setBySidingRef ( sidingRef ,  value )  {     setByIndex ( index ,  value )  {  
			
				
				
			
		
	
		
		
			
				
					
					        sidingRef ( this )  =  value ;         switch  ( index )  {  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					            case  1 :  
			
		
	
		
		
			
				
					                this . _ fFirst  =  value ;  
			
		
	
		
		
			
				
					                break ;  
			
		
	
		
		
			
				
					            case  2 :  
			
		
	
		
		
			
				
					                this . _ fSecond  =  value ;  
			
		
	
		
		
			
				
					                break ;  
			
		
	
		
		
			
				
					            case  3 :  
			
		
	
		
		
			
				
					                this . _ fThird  =  value ;  
			
		
	
		
		
			
				
					                break ;  
			
		
	
		
		
			
				
					            case  4 :  
			
		
	
		
		
			
				
					                this . _ fForth  =  value ;  
			
		
	
		
		
			
				
					                break ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					            default :  
			
		
	
		
		
			
				
					                this . _ fFirst  =  value ;  
			
		
	
		
		
			
				
					                break ;  
			
		
	
		
		
			
				
					        }  
			
		
	
		
		
			
				
					        return  this ;         return  this ;  
			
		
	
		
		
			
				
					    }     }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					    / * *     / * *  
			
		
	
		
		
			
				
					     *  Since  the  basic  values  are  from  "first"  to  "fourth" ,  
			
		
	
		
		
			
				
					     *  they  can  be  also  accessed  in  the  ordered  way .   
			
		
	
		
		
			
				
					     *       *   
			
		
	
		
		
			
				
					
					     *  @ param  { SidingRef }  sidingRef  the  reference  enum  for  this  SideUnitDependenAttribute  ( child )      *  Mainly  used  by  the  setup  of  directions  of  subclasses .  
			
				
				
			
		
	
		
		
			
				
					
					     *  @ returns  the  value  of  the  referenced  SidingRef .      *  @ param  { number }  index  [ 1 , 4 ]  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					     *  @ returns  { * }  this  value  of  index   
			
		
	
		
		
			
				
					     * /      * /  
			
		
	
		
		
			
				
					
					    getBySidingRef ( sidingRef )  {     getByIndex ( index )  {  
			
				
				
			
		
	
		
		
			
				
					
					        return  sidingRef ( this )         switch  ( index )  {  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					            case  1 :  
			
		
	
		
		
			
				
					                return  this . _ fFirst ;  
			
		
	
		
		
			
				
					            case  2 :  
			
		
	
		
		
			
				
					                return  this . _ fSecond ;  
			
		
	
		
		
			
				
					            case  3 :  
			
		
	
		
		
			
				
					                return  this . _ fThird ;  
			
		
	
		
		
			
				
					            case  4 :  
			
		
	
		
		
			
				
					                return  this . _ fForth ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					            default :  
			
		
	
		
		
			
				
					                return  this . _ fFirst ;  
			
		
	
		
		
			
				
					        }  
			
		
	
		
		
			
				
					    }     }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					}  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					const  SidingRefSides  =  Object . freeze ( {  
			
		
	
		
		
			
				
					    LEFT :  ( sideUnitDependentAttribute )  =>  sideUnitDependentAttribute . _ fFirst ,  
			
		
	
		
		
			
				
					    TOP :  ( sideUnitDependentAttribute )  =>  sideUnitDependentAttribute . _ fSecond ,  
			
		
	
		
		
			
				
					    RIGHT :  ( sideUnitDependentAttribute )  =>  sideUnitDependentAttribute . _ fThird ,  
			
		
	
		
		
			
				
					    BOTTOM :  ( sideUnitDependentAttribute )  =>  sideUnitDependentAttribute . _ fForth  
			
		
	
		
		
			
				
					} )  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					    / * *     / * *  
			
		
	
		
		
			
				
					     *  Placeholder  for  overrides      *  Placeholder  for  overrides  
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -142,15 +175,6 @@ class Sides extends DirectionUnitDependentAttribute { 
			
		
	
		
		
			
				
					        return  this ;         return  this ;  
			
		
	
		
		
			
				
					    }     }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					    getSidingRefValueMap ( )  {  
			
		
	
		
		
			
				
					        return  {  
			
		
	
		
		
			
				
					            [ SidingRefSides . LEFT ] :  this . getBySidingRef ( SidingRefSides . LEFT ) ,  
			
		
	
		
		
			
				
					            [ SidingRefSides . TOP ] :  this . getBySidingRef ( SidingRefSides . TOP ) ,  
			
		
	
		
		
			
				
					            [ SidingRefSides . RIGHT ] :  this . getBySidingRef ( SidingRefSides . RIGHT ) ,  
			
		
	
		
		
			
				
					            [ SidingRefSides . BOTTOM ] :  this . getBySidingRef ( SidingRefSides . BOTTOM )  
			
		
	
		
		
			
				
					        }  
			
		
	
		
		
			
				
					    }  
			
		
	
		
		
			
				
					}  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					    / * *     / * *  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -173,6 +197,13 @@ class Sides extends DirectionUnitDependentAttribute { 
			
		
	
		
		
			
				
					        this . _ fSecond  =  amount ;         this . _ fSecond  =  amount ;  
			
		
	
		
		
			
				
					        this . _ fForth  =  amount ;         this . _ fForth  =  amount ;  
			
		
	
		
		
			
				
					        return  this ;         return  this ;  
			
		
	
		
		
			
				
					    toModifications ( )  {  
			
		
	
		
		
			
				
					        return  [  
			
		
	
		
		
			
				
					            {  key :  "left" ,  value :  this . _ fFirst  +  this . _ unit  } ,  
			
		
	
		
		
			
				
					            {  key :  "top" ,  value :  this . _ fSecond  +  this . _ unit  } ,  
			
		
	
		
		
			
				
					            {  key :  "right" ,  value :  this . _ fThird  +  this . _ unit  } ,  
			
		
	
		
		
			
				
					            {  key :  "bottom" ,  value :  this . _ fForth  +  this . _ unit  }  
			
		
	
		
		
			
				
					        ]  
			
		
	
		
		
			
				
					    }     }  
			
		
	
		
		
			
				
					} }  
			
		
	
		
		
			
				
					
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -192,6 +223,15 @@ class PaddingChain extends Sides { 
			
		
	
		
		
			
				
					    ensureModifier ( ) {     ensureModifier ( ) {  
			
		
	
		
		
			
				
					        return  this . toModifier ( )         return  this . toModifier ( )  
			
		
	
		
		
			
				
					    }     }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					    toModifications ( )  {  
			
		
	
		
		
			
				
					        return  [  
			
		
	
		
		
			
				
					            {  key :  "padding-left" ,  value :  this . _ fFirst  +  this . _ unit  } ,  
			
		
	
		
		
			
				
					            {  key :  "padding-top" ,  value :  this . _ fSecond  +  this . _ unit  } ,  
			
		
	
		
		
			
				
					            {  key :  "padding-right" ,  value :  this . _ fThird  +  this . _ unit  } ,  
			
		
	
		
		
			
				
					            {  key :  "padding-bottom" ,  value :  this . _ fForth  +  this . _ unit  }  
			
		
	
		
		
			
				
					        ]  
			
		
	
		
		
			
				
					    }  
			
		
	
		
		
			
				
					} }