//>>built
define("dojox/app/utils/layout",["dojo/_base/array","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/lang"],function(n,p,k,q,l){function r(c,a){var d=c.resize?c.resize(a):k.setMarginBox(c.domNode,a);d?l.mixin(c,d):(l.mixin(c,k.getMarginBox(c.domNode)),l.mixin(c,a))}return{marginBox2contentBox:function(c,a){var d=q.getComputedStyle(c),g=k.getMarginExtents(c,d),m=k.getPadBorderExtents(c,d);return{l:q.toPixelValue(c,d.paddingLeft),t:q.toPixelValue(c,d.paddingTop),w:a.w-(g.w+m.w),h:a.h-
(g.h+m.h)}},layoutChildren:function(c,a,d,g,m){a=l.mixin({},a);p.add(c,"dijitLayoutContainer");d=n.filter(d,function(b){return"center"!=b._constraint&&"client"!=b.layoutAlign}).concat(n.filter(d,function(b){return"center"==b._constraint||"client"==b.layoutAlign}));n.forEach(d,function(b){var f=b.domNode,e=b._constraint||b.layoutAlign;if(!e)throw Error("No constraint setting for "+b.id);var h=f.style;h.left=a.l+"px";h.top=a.t+"px";h.position="absolute";var t=p.add;var u=e.substring(0,1).toUpperCase()+
e.substring(1);t.call(p,f,"dijitAlign"+u);f={};g&&g==b.id&&(f["top"==b._constraint||"bottom"==b._constraint?"h":"w"]=m);"top"==e||"bottom"==e?(f.w=a.w,r(b,f),a.h-=b.h,"top"==e?a.t+=b.h:h.top=a.t+a.h+"px"):"left"==e||"right"==e?(f.h=a.h,r(b,f),a.w-=b.w,"left"==e?a.l+=b.w:h.left=a.l+a.w+"px"):"client"!=e&&"center"!=e||r(b,a)})}}});