/*!
 * 
 * [Dojo](https://dojo.io/)
 * Copyright [JS Foundation](https://js.foundation/) & contributors
 * [New BSD license](https://github.com/dojo/meta/blob/master/LICENSE)
 * All rights reserved
 * 
 */
(window.dojoWebpackJsonpdojo_widgets_custom_elements=window.dojoWebpackJsonpdojo_widgets_custom_elements||[]).push([[33],{25:function(e,t,o){"use strict";o.r(t),o.d(t,"Popup",function(){return l});var n=o(88),r=o(106),i=o(80),s=o(92),c=o(5),a=o(93),p=o(94);const l=Object(c.a)({dimensions:n.b,theme:i.a,bodyScroll:s.a,resize:r.b}).properties().children()(function({properties:e,children:t,middleware:{dimensions:o,theme:n,bodyScroll:r,resize:i}}){const{underlayVisible:s=!1,yBottom:l,yTop:u,xRight:d,xLeft:m,onClose:h,open:y}=e();let{position:f="below"}=e();i.get("wrapper");const b=o.get("wrapper"),v=document.documentElement.scrollTop+document.documentElement.clientHeight,g=document.documentElement.scrollTop,w=document.documentElement.clientWidth,_=u+b.size.height<=v,j=l-b.size.height>=g,$=m-b.size.width>=0,O=d+b.size.width<=w;let x={opacity:"0"};if(b.size.height){if(x={left:`${m}px`,opacity:"1"},"below"===f?x.top=_?`${u}px`:`${l-b.size.height}px`:"above"===f&&(x.top=j?`${l-b.size.height}px`:`${u}px`),"left"===f||"right"===f){const e=u-l;x.top=`${Math.max(l+e/2-b.size.height/2,g)}px`}"left"===f?x.left=$?`${m-b.size.width}px`:`${d}px`:"right"===f&&(x.left=O?`${d}px`:`${m-b.size.width}px`)}const k=n.classes(a),[z]=t(),C="function"==typeof z?z(f):z;return r(!y),y&&Object(c.m)("body",null,Object(c.m)("div",{key:"underlay",classes:[n.variant(),p.underlay,s&&k.underlayVisible],onclick:h}),Object(c.m)("div",{key:"wrapper",classes:[n.variant(),p.root],styles:x},C))});t.default=l},80:function(e,t,o){"use strict";o.d(t,"b",function(){return p});var n=o(5),r=o(83),i=o(12);const s=Object(n.a)({coreTheme:r.a}).properties();function c(e){return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function a(e){return e&&e.hasOwnProperty("variant")}const p=s(function({middleware:{coreTheme:e},properties:t}){const{variant:o,get:n,set:r,classes:s}=e;return{compose:(o,n,r)=>{const s=function(){const{theme:o}=t();if(o)return o;const n=e.get();return Object(i.c)(n)?{theme:n.theme,variant:n.variant}:n?n.theme:void 0}(),p=o[" _key"],l=n[" _key"],u=Object.keys(o).reduce((e,t)=>" _key"===t?e:(r&&!e[`${r}${c(t)}`]&&(e[`${r}${c(t)}`]=" "),n[t]||(e[t]=" "),e),{" _key":l}),d=e.classes(u),m=e.classes(n);let h=e.classes(o);if(r){const e=Object.keys(Object.assign({},d,m)).reduce((e,t)=>{if(0===t.indexOf(r)&&t!==r){const o=function(e){return`${e.charAt(0).toLowerCase()}${e.slice(1)}`}(t.replace(r,"")),n="string"==typeof m[t]&&m[t].trim(),i="string"==typeof d[t]&&d[t].trim();!n&&i&&(e[o]=`${h[o]} ${i}`),n&&(e[o]=m[t])}return e},{});return h=Object.assign({},h,e),a(s)?{theme:{theme:Object.assign({},s.theme.theme,{[p]:h}),variants:s.theme.variants},variant:s.variant}:Object.assign({},s,{[p]:h})}const y=Object.keys(h).reduce((e,t)=>{if(" _key"===t)return e;const o="string"==typeof m[t]&&m[t].trim(),n="string"==typeof d[t]&&d[t].trim();return o?e[t]=o:n&&(e[t]=`${e[t]} ${n}`),e},Object.assign({},h));return a(s)?{theme:{theme:Object.assign({},s.theme.theme,{[p]:y}),variants:s.theme.variants},variant:s.variant}:Object.assign({},s,{[p]:y})},variant:()=>"inherit"===t().variant?void 0:o(),get:n,set:r,classes:s}});t.a=p},92:function(e,t,o){"use strict";o.d(t,"a",function(){return c});var n=o(5),r=o(0);const i=Object(n.a)({destroy:n.c}),s=r.a.document.body.style,c=i(function({middleware:{destroy:e}}){let t=!1,o=void 0;const n=()=>{t&&(o?s.setProperty("overflow",o):s.removeProperty("overflow"),t=!1,o=void 0)};return e(()=>{t&&n()}),e=>{e?n():t||(t=!0,o=s.getPropertyValue("overflow"),s.setProperty("overflow","hidden"))}});t.b=c},93:function(e,t,o){e.exports={" _key":"@dojo/widgets/popup",underlayVisible:"popup-m__underlayVisible__1Cxv3"}},94:function(e,t,o){e.exports={" _key":"@dojo/widgets/popup",root:"popup-m__root__3WJlO",underlay:"popup-m__underlay__2CC_p"}}}]);
//# sourceMappingURL=popup-8.0.0-beta.12.js.map