{"version":3,"sources":["webpack:///./node_modules/@instructure/ui-dom-utils/es/getScrollParents.js","webpack:///./node_modules/@instructure/ui-dom-utils/es/getOffsetParents.js","webpack:///./node_modules/@instructure/ui-position/es/calculateElementPosition.js","webpack:///./node_modules/@instructure/ui-view/es/ContextView/theme.js","webpack:///./node_modules/@instructure/ui-view/es/ContextView/index.js","webpack:///./node_modules/@instructure/ui-position/es/PositionPropTypes.js","webpack:///./node_modules/@instructure/ui-dom-utils/es/handleMouseOverOut.js","webpack:///./node_modules/@instructure/ui-popover/es/Popover/index.js","webpack:///./node_modules/@instructure/ui-position/es/mirrorPlacement.js","webpack:///./node_modules/@instructure/ui-react-utils/es/ComponentIdentifier.js","webpack:///./node_modules/@instructure/ui-dom-utils/es/addPositionChangeListener.js","webpack:///./node_modules/@instructure/ui-position/es/Position/theme.js","webpack:///./node_modules/@instructure/ui-position/es/Position/index.js"],"names":["getScrollParents","el","parents","canUseDOM","node","findDOMNode","computedStyle","getComputedStyle","position","ownerDocument","parent","nodeType","parentNode","style","err","push","_style","overflow","overflowX","overflowY","test","indexOf","body","document","defaultView","getOffsetParents","tagName","transform","getPropertyValue","transformDefault","calculateElementPosition","element","target","options","placement","hide","container","left","top","display","pos","PositionedElement","offset","arguments","length","this","parsePlacement","Array","isArray","rect","getBoundingClientRect","_offset","offsetToPx","size","key","value","offsetMap","start","center","bottom","end","stretch","_placement","first","second","_ref","addOffsets","parseOffset","scrollTop","get","width","height","hasVerticalPlacement","hasHorizontalPlacement","mirrorPlacement","offsetY","offsetX","i","child","normalizeScrollTop","scrollLeft","doc","documentElement","scrollY","PositionData","_this$options","constrain","over","mirroredPlacement","constrainTo","ownerWindow","call","parentWindow","elementBounds","windowBounds","offsets","parentOffset","positionedParentsOffset","scrollParentsOffset","right","bounds","oob","_this$target$calculat","calculateOffset","formatPlacement","shouldStretchVertically","shouldStretchHorizontally","win","_addOffsets","matchMedia","retina","matches","Math","round","minWidth","minHeight","concat","reduce","sum","parseFloat","sortPlacement","_placement2","_ref2","parsed","split","join","generator","colors","borders","arrowSize","arrowBorderWidth","widthSmall","arrowBackgroundColor","white","arrowBorderColor","tiara","arrowBackgroundColorInverse","licorice","arrowBorderColorInverse","_dec","_class","_class2","_temp","styles","componentId","template","theme","_Component","ContextView","_super","apply","_classes","_classnames","_this$props","props","as","background","children","debug","elementRef","maxHeight","maxWidth","margin","padding","shadow","stacking","textAlign","classes","contextViewRoot","replace","createElement","View","Object","assign","propTypes","className","borderWidth","withVisualDebug","content","borderRadius","borderColor","arrow","displayName","elementType","func","spacing","oneOfType","string","number","oneOf","PositionPropTypes","bool","defaultProps","mountNode","handleMouseOverOut","handler","event","currentTarget","related","relatedTarget","nativeEvent","toElement","contains","_dec2","_dec3","_dec4","_class3","_class4","_temp2","_dec5","_dec6","_dec7","_class5","_class6","_temp3","deprecated","testable","_ComponentIdentifier","PopoverTrigger","ComponentIdentifier","_ComponentIdentifier2","PopoverContent","_super2","show","defaultShow","variant","label","trackPosition","alignArrow","onShow","onDismiss","onToggle","bidirectional","Popover","_super3","_this","isShowingContent","setState","onShowContent","documentClick","onHideContent","toggle","shown","handleDialogDismiss","_this2","shouldReturnFocus","shouldFocusContentOnTriggerBlur","trigger","_trigger","focus","handleDialogBlur","keyCode","codes","tab","shiftKey","handleTriggerKeyDown","preventDefault","_raf","requestAnimationFrame","_dialog","handleTriggerKeyUp","esc","isTooltip","handleTriggerBlur","on","containsActiveElement","_view","handlePositioned","computeOffsets","onPositioned","handlePositionChanged","onPositionChanged","state","defaultIsShowingContent","_id","id","uid","_handleMouseOver","bind","_handleMouseOut","_focusRegion","FocusRegion","_contentElement","shouldCloseOnEscape","shouldCloseOnDocumentClick","activate","forEach","request","cancel","deactivate","blur","nextProps","nextState","shallowEqual","prevProps","prevState","_this$props2","shouldAlignArrow","secondaryPlacement","_this$_view$theme","offsetAmount","px","_this3","pick","Trigger","callRenderProp","renderTrigger","_this$props3","shouldContainFocus","onClick","onFocus","onMouseOut","onMouseOver","expanded","safeCloneElement","ref","onKeyDown","createChainedFunction","onKeyUp","onBlur","_this4","Content","Dialog","open","screenReaderLabel","liveRegion","defaultFocusElement","shouldFocusOnOpen","shouldRenderOffscreen","ViewElement","color","viewProps","c","contentRef","withArrow","rtl","pointerEvents","positionProps","positionTarget","Position","renderContent","renderTarget","shouldTrackPosition","insertAt","arrayOf","mirror","offscreen","delimiter","executeMirrorFunction","mirrorHorizontalPlacement","map","mirrorFunction","result","filter","component","Children","addPositionChangeListener","raf","coords","cancelled","checkPosition","newCoords","positionChanged","remove","req","zIndex","topmost","PositionTarget","locatorAttribute","PositionContent","_timeouts","handlePortalOpen","startTracking","setTimeout","positioned","calculatePosition","debounce","leading","trailing","nextContext","context","toggleLocatorAttributes","stopTracking","_this$state","timeout","clearTimeout","set","toggleLocatorAttribute","_content","contentLocatorAttribute","_target","targetLocatorAttribute","locator","hasAttribute","setAttribute","removeAttribute","shouldPositionOverTarget","_listener","ensureSingleChild","root","Portal","onOpen","Target"],"mappings":";;;;;;;;;;;AAwCA,SAASA,EAAiBC,GACxB,IAAIC,EAAU;AAEd,IAAKC,EAAA,KACH,OAAOD;AAGT,IAAIE,EAAO,OAAAC,EAAA,MAAYJ;AAEvB,GAAIG,EAAM,CAGR,IAAIE,EAAgB,OAAAC,EAAA,MAAiBH,IAAS;AAC9C,IAAII,EAAWF,EAAcE;AAE7B,GAAiB,UAAbA,EACF,MAAO,CAACJ,EAAKK;AAGf,IAAIC,EAASN;AAEb,MAAOM,GAA8B,IAApBA,EAAOC,WAAmBD,EAASA,EAAOE,YAAa,CACtE,IAAIC,OAAQ;AAEZ,IACEA,EAAQ,OAAAN,EAAA,MAAiBG,GACzB,MAAOI,IAGT,GAAqB,qBAAVD,GAAmC,OAAVA,EAAgB,CAClDX,EAAQa,KAAKL;AACb,OAAOR,EAGT,IAAIc,EAASH,EACTI,EAAWD,EAAOC,SAClBC,EAAYF,EAAOE,UACnBC,EAAYH,EAAOG,UAEnB,wBAAwBC,KAAKH,EAAWE,EA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A,KAAkB5J,UAM7B+J,UAAWH,EAAA,KAAkBG,UAK7BsJ,SAAU,IAAU1J,MAAM,CAAC,SAAU,QAOrCvG,UAAWwG,EAAA,KAAkBxG,UAK7BV,QAAS,IAAU8G,UAAU,CAAC,IAAUC,OAAQ,IAAUC,SAK1DjH,QAAS,IAAU+G,UAAU,CAAC,IAAUC,OAAQ,IAAUC,SAK1DuF,GAAI,IAAUxF,OAKd2J,oBAAqB,IAAUvJ,KAK/B6M,yBAA0B,IAAU7M,KAKpCgF,kBAAmB,IAAUvF,KAK7BqF,aAAc,IAAUrF,KAKxB3B,SAAU,IAAUzJ,KAOpB+N,cAAe,IAAUpC,KAKzBxG,KAAM,IAAUwG,MAGfsB,EAAQrB,aAAe,CACxBqJ,kBAAc,EACdrT,YAAQ,EACRE,UAAW,gBACX+J,UAAW,KACXsJ,SAAU,SACVjQ,UAAW,SACXV,QAAS,EACTD,QAAS,EACTwM,QAAI,EACJmE,oBAAqB,KACrBsD,yBAA0B,MAC1B/H,aAAc,SAAsBrQ,KACpCuQ,kBAAmB,SAA2BvQ,KAC9CqJ,SAAU,MACTyD,KAAYF,IAAYA,IAAYA","file":"8-c-b3bee56cf0.js","sourcesContent":["/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport { findDOMNode } from './findDOMNode';\nimport { canUseDOM } from './canUseDOM';\nimport { getComputedStyle } from './getComputedStyle';\n/**\n * ---\n * category: utilities/DOM\n * ---\n *\n * Retrieves the scroll parents of a specified element.\n * Includes parents of nodeType 1 (Element nodes such\n * as

or

) that have overflow css properties\n * set to auto, scroll, or overlay\n *\n * @param {ReactComponent|DomNode} el - component or DOM node\n * @returns {Array} scroll parents\n */\n\nfunction getScrollParents(el) {\n var parents = [];\n\n if (!canUseDOM) {\n return parents;\n }\n\n var node = findDOMNode(el);\n\n if (node) {\n // In firefox if the element is inside an iframe with display: none; window.getComputedStyle() will return null;\n // https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n var computedStyle = getComputedStyle(node) || {};\n var position = computedStyle.position;\n\n if (position === 'fixed') {\n return [node.ownerDocument];\n }\n\n var parent = node; // eslint-disable-next-line no-cond-assign\n\n while (parent && parent.nodeType === 1 && (parent = parent.parentNode)) {\n var style = void 0;\n\n try {\n style = getComputedStyle(parent);\n } catch (err) {} // eslint-disable-line no-empty\n\n\n if (typeof style === 'undefined' || style === null) {\n parents.push(parent);\n return parents;\n }\n\n var _style = style,\n overflow = _style.overflow,\n overflowX = _style.overflowX,\n overflowY = _style.overflowY;\n\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n if (position !== 'absolute' || ['relative', 'absolute', 'fixed'].indexOf(style.position) >= 0) {\n parents.push(parent);\n }\n }\n }\n\n parents.push(node.ownerDocument.body); // If the node is within a frame, account for the parent window scroll\n\n if (node.ownerDocument !== document) {\n parents.push(node.ownerDocument.defaultView);\n }\n }\n\n return parents;\n}\n\nexport default getScrollParents;\nexport { getScrollParents };","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport { findDOMNode } from './findDOMNode';\nimport { canUseDOM } from './canUseDOM';\nimport { getComputedStyle } from './getComputedStyle';\nimport { ownerDocument } from './ownerDocument';\n/**\n * ---\n * category: utilities/DOM\n * ---\n *\n * Retrieves the offset parents of a specified element.\n * Includes parents of nodeType 1 (Element nodes such\n * as

or

) that have either been transformed\n * or that do not have static position.\n *\n * @param {ReactComponent|DomNode} el - component or DOM node\n * @returns {Array} offset parents\n */\n\nfunction getOffsetParents(el) {\n var parents = [];\n\n if (!canUseDOM) {\n return parents;\n }\n\n var node = findDOMNode(el);\n\n if (node) {\n var parent = node; // eslint-disable-next-line no-cond-assign\n\n while ((parent = parent.parentNode) && parent && parent.nodeType === 1 && parent.tagName !== 'BODY') {\n var style = getComputedStyle(parent);\n var transform = style.getPropertyValue(\"-webkit-transform\") || style.getPropertyValue(\"-moz-transform\") || style.getPropertyValue(\"-ms-transform\") || style.getPropertyValue(\"-o-transform\") || style.getPropertyValue(\"transform\") || 'none'; // initial value of transform can be 'none' or a matrix equivalent\n\n var transformDefault = transform === 'none' || transform === 'matrix(1, 0, 0, 1, 0, 0)' ? true : false;\n\n if (style.position !== 'static' || !transformDefault) {\n parents.push(parent);\n }\n }\n\n parents.push(ownerDocument(node).body);\n }\n\n return parents;\n}\n\nexport default getOffsetParents;\nexport { getOffsetParents };","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport { getBoundingClientRect, getScrollParents, getOffsetParents, canUseDOM, findDOMNode, ownerDocument, ownerWindow } from '@instructure/ui-dom-utils';\nimport { mirrorPlacement } from './mirrorPlacement';\n\nfunction calculateElementPosition(element, target, options) {\n if (!element || options.placement === 'offscreen') {\n // hide offscreen content at the bottom of the DOM from screenreaders\n // unless content is contained somewhere else\n var hide = !options.container && element;\n return {\n placement: options.placement,\n style: {\n left: '-9999em',\n overflow: 'hidden',\n position: 'absolute',\n top: '0',\n display: hide ? 'none' : null\n }\n };\n }\n\n var pos = new PositionData(element, target, options);\n return {\n placement: pos.placement,\n style: pos.style\n };\n}\n\nvar PositionedElement = /*#__PURE__*/function () {\n function PositionedElement(element, placement) {\n var offset = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {\n top: 0,\n left: 0\n };\n\n _classCallCheck(this, PositionedElement);\n\n this.node = findDOMNode(element);\n\n if (typeof placement === 'string') {\n this.placement = parsePlacement(placement);\n } else if (Array.isArray(placement)) {\n this.placement = placement;\n } else {\n this.placement = ['bottom', 'center'];\n }\n\n this.rect = getBoundingClientRect(this.node);\n this._offset = offsetToPx(offset, this.size);\n }\n\n _createClass(PositionedElement, [{\n key: \"calculateOffset\",\n value: function calculateOffset(placement) {\n var offsetMap = {\n top: 0,\n start: 0,\n center: '50%',\n bottom: '100%',\n end: '100%',\n stretch: 0\n };\n\n var _placement = _slicedToArray(placement, 2),\n first = _placement[0],\n second = _placement[1];\n\n if (['start', 'end'].indexOf(first) >= 0) {\n var _ref = [second, first];\n first = _ref[0];\n second = _ref[1];\n }\n\n var top = 0;\n var left = 0;\n\n if (typeof offsetMap[first] !== 'undefined') {\n top = offsetMap[first];\n }\n\n if (typeof offsetMap[second] !== 'undefined') {\n left = offsetMap[second];\n }\n\n return addOffsets([offsetToPx({\n top: top,\n left: left\n }, this.size), parseOffset(this._offset, this.placement)]);\n }\n }, {\n key: \"normalizeScrollTop\",\n value: function normalizeScrollTop(element) {\n // Account for cross browser differences with scrollTop attribute on the\n // body element https://bugs.chromium.org/p/chromium/issues/detail?id=766938\n return ownerDocument(this.node).body === element ? 0 : element.scrollTop;\n }\n }, {\n key: \"width\",\n get: function get() {\n return this.rect.width;\n }\n }, {\n key: \"height\",\n get: function get() {\n return this.rect.height;\n }\n }, {\n key: \"size\",\n get: function get() {\n return {\n width: this.width,\n height: this.height\n };\n }\n }, {\n key: \"position\",\n get: function get() {\n return {\n top: this.rect.top,\n left: this.rect.left\n };\n }\n }, {\n key: \"hasVerticalPlacement\",\n get: function get() {\n return ['top', 'bottom'].indexOf(this.placement[0]) >= 0;\n }\n }, {\n key: \"hasHorizontalPlacement\",\n get: function get() {\n return ['start', 'end'].indexOf(this.placement[0]) >= 0;\n }\n }, {\n key: \"shouldStretchVertically\",\n get: function get() {\n return this.placement[1] === 'stretch' && this.hasVerticalPlacement;\n }\n }, {\n key: \"shouldStretchHorizontally\",\n get: function get() {\n return this.placement[1] === 'stretch' && this.hasHorizontalPlacement;\n }\n }, {\n key: \"mirroredPlacement\",\n get: function get() {\n return mirrorPlacement(this.placement);\n }\n }, {\n key: \"scrollParentsOffset\",\n get: function get() {\n var parents = getScrollParents(this.node);\n var offsetY = 0;\n var offsetX = 0;\n\n for (var i = 1; i < parents.length; i++) {\n var parent = parents[i];\n var child = parents[i - 1];\n offsetY = offsetY + (this.normalizeScrollTop(parent) - this.normalizeScrollTop(child));\n offsetX = offsetX + (parent.scrollLeft - child.scrollLeft);\n }\n\n return {\n top: offsetY,\n left: offsetX\n };\n }\n }, {\n key: \"positionedParentsOffset\",\n get: function get() {\n // If the element container is within a positioned\n // element, it will position absolutely with respect to that\n // ancestor. We calculate the offset between the child and\n // positioned parent so we can negate that distance\n var parents = getOffsetParents(this.node);\n var doc = ownerDocument(this.node); // If there is more than one parent, the offset on the\n // documentElement should be calculated appropriately.\n // Otherwise we need to explictly account for that offset\n\n var offsetY = parents.length > 1 ? 0 : getBoundingClientRect(doc.documentElement).top;\n var offsetX = 0;\n var scrollY = 0;\n\n for (var i = 1; i < parents.length; i++) {\n var parent = getBoundingClientRect(parents[i]);\n var child = getBoundingClientRect(parents[i - 1]);\n offsetY = offsetY + (child.top - parent.top);\n offsetX = offsetX + (child.left - parent.left);\n\n if (parents[i] === doc.body) {\n // accounts for any margin on body\n offsetY = offsetY + parent.top;\n offsetX = offsetX + parent.left;\n }\n\n scrollY = scrollY + this.normalizeScrollTop(parents[i]);\n } // Account for any scrolling on positioned parents\n // Without this, unnecessary scroll offset could be applied\n // to our target element\n\n\n offsetY = offsetY + scrollY;\n return {\n top: offsetY,\n left: offsetX\n };\n }\n }]);\n\n return PositionedElement;\n}();\n\nvar PositionData = /*#__PURE__*/function () {\n function PositionData(element, target, options) {\n _classCallCheck(this, PositionData);\n\n this.options = options || {};\n var _this$options = this.options,\n container = _this$options.container,\n constrain = _this$options.constrain,\n placement = _this$options.placement,\n over = _this$options.over;\n if (!element || placement === 'offscreen') return;\n this.container = container || ownerDocument(element).body;\n this.element = new PositionedElement(element, placement, {\n top: this.options.offsetY,\n left: this.options.offsetX\n });\n this.target = new PositionedElement(target || this.container, over ? this.element.placement : this.element.mirroredPlacement);\n\n if (constrain === 'window') {\n this.constrainTo(ownerWindow(element));\n } else if (constrain === 'scroll-parent') {\n this.constrainTo(getScrollParents(this.target.node)[0]);\n } else if (constrain === 'parent') {\n this.constrainTo(this.container);\n } else if (typeof constrain === 'function') {\n this.constrainTo(findDOMNode(constrain.call(null)));\n } else if (typeof constrain === 'object') {\n this.constrainTo(findDOMNode(constrain));\n }\n }\n\n _createClass(PositionData, [{\n key: \"overflow\",\n value: function overflow(element) {\n var parentWindow = ownerWindow(element);\n var elementBounds = getBoundingClientRect(element);\n var windowBounds = getBoundingClientRect(parentWindow);\n var offsets = addOffsets([this.target.position, this.offset]);\n var parentOffset = {\n top: this.element.positionedParentsOffset.top + this.element.scrollParentsOffset.top,\n left: this.element.positionedParentsOffset.left + this.element.scrollParentsOffset.left\n };\n var left = offsets.left + parentOffset.left;\n var right = offsets.left + this.element.width + parentOffset.left;\n var top = offsets.top + parentOffset.top;\n var bottom = offsets.top + this.element.height + parentOffset.top; // adjust for vertical placements\n\n if (this.element.placement[0] === \"bottom\") {\n top -= this.element.height + this.target.height;\n } else if (this.element.placement[0] === \"top\") {\n bottom += this.element.height + this.target.height;\n }\n\n if (this.element.placement[1] === \"start\") {\n left -= this.element.width - this.target.width;\n } else if (this.element.placement[1] === \"end\") {\n right += this.element.width - this.target.width;\n } // adjust for horizontal placements\n\n\n if (this.element.placement[1] === \"top\") {\n top -= this.element.height - this.target.height;\n } else if (this.element.placement[1] === \"bottom\") {\n bottom += this.element.height - this.target.height;\n }\n\n if (this.element.placement[0] === \"end\") {\n left -= this.element.width + this.target.width;\n } else if (this.element.placement[0] === \"start\") {\n right += this.element.width + this.target.width;\n }\n\n var bounds = element === parentWindow ? elementBounds : {\n top: windowBounds.top + elementBounds.top,\n bottom: elementBounds.top + elementBounds.height,\n left: windowBounds.left + elementBounds.left,\n right: elementBounds.left + elementBounds.width\n };\n return {\n top: top < bounds.top ? bounds.top - top : 0,\n bottom: bottom > bounds.bottom ? bottom - bounds.bottom : 0,\n left: left < bounds.left ? bounds.left - left : 0,\n right: right > bounds.right ? right - bounds.right : 0\n };\n }\n }, {\n key: \"constrainTo\",\n value: function constrainTo(element) {\n if (!element) return;\n var overflow = this.overflow(element);\n var oob = {\n top: overflow.top > 0,\n bottom: overflow.bottom > 0,\n left: overflow.left > 0,\n right: overflow.right > 0\n };\n\n if (this.element.hasVerticalPlacement) {\n if (this.element.placement[1] !== 'stretch') {\n if (oob.left && oob.right) {\n this.element.placement[1] = 'center';\n this.target.placement[1] = 'center';\n } else if (oob.left) {\n this.element.placement[1] = 'start';\n this.target.placement[1] = 'start';\n } else if (oob.right) {\n this.element.placement[1] = 'end';\n this.target.placement[1] = 'end';\n }\n }\n\n if (oob.top && oob.bottom) {\n // if top and bottom bounds broken\n if (overflow.bottom < overflow.top) {\n // more room on bottom, position below\n this.element.placement[0] = 'bottom';\n this.target.placement[0] = 'top';\n } else if (overflow.bottom > overflow.top) {\n // more room on top, position above\n this.element.placement[0] = 'top';\n this.target.placement[0] = 'bottom';\n }\n } else if (oob.top) {\n // if top bound broken, position below\n this.element.placement[0] = 'bottom';\n this.target.placement[0] = 'top';\n } else if (oob.bottom) {\n // if bottom bound broken, position above\n this.element.placement[0] = 'top';\n this.target.placement[0] = 'bottom';\n }\n } else if (this.element.hasHorizontalPlacement) {\n if (oob.top && oob.bottom) {\n this.element.placement[1] = 'center';\n this.target.placement[1] = 'center';\n } else if (oob.top) {\n this.element.placement[1] = 'top';\n this.target.placement[1] = 'top';\n } else if (oob.bottom) {\n this.element.placement[1] = 'bottom';\n this.target.placement[1] = 'bottom';\n }\n\n if (oob.left && oob.right) {\n // if left and right bounds broken\n if (overflow.left > overflow.right) {\n // more room at end, position after\n this.element.placement[0] = 'end';\n this.target.placement[0] = 'start';\n } else if (overflow.left < overflow.right) {\n // more room at start, position before\n this.element.placement[0] = 'start';\n this.target.placement[0] = 'end';\n }\n } else {\n if (oob.left) {\n this.element.placement[0] = 'end';\n this.target.placement[0] = 'start';\n } else if (oob.right) {\n this.element.placement[0] = 'start';\n this.target.placement[0] = 'end';\n }\n }\n }\n }\n }, {\n key: \"offset\",\n get: function get() {\n var _this$target$calculat = this.target.calculateOffset(this.element.placement),\n top = _this$target$calculat.top,\n left = _this$target$calculat.left;\n\n var offset = addOffsets([this.element.calculateOffset(this.target.placement), this.element.scrollParentsOffset, this.element.positionedParentsOffset]);\n return {\n top: top - offset.top,\n left: left - offset.left\n };\n }\n }, {\n key: \"placement\",\n get: function get() {\n return formatPlacement(this.element.placement);\n }\n }, {\n key: \"minWidth\",\n get: function get() {\n return this.element.shouldStretchVertically ? this.target.width : null;\n }\n }, {\n key: \"minHeight\",\n get: function get() {\n return this.element.shouldStretchHorizontally ? this.target.height : null;\n }\n }, {\n key: \"position\",\n get: function get() {\n var win = ownerWindow(this.target.node);\n\n var _addOffsets = addOffsets([this.target.position, this.offset]),\n left = _addOffsets.left,\n top = _addOffsets.top;\n\n if (canUseDOM && win.matchMedia) {\n var retina = win.matchMedia('only screen and (min-resolution: 1.3dppx)').matches || win.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 1.3)').matches;\n\n if (!retina) {\n left = Math.round(left);\n top = Math.round(top);\n }\n }\n\n return {\n left: left,\n top: top\n };\n }\n }, {\n key: \"style\",\n get: function get() {\n return {\n top: 0,\n left: 0,\n minWidth: this.minWidth,\n minHeight: this.minHeight,\n position: 'absolute',\n transform: \"translateX(\".concat(this.position.left, \"px) translateY(\").concat(this.position.top, \"px) translateZ(0)\")\n };\n }\n }]);\n\n return PositionData;\n}();\n\nfunction addOffsets(offsets) {\n return offsets.reduce(function (sum, offset) {\n return {\n top: sum.top + offset.top,\n left: sum.left + offset.left\n };\n }, {\n top: 0,\n left: 0\n });\n}\n\nfunction parseOffset(offset, placement) {\n var top = offset.top,\n left = offset.left;\n\n if (placement[0] === 'bottom') {\n top = 0 - parseFloat(top, 10);\n }\n\n if (placement[0] === 'end') {\n left = 0 - parseFloat(left, 10);\n }\n\n return {\n top: top,\n left: left\n };\n}\n\nfunction offsetToPx(offset, size) {\n var left = offset.left,\n top = offset.top;\n\n if (typeof left === 'string' && left.indexOf('%') !== -1) {\n left = parseFloat(left, 10) / 100 * size.width; // eslint-disable-line no-mixed-operators\n } else {\n left = parseFloat(left, 10);\n }\n\n if (typeof top === 'string' && top.indexOf('%') !== -1) {\n top = parseFloat(top, 10) / 100 * size.height; // eslint-disable-line no-mixed-operators\n } else {\n top = parseFloat(top, 10);\n }\n\n return {\n top: top,\n left: left\n };\n}\n\nfunction sortPlacement(placement) {\n var _placement2 = _slicedToArray(placement, 2),\n first = _placement2[0],\n second = _placement2[1];\n\n if (first === 'center' || first === 'stretch') {\n var _ref2 = [second, first];\n first = _ref2[0];\n second = _ref2[1];\n }\n\n return [first, second];\n}\n\nfunction parsePlacement(placement) {\n var parsed = placement.split(' ');\n\n if (parsed.length === 1) {\n parsed = [placement, 'center'];\n }\n\n return sortPlacement(parsed);\n}\n\nfunction formatPlacement(placement) {\n return placement.join(' ');\n}\n\nexport default calculateElementPosition;\nexport {\n/**\n * ---\n * category: utilities/position\n * ---\n *\n * Calculate the coordinates to attach an element\n * to a designated target with specified constraints\n * @module\n * @param {ReactComponent|DomNode} el - component or DOM node\n * @param {DomNode} target - the target DOM node\n * @param {Object} options - constraints for the positioning\n * @param {string} options.placement - designates where the element will be attached\n * ('top', 'bottom', 'left', 'right', 'top left' etc.)\n * @param {DomNode} options.container - DOM node where the element is contained\n * @param {boolean} options.over - whether or not you want the element to position over the target\n * @param {string} options.constrain - if the element should be constrained to 'window',\n * 'scroll-parent', 'parent', or 'none'\n * @param {string|number} options.offsetX - the horizontal offset for the positioned element\n * @param {string|number} options.offsetY - the vertical offset for the positioned element\n * @returns {Object} object containing style with the calculated position in the 'transform'\n * property\n */\ncalculateElementPosition, parsePlacement };","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nexport default function generator(_ref) {\n var colors = _ref.colors,\n borders = _ref.borders;\n return {\n arrowSize: '0.5rem',\n arrowBorderWidth: borders.widthSmall,\n arrowBackgroundColor: colors.white,\n arrowBorderColor: colors.tiara,\n arrowBackgroundColorInverse: colors.licorice,\n arrowBorderColorInverse: 'transparent'\n };\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n\nvar _dec, _class, _class2, _temp;\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { PositionPropTypes, mirrorPlacement } from '@instructure/ui-position';\nimport { themeable, ThemeablePropTypes } from '@instructure/ui-themeable';\nimport { omitProps } from '@instructure/ui-react-utils';\nimport { View } from '../View';\nvar styles = {\n componentId: 'dqmEK',\n template: function template(theme) {\n return \"\\n\\n.dqmEK_ftAV{box-sizing:border-box;min-height:calc(\".concat(theme.arrowSize || 'inherit', \"*2)}\\n\\n.dqmEK_caGd{position:relative}\\n\\n.dqmEK_eBFr,.dqmEK_bQpq,.dqmEK_cLEU,.dqmEK_bcHE,.dqmEK_dRPE{-webkit-padding-end:0;-webkit-padding-start:\").concat(theme.arrowSize || 'inherit', \";padding-inline-end:0;padding-inline-start:\").concat(theme.arrowSize || 'inherit', \"}\\n\\n[dir=ltr] .dqmEK_eBFr,[dir=ltr] .dqmEK_bQpq,[dir=ltr] .dqmEK_cLEU,[dir=ltr] .dqmEK_bcHE,[dir=ltr] .dqmEK_dRPE{padding-left:\").concat(theme.arrowSize || 'inherit', \";padding-right:0}\\n\\n[dir=rtl] .dqmEK_eBFr,[dir=rtl] .dqmEK_bQpq,[dir=rtl] .dqmEK_cLEU,[dir=rtl] .dqmEK_bcHE,[dir=rtl] .dqmEK_dRPE{padding-left:0;padding-right:\").concat(theme.arrowSize || 'inherit', \"}\\n\\n.dqmEK_bhzm,.dqmEK_bxia,.dqmEK_buog,.dqmEK_ctrk,.dqmEK_dHQY{-webkit-padding-end:\").concat(theme.arrowSize || 'inherit', \";-webkit-padding-start:0;padding-inline-end:\").concat(theme.arrowSize || 'inherit', \";padding-inline-start:0}\\n\\n[dir=ltr] .dqmEK_bhzm,[dir=ltr] .dqmEK_bxia,[dir=ltr] .dqmEK_buog,[dir=ltr] .dqmEK_ctrk,[dir=ltr] .dqmEK_dHQY{padding-left:0;padding-right:\").concat(theme.arrowSize || 'inherit', \"}\\n\\n[dir=rtl] .dqmEK_bhzm,[dir=rtl] .dqmEK_bxia,[dir=rtl] .dqmEK_buog,[dir=rtl] .dqmEK_ctrk,[dir=rtl] .dqmEK_dHQY{padding-left:\").concat(theme.arrowSize || 'inherit', \";padding-right:0}\\n\\n.dqmEK_bgun,.dqmEK_cOtA,.dqmEK_cFhg,.dqmEK_fjSW{padding-top:\").concat(theme.arrowSize || 'inherit', \"}\\n\\n.dqmEK_dLYh,.dqmEK_dqZD,.dqmEK_dNlp,.dqmEK_svmP{padding-bottom:\").concat(theme.arrowSize || 'inherit', \"}\\n\\n.dqmEK_bFHc{left:-999em;position:absolute}\\n\\n.dqmEK_fAVq,.dqmEK_fAVq:after{border-style:solid;box-sizing:border-box;content:\\\"\\\";display:block;height:0;pointer-events:none;position:absolute;width:0}\\n\\n.dqmEK_fAVq{border-width:calc(\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \");display:block}\\n\\n.dqmEK_fAVq:after{border-width:\").concat(theme.arrowSize || 'inherit', \"}\\n\\n.dqmEK_fBgc,.dqmEK_fBgc:after{border-color:\").concat(theme.arrowBorderColor || 'inherit', \"}\\n\\n.dqmEK_ejeM,.dqmEK_ejeM:after{border-color:\").concat(theme.arrowBorderColorInverse || 'inherit', \"}\\n\\n.dqmEK_cLQV,.dqmEK_tpPI,.dqmEK_dOuW,.dqmEK_borX,.dqmEK_igtb{border-bottom-color:transparent;border-inline-end-color:\").concat(theme.arrowBorderColor || 'inherit', \";border-inline-end-width:\").concat(theme.arrowSize || 'inherit', \";border-inline-start-color:transparent;border-inline-start-width:0;border-top-color:transparent;inset-inline-end:100%;inset-inline-start:auto;margin-top:calc(-1*(\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \"));top:50%}\\n\\n[dir=ltr] .dqmEK_cLQV,[dir=ltr] .dqmEK_tpPI,[dir=ltr] .dqmEK_dOuW,[dir=ltr] .dqmEK_borX,[dir=ltr] .dqmEK_igtb{border-left-color:transparent;border-left-width:0;border-right-color:\").concat(theme.arrowBorderColor || 'inherit', \";border-right-width:\").concat(theme.arrowSize || 'inherit', \";left:auto;right:100%}\\n\\n[dir=rtl] .dqmEK_cLQV,[dir=rtl] .dqmEK_tpPI,[dir=rtl] .dqmEK_dOuW,[dir=rtl] .dqmEK_borX,[dir=rtl] .dqmEK_igtb{border-left-color:\").concat(theme.arrowBorderColor || 'inherit', \";border-left-width:\").concat(theme.arrowSize || 'inherit', \";border-right-color:transparent;border-right-width:0;left:100%;right:auto}\\n\\n.dqmEK_cLQV:after,.dqmEK_dOuW:after,.dqmEK_borX:after,.dqmEK_igtb:after,.dqmEK_tpPI:after{border-bottom-color:transparent;border-inline-end-color:\").concat(theme.arrowBackgroundColor || 'inherit', \";border-inline-end-width:\").concat(theme.arrowSize || 'inherit', \";border-inline-start-color:transparent;border-inline-start-width:0;border-top-color:transparent;inset-inline-end:auto;inset-inline-start:\").concat(theme.arrowBorderWidth || 'inherit', \";margin-top:calc(-1*\").concat(theme.arrowSize || 'inherit', \")}\\n\\n[dir=ltr] .dqmEK_cLQV:after,[dir=ltr] .dqmEK_dOuW:after,[dir=ltr] .dqmEK_borX:after,[dir=ltr] .dqmEK_igtb:after,[dir=ltr] .dqmEK_tpPI:after{border-left-color:transparent;border-left-width:0;border-right-color:\").concat(theme.arrowBackgroundColor || 'inherit', \";border-right-width:\").concat(theme.arrowSize || 'inherit', \";left:\").concat(theme.arrowBorderWidth || 'inherit', \";right:auto}\\n\\n[dir=rtl] .dqmEK_cLQV:after,[dir=rtl] .dqmEK_dOuW:after,[dir=rtl] .dqmEK_borX:after,[dir=rtl] .dqmEK_igtb:after,[dir=rtl] .dqmEK_tpPI:after{border-left-color:\").concat(theme.arrowBackgroundColor || 'inherit', \";border-left-width:\").concat(theme.arrowSize || 'inherit', \";border-right-color:transparent;border-right-width:0;left:auto;right:\").concat(theme.arrowBorderWidth || 'inherit', \"}\\n\\n.dqmEK_cLQV.dqmEK_ejeM,.dqmEK_dOuW.dqmEK_ejeM,.dqmEK_borX.dqmEK_ejeM,.dqmEK_igtb.dqmEK_ejeM,.dqmEK_tpPI.dqmEK_ejeM{border-inline-end-color:\").concat(theme.arrowBorderColorInverse || 'inherit', \"}\\n\\n[dir=ltr] .dqmEK_cLQV.dqmEK_ejeM,[dir=ltr] .dqmEK_dOuW.dqmEK_ejeM,[dir=ltr] .dqmEK_borX.dqmEK_ejeM,[dir=ltr] .dqmEK_igtb.dqmEK_ejeM,[dir=ltr] .dqmEK_tpPI.dqmEK_ejeM{border-right-color:\").concat(theme.arrowBorderColorInverse || 'inherit', \"}\\n\\n[dir=rtl] .dqmEK_cLQV.dqmEK_ejeM,[dir=rtl] .dqmEK_dOuW.dqmEK_ejeM,[dir=rtl] .dqmEK_borX.dqmEK_ejeM,[dir=rtl] .dqmEK_igtb.dqmEK_ejeM,[dir=rtl] .dqmEK_tpPI.dqmEK_ejeM{border-left-color:\").concat(theme.arrowBorderColorInverse || 'inherit', \"}\\n\\n.dqmEK_cLQV.dqmEK_ejeM:after,.dqmEK_dOuW.dqmEK_ejeM:after,.dqmEK_borX.dqmEK_ejeM:after,.dqmEK_igtb.dqmEK_ejeM:after,.dqmEK_tpPI.dqmEK_ejeM:after{border-inline-end-color:\").concat(theme.arrowBackgroundColorInverse || 'inherit', \"}\\n\\n[dir=ltr] .dqmEK_cLQV.dqmEK_ejeM:after,[dir=ltr] .dqmEK_dOuW.dqmEK_ejeM:after,[dir=ltr] .dqmEK_borX.dqmEK_ejeM:after,[dir=ltr] .dqmEK_igtb.dqmEK_ejeM:after,[dir=ltr] .dqmEK_tpPI.dqmEK_ejeM:after{border-right-color:\").concat(theme.arrowBackgroundColorInverse || 'inherit', \"}\\n\\n[dir=rtl] .dqmEK_cLQV.dqmEK_ejeM:after,[dir=rtl] .dqmEK_dOuW.dqmEK_ejeM:after,[dir=rtl] .dqmEK_borX.dqmEK_ejeM:after,[dir=rtl] .dqmEK_igtb.dqmEK_ejeM:after,[dir=rtl] .dqmEK_tpPI.dqmEK_ejeM:after{border-left-color:\").concat(theme.arrowBackgroundColorInverse || 'inherit', \"}\\n\\n.dqmEK_eiYi,.dqmEK_evPF,.dqmEK_fzfv,.dqmEK_fnqe,.dqmEK_dOsT{border-bottom-color:transparent;border-inline-end-color:transparent;border-inline-end-width:0;border-inline-start-color:\").concat(theme.arrowBorderColor || 'inherit', \";border-inline-start-width:\").concat(theme.arrowSize || 'inherit', \";border-top-color:transparent;inset-inline-end:auto;inset-inline-start:100%;margin-top:calc(-1*(\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \"));top:50%}\\n\\n[dir=ltr] .dqmEK_eiYi,[dir=ltr] .dqmEK_evPF,[dir=ltr] .dqmEK_fzfv,[dir=ltr] .dqmEK_fnqe,[dir=ltr] .dqmEK_dOsT{border-left-color:\").concat(theme.arrowBorderColor || 'inherit', \";border-left-width:\").concat(theme.arrowSize || 'inherit', \";border-right-color:transparent;border-right-width:0;left:100%;right:auto}\\n\\n[dir=rtl] .dqmEK_eiYi,[dir=rtl] .dqmEK_evPF,[dir=rtl] .dqmEK_fzfv,[dir=rtl] .dqmEK_fnqe,[dir=rtl] .dqmEK_dOsT{border-left-color:transparent;border-left-width:0;border-right-color:\").concat(theme.arrowBorderColor || 'inherit', \";border-right-width:\").concat(theme.arrowSize || 'inherit', \";left:auto;right:100%}\\n\\n.dqmEK_eiYi:after,.dqmEK_fzfv:after,.dqmEK_fnqe:after,.dqmEK_dOsT:after,.dqmEK_evPF:after{border-bottom-color:transparent;border-inline-end-color:transparent;border-inline-end-width:0;border-inline-start-color:\").concat(theme.arrowBackgroundColor || 'inherit', \";border-inline-start-width:\").concat(theme.arrowSize || 'inherit', \";border-top-color:transparent;inset-inline-end:\").concat(theme.arrowBorderWidth || 'inherit', \";inset-inline-start:auto;margin-top:calc(-1*\").concat(theme.arrowSize || 'inherit', \")}\\n\\n[dir=ltr] .dqmEK_eiYi:after,[dir=ltr] .dqmEK_fzfv:after,[dir=ltr] .dqmEK_fnqe:after,[dir=ltr] .dqmEK_dOsT:after,[dir=ltr] .dqmEK_evPF:after{border-left-color:\").concat(theme.arrowBackgroundColor || 'inherit', \";border-left-width:\").concat(theme.arrowSize || 'inherit', \";border-right-color:transparent;border-right-width:0;left:auto;right:\").concat(theme.arrowBorderWidth || 'inherit', \"}\\n\\n[dir=rtl] .dqmEK_eiYi:after,[dir=rtl] .dqmEK_fzfv:after,[dir=rtl] .dqmEK_fnqe:after,[dir=rtl] .dqmEK_dOsT:after,[dir=rtl] .dqmEK_evPF:after{border-left-color:transparent;border-left-width:0;border-right-color:\").concat(theme.arrowBackgroundColor || 'inherit', \";border-right-width:\").concat(theme.arrowSize || 'inherit', \";left:\").concat(theme.arrowBorderWidth || 'inherit', \";right:auto}\\n\\n.dqmEK_eiYi.dqmEK_ejeM,.dqmEK_fzfv.dqmEK_ejeM,.dqmEK_fnqe.dqmEK_ejeM,.dqmEK_dOsT.dqmEK_ejeM,.dqmEK_evPF.dqmEK_ejeM{border-inline-start-color:\").concat(theme.arrowBorderColorInverse || 'inherit', \"}\\n\\n[dir=ltr] .dqmEK_eiYi.dqmEK_ejeM,[dir=ltr] .dqmEK_fzfv.dqmEK_ejeM,[dir=ltr] .dqmEK_fnqe.dqmEK_ejeM,[dir=ltr] .dqmEK_dOsT.dqmEK_ejeM,[dir=ltr] .dqmEK_evPF.dqmEK_ejeM{border-left-color:\").concat(theme.arrowBorderColorInverse || 'inherit', \"}\\n\\n[dir=rtl] .dqmEK_eiYi.dqmEK_ejeM,[dir=rtl] .dqmEK_fzfv.dqmEK_ejeM,[dir=rtl] .dqmEK_fnqe.dqmEK_ejeM,[dir=rtl] .dqmEK_dOsT.dqmEK_ejeM,[dir=rtl] .dqmEK_evPF.dqmEK_ejeM{border-right-color:\").concat(theme.arrowBorderColorInverse || 'inherit', \"}\\n\\n.dqmEK_eiYi.dqmEK_ejeM:after,.dqmEK_fzfv.dqmEK_ejeM:after,.dqmEK_fnqe.dqmEK_ejeM:after,.dqmEK_dOsT.dqmEK_ejeM:after,.dqmEK_evPF.dqmEK_ejeM:after{border-inline-start-color:\").concat(theme.arrowBackgroundColorInverse || 'inherit', \"}\\n\\n[dir=ltr] .dqmEK_eiYi.dqmEK_ejeM:after,[dir=ltr] .dqmEK_fzfv.dqmEK_ejeM:after,[dir=ltr] .dqmEK_fnqe.dqmEK_ejeM:after,[dir=ltr] .dqmEK_dOsT.dqmEK_ejeM:after,[dir=ltr] .dqmEK_evPF.dqmEK_ejeM:after{border-left-color:\").concat(theme.arrowBackgroundColorInverse || 'inherit', \"}\\n\\n[dir=rtl] .dqmEK_eiYi.dqmEK_ejeM:after,[dir=rtl] .dqmEK_fzfv.dqmEK_ejeM:after,[dir=rtl] .dqmEK_fnqe.dqmEK_ejeM:after,[dir=rtl] .dqmEK_dOsT.dqmEK_ejeM:after,[dir=rtl] .dqmEK_evPF.dqmEK_ejeM:after{border-right-color:\").concat(theme.arrowBackgroundColorInverse || 'inherit', \"}\\n\\n.dqmEK_dHiK,.dqmEK_dBdm,.dqmEK_ePhw,.dqmEK_bDBw{-webkit-margin-end:0;-webkit-margin-start:calc(-1*(\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \"));border-inline-end-color:transparent;border-inline-start-color:transparent;border-top-color:transparent;border-top-width:0;bottom:100%;margin-inline-end:0;margin-inline-start:calc(-1*(\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \"))}\\n\\n[dir=ltr] .dqmEK_dHiK,[dir=ltr] .dqmEK_dBdm,[dir=ltr] .dqmEK_ePhw,[dir=ltr] .dqmEK_bDBw{border-left-color:transparent;border-right-color:transparent;margin-left:calc(-1*(\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \"));margin-right:0}\\n\\n[dir=rtl] .dqmEK_dHiK,[dir=rtl] .dqmEK_dBdm,[dir=rtl] .dqmEK_ePhw,[dir=rtl] .dqmEK_bDBw{border-left-color:transparent;border-right-color:transparent;margin-left:0;margin-right:calc(-1*(\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \"))}\\n\\n.dqmEK_dBdm:after,.dqmEK_ePhw:after,.dqmEK_bDBw:after,.dqmEK_dHiK:after{-webkit-margin-end:0;-webkit-margin-start:calc(-1*\").concat(theme.arrowSize || 'inherit', \");border-bottom-color:\").concat(theme.arrowBackgroundColor || 'inherit', \";border-inline-end-color:transparent;border-inline-start-color:transparent;border-top-color:transparent;border-top-width:0;margin-inline-end:0;margin-inline-start:calc(-1*\").concat(theme.arrowSize || 'inherit', \");top:\").concat(theme.arrowBorderWidth || 'inherit', \"}\\n\\n[dir=ltr] .dqmEK_dBdm:after,[dir=ltr] .dqmEK_ePhw:after,[dir=ltr] .dqmEK_bDBw:after,[dir=ltr] .dqmEK_dHiK:after{border-left-color:transparent;border-right-color:transparent;margin-left:calc(-1*\").concat(theme.arrowSize || 'inherit', \");margin-right:0}\\n\\n[dir=rtl] .dqmEK_dBdm:after,[dir=rtl] .dqmEK_ePhw:after,[dir=rtl] .dqmEK_bDBw:after,[dir=rtl] .dqmEK_dHiK:after{border-left-color:transparent;border-right-color:transparent;margin-left:0;margin-right:calc(-1*\").concat(theme.arrowSize || 'inherit', \")}\\n\\n.dqmEK_dBdm.dqmEK_ejeM:after,.dqmEK_ePhw.dqmEK_ejeM:after,.dqmEK_bDBw.dqmEK_ejeM:after,.dqmEK_dHiK.dqmEK_ejeM:after{border-bottom-color:\").concat(theme.arrowBackgroundColorInverse || 'inherit', \"}\\n\\n.dqmEK_cjte,.dqmEK_edfl,.dqmEK_ZLAk,.dqmEK_ftdy{-webkit-margin-end:0;-webkit-margin-start:calc(-1*(\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \"));border-bottom-color:transparent;border-bottom-width:0;border-inline-end-color:transparent;border-inline-start-color:transparent;margin-inline-end:0;margin-inline-start:calc(-1*(\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \"));top:100%}\\n\\n[dir=ltr] .dqmEK_cjte,[dir=ltr] .dqmEK_edfl,[dir=ltr] .dqmEK_ZLAk,[dir=ltr] .dqmEK_ftdy{border-left-color:transparent;border-right-color:transparent;margin-left:calc(-1*(\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \"));margin-right:0}\\n\\n[dir=rtl] .dqmEK_cjte,[dir=rtl] .dqmEK_edfl,[dir=rtl] .dqmEK_ZLAk,[dir=rtl] .dqmEK_ftdy{border-left-color:transparent;border-right-color:transparent;margin-left:0;margin-right:calc(-1*(\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \"))}\\n\\n.dqmEK_edfl:after,.dqmEK_ZLAk:after,.dqmEK_ftdy:after,.dqmEK_cjte:after{-webkit-margin-end:0;-webkit-margin-start:calc(-1*\").concat(theme.arrowSize || 'inherit', \");border-bottom-color:transparent;border-bottom-width:0;border-inline-end-color:transparent;border-inline-start-color:transparent;border-top-color:\").concat(theme.arrowBackgroundColor || 'inherit', \";bottom:\").concat(theme.arrowBorderWidth || 'inherit', \";margin-inline-end:0;margin-inline-start:calc(-1*\").concat(theme.arrowSize || 'inherit', \")}\\n\\n[dir=ltr] .dqmEK_edfl:after,[dir=ltr] .dqmEK_ZLAk:after,[dir=ltr] .dqmEK_ftdy:after,[dir=ltr] .dqmEK_cjte:after{border-left-color:transparent;border-right-color:transparent;margin-left:calc(-1*\").concat(theme.arrowSize || 'inherit', \");margin-right:0}\\n\\n[dir=rtl] .dqmEK_edfl:after,[dir=rtl] .dqmEK_ZLAk:after,[dir=rtl] .dqmEK_ftdy:after,[dir=rtl] .dqmEK_cjte:after{border-left-color:transparent;border-right-color:transparent;margin-left:0;margin-right:calc(-1*\").concat(theme.arrowSize || 'inherit', \")}\\n\\n.dqmEK_edfl.dqmEK_ejeM:after,.dqmEK_ZLAk.dqmEK_ejeM:after,.dqmEK_ftdy.dqmEK_ejeM:after,.dqmEK_cjte.dqmEK_ejeM:after{border-top-color:\").concat(theme.arrowBackgroundColorInverse || 'inherit', \"}\\n\\n.dqmEK_cjte,.dqmEK_edfl,.dqmEK_dHiK,.dqmEK_dBdm{inset-inline-start:50%}\\n\\n[dir=ltr] .dqmEK_cjte,[dir=ltr] .dqmEK_edfl,[dir=ltr] .dqmEK_dHiK,[dir=ltr] .dqmEK_dBdm{left:50%}\\n\\n[dir=rtl] .dqmEK_cjte,[dir=rtl] .dqmEK_edfl,[dir=rtl] .dqmEK_dHiK,[dir=rtl] .dqmEK_dBdm{right:50%}\\n\\n.dqmEK_ftdy,.dqmEK_bDBw{inset-inline-end:auto;inset-inline-start:calc((\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \")*2)}\\n\\n[dir=ltr] .dqmEK_ftdy,[dir=ltr] .dqmEK_bDBw{left:calc((\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \")*2);right:auto}\\n\\n[dir=rtl] .dqmEK_ftdy,[dir=rtl] .dqmEK_bDBw{left:auto;right:calc((\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \")*2)}\\n\\n.dqmEK_ZLAk,.dqmEK_ePhw{inset-inline-end:auto;inset-inline-start:calc(100% - (\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \")*2)}\\n\\n[dir=ltr] .dqmEK_ZLAk,[dir=ltr] .dqmEK_ePhw{left:calc(100% - (\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \")*2);right:auto}\\n\\n[dir=rtl] .dqmEK_ZLAk,[dir=rtl] .dqmEK_ePhw{left:auto;right:calc(100% - (\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \")*2)}\\n\\n.dqmEK_dOsT,.dqmEK_igtb{top:calc((\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \")*2)}\\n\\n.dqmEK_fzfv,.dqmEK_dOuW{top:calc(100% - (\").concat(theme.arrowSize || 'inherit', \" + \").concat(theme.arrowBorderWidth || 'inherit', \")*2)}\");\n },\n 'contextViewRoot': 'dqmEK_ftAV',\n 'content': 'dqmEK_caGd',\n 'placement--center-end': 'dqmEK_eBFr',\n 'placement--end': 'dqmEK_bQpq',\n 'placement--end-bottom': 'dqmEK_cLEU',\n 'placement--end-center': 'dqmEK_bcHE',\n 'placement--end-top': 'dqmEK_dRPE',\n 'placement--center-start': 'dqmEK_bhzm',\n 'placement--start': 'dqmEK_bxia',\n 'placement--start-bottom': 'dqmEK_buog',\n 'placement--start-center': 'dqmEK_ctrk',\n 'placement--start-top': 'dqmEK_dHQY',\n 'placement--bottom': 'dqmEK_bgun',\n 'placement--bottom-center': 'dqmEK_cOtA',\n 'placement--bottom-end': 'dqmEK_cFhg',\n 'placement--bottom-start': 'dqmEK_fjSW',\n 'placement--top': 'dqmEK_dLYh',\n 'placement--top-center': 'dqmEK_dqZD',\n 'placement--top-end': 'dqmEK_dNlp',\n 'placement--top-start': 'dqmEK_svmP',\n 'placement--offscreen': 'dqmEK_bFHc',\n 'arrow': 'dqmEK_fAVq',\n 'arrow--default': 'dqmEK_fBgc',\n 'arrow--inverse': 'dqmEK_ejeM',\n 'arrow--center-start': 'dqmEK_cLQV',\n 'arrow--start': 'dqmEK_tpPI',\n 'arrow--start-bottom': 'dqmEK_dOuW',\n 'arrow--start-center': 'dqmEK_borX',\n 'arrow--start-top': 'dqmEK_igtb',\n 'arrow--center-end': 'dqmEK_eiYi',\n 'arrow--end': 'dqmEK_evPF',\n 'arrow--end-bottom': 'dqmEK_fzfv',\n 'arrow--end-center': 'dqmEK_fnqe',\n 'arrow--end-top': 'dqmEK_dOsT',\n 'arrow--top': 'dqmEK_dHiK',\n 'arrow--top-center': 'dqmEK_dBdm',\n 'arrow--top-end': 'dqmEK_ePhw',\n 'arrow--top-start': 'dqmEK_bDBw',\n 'arrow--bottom': 'dqmEK_cjte',\n 'arrow--bottom-center': 'dqmEK_edfl',\n 'arrow--bottom-end': 'dqmEK_ZLAk',\n 'arrow--bottom-start': 'dqmEK_ftdy'\n};\nimport theme from './theme';\n/**\n---\ncategory: components\n---\n**/\n\nvar ContextView = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {\n _inherits(ContextView, _Component);\n\n var _super = _createSuper(ContextView);\n\n function ContextView() {\n _classCallCheck(this, ContextView);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(ContextView, [{\n key: \"render\",\n value: function render() {\n var _classes, _classnames;\n\n var _this$props = this.props,\n as = _this$props.as,\n background = _this$props.background,\n children = _this$props.children,\n debug = _this$props.debug,\n elementRef = _this$props.elementRef,\n height = _this$props.height,\n width = _this$props.width,\n maxHeight = _this$props.maxHeight,\n maxWidth = _this$props.maxWidth,\n minHeight = _this$props.minHeight,\n minWidth = _this$props.minWidth,\n margin = _this$props.margin,\n padding = _this$props.padding,\n placement = _this$props.placement,\n shadow = _this$props.shadow,\n stacking = _this$props.stacking,\n style = _this$props.style,\n textAlign = _this$props.textAlign;\n var classes = (_classes = {}, _defineProperty(_classes, styles.contextViewRoot, true), _defineProperty(_classes, styles[\"placement--\".concat(placement.replace(' ', '-'))], true), _classes);\n return /*#__PURE__*/React.createElement(View, Object.assign({}, omitProps(this.props, ContextView.propTypes), {\n style: style,\n className: classnames(classes),\n borderWidth: \"none\",\n display: \"inline-block\",\n as: as,\n withVisualDebug: debug,\n elementRef: elementRef,\n margin: margin,\n stacking: stacking\n }), /*#__PURE__*/React.createElement(View, {\n className: styles.content,\n display: \"block\",\n borderRadius: \"medium\",\n borderWidth: \"small\",\n borderColor: background === 'default' ? 'primary' : 'transparent',\n background: background === 'default' ? 'primary' : 'primary-inverse',\n withVisualDebug: debug,\n height: height,\n width: width,\n maxHeight: maxHeight,\n maxWidth: maxWidth,\n minHeight: minHeight,\n minWidth: minWidth,\n padding: padding,\n shadow: shadow,\n textAlign: textAlign\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classnames((_classnames = {}, _defineProperty(_classnames, styles.arrow, true), _defineProperty(_classnames, styles[\"arrow--\".concat(background)], background), _defineProperty(_classnames, styles[\"arrow--\".concat(this.mirroredPlacement)], true), _classnames))\n }), children));\n }\n }, {\n key: \"mirroredPlacement\",\n get: function get() {\n return mirrorPlacement(this.props.placement, '-');\n }\n }]);\n\n ContextView.displayName = \"ContextView\";\n return ContextView;\n}(Component), _class2.propTypes = {\n /**\n * The element to render as the component root\n */\n as: PropTypes.elementType,\n\n /**\n * provides a reference to the underlying html root element\n */\n elementRef: PropTypes.func,\n\n /**\n * Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,\n * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via\n * familiar CSS-like shorthand. For example: `margin=\"small auto large\"`.\n */\n margin: ThemeablePropTypes.spacing,\n\n /**\n * Valid values are `0`, `none`, `xxx-small`, `xx-small`, `x-small`,\n * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via\n * familiar CSS-like shorthand. For example: `padding=\"small x-large large\"`.\n */\n padding: ThemeablePropTypes.spacing,\n height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n maxHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n maxWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n minHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n minWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * The children to render inside the ``\n */\n children: PropTypes.node,\n\n /**\n * Designates the text alignment within the ``\n */\n textAlign: PropTypes.oneOf(['start', 'center', 'end']),\n\n /**\n * Controls the shadow depth for the ``\n */\n shadow: ThemeablePropTypes.shadow,\n\n /**\n * Controls the z-index depth for the ``\n */\n stacking: ThemeablePropTypes.stacking,\n\n /**\n * Designates the background style of the ``\n */\n background: PropTypes.oneOf(['default', 'inverse']),\n\n /**\n * Specifies how the arrow for `` will be rendered.\n * Ex. `placement=\"top\"` will render with an arrow pointing down.\n */\n placement: PositionPropTypes.placement,\n\n /**\n * Activate an outline around the component to make building your\n * layout easier\n */\n debug: PropTypes.bool\n}, _class2.defaultProps = {\n as: 'span',\n elementRef: function elementRef(el) {},\n debug: false,\n width: 'auto',\n height: 'auto',\n children: null,\n textAlign: 'start',\n background: 'default',\n shadow: 'resting',\n placement: 'center end',\n margin: void 0,\n padding: void 0,\n stacking: void 0,\n maxWidth: void 0,\n minWidth: void 0,\n maxHeight: void 0,\n minHeight: void 0\n}, _temp)) || _class);\nexport default ContextView;\nexport { ContextView };","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport PropTypes from 'prop-types';\nimport { element } from '@instructure/ui-prop-types';\nvar PositionPropTypes = {\n /**\n * The placement of the content in relation to the trigger\n */\n placement: PropTypes.oneOf(['top', 'end', 'bottom', 'start', 'top start', 'start top', 'start center', 'start bottom', 'bottom start', 'bottom center', 'bottom end', 'end bottom', 'end center', 'end top', 'top end', 'top center', 'center end', 'center start', 'top stretch', 'bottom stretch', 'end stretch', 'start stretch', 'offscreen']),\n\n /**\n * An element or a function returning an element to use as the mount node\n */\n mountNode: PropTypes.oneOfType([element, PropTypes.func]),\n\n /**\n * The parent in which to constrain a placement\n */\n constrain: PropTypes.oneOfType([element, PropTypes.func, PropTypes.oneOf(['window', 'scroll-parent', 'parent', 'none'])])\n};\nexport default PositionPropTypes;\nexport {\n/**\n* ---\n* category: utilities/position\n* ---\n* Custom prop types for `ui-position` components.\n* @module PositionPropTypes\n*/\nPositionPropTypes };","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport { contains } from './contains';\n/**\n * ---\n * category: utilities/DOM\n * ---\n *\n * Simple implementation of mouseEnter and mouseLeave.\n * React's built version is broken: https://github.com/facebook/react/issues/4251\n * for cases when the trigger is disabled and mouseOut/Over can cause flicker moving\n * from one child element to another.\n *\n * @param handler {function} Callback function for handling the event\n * @param event {Event} The DOM Event that was fired\n */\n\nfunction handleMouseOverOut(handler, event) {\n var target = event.currentTarget;\n var related = event.relatedTarget || event.nativeEvent.toElement;\n\n if (!related || related !== target && !contains(target, related)) {\n handler(event);\n }\n}\n\nexport default handleMouseOverOut;\nexport { handleMouseOverOut };","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport { error as _error } from \"@instructure/console\";\n\nvar _dec, _dec2, _class, _class2, _temp, _dec3, _dec4, _class3, _class4, _temp2, _dec5, _dec6, _dec7, _class5, _class6, _temp3;\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport keycode from 'keycode';\nimport { Position, PositionPropTypes, parsePlacement, mirrorHorizontalPlacement } from '@instructure/ui-position';\nimport { ContextView, View } from '@instructure/ui-view';\nimport { Dialog } from '@instructure/ui-dialog';\nimport { bidirectional } from '@instructure/ui-i18n';\nimport { element } from '@instructure/ui-prop-types';\nimport { findDOMNode, containsActiveElement, requestAnimationFrame, handleMouseOverOut } from '@instructure/ui-dom-utils';\nimport { ComponentIdentifier, safeCloneElement, callRenderProp, deprecated } from '@instructure/ui-react-utils';\nimport { createChainedFunction, shallowEqual, px } from '@instructure/ui-utils';\nimport { uid } from '@instructure/uid';\nimport { ThemeablePropTypes } from '@instructure/ui-themeable';\nimport { testable } from '@instructure/ui-testable';\nimport { FocusRegion } from '@instructure/ui-a11y-utils';\nvar PopoverTrigger = (_dec = deprecated('8.0.0', null, 'Use Popover\\'s `renderTrigger` prop instead.'), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = /*#__PURE__*/function (_ComponentIdentifier) {\n _inherits(PopoverTrigger, _ComponentIdentifier);\n\n var _super = _createSuper(PopoverTrigger);\n\n function PopoverTrigger() {\n _classCallCheck(this, PopoverTrigger);\n\n return _super.apply(this, arguments);\n }\n\n return PopoverTrigger;\n}(ComponentIdentifier), _class2.displayName = 'PopoverTrigger', _temp)) || _class) || _class);\nvar PopoverContent = (_dec3 = deprecated('8.0.0', null, 'Use Popover\\'s `children` instead.'), _dec4 = testable(), _dec3(_class3 = _dec4(_class3 = (_temp2 = _class4 = /*#__PURE__*/function (_ComponentIdentifier2) {\n _inherits(PopoverContent, _ComponentIdentifier2);\n\n var _super2 = _createSuper(PopoverContent);\n\n function PopoverContent() {\n _classCallCheck(this, PopoverContent);\n\n return _super2.apply(this, arguments);\n }\n\n return PopoverContent;\n}(ComponentIdentifier), _class4.displayName = 'PopoverContent', _temp2)) || _class3) || _class3);\n/**\n---\ncategory: components\n---\n**/\n\nvar Popover = (_dec5 = deprecated('8.0.0', {\n show: 'isShowingContent',\n defaultShow: 'defaultIsShowingContent',\n variant: 'color',\n label: 'screenReaderLabel',\n trackPosition: 'shouldTrackPosition',\n alignArrow: 'shouldAlignArrow',\n onShow: 'onShowContent',\n onDismiss: 'onHideContent',\n onToggle: 'onShowContent/onHideContent'\n}), _dec6 = testable(), _dec7 = bidirectional(), _dec5(_class5 = _dec6(_class5 = _dec7(_class5 = (_temp3 = _class6 = /*#__PURE__*/function (_Component) {\n _inherits(Popover, _Component);\n\n var _super3 = _createSuper(Popover);\n\n function Popover(props) {\n var _this;\n\n _classCallCheck(this, Popover);\n\n _this = _super3.call(this, props);\n\n _this.show = function (event) {\n if (typeof _this.props.isShowingContent === 'undefined' && typeof _this.props.show === 'undefined') {\n _this.setState({\n isShowingContent: true\n });\n }\n\n _this.props.onShowContent(event);\n\n if (typeof _this.props.onToggle === 'function') {\n _this.props.onToggle(true);\n }\n };\n\n _this.hide = function (event) {\n var documentClick = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n var _this$props = _this.props,\n onHideContent = _this$props.onHideContent,\n isShowingContent = _this$props.isShowingContent,\n show = _this$props.show,\n onToggle = _this$props.onToggle,\n onDismiss = _this$props.onDismiss;\n\n if (typeof isShowingContent === 'undefined' && typeof show === 'undefined') {\n // uncontrolled, set state, fire callbacks\n _this.setState(function (_ref) {\n var isShowingContent = _ref.isShowingContent;\n\n if (isShowingContent) {\n onHideContent(event, {\n documentClick: documentClick\n });\n\n if (typeof onDismiss === 'function') {\n onDismiss(event, documentClick);\n }\n }\n\n return {\n isShowingContent: false\n };\n });\n } else if (isShowingContent || show) {\n // controlled, fire callback\n onHideContent(event, {\n documentClick: documentClick\n });\n\n if (typeof onDismiss === 'function') {\n onDismiss(event, documentClick);\n }\n }\n\n if (typeof onToggle === 'function') {\n onToggle(false);\n }\n };\n\n _this.toggle = function (event) {\n if (_this.shown) {\n _this.hide(event);\n } else {\n _this.show(event);\n }\n };\n\n _this.handleDialogDismiss = function () {\n var _this2;\n\n if (!_this.props.shouldReturnFocus && _this.props.shouldFocusContentOnTriggerBlur) {\n var trigger = findDOMNode(_this._trigger);\n\n if (trigger && typeof trigger.focus === 'function') {\n trigger.focus();\n }\n }\n\n (_this2 = _this).hide.apply(_this2, arguments);\n };\n\n _this.handleDialogBlur = function (event) {\n if (event.keyCode === keycode.codes.tab && event.shiftKey && _this.props.shouldFocusContentOnTriggerBlur) {\n return;\n }\n\n _this.hide(event);\n };\n\n _this.handleTriggerKeyDown = function (event) {\n if (!_this.props.shouldFocusContentOnTriggerBlur) {\n return;\n }\n\n if (event.keyCode === keycode.codes.tab && !event.shiftKey) {\n event.preventDefault();\n\n _this._raf.push(requestAnimationFrame(function () {\n _this._dialog && _this._dialog.focus();\n }));\n }\n };\n\n _this.handleTriggerKeyUp = function (event) {\n if (event.keyCode === keycode.codes.esc && _this.shown && _this.isTooltip) {\n // if popover is tooltip, it is managing its own focus region so we need\n // to prevent esc keyup event from reaching FocusRegionManager\n event.preventDefault();\n\n _this.hide(event);\n }\n };\n\n _this.handleTriggerBlur = function (event) {\n if (_this.props.on.indexOf('focus') > -1) {\n _this._raf.push(requestAnimationFrame(function () {\n if (!containsActiveElement(_this._view)) {\n _this.hide(event);\n }\n }));\n }\n };\n\n _this.handlePositioned = function (position) {\n var placement = position.placement;\n\n _this.setState(_objectSpread({\n placement: placement\n }, _this.computeOffsets(placement)));\n\n _this.props.onPositioned(position);\n\n if (typeof _this.props.onShow === 'function') {\n _this.props.onShow(position);\n }\n };\n\n _this.handlePositionChanged = function (position) {\n var placement = position.placement;\n\n _this.setState(_objectSpread({\n placement: placement\n }, _this.computeOffsets(placement)));\n\n _this.props.onPositionChanged(position);\n };\n\n _this.state = {\n placement: props.placement,\n offsetX: props.offsetX,\n offsetY: props.offsetY\n };\n\n if (typeof props.isShowingContent === 'undefined' && typeof props.show === 'undefined') {\n _this.state.isShowingContent = props.defaultIsShowingContent || props.defaultShow;\n }\n\n _this._id = _this.props.id || uid('Popover');\n _this._raf = [];\n _this._handleMouseOver = handleMouseOverOut.bind(null, function (event) {\n _this.show(event);\n });\n _this._handleMouseOut = handleMouseOverOut.bind(null, function (event) {\n _this.hide(event);\n });\n return _this;\n }\n\n _createClass(Popover, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.isTooltip) {\n // if popover is being used as a tooltip with no focusable content\n // manage its FocusRegion internally rather than registering it with\n // the FocusRegionManager via Dialog\n this._focusRegion = new FocusRegion(this._contentElement, {\n shouldCloseOnEscape: false,\n shouldCloseOnDocumentClick: true,\n onDismiss: this.hide\n });\n\n if (this.shown) {\n this._focusRegion.activate();\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this._raf.forEach(function (request) {\n return request.cancel();\n });\n\n this._raf = [];\n\n if (this._focusRegion) {\n this._focusRegion.deactivate();\n\n this._focusRegion.blur();\n }\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps, nextState) {\n return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n if (this._focusRegion && this.isTooltip) {\n // if focus region exists, popover is acting as a tooltip\n // so we manually activate and deactivate the region when showing/hiding\n if (!prevProps.isShowingContent && this.props.isShowingContent || !prevState.isShowingContent && this.state.isShowingContent) {\n // changed from hiding to showing\n this._focusRegion.activate();\n\n this._focusRegion.focus();\n }\n\n if (prevProps.isShowingContent && !this.props.isShowingContent || prevState.isShowingContent && !this.state.isShowingContent) {\n // changed from showing to hiding\n this._focusRegion.deactivate();\n }\n }\n }\n }, {\n key: \"computeOffsets\",\n value: function computeOffsets(placement) {\n var _this$props2 = this.props,\n offsetX = _this$props2.offsetX,\n offsetY = _this$props2.offsetY;\n\n if ((this.props.shouldAlignArrow || this.props.alignArrow) && this._view) {\n var secondaryPlacement = parsePlacement(placement)[1];\n var _this$_view$theme = this._view.theme,\n arrowSize = _this$_view$theme.arrowSize,\n arrowBorderWidth = _this$_view$theme.arrowBorderWidth;\n var offsetAmount = (px(arrowSize) + px(arrowBorderWidth)) * 2;\n\n if (secondaryPlacement === 'start') {\n offsetX = offsetAmount;\n } else if (secondaryPlacement === 'end') {\n offsetX = -offsetAmount;\n } else if (secondaryPlacement === 'top') {\n offsetY = offsetAmount;\n } else if (secondaryPlacement === 'bottom') {\n offsetY = -offsetAmount;\n }\n }\n\n return {\n offsetX: offsetX,\n offsetY: offsetY\n };\n }\n }, {\n key: \"renderTrigger\",\n value: function renderTrigger() {\n var _this3 = this;\n\n var trigger = ComponentIdentifier.pick(Popover.Trigger, this.props.children);\n\n if (!trigger) {\n trigger = callRenderProp(this.props.renderTrigger);\n }\n\n if (trigger) {\n var _this$props3 = this.props,\n on = _this$props3.on,\n shouldContainFocus = _this$props3.shouldContainFocus;\n var onClick;\n var onFocus;\n var onMouseOut;\n var onMouseOver;\n var expanded;\n\n if (on.indexOf('click') > -1) {\n onClick = function onClick(event) {\n _this3.toggle(event);\n };\n }\n\n if (on.indexOf('hover') > -1) {\n /*#__PURE__*/\n\n /*#__PURE__*/\n _error(!(on === 'hover'), '[Popover] Specifying only the `\"hover\"` trigger limits the visibilty of the Popover to just mouse users. ' + 'Consider also including the `\"focus\"` trigger ' + 'so that touch and keyboard only users can see the Popover content as well.');\n\n onMouseOver = this._handleMouseOver;\n onMouseOut = this._handleMouseOut;\n }\n\n if (on.indexOf('focus') > -1) {\n onFocus = function onFocus(event) {\n _this3.show(event);\n };\n }\n\n if (shouldContainFocus) {\n // only set aria-expanded if popover can contain focus\n expanded = this.shown ? 'true' : 'false';\n } else {\n expanded = null;\n }\n\n trigger = safeCloneElement(trigger, {\n ref: function ref(el) {\n return _this3._trigger = el;\n },\n 'aria-expanded': expanded,\n 'data-popover-trigger': true,\n onKeyDown: createChainedFunction(this.handleTriggerKeyDown, this.props.onKeyDown),\n onKeyUp: createChainedFunction(this.handleTriggerKeyUp, this.props.onKeyUp),\n onClick: createChainedFunction(onClick, this.props.onClick),\n onBlur: createChainedFunction(this.handleTriggerBlur, this.props.onBlur),\n onFocus: createChainedFunction(onFocus, this.props.onFocus),\n onMouseOut: createChainedFunction(onMouseOut, this.props.onMouseOut),\n onMouseOver: createChainedFunction(onMouseOver, this.props.onMouseOver)\n });\n }\n\n return trigger;\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this4 = this;\n\n var content = ComponentIdentifier.pick(Popover.Content, this.props.children);\n\n if (!content) {\n content = callRenderProp(this.props.children);\n }\n\n if (this.shown && !this.isTooltip) {\n // if popover is NOT being used as a tooltip, create a Dialog\n // to manage the content FocusRegion, when showing\n content = /*#__PURE__*/React.createElement(Dialog, {\n open: this.shown,\n label: this.props.screenReaderLabel || this.props.label,\n ref: function ref(el) {\n return _this4._dialog = el;\n },\n display: \"block\",\n onBlur: this.handleDialogBlur,\n onDismiss: this.handleDialogDismiss,\n liveRegion: this.props.liveRegion,\n defaultFocusElement: this.props.defaultFocusElement,\n shouldContainFocus: this.props.shouldContainFocus,\n shouldReturnFocus: this.props.shouldReturnFocus,\n shouldFocusOnOpen: !this.props.shouldFocusContentOnTriggerBlur,\n shouldCloseOnDocumentClick: this.props.shouldCloseOnDocumentClick,\n shouldCloseOnEscape: this.props.shouldCloseOnEscape\n }, content);\n }\n\n if (this.shown || this.props.shouldRenderOffscreen) {\n var ViewElement;\n var color = this.props.variant;\n\n if (color) {\n color = color === 'inverse' ? 'primary-inverse' : 'primary';\n } else {\n color = this.props.color;\n }\n\n var viewProps = {\n ref: function ref(c) {\n return _this4._view = c;\n },\n elementRef: function elementRef(el) {\n _this4._contentElement = el;\n\n _this4.props.contentRef(el);\n },\n background: color,\n stacking: this.props.stacking,\n shadow: this.props.shadow,\n display: 'block'\n };\n var placement = this.state.placement;\n\n if (this.props.withArrow) {\n ViewElement = ContextView;\n viewProps = _objectSpread({}, viewProps, {\n // TODO: remove background override after contextview is updated\n background: color === 'primary' ? 'default' : 'inverse',\n placement: this.rtl ? mirrorHorizontalPlacement(placement, ' ') : placement\n });\n } else {\n ViewElement = View;\n viewProps = _objectSpread({}, viewProps, {\n borderWidth: 'small',\n borderRadius: 'medium'\n });\n }\n\n if (this.isTooltip) {\n // preventing pointerEvents reduces tooltip flicker\n viewProps = _objectSpread({}, viewProps, {\n style: {\n pointerEvents: 'none'\n }\n });\n }\n\n return /*#__PURE__*/React.createElement(ViewElement, viewProps, content);\n } else {\n return null;\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var positionProps = this.positionProps;\n\n if (this.props.positionTarget) {\n return /*#__PURE__*/React.createElement(\"span\", null, this.renderTrigger(), /*#__PURE__*/React.createElement(Position, positionProps, this.renderContent()));\n } else {\n return /*#__PURE__*/React.createElement(Position, Object.assign({}, positionProps, {\n renderTarget: this.renderTrigger()\n }), this.renderContent());\n }\n }\n }, {\n key: \"isTooltip\",\n get: function get() {\n return this.props.shouldRenderOffscreen && !this.props.shouldReturnFocus && !this.props.shouldContainFocus && !this.props.shouldFocusContentOnTriggerBlur;\n }\n }, {\n key: \"placement\",\n get: function get() {\n var placement = this.props.placement;\n\n if (this.rtl) {\n placement = mirrorHorizontalPlacement(placement, ' ');\n }\n\n return !this.shown && this.props.shouldRenderOffscreen ? 'offscreen' : placement;\n }\n }, {\n key: \"positionProps\",\n get: function get() {\n return {\n offsetX: this.state.offsetX,\n offsetY: this.state.offsetY,\n shouldTrackPosition: (this.props.shouldTrackPosition || this.props.trackPosition) && this.shown,\n insertAt: this.props.insertAt,\n placement: this.placement,\n constrain: this.props.constrain,\n onPositioned: this.handlePositioned,\n onPositionChanged: this.handlePositionChanged,\n target: this.props.positionTarget,\n mountNode: this.props.mountNode,\n id: this._id\n };\n }\n }, {\n key: \"shown\",\n get: function get() {\n return typeof this.props.isShowingContent === 'undefined' && typeof this.props.show === 'undefined' ? this.state.isShowingContent : this.props.isShowingContent || this.props.show;\n }\n }, {\n key: \"defaultFocusElement\",\n get: function get() {\n return this.props.defaultFocusElement;\n }\n }]);\n\n Popover.displayName = \"Popover\";\n return Popover;\n}(Component), _class6.Trigger = PopoverTrigger, _class6.Content = PopoverContent, _class6.propTypes = {\n /**\n * Whether or not the `` content is shown\n */\n isShowingContent: PropTypes.bool,\n\n /**\n * Whether or not to show the content by default, when uncontrolled\n */\n defaultIsShowingContent: PropTypes.bool,\n\n /**\n * The action that causes the content to display (`click`, `hover`, `focus`)\n */\n on: PropTypes.oneOfType([PropTypes.oneOf(['click', 'hover', 'focus']), PropTypes.arrayOf(PropTypes.oneOf(['click', 'hover', 'focus']))]),\n\n /**\n * Whether or not an arrow pointing to the trigger should be rendered\n */\n withArrow: PropTypes.bool,\n\n /**\n * Color variant of the popover content\n */\n color: PropTypes.oneOf(['primary', 'primary-inverse']),\n\n /**\n * The placement of the content in relation to the trigger\n */\n placement: PositionPropTypes.placement,\n\n /**\n * Controls the shadow depth for the ``\n */\n shadow: ThemeablePropTypes.shadow,\n\n /**\n * Controls the z-index depth for the `` content\n */\n stacking: ThemeablePropTypes.stacking,\n\n /**\n * A function that returns a reference to the content element\n */\n contentRef: PropTypes.func,\n\n /**\n * An element or a function returning an element to focus by default\n */\n defaultFocusElement: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n\n /**\n * An accessible label for the `` content\n */\n screenReaderLabel: PropTypes.string,\n\n /**\n * The horizontal offset for the positioned content\n */\n offsetX: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * The vertical offset for the positioned content\n */\n offsetY: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * The parent in which to constrain the popover.\n * One of: 'window', 'scroll-parent', 'parent', 'none', an element,\n * or a function returning an element\n */\n constrain: PositionPropTypes.constrain,\n\n /**\n * Target element for positioning the Popover (if it differs from the trigger)\n */\n positionTarget: PropTypes.oneOfType([element, PropTypes.func]),\n\n /**\n * An element or a function returning an element to use as the mount node\n * for the `` (defaults to `document.body`)\n */\n mountNode: PositionPropTypes.mountNode,\n\n /**\n * Insert the element at the 'top' of the mountNode or at the 'bottom'\n */\n insertAt: PropTypes.oneOf(['bottom', 'top']),\n\n /**\n * An element, function returning an element, or array of elements that will\n * not be hidden from the screen reader when the `` is open\n */\n liveRegion: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element), PropTypes.element, PropTypes.func]),\n\n /**\n * An id is generated if not supplied.\n */\n id: PropTypes.string,\n\n /**\n * Whether or not the content should offset to align by its arrow\n */\n shouldAlignArrow: PropTypes.bool,\n\n /**\n * Whether or not position should be tracked or just set on initial render\n */\n shouldTrackPosition: PropTypes.bool,\n\n /**\n * Should the `` render offscreen when visually hidden\n */\n shouldRenderOffscreen: PropTypes.bool,\n\n /**\n * Whether focus should contained within the `` when it is open\n */\n shouldContainFocus: PropTypes.bool,\n\n /**\n * Whether focus should be returned to the trigger when the `` is closed\n */\n shouldReturnFocus: PropTypes.bool,\n\n /**\n * Should the `` hide when clicks occur outside the content\n */\n shouldCloseOnDocumentClick: PropTypes.bool,\n\n /**\n * Should the `` hide when the escape key is pressed\n */\n shouldCloseOnEscape: PropTypes.bool,\n\n /**\n * Should the content become focused when the trigger is blurred\n */\n shouldFocusContentOnTriggerBlur: PropTypes.bool,\n\n /**\n * Callback fired when content is shown. When controlled, this callback is\n * fired when the Popover expects to be shown\n */\n onShowContent: PropTypes.func,\n\n /**\n * Callback fired when content is hidden. When controlled, this callback is\n * fired when the Popover expects to be hidden\n */\n onHideContent: PropTypes.func,\n\n /**\n * Callback fired when content has been is initially positioned.\n * If `shouldRenderOffscreen` is true, it will only fire once, the first\n * time the content is shown\n */\n onPositioned: PropTypes.func,\n\n /**\n * Callback fired when the position changes\n */\n onPositionChanged: PropTypes.func,\n\n /**\n * Callback fired when component is clicked\n */\n onClick: PropTypes.func,\n\n /**\n * Callback fired when trigger is focused\n */\n onFocus: PropTypes.func,\n\n /**\n * Callback fired when component is blurred\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired on keydown\n */\n onKeyDown: PropTypes.func,\n\n /**\n * Callback fired on keyup\n */\n onKeyUp: PropTypes.func,\n\n /**\n /**\n * Callback fired when mouse is over trigger\n */\n onMouseOver: PropTypes.func,\n\n /**\n * Callback fired when mouse leaves trigger\n */\n onMouseOut: PropTypes.func,\n\n /**\n * The element that triggers the popover\n */\n renderTrigger: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n\n /**\n * The content to be shown by the popover\n */\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n\n /* eslint-disable react/require-default-props */\n\n /**\n * __Deprecated - use `isShowingContent` instead__\n */\n show: PropTypes.bool,\n\n /**\n * __Deprecated - use `defaultIsShowingContent` instead__\n */\n defaultShow: PropTypes.bool,\n\n /**\n * __Deprecated - use `color`__\n */\n variant: PropTypes.oneOf(['default', 'inverse']),\n\n /**\n * __Deprecated - use `shouldAlignArrow`__\n */\n alignArrow: PropTypes.bool,\n\n /**\n * __Deprecated - use `screenReaderLabel`__\n */\n label: PropTypes.string,\n\n /**\n * __Deprecated - use `shouldTrackPosition`__\n */\n trackPosition: PropTypes.bool,\n\n /**\n * __Deprecated - use `onShowContent`__\n */\n onShow: PropTypes.func,\n\n /**\n * __Deprecated - use `onHideContent`__\n */\n onDismiss: PropTypes.func,\n\n /**\n * __Deprecated - use `onShowContent` and `onHideContent`__\n */\n onToggle: PropTypes.func\n /* eslint-enable react/require-default-props */\n\n}, _class6.defaultProps = {\n isShowingContent: void 0,\n defaultIsShowingContent: false,\n placement: 'bottom center',\n stacking: 'topmost',\n shadow: 'resting',\n offsetX: 0,\n offsetY: 0,\n color: 'primary',\n on: ['hover', 'focus'],\n contentRef: function contentRef(el) {},\n withArrow: true,\n constrain: 'window',\n defaultFocusElement: void 0,\n screenReaderLabel: void 0,\n mountNode: void 0,\n insertAt: 'bottom',\n liveRegion: void 0,\n positionTarget: void 0,\n id: void 0,\n shouldAlignArrow: false,\n shouldTrackPosition: true,\n shouldRenderOffscreen: false,\n shouldContainFocus: false,\n shouldReturnFocus: true,\n shouldCloseOnDocumentClick: true,\n shouldFocusContentOnTriggerBlur: false,\n shouldCloseOnEscape: true,\n onShowContent: function onShowContent(event) {},\n onHideContent: function onHideContent(event, _ref2) {\n var documentClick = _ref2.documentClick;\n },\n onClick: function onClick(event) {},\n onFocus: function onFocus(event) {},\n onBlur: function onBlur(event) {},\n onMouseOver: function onMouseOver(event) {},\n onMouseOut: function onMouseOut(event) {},\n onKeyDown: function onKeyDown(event) {},\n onKeyUp: function onKeyUp(event) {},\n onPositioned: function onPositioned(position) {},\n onPositionChanged: function onPositionChanged(position) {},\n renderTrigger: null,\n children: null\n}, _temp3)) || _class5) || _class5) || _class5);\nexport default Popover;\nexport { Popover, PopoverTrigger, PopoverContent };","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar mirror = {\n center: 'center',\n start: 'end',\n end: 'start',\n top: 'bottom',\n bottom: 'top',\n stretch: 'stretch',\n offscreen: 'offscreen'\n};\n\nfunction mirrorPlacement(placement, delimiter) {\n return executeMirrorFunction(placement, function (first, second) {\n return [mirror[first], second];\n }, delimiter);\n}\n/**\n * Given a string or array of one or two placement values, mirrors the placement\n * horizontally.\n *\n * Examples\n * ```js\n * mirrorHorizontalPlacement('top start') // input\n * ['top', 'end'] // output\n *\n * mirrorPlacement('top start', ' ') // input\n * 'top end' //output\n * ```\n *\n * @param {string|Array} placement - a string of the form ' ' or array [, ]\n * @param {string} delimiter - when provided, a value with which the result array will be joined\n * @returns {string|Array} - an array of values or, if the delimiter was supplied, a string of\n * delimiter separated values\n */\n\n\nfunction mirrorHorizontalPlacement(placement, delimiter) {\n return executeMirrorFunction(placement, function (first, second) {\n return [first, second].map(function (value) {\n return value === 'start' || value === 'end' ? mirror[value] : value;\n });\n }, delimiter);\n}\n\nfunction executeMirrorFunction(placement, mirrorFunction, delimiter) {\n var _ref = Array.isArray(placement) ? placement : placement.split(' '),\n _ref2 = _slicedToArray(_ref, 2),\n first = _ref2[0],\n second = _ref2[1];\n\n var result = mirrorFunction(first, second).filter(function (value) {\n return value;\n });\n return delimiter ? result.join(delimiter) : result;\n}\n\nexport default mirrorPlacement;\nexport {\n/**\n * ---\n * category: utilities/position\n * ---\n * Given a string or array of one or two placement values, mirrors the placement\n * vertically or horizontally based on the first value.\n *\n * Examples\n * ```js\n * mirrorPlacement('top start') // input\n * ['bottom', 'start'] // output\n *\n * mirrorPlacement('top start', ' ') // input\n * 'bottom start' //output\n * ```\n *\n * @param {string|Array} placement - a string of the form ' ' or array [, ]\n * @param {string} delimiter - when provided, a value with which the result array will be joined\n * @returns {string|Array} - an array of values or, if the delimiter was supplied, a string of\n * delimiter separated values\n *\n * @module mirrorPlacement\n **/\nmirrorPlacement, mirrorHorizontalPlacement, executeMirrorFunction };","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { matchComponentTypes } from './matchComponentTypes';\nimport { ensureSingleChild } from './ensureSingleChild';\n/**\n---\ncategory: utilities/react\n---\nAbstract component identifier. Helpful for picking out a specific child.\n\n ```js\n class App extends Component {\n render () {\n const title = pick(Title, this.props.children)\n const content = pick(Content, this.props.children)\n\n return (\n
\n {title}\n \n {content}\n \n
\n )\n }\n }\n\n class Title extends ComponentIdentifier { static displayName = 'Title' }\n class Content extends ComponentIdentifier { static displayName = 'Content' }\n\n ReactDOM.render(\n \n <h2>Hello World!</h2>\n
This text gets decorated within `App`.
\n
,\n document.getElementById('container')\n )\n ```\n @module ComponentIdentifier\n**/\n\nvar ComponentIdentifier = /*#__PURE__*/function (_Component) {\n _inherits(ComponentIdentifier, _Component);\n\n var _super = _createSuper(ComponentIdentifier);\n\n function ComponentIdentifier() {\n _classCallCheck(this, ComponentIdentifier);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(ComponentIdentifier, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n children = _this$props.children,\n props = _objectWithoutProperties(_this$props, [\"children\"]);\n\n return ensureSingleChild(children, props);\n }\n }]);\n\n ComponentIdentifier.displayName = \"ComponentIdentifier\";\n return ComponentIdentifier;\n}(Component);\n\nComponentIdentifier.propTypes = {\n children: PropTypes.node\n};\nComponentIdentifier.defaultProps = {\n children: null\n};\n\nComponentIdentifier.pick = function (component, children) {\n var result;\n React.Children.forEach(children, function (child) {\n if (matchComponentTypes(child, [component])) {\n result = child;\n }\n });\n return result;\n};\n\nexport default ComponentIdentifier;\nexport {\n/**\n*\n* Pick a specific child component from a component's children\n*\n* @param {Component} component The component to look for\n* @param {Array} children The child components to look through\n* @return {Component} The matching component if found, otherwise undefined\n*/\nComponentIdentifier };","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport { findDOMNode } from './findDOMNode';\nimport { getBoundingClientRect } from './getBoundingClientRect';\nimport { requestAnimationFrame } from './requestAnimationFrame';\n/**\n * ---\n * category: utilities/DOM\n * ---\n * Adds a listener to an element and calls a specified handler\n * function whenever the position changes\n * @module\n * @param {ReactComponent|DomNode} el - component or DOM node\n * @param {function} handler - function to run if the position has changed\n * @returns {function} remove - cancel the listener and no longer execute the handler function\n */\n\nfunction addPositionChangeListener(el, handler) {\n var node = findDOMNode(el);\n var raf = [];\n var coords = getBoundingClientRect(node) || {};\n var cancelled = false;\n\n function checkPosition() {\n if (cancelled === false) {\n var newCoords = getBoundingClientRect(node) || {};\n var positionChanged = newCoords.top !== coords.top || newCoords.left !== coords.left || newCoords.right !== coords.right || newCoords.bottom !== coords.bottom || newCoords.width !== coords.width || newCoords.height !== coords.height;\n\n if (positionChanged && typeof handler === 'function') {\n handler(newCoords);\n }\n\n coords = newCoords;\n raf.push(requestAnimationFrame(checkPosition));\n }\n }\n\n checkPosition();\n return {\n remove: function remove() {\n cancelled = true;\n raf.forEach(function (req) {\n return req.cancel();\n });\n }\n };\n}\n\nexport default addPositionChangeListener;\nexport { addPositionChangeListener };","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nexport default function (_ref) {\n var stacking = _ref.stacking;\n return {\n zIndex: stacking.topmost\n };\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n\nvar _dec, _dec2, _class, _class2, _temp, _dec3, _dec4, _class3, _class4, _temp2, _dec5, _dec6, _dec7, _class5, _class6, _temp3;\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { themeable } from '@instructure/ui-themeable';\nimport { element } from '@instructure/ui-prop-types';\nimport { ComponentIdentifier, safeCloneElement, callRenderProp, ensureSingleChild, deprecated } from '@instructure/ui-react-utils';\nimport { addPositionChangeListener, findDOMNode } from '@instructure/ui-dom-utils';\nimport { uid } from '@instructure/uid';\nimport { shallowEqual, deepEqual } from '@instructure/ui-utils';\nimport { debounce } from '@instructure/debounce';\nimport { testable } from '@instructure/ui-testable';\nimport { Portal } from '@instructure/ui-portal';\nimport { calculateElementPosition } from '../calculateElementPosition';\nimport { PositionPropTypes } from '../PositionPropTypes';\nvar styles = {\n componentId: 'eGKPI',\n template: function template(theme) {\n return \"\\n\\n.eGKPI_bGBk{box-sizing:border-box;z-index:\".concat(theme.zIndex || 'inherit', \"}\");\n },\n 'root': 'eGKPI_bGBk'\n};\nimport theme from './theme';\nvar PositionTarget = (_dec = deprecated('8.0.0', null, 'Use Position\\'s `renderTarget` prop instead.'), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = /*#__PURE__*/function (_ComponentIdentifier) {\n _inherits(PositionTarget, _ComponentIdentifier);\n\n var _super = _createSuper(PositionTarget);\n\n function PositionTarget() {\n _classCallCheck(this, PositionTarget);\n\n return _super.apply(this, arguments);\n }\n\n return PositionTarget;\n}(ComponentIdentifier), _class2.displayName = 'PositionTarget', _class2.locatorAttribute = 'data-position-target', _temp)) || _class) || _class);\nvar PositionContent = (_dec3 = deprecated('8.0.0', null, 'Use Posiition\\'s `children` instead.'), _dec4 = testable(), _dec3(_class3 = _dec4(_class3 = (_temp2 = _class4 = /*#__PURE__*/function (_ComponentIdentifier2) {\n _inherits(PositionContent, _ComponentIdentifier2);\n\n var _super2 = _createSuper(PositionContent);\n\n function PositionContent() {\n _classCallCheck(this, PositionContent);\n\n return _super2.apply(this, arguments);\n }\n\n return PositionContent;\n}(ComponentIdentifier), _class4.displayName = 'PositionContent', _class4.propTypes = {\n children: PropTypes.node,\n placement: PositionPropTypes.placement\n}, _class4.locatorAttribute = 'data-position-content', _temp2)) || _class3) || _class3);\n/**\n---\ncategory: components/utilities\n---\n**/\n\nvar Position = (_dec5 = deprecated('8.0.0', {\n trackPosition: 'shouldTrackPosition',\n over: 'shouldPositionOverTarget'\n}), _dec6 = testable(), _dec7 = themeable(theme, styles), _dec5(_class5 = _dec6(_class5 = _dec7(_class5 = (_temp3 = _class6 = /*#__PURE__*/function (_Component) {\n _inherits(Position, _Component);\n\n var _super3 = _createSuper(Position);\n\n function Position(props) {\n var _this;\n\n _classCallCheck(this, Position);\n\n _this = _super3.call(this, props);\n _this._timeouts = [];\n\n _this.handlePortalOpen = function () {\n _this.position();\n\n if (_this.props.shouldTrackPosition || _this.props.trackPosition) {\n _this.startTracking();\n }\n\n _this._timeouts.push(setTimeout(function () {\n if (_this.state.positioned && typeof _this.props.onPositioned === 'function') {\n _this.props.onPositioned({\n top: _this.state.style.top,\n left: _this.state.style.left,\n placement: _this.state.placement\n });\n }\n }, 0));\n };\n\n _this.position = function () {\n _this.setState(_objectSpread({\n positioned: true\n }, _this.calculatePosition(_this.props)));\n };\n\n _this.state = _objectSpread({\n positioned: false\n }, _this.calculatePosition(props));\n _this.position = debounce(_this.position, 0, {\n leading: false,\n trailing: true\n });\n _this._id = _this.props.id || uid('Position');\n return _this;\n }\n\n _createClass(Position, [{\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps, nextState, nextContext) {\n return !deepEqual(this.state, nextState) || !shallowEqual(this.props, nextProps) || !shallowEqual(this.context, nextContext);\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.toggleLocatorAttributes(true);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n this.position();\n this.toggleLocatorAttributes(true);\n\n if (this.props.shouldTrackPosition !== prevProps.shouldTrackPosition) {\n this.props.shouldTrackPosition ? this.startTracking() : this.stopTracking();\n } else if (this.props.trackPosition !== prevProps.trackPosition) {\n this.props.trackPosition ? this.startTracking() : this.stopTracking();\n }\n\n var _this$state = this.state,\n style = _this$state.style,\n placement = _this$state.placement;\n\n if (style && prevState.style && (placement !== prevState.placement || style.top !== prevState.style.top || style.left !== prevState.style.left)) {\n this.props.onPositionChanged({\n top: style.top,\n left: style.left,\n placement: placement\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.position.cancel();\n this.stopTracking();\n\n this._timeouts.forEach(function (timeout) {\n return clearTimeout(timeout);\n });\n\n this.toggleLocatorAttributes(false);\n }\n }, {\n key: \"toggleLocatorAttributes\",\n value: function toggleLocatorAttributes(set) {\n // We have to find the actual DOM nodes and append the attributes\n // directly, as we can't be sure when safe cloning the child that\n // it will accept the data attribute as a prop\n this.toggleLocatorAttribute(findDOMNode(this._content), Position.contentLocatorAttribute, set);\n this.toggleLocatorAttribute(findDOMNode(this._target), Position.targetLocatorAttribute, set);\n }\n }, {\n key: \"toggleLocatorAttribute\",\n value: function toggleLocatorAttribute(node, locator, set) {\n if (node && node.hasAttribute) {\n if (set && !node.hasAttribute(locator)) {\n node.setAttribute(locator, this._id);\n }\n\n if (!set && node.hasAttribute(locator)) {\n node.removeAttribute(locator);\n }\n }\n }\n }, {\n key: \"calculatePosition\",\n value: function calculatePosition(props) {\n return calculateElementPosition(this._content, this._target, {\n placement: props.placement,\n offsetX: props.offsetX,\n offsetY: props.offsetY,\n constrain: props.constrain,\n container: props.mountNode,\n over: props.shouldPositionOverTarget || props.over\n });\n }\n }, {\n key: \"startTracking\",\n value: function startTracking() {\n this._listener = this._listener || addPositionChangeListener(this._target, this.position);\n }\n }, {\n key: \"stopTracking\",\n value: function stopTracking() {\n if (this._listener) {\n this._listener.remove();\n\n this._listener = null;\n }\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this2 = this;\n\n var content = ComponentIdentifier.pick(Position.Content, this.props.children);\n\n if (!content) {\n content = ensureSingleChild(this.props.children);\n }\n\n if (content) {\n var _classnames;\n\n content = safeCloneElement(content, _defineProperty({\n ref: function ref(el) {\n _this2._content = el;\n },\n style: _objectSpread({}, content.props.style, {}, this.state.style),\n className: classnames((_classnames = {}, _defineProperty(_classnames, styles.root, true), _defineProperty(_classnames, content.props.className, content.props.className), _classnames))\n }, Position.contentLocatorAttribute, this._id));\n content = /*#__PURE__*/React.createElement(Portal, {\n open: true,\n onOpen: this.handlePortalOpen,\n mountNode: this.props.mountNode,\n insertAt: this.props.insertAt\n }, content);\n }\n\n return content;\n }\n }, {\n key: \"renderTarget\",\n value: function renderTarget() {\n var _this3 = this;\n\n var target = ComponentIdentifier.pick(Position.Target, this.props.children);\n\n if (!target) {\n target = callRenderProp(this.props.renderTarget);\n }\n\n if (target) {\n return safeCloneElement(target, _defineProperty({\n ref: function ref(el) {\n _this3._target = el;\n }\n }, Position.targetLocatorAttribute, this._id));\n } else if (this.props.target) {\n this._target = callRenderProp(this.props.target);\n } else {\n return null;\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var props = _defineProperty({}, Position.locatorAttribute, this._id);\n\n return /*#__PURE__*/React.createElement(\"span\", props, this.renderTarget(), this.renderContent());\n }\n }]);\n\n Position.displayName = \"Position\";\n return Position;\n}(Component), _class6.Target = PositionTarget, _class6.Content = PositionContent, _class6.locatorAttribute = 'data-position', _class6.targetLocatorAttribute = 'data-position-target', _class6.contentLocatorAttribute = 'data-position-content', _class6.propTypes = {\n /**\n * The node to use as the position target\n */\n renderTarget: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n\n /**\n * The target to be used when not using `renderTarget`\n */\n target: PropTypes.oneOfType([element, PropTypes.func]),\n\n /**\n * The placement of the content in relation to the target\n */\n placement: PositionPropTypes.placement,\n\n /**\n * An element or a function returning an element to use as the mount node\n * for the `` (defaults to `document.body`)\n */\n mountNode: PositionPropTypes.mountNode,\n\n /**\n * Insert the element at the 'top' of the mountNode or at the 'bottom'\n */\n insertAt: PropTypes.oneOf(['bottom', 'top']),\n\n /**\n * The parent in which to constrain the placement.\n * One of: 'window', 'scroll-parent', 'parent', 'none', an element,\n * or a function returning an element\n */\n constrain: PositionPropTypes.constrain,\n\n /**\n * The horizontal offset for the positioned content\n */\n offsetX: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * The vertical offset for the positioned content\n */\n offsetY: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * An id will be generated if not provided\n */\n id: PropTypes.string,\n\n /**\n * Whether or not position of the target should be tracked or just set statically on render\n */\n shouldTrackPosition: PropTypes.bool,\n\n /**\n * Whether or not you want the content to position over the target\n */\n shouldPositionOverTarget: PropTypes.bool,\n\n /**\n * Callback fired when the position changes\n */\n onPositionChanged: PropTypes.func,\n\n /**\n * Callback fired when `` content has been mounted and is initially positioned\n */\n onPositioned: PropTypes.func,\n\n /**\n * The content to be positioned\n */\n children: PropTypes.node,\n\n /* eslint-disable react/require-default-props */\n\n /**\n * __Deprecated - use `shouldTrackPosition`__\n */\n trackPosition: PropTypes.bool,\n\n /**\n * __Deprecated - use `shouldPositionOverTarget`__\n */\n over: PropTypes.bool\n /* eslint-enable react/require-default-props */\n\n}, _class6.defaultProps = {\n renderTarget: void 0,\n target: void 0,\n placement: 'bottom center',\n mountNode: null,\n insertAt: 'bottom',\n constrain: 'window',\n offsetX: 0,\n offsetY: 0,\n id: void 0,\n shouldTrackPosition: true,\n shouldPositionOverTarget: false,\n onPositioned: function onPositioned(position) {},\n onPositionChanged: function onPositionChanged(position) {},\n children: null\n}, _temp3)) || _class5) || _class5) || _class5);\nexport default Position;\nexport { Position };"],"sourceRoot":""}