| 
					
				 | 
			
			
				@@ -20,8 +20,8 @@ export const ID_VARIANTS = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   6: 'reflexion', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   7: 'lecture', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   8: 'sensible', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  23: 'kit' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  // undefined: 'creation' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  23: 'kit', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  0: 'creation' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export const VARIANT_IDS = Object.fromEntries( 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -86,6 +86,30 @@ export function getRandomIds (ids, count = 3) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+export function parseTree (treeData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if ('creations' in treeData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (treeData.creations) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!Array.isArray(treeData.children)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        treeData.children = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      treeData.creations.forEach(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        item.variant = [{ id: 0 }] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        treeData.children.push(item) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    delete treeData.creations 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  for (const relation of RELATIONS) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (relation in treeData && treeData[relation]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      treeData[relation] = treeData[relation].map(node => parseTree(node)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  return treeData 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export function buildTree (treeData, nodesData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const uniqueIds = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const nodes = [] 
			 |