/*
	Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

//>>built
define("dojo/window","./_base/lang ./sniff ./_base/window ./dom ./dom-geometry ./dom-style ./dom-construct".split(" "),function(M,f,r,N,p,H,u){f.add("rtl-adjust-position-for-verticalScrollBar",function(b,g){var d=r.body(g),e=u.create("div",{style:{overflow:"scroll",overflowX:"visible",direction:"rtl",visibility:"hidden",position:"absolute",left:"0",top:"0",width:"64px",height:"64px"}},d,"last"),h=u.create("div",{style:{overflow:"hidden",direction:"ltr"}},e,"last"),l=0!=p.position(h).x;e.removeChild(h);
d.removeChild(e);return l});f.add("position-fixed-support",function(b,g){var d=r.body(g),e=u.create("span",{style:{visibility:"hidden",position:"fixed",left:"1px",top:"1px"}},d,"last"),h=u.create("span",{style:{position:"fixed",left:"0",top:"0"}},e,"last"),l=p.position(h).x!=p.position(e).x;e.removeChild(h);d.removeChild(e);return l});var v={getBox:function(b){b=b||r.doc;var g="BackCompat"==b.compatMode?r.body(b):b.documentElement,d=p.docScroll(b);if(f("touch")){var e=v.get(b);b=e.innerWidth||g.clientWidth;
g=e.innerHeight||g.clientHeight}else b=g.clientWidth,g=g.clientHeight;return{l:d.x,t:d.y,w:b,h:g}},get:function(b){if(f("ie")&&v!==document.parentWindow){b.parentWindow.execScript("document._parentWindow \x3d window;","Javascript");var g=b._parentWindow;b._parentWindow=null;return g}return b.parentWindow||b.defaultView},scrollIntoView:function(b,g){try{b=N.byId(b);var d=b.ownerDocument||r.doc,e=r.body(d),h=d.documentElement||e.parentNode,l=f("ie")||f("trident"),t=f("webkit");if(b!=e&&b!=h)if(!(f("mozilla")||
l||t||f("opera")||f("trident")||f("edge"))&&"scrollIntoView"in b)b.scrollIntoView(!1);else{var A="BackCompat"==d.compatMode,B=Math.min(e.clientWidth||h.clientWidth,h.clientWidth||e.clientWidth),C=Math.min(e.clientHeight||h.clientHeight,h.clientHeight||e.clientHeight);d=t||A?e:h;var n=g||p.position(b),c=b.parentNode;t=function(k){return 6>=l||7==l&&A?!1:f("position-fixed-support")&&"fixed"==H.get(k,"position").toLowerCase()};var O=this,I=function(k,D,E){"BODY"==k.tagName||"HTML"==k.tagName?O.get(k.ownerDocument).scrollBy(D,
E):(D&&(k.scrollLeft+=D),E&&(k.scrollTop+=E))};if(!t(b))for(;c;){c==e&&(c=d);var a=p.position(c),J=t(c),F="rtl"==H.getComputedStyle(c).direction.toLowerCase();if(c==d)a.w=B,a.h=C,d==h&&(l||f("trident"))&&F&&(a.x+=d.offsetWidth-a.w),a.x=0,a.y=0;else{var w=p.getPadBorderExtents(c);a.w-=w.w;a.h-=w.h;a.x+=w.l;a.y+=w.t;var q=c.clientWidth,x=a.w-q;0<q&&0<x&&(F&&f("rtl-adjust-position-for-verticalScrollBar")&&(a.x+=x),a.w=q);q=c.clientHeight;x=a.h-q;0<q&&0<x&&(a.h=q)}J&&(0>a.y&&(a.h+=a.y,a.y=0),0>a.x&&(a.w+=
a.x,a.x=0),a.y+a.h>C&&(a.h=C-a.y),a.x+a.w>B&&(a.w=B-a.x));var y=n.x-a.x,z=n.y-a.y,K=y+n.w-a.w,L=z+n.h-a.h;if(0<K*y&&(c.scrollLeft||c==d||c.scrollWidth>c.offsetHeight)){var m=Math[0>y?"max":"min"](y,K);F&&(8==l&&!A||5<=f("trident"))&&(m=-m);var G=c.scrollLeft;I(c,m,0);m=c.scrollLeft-G;n.x-=m}0<L*z&&(c.scrollTop||c==d||c.scrollHeight>c.offsetHeight)&&(m=Math.ceil(Math[0>z?"max":"min"](z,L)),G=c.scrollTop,I(c,0,m),m=c.scrollTop-G,n.y-=m);c=c!=d&&!J&&c.parentNode}}}catch(k){b.scrollIntoView(!1)}}};M.setObject("dojo.window",
v);return v});