define("Olives/OObject",["StateMachine","Store","Olives/Plugins","Olives/DomUtils","Tools"],function(f,g,i,k,d){returnfunction(a){varc=function(a){varb=j||document.createElement("div");if(a.template){typeofa.template=="string"?b.innerHTML=a.template.trim():a.templateinstanceofHTMLElement&&b.appendChild(a.template);if(b.childNodes.length>1)throwError("UI.template should have only one parent node");elsea.dom=b.childNodes[0];a.plugins.apply(a.dom)}elsethrowError("UI.template must be set prior to render");
define("Olives/UI-plugin",["Olives/OObject","Tools"],function(f,g){returnfunction(i){vark={};this.place=function(d,a){if(k[a]instanceoff)k[a].place(d);elsethrowError(a+" is not an OObject UI in place:"+a);};this.set=function(d,a){returntypeofd=="string"&&ainstanceoff?(k[d]=a,true):false};this.setAll=function(d){g.loop(d,function(a,c){this.set(c,a)},this)};this.get=function(d){returnk[d]};this.setAll(i)}});
define("Olives/OObject",["StateMachine","Store","Olives/Plugins","Olives/DomUtils","Tools"],function(f,i,g,j,c){returnfunction(a){vare=function(a){varb=h||document.createElement("div");if(a.template){typeofa.template=="string"?b.innerHTML=a.template.trim():a.templateinstanceofHTMLElement&&b.appendChild(a.template);if(b.childNodes.length>1)throwError("UI.template should have only one parent node");elsea.dom=b.childNodes[0];a.plugins.apply(a.dom)}elsethrowError("UI.template must be set prior to render");
define("Olives/UI-plugin",["Olives/OObject","Tools"],function(f,i){returnfunction(g){varj={};this.place=function(c,a){if(j[a]instanceoff)j[a].place(c);elsethrowError(a+" is not an OObject UI in place:"+a);};this.set=function(c,a){returntypeofc=="string"&&ainstanceoff?(j[c]=a,true):false};this.setAll=function(c){i.loop(c,function(a,c){this.set(c,a)},this)};this.get=function(c){returnj[c]};this.setAll(g)}});