{"version":3,"file":"index.js","sources":["coralui-externals/polyfills/element.closest.js","coralui-externals/polyfills/element.matches.js","coralui-externals/polyfills/element.remove.js","coralui-externals/polyfills/classList-partial-shim.js","coralui-externals/polyfills/requestAnimationFrame.js","coralui-externals/polyfills/CustomEvent.js","coralui-externals/polyfills/focus-ring.js","node_modules/promise-polyfill/promise.js","node_modules/popper.js/dist/esm/popper.js","node_modules/@coralui/vent/vent.js","coralui-util/src/templates/resizer.js","coralui-util/src/scripts/ResizeObserver.js","coralui-util/src/scripts/Commons.js","coralui-util/src/scripts/Events.js","coralui-util/src/scripts/I18nProvider.js","coralui-util/src/scripts/commons.js","coralui-util/src/scripts/Keys.js","coralui-util/src/scripts/Transformation.js","coralui-util/src/scripts/Validation.js","coralui-util/index.js","coralui-externals/libs/typekit.js","coralui-externals/polyfills/forcePolyfill.js","coralui-externals/polyfills/custom-elements.min.js","coralui-externals/polyfills/document.createElement-patch.js","coralui-externals/index.js","coralui-collection/src/scripts/listToArray.js","coralui-collection/src/scripts/Collection.js","coralui-collection/src/scripts/SelectableCollection.js","coralui-datetime/src/scripts/DateTime.js","coralui-datetime/index.js","coralui-dragaction/src/scripts/DragAction.js","coralui-dragaction/index.js","coralui-mixin-component/src/scripts/ComponentMixin.js","coralui-mixin-component/index.js","coralui-component-accordion/src/scripts/Accordion.js","node_modules/@spectrum/spectrum-css/dist/icons/AS.loadIcons.js","coralui-component-icon/src/scripts/Icon.js","coralui-component-icon/index.js","coralui-component-accordion/src/scripts/AccordionItem.js","coralui-component-accordion/src/scripts/AccordionItemLabel.js","coralui-component-accordion/src/scripts/AccordionItemContent.js","coralui-component-accordion/index.js","coralui-component-actionbar/src/scripts/getFirstSelectableWrappedItem.js","coralui-component-actionbar/src/scripts/ActionBar.js","coralui-component-actionbar/src/scripts/ActionBarItem.js","coralui-component-actionbar/src/scripts/ActionBarContainerCollection.js","coralui-mixin-button/src/scripts/ButtonMixin.js","coralui-mixin-button/index.js","coralui-component-button/src/scripts/Button.js","coralui-component-button/src/scripts/ButtonLabel.js","coralui-component-button/index.js","coralui-component-anchorbutton/src/scripts/AnchorButton.js","coralui-component-anchorbutton/src/scripts/AnchorButtonLabel.js","coralui-component-anchorbutton/index.js","coralui-mixin-overlay/src/templates/base.js","coralui-mixin-overlay/src/scripts/enums.js","coralui-mixin-overlay/src/scripts/OverlayMixin.js","coralui-mixin-overlay/index.js","coralui-component-overlay/src/scripts/Overlay.js","coralui-component-overlay/index.js","coralui-component-popover/src/templates/base.js","coralui-component-popover/src/scripts/Popover.js","coralui-component-dialog/src/templates/base.js","coralui-component-dialog/src/scripts/Dialog.js","coralui-component-dialog/src/scripts/DialogHeader.js","coralui-component-dialog/src/scripts/DialogContent.js","coralui-component-dialog/src/scripts/DialogFooter.js","coralui-component-dialog/index.js","coralui-component-popover/src/scripts/PopoverHeader.js","coralui-component-popover/src/scripts/PopoverContent.js","coralui-component-popover/src/scripts/PopoverFooter.js","coralui-component-popover/src/scripts/PopoverSeparator.js","coralui-component-popover/index.js","coralui-component-actionbar/src/templates/moreOverlay.js","coralui-component-actionbar/src/templates/moreButton.js","coralui-component-actionbar/src/templates/overlayContent.js","coralui-component-actionbar/src/scripts/ActionBarContainerMixin.js","coralui-component-actionbar/src/scripts/ActionBarPrimary.js","coralui-component-actionbar/src/scripts/ActionBarSecondary.js","coralui-mixin-list/src/scripts/ListMixin.js","coralui-mixin-list/src/templates/item.js","coralui-mixin-list/src/scripts/ListItemMixin.js","coralui-mixin-list/index.js","coralui-component-list/src/scripts/List.js","coralui-component-list/src/scripts/ListDivider.js","coralui-component-list/src/scripts/ListItem.js","coralui-component-list/src/scripts/ListItemContent.js","coralui-component-list/src/scripts/AnchorList.js","coralui-component-list/src/scripts/AnchorListItem.js","coralui-component-list/src/scripts/ButtonList.js","coralui-component-list/src/scripts/ButtonListItem.js","coralui-component-wait/src/scripts/Wait.js","coralui-component-wait/index.js","coralui-component-list/src/templates/loadIndicator.js","coralui-component-list/src/scripts/SelectList.js","coralui-component-list/src/scripts/SelectListGroup.js","coralui-component-list/src/templates/checkIcon.js","coralui-component-list/src/scripts/SelectListItem.js","coralui-component-list/src/scripts/SelectListItemContent.js","coralui-component-list/index.js","coralui-component-actionbar/src/scripts/ActionBarContainer.js","coralui-component-actionbar/index.js","coralui-component-alert/src/scripts/Alert.js","coralui-component-alert/src/scripts/AlertHeader.js","coralui-component-alert/src/scripts/AlertContent.js","coralui-component-alert/src/scripts/AlertFooter.js","coralui-component-alert/index.js","coralui-mixin-formfield/src/scripts/FormFieldMixin.js","coralui-mixin-formfield/index.js","coralui-component-taglist/src/templates/base.js","coralui-component-taglist/src/scripts/Tag.js","coralui-component-taglist/src/scripts/TagLabel.js","coralui-component-taglist/src/scripts/TagList.js","coralui-component-taglist/index.js","coralui-component-autocomplete/src/scripts/AutocompleteItem.js","coralui-component-textfield/src/scripts/Textfield.js","coralui-component-textfield/index.js","coralui-component-autocomplete/src/templates/base.js","coralui-component-autocomplete/src/templates/loadIndicator.js","coralui-component-autocomplete/src/scripts/Autocomplete.js","coralui-component-autocomplete/index.js","coralui-component-buttongroup/src/templates/base.js","coralui-component-buttongroup/src/scripts/ButtonGroup.js","coralui-component-buttongroup/index.js","coralui-component-calendar/src/templates/calendar.js","coralui-component-calendar/src/templates/container.js","coralui-component-calendar/src/templates/table.js","coralui-component-calendar/src/scripts/Calendar.js","coralui-component-calendar/index.js","coralui-component-card/src/templates/base.js","coralui-component-card/src/scripts/Card.js","coralui-component-card/src/scripts/CardBanner.js","coralui-component-card/src/scripts/CardBannerHeader.js","coralui-component-card/src/scripts/CardBannerContent.js","coralui-component-card/src/templates/icon.js","coralui-component-card/src/scripts/CardProperty.js","coralui-component-card/src/scripts/CardTitle.js","coralui-component-card/src/scripts/CardSubtitle.js","coralui-component-card/src/scripts/CardContext.js","coralui-component-card/src/scripts/CardDescription.js","coralui-component-card/src/scripts/CardAsset.js","coralui-component-card/src/scripts/CardOverlay.js","coralui-component-card/src/scripts/CardInfo.js","coralui-component-card/src/scripts/CardContent.js","coralui-component-card/src/scripts/CardPropertyList.js","coralui-component-card/src/scripts/CardPropertyContent.js","coralui-component-card/index.js","coralui-component-charactercount/src/scripts/CharacterCount.js","coralui-component-charactercount/index.js","coralui-component-checkbox/src/templates/base.js","coralui-component-checkbox/src/scripts/Checkbox.js","coralui-component-checkbox/src/scripts/CheckboxLabel.js","coralui-component-checkbox/index.js","coralui-component-select/src/templates/base.js","coralui-component-select/src/scripts/Select.js","coralui-component-select/src/scripts/SelectItem.js","coralui-component-select/index.js","coralui-component-clock/src/templates/base.js","coralui-component-clock/src/scripts/Clock.js","coralui-component-clock/index.js","coralui-component-colorinput/src/scripts/Color.js","coralui-component-colorinput/src/scripts/ColorInputItem.js","coralui-component-colorinput/src/scripts/ColorInputAbstractSubviewMixin.js","coralui-component-slider/src/templates/base.js","coralui-component-slider/src/scripts/Slider.js","coralui-component-slider/src/scripts/SliderContent.js","coralui-component-slider/src/scripts/SliderItem.js","coralui-component-slider/src/templates/range.js","coralui-component-slider/src/scripts/RangedSlider.js","coralui-component-slider/index.js","coralui-component-tooltip/src/templates/base.js","coralui-component-tooltip/src/scripts/Tooltip.js","coralui-component-tooltip/src/scripts/TooltipContent.js","coralui-component-tooltip/index.js","coralui-component-colorinput/src/templates/sliderBase.js","coralui-component-colorinput/src/scripts/ColorInputSlider.js","coralui-component-colorinput/src/templates/colorProperties.js","coralui-component-colorinput/src/scripts/ColorInputColorProperties.js","coralui-component-colorinput/src/templates/colorButton.js","coralui-component-colorinput/src/scripts/ColorInputSwatch.js","coralui-component-colorinput/src/templates/swatchesHeader.js","coralui-component-colorinput/src/scripts/ColorInputSwatches.js","coralui-component-colorinput/src/templates/base.js","coralui-component-colorinput/src/scripts/ColorInput.js","coralui-component-colorinput/index.js","coralui-component-columnview/src/scripts/ColumnViewCollection.js","coralui-component-columnview/src/scripts/selectionMode.js","coralui-component-columnview/src/scripts/ColumnView.js","coralui-component-columnview/src/scripts/ColumnViewColumn.js","coralui-component-columnview/src/scripts/ColumnViewColumnContent.js","coralui-component-columnview/src/scripts/ColumnViewItem.js","coralui-component-columnview/src/scripts/ColumnViewItemContent.js","coralui-component-columnview/src/scripts/ColumnViewItemThumbnail.js","coralui-component-columnview/src/scripts/ColumnViewPreview.js","coralui-component-columnview/src/scripts/ColumnViewPreviewAsset.js","coralui-component-columnview/src/scripts/ColumnViewPreviewContent.js","coralui-component-columnview/src/scripts/ColumnViewPreviewLabel.js","coralui-component-columnview/src/scripts/ColumnViewPreviewSeparator.js","coralui-component-columnview/src/scripts/ColumnViewPreviewValue.js","coralui-component-columnview/index.js","coralui-component-cyclebutton/src/scripts/CycleButtonItem.js","coralui-component-cyclebutton/src/templates/base.js","coralui-component-cyclebutton/src/scripts/CycleButton.js","coralui-component-cyclebutton/src/scripts/CycleButtonAction.js","coralui-component-cyclebutton/index.js","coralui-component-datepicker/src/templates/base.js","coralui-component-datepicker/src/templates/overlayContent.js","coralui-component-datepicker/src/scripts/Datepicker.js","coralui-component-datepicker/index.js","coralui-component-drawer/src/templates/base.js","coralui-component-drawer/src/scripts/Drawer.js","coralui-component-drawer/src/scripts/DrawerContent.js","coralui-component-drawer/index.js","coralui-component-fileupload/src/scripts/FileUploadItem.js","coralui-component-fileupload/src/templates/base.js","coralui-component-fileupload/src/scripts/FileUpload.js","coralui-component-fileupload/index.js","coralui-component-masonry/src/scripts/MasonryItem.js","coralui-component-masonry/src/scripts/Masonry.js","coralui-component-masonry/src/scripts/MasonryLayout.js","coralui-component-masonry/src/scripts/MasonryLayoutUtil.js","coralui-component-masonry/src/scripts/MasonryColumnLayout.js","coralui-component-masonry/src/scripts/MasonryFixedCenteredLayout.js","coralui-component-masonry/src/scripts/MasonryFixedSpreadLayout.js","coralui-component-masonry/src/scripts/MasonryVariableLayout.js","coralui-component-masonry/src/scripts/MasonryDashboardLayout.js","coralui-component-masonry/index.js","coralui-component-multifield/src/scripts/MultifieldCollection.js","coralui-component-multifield/src/scripts/Multifield.js","coralui-component-multifield/src/templates/item.js","coralui-component-multifield/src/scripts/MultifieldItem.js","coralui-component-multifield/src/scripts/MultifieldItemContent.js","coralui-component-multifield/index.js","coralui-component-numberinput/src/templates/base.js","coralui-component-numberinput/src/scripts/NumberInput.js","coralui-component-numberinput/index.js","coralui-component-panelstack/src/scripts/PanelStack.js","coralui-component-panelstack/src/scripts/Panel.js","coralui-component-panelstack/src/scripts/PanelContent.js","coralui-component-panelstack/index.js","coralui-component-progress/src/templates/base.js","coralui-component-progress/src/scripts/Progress.js","coralui-component-progress/src/scripts/ProgressLabel.js","coralui-component-progress/index.js","coralui-component-quickactions/src/scripts/QuickActionsItem.js","coralui-component-quickactions/src/templates/base.js","coralui-component-quickactions/src/scripts/QuickActions.js","coralui-component-quickactions/index.js","coralui-component-radio/src/templates/base.js","coralui-component-radio/src/scripts/Radio.js","coralui-component-radio/src/scripts/RadioLabel.js","coralui-component-radio/index.js","coralui-component-shell/src/scripts/Shell.js","coralui-component-shell/src/scripts/ShellContent.js","coralui-component-shell/src/scripts/ShellHeader.js","coralui-component-shell/src/templates/homeAnchorIcon.js","coralui-component-shell/src/scripts/ShellHomeAnchor.js","coralui-component-shell/src/scripts/ShellHomeAnchorLabel.js","coralui-component-search/src/templates/base.js","coralui-component-search/src/scripts/Search.js","coralui-component-search/index.js","coralui-component-shell/src/templates/help.js","coralui-component-shell/src/templates/helpResult.js","coralui-component-shell/src/templates/helpSearchError.js","coralui-component-shell/src/templates/noHelpResults.js","coralui-component-shell/src/scripts/ShellHelp.js","coralui-component-shell/src/scripts/ShellHelpItem.js","coralui-component-shell/src/scripts/ShellMenu.js","coralui-component-shell/src/scripts/ShellMenuBar.js","coralui-component-shell/src/templates/menuBarItem.js","coralui-component-shell/src/scripts/ShellMenuBarItem.js","coralui-component-shell/src/templates/user.js","coralui-component-shell/src/scripts/ShellUser.js","coralui-component-shell/src/scripts/ShellUserContent.js","coralui-component-shell/src/scripts/ShellUserFooter.js","coralui-component-shell/src/scripts/ShellUserHeading.js","coralui-component-shell/src/scripts/ShellUserName.js","coralui-component-shell/src/scripts/ShellUserSubheading.js","coralui-component-shell/src/scripts/ShellWorkspaces.js","coralui-component-shell/src/scripts/ShellWorkspace.js","coralui-component-shell/src/templates/solutionSwitcher.js","coralui-component-shell/src/scripts/ShellSolutionSwitcher.js","coralui-component-shell/src/scripts/ShellSolutions.js","coralui-component-shell/src/scripts/ShellSolutionsHeader.js","coralui-component-shell/src/templates/solutionIcon.js","coralui-component-shell/src/scripts/ShellSolution.js","coralui-component-shell/src/scripts/ShellSolutionLabel.js","coralui-component-shell/src/templates/orgSwitcher.js","coralui-component-shell/src/scripts/ShellOrgSwitcher.js","coralui-component-shell/src/scripts/ShellOrgSwitcherFooter.js","coralui-component-shell/src/templates/organization.js","coralui-component-shell/src/scripts/ShellOrganization.js","coralui-component-shell/src/scripts/ShellSuborganization.js","coralui-component-shell/index.js","coralui-component-steplist/src/scripts/getTarget.js","coralui-component-steplist/src/scripts/StepList.js","coralui-component-steplist/src/templates/step.js","coralui-component-steplist/src/scripts/Step.js","coralui-component-steplist/src/scripts/StepLabel.js","coralui-component-steplist/index.js","coralui-component-switch/src/templates/base.js","coralui-component-switch/src/scripts/Switch.js","coralui-component-switch/src/scripts/SwitchLabel.js","coralui-component-switch/index.js","coralui-component-table/src/scripts/TableUtil.js","coralui-component-table/src/scripts/TableColumn.js","coralui-component-table/src/scripts/TableCell.js","coralui-component-table/src/scripts/TableHeaderCell.js","coralui-component-table/src/scripts/TableRow.js","coralui-component-table/src/scripts/TableSectionMixin.js","coralui-component-table/src/scripts/TableHead.js","coralui-component-table/src/scripts/TableBody.js","coralui-component-table/src/scripts/TableFoot.js","coralui-component-table/src/templates/base.js","coralui-component-table/src/scripts/Table.js","coralui-component-table/src/scripts/TableHeaderCellContent.js","coralui-component-table/index.js","coralui-component-tablist/src/templates/base.js","coralui-component-tablist/src/scripts/getTarget.js","coralui-component-tablist/src/scripts/Tab.js","coralui-component-tablist/src/scripts/TabLabel.js","coralui-component-tablist/src/templates/line.js","coralui-component-tablist/src/scripts/TabList.js","coralui-component-tablist/index.js","coralui-component-tabview/src/scripts/TabView.js","coralui-component-tabview/index.js","coralui-component-textarea/src/scripts/Textarea.js","coralui-component-textarea/index.js","coralui-component-tree/src/scripts/Tree.js","coralui-component-tree/src/templates/treeItem.js","coralui-component-tree/src/scripts/TreeItem.js","coralui-component-tree/src/scripts/TreeItemContent.js","coralui-component-tree/index.js","coralui-component-wizardview/src/scripts/WizardView.js","coralui-component-wizardview/index.js","node_modules/document-register-element/build/document-register-element.js","coralui-compat/libs/Coral.register.js","coralui-compat/libs/Coral.Property.js","coralui-compat/libs/Coral.Component.js","coralui-compat/index.js","index.js"],"sourcesContent":["/*! @source http://codegists.com/snippet/javascript/closest-polyfilljs_monochromer_javascript */\n(function() {\n  //closest polyfill\n  if (!Element.prototype.closest) {\n    Element.prototype.closest = function(selector) {\n      var node = this;\n      \n      while (node) {\n        if (node.matches(selector)) return node;\n        else node = node.parentElement;\n      }\n      return null;\n    };\n  }\n})();\n","/*! @source https://developer.mozilla.org/en/docs/Web/API/Element/matches */\n(function() {\n  // A polyfill for Element.matches property\n  \n  if (!Element.prototype.matches) {\n    Element.prototype.matches =\n      Element.prototype.matchesSelector ||\n      Element.prototype.mozMatchesSelector ||\n      Element.prototype.msMatchesSelector ||\n      Element.prototype.oMatchesSelector ||\n      Element.prototype.webkitMatchesSelector ||\n      function(s) {\n        var matches = (this.document || this.ownerDocument).querySelectorAll(s),\n          i = matches.length;\n        while (--i >= 0 && matches.item(i) !== this) {}\n        return i > -1;\n      };\n  }\n})();\n","/*! @source https://github.com/valor-software/ng2-charts/issues/88 */\n(function() {\n  if (!('remove' in Element.prototype)) {\n    Element.prototype.remove = function() {\n      if (this.parentNode) {\n        this.parentNode.removeChild(this);\n      }\n    };\n  }\n})();\n","/*\n * classList.js: Cross-browser full element.classList implementation.\n * 1.1.20150312\n *\n * By Eli Grey, http://eligrey.com\n * License: Dedicated to the public domain.\n *   See https://github.com/eligrey/classList.js/blob/master/LICENSE.md\n */\n\n/*global self, document, DOMException */\n\n/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */\n\n(function () {\n  \"use strict\";\n  \n  var testElement = document.createElement(\"_\");\n  \n  testElement.classList.add(\"c1\", \"c2\");\n  \n  // Polyfill for IE 10/11 and Firefox <26, where classList.add and\n  // classList.remove exist but support only one argument at a time.\n  if (!testElement.classList.contains(\"c2\")) {\n    var createMethod = function(method) {\n      var original = DOMTokenList.prototype[method];\n      \n      DOMTokenList.prototype[method] = function(token) {\n        var i, len = arguments.length;\n        \n        for (i = 0; i < len; i++) {\n          token = arguments[i];\n          original.call(this, token);\n        }\n      };\n    };\n    createMethod('add');\n    createMethod('remove');\n  }\n  \n  testElement.classList.toggle(\"c3\", false);\n  \n  // Polyfill for IE 10 and Firefox <24, where classList.toggle does not\n  // support the second argument.\n  if (testElement.classList.contains(\"c3\")) {\n    var _toggle = DOMTokenList.prototype.toggle;\n    \n    DOMTokenList.prototype.toggle = function(token, force) {\n      if (1 in arguments && !this.contains(token) === !force) {\n        return force;\n      } else {\n        return _toggle.call(this, token);\n      }\n    };\n    \n  }\n  \n  // Polyfill for IE11 SVG classList support\n  if (!(\"classList\" in document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\"))) {\n    var descr = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'classList');\n    Object.defineProperty(SVGElement.prototype, 'classList', descr);\n  }\n  \n  testElement = null;\n}());\n","//source: https://www.paulirish.com/2011/requestanimationframe-for-smart-animating/\n(function() {\n  var lastTime = 0;\n  var vendors = ['webkit', 'moz'];\n  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];\n    window.cancelAnimationFrame =\n      window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];\n  }\n  \n  if (!window.requestAnimationFrame)\n    window.requestAnimationFrame = function(callback, element) {\n      var currTime = new Date().getTime();\n      var timeToCall = Math.max(0, 16 - (currTime - lastTime));\n      var id = window.setTimeout(function() {\n          callback(currTime + timeToCall);\n        },\n        timeToCall);\n      lastTime = currTime + timeToCall;\n      return id;\n    };\n  \n  if (!window.cancelAnimationFrame)\n    window.cancelAnimationFrame = function(id) {\n      clearTimeout(id);\n    };\n}());\n","// Source https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill\n(function() {\n  \n  if (typeof window.CustomEvent === \"function\") return false;\n  \n  function CustomEvent(event, params) {\n    params = params || {bubbles: false, cancelable: false, detail: undefined};\n    var evt = document.createEvent('CustomEvent');\n    evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n    return evt;\n  }\n  \n  CustomEvent.prototype = window.Event.prototype;\n  \n  window.CustomEvent = CustomEvent;\n})();\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2018 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/** Source: https://git.corp.adobe.com/Spectrum/focus-ring-polyfill/ */\n\n// Provides explicit indication of elements receiving focus through keyboard interaction rather than mouse or touch.\n(function(document) {\n  var NAVIGATION_KEYS = [\n    'Tab',\n    'ArrowUp',\n    'ArrowRight',\n    'ArrowDown',\n    'ArrowLeft',\n    'Home',\n    'End',\n    'PageUp',\n    'PageDown',\n    'Enter',\n    ' ',\n    'Escape',\n    \n    /* IE9 and Firefox < 37 */\n    'Up',\n    'Right',\n    'Down',\n    'Left',\n    'Esc'\n  ];\n  var TEXT_INPUT_TYPES = [\n    'text',\n    'date',\n    'datetime-local',\n    'email',\n    'month',\n    'number',\n    'password',\n    'search',\n    'tel',\n    'time',\n    'url',\n    'week'\n  ];\n  var keyboardFocus = false;\n  var elements = document.getElementsByClassName('focus-ring');\n  \n  function onKeydownHandler(event) {\n    if (event.ctrlKey || event.altKey || event.metaKey || NAVIGATION_KEYS.indexOf(event.key) === -1) {\n      return;\n    }\n    keyboardFocus = true;\n  \n    if (document.activeElement &&\n      document.activeElement !== document.body &&\n      document.activeElement.tagName !== 'TEXTAREA' &&\n      !(document.activeElement.tagName === 'INPUT' &&\n      TEXT_INPUT_TYPES.indexOf(document.activeElement.type) !== -1)) {\n      document.activeElement.classList.add('focus-ring');\n    }\n  }\n  \n  function onMousedownHandler() {\n    keyboardFocus = false;\n    \n    for (var i = 0; i < elements.length; i++) {\n      elements[i].classList.remove('focus-ring');\n    }\n    \n  }\n  \n  function onFocusHandler(event) {\n    if (event.target === document) {\n      return;\n    }\n    \n    if (keyboardFocus) {\n      event.target.classList.add('focus-ring');\n    }\n  }\n  \n  function onBlurHandler(event) {\n    if (event.target === document) {\n      return;\n    }\n    \n    event.target.classList.remove('focus-ring');\n  }\n  \n  document.addEventListener('keydown', onKeydownHandler, true);\n  document.addEventListener('mousedown', onMousedownHandler, true);\n  document.addEventListener('focus', onFocusHandler, true);\n  document.addEventListener('blur', onBlurHandler, true);\n}(document));\n","(function (root) {\n\n  // Store setTimeout reference so promise-polyfill will be unaffected by\n  // other code modifying setTimeout (like sinon.useFakeTimers())\n  var setTimeoutFunc = setTimeout;\n\n  function noop() {}\n  \n  // Polyfill for Function.prototype.bind\n  function bind(fn, thisArg) {\n    return function () {\n      fn.apply(thisArg, arguments);\n    };\n  }\n\n  function Promise(fn) {\n    if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new');\n    if (typeof fn !== 'function') throw new TypeError('not a function');\n    this._state = 0;\n    this._handled = false;\n    this._value = undefined;\n    this._deferreds = [];\n\n    doResolve(fn, this);\n  }\n\n  function handle(self, deferred) {\n    while (self._state === 3) {\n      self = self._value;\n    }\n    if (self._state === 0) {\n      self._deferreds.push(deferred);\n      return;\n    }\n    self._handled = true;\n    Promise._immediateFn(function () {\n      var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n      if (cb === null) {\n        (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n        return;\n      }\n      var ret;\n      try {\n        ret = cb(self._value);\n      } catch (e) {\n        reject(deferred.promise, e);\n        return;\n      }\n      resolve(deferred.promise, ret);\n    });\n  }\n\n  function resolve(self, newValue) {\n    try {\n      // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n      if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');\n      if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n        var then = newValue.then;\n        if (newValue instanceof Promise) {\n          self._state = 3;\n          self._value = newValue;\n          finale(self);\n          return;\n        } else if (typeof then === 'function') {\n          doResolve(bind(then, newValue), self);\n          return;\n        }\n      }\n      self._state = 1;\n      self._value = newValue;\n      finale(self);\n    } catch (e) {\n      reject(self, e);\n    }\n  }\n\n  function reject(self, newValue) {\n    self._state = 2;\n    self._value = newValue;\n    finale(self);\n  }\n\n  function finale(self) {\n    if (self._state === 2 && self._deferreds.length === 0) {\n      Promise._immediateFn(function() {\n        if (!self._handled) {\n          Promise._unhandledRejectionFn(self._value);\n        }\n      });\n    }\n\n    for (var i = 0, len = self._deferreds.length; i < len; i++) {\n      handle(self, self._deferreds[i]);\n    }\n    self._deferreds = null;\n  }\n\n  function Handler(onFulfilled, onRejected, promise) {\n    this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n    this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n    this.promise = promise;\n  }\n\n  /**\n   * Take a potentially misbehaving resolver function and make sure\n   * onFulfilled and onRejected are only called once.\n   *\n   * Makes no guarantees about asynchrony.\n   */\n  function doResolve(fn, self) {\n    var done = false;\n    try {\n      fn(function (value) {\n        if (done) return;\n        done = true;\n        resolve(self, value);\n      }, function (reason) {\n        if (done) return;\n        done = true;\n        reject(self, reason);\n      });\n    } catch (ex) {\n      if (done) return;\n      done = true;\n      reject(self, ex);\n    }\n  }\n\n  Promise.prototype['catch'] = function (onRejected) {\n    return this.then(null, onRejected);\n  };\n\n  Promise.prototype.then = function (onFulfilled, onRejected) {\n    var prom = new (this.constructor)(noop);\n\n    handle(this, new Handler(onFulfilled, onRejected, prom));\n    return prom;\n  };\n\n  Promise.all = function (arr) {\n    return new Promise(function (resolve, reject) {\n      if (!arr || typeof arr.length === 'undefined') throw new TypeError('Promise.all accepts an array');\n      var args = Array.prototype.slice.call(arr);\n      if (args.length === 0) return resolve([]);\n      var remaining = args.length;\n\n      function res(i, val) {\n        try {\n          if (val && (typeof val === 'object' || typeof val === 'function')) {\n            var then = val.then;\n            if (typeof then === 'function') {\n              then.call(val, function (val) {\n                res(i, val);\n              }, reject);\n              return;\n            }\n          }\n          args[i] = val;\n          if (--remaining === 0) {\n            resolve(args);\n          }\n        } catch (ex) {\n          reject(ex);\n        }\n      }\n\n      for (var i = 0; i < args.length; i++) {\n        res(i, args[i]);\n      }\n    });\n  };\n\n  Promise.resolve = function (value) {\n    if (value && typeof value === 'object' && value.constructor === Promise) {\n      return value;\n    }\n\n    return new Promise(function (resolve) {\n      resolve(value);\n    });\n  };\n\n  Promise.reject = function (value) {\n    return new Promise(function (resolve, reject) {\n      reject(value);\n    });\n  };\n\n  Promise.race = function (values) {\n    return new Promise(function (resolve, reject) {\n      for (var i = 0, len = values.length; i < len; i++) {\n        values[i].then(resolve, reject);\n      }\n    });\n  };\n\n  // Use polyfill for setImmediate for performance gains\n  Promise._immediateFn = (typeof setImmediate === 'function' && function (fn) { setImmediate(fn); }) ||\n    function (fn) {\n      setTimeoutFunc(fn, 0);\n    };\n\n  Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n    if (typeof console !== 'undefined' && console) {\n      console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n    }\n  };\n\n  /**\n   * Set the immediate function to execute callbacks\n   * @param fn {function} Function to execute\n   * @deprecated\n   */\n  Promise._setImmediateFn = function _setImmediateFn(fn) {\n    Promise._immediateFn = fn;\n  };\n\n  /**\n   * Change the function to execute on unhandled rejection\n   * @param {function} fn Function to execute on unhandled rejection\n   * @deprecated\n   */\n  Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {\n    Promise._unhandledRejectionFn = fn;\n  };\n  \n  if (typeof module !== 'undefined' && module.exports) {\n    module.exports = Promise;\n  } else if (!root.Promise) {\n    root.Promise = Promise;\n  }\n\n})(this);\n","/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.12.9\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\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 isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\nvar longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\nvar timeoutDuration = 0;\nfor (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n  if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n    timeoutDuration = 1;\n    break;\n  }\n}\n\nfunction microtaskDebounce(fn) {\n  var called = false;\n  return function () {\n    if (called) {\n      return;\n    }\n    called = true;\n    window.Promise.resolve().then(function () {\n      called = false;\n      fn();\n    });\n  };\n}\n\nfunction taskDebounce(fn) {\n  var scheduled = false;\n  return function () {\n    if (!scheduled) {\n      scheduled = true;\n      setTimeout(function () {\n        scheduled = false;\n        fn();\n      }, timeoutDuration);\n    }\n  };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction(functionToCheck) {\n  var getType = {};\n  return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n  if (element.nodeType !== 1) {\n    return [];\n  }\n  // NOTE: 1 DOM access here\n  var css = getComputedStyle(element, null);\n  return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n  if (element.nodeName === 'HTML') {\n    return element;\n  }\n  return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n  // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n  if (!element) {\n    return document.body;\n  }\n\n  switch (element.nodeName) {\n    case 'HTML':\n    case 'BODY':\n      return element.ownerDocument.body;\n    case '#document':\n      return element.body;\n  }\n\n  // Firefox want us to check `-x` and `-y` variations as well\n\n  var _getStyleComputedProp = getStyleComputedProperty(element),\n      overflow = _getStyleComputedProp.overflow,\n      overflowX = _getStyleComputedProp.overflowX,\n      overflowY = _getStyleComputedProp.overflowY;\n\n  if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) {\n    return element;\n  }\n\n  return getScrollParent(getParentNode(element));\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n  // NOTE: 1 DOM access here\n  var offsetParent = element && element.offsetParent;\n  var nodeName = offsetParent && offsetParent.nodeName;\n\n  if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n    if (element) {\n      return element.ownerDocument.documentElement;\n    }\n\n    return document.documentElement;\n  }\n\n  // .offsetParent will return the closest TD or TABLE in case\n  // no offsetParent is present, I hate this job...\n  if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n    return getOffsetParent(offsetParent);\n  }\n\n  return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n  var nodeName = element.nodeName;\n\n  if (nodeName === 'BODY') {\n    return false;\n  }\n  return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n  if (node.parentNode !== null) {\n    return getRoot(node.parentNode);\n  }\n\n  return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n  // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n  if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n    return document.documentElement;\n  }\n\n  // Here we make sure to give as \"start\" the element that comes first in the DOM\n  var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n  var start = order ? element1 : element2;\n  var end = order ? element2 : element1;\n\n  // Get common ancestor container\n  var range = document.createRange();\n  range.setStart(start, 0);\n  range.setEnd(end, 0);\n  var commonAncestorContainer = range.commonAncestorContainer;\n\n  // Both nodes are inside #document\n\n  if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n    if (isOffsetContainer(commonAncestorContainer)) {\n      return commonAncestorContainer;\n    }\n\n    return getOffsetParent(commonAncestorContainer);\n  }\n\n  // one of the nodes is inside shadowDOM, find which one\n  var element1root = getRoot(element1);\n  if (element1root.host) {\n    return findCommonOffsetParent(element1root.host, element2);\n  } else {\n    return findCommonOffsetParent(element1, getRoot(element2).host);\n  }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n  var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n\n  var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n  var nodeName = element.nodeName;\n\n  if (nodeName === 'BODY' || nodeName === 'HTML') {\n    var html = element.ownerDocument.documentElement;\n    var scrollingElement = element.ownerDocument.scrollingElement || html;\n    return scrollingElement[upperSide];\n  }\n\n  return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n  var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n  var scrollTop = getScroll(element, 'top');\n  var scrollLeft = getScroll(element, 'left');\n  var modifier = subtract ? -1 : 1;\n  rect.top += scrollTop * modifier;\n  rect.bottom += scrollTop * modifier;\n  rect.left += scrollLeft * modifier;\n  rect.right += scrollLeft * modifier;\n  return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n  var sideA = axis === 'x' ? 'Left' : 'Top';\n  var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n  return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);\n}\n\n/**\n * Tells if you are running Internet Explorer 10\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean} isIE10\n */\nvar isIE10 = undefined;\n\nvar isIE10$1 = function () {\n  if (isIE10 === undefined) {\n    isIE10 = navigator.appVersion.indexOf('MSIE 10') !== -1;\n  }\n  return isIE10;\n};\n\nfunction getSize(axis, body, html, computedStyle) {\n  return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);\n}\n\nfunction getWindowSizes() {\n  var body = document.body;\n  var html = document.documentElement;\n  var computedStyle = isIE10$1() && getComputedStyle(html);\n\n  return {\n    height: getSize('Height', body, html, computedStyle),\n    width: getSize('Width', body, html, computedStyle)\n  };\n}\n\nvar classCallCheck = function (instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n};\n\nvar createClass = function () {\n  function defineProperties(target, props) {\n    for (var i = 0; i < props.length; i++) {\n      var descriptor = props[i];\n      descriptor.enumerable = descriptor.enumerable || false;\n      descriptor.configurable = true;\n      if (\"value\" in descriptor) descriptor.writable = true;\n      Object.defineProperty(target, descriptor.key, descriptor);\n    }\n  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n  return _extends({}, offsets, {\n    right: offsets.left + offsets.width,\n    bottom: offsets.top + offsets.height\n  });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n  var rect = {};\n\n  // IE10 10 FIX: Please, don't ask, the element isn't\n  // considered in DOM in some circumstances...\n  // This isn't reproducible in IE10 compatibility mode of IE11\n  if (isIE10$1()) {\n    try {\n      rect = element.getBoundingClientRect();\n      var scrollTop = getScroll(element, 'top');\n      var scrollLeft = getScroll(element, 'left');\n      rect.top += scrollTop;\n      rect.left += scrollLeft;\n      rect.bottom += scrollTop;\n      rect.right += scrollLeft;\n    } catch (err) {}\n  } else {\n    rect = element.getBoundingClientRect();\n  }\n\n  var result = {\n    left: rect.left,\n    top: rect.top,\n    width: rect.right - rect.left,\n    height: rect.bottom - rect.top\n  };\n\n  // subtract scrollbar size from sizes\n  var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {};\n  var width = sizes.width || element.clientWidth || result.right - result.left;\n  var height = sizes.height || element.clientHeight || result.bottom - result.top;\n\n  var horizScrollbar = element.offsetWidth - width;\n  var vertScrollbar = element.offsetHeight - height;\n\n  // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n  // we make this check conditional for performance reasons\n  if (horizScrollbar || vertScrollbar) {\n    var styles = getStyleComputedProperty(element);\n    horizScrollbar -= getBordersSize(styles, 'x');\n    vertScrollbar -= getBordersSize(styles, 'y');\n\n    result.width -= horizScrollbar;\n    result.height -= vertScrollbar;\n  }\n\n  return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n  var isIE10 = isIE10$1();\n  var isHTML = parent.nodeName === 'HTML';\n  var childrenRect = getBoundingClientRect(children);\n  var parentRect = getBoundingClientRect(parent);\n  var scrollParent = getScrollParent(children);\n\n  var styles = getStyleComputedProperty(parent);\n  var borderTopWidth = parseFloat(styles.borderTopWidth, 10);\n  var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);\n\n  var offsets = getClientRect({\n    top: childrenRect.top - parentRect.top - borderTopWidth,\n    left: childrenRect.left - parentRect.left - borderLeftWidth,\n    width: childrenRect.width,\n    height: childrenRect.height\n  });\n  offsets.marginTop = 0;\n  offsets.marginLeft = 0;\n\n  // Subtract margins of documentElement in case it's being used as parent\n  // we do this only on HTML because it's the only element that behaves\n  // differently when margins are applied to it. The margins are included in\n  // the box of the documentElement, in the other cases not.\n  if (!isIE10 && isHTML) {\n    var marginTop = parseFloat(styles.marginTop, 10);\n    var marginLeft = parseFloat(styles.marginLeft, 10);\n\n    offsets.top -= borderTopWidth - marginTop;\n    offsets.bottom -= borderTopWidth - marginTop;\n    offsets.left -= borderLeftWidth - marginLeft;\n    offsets.right -= borderLeftWidth - marginLeft;\n\n    // Attach marginTop and marginLeft because in some circumstances we may need them\n    offsets.marginTop = marginTop;\n    offsets.marginLeft = marginLeft;\n  }\n\n  if (isIE10 ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n    offsets = includeScroll(offsets, parent);\n  }\n\n  return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n  var html = element.ownerDocument.documentElement;\n  var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n  var width = Math.max(html.clientWidth, window.innerWidth || 0);\n  var height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n  var scrollTop = getScroll(html);\n  var scrollLeft = getScroll(html, 'left');\n\n  var offset = {\n    top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n    left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n    width: width,\n    height: height\n  };\n\n  return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n  var nodeName = element.nodeName;\n  if (nodeName === 'BODY' || nodeName === 'HTML') {\n    return false;\n  }\n  if (getStyleComputedProperty(element, 'position') === 'fixed') {\n    return true;\n  }\n  return isFixed(getParentNode(element));\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n  // NOTE: 1 DOM access here\n  var boundaries = { top: 0, left: 0 };\n  var offsetParent = findCommonOffsetParent(popper, reference);\n\n  // Handle viewport case\n  if (boundariesElement === 'viewport') {\n    boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent);\n  } else {\n    // Handle other cases based on DOM element used as boundaries\n    var boundariesNode = void 0;\n    if (boundariesElement === 'scrollParent') {\n      boundariesNode = getScrollParent(getParentNode(reference));\n      if (boundariesNode.nodeName === 'BODY') {\n        boundariesNode = popper.ownerDocument.documentElement;\n      }\n    } else if (boundariesElement === 'window') {\n      boundariesNode = popper.ownerDocument.documentElement;\n    } else {\n      boundariesNode = boundariesElement;\n    }\n\n    var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent);\n\n    // In case of HTML, we need a different computation\n    if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n      var _getWindowSizes = getWindowSizes(),\n          height = _getWindowSizes.height,\n          width = _getWindowSizes.width;\n\n      boundaries.top += offsets.top - offsets.marginTop;\n      boundaries.bottom = height + offsets.top;\n      boundaries.left += offsets.left - offsets.marginLeft;\n      boundaries.right = width + offsets.left;\n    } else {\n      // for all the other DOM elements, this one is good\n      boundaries = offsets;\n    }\n  }\n\n  // Add paddings\n  boundaries.left += padding;\n  boundaries.top += padding;\n  boundaries.right -= padding;\n  boundaries.bottom -= padding;\n\n  return boundaries;\n}\n\nfunction getArea(_ref) {\n  var width = _ref.width,\n      height = _ref.height;\n\n  return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n  var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n  if (placement.indexOf('auto') === -1) {\n    return placement;\n  }\n\n  var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n\n  var rects = {\n    top: {\n      width: boundaries.width,\n      height: refRect.top - boundaries.top\n    },\n    right: {\n      width: boundaries.right - refRect.right,\n      height: boundaries.height\n    },\n    bottom: {\n      width: boundaries.width,\n      height: boundaries.bottom - refRect.bottom\n    },\n    left: {\n      width: refRect.left - boundaries.left,\n      height: boundaries.height\n    }\n  };\n\n  var sortedAreas = Object.keys(rects).map(function (key) {\n    return _extends({\n      key: key\n    }, rects[key], {\n      area: getArea(rects[key])\n    });\n  }).sort(function (a, b) {\n    return b.area - a.area;\n  });\n\n  var filteredAreas = sortedAreas.filter(function (_ref2) {\n    var width = _ref2.width,\n        height = _ref2.height;\n    return width >= popper.clientWidth && height >= popper.clientHeight;\n  });\n\n  var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n\n  var variation = placement.split('-')[1];\n\n  return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n  var commonOffsetParent = findCommonOffsetParent(popper, reference);\n  return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n  var styles = getComputedStyle(element);\n  var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);\n  var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);\n  var result = {\n    width: element.offsetWidth + y,\n    height: element.offsetHeight + x\n  };\n  return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n  var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n  return placement.replace(/left|right|bottom|top/g, function (matched) {\n    return hash[matched];\n  });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n  placement = placement.split('-')[0];\n\n  // Get popper node sizes\n  var popperRect = getOuterSizes(popper);\n\n  // Add position, width and height to our offsets object\n  var popperOffsets = {\n    width: popperRect.width,\n    height: popperRect.height\n  };\n\n  // depending by the popper placement we have to compute its offsets slightly differently\n  var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n  var mainSide = isHoriz ? 'top' : 'left';\n  var secondarySide = isHoriz ? 'left' : 'top';\n  var measurement = isHoriz ? 'height' : 'width';\n  var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n  popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n  if (placement === secondarySide) {\n    popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n  } else {\n    popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n  }\n\n  return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n  // use native find if supported\n  if (Array.prototype.find) {\n    return arr.find(check);\n  }\n\n  // use `filter` to obtain the same behavior of `find`\n  return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n  // use native findIndex if supported\n  if (Array.prototype.findIndex) {\n    return arr.findIndex(function (cur) {\n      return cur[prop] === value;\n    });\n  }\n\n  // use `find` + `indexOf` if `findIndex` isn't supported\n  var match = find(arr, function (obj) {\n    return obj[prop] === value;\n  });\n  return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n  var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n  modifiersToRun.forEach(function (modifier) {\n    if (modifier['function']) {\n      // eslint-disable-line dot-notation\n      console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n    }\n    var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n    if (modifier.enabled && isFunction(fn)) {\n      // Add properties to offsets to make them a complete clientRect object\n      // we do this before each modifier to make sure the previous one doesn't\n      // mess with these values\n      data.offsets.popper = getClientRect(data.offsets.popper);\n      data.offsets.reference = getClientRect(data.offsets.reference);\n\n      data = fn(data, modifier);\n    }\n  });\n\n  return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.<br />\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n  // if popper is destroyed, don't perform any further update\n  if (this.state.isDestroyed) {\n    return;\n  }\n\n  var data = {\n    instance: this,\n    styles: {},\n    arrowStyles: {},\n    attributes: {},\n    flipped: false,\n    offsets: {}\n  };\n\n  // compute reference element offsets\n  data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n  // compute auto placement, store placement inside the data object,\n  // modifiers will be able to edit `placement` if needed\n  // and refer to originalPlacement to know the original value\n  data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n  // store the computed placement inside `originalPlacement`\n  data.originalPlacement = data.placement;\n\n  // compute the popper offsets\n  data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n  data.offsets.popper.position = 'absolute';\n\n  // run the modifiers\n  data = runModifiers(this.modifiers, data);\n\n  // the first `update` will call `onCreate` callback\n  // the other ones will call `onUpdate` callback\n  if (!this.state.isCreated) {\n    this.state.isCreated = true;\n    this.options.onCreate(data);\n  } else {\n    this.options.onUpdate(data);\n  }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n  return modifiers.some(function (_ref) {\n    var name = _ref.name,\n        enabled = _ref.enabled;\n    return enabled && name === modifierName;\n  });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n  var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n  var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n  for (var i = 0; i < prefixes.length - 1; i++) {\n    var prefix = prefixes[i];\n    var toCheck = prefix ? '' + prefix + upperProp : property;\n    if (typeof document.body.style[toCheck] !== 'undefined') {\n      return toCheck;\n    }\n  }\n  return null;\n}\n\n/**\n * Destroy the popper\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n  this.state.isDestroyed = true;\n\n  // touch DOM only if `applyStyle` modifier is enabled\n  if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n    this.popper.removeAttribute('x-placement');\n    this.popper.style.left = '';\n    this.popper.style.position = '';\n    this.popper.style.top = '';\n    this.popper.style[getSupportedPropertyName('transform')] = '';\n  }\n\n  this.disableEventListeners();\n\n  // remove the popper if user explicity asked for the deletion on destroy\n  // do not use `remove` because IE11 doesn't support it\n  if (this.options.removeOnDestroy) {\n    this.popper.parentNode.removeChild(this.popper);\n  }\n  return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n  var ownerDocument = element.ownerDocument;\n  return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n  var isBody = scrollParent.nodeName === 'BODY';\n  var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n  target.addEventListener(event, callback, { passive: true });\n\n  if (!isBody) {\n    attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n  }\n  scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n  // Resize event listener on window\n  state.updateBound = updateBound;\n  getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n  // Scroll event listener on scroll parents\n  var scrollElement = getScrollParent(reference);\n  attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n  state.scrollElement = scrollElement;\n  state.eventsEnabled = true;\n\n  return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n  if (!this.state.eventsEnabled) {\n    this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n  }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n  // Remove resize event listener on window\n  getWindow(reference).removeEventListener('resize', state.updateBound);\n\n  // Remove scroll event listener on scroll parents\n  state.scrollParents.forEach(function (target) {\n    target.removeEventListener('scroll', state.updateBound);\n  });\n\n  // Reset state\n  state.updateBound = null;\n  state.scrollParents = [];\n  state.scrollElement = null;\n  state.eventsEnabled = false;\n  return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger onUpdate callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n  if (this.state.eventsEnabled) {\n    cancelAnimationFrame(this.scheduleUpdate);\n    this.state = removeEventListeners(this.reference, this.state);\n  }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n  return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n  Object.keys(styles).forEach(function (prop) {\n    var unit = '';\n    // add unit if the value is numeric and is one of the following\n    if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n      unit = 'px';\n    }\n    element.style[prop] = styles[prop] + unit;\n  });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n  Object.keys(attributes).forEach(function (prop) {\n    var value = attributes[prop];\n    if (value !== false) {\n      element.setAttribute(prop, attributes[prop]);\n    } else {\n      element.removeAttribute(prop);\n    }\n  });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n  // any property present in `data.styles` will be applied to the popper,\n  // in this way we can make the 3rd party modifiers add custom styles to it\n  // Be aware, modifiers could override the properties defined in the previous\n  // lines of this modifier!\n  setStyles(data.instance.popper, data.styles);\n\n  // any property present in `data.attributes` will be applied to the popper,\n  // they will be set as HTML attributes of the element\n  setAttributes(data.instance.popper, data.attributes);\n\n  // if arrowElement is defined and arrowStyles has some properties\n  if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n    setStyles(data.arrowElement, data.arrowStyles);\n  }\n\n  return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper.\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n  // compute reference element offsets\n  var referenceOffsets = getReferenceOffsets(state, popper, reference);\n\n  // compute auto placement, store placement inside the data object,\n  // modifiers will be able to edit `placement` if needed\n  // and refer to originalPlacement to know the original value\n  var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n\n  popper.setAttribute('x-placement', placement);\n\n  // Apply `position` to popper before anything else because\n  // without the position applied we can't guarantee correct computations\n  setStyles(popper, { position: 'absolute' });\n\n  return options;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n  var x = options.x,\n      y = options.y;\n  var popper = data.offsets.popper;\n\n  // Remove this legacy support in Popper.js v2\n\n  var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n    return modifier.name === 'applyStyle';\n  }).gpuAcceleration;\n  if (legacyGpuAccelerationOption !== undefined) {\n    console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n  }\n  var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n\n  var offsetParent = getOffsetParent(data.instance.popper);\n  var offsetParentRect = getBoundingClientRect(offsetParent);\n\n  // Styles\n  var styles = {\n    position: popper.position\n  };\n\n  // floor sides to avoid blurry text\n  var offsets = {\n    left: Math.floor(popper.left),\n    top: Math.floor(popper.top),\n    bottom: Math.floor(popper.bottom),\n    right: Math.floor(popper.right)\n  };\n\n  var sideA = x === 'bottom' ? 'top' : 'bottom';\n  var sideB = y === 'right' ? 'left' : 'right';\n\n  // if gpuAcceleration is set to `true` and transform is supported,\n  //  we use `translate3d` to apply the position to the popper we\n  // automatically use the supported prefixed version if needed\n  var prefixedProperty = getSupportedPropertyName('transform');\n\n  // now, let's make a step back and look at this code closely (wtf?)\n  // If the content of the popper grows once it's been positioned, it\n  // may happen that the popper gets misplaced because of the new content\n  // overflowing its reference element\n  // To avoid this problem, we provide two options (x and y), which allow\n  // the consumer to define the offset origin.\n  // If we position a popper on top of a reference element, we can set\n  // `x` to `top` to make the popper grow towards its top instead of\n  // its bottom.\n  var left = void 0,\n      top = void 0;\n  if (sideA === 'bottom') {\n    top = -offsetParentRect.height + offsets.bottom;\n  } else {\n    top = offsets.top;\n  }\n  if (sideB === 'right') {\n    left = -offsetParentRect.width + offsets.right;\n  } else {\n    left = offsets.left;\n  }\n  if (gpuAcceleration && prefixedProperty) {\n    styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n    styles[sideA] = 0;\n    styles[sideB] = 0;\n    styles.willChange = 'transform';\n  } else {\n    // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n    var invertTop = sideA === 'bottom' ? -1 : 1;\n    var invertLeft = sideB === 'right' ? -1 : 1;\n    styles[sideA] = top * invertTop;\n    styles[sideB] = left * invertLeft;\n    styles.willChange = sideA + ', ' + sideB;\n  }\n\n  // Attributes\n  var attributes = {\n    'x-placement': data.placement\n  };\n\n  // Update `data` attributes, styles and arrowStyles\n  data.attributes = _extends({}, attributes, data.attributes);\n  data.styles = _extends({}, styles, data.styles);\n  data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n\n  return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one.<br />\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n  var requesting = find(modifiers, function (_ref) {\n    var name = _ref.name;\n    return name === requestingName;\n  });\n\n  var isRequired = !!requesting && modifiers.some(function (modifier) {\n    return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n  });\n\n  if (!isRequired) {\n    var _requesting = '`' + requestingName + '`';\n    var requested = '`' + requestedName + '`';\n    console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n  }\n  return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n  var _data$offsets$arrow;\n\n  // arrow depends on keepTogether in order to work\n  if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n    return data;\n  }\n\n  var arrowElement = options.element;\n\n  // if arrowElement is a string, suppose it's a CSS selector\n  if (typeof arrowElement === 'string') {\n    arrowElement = data.instance.popper.querySelector(arrowElement);\n\n    // if arrowElement is not found, don't run the modifier\n    if (!arrowElement) {\n      return data;\n    }\n  } else {\n    // if the arrowElement isn't a query selector we must check that the\n    // provided DOM node is child of its popper node\n    if (!data.instance.popper.contains(arrowElement)) {\n      console.warn('WARNING: `arrow.element` must be child of its popper element!');\n      return data;\n    }\n  }\n\n  var placement = data.placement.split('-')[0];\n  var _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n\n  var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n  var len = isVertical ? 'height' : 'width';\n  var sideCapitalized = isVertical ? 'Top' : 'Left';\n  var side = sideCapitalized.toLowerCase();\n  var altSide = isVertical ? 'left' : 'top';\n  var opSide = isVertical ? 'bottom' : 'right';\n  var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n  //\n  // extends keepTogether behavior making sure the popper and its\n  // reference have enough pixels in conjuction\n  //\n\n  // top/left side\n  if (reference[opSide] - arrowElementSize < popper[side]) {\n    data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n  }\n  // bottom/right side\n  if (reference[side] + arrowElementSize > popper[opSide]) {\n    data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n  }\n  data.offsets.popper = getClientRect(data.offsets.popper);\n\n  // compute center of the popper\n  var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n  // Compute the sideValue using the updated popper offsets\n  // take popper margin in account because we don't have this info available\n  var css = getStyleComputedProperty(data.instance.popper);\n  var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);\n  var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);\n  var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n  // prevent arrowElement from being placed not contiguously to its popper\n  sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n  data.arrowElement = arrowElement;\n  data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n\n  return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n  if (variation === 'end') {\n    return 'start';\n  } else if (variation === 'start') {\n    return 'end';\n  }\n  return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option.<br />\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.<br />\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-right` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n  var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n  var index = validPlacements.indexOf(placement);\n  var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n  return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n  FLIP: 'flip',\n  CLOCKWISE: 'clockwise',\n  COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n  // if `inner` modifier is enabled, we can't use the `flip` modifier\n  if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n    return data;\n  }\n\n  if (data.flipped && data.placement === data.originalPlacement) {\n    // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n    return data;\n  }\n\n  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement);\n\n  var placement = data.placement.split('-')[0];\n  var placementOpposite = getOppositePlacement(placement);\n  var variation = data.placement.split('-')[1] || '';\n\n  var flipOrder = [];\n\n  switch (options.behavior) {\n    case BEHAVIORS.FLIP:\n      flipOrder = [placement, placementOpposite];\n      break;\n    case BEHAVIORS.CLOCKWISE:\n      flipOrder = clockwise(placement);\n      break;\n    case BEHAVIORS.COUNTERCLOCKWISE:\n      flipOrder = clockwise(placement, true);\n      break;\n    default:\n      flipOrder = options.behavior;\n  }\n\n  flipOrder.forEach(function (step, index) {\n    if (placement !== step || flipOrder.length === index + 1) {\n      return data;\n    }\n\n    placement = data.placement.split('-')[0];\n    placementOpposite = getOppositePlacement(placement);\n\n    var popperOffsets = data.offsets.popper;\n    var refOffsets = data.offsets.reference;\n\n    // using floor because the reference offsets may contain decimals we are not going to consider here\n    var floor = Math.floor;\n    var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n\n    var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n    var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n    var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n    var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n    var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n    // flip the variation if required\n    var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n    var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n\n    if (overlapsRef || overflowsBoundaries || flippedVariation) {\n      // this boolean to detect any flip loop\n      data.flipped = true;\n\n      if (overlapsRef || overflowsBoundaries) {\n        placement = flipOrder[index + 1];\n      }\n\n      if (flippedVariation) {\n        variation = getOppositeVariation(variation);\n      }\n\n      data.placement = placement + (variation ? '-' + variation : '');\n\n      // this object contains `position`, we want to preserve it along with\n      // any additional property we may add in the future\n      data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n\n      data = runModifiers(data.instance.modifiers, data, 'flip');\n    }\n  });\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n  var _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n\n  var placement = data.placement.split('-')[0];\n  var floor = Math.floor;\n  var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n  var side = isVertical ? 'right' : 'bottom';\n  var opSide = isVertical ? 'left' : 'top';\n  var measurement = isVertical ? 'width' : 'height';\n\n  if (popper[side] < floor(reference[opSide])) {\n    data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n  }\n  if (popper[opSide] > floor(reference[side])) {\n    data.offsets.popper[opSide] = floor(reference[side]);\n  }\n\n  return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n  // separate value from unit\n  var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n  var value = +split[1];\n  var unit = split[2];\n\n  // If it's not a number it's an operator, I guess\n  if (!value) {\n    return str;\n  }\n\n  if (unit.indexOf('%') === 0) {\n    var element = void 0;\n    switch (unit) {\n      case '%p':\n        element = popperOffsets;\n        break;\n      case '%':\n      case '%r':\n      default:\n        element = referenceOffsets;\n    }\n\n    var rect = getClientRect(element);\n    return rect[measurement] / 100 * value;\n  } else if (unit === 'vh' || unit === 'vw') {\n    // if is a vh or vw, we calculate the size based on the viewport\n    var size = void 0;\n    if (unit === 'vh') {\n      size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n    } else {\n      size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n    }\n    return size / 100 * value;\n  } else {\n    // if is an explicit pixel unit, we get rid of the unit and keep the value\n    // if is an implicit unit, it's px, and we return just the value\n    return value;\n  }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n  var offsets = [0, 0];\n\n  // Use height if placement is left or right and index is 0 otherwise use width\n  // in this way the first offset will use an axis and the second one\n  // will use the other one\n  var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n  // Split the offset string to obtain a list of values and operands\n  // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n  var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n    return frag.trim();\n  });\n\n  // Detect if the offset string contains a pair of values or a single one\n  // they could be separated by comma or space\n  var divider = fragments.indexOf(find(fragments, function (frag) {\n    return frag.search(/,|\\s/) !== -1;\n  }));\n\n  if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n    console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n  }\n\n  // If divider is found, we divide the list of values and operands to divide\n  // them by ofset X and Y.\n  var splitRegex = /\\s*,\\s*|\\s+/;\n  var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n  // Convert the values with units to absolute pixels to allow our computations\n  ops = ops.map(function (op, index) {\n    // Most of the units rely on the orientation of the popper\n    var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n    var mergeWithPrevious = false;\n    return op\n    // This aggregates any `+` or `-` sign that aren't considered operators\n    // e.g.: 10 + +5 => [10, +, +5]\n    .reduce(function (a, b) {\n      if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n        a[a.length - 1] = b;\n        mergeWithPrevious = true;\n        return a;\n      } else if (mergeWithPrevious) {\n        a[a.length - 1] += b;\n        mergeWithPrevious = false;\n        return a;\n      } else {\n        return a.concat(b);\n      }\n    }, [])\n    // Here we convert the string values into number values (in px)\n    .map(function (str) {\n      return toValue(str, measurement, popperOffsets, referenceOffsets);\n    });\n  });\n\n  // Loop trough the offsets arrays and execute the operations\n  ops.forEach(function (op, index) {\n    op.forEach(function (frag, index2) {\n      if (isNumeric(frag)) {\n        offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n      }\n    });\n  });\n  return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n  var offset = _ref.offset;\n  var placement = data.placement,\n      _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n\n  var basePlacement = placement.split('-')[0];\n\n  var offsets = void 0;\n  if (isNumeric(+offset)) {\n    offsets = [+offset, 0];\n  } else {\n    offsets = parseOffset(offset, popper, reference, basePlacement);\n  }\n\n  if (basePlacement === 'left') {\n    popper.top += offsets[0];\n    popper.left -= offsets[1];\n  } else if (basePlacement === 'right') {\n    popper.top += offsets[0];\n    popper.left += offsets[1];\n  } else if (basePlacement === 'top') {\n    popper.left += offsets[0];\n    popper.top -= offsets[1];\n  } else if (basePlacement === 'bottom') {\n    popper.left += offsets[0];\n    popper.top += offsets[1];\n  }\n\n  data.popper = popper;\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n  var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n  // If offsetParent is the reference element, we really want to\n  // go one step up and use the next offsetParent as reference to\n  // avoid to make this modifier completely useless and look like broken\n  if (data.instance.reference === boundariesElement) {\n    boundariesElement = getOffsetParent(boundariesElement);\n  }\n\n  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement);\n  options.boundaries = boundaries;\n\n  var order = options.priority;\n  var popper = data.offsets.popper;\n\n  var check = {\n    primary: function primary(placement) {\n      var value = popper[placement];\n      if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n        value = Math.max(popper[placement], boundaries[placement]);\n      }\n      return defineProperty({}, placement, value);\n    },\n    secondary: function secondary(placement) {\n      var mainSide = placement === 'right' ? 'left' : 'top';\n      var value = popper[mainSide];\n      if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n        value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n      }\n      return defineProperty({}, mainSide, value);\n    }\n  };\n\n  order.forEach(function (placement) {\n    var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n    popper = _extends({}, popper, check[side](placement));\n  });\n\n  data.offsets.popper = popper;\n\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n  var placement = data.placement;\n  var basePlacement = placement.split('-')[0];\n  var shiftvariation = placement.split('-')[1];\n\n  // if shift shiftvariation is specified, run the modifier\n  if (shiftvariation) {\n    var _data$offsets = data.offsets,\n        reference = _data$offsets.reference,\n        popper = _data$offsets.popper;\n\n    var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n    var side = isVertical ? 'left' : 'top';\n    var measurement = isVertical ? 'width' : 'height';\n\n    var shiftOffsets = {\n      start: defineProperty({}, side, reference[side]),\n      end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n    };\n\n    data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n  }\n\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n  if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n    return data;\n  }\n\n  var refRect = data.offsets.reference;\n  var bound = find(data.instance.modifiers, function (modifier) {\n    return modifier.name === 'preventOverflow';\n  }).boundaries;\n\n  if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n    // Avoid unnecessary DOM access if visibility hasn't changed\n    if (data.hide === true) {\n      return data;\n    }\n\n    data.hide = true;\n    data.attributes['x-out-of-boundaries'] = '';\n  } else {\n    // Avoid unnecessary DOM access if visibility hasn't changed\n    if (data.hide === false) {\n      return data;\n    }\n\n    data.hide = false;\n    data.attributes['x-out-of-boundaries'] = false;\n  }\n\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n  var placement = data.placement;\n  var basePlacement = placement.split('-')[0];\n  var _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n\n  var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n  var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n  popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n  data.placement = getOppositePlacement(placement);\n  data.offsets.popper = getClientRect(popper);\n\n  return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.<br />\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.<br />\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n  /**\n   * Modifier used to shift the popper on the start or end of its reference\n   * element.<br />\n   * It will read the variation of the `placement` property.<br />\n   * It can be one either `-end` or `-start`.\n   * @memberof modifiers\n   * @inner\n   */\n  shift: {\n    /** @prop {number} order=100 - Index used to define the order of execution */\n    order: 100,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: shift\n  },\n\n  /**\n   * The `offset` modifier can shift your popper on both its axis.\n   *\n   * It accepts the following units:\n   * - `px` or unitless, interpreted as pixels\n   * - `%` or `%r`, percentage relative to the length of the reference element\n   * - `%p`, percentage relative to the length of the popper element\n   * - `vw`, CSS viewport width unit\n   * - `vh`, CSS viewport height unit\n   *\n   * For length is intended the main axis relative to the placement of the popper.<br />\n   * This means that if the placement is `top` or `bottom`, the length will be the\n   * `width`. In case of `left` or `right`, it will be the height.\n   *\n   * You can provide a single value (as `Number` or `String`), or a pair of values\n   * as `String` divided by a comma or one (or more) white spaces.<br />\n   * The latter is a deprecated method because it leads to confusion and will be\n   * removed in v2.<br />\n   * Additionally, it accepts additions and subtractions between different units.\n   * Note that multiplications and divisions aren't supported.\n   *\n   * Valid examples are:\n   * ```\n   * 10\n   * '10%'\n   * '10, 10'\n   * '10%, 10'\n   * '10 + 10%'\n   * '10 - 5vh + 3%'\n   * '-10px + 5vh, 5px - 6%'\n   * ```\n   * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n   * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n   * > More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373)\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  offset: {\n    /** @prop {number} order=200 - Index used to define the order of execution */\n    order: 200,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: offset,\n    /** @prop {Number|String} offset=0\n     * The offset value as described in the modifier description\n     */\n    offset: 0\n  },\n\n  /**\n   * Modifier used to prevent the popper from being positioned outside the boundary.\n   *\n   * An scenario exists where the reference itself is not within the boundaries.<br />\n   * We can say it has \"escaped the boundaries\" — or just \"escaped\".<br />\n   * In this case we need to decide whether the popper should either:\n   *\n   * - detach from the reference and remain \"trapped\" in the boundaries, or\n   * - if it should ignore the boundary and \"escape with its reference\"\n   *\n   * When `escapeWithReference` is set to`true` and reference is completely\n   * outside its boundaries, the popper will overflow (or completely leave)\n   * the boundaries in order to remain attached to the edge of the reference.\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  preventOverflow: {\n    /** @prop {number} order=300 - Index used to define the order of execution */\n    order: 300,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: preventOverflow,\n    /**\n     * @prop {Array} [priority=['left','right','top','bottom']]\n     * Popper will try to prevent overflow following these priorities by default,\n     * then, it could overflow on the left and on top of the `boundariesElement`\n     */\n    priority: ['left', 'right', 'top', 'bottom'],\n    /**\n     * @prop {number} padding=5\n     * Amount of pixel used to define a minimum distance between the boundaries\n     * and the popper this makes sure the popper has always a little padding\n     * between the edges of its container\n     */\n    padding: 5,\n    /**\n     * @prop {String|HTMLElement} boundariesElement='scrollParent'\n     * Boundaries used by the modifier, can be `scrollParent`, `window`,\n     * `viewport` or any DOM element.\n     */\n    boundariesElement: 'scrollParent'\n  },\n\n  /**\n   * Modifier used to make sure the reference and its popper stay near eachothers\n   * without leaving any gap between the two. Expecially useful when the arrow is\n   * enabled and you want to assure it to point to its reference element.\n   * It cares only about the first axis, you can still have poppers with margin\n   * between the popper and its reference element.\n   * @memberof modifiers\n   * @inner\n   */\n  keepTogether: {\n    /** @prop {number} order=400 - Index used to define the order of execution */\n    order: 400,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: keepTogether\n  },\n\n  /**\n   * This modifier is used to move the `arrowElement` of the popper to make\n   * sure it is positioned between the reference element and its popper element.\n   * It will read the outer size of the `arrowElement` node to detect how many\n   * pixels of conjuction are needed.\n   *\n   * It has no effect if no `arrowElement` is provided.\n   * @memberof modifiers\n   * @inner\n   */\n  arrow: {\n    /** @prop {number} order=500 - Index used to define the order of execution */\n    order: 500,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: arrow,\n    /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n    element: '[x-arrow]'\n  },\n\n  /**\n   * Modifier used to flip the popper's placement when it starts to overlap its\n   * reference element.\n   *\n   * Requires the `preventOverflow` modifier before it in order to work.\n   *\n   * **NOTE:** this modifier will interrupt the current update cycle and will\n   * restart it if it detects the need to flip the placement.\n   * @memberof modifiers\n   * @inner\n   */\n  flip: {\n    /** @prop {number} order=600 - Index used to define the order of execution */\n    order: 600,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: flip,\n    /**\n     * @prop {String|Array} behavior='flip'\n     * The behavior used to change the popper's placement. It can be one of\n     * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n     * placements (with optional variations).\n     */\n    behavior: 'flip',\n    /**\n     * @prop {number} padding=5\n     * The popper will flip if it hits the edges of the `boundariesElement`\n     */\n    padding: 5,\n    /**\n     * @prop {String|HTMLElement} boundariesElement='viewport'\n     * The element which will define the boundaries of the popper position,\n     * the popper will never be placed outside of the defined boundaries\n     * (except if keepTogether is enabled)\n     */\n    boundariesElement: 'viewport'\n  },\n\n  /**\n   * Modifier used to make the popper flow toward the inner of the reference element.\n   * By default, when this modifier is disabled, the popper will be placed outside\n   * the reference element.\n   * @memberof modifiers\n   * @inner\n   */\n  inner: {\n    /** @prop {number} order=700 - Index used to define the order of execution */\n    order: 700,\n    /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n    enabled: false,\n    /** @prop {ModifierFn} */\n    fn: inner\n  },\n\n  /**\n   * Modifier used to hide the popper when its reference element is outside of the\n   * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n   * be used to hide with a CSS selector the popper when its reference is\n   * out of boundaries.\n   *\n   * Requires the `preventOverflow` modifier before it in order to work.\n   * @memberof modifiers\n   * @inner\n   */\n  hide: {\n    /** @prop {number} order=800 - Index used to define the order of execution */\n    order: 800,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: hide\n  },\n\n  /**\n   * Computes the style that will be applied to the popper element to gets\n   * properly positioned.\n   *\n   * Note that this modifier will not touch the DOM, it just prepares the styles\n   * so that `applyStyle` modifier can apply it. This separation is useful\n   * in case you need to replace `applyStyle` with a custom implementation.\n   *\n   * This modifier has `850` as `order` value to maintain backward compatibility\n   * with previous versions of Popper.js. Expect the modifiers ordering method\n   * to change in future major versions of the library.\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  computeStyle: {\n    /** @prop {number} order=850 - Index used to define the order of execution */\n    order: 850,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: computeStyle,\n    /**\n     * @prop {Boolean} gpuAcceleration=true\n     * If true, it uses the CSS 3d transformation to position the popper.\n     * Otherwise, it will use the `top` and `left` properties.\n     */\n    gpuAcceleration: true,\n    /**\n     * @prop {string} [x='bottom']\n     * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n     * Change this if your popper should grow in a direction different from `bottom`\n     */\n    x: 'bottom',\n    /**\n     * @prop {string} [x='left']\n     * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n     * Change this if your popper should grow in a direction different from `right`\n     */\n    y: 'right'\n  },\n\n  /**\n   * Applies the computed styles to the popper element.\n   *\n   * All the DOM manipulations are limited to this modifier. This is useful in case\n   * you want to integrate Popper.js inside a framework or view library and you\n   * want to delegate all the DOM manipulations to it.\n   *\n   * Note that if you disable this modifier, you must make sure the popper element\n   * has its position set to `absolute` before Popper.js can do its work!\n   *\n   * Just disable this modifier and define you own to achieve the desired effect.\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  applyStyle: {\n    /** @prop {number} order=900 - Index used to define the order of execution */\n    order: 900,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: applyStyle,\n    /** @prop {Function} */\n    onLoad: applyStyleOnLoad,\n    /**\n     * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n     * @prop {Boolean} gpuAcceleration=true\n     * If true, it uses the CSS 3d transformation to position the popper.\n     * Otherwise, it will use the `top` and `left` properties.\n     */\n    gpuAcceleration: undefined\n  }\n};\n\n/**\n * The `dataObject` is an object containing all the informations used by Popper.js\n * this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper.\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements.\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.<br />\n * These can be overriden using the `options` argument of Popper.js.<br />\n * To override an option, simply pass as 3rd argument an object with the same\n * structure of this object, example:\n * ```\n * new Popper(ref, pop, {\n *   modifiers: {\n *     preventOverflow: { enabled: false }\n *   }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n  /**\n   * Popper's placement\n   * @prop {Popper.placements} placement='bottom'\n   */\n  placement: 'bottom',\n\n  /**\n   * Whether events (resize, scroll) are initially enabled\n   * @prop {Boolean} eventsEnabled=true\n   */\n  eventsEnabled: true,\n\n  /**\n   * Set to true if you want to automatically remove the popper when\n   * you call the `destroy` method.\n   * @prop {Boolean} removeOnDestroy=false\n   */\n  removeOnDestroy: false,\n\n  /**\n   * Callback called when the popper is created.<br />\n   * By default, is set to no-op.<br />\n   * Access Popper.js instance with `data.instance`.\n   * @prop {onCreate}\n   */\n  onCreate: function onCreate() {},\n\n  /**\n   * Callback called when the popper is updated, this callback is not called\n   * on the initialization/creation of the popper, but only on subsequent\n   * updates.<br />\n   * By default, is set to no-op.<br />\n   * Access Popper.js instance with `data.instance`.\n   * @prop {onUpdate}\n   */\n  onUpdate: function onUpdate() {},\n\n  /**\n   * List of modifiers used to modify the offsets before they are applied to the popper.\n   * They provide most of the functionalities of Popper.js\n   * @prop {modifiers}\n   */\n  modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n  /**\n   * Create a new Popper.js instance\n   * @class Popper\n   * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper\n   * @param {HTMLElement} popper - The HTML element used as popper.\n   * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n   * @return {Object} instance - The generated Popper.js instance\n   */\n  function Popper(reference, popper) {\n    var _this = this;\n\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    classCallCheck(this, Popper);\n\n    this.scheduleUpdate = function () {\n      return requestAnimationFrame(_this.update);\n    };\n\n    // make update() debounced, so that it only runs at most once-per-tick\n    this.update = debounce(this.update.bind(this));\n\n    // with {} we create a new object with the options inside it\n    this.options = _extends({}, Popper.Defaults, options);\n\n    // init state\n    this.state = {\n      isDestroyed: false,\n      isCreated: false,\n      scrollParents: []\n    };\n\n    // get reference and popper elements (allow jQuery wrappers)\n    this.reference = reference && reference.jquery ? reference[0] : reference;\n    this.popper = popper && popper.jquery ? popper[0] : popper;\n\n    // Deep merge modifiers options\n    this.options.modifiers = {};\n    Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n      _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n    });\n\n    // Refactoring modifiers' list (Object => Array)\n    this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n      return _extends({\n        name: name\n      }, _this.options.modifiers[name]);\n    })\n    // sort the modifiers by order\n    .sort(function (a, b) {\n      return a.order - b.order;\n    });\n\n    // modifiers have the ability to execute arbitrary code when Popper.js get inited\n    // such code is executed in the same order of its modifier\n    // they could add new properties to their options configuration\n    // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n    this.modifiers.forEach(function (modifierOptions) {\n      if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n        modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n      }\n    });\n\n    // fire the first update to position the popper in the right place\n    this.update();\n\n    var eventsEnabled = this.options.eventsEnabled;\n    if (eventsEnabled) {\n      // setup event listeners, they will take care of update the position in specific situations\n      this.enableEventListeners();\n    }\n\n    this.state.eventsEnabled = eventsEnabled;\n  }\n\n  // We can't use class properties because they don't get listed in the\n  // class prototype and break stuff like Sinon stubs\n\n\n  createClass(Popper, [{\n    key: 'update',\n    value: function update$$1() {\n      return update.call(this);\n    }\n  }, {\n    key: 'destroy',\n    value: function destroy$$1() {\n      return destroy.call(this);\n    }\n  }, {\n    key: 'enableEventListeners',\n    value: function enableEventListeners$$1() {\n      return enableEventListeners.call(this);\n    }\n  }, {\n    key: 'disableEventListeners',\n    value: function disableEventListeners$$1() {\n      return disableEventListeners.call(this);\n    }\n\n    /**\n     * Schedule an update, it will run on the next UI update available\n     * @method scheduleUpdate\n     * @memberof Popper\n     */\n\n\n    /**\n     * Collection of utilities useful when writing custom modifiers.\n     * Starting from version 1.7, this method is available only if you\n     * include `popper-utils.js` before `popper.js`.\n     *\n     * **DEPRECATION**: This way to access PopperUtils is deprecated\n     * and will be removed in v2! Use the PopperUtils module directly instead.\n     * Due to the high instability of the methods contained in Utils, we can't\n     * guarantee them to follow semver. Use them at your own risk!\n     * @static\n     * @private\n     * @type {Object}\n     * @deprecated since version 1.8\n     * @member Utils\n     * @memberof Popper\n     */\n\n  }]);\n  return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.<br />\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\n\nexport default Popper;\n//# sourceMappingURL=popper.js.map\n","(function (root, factory) {\n  if (typeof define === 'function' && define.amd) {\n    // AMD\n    define(function() {\n      return (root.Vent = factory());\n    });\n  }\n  else if (typeof exports === 'object') {\n    // CommonJS\n    module.exports = factory();\n  }\n  else {\n    // Global Variables\n    root.Vent = factory();\n  }\n}(this, function() {\n  // The next ID we'll use for scoped delegation\n  var lastID = 0;\n\n  /*\n    Matches selectors that are scoped, such as:\n      > selector\n      :scope > selector\n  */\n  var scopedSelectorRegex = /^\\s*(>|:scope\\s*>)/;\n\n  /**\n    Check if the first array contains every element in the second array\n\n    @ignore\n  */\n  function contains(set, subSet) {\n    for (var i = 0; i < subSet.length; i++) {\n      if (set.indexOf(subSet[i]) === -1) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /**\n    Check if the provided selector is scoped (has context)\n\n    @ignore\n  */\n  function isScoped(selector) {\n    return selector && scopedSelectorRegex.test(selector);\n  }\n\n  /**\n    Replaces the stopPropagation() method of an event object\n\n    @ignore\n  */\n  function ventStopPropagation() {\n    this._ventPropagationStopped = true;\n    Event.prototype.stopPropagation.call(this);\n  }\n\n  /**\n    Replaces the stopImmediatePropagation() method of an event object\n\n    @ignore\n  */\n  function ventStopImmediatePropagation() {\n    this._ventImmediatePropagationStopped = true;\n    Event.prototype.stopImmediatePropagation.call(this);\n  }\n\n  /**\n    Get the right method to match selectors on\n\n    @ignore\n  */\n  var matchesSelector = (function() {\n    var proto = Element.prototype;\n    var matchesSelector = (\n      proto.matches ||\n      proto.matchesSelector ||\n      proto.webkitMatchesSelector ||\n      proto.mozMatchesSelector ||\n      proto.msMatchesSelector ||\n      proto.oMatchesSelector\n    );\n\n    if (!matchesSelector) {\n      throw new Error('Vent: Browser does not support matchesSelector');\n    }\n\n    return matchesSelector;\n  }());\n\n  /**\n    @class Vent\n    @classdesc DOM event delegation\n\n    @param {HTMLElement|String} elementOrSelector\n      The element or selector indicating the element to use as the delegation root.\n  */\n  function Vent(elementOrSelector) {\n    if (this === root) {\n      throw new Error('Vent must be invoked with the new keyword');\n    }\n\n    var root;\n    if (typeof elementOrSelector === 'string') {\n      root = document.querySelector(elementOrSelector);\n    }\n    else {\n      root = elementOrSelector;\n    }\n\n    // Store a reference to the root element\n    // This is the node at which we'll listen to events\n    this.root = root;\n\n    // Map of event names to array of events\n    // Don't inherit from Object so we don't collide with properties on its prototype\n    this._listenersByType = Object.create(null);\n\n    /*\n      A list of all of the listener objects tracked by this instance\n      Each item takes the following form:\n      {\n        eventName: String,\n        handler: Function,\n        namespaces: Array<string>,\n        selector: String | null,\n        useCapture: Boolean,\n        isScoped: Boolean\n      }\n    */\n    this._allListeners = [];\n\n    // Ensure listeners always execute in the scope of this instance\n    this._executeCaptureListeners = this._executeCaptureListeners.bind(this);\n    this._executeBubbleListeners = this._executeBubbleListeners.bind(this);\n\n    // All Vent instances get an ID\n    this._id = this._id || lastID++;\n  }\n\n  /**\n    Check if the listener should fire on the given rooted target\n\n    @ignore\n  */\n  Vent.prototype._listenerMatchesRootTarget = function(listener, target) {\n    return (\n      // When no selector is provided\n      listener.selector === null &&\n      (\n        // Execute if we've landed on the root\n        target === this.root\n      )\n    );\n  };\n\n  /**\n    Check if the listener should fire on the given delegated target\n\n    @ignore\n  */\n  Vent.prototype._listenerMatchesDelegateTarget = function(listener, target) {\n    return (\n      // document does not support matches()\n      target !== document &&\n      // Don't bother with delegation on the root element\n      target !== this.root &&\n      // Check if the event is delegated\n      listener.selector !== null &&\n      // Only execute  if the selector matches\n      (\n        // Check if the selector has context\n        listener.isScoped ?\n        // Run the match using the root element's ID\n        matchesSelector.call(target, '[__vent-id__=\"'+this._id+'\"] '+listener.selector)\n        // Run the match without context\n        : matchesSelector.call(target, listener.selector)\n      )\n    );\n  };\n\n  /**\n    Check if the listener matches the given event phase\n\n    @ignore\n  */\n  Vent.prototype._listenerMatchesEventPhase = function(listener, useCapture) {\n    // Check if the event is the in right phase\n    return (listener.useCapture === useCapture);\n  };\n\n  /**\n    This function is responsible for checking if listeners should be executed for the current event\n\n    @ignore\n  */\n  Vent.prototype._executeListenersAtElement = function(target, listeners, event, useCapture) {\n    var listener;\n    var returnValue;\n\n    // Execute each listener that meets the criteria\n    executeListeners: for (var listenerIndex = 0; listenerIndex < listeners.length; listenerIndex++) {\n      listener = listeners[listenerIndex];\n\n      if (\n        // Do not process events on disabled items #1\n        !(event.type === 'click' && target.disabled === true)\n        &&\n        // Check if the target element matches for this listener\n        (\n          this._listenerMatchesRootTarget(listener, target) ||\n          this._listenerMatchesDelegateTarget(listener, target)\n        ) &&\n        this._listenerMatchesEventPhase(listener, useCapture)\n      ) {\n        // Store the target that matches the event currently\n        event.matchedTarget = target;\n\n        // Call handlers in the scope of the delegate target, passing the event along\n        returnValue = listener.handler.call(target, event);\n\n        // Prevent default and stopPropagation if the handler returned false\n        if (returnValue === false) {\n          event.preventDefault();\n          event.stopPropagation();\n        }\n\n        if (event._ventImmediatePropagationStopped) {\n          // Do not process any more event handlers and stop bubbling\n          break executeListeners;\n        }\n      } // end if\n    } // end executeListeners\n  };\n\n  /**\n    Handles all events added with Vent\n\n    @private\n    @memberof Vent\n  */\n  Vent.prototype._executeCaptureListeners = function(event) {\n    var listeners = this._listenersByType[event.type];\n\n    if (!listeners) {\n      throw new Error('Vent: _executeListeners called in response to '+event.type+', but we are not listening to it');\n    }\n\n    if (listeners.length) {\n      // Get a copy of the listeners\n      // Without this, removing an event inside of a callback will cause errors\n      listeners = listeners.slice();\n\n      // Decorate the event object so we know when stopPropagation is called\n      this._decorateEvent(event);\n\n      // Get the event's path through the DOM\n      var eventPath = this._getPath(event);\n\n      // Simulate the capture phase by trickling down the target list\n      trickleDown: for (var eventPathIndex = eventPath.length - 1; eventPathIndex >= 0; eventPathIndex--) {\n        if (!listeners.length) {\n          // Stop trickling down if there are no more listeners to execute\n          break trickleDown;\n        }\n\n        var currentTargetElement = eventPath[eventPathIndex];\n        this._executeListenersAtElement(currentTargetElement, listeners, event, true);\n\n        // Stop if a handler told us to stop trickling down the DOM\n        if (\n          event._ventImmediatePropagationStopped ||\n          event._ventPropagationStopped\n        ) {\n          // Stop simulating trickle down\n          break trickleDown;\n        }\n      }\n    }\n\n    // Clean up after Vent\n    // We'll be re-decorating the event object in the bubble phase, if the event gets there\n    this._undecorateEvent(event);\n  };\n\n  /**\n    Handles all events added with Vent\n\n    @private\n    @memberof Vent\n  */\n  Vent.prototype._executeBubbleListeners = function(event) {\n    var listeners = this._listenersByType[event.type];\n\n    if (!listeners) {\n      throw new Error('Vent: _executeListeners called in response to '+event.type+', but we are not listening to it');\n    }\n\n    if (listeners.length) {\n      // Get a copy of the listeners\n      // Without this, removing an event inside of a callback will cause errors\n      listeners = listeners.slice();\n\n      // Decorate the event object so we know when stopPropagation is called\n      this._decorateEvent(event);\n\n      /*\n        Figure out if the bubble phase should be simulated\n\n        Both focus and blur do not bubble:\n          https://developer.mozilla.org/en-US/docs/Web/Events/focus\n          https://developer.mozilla.org/en-US/docs/Web/Events/blur\n\n        However, focusin, focusout, change, and other events do.\n      */\n      var shouldBubble = event.type !== 'focus' && event.type !== 'blur';\n\n      // Re-use the event path as calculated during the capture phase\n      var eventPath = this._getPath(event);\n\n      // If listeners remain and propagation was not stopped, simulate the bubble phase by bubbling up the target list\n      bubbleUp: for (var eventPathIndex = 0; eventPathIndex < eventPath.length; eventPathIndex++) {\n        if (!listeners.length) {\n          // Stop bubbling up if there are no more listeners to execute\n          break bubbleUp;\n        }\n\n        var currentTargetElement = eventPath[eventPathIndex];\n        this._executeListenersAtElement(currentTargetElement, listeners, event, false);\n\n        // Stop simulating the bubble phase if a handler told us to\n        if (\n          event._ventImmediatePropagationStopped ||\n          event._ventPropagationStopped\n        ) {\n          break bubbleUp;\n        }\n\n        // If the event shouldn't bubble, only simulate it on the target\n        if (!shouldBubble) {\n          break bubbleUp;\n        }\n      }\n    }\n\n    // Clean up after Vent\n    this._undecorateEvent(event);\n\n    // Clear the path\n    event['_ventPath'+this._id] = null;\n  };\n\n  /**\n    Override stopPropagation/stopImmediatePropagation so we know if we should stop processing events\n  */\n  Vent.prototype._decorateEvent = function(event) {\n    event.stopPropagation = ventStopPropagation;\n    event.stopImmediatePropagation = ventStopImmediatePropagation;\n  };\n\n  /**\n    Restore the normal stopPropagation methods\n  */\n  Vent.prototype._undecorateEvent = function(event) {\n    event.stopPropagation = Event.prototype.stopPropagation;\n    event.stopImmediatePropagation = Event.prototype.stopImmediatePropagation;\n  };\n\n  /**\n    Restore the normal stopPropagation methods\n  */\n  Vent.prototype._getPath = function(event) {\n    if (event['_ventPath'+this._id]) {\n      return event['_ventPath'+this._id];\n    }\n\n    // If the event was fired on a text node, delegation should assume the target is its parent\n    var target = event.target;\n    if (target.nodeType === Node.TEXT_NODE) {\n      target = target.parentNode;\n    }\n\n    // Build an array of the DOM tree between the root and the element that dispatched the event\n    // The HTML specification states that, if the tree is modified during dispatch, the event should bubble as it was before\n    // Building this list before we dispatch allows us to simulate that behavior\n    var pathEl = target;\n    var eventPath = [];\n    buildPath: while (pathEl && pathEl !== this.root) {\n      eventPath.push(pathEl);\n      pathEl = pathEl.parentNode;\n    }\n    eventPath.push(this.root);\n\n    event['_ventPath'+this._id] = eventPath;\n\n    return eventPath;\n  };\n\n  /**\n    Add an event listener.\n    @memberof Vent\n\n    @param {String} eventName\n      The event name to listen for, including optional namespace(s).\n    @param {String} [selector]\n      The selector to use for event delegation.\n    @param {Function} handler\n      The function that will be called when the event is fired.\n    @param {Boolean} [useCapture]\n      Whether or not to listen during the capturing or bubbling phase.\n\n    @returns {Vent} this, chainable.\n  */\n  Vent.prototype.on = function(eventName, selector, handler, useCapture) {\n    if (typeof selector === 'function') {\n      useCapture = handler;\n      handler = selector;\n      selector = null;\n    }\n\n    if (typeof handler !== 'function') {\n      throw new Error('Vent: Cannot add listener with non-function handler');\n    }\n\n    // Be null if every falsy (undefined or empty string passed)\n    if (!selector) {\n      selector = null;\n    }\n\n\n    if (typeof useCapture === 'undefined') {\n      // Force useCapture for focus and blur events\n      if (eventName === 'focus' || eventName === 'blur') {\n        // true by default for focus and blur events only\n        useCapture = true;\n      }\n      else {\n        // false by default\n        // This matches the HTML API\n        useCapture = false;\n      }\n    }\n\n    // Extract namespaces\n    var namespaces = null;\n    var dotIndex = eventName.indexOf('.');\n    if (dotIndex !== -1) {\n      namespaces = eventName.slice(dotIndex+1).split('.');\n      eventName = eventName.slice(0, dotIndex);\n    }\n\n    // Get/create the list for the event type\n    var listenerList = this._listenersByType[eventName];\n    if (!listenerList) {\n      listenerList = this._listenersByType[eventName] = [];\n\n      // Add the actual listener\n      this.root.addEventListener(eventName, this._executeCaptureListeners, true);\n      this.root.addEventListener(eventName, this._executeBubbleListeners, false);\n    }\n\n    // Set the special ID attribute if the selector is scoped\n    var listenerIsScoped = isScoped(selector);\n    if (listenerIsScoped) {\n      // Normalize selectors so they don't use :scope\n      selector = selector.replace(scopedSelectorRegex, '>');\n\n      // Store a unique ID and set a special attribute we'll use to scope\n      this.root.setAttribute('__vent-id__', this._id);\n    }\n\n    // Create an object with the event's information\n    var eventObject = {\n      eventName: eventName,\n      handler: handler,\n      namespaces: namespaces,\n      selector: selector,\n      useCapture: useCapture,\n      isScoped: listenerIsScoped\n    };\n\n    // Store relative to the current type and with everyone else\n    listenerList.push(eventObject);\n    this._allListeners.push(eventObject);\n  };\n\n  /**\n    Remove an event listener.\n    @memberof Vent\n\n    @param {String} [eventName]\n      The event name to stop listening for, including optional namespace(s).\n    @param {String} [selector]\n      The selector that was used for event delegation.\n    @param {Function} [handler]\n      The function that was passed to <code>on()</code>.\n    @param {Boolean} [useCapture]\n      Only remove listeners with <code>useCapture</code> set to the value passed in.\n\n    @returns {Vent} this, chainable.\n  */\n  Vent.prototype.off = function(eventName, selector, handler, useCapture) {\n    if (typeof selector === 'function') {\n      useCapture = handler;\n      handler = selector;\n      selector = null;\n    }\n\n    // Be null if not provided\n    if (typeof eventName === 'undefined') {\n      eventName = null;\n    }\n\n    if (typeof selector === 'undefined') {\n      selector = null;\n    }\n\n    if (typeof handler === 'undefined') {\n      handler = null;\n    }\n\n    if (typeof useCapture === 'undefined') {\n      useCapture = null;\n    }\n\n    // Extract namespaces\n    var namespaces = null;\n    if (eventName) {\n      var dotIndex = eventName.indexOf('.');\n      if (dotIndex !== -1) {\n        namespaces = eventName.slice(dotIndex+1).split('.');\n        eventName = eventName.slice(0, dotIndex);\n      }\n    }\n\n    // Be null\n    if (eventName === '') {\n      eventName = null;\n    }\n\n    var listener;\n    var index;\n    var listeners = this._allListeners;\n    for (var i = 0; i < listeners.length; i++) {\n      listener = listeners[i];\n\n      if (\n        (eventName === null || listener.eventName === eventName) &&\n        (selector === null || listener.selector === selector) &&\n        (handler === null || listener.handler === handler) &&\n        (useCapture === null || listener.useCapture === useCapture) &&\n        (\n          // Remove matching listeners, regardless of namespace\n          namespaces === null ||\n          // Listener matches all specified namespaces\n          (listener.namespaces && contains(listener.namespaces, namespaces))\n        )\n      ) {\n        // Remove the listeners info\n        this._allListeners.splice(i, 1);\n\n        // Array length changed, so check the same index on the next iteration\n        i--;\n\n        // Get index in listenersByType map\n        if (!this._listenersByType[listener.eventName]) {\n          throw new Error('Vent: Missing listenersByType for '+listener.eventName);\n        }\n\n        // Find the event info in the other lookup list\n        index = this._listenersByType[listener.eventName].indexOf(listener);\n        if (index !== -1) {\n          var mapList = this._listenersByType[listener.eventName];\n\n          // Remove from the map\n          mapList.splice(index, 1);\n\n          // Check if we've removed all the listeners for this event type\n          if (mapList.length === 0) {\n            // Remove the actual listener, if necessary\n            this.root.removeEventListener(listener.eventName, this._executeCaptureListeners, true);\n            this.root.removeEventListener(listener.eventName, this._executeBubbleListeners, false);\n\n            // Avoid using delete operator for performance\n            this._listenersByType[listener.eventName] = null;\n          }\n        }\n        else {\n          throw new Error('Vent: Event existed in allEvents, but did not exist in listenersByType');\n        }\n        // Don't stop now! We want to remove all matching listeners, so continue to loop\n      }\n    }\n\n    return this;\n  };\n\n  if (typeof CustomEvent === 'function') {\n    // Use native CustomEvent on platforms that support it\n    // Note: defaultPrevented will not be set correctly if CustomEvent is polyfilled\n\n    /**\n      Dispatch a custom event at the root element.\n      @memberof Vent\n\n      @param {String} eventName\n        The name of the event to dispatch.\n      @param {Object} [options]\n        CustomEvent options.\n      @param {Object} [options.bubbles=true]\n        Whether the event should bubble.\n      @param {Object} [options.cancelable=true]\n        Whether the event should be cancelable.\n      @param {Object} [options.detail]\n        Data to pass to handlers as <code>event.detail</code>\n    */\n    Vent.prototype.dispatch = function(eventName, options) {\n      options = options || {};\n\n      if (typeof options.bubbles === 'undefined') {\n        options.bubbles = true;\n      }\n\n      if (typeof options.cancelable === 'undefined') {\n        options.cancelable = true;\n      }\n\n      var event = new CustomEvent(eventName, options);\n      this.root.dispatchEvent(event);\n\n      return event;\n    };\n  }\n  else {\n    // Use createEvent for old browsers\n    Vent.prototype.dispatch = function(eventName, options) {\n      options = options || {};\n\n      if (typeof options.bubbles === 'undefined') {\n        options.bubbles = true;\n      }\n\n      if (typeof options.cancelable === 'undefined') {\n        options.cancelable = true;\n      }\n\n      var event = document.createEvent('CustomEvent');\n      event.initCustomEvent(eventName, options.bubbles, options.cancelable, options.detail);\n\n      // Dispatch the event, checking the return value to see if preventDefault() was called\n      var defaultPrevented = !this.root.dispatchEvent(event);\n\n      // Check if the defaultPrevented status was correctly stored back to the event object\n      if (defaultPrevented !== event.defaultPrevented) {\n        // dispatchEvent() doesn't correctly set event.defaultPrevented in IE 9\n        // However, it does return false if preventDefault() was called\n        // Unfortunately, the returned event's defaultPrevented property is read-only\n        // We need to work around this such that (patchedEvent instanceof Event) === true\n        // First, we'll create an object that uses the event as its prototype\n        // This gives us an object we can modify that is still technically an instanceof Event\n        var patchedEvent = Object.create(event);\n\n        // Next, we set the correct value for defaultPrevented on the new object\n        // We cannot simply assign defaultPrevented, it causes a \"Invalid Calling Object\" error in IE 9\n        // For some reason, defineProperty doesn't cause this\n        Object.defineProperty(patchedEvent, 'defaultPrevented', { value: defaultPrevented });\n\n        return patchedEvent;\n      }\n\n      return event;\n    };\n  }\n\n  /**\n    Destroy this instance, removing all events and references.\n    @memberof Vent\n  */\n  Vent.prototype.destroy = function() {\n    if (this.destroyed) {\n      // Instance is already destroyed, do nothing\n      return;\n    }\n\n    // Remove all events\n    this.off();\n\n    // Remove all references\n    this._listenersByType = null;\n    this._allListeners = null;\n    this.root = null;\n    this.destroyed = true;\n  };\n\n  return Vent;\n}));\n","const template = (function anonymous(data_0\n/*``*/) {\n    var frag = document.createDocumentFragment();\n    var data = data_0;\n    var el0 = document.createElement(\"object\");\n    el0.setAttribute(\"aria-hidden\", \"true\");\n    el0.setAttribute(\"tabindex\", \"-1\");\n    el0.setAttribute(\"style\", \"display:block; position:absolute; top:0; left:0; height:100%; width:100%; opacity:0; overflow:hidden; z-index:-100;\");\n    el0.textContent = \"​\";\n    frag.appendChild(el0);\n    var el1 = document.createTextNode(\"\\n\");\n    frag.appendChild(el1);\n    return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport resizer from '../templates/resizer';\n\n/**\n @private\n \n Adaptation of http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/\n */\nexport default class ResizeObserver {\n  constructor() {\n    // User agent toggles\n    const isIE = navigator.userAgent.match(/Trident/) || navigator.userAgent.match(/Edge/);\n    this.useNativeResizeSupport = document.attachEvent && !isIE;\n    \n    this._resizeListenerObject = resizer().querySelector('object');\n  }\n  \n  _getResizeListenerObject() {\n    return this._resizeListenerObject.cloneNode(true);\n  }\n  \n  _addTriggerElement(element, listenerFunction) {\n    if (getComputedStyle(element).position === 'static') {\n      element.style.position = 'relative';\n    }\n    \n    const obj = this._getResizeListenerObject();\n    \n    // Remove the old one before adding the new one\n    if (element._resizeTriggerElement) {\n      element._resizeTriggerElement.remove();\n    }\n    \n    element._resizeTriggerElement = obj;\n    \n    // eslint-disable-next-line func-names\n    obj.onload = function() {\n      const contentDocument = this.contentDocument;\n      const defaultView = contentDocument.defaultView;\n      const documentElement = contentDocument.documentElement;\n      \n      defaultView._originalElement = element;\n      defaultView._listenerFunction = listenerFunction;\n      defaultView.addEventListener('resize', listenerFunction);\n      \n      // CUI-6523 Set lang and document title to avoid automated accessibility testing failures.\n      documentElement.lang = 'en';\n      contentDocument.title = '\\u200b';\n      \n      // Call one initial resize for all browsers\n      // Required, as in WebKit this callback adding the event listeners is called too late. Layout has already finished.\n      listenerFunction({\n        target: defaultView\n      });\n    };\n    \n    obj.type = 'text/html';\n    \n    // InternetExplorer is picky about the order of \"obj.data = ...\" and element.appendChild(obj) so make sure to get it right\n    element.appendChild(obj);\n    obj.data = 'about:blank';\n  }\n  \n  _removeTriggerElement(element) {\n    if (!element._resizeTriggerElement) {\n      return;\n    }\n    \n    const triggerElement = element._resizeTriggerElement;\n    \n    // processObjectLoadedEvent might never have been called\n    if (triggerElement.contentDocument && triggerElement.contentDocument.defaultView) {\n      triggerElement.contentDocument.defaultView.removeEventListener('resize', triggerElement.contentDocument.defaultView._listenerFunction);\n    }\n    \n    element._resizeTriggerElement = !element.removeChild(element._resizeTriggerElement);\n  }\n  \n  _fireResizeListeners(event) {\n    const targetElement = event.target || event.srcElement;\n    \n    const trigger = targetElement._originalElement || targetElement;\n    trigger._resizeListeners.forEach((fn) => {\n      fn.call(trigger, event);\n    });\n  }\n  \n  _addResizeListener(element, onResize) {\n    if (!element) {\n      return;\n    }\n    \n    if (this.useNativeResizeSupport) {\n      element.addEventListener('resize', onResize);\n      return;\n    }\n    \n    // The array may still exist, so we check its length too\n    if (!element._resizeListeners || element._resizeListeners.length === 0) {\n      element._resizeListeners = [];\n    }\n    \n    this._addTriggerElement(element, this._fireResizeListeners.bind(this));\n    \n    element._resizeListeners.push(onResize);\n  }\n  \n  \n  _removeResizeListener(element, onResize) {\n    if (!element) {\n      return;\n    }\n    \n    if (this.useNativeResizeSupport) {\n      element.removeEventListener('resize', onResize);\n      return;\n    }\n    \n    // resizeListeners and resizeTrigger must be present\n    if (!element._resizeListeners || !element._resizeTriggerElement) {\n      return;\n    }\n    \n    const fnIndex = element._resizeListeners.indexOf(onResize);\n    \n    // Don't remove the function unless it is already registered\n    if (fnIndex === -1) {\n      return;\n    }\n    \n    element._resizeListeners.splice(fnIndex, 1);\n    \n    if (!element._resizeListeners.length) {\n      this._removeTriggerElement(element);\n    }\n  }\n}\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport ResizeObserver from './ResizeObserver';\nimport {Promise} from '../../../coralui-externals';\n\n// Used for unique IDs\nlet nextID = 0;\n\n// Remove namespace from global options\nconst cleanOption = (name) => {\n  name = name.replace('coral', '');\n  return name.charAt(0).toLowerCase() + name.slice(1);\n};\n\n// Threshold time in milliseconds that the setTimeout will wait for the transitionEnd event to be triggered.\nconst TRANSITION_DURATION_THRESHOLD = 100;\n\n// Based on jQuery's :focusable selector\nconst FOCUSABLE_ELEMENTS = [\n  'input:not([disabled])',\n  'select:not([disabled])',\n  'textarea:not([disabled])',\n  'button:not([disabled])',\n  'a[href]',\n  'area[href]',\n  'summary',\n  'iframe',\n  'object',\n  'embed',\n  'audio[controls]',\n  'video[controls]',\n  '[contenteditable]'\n];\n\n// @polyfill IE11\n// Content zone names to support Coral.commons.ready + lightweight tags\nconst contentZoneNames = [\n  'label',\n  'content',\n  'propertylist',\n  'asset',\n  'info',\n  'overlay',\n  'thumbnail',\n  'separator',\n  'value',\n  'header',\n  'footer',\n  'name',\n  'subheading'\n];\n\n// @polyfill IE11\nconst isIE = navigator.userAgent.match(/Trident/) || navigator.userAgent.match(/Edge/);\n\n/**\n Converts CSS time to milliseconds. It supports both s and ms units. If the provided value has an unrecogenized unit,\n zero will be returned.\n \n @private\n @param {String} time\n The time string to convert to milliseconds.\n @returns {Number} the time in milliseconds.\n */\nfunction cssTimeToMilliseconds(time) {\n  const num = parseFloat(time, 10);\n  let unit = time.match(/m?s/);\n  \n  if (unit) {\n    unit = unit[0];\n  }\n  \n  if (unit === 's') {\n    return num * 1000;\n  }\n  else if (unit === 'ms') {\n    return num;\n  }\n  \n  // unrecognized unit, so we return 0\n  return 0;\n}\n\n/**\n @private\n \n @param first\n @param second\n @return {Function}\n */\nfunction returnFirst(first, second) {\n  // eslint-disable-next-line func-names\n  return function(...args) {\n    const ret = first.apply(this, args);\n    second.apply(this, args);\n    return ret;\n  };\n}\n\n/**\n Check if the provided object is a function\n \n @ignore\n \n @param {*} object\n The object to test\n \n @returns {Boolean} Whether the provided object is a function.\n */\nfunction isFunction(object) {\n  return typeof object === 'function';\n}\n\n/**\n Check if the provided object is a function\n \n @ignore\n @polyfill IE11\n \n @param {String} name\n The node name to validate\n \n @returns {Boolean} Whether the content zone should be validated against Coral.commons.ready\n */\nfunction isHTMLUnknownElementIE(name) {\n  if (isIE) {\n    const names = name.split('-');\n    return names.length > 2 && contentZoneNames.indexOf(names.pop()) === -1;\n  }\n  \n  return false;\n}\n\n/**\n Utility belt.\n */\nclass Commons {\n  /** @ignore */\n  constructor() {\n    this._resizeEvent = new ResizeObserver();\n    \n    const focusableElements = FOCUSABLE_ELEMENTS.slice();\n    this._focusableElementsSelector = focusableElements.join(',');\n  \n    focusableElements.push('[tabindex]:not([tabindex=\"-1\"])');\n    this._tabbableElementsSelector = focusableElements.join(':not([tabindex=\"-1\"]),');\n  \n    const scripts = document.getElementsByTagName('script');\n    this._script = scripts[scripts.length - 1];\n  }\n  \n  /**\n   Returns Coral global options retrieved on the <code><script></code> data attributes including:\n   - <code>[data-coral-icons]</code>: source folder of the SVG icons. If the icons are renamed, you'll have to load them\n   manually using {@link Icon.load}.\n   - <code>[data-coral-typekit]</code>: custom typekit id used to load the fonts.\n   \n   @returns {Object}\n   The global options object.\n   */\n  get options() {\n    const options = {};\n    const props = this._script.dataset;\n    for (const key in props) {\n      // Detect Coral namespaced options\n      if (key.indexOf('coral') === 0) {\n        options[cleanOption(key)] = props[key];\n      }\n    }\n    \n    return options;\n  }\n  \n  /**\n   Copy the properties from all provided objects into the first object.\n   \n   @param {Object} dest\n   The object to copy properties to\n   @param {...Object} source\n   An object to copy properties from. Additional objects can be passed as subsequent arguments.\n   \n   @returns {Object}\n   The destination object, <code>dest</code>\n   */\n  extend(...args) {\n    const dest = args[0];\n    for (let i = 1, ni = args.length; i < ni; i++) {\n      const source = args[i];\n      for (const prop in source) {\n        dest[prop] = source[prop];\n      }\n    }\n    return dest;\n  }\n  \n  /**\n   Copy the properties from the source object to the destination object, but calls the callback if the property is\n   already present on the destination object.\n   \n   @param {Object} dest\n   The object to copy properties to\n   @param {...Object} source\n   An object to copy properties from. Additional objects can be passed as subsequent arguments.\n   @param {CommonsHandleCollision} [handleCollision]\n   Called if the property being copied is already present on the destination.\n   The return value will be used as the property value.\n   \n   @returns {Object}\n   The destination object, <code>dest</code>\n   */\n  augment(...args) {\n    const dest = args[0];\n    let handleCollision;\n    let argCount = args.length;\n    const lastArg = args[argCount - 1];\n    \n    if (typeof lastArg === 'function') {\n      handleCollision = lastArg;\n      \n      // Don't attempt to augment using the last argument\n      argCount--;\n    }\n    \n    for (let i = 1; i < argCount; i++) {\n      const source = args[i];\n      \n      for (const prop in source) {\n        if (typeof dest[prop] !== 'undefined') {\n          if (typeof handleCollision === 'function') {\n            // Call the handleCollision callback if the property is already present\n            const ret = handleCollision(dest[prop], source[prop], prop, dest, source);\n            if (typeof ret !== 'undefined') {\n              dest[prop] = ret;\n            }\n          }\n          // Otherwise, do nothing\n        }\n        else {\n          dest[prop] = source[prop];\n        }\n      }\n    }\n    \n    return dest;\n  }\n  \n  /**\n   Return a new object with the swapped keys and values of the provided object.\n   \n   @param {Object} obj\n   The object to copy.\n   \n   @returns {Object}\n   An object with its keys as the values and values as the keys of the source object.\n   */\n  swapKeysAndValues(obj) {\n    const map = {};\n    for (const key in obj) {\n      map[obj[key]] = key;\n    }\n    return map;\n  }\n  \n  /**\n   Execute the provided callback on the next animation frame.\n   @function\n   @param {Function} onNextFrame\n   The callback to execute.\n   @deprecated\n   */\n  nextFrame(onNextFrame) {\n    console.warn('Coral.commons.nextFrame has been deprecated. Please use window.requestAnimationFrame instead.');\n    \n    return window.requestAnimationFrame(() => {\n      if (typeof onNextFrame === 'function') {\n        onNextFrame();\n      }\n    });\n  }\n  \n  /**\n   Execute the provided callback once a CSS transition has ended. This method listens for the next transitionEnd event\n   on the given DOM element. In case the provided element does not have a transition defined, the callback will be\n   called in the next macrotask to allow a normal application execution flow. It cannot be used to listen continuously\n   on transitionEnd events.\n   @param {HTMLElement} element\n   The DOM element that is affected by the CSS transition.\n   @param {CommonsTransitionEndCallback} onTransitionEndCallback\n   The callback to execute.\n   */\n  transitionEnd(element, onTransitionEndCallback) {\n    let propertyName;\n    let hasTransitionEnded = false;\n    let transitionEndEventName = null;\n    const transitions = {\n      transition: 'transitionend',\n      WebkitTransition: 'webkitTransitionEnd',\n      MozTransition: 'transitionend',\n      MSTransition: 'msTransitionEnd'\n    };\n    \n    let transitionEndTimeout = null;\n    const onTransitionEnd = (event) => {\n      const transitionStoppedByTimeout = typeof event === 'undefined';\n      \n      if (!hasTransitionEnded) {\n        hasTransitionEnded = true;\n        \n        clearTimeout(transitionEndTimeout);\n        \n        // Remove event listener (if any was used by the current browser)\n        element.removeEventListener(transitionEndEventName, onTransitionEnd);\n        \n        // Call callback with specified element\n        onTransitionEndCallback({\n          target: element,\n          cssTransitionSupported: true,\n          transitionStoppedByTimeout: transitionStoppedByTimeout\n        });\n      }\n    };\n    \n    // Find transitionEnd event name used by browser\n    for (propertyName in transitions) {\n      if (element.style[propertyName] !== undefined) {\n        transitionEndEventName = transitions[propertyName];\n        break;\n      }\n    }\n    \n    if (transitionEndEventName !== null) {\n      let timeoutDelay = 0;\n      // Gets the animation time (in milliseconds) using the computed style\n      const transitionDuration = cssTimeToMilliseconds(window.getComputedStyle(element).transitionDuration);\n      \n      // We only setup the event listener if there is a valid transition\n      if (transitionDuration !== 0) {\n        // Register on transitionEnd event\n        element.addEventListener(transitionEndEventName, onTransitionEnd);\n        \n        // As a fallback we use the transitionDuration plus a threshold. This can happen in IE10/11 where\n        // transitionEnd events are sometimes skipped\n        timeoutDelay = transitionDuration + TRANSITION_DURATION_THRESHOLD;\n      }\n      \n      // Fallback in case the event does not trigger (IE10/11) or if the element does not have a valid transition\n      transitionEndTimeout = window.setTimeout(onTransitionEnd, timeoutDelay);\n    }\n  }\n  \n  /**\n   Checks if Coral components and all nested Coral components are defined as Custom Elements.\n   \n   @param {HTMLElement} element\n   The element that should be watched.\n   @param {CommonsReadyCallback} onDefined\n   The callback to call when all components are ready.\n   \n   @see https://developer.mozilla.org/en-US/docs/Web/Web_Components/Custom_Elements\n   */\n  ready(element, onDefined) {\n    let root = element;\n    \n    if (typeof element === 'function') {\n      onDefined = element;\n      root = document.body;\n    }\n    \n    if (!root) {\n      root = document.body;\n    }\n    \n    if (!(root instanceof HTMLElement)) {\n      console.warn('Coral.commons.ready: passed element was not an HTMLElement.');\n      // commons.ready should not be blocking by default\n      onDefined(root);\n      return;\n    }\n    \n    // @todo use ':not(:defined)' once supported to detect coral not yet defined custom elements\n    const elements = root.querySelectorAll('*');\n    \n    // Holds promises that resolve when the elements is defined\n    const promises = [];\n  \n    // Holds node names that require validation\n    const nodeNames = [];\n    \n    // Finds the custom elements name and adds it to the promises\n    const addName = function(el) {\n      let name = el.nodeName.toLowerCase();\n      \n      // Check nodename\n      if (name.indexOf('coral') === 0 && el instanceof HTMLUnknownElement && isHTMLUnknownElementIE(name) && nodeNames.indexOf(name) === -1) {\n        nodeNames.push(name);\n        promises.push(window.customElements.whenDefined(name));\n      }\n      else {\n        // Fallback to is attribute\n        name = String(el.getAttribute('is')).toLowerCase();\n        \n        if (name.indexOf('coral') === 0 && el instanceof HTMLUnknownElement && isHTMLUnknownElementIE(name) && nodeNames.indexOf(name) === -1) {\n          nodeNames.push(name);\n          promises.push(window.customElements.whenDefined(name));\n        }\n      }\n    };\n    \n    // Don't forget to check root\n    addName(root);\n    \n    // Check all descending elements\n    for (let i = 0; i < elements.length; i++) {\n      addName(elements[i]);\n    }\n    \n    // Call callback once all defined\n    if (promises.length) {\n      Promise.all(promises)\n        .then(() => {\n          onDefined(element instanceof HTMLElement && element || window);\n        })\n        .catch((err) => {\n          console.error(err);\n        });\n    }\n    else {\n      // Call callback by default if all defined already\n      onDefined(element instanceof HTMLElement && element || window);\n    }\n  }\n  \n  \n  /**\n   Assign an object given a nested path\n   \n   @param {Object} root\n   The root object on which the path should be traversed.\n   @param {String} path\n   The path at which the object should be assignment.\n   @param {String} obj\n   The object to assign at path.\n   \n   @throws Will throw an error if the path is not present on the object.\n   */\n  setSubProperty(root, path, obj) {\n    const nsParts = path.split('.');\n    let curObj = root;\n    \n    if (nsParts.length === 1) {\n      // Assign immediately\n      curObj[path] = obj;\n      return;\n    }\n    \n    // Make sure we can assign at the requested location\n    while (nsParts.length > 1) {\n      const part = nsParts.shift();\n      if (curObj[part]) {\n        curObj = curObj[part];\n      }\n      else {\n        throw new Error(`Coral.commons.setSubProperty: could not set ${path}, part ${part} not found`);\n      }\n    }\n    \n    // Do the actual assignment\n    curObj[nsParts.shift()] = obj;\n  }\n  \n  \n  /**\n   Get the value of the property at the given nested path.\n   \n   @param {Object} root\n   The root object on which the path should be traversed.\n   @param {String} path\n   The path of the sub-property to return.\n   \n   @returns {*}\n   The value of the provided property.\n   \n   @throws Will throw an error if the path is not present on the object.\n   */\n  getSubProperty(root, path) {\n    const nsParts = path.split('.');\n    let curObj = root;\n    \n    if (nsParts.length === 1) {\n      // Return property immediately\n      return curObj[path];\n    }\n    \n    // Make sure we can assign at the requested location\n    while (nsParts.length) {\n      const part = nsParts.shift();\n      // The property might be undefined, and that's OK if it's the last part\n      if (nsParts.length === 0 || typeof curObj[part] !== 'undefined') {\n        curObj = curObj[part];\n      }\n      else {\n        throw new Error(`Coral.commons.getSubProperty: could not get ${path}, part ${part} not found`);\n      }\n    }\n    \n    return curObj;\n  }\n  \n  /**\n   Apply a mixin to the given object.\n \n   @deprecated\n   \n   @param {Object} target\n   The object to apply the mixin to.\n   @param {Object|Function} mixin\n   The mixin to apply.\n   @param {Object} options\n   An object to pass to functional mixins.\n   */\n  _applyMixin(target, mixin, options) {\n    const mixinType = typeof mixin;\n    \n    if (mixinType === 'function') {\n      mixin(target, options);\n    }\n    else if (mixinType === 'object' && mixin !== null) {\n      this.extend(target, mixin);\n    }\n    else {\n      throw new Error(`Coral.commons.mixin: Cannot mix in ${mixinType} to ${target.toString()}`);\n    }\n  }\n  \n  /**\n   Mix a set of mixins to a target object.\n \n   @deprecated\n   @private\n   \n   @param {Object} target\n   The target prototype or instance on which to apply mixins.\n   @param {Object|CoralMixin|Array<Object|CoralMixin>} mixins\n   A mixin or set of mixins to apply.\n   @param {Object} options\n   An object that will be passed to functional mixins as the second argument (options).\n   */\n  mixin(target, mixins, options) {\n    if (Array.isArray(mixins)) {\n      for (let i = 0; i < mixins.length; i++) {\n        this._applyMixin(target, mixins[i], options);\n      }\n    }\n    else {\n      this._applyMixin(target, mixins, options);\n    }\n  }\n  \n  /**\n   Get a unique ID.\n   \n   @returns {String} unique identifier.\n   */\n  getUID() {\n    return `coral-id-${nextID++}`;\n  }\n  \n  /**\n   Call all of the provided functions, in order, returning the return value of the specified function.\n   \n   @param {...Function} func\n   A function to call\n   @param {Number} [nth=0]\n   A zero-based index indicating the noth argument to return the value of.\n   If the nth argument is not a function, <code>null</code> will be returned.\n   \n   @returns {Function} The aggregate function.\n   */\n  callAll(...args) {\n    let nth = args[args.length - 1];\n    if (typeof nth !== 'number') {\n      nth = 0;\n    }\n    \n    // Get the function whose value we should return\n    let funcToReturn = args[nth];\n    \n    // Only use arguments that are functions\n    const functions = Array.prototype.filter.call(args, isFunction);\n    \n    if (functions.length === 2 && nth === 0) {\n      // Most common usecase: two valid functions passed\n      return returnFirst(functions[0], functions[1]);\n    }\n    else if (functions.length === 1) {\n      // Common usecase: one valid function passed\n      return functions[0];\n    }\n    else if (functions.length === 0) {\n      return () => {\n        // Fail case: no valid functions passed\n      };\n    }\n    \n    if (typeof funcToReturn !== 'function') {\n      // If the argument at the provided index wasn't a function, just return the value of the first valid function\n      funcToReturn = functions[0];\n    }\n    \n    // eslint-disable-next-line func-names\n    return function() {\n      let finalRet;\n      let ret;\n      let func;\n      \n      // Skip first arg\n      for (let i = 0; i < functions.length; i++) {\n        func = functions[i];\n        ret = func.apply(this, args);\n        \n        // Store return value of desired function\n        if (func === funcToReturn) {\n          finalRet = ret;\n        }\n      }\n      return finalRet;\n    };\n  }\n  \n  /**\n   Adds a resize listener to the given element.\n   \n   @param {HTMLElement} element\n   The element to add the resize event to.\n   @param {Function} onResize\n   The resize callback.\n   */\n  // eslint-disable-next-line func-names\n  addResizeListener(element, onResize) {\n    this._resizeEvent._addResizeListener(element, onResize);\n  }\n  \n  /**\n   Removes a resize listener from the given element.\n   \n   @param {HTMLElement} element\n   The element to remove the resize event from.\n   @param {Function} onResize\n   The resize callback.\n   */\n  // eslint-disable-next-line func-names\n  removeResizeListener(element, onResize) {\n    this._resizeEvent._removeResizeListener(element, onResize);\n  }\n  \n  /**\n   Caution: the selector doesn't verify if elements are visible.\n   \n   @type {String}\n   @readonly\n   @see https://www.w3.org/TR/html5/editing.html#focus-management\n   */\n  get FOCUSABLE_ELEMENT_SELECTOR() {\n    return this._focusableElementsSelector;\n  }\n  \n  /**\n   Caution: the selector doesn't verify if elements are visible.\n   \n   @type {String}\n   @readonly\n   @see https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute\n   */\n  get TABBABLE_ELEMENT_SELECTOR() {\n    return this._tabbableElementsSelector;\n  }\n}\n\n/**\n Called when a property already exists on the destination object.\n \n @typedef {function} CommonsHandleCollision\n \n @param {*} oldValue\n The value currently present on the destination object.\n @param {*} newValue\n The value on the destination object.\n @param {*} prop\n The property that collided.\n @param {*} dest\n The destination object.\n @param {*} source\n The source object.\n \n @returns {*} The value to use. If <code>undefined</code>, the old value will be used.\n */\n\n\n/**\n Execute the callback once a CSS transition has ended.\n \n @typedef {function} CommonsTransitionEndCallback\n \n @param event\n The event passed to the callback.\n @param {HTMLElement} event.target\n The DOM element that was affected by the CSS transition.\n @param {Boolean} event.cssTransitionSupported\n Whether CSS transitions are supported by the browser.\n @param {Boolean} event.transitionStoppedByTimeout\n Whether the CSS transition has been ended by a timeout (should only happen as a fallback).\n */\n\n/**\n Execute the callback once a component and sub-components are ready. See {@link Commons.ready}.\n \n @typedef {function} CommonsReadyCallback\n @param {HTMLElement} element\n The element that is ready.\n */\n\n/**\n A functional mixin.\n \n @typedef {Object} CoralMixin\n \n @deprecated\n @private\n \n @param {Object} target\n The target prototype or instance to apply the mixin to.\n @param {Object} options\n Options for this mixin.\n @param {Coral~PropertyDescriptor.properties} options.properties\n The properties object as passed to <code>Coral.register</code>. This can be modified in place.\n */\n\n/**\n A utility belt.\n \n @type {Commons}\n */\nconst commons = new Commons();\n\nexport default commons;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {Vent} from '../../../coralui-externals';\n\n/**\n Events helper.\n */\nclass Events {\n  /**\n   @param {HTMLElement|String} elementOrSelector\n   The element or selector indicating the element to use as the delegation root.\n   */\n  constructor(elementOrSelector) {\n    this._vent = new Vent(elementOrSelector);\n  }\n  \n  /**\n   Add an event listener.\n  \n   @param {String} eventName\n   The event name to listen for, including optional namespace(s).\n   @param {String} [selector]\n   The selector to use for event delegation.\n   @param {Function} handler\n   The function that will be called when the event is fired.\n   @param {Boolean} [useCapture]\n   Whether or not to listen during the capturing or bubbling phase.\n   @returns {Events} this, chainable.\n   */\n  on(eventName, selector, handler, useCapture) {\n    this._vent.on(eventName, selector, handler, useCapture);\n    return this;\n  }\n  \n  /**\n   Remove an event listener.\n   \n   @param {String} [eventName]\n   The event name to stop listening for, including optional namespace(s).\n   @param {String} [selector]\n   The selector that was used for event delegation.\n   @param {Function} [handler]\n   The function that was passed to <code>on()</code>.\n   @param {Boolean} [useCapture]\n   Only remove listeners with <code>useCapture</code> set to the value passed in.\n   @returns {Event} this, chainable.\n   */\n  off(eventName, selector, handler, useCapture) {\n    this._vent.off(eventName, selector, handler, useCapture);\n    return this;\n  }\n  \n  /**\n   Dispatch a custom event at the root element.\n   \n   @param {String} eventName\n   The name of the event to dispatch.\n   @param {Object} [options]\n   CustomEvent options.\n   @param {Object} [options.bubbles=true]\n   Whether the event should bubble.\n   @param {Object} [options.cancelable=true]\n   Whether the event should be cancelable.\n   @param {Object} [options.detail]\n   Data to pass to handlers as <code>event.detail</code>\n   @returns {CustomEvent} dispatched event.\n   */\n  dispatch(eventName, options) {\n    return this._vent.dispatch(eventName, options);\n  }\n  \n  /**\n   Destroy this instance, removing all events and references.\n   */\n  destroy() {\n    this._vent.destroy();\n  }\n}\n\n/**\n An enhanced event helper.\n \n @type {Events}\n */\nconst events = new Events(window);\n\nexport default events;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n Enumeration for {@link i18n} locales.\n \n @typedef {Object} I18nLocalesEnum\n \n @property {String} en\n English (U.S.)\n @property {String} en-us\n English (U.S.)\n @property {String} cs\n Czech (Czechia)\n @property {String} cs-cz\n Czech (Czechia)\n @property {String} da\n Danish (Denmark)\n @property {String} da-dk\n Danish (Denmark)\n @property {String} de\n German (Germany)\n @property {String} de-de\n German (Germany)\n @property {String} es\n Spanish (Spain)\n @property {String} es-es\n Spanish (Spain)\n @property {String} fi\n Finnish (Finland)\n @property {String} fi-fi\n Finnish (Finland)\n @property {String} fr\n French (France)\n @property {String} fr-fr\n French (France)\n @property {String} it\n Italian (Italy)\n @property {String} it-it\n Italian (Italy)\n @property {String} ja\n Japanese (Japan)\n @property {String} ja-jp\n Japanese (Japan)\n @property {String} ko\n Korean (Korea)\n @property {String} ko-kr\n Korean (Korea)\n @property {String} nb\n Norwegian Bokmål (Norway)\n @property {String} nb-no\n Norwegian Bokmål (Norway)\n @property {String} nl\n Dutch (Netherlands)\n @property {String} nl-nl\n Dutch (Netherlands)\n @property {String} pl\n Polish (Poland)\n @property {String} pl-pl\n Polish (Poland)\n @property {String} pt\n Portuguese (Brazil)\n @property {String} pt-br\n Portuguese (Brazil)\n @property {String} ru\n Russian (Russia)\n @property {String} ru-ru\n Russian (Russia)\n @property {String} sv\n Swedish (Sweden)\n @property {String} sv-se\n Swedish (Sweden)\n @property {String} tr\n Turkish (Turkey)\n @property {String} tr-tr\n Turkish (Turkey)\n @property {String} zh-cn\n Simplified Chinese\n @property {String} zh-hans-cn\n Simplified Chinese\n @property {String} zh-hans\n Simplified Chinese\n @property {String} zh-tw\n Traditional Chinese\n @property {String} zh-hant-tw\n Traditional Chinese\n @property {String} zh-hant\n Traditional Chinese\n */\nconst locales = {\n  'en': 'en-US',\n  'en-us': 'en-US',\n  'cs': 'cs-CZ',\n  'cs-cz': 'cs-CZ',\n  'da': 'da-DK',\n  'da-dk': 'da-DK',\n  'de': 'de-DE',\n  'de-de': 'de-DE',\n  'es': 'es-ES',\n  'es-es': 'es-ES',\n  'fi': 'fi-FI',\n  'fi-fi': 'fi-FI',\n  'fr': 'fr-FR',\n  'fr-fr': 'fr-FR',\n  'it': 'it-IT',\n  'it-it': 'it-IT',\n  'ja': 'ja-JP',\n  'ja-jp': 'ja-JP',\n  'ko': 'ko-KR',\n  'ko-kr': 'ko-KR',\n  'nb': 'nb-NO',\n  'nb-no': 'nb-NO',\n  'nl': 'nl-NL',\n  'pl': 'pl-PL',\n  'pl-pl': 'pl-PL',\n  'nl-nl': 'nl-NL',\n  'pt': 'pt-BR',\n  'pt-br': 'pt-BR',\n  'ru': 'ru-RU',\n  'ru-ru': 'ru-RU',\n  'sv': 'sv-SE',\n  'sv-se': 'sv-SE',\n  'tr': 'tr-TR',\n  'tr-tr': 'tr-TR',\n  'zh-cn': 'zh-CN',\n  'zh-hans-cn': 'zh-CN',\n  'zh-hans': 'zh-CN',\n  'zh-tw': 'zh-TW',\n  'zh-hant-tw': 'zh-TW',\n  'zh-hant': 'zh-TW'\n};\n\n/**\n Used to store i18n strings.\n \n @type {Object}\n @property {String} strings.generic\n */\nconst strings = {\n  generic: {}\n};\n\n/**\n I18n service to get/set localized strings.\n */\nclass I18nProvider {\n  /**\n   @param {Object} [options]\n   Options for this combo handler.\n   @param {String} [options.locale]\n   The <code>locale</code> property defines the locale of the I18nProvider.\n   */\n  constructor(options) {\n    options = options || {};\n  \n    // Default locale\n    this._locale = 'en-US';\n    \n    if (options.locale) {\n      this._locale = options.locale;\n    }\n    \n    this._evaluate = /(\\{.+?\\})/g;\n  }\n  \n  /**\n   Sets a localized string.\n   \n   @param {String} key the key to set\n   @param {String} value the value associated with the given key.\n   @example\n   Coral.i18n.set('English string', 'Translated string');\n   Coral.i18n.set('English string: {0}', 'Translated string: {0}');\n   Coral.i18n.set('English string: {0}, {1}, and {2}', 'Translated string: {2}, {0}, and {1}');\n   Coral.i18n.set('English string: {name}', 'Translated string: {name}');\n   Coral.i18n.set('English string: {name1}, {name2}, and {name3}', 'Translated string: {name3}, {name1}, and {name2}');\n   */\n  \n  /**\n   Sets multiple localized strings.\n   \n   @param {Array<String, String>} map  a key-value map to add to the strings dictionary.\n   @example\n   Coral.i18n.set([\n   ['English string 1', 'Translated string 1'],\n   ['English string 2', 'Translated string 2'],\n   ['English string 1 with {0} items','Translated string 1 with {0} items'],\n   ['English string 2 with {0} items','Translated string 2 with {0} items'],\n   ['English string 1: {0}, {1}, and {2}','Translated string 1: {2}, {0}, and {1}'],\n   ['English string 2: {0}, {1}, and {2}','Translated string 2: {2}, {0}, and {1}'],\n   ['English string 1: {name}', 'Translated string 1: {name}'],\n   ['English string 2: {name}', 'Translated string 2: {name}'],\n   ['English string 1: {name1}, {name2}, and {name3}', 'Translated string 1: {name3}, {name1}, and {name2}'],\n   ['English string 2: {name1}, {name2}, and {name3}', 'Translated string 2: {name3}, {name1}, and {name2}']\n   ]);\n   */\n  \n  /**\n   Sets a localized string, using translation hint.\n   \n   @param {String} key the key to set\n   @param {String} value the value associated with the given key.\n   @param {String} translation_hint the translation hint associated with the given key.\n   @example\n   Coral.i18n.set('English string', 'Translated string 1', 'Translation hint 1');\n   Coral.i18n.set('English string', 'Translated string 2', 'Translation hint 2');\n   Coral.i18n.set('English string with {0} items' , 'Translated string 1 with {0} items', 'Translation hint 1');\n   Coral.i18n.set('English string with {0} items' , 'Translated string 2 with {0} items', 'Translation hint 2');\n   Coral.i18n.set('English string: {0}, {1}, and {2}', 'Translated string 1: {2}, {0}, and {1}', 'Translation hint 1');\n   Coral.i18n.set('English string: {0}, {1}, and {2}', 'Translated string 2: {2}, {0}, and {1}', 'Translation hint 2');\n   Coral.i18n.set('English string: {name}', 'Translated string 1: {name}', 'Translation hint 1');\n   Coral.i18n.set('English string: {name}', 'Translated string 2: {name}', 'Translation hint 2');\n   Coral.i18n.set('English string: {name1}, {name2}, and {name3}', 'Translated string 1: {name3}, {name1}, and {name2}', 'Translation hint 1');\n   Coral.i18n.set('English string: {name1}, {name2}, and {name3}', 'Translated string 2: {name3}, {name1}, and {name2}', 'Translation hint 2');\n   */\n  \n  /**\n   Sets multiple localized strings, using translation hints.\n   \n   @param {Array<String, String, String>} map\n   A key-value object map to add to the strings dictionary.\n   @example\n   Coral.i18n.set([\n   ['English string', 'Translated string 1', 'Translation hint 1'],\n   ['English string', 'Translated string 2', 'Translation hint 2'],\n   ['English string with {0} items', 'Translated string 1 with {0} items', 'Translation hint 1'],\n   ['English string with {0} items', 'Translated string 2 with {0} items', 'Translation hint 2'],\n   ['English string with {0}, {1} and {2} items', 'Translated string 1 with {0}, {1} and {2} items', 'Translation hint 1'],\n   ['English string with {0}, {1} and {2} items', 'Translated string 2 with {0}, {1} and {2} items', 'Translation hint 2'],\n   ['English string: {name}', 'Translated string 1: {name}', 'Translation hint 1'],\n   ['English string: {name}', 'Translated string 2: {name}', 'Translation hint 2'],\n   ['English string: {name1}, {name2}, and {name3}', 'Translated string 1: {name3}, {name1}, and {name2}', 'Translation hint 1'],\n   ['English string: {name1}, {name2}, and {name3}', 'Translated string 2: {name3}, {name1}, and {name2}', 'Translation hint 2']\n   ]);\n   */\n  // eslint-disable-next-line func-names\n  set(...args) {\n    strings.generic[this._locale] = strings.generic[this._locale] || {};\n    \n    let key, value, translationHint;\n    if (args.length === 0) {\n      // Return empty string if called without arguments\n      return '';\n    }\n    else if (args.length === 1) {\n      if (!args[0]) {\n        throw new Error('Coral.i18n.set: Single argument must be an array of arrays of key/value/(translation hint).');\n      }\n      // multiple keys\n      else if (typeof args[0] === 'object' && typeof args[0][0] === 'object') {\n        for (let i = 0; i < args[0].length; i++) {\n          key = args[0][i][0];\n          value = args[0][i][1];\n          translationHint = args[0][i][2];\n          \n          if (translationHint) {\n            key = `${key}/[translation hint:${translationHint.replace(/&period;/g, '.')}]`;\n          }\n          strings.generic[this._locale][key] = value;\n        }\n      }\n      else {\n        throw new Error('Coral.i18n.set: Single argument must be an array of key-value pairs.');\n      }\n    }\n    // single key, no translation hint\n    else if (args.length === 2) {\n      if (typeof args[0] === 'string' && !!args[0] && typeof args[1] === 'string' && !!args[1]) {\n        key = args[0];\n        value = args[1];\n        strings.generic[this._locale][key] = value;\n      }\n      else {\n        throw new Error('Coral.i18n.set: Both arguments must be non-empty string values.');\n      }\n    }\n    // single key, with translation hint\n    else if (args.length === 3) {\n      if (typeof args[0] === 'string' && typeof args[1] === 'string' && typeof args[2] === 'string') {\n        key = args[0];\n        value = args[1];\n        translationHint = args[2];\n        \n        if (translationHint !== 'null') {\n          key = `${key}/[translation hint:${translationHint.replace(/&period;/g, '.')}]`;\n        }\n        \n        strings.generic[this._locale][key] = value;\n      }\n      else {\n        throw new Error('Coral.i18n.set: All arguments must be of string type.');\n      }\n    }\n    else {\n      throw new Error('Coral.i18n.set: Too many arguments provided.');\n    }\n    \n    return this;\n  }\n  \n  /**\n   Gets a localized string, using named arguments, and translation hint.\n   \n   @param {String} key the key of the string to retrieve\n   @param {Object} args one more named arguments\n   @param {String} translation_hint context information for translators\n   @returns {String} the localized string with arguments\n   @example\n   Coral.i18n.get('English string: {name}', { name: 'foo' }, 'Translation hint 1'); // => 'Translated string 1: foo'\n   Coral.i18n.get('English string: {name}', { name: 'foo' }, 'Translation hint 2'); // => 'Translated string 2: foo'\n   Coral.i18n.get('English string: {name1}, {name2}, and {name3}', { name1: 'foo', name2: 'bar', name3: 'qux' }, 'Translation hint 1'); // => 'Translated string 1: qux, foo, and bar'\n   Coral.i18n.get('English string: {name1}, {name2}, and {name3}', { name1: 'foo', name2: 'bar', name3: 'qux' }, 'Translation hint 2'); // => 'Translated string 2: qux, foo, and bar'\n   */\n  \n  /**\n   Gets a localized string, using arguments, and translation hint.\n   \n   @param {String} key the key of the string to retrieve\n   @param {String} args one more arguments\n   @param {String} translation_hint context information for translators\n   @returns {String} the localized string with arguments\n   @example\n   Coral.i18n.get('English string: {0}', 10, 'Translation hint 1'); // => 'Translated string 1: 10')\n   Coral.i18n.get('English string: {0}', 10, 'Translation hint 2'); // => 'Translated string 2: 10')\n   Coral.i18n.get('English string: {0}, {1}, and {2}', 10, 20, 30, 'Translation hint 1'); // => 'Translated string 1: 30, 10, and 20'\n   Coral.i18n.get('English string: {0}, {1}, and {2}', 10, 20, 30, 'Translation hint 2'); // => 'Translated string 2: 30, 10, and 20'\n   */\n  \n  /**\n   Gets a localized string, using translation hint.\n   \n   @param {String} key the key of the string to retrieve\n   @param {String} translation_hint context information for translators\n   @returns {String} the localized string\n   @example\n   Coral.i18n.get('English string', 'Translation hint 1'); // => 'Translated string 1'\n   Coral.i18n.get('English string', 'Translation hint 2'); // => 'Translated string 2'\n   */\n  \n  /**\n   Gets a localized string, using named arguments.\n   \n   @param {String} key the key of the string to retrieve\n   @param {Object} args one more named arguments\n   @returns {String} the localized string with arguments\n   @example\n   Coral.i18n.get('English string: {name}', { name: 'foo' }); // => 'Translated string: foo'\n   Coral.i18n.get('English string: {name1}, {name2}, and {name3}', { name1: 'foo', name2: 'bar', name3: 'qux' }); // => 'Translated string: qux, foo, and bar'\n   */\n  \n  /**\n   Gets a localized string, using arguments.\n   \n   @param {String} key the key of the string to retrieve\n   @param {String} args one more arguments\n   @returns {String} the localized string with arguments\n   @example\n   Coral.i18n.get('English string: {0}', 10); // => 'Translated string: 10'\n   Coral.i18n.get('English string: {0}, {1}, and {2}', 10, 20, 30); // => 'Translated string: 30, 10, and 20'\n   */\n  /**\n   Gets a localized string.\n   \n   @param {String} key the key of the string to retrieve\n   @returns {String} the localized string\n   @example\n   Coral.i18n.get('English string'); // => 'Translated String'\n   */\n  // eslint-disable-next-line func-names\n  get(...args) {\n    if (args.length === 0) {\n      // Return empty string if called without arguments\n      return '';\n    }\n    \n    // The first argument is always the key\n    // Aladdin server stores periods in keys as HTML entities, so we need to match this\n    let key = args[0].replace('.', '&period;');\n    \n    // The number of required variables can be determined by parsing the string\n    const placeholderMatches = key.match(this._evaluate);\n    const variablePlaceholderCount = placeholderMatches ? placeholderMatches.length : 0;\n    \n    // The hint we'll use to translate\n    let translationHint = '';\n    \n    let variables = {};\n    let variableCount = 0;\n    let i;\n    \n    // Verify the number of provided arguments matches the placeholder count\n    if (args[1] !== null && typeof args[1] === 'object') {\n      variables = args[1];\n      \n      // Check if provided variables object is complete\n      let placeholderName = '';\n      for (i = 0; i < placeholderMatches.length; i++) {\n        placeholderName = placeholderMatches[i].slice(1).slice(0, -1);\n        if (variables[placeholderName] === null || typeof variables[placeholderName] === 'undefined') {\n          throw new Error(`Coral.i18n.get: Named key \"${placeholderName}\" not present in provided object.`);\n        }\n      }\n      \n      // If an additional argument is present, it's the translation hint\n      if (typeof args[2] === 'string') {\n        translationHint = args[2];\n      }\n    }\n    else {\n      // Assume no translation hint\n      variableCount = args.length - 1;\n      \n      if (variableCount === variablePlaceholderCount + 1) {\n        // If we've got an extra argument, assume it's a translation hint\n        translationHint = args[args.length - 1];\n      }\n      else if (variableCount !== variablePlaceholderCount) {\n        throw new Error(`Coral.i18n.get: Number of variable placeholders (${variablePlaceholderCount}) does not match number of variables (${variableCount}).`);\n      }\n      \n      // Build variables object\n      for (i = 0; i < variableCount; i++) {\n        variables[i] = args[i + 1];\n      }\n    }\n    \n    // Include translation hint\n    if (translationHint) {\n      key = `${key}/[translation hint:${translationHint}]`;\n    }\n    \n    // Fetch the string\n    let str = key;\n    for (const component in strings) {\n      if (typeof strings[component] !== 'undefined' &&\n        typeof strings[component][this._locale] !== 'undefined') {\n        str = strings[component][this._locale][key] || str;\n      }\n    }\n    \n    // Optimization for a string with no placeholder\n    // e.g. Coral.i18n.get('English string');\n    if (variablePlaceholderCount === 0) {\n      return str;\n    }\n    \n    // Replace all variables\n    return str.replace(this._evaluate, (name) => {\n      name = name.slice(1).slice(0, -1);\n      return variables[name];\n    });\n    \n    // @todo use .toLocaleString(Coral.i18n.locale) in a future release\n  }\n  \n  /**\n   I18n current locale value. See {@link I18nLocalesEnum}.\n   @type {String}\n   */\n  get locale() {\n    return this._locale;\n  }\n  set locale(newLocale) {\n    this._locale = newLocale;\n  }\n}\n\n// sets default locale, based on document lang attribute, if it exists, or en-US otherwise\nconst docLang = document.documentElement.lang.toLowerCase();\nconst locale = locales[docLang] || 'en-US';\n\n/**\n An i18n service.\n \n @type {I18nProvider}\n */\nconst i18n = new I18nProvider({locale});\n\nexport {i18n, strings};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport ResizeObserver from './ResizeObserver';\nimport {Promise} from '../../../coralui-externals';\n\n// Used for unique IDs\nlet nextID = 0;\n\n// Remove namespace from global options\nconst cleanOption = (name) => {\n  name = name.replace('coral', '');\n  return name.charAt(0).toLowerCase() + name.slice(1);\n};\n\n// Threshold time in milliseconds that the setTimeout will wait for the transitionEnd event to be triggered.\nconst TRANSITION_DURATION_THRESHOLD = 100;\n\n// Based on jQuery's :focusable selector\nconst FOCUSABLE_ELEMENTS = [\n  'input:not([disabled])',\n  'select:not([disabled])',\n  'textarea:not([disabled])',\n  'button:not([disabled])',\n  'a[href]',\n  'area[href]',\n  'summary',\n  'iframe',\n  'object',\n  'embed',\n  'audio[controls]',\n  'video[controls]',\n  '[contenteditable]'\n];\n\n// @polyfill IE11\n// Content zone names to support Coral.commons.ready + lightweight tags\nconst contentZoneNames = [\n  'label',\n  'content',\n  'propertylist',\n  'asset',\n  'info',\n  'overlay',\n  'thumbnail',\n  'separator',\n  'value',\n  'header',\n  'footer',\n  'name',\n  'subheading'\n];\n\n// @polyfill IE11\nconst isIE = navigator.userAgent.match(/Trident/) || navigator.userAgent.match(/Edge/);\n\n/**\n Converts CSS time to milliseconds. It supports both s and ms units. If the provided value has an unrecogenized unit,\n zero will be returned.\n \n @private\n @param {String} time\n The time string to convert to milliseconds.\n @returns {Number} the time in milliseconds.\n */\nfunction cssTimeToMilliseconds(time) {\n  const num = parseFloat(time, 10);\n  let unit = time.match(/m?s/);\n  \n  if (unit) {\n    unit = unit[0];\n  }\n  \n  if (unit === 's') {\n    return num * 1000;\n  }\n  else if (unit === 'ms') {\n    return num;\n  }\n  \n  // unrecognized unit, so we return 0\n  return 0;\n}\n\n/**\n @private\n \n @param first\n @param second\n @return {Function}\n */\nfunction returnFirst(first, second) {\n  // eslint-disable-next-line func-names\n  return function(...args) {\n    const ret = first.apply(this, args);\n    second.apply(this, args);\n    return ret;\n  };\n}\n\n/**\n Check if the provided object is a function\n \n @ignore\n \n @param {*} object\n The object to test\n \n @returns {Boolean} Whether the provided object is a function.\n */\nfunction isFunction(object) {\n  return typeof object === 'function';\n}\n\n/**\n Check if the provided object is a function\n \n @ignore\n @polyfill IE11\n \n @param {String} name\n The node name to validate\n \n @returns {Boolean} Whether the content zone should be validated against Coral.commons.ready\n */\nfunction isHTMLUnknownElementIE(name) {\n  if (isIE) {\n    const names = name.split('-');\n    return names.length > 2 && contentZoneNames.indexOf(names.pop()) === -1;\n  }\n  \n  return false;\n}\n\n/**\n Utility belt.\n */\nclass Commons {\n  /** @ignore */\n  constructor() {\n    this._resizeEvent = new ResizeObserver();\n    \n    const focusableElements = FOCUSABLE_ELEMENTS.slice();\n    this._focusableElementsSelector = focusableElements.join(',');\n  \n    focusableElements.push('[tabindex]:not([tabindex=\"-1\"])');\n    this._tabbableElementsSelector = focusableElements.join(':not([tabindex=\"-1\"]),');\n  \n    const scripts = document.getElementsByTagName('script');\n    this._script = scripts[scripts.length - 1];\n  }\n  \n  /**\n   Returns Coral global options retrieved on the <code><script></code> data attributes including:\n   - <code>[data-coral-icons]</code>: source folder of the SVG icons. If the icons are renamed, you'll have to load them\n   manually using {@link Icon.load}.\n   - <code>[data-coral-typekit]</code>: custom typekit id used to load the fonts.\n   \n   @returns {Object}\n   The global options object.\n   */\n  get options() {\n    const options = {};\n    const props = this._script.dataset;\n    for (const key in props) {\n      // Detect Coral namespaced options\n      if (key.indexOf('coral') === 0) {\n        options[cleanOption(key)] = props[key];\n      }\n    }\n    \n    return options;\n  }\n  \n  /**\n   Copy the properties from all provided objects into the first object.\n   \n   @param {Object} dest\n   The object to copy properties to\n   @param {...Object} source\n   An object to copy properties from. Additional objects can be passed as subsequent arguments.\n   \n   @returns {Object}\n   The destination object, <code>dest</code>\n   */\n  extend(...args) {\n    const dest = args[0];\n    for (let i = 1, ni = args.length; i < ni; i++) {\n      const source = args[i];\n      for (const prop in source) {\n        dest[prop] = source[prop];\n      }\n    }\n    return dest;\n  }\n  \n  /**\n   Copy the properties from the source object to the destination object, but calls the callback if the property is\n   already present on the destination object.\n   \n   @param {Object} dest\n   The object to copy properties to\n   @param {...Object} source\n   An object to copy properties from. Additional objects can be passed as subsequent arguments.\n   @param {CommonsHandleCollision} [handleCollision]\n   Called if the property being copied is already present on the destination.\n   The return value will be used as the property value.\n   \n   @returns {Object}\n   The destination object, <code>dest</code>\n   */\n  augment(...args) {\n    const dest = args[0];\n    let handleCollision;\n    let argCount = args.length;\n    const lastArg = args[argCount - 1];\n    \n    if (typeof lastArg === 'function') {\n      handleCollision = lastArg;\n      \n      // Don't attempt to augment using the last argument\n      argCount--;\n    }\n    \n    for (let i = 1; i < argCount; i++) {\n      const source = args[i];\n      \n      for (const prop in source) {\n        if (typeof dest[prop] !== 'undefined') {\n          if (typeof handleCollision === 'function') {\n            // Call the handleCollision callback if the property is already present\n            const ret = handleCollision(dest[prop], source[prop], prop, dest, source);\n            if (typeof ret !== 'undefined') {\n              dest[prop] = ret;\n            }\n          }\n          // Otherwise, do nothing\n        }\n        else {\n          dest[prop] = source[prop];\n        }\n      }\n    }\n    \n    return dest;\n  }\n  \n  /**\n   Return a new object with the swapped keys and values of the provided object.\n   \n   @param {Object} obj\n   The object to copy.\n   \n   @returns {Object}\n   An object with its keys as the values and values as the keys of the source object.\n   */\n  swapKeysAndValues(obj) {\n    const map = {};\n    for (const key in obj) {\n      map[obj[key]] = key;\n    }\n    return map;\n  }\n  \n  /**\n   Execute the provided callback on the next animation frame.\n   @function\n   @param {Function} onNextFrame\n   The callback to execute.\n   @deprecated\n   */\n  nextFrame(onNextFrame) {\n    console.warn('Coral.commons.nextFrame has been deprecated. Please use window.requestAnimationFrame instead.');\n    \n    return window.requestAnimationFrame(() => {\n      if (typeof onNextFrame === 'function') {\n        onNextFrame();\n      }\n    });\n  }\n  \n  /**\n   Execute the provided callback once a CSS transition has ended. This method listens for the next transitionEnd event\n   on the given DOM element. In case the provided element does not have a transition defined, the callback will be\n   called in the next macrotask to allow a normal application execution flow. It cannot be used to listen continuously\n   on transitionEnd events.\n   @param {HTMLElement} element\n   The DOM element that is affected by the CSS transition.\n   @param {CommonsTransitionEndCallback} onTransitionEndCallback\n   The callback to execute.\n   */\n  transitionEnd(element, onTransitionEndCallback) {\n    let propertyName;\n    let hasTransitionEnded = false;\n    let transitionEndEventName = null;\n    const transitions = {\n      transition: 'transitionend',\n      WebkitTransition: 'webkitTransitionEnd',\n      MozTransition: 'transitionend',\n      MSTransition: 'msTransitionEnd'\n    };\n    \n    let transitionEndTimeout = null;\n    const onTransitionEnd = (event) => {\n      const transitionStoppedByTimeout = typeof event === 'undefined';\n      \n      if (!hasTransitionEnded) {\n        hasTransitionEnded = true;\n        \n        clearTimeout(transitionEndTimeout);\n        \n        // Remove event listener (if any was used by the current browser)\n        element.removeEventListener(transitionEndEventName, onTransitionEnd);\n        \n        // Call callback with specified element\n        onTransitionEndCallback({\n          target: element,\n          cssTransitionSupported: true,\n          transitionStoppedByTimeout: transitionStoppedByTimeout\n        });\n      }\n    };\n    \n    // Find transitionEnd event name used by browser\n    for (propertyName in transitions) {\n      if (element.style[propertyName] !== undefined) {\n        transitionEndEventName = transitions[propertyName];\n        break;\n      }\n    }\n    \n    if (transitionEndEventName !== null) {\n      let timeoutDelay = 0;\n      // Gets the animation time (in milliseconds) using the computed style\n      const transitionDuration = cssTimeToMilliseconds(window.getComputedStyle(element).transitionDuration);\n      \n      // We only setup the event listener if there is a valid transition\n      if (transitionDuration !== 0) {\n        // Register on transitionEnd event\n        element.addEventListener(transitionEndEventName, onTransitionEnd);\n        \n        // As a fallback we use the transitionDuration plus a threshold. This can happen in IE10/11 where\n        // transitionEnd events are sometimes skipped\n        timeoutDelay = transitionDuration + TRANSITION_DURATION_THRESHOLD;\n      }\n      \n      // Fallback in case the event does not trigger (IE10/11) or if the element does not have a valid transition\n      transitionEndTimeout = window.setTimeout(onTransitionEnd, timeoutDelay);\n    }\n  }\n  \n  /**\n   Checks if Coral components and all nested Coral components are defined as Custom Elements.\n   \n   @param {HTMLElement} element\n   The element that should be watched.\n   @param {CommonsReadyCallback} onDefined\n   The callback to call when all components are ready.\n   \n   @see https://developer.mozilla.org/en-US/docs/Web/Web_Components/Custom_Elements\n   */\n  ready(element, onDefined) {\n    let root = element;\n    \n    if (typeof element === 'function') {\n      onDefined = element;\n      root = document.body;\n    }\n    \n    if (!root) {\n      root = document.body;\n    }\n    \n    if (!(root instanceof HTMLElement)) {\n      console.warn('Coral.commons.ready: passed element was not an HTMLElement.');\n      // commons.ready should not be blocking by default\n      onDefined(root);\n      return;\n    }\n    \n    // @todo use ':not(:defined)' once supported to detect coral not yet defined custom elements\n    const elements = root.querySelectorAll('*');\n    \n    // Holds promises that resolve when the elements is defined\n    const promises = [];\n  \n    // Holds node names that require validation\n    const nodeNames = [];\n    \n    // Finds the custom elements name and adds it to the promises\n    const addName = function(el) {\n      let name = el.nodeName.toLowerCase();\n      \n      // Check nodename\n      if (name.indexOf('coral') === 0 && el instanceof HTMLUnknownElement && isHTMLUnknownElementIE(name) && nodeNames.indexOf(name) === -1) {\n        nodeNames.push(name);\n        promises.push(window.customElements.whenDefined(name));\n      }\n      else {\n        // Fallback to is attribute\n        name = String(el.getAttribute('is')).toLowerCase();\n        \n        if (name.indexOf('coral') === 0 && el instanceof HTMLUnknownElement && isHTMLUnknownElementIE(name) && nodeNames.indexOf(name) === -1) {\n          nodeNames.push(name);\n          promises.push(window.customElements.whenDefined(name));\n        }\n      }\n    };\n    \n    // Don't forget to check root\n    addName(root);\n    \n    // Check all descending elements\n    for (let i = 0; i < elements.length; i++) {\n      addName(elements[i]);\n    }\n    \n    // Call callback once all defined\n    if (promises.length) {\n      Promise.all(promises)\n        .then(() => {\n          onDefined(element instanceof HTMLElement && element || window);\n        })\n        .catch((err) => {\n          console.error(err);\n        });\n    }\n    else {\n      // Call callback by default if all defined already\n      onDefined(element instanceof HTMLElement && element || window);\n    }\n  }\n  \n  \n  /**\n   Assign an object given a nested path\n   \n   @param {Object} root\n   The root object on which the path should be traversed.\n   @param {String} path\n   The path at which the object should be assignment.\n   @param {String} obj\n   The object to assign at path.\n   \n   @throws Will throw an error if the path is not present on the object.\n   */\n  setSubProperty(root, path, obj) {\n    const nsParts = path.split('.');\n    let curObj = root;\n    \n    if (nsParts.length === 1) {\n      // Assign immediately\n      curObj[path] = obj;\n      return;\n    }\n    \n    // Make sure we can assign at the requested location\n    while (nsParts.length > 1) {\n      const part = nsParts.shift();\n      if (curObj[part]) {\n        curObj = curObj[part];\n      }\n      else {\n        throw new Error(`Coral.commons.setSubProperty: could not set ${path}, part ${part} not found`);\n      }\n    }\n    \n    // Do the actual assignment\n    curObj[nsParts.shift()] = obj;\n  }\n  \n  \n  /**\n   Get the value of the property at the given nested path.\n   \n   @param {Object} root\n   The root object on which the path should be traversed.\n   @param {String} path\n   The path of the sub-property to return.\n   \n   @returns {*}\n   The value of the provided property.\n   \n   @throws Will throw an error if the path is not present on the object.\n   */\n  getSubProperty(root, path) {\n    const nsParts = path.split('.');\n    let curObj = root;\n    \n    if (nsParts.length === 1) {\n      // Return property immediately\n      return curObj[path];\n    }\n    \n    // Make sure we can assign at the requested location\n    while (nsParts.length) {\n      const part = nsParts.shift();\n      // The property might be undefined, and that's OK if it's the last part\n      if (nsParts.length === 0 || typeof curObj[part] !== 'undefined') {\n        curObj = curObj[part];\n      }\n      else {\n        throw new Error(`Coral.commons.getSubProperty: could not get ${path}, part ${part} not found`);\n      }\n    }\n    \n    return curObj;\n  }\n  \n  /**\n   Apply a mixin to the given object.\n \n   @deprecated\n   \n   @param {Object} target\n   The object to apply the mixin to.\n   @param {Object|Function} mixin\n   The mixin to apply.\n   @param {Object} options\n   An object to pass to functional mixins.\n   */\n  _applyMixin(target, mixin, options) {\n    const mixinType = typeof mixin;\n    \n    if (mixinType === 'function') {\n      mixin(target, options);\n    }\n    else if (mixinType === 'object' && mixin !== null) {\n      this.extend(target, mixin);\n    }\n    else {\n      throw new Error(`Coral.commons.mixin: Cannot mix in ${mixinType} to ${target.toString()}`);\n    }\n  }\n  \n  /**\n   Mix a set of mixins to a target object.\n \n   @deprecated\n   @private\n   \n   @param {Object} target\n   The target prototype or instance on which to apply mixins.\n   @param {Object|CoralMixin|Array<Object|CoralMixin>} mixins\n   A mixin or set of mixins to apply.\n   @param {Object} options\n   An object that will be passed to functional mixins as the second argument (options).\n   */\n  mixin(target, mixins, options) {\n    if (Array.isArray(mixins)) {\n      for (let i = 0; i < mixins.length; i++) {\n        this._applyMixin(target, mixins[i], options);\n      }\n    }\n    else {\n      this._applyMixin(target, mixins, options);\n    }\n  }\n  \n  /**\n   Get a unique ID.\n   \n   @returns {String} unique identifier.\n   */\n  getUID() {\n    return `coral-id-${nextID++}`;\n  }\n  \n  /**\n   Call all of the provided functions, in order, returning the return value of the specified function.\n   \n   @param {...Function} func\n   A function to call\n   @param {Number} [nth=0]\n   A zero-based index indicating the noth argument to return the value of.\n   If the nth argument is not a function, <code>null</code> will be returned.\n   \n   @returns {Function} The aggregate function.\n   */\n  callAll(...args) {\n    let nth = args[args.length - 1];\n    if (typeof nth !== 'number') {\n      nth = 0;\n    }\n    \n    // Get the function whose value we should return\n    let funcToReturn = args[nth];\n    \n    // Only use arguments that are functions\n    const functions = Array.prototype.filter.call(args, isFunction);\n    \n    if (functions.length === 2 && nth === 0) {\n      // Most common usecase: two valid functions passed\n      return returnFirst(functions[0], functions[1]);\n    }\n    else if (functions.length === 1) {\n      // Common usecase: one valid function passed\n      return functions[0];\n    }\n    else if (functions.length === 0) {\n      return () => {\n        // Fail case: no valid functions passed\n      };\n    }\n    \n    if (typeof funcToReturn !== 'function') {\n      // If the argument at the provided index wasn't a function, just return the value of the first valid function\n      funcToReturn = functions[0];\n    }\n    \n    // eslint-disable-next-line func-names\n    return function() {\n      let finalRet;\n      let ret;\n      let func;\n      \n      // Skip first arg\n      for (let i = 0; i < functions.length; i++) {\n        func = functions[i];\n        ret = func.apply(this, args);\n        \n        // Store return value of desired function\n        if (func === funcToReturn) {\n          finalRet = ret;\n        }\n      }\n      return finalRet;\n    };\n  }\n  \n  /**\n   Adds a resize listener to the given element.\n   \n   @param {HTMLElement} element\n   The element to add the resize event to.\n   @param {Function} onResize\n   The resize callback.\n   */\n  // eslint-disable-next-line func-names\n  addResizeListener(element, onResize) {\n    this._resizeEvent._addResizeListener(element, onResize);\n  }\n  \n  /**\n   Removes a resize listener from the given element.\n   \n   @param {HTMLElement} element\n   The element to remove the resize event from.\n   @param {Function} onResize\n   The resize callback.\n   */\n  // eslint-disable-next-line func-names\n  removeResizeListener(element, onResize) {\n    this._resizeEvent._removeResizeListener(element, onResize);\n  }\n  \n  /**\n   Caution: the selector doesn't verify if elements are visible.\n   \n   @type {String}\n   @readonly\n   @see https://www.w3.org/TR/html5/editing.html#focus-management\n   */\n  get FOCUSABLE_ELEMENT_SELECTOR() {\n    return this._focusableElementsSelector;\n  }\n  \n  /**\n   Caution: the selector doesn't verify if elements are visible.\n   \n   @type {String}\n   @readonly\n   @see https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute\n   */\n  get TABBABLE_ELEMENT_SELECTOR() {\n    return this._tabbableElementsSelector;\n  }\n}\n\n/**\n Called when a property already exists on the destination object.\n \n @typedef {function} CommonsHandleCollision\n \n @param {*} oldValue\n The value currently present on the destination object.\n @param {*} newValue\n The value on the destination object.\n @param {*} prop\n The property that collided.\n @param {*} dest\n The destination object.\n @param {*} source\n The source object.\n \n @returns {*} The value to use. If <code>undefined</code>, the old value will be used.\n */\n\n\n/**\n Execute the callback once a CSS transition has ended.\n \n @typedef {function} CommonsTransitionEndCallback\n \n @param event\n The event passed to the callback.\n @param {HTMLElement} event.target\n The DOM element that was affected by the CSS transition.\n @param {Boolean} event.cssTransitionSupported\n Whether CSS transitions are supported by the browser.\n @param {Boolean} event.transitionStoppedByTimeout\n Whether the CSS transition has been ended by a timeout (should only happen as a fallback).\n */\n\n/**\n Execute the callback once a component and sub-components are ready. See {@link Commons.ready}.\n \n @typedef {function} CommonsReadyCallback\n @param {HTMLElement} element\n The element that is ready.\n */\n\n/**\n A functional mixin.\n \n @typedef {Object} CoralMixin\n \n @deprecated\n @private\n \n @param {Object} target\n The target prototype or instance to apply the mixin to.\n @param {Object} options\n Options for this mixin.\n @param {Coral~PropertyDescriptor.properties} options.properties\n The properties object as passed to <code>Coral.register</code>. This can be modified in place.\n */\n\n/**\n A utility belt.\n \n @type {Commons}\n */\nconst commons = new Commons();\n\nexport default commons;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport commons from './commons';\n\n/**\n A map of modifier names to their corresponding keycodes.\n @ignore\n */\nconst modifierCodes = {\n  '⇧': 16,\n  'shift': 16,\n  '⌥': 18,\n  'alt': 18,\n  'option': 18,\n  '⌃': 17,\n  'ctrl': 17,\n  'control': 17,\n  '⌘': 91,\n  'cmd': 91,\n  'command': 91,\n  'meta': 91\n};\n\n/**\n Used to check if a key is a modifier.\n @ignore\n */\nconst modifierCodeMap = {\n  16: true,\n  17: true,\n  18: true,\n  91: true\n};\n\n/**\n A list of modifier event property names in sorted key code order. Used to add keycodes for modifiers.\n @ignore\n */\nconst modifierEventPropertyNames = [\n  'shiftKey',\n  'ctrlKey',\n  'altKey',\n  'metaKey'\n];\n\n/**\n A map of key codes to normalize. These are duplicate keys such as the number pad.\n @ignore\n */\nconst normalizedCodes = {\n  // Numpad 0-9\n  96: 48,\n  97: 49,\n  98: 50,\n  99: 51,\n  100: 52,\n  101: 53,\n  102: 54,\n  103: 55,\n  104: 56,\n  105: 57\n};\n\n// These keys are also implicitely used external\nconst specialKeyCodes = {\n  backspace: 8,\n  tab: 9,\n  return: 13, // real event key is \"enter\" this will be mapped internally\n  pause: 19,\n  capslock: 20,\n  esc: 27,\n  escape: 27,\n  space: 32, // real event key is \" \" this will be mapped internally\n  pageup: 33,\n  pagedown: 34,\n  end: 35,\n  home: 36,\n  left: 37, // real event key is \"arrowLeft\" this will be mapped internally\n  up: 38, // real event key is \"arrowUp\" this will be mapped internally\n  right: 39, // real event key is \"arrowRight\" this will be mapped internally\n  down: 40, // real event key is \"arrowDown\" this will be mapped internally\n  insert: 45,\n  del: 46,\n  delete: 46,\n  period: 190,\n  plus: 107,\n  minus: 189,\n  f1: 112,\n  f2: 113,\n  f3: 114,\n  f4: 115,\n  f5: 116,\n  f6: 117,\n  f7: 118,\n  f8: 119,\n  f9: 120,\n  f10: 121,\n  f11: 122,\n  f12: 123,\n  f13: 124,\n  f14: 125,\n  f15: 126,\n  f16: 127,\n  f17: 128,\n  f18: 129,\n  f19: 130,\n  numlock: 144,\n  scroll: 145\n};\n\n// Match a namespaced event, such as ctrl+r.myNS\nconst namespaceRE = /(.*?)(\\..+)$/;\n// Match a selector that requires context\nconst needsContextRE = /^[\\x20\\t\\r\\n\\f]*[>+~]/;\n\n/**\n The set of tags to ignore hot keys when focused within for the default filter.\n \n @ignore\n */\nconst restrictedTagNames = {\n  INPUT: true,\n  SELECT: true,\n  TEXTAREA: true\n};\n\n/**\n Normalize duplicate codes.\n @ignore\n */\nfunction normalizeCode(code) {\n  return normalizedCodes[code] || code;\n}\n\nfunction mapSpecialEventKeyToSpecialAPIDefinition(eventKey) {\n  // The official event.key is not compatible with this API special key registration, so map them\n  switch (eventKey) {\n    case 'enter':\n      return 'return';\n    case ' ':\n      return 'space';\n    case 'arrowup':\n      return 'up';\n    case 'arrowdown':\n      return 'down';\n    case 'arrowleft':\n      return 'left';\n    case 'arrowright':\n      return 'right';\n    default:\n      return eventKey;\n  }\n}\n\n/**\n Convert a key to its character code representation.\n \n @ignore\n \n @param key\n @return {*|Number}\n */\nfunction keyToCode(key) {\n  key = mapSpecialEventKeyToSpecialAPIDefinition(key.toLowerCase());\n  \n  // Map special string representations to their character code equivalent\n  const code = specialKeyCodes[key] || modifierCodes[key];\n  \n  if (!code && key.length > 1) {\n    throw new Error(`Coral.Keys: Key ${key} not recognized`);\n  }\n  \n  // Return the special code from the map or the char code repesenting the character\n  return code || key.toUpperCase().charCodeAt(0);\n}\n\nfunction cleanupFilteredListeners(keycombo, listeners, event) {\n  const result = [];\n  if (!listeners || !event.key || keycombo.indexOf('+') > 0) {\n    return listeners;\n  }\n  \n  // Check there is no registration conflict for same code registrations\n  // For example: \".\" keyCharCode is 46 and \"delete\" keyCode is also 46\n  const key = mapSpecialEventKeyToSpecialAPIDefinition(event.key.toLowerCase());\n  for (let i = 0; i < listeners.length; i++) {\n    if (listeners[i].originalString.indexOf(key) === 0 || key.indexOf(listeners[i].originalString) === 0) {\n      result.push(listeners[i]);\n    }\n  }\n  return result;\n}\n\n/**\n Handle key combination events.\n */\nclass Keys {\n  /**\n   @param {*} elOrSelector\n   The selector or element to listen for keyboard events on. This should be the common parent of all\n   elements you wish to listen for events on.\n   @param {Object} [options]\n   Options for this combo handler.\n   @param {Function} [options.context]\n   The desired value of the <code>this</code> keyword context when executing listeners. Defaults to the element on\n   which the event is listened for.\n   @param {Function} [options.preventDefault=false]\n   Whether to prevent the default behavior when a key combo is matched.\n   @param {Function} [options.stopPropagation=false]\n   Whether to stop propagation when a key combo is matched.\n   @param {Function} [options.filter]\n   The filter function for keyboard events. This can be used to stop events from being triggered when they originate\n   from specific elements. Defaults to {@link Keys.filterInputs}.\n   */\n  constructor(elOrSelector, options) {\n    options = options || {};\n  \n    if (typeof elOrSelector === 'undefined') {\n      throw new Error(`Coral.Keys: Cannot create a combo handler for ${elOrSelector}`);\n    }\n  \n    // Cache the element object\n    this._el = typeof elOrSelector === 'string' ? document.querySelector(elOrSelector) : elOrSelector;\n  \n    // Use provided context\n    this._context = options.context;\n  \n    /**\n     The filter function to use when evaluating keypresses\n     */\n    this._filter = options.filter || this.constructor.filterInputs;\n  \n    /**\n     Whether to prevent default\n     */\n    this._preventDefault = options.preventDefault || false;\n  \n    /**\n     Whether to stop propagation and prevent default\n     */\n    this._stopPropagation = options.stopPropagation || false;\n  \n    /**\n     A map of key code combinations to arrays of listener functions\n     */\n    this._keyListeners;\n  \n    /**\n     A an array of key sequences objects\n     */\n    this._keySequences;\n  \n    /**\n     The sorted array of currently pressed keycodes\n     */\n    this._currentKeys;\n  \n    /**\n     The joined string representation of currently pressed keycodes\n     */\n    this._currentKeyCombo;\n  \n    /**\n     The timeout that corresponds to sequences\n     */\n    this._sequenceTimeout;\n    \n    this._handleKeyDown = this._handleKeyDown.bind(this);\n    this._handleKeyUp = this._handleKeyUp.bind(this);\n    this._resetSequence = this._resetSequence.bind(this);\n    this.reset = this.reset.bind(this);\n    \n    // Initialize immediately\n    this.init();\n  }\n  \n  _resetSequence() {\n    window.clearTimeout(this._sequenceTimeout);\n    this._keySequences.forEach((sequence) => {\n      // Reset each sequence\n      sequence.currentPart = 0;\n    });\n  }\n  \n  _setCurrentKeyCombo(event) {\n    // Build string for modifiers\n    const currentModifiers = [];\n    for (let i = 0; i < modifierEventPropertyNames.length; i++) {\n      const propName = modifierEventPropertyNames[i];\n      \n      if (event[propName]) {\n        currentModifiers.push(modifierCodes[propName.slice(0, -3)]);\n      }\n    }\n    \n    // Store current key combo\n    this._currentKeyCombo = this._currentKeys.concat(currentModifiers).sort().join('+');\n  }\n  \n  /**\n   Reset the state of this instance. This resets the currently pressed keys.\n   \n   @function reset\n   \n   @returns {Keys} this, chainable.\n   */\n  reset() {\n    // Only reset variables related to currently pressed keys\n    // Don't mess with sequences\n    this._currentKeys = [];\n    this._currentKeyCombo = '';\n    \n    return this;\n  }\n  \n  _processSequences() {\n    const activeSequenceListeners = [];\n    \n    const self = this;\n    // Check each sequence's state\n    this._keySequences.forEach((sequence) => {\n      if (sequence.parts[sequence.currentPart] === self._currentKeyCombo) {\n        // If the current key combo in the sequence was pressed, increment the pointer\n        sequence.currentPart++;\n      }\n      else {\n        // Reset the sequence if a key was encountered out of sequence\n        sequence.currentPart = 0;\n      }\n      \n      if (sequence.currentPart === sequence.parts.length) {\n        // If we've reached the end of the sequence, add it to the list of active sequences\n        activeSequenceListeners.push(sequence);\n        \n        // Reset the sequence's state so it can be triggered again\n        sequence.currentPart = 0;\n      }\n    });\n    \n    return activeSequenceListeners;\n  }\n  \n  _executeListeners(event, keyup) {\n    // Don't do anything if we don't have any keys pressed\n    if (!this._currentKeyCombo) {\n      return;\n    }\n    \n    // Evaluate whether we should filter this keypress\n    if (!this._filter(event)) {\n      return;\n    }\n    \n    const target = event.target || event.srcElement;\n    const doc = Object.prototype.toString.call(event.currentTarget) === '[object Window]' ? event.currentTarget.document : event.currentTarget;\n    \n    let listeners = [];\n    \n    // Execute listeners associated with the current key combination\n    let comboListeners = this._keyListeners[this._currentKeyCombo];\n    comboListeners = cleanupFilteredListeners(this._currentKeyCombo, comboListeners, event);\n  \n    // If it is a combo key combination but we listen on the final key combination result or on special single char like \"/\"\n    // E.g. we listen on \"/\" but the user presses \"Shift+7\" on a german-swiss keyboard\n    // or we listen on \"/\" on the single key event on a US layout keyboard\n    if (!keyup && !comboListeners) {\n      if (event.key) {\n        comboListeners = this._keyListeners[event.key.charCodeAt(0)];\n        comboListeners = cleanupFilteredListeners(this._currentKeyCombo, comboListeners, event);\n      }\n    }\n    \n    let sequenceListeners;\n    if (!keyup) {\n      // Process sequences and get listeners associated with the current sequence\n      // Don't do this on keyup as this breaks sequences with modifiers\n      sequenceListeners = this._processSequences();\n    }\n    \n    if (comboListeners && comboListeners.length) {\n      listeners = listeners.concat(comboListeners);\n    }\n    \n    if (sequenceListeners && sequenceListeners.length) {\n      listeners = listeners.concat(sequenceListeners);\n    }\n    \n    if (listeners && listeners.length) {\n      for (let i = 0; i < listeners.length; i++) {\n        const listener = listeners[i];\n        \n        // Perform event delegation\n        if (listener.selector) {\n          let selector = '';\n          \n          // This allows us to match when the delegation selector includes context\n          if (listener.needsContext) {\n            doc.id = doc.id || commons.getUID();\n            selector = `#${doc.id} `;\n          }\n          \n          const matches = Array.prototype.indexOf.call(doc.querySelectorAll(selector + listener.selector), target) >= 0;\n          \n          // Skip if the originating element doesn't match the selector\n          if (!matches) {\n            continue;\n          }\n        }\n        \n        // Add data to event object\n        if (typeof listener.data !== undefined) {\n          event.data = listener.data;\n        }\n        \n        // Add matchedTarget\n        event.matchedTarget = target;\n        \n        // Add keys that triggered the event\n        event.keys = listener.originalString;\n        \n        listener.listener.call(this._context || doc, event);\n      }\n      \n      // Don't do the default thing\n      if (this._preventDefault) {\n        event.preventDefault();\n      }\n      if (this._stopPropagation) {\n        event.stopPropagation();\n      }\n    }\n  }\n  \n  _handleKeyDown(event) {\n    window.clearTimeout(this._sequenceTimeout);\n    this._sequenceTimeout = window.setTimeout(this._resetSequence, this.constructor.sequenceTime);\n    \n    // Store pressed key in array\n    const key = normalizeCode(event.keyCode);\n    \n    // Don't do anything when a modifier is pressed\n    if (modifierCodeMap[key]) {\n      return;\n    }\n    \n    if (this._currentKeys.indexOf(key) === -1) {\n      this._currentKeys.push(key);\n      \n      this._setCurrentKeyCombo(event);\n    }\n    \n    this._executeListeners.call(this, event);\n    \n    // Workaround: keyup events are never triggered while the command key is down, so reset the list of keys\n    if (event.metaKey) {\n      this.reset();\n    }\n    \n    if (!event.target.parentNode) {\n      // Workaround: keyup events are never triggered if the element does not have a parent node\n      this.reset();\n    }\n  }\n  \n  _handleKeyUp(event) {\n    const key = normalizeCode(event.keyCode);\n    \n    if (modifierCodeMap[key]) {\n      // Workaround: keyup events are not triggered when command key is down on Mac, so if the command key is\n      // released, consider all keys released\n      // Test: comment this out, press K, press L, press Command, release L, release Command, then release K -- L is\n      // triggered. This also prevents handlers for related key combos to be triggered\n      // Test: comment this out, press Control, press Alt, press A, press S, release Alt, release S -- Control+A is\n      // triggered\n      this.reset();\n      \n      // We don't ever want to execute handlers when a modifier is released, and we can't since they don't end up in\n      // currentKeys. If we weren't doing the index check below, that could result in key combo handlers for ctrl+r to\n      // be triggered when someone released alt first after triggering ctrl+alt+r. In any case, return to avoid the\n      // uselss extra work\n      return;\n    }\n    \n    // Remove key from array\n    const index = this._currentKeys.indexOf(key);\n    if (index !== -1) {\n      this._currentKeys.splice(index, 1);\n      \n      // If too many keys are pressed, then one is removed, make sure to check for a match\n      this._setCurrentKeyCombo(event);\n      this._executeListeners.call(this, event, true);\n    }\n  }\n  \n  _keySequenceStringToArray(keyCombo) {\n    return keyCombo.toString().split('-').map(this._keyComboToCodeString);\n  }\n  \n  /**\n   Add a key combo listener.\n   \n   @function on\n   @param {String} keyCombo\n   The key combination to listen for, such as <code>'ctrl-f'</code>.\n   @param {String} [selector]\n   A selector to use for event delegation.\n   @param {String} [data]\n   Data to pass to listeners as <code>event.data</code>.\n   @param {Function} listener\n   The listener to execute when this key combination is pressed. Executes on keydown, or, if too many keys are\n   pressed and one is released, resulting in the correct key combination, executes on keyup.\n   \n   @returns {Keys} this, chainable.\n   */\n  on(keyCombo, selector, data, listener) {\n    // keyCombo can be a map of keyCombos to handlers\n    if (typeof keyCombo === 'object') {\n      // ( keyCombo-Object, selector, data )\n      if (typeof selector !== 'string') {\n        // ( keyCombo-Object, data )\n        // ( keyCombo-Object, null, data )\n        data = data || selector;\n        selector = undefined;\n      }\n      for (const combo in keyCombo) {\n        this.on(combo, selector, data, keyCombo[combo]);\n      }\n      return this;\n    }\n    \n    if (typeof data === 'undefined' && typeof listener === 'undefined') {\n      // ( keyCombo, listener )\n      listener = selector;\n      data = selector = undefined;\n    }\n    else if (typeof listener === 'undefined') {\n      if (typeof selector === 'string') {\n        // ( keyCombo, selector, listener )\n        listener = data;\n        data = undefined;\n      }\n      else {\n        // ( keyCombo, data, listener )\n        listener = data;\n        data = selector;\n        selector = undefined;\n      }\n    }\n    \n    if (typeof listener !== 'function') {\n      throw new Error(`Coral.Keys: Cannot add listener of type ${typeof listener}`);\n    }\n    \n    let namespace;\n    const namespaceMatch = namespaceRE.exec(keyCombo);\n    if (namespaceMatch) {\n      keyCombo = namespaceMatch[1];\n      namespace = namespaceMatch[2];\n    }\n    \n    // Determine if this selector needs context when evaluating event delegation\n    // A selector needs context when it includes things like >, ~, :first-child, etc\n    const needsContext = selector ? needsContextRE.test(selector) : false;\n  \n    // Check if the string is a sequence or a keypress\n    if (keyCombo.toString().indexOf('-') !== -1 && keyCombo.toString().length > 1) {\n      // It's a sequence!\n      \n      // Divide it into its parts and convert to a code string\n      const sequenceParts = this._keySequenceStringToArray(keyCombo);\n      \n      // Store the listener and associated information in the list for this sequence\n      this._keySequences.push({\n        originalString: keyCombo,\n        currentPart: 0,\n        parts: sequenceParts,\n        needsContext: needsContext,\n        selector: selector,\n        listener: listener,\n        data: data,\n        namespace: namespace\n      });\n    }\n    else {\n      const originalString = keyCombo.toString();\n      \n      // It's a key combo!\n      keyCombo = this._keyComboToCodeString(keyCombo);\n      \n      const listeners = this._keyListeners[keyCombo] = this._keyListeners[keyCombo] || [];\n      \n      // Store the listener and associated information in the list for this keyCombo\n      listeners.push({\n        originalString: originalString,\n        // Determine if this selector needs context when evaluating event delegation\n        // A selector needs context when it includes things like >, ~, :first-child, etc\n        needsContext: selector ? needsContextRE.test(selector) : false,\n        selector: selector,\n        listener: listener,\n        data: data,\n        namespace: namespace\n      });\n    }\n    \n    return this;\n  }\n  \n  _offByKeyComboString(keyComboString, namespace, selector, listener) {\n    let i;\n    const listeners = this._keyListeners[keyComboString];\n    \n    if (listeners && listeners.length) {\n      if (typeof selector === 'undefined' && typeof listener === 'undefined' && typeof namespace === 'undefined') {\n        // Unbind all listeners for this key combo\n        listeners.length = 0;\n      }\n      else if (typeof listener === 'undefined') {\n        // Unbind all listeners of a specific selector and or namespace\n        for (i = 0; i < listeners.length; i++) {\n          // This comparison works because selector and namespace are undefined by default\n          if (listeners[i].selector === selector && listeners[i].namespace === namespace) {\n            listeners.splice(i, 1);\n            i--;\n          }\n        }\n      }\n      else {\n        // Unbind a specific listener, optionally on a specific selector and specific namespace\n        for (i = 0; i < listeners.length; i++) {\n          if (listeners[i].listener === listener &&\n            listeners[i].selector === selector &&\n            listeners[i].namespace === namespace) {\n            listeners.splice(i, 1);\n            i--;\n          }\n        }\n      }\n    }\n  }\n  \n  /**\n   Remove a key combo listener.\n   \n   @function off\n   @param {String} keyCombo\n   The key combination to listen for, such as <code>'ctrl-f'</code>.\n   @param {String} [selector]\n   A selector to use for event delegation.\n   @param {Function} listener\n   The listener that was passed to on.\n   \n   @returns {Keys} this, chainable.\n   */\n  off(keyCombo, selector, listener) {\n    if (typeof listener === 'undefined') {\n      listener = selector;\n      selector = undefined;\n    }\n    \n    let i;\n    let namespace;\n    const namespaceMatch = namespaceRE.exec(keyCombo);\n    if (namespaceMatch) {\n      keyCombo = namespaceMatch[1];\n      namespace = namespaceMatch[2];\n    }\n    \n    if (keyCombo === '' && namespace !== undefined) {\n      // If we have a namespace by no keyCombo, remove all events of the namespace for each key combo\n      for (keyCombo in this._keyListeners) {\n        this._offByKeyComboString(keyCombo, namespace, selector, listener);\n      }\n      \n      // Remove sequences\n      for (i = 0; i < this._keySequences.length; i++) {\n        if (this._keySequences[i].namespace === namespace) {\n          this._keySequences.splice(i, 1);\n          i--;\n        }\n      }\n      \n      return this;\n    }\n    \n    if (keyCombo.indexOf('-') !== -1) {\n      // Unbind a specific key sequence listener, optionally on a specific selector and specific namespace\n      for (i = 0; i < this._keySequences.length; i++) {\n        if (\n          (keyCombo === undefined || this._keySequences[i].originalString === keyCombo) &&\n          (listener === undefined || this._keySequences[i].listener === listener) &&\n          (selector === undefined || this._keySequences[i].selector === selector) &&\n          (namespace === undefined || this._keySequences[i].namespace === namespace)\n        ) {\n          this._keySequences.splice(i, 1);\n          i--;\n        }\n      }\n    }\n    else {\n      keyCombo = this._keyComboToCodeString(keyCombo);\n      \n      this._offByKeyComboString(keyCombo, namespace, selector, listener);\n    }\n    \n    return this;\n  }\n  \n  /**\n   Destroy this instance. This removes all event listeners, references, and state.\n   \n   @function destroy\n   @param {Boolean} globalsOnly\n   Whether only global listeners should be removed\n   \n   @returns {Keys} this, chainable.\n   */\n  destroy(globalsOnly) {\n    if (!globalsOnly) {\n      this._keyListeners = null;\n      this._currentKeys = null;\n      this._currentKeyCombo = null;\n      \n      this._el.removeEventListener('keydown', this._handleKeyDown);\n    }\n    \n    window.removeEventListener('keyup', this._handleKeyUp, true);\n    window.removeEventListener('focus', this.reset);\n    \n    return this;\n  }\n  \n  /**\n   Initialize an instance created without the <code>new</code> keyword or revive a destroyed instance. This method\n   will be called automatically if an instance is created with <code>new Coral.keys</code>.\n   \n   @function init\n   @param {Boolean} globalsOnly\n   Whether only global listeners should be added\n   \n   @returns {Keys} this, chainable.\n   */\n  init(globalsOnly) {\n    if (!globalsOnly) {\n      // Reset all variable states\n      this._currentKeys = [];\n      this._currentKeyCombo = '';\n      this._keyListeners = {};\n      this._keySequences = [];\n  \n      this._el.addEventListener('keydown', this._handleKeyDown);\n    }\n    \n    // Remove window event listeners first to avoid memory leak\n    this.destroy(true);\n    \n    // Watching on capture so it is immune to stopPropagation(). It's very important this event\n    // is handled so key entries previously added on keydown can be cleared out.\n    // If multiple identical EventListeners are registered on the same EventTarget with the same parameters the\n    // duplicate instances are discarded. They do not cause the EventListener to be called twice.\n    window.addEventListener('keyup', this._handleKeyUp, true);\n    window.addEventListener('focus', this.reset);\n    \n    return this;\n  }\n  \n  /**\n   The default keycombo event filter function. Ignores key combos triggered on input, select, and textarea.\n   \n   @param event\n   The event passed\n   \n   @returns {Boolean} True, if event.target is not editable and event.target.tagname is not restricted\n   */\n  static filterInputs(event) {\n    // Escape keycode doesn't have to be filtered\n    if (event.keyCode === specialKeyCodes.escape) {\n      return true;\n    }\n  \n    const target = event.target;\n    const tagName = target.tagName;\n    const isContentEditable = target.isContentEditable;\n    const isRestrictedTag = restrictedTagNames[tagName];\n    return !isContentEditable && !isRestrictedTag;\n  }\n  \n  /**\n   Convert a key to its character code representation.\n   \n   @param {String} key\n   The key character that needs to be converted. If the String contains more than one character, an error will be\n   produced.\n   \n   @returns {Number} The character code of the given String.\n   */\n  static keyToCode(key) {\n    return keyToCode(key);\n  }\n  \n  /**\n   The time allowed between keypresses for a sequence in miliseconds\n   @type {Number}\n   @default 1500\n   */\n  static get sequenceTime() {\n    return 1500;\n  }\n  \n  /**\n   Convert a combination of keys separated by + into the corresponding code string.\n   @ignore\n   */\n  _keyComboToCodeString(keyCombo) {\n    // if single \"+\"\n    if (keyCombo === '+') {\n      return keyToCode(keyCombo);\n    }\n  \n    return keyCombo\n      // Convert to string so numbers are supported\n      .toString()\n      .split('+')\n      .map(keyToCode)\n      // Sort keys for easy comparison\n      .sort()\n      .join('+');\n  }\n}\n\n/**\n A key listener for global hotkeys is exposed for document eventing handling.\n \n @type {Keys}\n */\n// Register against the documentElement, <html>, so event delegation works\nconst keys = new Keys(document.documentElement, {\n  // Don't let global hotkeys trigger default actions\n  stopPropagation: true,\n  preventDefault: true\n});\n\nexport {keys, Keys};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n Set of property value transformation functions.\n */\nclass Transformation {\n  /**\n   Transform the provided value into a boolean. Follows the behavior of JavaScript thruty/falsy.\n   \n   @param {*} value\n   The value to convert to Boolean.\n   \n   @returns {Boolean} The corresponding boolean value.\n   */\n  boolean(value) {\n    return !!value;\n  }\n  \n  /**\n   Transform the provided value into a boolean. Follows the behavior of the HTML specification, in which the existence of\n   the attribute indicates <code>true</code> regardless of the attribute's value. If the value is a boolean, it ignores\n   the transformation.\n   \n   @param {*} value\n   The value to convert to Boolean.\n   \n   @returns {Boolean} The corresponding boolean value.\n   */\n  booleanAttr(value) {\n    return typeof value === 'boolean' ? value : !(value === null || typeof value === 'undefined');\n  }\n  \n  /**\n   Transforms the provided value into a floating point number.\n   \n   @param {*} value\n   The value to convert to a Number.\n   \n   @returns {?Number} The corresponding number or <code>null</code> if the passed value cannot be converted to a number.\n   */\n  number(value) {\n    value = parseFloat(value);\n    return isNaN(value) ? null : value;\n  }\n  \n  /**\n   Transforms the provided value into a floating number. The conversion is strict in the sense that if non numeric values\n   are detected, <code>null</code> is returned instead.\n   \n   @param {*} value\n   The value to be converted to a Number.\n   \n   @retuns {?Number} The corresponding number or <code>null</code> if the passed value cannot be converted to number.\n   */\n  float(value) {\n    if (/^(-|\\+)?([0-9]+(\\.[0-9]+)?|Infinity)$/.test(value)) {\n      return Number(value);\n    }\n  \n    return null;\n  }\n  \n  /**\n   Transform the provided value into a string. When given <code>null</code> or <code>undefined</code> it will be\n   converted to an empty string(\"\").\n   \n   @param {*} value\n   The value to convert to String.\n   \n   @returns {String} The corresponding string value.\n   */\n  string(value) {\n    if (value === null || typeof value === 'undefined') {\n      return '';\n    }\n  \n    return typeof value === 'string' ? value : String(value);\n  }\n}\n\n/**\n A type transform utility.\n \n @type {Transformation}\n */\nconst transform = new Transformation();\n\nexport default transform;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2015 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport commons from './commons';\n\n/**\n Set of property value validation functions.\n */\nclass Validation {\n  /**\n   Ensures that the value has changed.\n   \n   @param {*} newValue\n   The new value.\n   @param {*} oldValue\n   The existing value.\n   \n   @returns {Boolean} <code>true</code> if the values are different.\n   */\n  valueMustChange(newValue, oldValue) {\n    // We can use exact equality here as validation functions are called after transform. Thus, the input value will be\n    // converted to the same type as a stored value\n    return newValue !== oldValue;\n  }\n  \n  /**\n   Ensures that the new value is within the enumeration. The enumeration can be given as an array of values or as a\n   key/value Object. Take into consideration that enumerations are case sensitive.\n   \n   @example // Enumeration as Array\n   Coral.validate.enumeration(['xs', 's', 'm', 'l']);\n   @example // Enumeration as Object\n   Coral.validate.enumeration({EXTRA_SMALL : 'xs', SMALL : 's', MEDIUM : 'm', LARGE : 'l'});\n   @param {Object} enumeration\n   Object that represents an enum.\n   \n   @returns {ValidationFunction}\n   a validation function that ensures that the given value is within the enumeration.\n   */\n  enumeration(enumeration) {\n    // Reverses the enumeration, so that we can check that the variable new value exists inside\n    const enumReversed = commons.swapKeysAndValues(enumeration);\n  \n    // Returns a new function that matches the newValue, oldValue signature\n    return (newValue) => typeof enumReversed[newValue] !== 'undefined';\n  }\n}\n\n/**\n Signature of the function used to validate new input. It accepts a newValue and an oldValue which are used to\n determine if the newValue is valid.\n \n @typedef {function} ValidationFunction\n \n @param {*} newValue\n The new value to validate.\n @param {*} oldValue\n The existing value.\n \n @returns {Boolean} <code>true</code> if the validation succeeded, otherwise <code>false</code>.\n */\n\n/**\n A property transform utility.\n \n @type {Validation}\n */\nconst validate = new Validation();\n\nexport default validate;\n","import '../coralui-externals';\n\nimport commons from './src/scripts/Commons';\nimport events from './src/scripts/Events';\nimport {i18n, strings} from './src/scripts/I18nProvider';\nimport {keys, Keys} from './src/scripts/Keys';\nimport transform from './src/scripts/Transformation';\nimport validate from './src/scripts/Validation';\n\n/**\n  @private\n */\nconst mixin = {};\n\nexport {\n  commons,\n  events,\n  i18n,\n  keys,\n  Keys,\n  mixin,\n  strings,\n  transform,\n  validate\n};\n","import {commons, events} from '../../coralui-util';\n\nvar typeKitId = commons && commons.options.typekit || 'ruf7eed';\n\nvar config = {\n  kitId: typeKitId,\n  scriptTimeout: 3000,\n  loading: function() {\n    events.dispatch('coral-commons:_webfontloading');\n  },\n  active: function() {\n    events.dispatch('coral-commons:_webfontactive');\n  },\n  inactive: function() {\n    events.dispatch('coral-commons:_webfontinactive');\n  }\n};\n\nif (!window.Typekit) { // we load the typescript only once\n  var h = document.getElementsByTagName(\"html\")[0];\n  h.className += \" wf-loading\";\n  var t = setTimeout(function() {\n    h.className = h.className.replace(/(\\s|^)wf-loading(\\s|$)/g, \" \");\n    h.className += \" wf-inactive\";\n  }, config.scriptTimeout);\n  var tk = document.createElement(\"script\"),\n    d = false;\n  \n  // Always load over https\n  tk.src = 'https://use.typekit.net/' + config.kitId + '.js'\n  tk.type = \"text/javascript\";\n  tk.async = \"true\";\n  tk.onload = tk.onreadystatechange = function() {\n    var a = this.readyState;\n    if (d || a && a !== \"complete\" && a !== \"loaded\") {\n      return;\n    }\n    d = true;\n    clearTimeout(t);\n    try {\n      Typekit.load(config);\n    } catch (b) {}\n  };\n  var s = document.getElementsByTagName(\"script\")[0];\n  s.parentNode.insertBefore(tk, s);\n}\n","//todo We force the polyfill but ideally we should not load it if not required\nif (window.customElements) {\n  window.customElements.forcePolyfill = true;\n}\n","(function(){\n  'use strict';var g=new function(){};var aa=new Set(\"annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph\".split(\" \"));function k(b){var a=aa.has(b);b=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(b);return!a&&b}function l(b){var a=b.isConnected;if(void 0!==a)return a;for(;b&&!(b.__CE_isImportDocument||b instanceof Document);)b=b.parentNode||(window.ShadowRoot&&b instanceof ShadowRoot?b.host:void 0);return!(!b||!(b.__CE_isImportDocument||b instanceof Document))}\n  function m(b,a){for(;a&&a!==b&&!a.nextSibling;)a=a.parentNode;return a&&a!==b?a.nextSibling:null}\n  function n(b,a,d){d=d?d:new Set;for(var c=b;c;){if(c.nodeType===Node.ELEMENT_NODE){var e=c;a(e);var h=e.localName;if(\"link\"===h&&\"import\"===e.getAttribute(\"rel\")){c=e.import;if(c instanceof Node&&!d.has(c))for(d.add(c),c=c.firstChild;c;c=c.nextSibling)n(c,a,d);c=m(b,e);continue}else if(\"template\"===h){c=m(b,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)n(e,a,d)}c=c.firstChild?c.firstChild:m(b,c)}}function p(b,a,d){b[a]=d};function q(){this.a=new Map;this.f=new Map;this.m=[];this.b=!1}function ba(b,a,d){b.a.set(a,d);b.f.set(d.constructor,d)}function r(b,a){b.b=!0;b.m.push(a)}function v(b,a){b.b&&n(a,function(a){return w(b,a)})}function w(b,a){if(b.b&&!a.__CE_patched){a.__CE_patched=!0;for(var d=0;d<b.m.length;d++)b.m[d](a)}}function x(b,a){var d=[];n(a,function(b){return d.push(b)});for(a=0;a<d.length;a++){var c=d[a];1===c.__CE_state?b.connectedCallback(c):y(b,c)}}\n  function z(b,a){var d=[];n(a,function(b){return d.push(b)});for(a=0;a<d.length;a++){var c=d[a];1===c.__CE_state&&b.disconnectedCallback(c)}}\n  function A(b,a,d){d=d?d:new Set;var c=[];n(a,function(e){var a;if(\"link\"===e.localName&&\"import\"===e.getAttribute(\"rel\"))a=e.import,a instanceof Node&&\"complete\"===a.readyState?(a.__CE_isImportDocument=!0,a.__CE_hasRegistry=!0):e.addEventListener(\"load\",function(){var a=e.import;a.__CE_documentLoadHandled||(a.__CE_documentLoadHandled=!0,a.__CE_isImportDocument=!0,a.__CE_hasRegistry=!0,d.delete(a),A(b,a,d))});else{if(a=e.getAttribute(\"is\"))e.__CE_is=a;c.push(e)}},d);if(b.b)for(a=0;a<c.length;a++)w(b,\n    c[a]);for(a=0;a<c.length;a++)y(b,c[a])}\n  function y(b,a){if(void 0===a.__CE_state){var d=b.a.get(a.__CE_is||a.localName);if(d=d&&d.localName===a.localName?d:null){d.constructionStack.push(a);var c=d.constructor;try{try{if(new c!==a)throw Error(\"The custom element constructor did not produce the element being upgraded.\");}finally{d.constructionStack.pop()}}catch(f){throw a.__CE_state=2,f;}a.__CE_state=1;a.__CE_definition=d;if(d.attributeChangedCallback)for(d=d.observedAttributes,c=0;c<d.length;c++){var e=d[c],h=a.getAttribute(e);null!==h&&\n  b.attributeChangedCallback(a,e,null,h,null)}l(a)&&b.connectedCallback(a)}}}q.prototype.connectedCallback=function(b){var a=b.__CE_definition;a.connectedCallback&&a.connectedCallback.call(b)};q.prototype.disconnectedCallback=function(b){var a=b.__CE_definition;a.disconnectedCallback&&a.disconnectedCallback.call(b)};\n  q.prototype.attributeChangedCallback=function(b,a,d,c,e){var h=b.__CE_definition;h.attributeChangedCallback&&-1<h.observedAttributes.indexOf(a)&&h.attributeChangedCallback.call(b,a,d,c,e)};function B(b,a){this.c=b;this.a=a;this.b=void 0;A(this.c,this.a);\"loading\"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function C(b){b.b&&b.b.disconnect()}B.prototype.f=function(b){var a=this.a.readyState;\"interactive\"!==a&&\"complete\"!==a||C(this);for(a=0;a<b.length;a++)for(var d=b[a].addedNodes,c=0;c<d.length;c++)A(this.c,d[c])};function ca(){var b=this;this.b=this.a=void 0;this.f=new Promise(function(a){b.b=a;b.a&&a(b.a)})}function D(b){if(b.a)throw Error(\"Already resolved.\");b.a=void 0;b.b&&b.b(void 0)};function E(b){this.i=!1;this.c=b;this.l=new Map;this.j=function(b){return b()};this.g=!1;this.h=[];this.s=new B(b,document)}\n  E.prototype.define=function(b,a,d){var c=this;if(!(a instanceof Function))throw new TypeError(\"Custom element constructors must be functions.\");if(!k(b))throw new SyntaxError(\"The element name '\"+b+\"' is not valid.\");if(this.c.a.get(b))throw Error(\"A custom element with name '\"+b+\"' has already been defined.\");var e=b;if(d&&d.extends){if(!this.enableCustomizedBuiltins)throw Error(\"Customized builtin elements are disabled by default. Set customElements.enableCustomizedBuiltins = true.\");if(k(d.extends))throw Error(\"A customized builtin element may not extend a custom element.\");\n    if(document.createElement(d.extends)instanceof window.HTMLUnknownElement)throw Error(\"Cannot extend '\"+d.extends+\"': is not a real HTML element\");e=d.extends}if(this.i)throw Error(\"A custom element is already being defined.\");this.i=!0;var h,f,u,t,P;try{d=function(b){var a=Q[b];if(void 0!==a&&!(a instanceof Function))throw Error(\"The '\"+b+\"' callback must be a function.\");return a};var Q=a.prototype;if(!(Q instanceof Object))throw new TypeError(\"The custom element constructor's prototype is not an object.\");\n    h=d(\"connectedCallback\");f=d(\"disconnectedCallback\");u=d(\"adoptedCallback\");t=d(\"attributeChangedCallback\");P=a.observedAttributes||[]}catch(xa){return}finally{this.i=!1}ba(this.c,b,{name:b,localName:e,constructor:a,connectedCallback:h,disconnectedCallback:f,adoptedCallback:u,attributeChangedCallback:t,observedAttributes:P,constructionStack:[]});this.h.push(b);this.g||(this.g=!0,this.j(function(){if(!1!==c.g)for(c.g=!1,A(c.c,document);0<c.h.length;){var b=c.h.shift();(b=c.l.get(b))&&D(b)}}))};\n  E.prototype.get=function(b){if(b=this.c.a.get(b))return b.constructor};E.prototype.whenDefined=function(b){if(!k(b))return Promise.reject(new SyntaxError(\"'\"+b+\"' is not a valid custom element name.\"));var a=this.l.get(b);if(a)return a.f;a=new ca;this.l.set(b,a);this.c.a.get(b)&&-1===this.h.indexOf(b)&&D(a);return a.f};E.prototype.u=function(b){C(this.s);var a=this.j;this.j=function(d){return b(function(){return a(d)})}};window.CustomElementRegistry=E;E.prototype.define=E.prototype.define;\n  E.prototype.get=E.prototype.get;E.prototype.whenDefined=E.prototype.whenDefined;E.prototype.polyfillWrapFlushCallback=E.prototype.u;var F=window.Document.prototype.createElement,da=window.Document.prototype.createElementNS,ea=window.Document.prototype.importNode,fa=window.Document.prototype.prepend,ga=window.Document.prototype.append,G=window.Node.prototype.cloneNode,H=window.Node.prototype.appendChild,I=window.Node.prototype.insertBefore,J=window.Node.prototype.removeChild,K=window.Node.prototype.replaceChild,L=Object.getOwnPropertyDescriptor(window.Node.prototype,\"textContent\"),M=window.Element.prototype.attachShadow,N=Object.getOwnPropertyDescriptor(window.Element.prototype,\n    \"innerHTML\"),O=window.Element.prototype.getAttribute,R=window.Element.prototype.setAttribute,S=window.Element.prototype.removeAttribute,T=window.Element.prototype.getAttributeNS,U=window.Element.prototype.setAttributeNS,V=window.Element.prototype.removeAttributeNS,W=window.Element.prototype.insertAdjacentElement,ha=window.Element.prototype.prepend,ia=window.Element.prototype.append,ja=window.Element.prototype.before,ka=window.Element.prototype.after,la=window.Element.prototype.replaceWith,ma=window.Element.prototype.remove,\n    na=window.HTMLElement,X=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,\"innerHTML\"),oa=window.HTMLElement.prototype.insertAdjacentElement,pa={Button:window.HTMLButtonElement,Canvas:window.HTMLCanvasElement,Data:window.HTMLDataElement,Head:window.HTMLHeadElement,Mod:window.HTMLModElement,TableCell:window.HTMLTableCellElement,TableCol:window.HTMLTableColElement,Anchor:window.HTMLAnchorElement,Area:window.HTMLAreaElement,Base:window.HTMLBaseElement,Body:window.HTMLBodyElement,BR:window.HTMLBRElement,\n      DataList:window.HTMLDataListElement,Details:window.HTMLDetailsElement,Dialog:window.HTMLDialogElement,Div:window.HTMLDivElement,DList:window.HTMLDListElement,Embed:window.HTMLEmbedElement,FieldSet:window.HTMLFieldSetElement,Form:window.HTMLFormElement,Heading:window.HTMLHeadingElement,HR:window.HTMLHRElement,Html:window.HTMLHtmlElement,IFrame:window.HTMLIFrameElement,Image:window.HTMLImageElement,Input:window.HTMLInputElement,Keygen:window.HTMLKeygenElement,Label:window.HTMLLabelElement,Legend:window.HTMLLegendElement,\n      LI:window.HTMLLIElement,Link:window.HTMLLinkElement,Map:window.HTMLMapElement,Media:window.HTMLMediaElement,Menu:window.HTMLMenuElement,MenuItem:window.HTMLMenuItemElement,Meta:window.HTMLMetaElement,Meter:window.HTMLMeterElement,Object:window.HTMLObjectElement,OList:window.HTMLOListElement,OptGroup:window.HTMLOptGroupElement,Option:window.HTMLOptionElement,Output:window.HTMLOutputElement,Paragraph:window.HTMLParagraphElement,Param:window.HTMLParamElement,Picture:window.HTMLPictureElement,Pre:window.HTMLPreElement,\n      Progress:window.HTMLProgressElement,Quote:window.HTMLQuoteElement,Script:window.HTMLScriptElement,Select:window.HTMLSelectElement,Slot:window.HTMLSlotElement,Source:window.HTMLSourceElement,Span:window.HTMLSpanElement,Style:window.HTMLStyleElement,TableCaption:window.HTMLTableCaptionElement,Table:window.HTMLTableElement,TableRow:window.HTMLTableRowElement,TableSection:window.HTMLTableSectionElement,Template:window.HTMLTemplateElement,TextArea:window.HTMLTextAreaElement,Time:window.HTMLTimeElement,\n      Title:window.HTMLTitleElement,Track:window.HTMLTrackElement,UList:window.HTMLUListElement,Unknown:window.HTMLUnknownElement};function qa(){var b=Y;window.HTMLElement=function(){function a(){var a=this.constructor,c=b.f.get(a);if(!c)throw Error(\"The custom element being constructed was not registered with `customElements`.\");var e=c.constructionStack;if(!e.length)return e=F.call(document,c.localName),Object.setPrototypeOf(e,a.prototype),e.__CE_state=1,e.__CE_definition=c,w(b,e),e;var c=e.length-1,h=e[c];if(h===g)throw Error(\"The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.\");\n    e[c]=g;Object.setPrototypeOf(h,a.prototype);w(b,h);return h}a.prototype=na.prototype;return a}()};function ra(){var b=Y;function a(a,e){e&&(window[a]=function(){function d(){var e=this.constructor,d=b.f.get(e);if(!d)throw Error(\"The custom element being constructed was not registered with `customElements`.\");var c=d.constructionStack;if(!c.length)return c=F.call(document,d.localName),c.setAttribute(\"is\",d.name),Object.setPrototypeOf(c,e.prototype),c.__CE_state=1,c.__CE_definition=d,w(b,c),c;var d=c.length-1,h=c[d];if(h===g)throw Error(\"The \"+a+\" constructor was either called reentrantly for this constructor or called multiple times.\");\n    c[d]=g;Object.setPrototypeOf(h,e.prototype);w(b,h);return h}d.prototype=e.prototype;return d}())}for(var d in pa)a(\"HTML\"+d+\"Element\",pa[d])};function sa(b,a,d){a.prepend=function(a){for(var e=[],c=0;c<arguments.length;++c)e[c-0]=arguments[c];c=e.filter(function(b){return b instanceof Node&&l(b)});d.o.apply(this,e);for(var f=0;f<c.length;f++)z(b,c[f]);if(l(this))for(c=0;c<e.length;c++)f=e[c],f instanceof Element&&x(b,f)};a.append=function(a){for(var e=[],c=0;c<arguments.length;++c)e[c-0]=arguments[c];c=e.filter(function(b){return b instanceof Node&&l(b)});d.append.apply(this,e);for(var f=0;f<c.length;f++)z(b,c[f]);if(l(this))for(c=0;c<\n  e.length;c++)f=e[c],f instanceof Element&&x(b,f)}};function ta(){var b=Y;p(Document.prototype,\"createElement\",function(a,d){if(this.__CE_hasRegistry){var c=b.a.get(d&&d.is?d.is:a);if(c)return new c.constructor}a=F.call(this,a);d&&d.is&&(a.__CE_is=d.is,a.setAttribute(\"is\",d.is));w(b,a);return a});p(Document.prototype,\"importNode\",function(a,d){a=ea.call(this,a,d);this.__CE_hasRegistry?A(b,a):v(b,a);return a});p(Document.prototype,\"createElementNS\",function(a,d,c){if(this.__CE_hasRegistry&&(null===a||\"http://www.w3.org/1999/xhtml\"===a)){var e=b.a.get(c&&\n  c.is?c.is:d);if(e)return new e.constructor}a=da.call(this,a,d);c&&c.is&&(a.__CE_is=c.is,a.setAttribute(\"is\",c.is));w(b,a);return a});sa(b,Document.prototype,{o:fa,append:ga})};function ua(){var b=Y;function a(a,c){Object.defineProperty(a,\"textContent\",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(a){if(this.nodeType===Node.TEXT_NODE)c.set.call(this,a);else{var e=void 0;if(this.firstChild){var d=this.childNodes,u=d.length;if(0<u&&l(this))for(var e=Array(u),t=0;t<u;t++)e[t]=d[t]}c.set.call(this,a);if(e)for(a=0;a<e.length;a++)z(b,e[a])}}})}p(Node.prototype,\"insertBefore\",function(a,c){if(a instanceof DocumentFragment){var e=Array.prototype.slice.apply(a.childNodes);\n    a=I.call(this,a,c);if(l(this))for(c=0;c<e.length;c++)x(b,e[c]);return a}e=l(a);c=I.call(this,a,c);e&&z(b,a);l(this)&&x(b,a);return c});p(Node.prototype,\"appendChild\",function(a){if(a instanceof DocumentFragment){var c=Array.prototype.slice.apply(a.childNodes);a=H.call(this,a);if(l(this))for(var e=0;e<c.length;e++)x(b,c[e]);return a}c=l(a);e=H.call(this,a);c&&z(b,a);l(this)&&x(b,a);return e});p(Node.prototype,\"cloneNode\",function(a){a=G.call(this,a);this.ownerDocument.__CE_hasRegistry?A(b,a):v(b,a);\n    return a});p(Node.prototype,\"removeChild\",function(a){var c=l(a),e=J.call(this,a);c&&z(b,a);return e});p(Node.prototype,\"replaceChild\",function(a,c){if(a instanceof DocumentFragment){var e=Array.prototype.slice.apply(a.childNodes);a=K.call(this,a,c);if(l(this))for(z(b,c),c=0;c<e.length;c++)x(b,e[c]);return a}var e=l(a),d=K.call(this,a,c),f=l(this);f&&z(b,c);e&&z(b,a);f&&x(b,a);return d});L&&L.get?a(Node.prototype,L):r(b,function(b){a(b,{enumerable:!0,configurable:!0,get:function(){for(var a=[],b=\n    0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join(\"\")},set:function(a){for(;this.firstChild;)J.call(this,this.firstChild);H.call(this,document.createTextNode(a))}})})};function va(b){var a=Element.prototype;a.before=function(a){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];e=c.filter(function(a){return a instanceof Node&&l(a)});ja.apply(this,c);for(var d=0;d<e.length;d++)z(b,e[d]);if(l(this))for(e=0;e<c.length;e++)d=c[e],d instanceof Element&&x(b,d)};a.after=function(a){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];e=c.filter(function(a){return a instanceof Node&&l(a)});ka.apply(this,c);for(var d=0;d<e.length;d++)z(b,e[d]);if(l(this))for(e=\n                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0;e<c.length;e++)d=c[e],d instanceof Element&&x(b,d)};a.replaceWith=function(a){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];var e=c.filter(function(a){return a instanceof Node&&l(a)}),d=l(this);la.apply(this,c);for(var f=0;f<e.length;f++)z(b,e[f]);if(d)for(z(b,this),e=0;e<c.length;e++)d=c[e],d instanceof Element&&x(b,d)};a.remove=function(){var a=l(this);ma.call(this);a&&z(b,this)}};function wa(){var b=Y;function a(a,c){Object.defineProperty(a,\"innerHTML\",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(a){var e=this,d=void 0;l(this)&&(d=[],n(this,function(a){a!==e&&d.push(a)}));c.set.call(this,a);if(d)for(var h=0;h<d.length;h++){var f=d[h];1===f.__CE_state&&b.disconnectedCallback(f)}this.ownerDocument.__CE_hasRegistry?A(b,this):v(b,this);return a}})}function d(a,c){p(a,\"insertAdjacentElement\",function(a,e){var d=l(e);a=c.call(this,a,e);d&&z(b,e);l(a)&&x(b,e);\n    return a})}M?p(Element.prototype,\"attachShadow\",function(a){return this.__CE_shadowRoot=a=M.call(this,a)}):console.warn(\"Custom Elements: `Element#attachShadow` was not patched.\");if(N&&N.get)a(Element.prototype,N);else if(X&&X.get)a(HTMLElement.prototype,X);else{var c=F.call(document,\"div\");r(b,function(b){a(b,{enumerable:!0,configurable:!0,get:function(){return G.call(this,!0).innerHTML},set:function(a){var b=\"template\"===this.localName?this.content:this;for(c.innerHTML=a;0<b.childNodes.length;)J.call(b,\n    b.childNodes[0]);for(;0<c.childNodes.length;)H.call(b,c.childNodes[0])}})})}p(Element.prototype,\"setAttribute\",function(a,c){if(1!==this.__CE_state)return R.call(this,a,c);var e=O.call(this,a);R.call(this,a,c);c=O.call(this,a);b.attributeChangedCallback(this,a,e,c,null)});p(Element.prototype,\"setAttributeNS\",function(a,c,d){if(1!==this.__CE_state)return U.call(this,a,c,d);var e=T.call(this,a,c);U.call(this,a,c,d);d=T.call(this,a,c);b.attributeChangedCallback(this,c,e,d,a)});p(Element.prototype,\"removeAttribute\",\n    function(a){if(1!==this.__CE_state)return S.call(this,a);var c=O.call(this,a);S.call(this,a);null!==c&&b.attributeChangedCallback(this,a,c,null,null)});p(Element.prototype,\"removeAttributeNS\",function(a,c){if(1!==this.__CE_state)return V.call(this,a,c);var d=T.call(this,a,c);V.call(this,a,c);var e=T.call(this,a,c);d!==e&&b.attributeChangedCallback(this,c,d,e,a)});oa?d(HTMLElement.prototype,oa):W?d(Element.prototype,W):console.warn(\"Custom Elements: `Element#insertAdjacentElement` was not patched.\");\n    sa(b,Element.prototype,{o:ha,append:ia});va(b)};/*\n   \n   Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n   This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n   The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n   The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n   Code distributed by Google as part of the polymer project is also\n   subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n   */\n  var Z=window.customElements;if(!Z||Z.forcePolyfill||\"function\"!=typeof Z.define||\"function\"!=typeof Z.get){var Y=new q;qa();ra();ta();ua();wa();document.__CE_hasRegistry=!0;var customElements=new E(Y);customElements.enableCustomizedBuiltins=true;Object.defineProperty(window,\"customElements\",{configurable:!0,enumerable:!0,value:customElements})};\n}).call(self);\n","// Patch to be able to use document.createElement(tagName, customElement) from custom elements v0\nconst documentCreateElement = document.createElement;\ndocument.createElement = function() {\n  if (typeof arguments[1] === 'string') {\n    arguments[1] = {is: arguments[1]};\n  }\n  return documentCreateElement.apply(this, arguments)\n};\n","// polyfills\nimport './polyfills/element.closest.js';\nimport './polyfills/element.matches.js';\nimport './polyfills/element.remove.js';\nimport './polyfills/classList-partial-shim.js';\nimport './polyfills/requestAnimationFrame.js';\nimport './polyfills/CustomEvent.js';\nimport './polyfills/focus-ring.js';\n// @IE\nimport Promise from 'promise-polyfill';\n\n// Positioning\nimport PopperJS from 'popper.js';\n// Eventing\nimport Vent from '@coralui/vent';\n// Adobe fonts\nimport './libs/typekit';\n\n// @IE Force custom elements polyfill to work with ES5\nimport './polyfills/forcePolyfill.js';\n// Using custom polyfill built from https://github.com/joeldenning/custom-elements/tree/builtin instead.\n// customElements.enableCustomizedBuiltins is set to true by default here.\nimport './polyfills/custom-elements.min.js';\n// @compat patch document.createElement for custom elements v0 usage\nimport './polyfills/document.createElement-patch.js';\n\nexport {\n  Promise,\n  Vent,\n  PopperJS\n}\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/** @private */\nexport default function listToArray(list) {\n  const res = [];\n  for (let i = 0, listCount = res.length = list.length; i < listCount; i++) {\n    res[i] = list[i];\n  }\n  return res;\n}\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport listToArray from './listToArray';\n\n/**\n Unique id used to idenfity the collection.\n \n @private\n */\nlet nextID = 0;\n\n/**\n Attribute used to identify the items of a collection.\n \n @private\n */\nconst COLLECTION_ID = 'coral-collection-id-';\n\n/**\n Selector used to determine if nested items should be allowed.\n \n @private\n */\nconst SCOPE_SELECTOR = ':scope > ';\n\n/** @private */\nfunction getTagSelector(tag, nativeTag) {\n  return nativeTag ? `${nativeTag}[is=\"${tag}\"]` : tag;\n}\n\n/**\n Helper function used to determine if the item should be filtered. If the filter is <code>undefined</code>, then the\n item will pass the filter.\n \n @param {HTMLElement} item\n The item that should be filtered.\n @param {Function} filter\n Function used to filter the item\n \n @returns {Boolean} true if the item passes the filter, otherwise false.\n \n @private\n */\nfunction filterItem(item, filter) {\n  return typeof filter !== 'function' || filter(item);\n}\n\n/**\n Collection provides a standardized way to manipulate items in a component.\n */\nclass Collection {\n  /**\n   @param {HTMLElement} options.host\n   The element that hosts the collection.\n   @param {String} options.itemTagName\n   The tag name of the elements that constitute a collection item.\n   @param {String} options.itemBaseTagName\n   The optional base tag name of the elements that constitute a collection item. This is required for elements that\n   extend native elements, like Button.\n   @param {String} [options.itemSelector]\n   Optional, derived from itemTagName and itemBaseTagName by default. Used to query the host element for its\n   collection items.\n   @param {HTMLElement} [options.container]\n   Optional element that wraps the collection. Defines where the new items will be added when <code>add</code> method\n   is called. Is the same as options.host by default.\n   @param {CollectionFilter} [options.filter]\n   Optional function used to filter the results.\n   @param {CollectionOnItemAdded} [options.onItemAdded]\n   Function called once an item is added to the DOM. If the Collection has been configured to handle the items\n   automatically, the callback will be called once the collection detects that the item has been added to the DOM and\n   not synchronously with <code>add()</code>.\n   @param {CollectionOnItemRemoved} [options.onItemRemoved]\n   Function called once an item is removed from the DOM. If the Collection has been configured to handle the items\n   automatically, the callback will be called once the collection detects that the item has been removed from the DOM\n   not synchronously with <code>add()</code>.\n   @param {CollectionOnChange} [options.onCollectionChange]\n   Function called after there has been a change in the collection. This allows components to handle state changes\n   after an item(s) has been added or removed. This callback will only be called if the Collection is configured to\n   handle the items automatically.\n   is <code>true</code>.\n   */\n  constructor(options) {\n    options = options || {};\n  \n    // we create an unique collection identifier\n    this._id = nextID++;\n  \n    this._host = options.host;\n    this._itemTagName = options.itemTagName;\n    this._itemBaseTagName = options.itemBaseTagName;\n    this._itemSelector = options.itemSelector || getTagSelector(this._itemTagName, this._itemBaseTagName);\n  \n    // the container where the new items are added\n    this._container = options.container || this._host;\n    this._filter = options.filter;\n  \n    // internal variable to determine if collection events will be handled internally\n    this._handleItems = false;\n  \n    // we provide support for the :scope selector and swap it for an id\n    if (this._itemSelector && this._itemSelector.indexOf(SCOPE_SELECTOR) === 0) {\n      this._container.id = this._container.id || COLLECTION_ID + this._id;\n      // we create a special selector to make sure that the items are direct children of the container. given that\n      // :scope is not fully supported by all browsers, we use an id to query\n      this._allItemsSelector = this._itemSelector.replace(SCOPE_SELECTOR, `#${this._container.id} > `);\n    \n      // we remove the :scope from the selector to be able to use it to determine if the item matches the collection\n      this._itemSelector = this._itemSelector.replace(SCOPE_SELECTOR, '');\n      // in case they match, we enable this optimization\n      if (this._itemSelector === this._itemTagName) {\n        this._useItemTagName = this._itemSelector.toUpperCase();\n      }\n    }\n    // live collections are not supported when nested items is used\n    else {\n      this._allItemsSelector = this._itemSelector;\n    \n      // live collections can only be used when a tagname is used to query the items\n      if (this._container && this._allItemsSelector === this._itemTagName) {\n        this._liveCollection = true;\n        this._useItemTagName = this._allItemsSelector.toUpperCase();\n      }\n    }\n  \n    this._onItemAdded = options.onItemAdded;\n    this._onItemRemoved = options.onItemRemoved;\n    this._onCollectionChange = options.onCollectionChange;\n  }\n  \n  /**\n   Number of items inside the Collection.\n   \n   @type {Number}\n   @default 0\n   */\n  get length() {\n    return this.getAll().length;\n  }\n  \n  /**\n   Adds an item to the Collection. The item can be either a <code>HTMLElement</code> or an Object with the item\n   properties. If the index is not provided the element appended to the end. If <code>options.onItemAdded</code> was\n   provided, it will be called after the element is added from the DOM.\n   \n   @param {HTMLElement|Object} item\n   The item to add to the Collection.\n   @param {HTMLElement} [insertBefore]\n   Existing item used as a reference to insert the new item before. If the value is <code>null</code>, then the new\n   item will be added at the end.\n   \n   @emits {coral-collection:add}\n   \n   @returns {HTMLElement} the item added.\n   */\n  add(item, insertBefore) {\n    // container and itemtagname are the minimum options that need to be provided to automatically handle this function\n    if (this._container && this._itemTagName) {\n      if (!(item instanceof HTMLElement)) {\n        // creates an instance of an item from the object\n        if (this._itemBaseTagName) {\n          item = document.createElement(this._itemBaseTagName, {is: this._itemTagName}).set(item, true);\n        }\n        else {\n          item = document.createElement(this._itemTagName).set(item, true);\n        }\n      }\n    \n      // inserts the element in the specified container\n      this._container.insertBefore(item, insertBefore || null);\n    \n      // when items are handled automatically there is no need to call this immediately\n      if (!this._handleItems && typeof this._onItemAdded === 'function' && this._host && filterItem(item, this._filter)) {\n        this._onItemAdded.call(this._host, item);\n      }\n    \n      return item;\n    }\n  \n    throw new Error('Please provide host and itemTagName or override add() to provide your own implementation.');\n  }\n  \n  /**\n   Removes all the items from the Collection.\n   \n   @returns {Array.<HTMLElement>} an Array with all the removed items.\n   */\n  clear() {\n    const items = this.getAll();\n  \n    const removed = [];\n  \n    for (let i = items.length - 1; i > -1; i--) {\n      removed.push(this.remove(items[i]));\n    }\n  \n    return removed;\n  }\n  \n  /**\n   Returns an array with all the items inside the Collection. Each element is of type <code>HTMLElement</code>.\n   \n   @returns {Array.<HTMLElement>} an Array with all the items inside the collection.\n   */\n  getAll() {\n    // in order to perform the automatic getAll query, the _host and _allItemsSelector must be provided\n    if (this._container && this._allItemsSelector) {\n      let items = this._liveCollection ?\n        // instead of querying the DOM, we just convert the live collection to an array, this way we obtain a\n        // \"snapshot\" of the DOM\n        listToArray(this._container.getElementsByTagName(this._allItemsSelector)) :\n        listToArray(this._container.querySelectorAll(this._allItemsSelector));\n    \n      if (this._filter) {\n        items = items.filter(this._filter);\n      }\n    \n      return items;\n    }\n  \n    throw new Error('Please provide host and itemTagName or override getAll() to provide your own implementation.');\n  }\n  \n  /**\n   Removes the given item from the Collection. If <code>options.onItemRemoved</code> was provided, it will be called\n   after the element is removed from the DOM.\n   \n   @param {HTMLElement} item\n   The item to add to the Collection.\n   \n   @emits {coral-collection:remove}\n   \n   @returns {HTMLElement} the item removed.\n   */\n  remove(item) {\n    if (item.parentNode) {\n      item.parentNode.removeChild(item);\n    \n      // when items are handled automatically there is no need to call this immediatelly\n      if (!this._handleItems && typeof this._onItemRemoved === 'function' && this._host && filterItem(item, this._filter)) {\n        this._onItemRemoved.call(this._host, item);\n      }\n    }\n  \n    return item;\n  }\n  \n  /**\n   Returns the first item of the collection.\n   \n   @returns {?HTMLElement} the first item of the collection.\n   */\n  first() {\n    // Use getAll() so filter() is applied\n    return this.getAll()[0] || null;\n  }\n  \n  /**\n   Returns the last item of the collection.\n   \n   @returns {?HTMLElement} the last item of the collection.\n   */\n  last() {\n    // Use getAll() so filter() is applied\n    const all = this.getAll();\n    return all[all.length - 1] || null;\n  }\n  \n  /**\n   Checks if the given Node belongs to the current collection. It is said that a Node belongs to a given collection\n   if it passes <code>options.filter</code> and it matches <code>options.itemSelector</code>. Text nodes cannot be\n   part of a collection.\n   \n   @param {Node} node\n   The node to check if it belongs to the collection.\n   \n   @returns {Boolean} true if the node is part of the collection, otherwise false.\n   \n   @protected\n   */\n  _isPartOfCollection(node) {\n    // we exclude Text nodes as they cannot be part of the collection. Text nodes do not implement matches and tagName\n    return !(node instanceof Text) &&\n      filterItem(node, this._filter) &&\n      // this is an optimization to avoid using matches\n      (this._useItemTagName ? this._useItemTagName === node.tagName : node.matches(this._itemSelector));\n  }\n  \n  /**\n   Handles the attachment of an item to the collection. It triggers automatically the collection event.\n   \n   @param {HTMLElement} item\n   The item that was attached to the collection.\n \n   @emits {coral-collection:add}\n   \n   @protected\n   */\n  _onItemAttached(item) {\n    // if options.onItemAdded was provided, we call the function\n    if (typeof this._onItemAdded === 'function') {\n      this._onItemAdded.call(this._host, item);\n    }\n  \n    // the usage of trigger assumes that the host is a coral component\n    this._host.trigger('coral-collection:add', {item});\n  }\n  \n  /**\n   Handles the detachment of a item to the collection. It triggers automatically the collection event.\n   \n   @param {HTMLElement} item\n   The item that was detached of the collection\n   \n   @emits {coral-collection:remove}\n   \n   @protected\n   */\n  _onItemDetached(item) {\n    // if options.onItemRemoved was provided, we call the function\n    if (typeof this._onItemRemoved === 'function') {\n      this._onItemRemoved.call(this._host, item);\n    }\n  \n    // the usage of trigger assumes that the host is a coral component\n    this._host.trigger('coral-collection:remove', {item});\n  }\n  \n  /**\n   Enables the automatic detection of collection items. The collection will take care of triggering the appropriate\n   collection event when an item is added or removed, as well the related callbacks. Components can decide to skip the\n   initialization of the starting items by providing <code>skipInitialItems</code> as <code>false</code>.\n   \n   @param {Boolean} [skipInitialItems=false]\n   If <code>true</code>, <code>onItemAdded</code> will be called for every starting item. A collection event will not\n   be triggered for these items.\n   \n   @protected\n   */\n  _startHandlingItems(skipInitialItems) {\n    if (this._host && this._container) {\n      // we reuse the observer if it already exists, this way we do not need to disconnect it if this function is called\n      // again\n      this._observer = this._observer || new MutationObserver(this._handleMutation.bind(this));\n    \n      // this changes the way that _onItemAdded and _onItemRemoved behave, since they well be delayed until a mutation\n      // detects them\n      this._handleItems = true;\n    \n      this._observer.observe(this._container, {\n        // we only need to observe for items that were added and removed, no need to check attributes and contents\n        childList: true,\n        // we need to listen to subtree mutations as items may not be direct children\n        subtree: true\n      });\n    \n      // by default we handle the initial items unless otherwise indicated\n      if (skipInitialItems !== true) {\n        // since we are handling the items for the component, we need to make sure the _onItemAdded is called for the\n        // initial items. collection events will not be triggered for these items as they represent the initial state\n        let items;\n        let itemCount = 0;\n      \n        if (typeof this._onItemAdded === 'function' || typeof this._onCollectionChange === 'function') {\n          items = this.getAll();\n          itemCount = items.length;\n        }\n      \n        if (typeof this._onItemAdded === 'function') {\n          for (let i = 0; i < itemCount; i++) {\n            this._onItemAdded.call(this._host, items[i]);\n          }\n        }\n      \n        // we only call the _onCollectionChange callback if there are items inside the collection\n        if (itemCount > 0 && typeof this._onCollectionChange === 'function') {\n          this._onCollectionChange.call(this._host, items, []);\n        }\n      }\n    }\n    else {\n      throw new Error('Please provide options.host and/or options.container to enable handling the items.');\n    }\n  }\n  \n  /**\n   Stops handling the items.\n   \n   @protected\n   */\n  _stopHandlingItems() {\n    if (this._observer) {\n      this._observer.disconnect();\n    }\n  }\n  \n  /**\n   Handles every time that an element is added or removed from the <code>options.container</code>. By default the\n   collection events will be triggered. If <code>options.onItemAdded</code> or <code>options.onItemRemoved</code> were\n   provided, they will be called where it applies.\n   \n   @param Array.<Object> mutations\n   Array that contains the <code>MutationRecord> relevant to every registered mutation.\n   \n   @protected\n   */\n  _handleMutation(mutations) {\n    let mutation;\n    const mutationsCount = mutations.length;\n    let item;\n    let addedNodes;\n    let addedNodesCount;\n    let removedNodes;\n    let removedNodesCount;\n    const validAddedNodes = [];\n    const validRemovedNodes = [];\n  \n    // we need to count every addition and removal to notify the component that the collection changed\n    let itemChanges = 0;\n    for (let i = 0; i < mutationsCount; i++) {\n      mutation = mutations[i];\n    \n      addedNodes = mutation.addedNodes;\n      addedNodesCount = addedNodes.length;\n      for (let j = 0; j < addedNodesCount; j++) {\n        item = addedNodes[j];\n      \n        // filters the item\n        if (this._isPartOfCollection(item)) {\n          itemChanges++;\n          validAddedNodes.push(item);\n          this._onItemAttached(item);\n        }\n      }\n    \n      removedNodes = mutation.removedNodes;\n      removedNodesCount = removedNodes.length;\n      for (let k = 0; k < removedNodesCount; k++) {\n        item = removedNodes[k];\n      \n        // filters the item\n        if (this._isPartOfCollection(item)) {\n          itemChanges++;\n          validRemovedNodes.push(item);\n          this._onItemDetached(item);\n        }\n      }\n    }\n  \n    // if changes were done to the collection we need to notify the component. we do this after all the mutations were\n    // processed to make sure we only do it once\n    if (itemChanges !== 0 && typeof this._onCollectionChange === 'function' && this._host) {\n      this._onCollectionChange.call(this._host, validAddedNodes, validRemovedNodes);\n    }\n  }\n  \n  /**\n   Triggered when an item is added to the {@link Collection}. {@link Collection} events are not synchronous so the DOM\n   may reflect a different reality although every addition or removal will be reported.\n   \n   @typedef {CustomEvent} coral-collection:add\n   \n   @property {HTMLElement} detail.item\n   The item that was added.\n   */\n  \n  /**\n   Triggered when an item is removed from a {@link Collection}. {@link Collection} events are not synchronous so the DOM\n   may reflect a different reality although every addition or removal will be reported.\n   \n   @typedef {CustomEvent} coral-collection:remove\n   \n   @property {HTMLElement} detail.item\n   The item that was removed.\n   */\n  \n  /**\n   Signature of the function called to determine if an element should be included in the {@link Collection}. If the function\n   returns <code>true</code> for the given element it will be part of the collection, otherwise it will be excluded.\n   \n   @typedef {function} CollectionFilter\n   \n   @param {HTMLElement} element\n   The item to check whether it should be part of the collection.\n   \n   @returns {Boolean} true if should be part of the collection, otherwise false.\n   */\n  \n  /**\n   Signature of the function called when ever an item is added to the {@link Collection}.\n   \n   @typedef {function} CollectionOnItemAdded\n   \n   @param {HTMLElement} item\n   The item that was added to the collection.\n   */\n  \n  /**\n   Signature of the function called when ever an item is removed from the {@link Collection}.\n \n   @typedef {function} CollectionOnItemRemoved\n   \n   @param {HTMLElement} item\n   The item that was added to the collection.\n   */\n  \n  /**\n   Signature of the function called when there is a change in the {@link Collection}. The items that where added and removed\n   will be provided.\n \n   @typedef {function} CollectionOnChange\n   \n   @param {Array.<HTMLElement>} addedNodes\n   An array that contains the items that were added to the collection.\n   @param {Array.<HTMLElement>} removedNodes\n   An array that contains the items that were removed from the collection.\n   */\n}\n\nexport default Collection;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport Collection from './Collection';\nimport listToArray from './listToArray';\n\n/**\n Collection capable of handling non-nested items with a selected attribute. It is useful to manage the\n internal state of selection. It currently does not support options.filter for the selection related functions.\n */\nclass SelectableCollection extends Collection {\n  constructor(options) {\n    super(options);\n  \n    if (this._filter) {\n      console.warn('Coral.SelectableCollection does not support the options.filter');\n    }\n  \n    // disabled items will not be a selection candicate although hidden items might\n    this._selectableItemSelector = this._allItemsSelector.split(',').map(selector => `${selector}:not([disabled])`).join(',');\n    this._selectedItemSelector = this._allItemsSelector.split(',').map(selector => `${selector}[selected]`).join(',');\n    this._deselectAllExceptSelector = this._selectedItemSelector;\n  }\n  \n  /**\n   Returns the selectable items. Items that are disabled quality for selection. On the other hand, hidden items\n   can be selected as this is the default behavior in HTML. Please note that an already selected item could be\n   returned, since the selection could be toggled.\n   \n   @returns {Array.<HTMLElement>}\n   an array of items whose selection could be toggled.\n   \n   @protected\n   */\n  _getSelectableItems() {\n    return listToArray(this._host.querySelectorAll(this._selectableItemSelector));\n  }\n  \n  /**\n   Returns the first selectable item. Items that are disabled quality for selection. On the other hand, hidden items\n   can be selected as this is the default behavior in HTML. Please note that an already selected item could be\n   returned, since the selection could be toggled.\n   \n   @returns {HTMLElement}\n   an item whose selection could be toggled.\n   \n   @protected\n   */\n  _getFirstSelectable() {\n    return this._host.querySelector(this._selectableItemSelector) || null;\n  }\n  \n  /**\n   Returns the last selectable item. Items that are disabled quality for selection. On the other hand, hidden items\n   can be selected as this is the default behavior in HTML. Please note that an already selected item could be\n   returned, since the selection could be toggled.\n   \n   @returns {HTMLElement}\n   an item whose selection could be toggled.\n   \n   @protected\n   */\n  _getLastSelectable() {\n    const items = this._host.querySelectorAll(this._selectableItemSelector);\n    return items[items.length - 1] || null;\n  }\n  \n  /**\n   Returns the previous selectable item.\n \n   @param {HTMLElement} item\n   The reference item.\n   \n   @returns {HTMLElement}\n   an item whose selection could be toggled.\n   \n   @protected\n   */\n  _getPreviousSelectable(item) {\n    let sibling = item.previousElementSibling;\n    while (sibling) {\n      if (sibling.matches(this._selectableItemSelector)) {\n        break;\n      }\n      else {\n        sibling = sibling.previousElementSibling;\n      }\n    }\n    \n    return sibling || item;\n  }\n  \n  /**\n   Returns the net selectable item.\n   \n   @param {HTMLElement} item\n   The reference item.\n   \n   @returns {HTMLElement}\n   an item whose selection could be toggled.\n   \n   @protected\n   */\n  _getNextSelectable(item) {\n    let sibling = item.nextElementSibling;\n    while (sibling) {\n      if (sibling.matches(this._selectableItemSelector)) {\n        break;\n      }\n      else {\n        sibling = sibling.nextElementSibling;\n      }\n    }\n    \n    return sibling || item;\n  }\n  \n  /**\n   Returns the first item that is selected in the Collection. It allows to configure the attribute used for selection\n   so that components that use 'selected' and 'active' can share the same implementation.\n   \n   @param {String} [selectedAttribute=selected]\n   the attribute that will be used to check for selection.\n   \n   @returns HTMLElement the first selected item.\n   \n   @protected\n   */\n  _getFirstSelected(selectedAttribute) {\n    let selector = this._selectedItemSelector;\n  \n    if (typeof selectedAttribute === 'string') {\n      selector = selector.replace('[selected]', `[${selectedAttribute}]`);\n    }\n  \n    return this._host.querySelector(selector) || null;\n  }\n  \n  /**\n   Returns the last item that is selected in the Collection. It allows to configure the attribute used for selection\n   so that components that use 'selected' and 'active' can share the same implementation.\n   \n   @param {String} [selectedAttribute=selected]\n   the attribute that will be used to check for selection.\n   \n   @returns HTMLElment the last selected item.\n   \n   @protected\n   */\n  _getLastSelected(selectedAttribute) {\n    let selector = this._selectedItemSelector;\n  \n    if (typeof selectedAttribute === 'string') {\n      selector = selector.replace('[selected]', `[${selectedAttribute}]`);\n    }\n  \n    // last-of-type did not work so we need to query all\n    const items = this._host.querySelectorAll(selector);\n    return items[items.length - 1] || null;\n  }\n  \n  /**\n   Returns an array that contains all the items that are selected.\n   \n   @param {String} [selectedAttribute=selected]\n   the attribute that will be used to check for selection.\n   \n   @protected\n   \n   @returns Array.<HTMLElement> an array with all the selected items.\n   */\n  _getAllSelected(selectedAttribute) {\n    let selector = this._selectedItemSelector;\n  \n    if (typeof selectedAttribute === 'string') {\n      selector = selector.replace('[selected]', `[${selectedAttribute}]`);\n    }\n  \n    return listToArray(this._host.querySelectorAll(selector));\n  }\n  \n  /**\n   Deselects all the items except the first selected item in the Collection. By default the <code>selected</code>\n   attribute will be removed. The attribute to remove is configurable via the <code>selectedAttribute</code> parameter.\n   The selected attribute will be removed no matter if the item is <code>disabled</code> or <code>hidden</code>.\n   \n   @param {String} [selectedAttribute=selected]\n   the attribute that will be used to check for selection. This attribute will be removed from the matching elements.\n   \n   @protected\n   */\n  _deselectAllExceptFirst(selectedAttribute) {\n    let selector = this._deselectAllExceptSelector;\n    const attributeToRemove = selectedAttribute || 'selected';\n  \n    if (typeof selectedAttribute === 'string') {\n      selector = selector.replace('[selected]', `[${selectedAttribute}]`);\n    }\n  \n    // we select all the selected attributes except the last one\n    const items = this._host.querySelectorAll(selector);\n    const itemsCount = items.length;\n  \n    // ignores the first item of the list, everything else is deselected\n    for (let i = 1; i < itemsCount; i++) {\n      // we use remoteAttribute since we do not know if the element is upgraded\n      items[i].removeAttribute(attributeToRemove);\n    }\n  }\n  \n  /**\n   Deselects all the items except the last selected item in the Collecton. By default the <code>selected</code>\n   attribute will be removed. The attribute to remove is configurable via the <code>selectedAttribute</code> parameter.\n   \n   @param {String} [selectedAttribute=selected]\n   the attribute that will be used to check for selection. This attribute will be removed from the matching elements.\n   \n   @protected\n   */\n  _deselectAllExceptLast(selectedAttribute) {\n    let selector = this._deselectAllExceptSelector;\n    const attributeToRemove = selectedAttribute || 'selected';\n  \n    if (typeof selectedAttribute === 'string') {\n      selector = selector.replace('[selected]', `[${selectedAttribute}]`);\n    }\n  \n    // we query for all matching items with the given attribute\n    const items = this._host.querySelectorAll(selector);\n    // we ignore the last item\n    const itemsCount = items.length - 1;\n  \n    for (let i = 0; i < itemsCount; i++) {\n      // we use remoteAttribute since we do not know if the element is upgraded\n      items[i].removeAttribute(attributeToRemove);\n    }\n  }\n  \n  /**\n   Deselects all the items except the given item. The provided attribute will be remove from all matching items. By\n   default the <code>selected</code> attribute will be removed. The attribute to remove is configurable via the\n   <code>selectedAttribute</code> parameter.\n   \n   @name Coral.SelectableCollection#_deselectAllExcept\n   @function\n   \n   @param {HTMLElement} [itemOrSelectedAttribute]\n   The item to keep selected. If the item is not provided, all elements will be deselected.\n   \n   @param {String} [selectedAttribute=selected]\n   the attribute that will be used to check for selection. This attribute will be removed from the matching elements.\n   \n   @protected\n   */\n  _deselectAllExcept(itemOrSelectedAttribute, selectedAttribute) {\n    // if no selectedAttribute we use the unmodified selector as default\n    let selector = this._deselectAllExceptSelector;\n  \n    let item;\n    let attributeToRemove;\n    // an item was not provided so we use it as 'selectedAttribute'\n    if (typeof itemOrSelectedAttribute === 'string') {\n      item = null;\n      attributeToRemove = itemOrSelectedAttribute || 'selected';\n      selector = selector.replace('[selected]', `[${attributeToRemove}]`);\n    }\n    else {\n      item = itemOrSelectedAttribute;\n      attributeToRemove = selectedAttribute || 'selected';\n    \n      if (typeof selectedAttribute === 'string') {\n        selector = selector.replace('[selected]', `[${attributeToRemove}]`);\n      }\n    }\n  \n    // we query for all matching items with the given attribute\n    const items = this._host.querySelectorAll(selector);\n    const itemsCount = items.length;\n  \n    for (let i = 0; i < itemsCount; i++) {\n      // we use remoteAttribute since we do not know if the element is upgraded\n      if (item !== items[i]) {\n        items[i].removeAttribute(attributeToRemove);\n      }\n    }\n  }\n}\n\nexport default SelectableCollection;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n// Used to store DateTimeFormat\nconst dateTimeFormats = {};\n\n// Default supported format\nconst DEFAULT_FORMAT = 'YYYY-MM-DD';\n\nconst transform2digit = (value) => {\n  const s = value.toString();\n  return s.length === 1 ? `0${s}` : s;\n};\n\n// Default locale\nlet globalLocale = document.documentElement.lang || window.navigator.language || 'en-US';\n\n// Uses Intl.DateTimeFormat to return a formatted date string\nconst formatDate = function(date, locale, options) {\n  let formattedDateString = '';\n  try {\n    const key = `${JSON.stringify(locale)}${JSON.stringify(options)}`;\n    const dateTimeFormat = dateTimeFormats[key];\n  \n    // Use existing DateTimeFormat or create new one\n    if (!dateTimeFormat) {\n      dateTimeFormats[key] = new window.Intl.DateTimeFormat(locale, options);\n    }\n  \n    // Format to string\n    formattedDateString = dateTimeFormats[key].format(date);\n  }\n  catch (e) {\n    console.warn(e.message);\n  }\n  \n  return formattedDateString;\n};\n\n/**\n The DateTime API is used as fallback to {@link momentJS}.\n \n @param {DateTime|Date|Array<Number>|String} value\n The initial date value. If none provided, the current day is used instead.\n */\nclass DateTime {\n  /**\n  @see https://momentjs.com/docs/#/parsing/now/\n  */\n  constructor(value) {\n    if (value instanceof this.constructor) {\n      // Copy properties\n      this._locale = value._locale;\n      this._value = value._value;\n      this._date = value._date;\n    }\n    else {\n      this._locale = globalLocale;\n      this._value = value;\n      \n      // Support Array\n      if (Array.isArray(value)) {\n        this._date = value.length ? new Date(value[0], value[1] || 0, value[2] || 1) : new Date();\n      }\n      else if (typeof value === 'string') {\n        const isTime = value.indexOf(':') === 2;\n  \n        // For time, we only need to set hours and minutes using current date\n        if (isTime) {\n          const time = value.split(':');\n          const hours = parseInt(time[0], 10);\n          const minutes = parseInt(time[1], 10);\n    \n          if (hours >= 0 && hours <= 23 && minutes >= 0 && minutes <= 59) {\n            this._date = new Date();\n            this._date.setHours(time[0]);\n            this._date.setMinutes(time[1]);\n          }\n          else {\n            this._date = new Date('Invalid Date');\n          }\n        }\n        else {\n          // If string is invalid, the date will be invalid too\n          // \"replace\" fixes the one day off issue\n          this._date = new Date(this._value.replace(/-/g, '\\/').replace(/T.+/, ''));\n        }\n      }\n      else if (this._value === null) {\n        this._date = new Date('Invalid Date');\n      }\n      else {\n        // Create a Date instance from the value or use current day if value is missing\n        this._date = this._value ? new Date(this._value) : new Date();\n      }\n    }\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/i18n/instance-locale/\n   */\n  locale(value) {\n    if (value) {\n      this._locale = value;\n    }\n    \n    return this._locale;\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/displaying/as-javascript-date/\n   */\n  toDate() {\n    return this._date;\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/parsing/moment-clone/\n   */\n  clone() {\n    const clone = new this.constructor(this._value);\n    clone._date = this._date;\n    return clone;\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/displaying/format/\n   */\n  format(format) {\n    let formattedDateString = '';\n    \n    if (!format) {\n      format = DEFAULT_FORMAT;\n    }\n    \n    if (format === DEFAULT_FORMAT) {\n      formattedDateString += this._date.getFullYear();\n      formattedDateString += '-';\n      formattedDateString += transform2digit(this._date.getMonth() + 1);\n      formattedDateString += '-';\n      formattedDateString += transform2digit(this._date.getDate());\n    }\n    else if (format === 'MMMM YYYY') {\n      formattedDateString += formatDate(this._date, this._locale, {month: 'long'});\n      formattedDateString += ' ';\n      formattedDateString += this._date.getFullYear();\n    }\n    else if (format === 'LL') {\n      formattedDateString += formatDate(this._date, this._locale, {\n        month: 'long',\n        year: 'numeric',\n        day: '2-digit'\n      });\n    }\n    else if (format === 'dd') {\n      formattedDateString += formatDate(this._date, this._locale, {weekday: 'short'});\n    }\n    else if (format === 'dddd') {\n      formattedDateString += formatDate(this._date, this._locale, {weekday: 'long'});\n    }\n    else if (format === 'HH:mm') {\n      formattedDateString += transform2digit(this._date.getHours());\n      formattedDateString += ':';\n      formattedDateString += transform2digit(this._date.getMinutes());\n    }\n    else if (format === 'HH') {\n      formattedDateString += transform2digit(this._date.getHours());\n    }\n    else if (format === 'mm') {\n      formattedDateString += transform2digit(this._date.getMinutes());\n    }\n    else if (format === 'YYYY-MM-DD[T]HH:mmZ') {\n      formattedDateString += this._date.getFullYear();\n      formattedDateString += '-';\n      formattedDateString += transform2digit(this._date.getMonth() + 1);\n      formattedDateString += '-';\n      formattedDateString += transform2digit(this._date.getDate());\n      \n      formattedDateString += 'T';\n  \n      formattedDateString += transform2digit(this._date.getHours());\n      formattedDateString += ':';\n      formattedDateString += transform2digit(this._date.getMinutes());\n  \n      const timezone = -1 * (this._date.getTimezoneOffset() / 60);\n      let abs = Math.abs(timezone);\n      abs = abs < 10 ? `0${abs}` : abs.toString();\n      \n      formattedDateString += timezone < 0 ? `-${abs}:00` : `+${abs}:00`;\n    }\n    else {\n      format = typeof format === 'object' ? format : {};\n      formattedDateString = formatDate(this._date, this._locale, format);\n    }\n    \n    return formattedDateString;\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/get-set/year/\n   */\n  year() {\n    return this._date.getFullYear();\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/get-set/month/\n   */\n  month() {\n    return this._date.getMonth();\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/get-set/week/\n   */\n  week() {\n    // Source : https://stackoverflow.com/questions/6117814/get-week-of-year-in-javascript-like-in-php\n    const date = new Date(Date.UTC(this._date.getFullYear(), this._date.getMonth(), this._date.getDate()));\n    const dayNum = date.getUTCDay() || 7;\n    date.setUTCDate(date.getUTCDate() + 4 - dayNum);\n    const yearStart = new Date(Date.UTC(date.getUTCFullYear(), 0, 1));\n    return Math.ceil(((date - yearStart) / 86400000 + 1) / 7);\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/get-set/day/\n   */\n  day(day) {\n    if (typeof day === 'number') {\n      this._date.setDate(this._date.getDate() - (this._date.getDay() || 7) + day);\n      \n      return this;\n    }\n    \n    return this._date.getDay();\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/get-set/hour/\n   */\n  hours(hours) {\n    if (typeof hours === 'number') {\n      this._date.setHours(hours);\n      \n      return this;\n    }\n    \n    return this._date.getHours();\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/get-set/minute/\n   */\n  minutes(minutes) {\n    if (typeof minutes === 'number') {\n      this._date.setMinutes(minutes);\n  \n      return this;\n    }\n    \n    return this._date.getMinutes();\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/get-set/date/\n   */\n  date() {\n    return this._date.getDate();\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/manipulating/add/\n   */\n  add(value, type) {\n    if (type.indexOf('month') === 0) {\n      this._date.setMonth(this._date.getMonth() + value);\n    }\n    else if (type.indexOf('day') === 0) {\n      this._date.setDate(this._date.getDate() + value);\n    }\n    \n    return this;\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/manipulating/subtract/\n   */\n  subtract(value, type) {\n    if (type.indexOf('month') === 0) {\n      this._date.setMonth(this._date.getMonth() - value);\n    }\n    else if (type.indexOf('day') === 0) {\n      this._date.setDate(this._date.getDate() - value);\n    }\n    \n    return this;\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/displaying/difference/\n   */\n  diff(obj) {\n    const diff = this._date.getTime() - obj._date.getTime();\n    \n    return diff / 86400000;\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/manipulating/start-of/\n   */\n  startOf(value) {\n    if (value === 'day') {\n      // Today\n      this._date = new Date(this._date.getFullYear(), this._date.getMonth(), this._date.getDate());\n    }\n    else if (value === 'month') {\n      this._date = new Date(this._date.getFullYear(), this._date.getMonth(), 1);\n    }\n    else if (value === 'year') {\n      this._date = new Date(new Date().getFullYear(), 0, 1);\n    }\n    \n    return this;\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/query/is-before/\n   */\n  isBefore(coralDate, unit) {\n    if (coralDate && coralDate._date) {\n      return unit ? coralDate[unit]() > this[unit]() : coralDate._date > this._date;\n    }\n    \n    return false;\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/query/is-after/\n   */\n  isAfter(coralDate, unit) {\n    if (coralDate && coralDate._date) {\n      return unit ? coralDate[unit]() < this[unit]() : coralDate._date < this._date;\n    }\n    \n    return false;\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/query/is-same/\n   */\n  isSame(obj, type) {\n    if (type === 'hour') {\n      return obj && obj.clone()._date.getHours() === this.clone()._date.getHours();\n    }\n    else if (type === 'minute') {\n      return obj && obj.clone()._date.getMinutes() === this.clone()._date.getMinutes();\n    }\n    else if (type === 'day') {\n      return obj && obj.clone().startOf('day')._date.getTime() === this.clone().startOf('day')._date.getTime();\n    }\n    \n    return obj && obj.clone()._date.getTime() === this.clone()._date.getTime();\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/parsing/is-valid/\n   */\n  isValid() {\n    return this._date.toString() !== 'Invalid Date';\n  }\n  \n  /**\n   @ignore\n   Not supported so we return an empty object\n   */\n  static localeData() {\n    return {};\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/i18n/changing-locale/\n   */\n  static locale(value) {\n    if (value) {\n      globalLocale = value;\n    }\n    \n    return globalLocale;\n  }\n  \n  /**\n   @see https://momentjs.com/docs/#/query/is-a-moment/\n   */\n  static isMoment(obj) {\n    return obj instanceof this;\n  }\n  \n  /**\n   @return {momentJS|DateTime}\n   */\n  static get Moment() {\n    return window.moment || this;\n  }\n}\n\nexport default DateTime;\n","import '../coralui-externals';\nimport DateTime from './src/scripts/DateTime';\n\n// Set moment global locale if provided\nif (typeof window.moment !== 'undefined') {\n  window.moment.locale(document.documentElement.lang || window.navigator.language || 'en');\n}\n\nexport {DateTime};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {Vent} from '../../../coralui-externals';\nimport {events, validate, transform, commons} from '../../../coralui-util';\n\n// Attributes\nconst DROP_ZONE_ATTRIBUTE = 'coral-dragaction-dropzone';\nconst HANDLE_ATTRIBUTE = 'coral-dragaction-handle';\nconst AXIS_ATTRIBUTE = 'coral-dragaction-axis';\nconst SCROLL_ATTRIBUTE = 'coral-dragaction-scroll';\nconst CONTAINMENT_ATTRIBUTE = 'coral-dragaction-containment';\n\n// Classes\nconst OPEN_HAND_CLASS = 'u-coral-openHand';\nconst CLOSE_HAND_CLASS = 'u-coral-closedHand';\nconst IS_DRAGGING_CLASS = 'is-dragging';\n\n// Scroll offset default values\nconst DEFAULT_SCROLL_OFFSET = 20;\nconst DEFAULT_SCROLL_BY = 10;\n\n/**\n Enumeration for {@link DragAction} axis restrictions.\n \n @typedef {Object} DragActionAxisEnum\n \n @property {String} FREE\n Allows vertically and horizontally dragging.\n @property {String} VERTICAL\n Allows vertically dragging only.\n @property {String} HORIZONTAL\n Allows horizontally dragging only.\n */\nconst axis = {\n  FREE: 'free',\n  VERTICAL: 'vertical',\n  HORIZONTAL: 'horizontal'\n};\n\n/**\n @ignore\n @param {HTMLElement} element\n @returns {HTMLElement}\n First parent element with overflow [hidden|scroll|auto]\n */\nfunction getViewContainer(element) {\n  while (element) {\n    const p = element.parentNode;\n    \n    if (!p) {\n      return p;\n    }\n    if (p.matches('body')) {\n      return p;\n    }\n  \n    const computedStyle = window.getComputedStyle(p);\n    const overflow = computedStyle.overflow;\n  \n    // IE11 can return a value for overflow even if it was not set compared to other browsers so we check for X and Y.\n    const overflowX = computedStyle.overflowX;\n    const overflowY = computedStyle.overflowY;\n  \n    if ((overflow === 'hidden' || overflow === 'auto' || overflow === 'scroll') &&\n      // @polyfill IE11\n      overflow === overflowX && overflow === overflowY) {\n      return p;\n    }\n    \n    element = p;\n  }\n}\n\n/**\n @ignore\n @param {String|HTMLElement|NodeList} el\n @returns {Array.<HTMLElement>}\n X and y position whether event was generated by a click or a touch\n */\nfunction transformToArray(el) {\n  if (typeof el === 'string') {\n    return Array.prototype.slice.call(document.querySelectorAll(el));\n  }\n  else if (el instanceof HTMLElement) {\n    return [el];\n  }\n  else if (Object.prototype.toString.call(el) === '[object NodeList]') {\n    return Array.prototype.slice.call(el);\n  }\n}\n\n/**\n @ignore\n @param {Object} event\n @returns {Object}\n X and y position whether event was generated by a click or a touch\n */\nfunction getPagePosition(event) {\n  let touch = {};\n  \n  if (event.changedTouches && event.changedTouches.length > 0) {\n    touch = event.changedTouches[0];\n  }\n  else if (event.touches && event.touches.length > 0) {\n    touch = event.touches[0];\n  }\n  \n  return {\n    x: touch.pageX || event.pageX,\n    y: touch.pageY || event.pageY\n  };\n}\n\n/**\n @ignore\n @param {HTMLElement} scrollingElement\n element that scrolls the document\n @param {HTMLElement} a\n @param {HTMLElement} b\n @returns {Boolean}\n Whether a is within b bounds\n */\nfunction within(scrollingElement, a, b) {\n  const aBoundingClientRect = a.getBoundingClientRect();\n  const bBoundingClientRect = b.getBoundingClientRect();\n  const documentScrollTop = scrollingElement.scrollTop;\n  const documentScrollLeft = scrollingElement.scrollLeft;\n  \n  const al = aBoundingClientRect.left + documentScrollLeft;\n  const ar = al + aBoundingClientRect.width;\n  const bl = bBoundingClientRect.left + documentScrollLeft;\n  const br = bl + bBoundingClientRect.width;\n  \n  const at = aBoundingClientRect.top + documentScrollTop;\n  const ab = at + aBoundingClientRect.height;\n  const bt = bBoundingClientRect.top + documentScrollTop;\n  const bb = bt + bBoundingClientRect.height;\n  \n  return !(bl > ar || br < al || (bt > ab || bb < at));\n}\n\n/**\n @ignore\n @param {DragAction} self\n Coral.DragAction instance\n @returns {HTMLElement}\n The dropzone that is being hovered by the dragged element or null if none\n */\nfunction isOverDropZone(self) {\n  let el = null;\n  if (self._dropZones && self._dropZones.length) {\n    self._dropZones.some((dropZone) => {\n      if (within(self._scrollingElement, self._dragElement, dropZone)) {\n        el = dropZone;\n        return true;\n      }\n      \n      return false;\n    });\n  }\n  \n  return el;\n}\n\n/**\n @class Coral.DragAction\n @classdesc This a decorator which adds draggable functionality to elements.\n To define draggable actions on specific elements, handles can be used.\n A handle is given a special attribute :\n - <code>coral-dragaction</code> attribute adds draggable functionality to the corresponding element.\n - <code>coral-dragaction-handle</code> attribute allows dragging only by dragging the specified handle.\n - <code>coral-dragaction-dropzone</code> attribute is used to indicate possible dropzones making it possible\n to build drag-and-drop enabled interfaces in conjunction with <code>DragAction</code> events.\n - <code>coral-dragaction-axis</code> and setting it to either <code>horizontal</code> or <code>vertical</code>,\n it is possible to restrict the drag'n'drop to a single axis.\n - <code>coral-dragaction-scroll</code> attribute will scroll the container when the draggable is moved beyond the viewport.\n - <code>coral-dragaction-containment</code>, the draggable element will be constrained to its container.\n @param {String|HTMLElement} dragElement\n The draggable element.\n */\nclass DragAction {\n  /**\n   Takes the {HTMLElement} to be dragged as argument.\n   \n   @param {HTMLElement} dragElement\n   */\n  constructor(dragElement) {\n    if (!dragElement) {\n      throw new Error('Coral.DragAction: dragElement is missing');\n    }\n  \n    let el = null;\n    if (dragElement instanceof HTMLElement) {\n      el = dragElement;\n    }\n    else if (typeof dragElement === 'string') {\n      el = document.querySelector(dragElement);\n      if (!el) {\n        throw new Error('Coral.DragAction: dragElement is null');\n      }\n    }\n  \n    this._id = commons.getUID();\n    this._dragElementValue = dragElement;\n    this._dragElement = el;\n  \n    // Destroy instance if existing\n    if (this._dragElement.dragAction) {\n      this._dragElement.dragAction.destroy();\n    }\n  \n    const computedStyle = window.getComputedStyle(this._dragElement);\n  \n    // Store initial position\n    this._initialPosition = {\n      position: computedStyle.position,\n      left: computedStyle.left,\n      top: computedStyle.top\n    };\n  \n    // Prepare Vent\n    this._dragEvents = new Vent(this._dragElement);\n  \n    // Handle options. Binds events to dragElement if no handles defined or found\n    this.handle = this._dragElement.getAttribute(HANDLE_ATTRIBUTE);\n  \n    // DropZone options\n    this.dropZone = this._dragElement.getAttribute(DROP_ZONE_ATTRIBUTE);\n  \n    // Axis horizontal|vertical\n    this.axis = this._dragElement.getAttribute(AXIS_ATTRIBUTE);\n  \n    // Scroll options\n    this.scroll = this._dragElement.matches(`[${SCROLL_ATTRIBUTE}]`);\n  \n    // Restriction to container\n    this.containment = this._dragElement.matches(`[${CONTAINMENT_ATTRIBUTE}]`);\n  \n    this._drag = this._drag.bind(this);\n    this._dragEnd = this._dragEnd.bind(this);\n  \n    events.on(`touchmove.CoralDragAction${this._id}`, this._drag);\n    events.on(`mousemove.CoralDragAction${this._id}`, this._drag);\n    events.on(`touchend.CoralDragAction${this._id}`, this._dragEnd);\n    events.on(`mouseup.CoralDragAction${this._id}`, this._dragEnd);\n  \n    // Store reference on dragElement\n    this._dragElement.dragAction = this;\n  }\n  \n  /**\n   The draggable element.\n   \n   @name dragElement\n   @readonly\n   @type {String|HTMLElement}\n   @htmlattribute coral-dragaction\n   */\n  get dragElement() {\n    return this._dragElementValue;\n  }\n  \n  /**\n   The handle allowing to drag the element.\n   \n   @name handle\n   @type {String|HTMLElement}\n   @htmlattribute coral-dragaction-handle\n   */\n  get handle() {\n    return this._handle;\n  }\n  set handle(value) {\n    // Set new value\n    this._handle = value;\n  \n    // Unbind events\n    this._dragEvents.off('.CoralDragAction');\n  \n    // Remove classes\n    document.body.classList.remove(CLOSE_HAND_CLASS);\n    this._dragElement.classList.remove(IS_DRAGGING_CLASS);\n    if (this._handles && this._handles.length) {\n      this._handles.forEach((handle) => {\n        handle._dragEvents.off('.CoralDragAction');\n        handle.classList.remove(OPEN_HAND_CLASS);\n      });\n    }\n    else {\n      this._dragElement.classList.remove(OPEN_HAND_CLASS);\n    }\n  \n    if (typeof value === 'string' ||\n      value instanceof HTMLElement ||\n      Object.prototype.toString.call(value) === '[object NodeList]') {\n    \n      this._handles = transformToArray(value);\n    \n      // Bind events\n      if (this._handles && this._handles.length) {\n        const self = this;\n        this._handles.forEach((handle) => {\n          handle._dragEvents = handle._dragEvents || new Vent(handle);\n          handle._dragEvents.on('mousedown.CoralDragAction', self._dragStart.bind(self));\n          handle._dragEvents.on('touchstart.CoralDragAction', self._dragStart.bind(self));\n          handle.classList.add(OPEN_HAND_CLASS);\n        });\n      }\n      else {\n        this._dragEvents.on('touchstart.CoralDragAction', this._dragStart.bind(this));\n        this._dragEvents.on('mousedown.CoralDragAction', this._dragStart.bind(this));\n        this._dragElement.classList.add(OPEN_HAND_CLASS);\n      }\n    }\n    else {\n      // Defaults to the dragElement\n      this._handles = [];\n      this._dragEvents.on('touchstart.CoralDragAction', this._dragStart.bind(this));\n      this._dragEvents.on('mousedown.CoralDragAction', this._dragStart.bind(this));\n      this._dragElement.classList.add(OPEN_HAND_CLASS);\n    }\n  }\n  \n  /**\n   The dropZone to drop the dragged element.\n   \n   @name dropZone\n   @type {String|HTMLElement}\n   @htmlattribute coral-dragaction-dropzone\n   */\n  get dropZone() {\n    return this._dropZone;\n  }\n  set dropZone(value) {\n    // Set new value\n    this._dropZone = value;\n    this._dropZoneEntered = false;\n  \n    if (typeof value === 'string' ||\n      value instanceof HTMLElement ||\n      Object.prototype.toString.call(value) === '[object NodeList]') {\n      this._dropZones = transformToArray(value);\n    }\n    else {\n      this._dropZones = [];\n    }\n  }\n  \n  /**\n   The axis to constrain drag movement. See {@link DragActionAxisEnum}.\n   \n   @name axis\n   @type {String}\n   @default DragActionAxisEnum.FREE\n   @htmlattribute coral-dragaction-axis\n   */\n  get axis() {\n    return this._axis;\n  }\n  set axis(value) {\n    value = transform.string(value);\n    this._axis = validate.enumeration(axis)(value) && value || axis.FREE;\n  }\n  \n  /**\n   Whether to scroll the container when the draggable element is moved beyond the viewport.\n   \n   @name scroll\n   @default false\n   @type {Boolean}\n   @htmlattribute coral-dragaction-scroll\n   */\n  get scroll() {\n    return this._scroll;\n  }\n  set scroll(value) {\n    this._scroll = transform.boolean(value);\n  }\n  \n  /**\n   Whether to constrain the draggable element to its container viewport.\n   \n   @name containment\n   @default false\n   @type {Boolean}\n   @htmlattribute coral-dragaction-containment\n   */\n  get containment() {\n    return this._containment;\n  }\n  set containment(value) {\n    this._containment = transform.boolean(value);\n  }\n  \n  /** @private */\n  _dragStart(event) {\n    // Container\n    this._container = getViewContainer(this._dragElement) || document.body;\n    \n    // Prevent dragging ghost image\n    if (event.target.tagName === 'IMG') {\n      event.preventDefault();\n    }\n    \n    // Prevent touchscreen windows to scroll while dragging\n    events.on('touchmove.CoralDragAction', (e) => {\n      e.preventDefault();\n    });\n    \n    document.body._overflow = window.getComputedStyle(document.body).overflow;\n    document.body.style.overflow = 'hidden';\n    \n    if (!this._container.matches('body')) {\n      this._container._overflow = window.getComputedStyle(this._container).overflow;\n      this._container.style.overflow = this.scroll ? 'scroll' : 'hidden';\n    }\n    \n    const pagePosition = getPagePosition(event);\n    const dragElementBoundingClientRect = this._dragElement.getBoundingClientRect();\n    this._dragPosition = getPagePosition(event);\n    this._dragPosition.y -= dragElementBoundingClientRect.top + this._scrollingElement.scrollTop;\n    this._dragPosition.x -= dragElementBoundingClientRect.left + this._scrollingElement.scrollLeft;\n    \n    // Handle classes\n    document.body.classList.add(CLOSE_HAND_CLASS);\n    if (this._handles && this._handles.length) {\n      this._handles.forEach((handle) => {\n        handle.classList.remove(OPEN_HAND_CLASS);\n      });\n    }\n    else {\n      this._dragElement.classList.remove(OPEN_HAND_CLASS);\n    }\n    this._dragElement.classList.add(IS_DRAGGING_CLASS);\n    \n    // Apply relative position by default\n    if (window.getComputedStyle(this._dragElement).position === 'static') {\n      this._dragElement.style.position = 'relative';\n    }\n    \n    this._dragEvents.dispatch('coral-dragaction:dragstart', {\n      detail: {\n        dragElement: this._dragElement,\n        pageX: pagePosition.x,\n        pageY: pagePosition.y\n      }\n    });\n  }\n  \n  /** @private */\n  _drag(event) {\n    if (this._dragElement.classList.contains(IS_DRAGGING_CLASS)) {\n      const self = this;\n      const pagePosition = getPagePosition(event);\n  \n      const documentScrollTop = this._scrollingElement.scrollTop;\n      const documentScrollLeft = this._scrollingElement.scrollLeft;\n  \n      const dragElementBoundingClientRect = this._dragElement.getBoundingClientRect();\n      const dragElementHeight = dragElementBoundingClientRect.height;\n      const dragElementWidth = dragElementBoundingClientRect.width;\n      const dragElementPosition = {\n        top: dragElementBoundingClientRect.top + documentScrollTop,\n        left: dragElementBoundingClientRect.left + documentScrollLeft\n      };\n      const dragElementComputedStyle = window.getComputedStyle(this._dragElement);\n      const dragElementCSSPosition = {\n        top: parseFloat(dragElementComputedStyle.top) || 0,\n        left: parseFloat(dragElementComputedStyle.left) || 0\n      };\n  \n      const containerBoundingClientRect = this._container.getBoundingClientRect();\n      const containerWidth = containerBoundingClientRect.width;\n      const containerHeight = containerBoundingClientRect.height;\n      const containerPosition = {\n        top: containerBoundingClientRect.top + documentScrollTop,\n        left: containerBoundingClientRect.left + documentScrollLeft\n      };\n      \n      self._dragEvents.dispatch('coral-dragaction:drag', {\n        detail: {\n          dragElement: self._dragElement,\n          pageX: pagePosition.x,\n          pageY: pagePosition.y\n        }\n      });\n      \n      // Remove selection\n      if (document.selection) {\n        document.selection.empty();\n      }\n      else if (window.getSelection) {\n        // @polyfill ie\n        if (window.getSelection().removeAllRanges) {\n          window.getSelection().removeAllRanges();\n        }\n      }\n      \n      // Need to scroll ?\n      if (this.scroll) {\n        // Scroll element is the document\n        if (this._container === document.body) {\n          // Scroll to the top\n          if (dragElementBoundingClientRect.top < DEFAULT_SCROLL_OFFSET) {\n            this._scrollingElement.scrollTop = documentScrollTop - DEFAULT_SCROLL_BY;\n          }\n          // Scroll to the bottom but don't go further than the maximum scroll position of the document\n          else if (dragElementBoundingClientRect.top + dragElementBoundingClientRect.height > window.innerHeight - DEFAULT_SCROLL_OFFSET &&\n            dragElementPosition.top + dragElementBoundingClientRect.height + DEFAULT_SCROLL_OFFSET < this._scrollingElement.scrollHeight) {\n            this._scrollingElement.scrollTop = documentScrollTop + DEFAULT_SCROLL_BY;\n          }\n          \n          // Scroll to the left\n          if (dragElementBoundingClientRect.left < DEFAULT_SCROLL_OFFSET) {\n            this._scrollingElement.scrollLeft = documentScrollLeft - DEFAULT_SCROLL_BY;\n          }\n          // Scroll to the right but don't go further than the maximum scroll position of the document\n          else if (dragElementBoundingClientRect.left + dragElementBoundingClientRect.width > window.innerWidth - DEFAULT_SCROLL_OFFSET &&\n            dragElementPosition.left + dragElementBoundingClientRect.width + DEFAULT_SCROLL_OFFSET < this._scrollingElement.scrollWidth) {\n            this._scrollingElement.scrollLeft = documentScrollLeft + DEFAULT_SCROLL_BY;\n          }\n        }\n        // Scroll element is an element other than the document\n        else {\n          // Scroll to the top\n          if (dragElementBoundingClientRect.top - containerBoundingClientRect.top < DEFAULT_SCROLL_OFFSET) {\n            this._container.scrollTop = this._container.scrollTop - DEFAULT_SCROLL_BY;\n          }\n          // Scroll to the bottom but don't go further than the maximum scroll position of the container\n          else if (dragElementBoundingClientRect.top - containerBoundingClientRect.top + dragElementBoundingClientRect.height > containerBoundingClientRect.height - DEFAULT_SCROLL_OFFSET &&\n            dragElementBoundingClientRect.top - containerBoundingClientRect.top + dragElementBoundingClientRect.height < containerBoundingClientRect.height) {\n            this._container.scrollTop = this._container.scrollTop + DEFAULT_SCROLL_BY;\n          }\n          \n          // Scroll to the left\n          if (dragElementBoundingClientRect.left - containerBoundingClientRect.left < DEFAULT_SCROLL_OFFSET) {\n            this._container.scrollLeft = this._container.scrollLeft - DEFAULT_SCROLL_BY;\n          }\n          // Scroll to the bottom but don't go further than the maximum scroll position of the container\n          else if (dragElementBoundingClientRect.left - containerBoundingClientRect.left + dragElementBoundingClientRect.width > containerBoundingClientRect.width - DEFAULT_SCROLL_OFFSET &&\n            dragElementBoundingClientRect.left - containerBoundingClientRect.left + dragElementBoundingClientRect.width < containerBoundingClientRect.width) {\n            this._container.scrollLeft = this._container.scrollLeft + DEFAULT_SCROLL_BY;\n          }\n        }\n      }\n      \n      // Set drag element's new position\n      const newPosition = {};\n      \n      if (this.axis !== 'horizontal') {\n        const top = pagePosition.y - this._dragPosition.y;\n        \n        // Applying container containment for y movements\n        if (this.containment) {\n          if (top >= containerPosition.top && top + dragElementHeight <= containerPosition.top + containerHeight) {\n            newPosition.top = top;\n          }\n          // put the drag element to the container's top\n          else if (pagePosition.y <= containerPosition.top) {\n            newPosition.top = containerPosition.top;\n          }\n          // put the drag element to the container's bottom\n          else if (pagePosition.y >= containerPosition.top + containerHeight) {\n            newPosition.top = containerPosition.top + containerHeight - dragElementHeight;\n          }\n        }\n        else {\n          newPosition.top = top;\n        }\n      }\n      if (this.axis !== 'vertical') {\n        const left = pagePosition.x - this._dragPosition.x;\n        \n        // Applying container containment for x movements\n        if (this.containment) {\n          if (left >= containerPosition.left && left + dragElementWidth <= containerPosition.left + containerWidth) {\n            newPosition.left = left;\n          }\n          // put the drag element to the container's left\n          else if (pagePosition.x <= containerPosition.left) {\n            newPosition.left = containerPosition.left;\n          }\n          // put the drag element to the container's right\n          else if (pagePosition.x >= containerPosition.left + containerWidth) {\n            newPosition.left = containerPosition.left + containerWidth - dragElementWidth;\n          }\n        }\n        else {\n          newPosition.left = left;\n        }\n      }\n      \n      // Set the new position\n      this._dragElement.style.top = `${newPosition.top - dragElementPosition.top + dragElementCSSPosition.top}px`;\n      this._dragElement.style.left = `${newPosition.left - dragElementPosition.left + dragElementCSSPosition.left}px`;\n      \n      // Trigger dropzone related events\n      const dropZone = isOverDropZone(self);\n      if (dropZone) {\n        self._dropElement = dropZone;\n        if (!self._dropZoneEntered) {\n          self._dropZoneEntered = true;\n          self._dragEvents.dispatch('coral-dragaction:dragenter', {\n            detail: {\n              dragElement: self._dragElement,\n              pageX: pagePosition.x,\n              pageY: pagePosition.y,\n              dropElement: self._dropElement\n            }\n          });\n        }\n        \n        self._dragEvents.dispatch('coral-dragaction:dragover', {\n          detail: {\n            dragElement: self._dragElement,\n            pageX: pagePosition.x,\n            pageY: pagePosition.y,\n            dropElement: self._dropElement\n          }\n        });\n      }\n      else if (self._dropZoneEntered) {\n        self._dragEvents.dispatch('coral-dragaction:dragleave', {\n          detail: {\n            dragElement: self._dragElement,\n            pageX: pagePosition.x,\n            pageY: pagePosition.y,\n            dropElement: self._dropElement\n          }\n        });\n        self._dropZoneEntered = false;\n      }\n    }\n  }\n  \n  /** @private */\n  _dragEnd(event) {\n    if (this._dragElement.classList.contains(IS_DRAGGING_CLASS)) {\n      const pagePosition = getPagePosition(event);\n      \n      // Restore overflow\n      document.body.style.overflow = document.body._overflow;\n      document.body._overflow = undefined;\n      \n      if (!this._container.matches('body')) {\n        this._container.style.overflow = this._container._overflow;\n        this._container._overflow = undefined;\n      }\n      \n      document.body.classList.remove(CLOSE_HAND_CLASS);\n      this._dragElement.classList.remove(IS_DRAGGING_CLASS);\n      \n      if (this._handles && this._handles.length) {\n        this._handles.forEach((handle) => {\n          handle.classList.add(OPEN_HAND_CLASS);\n        });\n      }\n      else {\n        this._dragElement.classList.add(OPEN_HAND_CLASS);\n      }\n      \n      if (this._dropZoneEntered) {\n        const dropZone = isOverDropZone(this);\n        if (dropZone) {\n          this._dropElement = dropZone;\n          this._dragEvents.dispatch('coral-dragaction:drop', {\n            detail: {\n              dragElement: this._dragElement,\n              pageX: pagePosition.x,\n              pageY: pagePosition.y,\n              dropElement: this._dropElement\n            }\n          });\n        }\n      }\n      \n      this._dragEvents.dispatch('coral-dragaction:dragend', {\n        detail: {\n          dragElement: this._dragElement,\n          pageX: pagePosition.x,\n          pageY: pagePosition.y\n        }\n      });\n    }\n  }\n  \n  /**\n   Remove draggable actions\n   \n   @function destroy\n   @param {Boolean} restorePosition\n   Whether to restore the draggable element to its initial position\n   */\n  destroy(restorePosition) {\n    // Unbind events and remove classes\n    document.body.classList.remove(CLOSE_HAND_CLASS);\n    this._dragElement.classList.remove(IS_DRAGGING_CLASS);\n    if (this._handles && this._handles.length) {\n      this._handles.forEach((handle) => {\n        handle._dragEvents.off('.CoralDragAction');\n        handle.classList.remove(OPEN_HAND_CLASS);\n      });\n    }\n    else {\n      this._dragEvents.off('.CoralDragAction');\n      this._dragElement.classList.remove(OPEN_HAND_CLASS);\n    }\n  \n    events.off(`.CoralDragAction${this._id}`);\n  \n    // Restore overflow\n    if (document.body._overflow) {\n      document.body.style.overflow = document.body._overflow;\n      document.body._overflow = undefined;\n    }\n  \n    // Container might not have been initialized\n    if (this._container) {\n      if (!this._container.matches('body') && this._container._overflow) {\n        this._container.style.overflow = this._container._overflow;\n        this._container._overflow = undefined;\n      }\n    }\n  \n    // Set to initial position\n    if (restorePosition) {\n      this._dragElement.style.position = this._initialPosition.position;\n      this._dragElement.style.top = this._initialPosition.top;\n      this._dragElement.style.left = this._initialPosition.left;\n    }\n  \n    // Remove reference\n    this._dragElement.dragAction = undefined;\n  }\n  \n  /**\n   Returns {@link DragAction} axis restrictions.\n   \n   @return {DragActionAxisEnum}\n   */\n  static get axis() { return axis; }\n  \n  /** @private */\n  get _scrollingElement() {\n    // @polyfill ie11\n    // Element that scrolls the document.\n    return document.scrollingElement || document.documentElement;\n  }\n  \n  /**\n   Triggered when the {@link DragAction#dragElement} starts to be dragged.\n \n   @typedef {CustomEvent} coral-dragaction:dragstart\n   \n   @property {HTMLElement} dragElement\n   The dragged element\n   @property {Number} pageX\n   The mouse position relative to the left edge of the document.\n   @property {Number} pageY\n   The mouse position relative to the top edge of the document.\n   */\n  \n  /**\n   Triggered when the {@link DragAction#dragElement} is being dragged.\n \n   @typedef {CustomEvent} coral-dragaction:drag\n   \n   @property {HTMLElement} dragElement\n   The dragged element\n   @property {Number} pageX\n   The mouse position relative to the left edge of the document.\n   @property {Number} pageY\n   The mouse position relative to the top edge of the document.\n   */\n  \n  /**\n   Triggered when the {@link DragAction#dragElement} stops to be dragged.\n \n   @typedef {CustomEvent} coral-dragaction:dragend\n   \n   @property {HTMLElement} dragElement\n   The dragged element\n   @property {Number} pageX\n   The mouse position relative to the left edge of the document.\n   @property {Number} pageY\n   The mouse position relative to the top edge of the document.\n   */\n  \n  /**\n   Triggered when the {@link DragAction#dragElement} enters a drop element.\n \n   @typedef {CustomEvent} coral-dragaction:dragenter\n   \n   @property {HTMLElement} dragElement\n   The dragged element\n   @property {HTMLElement} dropElement\n   The drop element\n   @property {Number} pageX\n   The mouse position relative to the left edge of the document.\n   @property {Number} pageY\n   The mouse position relative to the top edge of the document.\n   */\n  \n  /**\n   Triggered when the {@link DragAction#dragElement} is over a drop element.\n \n   @typedef {CustomEvent} coral-dragaction:dragover\n   \n   @property {HTMLElement} dragElement\n   The dragged element\n   @property {HTMLElement} dropElement\n   The drop element\n   @property {Number} pageX\n   The mouse position relative to the left edge of the document.\n   @property {Number} pageY\n   The mouse position relative to the top edge of the document.\n   */\n  \n  /**\n   Triggered when the {@link DragAction#dragElement} leaves a drop element.\n \n   @typedef {CustomEvent} coral-dragaction:dragleave\n   \n   @property {HTMLElement} dragElement\n   The dragged element\n   @property {HTMLElement} dropElement\n   The drop element\n   @property {Number} pageX\n   The mouse position relative to the left edge of the document.\n   @property {Number} pageY\n   The mouse position relative to the top edge of the document.\n   */\n  \n  /**\n   Triggered when the {@link DragAction#dragElement} is dropped on a drop element.\n \n   @typedef {CustomEvent} coral-dragaction:drop\n   \n   @property {HTMLElement} dragElement\n   The dragged element\n   @property {HTMLElement} dropElement\n   The drop element\n   @property {Number} pageX\n   The mouse position relative to the left edge of the document.\n   @property {Number} pageY\n   The mouse position relative to the top edge of the document.\n   */\n}\n\nexport default DragAction;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport DragAction from './src/scripts/DragAction';\n\n// Apply DragAction on HTML elements with the attribute \"coral-dragaction\"\ndocument.addEventListener('DOMContentLoaded', function() {\n  const elements = document.body.querySelectorAll('[coral-dragaction]');\n  for (let i = 0; i < elements.length; i++) {\n    new DragAction(elements[i]);\n  }\n});\n\nexport {DragAction};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {Vent} from '../../../coralui-externals';\nimport {commons, Keys, keys, events} from '../../../coralui-util';\n\n// Used to split events by type/target\nconst delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n\n/**\n Return the method corresponding to the method name or the function, if passed.\n @ignore\n */\nconst getListenerFromMethodNameOrFunction = function(obj, eventName, methodNameOrFunction) {\n  // Try to get the method\n  if (typeof methodNameOrFunction === 'function') {\n    return methodNameOrFunction;\n  }\n  else if (typeof methodNameOrFunction === 'string') {\n    if (!obj[methodNameOrFunction]) {\n      throw new Error(`Coral.Component: Unable to add ${eventName} listener for ${obj.toString()}, method\n      ${methodNameOrFunction} not found`);\n    }\n    \n    const listener = obj[methodNameOrFunction];\n    \n    if (typeof listener !== 'function') {\n      throw new Error(`Coral.Component: Unable to add ${eventName} listener for ${obj.toString()}, listener is a\n      ${(typeof listener)} but should be a function`);\n    }\n    \n    return listener;\n  }\n  else if (methodNameOrFunction) {\n    // If we're passed something that's truthy (like an object), but it's not a valid method name or a function, get\n    // angry\n    throw new Error(`Coral.Component: Unable to add ${eventName} listener for ${obj.toString()}, ${methodNameOrFunction}\n    is neither a method name or a function`);\n  }\n  \n  return null;\n};\n\n/**\n Add local event and key combo listeners for this component, store global event/key combo listeners for later.\n @ignore\n */\nconst delegateEvents = function() {\n  /*\n   Add listeners to new event\n   - Include in hash\n   Add listeners to existing event\n   - Override method and use super\n   Remove existing event\n   - Pass null\n   */\n  let match;\n  let eventName;\n  let eventInfo;\n  let listener;\n  let selector;\n  let elements;\n  let isGlobal;\n  let isKey;\n  let isResize;\n  let isCapture;\n  \n  for (eventInfo in this._events) {\n    listener = this._events[eventInfo];\n    \n    // Extract the event name and the selector\n    match = eventInfo.match(delegateEventSplitter);\n    eventName = `${match[1]}.CoralComponent`;\n    selector = match[2];\n    \n    if (selector === '') {\n      // instead of null because the key module checks for undefined\n      selector = undefined;\n    }\n    \n    // Try to get the method corresponding to the value in the map\n    listener = getListenerFromMethodNameOrFunction(this, eventName, listener);\n    \n    if (listener) {\n      // Always execute in the context of the object\n      // @todo is this necessary? this should be correct anyway\n      listener = listener.bind(this);\n      \n      // Check if the listener is on the window\n      isGlobal = eventName.indexOf('global:') === 0;\n      if (isGlobal) {\n        eventName = eventName.substr(7);\n      }\n      \n      // Check if the listener is a capture listener\n      isCapture = eventName.indexOf('capture:') === 0;\n      if (isCapture) {\n        // @todo Limitation: It should be possible to do capture:global:, but it isn't\n        eventName = eventName.substr(8);\n      }\n      \n      // Check if the listener is a key listener\n      isKey = eventName.indexOf('key:') === 0;\n      if (isKey) {\n        if (isCapture) {\n          throw new Error('Coral.Keys does not currently support listening to key events with capture');\n        }\n        eventName = eventName.substr(4);\n      }\n      \n      // Check if the listener is a resize listener\n      isResize = eventName.indexOf('resize') === 0;\n      if (isResize) {\n        if (isCapture) {\n          throw new Error('Coral.commons.addResizeListener does not currently support listening to resize event with capture');\n        }\n      }\n      \n      if (isGlobal) {\n        // Store for adding/removal\n        if (isKey) {\n          this._globalKeys = this._globalKeys || [];\n          this._globalKeys.push({\n            keyCombo: eventName,\n            selector: selector,\n            listener: listener\n          });\n        }\n        else {\n          this._globalEvents = this._globalEvents || [];\n          this._globalEvents.push({eventName, selector, listener, isCapture});\n        }\n      }\n      // Events on the element itself\n      else if (isKey) {\n        // Create the keys instance only if its needed\n        this._keys = this._keys || new Keys(this, {\n          // The filter function for keyboard events.\n          filter: this._filterKeys,\n          // Execute key listeners in the context of the element\n          context: this\n        });\n    \n        // Add listener locally\n        this._keys.on(eventName, selector, listener);\n      }\n      else if (isResize) {\n        if (selector) {\n          elements = document.querySelectorAll(selector);\n          for (let i = 0; i < elements.length; ++i) {\n            commons.addResizeListener(elements[i], listener);\n          }\n        }\n        else {\n          commons.addResizeListener(this, listener);\n        }\n      }\n      else {\n        this._vent.on(eventName, selector, listener, isCapture);\n      }\n    }\n  }\n};\n\n/**\n Attach global event listeners for this component.\n @ignore\n */\nconst delegateGlobalEvents = function() {\n  let i;\n  if (this._globalEvents) {\n    // Remove global event listeners\n    for (i = 0; i < this._globalEvents.length; i++) {\n      const event = this._globalEvents[i];\n      events.on(event.eventName, event.selector, event.listener, event.isCapture);\n    }\n  }\n  \n  if (this._globalKeys) {\n    // Remove global key listeners\n    for (i = 0; i < this._globalKeys.length; i++) {\n      const key = this._globalKeys[i];\n      keys.on(key.keyCombo, key.selector, key.listener);\n    }\n  }\n  \n  if (this._keys) {\n    this._keys.init(true);\n  }\n};\n\n/**\n Remove global event listeners for this component.\n @ignore\n */\nconst undelegateGlobalEvents = function() {\n  let i;\n  if (this._globalEvents) {\n    // Remove global event listeners\n    for (i = 0; i < this._globalEvents.length; i++) {\n      const event = this._globalEvents[i];\n      events.off(event.eventName, event.selector, event.listener, event.isCapture);\n    }\n  }\n  \n  if (this._globalKeys) {\n    // Remove global key listeners\n    for (i = 0; i < this._globalKeys.length; i++) {\n      const key = this._globalKeys[i];\n      keys.off(key.keyCombo, key.selector, key.listener);\n    }\n  }\n  \n  if (this._keys) {\n    this._keys.destroy(true);\n  }\n};\n\n// Used to find upper case characters\nconst REG_EXP_UPPERCASE = /[A-Z]/g;\n\n/**\n Returns the constructor namespace\n @ignore\n */\nconst getConstructorName = function(constructor) {\n  // Will contain the namespace of the constructor in reversed order\n  const constructorName = [];\n  // Keep a reference on the passed constructor\n  const originalConstructor = constructor;\n  \n  // Traverses Coral constructors if not already done to set the namespace\n  if (!constructor._namespace) {\n  \n    // Set namespace on Coral constructors until 'constructor' is found\n    const find = (obj, constructorToFind) => {\n      let found = false;\n      const type = typeof obj;\n    \n      if (obj && type === 'object' || type === 'function')\t{\n        const subObj = Object.keys(obj);\n      \n        for (let i = 0; i < subObj.length; i++) {\n          const key = subObj[i];\n        \n          // Components are capitalized\n          if (key[0].match(REG_EXP_UPPERCASE) !== null) {\n          \n            // Keep a reference of the constructor name and its parent\n            obj[key]._namespace = {\n              parent: obj,\n              value: key\n            };\n          \n            found = obj[key] === constructorToFind;\n          \n            if (found) {\n              break;\n            }\n            else {\n              found = find(obj[key], constructorToFind);\n            }\n          }\n        }\n      }\n    \n      return found;\n    };\n  \n    // Look for the constructor in the Coral namespace\n    find(window.Coral, constructor);\n  }\n  \n  // Climb up the constructor namespace\n  while (constructor) {\n    if (constructor._namespace) {\n      constructorName.push(constructor._namespace.value);\n      constructor = constructor._namespace.parent;\n    }\n    else {\n      constructor = false;\n    }\n  }\n  \n  // Build the full namespace string and save it for reuse\n  originalConstructor._componentName = constructorName.reverse().join('.');\n  \n  return originalConstructor._componentName;\n};\n\n/**\n Builds and returns an attribute/property map based on observed attributes\n @ignore\n */\nconst getAttributePropertyMap = function(constructor) {\n  const observedAttributes = constructor.observedAttributes;\n  \n  if (!observedAttributes) {\n    return {};\n  }\n\n  const attributePropertyMap = {};\n  \n  observedAttributes.forEach((attribute) => {\n    // We assume if the attribute contains uppercase char, it's a property and can be mapped\n    if (attribute.match(REG_EXP_UPPERCASE)) {\n      attributePropertyMap[attribute.toLowerCase()] = attribute;\n    }\n  });\n  \n  constructor._attributePropertyMap = attributePropertyMap;\n  \n  return constructor._attributePropertyMap;\n};\n\n/**\n @mixin ComponentMixin\n @classdesc The base element for all Coral components\n */\nconst ComponentMixin = (superClass) => class extends superClass {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    const self = this;\n    \n    // Attach Vent\n    self._vent = new Vent(self);\n    self._events = {};\n    \n    // Content zone MO for virtual DOM support\n    if (self._contentZones) {\n      self._contentZoneObserver = new MutationObserver((mutations) => {\n        mutations.forEach((mutation) => {\n          for (let i = 0; i < mutation.addedNodes.length; i++) {\n            const addedNode = mutation.addedNodes[i];\n        \n            for (const name in self._contentZones) {\n              const contentZone = self._contentZones[name];\n              if (addedNode.nodeName.toLowerCase() === name && !addedNode._contentZoned) {\n                // Insert the content zone at the right position\n                self[contentZone] = addedNode;\n              }\n            }\n          }\n        });\n      });\n  \n      self._contentZoneObserver.observe(self, {\n        childList: true,\n        subtree: true\n      });\n    }\n  }\n  \n  // Constructs and returns the component name based on the constructor\n  get _componentName() { return this.constructor._componentName || getConstructorName(this.constructor); }\n  \n  // Returns all watched attributes case sensitive mapped to their properties\n  get _attributes() { return this.constructor._attributePropertyMap || getAttributePropertyMap(this.constructor); }\n  \n  // The filter function for keyboard events. By default, any child element can trigger keyboard events.\n  // You can pass {@link Keys.filterInputs} to avoid listening to key events triggered from within\n  // inputs.\n  _filterKeys() { return true; }\n  \n  // Attach event listeners including global ones\n  _delegateEvents(eventMap) {\n    this._events = commons.extend(this._events, eventMap);\n    delegateEvents.call(this);\n    delegateGlobalEvents.call(this);\n  }\n  \n  // Returns the content zone if the component is connected and contains the content zone else null\n  // Ideally content zones will be replaced by shadow dom and <slot> elements\n  _getContentZone(contentZone) {\n    if (document.documentElement.contains(this)) {\n      return this.contains(contentZone) && contentZone || null;\n    }\n    // Return the content zone by default\n    return contentZone;\n  }\n  \n  // Sets the value as content zone for the property given the specified options\n  // Ideally content zones will be replaced by shadow dom and <slot> elements\n  _setContentZone(property, value, options) {\n    const handle = options.handle;\n    const expectedTagName = options.tagName;\n    const additionalSetter = options.set;\n    const insert = options.insert;\n    \n    let oldNode;\n    \n    if (value) {\n      if (!(value instanceof HTMLElement)) {\n        throw new Error(`DOMException: Failed to set the \"${property}\" property on \"${this.toString()}\":\n        The provided value is not of type \"HTMLElement\".`);\n      }\n      \n      if (expectedTagName && value.tagName.toLowerCase() !== expectedTagName) {\n        throw new Error(`DOMException: Failed to set the \"${property}\" property on \"${this.toString()}\": The new\n        ${property} element is of type \"${value.tagName}\". It must be a \"${expectedTagName.toUpperCase()}\" element.`);\n      }\n      \n      oldNode = this._elements[handle];\n  \n      // Flag it for the content zone MO\n      value._contentZoned = true;\n      \n      // Replace the existing element\n      if (insert) {\n        // Remove old node\n        if (oldNode && oldNode.parentNode) {\n          oldNode.parentNode.removeChild(oldNode);\n        }\n        // Insert new node\n        insert.call(this, value);\n      }\n      else if (oldNode && oldNode.parentNode) {\n        console.warn(`${this._componentName} does not define an insert method for content zone ${handle}, falling back to replace.`);\n        // Old way -- assume we have an old node\n        this._elements[handle].parentNode.replaceChild(value, this._elements[handle]);\n      }\n      else {\n        console.error(`${this._componentName} does not define an insert method for content zone ${handle}, falling back to append.`);\n        // Just append, which may introduce bugs, but at least doesn't crazy\n        this.appendChild(value);\n      }\n    }\n    else {\n      // we need to remove the content zone if it exists\n      oldNode = this._elements[handle];\n      if (oldNode && oldNode.parentNode) {\n        oldNode.parentNode.removeChild(oldNode);\n      }\n    }\n    \n    // Re-assign the handle to the new element\n    this._elements[handle] = value;\n    \n    // Invoke the setter\n    if (typeof additionalSetter === 'function') {\n      additionalSetter.call(this, value);\n    }\n  }\n  \n  // Handles the reflection of properties by using a flag to prevent setting the property by changing the attribute\n  _reflectAttribute(attributeName, value) {\n    if (typeof value === 'boolean') {\n      if (value && !this.hasAttribute(attributeName)) {\n        this._reflectedAttribute = true;\n        this.setAttribute(attributeName, '');\n        this._reflectedAttribute = false;\n      }\n      else if (!value && this.hasAttribute(attributeName)) {\n        this._reflectedAttribute = true;\n        this.removeAttribute(attributeName);\n        this._reflectedAttribute = false;\n      }\n    }\n    else if (this.getAttribute(attributeName) !== String(value)) {\n      this._reflectedAttribute = true;\n      this.setAttribute(attributeName, value);\n      this._reflectedAttribute = false;\n    }\n  }\n  \n  /**\n   Returns the component name.\n   \n   @return {String}\n   */\n  toString() {\n    return `Coral.${this._componentName}`;\n  }\n  \n  /**\n   Add an event listener.\n \n   @param {String} eventName\n   The event name to listen for.\n   @param {String} [selector]\n   The selector to use for event delegation.\n   @param {Function} func\n   The function that will be called when the event is triggered.\n   @param {Boolean} [useCapture=false]\n   Whether or not to listen during the capturing or bubbling phase.\n   @returns {ComponentMixin} this, chainable.\n   */\n  on(eventName, selector, func, useCapture) {\n    this._vent.on(eventName, selector, func, useCapture);\n    return this;\n  }\n  \n  /**\n   Remove an event listener.\n   \n   @param {String} eventName\n   The event name to stop listening for.\n   @param {String} [selector]\n   The selector that was used for event delegation.\n   @param {Function} func\n   The function that was passed to <code>on()</code>.\n   @param {Boolean} [useCapture]\n   Only remove listeners with <code>useCapture</code> set to the value passed in.\n   @returns {ComponentMixin} this, chainable.\n   */\n  off(eventName, selector, func, useCapture) {\n    this._vent.off(eventName, selector, func, useCapture);\n    return this;\n  }\n  \n  /**\n   Trigger an event.\n   \n   @param {String} eventName\n   The event name to trigger.\n   @param {Object} [props]\n   Additional properties to make available to handlers as <code>event.detail</code>.\n   @param {Boolean} [bubbles=true]\n   Set to <code>false</code> to prevent the event from bubbling.\n   @param {Boolean} [cancelable=true]\n   Set to <code>false</code> to prevent the event from being cancelable.\n   @returns {CustomEvent} CustomEvent object\n   */\n  trigger(eventName, props, bubbles, cancelable) {\n    // When 'bubbles' is not set, then default to true:\n    bubbles = bubbles || bubbles === undefined;\n    \n    // When 'cancelable' is not set, then default to true:\n    cancelable = cancelable || cancelable === undefined;\n    \n    const event = new CustomEvent(eventName, {\n      bubbles: bubbles,\n      cancelable: cancelable,\n      detail: props\n    });\n  \n    // Don't trigger the event if silenced\n    if (this._silenced) {\n      return event;\n    }\n    \n    // default value in case the dispatching fails\n    let defaultPrevented = false;\n    \n    try {\n      // leads to NS_ERROR_UNEXPECTED in Firefox\n      // https://bugzilla.mozilla.org/show_bug.cgi?id=329509\n      defaultPrevented = !this.dispatchEvent(event);\n    }\n    // eslint-disable-next-line no-empty\n    catch (e) {}\n    \n    // Check if the defaultPrevented status was correctly stored back to the event object\n    if (defaultPrevented !== event.defaultPrevented) {\n      // dispatchEvent() doesn't correctly set event.defaultPrevented in IE 9\n      // However, it does return false if preventDefault() was called\n      // Unfortunately, the returned event's defaultPrevented property is read-only\n      // We need to work around this such that (patchedEvent instanceof Event) === true\n      // First, we'll create an object that uses the event as its prototype\n      // This gives us an object we can modify that is still technically an instanceof Event\n      const patchedEvent = Object.create(event);\n      \n      // Next, we set the correct value for defaultPrevented on the new object\n      // We cannot simply assign defaultPrevented, it causes a \"Invalid Calling Object\" error in IE 9\n      // For some reason, defineProperty doesn't cause this\n      Object.defineProperty(patchedEvent, 'defaultPrevented', {\n        value: defaultPrevented\n      });\n      \n      return patchedEvent;\n    }\n    \n    return event;\n  }\n  \n  /**\n   Set multiple properties.\n   \n   @param {Object.<String, *>} properties\n   An object of property/value pairs to set.\n   @param {Boolean} silent\n   If true, events should not be triggered as a result of this set.\n   \n   @returns {ComponentMixin} this, chainable.\n   */\n  set(propertyOrProperties, valueOrSilent, silent) {\n    const self = this;\n    \n    let property;\n    let properties;\n    let value;\n    \n    const isContentZone = (prop) => self._contentZones && commons.swapKeysAndValues(self._contentZones)[prop];\n    \n    const updateContentZone = (prop, val) => {\n      // If content zone exists and we only want to update properties on the content zone\n      if (self[prop] instanceof HTMLElement && !(val instanceof HTMLElement)) {\n        for (const contentZoneProperty in val) {\n          self[prop][contentZoneProperty] = val[contentZoneProperty];\n        }\n      }\n      // Else assign the new value to the content zone\n      else {\n        self[prop] = val;\n      }\n    };\n    \n    const setProperty = (prop, val) => {\n      if (isContentZone(prop)) {\n        updateContentZone(prop, val);\n      }\n      else {\n        self._silenced = silent;\n        self[prop] = val;\n        self._silenced = false;\n      }\n    };\n    \n    if (typeof propertyOrProperties === 'string') {\n      // Set a single property\n      property = propertyOrProperties;\n      value = valueOrSilent;\n      \n      setProperty(property, value);\n    }\n    else {\n      properties = propertyOrProperties;\n      silent = valueOrSilent;\n      \n      // Set a map of properties\n      for (property in properties) {\n        value = properties[property];\n        \n        setProperty(property, value);\n      }\n    }\n    \n    return this;\n  }\n  \n  /**\n   Get the value of a property.\n   \n   @param {String} property\n   The name of the property to fetch the value of.\n   @returns {*} Property value.\n   */\n  get(property) {\n    return this[property];\n  }\n  \n  /**\n   Show this component.\n   \n   @returns {ComponentMixin} this, chainable\n   */\n  show() {\n    if (!this.hidden) {\n      return this;\n    }\n  \n    /** @ignore */\n    this.hidden = false;\n    return this;\n  }\n  \n  /**\n   Hide this component.\n   @returns {ComponentMixin} this, chainable\n   */\n  hide() {\n    if (this.hidden) {\n      return this;\n    }\n  \n    /** @ignore */\n    this.hidden = true;\n    return this;\n  }\n  \n  /** @ignore */\n  // eslint-disable-next-line no-unused-vars\n  attributeChangedCallback(name, oldValue, value) {\n    const self = this;\n    if (!self._reflectedAttribute) {\n      // Use the attribute/property mapping\n      self[self._attributes[name] || name] = value;\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    // A component that is reattached should respond to global events again\n    if (this._disconnected) {\n      delegateGlobalEvents.call(this);\n      this._disconnected = false;\n    }\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    // A component that isn't in the DOM should not be responding to global events\n    this._disconnected = true;\n    undelegateGlobalEvents.call(this);\n  }\n};\n\nexport default ComponentMixin;\n","import '../coralui-externals';\n\nimport ComponentMixin from './src/scripts/ComponentMixin';\nimport {mixin} from '../coralui-util';\n\n// Expose mixin on Coral namespace\nmixin._component = ComponentMixin;\n\nexport {ComponentMixin};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport {transform, validate, Keys} from '../../../coralui-util';\n\n// Key codes\nconst PAGE_UP = 33;\nconst PAGE_DOWN = 34;\nconst LEFT_ARROW = 37;\nconst UP_ARROW = 38;\n\n/**\n Enumeration for {@link Accordion} variants.\n \n @typedef {Object} AccordionVariantEnum\n \n @property {String} DEFAULT\n Default look and feel.\n @property {String} QUIET\n Not supported. Falls back to DEFAULT.\n @property {String} LARGE\n Not supported. Falls back to DEFAULT.\n */\nconst variant = {\n  DEFAULT: 'default',\n  QUIET: 'quiet',\n  LARGE: 'large'\n};\n\n// the accordions's base classname\nconst CLASSNAME = '_coral-Accordion';\n\n/**\n @class Coral.Accordion\n @classdesc An Accordion component consisting of multiple collapsible items.\n @htmltag coral-accordion\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Accordion extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Attach events\n    this._delegateEvents({\n      'click coral-accordion-item:not([disabled]) coral-accordion-item-label': '_onItemClick',\n  \n      'key:space coral-accordion-item-label': '_onToggleItemKey',\n      'key:return coral-accordion-item-label': '_onToggleItemKey',\n      'key:pageup coral-accordion-item-label': '_focusPreviousItem',\n      'key:left coral-accordion-item-label': '_focusPreviousItem',\n      'key:up coral-accordion-item-label': '_focusPreviousItem',\n      'key:pagedown coral-accordion-item-label': '_focusNextItem',\n      'key:right coral-accordion-item-label': '_focusNextItem',\n      'key:down coral-accordion-item-label': '_focusNextItem',\n      'key:home coral-accordion-item-label': '_onHomeKey',\n      'key:end coral-accordion-item-label': '_onEndKey',\n      'keydown coral-accordion-item-label': '_onItemContentKeyDown',\n      \n      // private\n      'coral-accordion-item:_selectedchanged': '_onItemSelectedChanged'\n    });\n    \n    // Used for eventing\n    this._oldSelection = [];\n  \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The Accordion's variant. See {@link AccordionVariantEnum}.\n   \n   @type {String}\n   @default AccordionVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {Collection}\n   @readonly\n   */\n  get items() {\n    // just init on demand\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-accordion-item',\n        // allows accordions to be nested\n        itemSelector: ':scope > coral-accordion-item',\n        onItemAdded: this._validateSelection,\n        onItemRemoved: this._validateSelection\n      });\n    }\n    return this._items;\n  }\n  \n  /**\n   Indicates whether the accordion accepts multiple selected items.\n   @type {Boolean}\n   @default false\n   @htmlattribute multiple\n   @htmlattributereflected\n   */\n  get multiple() {\n    return this._multiple || false;\n  }\n  set multiple(value) {\n    this._multiple = transform.booleanAttr(value);\n    this._reflectAttribute('multiple', this._multiple);\n    \n    this.setAttribute('aria-multiselectable', this._multiple);\n    \n    this._validateSelection();\n  }\n  \n  /**\n   Returns an Array containing the set selected items.\n   @type {Array.<AccordionItem>}\n   @readonly\n   */\n  get selectedItems() {\n    return this.items._getAllSelected();\n  }\n  \n  /**\n   Returns the first selected item in the Accordion. The value <code>null</code> is returned if no element is\n   selected.\n   @type {AccordionItem}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getAllSelected()[0] || null;\n  }\n  \n  /** @private **/\n  get _tabTarget() {\n    return this.__tabTarget || null;\n  }\n  set _tabTarget(value) {\n    this.__tabTarget = value;\n    \n    // Set all but the current set _tabTarget to not be a tab target:\n    this.items.getAll().forEach((item) => {\n      item._isTabTarget = item === value;\n    });\n  }\n  \n  /** @private */\n  _onHomeKey(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    \n    this._focusItem(this.items._getFirstSelectable());\n  }\n  \n  /** @private */\n  _onEndKey(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    \n    this._focusItem(this.items._getLastSelectable());\n  }\n  \n  /**\n   References:\n   http://www.w3.org/WAI/PF/aria-practices/#accordion &\n   \n   Handlers for when focus is on an element inside of the panel:\n   http://test.cita.illinois.edu/aria/tabpanel/tabpanel2.php\n   \n   @private\n   */\n  _onItemContentKeyDown(event) {\n    // Required since sometimes the value is a number\n    const key = parseFloat(event.keyCode);\n    const item = event.matchedTarget.parentNode;\n    \n    switch (key) {\n      case UP_ARROW:\n      case LEFT_ARROW:\n        // Set focus on the tab button for the currently displayed tab.\n        if ((event.metaKey || event.ctrlKey) && Keys.filterInputs(event)) {\n          event.preventDefault();\n          event.stopPropagation();\n          \n          this._focusItem(item);\n        }\n        break;\n      case PAGE_UP:\n        // Show the previous tab and set focus on its corresponding tab button. Shows the last tab in the panel if\n        // current tab is the first one.\n        if (event.metaKey || event.ctrlKey) {\n          event.preventDefault();\n          event.stopPropagation();\n          \n          const prevItem = this.items._getPreviousSelectable(item);\n          this._toggleItemSelection(prevItem);\n          this._focusItem(prevItem);\n        }\n        break;\n      case PAGE_DOWN:\n        // Show the next tab and set focus on its corresponding tab button. Shows the first tab in the panel if current\n        // tab is the last one.\n        if (event.metaKey || event.ctrlKey) {\n          event.preventDefault();\n          event.stopPropagation();\n          \n          const nextItem = this.items._getNextSelectable(item);\n          this._toggleItemSelection(nextItem);\n          this._focusItem(nextItem);\n        }\n        break;\n    }\n  }\n  \n  /** @private */\n  _focusPreviousItem(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    \n    this._focusItem(this.items._getPreviousSelectable(event.target.parentNode));\n  }\n  \n  /** @private */\n  _focusNextItem(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    \n    this._focusItem(this.items._getNextSelectable(event.target.parentNode));\n  }\n  \n  /** @private */\n  _onItemClick(event) {\n    // Clickable elements included in an item header shouldn't automatically trigger the selection of that item\n    if (event.target.hasAttribute('coral-interactive') || event.target.closest('[coral-interactive]')) {\n      return;\n    }\n    \n    // The click was performed on the header so we select the item (parentNode) the selection is toggled\n    const item = event.target.closest('coral-accordion-item');\n    if (item) {\n      event.preventDefault();\n      event.stopPropagation();\n      \n      this._toggleItemSelection(item);\n      this._focusItem(item);\n    }\n  }\n  \n  /** @private */\n  _onToggleItemKey(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    \n    const item = event.target.parentNode;\n    this._toggleItemSelection(item);\n    this._focusItem(item);\n  }\n  \n  /** @private */\n  _onItemSelectedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    this._validateSelection(event.target);\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    const selectedItems = this.selectedItems;\n    \n    if (!this.multiple) {\n      // Last selected item wins if multiple selection while not allowed\n      item = item || selectedItems[selectedItems.length - 1];\n      \n      if (item && item.hasAttribute('selected') && selectedItems.length > 1) {\n        selectedItems.forEach((selectedItem) => {\n          if (selectedItem !== item) {\n            // Don't trigger change events\n            this._preventTriggeringEvents = true;\n            selectedItem.removeAttribute('selected');\n          }\n        }, this);\n        \n        // We can trigger change events again\n        this._preventTriggeringEvents = false;\n      }\n    }\n    \n    this._resetTabTarget();\n    \n    this._triggerChangeEvent();\n  }\n  \n  /** @private */\n  _triggerChangeEvent() {\n    const selectedItems = this.selectedItems;\n    const oldSelection = this._oldSelection;\n    \n    if (!this._preventTriggeringEvents && this._arraysAreDifferent(selectedItems, oldSelection)) {\n      // We differentiate whether multiple is on or off and return an array or HTMLElement respectively\n      if (this.multiple) {\n        this.trigger('coral-accordion:change', {\n          oldSelection: oldSelection,\n          selection: selectedItems\n        });\n      }\n      else {\n        // Return all items if we just switched from multiple=true to multiple=false and we had >1 selected items\n        this.trigger('coral-accordion:change', {\n          oldSelection: oldSelection.length > 1 ? oldSelection : oldSelection[0] || null,\n          selection: selectedItems[0] || null\n        });\n      }\n    \n      this._oldSelection = selectedItems;\n    }\n  }\n  \n  /** @private */\n  _arraysAreDifferent(selection, oldSelection) {\n    let diff = [];\n  \n    if (oldSelection.length === selection.length) {\n      diff = oldSelection.filter((item) => selection.indexOf(item) === -1);\n    }\n  \n    // since we guarantee that they are arrays, we can start by comparing their size\n    return oldSelection.length !== selection.length || diff.length !== 0;\n  }\n  \n  /**\n   Determine what item should get focus (if any) when the user tries to tab into the accordion. This should be the\n   first selected panel, or the first selectable panel otherwise. When neither is available, to Accordion cannot be\n   tabbed into.\n   \n   @private\n   */\n  _resetTabTarget() {\n    if (!this._resetTabTargetScheduled) {\n      this._resetTabTargetScheduled = true;\n      \n      const self = this;\n      window.requestAnimationFrame(() => {\n        self._resetTabTargetScheduled = false;\n        \n        // since hidden items cannot have focus, we need to make sure the tabTarget is not hidden\n        const selectedItems = self.items._getAllSelected();\n  \n        self._tabTarget = selectedItems.length ? selectedItems[0] : self.items._getFirstSelectable();\n      });\n    }\n  }\n  \n  /** @private */\n  _toggleItemSelection(item) {\n    if (item) {\n      item[item.hasAttribute('selected') ? 'removeAttribute' : 'setAttribute']('selected', '');\n    }\n  }\n  \n  /** @private */\n  _focusItem(item) {\n    if (item) {\n      item.focus();\n    }\n    \n    this._tabTarget = item;\n  }\n  \n  /**\n   Returns {@link Accordion} variants.\n   \n   @return {AccordionVariantEnum}\n   */\n  static get variant() { return variant; }\n\n  /** @ignore */\n  static get observedAttributes() {\n    return ['variant', 'multiple'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n    \n    this.setAttribute('role', 'tablist');\n    this.setAttribute('aria-multiselectable', this.multiple);\n    \n    // Don't trigger events once connected\n    this._preventTriggeringEvents = true;\n    this._validateSelection();\n    this._preventTriggeringEvents = false;\n    \n    this._oldSelection = this.selectedItems;\n    \n    // Don't trigger animations on rendering\n    window.requestAnimationFrame(() => {\n      this.classList.add(`${CLASSNAME}--animated`);\n    });\n  }\n  \n  /**\n   Triggered when {@link Accordion} selected item has changed.\n   \n   @typedef {CustomEvent} coral-accordion:change\n   \n   @property {AccordionItem} detail.oldSelection\n   The prior selected item(s).\n   @property {AccordionItem} detail.selection\n   The newly selected item(s).\n   */\n}\n\nexport default Accordion;\n","(function() {\n  function injectSVG() {\n    // 200 for web servers, 0 for CEP panels\n    if (this.status !== 200 && this.status !== 0) {\n      console.error('Icons: Failed to fetch icons, server returned ' + this.status);\n      return;\n    }\n\n    // Parse the SVG\n    var parser = new DOMParser();\n    try {\n      var doc = parser.parseFromString(this.responseText, 'image/svg+xml');\n      var svg = doc.firstChild;\n    }\n    catch (err) {\n      console.error('Icons: Error parsing icon SVG sprite: ' + err);\n      return;\n    }\n\n    // Make sure a real SVG was returned\n    if (svg && svg.tagName === 'svg') {\n      // Hide the element\n      svg.style.display = 'none';\n\n      // Insert it into the head\n      document.head.insertBefore(svg, null);\n    }\n    else {\n      console.error('Icons: Parse SVG document contained something other than a SVG');\n    }\n  }\n\n  function loadIcons(svgURL) {\n    // Request the SVG sprite\n    var req = new XMLHttpRequest();\n    req.open('GET', svgURL, true);\n    req.addEventListener('load', injectSVG);\n    req.addEventListener('error', function(event) {\n      console.log('Icons: Request failed');\n    });\n    req.send();\n  }\n\n  window.$AS = window.AdobeSpectrum = window.AdobeSpectrum || {};\n  AdobeSpectrum.loadIcons = loadIcons;\n}());\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform, validate, commons} from '../../../coralui-util';\nimport ICON_MAP from '../../../coralui-compat/data/iconMap.json';\nimport SPECTRUM_ICONS_PATH from '@spectrum/spectrum-css/dist/icons/spectrum-icons.svg';\nimport SPECTRUM_ICONS_COLOR_PATH from '@spectrum/spectrum-css/dist/icons/spectrum-icons-color.svg';\nimport SPECTRUM_CSS_ICONS_PATH from '@spectrum/spectrum-css/dist/icons/spectrum-css-icons.svg';\nimport '@spectrum/spectrum-css/dist/icons/AS.loadIcons';\n\nconst SPECTRUM_ICONS = 'spectrum-icons';\nconst SPECTRUM_ICONS_COLOR = 'spectrum-icons-color';\nconst SPECTRUM_CSS_ICONS = 'spectrum-css-icons';\n\nconst ICONS = [SPECTRUM_ICONS, SPECTRUM_ICONS_COLOR, SPECTRUM_CSS_ICONS];\nconst ICONS_PATH = commons.options.icons;\n\nconst SPECTRUM_ICONS_IDENTIFIER = 'spectrum-';\nconst SPECTRUM_COLORED_ICONS_IDENTIFIER = ['ColorLight', 'ColorDark', 'ColorActive'];\n\n/**\n Regex used to match URLs. Assume it's a URL if it has a slash, colon, or dot.\n \n @ignore\n */\nconst URL_REGEX = /\\/|:|\\./g;\n\n/**\n Regex used to split camel case icon names into more screen-reader friendly alt text.\n \n @ignore\n */\nconst SPLIT_CAMELCASE_REGEX = /([a-z0-9])([A-Z])/g;\n\n/**\n Returns capitalized string. This is used to map the icons with their SVG counterpart.\n \n @ignore\n @param {String} s\n @return {String}\n */\nconst capitalize = s => s.charAt(0).toUpperCase() + s.slice(1);\n\n/**\n Enumeration for {@link Icon} sizes.\n \n @typedef {Object} IconSizeEnum\n \n @property {String} EXTRA_EXTRA_SMALL\n Extra extra small size icon, typically 9px size.\n @property {String} EXTRA_SMALL\n Extra small size icon, typically 12px size.\n @property {String} SMALL\n Small size icon, typically 18px size. This is the default size.\n @property {String} MEDIUM\n Medium size icon, typically 24px size.\n @property {String} LARGE\n Large icon, typically 36px size.\n @property {String} EXTRA_LARGE\n Extra large icon, typically 48px size.\n @property {String} EXTRA_EXTRA_LARGE\n Extra extra large icon, typically 72px size.\n */\nconst size = {\n  EXTRA_EXTRA_SMALL: 'XXS',\n  EXTRA_SMALL: 'XS',\n  SMALL: 'S',\n  MEDIUM: 'M',\n  LARGE: 'L',\n  EXTRA_LARGE: 'XL',\n  EXTRA_EXTRA_LARGE: 'XXL'\n};\n\n// icon's base classname\nconst CLASSNAME = '_coral-Icon';\n\n// builds an array containing all possible size classnames. this will be used to remove classnames when the size\n// changes\nconst ALL_SIZE_CLASSES = [];\nfor (const sizeValue in size) {\n  ALL_SIZE_CLASSES.push(`${CLASSNAME}--size${size[sizeValue]}`);\n}\n\n// Based on https://git.corp.adobe.com/pages/Spectrum/spectrum-css/icons/\nconst sizeMap = {\n  XXS: 18,\n  XS: 24,\n  S: 18,\n  M: 24,\n  L: 18,\n  XL: 24,\n  XXL: 24\n};\n\n/**\n @class Coral.Icon\n @classdesc An Icon component. Icon ships with a set of SVG icons see http://icons.corp.adobe.com for how to request\n new icons.\n @htmltag coral-icon\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Icon extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    this._elements = {};\n  }\n  \n  /**\n   Icon name.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   @htmlattributereflected\n   */\n  get icon() {\n    return this._icon || '';\n  }\n  set icon(value) {\n    this._icon = transform.string(value).trim();\n    this._reflectAttribute('icon', this._icon);\n    \n    // Remove image and SVG elements\n    ['image', 'svg'].forEach((type) => {\n      const el = this._elements[type] || this.querySelector(`.${CLASSNAME}--${type}`);\n      if (el) {\n        el.remove();\n      }\n    });\n    \n    // Sets the desired icon\n    if (this._icon) {\n      // Detect if it's a URL\n      if (this._icon.match(URL_REGEX)) {\n        // Create an image and add it to the icon\n        this._elements.image = this._elements.image || document.createElement('img');\n        this._elements.image.className = `${CLASSNAME} ${CLASSNAME}--image`;\n        this._elements.image.src = this.icon;\n        this.appendChild(this._elements.image);\n      }\n      else {\n        this._updateIcon();\n      }\n    }\n    \n    this._updateAltText();\n  }\n  \n  /**\n   Size of the icon. It accepts both lower and upper case sizes. See {@link IconSizeEnum}.\n   \n   @type {String}\n   @default IconSizeEnum.SMALL\n   @htmlattribute size\n   @htmlattributereflected\n   */\n  get size() {\n    return this._size || size.SMALL;\n  }\n  set size(value) {\n    const oldSize = this._size;\n    \n    value = transform.string(value).toUpperCase();\n    this._size = validate.enumeration(size)(value) && value || size.SMALL;\n    this._reflectAttribute('size', this._size);\n    \n    // removes all the existing sizes\n    this.classList.remove(...ALL_SIZE_CLASSES);\n    // adds the new size\n    this.classList.add(`${CLASSNAME}--size${this._size}`);\n    \n    // We need to update the icon if the size changed\n    if (oldSize && oldSize !== this._size && this.contains(this._elements.svg)) {\n      this._elements.svg.remove();\n      this._updateIcon();\n    }\n    \n    this._updateAltText();\n  }\n  \n  /** @private */\n  get title() { return this.getAttribute('title'); }\n  set title(value) { this.setAttribute('title', value); }\n  \n  /** @private */\n  get alt() { return this.getAttribute('alt'); }\n  set alt(value) { this.setAttribute('alt', value); }\n  \n  _updateIcon() {\n    if (!document.body.contains(this)) {\n      this._delayedRendering = true;\n      return;\n    }\n    \n    let iconId = this.icon;\n    \n    // If icon name is passed, we have to build the icon Id based on the icon name\n    if (iconId.indexOf(SPECTRUM_ICONS_IDENTIFIER) !== 0) {\n      const iconMapped = ICON_MAP[iconId];\n      let iconName;\n      \n      if (iconMapped) {\n        if (iconMapped.spectrumIcon) {\n          // Use the default mapped icon\n          iconName = iconMapped.spectrumIcon;\n        }\n        else {\n          // Verify if icon should be light or dark by looking up parents theme\n          const closest = this.closest('.coral--light, .coral--dark, .coral--lightest, .coral--darkest');\n          \n          if (closest) {\n            if (closest.classList.contains('coral--light') || closest.classList.contains('coral--lightest')) {\n              // Use light icon\n              iconName = iconMapped.spectrumIconLight;\n            }\n            else {\n              // Use dark icon\n              iconName = iconMapped.spectrumIconDark;\n            }\n          }\n          // Use light by default\n          else {\n            iconName = iconMapped.spectrumIconLight;\n          }\n        }\n        \n        // Inform user about icon name changes\n        if (iconName) {\n          console.warn(`Coral.Icon: the icon ${iconId} has been deprecated. Please use ${iconName} instead.`);\n        }\n        else {\n          console.warn(`Coral.Icon: the icon ${iconId} has been removed. Please contact Icons@Adobe.`);\n        }\n      }\n      // In most cases, using the capitalized icon name maps to the spectrum icon name\n      else {\n        iconName = capitalize(iconId);\n      }\n      \n      // Verify if icon name is a colored icon\n      if (SPECTRUM_COLORED_ICONS_IDENTIFIER.some(identifier => iconName.indexOf(identifier) !== -1)) {\n        // Colored icons are 24 by default\n        iconId = `spectrum-icon-24-${iconName}`;\n      }\n      else {\n        const sizeAttribute = this.getAttribute('size');\n        const iconSize = sizeMap[sizeAttribute && sizeAttribute.toUpperCase() || size.SMALL];\n        iconId = `spectrum-icon-${iconSize}-${iconName}`;\n      }\n    }\n    \n    // Insert SVG Icon using HTML because DOMly doesn't support document.createElementNS for <use> element\n    this.insertAdjacentHTML('beforeend', this.constructor._renderSVG(iconId));\n    \n    this._elements.svg = this.lastElementChild;\n    this._delayedRendering = false;\n  }\n  \n  /**\n   Updates the aria-label or img alt attribute depending on value of alt, title or icon.\n   \n   In cases where the alt attribute has been removed or set to an empty string,\n   for example, when the alt property is undefined and we add the attribute alt=''\n   to explicitly override the default behavior, or when we remove an alt attribute\n   thus restoring the default behavior, we make sure to update the alt text.\n   @private\n   */\n  _updateAltText(value) {\n    const isImage = this.contains(this._elements.image);\n    \n    let altText;\n    if (typeof value === 'string') {\n      altText = value;\n    }\n    else if (isImage) {\n      altText = '';\n    }\n    else {\n      altText = this.icon.replace(SPLIT_CAMELCASE_REGEX, '$1 $2');\n    }\n  \n    // If no other role has been set, provide the appropriate\n    // role depending on whether or not the icon is an arbitrary image URL.\n    const role = this.getAttribute('role');\n    const roleOverride = role && (role !== 'presentation' && role !== 'img');\n    if (!roleOverride) {\n      this.setAttribute('role', isImage ? 'presentation' : 'img');\n    }\n    \n    // Set accessibility attributes accordingly\n    if (isImage) {\n      this.removeAttribute('aria-label');\n      this._elements.image.setAttribute('alt', altText);\n    }\n    else if (altText === '') {\n      this.removeAttribute('aria-label');\n      if (!roleOverride) {\n        this.removeAttribute('role');\n      }\n    }\n    else {\n      this.setAttribute('aria-label', altText);\n    }\n  }\n  \n  /**\n   Returns the SVG markup.\n   \n   @param {String} iconId\n   @param {Array.<String>} additionalClasses\n   @return {String}\n   */\n  static _renderSVG(iconId, additionalClasses = []) {\n    additionalClasses.unshift(CLASSNAME);\n    additionalClasses.unshift(`${CLASSNAME}--svg`);\n    \n    return `\n      <svg focusable=\"false\" aria-hidden=\"true\" class=\"${additionalClasses.join(' ')}\">\n        <use xlink:href=\"#${iconId}\"></use>\n      </svg>\n    `;\n  }\n  \n  /**\n   Returns {@link Icon} sizes.\n   \n   @return {IconSizeEnum}\n   */\n  static get size() { return size; }\n  \n  /**\n   Loads the SVG icons. It's requesting the icons based on the JS file path by default.\n   \n   @param {String} [url] SVG icons url.\n   */\n  static load(url) {\n    const resolveIconsPath = (iconsPath) => {\n      const scripts = document.getElementsByTagName('script');\n      const path = scripts[scripts.length - 1].src;\n      return `${path.split('/').slice(0, -iconsPath.split('/').length).join('/')}/${iconsPath}`;\n    };\n    \n    if (url === SPECTRUM_ICONS) {\n      url = resolveIconsPath(SPECTRUM_ICONS_PATH);\n    }\n    else if (url === SPECTRUM_ICONS_COLOR) {\n      url = resolveIconsPath(SPECTRUM_ICONS_COLOR_PATH);\n    }\n    else if (url === SPECTRUM_CSS_ICONS) {\n      url = resolveIconsPath(SPECTRUM_CSS_ICONS_PATH);\n    }\n  \n    window.AdobeSpectrum.loadIcons(url);\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['icon', 'size', 'alt', 'title'];\n  }\n  \n  /** @ignore */\n  attributeChangedCallback(name, oldValue, value) {\n    if (name === 'alt' || name === 'title') {\n      this._updateAltText(value);\n    }\n    else {\n      super.attributeChangedCallback(name, oldValue, value);\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // Set default size\n    if (!this._size) {\n      this.size = size.SMALL;\n    }\n    \n    if (this._delayedRendering) {\n      this._updateIcon();\n    }\n  }\n}\n\n// Load all icons by default\nif (ICONS_PATH) {\n  ICONS.forEach(iconSet => Icon.load(`${ICONS_PATH}${iconSet}.svg`));\n}\nelse {\n  ICONS.forEach(iconSet => Icon.load(iconSet));\n}\n\nexport default Icon;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Icon from './src/scripts/Icon';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-icon', Icon);\n\nexport {Icon};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform, commons} from '../../../coralui-util';\nimport {Icon} from '../../../coralui-component-icon';\n\nconst CLASSNAME = '_coral-Accordion-item';\n\n/**\n @class Coral.Accordion.Item\n @classdesc A Accordion item component\n @htmltag coral-accordion-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass AccordionItem extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      // Create or fetch the content zones\n      label: this.querySelector('coral-accordion-item-label') || document.createElement('coral-accordion-item-label'),\n      content: this.querySelector('coral-accordion-item-content') || document.createElement('coral-accordion-item-content')\n    };\n  }\n  \n  /**\n   The label of this accordion item.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get label() {\n    return this._getContentZone(this._elements.label);\n  }\n  set label(value) {\n    this._setContentZone('label', value, {\n      handle: 'label',\n      tagName: 'coral-accordion-item-label',\n      insert: function(label) {\n        this._setAria(label, this._elements.content);\n        \n        this.insertBefore(label, this.firstChild);\n      }\n    });\n  }\n  \n  /**\n   The content of this accordion item.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-accordion-item-content',\n      insert: function(content) {\n        this._setAria(this._elements.label, content);\n        \n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   Whether the item is selected. If the item has an element with the `coral-interactive` attribute and is clicked,\n   then the toggling of the accordion item will not occur.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this._selected = this.hasAttribute('disabled') ? false : transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n    \n    // Read it before applying is-open which adds additional padding\n    const scrollHeight = this._elements.content.scrollHeight;\n    \n    this.classList.toggle('is-open', this._selected);\n    this._elements.label.setAttribute('aria-selected', this._selected);\n    this._elements.label.setAttribute('aria-expanded', this._selected);\n    this._elements.content.setAttribute('aria-hidden', !this._selected);\n    \n    if (!this._selected) {\n      this._elements.content.style.height = `${scrollHeight}px`;\n      // We read the offset height to force a reflow, this is needed to start the transition between absolute values\n      // https://blog.alexmaccaw.com/css-transitions under Redrawing\n      // eslint-disable-next-line no-unused-vars\n      const offsetHeight = this._elements.content.offsetHeight;\n    }\n    \n    this._elements.content.style.height = this._selected ? `${scrollHeight}px` : '0';\n\n    if (this._selected) {\n      commons.transitionEnd(this._elements.content, () => {\n        this._elements.content.style.height = '';\n      });\n    }\n  \n    this.trigger('coral-accordion-item:_selectedchanged');\n  }\n  \n  /**\n   Whether this item is disabled.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n  \n    this.classList.toggle('is-disabled', this._disabled);\n    this.removeAttribute('aria-disabled');\n    this._elements.label.setAttribute('aria-disabled', this._disabled);\n  \n    this.selected = this.selected;\n  }\n  \n  /** @private **/\n  get _isTabTarget() {\n    return this.__isTabTarget || false;\n  }\n  set _isTabTarget(value) {\n    this.__isTabTarget = value;\n    \n    if (this.disabled) {\n      this._elements.label.removeAttribute('tabindex');\n    }\n    else {\n      this._elements.label.setAttribute('tabindex', this.__isTabTarget ? '0' : '-1');\n    }\n  }\n  \n  _insertTemplate() {\n    const iconId = 'spectrum-css-icon-AccordionChevron';\n    const classes = ['_coral-Accordion-indicator', '_coral-Accordion-icon'];\n    \n    if (this.label) {\n      this.label.insertAdjacentHTML('afterend', Icon._renderSVG(iconId, classes));\n    }\n    else if (this.content) {\n      this.content.insertAdjacentHTML('beforebegin', Icon._renderSVG(iconId, classes));\n    }\n    else {\n      this.innerHTML = Icon._renderSVG(iconId, classes);\n    }\n  }\n  \n  _setAria(label, content) {\n    label.id = label.id || commons.getUID();\n    content.id = content.id || commons.getUID();\n  \n    label.setAttribute('aria-controls', content.id);\n    content.setAttribute('aria-labelledby', label.id);\n  }\n  \n  /**\n   Handles the focus of the item.\n \n   @ignore\n   */\n  focus() {\n    this._elements.label.focus();\n  }\n  \n  get _contentZones() { return {'coral-accordion-item-label': 'label', 'coral-accordion-item-content': 'content'}; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['selected', 'disabled'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // a11y\n    this.setAttribute('role', 'presentation');\n  \n    // Support cloneNode\n    const template = this.querySelector('._coral-Accordion-icon');\n    if (template) {\n      template.remove();\n    }\n    \n    // Move content into the content zone if not specified\n    if (!this._elements.content.parentNode) {\n      while (this.firstChild) {\n        this._elements.content.appendChild(this.firstChild);\n      }\n    }\n  \n    // Assign the content zones, moving them into place in the process\n    this.label = this._elements.label;\n    this.content = this._elements.content;\n  \n    // Insert template once content zones are placed\n    this._insertTemplate();\n    \n    // Defaults\n    this.selected = this.selected;\n  }\n}\n\nexport default AccordionItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Accordion-header';\n\n/**\n @class Coral.Accordion.Item.Label\n @classdesc Accordion item's label component\n @htmltag coral-accordion-item-label\n @extends {HTMLElement}\n */\nclass AccordionItemLabel extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  \n    // @spectrum this should be supported\n    this.style.display = 'block';\n  \n    // a11y\n    this.setAttribute('role', 'tab');\n  }\n}\n\nexport default AccordionItemLabel;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Accordion-content';\n\n/**\n @class Coral.Accordion.Item.Content\n @classdesc Accordion item's content component\n @htmltag coral-accordion-item-content\n @extends {HTMLElement}\n */\nclass AccordionItemContent extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n    \n    // a11y\n    this.setAttribute('role', 'tabpanel');\n  }\n}\n\nexport default AccordionItemContent;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Accordion from './src/scripts/Accordion';\nimport AccordionItem from './src/scripts/AccordionItem';\nimport AccordionItemLabel from './src/scripts/AccordionItemLabel';\nimport AccordionItemContent from './src/scripts/AccordionItemContent';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-accordion', Accordion);\nwindow.customElements.define('coral-accordion-item', AccordionItem);\nwindow.customElements.define('coral-accordion-item-label', AccordionItemLabel);\nwindow.customElements.define('coral-accordion-item-content', AccordionItemContent);\n\nAccordion.Item = AccordionItem;\nAccordion.Item.Label = AccordionItemLabel;\nAccordion.Item.Content = AccordionItemContent;\n\nexport {Accordion};\n","import {commons} from '../../../coralui-util';\n\n/** @ignore */\nexport default function getFirstSelectableWrappedItem(wrapperItem) {\n  // util method to get first selectable item inside a wrapper item\n  if (!wrapperItem) {\n    return null;\n  }\n  \n  if (wrapperItem.hasAttribute('coral-actionbar-more')) {\n    // more buttons are no 'real' actionbar items => not wrapped\n    return wrapperItem;\n  }\n  \n  let child = null;\n  for (let i = 0; i < wrapperItem.children.length; i++) {\n    child = wrapperItem.children[i];\n    \n    // maybe filter even more elements? (opacity, display='none', position='absolute' ...)\n    if (child.offsetParent && child.matches(commons.FOCUSABLE_ELEMENT_SELECTOR)) {\n      return child;\n    }\n  }\n  \n  return null;\n}\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport getFirstSelectableWrappedItem from './getFirstSelectableWrappedItem';\nimport {commons} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-ActionBar';\n\n/**\n @class Coral.ActionBar\n @classdesc An ActionBar component containing arbitrary items. An item can either be added to the left or the right side\n of the bar. All items that do not fit into the bar are hidden but still accessible.\n @htmltag coral-actionbar\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ActionBar extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Attach events\n    this._delegateEvents({\n      'key:up': '_onFocusPreviousItem',\n      'key:left': '_onFocusPreviousItem',\n      'key:down': '_onFocusNextItem',\n      'key:right': '_onFocusNextItem',\n      'global:resize': '_onResizeWindow'\n    });\n  \n    // Prepare templates\n    this._elements = {\n      // Fetch or create the content zone elements\n      primary: this.querySelector('coral-actionbar-primary') || document.createElement('coral-actionbar-primary'),\n      secondary: this.querySelector('coral-actionbar-secondary') || document.createElement('coral-actionbar-secondary')\n    };\n  \n    // Debounce wait time in milliseconds\n    this._wait = 50;\n  \n    // bind this._onLayout so it can be removed again\n    this._onLayout = this._onLayout.bind(this);\n    this._debounceOnLayout = this._debounceOnLayout.bind(this);\n  \n    // use the smart strategy instead of re-rendering every frame\n    this._recalculateLayoutOnMutation();\n  }\n  \n  /**\n   The primary (left) container of the ActionBar.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get primary() {\n    return this._getContentZone(this._elements.primary);\n  }\n  set primary(value) {\n    this._setContentZone('primary', value, {\n      handle: 'primary',\n      tagName: 'coral-actionbar-primary',\n      insert: function(content) {\n        // primary has to be before secondary if available\n        this.insertBefore(content, this.secondary);\n      }\n    });\n  }\n\n  /**\n   The secondary (right) container of the ActionBar.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get secondary() {\n    return this._getContentZone(this._elements.secondary);\n  }\n  set secondary(value) {\n    this._setContentZone('secondary', value, {\n      handle: 'secondary',\n      tagName: 'coral-actionbar-secondary',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /** @ignore */\n  _recalculateLayoutOnMutation() {\n    // recalculate layout on dom element size change + on dom mutation\n    // http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/\n    \n    // relayout any time the dom changes\n    const self = this;\n    this._observer = new MutationObserver(() => {\n      self._debounceOnLayout();\n    });\n    \n    // Watch for changes\n    this._observer.observe(this, {\n      attributes: true,\n      childList: true,\n      characterData: true,\n      subtree: true\n    });\n  }\n  \n  /** @ignore */\n  _onFocusPreviousItem(event) {\n    // stops the page from scrolling\n    event.preventDefault();\n    \n    const previousItem = this._getPreviousSelectableWrappedItem(event.target);\n    if (previousItem !== null) {\n      previousItem.focus();\n    }\n  }\n  \n  /** @ignore */\n  _onFocusNextItem(event) {\n    // stops the page from scrolling\n    event.preventDefault();\n    \n    const nextWrappedItem = this._getNextSelectableWrappedItem(event.target);\n    if (nextWrappedItem !== null) {\n      nextWrappedItem.focus();\n    }\n  }\n  \n  /** @ignore */\n  _onResizeWindow() {\n    // just close all popovers for now when screen is resized\n    // there might be more popovers, then the 'more' popovers\n    const popovers = this.getElementsByTagName('coral-popover');\n    for (let i = 0; i < popovers.length; i++) {\n      popovers[i].removeAttribute('open');\n    }\n    \n    // force a relayout (needed especially if framerate during resize drops e.g.: in FF)\n    this._debounceOnLayout();\n  }\n  \n  /** @ignore */\n  _onLayout() {\n    if (!this.primary || !this.primary._elements.overlay || !this.secondary || !this.secondary._elements.overlay) {\n      // while containers are not cached do nothing\n      return;\n    }\n    \n    if (this.primary._elements.overlay.open === true || this.secondary._elements.overlay.open === true) {\n      // while popovers are open do not relayout\n      return;\n    }\n    \n    let focusedItem = document.activeElement;\n    if (!(this !== focusedItem && this.contains(focusedItem))) {\n      // focus not on the actionbar => do not bother\n      focusedItem = null;\n    }\n    \n    if (focusedItem && focusedItem.parentNode && focusedItem.parentNode.tagName === 'CORAL-ACTIONBAR-ITEM') {\n      // focusedItem is wrapped\n      focusedItem = focusedItem.parentNode;\n    }\n    \n    const ERROR_MARGIN = 25;\n    \n    const leftItems = this.primary.items.getAll();\n    const rightItems = this.secondary.items.getAll().reverse();\n    let itemLeft = null;\n    let itemRight = null;\n    const widthCache = this._newWidthCache();\n    const leftMoreButtonWidth = leftItems.length > 0 ? widthCache.getOuterWidth(this.primary._elements.moreButton) : 0;\n    const rightMoreButtonWidth = rightItems.length > 0 ? widthCache.getOuterWidth(this.secondary._elements.moreButton) : 0;\n    \n    // Make it possible to set left/right padding to the containers\n    const borderWidthLeftContainer = this.primary.offsetWidth - this.primary.getBoundingClientRect().width;\n    const borderWidthRightContainer = this.secondary.offsetWidth - this.secondary.getBoundingClientRect().width;\n    \n    const primaryLeftOffset = this.primary.offsetLeft;\n    const secondaryRightOffset = this.offsetWidth - (this.secondary.offsetLeft + this.secondary.offsetWidth);\n    \n    let availableWidth = this.offsetWidth - primaryLeftOffset - secondaryRightOffset - leftMoreButtonWidth -\n      rightMoreButtonWidth - borderWidthLeftContainer - borderWidthRightContainer - ERROR_MARGIN;\n    let currentUsedWidth = 0;\n    let leftVisibleItems = 0;\n    let rightVisibleItems = 0;\n    let moreButtonLeftVisible = false;\n    let moreButtonRightVisible = false;\n    let showItem = false;\n    let itemWidth = 0;\n    \n    for (let i = 0; i < leftItems.length || i < rightItems.length; i++) {\n      itemLeft = i < leftItems.length ? leftItems[i] : null;\n      itemRight = i < rightItems.length ? rightItems[i] : null;\n      \n      // first calculate visibility of left item\n      showItem = false;\n      if (itemLeft !== null) {\n        \n        if (itemLeft.hidden || itemLeft.style.display === 'none') {\n          // item is hidden on purpose (we don't use it for layouting but do also not move offscreen) needed as it\n          // might already have been moved offscreen before\n          this._moveToScreen(itemLeft);\n        }\n        else {\n          // if item is not hidden on purpose (hiding by actionBar due to space problems does not count) => layout\n          // element\n          if (!moreButtonLeftVisible && (this.primary.threshold <= 0 || leftVisibleItems < this.primary.threshold)) {\n            // if threshold is not reached so far\n            itemWidth = widthCache.getOuterWidth(itemLeft);\n            \n            if (currentUsedWidth + itemWidth < availableWidth) {\n              // if there is still enough space to show another item\n              showItem = true;\n            }\n            else if (leftVisibleItems === leftItems.length - 1 &&\n              currentUsedWidth + itemWidth < availableWidth + leftMoreButtonWidth\n            ) {\n              // if this is the last item and so far there have been no items hidden => don't show more button\n              showItem = true;\n            }\n          }\n          \n          // enable tab for first left item\n          this._makeItemTabEnabled(itemLeft, showItem && i === 0);\n          \n          if (showItem) {\n            leftVisibleItems += 1;\n            currentUsedWidth += itemWidth;\n            this._moveToScreen(itemLeft);\n          }\n          else {\n            this._hideItem(itemLeft);\n            moreButtonLeftVisible = true;\n          }\n          \n          if (leftVisibleItems === leftItems.length) {\n            // left more button not needed => more free space available\n            availableWidth += leftMoreButtonWidth;\n            moreButtonLeftVisible = false;\n          }\n        }\n      }\n      \n      // then calculate visibility of right item\n      showItem = false;\n      if (itemRight !== null) {\n        if (itemRight.hidden || itemRight.style.display === 'none') {\n          // item is hidden on purpose (we don't use it for layouting but do also not move offscreen) needed as it\n          // might already have been moved offscreen before\n          this._moveToScreen(itemRight);\n        }\n        else {\n          // if item is not hidden on purpose (hiding by actionBar due to space problems does not count) => layout\n          // element\n          if (!moreButtonRightVisible && (this.secondary.threshold <= 0 || rightVisibleItems < this.secondary.threshold)) {\n            // if threshold is not reached so far\n            itemWidth = widthCache.getOuterWidth(itemRight);\n            \n            if (currentUsedWidth + itemWidth < availableWidth) {\n              // if there is still enough space to show another item\n              showItem = true;\n            }\n            else if (rightVisibleItems === rightItems.length - 1 &&\n              currentUsedWidth + itemWidth < availableWidth + rightMoreButtonWidth\n            ) {\n              // if this is the last item and so far there have been no items hidden => don't show more button\n              showItem = true;\n            }\n          }\n          \n          // enable tab for 'first' right item\n          this._makeItemTabEnabled(itemRight, showItem && i === rightItems.length - 1);\n          \n          if (showItem) {\n            rightVisibleItems += 1;\n            currentUsedWidth += itemWidth;\n            this._moveToScreen(itemRight);\n          }\n          else {\n            this._hideItem(itemRight);\n            moreButtonRightVisible = true;\n          }\n          \n          if (rightVisibleItems === rightItems.length) {\n            // left more button not needed => more free space available\n            availableWidth += rightMoreButtonWidth;\n            moreButtonRightVisible = false;\n          }\n        }\n      }\n    }\n    \n    // show or hide more buttons\n    this._moveToScreen(this.primary._elements.moreButton, moreButtonLeftVisible);\n    this._moveToScreen(this.secondary._elements.moreButton, moreButtonRightVisible);\n    \n    // enable tabs on more buttons if needed\n    this._makeItemTabEnabled(this.primary._elements.moreButton, leftVisibleItems < 1);\n    this._makeItemTabEnabled(this.secondary._elements.moreButton, rightVisibleItems < rightItems.length);\n    \n    // we need to check if item has 'hasAttribute' because it is not present on the document\n    if (focusedItem && focusedItem.hasAttribute && focusedItem.hasAttribute('coral-actionbar-offscreen')) {\n      // if currently an element is focused, that should not be visible => select first selectable element nicer\n      // algorithm possible\n      const wrappedItem = getFirstSelectableWrappedItem(this._getAllSelectableItems()[0]);\n      if (wrappedItem) {\n        wrappedItem.focus();\n      }\n    }\n  }\n  \n  /** @ignore */\n  _getNextSelectableWrappedItem(currentItem) {\n    if (currentItem.parentNode.tagName === 'CORAL-ACTIONBAR-ITEM') {\n      // currentItem is wrapped\n      currentItem = currentItem.parentNode;\n    }\n    \n    const selectableItems = this._getAllSelectableItems(currentItem);\n    const index = selectableItems.indexOf(currentItem);\n    \n    if (index >= 0 && selectableItems.length > index + 1) {\n      //if there is a next selectable element return it\n      return getFirstSelectableWrappedItem(selectableItems[index + 1]);\n    }\n    \n    return null;\n  }\n  \n  /** @ignore */\n  _getPreviousSelectableWrappedItem(currentItem) {\n    if (currentItem.parentNode.tagName === 'CORAL-ACTIONBAR-ITEM') {\n      // currentItem is wrapped\n      currentItem = currentItem.parentNode;\n    }\n    \n    const selectableItems = this._getAllSelectableItems(currentItem);\n    const index = selectableItems.indexOf(currentItem);\n    \n    if (index > 0) {\n      //if there is a previous selectable element return it\n      return getFirstSelectableWrappedItem(selectableItems[index - 1]);\n    }\n    \n    return null;\n  }\n  \n  /** @ignore */\n  _getAllSelectableItems(currentItem) {\n    let selectableItems = [];\n    \n    if (this.primary._elements.overlay.open === true || this.secondary._elements.overlay.open === true) {\n      // if popover is open only items in popover can be selected\n      const popoverItems = this.primary._elements.overlay.open === true ? this.primary._itemsInPopover :\n        this.secondary._itemsInPopover;\n      let item = null;\n      \n      for (let i = 0; i < popoverItems.length; i++) {\n        item = popoverItems[i];\n        if (!item.hasAttribute('disabled') &&\n          !item.hasAttribute('hidden') &&\n          item.style.display !== 'none' &&\n          getFirstSelectableWrappedItem(item)\n        ) {\n          selectableItems.push(item);\n        }\n      }\n    }\n    else {\n      // concat selectable items from left side of the bar and right side of the bar\n      const leftSelectableItems = this.primary.items._getAllSelectable();\n      const rightSelectableItems = this.secondary.items._getAllSelectable();\n      if (currentItem) {\n        if (leftSelectableItems.indexOf(currentItem) >= 0) {\n          selectableItems = leftSelectableItems;\n        }\n        else if (rightSelectableItems.indexOf(currentItem) >= 0) {\n          selectableItems = rightSelectableItems;\n        }\n      }\n      else {\n        selectableItems = leftSelectableItems.concat(rightSelectableItems);\n      }\n    }\n    \n    return selectableItems;\n  }\n  \n  /** @ignore */\n  _newWidthCache() {\n    return {\n      _items: [],\n      _outerWidth: [],\n      getOuterWidth: function(item) {\n        let index = this._items.indexOf(item);\n        if (index < 0) {\n          // if item was not cached in current frame => cache it\n          this._items.push(item);\n          \n          const width = item.offsetWidth;\n          this._outerWidth.push(width);\n          index = this._outerWidth.length - 1;\n        }\n        \n        return this._outerWidth[index];\n      }\n    };\n  }\n  \n  /** @ignore */\n  _forceWebkitRedraw(el) {\n    const isWebkit = 'WebkitAppearance' in document.documentElement.style;\n    \n    if (isWebkit && el.style.display !== 'none') {\n      el.style.display = 'none';\n      \n      // no need to store this anywhere, the reference would be enough\n      this._cachedOffsetHeight = el.offsetHeight;\n      \n      el.style.display = '';\n    }\n  }\n  \n  /** @ignore */\n  _hideItem(item, hide) {\n    if (hide === false) {\n      this._moveToScreen(item);\n    }\n    else if (!item.hasAttribute('coral-actionbar-offscreen')) {\n      // actually just move element offscreen to be able to measure the size while calculating the layout\n      item.setAttribute('coral-actionbar-offscreen', '');\n      // if I do not force a browser redraw webkit has layouting problems\n      this._forceWebkitRedraw(item);\n    }\n  }\n  \n  /** @ignore */\n  _moveToScreen(item, show) {\n    if (show === false) {\n      this._hideItem(item);\n    }\n    else if (item.hasAttribute('coral-actionbar-offscreen')) {\n      // actually just move element onscreen again (see _hideItem)\n      item.removeAttribute('coral-actionbar-offscreen');\n      // if I do not force a browser redraw webkit has layouting problems\n      this._forceWebkitRedraw(item);\n    }\n  }\n  \n  /** @ignore */\n  _makeItemTabEnabled(item, tabable) {\n    // item might be wrapped (for now remove/add tabindex only on the first wrapped item)\n    item = getFirstSelectableWrappedItem(item);\n    \n    if (item !== null) {\n      if (tabable && item.hasAttribute('tabindex')) {\n        item.removeAttribute('tabindex');\n      }\n      else if (!tabable && !item.hasAttribute('tabindex')) {\n        item.setAttribute('tabindex', '-1');\n      }\n    }\n  }\n  \n  /** @ignore */\n  _debounceOnLayout() {\n    const self = this;\n    \n    // Debounce\n    if (self._timeout !== null) {\n      window.clearTimeout(self._timeout);\n    }\n    \n    self._timeout = window.setTimeout(() => {\n      self._timeout = null;\n      self._onLayout();\n    }, self._wait);\n  }\n  \n  _moveDirectItemChildren() {\n    const items = Array.prototype.filter.call(this.children, child => child.nodeName === 'CORAL-ACTIONBAR-ITEM');\n    const frag = document.createDocumentFragment();\n    \n    // Move them to the frag\n    items.forEach((item) => {\n      frag.appendChild(item);\n    });\n    \n    // Add the frag to primary content zone\n    this._elements.primary.appendChild(frag);\n  }\n  \n  get _contentZones() {\n    return {\n      'coral-actionbar-primary': 'primary',\n      'coral-actionbar-secondary': 'secondary'\n    };\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // Move direct items into primary content zone\n    this._moveDirectItemChildren();\n  \n    // Cleanup resize helpers object (cloneNode support)\n    const resizeHelpers = this.querySelectorAll('object');\n    for (let i = 0; i < resizeHelpers.length; ++i) {\n      const resizeElement = resizeHelpers[i];\n      if (resizeElement.parentNode === this) {\n        this.removeChild(resizeElement);\n      }\n    }\n  \n    const primary = this._elements.primary;\n    const secondary = this._elements.secondary;\n  \n    // we need to know if the content zone was provided to stop the voracious behavior\n    let primaryProvided = primary.parentNode === this;\n  \n    // as a way to transition to the new content zones, we need to provide support for the old container tag. we copy\n    // everything from these containers into the corresponding content zones, including the configurations\n    const containers = Array.prototype.slice.call(this.getElementsByTagName('coral-actionbar-container'));\n  \n    let legacyContainer;\n    let targetContainer;\n    for (let j = 0, containersCount = containers.length; j < containersCount; j++) {\n      legacyContainer = containers[j];\n    \n      // move first container content to new primary element\n      if (j === 0) {\n        targetContainer = primary;\n        // overrides the previous configuration as we support older containers\n        primaryProvided = true;\n      }\n      else if (j === 1) {\n        targetContainer = secondary;\n      }\n    \n      // it may happen that more than 2 containers were provided, in such case we simply ignore it\n      if (targetContainer) {\n        // we need to copy the existing configuration to the new content zone\n        if (legacyContainer.hasAttribute('threshold')) {\n          targetContainer.setAttribute('threshold', legacyContainer.getAttribute('threshold'));\n        }\n        if (legacyContainer.hasAttribute('morebuttontext')) {\n          targetContainer.setAttribute('morebuttontext', legacyContainer.getAttribute('morebuttontext'));\n        }\n      \n        // @todo: are we copying the more button?\n        while (legacyContainer.firstChild) {\n          targetContainer.appendChild(legacyContainer.firstChild);\n        }\n      }\n    \n      this.removeChild(legacyContainer);\n    }\n  \n    // to prevent the content zone being voracious, we only move the children if primary was not explicitely provided\n    if (!primaryProvided) {\n      while (this.firstChild) {\n        primary.appendChild(this.firstChild);\n      }\n    }\n    \n    // Call content zone inserts\n    this.primary = this._elements.primary;\n    this.secondary = this._elements.secondary;\n  \n    // re-calculate layout on element resize\n    commons.addResizeListener(this, this._debounceOnLayout);\n    commons.addResizeListener(this.primary, this._debounceOnLayout);\n    commons.addResizeListener(this.secondary, this._debounceOnLayout);\n\n    //force one layout\n    this._onLayout();\n  }\n}\n\nexport default ActionBar;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\n\nconst CLASSNAME = '_coral-ActionBar-item';\n\n/**\n @class Coral.ActionBar.Item\n @classdesc An ActionBar item component\n @htmltag coral-actionbar-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ActionBarItem extends ComponentMixin(HTMLElement) {\n  /**\n   Item content element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    // Support configs\n    if (typeof value === 'object') {\n      for (const prop in value) {\n        /** @ignore */\n        this[prop] = value[prop];\n      }\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default ActionBarItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {SelectableCollection} from '../../../coralui-collection';\nimport getFirstSelectableWrappedItem from './getFirstSelectableWrappedItem';\n\n/**\n @class Coral.ActionBar.Container.Collection\n @classdesc The ActionBar container collection\n @extends {SelectableCollection}\n */\nclass ActionBarContainerCollection extends SelectableCollection {\n  add(item, before) {\n    // in the left actionBar container always insert elements before the 'more' button in right actionBar always append\n    // at the end\n    if (!before && this._host.tagName === 'CORAL-ACTIONBAR-PRIMARY') {\n      const moreButton = this._host._elements.moreButton;\n      before = this._host.contains(moreButton) ? moreButton : null;\n    }\n  \n    return super.add(item, before);\n  }\n  \n  clear() {\n    const items = super.clear();\n  \n    this._host._itemsInPopover = [];\n  \n    return items;\n  }\n  \n  _getAllSelectable() {\n    const selectableItems = [];\n    \n    let child = null;\n    for (let i = 0; i < this._host.children.length; i++) {\n      child = this._host.children[i];\n      if (\n        !child.hasAttribute('disabled') &&\n        !child.hasAttribute('hidden') &&\n        !child.hasAttribute('coral-actionbar-offscreen') &&\n        child !== this._host._elements.overlay &&\n        getFirstSelectableWrappedItem(child)\n      ) {\n        selectableItems.push(child);\n      }\n    }\n  \n    return selectableItems;\n  }\n  \n  _getAllOffScreen() {\n    return Array.prototype.slice.call(this._host.querySelectorAll(`${this._itemTagName}[coral-actionbar-offscreen]`));\n  }\n}\n\nexport default ActionBarContainerCollection;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {Icon} from '../../../coralui-component-icon';\nimport {transform, validate} from '../../../coralui-util';\n\n/**\n Enumeration for {@link Button}, {@link AnchorButton} icon sizes.\n \n @typedef {Object} ButtonIconSizeEnum\n \n @property {String} EXTRA_EXTRA_SMALL\n Extra extra small size icon, typically 9px size.\n @property {String} EXTRA_SMALL\n Extra small size icon, typically 12px size.\n @property {String} SMALL\n Small size icon, typically 18px size. This is the default size.\n @property {String} MEDIUM\n Medium size icon, typically 24px size.\n */\nconst iconSize = {};\nconst excludedIconSizes = [Icon.size.LARGE, Icon.size.EXTRA_LARGE, Icon.size.EXTRA_EXTRA_LARGE];\nfor (const key in Icon.size) {\n  // Populate button icon sizes by excluding the largest icon sizes\n  if (excludedIconSizes.indexOf(Icon.size[key]) === -1) {\n    iconSize[key] = Icon.size[key];\n  }\n}\n\n/**\n Enumeration for {@link Button}, {@link AnchorButton} variants.\n \n @typedef {Object} ButtonVariantEnum\n \n @property {String} CTA\n A button that is meant to grab the user's attention.\n @property {String} PRIMARY\n A default button that indicates that the button's action is the primary action.\n @property {String} SECONDARY\n A button that indicates that the button's action is the secondary action.\n @property {String} QUIET\n A quiet button that indicates that the button's action is the primary action.\n @property {String} MINIMAL\n A quiet button that indicates that the button's action is the secondary action.\n @property {String} WARNING\n A button that indicates that the button's action is dangerous.\n @property {String} ICON\n A quiet icon only button.\n @property {String} DEFAULT\n Not supported. Falls back to SECONDARY.\n */\nconst variant = {\n  CTA: 'cta',\n  PRIMARY: 'primary',\n  SECONDARY: 'secondary',\n  QUIET: 'quiet',\n  MINIMAL: 'minimal',\n  WARNING: 'warning',\n  ICON: 'icon',\n  DEFAULT: 'secondary',\n  // Private to be used for custom Button classes like toggle, dropdown and action\n  _CUSTOM: '_custom'\n};\n\n// the button's base classname\nconst CLASSNAME = '_coral-Button';\n\n// builds an array containing all possible variant classnames. this will be used to remove classnames when the variant\n// changes\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantValue in variant) {\n  let value;\n  if (variantValue === 'QUIET') {\n    value = `${CLASSNAME}--${variant.QUIET}--primary`;\n  }\n  else if (variantValue === 'MINIMAL') {\n    value = `${CLASSNAME}--${variant.QUIET}--secondary`;\n  }\n  else {\n    value = `${CLASSNAME}--${variant[variantValue]}`;\n  }\n  \n  if (variantValue !== '_CUSTOM') {\n    ALL_VARIANT_CLASSES.push(value);\n  }\n}\n\n/**\n Enumeration for {@link ButtonMixin} sizes.\n \n @typedef {Object} ButtonSizeEnum\n \n @property {String} MEDIUM\n A medium button is the default, normal sized button.\n @property {String} LARGE\n Not supported. Falls back to MEDIUM.\n */\nconst size = {\n  MEDIUM: 'M',\n  LARGE: 'L'\n};\n\n/**\n Enumeration for {@link ButtonMixin} icon position options.\n \n @typedef {Object} ButtonIconPositionEnum\n \n @property {String} RIGHT\n Position should be right of the button label.\n @property {String} LEFT\n Position should be left of the button label.\n */\nconst iconPosition = {\n  RIGHT: 'right',\n  LEFT: 'left'\n};\n\n/**\n @mixin ButtonMixin\n @classdesc The base element for Button components\n */\nconst ButtonMixin = (superClass) => class extends superClass {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Templates\n    this._elements = {\n      // Create or fetch the label element\n      label: this.querySelector(this._contentZoneTagName) || document.createElement(this._contentZoneTagName)\n    };\n    \n    // Events\n    this._events = {\n      mousedown: '_onMouseDown'\n    };\n  \n    // Listen for mutations\n    this._observer = new MutationObserver(this._makeAccessible.bind(this));\n    \n    // Watch for changes to the label element\n    this._observer.observe(this._elements.label, {\n      // Catch changes to childList\n      childList: true,\n      // Catch changes to textContent\n      characterData: true,\n      // Monitor any child node\n      subtree: true\n    });\n  }\n  \n  /**\n   The label of the button.\n   @type {HTMLElement}\n   @contentzone\n   */\n  get label() {\n    return this._getContentZone(this._elements.label);\n  }\n  set label(value) {\n    this._setContentZone('label', value, {\n      handle: 'label',\n      tagName: this._contentZoneTagName,\n      insert: function(label) {\n        if (this.iconPosition === iconPosition.LEFT) {\n          this.appendChild(label);\n        }\n        else {\n          this.insertBefore(label, this.firstChild);\n        }\n      }\n    });\n  }\n  \n  /**\n   Position of the icon relative to the label. If no <code>iconPosition</code> is provided, it will be set on the\n   left side by default.\n   See {@link ButtonIconPositionEnum}.\n   \n   @type {String}\n   @default ButtonIconPositionEnum.LEFT\n   @htmlattribute iconposition\n   @htmlattributereflected\n   */\n  get iconPosition() {\n    return this._iconPosition || iconPosition.LEFT;\n  }\n  set iconPosition(value) {\n    value = transform.string(value).toLowerCase();\n    this._iconPosition = validate.enumeration(iconPosition)(value) && value || iconPosition.LEFT;\n    this._reflectAttribute('iconposition', this._iconPosition);\n    \n    this._updateIcon(this.icon);\n  }\n  \n  /**\n   Specifies the icon name used inside the button. See {@link Icon} for valid icon names.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   */\n  get icon() {\n    return this._elements.icon && this._elements.icon.icon || '';\n  }\n  set icon(value) {\n    this._updateIcon(value);\n  }\n  \n  /**\n   Size of the icon. It accepts both lower and upper case sizes. See {@link ButtonIconSizeEnum}.\n   \n   @type {String}\n   @default ButtonIconSizeEnum.SMALL\n   @htmlattribute iconsize\n   */\n  get iconSize() {\n    return this._elements.icon && this._elements.icon.size || iconSize.SMALL;\n  }\n  set iconSize(value) {\n    value = transform.string(value).toUpperCase();\n    this._getIconElement().size = validate.enumeration(iconSize)(value) && value || iconSize.SMALL;\n  }\n  \n  /**\n   The size of the button. It accepts both lower and upper case sizes. See {@link ButtonSizeEnum}.\n   Currently only \"MEDIUM\" is supported.\n   \n   @type {String}\n   @default ButtonSizeEnum.MEDIUM\n   @htmlattribute size\n   @htmlattributereflected\n   */\n  get size() {\n    return this._size || size.MEDIUM;\n  }\n  set size(value) {\n    value = transform.string(value).toUpperCase();\n    this._size = validate.enumeration(size)(value) && value || size.MEDIUM;\n    this._reflectAttribute('size', this._size);\n  }\n  \n  /**\n   Whether the button is selected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n    \n    this.classList.toggle('is-selected', this._selected);\n    \n    this.trigger('coral-button:_selectedchanged');\n  }\n  \n  // We just reflect it but we also trigger an event to be used by button group\n  /** @ignore */\n  get value() {\n    return this.getAttribute('value');\n  }\n  set value(value) {\n    this._reflectAttribute('value', value);\n  \n    this.trigger('coral-button:_valuechanged');\n  }\n  \n  /**\n   Expands the button to the full width of the parent.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute block\n   @htmlattributereflected\n   */\n  get block() {\n    return this._block || false;\n  }\n  set block(value) {\n    this._block = transform.booleanAttr(value);\n    this._reflectAttribute('block', this._block);\n  \n    this.classList.toggle(`${CLASSNAME}--block`, this._block);\n  }\n  \n  /**\n   The button's variant. See {@link ButtonVariantEnum}.\n   \n   @type {String}\n   @default ButtonVariantEnum.PRIMARY\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.PRIMARY;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.PRIMARY;\n    this._reflectAttribute('variant', this._variant);\n    \n    // removes every existing variant\n    this.classList.remove(...ALL_VARIANT_CLASSES);\n    \n    if (this._variant === variant.QUIET) {\n      this.classList.add(`${CLASSNAME}--${variant.QUIET}--primary`);\n    }\n    else if (this._variant === variant.MINIMAL) {\n      this.classList.add(`${CLASSNAME}--${variant.QUIET}--secondary`);\n    }\n    else if (this._variant !== variant._CUSTOM) {\n      this.classList.add(`${CLASSNAME}--${this._variant}`);\n    }\n    \n    // Hide the label if we're in icon only mode\n    this._elements.label.hidden = this._variant === variant.ICON;\n  }\n  \n  /** @ignore */\n  _updateIcon(value) {\n    const iconElement = this._getIconElement();\n    iconElement.icon = value;\n  \n    // removes the icon element from the DOM.\n    if (this.icon === '') {\n      iconElement.remove();\n    }\n    // add or adjust the icon. Add it back since it was blown away by textContent\n    else if (!iconElement.parentNode || this._iconPosition) {\n      if (this.contains(this.label)) {\n        // insertBefore with <code>null</code> appends\n        this.insertBefore(iconElement, this.iconPosition === iconPosition.LEFT ? this.label : this.label.nextElementSibling);\n      }\n    }\n  \n    // makes sure the button is correctly annotated\n    this._makeAccessible();\n  }\n  \n  /**\n   Sets the correct accessibility annotations on the icon element.\n   @protected\n   */\n  _makeAccessible() {\n    const hasLabel = this.label && this.label.textContent.length > 0;\n  \n    // when the button has a icon, we need to make sure it is labelled correctly\n    if (this.icon !== '' && hasLabel) {\n      this._elements.icon.alt = '';\n    }\n    else if (this._elements.icon) {\n      this._elements.icon._updateAltText();\n    }\n  }\n  \n  /** @ignore */\n  _getIconElement() {\n    if (!this._elements.icon) {\n      this._elements.icon = new Icon();\n      this._elements.icon.size = this.iconSize;\n    }\n    return this._elements.icon;\n  }\n  \n  /**\n   Forces button to receive focus on mousedown\n   @param {MouseEvent} event mousedown event\n   @ignore\n   */\n  _onMouseDown(event) {\n    const target = event.matchedTarget;\n    \n    // Wait a frame or button won't receive focus in Safari.\n    window.requestAnimationFrame(() => {\n      if (target !== document.activeElement) {\n        target.focus();\n      }\n    });\n  }\n  \n  /** @private */\n  get _contentZoneTagName() {\n    return Object.keys(this._contentZones)[0];\n  }\n  \n  get _contentZones() { return {'coral-button-label': 'label'}; }\n  \n  /**\n   Returns {@link ButtonMixin} sizes.\n   \n   @return {ButtonSizeEnum}\n   */\n  static get size() { return size; }\n  \n  /**\n   Returns {@link ButtonMixin} variants.\n   \n   @return {ButtonVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /**\n   Returns {@link ButtonMixin} icon positions.\n   \n   @return {ButtonIconPositionEnum}\n   */\n  static get iconPosition() { return iconPosition; }\n  \n  /**\n   Returns {@link ButtonMixin} icon sizes.\n   \n   @return {ButtonIconSizeEnum}\n   */\n  static get iconSize() { return iconSize; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return [\n      'iconposition',\n      'iconPosition',\n      'iconsize',\n      'iconSize',\n      'icon',\n      'size',\n      'selected',\n      'block',\n      'variant',\n      'value'\n    ];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.PRIMARY; }\n    if (!this._size) { this.size = size.MEDIUM; }\n    \n    // Create a fragment\n    const fragment = document.createDocumentFragment();\n    \n    const label = this._elements.label;\n  \n    const contentZoneProvided = label.parentNode;\n    \n    // Remove it so we can process children\n    if (contentZoneProvided) {\n      this.removeChild(label);\n    }\n  \n    let iconAdded = false;\n    // Process remaining elements as necessary\n    while (this.firstChild) {\n      const child = this.firstChild;\n    \n      if (child.nodeName === 'CORAL-ICON') {\n        // Don't add duplicated icons\n        if (iconAdded) {\n          this.removeChild(child);\n        }\n        else {\n          // Conserve existing icon element to content\n          this._elements.icon = child;\n          fragment.appendChild(child);\n          iconAdded = true;\n        }\n      }\n      // Avoid content zone to be voracious\n      else if (contentZoneProvided) {\n        fragment.appendChild(child);\n      }\n      else {\n        // Move anything else into the label\n        label.appendChild(child);\n      }\n    }\n  \n    // Add the frag to the component\n    this.appendChild(fragment);\n  \n    // Assign the content zones, moving them into place in the process\n    this.label = label;\n  \n    // Make sure the icon is well positioned\n    this._updateIcon(this.icon);\n  \n    // a11y\n    this._makeAccessible();\n  }\n  \n  /**\n   Triggered when {@link ButtonMixin#selected} changed.\n   \n   @typedef {CustomEvent} coral-button:_selectedchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link ButtonMixin#value} changed.\n   \n   @typedef {CustomEvent} coral-button:_valuechanged\n   \n   @private\n   */\n};\n\nexport default ButtonMixin;\n","import ButtonMixin from './src/scripts/ButtonMixin';\nimport {mixin} from '../coralui-util';\n\n// Expose mixin on Coral namespace\nmixin._button = ButtonMixin;\n\nexport {ButtonMixin};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {ButtonMixin} from '../../../coralui-mixin-button';\n\n\n/**\n @class Coral.Button\n @classdesc A Button component containing text and/or an icon.\n @htmltag coral-button\n @htmlbasetag button\n @extends {HTMLButtonElement}\n @extends {ComponentMixin}\n @extends {ButtonMixin}\n */\nclass Button extends ButtonMixin(ComponentMixin(HTMLButtonElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents(this._events);\n  }\n}\n\nexport default Button;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Button.Label\n @classdesc The Button label content\n @htmltag coral-button-label\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-button-label');\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Button from './src/scripts/Button';\nimport ButtonLabel from './src/scripts/ButtonLabel';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-button', Button, {extends: 'button'});\n\nButton.Label = ButtonLabel;\n\nexport {Button};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {ButtonMixin} from '../../../coralui-mixin-button';\nimport {transform, commons} from '../../../coralui-util';\n\n// Key code\nconst SPACE = 32;\n\n/**\n @class Coral.AnchorButton\n @classdesc A Link component rendering as a button allowing us to style an anchor element that both looks and behaves\n like a button rather than a link. It can receive keyboard focus regardless of whether or not it has an <code>href</code>\n attribute, can be activated using either the <code>SPACE</code> key or the <code>ENTER</code> key, and is identified to\n assistive technology as a button element.\n @htmltag coral-anchorbutton\n @htmlbasetag a\n @extends {HTMLAnchorElement}\n @extends {ComponentMixin}\n @extends {ButtonMixin}\n */\nclass AnchorButton extends ButtonMixin(ComponentMixin(HTMLAnchorElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents(commons.extend(this._events, {\n      keydown: '_onKeyDown',\n      keyup: '_onKeyUp'\n    }));\n    \n    // cannot use the events hash because events on disabled items are not reported\n    this.addEventListener('click', this._onClick.bind(this));\n  }\n  \n  /**\n   Disables the button from user interaction.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.classList.toggle('is-disabled', this._disabled);\n    this.setAttribute('tabindex', this._disabled ? '-1' : '0');\n    this.setAttribute('aria-disabled', this._disabled);\n  }\n  \n  /**\n   Keyboard handling per the WAI-ARIA button widget design pattern:\n   https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role\n \n   @ignore\n   */\n  _onKeyDown(event) {\n    if (event.keyCode === SPACE) {\n      event.preventDefault();\n      this.click();\n      this.classList.add('is-selected');\n    }\n  }\n  \n  /** @ignore */\n  _onKeyUp(event) {\n    if (event.keyCode === SPACE) {\n      event.preventDefault();\n      this.classList.remove('is-selected');\n    }\n  }\n  \n  /** @ignore */\n  _onClick(event) {\n    if (this.disabled) {\n      event.preventDefault();\n    }\n  }\n  \n  // Override content zone name\n  get _contentZones() { return {'coral-anchorbutton-label': 'label'}; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat(['disabled']);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    // a11y\n    this.setAttribute('role', 'button');\n    if (!this.disabled) {\n      // Force tabindex and aria-disabled attribute reflection\n      this.setAttribute('tabindex', '0');\n      this.setAttribute('aria-disabled', 'false');\n    }\n  }\n}\n\nexport default AnchorButton;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.AnchorButton.Label\n @classdesc The AnchorButton label content\n @htmltag coral-anchorbutton-label\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-anchorbutton-label');\n\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport AnchorButton from './src/scripts/AnchorButton';\nimport AnchorButtonLabel from './src/scripts/AnchorButtonLabel';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-anchorbutton', AnchorButton, {extends: 'a'});\n\nAnchorButton.Label = AnchorButtonLabel;\n\nexport {AnchorButton};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"topTabCapture\"] = document.createElement(\"div\");\n  el0.setAttribute(\"handle\", \"topTabCapture\");\n  el0.setAttribute(\"coral-tabcapture\", \"top\");\n  el0.setAttribute(\"tabindex\", \"0\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"intermediateTabCapture\"] = document.createElement(\"div\");\n  el2.setAttribute(\"handle\", \"intermediateTabCapture\");\n  el2.setAttribute(\"coral-tabcapture\", \"intermediate\");\n  el2.setAttribute(\"tabindex\", \"0\");\n  frag.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  frag.appendChild(el3);\n  var el4 = this[\"bottomTabCapture\"] = document.createElement(\"div\");\n  el4.setAttribute(\"handle\", \"bottomTabCapture\");\n  el4.setAttribute(\"coral-tabcapture\", \"bottom\");\n  el4.setAttribute(\"tabindex\", \"0\");\n  frag.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  frag.appendChild(el5);\n  return frag;\n});\nexport default template;","/**\n Enumeration for {@link OverlayMixin} trap options.\n \n @typedef {Object} OverlayTrapFocusEnum\n \n @property {String} ON\n Focus is trapped such that the use cannot focus outside of the overlay.\n @property {String} OFF\n The user can focus outside the overlay as normal.\n */\nconst trapFocus = {\n  ON: 'on',\n  OFF: 'off'\n};\n\n/**\n Enumeration for {@link OverlayMixin} return focus options.\n \n @typedef {Object} OverlayReturnFocusEnum\n \n @property {String} ON\n When the overlay is closed, the element that was focused before the it was shown will be focused again.\n @property {String} OFF\n Nothing will be focused when the overlay is closed.\n */\nconst returnFocus = {\n  ON: 'on',\n  OFF: 'off'\n};\n\n/**\n Enumeration for {@link OverlayMixin} focus behavior options.\n \n @typedef {Object} OverlayFocusOnShowEnum\n \n @property {String} ON\n When the overlay is opened, it will be focused.\n @property {String} OFF\n The overlay will not focus itself when opened.\n */\nconst focusOnShow = {\n  ON: 'on',\n  OFF: 'off'\n};\n\n/**\n The time it should take for {@link OverlayMixin} to fade in milliseconds.\n Important: This should be greater than or equal to the CSS transition time.\n \n @typedef {Number} OverlayFadeTime\n */\nconst FADETIME = 350;\n\nexport {trapFocus, returnFocus, focusOnShow, FADETIME};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport base from '../templates/base';\nimport {Vent} from '../../../coralui-externals';\nimport {validate, transform, commons} from '../../../coralui-util';\nimport {trapFocus, returnFocus, focusOnShow, FADETIME} from './enums';\n\n// Includes overlay itself\nconst COMPONENTS_WITH_OVERLAY = `\n  coral-actionbar,\n  coral-autocomplete,\n  coral-colorinput,\n  coral-cyclebutton,\n  coral-datepicker,\n  coral-dialog,\n  coral-overlay,\n  coral-popover,\n  coral-quickactions,\n  coral-select,\n  coral-tooltip\n`;\n\n// The tab capture element that lives at the top of the body\nlet topTabCaptureEl;\nlet bottomTabCaptureEl;\n\n// A reference to the backdrop element\nlet backdropEl;\n\n// The starting zIndex for overlays\nconst startZIndex = 10000;\n\n// Tab keycode\nconst TAB_KEY = 9;\n\n// A stack interface for overlays\nconst _overlays = [];\nlet overlays = {};\n\n/**\n Cancel the backdrop hide mid-animation.\n */\nlet fadeTimeout;\nfunction cancelBackdropHide() {\n  window.clearTimeout(fadeTimeout);\n}\n\n/**\n Set aria-hidden on every immediate child except the one passed, which should not be hidden.\n */\nfunction hideEverythingBut(instance) {\n  // ARIA: Hide all the things\n  const children = document.body.children;\n  for (let i = 0; i < children.length; i++) {\n    const child = children[i];\n    \n    // If it's not a parent of or not the instance itself, it needs to be hidden\n    if (child !== instance && !child.contains(instance)) {\n      const currentAriaHidden = child.getAttribute('aria-hidden');\n      if (currentAriaHidden) {\n        // Store the previous value of aria-hidden if present\n        // Don't blow away the previously stored value\n        child._previousAriaHidden = child._previousAriaHidden || currentAriaHidden;\n        if (currentAriaHidden === 'true') {\n          // It's already true, don't bother setting\n          continue;\n        }\n      }\n      else {\n        // Nothing is hidden by default, store that\n        child._previousAriaHidden = 'false';\n      }\n      \n      // Hide it\n      child.setAttribute('aria-hidden', 'true');\n    }\n  }\n  \n  // Always show ourselves\n  instance.setAttribute('aria-hidden', 'false');\n}\n\n/**\n Actually reposition the backdrop to be under the topmost overlay.\n */\nfunction doRepositionBackdrop() {\n  // Position under the topmost overlay\n  const top = overlays.top();\n  \n  if (top) {\n    // The backdrop, if shown, should be positioned under the topmost overlay that does have a backdrop\n    for (let i = _overlays.length - 1; i > -1; i--) {\n      if (_overlays[i].backdrop) {\n        backdropEl.style.zIndex = _overlays[i].zIndex - 1;\n        break;\n      }\n    }\n    \n    // ARIA: Set hidden properly\n    hideEverythingBut(top.instance);\n  }\n}\n\noverlays = {\n  pop: function(instance) {\n    // Get overlay index\n    const index = this.indexOf(instance);\n    \n    if (index === -1) {\n      return null;\n    }\n    \n    // Get the overlay\n    const overlay = _overlays[index];\n    \n    // Remove from the stack\n    _overlays.splice(index, 1);\n    \n    // Return the passed overlay or the found overlay\n    return overlay;\n  },\n  \n  push: function(instance) {\n    // Pop overlay\n    const overlay = this.pop(instance) || {instance};\n    \n    // Get the new highest zIndex\n    const zIndex = this.getHighestZIndex() + 10;\n    \n    // Store the zIndex\n    overlay.zIndex = zIndex;\n    instance.style.zIndex = zIndex;\n    \n    // Push it\n    _overlays.push(overlay);\n    \n    if (overlay.backdrop) {\n      // If the backdrop is shown, we'll need to reposition it\n      // Generally, a component will not call _pushOverlay unnecessarily\n      // However, attachedCallback is asynchronous in polyfilld environments,\n      // so _pushOverlay will be called when shown and when attached\n      doRepositionBackdrop();\n    }\n    \n    return overlay;\n  },\n  \n  indexOf: function(instance) {\n    // Loop over stack\n    // Find overlay\n    // Return index\n    for (let i = 0; i < _overlays.length; i++) {\n      if (_overlays[i].instance === instance) {\n        return i;\n      }\n    }\n    return -1;\n  },\n  \n  get: function(instance) {\n    // Get overlay index\n    const index = this.indexOf(instance);\n    \n    // Return overlay\n    return index === -1 ? null : _overlays[index];\n  },\n  \n  top: function() {\n    const length = _overlays.length;\n    return length === 0 ? null : _overlays[length - 1];\n  },\n  \n  getHighestZIndex: function() {\n    const overlay = this.top();\n    return overlay ? overlay.zIndex : startZIndex;\n  },\n  \n  some: function(...args) {\n    return _overlays.some(...args);\n  },\n  \n  forEach: function(...args) {\n    return _overlays.forEach(...args);\n  }\n};\n\n/**\n Create the global tab capture element.\n */\nfunction createDocumentTabCaptureEls() {\n  if (!topTabCaptureEl) {\n    topTabCaptureEl = document.createElement('div');\n    topTabCaptureEl.setAttribute('coral-tabcapture', '');\n    topTabCaptureEl.tabIndex = 0;\n    document.body.insertBefore(topTabCaptureEl, document.body.firstChild);\n    topTabCaptureEl.addEventListener('focus', () => {\n      const top = overlays.top();\n      if (top && top.instance.trapFocus === trapFocus.ON) {\n        // Focus on the first tabbable element of the top overlay\n        Array.prototype.some.call(top.instance.querySelectorAll(commons.TABBABLE_ELEMENT_SELECTOR), (item) => {\n          if (item.offsetParent !== null && !item.hasAttribute('coral-tabcapture')) {\n            item.focus();\n            return true;\n          }\n          \n          return false;\n        });\n      }\n    });\n    \n    bottomTabCaptureEl = document.createElement('div');\n    bottomTabCaptureEl.setAttribute('coral-tabcapture', '');\n    bottomTabCaptureEl.tabIndex = 0;\n    document.body.appendChild(bottomTabCaptureEl);\n    bottomTabCaptureEl.addEventListener('focus', () => {\n      const top = overlays.top();\n      if (top && top.instance.trapFocus === trapFocus.ON) {\n        const tabbableElement = Array.prototype.filter.call(top.instance.querySelectorAll(commons.TABBABLE_ELEMENT_SELECTOR), (item) => item.offsetParent !== null && !item.hasAttribute('coral-tabcapture')).pop();\n        \n        // Focus on the last tabbable element of the top overlay\n        if (tabbableElement) {\n          tabbableElement.focus();\n        }\n      }\n    });\n  }\n  else {\n    if (document.body.firstElementChild !== topTabCaptureEl) {\n      // Make sure we stay at the very top\n      document.body.insertBefore(topTabCaptureEl, document.body.firstChild);\n    }\n    \n    if (document.body.lastElementChild !== bottomTabCaptureEl) {\n      // Make sure we stay at the very bottom\n      document.body.appendChild(bottomTabCaptureEl);\n    }\n  }\n  \n  // Make sure the tab capture elemenst are shown\n  topTabCaptureEl.style.display = 'inline';\n  bottomTabCaptureEl.style.display = 'inline';\n}\n\n/**\n Called after all overlays are hidden and we shouldn't capture the first tab into the page.\n */\nfunction hideDocumentTabCaptureEls() {\n  if (topTabCaptureEl) {\n    topTabCaptureEl.style.display = 'none';\n    bottomTabCaptureEl.style.display = 'none';\n  }\n}\n\n/**\n Show or restore the aria-hidden state of every child of body.\n */\nfunction showEverything() {\n  // ARIA: Show all the things\n  const children = document.body.children;\n  for (let i = 0; i < children.length; i++) {\n    const child = children[i];\n    // Restore the previous aria-hidden value\n    child.setAttribute('aria-hidden', child._previousAriaHidden || 'false');\n  }\n}\n\n/**\n Actually hide the backdrop.\n */\nfunction doBackdropHide() {\n  document.body.classList.remove('u-coral-noscroll');\n  \n  // Start animation\n  window.requestAnimationFrame(() => {\n    backdropEl.classList.remove('is-open');\n    \n    cancelBackdropHide();\n    fadeTimeout = window.setTimeout(() => {\n      backdropEl.style.display = 'none';\n    }, FADETIME);\n  });\n  \n  // Set flag for testing\n  backdropEl._isOpen = false;\n  \n  // Wait for animation to complete\n  showEverything();\n}\n\n/**\n Hide the backdrop if no overlays are using it.\n */\nfunction hideOrRepositionBackdrop() {\n  if (!backdropEl || !backdropEl._isOpen) {\n    // Do nothing if the backdrop isn't shown\n    return;\n  }\n  \n  // Loop over all overlays\n  const keepBackdrop = overlays.some((overlay) => {\n    // Check for backdrop usage\n    if (overlay.backdrop) {\n      return true;\n    }\n    \n    return false;\n  });\n  \n  if (!keepBackdrop) {\n    // Hide the backdrop\n    doBackdropHide();\n  }\n  else {\n    // Reposition the backdrop\n    doRepositionBackdrop();\n  }\n  \n  // Hide/create the document-level tab capture element as necessary\n  // This only applies to modal overlays (those that have backdrops)\n  const top = overlays.top();\n  if (!top || !(top.instance.trapFocus === trapFocus.ON && top.instance._requestedBackdrop)) {\n    hideDocumentTabCaptureEls();\n  }\n  else if (top && top.instance.trapFocus === trapFocus.ON && top.instance._requestedBackdrop) {\n    createDocumentTabCaptureEls();\n  }\n}\n\n/**\n Handles clicks to the backdrop, calling backdropClickedCallback for every overlay\n */\nfunction handleBackdropClick(event) {\n  overlays.forEach((overlay) => {\n    if (typeof overlay.instance.backdropClickedCallback === 'function') {\n      overlay.instance.backdropClickedCallback(event);\n    }\n  });\n}\n\n/**\n Actually show the backdrop.\n */\nfunction doBackdropShow(zIndex, instance) {\n  document.body.classList.add('u-coral-noscroll');\n  \n  if (!backdropEl) {\n    backdropEl = document.createElement('div');\n    backdropEl.className = '_coral-Underlay';\n    document.body.appendChild(backdropEl);\n    \n    backdropEl.addEventListener('click', handleBackdropClick);\n  }\n  \n  // Show just under the provided zIndex\n  // Since we always increment by 10, this will never collide\n  backdropEl.style.zIndex = zIndex - 1;\n  \n  // Set flag for testing\n  backdropEl._isOpen = true;\n  \n  // Start animation\n  backdropEl.style.display = '';\n  window.requestAnimationFrame(() => {\n    // Add the class on the next animation frame so backdrop has time to exist\n    // Otherwise, the animation for opacity will not work.\n    backdropEl.classList.add('is-open');\n    \n    cancelBackdropHide();\n  });\n  \n  hideEverythingBut(instance);\n}\n\n/**\n @mixin OverlayMixin\n @classdesc The base element for Overlay components\n */\nconst OverlayMixin = (superClass) => class extends superClass {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Templates\n    this._elements = {};\n    base.call(this._elements);\n  }\n  \n  /**\n   Whether to trap tabs and keep them within the overlay. See {@link OverlayTrapFocusEnum}.\n   \n   @type {String}\n   @default OverlayTrapFocusEnum.OFF\n   @htmlattribute trapfocus\n   */\n  get trapFocus() {\n    return this._trapFocus || trapFocus.OFF;\n  }\n  set trapFocus(value) {\n    value = transform.string(value).toLowerCase();\n    this._trapFocus = validate.enumeration(trapFocus)(value) && value || trapFocus.OFF;\n    \n    if (this._trapFocus === trapFocus.ON) {\n      // Give ourselves tabIndex if we are not focusable\n      if (this.tabIndex < 0) {\n        /** @ignore */\n        this.tabIndex = 0;\n      }\n      \n      // Insert elements\n      this.insertBefore(this._elements.topTabCapture, this.firstElementChild);\n      this.appendChild(this._elements.intermediateTabCapture);\n      this.appendChild(this._elements.bottomTabCapture);\n      \n      // Add listeners\n      this._handleTabCaptureFocus = this._handleTabCaptureFocus.bind(this);\n      this._handleRootKeypress = this._handleRootKeypress.bind(this);\n      this._vent.on('keydown', this._handleRootKeypress);\n      this._vent.on('focus', '[coral-tabcapture]', this._handleTabCaptureFocus);\n    }\n    // Don't just put this in an else, check if we currently have it disabled\n    // so we only attempt to remove elements if we were previously capturing tabs\n    else if (this._trapFocus === trapFocus.ON) {\n      // Remove elements\n      this.removeChild(this._elements.topTabCapture);\n      this.removeChild(this._elements.intermediateTabCapture);\n      this.removeChild(this._elements.bottomTabCapture);\n  \n      // Remove listeners\n      this._vent.off('keydown', this._handleRootKeypress);\n      this._vent.off('focus', '[coral-tabcapture]', this._handleTabCaptureFocus);\n    }\n  }\n  \n  /**\n   Whether to return focus to the previously focused element when closed. See {@link OverlayReturnFocusEnum}.\n   \n   @type {String}\n   @default OverlayReturnFocusEnum.OFF\n   @htmlattribute returnfocus\n   */\n  get returnFocus() {\n    return this._returnFocus || returnFocus.OFF;\n  }\n  set returnFocus(value) {\n    value = transform.string(value).toLowerCase();\n    this._returnFocus = validate.enumeration(returnFocus)(value) && value || returnFocus.OFF;\n  }\n  \n  /**\n   Whether to focus the overlay, when opened or not. By default the overlay itself will get the focus. It also accepts\n   an instance of HTMLElement or a selector like ':first-child' or 'button:last-of-type'. If the selector returns\n   multiple elements, it will focus the first element inside the overlay that matches the selector.\n   See {@link OverlayFocusOnShowEnum}.\n   \n   @type {HTMLElement|String}\n   @default OverlayFocusOnShowEnum.ON\n   @htmlattribute focusonshow\n   */\n  get focusOnShow() {\n    return this._focusOnShow || focusOnShow.ON;\n  }\n  set focusOnShow(value) {\n    if (typeof value === 'string' || value instanceof HTMLElement) {\n      this._focusOnShow = value;\n    }\n  }\n  \n  /**\n   Whether this overlay is open or not.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute open\n   @htmlattributereflected\n   @emits {coral-overlay:open}\n   @emits {coral-overlay:close}\n   @emits {coral-overlay:beforeopen}\n   @emits {coral-overlay:beforeclose}\n   */\n  get open() {\n    return this._open || false;\n  }\n  set open(value) {\n    const self = this;\n    const silenced = self._silenced;\n    \n    value = transform.booleanAttr(value);\n    const beforeEvent = self.trigger(value ? 'coral-overlay:beforeopen' : 'coral-overlay:beforeclose');\n    \n    if (!beforeEvent.defaultPrevented) {\n      const open = self._open = value;\n      self._reflectAttribute('open', open);\n  \n      // Set aria-hidden false before we show\n      // Otherwise, screen readers will not announce\n      // Doesn't matter when we set aria-hidden true (nothing being announced)\n      self.setAttribute('aria-hidden', !open);\n  \n      // Don't do anything if we're not in the DOM yet\n      // This prevents errors related to allocating a zIndex we don't need\n      if (self.parentNode) {\n        // Do this check afterwards as we may have been appended inside of _show()\n        if (open) {\n          // Set z-index\n          self._pushOverlay();\n      \n          if (self.returnFocus === returnFocus.ON) {\n            this._elementToFocusWhenHidden =\n              // cached element\n              this._elementToFocusWhenHidden ||\n              // element passed via returnFocusTo()\n              this._returnFocusToElement ||\n              // element that had focus before opening the overlay\n              (document.activeElement === document.body ? null : document.activeElement);\n          }\n        }\n        else {\n          // Release zIndex\n          self._popOverlay();\n        }\n      }\n      \n      // Don't force reflow\n      window.requestAnimationFrame(() => {\n        \n        // Keep it silenced\n        self._silenced = silenced;\n        \n        if (open) {\n          if (self.trapFocus === trapFocus.ON) {\n            // Make sure tab capture elements are positioned correctly\n            if (\n              // Tab capture elements are no longer at the bottom\n              self._elements.topTabCapture !== self.firstElementChild ||\n              self._elements.bottomTabCapture !== self.lastElementChild ||\n              // Tab capture elements have been separated\n              self._elements.bottomTabCapture.previousElementSibling !== self._elements.intermediateTabCapture\n            ) {\n              self.insertBefore(self._elements.intermediateTabCapture, self.firstElementChild);\n              self.appendChild(self._elements.intermediateTabCapture);\n              self.appendChild(self._elements.bottomTabCapture);\n            }\n          }\n    \n          // The default style should be display: none for overlays\n          // Show ourselves first for centering calculations etc\n          self.style.display = '';\n  \n          // Do it in the next frame to make the animation happen\n          window.requestAnimationFrame(() => {\n            self.classList.add('is-open');\n          });\n  \n          const openComplete = () => {\n            if (self.open) {\n              self._debounce(() => {\n  \n                // handles the focus behavior based on accessibility recommendations\n                self._handleFocus();\n                \n                self.trigger('coral-overlay:open');\n                self._silenced = false;\n              });\n            }\n          };\n  \n          if (self._overlayAnimationTime) {\n            // Wait for animation to complete\n            commons.transitionEnd(self, openComplete);\n          }\n          else {\n            // Execute immediately\n            openComplete();\n          }\n        }\n        else {\n          // Fade out\n          self.classList.remove('is-open');\n    \n          const closeComplete = () => {\n            if (!self.open) {\n              // Hide self\n              self.style.display = 'none';\n  \n              // makes sure the focus is returned per accessibility recommendations\n              self._handleReturnFocus();\n              \n              self._debounce(() => {\n                // Inform child overlays that we're closing\n                self._closeChildOverlays();\n                \n                self.trigger('coral-overlay:close');\n                self._silenced = false;\n              });\n            }\n          };\n    \n          if (self._overlayAnimationTime) {\n            // Wait for animation to complete\n            commons.transitionEnd(self, closeComplete);\n          }\n          else {\n            // Execute immediately\n            closeComplete();\n          }\n        }\n      });\n    }\n  }\n  \n  _closeChildOverlays() {\n    const components = this.querySelectorAll(COMPONENTS_WITH_OVERLAY);\n    \n    // Close all children overlays and components with overlays\n    for (let i = 0; i < components.length; i++) {\n      const component = components[i];\n      \n      // Overlay component\n      if (component.hasAttribute('open')) {\n        component.removeAttribute('open');\n      }\n      // Component that uses an overlay\n      else if (component._elements && component._elements.overlay && component._elements.overlay.hasAttribute('open')) {\n        component._elements.overlay.removeAttribute('open');\n      }\n    }\n  }\n  \n  /** @private */\n  _debounce(f) {\n    // Used to avoid triggering open/close event continuously\n    window.clearTimeout(this._debounceId);\n    this._debounceId = window.setTimeout(() => {\n      f();\n    }, 10);\n  }\n  \n  /**\n   Check if this overlay is the topmost.\n   \n   @protected\n   */\n  _isTopOverlay() {\n    const top = overlays.top();\n    return top && top.instance === this;\n  }\n  \n  /**\n   Push the overlay to the top of the stack.\n   \n   @protected\n   */\n  _pushOverlay() {\n    overlays.push(this);\n  }\n  \n  /**\n   Remove the overlay from the stack.\n   \n   @protected\n   */\n  _popOverlay() {\n    overlays.pop(this);\n    \n    // Automatically hide the backdrop if required\n    hideOrRepositionBackdrop();\n  }\n  \n  /**\n   Show the backdrop.\n   \n   @protected\n   */\n  _showBackdrop() {\n    const overlay = overlays.get(this);\n    \n    // Overlay is not tracked unless the component is in the DOM\n    // Hence, we need to check\n    if (overlay) {\n      overlay.backdrop = true;\n      doBackdropShow(overlay.zIndex, this);\n    }\n    \n    // Mark on the instance that the backdrop has been requested for this overlay\n    this._requestedBackdrop = true;\n    \n    // Mark that the backdrop was requested when not attached to the DOM\n    // This allows us to know whether to push the overlay when the component is attached\n    if (!this.parentNode) {\n      this._showBackdropOnAttached = true;\n    }\n    \n    if (this.trapFocus === trapFocus.ON) {\n      createDocumentTabCaptureEls();\n    }\n  }\n  \n  /**\n   Show the backdrop.\n   \n   @protected\n   */\n  _hideBackdrop() {\n    const overlay = overlays.get(this);\n    \n    if (overlay) {\n      overlay.backdrop = false;\n      \n      // If that was the last overlay using the backdrop, hide it\n      hideOrRepositionBackdrop();\n    }\n    \n    // Mark on the instance that the backdrop is no longer needed\n    this._requestedBackdrop = false;\n  }\n  \n  /**\n   Handles keypresses on the root of the overlay and marshalls focus accordingly.\n   \n   @protected\n   */\n  _handleRootKeypress(event) {\n    if (event.target === this && event.keyCode === TAB_KEY) {\n      // Skip the top tabcapture and focus on the first focusable element\n      this._focusOn('first');\n      \n      // Stop the normal tab behavior\n      event.preventDefault();\n    }\n  }\n  \n  /**\n   Handles focus events on tab capture elements.\n   \n   @protected\n   */\n  _handleTabCaptureFocus(event) {\n    // Avoid moving around if we're trying to focus on coral-tabcapture\n    if (this._ignoreTabCapture) {\n      this._ignoreTabCapture = false;\n      return;\n    }\n    \n    // Focus on the correct tabbable element\n    const target = event.target;\n    const which = target === this._elements.intermediateTabCapture ? 'first' : 'last';\n    \n    this._focusOn(which);\n  }\n  \n  /**\n   Handles the focus behavior. When \"on\" is specified it would try to find the first tababble descendent in the\n   content and if there are no valid candidates it will focus the element itself.\n   \n   @protected\n   */\n  _handleFocus() {\n    // ON handles the focusing per accessibility recommendations\n    if (this.focusOnShow === focusOnShow.ON) {\n      this._focusOn('first');\n    }\n    else if (this.focusOnShow instanceof HTMLElement) {\n      this.focusOnShow.focus();\n    }\n    else if (typeof this.focusOnShow === 'string' && this.focusOnShow !== focusOnShow.OFF) {\n      // we need to add :not([coral-tabcapture]) to avoid selecting the tab captures\n      const selectedElement = this.querySelector(`${this.focusOnShow}:not([coral-tabcapture])`);\n      \n      if (selectedElement) {\n        selectedElement.focus();\n      }\n      // in case the selector does not match, it should fallback to the default behavior\n      else {\n        this._focusOn('first');\n      }\n    }\n  }\n  \n  /**\n   @protected\n   */\n  _handleReturnFocus() {\n    if (this.returnFocus === returnFocus.ON && this._elementToFocusWhenHidden) {\n      if (document.activeElement && !this.contains(document.activeElement)) {\n        // Don't return focus if the user focused outside of the overlay\n        return;\n      }\n      \n      // Return focus, ignoring tab capture if it is an overlay\n      this._elementToFocusWhenHidden._ignoreTabCapture = true;\n      this._elementToFocusWhenHidden.focus();\n      this._elementToFocusWhenHidden._ignoreTabCapture = false;\n      \n      // Drop the reference to avoid memory leaks\n      this._elementToFocusWhenHidden = null;\n    }\n  }\n  \n  /**\n   Focus on the first or last element.\n   \n   @param {String} which\n   one of \"first\" or \"last\"\n   @protected\n   */\n  _focusOn(which) {\n    let tabTarget;\n    if (which === 'first' || which === 'last') {\n      // @todo: shall this be focusable or tabbable?\n      const tabbableElements = Array.prototype.filter.call(this.querySelectorAll(commons.TABBABLE_ELEMENT_SELECTOR), item => item.offsetParent !== null && !item.hasAttribute('coral-tabcapture'));\n      tabTarget = tabbableElements[which === 'first' ? 'shift' : 'pop']();\n    }\n    \n    // if we found a focusing target we focus it\n    if (tabTarget) {\n      tabTarget.focus();\n    }\n    // otherwise the element itself should get focus\n    else {\n      this.focus();\n    }\n  }\n  \n  /**\n   Open the overlay and set the z-index accordingly.\n   \n   @returns {OverlayMixin} this, chainable\n   */\n  show() {\n    this.open = true;\n    \n    return this;\n  }\n  \n  /**\n   Close the overlay.\n   \n   @returns {OverlayMixin} this, chainable\n   */\n  hide() {\n    this.open = false;\n  \n    return this;\n  }\n  \n  /**\n   Set the element that focus should be returned to when the overlay is hidden.\n   \n   @param {HTMLElement} element\n   The element to return focus to. This must be a DOM element, not a jQuery object or selector.\n   \n   @returns {OverlayMixin} this, chainable\n   */\n  returnFocusTo(element) {\n    if (this.returnFocus === returnFocus.OFF) {\n      // Switch on returning focus if it's off\n      this.returnFocus = returnFocus.ON;\n    }\n  \n    // If the element is not focusable,\n    if (element.offsetParent === null || !element.matches(commons.FOCUSABLE_ELEMENT_SELECTOR)) {\n    \n      // add tabindex so that it is programmatically focusable.\n      element.setAttribute('tabindex', -1);\n    \n      // On blur, restore element to its prior, not-focusable state\n      const tempVent = new Vent(element);\n      tempVent.on('blur.afterFocus', (event) => {\n        // Wait a frame before testing whether focus has moved to an open overlay or to some other element.\n        window.requestAnimationFrame(() => {\n          // If overlay remains open, don't remove tabindex event handler until after it has been closed\n          const top = overlays.top();\n          if (top && top.instance.contains(document.activeElement)) {\n            return;\n          }\n          tempVent.off('blur.afterFocus');\n          event.matchedTarget.removeAttribute('tabindex');\n        });\n      }, true);\n    }\n  \n    this._returnFocusToElement = element;\n    return this;\n  }\n  \n  /**\n   Returns {@link OverlayMixin} trap focus options.\n   \n   @return {OverlayTrapFocusEnum}\n   */\n  static get trapFocus() { return trapFocus; }\n  \n  /**\n   Returns {@link OverlayMixin} return focus options.\n   \n   @return {OverlayReturnFocusEnum}\n   */\n  static get returnFocus() { return returnFocus; }\n  \n  /**\n   Returns {@link OverlayMixin} focus on show options.\n   \n   @return {OverlayFocusOnShowEnum}\n   */\n  static get focusOnShow() { return focusOnShow; }\n  \n  /**\n   Returns {@link OverlayMixin} fadetime in milliseconds.\n   \n   @return {Number}\n   */\n  static get FADETIME() { return FADETIME; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return [\n      'trapfocus',\n      'trapFocus',\n      'returnfocus',\n      'returnFocus',\n      'focusonshow',\n      'focusOnShow',\n      'open'\n    ];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    if (!this.hasAttribute('trapfocus')) { this.trapFocus = this.trapFocus; }\n    if (!this.hasAttribute('returnfocus')) { this.returnFocus = this.returnFocus; }\n    if (!this.hasAttribute('focusonshow')) { this.focusOnShow = this.focusOnShow; }\n    \n    if (this.open) {\n      this._pushOverlay();\n    \n      if (this._showBackdropOnAttached) {\n        // Show the backdrop again\n        this._showBackdrop();\n      }\n    }\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n  \n    if (this.open) {\n      // Release zIndex as we're not in the DOM any longer\n      // When we're re-added, we'll get a new zIndex\n      this._popOverlay();\n    \n      if (this._requestedBackdrop) {\n        // Mark that we'll need to show the backdrop when attached\n        this._showBackdropOnAttached = true;\n      }\n    }\n  }\n  \n  /**\n   Called when the {@link OverlayMixin} is clicked.\n   \n   @function backdropClickedCallback\n   @protected\n   */\n  \n  /**\n   Triggered before the {@link OverlayMixin} is opened with <code>show()</code> or <code>instance.open = true</code>.\n \n   @typedef {CustomEvent} coral-overlay:beforeopen\n   \n   @property {function} preventDefault\n   Call to stop the overlay from opening.\n   */\n  \n  /**\n   Triggered after the {@link OverlayMixin} is opened with <code>show()</code> or <code>instance.open = true</code>\n \n   @typedef {CustomEvent} coral-overlay:open\n   */\n  \n  /**\n   Triggered before the {@link OverlayMixin} is closed with <code>hide()</code> or <code>instance.open = false</code>.\n \n   @typedef {CustomEvent} coral-overlay:beforeclose\n   \n   @property {function} preventDefault\n   Call to stop the overlay from closing.\n   */\n  \n  /**\n   Triggered after the {@link OverlayMixin} is closed with <code>hide()</code> or <code>instance.open = false</code>\n \n   @typedef {CustomEvent} coral-overlay:close\n   */\n};\n\nexport default OverlayMixin;\n","import OverlayMixin from './src/scripts/OverlayMixin';\nimport {trapFocus, returnFocus, focusOnShow, FADETIME} from './src/scripts/enums';\nimport {mixin} from '../coralui-util';\n\nOverlayMixin.trapFocus = trapFocus;\nOverlayMixin.returnFocus = returnFocus;\nOverlayMixin.focusOnShow = focusOnShow;\nOverlayMixin.FADETIME = FADETIME;\n\n// Expose mixin on Coral namespace\nmixin._overlay = OverlayMixin;\n\nexport {OverlayMixin};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {OverlayMixin} from '../../../coralui-mixin-overlay';\nimport {PopperJS} from '../../../coralui-externals';\nimport ALIGN_MAP from '../data/alignMapping.json';\nimport {transform, validate, commons} from '../../../coralui-util';\n\nconst DEPRECATED_ALIGN = 'Coral.Overlay: alignAt and alignMy have been deprecated. Please use the offset, inner and placement properties instead.';\nconst DEPRECATED_FLIP_FIT = 'Coral.Overlay.collision.FLIP_FIT has been deprecated. Please use Coral.Overlay.collision.FLIP instead.';\n\n/**\n Enumeration for {@link Overlay} alignment pairs.\n @deprecated\n \n @typedef {Object} OverlayAlignEnum\n \n @property {String} LEFT_TOP\n Use the top of the left side as an anchor point.\n @property {String} LEFT_CENTER\n Use the center of the left side as an anchor point.\n @property {String} LEFT_BOTTOM\n Use the bottom of the left side as an anchor point.\n @property {String} CENTER_TOP\n Use the center of the top side as an anchor point.\n @property {String} CENTER_CENTER\n Use the center as an anchor point.\n @property {String} CENTER_BOTTOM\n Use the center of the bottom side as an anchor point.\n @property {String} RIGHT_TOP\n Use the top of the right side as an anchor point.\n @property {String} RIGHT_CENTER\n Use the center of the right side as an anchor point.\n @property {String} RIGHT_BOTTOM\n Use the bottom of the right side as an anchor point.\n */\nconst align = {\n  LEFT_TOP: 'left top',\n  LEFT_CENTER: 'left center',\n  LEFT_BOTTOM: 'left bottom',\n  CENTER_TOP: 'center top',\n  CENTER_CENTER: 'center center',\n  CENTER_BOTTOM: 'center bottom',\n  RIGHT_TOP: 'right top',\n  RIGHT_CENTER: 'right center',\n  RIGHT_BOTTOM: 'right bottom'\n};\n\n// Used to map alignMy and alignAt with popper JS properties. ALIGN_MAP holds the mapping.\nconst alignSwapped = commons.swapKeysAndValues(align);\n\n/**\n Enumeration for {@link Overlay} collision detection strategies.\n \n @typedef {Object} OverlayCollisionEnum\n \n @property {String} FLIP\n Flips the element to the opposite side of the target and the collision detection is run again to see if it will fit. Whichever side allows more of the element to be visible will be used.\n @property {String} FIT\n Shift the element away from the edge of the window.\n @property {String} FLIP_FIT\n Deprecated. First applies the flip logic, placing the element on whichever side allows more of the element to be visible. Then the fit logic is applied to ensure as much of the element is visible as possible.\n @property {String} NONE\n Does not apply any collision detection.\n */\nconst collision = {\n  FLIP: 'flip',\n  FIT: 'fit',\n  FLIP_FIT: 'flipfit',\n  NONE: 'none'\n};\n\n/**\n Enumeration for {@link Overlay} anchored overlay targets.\n \n @typedef {Object} OverlayTargetEnum\n \n @property {String} PREVIOUS\n Use the previous sibling element in the DOM.\n @property {String} NEXT\n Use the next sibling element in the DOM.\n */\nconst target = {\n  PREVIOUS: '_prev',\n  NEXT: '_next'\n};\n\n/**\n Enumeration for {@link Overlay} overlay placement values.\n \n @typedef {Object} OverlayPlacementEnum\n \n @property {String} LEFT\n An overlay anchored to the left of the target.\n @property {String} RIGHT\n An overlay anchored to the right of the target.\n @property {String} BOTTOM\n An overlay anchored at the bottom the target.\n @property {String} TOP\n An overlay anchored at the top target.\n */\nconst placement = {\n  LEFT: 'left',\n  RIGHT: 'right',\n  BOTTOM: 'bottom',\n  TOP: 'top'\n};\n\n/**\n Enumeration for {@link Overlay} interaction values.\n \n @typedef {Object} OverlayInteractionEnum\n \n @property {String} ON\n Keyboard interaction is enabled.\n @property {String} OFF\n Keyboard interaction is disabled.\n */\nconst interaction = {\n  ON: 'on',\n  OFF: 'off'\n};\n\nconst CLASSNAME = '_coral-Overlay';\n\n/**\n @class Coral.Overlay\n @classdesc A generic Overlay component.\n @htmltag coral-overlay\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {OverlayMixin}\n */\nclass Overlay extends OverlayMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Override from mixin-overlay\n    this._overlayAnimationTime = 0;\n    \n    // Events\n    this._delegateEvents({\n      'global:key:escape': '_handleEscape',\n      'click [coral-close]': '_handleCloseClick'\n    });\n  }\n  \n  /**\n   The element the overlay should position relative to. It accepts values from {@link OverlayTargetEnum}, as\n   well as a DOM element or a CSS selector. If a CSS selector is provided, the first matching element will be used.\n   \n   @type {?HTMLElement|String}\n   @default null\n   */\n  get target() {\n    return this._target || null;\n  }\n  set target(value) {\n    // We don't want to validate that the value must change here\n    // If a selector is provided, we'll take the first element matching that selector\n    // If the DOM is modified and the user wants a new target with the same selector,\n    // They should be able to set target = 'selector' again and get a different element\n    if (value === null || typeof value === 'string' || value instanceof Node) {\n      this._target = value;\n  \n      const targetElement = this._getTarget();\n      \n      if (targetElement) {\n        // To make it return focus to the right item, change the target\n        if (this._returnFocus === this.constructor.returnFocus.ON) {\n          this.returnFocusTo(targetElement);\n        }\n        \n        // Initialize popper only if we have a target\n        this._popper = this._popper || new PopperJS(targetElement, this, {onUpdate: this._onUpdate.bind(this)});\n        \n        // Make sure popper options modifiers are up to date\n        this.reposition();\n      }\n    }\n  }\n  \n  /**\n   The point on the overlay we should anchor from when positioning. See {@link OverlayAlignEnum}.\n   \n   @type {String}\n   @default OverlayAlignEnum.CENTER_CENTER\n   @htmlattribute alignmy\n   \n   @deprecated\n   */\n  get alignMy() {\n    return this._alignMy || align.CENTER_CENTER;\n  }\n  set alignMy(value) {\n    console.warn(DEPRECATED_ALIGN);\n    \n    value = transform.string(value).toLowerCase();\n    this._alignMy = validate.enumeration(align)(value) && value || align.CENTER_CENTER;\n  \n    this._popperMapping();\n  }\n  \n  /**\n   The point on the target we should anchor to when positioning. See {@link OverlayAlignEnum}.\n   \n   @type {String}\n   @default Coral.Overlay.align.CENTER_CENTER\n   @htmlattribute alignat\n   \n   @deprecated\n   */\n  get alignAt() {\n    return this._alignAt || align.CENTER_CENTER;\n  }\n  set alignAt(value) {\n    console.warn(DEPRECATED_ALIGN);\n    \n    value = transform.string(value).toLowerCase();\n    this._alignAt = validate.enumeration(align)(value) && value || align.CENTER_CENTER;\n    \n    this._popperMapping();\n  }\n  \n  /**\n   The distance the overlay should be from its target.\n   \n   @type {Number}\n   @default 0\n   @htmlattribute offset\n   */\n  get offset() {\n    return transform.number(this.lengthOffset);\n  }\n  set offset(value) {\n    if (typeof value === 'number') {\n      this.lengthOffset = `${value}px`;\n      this.breadthOffset = '0px';\n      \n      this.reposition();\n    }\n  }\n  \n  /**\n   Whether the overlay flows toward the inner of the target element. By default, it's placed outside the target element.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute inner\n   */\n  get inner() {\n    return this._inner || false;\n  }\n  set inner(value) {\n    this._inner = transform.booleanAttr(value);\n    \n    this.reposition();\n  }\n  \n  /**\n   The distance the overlay should be from its target along the length axis.\n   \n   @type {String}\n   @default '0px'\n   @htmlattribute lengthoffset\n   */\n  get lengthOffset() {\n    return this._lengthOffset || '0px';\n  }\n  set lengthOffset(value) {\n    this._lengthOffset = transform.string(value) || '0px';\n    \n    this.reposition();\n  }\n  \n  /**\n   The distance the overlay should be from its target along the breadth axis.\n   \n   @type {String}\n   @default '0px'\n   @htmlattribute breadthoffset\n   */\n  get breadthOffset() {\n    return this._breadthOffset || '0px';\n  }\n  set breadthOffset(value) {\n    this._breadthOffset = transform.string(value) || '0px';\n    \n    this.reposition();\n  }\n  \n  /**\n   The placement of the overlay. See {@link OverlayPlacementEnum}.\n   \n   @type {String}\n   @default OverlayPlacementEnum.RIGHT\n   @htmlattribute placement\n   */\n  get placement() {\n    return this._placement || placement.RIGHT;\n  }\n  set placement(value) {\n    value = transform.string(value).toLowerCase();\n    this._placement = validate.enumeration(placement)(value) && value || placement.RIGHT;\n    \n    this.reposition();\n  }\n  \n  /**\n   The bounding element for the overlay. The overlay will be sized and positioned such that it is contained within\n   this element. It accepts both a DOM Element or a CSS selector. If a CSS selector is provided, the first matching\n   element will be used.\n   \n   @type {HTMLElement|String}\n   @default 'scrollParent'\n   */\n  get within() {\n    return this._within || 'scrollParent';\n  }\n  set within(value) {\n    if (value instanceof HTMLElement || typeof value === 'string') {\n      this._within = value;\n  \n      this.reposition();\n    }\n  }\n  \n  /**\n   The collision handling strategy when positioning the overlay relative to a target. See {@link OverlayCollisionEnum}.\n   \n   @type {String}\n   @default OverlayCollisionEnum.FLIP\n   @htmlattribute collision\n   */\n  get collision() {\n    return this._collision || collision.FLIP;\n  }\n  set collision(value) {\n    value = transform.string(value).toLowerCase();\n    this._collision = validate.enumeration(collision)(value) && value || collision.FLIP;\n    \n    if (this._collision === collision.FLIP_FIT) {\n      console.warn(DEPRECATED_FLIP_FIT);\n    }\n  \n    this.reposition();\n  }\n  \n  /**\n   Whether keyboard interaction is enabled. See {@link OverlayInteractionEnum}.\n   \n   @type {String}\n   @default OverlayInteractionEnum.ON\n   */\n  get interaction() {\n    return this._interaction || interaction.ON;\n  }\n  set interaction(value) {\n    value = transform.string(value).toLowerCase();\n    this._interaction = validate.enumeration(interaction)(value) && value || interaction.ON;\n  }\n  \n  /**\n   Whether the overlay is allowed to change its DOM position for better positioning based on its context.\n   \n   @type {Boolean}\n   @default false\n   */\n  get smart() {\n    return this._smart || false;\n  }\n  set smart(value) {\n    this._smart = transform.booleanAttr(value);\n  }\n  \n  /**\n   Inherited from {@link OverlayMixin#open}.\n   */\n  get open() {\n    return super.open;\n  }\n  set open(value) {\n    super.open = value;\n    \n    if (this.open && this.smart) {\n      this._validateParentOverflow();\n    }\n    \n    const self = this;\n    // We need an additional frame to help popper read the correct offsets\n    window.requestAnimationFrame(() => {\n      self.reposition();\n    });\n  }\n  \n  /** @ignore */\n  _validateParentOverflow() {\n    let reposition = false;\n    \n    // Check parents if they potentially truncate the overlay\n    let parent = this.parentElement;\n    while (!reposition && parent) {\n      if (parent !== document.body) {\n        const computedStyle = window.getComputedStyle(parent);\n        if (computedStyle.overflow === 'auto' || computedStyle.overflow === 'hidden') {\n          reposition = true;\n        }\n        \n        parent = parent.parentElement;\n      }\n      else {\n        parent = null;\n      }\n    }\n  \n    // If it's the case then we move the overlay to make sure it's not truncated\n    if (reposition) {\n      document.body.appendChild(this);\n    }\n  }\n  \n  /** @ignore */\n  _onUpdate(data) {\n    // Trigger once positioned the first time\n    if (!this._oldPosition) {\n      this._oldPosition = data.styles.transform;\n      \n      const self = this;\n      // Do it in the next frame to avoid triggering the event too early\n      window.requestAnimationFrame(() => {\n        self.trigger('coral-overlay:positioned', data);\n      });\n    }\n    // Trigger again only if position changed\n    else {\n      this._oldPosition = this._oldPosition || data.styles.transform;\n  \n      if (this._oldPosition !== data.styles.transform) {\n        this.trigger('coral-overlay:positioned', data);\n      }\n  \n      this._oldPosition = data.styles.transform;\n    }\n  }\n\n  /**\n   @todo maybe this should be mixin or something\n   @ignore\n   */\n  _handleCloseClick(event) {\n    const dismissTarget = event.matchedTarget;\n    const dismissValue = dismissTarget.getAttribute('coral-close');\n    if (!dismissValue || this.matches(dismissValue)) {\n      this.hide();\n      event.stopPropagation();\n    }\n  }\n  \n  /**\n   Hides the overlay if it's on the top. When <code>interaction</code> is OFF it is ignored.\n   \n   @ignore\n   */\n  _handleEscape() {\n    if (this.interaction === interaction.ON && this.open && this._isTopOverlay()) {\n      this.hide();\n    }\n  }\n  \n  /*\n   Get the element the overlay is anchored to.\n   \n   @protected\n   @param {HTMLElement|String} [target]\n   A specific target value to use.\n   If not provided, the current value of the {@link Coral.Overlay#target} property will be used.\n   @returns {HTMLElement|null}\n   */\n  _getTarget(targetValue) {\n    // Use passed target\n    targetValue = targetValue || this.target;\n  \n    if (targetValue instanceof Node) {\n      // Just return the provided Node\n      return targetValue;\n    }\n  \n    // Dynamically get the target node based on target\n    let newTarget = null;\n    if (typeof targetValue === 'string') {\n      if (targetValue === target.PREVIOUS) {\n        newTarget = this.previousElementSibling;\n      }\n      else if (targetValue === target.NEXT) {\n        newTarget = this.nextElementSibling;\n      }\n      else {\n        newTarget = document.querySelector(targetValue);\n      }\n    }\n  \n    return newTarget;\n  }\n  \n  /** @ignore */\n  _popperMapping() {\n    const value = ALIGN_MAP[`${alignSwapped[this.alignMy]} ${alignSwapped[this.alignAt]}`];\n    if (value) {\n      this.set(value);\n    }\n  }\n  \n  /**\n   Re-position the overlay if it's currently open.\n   \n   @function\n   @param {Boolean} forceReposition\n   Whether to force repositioning even if closed.\n   */\n  reposition(forceReposition) {\n    if (this._popper) {\n      const targetElement = this._getTarget();\n      \n      // Update target only if valid\n      if (targetElement) {\n        this._popper.reference = targetElement;\n      }\n      \n      this._popper.options.placement = this.placement;\n  \n      this._popper.modifiers.forEach((modifier) => {\n        if (modifier.name === 'offset') {\n          modifier.offset = `${this.breadthOffset}, ${this.lengthOffset}`;\n        }\n        else if (modifier.name === 'flip') {\n          modifier.enabled = this.collision !== collision.FIT && this.collision !== collision.NONE;\n        }\n        else if (modifier.name === 'inner') {\n          modifier.enabled = this.inner;\n        }\n        else if (modifier.name === 'preventOverflow') {\n          modifier.enabled = this.collision !== collision.NONE;\n          \n          modifier.boundariesElement = this.within;\n        }\n      }, this);\n  \n      if (this.open || forceReposition) {\n        this._popper.update();\n      }\n    }\n  }\n  \n  /**\n   @deprecated\n   \n   Returns {@link Overlay} align options.\n   \n   @return {OverlayAlignEnum}\n   */\n  static get align() { return align; }\n  \n  /**\n   Returns {@link Overlay} collision options.\n   \n   @return {OverlayCollisionEnum}\n   */\n  static get collision() { return collision; }\n  \n  /**\n   Returns {@link Overlay} target options.\n   \n   @return {OverlayTargetEnum}\n   */\n  static get target() { return target; }\n  \n  /**\n   Returns {@link Overlay} placement options.\n   \n   @return {OverlayPlacementEnum}\n   */\n  static get placement() { return placement; }\n  \n  /**\n   Returns {@link Overlay} interaction options.\n   \n   @return {OverlayInteractionEnum}\n   */\n  static get interaction() { return interaction; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'alignmy',\n      'alignMy',\n      'alignat',\n      'alignAt',\n      'offset',\n      'lengthoffset',\n      'lengthOffset',\n      'breadthoffset',\n      'breadthOffset',\n      'placement',\n      'within',\n      'collision',\n      'interaction',\n      'target',\n      'inner',\n      'smart'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Hidden by default\n    this.style.display = 'none';\n  \n    // In case it was not added to the DOM, make sure popper is initialized by setting target\n    this.target = this.target;\n  \n    const self = this;\n    // We need an additional frame to help popper read the correct offsets\n    window.requestAnimationFrame(() => {\n      // Force repositioning\n      self.reposition(true);\n    });\n  }\n  \n  /**\n   Triggered after the {@link Overlay} is positioned.\n   \n   @typedef {CustomEvent} coral-overlay:positioned\n   */\n}\n\nexport default Overlay;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Overlay from './src/scripts/Overlay';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-overlay', Overlay);\n\nexport {Overlay};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"headerWrapper\"] = document.createElement(\"div\");\n  el0.className += \" _coral-Dialog-header\";\n  el0.setAttribute(\"handle\", \"headerWrapper\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"closeButton\"] = document.createElement(\"button\",\"coral-button\");\n  el2.setAttribute(\"handle\", \"closeButton\");\n  el2.className += \" _coral-Dialog-closeButton\";\n  el2.setAttribute(\"type\", \"button\");\n  el2.setAttribute(\"is\", \"coral-button\");\n  el2.setAttribute(\"variant\", \"icon\");\n  el2.setAttribute(\"icon\", \"close\");\n  el2.setAttribute(\"title\", data_0[\"i18n\"][\"get\"]('Close'));\n  el2.setAttribute(\"tabindex\", \"-1\");\n  el2.setAttribute(\"coral-close\", \"\");\n  frag.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  frag.appendChild(el3);\n  var el4 = this[\"tip\"] = document.createElement(\"div\");\n  el4.className += \" _coral-Popover-tip\";\n  el4.setAttribute(\"handle\", \"tip\");\n  frag.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  frag.appendChild(el5);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {Overlay} from '../../../coralui-component-overlay';\nimport {Icon} from '../../../coralui-component-icon';\nimport base from '../templates/base';\nimport {commons, transform, validate, i18n} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Popover';\n\nconst OFFSET = 5;\n\n// Used to map icon with variant\nconst capitalize = s => s.charAt(0).toUpperCase() + s.slice(1);\n\n/**\n Enumeration for {@link Popover} closable state.\n \n @typedef {Object} PopoverClosableEnum\n \n @property {String} ON\n Show a close button on the popover and close the popover when clicked.\n @property {String} OFF\n Do not show a close button. Elements with the <code>coral-close</code> attributes will still close the\n popover.\n */\nconst closable = {\n  ON: 'on',\n  OFF: 'off'\n};\n\n/**\n Enumeration for {@link Popover} variants.\n \n @typedef {Object} PopoverVariantEnum\n \n @property {String} DEFAULT\n A default popover without header icon.\n @property {String} ERROR\n A popover with an error header and icon, indicating that an error has occurred.\n @property {String} WARNING\n A popover with a warning header and icon, notifying the user of something important.\n @property {String} SUCCESS\n A popover with a success header and icon, indicates to the user that an operation was successful.\n @property {String} HELP\n A popover with a question header and icon, provides the user with help.\n @property {String} INFO\n A popover with an info header and icon, informs the user of non-critical information.\n @property {String} FLYOUT\n A popover without header and footer, only content.\n */\nconst variant = {\n  DEFAULT: 'default',\n  ERROR: 'error',\n  WARNING: 'warning',\n  SUCCESS: 'success',\n  HELP: 'help',\n  INFO: 'info',\n  FLYOUT: 'flyout'\n};\n\n// A string of all possible variant classnames\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantValue in variant) {\n  if (variantValue !== 'FLYOUT') {\n    ALL_VARIANT_CLASSES.push(`_coral-Dialog--${variant[variantValue]}`);\n  }\n}\n\n// A string of all possible placement classnames\nconst placement = Overlay.placement;\nconst ALL_PLACEMENT_CLASSES = [];\nfor (const placementKey in placement) {\n  ALL_PLACEMENT_CLASSES.push(`${CLASSNAME}--${placement[placementKey]}`);\n}\n\n/**\n @class Coral.Popover\n @classdesc A Popover component for small overlay content.\n @htmltag coral-popover\n @extends {Overlay}\n */\nclass Popover extends Overlay {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = commons.extend(this._elements, {\n      // Fetch or create the content zone elements\n      header: this.querySelector('coral-popover-header') || document.createElement('coral-popover-header'),\n      content: this.querySelector('coral-popover-content') || document.createElement('coral-popover-content'),\n      footer: this.querySelector('coral-popover-footer') || document.createElement('coral-popover-footer')\n    });\n    base.call(this._elements, {i18n: i18n});\n    \n    // Events\n    this._delegateEvents({\n      'global:capture:click': '_handleClick',\n      'click [coral-close]': '_handleCloseClick',\n      'coral-overlay:positioned': '_onPositioned'\n    });\n    \n    // Override defaults from Overlay\n    this._focusOnShow = this.constructor.focusOnShow.ON;\n    this._trapFocus = this.constructor.trapFocus.ON;\n    this._returnFocus = this.constructor.returnFocus.ON;\n    this._overlayAnimationTime = this.constructor.FADETIME;\n    this._lengthOffset = OFFSET;\n  \n    // Listen for mutations\n    ['header', 'footer'].forEach((name) => {\n      this[`_${name}Observer`] = new MutationObserver(() => {\n        this._hideContentZoneIfEmpty(name);\n      });\n  \n      // Watch for changes\n      this._observeContentZone(name);\n    });\n  }\n  \n  /**\n   The popover's content element.\n   \n   @contentzone\n   @name content\n   @type {HTMLElement}\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-popover-content',\n      insert: function(content) {\n        const footer = this.footer;\n        // The content should always be before footer\n        this.insertBefore(content, this.contains(footer) && footer || null);\n      }\n    });\n  }\n  \n  /**\n   The popover's header element.\n   \n   @contentzone\n   @name header\n   @type {HTMLElement}\n   */\n  get header() {\n    return this._getContentZone(this._elements.header);\n  }\n  set header(value) {\n    this._setContentZone('header', value, {\n      handle: 'header',\n      tagName: 'coral-popover-header',\n      insert: function(header) {\n        this._elements.headerWrapper.insertBefore(header, this._elements.headerWrapper.firstChild);\n      },\n      set: function() {\n        // Stop observing the old header and observe the new one\n        this._observeContentZone('header');\n    \n        // Check if header needs to be hidden\n        this._hideContentZoneIfEmpty('header');\n      }\n    });\n  }\n  \n  /**\n   The popover's footer element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get footer() {\n    return this._getContentZone(this._elements.footer);\n  }\n  set footer(value) {\n    this._setContentZone('footer', value, {\n      handle: 'footer',\n      tagName: 'coral-popover-footer',\n      insert: function(footer) {\n        // The footer should always be after content\n        this.appendChild(footer);\n      },\n      set: function() {\n        // Stop observing the old header and observe the new one\n        this._observeContentZone('footer');\n  \n        // Check if header needs to be hidden\n        this._hideContentZoneIfEmpty('footer');\n      }\n    });\n  }\n  \n  /**\n   The popover's variant. See {@link PopoverVariantEnum}.\n   \n   @type {String}\n   @default PopoverVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n  \n    // Insert SVG icon\n    this._insertTypeIcon();\n    \n    // Remove all variant classes\n    this.classList.remove(...ALL_VARIANT_CLASSES);\n    \n    const isFlyoutVariant = this._variant === variant.FLYOUT;\n    this.classList.toggle(`${CLASSNAME}--dialog`, !isFlyoutVariant);\n    this._elements.tip.hidden = isFlyoutVariant;\n    this._elements.headerWrapper.hidden = isFlyoutVariant;\n    this._elements.footer.hidden = isFlyoutVariant;\n    \n    if (this._variant === variant.DEFAULT || isFlyoutVariant) {\n      // ARIA\n      this.setAttribute('role', 'dialog');\n    }\n    else {\n      // Set new variant class\n      this.classList.add(`_coral-Dialog--${this._variant}`);\n      \n      // ARIA\n      this.setAttribute('role', 'alertdialog');\n    }\n  }\n  \n  /**\n   Whether the popover should have a close button. See {@link PopoverClosableEnum}.\n   \n   @type {String}\n   @default PopoverClosableEnum.OFF\n   @htmlattribute closable\n   @htmlattributereflected\n   */\n  get closable() {\n    return this._closable || closable.OFF;\n  }\n  set closable(value) {\n    value = transform.string(value).toLowerCase();\n    this._closable = validate.enumeration(closable)(value) && value || closable.OFF;\n    this._reflectAttribute('closable', this._closable);\n  \n    this._elements.closeButton.style.display = this._closable === closable.ON ? 'block' : 'none';\n  }\n  \n  /**\n   Inherited from {@link Overlay#open}.\n   */\n  get open() {\n    return super.open;\n  }\n  set open(value) {\n    super.open = value;\n  \n    const target = this._getTarget();\n    if (target) {\n      if (this.open) {\n        // Check if the target already has is-selected\n        this._targetWasSelected = target.classList.contains('is-selected');\n      \n        // Only bother adding the class if the target doesn't have it\n        if (!this._targetWasSelected) {\n          // Highlight target\n          target.classList.add('is-selected');\n        }\n      }\n      else if (!this._targetWasSelected) {\n        // When closed, only remove the class if the target didn't have it before\n        target.classList.remove('is-selected');\n      }\n    }\n  }\n  \n  /**\n   @ignore\n   \n   Not supported anymore.\n   */\n  get icon() {\n    return this._icon || '';\n  }\n  set icon(value) {\n    this._icon = transform.string(value);\n  }\n  \n  _onPositioned(event) {\n    if (this.open) {\n      // Set arrow placement\n      this.classList.remove(...ALL_PLACEMENT_CLASSES);\n      this.classList.add(`${CLASSNAME}--${event.detail.placement}`);\n    }\n  }\n  \n  _insertTypeIcon() {\n    if (this._elements.icon) {\n      this._elements.icon.remove();\n    }\n    \n    let variantValue = this.variant;\n    \n    // Warning icon is same as ERROR icon\n    if (variantValue === variant.WARNING) {\n      variantValue = variant.ERROR;\n    }\n    \n    // Inject the SVG icon\n    if (variantValue !== variant.DEFAULT && variantValue !== variant.FLYOUT) {\n      this._elements.headerWrapper.insertAdjacentHTML('beforeend', Icon._renderSVG(`spectrum-css-icon-Alert${capitalize(variantValue)}`, ['_coral-Dialog-typeIcon']));\n      this._elements.icon = this.querySelector('._coral-Dialog-typeIcon');\n    }\n  }\n  \n  _observeContentZone(name) {\n    const observer = this[`_${name}Observer`];\n    if (observer) {\n      observer.disconnect();\n      observer.observe(this._elements[name], {\n        // Catch changes to childList\n        childList: true,\n        // Catch changes to textContent\n        characterData: true,\n        // Monitor any child node\n        subtree: true\n      });\n    }\n  }\n  \n  _hideContentZoneIfEmpty(name) {\n    const contentZone = this._elements[name];\n    const target = name === 'header' ? this._elements.headerWrapper : contentZone;\n  \n    // If it's empty and has no non-textnode children, hide the header\n    const hiddenValue = contentZone.children.length === 0 && contentZone.textContent.replace(/\\s*/g, '') === '';\n  \n    // Only bother if the hidden status has changed\n    if (hiddenValue !== target.hidden) {\n      target.hidden = hiddenValue;\n    \n      // Reposition as the height has changed\n      this.reposition();\n    }\n  }\n  \n  /**\n   @ignore\n   @todo maybe this should be mixin or something\n   */\n  _handleCloseClick(event) {\n    const dismissTarget = event.matchedTarget;\n    const dismissValue = dismissTarget.getAttribute('coral-close');\n    if (!dismissValue || this.matches(dismissValue)) {\n      this.hide();\n      event.stopPropagation();\n    }\n  }\n  \n  /** @private */\n  _handleClick(event) {\n    if (this.interaction === this.constructor.interaction.OFF) {\n      // Since we use delegation, just ignore clicks if interaction is off\n      return;\n    }\n    \n    const eventTarget = event.target;\n    const targetEl = this._getTarget();\n    \n    const eventIsWithinTarget = targetEl ? targetEl.contains(eventTarget) : false;\n    \n    if (eventIsWithinTarget) {\n      // When target is clicked\n      \n      if (!this.open && !targetEl.disabled) {\n        // Open if we're not already open and target element is not disabled\n        this.show();\n      }\n      else {\n        this.hide();\n      }\n    }\n    else if (this.open && !this.contains(eventTarget)) {\n      // Close if we're open and the click was outside of the target and outside of the popover\n      this.hide();\n    }\n  }\n  \n  get _contentZones() {\n    return {\n      'coral-popover-header': 'header',\n      'coral-popover-content': 'content',\n      'coral-popover-footer': 'footer'\n    };\n  }\n  \n  /**\n   Returns {@link Popover} variants.\n   \n   @return {PopoverVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /**\n   Returns {@link Popover} close options.\n   \n   @return {PopoverClosableEnum}\n   */\n  static get closable() { return closable; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'closable',\n      'variant'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n    \n    // ARIA\n    this.setAttribute('role', 'dialog');\n    // This helped announcements in certain screen readers\n    this.setAttribute('aria-live', 'assertive');\n    \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n    if (!this._closable) { this.closable = closable.OFF; }\n  \n    // // Fetch the content zones\n    const header = this._elements.header;\n    const content = this._elements.content;\n    const footer = this._elements.footer;\n  \n    // Verify if a content zone is provided\n    const contentZoneProvided = this.contains(content) && content || this.contains(footer) && footer || this.contains(header) && header;\n    \n    // Remove content zones so we can process children\n    if (header.parentNode) { header.remove(); }\n    if (content.parentNode) { content.remove(); }\n    if (footer.parentNode) { footer.remove(); }\n  \n    // Remove tab captures\n    Array.prototype.filter.call(this.children, (child) => child.hasAttribute('coral-tabcapture')).forEach((tabCapture) => {\n      this.removeChild(tabCapture);\n    }, this);\n  \n    // Support cloneNode\n    const template = this.querySelectorAll('._coral-Dialog-header, ._coral-Dialog-closeButton, ._coral-Popover-tip');\n    for (let i = 0; i < template.length; i++) {\n      template[i].remove();\n    }\n  \n    // Move everything in the content\n    if (!contentZoneProvided) {\n      while (this.firstChild) {\n        content.appendChild(this.firstChild);\n      }\n    }\n  \n    // Insert template\n    const frag = document.createDocumentFragment();\n    frag.appendChild(this._elements.headerWrapper);\n    frag.appendChild(this._elements.closeButton);\n    frag.appendChild(this._elements.tip);\n    this.appendChild(frag);\n    \n    // Assign content zones\n    this.header = header;\n    this.content = content;\n    this.footer = footer;\n  \n    // Add the Overlay coral-tabcapture elements at the end\n    super.connectedCallback();\n  }\n}\n\nexport default Popover;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"headerWrapper\"] = document.createElement(\"div\");\n  el0.className += \" _coral-Dialog-header\";\n  el0.setAttribute(\"handle\", \"headerWrapper\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"closeButton\"] = document.createElement(\"button\",\"coral-button\");\n  el2.setAttribute(\"handle\", \"closeButton\");\n  el2.className += \" _coral-Dialog-closeButton\";\n  el2.setAttribute(\"type\", \"button\");\n  el2.setAttribute(\"is\", \"coral-button\");\n  el2.setAttribute(\"variant\", \"icon\");\n  el2.setAttribute(\"icon\", \"close\");\n  el2.setAttribute(\"title\", data_0[\"i18n\"][\"get\"]('Close'));\n  el2.setAttribute(\"tabindex\", \"-1\");\n  el2.setAttribute(\"coral-close\", \"\");\n  frag.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  frag.appendChild(el3);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {OverlayMixin} from '../../../coralui-mixin-overlay';\nimport {DragAction} from '../../../coralui-dragaction';\nimport {Icon} from '../../../coralui-component-icon';\nimport '../../../coralui-component-button';\nimport base from '../templates/base';\nimport {commons, transform, validate, i18n} from '../../../coralui-util';\n\n/**\n Enumeration for {@link Dialog} closable options.\n \n @typedef {Object} DialogClosableEnum\n \n @property {String} ON\n Show a close button on the dialog and close the dialog when clicked.\n @property {String} OFF\n Do not show a close button. Elements with the <code>coral-close</code> attribute will still close the dialog.\n */\nconst closable = {\n  ON: 'on',\n  OFF: 'off'\n};\n\n/**\n Enumeration for {@link Dialog} keyboard interaction options.\n \n @typedef {Object} DialogInteractionEnum\n \n @property {String} ON\n Keyboard interaction is enabled.\n @property {String} OFF\n Keyboard interaction is disabled.\n */\nconst interaction = {\n  ON: 'on',\n  OFF: 'off'\n};\n\n/**\n Enumeration for {@link Dialog} variants.\n \n @typedef {Object} DialogVariantEnum\n \n @property {String} DEFAULT\n A default dialog without header icon.\n @property {String} ERROR\n A dialog with an error header and icon, indicating that an error has occurred.\n @property {String} WARNING\n A dialog with a warning header and icon, notifying the user of something important.\n @property {String} SUCCESS\n A dialog with a success header and icon, indicates to the user that an operation was successful.\n @property {String} HELP\n A dialog with a question header and icon, provides the user with help.\n @property {String} INFO\n A dialog with an info header and icon, informs the user of non-critical information.\n */\nconst variant = {\n  DEFAULT: 'default',\n  ERROR: 'error',\n  WARNING: 'warning',\n  SUCCESS: 'success',\n  HELP: 'help',\n  INFO: 'info'\n};\n\n/**\n Enumeration for {@link Dialog} backdrops.\n \n @typedef {Object} DialogBackdropEnum\n \n @property {String} NONE\n No backdrop.\n @property {String} MODAL\n A backdrop that hides the dialog when clicked.\n @property {String} STATIC\n A backdrop that does not hide the dialog when clicked.\n */\nconst backdrop = {\n  NONE: 'none',\n  MODAL: 'modal',\n  STATIC: 'static'\n};\n\n// Used to map icon with variant\nconst capitalize = s => s.charAt(0).toUpperCase() + s.slice(1);\n\n// The dialog's base classname\nconst CLASSNAME = '_coral-Dialog';\n// Modifier classnames\nconst FULLSCREEN_CLASSNAME = `${CLASSNAME}--fullscreenTakeover`;\n\n// A string of all possible variant classnames\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantValue in variant) {\n  ALL_VARIANT_CLASSES.push(`${CLASSNAME}--${variant[variantValue]}`);\n}\n\n/**\n @class Coral.Dialog\n @classdesc A Dialog component that supports various use cases with custom content.\n @htmltag coral-dialog\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {OverlayMixin}\n */\nclass Dialog extends OverlayMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n\n    // Prepare templates\n    this._elements = commons.extend(this._elements, {\n      // Fetch or create the content zone elements\n      header: this.querySelector('coral-dialog-header') || document.createElement('coral-dialog-header'),\n      content: this.querySelector('coral-dialog-content') || document.createElement('coral-dialog-content'),\n      footer: this.querySelector('coral-dialog-footer') || document.createElement('coral-dialog-footer')\n    });\n    base.call(this._elements, {i18n});\n\n    // Events\n    this._delegateEvents({\n      'click [coral-close]': '_handleCloseClick',\n\n      // Handle resize events\n      'global:resize': 'center',\n\n      'global:key:escape': '_handleEscape'\n    });\n\n    // Override defaults from Overlay\n    this._trapFocus = this.constructor.trapFocus.ON;\n    this._returnFocus = this.constructor.returnFocus.ON;\n    this._overlayAnimationTime = this.constructor.FADETIME;\n\n    // Listen for mutations\n    this._headerObserver = new MutationObserver(this._hideHeaderIfEmpty.bind(this));\n\n    // Watch for changes to the header element's children\n    this._observeHeader();\n  }\n  \n  /**\n   Whether keyboard interaction is enabled. See {@link DialogInteractionEnum}.\n   \n   @type {DialogInteractionEnum}\n   @default DialogInteractionEnum.ON\n   */\n  get interaction() {\n    return this._interaction || interaction.ON;\n  }\n  set interaction(value) {\n    value = transform.string(value).toLowerCase();\n    this._interaction = validate.enumeration(interaction)(value) && value || interaction.ON;\n  }\n  \n  /**\n   The dialog header element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get header() {\n    return this._getContentZone(this._elements.header);\n  }\n  set header(value) {\n    this._setContentZone('header', value, {\n      handle: 'header',\n      tagName: 'coral-dialog-header',\n      insert: function(header) {\n        this._elements.headerWrapper.insertBefore(header, this._elements.headerWrapper.firstChild);\n      },\n      set: function() {\n        // Stop observing the old header and observe the new one\n        this._observeHeader();\n    \n        // Check if header needs to be hidden\n        this._hideHeaderIfEmpty();\n      }\n    });\n  }\n  \n  /**\n   The dialog content element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-dialog-content',\n      insert: function(content) {\n        const footer = this.footer;\n        // The content should always be before footer\n        this._elements.contentZoneTarget.insertBefore(content, this.contains(footer) && footer || null);\n      }\n    });\n  }\n  \n  /**\n   The dialog footer element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get footer() {\n    return this._getContentZone(this._elements.footer);\n  }\n  set footer(value) {\n    this._setContentZone('footer', value, {\n      handle: 'footer',\n      tagName: 'coral-dialog-footer',\n      insert: function(footer) {\n        // The footer should always be after content\n        this._elements.contentZoneTarget.appendChild(footer);\n      }\n    });\n  }\n  \n  /**\n   The backdrop configuration for this dialog. See {@link DialogBackdropEnum}.\n   \n   @type {String}\n   @default DialogBackdropEnum.MODAL\n   @htmlattribute backdrop\n   */\n  get backdrop() {\n    return this._backdrop || backdrop.MODAL;\n  }\n  set backdrop(value) {\n    value = transform.string(value).toLowerCase();\n    this._backdrop = validate.enumeration(backdrop)(value) && value || backdrop.MODAL;\n  \n    const showBackdrop = this._backdrop !== backdrop.NONE;\n  \n    // We're visible now, so hide or show the modal accordingly\n    if (this.open && showBackdrop) {\n      this._showBackdrop();\n    }\n  }\n  \n  /**\n   The dialog's variant. See {@link DialogVariantEnum}.\n   \n   @type {String}\n   @default DialogVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n  \n    // Insert SVG icon\n    this._insertTypeIcon();\n    \n    // Remove all variant classes\n    this.classList.remove(...ALL_VARIANT_CLASSES);\n  \n    if (this._variant === variant.DEFAULT) {\n      // ARIA\n      this.setAttribute('role', 'dialog');\n    }\n    else {\n      // Set new variant class\n      this.classList.add(`${CLASSNAME}--${this._variant}`);\n    \n      // ARIA\n      this.setAttribute('role', 'alertdialog');\n    }\n  }\n  \n  /**\n   Whether the dialog should be displayed full screen (without borders or margin).\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute fullscreen\n   @htmlattributereflected\n   */\n  get fullscreen() {\n    return this._fullscreen || false;\n  }\n  set fullscreen(value) {\n    this._fullscreen = transform.booleanAttr(value);\n    this._reflectAttribute('fullscreen', this._fullscreen);\n    \n    if (this._fullscreen) {\n      // Full screen and movable are not compatible\n      this.movable = false;\n      this.classList.add(FULLSCREEN_CLASSNAME);\n    }\n    else {\n      this.classList.remove(FULLSCREEN_CLASSNAME);\n    }\n  }\n  \n  /**\n   Inherited from {@link OverlayMixin#open}.\n   */\n  get open() {\n    return super.open;\n  }\n  set open(value) {\n    super.open = value;\n    \n    // Ensure we're in the DOM\n    if (this.open && document.body.contains(this)) {\n      this._openInDOM = true;\n      \n      // If not child of document.body, we have to move it there\n      this._moveToDocumentBody();\n  \n      // Support wrapped dialog\n      this.classList.toggle(`${CLASSNAME}--wrapped`, this._elements.contentZoneTarget !== this);\n    \n      // Show the backdrop, if necessary\n      if (this.backdrop !== backdrop.NONE) {\n        this._showBackdrop();\n      }\n      \n      // Handles what to focus based on focusOnShow\n      this._handleFocus();\n    }\n  }\n  \n  /**\n   The dialog's icon.\n\n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   */\n  get icon() {\n    return this._elements.icon;\n  }\n  set icon(value) {\n    this._elements.icon = value;\n  }\n  \n  /**\n   Whether the dialog should have a close button. See {@link DialogClosableEnum}.\n   \n   @type {String}\n   @default DialogClosableEnum.OFF\n   @htmlattribute closable\n   @htmlattributereflected\n   */\n  get closable() {\n    return this._closable || closable.OFF;\n  }\n  set closable(value) {\n    value = transform.string(value).toLowerCase();\n    this._closable = validate.enumeration(closable)(value) && value || closable.OFF;\n    this._reflectAttribute('closable', this._closable);\n    \n    this._elements.closeButton.style.display = this._closable === closable.ON ? 'block' : 'none';\n  }\n  \n  /**\n   Whether the dialog can moved around by dragging the title.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute movable\n   @htmlattributereflected\n   */\n  get movable() {\n    return this._movable || false;\n  }\n  set movable(value) {\n    this._movable = transform.booleanAttr(value);\n    this._reflectAttribute('movable', this._movable);\n  \n    // Movable and fullscreen are not compatible\n    if (this._movable) {\n      this.fullscreen = false;\n    }\n    \n    if (this._movable) {\n      const dragAction = new DragAction(this);\n      dragAction.handle = this._elements.headerWrapper;\n    }\n    else {\n      if (this.dragAction) {\n        this.dragAction.destroy();\n      }\n  \n      // Recenter the dialog once it's not movable anymore\n      this.center();\n    }\n  }\n  \n  /** @ignore */\n  _observeHeader() {\n    if (this._headerObserver) {\n      this._headerObserver.disconnect();\n      this._headerObserver.observe(this._elements.header, {\n        // Catch changes to childList\n        childList: true,\n        // Catch changes to textContent\n        characterData: true,\n        // Monitor any child node\n        subtree: true\n      });\n    }\n  }\n  \n  /**\n   Hide the header wrapper if the header content zone is empty.\n   @ignore\n   */\n  _hideHeaderIfEmpty() {\n    const header = this._elements.header;\n    const headerWrapper = this._elements.headerWrapper;\n    \n    // If it's empty and has no non-textnode children, hide the header\n    const hiddenValue = header.children.length === 0 && header.textContent.replace(/\\s*/g, '') === '';\n    \n    // Only bother if the hidden status has changed\n    if (hiddenValue !== headerWrapper.hidden) {\n      headerWrapper.hidden = hiddenValue;\n    }\n  }\n  \n  /** @ignore */\n  _handleEscape() {\n    // When escape is pressed, hide ourselves\n    if (this.interaction === interaction.ON && this.open && this._isTopOverlay()) {\n      this.open = false;\n    }\n  }\n  \n  /**\n   @ignore\n   @todo maybe this should be mixin or something\n   */\n  _handleCloseClick(event) {\n    const dismissTarget = event.matchedTarget;\n    const dismissValue = dismissTarget.getAttribute('coral-close');\n    if (!dismissValue || this.matches(dismissValue)) {\n      this.open = false;\n      event.stopPropagation();\n    }\n  }\n  \n  /** @ignore */\n  _moveToDocumentBody() {\n    if (this.parentNode !== document.body) {\n      document.body.insertBefore(this, document.body.lastElementChild);\n    }\n  }\n  \n  _insertTypeIcon() {\n    if (this._elements.icon) {\n      this._elements.icon.remove();\n    }\n    \n    let variantValue = this.variant;\n    \n    // Warning icon is same as ERROR icon\n    if (variantValue === variant.WARNING) {\n      variantValue = variant.ERROR;\n    }\n    \n    // Inject the SVG icon\n    if (variantValue !== variant.DEFAULT) {\n      this._elements.headerWrapper.insertAdjacentHTML('beforeend', Icon._renderSVG(`spectrum-css-icon-Alert${capitalize(variantValue)}`, ['_coral-Dialog-typeIcon']));\n      this._elements.icon = this.querySelector('._coral-Dialog-typeIcon');\n    }\n  }\n  \n  /** @ignore */\n  backdropClickedCallback() {\n    // When we're modal, we close when the backdrop is clicked\n    if (this.backdrop === backdrop.MODAL && this._isTopOverlay()) {\n      this.open = false;\n    }\n  }\n  \n  /**\n   Centers the dialog in the middle of the screen.\n   \n   @returns {Dialog} this, chainable.\n   */\n  center() {\n    // We're already centered in fullscreen mode\n    if (this.fullscreen) {\n      return;\n    }\n  \n    // If moved we reset the position\n    this.style.top = '';\n    this.style.left = '';\n  \n    return this;\n  }\n  \n  get _contentZones() {\n    return {\n      'coral-dialog-header': 'header',\n      'coral-dialog-content': 'content',\n      'coral-dialog-footer': 'footer'\n    };\n  }\n  \n  /**\n   Returns {@link Dialog} variants.\n   \n   @return {DialogVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /**\n   Returns {@link Dialog} backdrops.\n   \n   @return {DialogBackdropEnum}\n   */\n  static get backdrop() { return backdrop; }\n  \n  /**\n   Returns {@link Dialog} close options.\n   \n   @return {DialogClosableEnum}\n   */\n  static get closable() { return closable; }\n  \n  /**\n   Returns {@link Dialog} interaction options.\n   \n   @return {DialogInteractionEnum}\n   */\n  static get interaction() { return interaction; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'interaction',\n      'backdrop',\n      'variant',\n      'fullscreen',\n      'icon',\n      'closable',\n      'movable'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n\n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n    if (!this._backdrop) { this.backdrop = backdrop.MODAL; }\n    if (!this._closable) { this.closable = closable.OFF; }\n    if (!this._interaction) { this.interaction = interaction.ON; }\n\n    // // Fetch the content zones\n    const header = this._elements.header;\n    const content = this._elements.content;\n    const footer = this._elements.footer;\n  \n    // Verify if a content zone is provided\n    const contentZoneProvided = this.contains(content) && content || this.contains(footer) && footer || this.contains(header) && header;\n  \n    // Allow Content zone target to be different than dialog\n    if (contentZoneProvided) {\n      this._elements.contentZoneTarget = contentZoneProvided.parentNode;\n    }\n    else {\n      this._elements.contentZoneTarget = this;\n    }\n    \n    // Remove content zones so we can process children\n    if (header.parentNode) { header.remove(); }\n    if (content.parentNode) { content.remove(); }\n    if (footer.parentNode) { footer.remove(); }\n  \n    // Remove tab captures\n    Array.prototype.filter.call(this.children, (child) => child.hasAttribute('coral-tabcapture')).forEach((tabCapture) => {\n      this.removeChild(tabCapture);\n    }, this);\n    \n    // Support cloneNode\n    const template = this.querySelectorAll('._coral-Dialog-header, ._coral-Dialog-closeButton');\n    for (let i = 0; i < template.length; i++) {\n      template[i].remove();\n    }\n  \n    // Move everything in the content\n    if (!contentZoneProvided) {\n      while (this.firstChild) {\n        content.appendChild(this.firstChild);\n      }\n    }\n    \n    // Insert template\n    this._elements.contentZoneTarget.appendChild(this._elements.headerWrapper);\n    this._elements.contentZoneTarget.appendChild(this._elements.closeButton);\n\n    // Assign content zones\n    this.header = header;\n    this.content = content;\n    this.footer = footer;\n  \n    // Add the Overlay coral-tabcapture elements at the end\n    super.connectedCallback();\n  \n    // In case it was opened but not in the DOM yet\n    if (this.open && !this._openInDOM) {\n      this.open = this.open;\n    }\n  }\n}\n\nexport default Dialog;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Dialog-title';\n\n/**\n @class Coral.Dialog.Header\n @classdesc The Dialog header content\n @htmltag coral-dialog-header\n @extends {HTMLElement}\n */\nclass DialogHeader extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  \n    this.setAttribute('role', 'heading');\n    this.setAttribute('aria-level', '2');\n  }\n}\n\nexport default DialogHeader;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Dialog-content';\n\n/**\n @class Coral.Dialog.Content\n @classdesc The Dialog default content\n @htmltag coral-dialog-content\n @extends {HTMLElement}\n */\nclass DialogContent extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default DialogContent;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Dialog-footer';\n\n/**\n @class Coral.Dialog.Footer\n @classdesc The Dialog footer content\n @htmltag coral-dialog-footer\n @extends {HTMLElement}\n */\nclass DialogFooter extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default DialogFooter;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport translations from './i18n/translations.json';\nimport {strings, commons} from '../coralui-util';\n\nimport Dialog from './src/scripts/Dialog';\nimport DialogHeader from './src/scripts/DialogHeader';\nimport DialogContent from './src/scripts/DialogContent';\nimport DialogFooter from './src/scripts/DialogFooter';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-dialog': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-dialog', Dialog);\nwindow.customElements.define('coral-dialog-header', DialogHeader);\nwindow.customElements.define('coral-dialog-content', DialogContent);\nwindow.customElements.define('coral-dialog-footer', DialogFooter);\n\nDialog.Header = DialogHeader;\nDialog.Content = DialogContent;\nDialog.Footer = DialogFooter;\n\nexport {Dialog};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {Dialog} from '../../../coralui-component-dialog';\n\n/**\n @class Coral.Popover.Header\n @classdesc The Popover header content\n @htmltag coral-popover-header\n @extends {DialogHeader}\n */\nclass PopoverHeader extends Dialog.Header {}\n\nexport default PopoverHeader;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {Dialog} from '../../../coralui-component-dialog';\n\n/**\n @class Coral.Popover.Content\n @classdesc The Popover default content\n @htmltag coral-popover-content\n @extends {DialogContent}\n */\nclass PopoverContent extends Dialog.Content {}\n\nexport default PopoverContent;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {Dialog} from '../../../coralui-component-dialog';\n\n/**\n @class Coral.Popover.Footer\n @classdesc The Popover footer content\n @htmltag coral-popover-footer\n @extends {HTMLElement}\n */\nclass PopoverFooter extends Dialog.Footer {}\n\nexport default PopoverFooter;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAMES = ['coral-Rule', 'coral-Rule--subsection2'];\n\n/**\n @ignore\n Not supported.\n */\nclass PopoverSeparator extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(...CLASSNAMES);\n  }\n}\n\nexport default PopoverSeparator;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport translations from './i18n/translations.json';\nimport {strings, commons} from '../coralui-util';\nimport Popover from './src/scripts/Popover';\nimport PopoverHeader from './src/scripts/PopoverHeader';\nimport PopoverContent from './src/scripts/PopoverContent';\nimport PopoverFooter from './src/scripts/PopoverFooter';\nimport PopoverSeparator from './src/scripts/PopoverSeparator';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-popover': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-popover', Popover);\nwindow.customElements.define('coral-popover-header', PopoverHeader);\nwindow.customElements.define('coral-popover-content', PopoverContent);\nwindow.customElements.define('coral-popover-footer', PopoverFooter);\nwindow.customElements.define('coral-popover-separator', PopoverSeparator);\n\nPopover.Header = PopoverHeader;\nPopover.Content = PopoverContent;\nPopover.Footer = PopoverFooter;\nPopover.Separator = PopoverSeparator;\n\nexport {Popover};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"overlay\"] = document.createElement(\"coral-popover\");\n  el0.setAttribute(\"smart\", \"\");\n  el0.id = data_0[\"commons\"][\"getUID\"]();\n  el0.setAttribute(\"variant\", \"flyout\");\n  el0.setAttribute(\"handle\", \"overlay\");\n  el0.setAttribute(\"placement\", \"bottom\");\n  el0.setAttribute(\"breadthoffset\", \"-50%r + 50%p\");\n  el0.setAttribute(\"coral-actionbar-popover\", \"\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"moreButton\"] = document.createElement(\"button\",\"coral-button\");\n  el0.setAttribute(\"is\", \"coral-button\");\n  el0.setAttribute(\"handle\", \"moreButton\");\n  el0.setAttribute(\"type\", \"button\");\n  el0.setAttribute(\"variant\", \"_custom\");\n  el0.className += \" _coral-ActionBar-button _coral-Button--quiet--action\";\n  el0.setAttribute(\"icon\", \"more\");\n  el0.setAttribute(\"coral-actionbar-more\", \"\");\n  el0.setAttribute(\"aria-expanded\", \"false\");\n  el0.setAttribute(\"aria-haspopup\", \"true\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  data = data_0;\n  \n  var excludedAttributes = ['is', 'class', 'variant', 'size'];\n\n  function copyAttributes(from, to) {\n    for (var i = 0; i < from.attributes.length; i++) {\n    var attr = from.attributes[i];\n      if (excludedAttributes.indexOf(attr.nodeName) === -1) {\n        to.setAttribute(attr.nodeName, attr.nodeValue);\n      }\n    }\n  }\n\n  data_0 = data;\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  if (data_0[\"isButtonList\"]) {\n    var el3 = document.createTextNode(\"\\n  \");\n    frag.appendChild(el3);\n    var el4 = this[\"buttonList\"] = document.createElement(\"coral-buttonlist\");\n    el4.className += \" _coral-ActionBar-buttonList\";\n    el4.setAttribute(\"tabindex\", \"0\");\n    el4.setAttribute(\"coral-actionbar-offscreen\", \"\");\n    el4.setAttribute(\"handle\", \"buttonList\");\n    var el5 = document.createTextNode(\"\\n    \");\n    el4.appendChild(el5);\n    var iterated_1 = data_0;\n    for (var i1 = 0, ni1 = iterated_1.length; i1 < ni1; i1++) {\n      var data_1 = data = iterated_1[i1];\n      var el7 = document.createTextNode(\"\\n      \");\n      el4.appendChild(el7);\n      var el8 = this[\"buttonListItem\"] = document.createElement(\"button\",\"coral-buttonlist-item\");\n      el8.setAttribute(\"is\", \"coral-buttonlist-item\");\n      el8.setAttribute(\"handle\", \"buttonListItem\");\n      var el9 = document.createTextNode(\"\\n        \");\n      el8.appendChild(el9);\n      data = data_1;\n      \n          copyAttributes(data._button, this.buttonListItem);\n        \n      data_1 = data;\n      var el11 = document.createTextNode(\"\\n        \");\n      el8.appendChild(el11);\n      var el12 = document.createElement(\"coral-action-bar-item\");\n      el12.setAttribute(\"coral-actionbar-offscreen\", \"\");\n      el12.textContent = data_1[\"_button\"][\"label\"][\"textContent\"];\n      el8.appendChild(el12);\n      var el13 = document.createTextNode(\"\\n      \");\n      el8.appendChild(el13);\n      el4.appendChild(el8);\n      var el14 = document.createTextNode(\"\\n      \");\n      el4.appendChild(el14);\n      if (data_1[\"_popover\"]) {\n        var el16 = document.createTextNode(\"\\n        \");\n        el4.appendChild(el16);\n        data = data_1;\n        \n          var popover = data._popover.cloneNode(true);\n          this.buttonList.items.add(popover);\n        \n        data_1 = data;\n        var el18 = document.createTextNode(\"\\n      \");\n        el4.appendChild(el18);\n      }\n      var el19 = document.createTextNode(\"\\n    \");\n      el4.appendChild(el19);\n    }\n    var el20 = document.createTextNode(\"\\n  \");\n    el4.appendChild(el20);\n    frag.appendChild(el4);\n    var el21 = document.createTextNode(\"\\n  \");\n    frag.appendChild(el21);\n    var el22 = document.createTextNode(\"\\n\");\n    frag.appendChild(el22);\n  }\n  else {\n    var el23 = document.createTextNode(\"\\n    \");\n    frag.appendChild(el23);\n    if (data_0[\"isAnchorList\"]) {\n      var el25 = document.createTextNode(\"\\n      \");\n      frag.appendChild(el25);\n      var el26 = this[\"anchorList\"] = document.createElement(\"coral-anchorlist\");\n      el26.setAttribute(\"tabindex\", \"0\");\n      el26.setAttribute(\"coral-actionbar-offscreen\", \"\");\n      el26.setAttribute(\"handle\", \"anchorList\");\n      var el27 = document.createTextNode(\"\\n        \");\n      el26.appendChild(el27);\n      var iterated_1 = data_0;\n      for (var i1 = 0, ni1 = iterated_1.length; i1 < ni1; i1++) {\n        var data_1 = data = iterated_1[i1];\n        var el29 = document.createTextNode(\"\\n          \");\n        el26.appendChild(el29);\n        var el30 = this[\"anchorListItem\"] = document.createElement(\"a\",\"coral-anchorlist-item\");\n        el30.setAttribute(\"is\", \"coral-anchorlist-item\");\n        el30.setAttribute(\"handle\", \"anchorListItem\");\n        var el31 = document.createTextNode(\"\\n            \");\n        el30.appendChild(el31);\n        data = data_1;\n        \n              copyAttributes(data._button, this.anchorListItem);\n            \n        data_1 = data;\n        var el33 = document.createTextNode(\"\\n            \");\n        el30.appendChild(el33);\n        var el34 = document.createElement(\"coral-action-bar-item\");\n        el34.setAttribute(\"coral-actionbar-offscreen\", \"\");\n        el34.textContent = data_1[\"_button\"][\"label\"][\"textContent\"];\n        el30.appendChild(el34);\n        var el35 = document.createTextNode(\"\\n          \");\n        el30.appendChild(el35);\n        el26.appendChild(el30);\n        var el36 = document.createTextNode(\"\\n          \");\n        el26.appendChild(el36);\n        if (data_1[\"_popover\"]) {\n          var el38 = document.createTextNode(\"\\n            \");\n          el26.appendChild(el38);\n          data = data_1;\n          \n              var popover = data._popover.cloneNode(true);\n              this.anchorList.items.add(popover);\n            \n          data_1 = data;\n          var el40 = document.createTextNode(\"\\n          \");\n          el26.appendChild(el40);\n        }\n        var el41 = document.createTextNode(\"\\n        \");\n        el26.appendChild(el41);\n      }\n      var el42 = document.createTextNode(\"\\n      \");\n      el26.appendChild(el42);\n      frag.appendChild(el26);\n      var el43 = document.createTextNode(\"\\n      \");\n      frag.appendChild(el43);\n      var el44 = document.createTextNode(\"\\n    \");\n      frag.appendChild(el44);\n    }\n    else {\n      var el45 = document.createTextNode(\"\\n        \");\n      frag.appendChild(el45);\n      var el46 = document.createElement(\"ul\");\n      el46.className += \" _coral-ActionBar-list\";\n      var el47 = document.createTextNode(\"\\n          \");\n      el46.appendChild(el47);\n      var iterated_1 = data_0;\n      for (var i1 = 0, ni1 = iterated_1.length; i1 < ni1; i1++) {\n        var data_1 = data = iterated_1[i1];\n        var el49 = document.createTextNode(\"\\n            \");\n        el46.appendChild(el49);\n        var el50 = document.createElement(\"li\");\n        el50.className += \" _coral-ActionBar-list-item\";\n        var el51 = document.createTextNode(\"\\n              \");\n        el50.appendChild(el51);\n        el50.appendChild(data_1);\n        var el53 = document.createTextNode(\"\\n            \");\n        el50.appendChild(el53);\n        el46.appendChild(el50);\n        var el54 = document.createTextNode(\"\\n          \");\n        el46.appendChild(el54);\n      }\n      var el55 = document.createTextNode(\"\\n        \");\n      el46.appendChild(el55);\n      frag.appendChild(el46);\n      var el56 = document.createTextNode(\"\\n      \");\n      frag.appendChild(el56);\n    }\n    var el57 = document.createTextNode(\"\\n  \");\n    frag.appendChild(el57);\n  }\n  var el58 = document.createTextNode(\"\\n\\n\\n\");\n  frag.appendChild(el58);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport ActionBarContainerCollection from './ActionBarContainerCollection';\nimport getFirstSelectableWrappedItem from './getFirstSelectableWrappedItem';\nimport {Button} from '../../../coralui-component-button';\nimport '../../../coralui-component-anchorbutton';\nimport {Popover} from '../../../coralui-component-popover';\nimport moreOverlay from '../templates/moreOverlay';\nimport moreButton from '../templates/moreButton';\nimport overlayContent from '../templates/overlayContent';\nimport {commons, transform, i18n} from '../../../coralui-util';\n\n/**\n @mixin ActionBarContainerMixin\n @classdesc The base element for action bar containers\n */\nconst ActionBarContainerMixin = (superClass) => class extends superClass {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Templates\n    this._elements = {};\n    this._itemsInPopover = [];\n    moreButton.call(this._elements);\n    moreOverlay.call(this._elements, {commons});\n    overlayContent.call(this._elements, this._itemsInPopover);\n  \n    const overlayId = this._elements.overlay.id;\n    const events = {\n      // Accessibility\n      'capture:focus ._coral-ActionBar-button:not([disabled])': '_onItemFocusIn',\n      'capture:blur ._coral-ActionBar-button:not([disabled])': '_onItemFocusOut'\n    };\n    events[`global:capture:coral-overlay:beforeopen #${overlayId}`] = '_onOverlayBeforeOpen';\n    events[`global:capture:coral-overlay:beforeclose #${overlayId}`] = '_onOverlayBeforeClose';\n  \n    // Events\n    this._delegateEvents(events);\n  \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {ActionBarContainerCollection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request:\n    if (!this._items) {\n      this._items = new ActionBarContainerCollection({\n        host: this,\n        itemTagName: 'coral-actionbar-item',\n        onItemAdded: this._styleItem\n      });\n    }\n\n    return this._items;\n  }\n  \n  /**\n   The amount of items that are maximally visible inside the container. Using a value <= 0 will disable this\n   feature and show as many items as possible.\n   \n   @type {Number}\n   @default -1\n   @htmlattribute threshold\n   @htmlattributereflected\n   */\n  get threshold() {\n    return typeof this._threshold === 'number' ? this._threshold : -1;\n  }\n  set threshold(value) {\n    this._threshold = transform.number(value);\n    this._reflectAttribute('threshold', this._threshold);\n  }\n  \n  /**\n   If there are more ActionBarItems inside the ActionBar than currently can be shown, then a \"more\" Button with the\n   following text will be rendered (and some ActionBarItems will be hidden inside of a Popover).\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute morebuttontext\n   */\n  get moreButtonText() {\n    return this._moreButtonText || '';\n  }\n  set moreButtonText(value) {\n    this._moreButtonText = transform.string(value);\n  \n    if (this._elements.moreButton) {\n      // moreButton might not have been created so far\n      this._elements.moreButton.label.innerHTML = this._moreButtonText;\n      this._elements.moreButton[this._moreButtonText.trim() === '' ? 'setAttribute' : 'removeAttribute']('title', i18n.get('More'));\n    }\n  }\n  \n  /**\n   Style item content\n   */\n  _styleItem(item) {\n    const button = item.querySelector('button[is=\"coral-button\"]') || item.querySelector('a[is=\"coral-anchorbutton\"]');\n    if (button) {\n      button.classList.add('_coral-ActionBar-button');\n      \n      const oldVariant = button.getAttribute('variant');\n      if (oldVariant === Button.variant._CUSTOM) {\n        return;\n      }\n      \n      const newVariant = oldVariant === Button.variant.QUIET ? '_coral-Button--quiet--action' : '_coral-Button--action';\n      button.setAttribute('variant', Button.variant._CUSTOM);\n      button.classList.add(newVariant);\n    }\n    \n    const popover = item.querySelector('coral-popover');\n    if (popover && (popover.querySelector('coral-buttonlist') || popover.querySelector('coral-anchorlist'))) {\n      popover.setAttribute('variant', Popover.variant.FLYOUT);\n    }\n  }\n  \n  _onItemFocusIn(event) {\n    event.matchedTarget.classList.add('focus-ring');\n  }\n  \n  _onItemFocusOut(event) {\n    event.matchedTarget.classList.remove('focus-ring');\n  }\n  \n  /**\n   Called after popover.open is set to true, but before the transition of the popover is done. Show elements inside\n   the actionbar, that are hidden due to space problems.\n   \n   @ignore\n   */\n  _onOverlayBeforeOpen(event) {\n    // there might be popovers in popover => ignore them\n    if (event.target !== this._elements.overlay) {\n      return;\n    }\n    \n    this._itemsInPopover = this.items._getAllOffScreen();\n    \n    if (this._itemsInPopover.length < 1) {\n      return;\n    }\n  \n    // Store the button and popover on the item\n    this._itemsInPopover.forEach((item) => {\n      item._button = item.querySelector('button[is=\"coral-button\"]') || item.querySelector('a[is=\"coral-anchorbutton\"]');\n      item._popover = item.querySelector('coral-popover');\n    });\n    \n    // Whether a ButtonList or AnchorList should be rendered\n    this._itemsInPopover.isButtonList = this._itemsInPopover.every(item => item._button && item._button.tagName === 'BUTTON');\n    this._itemsInPopover.isAnchorList = this._itemsInPopover.every(item => item._button && item._button.tagName === 'A');\n    \n    // show the current popover (hidden needed to disable fade time of popover)\n    this._elements.overlay.hidden = false;\n    \n    // render popover content\n    const popover = this._elements.overlay;\n    popover.content.innerHTML = '';\n    popover.content.appendChild(overlayContent.call(this._elements, this._itemsInPopover));\n    \n    // focus first item (nextFrame needed as popover must be visible and initialized with items)\n    const self = this;\n    let wrappedItem;\n    let loop = true;\n    const focusFirstItem = function() {\n      wrappedItem = getFirstSelectableWrappedItem(self._itemsInPopover[0]);\n      if (wrappedItem) {\n        // focus first item\n        wrappedItem.removeAttribute('tabindex');\n        wrappedItem.focus();\n        return;\n      }\n      \n      // If the wrappedItem isn't in the DOM and focusable, try one more time.\n      if (loop) {\n        loop = false;\n        window.requestAnimationFrame(focusFirstItem);\n      }\n    };\n    \n    window.requestAnimationFrame(focusFirstItem);\n  }\n  \n  /**\n   Called after popover.open is set to false, but before the transition of the popover is done.\n   Make items visible again, that now do fit into the actionbar.\n   @ignore\n   */\n  _onOverlayBeforeClose(event) {\n    // there might be popovers in popover => ignore them\n    if (event.target !== this._elements.overlay) {\n      return;\n    }\n    \n    const focusedItem = document.activeElement.parentNode;\n    \n    // hide the popover(needed to disable fade time of popover)\n    this._elements.overlay.hidden = true;\n    \n    //close any popovers, that might be inside the 'more' popover\n    const childPopovers = this._elements.overlay.getElementsByTagName('coral-popover');\n    for (let i = 0; i < childPopovers.length; i++) {\n      childPopovers[i].open = false;\n    }\n    \n    // return all elements from popover\n    this._returnElementsFromPopover();\n    \n    // clear cached items from popover\n    this._itemsInPopover = [];\n    \n    // we need to check if item has 'hasAttribute' because it is not present on the document\n    const isFocusedItemInsideActionBar = this.parentNode.contains(focusedItem);\n    const isFocusedItemOffscreen = focusedItem.hasAttribute && focusedItem.hasAttribute('coral-actionbar-offscreen');\n    if (isFocusedItemInsideActionBar && isFocusedItemOffscreen) {\n      // if currently an element is focused, that should not be visible (or is no actionbar-item) => select 'more'\n      // button\n      this._elements.moreButton.focus();\n    }\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['moreButtonText', 'morebuttontext', 'threshold'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n  \n    // Cleanup resize helpers object (cloneNode support)\n    const resizeHelpers = this.getElementsByTagName('object');\n    for (let i = 0; i < resizeHelpers.length; ++i) {\n      const resizeElement = resizeHelpers[i];\n      if (resizeElement.parentNode === this) {\n        this.removeChild(resizeElement);\n      }\n    }\n  \n    // Cleanup 'More' button\n    const more = this.querySelector('[coral-actionbar-more]');\n    if (more) {\n      this.removeChild(more);\n    }\n  \n    // Cleanup 'More' popover\n    const popover = this.querySelector('[coral-actionbar-popover]');\n    if (popover) {\n      this.removeChild(popover);\n    }\n    \n    this._elements.moreButton.label.textContent = this.moreButtonText;\n    // 'More' button might be moved later in dom when Container is attached to parent\n    this.appendChild(this._elements.moreButton);\n  \n    // Init 'More' popover\n    this._elements.overlay.target = this._elements.moreButton;\n  \n    // Cannot be open by default when rendered\n    this._elements.overlay.removeAttribute('open');\n    \n    // Insert popover always as firstChild to ensure element order (cloneNode support)\n    this.insertBefore(this._elements.overlay, this.firstChild);\n    \n    // Style the items to match action items\n    this.items.getAll().forEach(item => this._styleItem(item));\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    \n    // In case it was moved out don't forget to remove it\n    if (!this.contains(this._elements.overlay)) {\n      this._elements.overlay.remove();\n    }\n  }\n};\n\nexport default ActionBarContainerMixin;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport getFirstSelectableWrappedItem from './getFirstSelectableWrappedItem';\nimport ActionBarContainer from './ActionBarContainerMixin';\n\nconst CLASSNAME = '_coral-ActionBar-primary';\n\n/**\n @class Coral.ActionBar.Primary\n @classdesc An ActionBar primary component\n @htmltag coral-actionbar-primary\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ActionBarPrimary extends ActionBarContainer(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  _returnElementsFromPopover() {\n    let item = null;\n    let wrappedItem = null;\n    \n    for (let i = 0; i < this._itemsInPopover.length; i++) {\n      item = this._itemsInPopover[i];\n      \n      // remove tabindex again\n      wrappedItem = getFirstSelectableWrappedItem(item);\n      if (wrappedItem && wrappedItem.hasAttribute('tabindex')) {\n        wrappedItem.setAttribute('tabindex', -1);\n      }\n      \n      this.insertBefore(item, this._elements.moreButton);\n      \n      // Reset target\n      if (item._button && item._popover) {\n        item._popover.target = item._button;\n      }\n    }\n  }\n  \n  /** @ignore */\n  _attachMoreButtonToContainer() {\n    // add the button to the left/primary contentzone\n    this.appendChild(this._elements.moreButton);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    this._attachMoreButtonToContainer();\n  }\n}\n\nexport default ActionBarPrimary;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport getFirstSelectableWrappedItem from './getFirstSelectableWrappedItem';\nimport ActionBarContainer from './ActionBarContainerMixin';\n\nconst CLASSNAME = '_coral-ActionBar-secondary';\n\n/**\n @class Coral.ActionBar.Secondary\n @classdesc An ActionBar secondary component\n @htmltag coral-actionbar-secondary\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ActionBarSecondary extends ActionBarContainer(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  _returnElementsFromPopover() {\n    let item = null;\n    let wrappedItem = null;\n    \n    for (let i = 0; i < this._itemsInPopover.length; i++) {\n      item = this._itemsInPopover[i];\n  \n      // remove tabindex again\n      wrappedItem = getFirstSelectableWrappedItem(item);\n      if (wrappedItem && wrappedItem.hasAttribute('tabindex')) {\n        wrappedItem.setAttribute('tabindex', -1);\n      }\n      \n      this.insertBefore(item, this.firstChild.nextSibling);\n    }\n  }\n  \n  /** @ignore */\n  _attachMoreButtonToContainer() {\n    this.insertBefore(this._elements.moreButton, this.firstChild);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    this._attachMoreButtonToContainer();\n  }\n}\n\nexport default ActionBarSecondary;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {SelectableCollection} from '../../../coralui-collection';\nimport {transform, validate} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-BasicList';\n\n/**\n Enumeration for {@link ListMixin} interactions.\n \n @typedef {Object} ListInteractionEnum\n \n @property {String} ON\n Keyboard interaction is enabled.\n @property {String} OFF\n Keyboard interaction is disabled.\n */\nconst interaction = {\n  ON: 'on',\n  OFF: 'off'\n};\n\n/**\n @mixin ListMixin\n @classdesc The base element for List components\n */\nconst ListMixin = (superClass) => class extends superClass {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    this._events = {\n      'key:down [coral-list-item]': '_focusNextItem',\n      'key:right [coral-list-item]': '_focusNextItem',\n      'key:left [coral-list-item]': '_focusPreviousItem',\n      'key:up [coral-list-item]': '_focusPreviousItem',\n      'key:pageup [coral-list-item]': '_focusPreviousItem',\n      'key:pagedown [coral-list-item]': '_focusNextItem',\n      'key:home [coral-list-item]': '_focusFirstItem',\n      'key:end [coral-list-item]': '_focusLastItem'\n    };\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request:\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        itemTagName: this._itemTagName,\n        itemBaseTagName: this._itemBaseTagName,\n        itemSelector: '[coral-list-item]',\n        host: this\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /** @private */\n  get _itemTagName() {\n    // Used for Collection\n    return 'coral-list-item';\n  }\n  \n  /**\n   Whether interaction with the component is enabled. See {@link ListInteractionEnum}.\n   \n   @type {String}\n   @default ListInteractionEnum.ON\n   @htmlattribute interaction\n   @htmlattributereflected\n   */\n  get interaction() {\n    return this._interaction || interaction.ON;\n  }\n  set interaction(value) {\n    value = transform.string(value).toLowerCase();\n    this._interaction = validate.enumeration(interaction)(value) && value || interaction.ON;\n    this._reflectAttribute('interaction', this._interaction);\n  }\n  \n  /**\n   Returns true if the event is at the matched target.\n   \n   @private\n   */\n  _eventIsAtTarget(event) {\n    const target = event.target;\n    const listItem = event.matchedTarget;\n  \n    const isAtTarget = target === listItem;\n    \n    if (isAtTarget) {\n      // Don't let arrow keys etc scroll the page\n      event.preventDefault();\n      event.stopPropagation();\n    }\n    \n    return isAtTarget;\n  }\n  \n  /** @private */\n  _focusFirstItem(event) {\n    if (this.interaction === interaction.OFF || !this._eventIsAtTarget(event)) {\n      return;\n    }\n  \n    const items = this._getSelectableItems();\n    items[0].focus();\n  }\n  \n  /** @private */\n  _focusLastItem(event) {\n    if (this.interaction === interaction.OFF || !this._eventIsAtTarget(event)) {\n      return;\n    }\n  \n    const items = this._getSelectableItems();\n    items[items.length - 1].focus();\n  }\n  \n  /** @private */\n  _focusNextItem(event) {\n    if (this.interaction === interaction.OFF || !this._eventIsAtTarget(event)) {\n      return;\n    }\n  \n    const target = event.matchedTarget;\n    const items = this._getSelectableItems();\n    const index = items.indexOf(target);\n    \n    if (index === -1) {\n      // Invalid state\n      return;\n    }\n    \n    if (index < items.length - 1) {\n      items[index + 1].focus();\n    }\n    else {\n      items[0].focus();\n    }\n  }\n  \n  /** @private */\n  _focusPreviousItem(event) {\n    if (this.interaction === interaction.OFF || !this._eventIsAtTarget(event)) {\n      return;\n    }\n  \n    const target = event.matchedTarget;\n    const items = this._getSelectableItems();\n    const index = items.indexOf(target);\n    \n    if (index === -1) {\n      // Invalid state\n      return;\n    }\n    \n    if (index > 0) {\n      items[index - 1].focus();\n    }\n    else {\n      items[items.length - 1].focus();\n    }\n  }\n  \n  /** @private */\n  _getSelectableItems() {\n    // Also checks if item is visible\n    return this.items._getSelectableItems().filter(item => !item.hasAttribute('hidden') && item.offsetParent);\n  }\n  \n  /** @ignore */\n  focus() {\n    if (!this.contains(document.activeElement)) {\n      const items = this._getSelectableItems();\n      if (items.length > 0) {\n        items[0].focus();\n      }\n    }\n  }\n  \n  /**\n   Returns {@link ListMixin} interaction options.\n   \n   @return {ListInteractionEnum}\n   */\n  static get interaction() { return interaction; }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['interaction']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME, '_coral-SelectList');\n    \n    // Default reflected attributes\n    if (!this._interaction) { this.interaction = interaction.ON; }\n  }\n};\n\nexport default ListMixin;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"icon\"] = document.createElement(\"coral-icon\");\n  el0.setAttribute(\"size\", \"S\");\n  el0.className += \" _coral-BasicList-item-icon\";\n  el0.setAttribute(\"handle\", \"icon\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"outerContainer\"] = document.createElement(\"div\");\n  el2.className += \" _coral-BasicList-item-outerContainer\";\n  el2.setAttribute(\"handle\", \"outerContainer\");\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  var el4 = this[\"contentContainer\"] = document.createElement(\"div\");\n  el4.className += \" _coral-BasicList-item-contentContainer\";\n  el4.setAttribute(\"handle\", \"contentContainer\");\n  el2.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  el2.appendChild(el5);\n  frag.appendChild(el2);\n  var el6 = document.createTextNode(\"\\n\");\n  frag.appendChild(el6);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport '../../../coralui-component-icon';\nimport item from '../templates/item';\nimport {transform} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-BasicList-item';\n\n/**\n @mixin ListItemMixin\n @classdesc The base element for List Item components\n */\nconst ListItemMixin = (superClass) => class extends superClass {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Templates\n    this._elements = {\n      // Fetch or create the content zone element\n      content: this.querySelector('coral-list-item-content') || document.createElement('coral-list-item-content')\n    };\n    item.call(this._elements);\n  }\n  \n  /**\n   The content of the help item.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-list-item-content',\n      insert: function(content) {\n        this._elements.contentContainer.appendChild(content);\n      }\n    });\n  }\n\n  /**\n   Whether this item is disabled.\n   \n   @default false\n   @type {Boolean}\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n  \n    this.classList.toggle('is-disabled', this._disabled);\n    this.setAttribute('aria-disabled', this._disabled);\n  }\n  \n  /**\n   The icon to display. See {@link Icon}.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   */\n  get icon() {\n    return this._elements.icon.icon;\n  }\n  set icon(value) {\n    this._elements.icon.icon = value;\n  }\n  \n  get _contentZones() { return {'coral-list-item-content': 'content'}; }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['disabled', 'icon']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME, '_coral-SelectList-item');\n  \n    // The attribute that makes different types of list items co-exist\n    // This is also used for event delegation\n    this.setAttribute('coral-list-item', '');\n  \n    // Create a fragment\n    const fragment = document.createDocumentFragment();\n  \n    // Render the template\n    fragment.appendChild(this._elements.icon);\n    fragment.appendChild(this._elements.outerContainer);\n  \n    // Fetch or create the content content zone element\n    const content = this._elements.content;\n  \n    // Cleanup template elements (supporting cloneNode)\n    Array.prototype.filter.call(this.children, (child) => child.hasAttribute('handle')).forEach((handleItem) => {\n      this.removeChild(handleItem);\n    }, this);\n  \n    // Move any remaining elements into the content sub-component\n    while (this.firstChild) {\n      content.appendChild(this.firstChild);\n    }\n  \n    // Assign the content zones, moving them into place in the process\n    this.content = content;\n  \n    // Add the frag to the component\n    this.appendChild(fragment);\n  }\n};\n\nexport default ListItemMixin;\n","import ListMixin from './src/scripts/ListMixin';\nimport ListItemMixin from './src/scripts/ListItemMixin';\nimport {mixin} from '../coralui-util';\n\n// Expose mixin on Coral namespace\nmixin._list = ListMixin;\nmixin._list.item = ListItemMixin;\n\nexport {ListMixin, ListItemMixin};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {ListMixin} from '../../../coralui-mixin-list';\n\n/**\n @class Coral.List\n @classdesc A List component that supports multi-line text, icons, and text wrapping with ellipsis.\n @htmltag coral-list\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {ListMixin}\n */\nclass List extends ListMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents(this._events);\n  }\n}\n\nexport default List;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-SelectList-divider';\n\n/**\n @class Coral.List.Divider\n @classdesc The List divider\n @htmltag coral-list-divider\n @extends {HTMLElement}\n */\nclass ListDivider extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default ListDivider;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {ListItemMixin} from '../../../coralui-mixin-list';\n\n/**\n @class Coral.List.Item\n @classdesc A List item component\n @htmltag coral-list-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {ListItemMixin}\n */\nclass ListItem extends ListItemMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents(this._events);\n  }\n}\n\nexport default ListItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-BasicList-item-content';\n\n/**\n @class Coral.List.Item.Content\n @classdesc The List item content\n @htmltag coral-list-item-content\n @extends {HTMLElement}\n */\nclass ListItemContent extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default ListItemContent;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {ListMixin} from '../../../coralui-mixin-list';\n\nconst CLASSNAME = '_coral-AnchorList';\n\n/**\n @class Coral.AnchorList\n @classdesc An AnchorList component that supports multi-line text, icons, and text wrapping with ellipsis.\n @htmltag coral-anchorlist\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {ListMixin}\n */\nclass AnchorList extends ListMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Events\n    this._delegateEvents(this._events);\n  }\n  \n  /** @private */\n  get _itemTagName() {\n    // Used for Collection\n    return 'coral-anchorlist-item';\n  }\n  \n  /** @private */\n  get _itemBaseTagName() {\n    // Used for Collection\n    return 'a';\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default AnchorList;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {ListItemMixin} from '../../../coralui-mixin-list';\n\nconst CLASSNAME = '_coral-AnchorList-item';\n\n/**\n @class Coral.AnchorList.Item\n @classdesc An AnchorList item component\n @htmltag coral-anchorlist-item\n @extends {HTMLAnchorElement}\n @extends {ComponentMixin}\n @extends {ListItemMixin}\n */\nclass AnchorListItem extends ListItemMixin(ComponentMixin(HTMLAnchorElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents({\n      click: '_onClick'\n    });\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return super.disabled;\n  }\n  set disabled(value) {\n    super.disabled = value;\n    \n    if (this.disabled) {\n      // It's not tabbable anymore\n      this.setAttribute('tabindex', '-1');\n    }\n    else {\n      // Now it's tabbable\n      this.setAttribute('tabindex', '0');\n    }\n  }\n  \n  /** @private */\n  _onClick(event) {\n    // Support disabled property\n    if (this.disabled) {\n      event.preventDefault();\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default AnchorListItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {ListMixin} from '../../../coralui-mixin-list';\n\nconst CLASSNAME = '_coral-ButtonList';\n\n/**\n @class Coral.ButtonList\n @classdesc A ButtonList component that supports multi-line text, icons, and text wrapping with ellipsis.\n @htmltag coral-buttonlist\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {ListMixin}\n */\nclass ButtonList extends ListMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Events\n    this._delegateEvents(this._events);\n  }\n  \n  /** @private */\n  get _itemTagName() {\n    // Used for Collection\n    return 'coral-buttonlist-item';\n  }\n  \n  /** @private */\n  get _itemBaseTagName() {\n    // Used for Collection\n    return 'button';\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default ButtonList;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {ListItemMixin} from '../../../coralui-mixin-list';\n\nconst CLASSNAME = '_coral-ButtonList-item';\n\n/**\n @class Coral.ButtonList.Item\n @classdesc An ButtonList item component\n @htmltag coral-buttonlist-item\n @extends {HTMLButtonElement}\n @extends {ComponentMixin}\n @extends {ListItemMixin}\n */\nclass ButtonListItem extends ListItemMixin(ComponentMixin(HTMLButtonElement)) {\n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default ButtonListItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform, validate} from '../../../coralui-util';\n\n/**\n Enumeration for {@link Wait} variants.\n \n @typedef {Object} WaitVariantEnum\n \n @property {String} DEFAULT\n The default variant.\n @property {String} MONOCHROME\n A black and white styled wait.\n @property {String} DOTS\n Not supported. Falls back to DEFAULT.\n */\nconst variant = {\n  DEFAULT: 'default',\n  MONOCHROME: 'monochrome',\n  DOTS: 'dots'\n};\n\n/**\n Enumeration for {@link Wait} sizes.\n \n @typedef {Object} WaitSizeEnum\n \n @property {String} SMALL\n A small wait indicator.\n @property {String} MEDIUM\n A medium wait indicator. This is the default size.\n @property {String} LARGE\n A large wait indicator.\n */\nconst size = {\n  SMALL: 'S',\n  MEDIUM: 'M',\n  LARGE: 'L'\n};\n\n// the waits's base classname\nconst CLASSNAME = '_coral-Loader';\n\n/**\n @class Coral.Wait\n @classdesc A Wait component to be used to indicate a process that is in-progress for an indefinite amount of time.\n When the time is known, {@link Progress} should be used instead.\n @htmltag coral-wait\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Wait extends ComponentMixin(HTMLElement) {\n  /**\n   The size of the wait indicator. Currently 'S' (the default), 'M' and 'L' are available.\n   See {@link WaitSizeEnum}.\n   \n   @type {String}\n   @default WaitSizeEnum.MEDIUM\n   @htmlattribute size\n   @htmlattributereflected\n   */\n  get size() {\n    return this._size || size.MEDIUM;\n  }\n  set size(value) {\n    value = transform.string(value).toUpperCase();\n    this._size = validate.enumeration(size)(value) && value || size.MEDIUM;\n    this._reflectAttribute('size', this._size);\n\n    // large css change\n    this.classList.toggle(`${CLASSNAME}--large`, this._size === size.LARGE);\n\n    // small css change\n    this.classList.toggle(`${CLASSNAME}--small`, this._size === size.SMALL);\n  }\n  \n  /**\n   Whether the component is centered or not. The container needs to have the style <code>position: relative</code>\n   for the centering to work correctly.\n   @type {Boolean}\n   @default false\n   @htmlattribute centered\n   @htmlattributereflected\n   */\n  get centered() {\n    return this._centered || false;\n  }\n  set centered(value) {\n    this._centered = transform.booleanAttr(value);\n    this._reflectAttribute('centered', this._centered);\n  \n    this.classList.toggle(`${CLASSNAME}--centered`, this._centered);\n  }\n  \n  /**\n   The wait's variant. See {@link WaitVariantEnum}.\n   \n   @type {String}\n   @default WaitVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n  \n    this.classList.toggle(`${CLASSNAME}--fullpage`, this._variant === variant.MONOCHROME);\n  }\n  \n  /**\n   Whether to hide the current value and show an animation. Set to true for operations whose progress cannot be\n   determined.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute indeterminate\n   @htmlattributereflected\n   */\n  get indeterminate() {\n    return this._indeterminate || false;\n  }\n  set indeterminate(value) {\n    this._indeterminate = transform.booleanAttr(value);\n    this._reflectAttribute('indeterminate', this._indeterminate);\n    \n    if (this._indeterminate) {\n      this.classList.add(`${CLASSNAME}--indeterminate`);\n      \n      // ARIA: Remove attributes\n      this.removeAttribute('aria-valuenow');\n      this.removeAttribute('aria-valuemin');\n      this.removeAttribute('aria-valuemax');\n      \n      this.value = 0;\n    }\n    else {\n      this.classList.remove(`${CLASSNAME}--indeterminate`);\n      \n      // ARIA: Add attributes\n      this.setAttribute('aria-valuemin', '0');\n      this.setAttribute('aria-valuemax', '100');\n      \n      this.value = this._oldValue;\n    }\n  }\n  \n  /**\n   The current progress in percent. If no value is set on initialization, wait is forced into indeterminate state.\n   \n   @type {Number}\n   @default 0\n   @emits {coral-wait:change}\n   @htmlattribute value\n   @htmlattributereflected\n   */\n  get value() {\n    return this.hasAttribute('indeterminate') ? 0 : this._value || 0;\n  }\n  set value(value) {\n    value = transform.number(value) || 0;\n    \n    // Stay within bounds\n    if (value > 100) {\n      value = 100;\n    }\n    else if (value < 0) {\n      value = 0;\n    }\n    \n    this._value = value;\n    this._reflectAttribute('value', this._value);\n    \n    if (!this.hasAttribute('indeterminate')) {\n      this.style.backgroundPosition = `${this._value}% center`;\n  \n      // ARIA: Reflect value for screenreaders\n      this.setAttribute('aria-valuenow', this._value);\n      this.setAttribute('aria-valuemin', '0');\n      this.setAttribute('aria-valuemax', '100');\n    }\n    else {\n      this.style.backgroundPosition = '';\n    }\n    \n    this.trigger('coral-wait:change');\n  }\n  \n  /**\n   Returns {@link Wait} sizes.\n   \n   @return {WaitSizeEnum}\n   */\n  static get size() { return size; }\n  \n  /**\n   Returns {@link Wait} variants.\n   \n   @return {WaitVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['size', 'centered', 'variant', 'value', 'indeterminate'];\n  }\n  \n  /** @ignore */\n  attributeChangedCallback(name, oldValue, value) {\n    if (name === 'indeterminate' && transform.booleanAttr(value)) {\n      // Remember current value in case indeterminate is toggled back\n      this._oldValue = this._value || 0;\n    }\n    \n    super.attributeChangedCallback(name, oldValue, value);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // ARIA\n    this.setAttribute('role', 'progressbar');\n    \n    // Default reflected attributes\n    if (!this._size) { this.size = size.MEDIUM; }\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n    \n    // If no value is specified, indeterminate is set\n    if (!this._value) { this.indeterminate = true; }\n    \n    // Centering reads the size\n    if (this.centered) { this.centered = this.centered; }\n  }\n  \n  /**\n   Triggered when the {@link Wait} value is changed.\n   \n   @typedef {CustomEvent} coral-wait:change\n   */\n}\n\nexport default Wait;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Wait from './src/scripts/Wait';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-wait', Wait);\n\nexport {Wait};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"loadIndicator\"] = document.createElement(\"div\");\n  el0.setAttribute(\"handle\", \"loadIndicator\");\n  el0.className += \" _coral-SelectList-loading\";\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = document.createElement(\"coral-wait\");\n  el2.setAttribute(\"centered\", \"\");\n  el0.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  el0.appendChild(el3);\n  frag.appendChild(el0);\n  var el4 = document.createTextNode(\"\\n\");\n  frag.appendChild(el4);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport '../../../coralui-component-wait';\nimport loadIndicator from '../templates/loadIndicator';\nimport {transform} from '../../../coralui-util';\n\nconst KEYPRESS_TIMEOUT_DURATION = 1000;\n\n/**\n The distance, in pixels, from the bottom of the SelectList at which we trigger a scrollbottom event. For example, a\n value of 50 would indicate a scrollbottom event should be triggered when the user scrolls to within 50 pixels of the\n bottom.\n \n @type {Number}\n @ignore\n */\nconst SCROLL_BOTTOM_THRESHOLD = 50;\n\n/**\n The number of milliseconds for which scroll events should be debounced.\n \n @type {Number}\n @ignore\n */\nconst SCROLL_DEBOUNCE = 100;\n\n/** @ignore */\nconst ITEM_TAG_NAME = 'coral-selectlist-item';\n\n/** @ignore */\nconst GROUP_TAG_NAME = 'coral-selectlist-group';\n\nconst CLASSNAME = '_coral-SelectList';\n\n/**\n @class Coral.SelectList\n @classdesc A SelectList component is a selectable list of items.\n @htmltag coral-selectlist\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass SelectList extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Attach events\n    this._delegateEvents({\n      'scroll': '_onScroll',\n      'capture:focus': '_onFocus',\n      'capture:blur': '_onBlur',\n  \n      'click coral-selectlist-item': '_onItemClick',\n  \n      'key:space coral-selectlist-item': '_onToggleItemKey',\n      'key:return coral-selectlist-item': '_onToggleItemKey',\n      'key:pageup coral-selectlist-item': '_focusPreviousItem',\n      'key:left coral-selectlist-item': '_focusPreviousItem',\n      'key:up coral-selectlist-item': '_focusPreviousItem',\n      'key:pagedown coral-selectlist-item': '_focusNextItem',\n      'key:right coral-selectlist-item': '_focusNextItem',\n      'key:down coral-selectlist-item': '_focusNextItem',\n      'key:home coral-selectlist-item': '_onHomeKey',\n      'key:end coral-selectlist-item': '_onEndKey',\n      'keypress coral-selectlist-item': '_onKeyPress',\n      \n      // private\n      'coral-selectlist-item:_selectedchanged': '_onItemSelectedChanged'\n    });\n    \n    this._keypressTimeoutDuration = KEYPRESS_TIMEOUT_DURATION;\n    \n    // Templates\n    this._elements = {};\n    loadIndicator.call(this._elements);\n    \n    // Used for eventing\n    this._oldSelection = [];\n  \n    // Used for interaction\n    this._keypressTimeoutID = null;\n    this._keypressSearchString = '';\n  \n    // we correctly bind the scroll event\n    this._onDebouncedScroll = this._onDebouncedScroll.bind(this);\n    \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the {@link SelectListGroup} elements that the\n   SelectList contains. This includes items nested inside groups. To manage items contained within a specific\n   group, see {@link SelectListGroup#items}.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get groups() {\n    // just init on demand\n    if (!this._groups) {\n      this._groups = new SelectableCollection({\n        host: this,\n        itemTagName: GROUP_TAG_NAME,\n        onItemAdded: this._validateSelection,\n        onItemRemoved: this._validateSelection\n      });\n    }\n    return this._groups;\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // just init on demand\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: ITEM_TAG_NAME,\n        onItemAdded: this._validateSelection,\n        onItemRemoved: this._validateSelection\n      });\n    }\n    return this._items;\n  }\n  \n  /**\n   The selected item in the SelectList.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getAllSelected()[0] || null;\n  }\n  \n  /**\n   The selected items of the SelectList.\n   \n   @type {Array.<HTMLElement>}\n   @readonly\n   */\n  get selectedItems() {\n    return this.items._getAllSelected();\n  }\n  \n  /**\n   Indicates whether the SelectList accepts multiple selected items.\n   @type {Boolean}\n   @default false\n   @htmlattribute multiple\n   @htmlattributereflected\n   */\n  get multiple() {\n    return this._multiple || false;\n  }\n  set multiple(value) {\n    this._multiple = transform.booleanAttr(value);\n    this._reflectAttribute('multiple', this._multiple);\n    \n    this.setAttribute('aria-multiselectable', this._multiple);\n    \n    this._validateSelection();\n  }\n  \n  /**\n   Whether items are being loaded for the SelectList. Toggling this merely shows or hides a loading indicator.\n   \n   @default false\n   @type {Boolean}\n   @htmlattribute loading\n   @htmlattributereflected\n   */\n  get loading() {\n    return this._loading || false;\n  }\n  set loading(value) {\n    this._loading = transform.booleanAttr(value);\n    this._reflectAttribute('loading', this._loading);\n  \n    const load = this._elements.loadIndicator;\n  \n    if (this.loading) {\n      // we decide first if we need to scroll to the bottom since adding the load will change the dimentions\n      const scrollToBottom = this.scrollTop >= this.scrollHeight - this.clientHeight;\n    \n      // inserts the item at the end\n      this.appendChild(load);\n    \n      // we make the load indicator visible\n      if (scrollToBottom) {\n        /** @ignore */\n        this.scrollTop = this.scrollHeight;\n      }\n    }\n    else {\n      load.remove();\n    }\n  }\n  \n  /** @private **/\n  get _tabTarget() {\n    return this.__tabTarget || null;\n  }\n  set _tabTarget(value) {\n    this.__tabTarget = value;\n    \n    // Set all but the current set _tabTarget to not be a tab target:\n    this.items.getAll().forEach((item) => {\n      item.setAttribute('tabindex', item === value ? 0 : -1);\n    });\n  }\n  \n  /** @private */\n  _toggleItemSelection(item) {\n    if (item) {\n      const beforeChangeEvent = this.trigger('coral-selectlist:beforechange', {item});\n  \n      if (!beforeChangeEvent.defaultPrevented) {\n        item[item.hasAttribute('selected') ? 'removeAttribute' : 'setAttribute']('selected', '');\n      }\n    }\n  }\n  \n  /** @private */\n  _onFocus() {\n    this.classList.add('is-focused');\n  }\n  \n  /** @private */\n  _onBlur() {\n    // required otherwise the latest item that had the focus would get it again instead of the selected item\n    this._resetTabTarget();\n    this.classList.remove('is-focused');\n  }\n  \n  /** @private */\n  _onItemClick(event) {\n    event.preventDefault();\n    event.stopPropagation();\n  \n    const item = event.matchedTarget;\n    this._toggleItemSelection(item);\n    this._focusItem(item);\n  }\n  \n  /** @private */\n  _focusItem(item) {\n    if (item) {\n      item.focus();\n    }\n    \n    this._tabTarget = item;\n  }\n  \n  /** @private */\n  _onToggleItemKey(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    \n    const item = event.target;\n    \n    this._toggleItemSelection(item);\n    this._focusItem(item);\n  }\n  \n  /** @private */\n  _focusPreviousItem(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    \n    this._focusItem(this.items._getPreviousSelectable(event.target));\n  }\n  \n  /** @private */\n  _focusNextItem(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    \n    this._focusItem(this.items._getNextSelectable(event.target));\n  }\n  \n  /** @private */\n  _onHomeKey(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    \n    this._focusItem(this.items._getFirstSelectable());\n  }\n  \n  /** @private */\n  _onEndKey(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    \n    this._focusItem(this.items._getLastSelectable());\n  }\n  \n  /**\n   Handles keypress event for alphanumeric search.\n   \n   @param {KeyboardEvent} event\n   The keyboard event.\n   @private\n   */\n  _onKeyPress(event) {\n    const self = this;\n    // The string entered when the key was pressed\n    const newString = String.fromCharCode(event.which);\n    \n    // Clear the timeout before the _keypressSearchString is cleared\n    window.clearTimeout(this._keypressTimeoutID);\n    \n    // If the character entered does not match the last character entered, append it to the _keypressSearchString\n    if (newString !== this._keypressSearchString) {\n      this._keypressSearchString += newString;\n    }\n    \n    // Set a timeout so that _keypressSearchString is cleared after 1 second\n    this._keypressTimeoutID = window.setTimeout(() => {\n      self._keypressSearchString = '';\n    }, this._keypressTimeoutDuration);\n    \n    // Search within selectable items\n    const selectableItems = this.items._getSelectableItems();\n    \n    // Remember the index of the focused item within the array of selectable items\n    const currentIndex = selectableItems.indexOf(this._tabTarget);\n    \n    this._keypressSearchString = this._keypressSearchString.trim().toLowerCase();\n    \n    let start;\n    // If the currentIndex is -1, meaning no item has focus, start from the beginning\n    if (currentIndex === -1) {\n      start = 0;\n    }\n    else if (this._keypressSearchString.length === 1) {\n      // Otherwise, if there is only one character to compare, start comparing from the next item after the currently\n      // focused item. This allows us to iterate through items beginning with the same character\n      start = currentIndex + 1;\n    }\n    else {\n      start = currentIndex;\n    }\n    \n    let newFocusItem;\n    let comparison;\n    let item;\n    \n    // Compare _keypressSearchString against item text until a match is found\n    for (let i = start; i < selectableItems.length; i++) {\n      item = selectableItems[i];\n      comparison = item.textContent.trim().toLowerCase();\n      if (comparison.indexOf(this._keypressSearchString) === 0) {\n        newFocusItem = item;\n        break;\n      }\n    }\n    \n    // If no match is found, continue searching for a match starting from the top\n    if (!newFocusItem) {\n      for (let j = 0; j < start; j++) {\n        item = selectableItems[j];\n        comparison = item.textContent.trim().toLowerCase();\n        if (comparison.indexOf(this._keypressSearchString) === 0) {\n          newFocusItem = item;\n          break;\n        }\n      }\n    }\n    \n    // If a match has been found, focus the matched item\n    if (newFocusItem !== undefined) {\n      this._focusItem(newFocusItem);\n    }\n  }\n\n  /**\n   Determine what item should get focus (if any) when the user tries to tab into the SelectList. This should be the\n   first selected item, or the first selectable item otherwise. When neither is available, it cannot be tabbed into\n   the SelectList.\n   \n   @private\n   */\n  _resetTabTarget() {\n    const selectedItems = this.items._getAllSelected().filter(item => !item.hasAttribute('hidden'));\n    this._tabTarget = selectedItems.length ? selectedItems[0] : this.items._getSelectableItems().filter(item => !item.hasAttribute('hidden'))[0];\n  }\n  \n  /** @private */\n  _onScroll() {\n    window.clearTimeout(this._scrollTimeout);\n    this._scrollTimeout = window.setTimeout(this._onDebouncedScroll, SCROLL_DEBOUNCE);\n  }\n  \n  /**\n   @emits {coral-selectlist:scrollbottom}\n   \n   @private\n   */\n  _onDebouncedScroll() {\n    if (this.scrollTop >= this.scrollHeight - this.clientHeight - SCROLL_BOTTOM_THRESHOLD) {\n      this.trigger('coral-selectlist:scrollbottom');\n    }\n  }\n  \n  /** @private */\n  _onItemSelectedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    this._validateSelection(event.target);\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    const selectedItems = this.selectedItems;\n    \n    if (!this.multiple) {\n      // Last selected item wins if multiple selection while not allowed\n      item = item || selectedItems[selectedItems.length - 1];\n      \n      if (item && item.hasAttribute('selected') && selectedItems.length > 1) {\n        selectedItems.forEach((selectedItem) => {\n          if (selectedItem !== item) {\n            // Don't trigger change events\n            this._preventTriggeringEvents = true;\n            selectedItem.removeAttribute('selected');\n          }\n        }, this);\n        \n        // We can trigger change events again\n        this._preventTriggeringEvents = false;\n      }\n    }\n    \n    this._resetTabTarget();\n    \n    this._triggerChangeEvent();\n  }\n  \n  /** @private */\n  _triggerChangeEvent() {\n    const selectedItems = this.selectedItems;\n    const oldSelection = this._oldSelection;\n    \n    if (!this._preventTriggeringEvents && this._arraysAreDifferent(selectedItems, oldSelection)) {\n      // We differentiate whether multiple is on or off and return an array or HTMLElement respectively\n      if (this.multiple) {\n        this.trigger('coral-selectlist:change', {\n          oldSelection: oldSelection,\n          selection: selectedItems\n        });\n      }\n      else {\n        // Return all items if we just switched from multiple=true to multiple=false and we had >1 selected items\n        this.trigger('coral-selectlist:change', {\n          oldSelection: oldSelection.length > 1 ? oldSelection : oldSelection[0] || null,\n          selection: selectedItems[0] || null\n        });\n      }\n      \n      this._oldSelection = selectedItems;\n    }\n  }\n  \n  /** @private */\n  _arraysAreDifferent(selection, oldSelection) {\n    let diff = [];\n    \n    if (oldSelection.length === selection.length) {\n      diff = oldSelection.filter((item) => selection.indexOf(item) === -1);\n    }\n    \n    // since we guarantee that they are arrays, we can start by comparing their size\n    return oldSelection.length !== selection.length || diff.length !== 0;\n  }\n  \n  /** @ignore */\n  focus() {\n    // Avoids moving the focus once it is already inside the component\n    if (!this.contains(document.activeElement)) {\n      this._resetTabTarget();\n      this._focusItem(this._tabTarget);\n    }\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['loading', 'multiple'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME, '_coral-BasicList');\n    \n    // adds the role to support accessibility\n    this.setAttribute('role', 'listbox');\n    \n    // Don't trigger events once connected\n    this._preventTriggeringEvents = true;\n    this._validateSelection();\n    this._preventTriggeringEvents = false;\n    \n    this._oldSelection = this.selectedItems;\n  }\n  \n  /**\n   Triggered when the user scrolls to near the bottom of the {@link SelectList}. This can be useful for when additional items can\n   be loaded asynchronously (i.e., infinite scrolling).\n   \n   @typedef {CustomEvent} coral-selectlist:scrollbottom\n   */\n  \n  /**\n   Triggered before the {@link SelectList} selected item is changed on user interaction. Can be used to cancel selection.\n   \n   @typedef {CustomEvent} coral-selectlist:change\n   \n   @property {SelectListItem} event.detail.item\n   The selected item.\n   */\n  \n  /**\n   Triggered when the {@link SelectList} selected item has changed.\n   \n   @typedef {CustomEvent} coral-selectlist:change\n   \n   @property {SelectListItem} detail.oldSelection\n   The prior selected item(s).\n   @property {SelectListItem} detail.selection\n   The newly selected item(s).\n   */\n}\n\nexport default SelectList;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport {transform} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-SelectList-group';\n\n/**\n @class Coral.SelectList.Group\n @classdesc A SelectList group component\n @htmltag coral-selectlist-group\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass SelectListGroup extends ComponentMixin(HTMLElement) {\n  /**\n   The label of the group. It reflects the <code>label</code> attribute to the DOM.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute label\n   @htmlattributereflected\n   */\n  get label() {\n    return this._label || '';\n  }\n  set label(value) {\n    this._label = transform.string(value);\n    this._reflectAttribute('label', this._label);\n  \n    this.setAttribute('aria-label', this._label);\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // just init on demand\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-selectlist-item'\n      });\n    }\n    return this._items;\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['label'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    this.setAttribute('role', 'group');\n  }\n}\n\nexport default SelectListGroup;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  var el0 = this[\"icon\"] = document.createElement(\"span\");\n  el0.className += \" _coral-SelectList-icon\";\n  el0.setAttribute(\"handle\", \"icon\");\n  el0.setAttribute(\"hidden\", \"\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  data = data_0;\n  \n    this.icon.innerHTML = data.Icon._renderSVG('spectrum-css-icon-MenuCheckmark', ['_coral-SelectList-checkmark']);\n  \n  data_0 = data;\n  var el3 = document.createTextNode(\"\\n\");\n  el0.appendChild(el3);\n  frag.appendChild(el0);\n  var el4 = document.createTextNode(\"\\n\");\n  frag.appendChild(el4);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform} from '../../../coralui-util';\nimport {Icon} from '../../../coralui-component-icon';\nimport checkIcon from '../templates/checkIcon';\n\nconst CLASSNAME = '_coral-SelectList-item';\n\n/**\n @class Coral.SelectList.Item\n @classdesc A SelectList item component\n @htmltag coral-selectlist-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass SelectListItem extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Templates\n    this._elements = {\n      // Fetch or create the content zone element\n      content: this.querySelector('coral-selectlist-item-content') || document.createElement('coral-selectlist-item-content')\n    };\n    checkIcon.call(this._elements, {Icon});\n  }\n  /**\n   Value of the item. If not explicitly set, the value of <code>Node.textContent</code> is returned.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   @htmlattributereflected\n   */\n  get value() {\n    return typeof this._value === 'string' ? this._value : this.textContent.replace(/\\s{2,}/g, ' ').trim();\n  }\n  set value(value) {\n    this._value = transform.string(value);\n    this._reflectAttribute('value', this._value);\n  }\n  \n  /**\n   The content element for the item.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-selectlist-item-content',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   Whether the item is selected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this.disabled ? false : this._selected);\n    \n    this.classList.toggle('is-selected', this._selected);\n    this.setAttribute('aria-selected', this._selected);\n    \n    // Toggle check icon\n    this._elements.icon.hidden = !this._selected;\n    \n    this.trigger('coral-selectlist-item:_selectedchanged');\n  }\n  \n  /**\n   Whether this item is disabled.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.classList.toggle('is-disabled', this._disabled);\n    this.setAttribute('aria-disabled', this._disabled);\n    \n    this.selected = this.selected;\n  }\n  \n  get _contentZones() { return {'coral-selectlist-item-content': 'content'}; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['selected', 'disabled'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME, '_coral-BasicList-item');\n    \n    this.setAttribute('role', 'option');\n  \n    // Support cloneNode\n    const template = this.querySelector('._coral-SelectList-icon');\n    if (template) {\n      template.remove();\n    }\n    \n    // Fetch or create the content content zone element\n    const content = this._elements.content;\n  \n    // Move any remaining elements into the content sub-component\n    if (!content.parentNode) {\n      while (this.firstChild) {\n        content.appendChild(this.firstChild);\n      }\n    }\n  \n    // Add template\n    this.appendChild(this._elements.icon);\n  \n    // Assign the content zones, moving them into place in the process\n    this.content = content;\n  }\n}\n\nexport default SelectListItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.SelectList.Item.Content\n @classdesc The SelectList Item content\n @htmltag coral-selectlist-item-content\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-selectlist-item-content');\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport List from './src/scripts/List';\nimport ListDivider from './src/scripts/ListDivider';\nimport ListItem from './src/scripts/ListItem';\nimport ListItemContent from './src/scripts/ListItemContent';\nimport AnchorList from './src/scripts/AnchorList';\nimport AnchorListItem from './src/scripts/AnchorListItem';\nimport ButtonList from './src/scripts/ButtonList';\nimport ButtonListItem from './src/scripts/ButtonListItem';\nimport SelectList from './src/scripts/SelectList';\nimport SelectListGroup from './src/scripts/SelectListGroup';\nimport SelectListItem from './src/scripts/SelectListItem';\nimport SelectListItemContent from './src/scripts/SelectListItemContent';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-list', List);\nwindow.customElements.define('coral-list-divider', ListDivider);\nwindow.customElements.define('coral-list-item', ListItem);\nwindow.customElements.define('coral-list-item-content', ListItemContent);\nwindow.customElements.define('coral-anchorlist', AnchorList);\nwindow.customElements.define('coral-anchorlist-item', AnchorListItem, {extends: 'a'});\nwindow.customElements.define('coral-buttonlist', ButtonList);\nwindow.customElements.define('coral-buttonlist-item', ButtonListItem, {extends: 'button'});\nwindow.customElements.define('coral-selectlist', SelectList);\nwindow.customElements.define('coral-selectlist-item', SelectListItem);\nwindow.customElements.define('coral-selectlist-group', SelectListGroup);\n\nList.Divider = ListDivider;\nList.Item = ListItem;\nList.Item.Content = ListItemContent;\nAnchorList.Item = AnchorListItem;\nButtonList.Item = ButtonListItem;\nSelectList.Group = SelectListGroup;\nSelectList.Item = SelectListItem;\nSelectList.Item.Content = SelectListItemContent;\n\nexport {List, AnchorList, ButtonList, SelectList};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport ActionBarContainerMixin from './ActionBarContainerMixin';\nimport '../../../coralui-component-list';\n\nconst CLASSNAME = '_coral-ActionBar-container';\n\n/**\n Enumeration for {@link ActionBarContainer} positions.\n \n @typedef {Object} ActionBarContainerPositionEnum\n \n @property {String} PRIMARY\n Primary (left) ActionBar container.\n @property {String} SECONDARY\n Secondary (right) ActionBar container.\n @property {String} INVALID\n Invalid ActionBar container.\n */\nconst position = {\n  PRIMARY: 'primary',\n  SECONDARY: 'secondary',\n  INVALID: 'invalid'\n};\n\n/**\n @class Coral.ActionBar.Container\n @classdesc An ActionBar container component\n @htmltag coral-actionbar-container\n @extends {HTMLElement}\n @extends {ComponentMixin}\n \n @deprecated\n */\nclass ActionBarContainer extends ActionBarContainerMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    console.warn('@deprecated: coral-actionbar-container is deprecated, use coral-actionbar-primary and ' +\n      'coral-actionbar-secondary instead');\n  }\n  \n  /**\n   The container position inside the actionbar.\n   \n   @private\n   @type {String}\n   @readonly\n   @default ActionBarContainerPositionEnum.INVALID\n   */\n  get _position() {\n    if (this.parentNode) {\n      const containers = this.parentNode.getElementsByTagName('coral-actionbar-container');\n    \n      if (containers.length > 0 && containers[0] === this) {\n        return position.PRIMARY;\n      }\n      else if (containers.length > 1 && containers[1] === this) {\n        return position.SECONDARY;\n      }\n    }\n  \n    return position.INVALID;\n  }\n  \n  /** @ignore */\n  _attachMoreButtonToContainer() {\n    if (this.parentNode && this.parentNode.secondary === this) {\n      this.insertBefore(this._elements.moreButton, this.firstChild);\n    }\n    else {\n      // add the button to the left/primary contentzone\n      this.appendChild(this._elements.moreButton);\n    }\n  }\n  \n  /**\n   Returns {@link ActionBarContainer} positions.\n   \n   @return {ActionBarContainerPositionEnum}\n   */\n  static get position() { return position; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Cleanup resize helpers object (cloneNode support)\n    const resizeHelpers = this.getElementsByTagName('object');\n    for (let i = 0; i < resizeHelpers.length; ++i) {\n      const resizeElement = resizeHelpers[i];\n      if (resizeElement.parentNode === this) {\n        this.removeChild(resizeElement);\n      }\n    }\n  \n    // Cleanup 'More' button\n    this._elements.moreButton = this.querySelector('[coral-actionbar-more]');\n    if (this._elements.moreButton) {\n      this.removeChild(this._elements.moreButton);\n    }\n  \n    // Cleanup 'More' popover\n    this._elements.overlay = this.querySelector('[coral-actionbar-popover]');\n    if (this._elements.overlay) {\n      this.removeChild(this._elements.overlay);\n    }\n  \n    // Init 'More' button\n    this._elements.moreButton.label.textContent = this.moreButtonText;\n    // 'More' button might be moved later in dom when Container is attached to parent\n    this.appendChild(this._elements.moreButton);\n  \n    // Init 'More' popover\n    this._elements.overlay.target = this._elements.moreButton;\n  \n    // Insert popover always as firstChild to ensure element order (cloneNode support)\n    this.insertBefore(this._elements.overlay, this.firstChild);\n  \n    this._attachMoreButtonToContainer();\n  }\n}\n\nexport default ActionBarContainer;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport translations from './i18n/translations.json';\nimport {strings, commons} from '../coralui-util';\nimport ActionBar from './src/scripts/ActionBar';\nimport ActionBarItem from './src/scripts/ActionBarItem';\nimport ActionBarPrimary from './src/scripts/ActionBarPrimary';\nimport ActionBarSecondary from './src/scripts/ActionBarSecondary';\nimport ActionBarContainer from './src/scripts/ActionBarContainer';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-actionbar': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-actionbar', ActionBar);\nwindow.customElements.define('coral-actionbar-item', ActionBarItem);\nwindow.customElements.define('coral-actionbar-primary', ActionBarPrimary);\nwindow.customElements.define('coral-actionbar-secondary', ActionBarSecondary);\nwindow.customElements.define('coral-actionbar-container', ActionBarContainer);\n\nActionBar.Item = ActionBarItem;\nActionBar.Primary = ActionBarPrimary;\nActionBar.Secondary = ActionBarSecondary;\nActionBar.Container = ActionBarContainer;\n\nexport {ActionBar};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {Icon} from '../../../coralui-component-icon';\nimport {transform, validate} from '../../../coralui-util';\n\n/**\n Enumeration for {@link Alert} variants.\n \n @typedef {Object} AlertVariantEnum\n \n @property {String} ERROR\n An alert with a warning icon to indicate that an error has occurred.\n @property {String} WARNING\n An alert with a warning icon to warn the user of something important.\n @property {String} SUCCESS\n An alert with a question mark icon to notify the user of a successful operation.\n @property {String} HELP\n A neutral alert with a question icon to help the user with non-critical information.\n @property {String} INFO\n An alert with an info icon to inform the user of non-critical information.\n */\nconst variant = {\n  ERROR: 'error',\n  WARNING: 'warning',\n  SUCCESS: 'success',\n  HELP: 'help',\n  INFO: 'info'\n};\n\n/**\n Enumeration for {@link Alert} sizes.\n \n @typedef {Object} AlertSizeEnum\n \n @property {String} SMALL\n A small alert, usually employed for single line alerts without headers.\n @property {String} LARGE\n Not supported. Falls back to SMALL.\n */\nconst size = {\n  SMALL: 'S',\n  LARGE: 'L'\n};\n\nconst CLASSNAME = '_coral-Alert';\n\n// An array of all possible variant classnames\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantValue in variant) {\n  ALL_VARIANT_CLASSES.push(`${CLASSNAME}--${variant[variantValue]}`);\n}\n\n// Used to map icon with variant\nconst capitalize = s => s.charAt(0).toUpperCase() + s.slice(1);\n\n/**\n @class Coral.Alert\n @classdesc An Alert component used as static indicators of an operation's result, or as messages to highlight\n information to the user. It does not include a close button by default, but you can add it manually by adding the\n <code>coral-close</code> attribute on an element contained by the Alert.\n @htmltag coral-alert\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Alert extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      // Fetch or create the content zone elements\n      header: this.querySelector('coral-alert-header') || document.createElement('coral-alert-header'),\n      content: this.querySelector('coral-alert-content') || document.createElement('coral-alert-content'),\n      footer: this.querySelector('coral-alert-footer') || document.createElement('coral-alert-footer')\n    };\n    \n    // Events\n    this._delegateEvents({\n      'click [coral-close]': '_onCloseClick'\n    });\n  }\n  \n  /**\n   The alert variant style to use. See {@link AlertVariantEnum}.\n   \n   @type {String}\n   @default AlertVariantEnum.INFO\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.INFO;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.INFO;\n    this._reflectAttribute('variant', this._variant);\n    \n    this._insertTemplate();\n    \n    // Remove all variant classes\n    this.classList.remove(...ALL_VARIANT_CLASSES);\n\n    // Set new variant class\n    // Don't use this._className; use the constant\n    // This lets popover get our styles for free\n    this.classList.add(`${CLASSNAME}--${this._variant}`);\n    \n    // Set the role attribute to alert or status depending on\n    // the variant so that the element turns into a live region\n    this.setAttribute('role', this._variant);\n  }\n  \n  /**\n   The size of the alert. It accepts both lower and upper case sizes. See {@link AlertVariantEnum}.\n   \n   @type {String}\n   @default AlertSizeEnum.SMALL\n   @htmlattribute size\n   @htmlattributereflected\n   */\n  get size() {\n    return this._size || size.SMALL;\n  }\n  set size(value) {\n    value = transform.string(value).toUpperCase();\n    this._size = validate.enumeration(size)(value) && value || size.SMALL;\n    this._reflectAttribute('size', this._size);\n  }\n  \n  /**\n   The alert header element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get header() {\n    return this._getContentZone(this._elements.header);\n  }\n  set header(value) {\n    this._setContentZone('header', value, {\n      handle: 'header',\n      tagName: 'coral-alert-header',\n      insert: function(header) {\n        this.insertBefore(header, this.firstChild);\n      }\n    });\n  }\n  \n  /**\n   The alert content element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-alert-content',\n      insert: function(content) {\n        // After the header\n        this.insertBefore(content, this.header.nextElementSibling);\n      }\n    });\n  }\n  \n  /**\n   The alert footer element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get footer() {\n    return this._getContentZone(this._elements.footer);\n  }\n  set footer(value) {\n    this._setContentZone('footer', value, {\n      handle: 'footer',\n      tagName: 'coral-alert-footer',\n      insert: function(footer) {\n        // After the content\n        this.insertBefore(footer, this.content.nextElementSibling);\n      }\n    });\n  }\n  \n  /**\n   @ignore\n   @todo maybe this should be mixin or something\n   */\n  _onCloseClick(event) {\n    const dismissTarget = event.matchedTarget;\n    const dismissValue = dismissTarget.getAttribute('coral-close');\n    if (!dismissValue || this.matches(dismissValue)) {\n      this.hidden = true;\n      event.stopPropagation();\n    }\n  }\n  \n  _insertTemplate() {\n    if (this._elements.icon) {\n      this._elements.icon.remove();\n    }\n  \n    let variantValue = this.variant;\n    \n    // Warning icon is same as ERROR icon\n    if (variantValue === variant.WARNING) {\n      variantValue = variant.ERROR;\n    }\n    \n    // Inject the SVG icon\n    this.insertAdjacentHTML('afterbegin', Icon._renderSVG(`spectrum-css-icon-Alert${capitalize(variantValue)}`, ['_coral-Alert-icon']));\n    this._elements.icon = this.querySelector('._coral-Alert-icon');\n  }\n  \n  get _contentZones() {\n    return {\n      'coral-alert-header': 'header',\n      'coral-alert-content': 'content',\n      'coral-alert-footer': 'footer'\n    };\n  }\n  \n  /**\n   Returns {@link Alert} variants.\n   \n   @return {AlertVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /**\n   Returns {@link Alert} sizes.\n   \n   @return {AlertSizeEnum}\n   */\n  static get size() { return size; }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['variant', 'size']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.INFO; }\n    if (!this._size) { this.size = size.SMALL; }\n    \n    for (const contentZone in this._contentZones) {\n      const element = this._elements[this._contentZones[contentZone]];\n      // Remove it so we can process children\n      if (element.parentNode) {\n        element.parentNode.removeChild(element);\n      }\n    }\n    \n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && !child.classList.contains('_coral-Alert-icon')) {\n        // Add non-template elements to the content\n        this._elements.content.appendChild(child);\n      }\n      else {\n        // Remove anything else element\n        this.removeChild(child);\n      }\n    }\n    \n    this._insertTemplate();\n  \n    // Assign the content zones so the insert functions will be called\n    for (const contentZone in this._contentZones) {\n      const contentZoneName = this._contentZones[contentZone];\n      \n      /** @ignore */\n      this[contentZoneName] = this._elements[contentZoneName];\n    }\n  }\n}\n\nexport default Alert;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Alert-header';\n\n/**\n @class Coral.Alert.Header\n @classdesc The Alert header content\n @htmltag coral-alert-header\n @extends {HTMLElement}\n */\nclass AlertHeader extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default AlertHeader;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Alert-content';\n\n/**\n @class Coral.Alert.Content\n @classdesc The Alert default content\n @htmltag coral-alert-content\n @extends {HTMLElement}\n */\nclass AlertContent extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default AlertContent;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Alert-footer';\n\n/**\n @class Coral.Alert.Footer\n @classdesc The Alert footer content\n @htmltag coral-alert-footer\n @extends {HTMLElement}\n */\nclass AlertFooter extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default AlertFooter;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Alert from './src/scripts/Alert';\nimport AlertHeader from './src/scripts/AlertHeader';\nimport AlertContent from './src/scripts/AlertContent';\nimport AlertFooter from './src/scripts/AlertFooter';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-alert', Alert);\nwindow.customElements.define('coral-alert-header', AlertHeader);\nwindow.customElements.define('coral-alert-content', AlertContent);\nwindow.customElements.define('coral-alert-footer', AlertFooter);\n\nAlert.Header = AlertHeader;\nAlert.Content = AlertContent;\nAlert.Footer = AlertFooter;\n\nexport {Alert};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {transform, commons} from '../../../coralui-util';\n\n// https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories\nlet LABELLABLE_ELEMENTS_SELECTOR = 'button,input:not([type=hidden]),keygen,meter,output,progress,select,textarea';\n// @polyfill ie11\n// IE11 throws syntax error because of the \"not()\" in the selector for some reason in ColorInputColorProperties\nif (navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0) {\n  LABELLABLE_ELEMENTS_SELECTOR = 'button,keygen,meter,output,progress,select,textarea,';\n  \n  // Since we can't use :not() we have to indicate all input types\n  [\n    'text',\n    'password',\n    'submit',\n    'reset',\n    'radio',\n    'checkbox',\n    'button',\n    'color',\n    'date',\n    'datetime-local',\n    'email',\n    'month',\n    'number',\n    'range',\n    'search',\n    'tel',\n    'time',\n    'url',\n    'week'\n  ].forEach((type) => {\n    LABELLABLE_ELEMENTS_SELECTOR += `input[type=${type}],`;\n  });\n  \n  // Remove last \",\"\n  LABELLABLE_ELEMENTS_SELECTOR = LABELLABLE_ELEMENTS_SELECTOR.slice(0, -1);\n}\n// _onInputChange is only triggered on non-hidden inputs\nconst TARGET_INPUT_SELECTOR = 'input:not([type=hidden])';\n\n/**\n @mixin FormFieldMixin\n @classdesc The base element for Form Field components. If not extending a {@link HTMLInputElement}, following\n properties should be implemented at least :\n - <code>disabled</code>. Whether this field is disabled or not.\n - <code>invalid</code>. Whether the current value of this field is invalid or not.\n - <code>name</code>. Name used to submit the data in a form.\n - <code>readOnly</code>. Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n - <code>required</code>. Whether this field is required or not.\n - <code>value</code>. This field's current value.\n */\nconst FormFieldMixin = (superClass) => class extends superClass {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    this._events = {\n      'capture:change input': '_onTargetInputChange',\n      'global:reset': '_onFormReset'\n    };\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   @abstract\n   */\n  \n  /**\n   Whether the current value of this field is invalid or not.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute invalid\n   @htmlattributereflected\n   @abstract\n   */\n  \n  /**\n   Name used to submit the data in a form.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   @abstract\n   */\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   This is ignored for checkbox, radio or fileupload.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   @abstract\n   */\n  \n  /**\n   Whether this field is required or not.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   @abstract\n   */\n  \n  /**\n   This field's current value.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   @abstract\n   */\n  \n  /**\n   Whether the current value of this field is invalid or not.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute invalid\n   @htmlattributereflected\n   */\n  get invalid() {\n    return this._invalid || false;\n  }\n  set invalid(value) {\n    this._invalid = transform.booleanAttr(value);\n    this._reflectAttribute('invalid', this._invalid);\n    \n    this.setAttribute('aria-invalid', this._invalid);\n    this.classList.toggle('is-invalid', this._invalid);\n  }\n  \n  /**\n   Reference to a space delimited set of ids for the HTML elements that provide a label for the formField.\n   Implementers should override this method to ensure that the appropriate descendant elements are labelled using the\n   <code>aria-labelledby</code> attribute. This will ensure that the component is properly identified for\n   accessibility purposes. It reflects the <code>aria-labelledby</code> attribute to the DOM.\n   @type {?String}\n   @default null\n   @htmlattribute labelledby\n   */\n  get labelledBy() {\n    return this._getLabellableElement().getAttribute('aria-labelledby');\n  }\n  set labelledBy(value) {\n    value = transform.string(value);\n  \n    // gets the element that will get the label assigned. the _getLabellableElement method should be overriden to\n    // allow other bevaviors.\n    const element = this._getLabellableElement();\n    // we get and assign the it that will be passed around\n    const elementId = element.id = element.id || commons.getUID();\n  \n    const currentLabelledBy = element.getAttribute('aria-labelledby');\n  \n    // we clear the old label assignments\n    if (currentLabelledBy && currentLabelledBy !== value) {\n      this._updateForAttributes(currentLabelledBy, elementId, true);\n    }\n  \n    if (value) {\n      element.setAttribute('aria-labelledby', value);\n      if (element.matches(LABELLABLE_ELEMENTS_SELECTOR)) {\n        this._updateForAttributes(value, elementId);\n      }\n    }\n    else {\n      // since no labelledby value was set, we remove everything\n      element.removeAttribute('aria-labelledby');\n    }\n  }\n  \n  /**\n   Target property inside the component that will be updated when a change event is triggered.\n   @type {String}\n   @default \"value\"\n   @protected\n   */\n  get _componentTargetProperty() {\n    return 'value';\n  }\n  \n  /**\n   Target property that will be taken from <code>event.target</code> and set into\n   {@link FormFieldMixin#_componentTargetProperty} when a change event is triggered.\n   @type {String}\n   @default \"value\"\n   @protected\n   */\n  get _eventTargetProperty() {\n    return 'value';\n  }\n  \n  /**\n   Whether the change event needs to be triggered when {@link FormFieldMixin#_onInputChange} is called.\n   @type {Boolean}\n   @default true\n   @protected\n   */\n  get _triggerChangeEvent() {\n    return true;\n  }\n  \n  /**\n   Gets the element that should get the label. In case none of the valid labelelable items are found, the component\n   will be labelled instead.\n   @protected\n   @returns {HTMLElement} the labellable element.\n   */\n  _getLabellableElement() {\n    // Use predefined element or query it\n    const element = this._labellableElement || this.querySelector(LABELLABLE_ELEMENTS_SELECTOR);\n    \n    // Use the found element or the container\n    return element || this;\n  }\n  \n  /**\n   Gets the internal input that the mixin.formField would watch for change. By default, it searches if the\n   <code>_getLabellableElement()</code> is an input. Components can override this function to be able to provide a\n   different implementation. In case the value is <code>null</code>, the change event will be handled no matter\n   the input that produced it.\n   @protected\n   @return {HTMLElement} the input to watch for changes.\n   */\n  _getTargetChangeInput() {\n    // we use this._targetChangeInput as an internal cache to avoid querying the DOM again every time\n    return this._targetChangeInput ||\n      // assignment returns the value\n      (this._targetChangeInput = this._getLabellableElement().matches(TARGET_INPUT_SELECTOR) ?\n        this._getLabellableElement() : null);\n  }\n  \n  /**\n   Function called whenever the target component triggers a change event. <code>_getTargetChangeInput</code> is used\n   internally to determine if the input belongs to the component. If the component decides to override this function,\n   the default from the mixin will not be called.\n   @protected\n   */\n  _onInputChange(event) {\n    // stops the current event\n    event.stopPropagation();\n    \n    /** @ignore */\n    this[this._componentTargetProperty] = event.target[this._eventTargetProperty];\n    \n    // Explicitly re-emit the change event after the property has been set\n    if (this._triggerChangeEvent) {\n      this.trigger('change');\n    }\n  }\n  \n  /**\n   Resets the formField when a reset is triggered on the parent form.\n   @protected\n   */\n  _onFormReset(event) {\n    if (event.target.contains(this)) {\n      this.reset();\n    }\n  }\n  \n  /**\n   We capture every input change and validate that it belongs to our target input. If this is the case,\n   <code>_onInputChange</code> will be called with the same event.\n   @protected\n   */\n  _onTargetInputChange(event) {\n    const targetInput = this._getTargetChangeInput();\n    // if the targetInput is null we still call _onInputChange to be backwards compatible\n    if (targetInput === event.target || targetInput === null) {\n      // we call _onInputChange since the target matches\n      this._onInputChange(event);\n    }\n  }\n  \n  /**\n   A utility method for adding the appropriate <code>for</code> attribute to any <code>label</code> elements\n   referenced by the <code>labelledBy</code> property value.\n   @param {String} labelledBy\n   The value of the <code>labelledBy<code> property providing a space-delimited list of the <code>id</code>\n   attributes for elements that label the formField.\n   @param {String} elementId\n   The <code>id</code> of the formField or one of its descendants that should be labelled by\n   <code>label</code> elements referenced by the <code>labelledBy</code> property value.\n   @param {Boolean} remove\n   Whether the existing <code>for</code> attributes should be removed.\n   @protected\n   */\n  _updateForAttributes(labelledBy, elementId, remove) {\n    // labelledby contains whitespace sparated items, so we need to separate each individual id\n    const labelIds = labelledBy.split(/\\s+/);\n    // we update the 'for' attribute for every id.\n    labelIds.forEach((currentValue) => {\n      const labelElement = document.getElementById(currentValue);\n      if (labelElement && labelElement.tagName === 'LABEL') {\n        const forAttribute = labelElement.getAttribute('for');\n        \n        if (remove) {\n          // we just remove it when it is our target\n          if (forAttribute === elementId) {\n            labelElement.removeAttribute('for');\n          }\n        }\n        else {\n          // if we do not have to remove, it does not matter the current value of the label, we can set it in every\n          // case\n          labelElement.setAttribute('for', elementId);\n        }\n      }\n    });\n  }\n  \n  /**\n   Clears the <code>value</code> of formField to the default value.\n   */\n  clear() {\n    /** @ignore */\n    this.value = '';\n  }\n  \n  /**\n   Resets the <code>value</code> to the initial value.\n   */\n  reset() {\n    // since the 'value' property is not reflected, form components use it to restore the initial value. When a\n    // component has support for values, this method needs to be overwritten\n    /** @ignore */\n    this.value = transform.string(this.getAttribute('value'));\n  }\n  \n  // We don't want to watch existing attributes for components that extend native HTML elements\n  static get _nativeObservedAttributes() {\n    return [\n      'labelledby',\n      'labelledBy',\n      'invalid'\n    ];\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return [\n      'labelledby',\n      'labelledBy',\n      'invalid',\n      'readonly',\n      'readOnly',\n      'name',\n      'value',\n      'disabled',\n      'required'\n    ];\n  }\n};\n\nexport default FormFieldMixin;\n","import '../coralui-externals';\n\nimport FormFieldMixin from './src/scripts/FormFieldMixin';\nimport {mixin} from '../coralui-util';\n\n// Expose mixin on Coral namespace\nmixin._formField = FormFieldMixin;\n\nexport {FormFieldMixin};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"button\"] = document.createElement(\"button\",\"coral-button\");\n  el0.setAttribute(\"handle\", \"button\");\n  el0.setAttribute(\"is\", \"coral-button\");\n  el0.setAttribute(\"type\", \"button\");\n  el0.setAttribute(\"variant\", \"icon\");\n  el0.setAttribute(\"icon\", \"spectrum-css-icon-TagClose\");\n  el0.setAttribute(\"iconSize\", \"XS\");\n  el0.className += \" _coral-TagList-item-removeButton\";\n  el0.setAttribute(\"title\", data_0[\"i18n\"][\"get\"]('Remove'));\n  el0.setAttribute(\"hidden\", \"\");\n  el0.setAttribute(\"tabindex\", \"-1\");\n  el0.setAttribute(\"coral-close\", \"\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport '../../../coralui-component-button';\nimport base from '../templates/base';\nimport {transform, validate, events, i18n} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-TagList-item';\nconst LABEL_CLASSNAME = '_coral-Label';\n\n/**\n Enumeration for {@link Tag} sizes.\n \n @typedef {Object} TagSizeEnum\n \n @property {String} SMALL\n Not supported. Falls back to MEDIUM.\n @property {String} MEDIUM\n A default sized tag.\n @property {String} LARGE\n A large sized tag.\n */\nconst size = {\n  SMALL: 'S',\n  MEDIUM: 'M',\n  LARGE: 'L'\n};\n\n/**\n Enumeration for {@link Tag} colors.\n \n @typedef {Object} TagColorEnum\n \n @property {String} DEFAULT\n @property {String} GREY\n @property {String} BLUE\n @property {String} RED\n @property {String} ORANGE\n @property {String} GREEN\n @property {String} LIGHT_BLUE\n Not supported. Falls back to BLUE.\n @property {String} PERIWINKLE\n Not supported. Falls back to BLUE.\n @property {String} CYAN\n Not supported. Falls back to BLUE.\n @property {String} PLUM\n Not supported. Falls back to RED.\n @property {String} FUCHSIA\n Not supported. Falls back to RED.\n @property {String} MAGENTA\n Not supported. Falls back to RED.\n @property {String} TANGERINE\n Not supported. Falls back to ORANGE.\n @property {String} YELLOW\n Not supported. Falls back to ORANGE.\n @property {String} CHARTREUSE\n Not supported. Falls back to GREEN.\n @property {String} KELLY_GREEN\n Not supported. Falls back to GREEN.\n @property {String} SEA_FOAM\n Not supported. Falls back to GREEN.\n */\nconst color = {\n  DEFAULT: '',\n  GREY: 'grey',\n  BLUE: 'blue',\n  RED: 'red',\n  ORANGE: 'orange',\n  GREEN: 'green',\n  LIGHT_BLUE: 'lightblue',\n  PERIWINKLE: 'periwinkle',\n  PLUM: 'plum',\n  FUCHSIA: 'fuchsia',\n  MAGENTA: 'magenta',\n  TANGERINE: 'tangerine',\n  YELLOW: 'yellow',\n  CHARTREUSE: 'chartreuse',\n  KELLY_GREEN: 'kellygreen',\n  SEA_FOAM: 'seafoam',\n  CYAN: 'cyan'\n};\n\nconst colorMap = {\n  lightblue: 'blue',\n  periwinkle: 'blue',\n  cyan: 'blue',\n  plum: 'red',\n  fuchsia: 'red',\n  magenta: 'red',\n  tangerine: 'orange',\n  yellow: 'orange',\n  chartreuse: 'green',\n  kelly_green: 'green',\n  sea_foam: 'green'\n};\n\n// builds a string containing all possible color classnames. this will be used to remove classnames when the color\n// changes\nconst ALL_COLOR_CLASSES = [];\nfor (const colorValue in color) {\n  ALL_COLOR_CLASSES.push(`${LABEL_CLASSNAME}--${color[colorValue]}`);\n}\n\nconst QUIET_CLASSNAME = `${CLASSNAME}--quiet`;\nconst MULTILINE_CLASSNAME = `${CLASSNAME}--multiline`;\nconst LARGE_CLASSNAME = `${LABEL_CLASSNAME}--large`;\n\n// Store coordinates of a mouse down event to compare against mouseup coordinates.\nlet bullsEye = null;\n\n// Utility method to detect center point of an element.\nconst getOffsetCenter = (element) => {\n  const rect = element.getBoundingClientRect();\n  const body = document.body;\n  const documentElement = document.documentElement;\n  const scrollTop = window.pageYOffset || documentElement.scrollTop || body.scrollTop;\n  const scrollLeft = window.pageXOffset || documentElement.scrollLeft || body.scrollLeft;\n  const clientTop = documentElement.clientTop || body.clientTop || 0;\n  const clientLeft = documentElement.clientLeft || body.clientLeft || 0;\n  const x = rect.left + rect.width / 2 + scrollLeft - clientLeft;\n  const y = rect.top + rect.height / 2 + scrollTop - clientTop;\n  return {\n    x: Math.round(x),\n    y: Math.round(y)\n  };\n};\n\n/**\n @class Coral.Tag\n @classdesc A Tag component\n @htmltag coral-tag\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Tag extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Attach events\n    this._delegateEvents({\n      'click': '_onClick',\n      'key:backspace': '_onRemoveButtonClick',\n      'key:delete': '_onRemoveButtonClick',\n      'key:space': '_onRemoveButtonClick',\n      'mousedown': '_onMouseDown'\n    });\n    \n    // Prepare templates\n    this._elements = {\n      // Create or fetch the label element.\n      label: this.querySelector('coral-tag-label') || document.createElement('coral-tag-label')\n    };\n    base.call(this._elements, {i18n});\n  }\n  \n  /**\n   The tag's label element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get label() {\n    return this._getContentZone(this._elements.label);\n  }\n  set label(value) {\n    this._setContentZone('label', value, {\n      handle: 'label',\n      tagName: 'coral-tag-label',\n      insert: function(label) {\n        this.insertBefore(label, this.firstChild);\n        this._updateAriaLabel();\n      }\n    });\n  }\n  \n  /**\n   Whether this component can be closed.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute closable\n   @htmlattributereflected\n   */\n  get closable() {\n    return this._closable || false;\n  }\n  set closable(value) {\n    this._closable = transform.booleanAttr(value);\n    this._reflectAttribute('closable', this._closable);\n  \n    // Only tags are closable\n    this._toggleTagVariant(this._closable);\n    \n    if (this._closable && !this.contains(this._elements.button)) {\n      // Insert the button if it was not added to the DOM\n      this.appendChild(this._elements.button);\n    }\n    \n    this._elements.button.hidden = !this._closable;\n    this._updateAriaLabel();\n  }\n  \n  /**\n   Value of the tag. If not explicitly set, the value of <code>Node.textContent</code> is returned.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   @htmlattributereflected\n   */\n  get value() {\n    return typeof this._value === 'string' ? this._value : this.textContent.replace(/\\s{2,}/g, ' ').trim();\n  }\n  set value(value) {\n    this._value = transform.string(value);\n    this._reflectAttribute('value', this._value);\n    \n    this.trigger('coral-tag:_valuechanged');\n  }\n  \n  /**\n   A quiet tag to differentiate it from default tag.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute quiet\n   @htmlattributereflected\n   */\n  get quiet() {\n    return this._quiet || false;\n  }\n  set quiet(value) {\n    this._quiet = transform.booleanAttr(value);\n    this._reflectAttribute('quiet', this._quiet);\n  \n    // Only tags are quiet\n    this._toggleTagVariant(this._quiet);\n    \n    this.classList.toggle(QUIET_CLASSNAME, this._quiet);\n  }\n  \n  /**\n   A multiline tag for block-level layout with multiline text.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute multiline\n   @htmlattributereflected\n   */\n  get multiline() {\n    return this._multiline || false;\n  }\n  set multiline(value) {\n    this._multiline = transform.booleanAttr(value);\n    this._reflectAttribute('multiline', this._multiline);\n  \n    this.classList.toggle(MULTILINE_CLASSNAME, this._multiline);\n  }\n  \n  /**\n   The tag's size. See {@link {TagSizeEnum}.\n   \n   @type {String}\n   @default TagSizeEnum.MEDIUM\n   @htmlattribute size\n   @htmlattributereflected\n   */\n  get size() {\n    return this._size || size.MEDIUM;\n  }\n  set size(value) {\n    value = this._host ? size.MEDIUM : transform.string(value).toUpperCase();\n    this._size = validate.enumeration(size)(value) && value || size.MEDIUM;\n    this._reflectAttribute('size', this._size);\n    \n    this.classList.toggle(LARGE_CLASSNAME, this._size === size.LARGE);\n  }\n  \n  /**\n   The tags's color. See {@link TagColorEnum}.\n   \n   @type {String}\n   @default Coral.Tag.color.DEFAULT\n   @htmlattribute color\n   */\n  get color() {\n    return this._color || color.DEFAULT;\n  }\n  set color(value) {\n    value = this._host ? color.DEFAULT : transform.string(value).toLowerCase();\n    this._color = validate.enumeration(color)(value) && value || color.DEFAULT;\n    \n    // Map unsupported colors\n    if (Object.keys(colorMap).indexOf(this._color) !== -1) {\n      this._color = colorMap[this._color];\n    }\n    \n    this._reflectAttribute('color', this._color);\n  \n    // removes every existing color\n    this.classList.remove(...ALL_COLOR_CLASSES);\n    \n    const isColored = this._color !== color.DEFAULT;\n  \n    // Only labels are colored\n    this._toggleTagVariant(!isColored);\n    \n    if (isColored) {\n      this.classList.add(`${LABEL_CLASSNAME}--${this._color}`);\n    }\n  }\n  \n  /**\n    Toggle between Tag and Label styles\n   \n    @private\n   */\n  _toggleTagVariant(toggle) {\n    this.classList.toggle(CLASSNAME, toggle);\n    this.classList.toggle(LABEL_CLASSNAME, !toggle);\n  }\n  \n  /** @private */\n  _onRemoveButtonClick(event) {\n    event.preventDefault();\n    if (this.closable) {\n      event.stopPropagation();\n      this.focus();\n      \n      const host = this._host;\n      this.remove();\n  \n      if (host) {\n        host._onTagButtonClicked();\n      }\n    }\n  }\n  \n  /** @private */\n  _onClick(event) {\n    if (this._elements.button.disabled) {\n      return;\n    }\n    \n    // If the click event originated from a screen reader's event sequence or the remove button, trigger the removal\n    // of the tag.\n    if (event.target === this._elements.button ||\n      this._elements.button.contains(event.target) ||\n      bullsEye !== null ||\n      /* Detects virtual cursor or Narrator on Windows */\n      event.clientX <= 0 && event.clientY <= 0) {\n      this._onRemoveButtonClick(event);\n      bullsEye = null;\n    }\n  }\n  \n  /** @private */\n  _onMouseDown(event) {\n    // Determine the center point of the event target\n    const offsetCenter = getOffsetCenter(event.target);\n    // This Tag will be the event.target when mousedown originates from a screen reader.\n    if (event.target === this &&\n      Math.abs(event.pageX - offsetCenter.x) < 2 &&\n      Math.abs(event.pageY - offsetCenter.y) < 2) {\n      // If click is close enough to the center, store the coordinates.\n      bullsEye = {\n        x: event.pageX,\n        y: event.pageY\n      };\n    }\n    else {\n      bullsEye = null;\n    }\n    events.on('mouseup', this._onMouseUp);\n  }\n  \n  /** @private */\n  _onMouseUp(event) {\n    // If stored bullseye coordinates don't match mouse up event coordinates,\n    // don't store them any more.\n    if (bullsEye !== null && (event.pageX !== bullsEye.x || event.pageY !== bullsEye.y)) {\n      bullsEye = null;\n    }\n    events.off('mouseup', this._onMouseUp);\n  }\n  \n  /**\n   Updates the aria-label property from the button and label elements.\n   \n      @ignore\n   */\n  _updateAriaLabel() {\n    const button = this._elements.button;\n    const label = this._elements.label;\n  \n    // In the edge case that this is a Tag without a TagList,\n    // just treat the Tag as a container element without special labelling.\n    if (this.getAttribute('role') !== 'option') {\n      button.removeAttribute('aria-hidden');\n      label.removeAttribute('aria-hidden');\n      return;\n    }\n  \n    const labelText = [];\n  \n    const buttonAriaLabel = button.getAttribute('title');\n    const labelTextContent = label.textContent;\n  \n    if (button.parentElement) {\n      if (!label.parentElement || labelTextContent !== buttonAriaLabel) {\n        if (!button.hidden) {\n          labelText.push(buttonAriaLabel);\n        }\n        button.setAttribute('aria-hidden', 'true');\n      }\n    }\n  \n    if (label.parentElement) {\n      if (!button.parentElement || buttonAriaLabel !== labelTextContent) {\n        labelText.push(labelTextContent);\n        label.setAttribute('aria-hidden', 'true');\n      }\n    }\n  \n    if (labelText.length) {\n      this.setAttribute('aria-label', labelText.join(' '));\n    }\n    else {\n      this.removeAttribute('aria-label');\n    }\n  }\n  \n  get _contentZones() { return {'coral-tag-label': 'label'}; }\n  \n  /**\n   Returns {@link Tag} sizes.\n   \n   @return {TagSizeEnum}\n   */\n  static get size() { return size; }\n  \n  /**\n   Returns {@link Tag} colors.\n   \n   @return {TagColorEnum}\n   */\n  static get color() { return color; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return [\n      'closable',\n      'value',\n      'quiet',\n      'multiline',\n      'size',\n      'color',\n      'disabled'\n    ];\n  }\n  \n  /** @ignore */\n  attributeChangedCallback(name, oldValue, value) {\n    // This is required by TagList but we don't need to expose disabled publicly as API\n    if (name === 'disabled') {\n      this._elements.button.disabled = true;\n    }\n    else {\n      super.attributeChangedCallback(name, oldValue, value);\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n  \n    // Default reflected attributes\n    if (!this._size) { this.size = size.MEDIUM; }\n    if (!this._color) { this.color = color.DEFAULT; }\n  \n    const templateHandleNames = ['input', 'button'];\n    \n    const label = this._elements.label;\n  \n    // Remove it so we can process children\n    if (label.parentNode) {\n      this.removeChild(label);\n    }\n  \n    // Process remaining elements as necessary\n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.TEXT_NODE ||\n        templateHandleNames.indexOf(child.getAttribute('handle')) === -1) {\n        // Add non-template elements to the label\n        label.appendChild(child);\n      }\n      else {\n        // Remove anything else\n        this.removeChild(child);\n      }\n    }\n  \n    // Assign the content zones, moving them into place in the process\n    this.label = label;\n    \n    // Used to inform the tag list that it's added\n    this.trigger('coral-tag:_connected');\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    \n    // Used to inform the tag list that it's removed synchronously\n    if (this._host) {\n      this._host._onItemDisconnected(this);\n    }\n  }\n  \n  /**\n   Triggered when the {@link Tag} value is changed.\n \n   @typedef {CustomEvent} coral-tag:_valuechanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when the {@link Tag} is added to the document.\n \n   @typedef {CustomEvent} coral-tag:_connected\n   \n   @private\n   */\n}\n\nexport default Tag;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-TagList-item-label';\n\n/**\n @class Coral.Tag.Label\n @classdesc Tag's label component\n @htmltag coral-tag-label\n @extends {HTMLElement}\n */\nclass TagLabel extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default TagLabel;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport Tag from './Tag';\nimport {Collection} from '../../../coralui-collection';\nimport {transform, commons} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-TagList';\n// Collection\nconst ITEM_TAGNAME = 'coral-tag';\n\n/**\n Extracts the value from the item in case no explicit value was provided.\n @param {HTMLElement} item\n the item whose value will be extracted.\n @returns {String} the value that will be submitted for this item.\n @private\n */\nconst itemValueFromDOM = function(item) {\n  const attr = item.getAttribute('value');\n  // checking explicitly for null allows to differentiate between non set values and empty strings\n  return attr !== null ? attr : item.textContent.replace(/\\s{2,}/g, ' ').trim();\n};\n\n/**\n @class Coral.TagList\n @classdesc A TagList component is a form field container to manipulate tags.\n @htmltag coral-taglist\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass TagList extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Attach events\n    this._delegateEvents(commons.extend(this._events, {\n      'capture:focus coral-tag': '_onItemFocus',\n      'capture:blur coral-tag': '_onItemBlur',\n      'key:right coral-tag': '_onNextItemFocus',\n      'key:down coral-tag': '_onNextItemFocus',\n      'key:pagedown coral-tag': '_onNextItemFocus',\n      'key:left coral-tag': '_onPreviousItemFocus',\n      'key:up coral-tag': '_onPreviousItemFocus',\n      'key:pageup coral-tag': '_onPreviousItemFocus',\n      'key:home coral-tag': '_onFirstItemFocus',\n      'key:end coral-tag': '_onLastItemFocus',\n      \n      // Accessibility\n      'capture:focus coral-tag:not(.is-disabled)': '_onItemFocusIn',\n      'capture:blur coral-tag:not(.is-disabled)': '_onItemFocusOut',\n      \n      // Private\n      'coral-tag:_valuechanged': '_onTagValueChanged',\n      'coral-tag:_connected': '_onTagConnected'\n    }));\n  \n    // Pre-define labellable element\n    this._labellableElement = this;\n  \n    this._itemToFocusAfterDelete = null;\n  }\n  \n  /**\n   Changing the values will redefine the component's items.\n   \n   @type {Array.<String>}\n   @emits {change}\n   */\n  get values() {\n    return this.items.getAll().map((item) => item.value);\n  }\n  set values(values) {\n    if (Array.isArray(values)) {\n      this.items.clear();\n      \n      values.forEach((value) => {\n        const item = new Tag().set({\n          label: {\n            innerHTML: value\n          },\n          value: value\n        });\n    \n        this._attachInputToItem(item);\n    \n        this.items.add(item);\n      }, this);\n    }\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {Collection}\n   @readonly\n   */\n  get items() {\n    // just init on demand\n    if (!this._items) {\n      this._items = new Collection({\n        host: this,\n        itemTagName: ITEM_TAGNAME\n      });\n    }\n    return this._items;\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._name || '';\n  }\n  set name(value) {\n    this._name = transform.string(value);\n    this._reflectAttribute('name', value);\n  \n    this.items.getAll().forEach((item) => {\n      if (item._input) {\n        item._input.name = this._name;\n      }\n    }, this);\n  }\n  \n  /**\n   This field's current value.\n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    const all = this.items.getAll();\n    return all.length ? all[0].value : '';\n  }\n  set value(value) {\n    this.items.clear();\n  \n    if (value) {\n      const item = new Tag().set({\n        label: {\n          innerHTML: value\n        },\n        value: value\n      });\n      \n      this._attachInputToItem(item);\n    \n      this.items.add(item);\n    }\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.items.getAll().forEach((item) => {\n      item.classList.toggle('is-disabled', this._disabled);\n      if (item._input) {\n        item._input.disabled = this._disabled;\n      }\n    }, this);\n    \n    // a11y\n    this.setAttribute('aria-disabled', this._disabled);\n  }\n  \n  // JSDoc inherited\n  get invalid() {\n    return super.invalid;\n  }\n  set invalid(value) {\n    super.invalid = value;\n  \n    this.items.getAll().forEach((item) => {\n      item.classList.toggle('is-invalid', this._invalid);\n    });\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    \n    this.items.getAll().forEach((item) => {\n      item.closable = !this._readOnly;\n    }, this);\n  \n    // a11y\n    this.setAttribute('aria-readonly', this._readOnly);\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    // a11y\n    this.setAttribute('aria-required', this._required);\n  }\n  \n  /** @private */\n  _attachInputToItem(item) {\n    if (!item._input) {\n      item._input = document.createElement('input');\n      item._input.type = 'hidden';\n      // We do this so it is recognized by Coral.Tag and handled if cloned\n      item._input.setAttribute('handle', 'input');\n    }\n  \n    const input = item._input;\n  \n    input.disabled = this.disabled;\n    input.name = this.name;\n    input.value = item.value;\n  \n    if (!item.contains(input)) {\n      item.appendChild(input);\n    }\n  }\n  \n  /** @private */\n  _onItemConnected(attachedItem) {\n    const self = this;\n    const items = self.items.getAll();\n    \n    // Prevents to add duplicates based on the tag value\n    const duplicate = items.some((tag) => {\n      if (itemValueFromDOM(tag) === itemValueFromDOM(attachedItem) && tag !== attachedItem) {\n        (items.indexOf(tag) < items.indexOf(attachedItem) ? attachedItem : tag).remove();\n        return true;\n      }\n      \n      return false;\n    });\n    \n    if (duplicate) {\n      return;\n    }\n    \n    // create corresponding input field\n    this._attachInputToItem(attachedItem);\n    \n    // Set tag defaults\n    attachedItem.setAttribute('color', Tag.color.DEFAULT);\n    attachedItem.setAttribute('size', Tag.size.SMALL);\n    \n    // adds the role to support accessibility\n    attachedItem.setAttribute('role', 'listitem');\n    attachedItem.setAttribute('tabindex', '-1');\n    attachedItem[this.readOnly ? 'removeAttribute' : 'setAttribute']('closable', '');\n    \n    // add tabindex to first item if none existing\n    if (!this.querySelector(`${ITEM_TAGNAME}[tabindex=\"0\"]`)) {\n      const first = items[0];\n      if (first) {\n        first.setAttribute('tabindex', '0');\n      }\n    }\n    \n    // Keep a reference on the host in case the tag gets removed\n    attachedItem._host = this;\n    \n    // triggers the Coral.Collection event\n    this.trigger('coral-collection:add', {\n      item: attachedItem\n    });\n  }\n  \n  /** @private */\n  _onItemDisconnected(detachedItem) {\n    // Cleans the tag from TagList specific values\n    detachedItem.removeAttribute('role');\n    detachedItem.removeAttribute('tabindex');\n    detachedItem._host = undefined;\n    \n    if (this._itemToFocusAfterDelete) {\n      this._itemToFocusAfterDelete.focus();\n    }\n    \n    // triggers the Coral.Collection event\n    this.trigger('coral-collection:remove', {\n      item: detachedItem\n    });\n  }\n  \n  /** @private */\n  _onItemFocus(event) {\n    if (!this.disabled) {\n      this.setAttribute('aria-live', 'polite');\n      \n      const tag = event.matchedTarget;\n      \n      // add tabindex to first item and remove from previous focused item\n      this.items.getAll().forEach((item) => {\n        if (item !== tag) {\n          item.setAttribute('tabindex', '-1');\n        }\n      });\n      tag.setAttribute('tabindex', '0');\n      \n      this._setItemToFocusOnDelete(tag);\n    }\n  }\n  \n  /** @private */\n  _onItemBlur(event) {\n    if (!this.disabled) {\n      this.setAttribute('aria-live', 'off');\n      \n      const tag = event.matchedTarget;\n      \n      this._setItemToFocusOnDelete(tag);\n    }\n  }\n  \n  /** @private */\n  _onSiblingItemFocus(event, sibling) {\n    if (!this.disabled) {\n      event.preventDefault();\n      \n      let item = event.target[sibling];\n      while (item) {\n        if (item.tagName.toLowerCase() === ITEM_TAGNAME && !item.hidden) {\n          item.focus();\n          break;\n        }\n        else {\n          item = item[sibling];\n        }\n      }\n    }\n  }\n  \n  /** @private */\n  _onNextItemFocus(event) {\n    this._onSiblingItemFocus(event, 'nextElementSibling');\n  }\n  \n  /** @private */\n  _onPreviousItemFocus(event) {\n    this._onSiblingItemFocus(event, 'previousElementSibling');\n  }\n  \n  /** @private */\n  _onFirstItemFocus(event) {\n    event.preventDefault();\n    const length = this.items.length;\n    if (length > 0) {\n      this.items.getAll()[0].focus();\n    }\n  }\n  \n  /** @private */\n  _onLastItemFocus(event) {\n    event.preventDefault();\n    const length = this.items.length;\n    if (length > 0) {\n      this.items.getAll()[length - 1].focus();\n    }\n  }\n  \n  _onItemFocusIn(event) {\n    event.matchedTarget.classList.add('focus-ring');\n  }\n  \n  _onItemFocusOut(event) {\n    event.matchedTarget.classList.remove('focus-ring');\n  }\n  \n  /** @private */\n  _onTagButtonClicked() {\n    this.trigger('change');\n  }\n  \n  /** @private */\n  _onTagValueChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const tag = event.target;\n    if (tag._input) {\n      tag._input.value = tag.value;\n    }\n  }\n  \n  /** @private */\n  _setItemToFocusOnDelete(tag) {\n    let itemToFocusAfterDelete = tag.nextElementSibling;\n    \n    // Next item will be focusable if the focused tag is removed\n    while (itemToFocusAfterDelete) {\n      if (itemToFocusAfterDelete.tagName.toLowerCase() === ITEM_TAGNAME && !itemToFocusAfterDelete.hidden) {\n        this._itemToFocusAfterDelete = itemToFocusAfterDelete;\n        return;\n      }\n      \n      itemToFocusAfterDelete = itemToFocusAfterDelete.nextElementSibling;\n    }\n    \n    itemToFocusAfterDelete = tag.previousElementSibling;\n    // Previous item will be focusable if the focused tag is removed\n    while (itemToFocusAfterDelete) {\n      if (itemToFocusAfterDelete.tagName.toLowerCase() === ITEM_TAGNAME && !itemToFocusAfterDelete.hidden) {\n        this._itemToFocusAfterDelete = itemToFocusAfterDelete;\n        break;\n      }\n      else {\n        itemToFocusAfterDelete = itemToFocusAfterDelete.previousElementSibling;\n      }\n    }\n    \n    const self = this;\n    window.requestAnimationFrame(() => {\n      if (tag.parentElement !== null && !self.contains(document.activeElement)) {\n        itemToFocusAfterDelete = undefined;\n      }\n    });\n  }\n  \n  /** @private */\n  _onTagConnected(event) {\n    event.stopImmediatePropagation();\n    \n    const item = event.target;\n    this._onItemConnected(item);\n  }\n  \n  // JSDocs inherited\n  reset() {\n    // reset the values to the initial values\n    this.values = this._initialValues;\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'closable',\n      'value',\n      'quiet',\n      'multiline',\n      'size',\n      'color'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    const self = this;\n    \n    self.classList.add(CLASSNAME);\n    \n    // adds the role to support accessibility\n    self.setAttribute('role', 'list');\n  \n    self.setAttribute('aria-live', 'off');\n    self.setAttribute('aria-atomic', 'false');\n    self.setAttribute('aria-relevant', 'additions');\n  \n    // Since tagList can have multiple values, we have to store them all to be able to reset them\n    if (self.hasAttribute('value')) {\n      self._initialValues = [self.getAttribute('value')];\n    }\n    else {\n      self._initialValues = self.items.getAll().map((item) => itemValueFromDOM(item));\n    }\n    \n    // Prepare items\n    this.items.getAll().forEach((item) => {\n      self._onItemConnected(item);\n    });\n  }\n}\n\nexport default TagList;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport translations from './i18n/translations.json';\nimport {commons, strings} from '../coralui-util';\nimport Tag from './src/scripts/Tag';\nimport TagLabel from './src/scripts/TagLabel';\nimport TagList from './src/scripts/TagList';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-taglist': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-tag', Tag);\nwindow.customElements.define('coral-tag-label', TagLabel);\nwindow.customElements.define('coral-taglist', TagList);\n\nTag.Label = TagLabel;\n\nexport {Tag, TagList};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform} from '../../../coralui-util';\n\n/**\n @class Coral.Autocomplete.Item\n @classdesc The Autocomplete Item\n @htmltag coral-autocomplete-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass AutocompleteItem extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    this._observer = new MutationObserver(this._handleMutation.bind(this));\n    this._observer.observe(this, {\n      characterData: true,\n      childList: true,\n      subtree: true\n    });\n  }\n  \n  /**\n   Value of the item. <code>textContent</code> is used if not provided.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   @htmlattributereflected\n   */\n  get value() {\n    // keep spaces to only 1 max and trim to mimic native select option behavior\n    return typeof this._value === 'undefined' ? this.textContent.replace(/\\s{2,}/g, ' ').trim() : this._value;\n  }\n  set value(value) {\n    this._value = transform.string(value);\n    this._reflectAttribute('value', this._value);\n    \n    this.trigger('coral-autocomplete-item:_valuechanged');\n  }\n  \n  /**\n   The content zone element of the item.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    // Support configs\n    if (typeof value === 'object') {\n      for (const prop in value) {\n        /** @ignore */\n        this[prop] = value[prop];\n      }\n    }\n  }\n  \n  /**\n   Whether this item is selected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n    \n    this.trigger('coral-autocomplete-item:_selectedchanged');\n  }\n  \n  /**\n   Whether this item is disabled.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n  }\n  \n  /** @private */\n  _handleMutation() {\n    this.trigger('coral-autocomplete-item:_contentchanged', {\n      content: this.textContent\n    });\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['selected', 'disabled', 'value'];\n  }\n}\n\nexport default AutocompleteItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport {transform, validate} from '../../../coralui-util';\n\n/**\n Enumeration for {@link Textfield} variants.\n \n @typedef {Object} TextfieldVariantEnum\n \n @property {String} DEFAULT\n A default textfield.\n @property {String} QUIET\n A textfield with no border or background.\n */\nconst variant = {\n  DEFAULT: 'default',\n  QUIET: 'quiet'\n};\n\n// the textfield's base classname\nconst CLASSNAME = '_coral-Textfield';\n\n// Builds a string containing all possible variant classnames. This will be used to remove classnames when the variant\n// changes\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantValue in variant) {\n  ALL_VARIANT_CLASSES.push(`${CLASSNAME}--${variant[variantValue]}`);\n}\n\n/**\n @class Coral.Textfield\n @classdesc A Textfield component is the default single line text form field.\n @htmltag coral-textfield\n @htmlbasetag input\n @extends {HTMLInputElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass Textfield extends FormFieldMixin(ComponentMixin(HTMLInputElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    this._delegateEvents(this._events);\n  }\n  \n  /**\n   The textfield's variant. See {@link TextfieldVariantEnum}.\n   \n   @type {String}\n   @default TextfieldVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n    \n    // removes every existing variant\n    this.classList.remove(...ALL_VARIANT_CLASSES);\n\n    if (this._variant !== variant.DEFAULT) {\n      this.classList.add(`${CLASSNAME}--${this._variant}`);\n    }\n  }\n  \n  /**\n   Returns {@link Textfield} variants.\n   \n   @return {TextfieldVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super._nativeObservedAttributes.concat(['variant']);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n  }\n}\n\nexport default Textfield;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Textfield from './src/scripts/Textfield';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-textfield', Textfield, {extends: 'input'});\n\nexport {Textfield};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  var el0 = this[\"overlay\"] = document.createElement(\"coral-popover\");\n  el0.setAttribute(\"smart\", \"\");\n  el0.id = data_0[\"commons\"][\"getUID\"]();\n  el0.setAttribute(\"variant\", \"flyout\");\n  el0.className += \" _coral-Autocomplete-overlay\";\n  el0.setAttribute(\"focusonshow\", \"off\");\n  el0.setAttribute(\"returnfocus\", \"off\");\n  el0.setAttribute(\"placement\", \"bottom\");\n  el0.setAttribute(\"handle\", \"overlay\");\n  el0.setAttribute(\"role\", \"presentation\");\n  el0.setAttribute(\"breadthoffset\", \"50%r - 50%p\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  data = data_0;\n  \n    // Constrains the size of the list to 6 items.\n    // @todo move this to theme\n    var maxHeight = 'max-height:' + (32 * 6) + 'px';\n  \n  data_0 = data;\n  var el3 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el3);\n  var el4 = this[\"selectList\"] = document.createElement(\"coral-buttonlist\");\n  el4.setAttribute(\"style\", maxHeight);\n  el4.id = data_0[\"commons\"][\"getUID\"]();\n  el4.className += \" _coral-Autocomplete-selectList\";\n  el4.setAttribute(\"handle\", \"selectList\");\n  el4.setAttribute(\"role\", \"listbox\");\n  el4.setAttribute(\"interaction\", \"off\");\n  el0.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  el0.appendChild(el5);\n  frag.appendChild(el0);\n  var el6 = document.createTextNode(\"\\n\");\n  frag.appendChild(el6);\n  var el7 = this[\"field\"] = document.createElement(\"input\");\n  el7.setAttribute(\"type\", \"hidden\");\n  el7.setAttribute(\"handle\", \"field\");\n  frag.appendChild(el7);\n  var el8 = document.createTextNode(\"\\n\");\n  frag.appendChild(el8);\n  var el9 = this[\"inputGroup\"] = document.createElement(\"div\");\n  el9.className += \" _coral-InputGroup _coral-Autocomplete-inputGroup\";\n  el9.setAttribute(\"handle\", \"inputGroup\");\n  el9.setAttribute(\"role\", \"presentation\");\n  var el10 = document.createTextNode(\"\\n  \");\n  el9.appendChild(el10);\n  var el11 = this[\"input\"] = document.createElement(\"input\",\"coral-textfield\");\n  el11.className += \" _coral-InputGroup-input _coral-Autocomplete-input\";\n  el11.setAttribute(\"type\", \"text\");\n  el11.setAttribute(\"autocomplete\", \"off\");\n  el11.setAttribute(\"handle\", \"input\");\n  el11.setAttribute(\"role\", \"textbox\");\n  el11.setAttribute(\"is\", \"coral-textfield\");\n  el9.appendChild(el11);\n  var el12 = document.createTextNode(\"\\n  \");\n  el9.appendChild(el12);\n  var el13 = this[\"trigger\"] = document.createElement(\"button\",\"coral-button\");\n  el13.setAttribute(\"type\", \"button\");\n  el13.className += \" _coral-Button--dropdown _coral-InputGroup-button _coral-Autocomplete-trigger\";\n  el13.setAttribute(\"is\", \"coral-button\");\n  el13.setAttribute(\"variant\", \"_custom\");\n  el13.setAttribute(\"handle\", \"trigger\");\n  el13.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('Show suggestions'));\n  el13.setAttribute(\"title\", data_0[\"i18n\"][\"get\"]('Show suggestions'));\n  var el14 = document.createTextNode(\"\\n    \");\n  el13.appendChild(el14);\n  var el15 = this[\"label\"] = document.createElement(\"coral-button-label\");\n  el15.setAttribute(\"handle\", \"label\");\n  el13.appendChild(el15);\n  var el16 = document.createTextNode(\"\\n    \");\n  el13.appendChild(el16);\n  data = data_0;\n  \n      // Don't wait for button MO to pick up the label\n      this.trigger._elements.label = this.label;\n      // Render invalid icon\n      this.trigger.insertAdjacentHTML('beforeend', data.Icon._renderSVG('spectrum-css-icon-SelectDownChevron', ['_coral-InputGroup-icon']));\n    \n  data_0 = data;\n  var el18 = document.createTextNode(\"\\n  \");\n  el13.appendChild(el18);\n  el9.appendChild(el13);\n  var el19 = document.createTextNode(\"\\n\");\n  el9.appendChild(el19);\n  frag.appendChild(el9);\n  var el20 = document.createTextNode(\"\\n\");\n  frag.appendChild(el20);\n  var el21 = this[\"tagList\"] = document.createElement(\"coral-taglist\");\n  el21.className += \" _coral-Autocomplete-tagList\";\n  el21.setAttribute(\"handle\", \"tagList\");\n  frag.appendChild(el21);\n  var el22 = document.createTextNode(\"\\n\");\n  frag.appendChild(el22);\n  return frag;\n});\nexport default template;","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"loadIndicator\"] = document.createElement(\"div\");\n  el0.className += \" _coral-Autocomplete-loading\";\n  el0.setAttribute(\"role\", \"progressbar\");\n  el0.setAttribute(\"handle\", \"loadIndicator\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = document.createElement(\"coral-wait\");\n  el2.setAttribute(\"centered\", \"\");\n  el0.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  el0.appendChild(el3);\n  frag.appendChild(el0);\n  var el4 = document.createTextNode(\"\\n\");\n  frag.appendChild(el4);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport {Tag} from '../../../coralui-component-taglist';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport AutocompleteItem from './AutocompleteItem';\nimport {Textfield} from '../../../coralui-component-textfield';\nimport {Icon} from '../../../coralui-component-icon';\nimport '../../../coralui-component-button';\nimport '../../../coralui-component-list';\nimport '../../../coralui-component-popover';\nimport '../../../coralui-component-wait';\nimport base from '../templates/base';\nimport loadIndicator from '../templates/loadIndicator';\nimport {transform, validate, commons, i18n} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Autocomplete';\n\n/**\n The distance, in pixels, from the bottom of the List at which we assume the user has scrolled\n to the bottom of the list.\n @type {Number}\n @ignore\n */\nconst SCROLL_BOTTOM_THRESHOLD = 50;\n\n/**\n The number of milliseconds for which scroll events should be debounced.\n @type {Number}\n @ignore\n */\nconst SCROLL_DEBOUNCE = 100;\n\n// @temp - Enable debug messages when writing tests\nconst DEBUG = 0;\n\n/**\n Enumeration for {@link Autocomplete} variants.\n \n @typedef {Object} AutocompleteVariantEnum\n \n @property {String} DEFAULT\n A default, gray Autocomplete.\n @property {String} QUIET\n An Autocomplete with no border or background.\n */\nconst variant = {\n  DEFAULT: 'default',\n  QUIET: 'quiet'\n};\n\n/**\n Enumeration for {@link Autocomplete} match options.\n \n @typedef {Object} AutocompleteMatchEnum\n \n @property {String} STARTSWITH\n Include only matches that start with the user provided value.\n @property {String} CONTAINS\n Include only matches that contain the user provided value.\n */\nconst match = {\n  STARTSWITH: 'startswith',\n  CONTAINS: 'contains'\n};\n\n/**\n @class Coral.Autocomplete\n @classdesc An Autocomplete component that allows users to search and select from a list of options.\n @htmltag coral-autocomplete\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass Autocomplete extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Template\n    this._elements = {};\n    base.call(this._elements, {Icon, commons, i18n});\n    \n    this._elements.tagList.reset = () => {\n      // Kill inner tagList reset so it doesn't interfer with the autocomplete reset\n    };\n  \n    // Pre-define labellable element\n    this._labellableElement = this._elements.input;\n  \n    const overlayId = this._elements.overlay.id;\n    const events = {\n      // ARIA Autocomplete role keyboard interaction\n      // http://www.w3.org/TR/wai-aria-practices/#autocomplete\n      'key:up [handle=\"input\"]': '_handleInputUpKeypress',\n      'key:alt+up [handle=\"input\"]': '_handleInputUpKeypress',\n      'key:down [handle=\"input\"]': '_handleInputDownKeypress',\n      'key:alt+down [handle=\"input\"]': '_handleInputDownKeypress',\n      'key:tab [handle=\"input\"]': '_handleInputTabKeypress',\n      'key:shift+tab [handle=\"input\"]': '_handleListFocusShift',\n      'capture:change [handle=\"input\"]': '_handleInput',\n      'input [handle=\"input\"]': '_handleInputEvent',\n  \n      // Manually listen to keydown event due to CUI-3973\n      'keydown': '_handleInputKeypressEnter',\n  \n      // Interaction\n      'click [handle=\"trigger\"]': '_handleTriggerClick',\n      'mousedown [handle=\"trigger\"]': '_handleTriggerMousedown',\n  \n      // Focus\n      'capture:blur': '_handleFocusOut',\n  \n      // Taglist\n      'coral-collection:add [handle=\"tagList\"]': '_handleTagAdded',\n      'coral-collection:remove [handle=\"tagList\"]': '_handleTagRemoved',\n      'change [handle=\"tagList\"]': '_preventTagListChangeEvent',\n    \n      // Items\n      'coral-autocomplete-item:_valuechanged': '_handleItemValueChange',\n      'coral-autocomplete-item:_selectedchanged': '_handleItemSelectedChange',\n      'coral-autocomplete-item:_contentchanged': '_handleItemContentChange'\n    };\n    \n    // Interaction\n    events[`global:key:shift+tab #${overlayId} [is=\"coral-buttonlist-item\"]`] = '_handleListFocusShift';\n  \n    // Overlay\n    events[`global:capture:coral-overlay:positioned #${overlayId}`] = '_onOverlayPositioned';\n    \n    // SelectList\n    events[`global:key:enter #${overlayId} button[is=\"coral-buttonlist-item\"]`] = '_handleSelect';\n    events[`global:capture:mousedown #${overlayId} button[is=\"coral-buttonlist-item\"]`] = '_handleSelect';\n    events[`global:capture:scroll #${overlayId} [handle=\"selectList\"]`] = '_onScroll';\n    events[`global:capture:mousewheel #${overlayId} [handle=\"selectList\"]`] = '_onMouseWheel';\n    \n    // Events\n    this._delegateEvents(events);\n  \n    // A map of values to tags\n    this._tagMap = {};\n  \n    // A list of selected values\n    this._values = [];\n  \n    // A list of options objects\n    this._options = [];\n  \n    // A map of option values to their content\n    this._optionsMap = {};\n  \n    // Used for reset\n    this._initialSelectedValues = [];\n  \n    // Bind the debounced scroll method\n    this._handleScrollBottom = this._handleScrollBottom.bind(this);\n  \n    // Listen for mutations\n    this._observer = new MutationObserver(this._handleMutation.bind(this));\n    this._startObserving();\n  }\n  \n  /**\n   The item collection.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request:\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        itemTagName: 'coral-autocomplete-item',\n        host: this\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /**\n   Indicates if the autocomplete is a single or multiple mode. In multiple mode, the user can select multiple\n   values.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute multiple\n   @htmlattributereflected\n   */\n  get multiple() {\n    return this._multiple || false;\n  }\n  set multiple(value) {\n    this._multiple = transform.booleanAttr(value);\n    this._reflectAttribute('multiple', this._multiple);\n    \n    this._setName(this.name);\n  \n    if (this._multiple) {\n      this._elements.tagList.hidden = false;\n    }\n    else {\n      this._elements.tagList.hidden = true;\n      this._elements.tagList.items.clear();\n    }\n  \n    this.labelledBy = this.labelledBy;\n  }\n  \n  /**\n   Amount of time, in milliseconds, to wait after typing a character before the suggestion is shown.\n   \n   @type {Number}\n   @default 200\n   @htmlattribute delay\n   */\n  get delay() {\n    return typeof this._delay === 'number' ? this._delay : 200;\n  }\n  set delay(value) {\n    value = transform.number(value);\n  \n    if (typeof value === 'number' && value >= 0) {\n      this._delay = transform.number(value);\n    }\n  }\n  \n  /**\n   Set to <code>true</code> to restrict the selected value to one of the given options from the suggestions.\n   When set to <code>false</code>, users can enter anything.\n   \n   <strong>NOTE:</strong> This API is under review and may be removed or changed in a subsequent release.\n   @ignore\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute forceselection\n   @htmlattributereflected\n   */\n  get forceSelection() {\n    return this._forceSelection || false;\n  }\n  set forceSelection(value) {\n    this._forceSelection = transform.booleanAttr(value);\n    this._reflectAttribute('forceselection', this._forceSelection);\n  \n    if (DEBUG) {\n      console.warn('Coral.Autocomplete: Should check for invalid state');\n    }\n  }\n  \n  /**\n   A hint to the user of what can be entered.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute placeholder\n   @htmlattributereflected\n   */\n  get placeholder() {\n    return this._elements.input.placeholder;\n  }\n  set placeholder(value) {\n    this._elements.input.placeholder = value;\n    this._reflectAttribute('placeholder', this.placeholder);\n  }\n  \n  /**\n   Max length for the Input field\n   \n   @type {Number}\n   @htmlattribute maxlength\n   @htmlattributereflected\n   */\n  get maxLength() {\n    return this._elements.input.maxLength;\n  }\n  set maxLength(value) {\n    this._elements.input.maxLength = value;\n    this._reflectAttribute('maxlength', this._elements.input.maxLength);\n  }\n  \n  /**\n   The Autocomplete's variant. See {@link AutocompleteVariantEnum}.\n   \n   @type {AutocompleteVariantEnum}\n   @default AutocompleteVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n    \n    if (this._variant === variant.QUIET) {\n      this._elements.input.variant = Textfield.variant.QUIET;\n      this._elements.trigger.classList.remove('_coral-Button--dropdown');\n      this._elements.trigger.classList.add('_coral-Button--quiet--dropdown');\n      this._elements.inputGroup.classList.add('_coral-InputGroup--quiet');\n    }\n    else {\n      this._elements.input.variant = Textfield.variant.DEFAULT;\n      this._elements.trigger.classList.add('_coral-Button--dropdown');\n      this._elements.trigger.classList.remove('_coral-Button--quiet--dropdown');\n      this._elements.inputGroup.classList.remove('_coral-InputGroup--quiet');\n    }\n  }\n  \n  /**\n   The match mode. See {@link AutocompleteMatchEnum}.\n \n   @type {String}\n   @default AutocompleteMatchEnum.CONTAINS\n   @htmlattribute match\n   */\n  get match() {\n    return this._match || match.CONTAINS;\n  }\n  set match(value) {\n    if (typeof value === 'function') {\n      this._match = value;\n      this._matchFunction = value;\n    }\n    else {\n      value = transform.string(value).toLowerCase();\n      this._match = validate.enumeration(match)(value) && value || match.CONTAINS;\n  \n      if (this._match === match.STARTSWITH) {\n        this._matchFunction = this._optionStartsWithValue;\n      }\n      else if (this._match === match.CONTAINS) {\n        this._matchFunction = this._optionContainsValue;\n      }\n    }\n  }\n  \n  /**\n   Indicates that the component is currently loading remote data. This will set the wait indicator inside the list.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute loading\n   */\n  get loading() {\n    return this._loading || false;\n  }\n  set loading(value) {\n    this._loading = transform.booleanAttr(value);\n    \n    if (this._loading) {\n      const selectList = this._elements.overlay;\n  \n      // we decide first if we need to scroll to the bottom since adding the load will change the dimensions\n      const scrollToBottom = selectList.scrollTop >= selectList.scrollHeight - selectList.clientHeight;\n      \n      // if it does not exist we create it\n      if (!this._elements.loadIndicator) {\n        loadIndicator.call(this._elements);\n      }\n    \n      // inserts the item at the end\n      this._elements.overlay.content.appendChild(this._elements.loadIndicator);\n    \n      // we make the load indicator visible\n      if (scrollToBottom) {\n        selectList.scrollTop = selectList.scrollHeight;\n      }\n    }\n    else if (this._elements.loadIndicator) {\n      this._elements.loadIndicator.remove();\n    }\n  }\n  \n  /**\n   Returns an Array containing the set selected items.\n   @type {Array.<HTMLElement>}\n   @readonly\n   */\n  get selectedItems() {\n    return this.items._getAllSelected();\n  }\n  \n  /**\n   Returns the first selected item in the Autocomplete. The value <code>null</code> is returned if no element is\n   selected.\n   @type {?HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getAllSelected()[0] || null;\n  }\n  \n  /**\n   The current value, as submitted during form submission.\n   When {@link Coral.Autocomplete#multiple} is <code>true</code>, the first selected value will be returned.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    // Get the first value (or empty string)\n    const values = this.values;\n    return values && values.length > 0 ? values[0] : '';\n  }\n  set value(value) {\n    this.values = [transform.string(value)];\n  }\n  \n  /**\n   The current values, as submitted during form submission.\n   When {@link Coral.Autocomplete#multiple} is <code>false</code>, this will be an array of length 1.\n   \n   @type {Array.<String>}\n   */\n  get values() {\n    return this._values;\n  }\n  set values(values) {\n    if (values === undefined || values === null) {\n      values = [];\n    }\n    \n    if (Array.isArray(values)) {\n      // if value was set to empty string\n      if (values.length === 1 && values[0] === '') {\n        values = [];\n      }\n      \n      let i;\n      let value;\n      const selectedValues = [];\n  \n      // Valid values only\n      if (this.forceSelection) {\n        // Add each valid value\n        for (i = 0; i < values.length; i++) {\n          value = values[i];\n          if (this._optionsMap[value] !== undefined) {\n            selectedValues.push(value);\n          }\n        }\n      }\n      // Any value goes\n      else {\n        for (i = 0; i < values.length; i++) {\n          value = values[i];\n          selectedValues.push(value);\n        }\n      }\n  \n      if (this.multiple) {\n        // Remove existing tags, DOM selection, etc\n        // This is a full override\n        this._clearValues();\n    \n        // Add each tag\n        for (i = 0; i < selectedValues.length; i++) {\n          value = selectedValues[i];\n      \n          // Ensure the item is selected if it's present in the DOM\n          // This keeps the DOM in sync with the JS API and prevents bugs like CUI-5681\n          this._selectItem(value);\n      \n          // Add the value to the tag list\n          this._addValue(value, null, true);\n        }\n      }\n      else {\n        // Set value\n        this._values = selectedValues.length > 0 ? [selectedValues[0]] : [];\n        this._reflectCurrentValue();\n      }\n    }\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._getName();\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n  \n    this._setName(value);\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#invalid}.\n   */\n  get invalid() {\n    return super.invalid;\n  }\n  set invalid(value) {\n    super.invalid = value;\n  \n    // Add to outer component\n    this._elements.inputGroup.classList.toggle('is-invalid', this.invalid);\n    this._elements.trigger.classList.toggle('is-invalid', this.invalid);\n    this._elements.input.invalid = this.invalid;\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.setAttribute('aria-disabled', this._disabled);\n    this._elements.inputGroup.classList.toggle('is-disabled', this._disabled);\n    \n    this._elements.input.disabled = this._disabled;\n  \n    const disabledOrReadOnly = this._disabled || this.readOnly;\n    this._elements.trigger.disabled = disabledOrReadOnly;\n    this._elements.tagList.disabled = disabledOrReadOnly;\n    // Prevents the overlay to be shown\n    this._elements.inputGroup.disabled = disabledOrReadOnly;\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    this.setAttribute('aria-readonly', this._readOnly);\n  \n    this._elements.input.readOnly = this._readOnly;\n    \n    const readOnlyOrDisabled = this._readOnly || this.disabled;\n    this._elements.trigger.readOnly = readOnlyOrDisabled;\n    this._elements.tagList.readOnly = readOnlyOrDisabled;\n    // Prevents the overlay to be shown\n    this._elements.inputGroup.disabled = readOnlyOrDisabled;\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    this.setAttribute('aria-required', this._required);\n    this._elements.input.required = this._required;\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#labelledBy}.\n   */\n  get labelledBy() {\n    return super.labelledBy;\n  }\n  set labelledBy(value) {\n    super.labelledBy = value;\n    \n    if (this.labelledBy && this.multiple) {\n      this._elements.tagList.setAttribute('aria-labelledby', this.labelledBy);\n    }\n    else {\n      this._elements.tagList.removeAttribute('aria-labelledby');\n    }\n  }\n  \n  /**\n   @ignore\n   \n   Not supported anymore.\n   */\n  get icon() {\n    return this._icon || '';\n  }\n  set icon(value) {\n    this._icon = transform.string(value);\n    this._reflectAttribute('icon', this._icon);\n  }\n  \n  /** @private */\n  _getName() {\n    if (this.multiple) {\n      return this._elements.tagList.name;\n    }\n    \n    return this._elements.field.name;\n  }\n  \n  /**\n   Set the name accordingly for multiple/single mode so the form submits contain only the right fields.\n   \n   @private\n   */\n  _setName(value) {\n    if (this.multiple) {\n      this._elements.tagList.name = value;\n      this._elements.field.name = '';\n    }\n    else {\n      this._elements.field.name = value;\n      this._elements.tagList.name = '';\n    }\n  }\n  \n  /** @private */\n  _startObserving() {\n    this._observer.observe(this, {\n      // Only watch the childList\n      // Items will tell us if selected/value/content changes\n      childList: true\n    });\n  }\n  \n  /**\n   Stop watching for mutations. This should be done before manually updating observed properties.\n   \n   @protected\n   */\n  _stopObserving() {\n    this._observer.disconnect();\n  }\n  \n  // Override to do nothing\n  _onInputChange(event) {\n    // stops the current event\n    event.stopPropagation();\n    \n    if (!this.multiple) {\n      \n      const inputText = this._elements.input.value.toLowerCase();\n      \n      if (this.forceSelection || inputText === '') {\n        // We need a way to deselect item in single selection mode\n        // 1) by using an empty string if this.forceSelection === false\n        // 2) by using an invalid string if this.forceSelection === true\n        const items = this.items.getAll();\n        for (let i = 0; i < items.length; i++) {\n          if (items[i].value.toLowerCase() !== inputText) {\n            items[i].selected = false;\n          }\n        }\n      }\n    }\n  }\n  \n  /**\n   Handle mutations to children and childList. This is used to keep the options in sync with DOM changes.\n   \n   @private\n   */\n  _handleMutation(mutations) {\n    for (let i = 0; i < mutations.length; i++) {\n      const mutation = mutations[i];\n      const target = mutation.target;\n      \n      if (mutation.type === 'childList' && target === this) {\n        this._setStateFromDOM();\n        return;\n      }\n    }\n  }\n  \n  /**\n   Update the option set and selected options from the DOM.\n   \n   @private\n   */\n  _setStateFromDOM() {\n    this._createOptionsFromDOM();\n    this._setSelectedFromDOM();\n  }\n  \n  /**\n   Create the set of options from nodes in the DOM.\n   \n   @private\n   */\n  _createOptionsFromDOM() {\n    // Reset options array and value to content map\n    this._options.length = 0;\n    this._optionsMap = {};\n    \n    this.items.getAll().forEach((item) => {\n      // Don't use properties as children may not be initialized yet\n      const itemObj = {\n        value: item.getAttribute('value'),\n        icon: item.getAttribute('icon'),\n        disabled: item.hasAttribute('disabled'),\n        content: item.innerHTML.replace(/\\s{2,}/g, ' ').trim(),\n        text: item.innerText\n      };\n      this._options.push(itemObj);\n      this._optionsMap[itemObj.value] = itemObj;\n    });\n    \n    // @todo update value in hidden field if changed value = old value?\n  }\n  \n  /** @private */\n  _setInputValues(value, content) {\n    this._elements.field.value = value;\n    \n    // Set text into input if in \"multiple selection mode\" or in \"single selection mode and content is not empty\"\n    // otherwise keep the current text for us (should be marked red)\n    if (this.multiple || content !== '') {\n      this._elements.input.value = content.trim();\n    }\n  }\n  \n  /** @private */\n  _reflectCurrentValue() {\n    // Use empty string if no values\n    const value = this._values.length > 0 ? this._values[0] : '';\n    \n    // Reflect the value in the field for form submit\n    this._elements.field.value = value;\n    \n    let content = '';\n    if (value !== '') {\n      // Find the object with the corresponding content\n      const itemObj = this._optionsMap[value];\n      \n      if (itemObj) {\n        // Reflect the content in the input\n        content = itemObj.content;\n      }\n      else {\n        // Just use the provided value\n        content = value;\n      }\n    }\n    \n    this._setInputValues(value, content);\n  }\n  \n  /**\n   Update the option set and selected options from the DOM\n   @ignore\n   */\n  _setSelectedFromDOM() {\n    const selectedItems = this.selectedItems;\n    \n    if (selectedItems.length) {\n      // Use this.hasAttribute('multiple') instead of this.multiple here, as this method is called from _render and element might not be ready\n      if (this.hasAttribute('multiple')) {\n        // Remove current tags\n        this._resetValues();\n        \n        // Add new ones\n        for (let i = 0; i < selectedItems.length; i++) {\n          const value = selectedItems[i].getAttribute('value');\n          const content = selectedItems[i].innerHTML;\n          this._addValue(value, content, true);\n        }\n      }\n      else {\n        // Select last\n        const last = selectedItems[selectedItems.length - 1];\n        \n        // Deselect others\n        this._deselectExcept(last, selectedItems);\n        \n        // Set value from the attribute\n        // We don't want to use the property as the sub-component may not have been upgraded yet\n        this.value = last.getAttribute('value');\n      }\n    }\n    else if (!this.hasAttribute('value')) {\n      if (this.hasAttribute('multiple')) {\n        this._resetValues();\n      }\n      else {\n        this.value = '';\n      }\n    }\n  }\n  \n  /**\n   De-select every item except the provided item.\n   \n   @param {HTMLElement} exceptItem\n   The item not to select\n   @param {Array.<HTMLElement>} [items]\n   The set of items to consider when deselecting. If not provided, the current set of selected items is used.\n   \n   @private\n   */\n  _deselectExcept(exceptItem, items) {\n    const selectedItems = items || this.selectedItems;\n    \n    // Deselect others\n    this._stopObserving();\n    for (let i = 0; i < selectedItems.length; i++) {\n      if (selectedItems[i] !== exceptItem) {\n        selectedItems[i].removeAttribute('selected');\n      }\n    }\n    this._startObserving();\n  }\n  \n  /**\n   Add a tag to the taglist.\n   \n   @private\n   */\n  _addValue(value, content, asHTML) {\n    if (!content) {\n      // Find the content\n      const itemObj = this._optionsMap[value];\n      if (itemObj) {\n        content = itemObj.content;\n      }\n      else {\n        // Just use the value\n        content = value;\n        \n        if (DEBUG) {\n          console.warn('Coral.Autocomplete: Did not have content for value %s', value);\n        }\n      }\n    }\n    \n    // Add to selected values\n    const index = this._values.indexOf(value);\n    if (index === -1) {\n      this._values.push(value);\n    }\n    else if (DEBUG) {\n      console.warn('Coral.Autocomplete: Tried to add value that was already present');\n    }\n    \n    const labelContent = {};\n    if (asHTML) {\n      labelContent.innerHTML = content;\n    }\n    else {\n      labelContent.textContent = content;\n    }\n    \n    // Create a new tag\n    const tag = new Tag().set({\n      label: labelContent,\n      value: value\n    });\n    \n    // Add to map\n    this._tagMap[value] = tag;\n    \n    // Add to taglist\n    this._elements.tagList.items.add(tag);\n    \n    // make sure to remove text from input box (to easily choose next item)\n    this._setInputValues('', '');\n  }\n  \n  /**\n   Remove a tag from the taglist.\n   \n   @private\n   */\n  _removeValue(value) {\n    // Remove from selected values\n    const index = this._values.indexOf(value);\n    \n    if (index === -1) {\n      if (DEBUG) {\n        console.warn('Coral.Autocomplete: Tried to remove tag that is not in values');\n      }\n      // Get out if we don't have the value\n      return;\n    }\n    \n    this._values.splice(index, 1);\n    \n    // Select autocomplete item\n    const item = this.querySelector(`coral-autocomplete-item[value=${JSON.stringify(value)}]`);\n    \n    if (item) {\n      if (item.hasAttribute('selected')) {\n        this._stopObserving();\n        item.removeAttribute('selected');\n        this._startObserving();\n      }\n    }\n    else if (DEBUG) {\n      console.warn('Coral.Autocomplete: Tried to remove value without corresponding item');\n    }\n    \n    // Look up the tag by value\n    const tag = this._tagMap[value];\n    \n    if (tag) {\n      // Remove from map\n      this._tagMap[value] = null;\n      \n      // Remove from taglist\n      this._elements.tagList.items.remove(tag);\n    }\n    \n    if (index !== -1) {\n      // Emit the change event when a value is removed but only after a user interaction\n      this.trigger('change');\n    }\n  }\n  \n  /**\n   Remove all tags from the taglist.\n   \n   @private\n   */\n  _clearValues() {\n    this._resetValues();\n    \n    // Deselect items\n    this._stopObserving();\n    const items = this.querySelectorAll('coral-autocomplete-item[selected]');\n    for (let i = 0; i < items.length; i++) {\n      items[i].removeAttribute('selected');\n    }\n    \n    this._startObserving();\n  }\n  \n  /**\n   Reset values without affecting the DOM.\n   \n   @private\n   */\n  _resetValues() {\n    // Reset values\n    this._values = [];\n    \n    // Drop references to tags\n    this._tagMap = {};\n    \n    // Clear taglist\n    this._elements.tagList.items.clear();\n  }\n  \n  /** @private */\n  _focusNextItem() {\n    // Display focus on next item in the selectList\n    const selectList = this._elements.selectList;\n    const currentItem = selectList.querySelector('.is-focused');\n    const input = this._elements.input;\n    const items = selectList._getSelectableItems();\n    let index;\n    let item;\n    const self = this;\n    \n    if (currentItem) {\n      index = items.indexOf(currentItem);\n      if (index < items.length - 1) {\n        item = items[index + 1];\n      }\n    }\n    else if (items && items.length > 0) {\n      item = items[0];\n    }\n    \n    window.requestAnimationFrame(() => {\n      if (item) {\n        if (currentItem) {\n          currentItem.classList.remove('is-focused');\n        }\n        self._scrollItemIntoView(item);\n        item.classList.add('is-focused');\n        input.setAttribute('aria-activedescendant', item.id);\n      }\n      if (!selectList.querySelector('.is-focused')) {\n        input.removeAttribute('aria-activedescendant');\n      }\n    });\n  }\n  \n  /** @private */\n  _focusPreviousItem() {\n    // Display focus on previous item in the selectList\n    const selectList = this._elements.selectList;\n    const currentItem = selectList.querySelector('.is-focused');\n    const input = this._elements.input;\n    const items = selectList._getSelectableItems();\n    let index;\n    let item;\n    const self = this;\n    \n    if (currentItem) {\n      index = items.indexOf(currentItem);\n      if (index > 0) {\n        item = items[index - 1];\n      }\n      currentItem.classList.remove('is-focused');\n    }\n    else if (items && items.length > 0) {\n      item = items[items.length - 1];\n    }\n    \n    window.requestAnimationFrame(() => {\n      if (item) {\n        self._scrollItemIntoView(item);\n        item.classList.add('is-focused');\n        input.setAttribute('aria-activedescendant', item.id);\n      }\n      if (!selectList.querySelector('.is-focused')) {\n        input.removeAttribute('aria-activedescendant');\n      }\n    });\n  }\n  \n  /** @private */\n  _showSuggestions() {\n    // Get value from the input\n    const inputValue = this._elements.input.value.toLowerCase().trim();\n    \n    // Since we're showing fresh suggestions, clear the existing suggestions\n    this.clearSuggestions();\n    \n    // Trigger an event\n    const event = this.trigger('coral-autocomplete:showsuggestions', {\n      // Pass user input\n      value: inputValue,\n      // Started at zero here, always\n      start: 0\n    });\n    \n    // Flag to indicate that the private method is called before public showSuggestions method\n    this._showSuggestionsCalled = true;\n    \n    if (event.defaultPrevented) {\n      // Set loading mode\n      this.loading = true;\n      \n      // Show the menu\n      this.showSuggestions();\n    }\n    else {\n      // Show suggestions that match in the DOM\n      this.addSuggestions(this._getMatches(inputValue, this._optionContainsValue));\n      this.showSuggestions();\n    }\n  }\n  \n  _onOverlayPositioned(event) {\n    // stops propagation cause the event is internal to the component\n    event.stopImmediatePropagation();\n    \n    if (this._elements.overlay.open) {\n      this._elements.overlay.style.minWidth = `${this.offsetWidth}px`;\n    }\n  }\n  \n  /** @private */\n  _onScroll() {\n    window.clearTimeout(this._scrollTimeout);\n    this._scrollTimeout = window.setTimeout(this._handleScrollBottom, SCROLL_DEBOUNCE);\n  }\n  \n  /** @private */\n  _onMouseWheel(event) {\n    const selectList = this._elements.selectList;\n    // If scrolling with mouse wheel and if it has hit the top or bottom boundary\n    // `SCROLL_BOTTOM_THRESHOLD` is ignored when hitting scroll bottom to allow debounced loading\n    if (event.deltaY < 0 && selectList.scrollTop === 0 || event.deltaY > 0 && selectList.scrollTop >= selectList.scrollHeight - selectList.clientHeight) {\n      event.preventDefault();\n    }\n  }\n  \n  /** @private */\n  _handleScrollBottom() {\n    const selectList = this._elements.selectList;\n    \n    if (selectList.scrollTop >= selectList.scrollHeight - selectList.clientHeight - SCROLL_BOTTOM_THRESHOLD) {\n      const inputValue = this._elements.input.value;\n      \n      // Do not clear the suggestions here, instead we'll expect them to append\n      \n      // Trigger an event\n      const event = this.trigger('coral-autocomplete:showsuggestions', {\n        // Pass user input\n        value: inputValue,\n        start: selectList.items.length\n      });\n      \n      if (event.defaultPrevented) {\n        // Set loading mode\n        this.loading = true;\n      }\n    }\n  }\n  \n  /** @private */\n  _handleFocusOut(event) {\n    const self = this;\n    const selectList = this._elements.selectList;\n    const target = event.target;\n    const inputBlur = target === this._elements.input;\n    \n    if (this._blurTimeout) {\n      clearTimeout(this._blurTimeout);\n    }\n    \n    // This is to hack around the fact that you cannot determine which element gets focus in a blur event\n    // Firefox doesn't support focusout/focusin, so we're left doing awful things\n    this._blurTimeout = window.setTimeout(() => {\n      const relatedTarget = document.activeElement;\n      const focusOutside = !self.contains(relatedTarget);\n      \n      // If focus has moved out of the autocomplete, it's an input event\n      if (inputBlur && focusOutside && !self.multiple) {\n        self._handleInput(event);\n      }\n      // Nothing was focused\n      else if (!relatedTarget || ((inputBlur || relatedTarget !== document.body) &&\n        // Focus is now outside of the autocomplete component\n        focusOutside ||\n        // Focus has shifted from the selectList to another element inside of the autocomplete component\n        selectList.contains(target) && !selectList.contains(relatedTarget))) {\n        self.hideSuggestions();\n      }\n    }, 0);\n  }\n  \n  /** @private */\n  _handleListFocusShift(event) {\n    if (this._elements.overlay.open) {\n      // Stop focus shift\n      event.preventDefault();\n      event.stopImmediatePropagation();\n      \n      this._hideSuggestionsAndFocus();\n    }\n  }\n  \n  /** @private */\n  _hideSuggestionsAndFocus() {\n    // Hide the menu and focus on the input\n    this.hideSuggestions();\n    this._elements.input.focus();\n  }\n  \n  /** @private */\n  _handleTriggerClick() {\n    if (this._elements.overlay.classList.contains('is-open')) {\n      this._hideSuggestionsAndFocus();\n    }\n    else {\n      // Focus on the input so down arrow works as expected\n      // Per @mijordan\n      this._showSuggestions();\n      this._elements.input.focus();\n    }\n  }\n  \n  /** @private */\n  _handleTriggerMousedown() {\n    this._elements.trigger.focus();\n  }\n  \n  /** @private */\n  _handleListItemFocus(event) {\n    const item = event.matchedTarget;\n    const selectList = this._elements.selectList;\n    const currentItem = selectList.querySelector('.is-focused');\n    const input = this._elements.input;\n    \n    if (currentItem) {\n      currentItem.classList.remove('is-focused');\n      input.removeAttribute('aria-activedescendant');\n    }\n    if (!item.disabled) {\n      this._scrollItemIntoView(item);\n      item.classList.add('is-focused');\n      input.setAttribute('aria-activedescendant', item.id);\n    }\n  }\n  \n  /** @private */\n  _scrollItemIntoView(item) {\n    const itemRect = item.getBoundingClientRect();\n    const selectListRect = this._elements.selectList.getBoundingClientRect();\n    if (itemRect.top < selectListRect.top) {\n      item.scrollIntoView();\n    }\n    else if (itemRect.bottom > selectListRect.bottom) {\n      item.scrollIntoView(false);\n    }\n  }\n  \n  /** @private */\n  _getMatches(value, optionMatchesValue) {\n    optionMatchesValue = optionMatchesValue || this._matchFunction;\n    \n    const matches = [];\n    \n    for (let i = 0; i < this._options.length; i++) {\n      if (optionMatchesValue(this._options[i], value)) {\n        matches.push(this._options[i]);\n      }\n    }\n    \n    if (!matches.length) {\n      // If there are no matches in _options,\n      // Check for matches in list, which could have been added after mounting the element\n      const buttons = this._elements.selectList.items.getAll();\n      for (let i = 0; i < buttons.length; i++) {\n        const option = {\n          value: buttons[i].value,\n          content: buttons[i].textContent.trim()\n        };\n        if (optionMatchesValue(option, value)) {\n          matches.push(option);\n        }\n      }\n    }\n    \n    return matches;\n  }\n  \n  /** @private */\n  _handleInputKeypressEnter(event) {\n    // Sigh, CUI-3973 Hitting enter quickly after typing causes form to submit\n    if (event.which === 13) {\n      this._handleInput(event);\n    }\n  }\n  \n  /** @private */\n  _handleInputEvent() {\n    // Any input makes this valid again\n    this.invalid = false;\n    \n    if (this.delay) {\n      // Wait until the use has stopped typing for delay milliseconds before getting suggestions\n      window.clearTimeout(this._timeout);\n      this._timeout = window.setTimeout(this._showSuggestions.bind(this), this.delay);\n    }\n    else {\n      // Immediately get suggestions\n      this._showSuggestions();\n    }\n  }\n  \n  /** @private */\n  _handleInput(event) {\n    let focusedItemValue;\n    \n    // Stop the event\n    event.preventDefault();\n    \n    // If a selectList item has focus, set the input value to the value of the selected item.\n    if (this._elements.overlay.open && this._elements.input.getAttribute('aria-activedescendant')) {\n      const focusedItem = this._elements.selectList.querySelector('.is-focused');\n      if (focusedItem) {\n        // Use the text content value of the item for comparison\n        focusedItemValue = focusedItem.textContent.trim();\n      }\n    }\n    \n    const value = focusedItemValue || this._elements.input.value;\n    \n    let isChange = false;\n    \n    // Get all exact matches\n    const exactMatches = this._getMatches(value, this._optionEqualsValue);\n    \n    if (exactMatches.length) {\n      // Find perfect case sensitive match else defaults to first one\n      const exactMatch = exactMatches.filter((option) => option.content === value)[0] || exactMatches[0];\n      \n      isChange = this.value !== exactMatch.value;\n      \n      // Select the matched item\n      this._selectItem(exactMatch.value, exactMatch.content, false);\n      \n      if (this.multiple) {\n        if (value.trim()) {\n          // Add tag for non-empty values\n          this._addValue(exactMatch.value, exactMatch.content, false);\n        }\n      }\n      else {\n        // Set value\n        this.value = exactMatch.value;\n      }\n      \n      // value can't be invalid as an exact match is selected\n      if (this.forceSelection) {\n        this.invalid = false;\n      }\n      \n      // Hide the suggestions so the result can be seen\n      this.hideSuggestions();\n      \n      // Emit the change event when a selection is made from an exact match\n      if (isChange === true) {\n        this.trigger('change');\n      }\n    }\n    else if (this.forceSelection) {\n      // Invalid\n      if (this.multiple) {\n        this.invalid = value !== '' || (this.values.length === 1 && this.values[0] === '' || this.values.length === 0);\n      }\n      else {\n        this.invalid = true;\n      }\n      // Leave suggestions open if nothing matches\n    }\n    else {\n      // DO NOT select the corresponding item, as this would add an item\n      // This would result in adding items that match what the user typed, resulting in selections\n      // this._selectItem(value);\n  \n      isChange = this.value !== value;\n  \n      if (this.multiple) {\n        if (value.trim()) {\n          // Add tag for non-empty values\n          this._addValue(value, null, false);\n        }\n      }\n      else {\n        // Set value\n        this.value = value;\n      }\n  \n      // Hide the suggestions so the result can be seen\n      this.hideSuggestions();\n  \n      // Emit the change event when arbitrary data is entered\n      if (isChange === true) {\n        this.trigger('change');\n      }\n    }\n    \n    this._updateButtonAccessibilityLabel();\n  }\n  \n  /**\n   This ensures the collection API is up to date with selected items, even if they come from suggestions.\n   \n   @private\n   */\n  _selectItem(value, content, asHTML) {\n    // Don't get caught up with internal changes\n    this._stopObserving();\n    \n    // Select autocomplete item if it's there\n    const item = this.querySelector(`coral-autocomplete-item[value=${JSON.stringify(value)}]`);\n    if (item) {\n      // Select the existing item\n      item.setAttribute('selected', '');\n    }\n    else {\n      const labelContent = {};\n      content = typeof content === 'undefined' ? value : content;\n      if (asHTML) {\n        labelContent.innerHTML = content;\n      }\n      else {\n        labelContent.textContent = content;\n      }\n      \n      // Add a new, selected item\n      this.items.add(new AutocompleteItem().set({\n        value: value,\n        content: labelContent,\n        selected: true\n      }));\n    }\n    \n    // Resume watching for changes\n    this._startObserving();\n  }\n  \n  /** @private */\n  _handleInputUpKeypress(event) {\n    // Stop any consequences of pressing the key\n    event.preventDefault();\n    \n    if (this._elements.overlay.open) {\n      if (event.altKey) {\n        this.hideSuggestions();\n      }\n      else {\n        this._focusPreviousItem();\n      }\n    }\n    else {\n      // Show the menu and do not focus on the first item\n      // Implements behavior of http://www.w3.org/TR/wai-aria-practices/#autocomplete\n      this._showSuggestions();\n    }\n  }\n  \n  /** @private */\n  _handleInputDownKeypress(event) {\n    // Stop any consequences of pressing the key\n    event.preventDefault();\n    \n    if (this._elements.overlay.open) {\n      this._focusNextItem();\n    }\n    else {\n      // Show the menu and do not focus on the first item\n      // Implements behavior of http://www.w3.org/TR/wai-aria-practices/#autocomplete\n      this._showSuggestions();\n    }\n  }\n  \n  /** @private */\n  _handleInputTabKeypress(event) {\n    // if the select list is open and a list item has focus, prevent default to trap focus.\n    if (this._elements.overlay.open && this._elements.input.getAttribute('aria-activedescendant')) {\n      event.preventDefault();\n    }\n  }\n  \n  /**\n   Handle selections in the selectList.\n   \n   @ignore\n   */\n  _handleSelect(event) {\n    const selectListItem = event.matchedTarget;\n    \n    if (!selectListItem || selectListItem.disabled) {\n      // @todo it doesn't seem like this should ever happen, but it does\n      return;\n    }\n    \n    // Select the corresponding item, or add one if it doesn't exist\n    this._selectItem(selectListItem.value, selectListItem.content.innerHTML, true);\n    \n    if (!this.multiple) {\n      this.value = selectListItem.value;\n      \n      // Make sure the value is changed\n      // The setter won't run if we set the same value again\n      // This forces the DOM to update\n      this._setInputValues(this.value, selectListItem.content.textContent, false);\n    }\n    else {\n      // Add to values\n      this._addValue(selectListItem.value, selectListItem.content.innerHTML, true);\n    }\n    \n    // Focus on the input element\n    // We have to wait a frame here because the item steals focus when selected\n    const self = this;\n    window.requestAnimationFrame(() => {\n      self._elements.input.focus();\n    });\n    \n    // Hide the options when option is selected in all cases\n    this.hideSuggestions();\n    \n    // Emit the change event when a selection is made\n    this.trigger('change');\n  }\n  \n  /**\n   Don't let the internal change event bubble and confuse users\n   \n   @ignore\n   */\n  _preventTagListChangeEvent(event) {\n    event.stopImmediatePropagation();\n  }\n  \n  _handleTagAdded() {\n    // Forces tags to wrap\n    this._elements.tagList.style.width = `${this.offsetWidth}px`;\n  }\n  \n  /**\n   Handle tags that are removed by the user.\n   \n   @ignore\n   */\n  _handleTagRemoved(event) {\n    // Get the tag from the event\n    const tagValue = event.detail.item.value;\n    \n    // Remove from values only if there is no other tags with the same value are attached (as this component constantly adds and removes tags)\n    // this._elements.tagList.values does not seem to work so iterate over the tags to check values\n    let removeValue = true;\n    const tags = this._elements.tagList.items.getAll();\n    for (let i = 0; i < tags.length; i++) {\n      if (tags[i].value === tagValue) {\n        removeValue = false;\n        break;\n      }\n    }\n    \n    if (removeValue) {\n      this._removeValue(tagValue);\n    }\n    \n    // If all tags were removed, return focus to the input\n    if (this.selectedItems.length === 0) {\n      this._elements.input.focus();\n    }\n    \n    this._updateButtonAccessibilityLabel();\n  }\n  \n  /**\n   Handles value changes on a child item.\n   \n   @private\n   */\n  _handleItemValueChange(event) {\n    // stop event propogation\n    event.stopImmediatePropagation();\n    \n    // Update option map from scratch\n    // @todo use attributeOldValue mutationobserver option and update map instead of re-creating\n    this._createOptionsFromDOM();\n  }\n  \n  /**\n   Handles content changes on a child item.\n   \n   @private\n   */\n  _handleItemContentChange(event) {\n    // stop event propogation\n    event.stopImmediatePropagation();\n    \n    // Update option map from scratch with new content\n    this._createOptionsFromDOM();\n  }\n  \n  /**\n   Handles selected changes on a child item.\n   \n   @private\n   */\n  _handleItemSelectedChange(event) {\n    // stop event propogation\n    event.stopImmediatePropagation();\n    \n    const target = event.target;\n    const selected = target.hasAttribute('selected');\n    if (this.multiple) {\n      this[selected ? '_addValue' : '_removeValue'](target.value, target.content.innerHTML, true);\n    }\n    else if (selected) {\n      // Set the input text accordingly\n      this._elements.input.value = target.content.textContent.replace(/\\s{2,}/g, ' ').trim();\n      // Set the value accordingly\n      this.value = target.value;\n      // value can't be invalid as an item is selected\n      this.invalid = false;\n  \n      // Deselect the other elements if selected programatically changed\n      this._deselectExcept(target);\n    }\n    // Remove values if deselected\n    // Only do this if we're the current value\n    // If the selected item was changed, this.value will be different\n    else if (this.value === target.value) {\n      this.value = '';\n      \n      // CUI-5533 Since checks inside of _handleInput will assume the value hasn't change,\n      // We need to trigger here\n      this.trigger('change');\n    }\n  }\n  \n  /**\n   Check if the given option partially matches the given value.\n   \n   @param {HTMLElement} option\n   The option to test\n   @param {String} value\n   The value to test\n   \n   @returns {Boolean} true if the value matches, false if not.\n   \n   @protected\n   */\n  _optionContainsValue(option, value) {\n    value = (typeof value === 'string' ? value : '').toLowerCase();\n    return (option.text || option.content).toLowerCase().indexOf(value) !== -1;\n  }\n  \n  /**\n   Check if the given option starts with the given value.\n   \n   @param {HTMLElement} option\n   The option to test\n   @param {String} value\n   The value to test\n   \n   @returns {Boolean} true if the value matches, false if not.\n   \n   @protected\n   */\n  _optionStartsWithValue(option, value) {\n    value = (typeof value === 'string' ? value : '').toLowerCase();\n    return option.content.toLowerCase().trim().indexOf(value) === 0;\n  }\n  \n  /**\n   Check if the given option exactly matches the given value.\n   \n   @param {HTMLElement} option\n   The option to test\n   @param {String} value\n   The value to test\n   \n   @returns {Boolean} true if the value matches, false if not.\n   \n   @protected\n   */\n  _optionEqualsValue(option, value) {\n    value = (typeof value === 'string' ? value : '').toLowerCase();\n    return option.content.toLowerCase().trim() === value;\n  }\n  \n  /**\n   Updates label on toggle button to communicate number of suggestions in list.\n   \n   @param {Number} num\n   The number of suggestions available\n   @private\n   */\n  _updateButtonAccessibilityLabel(num) {\n    let str = i18n.get('Show suggestions');\n    \n    if (num === 1) {\n      str = i18n.get('Show suggestion');\n    }\n    else if (num > 1) {\n      str = i18n.get('Show {0} suggestions', num);\n    }\n    \n    this._elements.trigger.setAttribute('aria-label', str);\n    this._elements.trigger.setAttribute('title', str);\n  }\n  \n  /**\n   Clears the current selected value or items.\n   */\n  clear() {\n    this.value = '';\n    this._elements.input.clear();\n    \n    if (this.multiple) {\n      this._clearValues();\n    }\n  }\n  \n  /**\n   Clear the list of suggestions.\n   */\n  clearSuggestions() {\n    this._elements.selectList.items.clear();\n    this._updateButtonAccessibilityLabel();\n  }\n  \n  /**\n   A suggestion object.\n   \n   @typedef {Object} AutocompleteSuggestion\n   \n   @property {String} value\n   The form submission value to use when this suggestion is selected.\n   @property {String} [content=value]\n   The content to disable in the suggestion dropdown.\n   */\n  \n  /**\n   Add the provided list of suggestions and clear loading status.\n   \n   @param {Array.<AutocompleteSuggestion>} suggestions\n   The list of suggestions to show.\n   @param {Boolean} clear\n   If true, existing suggestions will be cleared.\n   */\n  addSuggestions(suggestions, clear) {\n    // Disable loading mode\n    this.loading = false;\n    \n    if (clear) {\n      // Remove existing selectList items\n      this.clearSuggestions();\n    }\n    \n    // Add items to the selectlist\n    for (let i = 0; i < suggestions.length; i++) {\n      const value = suggestions[i].value;\n      const content = suggestions[i].content;\n      const icon = suggestions[i].icon;\n      const disabled = !!suggestions[i].disabled;\n      \n      // Only add the item if it's not a selected value or we're in single mode\n      if (!this.multiple || this.values.indexOf(value) === -1) {\n        this._elements.selectList.items.add({\n          value: value,\n          type: 'button',\n          icon: icon,\n          disabled: disabled,\n          id: commons.getUID(),\n          tabIndex: -1,\n          content: {\n            innerHTML: content\n          }\n        });\n        this._elements.selectList.items.last().setAttribute('role', 'option');\n      }\n    }\n    \n    if (!suggestions.length && !this._elements.selectList.items.length) {\n      // Show \"no results\" when no suggestions are found at all\n      this._elements.selectList.items.add({\n        type: 'button',\n        content: {\n          innerHTML: `<em>${i18n.get('No matching results.')}</em>`\n        },\n        disabled: true\n      });\n      this._elements.selectList.items.last().setAttribute('role', 'status');\n      this._elements.selectList.items.last().setAttribute('aria-live', 'polite');\n      this._elements.input.removeAttribute('aria-activedescendant');\n      this._updateButtonAccessibilityLabel();\n    }\n    else {\n      this._updateButtonAccessibilityLabel(this._elements.selectList.items.length);\n    }\n  }\n  \n  /**\n   Shows the suggestion UI.\n   */\n  showSuggestions() {\n    if (!this._showSuggestionsCalled) {\n      this._showSuggestions();\n    }\n    else {\n      this._showSuggestionsCalled = false;\n    }\n    \n    if (this._elements.overlay.open) {\n      // Force overlay repositioning (remote loading)\n      requestAnimationFrame(() => {\n        this._elements.overlay.reposition();\n      });\n    }\n    else {\n      // Just show\n      this._elements.overlay.open = true;\n    }\n    \n    this.setAttribute('aria-expanded', 'true');\n  }\n  \n  /**\n   Hides the suggestion UI.\n   */\n  hideSuggestions() {\n    this._elements.overlay.open = false;\n    \n    this.setAttribute('aria-expanded', 'false');\n    this._elements.input.removeAttribute('aria-activedescendant');\n    \n    // Don't let the suggestions show\n    window.clearTimeout(this._timeout);\n    \n    // Trigger an event\n    this.trigger('coral-autocomplete:hidesuggestions');\n  }\n  \n  // JSDocs inherited from coralui-mixin-formfield\n  reset() {\n    // reset the values to the initial values\n    this.values = this._initialSelectedValues;\n  }\n  \n  /**\n   Returns {@link Autocomplete} match options.\n   \n   @return {AutocompleteMatchEnum}\n   */\n  static get match() { return match; }\n  \n  /**\n   Returns {@link Autocomplete} variants.\n   \n   @return {AutocompleteVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'multiple',\n      'delay',\n      'forceselection',\n      'forceSelection',\n      'placeholder',\n      'maxlength',\n      'maxLength',\n      'icon',\n      'match',\n      'loading',\n      'variant'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Container role per ARIA Autocomplete\n    this.setAttribute('role', 'presentation');\n  \n    // Input attributes per ARIA Autocomplete\n    this._elements.input.setAttribute('role', 'combobox');\n    this._elements.input.setAttribute('aria-autocomplete', 'list');\n    this._elements.input.setAttribute('aria-haspopup', 'true');\n    this._elements.input.setAttribute('aria-controls', this._elements.selectList.id);\n  \n    // Trigger button attributes per ARIA Autocomplete\n    this._elements.trigger.setAttribute('aria-haspopup', 'true');\n    this._elements.trigger.setAttribute('aria-controls', this._elements.selectList.id);\n  \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n  \n    // Create a fragment\n    const frag = document.createDocumentFragment();\n  \n    // Cannot be open by default when rendered\n    this._elements.overlay.removeAttribute('open');\n    \n    // Render the template\n    frag.appendChild(this._elements.overlay);\n    frag.appendChild(this._elements.field);\n    frag.appendChild(this._elements.inputGroup);\n    frag.appendChild(this._elements.tagList);\n  \n    this._elements.overlay.target = this._elements.trigger;\n  \n    // Clean up\n    while (this.firstChild) {\n      const child = this.firstChild;\n      // Only works if all root template elements have a handle attribute\n      if (child.nodeType === Node.TEXT_NODE || child.hasAttribute && !child.hasAttribute('handle')) {\n        // Add non-template elements to the content\n        frag.appendChild(child);\n      }\n      else {\n        // Remove anything else\n        this.removeChild(child);\n      }\n    }\n  \n    // Append the fragment to the component\n    this.appendChild(frag);\n  \n    // Set the state from the DOM when initialized\n    this._setStateFromDOM();\n  \n    // save initial selection (used for reset)\n    this._initialSelectedValues = this.values.slice(0);\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    \n    // In case it was moved out don't forget to remove it\n    if (!this.contains(this._elements.overlay)) {\n      this._elements.overlay.remove();\n    }\n  }\n}\n\nexport default Autocomplete;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport translations from './i18n/translations.json';\nimport {strings, commons} from '../coralui-util';\nimport Autocomplete from './src/scripts/Autocomplete';\nimport AutocompleteItem from './src/scripts/AutocompleteItem';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-autocomplete': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-autocomplete-item', AutocompleteItem);\nwindow.customElements.define('coral-autocomplete', Autocomplete);\n\nAutocomplete.Item = AutocompleteItem;\n\nexport {Autocomplete};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"nativeSelect\"] = document.createElement(\"select\");\n  el0.className += \" _coral-ButtonGroup-select\";\n  el0.setAttribute(\"tabindex\", \"-1\");\n  el0.setAttribute(\"handle\", \"nativeSelect\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport {Button} from '../../../coralui-component-button';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport base from '../templates/base';\nimport {transform, validate, commons} from '../../../coralui-util';\n\n/**\n Enumeration for {@link ButtonGroup} selection options.\n \n @typedef {Object} ButtonGroupSelectionModeEnum\n \n @property {String} NONE\n None is default, selection of buttons doesn't happen based on click.\n @property {String} SINGLE\n Single selection mode, button group behaves like radio input elements.\n @property {String} MULTIPLE\n Multiple selection mode, button group behaves like checkbox input elements.\n */\nconst selectionMode = {\n  NONE: 'none',\n  SINGLE: 'single',\n  MULTIPLE: 'multiple'\n};\n\n/** @const Selector used to recognized an item of the ButtonGroup */\nconst ITEM_SELECTOR = 'button[is=\"coral-button\"]';\n\n/**\n Extracts the value from the item in case no explicit value was provided.\n @param {HTMLElement} item\n the item whose value will be extracted.\n @returns {String} the value that will be submitted for this item.\n @private\n */\nconst itemValueFromDOM = function(item) {\n  const attr = item.getAttribute('value');\n  // checking explicitely for null allows to differenciate between non set values and empty strings\n  return attr !== null ? attr : item.textContent.replace(/\\s{2,}/g, ' ').trim();\n};\n\nconst CLASSNAME = '_coral-ButtonGroup';\n\n/**\n @class Coral.ButtonGroup\n @classdesc A ButtonGroup component that can be used as a selection form field.\n @htmltag coral-buttongroup\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass ButtonGroup extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Store template\n    this._elements = {};\n    base.call(this._elements);\n  \n    // Pre-define labellable element\n    this._labellableElement = this;\n  \n    // save initial selection (used for reset)\n    this._initalSelectedValues = [];\n    \n    // Attach events\n    this._delegateEvents(commons.extend(this._events, {\n      'click button[is=\"coral-button\"]': '_onButtonClick',\n  \n      'capture:focus button[is=\"coral-button\"]': '_onButtonFocus',\n      'capture:blur button[is=\"coral-button\"]': '_onButtonBlur',\n  \n      'key:up button[is=\"coral-button\"]': '_onButtonKeyUpLeft',\n      'key:left button[is=\"coral-button\"]': '_onButtonKeyUpLeft',\n      'key:down button[is=\"coral-button\"]': '_onButtonKeyDownRight',\n      'key:right button[is=\"coral-button\"]': '_onButtonKeyDownRight',\n      'key:home button[is=\"coral-button\"]': '_onButtonKeyHome',\n      'key:end button[is=\"coral-button\"]': '_onButtonKeyEnd',\n      \n      'coral-button:_valuechanged button[is=\"coral-button\"]': '_onButtonValueChanged',\n      'coral-button:_selectedchanged button[is=\"coral-button\"]': '_onButtonSelectedChanged'\n    }));\n    \n    // Init the mutation observer but we don't handle the initial items in the constructor\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // we do lazy initialization of the collection\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemBaseTagName: 'button',\n        itemTagName: 'coral-button',\n        itemSelector: ITEM_SELECTOR,\n        onItemAdded: this._onItemAdded,\n        onItemRemoved: this._onItemRemoved,\n        onCollectionChange: this._onCollectionChange\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /**\n   Selection mode of Button group\n   \n   @type {String}\n   @default Coral.ButtonGroup.selectionMode.NONE\n   @htmlattribute selectionmode\n   @htmlattributereflected\n   */\n  get selectionMode() {\n    return this._selectionMode || selectionMode.NONE;\n  }\n  set selectionMode(value) {\n    value = transform.string(value).toLowerCase();\n    this._selectionMode = validate.enumeration(selectionMode)(value) && value || selectionMode.NONE;\n    this._reflectAttribute('selectionmode', this._selectionMode);\n\n    // update select element if multiple\n    // this is required while appplying default selection\n    // if selection mode is single first elem gets selected but for multiple its not\n    this._elements.nativeSelect.multiple = this._selectionMode === selectionMode.MULTIPLE;\n\n    // Sync\n    if (this._selectionMode === selectionMode.SINGLE) {\n      this.setAttribute('role', 'radiogroup');\n\n      // makes sure the internal options are properly initialized\n      this._syncItemOptions();\n\n      // we make sure the selection is valid by explicitly finding a candidate or making sure just 1 item is\n      // selected\n      this._validateSelection();\n    }\n    else if (this._selectionMode === selectionMode.MULTIPLE) {\n      this.setAttribute('role', 'group');\n\n      // makes sure the internal options are properly initialized\n      this._syncItemOptions();\n    }\n    else {\n      this.setAttribute('role', 'group');\n\n      this._removeItemOptions();\n    }\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._elements.nativeSelect.name;\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n    \n    this._elements.nativeSelect.name = value;\n  }\n  \n  /**\n   This field's current value.\n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    return this._elements.nativeSelect.value;\n  }\n  set value(value) {\n    if (this.selectionMode === selectionMode.NONE) {\n      return;\n    }\n  \n    // we proceed to select the provided value\n    this._selectItemByValue([value]);\n  }\n  \n  /**\n   Returns an Array containing the selected buttons.\n   \n   @type {Array.<HTMLElement>}\n   @readonly\n   */\n  get selectedItems() {\n    if (this.selectionMode === selectionMode.MULTIPLE) {\n      return this.items._getAllSelected();\n    }\n    \n    const item = this.selectedItem;\n    return item ? [item] : [];\n  }\n  \n  /**\n   Returns the first selected button in the Button Group. The value <code>null</code> is returned if no button is\n   selected.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.selectionMode === selectionMode.MULTIPLE ?\n      this.items._getFirstSelected() :\n      this.items._getLastSelected();\n  }\n  \n  /**\n   Current selected values as submitted during form submission.\n   \n   @type {Array.<String>}\n   */\n  get values() {\n    const values = [];\n\n    // uses the nativeSelect since it holds the truth of what will be submitted with the form\n    const selectedOptions = this._elements.nativeSelect.querySelectorAll(':checked');\n    for (let i = 0, selectedOptionsCount = selectedOptions.length; i < selectedOptionsCount; i++) {\n      values.push(selectedOptions[i].value);\n    }\n\n    return values;\n  }\n  set values(values) {\n    if (Array.isArray(values) && this.selectionMode !== selectionMode.NONE) {\n      // just keeps the first value if selectionMode is not multiple\n      if (this.selectionMode !== selectionMode.MULTIPLE && values.length > 1) {\n        values = [values[0]];\n      }\n    \n      // we proceed to select the provided values\n      this._selectItemByValue(values);\n    }\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n  \n    const isDisabled = this.disabled || this.readOnly;\n    this._elements.nativeSelect.disabled = isDisabled;\n    // Also update for all the items the disabled property so it matches the native select.\n    this.items.getAll().forEach((item) => {\n      item.disabled = isDisabled;\n    });\n    this.setAttribute('aria-disabled', isDisabled);\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n  \n    const self = this;\n    this._elements.nativeSelect.disabled = this.readOnly || this.disabled;\n    // Also update for all the items the disabled property so it matches the native select.\n    this.items.getAll().forEach((item) => {\n      item.disabled = self.disabled || self.readOnly && !item.hasAttribute('selected');\n      if (self.readOnly) {\n        item.setAttribute('aria-disabled', true);\n      }\n      else {\n        item.removeAttribute('aria-disabled');\n      }\n    });\n    // aria-readonly is not permitted on elements with role=\"radiogroup\" or role=\"group\"\n    this.removeAttribute('aria-readonly');\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n  \n    this._elements.nativeSelect.required = this.required;\n    // aria-required is permitted on elements with role=\"radiogroup\" but not with role=\"group\"\n    if (this.selectionMode !== selectionMode.SINGLE) {\n      this.removeAttribute('aria-required');\n    }\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#labelledBy}.\n   */\n  get labelledBy() {\n    return super.labelledBy;\n  }\n  set labelledBy(value) {\n    super.labelledBy = value;\n    this._elements.nativeSelect.setAttribute('aria-labelledby', this.labelledBy);\n  }\n  \n  // JSDocs inherited\n  reset() {\n    // reset the values to the initial values\n    this.values = this._initalSelectedValues;\n  }\n  \n  /** @private */\n  _onButtonClick(event) {\n    // uses matchTarget to make sure the buttons is handled and not an internal component\n    const item = event.matchedTarget;\n  \n    this._onButtonFocus(event);\n  \n    if (this.readOnly) {\n      event.preventDefault();\n      event.stopImmediatePropagation();\n      return;\n    }\n  \n    if (this.selectionMode === selectionMode.SINGLE) {\n      // prevent event only if selectionMode is not of type none\n      event.preventDefault();\n    \n      // first unselect the other element\n      const selectedItems = this.items._getAllSelected();\n    \n      // we deselect the previously selected item\n      if (selectedItems.length !== 0 && selectedItems[0] !== item) {\n        this._toggleItemSelection(selectedItems[0], false);\n      }\n    \n      // forces the selection on the clicked item\n      this._toggleItemSelection(item, true);\n    \n      // if the same button was clicked we do not need to trigger an event\n      if (selectedItems[0] !== item) {\n        this.trigger('change');\n      }\n    }\n    else if (this.selectionMode === selectionMode.MULTIPLE) {\n      // prevent event only if selectionMode is not of type none\n      event.preventDefault();\n    \n      this._toggleItemSelection(item);\n    \n      // since we toggle the selection we always trigger a change event\n      this.trigger('change');\n    }\n  }\n  \n  /** @private */\n  _onButtonFocus(event) {\n    const item = event.matchedTarget;\n    const buttons = this.items.getAll();\n    const buttonsCount = buttons.length;\n  \n    let button;\n    for (let i = 0; i < buttonsCount; i++) {\n      // stores the reference\n      button = buttons[i];\n      button.setAttribute('tabindex', button === item ? 0 : -1);\n    }\n  }\n  \n  /** @private */\n  _onButtonBlur(event) {\n    const item = event.matchedTarget;\n    const buttons = this.items.getAll();\n    const buttonsCount = buttons.length;\n  \n    let button;\n    let tabindex;\n    const selectedItemsLength = this.selectedItems.length;\n    const firstSelectable = this.items._getFirstSelectable();\n    let isSelected = false;\n    for (let i = 0; i < buttonsCount; i++) {\n      // stores the reference\n      button = buttons[i];\n      isSelected = button.hasAttribute('selected');\n      if (this.selectionMode === selectionMode.SINGLE) {\n        // selected item should be tabbable\n        tabindex = isSelected ? 0 : -1;\n      }\n      else if (this.selectionMode === selectionMode.MULTIPLE) {\n        tabindex =\n          // if no items are selected, first item should be tabbable\n          !selectedItemsLength && i === 0 ||\n          // if the element losing focus is selected, it should be tabbable\n          isSelected && button === item ||\n          // if the element losing focus is not selected, the last selected item should be tabbable\n          !item.hasAttribute('selected') &&\n          button === (this.selectedItems[selectedItemsLength - 1] || firstSelectable) ? 0 : -1;\n      }\n      else {\n        // first item should be tabbable\n        tabindex = button === firstSelectable ? 0 : -1;\n      }\n      button.setAttribute('tabindex', tabindex);\n    }\n  }\n  \n  /** @private */\n  _onButtonKeyUpLeft(event) {\n    event.preventDefault();\n  \n    const item = event.matchedTarget;\n    let button = item.previousElementSibling;\n  \n    // skip disabled items\n    while (!button || (button.disabled || button.nodeName !== 'BUTTON')) {\n      if (!button) {\n        button = this.items._getLastSelectable();\n      }\n      else {\n        button = button.previousElementSibling;\n      }\n    }\n  \n    if (button !== item) {\n      if (this.selectionMode === selectionMode.SINGLE) {\n        button.click();\n      }\n      this._setFocusToButton(button);\n    }\n  }\n  \n  /** @private */\n  _onButtonKeyDownRight(event) {\n    event.preventDefault();\n  \n    const item = event.matchedTarget;\n    let button = item.nextElementSibling;\n  \n    // skip disabled items\n    while (!button || (button.disabled || button.nodeName !== 'BUTTON')) {\n      if (!button) {\n        button = this.items._getFirstSelectable();\n      }\n      else {\n        button = button.nextElementSibling;\n      }\n    }\n  \n    if (button !== item) {\n      if (this.selectionMode === selectionMode.SINGLE) {\n        button.click();\n      }\n      this._setFocusToButton(button);\n    }\n  }\n  \n  /** @private */\n  _onButtonKeyHome(event) {\n    event.preventDefault();\n  \n    const item = event.matchedTarget;\n    const button = this.items._getFirstSelectable();\n  \n    if (button !== item) {\n      if (this.selectionMode === selectionMode.SINGLE) {\n        button.click();\n      }\n      this._setFocusToButton(button);\n    }\n  }\n  \n  /** @private */\n  _onButtonKeyEnd(event) {\n    event.preventDefault();\n  \n    const item = event.matchedTarget;\n    const button = this.items._getLastSelectable();\n  \n    if (button !== item) {\n      if (this.selectionMode === selectionMode.SINGLE) {\n        button.click();\n      }\n      this._setFocusToButton(button);\n    }\n  }\n  \n  /** @private */\n  _setFocusToButton(button) {\n    if (button) {\n      button.focus();\n    }\n  }\n  \n  /** @private */\n  _onItemAdded(item) {\n    // Store variant to be able to reset it when item is removed\n    item._initialVariant = item._initialVariant || item.variant;\n    \n    // Custom variant\n    item.variant = Button.variant._CUSTOM;\n    \n    // We need to add button group specific classes to style the button correctly\n    item.classList.add('_coral-ButtonGroup-item');\n    item.classList.add('_coral-Button--toggle');\n    \n    if (this.selectionMode !== selectionMode.NONE) {\n      if (this.selectionMode === selectionMode.SINGLE) {\n        item.setAttribute('role', 'radio');\n        item.setAttribute('tabindex', item.hasAttribute('selected') ? 0 : -1);\n      }\n      else {\n        item.setAttribute('role', 'checkbox');\n      }\n      item.setAttribute('aria-checked', item.hasAttribute('selected'));\n    }\n    else {\n      item.removeAttribute('role');\n    }\n  \n    item.disabled = this.disabled || this.readOnly && !item.hasAttribute('selected');\n  \n    if (this.readOnly) {\n      item.setAttribute('aria-disabled', true);\n    }\n    else {\n      item.removeAttribute('aria-disabled');\n    }\n  \n    this._addItemOption(item);\n   \n    // Handle the case where we might have multiple items selected while single selection mode is on\n    if (this.selectionMode === selectionMode.SINGLE) {\n      const selectedItems = this.items._getAllSelected();\n      // The last added item will stay selected\n      if (selectedItems.length > 1 && item.hasAttribute('selected')) {\n        item.removeAttribute('selected');\n      }\n    }\n  }\n  \n  /** @private */\n  _onItemRemoved(item) {\n    // Restore variant\n    item.variant = item._initialVariant;\n    item._initialVariant = undefined;\n    \n    // We clear the classes that were added\n    item.classList.remove('_coral-ButtonGroup-item');\n    item.classList.remove('_coral-Button--toggle');\n    item.removeAttribute('role');\n    \n    const self = this;\n    if (!item.parentNode) {\n      // Remove the item from the initial selected values\n      const index = self._initalSelectedValues.indexOf(item.value);\n      if (index !== -1) {\n        self._initalSelectedValues.splice(index, 1);\n      }\n    }\n    \n    // delete option\n    if (item.option) {\n      item.option.parentNode.removeChild(item.option);\n      item.option = undefined;\n    }\n  }\n  \n  /** @private */\n  _onCollectionChange() {\n    // we need to make sure that the state of the selectionMode is valid\n    this._validateSelection();\n  }\n  \n  /** @private */\n  _onButtonSelectedChanged(event) {\n    event.stopImmediatePropagation();\n  \n    const button = event.target;\n    const isSelected = button.hasAttribute('selected');\n\n    // when in single mode, we need to make sure the current selection is valid\n    if (this.selectionMode === selectionMode.SINGLE) {\n      this._validateSelection(isSelected ? button : null);\n    }\n    else {\n      // we simply toggle the selection\n      this._toggleItemSelection(button, isSelected);\n    }\n  }\n  \n  /** @private */\n  _onButtonValueChanged(event) {\n    event.stopImmediatePropagation();\n  \n    const button = event.target;\n    // Make sure option is attached before setting the value\n    if (this.selectionMode !== selectionMode.NONE) {\n      button.option.value = itemValueFromDOM(button);\n    }\n  }\n  \n  /**\n   Toggles the selected state of the item. When <code>selected</code> is provided, it is set as the current state. If\n   the value is ommited, then the selected is toggled.\n   \n   @param {HTMLElement} item\n   Item whose selection needs to be updated.\n   @param {Boolean} [selected]\n   Whether the item is selected. If it is not provided, then it is toggled.\n   \n   @private\n   */\n  _toggleItemSelection(item, selected) {\n    const ariaCheckedAttr = item.getAttribute('aria-checked');\n    const tabIndexAttr = item.getAttribute('tabindex');\n    \n    // if selected is provided it is used to enforce the selection, otherwise we toggle the current state\n    selected = typeof selected !== 'undefined' ? selected : !item.hasAttribute('selected');\n    \n    // only manipulates the attributes when necessary to avoid unnecessary mutations\n    if (selected) {\n      if (!item.hasAttribute('selected')) {\n        item.setAttribute('selected', '');\n      }\n      \n      if (ariaCheckedAttr !== 'true') {\n        item.setAttribute('aria-checked', true);\n      }\n      \n      if (this.selectionMode === selectionMode.SINGLE && tabIndexAttr !== '0') {\n        item.setAttribute('tabindex', 0);\n      }\n    }\n    else if (!selected) {\n      if (item.hasAttribute('selected')) {\n        item.removeAttribute('selected');\n      }\n      \n      if (this.selectionMode !== selectionMode.NONE) {\n        if (ariaCheckedAttr !== 'false') {\n          item.setAttribute('aria-checked', false);\n        }\n        \n        if (this.selectionMode === selectionMode.SINGLE && tabIndexAttr !== '-1') {\n          item.setAttribute('tabindex', -1);\n        }\n      }\n      else {\n        item.removeAttribute('aria-checked');\n        item.removeAttribute('tabindex');\n      }\n    }\n    \n    // if element.option is present - absent when selection mode changed to none\n    if (item.option) {\n      item.option.selected = selected;\n    }\n  }\n  \n  \n  _selectItemByValue(values) {\n    // queries all the buttons to change their selection state\n    const buttons = this.items.getAll();\n    let item;\n    \n    for (let i = 0, buttonsCount = buttons.length; i < buttonsCount; i++) {\n      // stores the reference\n      item = buttons[i];\n      \n      // if the value is inside the new values array it should be selected\n      this._toggleItemSelection(item, values.indexOf(itemValueFromDOM(item)) !== -1);\n    }\n  }\n  \n  /** @private */\n  _setInitialValues() {\n    if (this.selectionMode !== selectionMode.NONE) {\n      const selectedItems = this.selectedItems;\n      for (let i = 0, selectedItemsCount = selectedItems.length; i < selectedItemsCount; i++) {\n        // Store _initalSelectedValues for reset\n        this._initalSelectedValues.push(selectedItems[i].value);\n  \n        // Same goes for native select\n        this._addItemOption(selectedItems[i]);\n      }\n    }\n  }\n  \n  /** @private */\n  _addItemOption(item) {\n    if (this.selectionMode === selectionMode.NONE) {\n      return;\n    }\n    \n    // if already attached return\n    if (item.option) {\n      return;\n    }\n    \n    const option = document.createElement('option');\n    option.value = itemValueFromDOM(item);\n  \n    if (item.hasAttribute('selected')) {\n      option.setAttribute('selected', '');\n    }\n    \n    // add it to DOM. In single selectionMode the first item gets selected automatically\n    item.option = option;\n    this._elements.nativeSelect.add(option);\n    \n    // we make sure the options reflect the state of the button\n    this._toggleItemSelection(item, item.hasAttribute('selected'));\n  }\n  \n  /** @private */\n  _removeItemOptions() {\n    // Find all buttons and try attaching corresponding option elem\n    const buttons = this.items.getAll();\n    \n    let item;\n    for (let i = 0, buttonsCount = buttons.length; i < buttonsCount; i++) {\n      // stores the reference\n      item = buttons[i];\n      \n      item.removeAttribute('role');\n      item.removeAttribute('aria-checked');\n      \n      // single we are removing the options, selection must also go away\n      if (item.hasAttribute('selected')) {\n        this._toggleItemSelection(item, false);\n      }\n      \n      // we clear the related option element\n      if (item.option) {\n        item.option.parentNode.removeChild(item.option);\n        delete item.option;\n      }\n    }\n  }\n  \n  /** @private */\n  _syncItemOptions() {\n    // finds all buttons and try attaching corresponding option elem\n    const buttons = this.items.getAll();\n    const buttonsCount = buttons.length;\n    let i = 0;\n    \n    let role = null;\n    if (this.selectionMode === selectionMode.SINGLE) {\n      role = 'radio';\n    }\n    else if (this.selectionMode === selectionMode.MULTIPLE) {\n      role = 'checkbox';\n    }\n    \n    let button;\n    let isSelected = false;\n    \n    for (i; i < buttonsCount; i++) {\n      // try attaching corresponding input element\n      this._addItemOption(buttons[i]);\n    }\n    \n    // We need to set the right state for the native select AFTER all buttons have been added\n    // (as we can't disable options while there is only one option attached [at least in FF])\n    for (i = buttonsCount - 1; i >= 0; i--) {\n      button = buttons[i];\n      isSelected = button.hasAttribute('selected');\n      button.option.selected = isSelected;\n      button.setAttribute('aria-checked', isSelected);\n      \n      if (role) {\n        button.setAttribute('role', role);\n      }\n      else {\n        button.removeAttribute('role');\n      }\n    }\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    // when selectionMode = single, we need to force a selection\n    if (this.selectionMode === selectionMode.SINGLE) {\n      // gets the current selection\n      const selection = this.items._getAllSelected();\n      const selectionCount = selection.length;\n\n      // if no item is currently selected, we need to find a candidate\n      if (selectionCount === 0) {\n        // gets the first candidate for selection\n        const selectable = this.items._getFirstSelectable();\n\n        if (selectable) {\n          this._toggleItemSelection(selectable, true);\n        }\n      }\n      // more items are selected, so we find a single item and deselect everything else\n      else if (selectionCount > 1) {\n        // if no item was provided we force the selection on the first item\n        item = item || selection[0];\n\n        // we make sure the item is selected, this is important to match the options with the selection\n        this._toggleItemSelection(item, true);\n\n        for (let i = 0; i < selectionCount; i++) {\n          if (selection[i] !== item) {\n            this._toggleItemSelection(selection[i], false);\n          }\n        }\n      }\n    }\n  }\n  \n  /**\n   Returns {@link ButtonGroup} selection options.\n   \n   @return {ButtonGroupSelectionModeEnum}\n   */\n  static get selectionMode() { return selectionMode; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'selectionmode',\n      'selectionMode'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Default reflected attributes\n    if (!this._selectionMode) { this.selectionMode = selectionMode.NONE; }\n    \n    // Create a fragment\n    const frag = document.createDocumentFragment();\n  \n    // Render the template\n    frag.appendChild(this._elements.nativeSelect);\n  \n    // Clean up\n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.TEXT_NODE ||\n        child.getAttribute('handle') !== 'nativeSelect') {\n        // Add non-template elements to the content\n        frag.appendChild(child);\n      }\n      else {\n        // Remove anything else\n        this.removeChild(child);\n      }\n    }\n  \n    // Append the fragment to the component\n    this.appendChild(frag);\n  \n    // Need to store and set the initially selected values in the native select so that it can reset\n    this._setInitialValues();\n  \n    // Call onItemAdded and onCollectionChange on the existing items\n    this.items._startHandlingItems();\n  }\n}\n\nexport default ButtonGroup;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport ButtonGroup from './src/scripts/ButtonGroup';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-buttongroup', ButtonGroup);\n\nexport {ButtonGroup};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"input\"] = document.createElement(\"input\");\n  el0.setAttribute(\"handle\", \"input\");\n  el0.setAttribute(\"type\", \"hidden\");\n  el0.setAttribute(\"name\", \"\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"header\"] = document.createElement(\"div\");\n  el2.setAttribute(\"handle\", \"header\");\n  el2.className += \" _coral-Calendar-header\";\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  var el4 = this[\"heading\"] = document.createElement(\"div\");\n  el4.setAttribute(\"handle\", \"heading\");\n  el4.className += \" coral-Heading _coral-Calendar-heading\";\n  el4.id = data_0[\"commons\"][\"getUID\"]();\n  el4.setAttribute(\"role\", \"heading\");\n  el4.setAttribute(\"aria-live\", \"assertive\");\n  el4.setAttribute(\"aria-atomic\", \"true\");\n  el2.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el5);\n  var el6 = this[\"prev\"] = document.createElement(\"button\",\"coral-button\");\n  el6.setAttribute(\"type\", \"button\");\n  el6.setAttribute(\"handle\", \"prev\");\n  el6.className += \" _coral-Calendar-prevMonth\";\n  el6.setAttribute(\"is\", \"coral-button\");\n  el6.setAttribute(\"variant\", \"icon\");\n  el6.setAttribute(\"icon\", \"spectrum-css-icon-CarouselLeftChevron\");\n  el6.setAttribute(\"iconsize\", \"XS\");\n  el6.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('Previous'));\n  el6.setAttribute(\"title\", data_0[\"i18n\"][\"get\"]('Previous'));\n  el2.appendChild(el6);\n  var el7 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el7);\n  var el8 = this[\"next\"] = document.createElement(\"button\",\"coral-button\");\n  el8.setAttribute(\"type\", \"button\");\n  el8.setAttribute(\"handle\", \"next\");\n  el8.className += \" _coral-Calendar-nextMonth\";\n  el8.setAttribute(\"is\", \"coral-button\");\n  el8.setAttribute(\"variant\", \"icon\");\n  el8.setAttribute(\"icon\", \"spectrum-css-icon-CarouselRightChevron\");\n  el8.setAttribute(\"iconsize\", \"XS\");\n  el8.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('Next'));\n  el8.setAttribute(\"title\", data_0[\"i18n\"][\"get\"]('Next'));\n  el2.appendChild(el8);\n  var el9 = document.createTextNode(\"\\n\");\n  el2.appendChild(el9);\n  frag.appendChild(el2);\n  var el10 = document.createTextNode(\"\\n\");\n  frag.appendChild(el10);\n  var el11 = this[\"body\"] = document.createElement(\"div\");\n  el11.className += \" _coral-Calendar-body\";\n  el11.setAttribute(\"handle\", \"body\");\n  el11.setAttribute(\"role\", \"grid\");\n  el11.setAttribute(\"tabindex\", \"0\");\n  el11.setAttribute(\"aria-readonly\", \"true\");\n  frag.appendChild(el11);\n  var el12 = document.createTextNode(\"\\n\");\n  frag.appendChild(el12);\n  return frag;\n});\nexport default template;","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"container\"] = document.createElement(\"div\");\n  el0.className += \" _coral-DatePicker-calendarSlidingContainer\";\n  el0.setAttribute(\"handle\", \"container\");\n  el0.setAttribute(\"style\", \"width: \"+data_0[\"width\"]+\"px; height: \"+data_0[\"height\"]+\"px;\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  data = data_0;\n  \n  this.i18n = data.i18n;\n  this.commons = data.commons;\n\n  data_0 = data;\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"table\"] = document.createElement(\"table\");\n  el2.setAttribute(\"handle\", \"table\");\n  el2.className += \" _coral-Calendar-table\";\n  el2.setAttribute(\"role\", \"presentation\");\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  var el4 = document.createElement(\"thead\");\n  el4.setAttribute(\"role\", \"presentation\");\n  var el5 = document.createTextNode(\"\\n    \");\n  el4.appendChild(el5);\n  var el6 = document.createElement(\"tr\");\n  el6.setAttribute(\"role\", \"row\");\n  var el7 = document.createTextNode(\"\\n      \");\n  el6.appendChild(el7);\n  var iterated_1 = data_0[\"dayNames\"];\n  for (var i1 = 0, ni1 = iterated_1.length; i1 < ni1; i1++) {\n    var data_1 = data = iterated_1[i1];\n    var el9 = document.createTextNode(\"\\n        \");\n    el6.appendChild(el9);\n    var el10 = document.createElement(\"th\");\n    el10.setAttribute(\"role\", \"columnheader\");\n    el10.setAttribute(\"scope\", \"col\");\n    el10.className += \" _coral-Calendar-tableCell\";\n    var el11 = document.createTextNode(\"\\n          \");\n    el10.appendChild(el11);\n    var el12 = document.createElement(\"abbr\");\n    el12.className += \" _coral-Calendar-dayOfWeek\";\n    el12.setAttribute(\"title\", data_1[\"dayFullName\"]);\n    el12.textContent = data_1[\"dayAbbr\"];\n    el10.appendChild(el12);\n    var el13 = document.createTextNode(\"\\n        \");\n    el10.appendChild(el13);\n    el6.appendChild(el10);\n    var el14 = document.createTextNode(\"\\n      \");\n    el6.appendChild(el14);\n  }\n  var el15 = document.createTextNode(\"\\n    \");\n  el6.appendChild(el15);\n  el4.appendChild(el6);\n  var el16 = document.createTextNode(\"\\n  \");\n  el4.appendChild(el16);\n  el2.appendChild(el4);\n  var el17 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el17);\n  var el18 = document.createElement(\"tbody\");\n  el18.setAttribute(\"role\", \"presentation\");\n  var el19 = document.createTextNode(\"\\n    \");\n  el18.appendChild(el19);\n  var iterated_1 = data_0[\"weeks\"];\n  for (var i1 = 0, ni1 = iterated_1.length; i1 < ni1; i1++) {\n    var data_1 = data = iterated_1[i1];\n    var el21 = document.createTextNode(\"\\n      \");\n    el18.appendChild(el21);\n    var el22 = document.createElement(\"tr\");\n    el22.setAttribute(\"role\", \"row\");\n    var el23 = document.createTextNode(\"\\n        \");\n    el22.appendChild(el23);\n    var iterated_2 = data_1;\n    for (var i2 = 0, ni2 = iterated_2.length; i2 < ni2; i2++) {\n      var data_2 = data = iterated_2[i2];\n      var el25 = document.createTextNode(\"\\n          \");\n      el22.appendChild(el25);\n      data = data_2;\n      \n            var calendarTitle;\n            var calendarDate = data.dateLabel + ', ' + data.formattedDate;\n            if (data.isToday) {\n              if (data.ariaSelected) {\n                calendarTitle = this.i18n.get('Today, {0} selected', calendarDate, 'date');\n              }\n              else {\n                calendarTitle = this.i18n.get('Today, {0}', calendarDate, 'date');\n              }\n            }\n            else {\n              if (data.ariaSelected) {\n                calendarTitle = this.i18n.get('{0} selected', calendarDate, 'date');\n              }\n              else {\n                calendarTitle = calendarTitle = calendarDate;\n              }\n            }\n          \n      data_2 = data;\n      var el27 = document.createTextNode(\"\\n          \");\n      el22.appendChild(el27);\n      var el28 = this[\"cell\"] = document.createElement(\"td\");\n      el28.setAttribute(\"handle\", \"cell\");\n      el28.setAttribute(\"role\", \"gridcell\");\n      el28.id = this[\"commons\"][\"getUID\"]()+\"-row\"+i1+\"-col\"+i2;\n      el28.className += \" _coral-Calendar-tableCell\";\n      el28.setAttribute(\"aria-selected\", data_2[\"ariaSelected\"]);\n      if (data_2[\"isDisabled\"]) {\n      el28.setAttribute(\"aria-disabled\", \"true\");\n      }\n      if (data_2[\"ariaInvalid\"]) {\n      el28.setAttribute(\"aria-invalid\", \"true\");\n      }\n      if (data_2[\"formattedDate\"]) {\n      el28.setAttribute(\"title\", calendarTitle);\n      }\n      var el29 = document.createTextNode(\"\\n            \");\n      el28.appendChild(el29);\n      data = data_2;\n      \n              if (data.cssClass.indexOf('is-outsideMonth') !== -1) {\n                this.cell.classList.add('is-outsideMonth');\n              }\n            \n      data_2 = data;\n      var el31 = document.createTextNode(\"\\n            \");\n      el28.appendChild(el31);\n      if (data_2[\"dateAttr\"]) {\n        var el33 = document.createTextNode(\"\\n                \");\n        el28.appendChild(el33);\n        var el34 = document.createElement(\"a\");\n        el34.setAttribute(\"role\", \"presentation\");\n        el34.className += \" _coral-Calendar-date \"+data_2[\"cssClass\"];\n        el34.setAttribute(\"data-date\", data_2[\"dateAttr\"]);\n        el34.textContent = data_2[\"dateText\"];\n        el28.appendChild(el34);\n        var el35 = document.createTextNode(\"\\n              \");\n        el28.appendChild(el35);\n        var el36 = document.createTextNode(\"\\n            \");\n        el28.appendChild(el36);\n      }\n      else {\n        var el37 = document.createTextNode(\"\\n                \");\n        el28.appendChild(el37);\n        var el38 = document.createElement(\"span\");\n        el38.setAttribute(\"role\", \"presentation\");\n        el38.className += \" _coral-Calendar-date \"+data_2[\"cssClass\"];\n        el38.textContent = data_2[\"dateText\"];\n        el28.appendChild(el38);\n        var el39 = document.createTextNode(\"\\n              \");\n        el28.appendChild(el39);\n      }\n      var el40 = document.createTextNode(\"\\n          \");\n      el28.appendChild(el40);\n      el22.appendChild(el28);\n      var el41 = document.createTextNode(\"\\n        \");\n      el22.appendChild(el41);\n    }\n    var el42 = document.createTextNode(\"\\n      \");\n    el22.appendChild(el42);\n    el18.appendChild(el22);\n    var el43 = document.createTextNode(\"\\n    \");\n    el18.appendChild(el43);\n  }\n  var el44 = document.createTextNode(\"\\n  \");\n  el18.appendChild(el44);\n  el2.appendChild(el18);\n  var el45 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el45);\n  var el46 = document.createElement(\"caption\");\n  el46.className += \" u-coral-screenReaderOnly\";\n  el46.setAttribute(\"aria-live\", \"assertive\");\n  el46.setAttribute(\"aria-atomic\", \"true\");\n  el2.appendChild(el46);\n  var el47 = document.createTextNode(\"\\n\");\n  el2.appendChild(el47);\n  frag.appendChild(el2);\n  var el48 = document.createTextNode(\"\\n\");\n  frag.appendChild(el48);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport {DateTime} from '../../../coralui-datetime';\nimport '../../../coralui-component-button';\nimport calendar from '../templates/calendar';\nimport container from '../templates/container';\nimport table from '../templates/table';\nimport {transform, commons, i18n, Keys} from '../../../coralui-util';\n\n/** @ignore */\nfunction isDateInRange(date, startDate, endDate) {\n  if (!date) {\n    return false;\n  }\n  \n  if (startDate === null && endDate === null) {\n    return true;\n  }\n  else if (startDate === null) {\n    return date.toDate() <= endDate;\n  }\n  else if (endDate === null) {\n    return date.toDate() >= startDate;\n  }\n  \n  return startDate <= date.toDate() && date.toDate() <= endDate;\n}\n\n/** @ignore */\nfunction toMoment(value, format) {\n  if (value === 'today') {\n    return new DateTime.Moment().startOf('day');\n  }\n  else if (DateTime.Moment.isMoment(value)) {\n    return value.isValid() ? value.clone() : null;\n  }\n  \n  // if the value provided is a date it does not make sense to provide a format to parse the date\n  const result = new DateTime.Moment(value, value instanceof Date ? null : format);\n  return result.isValid() ? result.startOf('day') : null;\n}\n\n/** @ignore */\nfunction validateAsChangedAndValidMoment(newValue, oldValue) {\n  // if the value is undefined we change it to null since moment considers both to be different\n  newValue = newValue || null;\n  oldValue = oldValue || null;\n  \n  if (newValue !== oldValue && !new DateTime.Moment(newValue).isSame(oldValue, 'day')) {\n    return newValue === null || newValue.isValid();\n  }\n  \n  return false;\n}\n\n/**\n Slides in new month tables, slides out old tables, and then cleans up the leftovers when it is done.\n \n @ignore\n */\nfunction TableAnimator(host) {\n  this.host = host;\n  \n  this._addContainerIfNotPresent = (width, height) => {\n    if (!this.container) {\n      // Get a fresh container for the animation:\n      container.call(\n        this,\n        {\n          width,\n          height\n        }\n      );\n      this.host.appendChild(this.container);\n    }\n  };\n  \n  this._removeContainerIfEmpty = () => {\n    if (this.container && this.container.children.length === 0) {\n      this.host.removeChild(this.container);\n      this.container = null;\n    }\n  };\n  \n  this.slide = (newTable, direction) => {\n    const self = this;\n    const replace = direction === undefined;\n    const isLeft = direction === 'left';\n    const oldTable = this.oldTable;\n    \n    // Should the replace flag be raised, or no old table be present, then do a non-transitioned (re)place and exit\n    if (replace || !oldTable) {\n      if (oldTable) {\n        oldTable.parentNode.removeChild(oldTable);\n      }\n      this.host.insertBefore(newTable, this.host.firstChild);\n      this.oldTable = newTable;\n      return;\n    }\n    \n    const boundingClientRect = oldTable.getBoundingClientRect();\n    const width = boundingClientRect.width;\n    let height = boundingClientRect.height;\n    this._addContainerIfNotPresent(width, height);\n    \n    // Add both the old and the new table to the container:\n    this.container.appendChild(oldTable);\n    this.container.appendChild(newTable);\n    \n    // Set the existing table to start from being in full view, and mark it to transition on `left` changing\n    oldTable.classList.add('_coral-Calendar-table--transit');\n    \n    commons.transitionEnd(oldTable, () => {\n      oldTable.parentNode.removeChild(oldTable);\n      self._removeContainerIfEmpty();\n    });\n    \n    // Set the new table to start out of view (either left or right depending on the direction of the slide), and mark\n    // it to transition on `left` changing\n    newTable.classList.add('_coral-Calendar-table--transit');\n    newTable.style.left = `${isLeft ? width : -width}px`;\n    \n    // When the transition is done, have the transition class lifted\n    commons.transitionEnd(newTable, () => {\n      newTable.classList.remove('_coral-Calendar-table--transit');\n      self.host.appendChild(newTable);\n      self._removeContainerIfEmpty();\n    });\n    \n    // Force a redraw by querying the browser for its offsetWidth. Without this, the re-positioning code later on\n    // would not lead to a transition. Note that there's no significance to the resulting value being assigned to\n    // 'height'\n    height = this.container.offsetWidth;\n    \n    // Set the `left` positions to transition to:\n    oldTable.style.left = `${isLeft ? -width : width}px`;\n    newTable.style.left = 0;\n    \n    this.oldTable = newTable;\n  };\n}\n\n/** @ignore */\nconst ARRAYOF6 = [0, 0, 0, 0, 0, 0];\n\n/** @ignore */\nconst ARRAYOF7 = [0, 0, 0, 0, 0, 0, 0];\n\n/** @ignore */\nconst INTERNAL_FORMAT = 'YYYY-MM-DD';\n\n/** @ignore */\nconst timeUnit = {\n  YEAR: 'year',\n  MONTH: 'month',\n  WEEK: 'week',\n  DAY: 'day'\n};\n\nconst CLASSNAME = '_coral-Calendar';\n\n/**\n @class Coral.Calendar\n @classdesc A Calendar component that can be used as a date selection form field. Leverages {@link momentJS} if loaded\n on the page.\n @htmltag coral-calendar\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass Calendar extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Default value\n    this._value = null;\n    \n    this._delegateEvents(commons.extend(this._events, {\n      'click ._coral-Calendar-nextMonth,._coral-Calendar-prevMonth': '_onNextOrPreviousMonthClick',\n      'click ._coral-Calendar-body ._coral-Calendar-date': '_onDayClick',\n      'mousedown ._coral-Calendar-body ._coral-Calendar-date': '_onDayMouseDown',\n      'key:up ._coral-Calendar-body': '_onUpKey',\n      'key:right ._coral-Calendar-body': '_onRightKey',\n      'key:down ._coral-Calendar-body': '_onDownKey',\n      'key:left ._coral-Calendar-body': '_onLeftKey',\n      'key:home ._coral-Calendar-body': '_onHomeOrEndKey',\n      'key:end ._coral-Calendar-body': '_onHomeOrEndKey',\n      'key:pageup': '_onPageUpKey',\n      'key:pagedown': '_onPageDownKey',\n  \n      // On OSX we use Command+Page Up\n      'key:meta+pageup': '_onCtrlPageUpKey',\n      // On OSX we use Command+Page Down\n      'key:meta+pagedown': '_onCtrlPageDownKey',\n      // On Windows, we use CTRL+Page Up\n      'key:ctrl+pageup': '_onCtrlPageUpKey',\n      // On Windows, we use CTRL+Page Down\n      'key:ctrl+pagedown': '_onCtrlPageDownKey',\n  \n      'key:enter ._coral-Calendar-body': '_onEnterKey',\n      'key:space ._coral-Calendar-body': '_onEnterKey'\n    }));\n    \n    // Prepare templates\n    this._elements = {};\n    calendar.call(this._elements, {commons, i18n});\n  \n    // Pre-define labellable element\n    this._labellableElement = this;\n\n    // Internal keeper of the month that is currently on display.\n    this._cursor = null;\n  \n    // Internal keeper for the id of the currently focused date cell or the cell that would receive focus when the\n    // calendar body receives focus.\n    this._activeDescendant = null;\n    this._animator = new TableAnimator(this._elements.body);\n  }\n  \n  /**\n   Defines the start day for the week, 0 = Sunday, 1 = Monday etc., as depicted on the calendar days grid.\n   \n   @type {Number}\n   @default 0\n   @htmlattribute startday\n   */\n  get startDay() {\n    if (this._startDay) {\n      return this._startDay;\n    }\n    \n    if (typeof DateTime.Moment.localeData(i18n.locale).firstDayOfWeek !== 'undefined') {\n      return DateTime.Moment.localeData(i18n.locale).firstDayOfWeek();\n    }\n    \n    return 0;\n  }\n  set startDay(value) {\n    if (value >= 0 && value < 7) {\n      this._startDay = value;\n  \n      this._renderCalendar();\n    }\n  }\n  \n  /**\n   The format used to display the current month and year.\n   'MMMM YYYY' is supported by default. Include momentjs to support additional format string options see\n   http://momentjs.com/docs/#/displaying/.\n   \n   @type {String}\n   @default \"MMMM YYYY\"\n   @htmlattribute headerformat\n   */\n  get headerFormat() {\n    return this._headerFormat || 'MMMM YYYY';\n  }\n  set headerFormat(value) {\n    this._headerFormat = transform.string(value);\n    this._renderCalendar();\n  }\n  \n  /**\n   The minimal selectable date in the Calendar view. When passed a string, it needs to be 'YYYY-MM-DD' formatted.\n   \n   @type {String|Date}\n   @default null\n   @htmlattribute min\n   */\n  get min() {\n    return this._min ? this._min.toDate() : null;\n  }\n  set min(value) {\n    value = toMoment(value, this.valueFormat);\n    \n    if (validateAsChangedAndValidMoment(value, this._min)) {\n      this._min = value;\n      this._renderCalendar();\n    }\n  }\n  \n  /**\n   The max selectable date in the Calendar view. When passed a string, it needs to be 'YYYY-MM-DD'\n   formatted.\n   \n   @type {String|Date}\n   @default null\n   @htmlattribute max\n   */\n  get max() {\n    return this._max ? this._max.toDate() : null;\n  }\n  set max(value) {\n    value = toMoment(value, this.valueFormat);\n    \n    if (validateAsChangedAndValidMoment(value, this._max)) {\n      this._max = value;\n      this._renderCalendar();\n    }\n  }\n  \n  /**\n   The format to use on expressing the selected date as a string on the <code>value</code> attribute.\n   'YYYY-MM-DD' is supported by default. Include momentjs to support additional format string options see\n   http://momentjs.com/docs/#/displaying/.\n   \n   @type {String}\n   @default \"YYYY-MM-DD\"\n   @htmlattribute valueformat\n   @htmlattributereflected\n   */\n  get valueFormat() {\n    return this._valueFormat || INTERNAL_FORMAT;\n  }\n  set valueFormat(value) {\n    value = transform.string(value);\n    \n    const setValueFormat = (newValue) => {\n      this._valueFormat = newValue;\n      this._reflectAttribute('valueformat', this._valueFormat);\n    };\n  \n    // Once the valueFormat is set, we make sure the value is also correct\n    if (!this._valueFormat && this._originalValue) {\n      setValueFormat(value);\n      this.value = this._originalValue;\n    }\n    else {\n      setValueFormat(value);\n      this._elements.input.value = this.value;\n    }\n  }\n  \n  /**\n   The value returned, or set, as a Date. If the value is '' it will return <code>null</code>.\n   \n   @type {Date}\n   @default null\n   */\n  get valueAsDate() {\n    return this._value ? this._value.toDate() : null;\n  }\n  set valueAsDate(value) {\n    if (value instanceof Date) {\n      this._valueAsDate = new DateTime.Moment(value);\n      this.value = this._valueAsDate;\n    }\n    else {\n      this._valueAsDate = null;\n      this.value = '';\n    }\n  }\n  \n  /**\n   The current value. When set to 'today', the value is coerced into the clients local date expressed as string\n   formatted in accordance to the set <code>valueFormat</code>.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    return this._value ? this._value.format(this.valueFormat) : '';\n  }\n  set value(value) {\n    // This is used to change the value if valueformat is also set but afterwards\n    this._originalValue = value;\n    \n    value = toMoment(value, this.valueFormat);\n    \n    if (validateAsChangedAndValidMoment(value, this._value)) {\n      this._value = value;\n      this._elements.input.value = this.value;\n      \n      // resets the view cursor, so the selected month will be in view\n      this._cursor = null;\n      \n      this._renderCalendar();\n      this.required = this.required;\n    }\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._elements.input.name;\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n    \n    this._elements.input.name = value;\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    this.setAttribute('aria-required', this._required);\n    this.classList.toggle('is-required', this._required && this._value === null);\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.classList.toggle('is-disabled', this._disabled);\n    this._elements.prev.disabled = this._disabled;\n    this._elements.next.disabled = this._disabled;\n    this._elements.body.setAttribute('aria-disabled', this._disabled);\n    this._elements.body[this._disabled ? 'removeAttribute' : 'setAttribute']('tabindex', '0');\n  \n    this._renderCalendar();\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#invalid}.\n   */\n  get invalid() {\n    return super.invalid;\n  }\n  set invalid(value) {\n    super.invalid = value;\n    \n    this._renderCalendar();\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    this.setAttribute('aria-readonly', this._readOnly);\n  }\n  \n  /** @ignore */\n  _renderCalendar(slide) {\n    const cursor = this._requireCursor();\n    const displayYear = cursor.year();\n    const displayMonth = cursor.month();\n    const oldTable = this._animator.oldTable;\n    \n    this._elements.heading.innerHTML = new DateTime.Moment([displayYear, displayMonth, 1]).format(this.headerFormat);\n    \n    const newTable = this._renderTable(displayYear, displayMonth + 1);\n    \n    if (oldTable) {\n      const self = this;\n      commons.transitionEnd(newTable, () => {\n        self._setActiveDescendant();\n      });\n    }\n    \n    this._animator.slide(newTable, slide);\n    \n    const el = this._elements.body.querySelector('.is-selected');\n    \n    // This will be overwritten later if there is any other function setting the attribute\n    this._activeDescendant = el ? el.id : null;\n    \n    this._setActiveDescendant();\n  }\n  \n  /**\n   Returns <code>true</code> if moment specified is before <code>min</code>.\n   \n   @param {moment} currentMoment\n   A moment to test.\n   @param {String} unit\n   Year, Month, Week, Day\n   @returns {Boolean}\n   <code>true</code> if moment specified is before <code>min</code>\n   \n   @ignore\n   */\n  _isBeforeMin(currentMoment, unit) {\n    const min = this.min ? new DateTime.Moment(this.min) : null;\n    return min && currentMoment.isBefore(min, unit);\n  }\n  \n  /**\n   Returns <code>true</code> if moment specified is after <code>max</code>.\n   \n   @param {moment} currentMoment\n   A moment to test.\n   @param {String} unit\n   Year, Month, Week, Day\n   @returns {Boolean}\n   <code>true</code> if moment specified is after <code>max</code>\n   \n   @ignore\n   */\n  _isAfterMax(currentMoment, unit) {\n    const max = this.max ? new DateTime.Moment(this.max) : null;\n    return max && currentMoment.isAfter(max, unit);\n  }\n  \n  /**\n   Returns <code>true</code> if moment specified is greater than or equal to <code>min</code> and less than or equal to <code>max</code>.\n   \n   @param {moment} currentMoment\n   A moment to test.\n   @param {String} unit\n   Year, Month, Week, Day\n   @returns {Boolean}\n   <code>true</code> if moment specified falls within <code>min</code>/<code>max</code> date range.\n   \n   @ignore\n   */\n  _isInRange(currentMoment, unit) {\n    return !(this._isBeforeMin(currentMoment, unit) || this._isAfterMax(currentMoment, unit));\n  }\n  \n  /**\n   Updates the aria-activedescendant property for the calendar grid to communicate the currently focused date, or the\n   date that should get focus when the grid receives focus, to assistive technology.\n   \n   @ignore\n   */\n  _setActiveDescendant() {\n    let el;\n    \n    if (!this._activeDescendant || !this._elements.body.querySelector(`#${this._activeDescendant} [data-date]`)) {\n      this._activeDescendant = null;\n      \n      el = this._elements.body.querySelector('.is-selected');\n      this._activeDescendant = el && el.id;\n      \n      if (!this._activeDescendant || !this._elements.body.querySelector(`#${this._activeDescendant} [data-date]`)) {\n        const currentMoment = this._value;\n        \n        if (currentMoment) {\n          const dates = this._elements.body.querySelectorAll('[data-date]');\n          if (dates.length) {\n            if (this._isBeforeMin(currentMoment)) {\n              el = dates[0];\n            }\n            else if (this._isAfterMax(currentMoment)) {\n              el = dates[dates.length - 1];\n            }\n          }\n        }\n        \n        if (el) {\n          this._activeDescendant = el.parentElement.id;\n        }\n      }\n    }\n    \n    el = this._elements.body.querySelector('.is-focused');\n    if (el) {\n      el.classList.remove('is-focused');\n    }\n    \n    this._elements.body.setAttribute('aria-activedescendant', this._activeDescendant);\n    \n    this._updateTableCaption();\n    \n    if (!this._activeDescendant) {\n      return;\n    }\n    \n    el = document.getElementById(this._activeDescendant);\n    if (el) {\n      el.querySelector('._coral-Calendar-date').classList.add('is-focused');\n    }\n  }\n  \n  /**\n   Updates the table caption which serves as a live region to announce the currently focused date to assistive\n   technology, improving compatibility across operating systems, browsers and screen readers.\n   \n   @ignore\n   */\n  _updateTableCaption() {\n    const caption = this._elements.body.querySelector('caption');\n    \n    if (!caption) {\n      return;\n    }\n    \n    if (caption.firstChild) {\n      caption.removeChild(caption.firstChild);\n    }\n    if (this._activeDescendant) {\n      const activeDescendant = this._elements.body.querySelector(`#${this._activeDescendant}`);\n      const captionText = document.createTextNode(activeDescendant.getAttribute('title'));\n      caption.appendChild(captionText);\n    }\n  }\n  \n  /** @ignore */\n  _renderTable(year, month) {\n    const firstDate = new DateTime.Moment([year, month - 1, 1]);\n    let monthStartsAt = (firstDate.day() - this.startDay) % 7;\n    const dateLocal = this._value ? this._value.clone().startOf('day') : null;\n    \n    if (monthStartsAt < 0) {\n      monthStartsAt += 7;\n    }\n    \n    const data = {\n      i18n: i18n,\n      commons: commons,\n      // eslint-disable-next-line no-unused-vars\n      dayNames: ARRAYOF7.map((currentIndex, index) => {\n        const dayMoment = new DateTime.Moment().day((index + this.startDay) % 7);\n        return {\n          dayAbbr: dayMoment.format('dd'),\n          dayFullName: dayMoment.format('dddd')\n        };\n      }, this),\n  \n      // eslint-disable-next-line no-unused-vars, arrow-body-style\n      weeks: ARRAYOF6.map((currentWeekIndex, weekIndex) => {\n        // eslint-disable-next-line no-unused-vars\n        return ARRAYOF7.map((currentDayIndex, dayIndex) => {\n          const result = {};\n          const cssClass = this.disabled ? ['is-disabled'] : [];\n          let ariaSelected = false;\n          let ariaInvalid = false;\n          const day = weekIndex * 7 + dayIndex - monthStartsAt;\n          const cursor = new DateTime.Moment([year, month - 1]);\n          // we use add() since 'day' could be a negative value\n          cursor.add(day, 'days');\n    \n          const isCurrentMonth = cursor.month() + 1 === parseFloat(month);\n          const dayOfWeek = new DateTime.Moment().day((dayIndex + this.startDay) % 7).format('dddd');\n          const isToday = cursor.isSame(new DateTime.Moment(), 'day');\n    \n          const cursorLocal = cursor.clone().startOf('day');\n    \n          if (isToday) {\n            cssClass.push('is-today');\n          }\n    \n          if (dateLocal && cursorLocal.isSame(dateLocal, 'day')) {\n            ariaSelected = true;\n            cssClass.push('is-selected');\n            if (this.invalid) {\n              ariaInvalid = true;\n              cssClass.push('is-invalid');\n            }\n          }\n    \n          if (isCurrentMonth) {\n            cssClass.push('is-currentMonth');\n            if (!this.disabled && isDateInRange(cursor, this.min, this.max)) {\n              result.dateAttr = cursorLocal.format(INTERNAL_FORMAT);\n              result.weekIndex = cursor.week();\n              result.formattedDate = cursor.format('LL');\n            }\n            else {\n              cssClass.push('is-disabled');\n            }\n          }\n          else {\n            cssClass.push('is-outsideMonth');\n          }\n    \n          result.isDisabled = this.disabled || !result.dateAttr;\n          result.dateText = cursor.date();\n          result.cssClass = cssClass.join(' ');\n          result.isToday = isToday;\n          result.ariaSelected = ariaSelected;\n          result.ariaInvalid = ariaInvalid;\n          result.dateLabel = dayOfWeek;\n          result.weekIndex = cursor.week();\n    \n          return result;\n        }, this);\n      }, this)\n    };\n    \n    const handles = {};\n    table.call(handles, data);\n    \n    return handles.table;\n  }\n  \n  /** @ignore */\n  _requireCursor() {\n    let cursor = this._cursor;\n    if (!cursor || !cursor.isValid()) {\n      // When its unknown what month we should be showing, use the set date. If that is not available, use 'today'\n      cursor = (this._value ? this._value.clone().startOf('day') : new DateTime.Moment()).startOf('month');\n      this._cursor = cursor;\n    }\n    \n    return cursor;\n  }\n  \n  /**\n   Navigate to previous or next timeUnit interval.\n   \n   @param {String} unit\n   Year, Month, Week, Day\n   @param {Boolean} isNext\n   Whether to navigate forward or backward.\n   \n   @private\n   */\n  _gotoPreviousOrNextTimeUnit(unit, isNext) {\n    const direction = isNext ? 'left' : 'right';\n    const operator = isNext ? 'add' : 'subtract';\n    const el = this._elements.body.querySelector('._coral-Calendar-date.is-focused');\n    let currentActive;\n    let currentMoment;\n    let newMoment;\n    let difference;\n    \n    if (el) {\n      currentActive = el.dataset.date;\n      currentMoment = new DateTime.Moment(currentActive);\n      newMoment = currentMoment[operator](1, unit);\n      \n      // make sure new moment is in range before transitioning\n      if (this._isInRange(newMoment, unit)) {\n        difference = Math.abs(new DateTime.Moment(currentActive).diff(newMoment, 'days'));\n        this._getToNewMoment(direction, operator, difference);\n        this._setActiveDescendant();\n      }\n    }\n    else {\n      this._requireCursor();\n      \n      // if cursor is out of range\n      if (!this._isInRange(this._cursor, unit)) {\n        \n        // advance to closest value in range\n        if (this._isBeforeMin(this._cursor)) {\n          newMoment = this.min;\n        }\n        else if (this._isAfterMax(this._cursor)) {\n          newMoment = this.max;\n        }\n        newMoment = new DateTime.Moment(newMoment);\n        difference = Math.abs(this._cursor.diff(newMoment, 'days'));\n        this._getToNewMoment(direction, operator, difference);\n        this._setActiveDescendant();\n        return;\n      }\n      \n      this._cursor[operator](1, unit);\n      this._renderCalendar(direction);\n    }\n  }\n  \n  /**\n   Checks if the Calendar is valid or not. This is done by checking that the current value is between the\n   provided <code>min</code> and <code>max</code> values. This check is only performed on user interaction.\n   @ignore\n   */\n  _validateCalendar() {\n    const isInvalid = !(this._value === null || isDateInRange(this._value, this.min, this.max));\n    \n    if (this.invalid !== isInvalid) {\n      this.invalid = isInvalid;\n    }\n  }\n  \n  /** @ignore */\n  _onNextOrPreviousMonthClick(event) {\n    event.preventDefault();\n    \n    this._gotoPreviousOrNextTimeUnit(timeUnit.MONTH, this._elements.next === event.matchedTarget);\n    event.matchedTarget.focus();\n    this._validateCalendar();\n  }\n  \n  /** @ignore */\n  _getToNewMoment(direction, operator, difference) {\n    const el = this._elements.body.querySelector('._coral-Calendar-date.is-focused');\n    let currentActive;\n    \n    if (el) {\n      currentActive = el.dataset.date;\n    }\n    else {\n      this._requireCursor();\n      currentActive = this._cursor.format(INTERNAL_FORMAT);\n    }\n    \n    const currentMoment = new DateTime.Moment(currentActive);\n    const currentMonth = currentMoment.month();\n    const currentYear = currentMoment.year();\n    const newMoment = currentMoment[operator](difference, 'days');\n    const newMonth = newMoment.month();\n    const newYear = newMoment.year();\n    const newMomentValue = newMoment.format(INTERNAL_FORMAT);\n    \n    if (newMonth !== currentMonth) {\n      this._requireCursor();\n      this._cursor[operator](1, 'months');\n      this._renderCalendar(direction);\n    }\n    else if (newMonth === currentMonth && newYear !== currentYear) {\n      this._requireCursor();\n      this._cursor[operator](1, 'years');\n      this._renderCalendar(direction);\n    }\n  \n    const dateQuery = `._coral-Calendar-date[data-date^=${JSON.stringify(newMomentValue)}]`;\n    const newDescendant = this._elements.body.querySelector(dateQuery);\n    if (newDescendant) {\n      this._activeDescendant = newDescendant.parentNode.getAttribute('id');\n    }\n  }\n  \n  /** @ignore */\n  _onDayMouseDown(event) {\n    this._activeDescendant = event.target.parentNode.id;\n    this._setActiveDescendant();\n    this._elements.body.focus();\n    this._validateCalendar();\n  }\n  \n  /** @ignore */\n  _onDayClick(event) {\n    event.preventDefault();\n    \n    this._elements.body.focus();\n    \n    const date = new DateTime.Moment(event.target.dataset.date, INTERNAL_FORMAT);\n    let dateLocal;\n    \n    // Carry over any user set time info\n    if (this._value) {\n      dateLocal = this._value.clone();\n    }\n    \n    // Set attribute so a change event will be triggered if the user has selected a different date\n    if (validateAsChangedAndValidMoment(date, dateLocal)) {\n      this.value = date;\n      this.trigger('change');\n    }\n    \n    this._validateCalendar();\n  }\n  \n  /** @ignore */\n  _onEnterKey(event) {\n    event.preventDefault();\n    \n    const el = this._elements.body.querySelector('._coral-Calendar-date.is-focused');\n    \n    if (el) {\n      el.click();\n    }\n    \n    this._validateCalendar();\n  }\n  \n  /** @ignore */\n  _onUpKey(event) {\n    event.preventDefault();\n    \n    this._gotoPreviousOrNextTimeUnit(timeUnit.WEEK, false);\n    this._validateCalendar();\n  }\n  \n  /** @ignore */\n  _onDownKey(event) {\n    event.preventDefault();\n    \n    this._gotoPreviousOrNextTimeUnit(timeUnit.WEEK, true);\n    this._validateCalendar();\n  }\n  \n  /** @ignore */\n  _onRightKey(event) {\n    event.preventDefault();\n    \n    this._gotoPreviousOrNextTimeUnit(timeUnit.DAY, true);\n    this._validateCalendar();\n  }\n  \n  /** @ignore */\n  _onLeftKey(event) {\n    event.preventDefault();\n    \n    this._gotoPreviousOrNextTimeUnit(timeUnit.DAY, false);\n    this._validateCalendar();\n  }\n  \n  /** @ignore */\n  _onHomeOrEndKey(event) {\n    event.preventDefault();\n    const isHome = event.keyCode === Keys.keyToCode('home');\n    const direction = '';\n    const operator = isHome ? 'subtract' : 'add';\n    const el = this._elements.body.querySelector('._coral-Calendar-date.is-focused');\n    \n    if (el) {\n      const currentActive = el.dataset.date;\n      const currentMoment = new DateTime.Moment(currentActive);\n      const difference = isHome ? currentMoment.date() - 1 : currentMoment.daysInMonth() - currentMoment.date();\n      this._getToNewMoment(direction, operator, difference);\n      this._setActiveDescendant();\n    }\n    \n    this._validateCalendar();\n  }\n  \n  /** @ignore */\n  _onPageDownKey(event) {\n    event.preventDefault();\n    this._gotoPreviousOrNextTimeUnit(timeUnit.MONTH, true);\n    this._validateCalendar();\n  }\n  \n  /** @ignore */\n  _onPageUpKey(event) {\n    event.preventDefault();\n    this._gotoPreviousOrNextTimeUnit(timeUnit.MONTH, false);\n    this._validateCalendar();\n  }\n  \n  /** @ignore */\n  _onCtrlPageDownKey(event) {\n    event.preventDefault();\n    this._gotoPreviousOrNextTimeUnit(timeUnit.YEAR, true);\n    this._validateCalendar();\n  }\n  \n  /** @ignore */\n  _onCtrlPageUpKey(event) {\n    event.preventDefault();\n    this._gotoPreviousOrNextTimeUnit(timeUnit.YEAR, false);\n    this._validateCalendar();\n  }\n  \n  /**\n   sets focus to appropriate descendant\n   */\n  focus() {\n    if (!this.contains(document.activeElement) && !this.disabled) {\n      this._setActiveDescendant();\n      this._elements.body.focus();\n    }\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'startday',\n      'startDay',\n      'headerformat',\n      'headerFormat',\n      'min',\n      'max',\n      'valueformat',\n      'valueFormat'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    this.setAttribute('role', 'region');\n    \n    // Default reflected attribute\n    if (!this._valueFormat) { this.valueFormat = INTERNAL_FORMAT; }\n    \n    const frag = document.createDocumentFragment();\n    \n    // Render template\n    frag.appendChild(this._elements.input);\n    frag.appendChild(this._elements.header);\n    frag.appendChild(this._elements.body);\n    \n    /// Clean Up (cloneNode support)\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    \n    this.appendChild(frag);\n    \n    // Render the calendar body if it's empty\n    if (!this._elements.body.firstElementChild) {\n      this._renderCalendar();\n    }\n  }\n}\n\nexport default Calendar;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport translations from './i18n/translations.json';\nimport {commons, strings} from '../coralui-util';\nimport Calendar from './src/scripts/Calendar';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-calendar': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-calendar', Calendar);\n\nexport {Calendar};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"wrapper\"] = document.createElement(\"div\");\n  el0.setAttribute(\"handle\", \"wrapper\");\n  el0.className += \" _coral-Card-wrapper\";\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport base from '../templates/base';\nimport {transform, validate} from '../../../coralui-util';\n\nconst COLOR_HINT_REG_EXP = /^#[0-9A-F]{6}$/i;\n\n/**\n Enumeration for {@link Card} variants.\n \n @typedef {Object} CardVariantEnum\n \n @property {String} DEFAULT\n Default card variant that shows the asset, overlay and content in their default positions.\n @property {String} CONDENSED\n Condensed card variant where the overlay is hidden and the content is shown over the image.\n @property {String} INVERTED\n Condensed card variant where the overlay is hidden and the content is shown over the image with a dark style.\n @property {String} ASSET\n Card variant where only the asset is shown.\n */\nconst variant = {\n  DEFAULT: 'default',\n  CONDENSED: 'condensed',\n  INVERTED: 'inverted',\n  ASSET: 'asset'\n};\n\n// the card's base classname\nconst CLASSNAME = '_coral-Card';\n\n// builds a string containing all possible variant classnames. this will be used to remove classnames when the variant\n// changes\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantValue in variant) {\n  ALL_VARIANT_CLASSES.push(`${CLASSNAME}--${variant[variantValue]}`);\n}\n\n/**\n @class Coral.Card\n @classdesc A Card component to display content in different variations.\n @htmltag coral-card\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Card extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      // Fetch or create the content zone elements\n      banner: this.querySelector('coral-card-banner') || document.createElement('coral-card-banner'),\n      asset: this.querySelector('coral-card-asset') || document.createElement('coral-card-asset'),\n      content: this.querySelector('coral-card-content') || document.createElement('coral-card-content'),\n      info: this.querySelector('coral-card-info') || document.createElement('coral-card-info'),\n      overlay: this.querySelector('coral-card-overlay') || document.createElement('coral-card-overlay')\n    };\n    base.call(this._elements);\n  \n    // Check if the banner is empty whenever we get a mutation\n    this._observer = new MutationObserver(this._hideBannerIfEmpty.bind(this));\n    \n    // Watch for changes to the banner element's children\n    this._observer.observe(this._elements.banner, {\n      // Catch changes to childList\n      childList: true,\n      // Catch changes to textContent\n      characterData: true,\n      // Monitor any child node\n      subtree: true\n    });\n    \n    // Events\n    this._delegateEvents({\n      'capture:load coral-card-asset img': '_onLoad'\n    });\n  }\n  \n  /**\n   The Asset of the card.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get asset() {\n    return this._getContentZone(this._elements.asset);\n  }\n  set asset(value) {\n    this._setContentZone('asset', value, {\n      handle: 'asset',\n      tagName: 'coral-card-asset',\n      insert: function(asset) {\n        this.insertBefore(asset, this.info || this._elements.wrapper || null);\n      }\n    });\n  }\n  \n  /**\n   Hints the height of the asset that is going to be loaded. This prepares the size so that when the image is\n   loaded no reflow is triggered. Both <code>assetHeight</code> and <code>assetWidth</code> need to be specified\n   for this feature to take effect.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute assetheight\n   */\n  get assetHeight() {\n    return this._assetHeight || '';\n  }\n  set assetHeight(value) {\n    this._assetHeight = transform.number(value);\n  \n    const self = this;\n    // Avoid a forced reflow by executing following in the next frame\n    window.requestAnimationFrame(() => {\n      // both hint dimensions need to be set in order to use this feature\n      if (!self._loaded && self._elements.asset && self.assetWidth && self._assetHeight) {\n        // gets the width without the border of the card\n        const clientRect = self.getBoundingClientRect();\n        const width = clientRect.right - clientRect.left;\n        // calculates the image ratio used to resize the height\n        const ratio = width / self.assetWidth;\n    \n        // the image is considered \"low resolution\"\n        // @todo: check this after removal of lowResolution\n        if (ratio > 1) {\n          // 32 = $card-asset-lowResolution-padding * 2\n          self._elements.asset.style.height = `${self._assetHeight + 32}px`;\n        }\n        // for non-low resolution images, condensed and inverted cards do not require the height to be set\n        else if (self.variant !== variant.CONDENSED && self.variant !== variant.INVERTED) {\n          self._elements.asset.style.height = `${ratio * self._assetHeight}px`;\n        }\n      }\n    });\n  }\n  \n  /**\n   Hints the width of the asset that is going to be loaded. This prepares the size so that when the image is\n   loaded no reflow is triggered. Both <code>assetHeight</code> and <code>assetWidth</code> need to be specified\n   for this feature to take effect.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute assetwidth\n   */\n  get assetWidth() {\n    return this._assetWidth || '';\n  }\n  set assetWidth(value) {\n    this._assetWidth = transform.number(value);\n  }\n  \n  /**\n   @type {String}\n   @default \"\"\n   @htmlattribute colorhint\n   */\n  get colorHint() {\n    return this._colorHint || '';\n  }\n  set colorHint(value) {\n    if (COLOR_HINT_REG_EXP.test(value)) {\n      this._colorHint = value;\n  \n      // if the image is already loaded we do not add the color hint to the asset\n      if (!this._loaded) {\n        this._elements.asset.style['background-color'] = this._colorHint;\n      }\n    }\n  }\n  \n  /**\n   The Content of the card.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-card-content',\n      insert: function(content) {\n        content.classList.add('u-coral-padding');\n        this._elements.wrapper.insertBefore(content, this.overlay || null);\n      }\n    });\n  }\n  \n  /**\n   The Banner of the card.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get banner() {\n    return this._getContentZone(this._elements.banner);\n  }\n  set banner(value) {\n    this._setContentZone('banner', value, {\n      handle: 'banner',\n      tagName: 'coral-card-banner',\n      insert: function(content) {\n        content.classList.add('_coral-Banner--corner');\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   The information area of the card, which is placed over all the content. It is typically used for alerts.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get info() {\n    return this._getContentZone(this._elements.info);\n  }\n  set info(value) {\n    this._setContentZone('info', value, {\n      handle: 'info',\n      tagName: 'coral-card-info',\n      insert: function(info) {\n        this.appendChild(info);\n      }\n    });\n  }\n  \n  /**\n   Fixes the width of the card. By default cards will take the width of their containers allowing them to interact\n   nicely with grids. Whenever they are used standalone fixing the width might be desired.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute fixedwidth\n   @htmlattributereflected\n   */\n  get fixedWidth() {\n    return this._fixedWidth || false;\n  }\n  set fixedWidth(value) {\n    this._fixedWidth = transform.booleanAttr(value);\n    this._reflectAttribute('fixedwidth', this._fixedWidth);\n  \n    this.classList.toggle(`${CLASSNAME}--fixedWidth`, this._fixedWidth);\n  }\n  \n  /**\n   The Overlay of the card.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get overlay() {\n    return this._getContentZone(this._elements.overlay);\n  }\n  set overlay(value) {\n    this._setContentZone('overlay', value, {\n      handle: 'overlay',\n      tagName: 'coral-card-overlay',\n      insert: function(overlay) {\n        this._elements.wrapper.appendChild(overlay);\n      }\n    });\n  }\n  \n  /**\n   Whether the card is stacked or not. This is used to represent several assets grouped together.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute stacked\n   @htmlattributereflected\n   */\n  get stacked() {\n    return this._stacked || false;\n  }\n  set stacked(value) {\n    this._stacked = transform.booleanAttr(value);\n    this._reflectAttribute('stacked', this._stacked);\n  \n    this.classList.toggle(`${CLASSNAME}--stacked`, this._stacked);\n  }\n  \n  /**\n   The card's variant. It determines which sections of the Card and in which position they are shown.\n   See {@link CardVariantEnum}.\n   \n   @type {String}\n   @default CardVariantEnum.DEFAULT\n   @htmlattribute variant\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n\n    this.classList.remove(...ALL_VARIANT_CLASSES);\n\n    if (this._variant !== variant.DEFAULT) {\n      this.classList.add(`${CLASSNAME}--${this._variant}`);\n    }\n    \n    this.assetHeight = this.assetHeight;\n  }\n  \n  /** @ignore */\n  _onLoad(event) {\n    // @todo fix me for multiple images\n    // sets the image as loaded\n    this._loaded = true;\n  \n    // removes the height style since the asset has been completely loaded\n    this._elements.asset.style.height = '';\n  \n    // enables the transition\n    event.target.classList.remove('is-loading');\n  }\n  \n  /**\n   Hide the banner if it's empty\n   @ignore\n   */\n  _hideBannerIfEmpty() {\n    const banner = this._elements.banner;\n    const bannerHeader = banner._elements.header;\n    const bannerContent = banner._elements.content;\n    \n    // If it's empty and has no non-textnode children, hide the label\n    const headerHiddenValue = bannerHeader.children.length === 0 && bannerHeader.textContent.replace(/\\s*/g, '') === '';\n    const contentHiddenValue = bannerContent.children.length === 0 && bannerContent.textContent.replace(/\\s*/g, '') === '';\n    const hiddenValue = headerHiddenValue && contentHiddenValue;\n    \n    // Only bother if the hidden status has changed\n    if (hiddenValue !== this._elements.banner.hidden) {\n      this._elements.banner.hidden = hiddenValue;\n    }\n  }\n  \n  get _contentZones() {\n    return {\n      'coral-card-banner': 'banner',\n      'coral-card-asset': 'asset',\n      'coral-card-content': 'content',\n      'coral-card-info': 'info',\n      'coral-card-overlay': 'overlay'\n    };\n  }\n  \n  /**\n   Returns {@link Card} variants.\n   \n   @return {CardVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return [\n      'assetwidth',\n      'assetWidth',\n      'assetheight',\n      'assetHeight',\n      'colorhint',\n      'colorHint',\n      'fixedwidth',\n      'fixedWidth',\n      'variant',\n      'stacked'\n    ];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME, 'coral-Well');\n    \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n  \n    const content = this._elements.content;\n    const asset = this._elements.asset;\n    \n    // Prepares images to be loaded nicely\n    const images = asset.querySelectorAll('img');\n    const imagesCount = images.length;\n    for (let i = 0; i < imagesCount; i++) {\n      const image = images[i];\n      if (!image.complete) {\n        image.classList.add('is-loading');\n      }\n    }\n  \n    for (const contentZone in this._contentZones) {\n      const element = this._elements[this._contentZones[contentZone]];\n      // Remove it so we can process children\n      if (element.parentNode) {\n        element.parentNode.removeChild(element);\n      }\n    }\n  \n    // Moves everything into the main content zone\n    while (this.firstChild) {\n      const child = this.firstChild;\n      // Removes the empty spaces\n      if (child.nodeType === Node.TEXT_NODE && child.textContent.trim() !== '' ||\n        child.nodeType === Node.ELEMENT_NODE && child.getAttribute('handle') !== 'wrapper') {\n        // Add non-template elements to the content\n        content.appendChild(child);\n      }\n      // Remove anything else element\n      else {\n        this.removeChild(child);\n      }\n    }\n  \n    // Assign the content zones so the insert functions will be called\n    this.overlay = this._elements.overlay;\n    this.content = content;\n    this.info = this._elements.info;\n    this.banner = this._elements.banner;\n  \n    this.appendChild(this._elements.wrapper);\n  \n    // The 'asset' setter knows to insert the element just before the wrapper node.\n    this.asset = asset;\n  }\n}\n\nexport default Card;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2018 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform, validate} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Banner';\n\n/**\n Enumeration for {@link CardBanner} variants.\n \n @typedef {Object} CardBannerVariantEnum\n \n @property {String} ERROR\n A card banner to indicate that an error has occurred.\n @property {String} WARNING\n A card banner to warn the user of something important.\n @property {String} INFO\n A card banner to inform the user of non-critical information.\n */\nconst variant = {\n  ERROR: 'error',\n  WARNING: 'warning',\n  INFO: 'info'\n};\n\n// An array of all possible variant classnames\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantValue in variant) {\n  ALL_VARIANT_CLASSES.push(`${CLASSNAME}--${variant[variantValue]}`);\n}\n\n/**\n @class Coral.Card.Banner\n @classdesc A Card Banner component\n @htmltag coral-card-banner\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass CardBanner extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Fetch content zones\n    this._elements = {\n      header: this.querySelector('coral-card-banner-header') || document.createElement('coral-card-banner-header'),\n      content: this.querySelector('coral-card-banner-content') || document.createElement('coral-card-banner-content')\n    };\n  }\n  \n  /**\n   The banner variant style to use. See {@link CardBannerVariantEnum}.\n   \n   @type {String}\n   @default CardBannerVariantEnum.INFO\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.INFO;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.INFO;\n    this._reflectAttribute('variant', this._variant);\n    \n    // Remove all variant classes\n    this.classList.remove(...ALL_VARIANT_CLASSES);\n    \n    // Set new variant class\n    this.classList.add(`${CLASSNAME}--${this._variant}`);\n    \n    // Set the role attribute depending on the variant so that the element turns into a live region\n    this.setAttribute('role', this._variant);\n  }\n  \n  /**\n   The banner's header.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get header() {\n    return this._getContentZone(this._elements.header);\n  }\n  set header(value) {\n    this._setContentZone('header', value, {\n      handle: 'header',\n      tagName: 'coral-card-banner-header',\n      insert: function(header) {\n        this.insertBefore(header, this.firstChild);\n      }\n    });\n  }\n  \n  /**\n   The banner's content.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-card-banner-content',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  get _contentZones() {\n    return {\n      'coral-card-banner-header': 'header',\n      'coral-card-banner-content': 'content'\n    };\n  }\n  \n  /**\n   Returns {@link CardBanner} variants.\n   \n   @return {CardBannerVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['variant'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.INFO; }\n    \n    const header = this._elements.header;\n    const content = this._elements.content;\n  \n    // When the content zone was not created, we need to make sure that everything is added inside it as a content.\n    if (!content.parentNode) {\n      while (this.firstChild) {\n        const child = this.firstChild;\n        \n        // Don't move header into content\n        if (child === header) {\n          child.remove();\n        }\n        else {\n          content.appendChild(this.firstChild);\n        }\n      }\n    }\n    \n    // Assign content zones\n    this.header = this._elements.header;\n    this.content = this._elements.content;\n  }\n}\n\nexport default CardBanner;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2018 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Banner-header';\n\n/**\n @class Coral.Card.Banner.Header\n @classdesc A Card Banner Header component\n @htmltag coral-card-banner-header\n @extends {HTMLElement}\n */\nclass CardBannerHeader extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default CardBannerHeader;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2018 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Banner-content';\n\n/**\n @class Coral.Card.Banner.Content\n @classdesc A Card Banner Content component\n @htmltag coral-card-banner-content\n @extends {HTMLElement}\n */\nclass CardBannerContent extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default CardBannerContent;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"icon\"] = document.createElement(\"coral-icon\");\n  el0.setAttribute(\"handle\", \"icon\");\n  el0.setAttribute(\"size\", \"XS\");\n  el0.className += \" _coral-Card-property-icon\";\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport '../../../coralui-component-icon';\nimport icon from '../templates/icon';\n\nconst CLASSNAME = '_coral-Card-property';\n\n/**\n @class Coral.Card.Property\n @classdesc A Card property component\n @htmltag coral-card-property\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass CardProperty extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      content: this.querySelector('coral-card-property-content') || document.createElement('coral-card-property-content')\n    };\n    icon.call(this._elements);\n  }\n  \n  /**\n   The property's content zone\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-card-property-content',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   Specifies the icon name used inside the property. See {@link Icon} for valid icon names.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   */\n  get icon() {\n    return this._elements.icon.icon;\n  }\n  set icon(value) {\n    this._elements.icon.icon = value;\n  \n    // removes the icon element from the DOM since there is no valid icon. this causes the content to have the\n    // correct styling\n    if (this.icon === '') {\n      this._elements.icon.remove();\n    }\n    else if (!this._elements.icon.parentNode) {\n      this.insertBefore(this._elements.icon, this.firstChild);\n    }\n  }\n  \n  get _contentZones() { return {'coral-card-property-content': 'content'}; }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['icon']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME, 'coral-Body--small');\n  \n    // Create a fragment\n    const frag = document.createDocumentFragment();\n  \n    // Render the main template\n    if (this.icon) {\n      frag.appendChild(this._elements.icon);\n    }\n  \n    const content = this._elements.content;\n  \n    // Remove it so we can process children\n    if (content.parentNode) {\n      content.parentNode.removeChild(content);\n    }\n  \n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && child.getAttribute('handle') !== 'icon') {\n        // Add non-template elements to the label\n        content.appendChild(child);\n      }\n      else {\n        this.removeChild(child);\n      }\n    }\n  \n    // Add the frag to the component\n    this.appendChild(frag);\n  \n    // Assign the content zones, moving them into place in the process\n    this.content = content;\n  }\n}\n\nexport default CardProperty;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\n\nconst CLASSNAME = '_coral-Card-title';\n\n/**\n @class Coral.Card.Title\n @classdesc A Card title component\n @htmltag coral-card-title\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass CardTitle extends ComponentMixin(HTMLElement) {\n  /**\n   The title's content zone.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    // Support configs\n    if (typeof value === 'object') {\n      for (const prop in value) {\n        /** @ignore */\n        this[prop] = value[prop];\n      }\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME, 'coral-Heading', 'coral-Heading--4');\n  }\n}\n\nexport default CardTitle;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\n\nconst CLASSNAME = '_coral-Card-subtitle';\n\n/**\n @class Coral.Card.Subtitle\n @classdesc A Card sub title component\n @htmltag coral-card-subtitle\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass CardSubtitle extends ComponentMixin(HTMLElement) {\n  /**\n   The subtitle's content zone.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    // Support configs\n    if (typeof value === 'object') {\n      for (const prop in value) {\n        /** @ignore */\n        this[prop] = value[prop];\n      }\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME, 'coral-Body--secondary');\n  }\n}\n\nexport default CardSubtitle;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\n\nconst CLASSNAME = '_coral-Card-context';\n\n/**\n @class Coral.Card.Context\n @classdesc A Card context component\n @htmltag coral-card-context\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass CardContext extends ComponentMixin(HTMLElement) {\n  /**\n   The context's content zone.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    // Support configs\n    if (typeof value === 'object') {\n      for (const prop in value) {\n        /** @ignore */\n        this[prop] = value[prop];\n      }\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME, 'coral-Heading', 'coral-Heading--5');\n  }\n}\n\nexport default CardContext;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\n\nconst CLASSNAME = '_coral-Card-description';\n\n/**\n @class Coral.Card.Description\n @classdesc A Card description component\n @htmltag coral-card-title\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass CardDescription extends ComponentMixin(HTMLElement) {\n  /**\n   The description's content zone.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    // Support configs\n    if (typeof value === 'object') {\n      for (const prop in value) {\n        /** @ignore */\n        this[prop] = value[prop];\n      }\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default CardDescription;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Card.Asset\n @classdesc The Card Asset\n @htmltag coral-card-asset\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-card-asset');\n\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Card.Overlay\n @classdesc The Card Overlay\n @htmltag coral-card-overlay\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-card-overlay');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Card.Info\n @classdesc The Card Info\n @htmltag coral-card-info\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-card-info');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Card.Content\n @classdesc The Card Content\n @htmltag coral-card-content\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-card-content');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Card.PropertyList\n @classdesc The Card PropertyList component\n @htmltag coral-card-propertylist\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-card-propertylist');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Card.Property.Content\n @classdesc A Card Property Content component\n @htmltag coral-card-property-content\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-card-property-content');\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Card from './src/scripts/Card';\nimport CardBanner from './src/scripts/CardBanner';\nimport CardBannerHeader from './src/scripts/CardBannerHeader';\nimport CardBannerContent from './src/scripts/CardBannerContent';\nimport CardProperty from './src/scripts/CardProperty';\nimport CardTitle from './src/scripts/CardTitle';\nimport CardSubtitle from './src/scripts/CardSubtitle';\nimport CardContext from './src/scripts/CardContext';\nimport CardDescription from './src/scripts/CardDescription';\nimport CardAsset from './src/scripts/CardAsset';\nimport CardOverlay from './src/scripts/CardOverlay';\nimport CardInfo from './src/scripts/CardInfo';\nimport CardContent from './src/scripts/CardContent';\nimport CardPropertyList from './src/scripts/CardPropertyList';\nimport CardPropertyContent from './src/scripts/CardPropertyContent';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-card', Card);\nwindow.customElements.define('coral-card-banner', CardBanner);\nwindow.customElements.define('coral-card-banner-header', CardBannerHeader);\nwindow.customElements.define('coral-card-banner-content', CardBannerContent);\nwindow.customElements.define('coral-card-property', CardProperty);\nwindow.customElements.define('coral-card-title', CardTitle);\nwindow.customElements.define('coral-card-subtitle', CardSubtitle);\nwindow.customElements.define('coral-card-context', CardContext);\nwindow.customElements.define('coral-card-description', CardDescription);\n\nCard.Banner = CardBanner;\nCard.Banner.Header = CardBannerHeader;\nCard.Banner.Content = CardBannerContent;\nCard.Property = CardProperty;\nCard.Property.Content = CardPropertyContent;\nCard.Title = CardTitle;\nCard.Subtitle = CardSubtitle;\nCard.Context = CardContext;\nCard.Description = CardDescription;\nCard.Asset = CardAsset;\nCard.Overlay = CardOverlay;\nCard.Info = CardInfo;\nCard.Content = CardContent;\nCard.PropertyList = CardPropertyList;\n\nexport {Card};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-CharacterCount';\n\n/**\n Enumeration for {@link CharacterCount} targets.\n \n @typedef {Object} CharacterCountTargetEnum\n \n @property {String} PREVIOUS\n Relates the CharacterCount to the previous sibling.\n @property {String} NEXT\n Relates the CharacterCount to the next sibling.\n */\nconst target = {\n  PREVIOUS: '_prev',\n  NEXT: '_next'\n};\n\n/**\n @class Coral.CharacterCount\n @classdesc A CharacterCount component that indicates the remaining characters in a Textfield or Textarea.\n @htmltag coral-charactercount\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass CharacterCount extends ComponentMixin(HTMLElement) {\n  /**\n   The target Textfield or Textarea for this component. It accepts values from {@link CharacterCountTargetEnum},\n   as well as any DOM element or CSS selector.\n   \n   @type {HTMLElement|String}\n   @default CharacterCountTargetEnum.PREVIOUS\n   @htmlattribute target\n   */\n  get target() {\n    return this._target || target.PREVIOUS;\n  }\n  set target(value) {\n    if (typeof value === 'string' || value instanceof Node) {\n      this._target = value;\n  \n      // Remove previous event listener\n      if (this._targetEl) {\n        this._targetEl.removeEventListener('input', this._refreshCharCount.bind(this));\n      }\n  \n      // Get the target DOM element\n      if (value === target.NEXT) {\n        this._targetEl = this.nextElementSibling;\n      }\n      else if (value === target.PREVIOUS) {\n        this._targetEl = this.previousElementSibling;\n      }\n      else if (typeof value === 'string') {\n        this._targetEl = document.querySelector(value);\n      }\n      else {\n        this._targetEl = value;\n      }\n  \n      if (this._targetEl) {\n        this._targetEl.addEventListener('input', this._refreshCharCount.bind(this));\n    \n        // Try to get maxlength from target element\n        if (this._targetEl.getAttribute('maxlength')) {\n          this.maxLength = this._targetEl.getAttribute('maxlength');\n        }\n      }\n    }\n  }\n  \n  /**\n   Maximum character length for the TextField/TextArea (will be read from target field markup if able).\n   \n   @type {Number}\n   @default null\n   @htmlattribute maxlength\n   @htmlattributereflected\n   */\n  get maxLength() {\n    return this._maxLength || null;\n  }\n  set maxLength(value) {\n    this._maxLength = transform.number(value);\n    this._reflectAttribute('maxlength', this._maxLength);\n    \n    this._refreshCharCount();\n  }\n  \n  /** @ignore */\n  _getCharCount() {\n    let elementLength = 0;\n    if (this._targetEl && this._targetEl.value) {\n      elementLength = this._targetEl.value.length;\n    }\n    \n    return this._maxLength ? this._maxLength - elementLength : elementLength;\n  }\n  \n  /** @ignore */\n  _refreshCharCount() {\n    const currentCount = this._getCharCount();\n    /** @ignore */\n    this.innerHTML = currentCount;\n    const isMaxExceeded = currentCount < 0;\n    if (this._targetEl) {\n      this._targetEl.classList.toggle('is-invalid', isMaxExceeded);\n      this.classList.toggle('is-invalid', isMaxExceeded);\n    }\n  }\n  \n  /**\n   Returns {@link CharacterCount} target options.\n   \n   @return {CharacterCountTargetEnum}\n   */\n  static get target() { return target; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['target', 'maxlength', 'maxLength'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // Set defaults\n    this.target = this.target;\n  \n    // Refresh once connected\n    this._refreshCharCount();\n  }\n}\n\nexport default CharacterCount;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport CharacterCount from './src/scripts/CharacterCount';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-charactercount', CharacterCount);\n\nexport {CharacterCount};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  var el0 = this[\"input\"] = document.createElement(\"input\");\n  el0.setAttribute(\"type\", \"checkbox\");\n  el0.setAttribute(\"handle\", \"input\");\n  el0.className += \" _coral-Checkbox-input\";\n  el0.id = data_0[\"commons\"][\"getUID\"]();\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"checkbox\"] = document.createElement(\"span\");\n  el2.className += \" _coral-Checkbox-box\";\n  el2.setAttribute(\"handle\", \"checkbox\");\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  data = data_0;\n  \n    this.checkbox.innerHTML = data.Icon._renderSVG('spectrum-css-icon-CheckboxCheckmark', ['_coral-Checkbox-checkmark']);\n  \n  data_0 = data;\n  var el5 = document.createTextNode(\"\\n\");\n  el2.appendChild(el5);\n  frag.appendChild(el2);\n  var el6 = document.createTextNode(\"\\n\");\n  frag.appendChild(el6);\n  var el7 = this[\"labelWrapper\"] = document.createElement(\"label\");\n  el7.className += \" _coral-Checkbox-label\";\n  el7.setAttribute(\"handle\", \"labelWrapper\");\n  el7.setAttribute(\"for\", this[\"input\"][\"id\"]);\n  el7.setAttribute(\"hidden\", \"\");\n  frag.appendChild(el7);\n  var el8 = document.createTextNode(\"\\n\");\n  frag.appendChild(el8);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport {Icon} from '../../../coralui-component-icon';\nimport base from '../templates/base';\nimport {transform, commons} from '../../../coralui-util';\n\nconst IS_IE_OR_EDGE = navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0 ||\n  window.navigator.userAgent.indexOf('Edge') !== -1;\n\nconst CLASSNAME = '_coral-Checkbox';\n\n/**\n @class Coral.Checkbox\n @classdesc A Checkbox component to be used as a form field.\n @htmltag coral-checkbox\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass Checkbox extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // @polyfill ie\n    this._delegateEvents(commons.extend(this._events, {\n      click: '_onClick',\n      mousedown: '_onMouseDown'\n    }));\n  \n    // Prepare templates\n    this._elements = {\n      // Try to find the label content zone or create one\n      label: this.querySelector('coral-checkbox-label') || document.createElement('coral-checkbox-label')\n    };\n    base.call(this._elements, {commons, Icon});\n  \n    // Pre-define labellable element\n    this._labellableElement = this._elements.input;\n  \n    // Check if the label is empty whenever we get a mutation\n    this._observer = new MutationObserver(this._hideLabelIfEmpty.bind(this));\n  \n    // Watch for changes to the label element's children\n    this._observer.observe(this._elements.labelWrapper, {\n      // Catch changes to childList\n      childList: true,\n      // Catch changes to textContent\n      characterData: true,\n      // Monitor any child node\n      subtree: true\n    });\n  }\n  \n  /**\n   Checked state for the checkbox. When the checked state is changed by user interaction a\n   {@link Coral.mixin.formField#event:change} event is triggered.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute checked\n   @htmlattributereflected\n   @emits {change}\n   */\n  get checked() {\n    return this._checked || false;\n  }\n  set checked(value) {\n    this._checked = transform.booleanAttr(value);\n    this._reflectAttribute('checked', this._checked);\n    \n    this._elements.input.checked = this._checked;\n  }\n  \n  /**\n   Indicates that the checkbox is neither on nor off.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute indeterminate\n   @htmlattributereflected\n   */\n  get indeterminate() {\n    return this._indeterminate || false;\n  }\n  set indeterminate(value) {\n    this._indeterminate = transform.booleanAttr(value);\n    this._reflectAttribute('indeterminate', this._indeterminate);\n    \n    this.classList.toggle('is-indeterminate', this._indeterminate);\n    this._elements.input.indeterminate = this._indeterminate;\n    this._elements.input[this._indeterminate ? 'setAttribute' : 'removeAttribute']('aria-checked', 'mixed');\n  }\n  \n  /**\n   The checkbox's label element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get label() {\n    return this._getContentZone(this._elements.label);\n  }\n  set label(value) {\n    this._setContentZone('label', value, {\n      handle: 'label',\n      tagName: 'coral-checkbox-label',\n      insert: function(label) {\n        this._elements.labelWrapper.appendChild(label);\n      }\n    });\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._elements.input.name;\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n    \n    this._elements.input.name = value;\n  }\n  \n  /**\n   The value that will be submitted when the checkbox is checked. Changing this value will not trigger an event.\n   \n   @type {String}\n   @default \"on\"\n   @htmlattribute value\n   */\n  get value() {\n    return this._elements.input.value || 'on';\n  }\n  set value(value) {\n    this._elements.input.value = value;\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.setAttribute('aria-disabled', this._disabled);\n    this.classList.toggle('is-disabled', this._disabled);\n    this._elements.input.disabled = this._disabled;\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    this.setAttribute('aria-required', this._required);\n    this._elements.input.required = this._required;\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    this.setAttribute('aria-readonly', this._readOnly);\n  }\n  \n  /*\n   Indicates to the formField that the 'checked' property needs to be set in this component.\n   \n   @protected\n   */\n  get _componentTargetProperty() { return 'checked'; }\n  \n  /*\n   Indicates to the formField that the 'checked' property has to be extracted from the event.\n   \n   @protected\n   */\n  get _eventTargetProperty() { return 'checked'; }\n  \n  /** @private */\n  _onInputChange(event) {\n    // stops the current event\n    event.stopPropagation();\n  \n    /** @ignore */\n    this[this._componentTargetProperty] = event.target[this._eventTargetProperty];\n  \n    // resets the indeterminate state after user interaction\n    this.indeterminate = false;\n  \n    // Explicitly re-emit the change event after the property has been set\n    if (this._triggerChangeEvent) {\n      // @polyfill ie/edge\n      if (IS_IE_OR_EDGE) {\n        const self = this;\n        // We need 1 additional frame in case the indeterminate state is set manually on change event\n        window.requestAnimationFrame(() => {\n          self.trigger('change');\n        });\n      }\n      else {\n        this.trigger('change');\n      }\n    }\n  }\n  \n  /**\n   @private\n   @polyfill ie/edge\n   */\n  _onClick(event) {\n    // Force the check/uncheck and trigger the change event since IE won't.\n    if (IS_IE_OR_EDGE && this.indeterminate) {\n      // Other browsers like Chrome and Firefox will trigger the change event and set indeterminate = false. So we\n      // verify if indeterminate was changed and if not, we manually check/uncheck and trigger the change event.\n      this.checked = !this.checked;\n      this._onInputChange(event);\n    }\n    // Handle the click() just like the native checkbox\n    else if (event.target === this) {\n      this.indeterminate = false;\n      this.checked = !this.checked;\n      this.trigger('change');\n    }\n  }\n  \n  /**\n   Forces checkbox to receive focus on mousedown\n   @ignore\n   */\n  _onMouseDown() {\n    const target = this._elements.input;\n    window.requestAnimationFrame(() => {\n      if (target !== document.activeElement) {\n        target.focus();\n      }\n    });\n  }\n  \n  /**\n   Hide the label if it's empty\n   @ignore\n   */\n  _hideLabelIfEmpty() {\n    const label = this._elements.label;\n  \n    // If it's empty and has no non-textnode children, hide the label\n    const hiddenValue = label.children.length === 0 && label.textContent.replace(/\\s*/g, '') === '';\n  \n    // Only bother if the hidden status has changed\n    if (hiddenValue !== this._elements.labelWrapper.hidden) {\n      this._elements.labelWrapper.hidden = hiddenValue;\n    }\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#clear}.\n   */\n  clear() {\n    this.checked = false;\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#reset}.\n   */\n  reset() {\n    this.checked = this._initialCheckedState;\n  }\n  \n  get _contentZones() { return {'coral-checkbox-label': 'label'}; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat(['indeterminate', 'checked']);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Create a fragment\n    const frag = document.createDocumentFragment();\n  \n    const templateHandleNames = ['input', 'checkbox', 'labelWrapper'];\n    \n    // Render the main template\n    frag.appendChild(this._elements.input);\n    frag.appendChild(this._elements.checkbox);\n    frag.appendChild(this._elements.labelWrapper);\n    \n    const label = this._elements.label;\n  \n    // Remove it so we can process children\n    if (label.parentNode) {\n      label.parentNode.removeChild(label);\n    }\n  \n    // Hide the labelWrapper by default (will be shown, via contentZone observer)\n    this._elements.labelWrapper.hidden = true;\n  \n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && templateHandleNames.indexOf(child.getAttribute('handle')) === -1) {\n        // Add non-template elements to the label\n        label.appendChild(child);\n      }\n      else {\n        // Remove anything else (e.g labelWrapper)\n        this.removeChild(child);\n      }\n    }\n  \n    // Add the frag to the component\n    this.appendChild(frag);\n  \n    // Assign the content zones, moving them into place in the process\n    this.label = label;\n  \n    // Cache the initial checked state of the checkbox (in order to implement reset)\n    this._initialCheckedState = this.checked;\n  \n    // Check if we need to hide the label\n    // We must do this because IE does not catch mutations when nodes are not in the DOM\n    this._hideLabelIfEmpty();\n  }\n}\n\nexport default Checkbox;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Checkbox.Label\n @classdesc The Checkbox label\n @htmltag coral-checkbox-label\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-checkbox-label');\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Checkbox from './src/scripts/Checkbox';\nimport CheckboxLabel from './src/scripts/CheckboxLabel';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-checkbox', Checkbox);\n\nCheckbox.Label = CheckboxLabel;\n\nexport {Checkbox};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  data = data_0;\n  \n  var buttonId = data.commons.getUID();\n  var listId = data.commons.getUID();\n\n  data_0 = data;\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"button\"] = document.createElement(\"button\",\"coral-button\");\n  el2.setAttribute(\"variant\", \"_custom\");\n  el2.setAttribute(\"iconposition\", \"right\");\n  el2.setAttribute(\"handle\", \"button\");\n  el2.setAttribute(\"type\", \"button\");\n  el2.setAttribute(\"is\", \"coral-button\");\n  el2.setAttribute(\"role\", \"combobox\");\n  el2.setAttribute(\"aria-expanded\", \"false\");\n  el2.setAttribute(\"aria-haspopup\", \"true\");\n  el2.id = buttonId;\n  el2.setAttribute(\"aria-controls\", listId);\n  el2.setAttribute(\"aria-owns\", listId);\n  el2.className += \" _coral-Button--dropdown _coral-Dropdown-trigger\";\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  var el4 = this[\"label\"] = document.createElement(\"coral-button-label\");\n  el4.className += \" _coral-Dropdown-label\";\n  el4.setAttribute(\"handle\", \"label\");\n  el4.setAttribute(\"aria-readonly\", \"true\");\n  el4.textContent = \"​\";\n  el2.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el5);\n  var el6 = this[\"invalidIcon\"] = document.createElement(\"coral-icon\");\n  el6.setAttribute(\"icon\", \"alert\");\n  el6.setAttribute(\"hidden\", \"\");\n  el6.setAttribute(\"handle\", \"invalidIcon\");\n  el6.className += \" _coral-Dropdown-invalidIcon\";\n  el2.appendChild(el6);\n  var el7 = document.createTextNode(\"\\n\");\n  el2.appendChild(el7);\n  frag.appendChild(el2);\n  var el8 = document.createTextNode(\"\\n\");\n  frag.appendChild(el8);\n  data = data_0;\n  \n  // Don't wait for button MO to pick up the label\n  this.button._elements.label = this.label;\n  // Render invalid icon\n  this.button.insertAdjacentHTML('beforeend', data.Icon._renderSVG('spectrum-css-icon-SelectDownChevron', ['_coral-Dropdown-icon']));\n\n  data_0 = data;\n  var el10 = document.createTextNode(\"\\n\");\n  frag.appendChild(el10);\n  var el11 = this[\"overlay\"] = document.createElement(\"coral-popover\");\n  el11.className += \" _coral-Select-overlay\";\n  el11.setAttribute(\"smart\", \"\");\n  el11.id = data_0[\"commons\"][\"getUID\"]();\n  el11.setAttribute(\"variant\", \"flyout\");\n  el11.setAttribute(\"handle\", \"overlay\");\n  el11.setAttribute(\"placement\", \"bottom\");\n  el11.setAttribute(\"trapfocus\", \"on\");\n  el11.setAttribute(\"focusonshow\", \"on\");\n  el11.setAttribute(\"role\", \"presentation\");\n  var el12 = document.createTextNode(\"\\n  \");\n  el11.appendChild(el12);\n  data = data_0;\n  \n    // Constrains the size of the list to 6 items.\n    // @todo move this to theme\n    var maxHeight = 'max-height:' + (42 * 6) + 'px';\n  \n  data_0 = data;\n  var el14 = document.createTextNode(\"\\n  \");\n  el11.appendChild(el14);\n  var el15 = this[\"list\"] = document.createElement(\"coral-selectlist\");\n  el15.setAttribute(\"style\", maxHeight);\n  el15.setAttribute(\"handle\", \"list\");\n  el15.setAttribute(\"role\", \"listbox\");\n  el15.id = listId;\n  el11.appendChild(el15);\n  var el16 = document.createTextNode(\"\\n\");\n  el11.appendChild(el16);\n  frag.appendChild(el11);\n  var el17 = document.createTextNode(\"\\n\");\n  frag.appendChild(el17);\n  var el18 = this[\"input\"] = document.createElement(\"input\");\n  el18.setAttribute(\"handle\", \"input\");\n  el18.setAttribute(\"type\", \"hidden\");\n  frag.appendChild(el18);\n  var el19 = document.createTextNode(\"\\n\");\n  frag.appendChild(el19);\n  var el20 = this[\"nativeSelect\"] = document.createElement(\"select\");\n  el20.setAttribute(\"handle\", \"nativeSelect\");\n  el20.className += \" _coral-Dropdown-select\";\n  el20.setAttribute(\"tabindex\", \"-1\");\n  frag.appendChild(el20);\n  var el21 = document.createTextNode(\"\\n\");\n  frag.appendChild(el21);\n  var el22 = this[\"taglist\"] = document.createElement(\"coral-taglist\");\n  el22.setAttribute(\"handle\", \"taglist\");\n  el22.className += \" _coral-Dropdown-tagList\";\n  frag.appendChild(el22);\n  var el23 = document.createTextNode(\"\\n\");\n  frag.appendChild(el23);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport '../../../coralui-component-button';\nimport {Tag} from '../../../coralui-component-taglist';\nimport {SelectList} from '../../../coralui-component-list';\nimport {Icon} from '../../../coralui-component-icon';\nimport '../../../coralui-component-popover';\nimport base from '../templates/base';\nimport {transform, validate, commons, i18n, Keys} from '../../../coralui-util';\n\n/**\n Enumeration for {@link Select} variants.\n \n @typedef {Object} SelectVariantEnum\n \n @property {String} DEFAULT\n A default, gray Select.\n @property {String} QUIET\n A Select with no border or background.\n */\nconst variant = {\n  DEFAULT: 'default',\n  QUIET: 'quiet'\n};\n\nconst CLASSNAME = '_coral-Dropdown';\n\n// used in 'auto' mode to determine if the client is on mobile.\nconst IS_MOBILE_DEVICE = navigator.userAgent.match(/iPhone|iPad|iPod|Android/i) !== null;\n\n/**\n Extracts the value from the item in case no explicit value was provided.\n \n @param {HTMLElement} item\n the item whose value will be extracted.\n \n @returns {String} the value that will be submitted for this item.\n \n @private\n */\nconst itemValueFromDOM = function(item) {\n  const attr = item.getAttribute('value');\n  // checking explicitely for null allows to differenciate between non set values and empty strings\n  return attr !== null ? attr : item.textContent.replace(/\\s{2,}/g, ' ').trim();\n};\n\n/**\n Calculates the difference between two given arrays. It returns the items that are in a that are not in b.\n \n @param {Array.<String>} a\n @param {Array.<String>} b\n \n @returns {Array.<String>}\n the difference between the arrays.\n */\nconst arrayDiff = function(a, b) {\n  return a.filter((item) => !b.some((item2) => item === item2));\n};\n\n/**\n @class Coral.Select\n @classdesc A Select component is a form field that allows users to select from a list of options. If this component is\n shown on a mobile device, it will show a native select list, instead of the select list styled via Coral Spectrum.\n @htmltag coral-select\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass Select extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n\n    // Templates\n    this._elements = {};\n    base.call(this._elements, {commons, Icon});\n    \n    const events = {\n      'global:click': '_onGlobalClick',\n      'global:touchstart': '_onGlobalClick',\n      \n      'coral-collection:add coral-taglist': '_onInternalEvent',\n      'coral-collection:remove coral-taglist': '_onInternalEvent',\n  \n      // item events\n      'coral-select-item:_valuechanged coral-select-item': '_onItemValueChange',\n      'coral-select-item:_contentchanged coral-select-item': '_onItemContentChange',\n      'coral-select-item:_disabledchanged coral-select-item': '_onItemDisabledChange',\n      'coral-select-item:_selectedchanged coral-select-item': '_onItemSelectedChange',\n  \n      'change coral-taglist': '_onTagListChange',\n      'change select': '_onNativeSelectChange',\n      'click select': '_onNativeSelectClick',\n      'click > ._coral-Dropdown-trigger': '_onButtonClick',\n  \n      'key:space > ._coral-Dropdown-trigger': '_onSpaceKey',\n      'key:down > ._coral-Dropdown-trigger': '_onSpaceKey'\n    };\n  \n    // Overlay\n    const overlayId = this._elements.overlay.id;\n    events[`global:capture:coral-collection:add #${overlayId} coral-selectlist`] = '_onSelectListItemAdd';\n    events[`global:capture:coral-collection:remove #${overlayId} coral-selectlist`] = '_onInternalEvent';\n    events[`global:capture:coral-selectlist:beforechange #${overlayId}`] = '_onSelectListBeforeChange';\n    events[`global:capture:coral-selectlist:change #${overlayId}`] = '_onSelectListChange';\n    events[`global:capture:coral-selectlist:scrollbottom #${overlayId}`] = '_onSelectListScrollBottom';\n    // TODO for some reason this disables tabbing into the select\n    // events[`global:key:tab #${overlayId} coral-selectlist-item`] = '_onTabKey';\n    // events[`global:key:tab+shift #${overlayId} coral-selectlist-item`] = '_onTabKey';\n    events[`global:capture:coral-overlay:close #${overlayId}`] = '_onOverlayToggle';\n    events[`global:capture:coral-overlay:open #${overlayId}`] = '_onOverlayToggle';\n    events[`global:capture:coral-overlay:positioned #${overlayId}`] = '_onOverlayPositioned';\n    events[`global:capture:coral-overlay:beforeopen #${overlayId}`] = '_onInternalEvent';\n    events[`global:capture:coral-overlay:beforeclose #${overlayId}`] = '_onInternalEvent';\n    \n    // Attach events\n    this._delegateEvents(commons.extend(this._events, events));\n  \n    // Pre-define labellable element\n    this._labellableElement = this._elements.button;\n    \n    // default value of inner flag to process events\n    this._bulkSelectionChange = false;\n\n    // we only have AUTO mode.\n    this._useNativeInput = IS_MOBILE_DEVICE;\n    \n    this._elements.taglist.reset = () => {\n      // since reseting a form will call the reset on every component, we need to kill the behavior of the taglist\n      // otherwise the state will not be accurate\n    };\n\n    this._initialValues = [];\n\n    // Init the collection mutation observer\n    this.items._startHandlingItems();\n  }\n  \n  /**\n   The item collection.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // we do lazy initialization of the collection\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-select-item',\n        onItemAdded: this._onItemAdded,\n        onItemRemoved: this._onItemRemoved,\n        onCollectionChange: this._onCollectionChange\n      });\n    }\n    return this._items;\n  }\n  \n  /**\n   Indicates whether the select accepts multiple selected values.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute multiple\n   @htmlattributereflected\n   */\n  get multiple() {\n    return this._multiple || false;\n  }\n  set multiple(value) {\n    this._multiple = transform.booleanAttr(value);\n    this._reflectAttribute('multiple', this._multiple);\n  \n    // taglist should not be in DOM if multiple === false\n    if (!this._multiple) {\n      this.removeChild(this._elements.taglist);\n    }\n    else {\n      this.appendChild(this._elements.taglist);\n    }\n    \n    // we need to remove and re-add the native select to loose the selection\n    if (this._nativeInput) {\n      this.removeChild(this._elements.nativeSelect);\n    }\n    this._elements.nativeSelect.multiple = this._multiple;\n    this._elements.nativeSelect.selectedIndex = -1;\n    \n    if (this._nativeInput) {\n      if (this._multiple) {\n        // We might not be rendered yet\n        if (this._elements.nativeSelect.parentNode) {\n          this.insertBefore(this._elements.nativeSelect, this._elements.taglist);\n        }\n      }\n      else {\n        this.appendChild(this._elements.nativeSelect);\n      }\n    }\n    \n    this._elements.list.multiple = this._multiple;\n    \n    // sets the correct name for value submission\n    this._setName(this.getAttribute('name') || '');\n    \n    // we need to make sure the selection is valid\n    this._setStateFromDOM();\n    \n    // everytime multiple changes, the state of the selectlist and taglist need to be updated\n    this.items.getAll().forEach((item) => {\n      if (this._multiple && item.hasAttribute('selected')) {\n        this._addTagToTagList(item);\n      }\n      else {\n        // taglist is never used for multiple = false\n        this._removeTagFromTagList(item);\n        \n        // when multiple = false and the item is selected, the value needs to be updated in the input\n        if (item.hasAttribute('selected')) {\n          this._elements.input.value = itemValueFromDOM(item);\n        }\n      }\n    }, this);\n  }\n  \n  /**\n   Contains a hint to the user of what can be selected in the component. If no placeholder is provided, the first\n   option will be displayed in the component.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute placeholder\n   @htmlattributereflected\n   */\n  // p = placeholder, m = multiple, se = selected\n  // case 1:  p +  m +  se = p\n  // case 2:  p +  m + !se = p\n  // case 3: !p + !m +  se = se\n  // case 4: !p + !m + !se = firstSelectable (native behavior)\n  // case 5:  p + !m +  se = se\n  // case 6:  p + !m + !se = p\n  // case 7: !p +  m +  se = selectedItems\n  // case 8: !p +  m + !se = 'Select'\n  get placeholder() {\n    return this._placeholder || '';\n  }\n  set placeholder(value) {\n    this._placeholder = transform.string(value);\n    this._reflectAttribute('placeholder', this._placeholder);\n    \n    let limitWidth = false;\n    \n    // case 1:  p +  m +  se = p\n    // case 2:  p +  m + !se = p\n    // case 6:  p + !m + !se = p\n    if (this._placeholder && (this.hasAttribute('multiple') || !this.selectedItem)) {\n      this._elements.label.classList.add('is-placeholder');\n      this._elements.label.textContent = this._placeholder;\n    }\n    // case 7: !p +  m +  se = 'Select'\n    // case 8: !p +  m + !se = 'Select'\n    else if (this.hasAttribute('multiple')) {\n      // case 7: !p +  m +  se = selectedItems\n      if (this.selectedItem) {\n        limitWidth = true;\n        this._elements.label.classList.remove('is-placeholder');\n        this._elements.label.textContent = this.selectedItems.map(item => item.textContent.trim()).join(', ');\n      }\n      // case 8: !p +  m + !se = 'Select'\n      else {\n        this._elements.label.classList.add('is-placeholder');\n        this._elements.label.textContent = i18n.get('Select');\n      }\n    }\n    // case 4: !p + !m + !se = firstSelectable (native behavior)\n    else if (!this.selectedItem) {\n      // we clean the value because there is no selected item\n      this._elements.input.value = '';\n      \n      // gets the first candidate for selection\n      const placeholderItem = this.items._getFirstSelectable();\n      this._elements.label.classList.remove('is-placeholder');\n      \n      if (placeholderItem) {\n        // selects using the attribute in case the item is not yet initialized\n        placeholderItem.setAttribute('selected', '');\n        this._elements.label.innerHTML = placeholderItem.innerHTML;\n      }\n      else {\n        // label must be cleared when there is no placeholder and no item to select\n        this._elements.label.textContent = '';\n      }\n    }\n    \n    // case 7: limit width to allow text ellipsis\n    this.style.maxWidth = limitWidth ? `${this.offsetWidth}px` : '';\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this.multiple ? this._elements.taglist.name : this._elements.input.name;\n  }\n  set name(value) {\n    this._setName(value);\n    this._reflectAttribute('name', this.name);\n  }\n  \n  /**\n   This field's current value.\n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    // we leverage the internal elements to know the value, this way we are always sure that the server submission\n    // will be correct\n    return this.multiple ? this._elements.taglist.value : this._elements.input.value;\n  }\n  set value(value) {\n    // we rely on the the values property to handle this correctly\n    this.values = [value];\n  }\n  \n  /**\n   The current selected values, as submitted during form submission. When {@link Coral.Select#multiple} is\n   <code>false</code>, this will be an array of length 1.\n   \n   @type {Array.<String>}\n   */\n  get values() {\n    if (this.multiple) {\n      return this._elements.taglist.values;\n    }\n    \n    // if there is a selection, we return whatever value it has assigned\n    return this.selectedItem ? [this._elements.input.value] : [];\n  }\n  set values(values) {\n    if (Array.isArray(values)) {\n      // when multiple = false, we explicitely ignore the other values and just set the first one\n      if (!this.multiple && values.length > 1) {\n        values = [values[0]];\n      }\n      \n      // gets all the items\n      const items = this.items.getAll();\n      \n      let itemValue;\n      // if multiple, we need to explicitely set the selection state of every item\n      if (this.multiple) {\n        items.forEach((item) => {\n          // we use DOM API instead of properties in case the item is not yet initialized\n          itemValue = itemValueFromDOM(item);\n          // if the value is located inside the values array, then we set the item as selected\n          item[values.indexOf(itemValue) !== -1 ? 'setAttribute' : 'removeAttribute']('selected', '');\n        });\n      }\n      // if single selection, we find the first item that matches the value and deselect everything else. in case,\n      // no item matches the value, we may need to find a selection candidate\n      else {\n        let targetItem;\n        // since multiple = false, there is only 1 value value\n        const value = values[0] || '';\n        \n        items.forEach((item) => {\n          // small optimization to avoid calculating the value from every item\n          if (!targetItem) {\n            itemValue = itemValueFromDOM(item);\n            \n            if (itemValue === value) {\n              // selecting the item will cause the taglist or input to be updated\n              item.setAttribute('selected', '');\n              // we store the first ocurrence, afterwards we deselect all items\n              targetItem = item;\n              \n              // since we found our target item, we continue to avoid removing the selected attribute\n              return;\n            }\n          }\n          \n          // every-non targetItem must be deselected\n          item.removeAttribute('selected');\n        });\n        \n        // if no targetItem was found, _setStateFromDOM will make sure that the state is valid\n        if (!targetItem) {\n          this._setStateFromDOM();\n        }\n      }\n    }\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.setAttribute('aria-disabled', this._disabled);\n    this.classList.toggle('is-disabled', this._disabled);\n    \n    const isReadOnly = this.hasAttribute('readonly');\n    this._elements.button.disabled = this._disabled || isReadOnly;\n    this._elements.input.disabled = this._disabled || isReadOnly;\n    this._elements.taglist.disabled = this._disabled || isReadOnly;\n    this._elements.invalidIcon.hidden = this.disabled;\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#invalid}.\n   */\n  get invalid() {\n    return super.invalid;\n  }\n  set invalid(value) {\n    super.invalid = value;\n    \n    this.classList.toggle('is-invalid', this.invalid);\n    this._elements.button.classList.toggle('is-invalid', this.invalid);\n    this._elements.invalidIcon.hidden = !this.invalid && !this.disabled;\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    this.setAttribute('aria-required', this._required);\n    this._elements.input.required = this._required;\n    this._elements.taglist.required = this._required;\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    this.setAttribute('aria-readonly', this._readOnly);\n    \n    const isDisabled = this.hasAttribute('disabled');\n    this._elements.button.disabled = this._readOnly || isDisabled;\n    this._elements.input.readOnly = this._readOnly || isDisabled;\n    this._elements.taglist.readOnly = this._readOnly || isDisabled;\n    this._elements.taglist.disabled = this._readOnly || isDisabled;\n  }\n  \n  // JSDocs inherited\n  get labelledBy() {\n    return super.labelledBy;\n  }\n  set labelledBy(value) {\n    super.labelledBy = value;\n  \n    if (this.labelledBy) {\n      this._elements.nativeSelect.setAttribute('aria-labelledby', this.labelledBy);\n    }\n    else {\n      this._elements.nativeSelect.removeAttribute('aria-labelledby');\n    }\n    \n    this._elements.taglist.labelledBy = this.labelledBy;\n  }\n  \n  /**\n   Returns the first selected item in the Select. The value <code>null</code> is returned if no element is\n   selected.\n   \n   @type {?HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.hasAttribute('multiple') ? this.items._getFirstSelected() : this.items._getLastSelected();\n  }\n  \n  /**\n   Returns an Array containing the set selected items.\n   \n   @type {Array.<HTMLElement>}\n   @readonly\n   */\n  get selectedItems() {\n    if (this.hasAttribute('multiple')) {\n      return this.items._getAllSelected();\n    }\n    \n    const item = this.selectedItem;\n    return item ? [item] : [];\n  }\n  \n  /**\n   Indicates that the Select is currently loading remote data. This will set the wait indicator inside the list.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute loading\n   */\n  get loading() {\n    return this._elements.list.loading;\n  }\n  \n  set loading(value) {\n    this._elements.list.loading = value;\n  }\n  \n  /**\n   The Select's variant. See {@link SelectVariantEnum}.\n   \n   @type {SelectVariantEnum}\n   @default SelectVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n  \n    this._elements.button.classList.toggle('_coral-Button--dropdown', this._variant === variant.DEFAULT);\n    this._elements.button.classList.toggle('_coral-Button--quiet--dropdown', this._variant === variant.QUIET);\n  }\n  \n  /** @ignore */\n  _setName(value) {\n    if (this.multiple) {\n      this._elements.input.name = '';\n      this._elements.taglist.setAttribute('name', value);\n    }\n    else {\n      this._elements.taglist.setAttribute('name', '');\n      this._elements.input.name = value;\n    }\n  }\n  \n  /**\n   @param {Boolean} [checkAvailableSpace=false]\n   If <code>true</code>, the event is triggered based on the available space.\n   \n   @private\n   */\n  _showOptions(checkAvailableSpace) {\n    if (checkAvailableSpace) {\n      // threshold in pixels\n      const ITEM_SIZE_THRESHOLD = 30;\n      \n      let scrollHeight = this._elements.list.scrollHeight;\n      const viewportHeight = this._elements.list.clientHeight;\n      const scrollTop = this._elements.list.scrollTop;\n      // we should not do this, but it increases performance since we do not need to find the item\n      const loadIndicator = this._elements.list._elements.loadIndicator;\n      \n      // we remove the size of the load indicator\n      if (loadIndicator && loadIndicator.parentNode) {\n        const outerHeight = function(el) {\n          let height = el.offsetHeight;\n          const style = getComputedStyle(el);\n          \n          height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n          return height;\n        };\n        \n        scrollHeight -= outerHeight(loadIndicator);\n      }\n      \n      // if we are not close to the bottom scroll, we cancel triggering the event\n      if (scrollTop + viewportHeight < scrollHeight - ITEM_SIZE_THRESHOLD) {\n        return;\n      }\n    }\n    \n    // we do not show the list with native\n    if (!this._useNativeInput) {\n      // Show the overlay\n      this._elements.overlay.open = true;\n  \n      // Force overlay repositioning (remote loading)\n      requestAnimationFrame(() => {\n        this._elements.overlay.reposition();\n      });\n    }\n    \n    // Trigger an event\n    // @todo: maybe we should only trigger this event when the button is toggled and we have space for more items\n    const event = this.trigger('coral-select:showitems', {\n      // amount of items in the select\n      start: this.items.length\n    });\n    \n    // while using native there is no need to show the loading\n    if (!this._useNativeInput) {\n      // if the default is prevented, we should the loading indicator\n      this._elements.list.loading = event.defaultPrevented;\n    }\n  }\n  \n  /** @private */\n  _hideOptions() {\n    // Don't close the overlay if selection = multiple\n    if (!this.multiple) {\n      this._elements.overlay.open = false;\n  \n      this.trigger('coral-select:hideitems');\n    }\n  }\n  \n  /** @ignore */\n  _onGlobalClick(event) {\n    if (!this._elements.overlay.open) {\n      return;\n    }\n  \n    const eventTargetWithinOverlayTarget = this._elements.button.contains(event.target);\n    const eventTargetWithinItself = this._elements.overlay.contains(event.target);\n    if (!eventTargetWithinOverlayTarget && !eventTargetWithinItself) {\n      this._hideOptions();\n    }\n  }\n  \n  /** @private */\n  _onSelectListItemAdd(event) {\n    // stops propagation cause the event is internal to the component\n    event.stopImmediatePropagation();\n    \n    // When items have been added, we are no longer loading\n    this.loading = false;\n    \n    // Reset height\n    this._elements.list.style.height = '';\n    \n    // Measure actual height\n    const style = window.getComputedStyle(this._elements.list);\n    const height = parseInt(style.height, 10);\n    const maxHeight = parseInt(style.maxHeight, 10);\n    \n    if (height < maxHeight) {\n      // Make it scrollable\n      this._elements.list.style.height = `${height - 1}px`;\n    }\n  }\n  \n  /** @private */\n  _onInternalEvent(event) {\n    // stops propagation cause the event is internal to the component\n    event.stopImmediatePropagation();\n  }\n  \n  /** @ignore */\n  _onItemAdded(item) {\n    const selectListItemParent = this._elements.list;\n  \n    const selectListItem = item._selectListItem || new SelectList.Item();\n    \n    // @todo: Make sure it is added at the right index.\n    selectListItemParent.appendChild(selectListItem);\n    \n    selectListItem.set({\n      value: item.value,\n      content: {\n        innerHTML: item.innerHTML\n      },\n      disabled: item.disabled,\n      selected: item.selected\n    }, true);\n  \n    const nativeOption = item._nativeOption || new Option();\n    \n    // @todo: make sure it is added at the right index.\n    this._elements.nativeSelect.appendChild(nativeOption);\n    \n    // Need to store the initially selected values in the native select so that it can be reset\n    if (this._initialValues.indexOf(item.value) !== -1) {\n      nativeOption.setAttribute('selected', 'selected');\n    }\n    \n    nativeOption.selected = item.selected;\n    nativeOption.value = item.value;\n    nativeOption.disabled = item.disabled;\n    nativeOption.innerHTML = item.innerHTML;\n    \n    if (this.multiple) {\n      // in case it was selected before it was added\n      if (item.selected) {\n        this._addTagToTagList(item);\n      }\n    }\n    // Make sure the input value is set to the selected item\n    else if (item.selected) {\n      this._elements.input.value = item.value;\n    }\n    \n    item._selectListItem = selectListItem;\n    item._nativeOption = nativeOption;\n    \n    selectListItem._selectItem = item;\n    nativeOption._selectItem = item;\n  }\n  \n  /** @private */\n  _onItemRemoved(item) {\n    if (item._selectListItem) {\n      item._selectListItem.remove();\n      item._selectListItem._selectItem = undefined;\n      item._selectListItem = undefined;\n    }\n    \n    if (item._nativeOption) {\n      this._elements.nativeSelect.removeChild(item._nativeOption);\n      item._nativeOption._selectItem = undefined;\n      item._nativeOption = undefined;\n    }\n    \n    this._removeTagFromTagList(item, true);\n  }\n  \n  /** @private */\n  _onItemSelected(item) {\n    // in case the component is not in the DOM or the internals have not been created we force it\n    if (!item._selectListItem || !item._selectListItem.parentNode) {\n      this._onItemAdded(item);\n    }\n    \n    item._selectListItem.selected = true;\n    item._nativeOption.selected = true;\n    \n    if (this.multiple) {\n      this._addTagToTagList(item);\n      // @todo: what happens when ALL items have been selected\n      //  1. a message is disabled (i18n?)\n      //  2. we don't try to open the selectlist (native behavior).\n    }\n    else {\n      this._elements.input.value = item.value;\n    }\n  }\n  \n  /** @private */\n  _onItemDeselected(item) {\n    // in case the component is not in the DOM or the internals have not been created we force it\n    if (!item._selectListItem || !item._selectListItem.parentNode) {\n      this._onItemAdded(item);\n    }\n    \n    item._selectListItem.selected = false;\n    item._nativeOption.selected = false;\n    \n    if (this.multiple) {\n      // we use the internal reference to remove the related tag from the taglist\n      this._removeTagFromTagList(item);\n    }\n  }\n  \n  /**\n   Detects when something is about to change inside the select.\n   \n   @private\n   */\n  _onSelectListBeforeChange(event) {\n    // stops propagation cause the event is internal to the component\n    event.stopImmediatePropagation();\n    \n    // We prevent the selection to change if we're in single selection and the clicked item is already selected\n    if (!this.multiple && event.detail.item.selected) {\n      event.preventDefault();\n      this._elements.overlay.open = false;\n    }\n  }\n  \n  /**\n   Detects when something inside the select list changes.\n   \n   @private\n   */\n  _onSelectListChange(event) {\n    // stops propagation cause the event is internal to the component\n    event.stopImmediatePropagation();\n    \n    // avoids triggering unnecessary changes in the selectist because selecting items programatically will trigger\n    // a change event\n    if (this._bulkSelectionChange) {\n      return;\n    }\n    \n    let oldSelection = event.detail.oldSelection || [];\n    oldSelection = !Array.isArray(oldSelection) ? [oldSelection] : oldSelection;\n  \n    let selection = event.detail.selection || [];\n    selection = !Array.isArray(selection) ? [selection] : selection;\n    \n    // if the arrays are the same, there is no point in calculating the selection changes\n    if (event.detail.oldSelection !== event.detail.selection) {\n      this._bulkSelectionChange = true;\n      \n      // we deselect first the ones that have to go\n      const diff = arrayDiff(oldSelection, selection);\n      diff.forEach((listItem) => {\n        // selectlist will report on removed items\n        if (listItem._selectItem) {\n          listItem._selectItem.removeAttribute('selected');\n        }\n      });\n      \n      // we only sync the items that changed\n      const newSelection = arrayDiff(selection, oldSelection);\n      newSelection.forEach((listItem) => {\n        if (listItem._selectItem) {\n          listItem._selectItem.setAttribute('selected', '');\n        }\n      });\n      \n      this._bulkSelectionChange = false;\n      \n      // hides the list since something was selected. if the overlay was open, it means there was user interaction so\n      // the necessary events need to be triggered\n      if (this._elements.overlay.open) {\n        // closes and triggers the hideitems event\n        this._hideOptions();\n        \n        // if there is a change in the selection, we trigger a change event\n        if (newSelection.length) {\n          this.trigger('change');\n        }\n      }\n    }\n    // in case they are the same, we just need to trigger the hideitems event when appropiate, and that is when the\n    // overlay was previously open\n    else if (this._elements.overlay.open) {\n      // closes and triggers the hideitems event\n      this._hideOptions();\n    }\n  }\n  \n  /** @private */\n  _onTagListChange(event) {\n    // cancels the change event from the taglist\n    event.stopImmediatePropagation();\n    \n    // avoids triggering unnecessary changes in the selectist because selecting items programatically will trigger\n    // a change event\n    if (this._bulkSelectionChange) {\n      return;\n    }\n    \n    this._bulkSelectionChange = true;\n  \n    const values = event.target.values;\n    // we use the selected items, because they are the only possible items that may change\n    let itemValue;\n    this.items._getAllSelected().forEach((item) => {\n      // we use DOM API instead of properties in case the item is not yet initialized\n      itemValue = itemValueFromDOM(item);\n      // if the item is inside the values array, then it has to be selected\n      item[values.indexOf(itemValue) !== -1 ? 'setAttribute' : 'removeAttribute']('selected', '');\n    });\n    \n    this._bulkSelectionChange = false;\n    \n    // if the taglist is empty, we should return the focus to the button\n    if (!values.length) {\n      this._elements.button.focus();\n    }\n    \n    // reparents the change event with the select as the target\n    this.trigger('change');\n  }\n  \n  /** @private */\n  _addTagToTagList(item) {\n    // we prepare the tag\n    item._tag = item._tag || new Tag();\n    item._tag.set({\n      value: item.value,\n      label: {\n        innerHTML: item.innerHTML\n      }\n    }, true);\n    \n    // we add the new tag at the end\n    this._elements.taglist.items.add(item._tag);\n  }\n  \n  /** @private */\n  _removeTagFromTagList(item, destroy) {\n    if (item._tag) {\n      item._tag.remove();\n      // we only remove the reference if destroy is passed, this allow us to recycle the tags when possible\n      item._tag = destroy ? undefined : item._tag;\n    }\n  }\n  \n  /** @private */\n  _onSelectListScrollBottom(event) {\n    // stops propagation cause the event is internal to the component\n    event.stopImmediatePropagation();\n    \n    if (this._elements.overlay.open) {\n      // Checking if the overlay is open guards against debounced scroll events being handled after an overlay has\n      // already been closed (e.g. clicking the last element in a selectlist always reopened the overlay emediately\n      // after closing)\n      \n      // triggers the corresponding event\n      // since we got the the event from select list we need to trigger the event\n      this._showOptions();\n    }\n  }\n  \n  /** @private */\n  _onButtonClick(event) {\n    event.preventDefault();\n    \n    if (this.disabled) {\n      return;\n    }\n    \n    // if native is required, we do not need to do anything\n    if (!this._useNativeInput) {\n      // @todo: this was removed cause otherwise the coral-select:showitems event is never triggered.\n      // if this is a multiselect and all items are selected, there should be nothing in the list to focus so do\n      // nothing.\n      // if (this.multiple && this.selectedItems.length === this.items.length) {\n      //   return;\n      // }\n      \n      // Toggle openness\n      if (this._elements.overlay.classList.contains('is-open')) {\n        this._hideOptions();\n      }\n      else {\n        // event should be triggered based on the contents\n        this._showOptions(true);\n      }\n    }\n  }\n  \n  /** @private */\n  _onNativeSelectClick() {\n    this._showOptions(false);\n  }\n  \n  /** @private */\n  _onSpaceKey(event) {\n    if (this.disabled) {\n      return;\n    }\n    \n    event.preventDefault();\n    \n    if (this._useNativeInput) {\n      // we try to open the native select\n      this._elements.nativeSelect.dispatchEvent(new MouseEvent('mousedown'));\n    }\n    else if (!this._elements.overlay.open || event.keyCode === Keys.keyToCode('space')) {\n      this._elements.button.click();\n    }\n  }\n  \n  /**\n   Prevents tab key default handling on selectList Items.\n   \n   @private\n   */\n  // _onTabKey(event) {\n  // event.preventDefault();\n  // }\n  \n  /** @private */\n  _onOverlayToggle(event) {\n    // stops propagation cause the event is internal to the component\n    event.stopImmediatePropagation();\n    \n    // Trigger private event instead\n    const type = event.type.split(':').pop();\n    this.trigger(`coral-select:_overlay${type}`);\n    \n    this._elements.button.classList.toggle('is-selected', event.target.open);\n    \n    // @a11y\n    this._elements.button.setAttribute('aria-expanded', event.target.open);\n    \n    if (!event.target.open) {\n      this.classList.remove('is-openAbove', 'is-openBelow');\n    }\n  }\n  \n  /** @private */\n  _onOverlayPositioned(event) {\n    // stops propagation cause the event is internal to the component\n    event.stopImmediatePropagation();\n    \n    if (this._elements.overlay.open) {\n      this._elements.overlay.style.minWidth = `${this.offsetWidth}px`;\n    }\n  }\n  \n  // @todo: while the select is multiple, if everything is deselected no change event will be triggered.\n  _onNativeSelectChange(event) {\n    // stops propagation cause the event is internal to the component\n    event.stopImmediatePropagation();\n    \n    // avoids triggering unnecessary changes in the selectist because selecting items programatically will trigger\n    // a change event\n    if (this._bulkSelectionChange) {\n      return;\n    }\n    \n    this._bulkSelectionChange = true;\n    // extracts the native options for the selected items. We use the selected options, instead of the complete\n    // options to make the diff since it will normally be a smaller set\n    const oldSelectedOptions = this.selectedItems.map((element) => element._nativeOption);\n    \n    // we convert the HTMLCollection to an array\n    const selectedOptions = Array.prototype.slice.call(event.target.querySelectorAll(':checked'));\n    \n    const diff = arrayDiff(oldSelectedOptions, selectedOptions);\n    diff.forEach((item) => {\n      item._selectItem.selected = false;\n    });\n    \n    // we only sync the items that changed\n    const newSelection = arrayDiff(selectedOptions, oldSelectedOptions);\n    newSelection.forEach((item) => {\n      item._selectItem.selected = true;\n    });\n    \n    this._bulkSelectionChange = false;\n    \n    // since multiple keeps the select open, we cannot return the focus to the button otherwise the user cannot\n    // continue selecting values\n    if (!this.multiple) {\n      // returns the focus to the button, otherwise the select will keep it\n      this._elements.button.focus();\n      // since selecting an item closes the native select, we need to trigger an event\n      this.trigger('coral-select:hideitems');\n    }\n    \n    // if the native change event was triggered, then it means there is some new value\n    this.trigger('change');\n  }\n  \n  /**\n   This handles content change of coral-select-item and updates its associatives.\n   \n   @private\n   */\n  _onItemContentChange(event) {\n    // stops propagation cause the event is internal to the component\n    event.stopImmediatePropagation();\n    \n    const item = event.target;\n    if (item._selectListItem && item._selectListItem.content) {\n      item._selectListItem.content.innerHTML = item.innerHTML;\n    }\n    \n    if (item._nativeOption) {\n      item._nativeOption.innerHTML = item.innerHTML;\n    }\n    \n    if (item._tag && item._tag.label) {\n      item._tag.label.innerHTML = item.innerHTML;\n    }\n    \n    // since the content changed, we need to sync the placeholder in case it was the selected item\n    this._syncSelectedItemPlaceholder();\n  }\n  \n  /** @private */\n  _syncSelectedItemPlaceholder() {\n    this.placeholder = this.getAttribute('placeholder');\n    \n    // case 3: !p + !m +  se = se\n    // case 5:  p + !m +  se = se\n    if (this.selectedItem && !this.multiple) {\n      this._elements.label.classList.remove('is-placeholder');\n      this._elements.label.innerHTML = this.selectedItem.innerHTML;\n    }\n  }\n  \n  /**\n   This handles value change of coral-select-item and updates its associatives.\n   \n   @private\n   */\n  _onItemValueChange(event) {\n    // stops propagation cause the event is internal to the component\n    event.stopImmediatePropagation();\n    \n    const item = event.target;\n    if (item._selectListItem) {\n      item._selectListItem.value = item.value;\n    }\n    \n    if (item._nativeOption) {\n      item._nativeOption.value = item.value;\n    }\n    \n    if (item._tag) {\n      item._tag.value = item.value;\n    }\n  }\n  \n  /**\n   This handles disabled change of coral-select-item and updates its associatives.\n   \n   @private\n   */\n  _onItemDisabledChange(event) {\n    // stops propagation cause the event is internal to the component\n    event.stopImmediatePropagation();\n    \n    const item = event.target;\n    if (item._selectListItem) {\n      item._selectListItem.disabled = item.disabled;\n    }\n    \n    if (item._nativeOption) {\n      item._nativeOption.disabled = item.disabled;\n    }\n  }\n  \n  /**\n   In case an item from the initial selection is removed, we need to remove it from the initial values.\n   \n   @private\n   */\n  _validateInitialState(nodes) {\n    let item;\n    let index;\n    \n    // we iterate over all the nodes, checking if they matched the initial value\n    for (let i = 0, nodeCount = nodes.length; i < nodeCount; i++) {\n      // since we are not sure if the item has been upgraded, we try first the attribute, otherwise we extract the\n      // value from the textContent\n      item = nodes[i];\n      \n      index = this._initialValues.indexOf(item.value);\n      \n      if (index !== -1) {\n        this._initialValues.splice(index, 1);\n      }\n    }\n  }\n  \n  /** @private */\n  // eslint-disable-next-line no-unused-vars\n  _onCollectionChange(addedNodes, removedNodes) {\n    // we make sure that items that were part of the initial selection are removed from the internal representation\n    this._validateInitialState(removedNodes);\n    // makes sure that the selection state matches the multiple variable\n    this._setStateFromDOM();\n  }\n  \n  /**\n   Updates the label to reflect the current state. The label needs to be updated when the placeholder changes and\n   when the selection changes.\n   \n   @private\n   */\n  _updateLabel() {\n    this._syncSelectedItemPlaceholder();\n  }\n  \n  /**\n   Handles the selection state.\n   \n   @ignore\n   */\n  _setStateFromDOM() {\n    // if it is not multiple, we need to be sure only one item is selected\n    if (!this.hasAttribute('multiple')) {\n      // makes sure that only one is selected\n      this.items._deselectAllExceptLast();\n      \n      // we execute _getFirstSelected instead of _getSelected because it is faster\n      const selectedItem = this.items._getFirstSelected();\n      \n      // case 1. there is a selected item, so no further change is required\n      // case 2. no selected item and no placeholder. an item will be automatically selected\n      // case 3. no selected item and a placehoder. we just make sure the value is really empty\n      if (!selectedItem) {\n        // we clean the value because there is no selected item\n        this._elements.input.value = '';\n        \n        // when there is no placeholder, we need to force a selection to behave like the native select\n        if (transform.string(this.getAttribute('placeholder')) === '') {\n          // gets the first candidate for selection\n          const selectable = this.items._getFirstSelectable();\n          \n          if (selectable) {\n            // selects using the attribute in case the item is not yet initialized\n            selectable.setAttribute('selected', '');\n            // we set the value explicitely, so we do not need to wait for the MO\n            this._elements.input.value = itemValueFromDOM(selectable);\n          }\n        }\n      }\n      else {\n        // we set the value explicitely, so we do not need to wait for the MO\n        this._elements.input.value = itemValueFromDOM(selectedItem);\n      }\n    }\n    \n    // handles the initial item in the select\n    this._updateLabel();\n  }\n  \n  /**\n   Handles selecting multiple items. Selection could result a single or multiple selected items.\n   \n   @private\n   */\n  _onItemSelectedChange(event) {\n    // we stop propagation since it is a private event\n    event.stopImmediatePropagation();\n    \n    // the item that was selected\n    const item = event.target;\n    \n    // setting this to true will ignore any changes from the selectlist al\n    this._bulkSelectionChange = true;\n    \n    // when the item is selected, we need to enforce the selection mode\n    if (item.selected) {\n      this._onItemSelected(item);\n      \n      // enforces the selection mode\n      if (!this.hasAttribute('multiple')) {\n        this.items._deselectAllExcept(item);\n      }\n    }\n    else {\n      this._onItemDeselected(item);\n    }\n    \n    this._bulkSelectionChange = false;\n    \n    // since there is a change in selection, we need to update the placeholder\n    this._updateLabel();\n  }\n  \n  // JSDocs inherited from coralui-mixin-formfield\n  clear() {\n    this.value = '';\n  }\n  \n  /**\n   Focuses the component.\n   \n   @ignore\n   */\n  focus() {\n    if (!this.contains(document.activeElement)) {\n      this._elements.button.focus();\n    }\n  }\n  \n  // JSDocs inherited from coralui-mixin-formfield\n  reset() {\n    // reset the values to the initial values\n    this.values = this._initialValues;\n  }\n  \n  /**\n   Returns {@link Select} variants.\n   \n   @return {SelectVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat(['variant', 'multiple', 'placeholder', 'loading']);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n    \n    this.classList.toggle(`${CLASSNAME}--native`, this._useNativeInput);\n  \n    if (!this._useNativeInput && this.contains(this._elements.nativeSelect)) {\n      this.removeChild(this._elements.nativeSelect);\n    }\n    \n    // handles the initial selection\n    this._setStateFromDOM();\n    \n    // we need to keep a state of the initial items to be able to reset the component. values is not reliable during\n    // initialization since items are not yet initialized\n    this.selectedItems.forEach((item) => {\n      // we use DOM API instead of properties in case the item is not yet initialized\n      this._initialValues.push(itemValueFromDOM(item));\n    }, this);\n  \n    // Cleanup template elements (supporting cloneNode)\n    const templateElements = this.querySelectorAll('[handle]');\n    for (let i = 0; i < templateElements.length; ++i) {\n      const currentElement = templateElements[i];\n      if (currentElement.parentNode === this) {\n        this.removeChild(currentElement);\n      }\n    }\n  \n    // Render the main template\n    const frag = document.createDocumentFragment();\n  \n    // Cannot be open by default when rendered\n    this._elements.overlay.removeAttribute('open');\n    \n    frag.appendChild(this._elements.button);\n    frag.appendChild(this._elements.input);\n    frag.appendChild(this._elements.nativeSelect);\n    frag.appendChild(this._elements.taglist);\n    frag.appendChild(this._elements.overlay);\n    \n    this.insertBefore(frag, this.firstChild);\n  \n    // Assign the button as the target for the overlay\n    this._elements.overlay.target = this._elements.button;\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    \n    // In case it was moved out don't forget to remove it\n    if (!this.contains(this._elements.overlay)) {\n      this._elements.overlay.remove();\n    }\n  }\n  \n  /**\n   Triggered when the {@link Select} could accept external data to be loaded by the user. If <code>preventDefault()</code> is\n   called, then a loading indicator will be shown. {@link Select#loading} should be set to false to indicate\n   that the data has been successfully loaded.\n   \n   @typedef {CustomEvent} coral-select:showitems\n   \n   @property {Number} detail.start\n   The count of existing items, which is the index where new items should start.\n   */\n  \n  /**\n   Triggered when the {@link Select} hides the UI used to select items. This is typically used to cancel a load request\n   because the items will not be shown anymore.\n   \n   @typedef {CustomEvent} coral-select:hideitems\n   */\n}\n\nexport default Select;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform} from '../../../coralui-util';\n\n/**\n @class Coral.Select.Item\n @classdesc A Select item component\n @htmltag coral-select-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass SelectItem extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    this._observer = new MutationObserver(this._handleMutation.bind(this));\n    this._observer.observe(this, {\n      characterData: true,\n      childList: true,\n      subtree: true\n    });\n  }\n  \n  /**\n   Item content element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    // Support configs\n    if (typeof value === 'object') {\n      for (const prop in value) {\n        /** @ignore */\n        this[prop] = value[prop];\n      }\n    }\n  }\n  \n  /**\n   Whether this item is disabled. When set to <code>true</code>, this will prevent every user interaction with the\n   item. If disabled is set to <code>true</code> for a selected item it will be deselected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.trigger('coral-select-item:_disabledchanged');\n  }\n  \n  /**\n   Whether the item is selected. Selected cannot be set to <code>true</code> if the item is disabled.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n    \n    this.trigger('coral-select-item:_selectedchanged');\n  }\n  \n  /**\n   Value of the item. If not explicitly set, the value of <code>Node.textContent</code> is returned.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   @htmlattributereflected\n   */\n  get value() {\n    // keep spaces to only 1 max and trim to mimic native select option behavior\n    return typeof this._value === 'undefined' ? this.textContent.replace(/\\s{2,}/g, ' ').trim() : this._value;\n  }\n  set value(value) {\n    this._value = transform.string(value);\n    this._reflectAttribute('value', this._value);\n    \n    this.trigger('coral-select-item:_valuechanged');\n  }\n  \n  /** @private */\n  _handleMutation() {\n    this.trigger('coral-select-item:_contentchanged', {\n      content: this.textContent\n    });\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['selected', 'disabled', 'value'];\n  }\n}\n\nexport default SelectItem;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport translations from './i18n/translations.json';\nimport {strings, commons} from '../coralui-util';\nimport Select from './src/scripts/Select';\nimport SelectItem from './src/scripts/SelectItem';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-select': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-select', Select);\nwindow.customElements.define('coral-select-item', SelectItem);\n\nSelect.Item = SelectItem;\n\nexport {Select};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"input\"] = document.createElement(\"input\");\n  el0.setAttribute(\"type\", \"hidden\");\n  el0.setAttribute(\"name\", \"\");\n  el0.setAttribute(\"handle\", \"input\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"valueAsText\"] = document.createElement(\"time\");\n  el2.setAttribute(\"handle\", \"valueAsText\");\n  el2.id = data_0[\"commons\"][\"getUID\"]();\n  el2.setAttribute(\"hidden\", \"\");\n  frag.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  frag.appendChild(el3);\n  var el4 = this[\"hours\"] = document.createElement(\"input\",\"coral-textfield\");\n  el4.setAttribute(\"is\", \"coral-textfield\");\n  el4.id = data_0[\"commons\"][\"getUID\"]();\n  el4.setAttribute(\"type\", \"number\");\n  el4.setAttribute(\"min\", \"0\");\n  el4.setAttribute(\"max\", \"23\");\n  el4.className += \" _coral-Clock-hour\";\n  el4.setAttribute(\"handle\", \"hours\");\n  el4.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('Hours'));\n  frag.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  frag.appendChild(el5);\n  var el6 = this[\"divider\"] = document.createElement(\"span\");\n  el6.className += \" _coral-Clock-divider\";\n  el6.setAttribute(\"handle\", \"divider\");\n  el6.textContent = \":\";\n  frag.appendChild(el6);\n  var el7 = document.createTextNode(\"\\n\");\n  frag.appendChild(el7);\n  var el8 = this[\"minutes\"] = document.createElement(\"input\",\"coral-textfield\");\n  el8.setAttribute(\"is\", \"coral-textfield\");\n  el8.setAttribute(\"type\", \"number\");\n  el8.setAttribute(\"min\", \"0\");\n  el8.setAttribute(\"max\", \"59\");\n  el8.className += \" _coral-Clock-minute\";\n  el8.setAttribute(\"handle\", \"minutes\");\n  el8.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('Minutes'));\n  frag.appendChild(el8);\n  var el9 = document.createTextNode(\"\\n\");\n  frag.appendChild(el9);\n  var el10 = this[\"period\"] = document.createElement(\"coral-select\");\n  el10.setAttribute(\"handle\", \"period\");\n  el10.className += \" _coral-Clock-period\";\n  el10.setAttribute(\"hidden\", \"\");\n  el10.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('AM/PM'));\n  var el11 = document.createTextNode(\"\\n  \");\n  el10.appendChild(el11);\n  var el12 = document.createElement(\"coral-select-item\");\n  el12.setAttribute(\"value\", \"am\");\n  el10.appendChild(el12);\n  var el13 = document.createTextNode(\"\\n  \");\n  el10.appendChild(el13);\n  var el14 = document.createElement(\"coral-select-item\");\n  el14.setAttribute(\"value\", \"pm\");\n  el10.appendChild(el14);\n  var el15 = document.createTextNode(\"\\n\");\n  el10.appendChild(el15);\n  frag.appendChild(el10);\n  var el16 = document.createTextNode(\"\\n\");\n  frag.appendChild(el16);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport {DateTime} from '../../../coralui-datetime';\nimport '../../../coralui-component-textfield';\nimport '../../../coralui-component-select';\nimport base from '../templates/base';\nimport {transform, commons, validate, i18n} from '../../../coralui-util';\n\n// Default for display and value format\nconst DEFAULT_HOUR_FORMAT = 'HH';\nconst DEFAULT_MINUTE_FORMAT = 'mm';\nconst DEFAULT_TIME_FORMAT = `${DEFAULT_HOUR_FORMAT}:${DEFAULT_MINUTE_FORMAT}`;\n\n// Used to extract the time format from a date format\nconst AUTHORIZED_TOKENS = '(A|a|H{1,2}|h{1,2}|k{1,2}|m{1,2})';\nconst TIME_REG_EXP = new RegExp(`${AUTHORIZED_TOKENS}.*${AUTHORIZED_TOKENS}|${AUTHORIZED_TOKENS}`);\nconst HOUR_REG_EXP = new RegExp('h{1,2}|H{1,2}|k{1,2}');\nconst MIN_REG_EXP = new RegExp('m{1,2}');\n\n/**\n Enumeration for {@link Clock} variants.\n \n @typedef {Object} ClockVariantEnum\n \n @property {String} DEFAULT\n A default, gray Clock.\n @property {String} QUIET\n A Clock with no border or background.\n */\nconst variant = {\n  DEFAULT: 'default',\n  QUIET: 'quiet'\n};\n\nconst CLASSNAME = '_coral-Clock';\n\n// builds an array containing all possible variant classnames. this will be used to remove classnames when the variant\n// changes\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantValue in variant) {\n  ALL_VARIANT_CLASSES.push(`${CLASSNAME}--${variant[variantValue]}`);\n}\n\n/**\n @class Coral.Clock\n @classdesc A Clock component that can be used as a time selection form field. Leverages {@link momentJS} if loaded\n on the page.\n @htmltag coral-clock\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass Clock extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Default value\n    this._value = '';\n    \n    // Events\n    this._delegateEvents(commons.extend(this._events, {\n      'change [handle=\"period\"]': '_onPeriodChange'\n    }));\n    \n    // Prepare templates\n    this._elements = {};\n    base.call(this._elements, {commons, i18n});\n  \n    // Pre-define labellable element\n    this._labellableElement = this;\n  }\n  \n  /**\n   The format used to display the selected time to the user. If the user manually types a time, this format\n   will be used to parse the value. 'HH:mm' is supported by default. Include momentjs to support additional format\n   string options see http://momentjs.com/docs/#/displaying/.\n   \n   @type {String}\n   @default \"HH:mm\"\n   @htmlattribute displayformat\n   @htmlattributereflected\n   */\n  get displayFormat() {\n    return this._displayFormat || DEFAULT_TIME_FORMAT;\n  }\n  set displayFormat(value) {\n    this._displayFormat = this._extractTimeFormat(transform.string(value).trim(), TIME_REG_EXP, DEFAULT_TIME_FORMAT);\n    this._reflectAttribute('displayformat', this._displayFormat);\n    \n    this._syncDisplay();\n  }\n  \n  /**\n   The format to use on expressing the time as a string on the <code>value</code> attribute. The value\n   will be sent to the server using this format. If an empty string is provided, then the default value per type\n   will be used. 'HH:mm' is supported by default. Include momentjs to support additional format string options\n   see http://momentjs.com/docs/#/displaying/.\n   \n   @type {String}\n   @default \"HH:mm\"\n   @htmlattribute valueformat\n   @htmlattributereflected\n   */\n  get valueFormat() {\n    return this._valueFormat || DEFAULT_TIME_FORMAT;\n  }\n  set valueFormat(value) {\n    const setValueFormat = (newValue) => {\n      this._valueFormat = this._extractTimeFormat(transform.string(newValue).trim(), TIME_REG_EXP, DEFAULT_TIME_FORMAT);\n      this._reflectAttribute('valueformat', this._valueFormat);\n    };\n  \n    // Once the valueFormat is set, we make sure the value is also correct\n    if (!this._valueFormat && this._originalValue) {\n      setValueFormat(value);\n      this.value = this._originalValue;\n    }\n    else {\n      setValueFormat(value);\n      this._elements.input.value = this.value;\n    }\n  }\n  \n  /**\n   The current value as a Date. If the value is \"\" or an invalid date, <code>null</code> will be returned.\n   \n   @type {Date}\n   @default null\n   */\n  get valueAsDate() {\n    return this._value ? new Date(this._value.toDate().getTime()) : null;\n  }\n  set valueAsDate(value) {\n    this.value = value instanceof Date ? new DateTime.Moment(value, null, true).format(this.valueFormat) : '';\n  }\n  \n  /**\n   The clock's variant. See {@link ClockVariantEnum}.\n   \n   @type {String}\n   @default ClockVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n  \n    // passes down the variant to the underlying components\n    this._elements.hours.variant = this._variant;\n    this._elements.minutes.variant = this._variant;\n    this._elements.period.variant = this._variant;\n  \n    // removes every existing variant\n    this.classList.remove(...ALL_VARIANT_CLASSES);\n  \n    if (this._variant !== variant.DEFAULT) {\n      this.classList.add(`${CLASSNAME}--${this._variant}`);\n    }\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._elements.input.name;\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n    \n    this._elements.input.name = value;\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.setAttribute('aria-disabled', this._disabled);\n    this.classList.toggle('is-disabled', this._disabled);\n    \n    this._elements.hours.disabled = this._disabled;\n    this._elements.minutes.disabled = this._disabled;\n    // stops the form submission\n    this._elements.input.disabled = this._disabled;\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#invalid}.\n   */\n  get invalid() {\n    return super.invalid;\n  }\n  set invalid(value) {\n    super.invalid = value;\n  \n    this._elements.hours.invalid = this._invalid;\n    this._elements.minutes.invalid = this._invalid;\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    this.setAttribute('aria-required', this._required);\n  \n    this._elements.hours.required = this._required;\n    this._elements.minutes.required = this._required;\n    this._elements.input.required = this._required;\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    this.setAttribute('aria-readonly', this._readOnly);\n  \n    this._elements.hours.readOnly = this._readOnly;\n    this._elements.minutes.readOnly = this._readOnly;\n    this._elements.input.readOnly = this._readOnly;\n  }\n  \n  /**\n   This field's current value.\n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    return this._getValueAsString(this._value, this.valueFormat);\n  }\n  set value(value) {\n    value = typeof value === 'string' ? value : '';\n    // This is used to change the value if valueformat is also set but afterwards\n    this._originalValue = value;\n    \n    // we do strict conversion of the values\n    const time = new DateTime.Moment(value, this.valueFormat, true);\n    this._value = time.isValid() ? time : '';\n    this._elements.input.value = this.value;\n  \n    this._syncValueAsText();\n    this._syncDisplay();\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#labelledBy}.\n   */\n  get labelledBy() {\n    // Get current aria-labelledby attribute on the labellable element.\n    let labelledBy = this.getAttribute('aria-labelledby');\n  \n    // If a labelledBy attribute has been defined,\n    if (labelledBy) {\n    \n      // and strip the valueAsText element id from the end of the aria-labelledby string.\n      labelledBy = labelledBy.replace(this._elements.valueAsText.id, '').trim();\n    \n      // If the resulting labelledBy string is empty, return null.\n      if (!labelledBy.length) {\n        labelledBy = null;\n      }\n    }\n    return labelledBy;\n  }\n  set labelledBy(value) {\n    super.labelledBy = value;\n  \n    // The specified labelledBy property.\n    const labelledBy = this.labelledBy;\n  \n    // An array of element ids to label control, the last being the valueAsText element id.\n    const ids = [this._elements.valueAsText.id];\n  \n    // If a labelledBy property exists,\n    if (labelledBy) {\n      // prepend the labelledBy value to the ids array\n      ids.unshift(labelledBy);\n  \n      // Set aria-labelledby attribute on the labellable element joining ids array into space-delimited list of ids.\n      this.setAttribute('aria-labelledby', ids.join(' '));\n  \n      // Set label for attribute\n      const labelElement = document.getElementById(labelledBy);\n      if (labelElement && labelElement.tagName === 'LABEL') {\n        labelElement.setAttribute('for', this._elements.hours.id);\n        this._labelElement = labelElement;\n      }\n    }\n    else {\n      // labelledBy property is null, remove the aria-labelledby attribute.\n      this.removeAttribute('aria-labelledby');\n  \n      // Remove label for attribute\n      if (this._labelElement) {\n        this._labelElement.removeAttribute('for');\n      }\n    }\n  }\n  \n  /**\n   Ignore the date part and use the time part only\n   \n   @private\n   */\n  _extractTimeFormat(format, regExp, defaultFormat) {\n    const match = regExp.exec(format);\n    return match && match.length && match[0] !== '' ? match[0] : defaultFormat;\n  }\n  \n  /**\n   Sync time display based on the format\n   \n   @private\n   */\n  _syncDisplay() {\n    const hourFormat = this._extractTimeFormat(this.displayFormat, HOUR_REG_EXP, DEFAULT_HOUR_FORMAT);\n    const minuteFormat = this._extractTimeFormat(this.displayFormat, MIN_REG_EXP, DEFAULT_MINUTE_FORMAT);\n    \n    this._elements.hours.placeholder = hourFormat;\n    this._elements.minutes.placeholder = minuteFormat;\n    \n    this._elements.hours.value = this._getValueAsString(this._value, hourFormat);\n    this._elements.minutes.value = this._getValueAsString(this._value, minuteFormat);\n    \n    this._syncPeriod();\n    this._syncValueAsText();\n  }\n  \n  /**\n   Sync period selector based on the format\n   \n   @private\n   */\n  _syncPeriod() {\n    const period = this._elements.period;\n    const time = this._value;\n    const am = i18n.get('am');\n    const pm = i18n.get('pm');\n    const items = period.items.getAll();\n    \n    if (time && time.isValid()) {\n      if (time.hours() < 12) {\n        period.value = 'am';\n      }\n      else {\n        period.value = 'pm';\n      }\n    }\n    \n    // Check for am/pm\n    if (this.displayFormat.indexOf('a') !== -1) {\n      items[0].textContent = am;\n      items[1].textContent = pm;\n      this._togglePeriod(true);\n    }\n    else if (this.displayFormat.indexOf('A') !== -1) {\n      items[0].textContent = am.toUpperCase();\n      items[1].textContent = pm.toUpperCase();\n      this._togglePeriod(true);\n    }\n    else {\n      this._togglePeriod(false);\n    }\n  }\n  \n  /** @private */\n  _togglePeriod(show) {\n    this.classList.toggle(`${CLASSNAME}--extended`, show);\n    this._elements.period.hidden = !show;\n  }\n  \n  /** @private */\n  _onPeriodChange(event) {\n    // stops the event from leaving the component\n    event.stopImmediatePropagation();\n    \n    const time = this._value;\n    const period = this._elements.period;\n    \n    // we check if a change event needs to be triggered since it was produced via user interaction\n    if (time && time.isValid()) {\n      if (this.displayFormat.indexOf('h') !== -1) {\n        if (period.value === 'am') {\n          time.subtract(12, 'h');\n        }\n        else {\n          time.add(12, 'h');\n        }\n      }\n      \n      this.value = time.format(this.valueFormat);\n      this.trigger('change');\n    }\n  }\n  \n  _syncValueAsText() {\n    this._elements.valueAsText.textContent = this._getValueAsString(this._value, this.displayFormat);\n    \n    if (!this.getAttribute('aria-labelledby')) {\n      this.labelledBy = this.labelledBy;\n    }\n  }\n  \n  /**\n   Kills the internal _onInputChange from formMixin because it does not check the target.\n   \n   @private\n   */\n  _onInputChange(event) {\n    // stops the event from leaving the component\n    event.stopImmediatePropagation();\n    \n    let newTime = new DateTime.Moment();\n    const oldTime = this._value;\n    \n    let hours = parseInt(this._elements.hours.value, 10);\n    const minutes = parseInt(this._elements.minutes.value, 10);\n    \n    if (window.isNaN(hours) || window.isNaN(minutes)) {\n      newTime = '';\n    }\n    else {\n      if (!this._elements.period.hidden &&\n        this.displayFormat.indexOf('h') !== -1 &&\n        this._elements.period.value === 'pm') {\n        hours += 12;\n      }\n      \n      newTime.hours(hours);\n      newTime.minutes(minutes);\n    }\n    \n    // we check if a change event needs to be triggered since it was produced via user interaction\n    if (newTime && newTime.isValid()) {\n      // @polyfill ie\n      this.invalid = false;\n      \n      if (!newTime.isSame(oldTime, 'hour') || !newTime.isSame(oldTime, 'minute')) {\n        this.value = newTime.format(this.valueFormat);\n        this.trigger('change');\n      }\n    }\n    else {\n      // @polyfill ie\n      this.invalid = true;\n      // does not sync the inputs so allow the user to continue typing the date\n      this._value = '';\n      \n      if (newTime !== oldTime) {\n        this.trigger('change');\n      }\n    }\n  }\n  \n  /**\n   Helper class that converts the internal moment value into a String using the provided date format. If the value is\n   invalid, empty string will be returned.\n   \n   @param {?Moment} value\n   The value representing the date. It has to be a moment object or <code>null</code>\n   @param {String} format\n   The Date format to be used.\n   \n   @returns {String} a String representing the value in the given format.\n   \n   @ignore\n   */\n  _getValueAsString(value, format) {\n    return value && value.isValid() ? value.format(format) : '';\n  }\n  \n  focus() {\n    // Sets focus to appropriate descendant\n    if (!this.contains(document.activeElement)) {\n      this._elements.hours.focus();\n    }\n  }\n  \n  /**\n   Returns {@link Clock} variants.\n   \n   @return {ClockVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'displayformat',\n      'displayFormat',\n      'valueformat',\n      'valueFormat',\n      'variant'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // a11y\n    this.setAttribute('role', 'group');\n    \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n    if (!this._valueFormat) { this.valueFormat = DEFAULT_TIME_FORMAT; }\n    if (!this._displayFormat) { this.displayFormat = DEFAULT_TIME_FORMAT; }\n  \n    // clean up to be able to clone it\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    \n    // Render template\n    ['input', 'valueAsText', 'hours', 'divider', 'minutes', 'period'].forEach((handle) => {\n      this.appendChild(this._elements[handle]);\n    }, this);\n    \n    this._syncDisplay();\n  }\n}\n\nexport default Clock;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport translations from './i18n/translations.json';\nimport {strings, commons} from '../coralui-util';\nimport Clock from './src/scripts/Clock';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-clock': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-clock', Clock);\n\nexport {Clock};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {transform} from '../../../coralui-util';\n\n// try to stay in same color space as long as possible (because of conversions being not 100% accurate ...)\n/** @ignore */\nconst colorSpace = {\n  RGB: 'rgb',\n  HEX: 'hex',\n  CMYK: 'cmyk',\n  HSB: 'hsb',\n  HSL: 'hsl'\n};\n\n/**\n Transforms part of a color (r,g,b) into a hex value.\n \n @static\n @param {Number} x\n value between 0-255\n \n @return {String} Hex representation\n @ignore\n */\nfunction _hex(x) {\n  return `0${x.toString(16)}`.slice(-2);\n}\n\n/** @ignore */\nfunction _slice(str, startStr) {\n  let sliced = [];\n  \n  str = transform.string(str).toLowerCase();\n  startStr = transform.string(startStr).toLowerCase();\n  \n  if (str.indexOf(startStr) !== -1) {\n    sliced = str.substring(str.indexOf(startStr) + startStr.length, str.lastIndexOf(')')).split(/,\\s*/);\n  }\n  \n  return sliced;\n}\n\n/**\n Parse an rgb value into an object.\n e.g.: 'rgb(0,0,0)' => {r:0, g:0, b:0}\n \n @static\n @param {String} rgbStr\n The string representing the rgb value\n \n @return {Object} {r, g, b} Returns null if string could not be parsed\n @ignore\n */\nfunction _parseRGB(rgbStr) {\n  const sliced = _slice(rgbStr, 'rgb(');\n  \n  if (sliced.length !== 3) {\n    return null;\n  }\n  \n  const r = parseInt(sliced[0], 10);\n  const g = parseInt(sliced[1], 10);\n  const b = parseInt(sliced[2], 10);\n  \n  if (isNaN(r) || isNaN(g) || isNaN(b)) {\n    return null;\n  }\n  \n  if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) {\n    return null;\n  }\n  \n  return {r, g, b};\n}\n\n/**\n Serialize an rgb object into a string.\n e.g.: {r:0, g:0, b:0} => 'rgb(0,0,0)'\n \n @static\n @param {Object} rgb\n @return {String} rgbStr The string representing the rgb value\n @ignore\n */\nfunction _serializeRGB(rgb) {\n  if (rgb) {\n    return `rgb(${rgb.r},${rgb.g},${rgb.b})`;\n  }\n  \n  return '';\n}\n\n\n/**\n Parse an rgba value into an object.\n e.g.: 'rgba(0,0,0,0.5)' => {r:0, g:0, b:0, a:0.5}\n \n @static\n @param {String} rgbaStr\n The string representing the rgba value.\n \n @return {Object} {r, g, b, a} Returns null if string could not be parsed\n @ignore\n */\nfunction _parseRGBA(rgbaStr) {\n  \n  const sliced = _slice(rgbaStr, 'rgba(');\n  \n  if (sliced.length !== 4) {\n    return null;\n  }\n  \n  const r = parseInt(sliced[0], 10);\n  const g = parseInt(sliced[1], 10);\n  const b = parseInt(sliced[2], 10);\n  const a = parseFloat(sliced[3]);\n  \n  if (isNaN(r) || isNaN(g) || isNaN(b) || isNaN(a)) {\n    return null;\n  }\n  \n  if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255 || a < 0 || a > 1) {\n    return null;\n  }\n  \n  return {r, g, b, a};\n}\n\n\n/**\n Serialize an rgba object into a string.\n e.g.: {r:0, g:0, b:0, a:0.5} => 'rgb(0,0,0,0.5)'\n \n @static\n @param {Object} rgba\n @return {String} rgbaStr The string representing the rgba value\n @ignore\n */\nfunction _serializeRGBA(rgba) {\n  if (rgba) {\n    return `rgba(${rgba.r},${rgba.g},${rgba.b},${rgba.a})`;\n  }\n  return '';\n}\n\n/**\n Parse an cmyk value into an object.\n e.g.: 'cmyk(0, 100, 50, 0)' => {c:0, m:100, y:50, k:0}\n \n @static\n @param {String} cmykStr\n The string representing the cmyk value.\n \n @return {Object} {c, m, y, k} Returns null if string could not be parsed\n @ignore\n */\nfunction _parseCMYK(cmykStr) {\n  \n  const sliced = _slice(cmykStr, 'cmyk(');\n  \n  if (sliced.length !== 4) {\n    return null;\n  }\n  \n  const c = parseFloat(sliced[0]);\n  const m = parseFloat(sliced[1]);\n  const y = parseFloat(sliced[2]);\n  const k = parseFloat(sliced[3]);\n  \n  if (isNaN(c) || isNaN(m) || isNaN(y) || isNaN(k)) {\n    return null;\n  }\n  \n  if (c < 0 || c > 100 || m < 0 || m > 100 || y < 0 || y > 100 || k < 0 || k > 100) {\n    return null;\n  }\n  \n  return {c, m, y, k};\n}\n\n/**\n Serialize an cmyk object into a string.\n e.g.: {c:0, m:100, y:50, k:0} => 'cmyk(0, 100, 50, 0)'\n \n @static\n @param {Object} cmyk\n @return {String} cmykStr The string representing the cmyk value\n @ignore\n */\nfunction _serializeCMYK(cmyk) {\n  if (cmyk) {\n    \n    // make sure there are not more than 2 digits after dot\n    const c = parseFloat(cmyk.c.toFixed(2));\n    const m = parseFloat(cmyk.m.toFixed(2));\n    const y = parseFloat(cmyk.y.toFixed(2));\n    const k = parseFloat(cmyk.k.toFixed(2));\n    \n    return `cmyk(${c},${m},${y},${k})`;\n  }\n  return '';\n}\n\n/**\n Parse an hex value into a number. Corrects a hex value, if it is represented by 3 or 6 characters with or without\n '#'.\n \n @static\n @param {String} hexStr The string representing the hex value\n @return {Number} Returns a number representing the parsed hex value\n @ignore\n */\nfunction _parseHex(hexStr) {\n  hexStr = transform.string(hexStr).replace('#', '');\n  \n  if (hexStr.length === 3) {\n    hexStr = hexStr.charAt(0) + hexStr.charAt(0) +\n      hexStr.charAt(1) + hexStr.charAt(1) +\n      hexStr.charAt(2) + hexStr.charAt(2);\n  }\n  \n  // test if this could be a hex value\n  const isOk = (/^[0-9A-F]{6}$/i).test(hexStr);\n  if (!isOk) {\n    return null;\n  }\n  \n  return parseInt(hexStr, 16);\n}\n\n/**\n Transforms a hex color into RGB representation.\n \n @static\n @param {Number} hex\n The color hex representation.\n \n @return {Object} {r, g, b}\n @ignore\n */\nfunction _hexToRgb(hex) {\n  // explicitly test null (0 is valid)\n  if (hex !== null) {\n    return {\n      r: hex >> 16,\n      // eslint-disable-next-line no-extra-parens\n      g: (hex & 0x00FF00) >> 8,\n      // eslint-disable-next-line no-extra-parens\n      b: (hex & 0x0000FF)\n    };\n  }\n  return null;\n}\n\n/**\n Serialize a hex number into a string.\n \n @static\n @param {Number} hex\n @return {String}\n @ignore\n */\nfunction _serializeHex(hex) {\n  \n  // explicitly test null (0 is valid)\n  if (hex !== null) {\n    const rgb = _hexToRgb(hex);\n    return `#${_hex(rgb.r) + _hex(rgb.g) + _hex(rgb.b)}`;\n  }\n  \n  return '';\n}\n\n/**\n Transforms a RGB color into HEX representation.\n \n @static\n @param {Object} rgb\n @return {Number} hex The color hex representation\n @ignore\n */\nfunction _rgbToHex(rgb) {\n  if (rgb) {\n    return _parseHex(_hex(rgb.r) + _hex(rgb.g) + _hex(rgb.b));\n  }\n  return null;\n}\n\n/**\n Transforms a cmyk color into RGB representation. Converting CMYK to RGB will incur slight loss because both color\n spaces are not absolute and there will be some round-off error in the conversion process.\n \n @static\n @param {Object} cmyk\n @return {Object} {r, g, b}\n @ignore\n */\nfunction _cmykToRgb(cmyk) {\n  if (!cmyk) {\n    return null;\n  }\n  \n  const result = {\n    r: 0,\n    g: 0,\n    b: 0\n  };\n  \n  const c = parseFloat(cmyk.c) / 100;\n  const m = parseFloat(cmyk.m) / 100;\n  const y = parseFloat(cmyk.y) / 100;\n  const k = parseFloat(cmyk.k) / 100;\n  \n  result.r = 1 - Math.min(1, c * (1 - k) + k);\n  result.g = 1 - Math.min(1, m * (1 - k) + k);\n  result.b = 1 - Math.min(1, y * (1 - k) + k);\n  \n  result.r = Math.round(result.r * 255);\n  result.g = Math.round(result.g * 255);\n  result.b = Math.round(result.b * 255);\n  \n  return result;\n}\n\n/**\n Transforms a rgb color into cmyk representation. Converting CMYK to RGB will incur slight loss because both color\n spaces are not absolute and there will be some round-off error in the conversion process.\n \n @static\n @param {Object} rgb\n @return {Object} {c, m, y, k}\n @ignore\n */\nfunction _rgbToCmyk(rgb) {\n  if (!rgb) {\n    return null;\n  }\n  \n  const result = {\n    c: 0,\n    m: 0,\n    y: 0,\n    k: 0\n  };\n  \n  if (rgb.r === 0 && rgb.g === 0 && rgb.b === 0) {\n    result.k = 100;\n    return result;\n  }\n  \n  const r = rgb.r / 255;\n  const g = rgb.g / 255;\n  const b = rgb.b / 255;\n  \n  result.k = Math.min(1 - r, 1 - g, 1 - b);\n  result.c = (1 - r - result.k) / (1 - result.k);\n  result.m = (1 - g - result.k) / (1 - result.k);\n  result.y = (1 - b - result.k) / (1 - result.k);\n  \n  result.c = Math.round(result.c * 100);\n  result.m = Math.round(result.m * 100);\n  result.y = Math.round(result.y * 100);\n  result.k = Math.round(result.k * 100);\n  \n  return result;\n}\n\n\n/**\n Parse an hsb value into an object.\n e.g.: 'hsb(360,100,0)' => {h:360, s:100, b:0}\n \n @static\n @param {String} hsbStr\n The string representing the hsb value.\n \n @return {Object} {h, s, b} Returns null if string could not be parsed\n @ignore\n */\nfunction _parseHSB(hsbStr) {\n  const sliced = _slice(hsbStr, 'hsb(');\n  \n  if (sliced.length !== 3) {\n    return null;\n  }\n  \n  // make sure there are not more than 2 digits after dot\n  const h = parseFloat(sliced[0]);\n  const s = parseFloat(sliced[1]);\n  const b = parseFloat(sliced[2]);\n  \n  if (isNaN(h) || isNaN(s) || isNaN(b)) {\n    return null;\n  }\n  \n  if (h < 0 || h > 360 || s < 0 || s > 100 || b < 0 || b > 100) {\n    return null;\n  }\n  \n  return {h, s, b};\n}\n\n/**\n Serialize an hsb object into a string.\n e.g.: {h:0, s:0, b:0} => 'hsb(0,0,0)'\n \n @static\n @param {Object} hsb\n @return {String} hsb The string representing the hsb value\n @ignore\n */\nfunction _serializeHSB(hsb) {\n  if (hsb) {\n    \n    // make sure there are not more than 2 digits after dot\n    const h = parseFloat(hsb.h.toFixed(2));\n    const s = parseFloat(hsb.s.toFixed(2));\n    const b = parseFloat(hsb.b.toFixed(2));\n    \n    return `hsb(${h},${s},${b})`;\n  }\n  \n  return '';\n}\n\n\n/**\n Transforms a HSB (same as HSV) color into RGB representation.\n h (hue has value between 0-360 degree)\n s (saturation has a value between 0-100 percent)\n b (brightness has a value between 0-100 percent)\n \n @static\n @param {Object} hsb\n @return {Object} {r, g, b}\n @ignore\n */\nfunction _hsbToRgb(hsb) {\n  if (!hsb) {\n    return null;\n  }\n  \n  const h = hsb.h / 360;\n  const s = hsb.s / 100;\n  const v = hsb.b / 100;\n  \n  let r, g, b;\n  const i = Math.floor(h * 6);\n  const f = h * 6 - i;\n  const p = v * (1 - s);\n  const q = v * (1 - f * s);\n  const t = v * (1 - (1 - f) * s);\n  switch (i % 6) {\n    case 0:\n      r = v;\n      g = t;\n      b = p;\n      break;\n    case 1:\n      r = q;\n      g = v;\n      b = p;\n      break;\n    case 2:\n      r = p;\n      g = v;\n      b = t;\n      break;\n    case 3:\n      r = p;\n      g = q;\n      b = v;\n      break;\n    case 4:\n      r = t;\n      g = p;\n      b = v;\n      break;\n    case 5:\n      r = v;\n      g = p;\n      b = q;\n      break;\n  }\n  return {\n    r: Math.round(r * 255),\n    g: Math.round(g * 255),\n    b: Math.round(b * 255)\n  };\n}\n\n/**\n Transforms a RGB color into HSB (same as HSV) representation.\n \n @static\n @param {Object} rgb\n @return {Object} {h, s, b}\n @ignore\n */\nfunction _rgbToHsb(rgb) {\n  if (!rgb) {\n    return null;\n  }\n  \n  const r = rgb.r;\n  const g = rgb.g;\n  const b = rgb.b;\n  \n  const max = Math.max(r, g, b);\n  const min = Math.min(r, g, b);\n  const d = max - min;\n  let h;\n  const s = max === 0 ? 0 : d / max;\n  const v = max / 255;\n  \n  switch (max) {\n    case min:\n      h = 0;\n      break;\n    case r:\n      h = g - b + d * (g < b ? 6 : 0);\n      h /= 6 * d;\n      break;\n    case g:\n      h = b - r + d * 2;\n      h /= 6 * d;\n      break;\n    case b:\n      h = r - g + d * 4;\n      h /= 6 * d;\n      break;\n  }\n  \n  return {\n    h: h * 360,\n    s: s * 100,\n    b: v * 100\n  };\n}\n\n/**\n Parse an hsl value into an object.\n e.g.: 'hsl(360,100,0)' => {h:360, s:100, b:0}\n \n @static\n @param {String} hslStr\n The string representing the hsl value.\n \n @return {Object} {h, s, l} Returns null if string could not be parsed\n @ignore\n */\nfunction _parseHSL(hslStr) {\n  const sliced = _slice(hslStr, 'hsl(');\n  \n  if (sliced.length !== 3) {\n    return null;\n  }\n  \n  // make sure there are not more than 2 digits after dot\n  const h = parseFloat(sliced[0]);\n  const s = parseFloat(sliced[1]);\n  const l = parseFloat(sliced[2]);\n  \n  if (isNaN(h) || isNaN(s) || isNaN(l)) {\n    return null;\n  }\n  \n  if (h < 0 || h > 360 || s < 0 || s > 100 || l < 0 || l > 100) {\n    return null;\n  }\n  \n  return {h, s, l};\n}\n\n/**\n Serialize an hsl object into a string.\n e.g.: {h:0, s:0, l:0} => 'hsl(0,0%,0%)'\n \n @static\n @param {Object} hsl\n @return {String} hsb The string representing the hsb value\n @ignore\n */\nfunction _serializeHSL(hsl) {\n  if (hsl) {\n    \n    // make sure there are not more than 2 digits after dot\n    const h = parseFloat(hsl.h.toFixed(2));\n    const s = parseFloat(hsl.s.toFixed(2));\n    const l = parseFloat(hsl.l.toFixed(2));\n    \n    return `hsl(${h},${s}%,${l}%)`;\n  }\n  \n  return '';\n}\n\n\n/**\n Transforms a HSL color into RGB representation.\n h (hue has value between 0-360 degree)\n s (saturation has a value between 0-100 percent)\n l (lightness has a value between 0-100 percent)\n \n @static\n @param {Object} hsl\n @return {Object} {r, g, b}\n @ignore\n */\nfunction _hslToRgb(hsl) {\n  if (!hsl) {\n    return null;\n  }\n  \n  const h = hsl.h / 360;\n  const s = hsl.s / 100;\n  const l = hsl.l / 100;\n  \n  let r;\n  let g;\n  let b;\n  \n  if (s === 0) {\n    // achromatic\n    r = g = b = l;\n  }\n  else {\n    const hue2rgb = (p, q, t) => {\n      if (t < 0) {\n        t += 1;\n      }\n      if (t > 1) {\n        t -= 1;\n      }\n      if (t < 1 / 6) {\n        return p + (q - p) * 6 * t;\n      }\n      if (t < 1 / 2) {\n        return q;\n      }\n      if (t < 2 / 3) {\n        return p + (q - p) * (2 / 3 - t) * 6;\n      }\n      return p;\n    };\n    \n    const qValue = l < 0.5 ? l * (1 + s) : l + s - l * s;\n    const pValue = 2 * l - qValue;\n    r = hue2rgb(pValue, qValue, h + 1 / 3);\n    g = hue2rgb(pValue, qValue, h);\n    b = hue2rgb(pValue, qValue, h - 1 / 3);\n  }\n  \n  \n  return {\n    r: Math.round(r * 255),\n    g: Math.round(g * 255),\n    b: Math.round(b * 255)\n  };\n}\n\n/**\n Transforms an RGB color into HSL representation.\n \n @static\n @param {Object} rgb\n @return {Object} {h, s, l}\n @ignore\n */\nfunction _rgbToHsl(rgb) {\n  if (!rgb) {\n    return null;\n  }\n  \n  const r = rgb.r / 255;\n  const g = rgb.g / 255;\n  const b = rgb.b / 255;\n  \n  const max = Math.max(r, g, b);\n  const min = Math.min(r, g, b);\n  let h;\n  let s;\n  const l = (max + min) / 2;\n  \n  if (max === min) {\n    // achromatic\n    h = s = 0;\n  }\n  else {\n    const d = max - min;\n    s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n    switch (max) {\n      case r:\n        h = (g - b) / d + (g < b ? 6 : 0);\n        break;\n      case g:\n        h = (b - r) / d + 2;\n        break;\n      case b:\n        h = (r - g) / d + 4;\n        break;\n    }\n    h /= 6;\n  }\n  \n  return {\n    h: h * 360,\n    s: s * 100,\n    l: l * 100\n  };\n}\n\n/**\n Parse an hsla value into an object.\n e.g.: 'hsla(360,100%,0%,0.5)' => {h:360, s:100, l:0, 0.5}\n \n @static\n @param {String} hslaStr\n The string representing the hsl value.\n \n @return {Object} {h, s, l, a} Returns null if string could not be parsed\n @ignore\n */\nfunction _parseHSLA(hslaStr) {\n  const sliced = _slice(hslaStr, 'hsla(');\n  \n  if (sliced.length !== 4) {\n    return null;\n  }\n  \n  // make sure there are not more than 2 digits after dot\n  const h = parseFloat(sliced[0]);\n  const s = parseFloat(sliced[1]);\n  const l = parseFloat(sliced[2]);\n  const a = parseFloat(sliced[3]);\n  \n  if (isNaN(h) || isNaN(s) || isNaN(l)) {\n    return null;\n  }\n  \n  if (h < 0 || h > 360 || s < 0 || s > 100 || l < 0 || l > 100 || a < 0 || a > 1) {\n    return null;\n  }\n  \n  return {h, s, l, a};\n}\n\n/**\n Serialize an hsla object into a string.\n e.g.: {h:0, s:0, l:0, a:0.5} => 'hsl(0,0%,0%,0.5)'\n \n @static\n @param {Object} hsla\n @return {String} hsb The string representing the hsb value\n @ignore\n */\nfunction _serializeHSLA(hsla) {\n  if (hsla) {\n    \n    // make sure there are not more than 2 digits after dot\n    const h = parseFloat(hsla.h.toFixed(2));\n    const s = parseFloat(hsla.s.toFixed(2));\n    const l = parseFloat(hsla.l.toFixed(2));\n    const a = parseFloat(hsla.a.toFixed(2));\n    \n    return `hsla(${h},${s}%,${l}%,${a})`;\n  }\n  \n  return '';\n}\n\n/**\n Color is used to get a color in different color spaces, calculate tints and shades etc.\n */\nclass Color {\n  /** @ignore */\n  constructor() {\n    // Set defaults\n    this._colorSpace = colorSpace.HEX;\n    this._value = '';\n    this._alpha = 1;\n  }\n  \n  /**\n   The value of the color. This value can be set in different formats (HEX, RGB, RGBA, HSB, HSL, HSLA and CMYK).\n   Corrects a hex value, if it is represented by 3 or 6 characters with or without '#'.\n   \n   e.g:\n   HEX:  #FFFFFF\n   RGB:  rgb(16,16,16)\n   RGBA: rgba(215,40,40,0.9)\n   HSB:  hsb(360,100,100)\n   HSL:  hsl(360,100%,100%)\n   HSLA: hsla(360,100%,100%,0.9)\n   CMYK: cmyk(0,100,50,0)\n   \n   @type {String}\n   @default \"\"\n   */\n  get value() {\n    return this._value;\n  }\n  set value(value) {\n    // Two color formats with alpha values\n    const rgba = _parseRGBA(value);\n    const hsla = _parseHSLA(value);\n    \n    const rgb = _parseRGB(value);\n    const cmyk = _parseCMYK(value);\n    const hsb = _parseHSB(value);\n    const hsl = _parseHSL(value);\n    const hex = _parseHex(value);\n    \n    if (rgba !== null) {\n      this._colorSpace = colorSpace.RGB;\n      this.alpha = rgba.a;\n      value = _serializeRGB({\n        r: rgba.r,\n        g: rgba.g,\n        b: rgba.b\n      });\n    }\n    else if (hsla !== null) {\n      this._colorSpace = colorSpace.HSL;\n      this.alpha = hsla.a;\n      value = _serializeHSL({\n        h: hsla.h,\n        s: hsla.s,\n        l: hsla.l\n      });\n    }\n    else if (rgb !== null) {\n      this._colorSpace = colorSpace.RGB;\n    }\n    else if (cmyk !== null) {\n      this._colorSpace = colorSpace.CMYK;\n    }\n    else if (hsb !== null) {\n      this._colorSpace = colorSpace.HSB;\n    }\n    else if (hsl !== null) {\n      this._colorSpace = colorSpace.HSL;\n    }\n    else if (hex !== null) {\n      this._colorSpace = colorSpace.HEX;\n    }\n    else {\n      // restore defaults\n      this._colorSpace = colorSpace.HEX;\n      value = '';\n    }\n    \n    this._value = value;\n  }\n  \n  /**\n   The alpha value of the color (value between 0-1).\n   \n   @type {Number}\n   @default 1\n   */\n  get alpha() {\n    return this._alpha;\n  }\n  set alpha(value) {\n    if (isNaN(value) || value < 0 || value > 1) {\n      return;\n    }\n    this._alpha = transform.number(value);\n  }\n  \n  /**\n   The rgb values of the color (value between 0-255).\n   e.g.: {r:0, g:0, b:0}\n   \n   @type {Object}\n   @default null\n   */\n  get rgb() {\n    let rgb = null;\n    if (this._colorSpace === colorSpace.RGB) {\n      rgb = _parseRGB(this.value);\n    }\n    else if (this._colorSpace === colorSpace.HEX) {\n      const hex = _parseHex(this.value);\n      rgb = _hexToRgb(hex);\n    }\n    else if (this._colorSpace === colorSpace.CMYK) {\n      const cmyk = _parseCMYK(this.value);\n      rgb = _cmykToRgb(cmyk);\n    }\n    else if (this._colorSpace === colorSpace.HSB) {\n      const hsb = _parseHSB(this.value);\n      rgb = _hsbToRgb(hsb);\n    }\n    else if (this._colorSpace === colorSpace.HSL) {\n      const hsl = _parseHSL(this.value);\n      rgb = _hslToRgb(hsl);\n    }\n    return rgb;\n  }\n  set rgb(value) {\n    this.value = _serializeRGB(value);\n  }\n  \n  /**\n   The serialized rgb values of the color (r,g,b values between 0-255).\n   e.g: 'rgb(0,0,0)'\n   \n   @type {String}\n   @default \"\"\n   */\n  get rgbValue() {\n    return _serializeRGB(this.rgb);\n  }\n  set rgbValue(value) {\n    this.value = value;\n  }\n  \n  /**\n   The rgba values of the color (r,g,b values between 0-255 and a between 0-1).\n   e.g: {r:0, g:0, b:0, a:1}\n   \n   @type {Object}\n   @default null\n   */\n  get rgba() {\n    const rgb = this.rgb;\n    if (rgb) {\n      return {\n        r: rgb.r,\n        g: rgb.g,\n        b: rgb.b,\n        a: this.alpha\n      };\n    }\n    \n    return null;\n  }\n  set rgba(value) {\n    this.value = _serializeRGBA(value);\n  }\n  \n  /**\n   The serialized rgba values of the color (r,g,b values between 0-255 and alpha between 0-1).\n   e.g: 'rgba(0,0,0,1)'\n   \n   @type {String}\n   @default \"\"\n   */\n  get rgbaValue() {\n    return _serializeRGBA(this.rgba);\n  }\n  set rgbaValue(value) {\n    this.value = value;\n  }\n  \n  /**\n   The hex value of the color.\n   \n   @type {Number}\n   @default null\n   */\n  get hex() {\n    // as hex color space is essentially just the same as rgb and there is no loss in conversion, we can do it this way\n    return _rgbToHex(this.rgb);\n  }\n  set hex(value) {\n    this.value = _serializeHex(value);\n  }\n  \n  /**\n   The serialized hex value of the color.\n   e.g: '#94CD4B'\n   \n   @type {String}\n   @default \"\"\n   */\n  get hexValue() {\n    return _serializeHex(this.hex);\n  }\n  set hexValue(value) {\n    this.value = value;\n  }\n  \n  /**\n   The cmyk values of the color (all values between 0-100).\n   e.g: {c:0, m:100, y:0, k:100}\n   \n   @type {Object}\n   @default null\n   */\n  get cmyk() {\n    let cmyk = null;\n    let rgb = null;\n    if (this._colorSpace === colorSpace.RGB) {\n      rgb = _parseRGB(this.value);\n      cmyk = _rgbToCmyk(rgb);\n    }\n    else if (this._colorSpace === colorSpace.HEX) {\n      const hex = _parseHex(this.value);\n      rgb = _hexToRgb(hex);\n      cmyk = _rgbToCmyk(rgb);\n    }\n    else if (this._colorSpace === colorSpace.CMYK) {\n      cmyk = _parseCMYK(this.value);\n    }\n    else if (this._colorSpace === colorSpace.HSB) {\n      const hsb = _parseHSB(this.value);\n      rgb = _hsbToRgb(hsb);\n      cmyk = _rgbToCmyk(rgb);\n    }\n    else if (this._colorSpace === colorSpace.HSL) {\n      const hsl = _parseHSL(this.value);\n      rgb = _hslToRgb(hsl);\n      cmyk = _rgbToCmyk(rgb);\n    }\n    return cmyk;\n  }\n  set cmyk(value) {\n    this.value = _serializeCMYK(value);\n  }\n  \n  /**\n   The serialized cmyk values of the color (all values between 0-100).\n   e.g: 'cmyk(100,100,100,100)'\n   \n   @type {String}\n   @default \"\"\n   */\n  get cmykValue() {\n    return _serializeCMYK(this.cmyk);\n  }\n  set cmykValue(value) {\n    this.value = value;\n  }\n  \n  /**\n   The hsb values of the color.\n   h (hue has value between 0-360 degree)\n   s (saturation has a value between 0-100 percent)\n   b (brightness has a value between 0-100 percent)\n   \n   @type {Object}\n   @default null\n   */\n  get hsb() {\n    let hsb = null;\n    let rgb = null;\n    if (this._colorSpace === colorSpace.RGB) {\n      rgb = _parseRGB(this.value);\n      hsb = _rgbToHsb(rgb);\n    }\n    else if (this._colorSpace === colorSpace.HEX) {\n      const hex = _parseHex(this.value);\n      rgb = _hexToRgb(hex);\n      hsb = _rgbToHsb(rgb);\n    }\n    else if (this._colorSpace === colorSpace.CMYK) {\n      const cmyk = _parseCMYK(this.value);\n      rgb = _cmykToRgb(cmyk);\n      hsb = _rgbToHsb(rgb);\n    }\n    else if (this._colorSpace === colorSpace.HSB) {\n      hsb = _parseHSB(this.value);\n    }\n    else if (this._colorSpace === colorSpace.HSL) {\n      const hsl = _parseHSL(this.value);\n      rgb = _hslToRgb(hsl);\n      hsb = _rgbToHsb(rgb);\n    }\n    return hsb;\n  }\n  set hsb(value) {\n    this.value = _serializeHSB(value);\n  }\n  \n  /**\n   The serialized hsb values of the color (s and b values between 0-100, h between 0-360).\n   e.g: 'hsb(360,100,100)'\n   \n   @type {String}\n   @default \"\"\n   */\n  get hsbValue() {\n    return _serializeHSB(this.hsb);\n  }\n  set hsbValue(value) {\n    this.value = value;\n  }\n  \n  /*\n   The hsl values of the color.\n   h (hue has value between 0-360 degree)\n   s (saturation has a value between 0-100 percent)\n   l (lightness has a value between 0-100 percent)\n   \n   @type {Object}\n   @default null\n   */\n  get hsl() {\n    let hsl = null;\n    let rgb = null;\n    if (this._colorSpace === colorSpace.RGB) {\n      rgb = _parseRGB(this.value);\n      hsl = _rgbToHsl(rgb);\n    }\n    else if (this._colorSpace === colorSpace.HEX) {\n      const hex = _parseHex(this.value);\n      rgb = _hexToRgb(hex);\n      hsl = _rgbToHsl(rgb);\n    }\n    else if (this._colorSpace === colorSpace.CMYK) {\n      const cmyk = _parseCMYK(this.value);\n      rgb = _cmykToRgb(cmyk);\n      hsl = _rgbToHsl(rgb);\n    }\n    else if (this._colorSpace === colorSpace.HSB) {\n      const hsb = _parseHSB(this.value);\n      rgb = _hsbToRgb(hsb);\n      hsl = _rgbToHsl(rgb);\n    }\n    else if (this._colorSpace === colorSpace.HSL) {\n      hsl = _parseHSL(this.value);\n    }\n    return hsl;\n  }\n  set hsl(value) {\n    this.value = _serializeHSL(value);\n  }\n  \n  /**\n   The serialized hsl values of the color (s and l values between 0-100 in percent, h between 0-360).\n   e.g: 'hsl(360,100%,100%)'\n   \n   @type {String}\n   @default \"\"\n   */\n  get hslValue() {\n    return _serializeHSL(this.hsl);\n  }\n  set hslValue(value) {\n    this.value = value;\n  }\n  \n  /**\n   The hsla values of the color.\n   h (hue has value between 0-360 degree)\n   s (saturation has a value between 0-100 percent)\n   l (lightness has a value between 0-100 percent)\n   a (alpha has a value between 0-1)\n   \n   @type {Object}\n   @default null\n   */\n  get hsla() {\n    const hsl = this.hsl;\n    if (hsl) {\n      return {\n        h: hsl.h,\n        s: hsl.s,\n        l: hsl.l,\n        a: this.alpha\n      };\n    }\n    \n    return null;\n  }\n  set hsla(value) {\n    this.value = _serializeHSLA(value);\n  }\n  \n  /**\n   The serialized hsla values of the color.\n   h (hue has value between 0-360 degree)\n   s (saturation has a value between 0-100 percent)\n   l (lightness has a value between 0-100 percent)\n   a (alpha has a value between 0-1)\n   e.g: 'hsla(360,50%,50%,0.9)'\n   \n   @type {String}\n   @default \"\"\n   */\n  get hslaValue() {\n    return _serializeHSLA(this.hsla);\n  }\n  set hslaValue(value) {\n    this.value = value;\n  }\n  \n  /**\n   Clone this color.\n   \n   @type {Color}\n   */\n  clone() {\n    const clone = new this.constructor();\n    clone.value = this.value;\n    clone.alpha = this.alpha;\n    return clone;\n  }\n  \n  /**\n   Test if this Color is similar to another color.\n   \n   @type {Boolean}\n   @param {Color} compareColor\n   The color to compare this color too.\n   \n   @param {Boolean} [allowSlightColorDifference=true]\n   While converting between color spaces slight loses might happen => we should normally consider colors equal,\n   even if they are minimally different.\n \n   */\n  isSimilarTo(compareColor, allowSlightColorDifference) {\n    if (this.rgb === null && (!compareColor || compareColor.rgb === null)) {\n      // Consider an rgb of null equal to a null object (or another value of null)\n      return true;\n    }\n    \n    if (!compareColor || compareColor.rgb === null || this.rgb === null) {\n      return false;\n    }\n    \n    let allowedRgbDifference = 1;\n    let allowedAlphaDifference = 0.01;\n    \n    if (allowSlightColorDifference === false) {\n      allowedRgbDifference = 0;\n      allowedAlphaDifference = 0;\n    }\n    \n    const rgb = this.rgb;\n    const rgb2 = compareColor.rgb;\n    \n    const rDiff = Math.abs(rgb2.r - rgb.r);\n    const gDiff = Math.abs(rgb2.g - rgb.g);\n    const bDiff = Math.abs(rgb2.b - rgb.b);\n    const aDiff = Math.abs(this.alpha - compareColor.alpha);\n    \n    if (rDiff <= allowedRgbDifference && gDiff <= allowedRgbDifference && bDiff <= allowedRgbDifference && aDiff <= allowedAlphaDifference) {\n      return true;\n    }\n    \n    return false;\n  }\n  \n  \n  /**\n   Calculates an array of lighter colors.\n   \n   @type {Array<Coral.Color>}\n   @param {Number} amount\n   Amount of tint colors to generate.\n \n   */\n  calculateTintColors(amount) {\n    const tintColors = [];\n    let tintColor = null;\n    \n    const rgb = this.rgb;\n    if (rgb) {\n      const r = rgb.r;\n      const g = rgb.g;\n      const b = rgb.b;\n      \n      let tintFactor = 1;\n      \n      for (let i = 1; i <= amount; i++) {\n        tintFactor = i / (amount + 1);\n        tintColor = this.clone();\n        // alpha value kept from original\n        tintColor.rgb = {\n          r: r + (255 - r) * tintFactor,\n          g: g + (255 - g) * tintFactor,\n          b: b + (255 - b) * tintFactor\n        };\n        \n        tintColors.push(tintColor);\n      }\n    }\n    \n    return tintColors;\n  }\n  \n  /**\n   Calculates an array of darker colors.\n   \n   @type {Array<Coral.Color>}\n   @param {Number} amount\n   Amount of shade colors to generate.\n \n   */\n  calculateShadeColors(amount) {\n    const shadeColors = [];\n    let shadeColor = null;\n    \n    const rgb = this.rgb;\n    if (rgb) {\n      const r = rgb.r;\n      const g = rgb.g;\n      const b = rgb.b;\n      \n      let shadeFactor = 1;\n      \n      for (let i = 1; i <= amount; i++) {\n        shadeFactor = i / (amount + 1);\n        shadeColor = this.clone();\n        // alpha value kept from original\n        shadeColor.rgb = {\n          r: r * (1 - shadeFactor),\n          g: g * (1 - shadeFactor),\n          b: b * (1 - shadeFactor)\n        };\n        \n        shadeColors.push(shadeColor);\n      }\n    }\n    \n    return shadeColors;\n  }\n}\n\nexport default Color;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport Color from './Color';\nimport {transform} from '../../../coralui-util';\n\n/**\n @class Coral.ColorInput.Item\n @classdesc A ColorInput Item component\n @htmltag coral-colorinput-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ColorInputItem extends ComponentMixin(HTMLElement) {\n  /**\n   The value of the color. This value can be set in different formats (HEX, RGB, RGBA, HSB, HSL, HSLA and CMYK).\n   Corrects a hex value, if it is represented by 3 or 6 characters with or without '#'.\n   \n   e.g:\n   HEX:  #FFFFFF\n   RGB:  rgb(16,16,16)\n   RGBA: rgba(215,40,40,0.9)\n   HSB: hsb(360,100,100)\n   HSL: hsl(360,100,100)\n   HSLA: hsla(360,100%,100%, 0.9)\n   CMYK: cmyk(0,100,50,0)\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   @htmlattributereflected\n   */\n  get value() {\n    return this._value || '';\n  }\n  set value(value) {\n    // invalid values fallback to empty string\n    const color = new Color();\n    color.value = value;\n    \n    // invalid values fallback to empty string\n    this._value = color.rgb !== null ? value : '';\n    this._reflectAttribute('value', this._value);\n  }\n  \n  /**\n   Whether the Item is selected.\n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    value = transform.booleanAttr(value);\n    \n    this._selected = value;\n    this._reflectAttribute('selected', this._selected);\n    \n    this.classList.toggle('is-selected', this._selected);\n    this.setAttribute('aria-selected', this._selected);\n    \n    this.trigger('coral-colorinput-item:_selectedchanged');\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['selected', 'value'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    // adds the role to support accessibility\n    this.setAttribute('role', 'option');\n  }\n}\n\nexport default ColorInputItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @mixin ColorInputAbstractSubviewMixin\n @classdesc An abstract subview class that other subviews should extend.\n */\nconst ColorInputAbstractSubviewMixin = (superClass) => class extends superClass {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    this._events = {\n      'click ._coral-ColorInput-preview': '_onPreviewClicked'\n    };\n  \n    // export a static variable used by all subviews\n    this.constructor._lastValidColor = null;\n  }\n  \n  /** @ignore */\n  _onPreviewClicked() {\n    if (this._colorinput.valueAsColor !== null) {\n      this.constructor._lastValidColor = this._colorinput.valueAsColor;\n      this._colorinput._setActiveColor(null);\n    }\n    else if (this.constructor._lastValidColor !== null) {\n      this._colorinput._setActiveColor(this.constructor._lastValidColor);\n    }\n  }\n  \n  /** @ignore */\n  _beforeOverlayOpen() {\n    // overwrite callback in subclass if needed\n  }\n  \n  /** @ignore */\n  _onColorInputChange() {\n    // overwrite callback in subclass if needed\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    const overlay = this.closest('._coral-ColorInput-overlay');\n    \n    if (overlay && overlay._colorinput) {\n      // save references to bound callbacks (in order to be able to remove them again from event system)\n      this.__beforeOverlayOpen = this._beforeOverlayOpen.bind(this);\n      this.__onColorInputChange = this._onColorInputChange.bind(this);\n      \n      // cache colorinput if this component is attached to dom\n      this._colorinput = overlay._colorinput;\n      this._colorinput.on('coral-overlay:beforeopen', this.__beforeOverlayOpen);\n      this._colorinput.on('coral-colorinput:_valuechange', this.__onColorInputChange);\n    \n      // trigger one change initially\n      this._onColorInputChange();\n    }\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n  \n    if (this._colorinput) {\n      this._colorinput.off('coral-overlay:beforeopen', this.__beforeOverlayOpen);\n      this._colorinput.off('coral-colorinput:_valuechange', this.__onColorInputChange);\n    }\n  \n    this._colorinput = null;\n  }\n};\n\nexport default ColorInputAbstractSubviewMixin;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"label\"] = document.createElement(\"div\");\n  el0.className += \" _coral-Slider-labelContainer\";\n  el0.setAttribute(\"handle\", \"label\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = this[\"labelContent\"] = document.createElement(\"label\");\n  el2.className += \" _coral-Slider-label\";\n  el2.setAttribute(\"handle\", \"labelContent\");\n  el0.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el3);\n  var el4 = this[\"labelValue\"] = document.createElement(\"label\");\n  el4.className += \" _coral-Slider-value\";\n  el4.setAttribute(\"handle\", \"labelValue\");\n  el4.setAttribute(\"hidden\", \"\");\n  el0.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  el0.appendChild(el5);\n  frag.appendChild(el0);\n  var el6 = document.createTextNode(\"\\n\");\n  frag.appendChild(el6);\n  var el7 = this[\"controls\"] = document.createElement(\"div\");\n  el7.className += \" _coral-Slider-controls\";\n  el7.setAttribute(\"role\", \"presentation\");\n  el7.setAttribute(\"handle\", \"controls\");\n  var el8 = document.createTextNode(\"\\n  \");\n  el7.appendChild(el8);\n  var el9 = document.createElement(\"div\");\n  el9.className += \" _coral-Slider-track\";\n  var el10 = document.createTextNode(\"\\n    \");\n  el9.appendChild(el10);\n  var el11 = this[\"fillHandle\"] = document.createElement(\"div\");\n  el11.className += \" _coral-Slider-track--fill\";\n  el11.setAttribute(\"handle\", \"fillHandle\");\n  el11.setAttribute(\"hidden\", \"\");\n  el9.appendChild(el11);\n  var el12 = document.createTextNode(\"\\n  \");\n  el9.appendChild(el12);\n  el7.appendChild(el9);\n  var el13 = document.createTextNode(\"\\n  \");\n  el7.appendChild(el13);\n  var el14 = this[\"leftHandle\"] = document.createElement(\"div\");\n  el14.className += \" _coral-Slider-handle\";\n  el14.setAttribute(\"handle\", \"leftHandle\");\n  var el15 = document.createTextNode(\"\\n    \");\n  el14.appendChild(el15);\n  var el16 = this[\"leftInput\"] = document.createElement(\"input\");\n  el16.setAttribute(\"aria-orientation\", \"horizontal\");\n  el16.setAttribute(\"handle\", \"leftInput\");\n  el16.setAttribute(\"value\", \"1\");\n  el16.setAttribute(\"type\", \"range\");\n  el16.className += \" _coral-Slider-input\";\n  el14.appendChild(el16);\n  var el17 = document.createTextNode(\"\\n  \");\n  el14.appendChild(el17);\n  el7.appendChild(el14);\n  var el18 = document.createTextNode(\"\\n\");\n  el7.appendChild(el18);\n  frag.appendChild(el7);\n  var el19 = document.createTextNode(\"\\n\");\n  frag.appendChild(el19);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport {Collection} from '../../../coralui-collection';\nimport base from '../templates/base';\nimport {transform, validate, events, commons, Keys} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Slider';\nconst CLASSNAME_HANDLE = '_coral-Slider-handle';\nconst CLASSNAME_INPUT = '_coral-Slider-input';\n\n/**\n Enumeration for {@link Slider} orientations.\n \n @typedef {Object} SliderOrientationEnum\n \n @property {String} HORIZONTAL\n Horizontal slider.\n @property {String} VERTICAL\n Not supported. Falls back to HORIZONTAL.\n */\nconst orientation = {\n  HORIZONTAL: 'horizontal',\n  VERTICAL: 'vertical'\n};\n\n/**\n @class Coral.Slider\n @classdesc A Slider component is a form field that can be used to set a number within a range.\n @htmltag coral-slider\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass Slider extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    this._delegateEvents(commons.extend(this._events, {\n      'key:up ._coral-Slider-handle': '_handleKey',\n      'key:right ._coral-Slider-handle': '_handleKey',\n      'key:down ._coral-Slider-handle': '_handleKey',\n      'key:left ._coral-Slider-handle': '_handleKey',\n      'key:pageUp ._coral-Slider-handle': '_handleKey',\n      'key:pageDown ._coral-Slider-handle': '_handleKey',\n      'key:home ._coral-Slider-handle': '_handleKey',\n      'key:end ._coral-Slider-handle': '_handleKey',\n      \n      'input': '_onInputChangeHandler',\n  \n      'touchstart': '_onMouseDown',\n      'mousedown': '_onMouseDown',\n  \n      'capture:focus': '_focus',\n      'capture:blur': '_blur'\n    }));\n    \n    // Prepare templates\n    this._elements = {};\n    this._getTemplate().call(this._elements, {commons});\n  \n    // Pre-define labellable element\n    this._labellableElement = this._elements.leftInput;\n  \n    // Content zone\n    this._elements.content = this.querySelector('coral-slider-content') || document.createElement('coral-slider-content');\n  \n    // Additional shortcuts\n    const handleContainer = this._elements.controls;\n    this._elements.handles = Array.prototype.slice.call(handleContainer.querySelectorAll(`.${CLASSNAME_HANDLE}`));\n    this._elements.inputs = Array.prototype.slice.call(handleContainer.querySelectorAll(`.${CLASSNAME_INPUT}`));\n  \n    // Binding\n    this._onInteraction = this._onInteraction.bind(this);\n    \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The slider's content.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-slider-content',\n      insert: function(content) {\n        this._elements.labelContent.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {Collection}\n   @readonly\n   */\n  get items() {\n    // just init on demand\n    if (!this._items) {\n      this._items = new Collection({\n        host: this,\n        itemTagName: 'coral-slider-item'\n      });\n    }\n    return this._items;\n  }\n  \n  /**\n   Increment value of one step.\n   \n   @type {Number}\n   @default 1\n   @htmlattribute step\n   @htmlattributereflected\n   */\n  get step() {\n    return this._getValueOf('step', 1);\n  }\n  set step(value) {\n    value = transform.number(value);\n    if (value > 0) {\n      this._step = value;\n      this._reflectAttribute('step', this._step);\n  \n      this.setAttribute('aria-valuestep', this._step);\n      this._elements.inputs.forEach((input) => {\n        input.setAttribute('step', this._step);\n        input.setAttribute('aria-valuestep', this._step);\n      }, this);\n    }\n  }\n  \n  /**\n   The minimum value.\n   \n   @type {Number}\n   @default 1\n   @htmlattribute min\n   @htmlattributereflected\n   */\n  get min() {\n    return this._getValueOf('min', 1);\n  }\n  set min(value) {\n    this._min = transform.number(value);\n    this._reflectAttribute('min', this._min);\n  \n    this.setAttribute('aria-valuemin', this._min);\n    this._elements.inputs.forEach((input) => {\n      input.setAttribute('min', this._min);\n      input.setAttribute('aria-valuemin', this._min);\n    }, this);\n  }\n  \n  /**\n   The maximum value.\n   \n   @type {Number}\n   @default 100\n   @htmlattribute max\n   @htmlattributereflected\n   */\n  get max() {\n    return this._getValueOf('max', 100);\n  }\n  set max(value) {\n    this._max = transform.number(value);\n    this._reflectAttribute('max', this._max);\n  \n    this.setAttribute('aria-valuemax', this._max);\n    this._elements.inputs.forEach((input) => {\n      input.setAttribute('max', this._max);\n      input.setAttribute('aria-valuemax', this._max);\n    }, this);\n  }\n  \n  /**\n   @ignore\n   \n   Not supported anymore. Use \"showValue\" instead.\n   */\n  get tooltips() {\n    return this.showValue;\n  }\n  set tooltips(value) {\n    this.showValue = value;\n  }\n  \n  /**\n   Display the slider value.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute showvalue\n   @htmlattributereflected\n   */\n  get showValue() {\n    return this._showValue || false;\n  }\n  set showValue(value) {\n    this._showValue = transform.booleanAttr(value);\n    this._reflectAttribute('showvalue', this._showValue);\n    \n    this._elements.labelValue.hidden = !this._showValue;\n  }\n  \n  /**\n   Orientation of the slider. See {@link SliderOrientationEnum}.\n   \n   @type {String}\n   @default SliderOrientationEnum.HORIZONTAL\n   @htmlattribute orientation\n   @htmlattributereflected\n   */\n  get orientation() {\n    return this._orientation || orientation.HORIZONTAL;\n  }\n  set orientation(value) {\n    value = transform.string(value).toLowerCase();\n    this._orientation = validate.enumeration(orientation)(value) && value || orientation.HORIZONTAL;\n    this._reflectAttribute('orientation', this._orientation);\n  }\n  \n  /**\n   Fill a value or value range using a highlight color.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute filled\n   @htmlattributereflected\n   */\n  get filled() {\n    return this._filled || false;\n  }\n  set filled(value) {\n    this._filled = transform.booleanAttr(value);\n    this._reflectAttribute('filled', this._filled);\n  \n    if (this._filled) {\n      this._updateFill();\n    }\n    this._elements.fillHandle.hidden = !this._filled;\n  }\n  \n  /**\n   The value returned as a Number. Value is <code>NaN</code> if conversion to Number is not possible.\n   \n   @type {Number}\n   @default NaN\n   */\n  get valueAsNumber() {\n    return parseFloat(this.value);\n  }\n  set valueAsNumber(value) {\n    this.value = transform.float(value);\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._elements.inputs[0].name;\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n    \n    this._elements.inputs.forEach((input) => {\n      input.name = this.getAttribute('name');\n    }, this);\n  }\n  \n  /**\n   This field's current value.\n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    return this._elements.inputs[0].value;\n  }\n  set value(value) {\n    value = transform.number(value);\n    \n    // setting the value should always set the first value\n    if (this._elements.handles.length === 1) {\n      \n      const input = this._elements.inputs[0];\n      \n      value = this._snapValueToStep(value, this.min, this.max, this.step);\n      \n      input.value = value;\n      input.setAttribute('aria-valuenow', value);\n      input.setAttribute('aria-valuetext', this._getLabel(value));\n      \n      this._moveHandles();\n      \n      // in order to keep the reset value in sync, we need to handle the \"value\" attribute of the inner input\n      const valueAttribute = this.getAttribute('value');\n      input[valueAttribute ? 'setAttribute' : 'removeAttribute']('value', valueAttribute);\n    }\n  \n    this._updateFill();\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.classList.toggle('is-disabled', this._disabled);\n    this.setAttribute('aria-disabled', this._disabled);\n    this._elements.inputs.forEach((input) => {\n      input.disabled = this._disabled;\n    }, this);\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    this.setAttribute('aria-required', this._required);\n    this._elements.inputs.forEach((input) => {\n      input.required = this._required;\n    }, this);\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    \n    this.setAttribute('aria-readonly', this._readOnly);\n    this._elements.inputs.forEach((input) => {\n      input.readOnly = this._readOnly;\n    }, this);\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#labelledBy}.\n   */\n  get labelledBy() {\n    return super.labelledBy;\n  }\n  set labelledBy(value) {\n    super.labelledBy = value;\n    \n    if (this._elements.inputs.length > 1) {\n      const input = this._elements.inputs[1];\n      const labelledBy = this.labelledBy;\n      \n      input[labelledBy ? 'setAttribute' : 'removeAttribute']('aria-labelledby', labelledBy);\n    }\n  }\n  \n  /** @private */\n  get _values() {\n    return this._elements.inputs.map((input) => String(parseInt(input.value, 10)));\n  }\n  set _values(values) {\n    if (values && values.length === this._elements.handles.length) {\n      this._elements.inputs.forEach((input, i) => {\n        const value = values[i] = this._snapValueToStep(values[i], this.min, this.max, this.step);\n      \n        input.value = value;\n        input.setAttribute('aria-valuenow', value);\n        input.setAttribute('aria-valuetext', this._getLabel(value));\n      }, this);\n    \n      this._moveHandles();\n    }\n  \n    this._updateFill();\n  }\n  \n  /** @private */\n  _getValueOf(name, defaultValue) {\n    if (typeof this[`_${name}`] === 'number') {\n      return this[`_${name}`];\n    }\n    else if (this.hasAttribute(name)) {\n      return parseFloat(this.getAttribute(name));\n    }\n    \n    return defaultValue;\n  }\n  \n  /**\n   handles any mousedown/touchstart on the whole slider\n   @private\n   */\n  _onMouseDown(event) {\n    if (this.disabled) {\n      return;\n    }\n    \n    // do not accept right mouse button clicks\n    if (event instanceof MouseEvent) {\n      if ((event.which || event.button) !== 1) {\n        return;\n      }\n    }\n    \n    event.preventDefault();\n    \n    this._currentHandle = event.target.closest(`.${CLASSNAME_HANDLE}`);\n    \n    // If no handle was touched:\n    // the closest handle needs to jump to the closest valid position\n    if (!this._currentHandle) {\n      const p = this._getPoint(event);\n      const val = this._getValueFromCoord(p.pageX, p.pageY, true);\n      \n      this._currentHandle = this._findNearestHandle(p.pageX, p.pageY);\n      this._updateValue(this._currentHandle, val);\n      this._setHandleFocus(this._currentHandle);\n    }\n    \n    this._currentHandle.classList.add('is-dragged');\n    document.body.classList.add('u-coral-closedHand');\n    \n    this._draggingHandler = this._handleDragging.bind(this);\n    this._mouseUpHandler = this._mouseUp.bind(this);\n    \n    events.on('mousemove', this._draggingHandler);\n    events.on('mouseup', this._mouseUpHandler);\n    \n    events.on('touchmove', this._draggingHandler);\n    events.on('touchend', this._mouseUpHandler);\n    events.on('touchcancel', this._mouseUpHandler);\n    \n    this._setHandleFocus(this._currentHandle);\n  }\n  \n  /**\n   @private\n   @return {Object} which contains the real coordinates\n   */\n  _getPoint(event) {\n    if (event.changedTouches && event.changedTouches.length > 0) {\n      return event.changedTouches[0];\n    }\n    else if (event.touches && event.touches.length > 0) {\n      return event.touches[0];\n    }\n    \n    return event;\n  }\n  \n  /**\n   will set the focus either on the handle element\n   or its input if range is supported\n   \n   @protected\n   */\n  _setHandleFocus(handle) {\n    handle.querySelector(`.${CLASSNAME_INPUT}`).focus();\n  }\n  \n  /**\n   Handles keyboard interaction with the handlers.\n   In case input[type=range] is supported, the focus\n   will be on the input and keyboard handling will happen natively\n   \n   @private\n   */\n  _handleKey(event) {\n    event.preventDefault();\n    \n    this._focus(event);\n    \n    const handle = event.matchedTarget;\n    const idx = this._elements.handles.indexOf(handle);\n    let v = parseInt(this._values[idx], 10);\n  \n    // increase\n    if (event.keyCode === Keys.keyToCode('up') ||\n      event.keyCode === Keys.keyToCode('right') ||\n      event.keyCode === Keys.keyToCode('pageUp')) {\n      v += this.step;\n    }\n    // decrease\n    else if (event.keyCode === Keys.keyToCode('down') ||\n      event.keyCode === Keys.keyToCode('left') ||\n      event.keyCode === Keys.keyToCode('pageDown')) {\n      v -= this.step;\n    }\n    // min\n    else if (event.keyCode === Keys.keyToCode('home')) {\n      v = this.min;\n    }\n    // max\n    else if (event.keyCode === Keys.keyToCode('end')) {\n      v = this.max;\n    }\n    \n    this._updateValue(handle, v);\n  }\n  \n  /**\n   Finds the nearest handle based on X/Y coordinates\n   \n   @private\n   */\n  _findNearestHandle(mouseX, mouseY) {\n    let closestDistance = Infinity;\n    let closestHandle;\n    \n    function calculateDistance(elem, x, y) {\n      const box = elem.getBoundingClientRect(),\n        top = box.top + window.pageYOffset,\n        left = box.left + window.pageXOffset;\n      \n      return Math.floor(\n        Math.sqrt(Math.pow(x - (left + box.width / 2), 2) + Math.pow(y - (top + box.height / 2), 2))\n      );\n    }\n    \n    // Find the nearest handle\n    this._elements.handles.forEach((handle) => {\n      const distance = calculateDistance(handle, mouseX, mouseY);\n      \n      if (distance < closestDistance) {\n        closestDistance = distance;\n        closestHandle = handle;\n      }\n    });\n    \n    return closestHandle;\n  }\n  \n  /**\n   Moves the handles to right position\n   based on the data in this._values\n   \n   @private\n   */\n  _moveHandles() {\n    const calculatePercent = (value) => (value - this.min) / (this.max - this.min) * 100;\n    const labelValue = [];\n    \n    // Set the handle position as a percentage based on the stored values\n    this._elements.handles.forEach((handle, index) => {\n      const percent = calculatePercent(this._values[index]);\n      handle.style.left = `${percent}%`;\n  \n      labelValue.push(this._getLabel(this._values[index]));\n    });\n    \n    this._elements.labelValue.textContent = labelValue.length > 1 ? labelValue.join(' - ') : labelValue[0];\n  }\n  \n  /**\n   Handles \"onchange\" events from the input.\n   This is only neede in case of IE10 which doesn't handle \"oninput event\".\n   In that case, the _onInputChangeHandler will be called from this handler.\n   \n   @private\n   */\n  _onInputChange(event) {\n    if (typeof event.target.oninput === 'undefined') {\n      this._onInputChangeHandler(event);\n    }\n  }\n  \n  /**\n   Handles \"oninput\" events from the input.\n   This makes ensures native inputs like\n   - direct keyboard interaction with input[type=range]\n   - accessibility features with input[type=range]\n   \n   Note we are not using the \"_onInputChange\" directly because Firefox\n   will trigger the \"change\" event only after the focus has been lost.\n   \n   @private\n   */\n  _onInputChangeHandler(event) {\n    // stops the current event\n    event.stopPropagation();\n    \n    const handle = event.target.closest(`.${CLASSNAME_HANDLE}`);\n    \n    if (event.target === document.activeElement) {\n      this._focus(event);\n    }\n    \n    this._updateValue(handle, event.target.value, true);\n  }\n  \n  /**\n   Handles \"focusin\" event from  either an input or its handle.\n   \n   @private\n   */\n  _focus(event) {\n    // Depending on support for input[type=range],\n    // the event.target could be either the handle or its child input.\n    // Use closest() to locate the actual handle.\n    event.target.closest(`.${CLASSNAME_HANDLE}`).classList.add('is-focused');\n    \n    events.on('touchstart.CoralSlider', this._onInteraction);\n    events.on('mousedown.CoralSlider', this._onInteraction);\n  }\n  \n  /**\n   Handles the blur\n   \n   @private\n   */\n  _onInteraction(event) {\n    if (!this.contains(event.target)) {\n      return;\n    }\n    event.target.blur();\n  }\n  \n  /**\n   Handles \"focusout\" event from  either an input or its handle.\n   \n   @private\n   */\n  _blur(event) {\n    // Depending on support for input[type=range],\n    // the event.target could be either the handle or its child input.\n    // Use closest() to locate the actual handle.\n    event.target.closest(`.${CLASSNAME_HANDLE}`).classList.remove('is-focused');\n    \n    events.off('.CoralSlider');\n  }\n  \n  /**\n   handles mousemove/touchmove after a succesful start on an handle\n   \n   @private\n   */\n  _handleDragging(event) {\n    const p = this._getPoint(event);\n    \n    this._updateValue(this._currentHandle, this._getValueFromCoord(p.pageX, p.pageY));\n    \n    event.preventDefault();\n  }\n  \n  /**\n   updates the value for a handle\n   @param handle\n   @param val\n   @param {Boolean} forceEvent\n   Always triggers the event. If <code>true</code> the change event will be triggered without checking if the value really changed. This is useful if we are called from something like the _onInputChange where new value has already been updated AND we are certain the change event should be triggered without checking.\n   @protected\n   */\n  _updateValue(handle, val, forceEvent) {\n    // this is prepared to work for multiple handles\n    const idx = this._elements.handles.indexOf(handle);\n    const values = this._values;\n    \n    values[idx] = val;\n    \n    const oldValues = this._values;\n    this._values = values;\n    const newValues = this._values;\n    \n    if (forceEvent || oldValues.join(':') !== newValues.join(':')) {\n      this.trigger('change');\n    }\n  }\n  \n  /** @private */\n  // eslint-disable-next-line no-unused-vars\n  _getValueFromCoord(posX, posY, restrictBounds) {\n    const boundingClientRect = this.getBoundingClientRect();\n    const elementWidth = boundingClientRect.width;\n    const percent = (posX - boundingClientRect.left) / elementWidth;\n    \n    // if the bounds are restricted, as with _handleClick, we shouldn't change the value.\n    if (restrictBounds && (percent < 0 || percent > 1)) {\n      return NaN;\n    }\n    \n    const rawValue = this.min + (this.max - this.min) * percent;\n    \n    // Snap value to nearest step\n    return this._snapValueToStep(rawValue, this.min, this.max, this.step);\n  }\n  \n  /** @private */\n  _snapValueToStep(rawValue, min, max, step) {\n    step = parseFloat(step);\n    const remainder = (rawValue - min) % step;\n    const floatString = step.toString().replace(/^(?:\\d+)(?:\\.(\\d+))?$/g, '$1');\n    const precision = floatString.length;\n    let snappedValue;\n    \n    if (Math.abs(remainder) * 2 >= step) {\n      snappedValue = rawValue - Math.abs(remainder) + step;\n    }\n    else {\n      snappedValue = rawValue - remainder;\n    }\n    \n    if (snappedValue < min) {\n      snappedValue = min;\n    }\n    else if (snappedValue > max) {\n      snappedValue = min + Math.floor((max - min) / step) * step;\n    }\n    \n    // correct floating point behavior by rounding to step precision\n    if (precision > 0) {\n      snappedValue = parseFloat(snappedValue.toFixed(precision));\n    }\n    \n    return snappedValue;\n  }\n  \n  /**\n   end operation of a dragging flow\n   @private\n   */\n  _mouseUp() {\n    this._currentHandle.classList.remove('is-dragged');\n    document.body.classList.remove('u-coral-closedHand');\n    \n    events.off('mousemove', this._draggingHandler);\n    events.off('touchmove', this._draggingHandler);\n    events.off('mouseup', this._mouseUpHandler);\n    events.off('touchend', this._mouseUpHandler);\n    events.off('touchcancel', this._mouseUpHandler);\n    \n    this._currentHandle = null;\n    this._draggingHandler = null;\n    this._mouseUpHandler = null;\n  }\n  \n  /**\n   called when it is necessary to update the fill\n   @protected\n   */\n  _updateFill() {\n    const percent = (this._values[0] - this.min) / (this.max - this.min) * 100;\n    this._elements.fillHandle.style.width = `${percent}%`;\n  }\n  \n  /**\n   Gets the label for a passed value.\n   \n   @param value\n   @return {String|Number} the known label from the item or the value itself\n   @protected\n   */\n  _getLabel(value) {\n    const items = this.items.getAll();\n    let item;\n    \n    for (let i = 0; i < items.length; i++) {\n      if (transform.number(items[i].value) === transform.number(value)) {\n        item = items[i];\n        break;\n      }\n    }\n    \n    // Use the innerHTML of the item if one was found\n    return item ? item.innerHTML : value;\n  }\n  \n  // To be overridden by RangedSlider\n  _getTemplate() {\n    return base;\n  }\n  \n  get _contentZones() { return {'coral-slider-content': 'content'}; }\n  \n  /**\n   Returns {@link Slider} orientation options.\n   \n   @return {SliderOrientationEnum}\n   */\n  static get orientation() { return orientation; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'step',\n      'min',\n      'max',\n      'tooltips',\n      'showvalue',\n      'showValue',\n      'orientation',\n      'filled'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Default reflected attributes\n    if (!this._min) { this.min = this.min; }\n    if (!this._max) { this.max = this.max; }\n    if (!this._step) { this.step = this.step; }\n    if (!this._orientation) { this.orientation = orientation.HORIZONTAL; }\n    \n    // A11y\n    this.setAttribute('role', 'presentation');\n    this.setAttribute('aria-orientation', 'horizontal');\n  \n    // Support cloneNode\n    const template = this.querySelectorAll('._coral-Slider-labelContainer, ._coral-Slider-controls');\n    for (let i = 0; i < template.length; i++) {\n      template[i].remove();\n    }\n    \n    // Render the main template\n    const frag = document.createDocumentFragment();\n    frag.appendChild(this._elements.label);\n    frag.appendChild(this._elements.controls);\n    \n    const content = this._elements.content;\n    \n    // If no default content zone was provided, move everything there\n    if (!content.parentNode) {\n      // Process remaining elements as necessary\n      while (this.firstChild) {\n        const child = this.firstChild;\n    \n        if (child.nodeName === 'CORAL-SLIDER-ITEM') {\n          // Add items to the fragment\n          frag.appendChild(child);\n        }\n        else {\n          // Add anything else to the content\n          content.appendChild(child);\n        }\n      }\n    }\n  \n    // Add the frag to the component\n    this.appendChild(frag);\n  \n    // Assign the content zone so the insert function will be called\n    this.content = content;\n  \n    // Defaults\n    this._moveHandles();\n    this._updateFill();\n  }\n}\n\nexport default Slider;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Slider.Content\n @classdesc Slider's content component\n @htmltag coral-slider-content\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-slider-content');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {transform} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Slider-item';\n\n/**\n @class Coral.Slider.Item\n @classdesc The Slider item\n @htmltag coral-slider-item\n @extends {HTMLElement}\n */\nclass SliderItem extends HTMLElement {\n  /**\n   The slider's item value.\n   This should contain a number formatted as a string (e.g.: \"10\") or an empty string.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   @htmlattributereflected\n   */\n  get value() {\n    return this.getAttribute('value');\n  }\n  set value(value) {\n    this._reflectAttribute('value', transform.string(value));\n  }\n  \n  /**\n   The content zone element of the item.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    if (value instanceof HTMLElement) {\n      /** @ignore */\n      this.innerHTML = value.innerHTML;\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default SliderItem;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  data = data_0;\n  \n  data.uidMin = data.commons.getUID();\n  data.uidMax = data.commons.getUID();\n\n  data_0 = data;\n  var el1 = document.createTextNode(\"\\n\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"label\"] = document.createElement(\"div\");\n  el2.className += \" _coral-Slider-labelContainer\";\n  el2.setAttribute(\"handle\", \"label\");\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  var el4 = this[\"labelContent\"] = document.createElement(\"label\");\n  el4.className += \" _coral-Slider-label\";\n  el4.setAttribute(\"handle\", \"labelContent\");\n  el2.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el5);\n  var el6 = this[\"labelValue\"] = document.createElement(\"label\");\n  el6.className += \" _coral-Slider-value\";\n  el6.setAttribute(\"handle\", \"labelValue\");\n  el6.setAttribute(\"hidden\", \"\");\n  el2.appendChild(el6);\n  var el7 = document.createTextNode(\"\\n\");\n  el2.appendChild(el7);\n  frag.appendChild(el2);\n  var el8 = document.createTextNode(\"\\n\");\n  frag.appendChild(el8);\n  var el9 = this[\"controls\"] = document.createElement(\"div\");\n  el9.className += \" _coral-Slider-controls\";\n  el9.setAttribute(\"role\", \"presentation\");\n  el9.setAttribute(\"handle\", \"controls\");\n  var el10 = document.createTextNode(\"\\n  \");\n  el9.appendChild(el10);\n  var el11 = document.createElement(\"div\");\n  el11.className += \" _coral-Slider-track\";\n  var el12 = document.createTextNode(\"\\n    \");\n  el11.appendChild(el12);\n  var el13 = this[\"fillHandle\"] = document.createElement(\"div\");\n  el13.className += \" _coral-Slider-track--fill\";\n  el13.setAttribute(\"handle\", \"fillHandle\");\n  el13.setAttribute(\"hidden\", \"\");\n  el11.appendChild(el13);\n  var el14 = document.createTextNode(\"\\n  \");\n  el11.appendChild(el14);\n  el9.appendChild(el11);\n  var el15 = document.createTextNode(\"\\n  \");\n  el9.appendChild(el15);\n  var el16 = this[\"leftHandle\"] = document.createElement(\"div\");\n  el16.className += \" _coral-Slider-handle\";\n  el16.setAttribute(\"handle\", \"leftHandle\");\n  var el17 = document.createTextNode(\"\\n    \");\n  el16.appendChild(el17);\n  var el18 = this[\"leftLabel\"] = document.createElement(\"label\");\n  el18.setAttribute(\"handle\", \"leftLabel\");\n  el18.className += \" u-coral-screenReaderOnly\";\n  el18.id = data_0[\"uidMin\"]+\"-label\";\n  el18.setAttribute(\"for\", data_0[\"uidMin\"]);\n  el18.setAttribute(\"aria-hidden\", \"true\");\n  el18.textContent = \"Minimum\";\n  el16.appendChild(el18);\n  var el19 = document.createTextNode(\"\\n    \");\n  el16.appendChild(el19);\n  var el20 = this[\"leftInput\"] = document.createElement(\"input\");\n  el20.setAttribute(\"aria-orientation\", \"horizontal\");\n  el20.setAttribute(\"handle\", \"leftInput\");\n  el20.setAttribute(\"value\", \"1\");\n  el20.setAttribute(\"type\", \"range\");\n  el20.className += \" _coral-Slider-input\";\n  el20.id = data_0[\"uidMin\"];\n  el16.appendChild(el20);\n  var el21 = document.createTextNode(\"\\n  \");\n  el16.appendChild(el21);\n  el9.appendChild(el16);\n  var el22 = document.createTextNode(\"\\n  \");\n  el9.appendChild(el22);\n  var el23 = this[\"rightHandle\"] = document.createElement(\"div\");\n  el23.className += \" _coral-Slider-handle\";\n  el23.setAttribute(\"handle\", \"rightHandle\");\n  var el24 = document.createTextNode(\"\\n    \");\n  el23.appendChild(el24);\n  var el25 = this[\"rightLabel\"] = document.createElement(\"label\");\n  el25.setAttribute(\"handle\", \"rightLabel\");\n  el25.className += \" u-coral-screenReaderOnly\";\n  el25.id = data_0[\"uidMax\"]+\"-label\";\n  el25.setAttribute(\"for\", data_0[\"uidMax\"]);\n  el25.setAttribute(\"aria-hidden\", \"true\");\n  el25.textContent = \"Maximum\";\n  el23.appendChild(el25);\n  var el26 = document.createTextNode(\"\\n    \");\n  el23.appendChild(el26);\n  var el27 = this[\"rightInput\"] = document.createElement(\"input\");\n  el27.setAttribute(\"aria-orientation\", \"horizontal\");\n  el27.setAttribute(\"handle\", \"rightInput\");\n  el27.setAttribute(\"value\", \"100\");\n  el27.setAttribute(\"type\", \"range\");\n  el27.className += \" _coral-Slider-input\";\n  el27.id = data_0[\"uidMax\"];\n  el23.appendChild(el27);\n  var el28 = document.createTextNode(\"\\n  \");\n  el23.appendChild(el28);\n  el9.appendChild(el23);\n  var el29 = document.createTextNode(\"\\n\");\n  el9.appendChild(el29);\n  frag.appendChild(el9);\n  var el30 = document.createTextNode(\"\\n\");\n  frag.appendChild(el30);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport Slider from './Slider';\nimport range from '../templates/range';\nimport {transform} from '../../../coralui-util';\n\n/**\n @class Coral.RangedSlider\n @classdesc A Ranged Slider\n @htmltag coral-rangedslider\n @extends {Slider}\n */\nclass RangedSlider extends Slider {\n  /**\n   Ranged sliders are always filled.\n   \n   @type {Boolean}\n   @default true\n   @htmlattribute filled\n   @htmlattributereflected\n   */\n  get filled() {\n    return true;\n  }\n  set filled(value) {\n    if (!transform.booleanAttr(value)) {\n      console.warn('Coral.RangedSlider: filled can not be set to false.');\n    }\n    super.filled = true;\n  }\n  \n  /**\n   This field's current value.\n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    return this.startValue;\n  }\n  set value(value) {\n    this.startValue = value;\n  }\n  \n  /**\n   The starting value of the range.\n   \n   @type {String}\n   @default '1'\n   @emits {change}\n   @htmlattribute startValue\n   */\n  get startValue() {\n    return this.values[0] || '1';\n  }\n  set startValue(value) {\n    // Snap value to step\n    value = String(this._snapValueToStep(transform.number(value), this.min, this.max, this.step));\n  \n    const values = this.values;\n    values[0] = value;\n    this.values = values;\n  \n    // in order to keep the reset value in sync, we need to handle the \"startvalue\" attribute of the inner input\n    const input = this._elements.inputs[0];\n    const valueAttribute = this.getAttribute('startvalue') || this.getAttribute('value');\n    input[valueAttribute ? 'setAttribute' : 'removeAttribute']('value', valueAttribute);\n  }\n  \n  /**\n   The ending value of the range.\n   \n   @type {String}\n   @default '100'\n   @emits {change}\n   @htmlattribute endValue\n   */\n  get endValue() {\n    return this.values[1] || '100';\n  }\n  set endValue(value) {\n    // Snap value to step\n    value = String(this._snapValueToStep(transform.number(value), this.min, this.max, this.step));\n  \n    const values = this.values;\n    values[1] = value;\n    this.values = values;\n  \n    // in order to keep the reset value in sync, we need to handle the \"endvalue\" attribute of the inner input\n    const input = this._elements.inputs[1];\n    const valueAttribute = this.getAttribute('endvalue');\n    input[valueAttribute ? 'setAttribute' : 'removeAttribute']('value', valueAttribute);\n  }\n  \n  /**\n   The current values of the ranged slider.\n   \n   @type {Array.<String>}\n   @default [{@link Coral.RangedSlider#startValue},{@link Coral.RangedSlider#endValue}]\n   @emits {change}\n   */\n  get values() {\n    return this._values;\n  }\n  set values(values) {\n    this._values = values;\n  }\n  \n  /** @private */\n  _getHighestValue() {\n    return Math.max.apply(null, this.values);\n  }\n  \n  /** @private */\n  _getLowestValue() {\n    return Math.min.apply(null, this.values);\n  }\n  \n  /** @override */\n  _updateValue(handle, val) {\n    const idx = this._elements.handles.indexOf(handle);\n  \n    if (idx === 0) {\n      if (val > parseFloat(this.values[1])) {\n        val = this.values[1];\n      }\n      this._elements.rightInput.min = val;\n      this._elements.rightHandle.setAttribute('aria-valuemin', val);\n    }\n    else {\n      if (val < parseFloat(this.values[0])) {\n        val = this.values[0];\n      }\n      this._elements.leftInput.max = val;\n      this._elements.leftHandle.setAttribute('aria-valuemax', val);\n    }\n  \n    const resValue = [this.values[0], this.values[1]];\n    resValue[idx] = val;\n  \n    const oldValues = this.values;\n    this.values = resValue;\n    const newValues = this.values;\n  \n    if (oldValues.join(':') !== newValues.join(':')) {\n      this.trigger('change');\n    }\n  }\n  \n  /** @override */\n  _updateFill() {\n    const deltaMaxMinBase = 100 / (this.max - this.min);\n    const percent = (this._getLowestValue() - this.min) * deltaMaxMinBase;\n    const percentDiff = (this._getHighestValue() - this.min) * deltaMaxMinBase - percent;\n    \n    this._elements.fillHandle.style.left = `${percent}%`;\n    this._elements.fillHandle.style.width = `${percentDiff}%`;\n  }\n  \n  /** @override */\n  _getTemplate() {\n    return range;\n  }\n  \n  // JSDocs inherited\n  clear() {\n    this.startValue = this.min;\n    this.endValue = this.max;\n  }\n\n  // JSDocs inherited\n  reset() {\n    // since the 'value' property is not reflected, form components use it to restore the initial value. When a\n    // component has support for values, this method needs to be overwritten\n    const initialStartValue = this.getAttribute('startvalue') || this.getAttribute('value');\n    const initialEndValue = this.getAttribute('endvalue');\n    \n    this.startValue = transform.string(initialStartValue);\n    this.endValue = transform.string(initialEndValue);\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'startvalue',\n      'startValue',\n      'endvalue',\n      'endValue'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    // Set filled attribute by default\n    this.setAttribute('filled', '');\n  }\n}\n\nexport default RangedSlider;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Slider from './src/scripts/Slider';\nimport SliderContent from './src/scripts/SliderContent';\nimport SliderItem from './src/scripts/SliderItem';\nimport RangedSlider from './src/scripts/RangedSlider';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-slider', Slider);\nwindow.customElements.define('coral-slider-item', SliderItem);\nwindow.customElements.define('coral-rangedslider', RangedSlider);\n\nSlider.Content = SliderContent;\nSlider.Item = SliderItem;\n\nexport {Slider, RangedSlider};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"tip\"] = document.createElement(\"span\");\n  el0.className += \" _coral-Tooltip-tip\";\n  el0.setAttribute(\"handle\", \"tip\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {Overlay} from '../../../coralui-component-overlay';\nimport {Vent} from '../../../coralui-externals';\nimport base from '../templates/base';\nimport {transform, validate, commons} from '../../../coralui-util';\n\nconst arrowMap = {\n  left: 'left',\n  right: 'right',\n  top: 'top',\n  bottom: 'bottom'\n};\n\nconst CLASSNAME = '_coral-Tooltip';\n\n// This is in JS as we're setting this to induce wrapping before collision calculations\nconst TOOLTIP_ARROW_SIZE = 12;\n\n/**\n Enumeration for {@link Tooltip} variants.\n \n @typedef {Object} TooltipVariantEnum\n \n @property {String} DEFAULT\n A default tooltip that provides additional information.\n @property {String} INFO\n A tooltip that informs the user of non-critical information.\n @property {String} SUCCESS\n A tooltip that indicates an operation was successful.\n @property {String} ERROR\n A tooltip that indicates an error has occurred.\n @property {String} WARNING\n Not supported. Falls back to DEFAULT.\n @property {String} INSPECT\n Not supported. Falls back to DEFAULT.\n */\nconst variant = {\n  DEFAULT: 'default',\n  INFO: 'info',\n  SUCCESS: 'success',\n  ERROR: 'error',\n  WARNING: 'warning',\n  INSPECT: 'inspect'\n};\n\n// A string of all possible variant classnames\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantName in variant) {\n  ALL_VARIANT_CLASSES.push(`${CLASSNAME}--${variant[variantName]}`);\n}\n\n// A string of all position placement classnames\nconst ALL_PLACEMENT_CLASSES = [];\n\n// A map of lowercase directions to their corresponding classname\nconst placementClassMap = {};\nfor (const key in Overlay.placement) {\n  const direction = Overlay.placement[key];\n  const placementClass = `${CLASSNAME}--${arrowMap[direction]}`;\n  \n  // Store in map\n  placementClassMap[direction] = placementClass;\n  \n  // Store in list\n  ALL_PLACEMENT_CLASSES.push(placementClass);\n}\n\n/**\n @class Coral.Tooltip\n @classdesc A Tooltip component that can be attached to any element and may be displayed immediately or on hovering the\n target element.\n @htmltag coral-tooltip\n @extends {Overlay}\n */\nclass Tooltip extends Overlay {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Override defaults\n    this._lengthOffset = TOOLTIP_ARROW_SIZE;\n    this._overlayAnimationTime = Overlay.FADETIME;\n  \n    // Fetch or create the content zone element\n    this._elements = commons.extend(this._elements, {\n      content: this.querySelector('coral-tooltip-content') || document.createElement('coral-tooltip-content')\n    });\n    \n    // Generate template\n    base.call(this._elements);\n  \n    // Used for events\n    this._id = commons.getUID();\n    this._delegateEvents({\n      'coral-overlay:positioned': '_onPositioned'\n    });\n  }\n  \n  /**\n   The variant of tooltip. See {@link TooltipVariantEnum}.\n   \n   @type {String}\n   @default TooltipVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n  \n    this.classList.remove(...ALL_VARIANT_CLASSES);\n    this.classList.add(`${CLASSNAME}--${this._variant}`);\n  }\n  \n  /**\n   The amount of time in miliseconds to wait before showing the tooltip when the target is interacted with.\n   \n   @type {Number}\n   @default 500\n   @htmlattribute delay\n   */\n  get delay() {\n    return typeof this._delay === 'number' ? this._delay : 500;\n  }\n  set delay(value) {\n    this._delay = transform.number(value);\n  }\n  \n  /**\n   The Tooltip content element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-tooltip-content',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   Inherited from {@link Overlay#open}.\n   */\n  get open() {\n    return super.open;\n  }\n  set open(value) {\n    super.open = value;\n    \n    if (!this.open) {\n      // Stop previous show operations from happening\n      this._cancelShow();\n    }\n  }\n  \n  /**\n   Inherited from {@link Overlay#target}.\n   */\n  get target() {\n    return super.target;\n  }\n  set target(value) {\n    super.target = value;\n  \n    if (this.interaction === this.constructor.interaction.ON) {\n      // Add listeners to the target\n      const target = this._getTarget(value);\n      this._addTargetListeners(target);\n    }\n  }\n  \n  /**\n   Inherited from {@link Overlay#interaction}.\n   */\n  get interaction() {\n    return super.interaction;\n  }\n  set interaction(value) {\n    super.interaction = value;\n  \n    const target = this._getTarget();\n  \n    if (target) {\n      if (value === this.constructor.interaction.ON) {\n        this._addTargetListeners(target);\n      }\n      else {\n        this._removeTargetListeners(target);\n      }\n    }\n  }\n  \n  /** @ignore */\n  _onPositioned(event) {\n    // Set arrow placement\n    this.classList.remove(...ALL_PLACEMENT_CLASSES);\n    this.classList.add(placementClassMap[event.detail.placement]);\n  }\n  \n  /** @ignore */\n  _handleFocusOut() {\n    const self = this;\n    // The item that should have focus will get it on the next frame\n    window.requestAnimationFrame(() => {\n      const targetIsFocused = document.activeElement === self._getTarget();\n      \n      if (!targetIsFocused) {\n        self._cancelShow();\n        self.open = false;\n      }\n    });\n  }\n  \n  /** @ignore */\n  _cancelShow() {\n    window.clearTimeout(this._showTimeout);\n  }\n  \n  /** @ignore */\n  _cancelHide() {\n    window.clearTimeout(this._hideTimeout);\n  }\n  \n  /** @ignore */\n  _startHide() {\n    if (this.delay === 0) {\n      // Hide immediately\n      this._handleFocusOut();\n    }\n    else {\n      const self = this;\n      this._hideTimeout = window.setTimeout(() => {\n        self._handleFocusOut();\n      }, this.delay);\n    }\n  }\n  \n  /** @ignore */\n  _addTargetListeners(target) {\n    if (!target) {\n      return;\n    }\n  \n    const self = this;\n    \n    // Make sure we don't add listeners twice to the same element for this particular tooltip\n    if (target[`_hasCoralTooltipListeners${self._id}`]) {\n      return;\n    }\n    target[`_hasCoralTooltipListeners${self._id}`] = true;\n    \n    // Remove listeners from the old target\n    if (self._oldTarget) {\n      const oldTarget = self._getTarget(self._oldTarget);\n      if (oldTarget) {\n        self._removeTargetListeners(oldTarget);\n      }\n    }\n    \n    // Store the current target value\n    self._oldTarget = target;\n    \n    // Use Vent to bind events on the target\n    self._targetEvents = new Vent(target);\n  \n    self._targetEvents.on(`mouseenter.CoralTooltip${self._id} focusin.CoralTooltip${self._id}`, () => {\n      // Don't let the tooltip hide\n      self._cancelHide();\n      \n      if (!self.open) {\n        self._cancelShow();\n        \n        if (self.delay === 0) {\n          // Show immediately\n          self.show();\n        }\n        else {\n          self._showTimeout = window.setTimeout(() => {\n            self.show();\n          }, self.delay);\n        }\n      }\n    });\n  \n    self._targetEvents.on(`mouseleave.CoralTooltip${self._id}`, () => {\n      if (self.interaction === self.constructor.interaction.ON) {\n        self._startHide();\n      }\n    });\n  \n    self._targetEvents.on(`focusout.CoralTooltip${self._id}`, () => {\n      if (self.interaction === self.constructor.interaction.ON) {\n        self._handleFocusOut();\n      }\n    });\n  }\n  \n  /** @ignore */\n  _removeTargetListeners(target) {\n    // Remove listeners for this tooltip and mark that the element doesn't have them\n    // Use the ID so we can support multiple tooltips on the same element\n    if (this._targetEvents) {\n      this._targetEvents.off(`.CoralTooltip${this._id}`);\n    }\n    target[`_hasCoralTooltipListeners${this._id}`] = false;\n  }\n  \n  get _contentZones() { return {'coral-tooltip-content': 'content'}; }\n  \n  /**\n   Returns {@link Tooltip} variants.\n   \n   @return {TooltipVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat(['variant', 'delay']);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // ARIA\n    this.setAttribute('role', 'tooltip');\n    // Let the tooltip be focusable\n    // We'll marshall focus around when its focused\n    this.setAttribute('tabindex', '-1');\n  \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n  \n    // Support cloneNode\n    const tip = this.querySelector('._coral-Tooltip-tip');\n    if (tip) {\n      tip.remove();\n    }\n    \n    const content = this._elements.content;\n  \n    // Move the content into the content zone if none specified\n    if (!content.parentNode) {\n      while (this.firstChild) {\n        content.appendChild(this.firstChild);\n      }\n    }\n    \n    // Append template\n    this.appendChild(this._elements.tip);\n  \n    // Assign the content zone so the insert function will be called\n    this.content = content;\n  }\n}\n\nexport default Tooltip;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Tooltip-label';\n\n/**\n @class Coral.Tooltip.Content\n @classdesc Tooltip's content component\n @htmltag coral-tooltip-content\n @extends {HTMLElement}\n */\nclass TooltipContent extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default TooltipContent;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Tooltip from './src/scripts/Tooltip';\nimport TooltipContent from './src/scripts/TooltipContent';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-tooltip', Tooltip);\nwindow.customElements.define('coral-tooltip-content', TooltipContent);\n\nTooltip.Content = TooltipContent;\n\nexport {Tooltip};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"label\"] = document.createElement(\"div\");\n  el0.className += \" _coral-Slider-labelContainer\";\n  el0.setAttribute(\"handle\", \"label\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = this[\"labelContent\"] = document.createElement(\"label\");\n  el2.className += \" _coral-Slider-label\";\n  el2.setAttribute(\"handle\", \"labelContent\");\n  el0.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el3);\n  var el4 = this[\"labelValue\"] = document.createElement(\"label\");\n  el4.className += \" _coral-Slider-value\";\n  el4.setAttribute(\"handle\", \"labelValue\");\n  el4.setAttribute(\"hidden\", \"\");\n  el0.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  el0.appendChild(el5);\n  frag.appendChild(el0);\n  var el6 = document.createTextNode(\"\\n\");\n  frag.appendChild(el6);\n  var el7 = this[\"controls\"] = document.createElement(\"div\");\n  el7.className += \" _coral-Slider-controls u-coral-noMargin\";\n  el7.setAttribute(\"role\", \"presentation\");\n  el7.setAttribute(\"handle\", \"controls\");\n  var el8 = document.createTextNode(\"\\n  \");\n  el7.appendChild(el8);\n  var el9 = this[\"bar\"] = document.createElement(\"div\");\n  el9.className += \" _coral-Slider-track _coral-ColorInput-sliderBar\";\n  el9.setAttribute(\"handle\", \"bar\");\n  var el10 = document.createTextNode(\"\\n    \");\n  el9.appendChild(el10);\n  var el11 = this[\"fillHandle\"] = document.createElement(\"div\");\n  el11.className += \" _coral-Slider-track--fill\";\n  el11.setAttribute(\"handle\", \"fillHandle\");\n  el11.setAttribute(\"hidden\", \"\");\n  el9.appendChild(el11);\n  var el12 = document.createTextNode(\"\\n  \");\n  el9.appendChild(el12);\n  el7.appendChild(el9);\n  var el13 = document.createTextNode(\"\\n  \");\n  el7.appendChild(el13);\n  var el14 = this[\"leftHandle\"] = document.createElement(\"div\");\n  el14.className += \" _coral-Slider-handle _coral-ColorInput-sliderHandle\";\n  el14.setAttribute(\"handle\", \"leftHandle\");\n  var el15 = document.createTextNode(\"\\n    \");\n  el14.appendChild(el15);\n  var el16 = this[\"leftInput\"] = document.createElement(\"input\");\n  el16.setAttribute(\"aria-orientation\", \"horizontal\");\n  el16.setAttribute(\"handle\", \"leftInput\");\n  el16.setAttribute(\"value\", \"1\");\n  el16.setAttribute(\"type\", \"range\");\n  el16.className += \" _coral-Slider-input\";\n  el14.appendChild(el16);\n  var el17 = document.createTextNode(\"\\n  \");\n  el14.appendChild(el17);\n  el7.appendChild(el14);\n  var el18 = document.createTextNode(\"\\n\");\n  el7.appendChild(el18);\n  frag.appendChild(el7);\n  var el19 = document.createTextNode(\"\\n\");\n  frag.appendChild(el19);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {Slider} from '../../../coralui-component-slider';\nimport '../../../coralui-component-tooltip';\nimport sliderBase from '../templates/sliderBase';\nimport {transform} from '../../../coralui-util';\n\nconst CLASSNAMES = ['_coral-ColorInput-slider', '_coral-Slider--color'];\n\n/**\n @class Coral.ColorInput.Slider\n @classdesc A ColorInput Slider component\n @htmltag coral-colorinput-slider\n @extends {Slider}\n */\nclass ColorInputSlider extends Slider {\n  /**\n   The gradient shown as slider background as space separated values (at least 2 values needed).\n   e.g: #ff0000 #ffff00 #00ff00 #00ffff #0000ff #ff00ff #ff0000\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute gradient\n   */\n  get gradient() {\n    return this._gradient || '';\n  }\n  set gradient(value) {\n    this._gradient = transform.string(value);\n  \n    const bar = this._elements.bar;\n    const barStyle = bar.style;\n  \n    const stops = this.gradient.split(' ');\n    const amountStops = stops.length;\n  \n    // remove old gradients\n    barStyle.backgroundImage = 'none';\n    barStyle.filter = '';\n  \n    if (amountStops < 2) {\n      return;\n    }\n    \n    let partialGradientStr = '';\n    for (let i = 0; i < amountStops; i++) {\n      partialGradientStr += `, ${stops[i]} ${Math.abs(i * 100 / (amountStops - 1))}%`;\n    }\n  \n    barStyle.backgroundImage = `-moz-linear-gradient(to right${partialGradientStr})`;\n    barStyle.backgroundImage = `-ms-linear-gradient(to right${partialGradientStr})`;\n    barStyle.backgroundImage = `-o-linear-gradient(to right${partialGradientStr})`;\n    barStyle.backgroundImage = `-webkit-linear-gradient(to right${partialGradientStr})`;\n    barStyle.backgroundImage = `linear-gradient(to right${partialGradientStr})`;\n    barStyle.filter = `progid:DXImageTransform.Microsoft.gradient(startColorstr='${stops[0]}', endColorstr='${stops[1]}', gradientType=1)`;\n  }\n  \n  /** @override */\n  _getTemplate() {\n    return sliderBase;\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat(['gradient']);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(...CLASSNAMES);\n  }\n}\n\nexport default ColorInputSlider;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  data = data_0;\n  var uid = data.commons.getUID();\n  data_0 = data;\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"propertiesSubview\"] = document.createElement(\"div\");\n  el2.className += \" _coral-ColorInput-propertiesSubview\";\n  el2.setAttribute(\"handle\", \"propertiesSubview\");\n  el2.setAttribute(\"role\", \"group\");\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  var el4 = document.createElement(\"div\");\n  el4.className += \" _coral-ColorInput-previewView\";\n  el4.setAttribute(\"role\", \"presentation\");\n  var el5 = document.createTextNode(\"\\n    \");\n  el4.appendChild(el5);\n  var el6 = document.createElement(\"div\");\n  el6.className += \" _coral-ColorInput-preview-container\";\n  el6.setAttribute(\"role\", \"presentation\");\n  var el7 = document.createTextNode(\"\\n      \");\n  el6.appendChild(el7);\n  var el8 = this[\"colorPreview2\"] = document.createElement(\"button\",\"coral-button\");\n  el8.setAttribute(\"is\", \"coral-button\");\n  el8.setAttribute(\"handle\", \"colorPreview2\");\n  el8.className += \" _coral-ColorInput-preview\";\n  el8.setAttribute(\"type\", \"button\");\n  el8.setAttribute(\"aria-pressed\", \"false\");\n  el6.appendChild(el8);\n  var el9 = document.createTextNode(\"\\n    \");\n  el6.appendChild(el9);\n  el4.appendChild(el6);\n  var el10 = document.createTextNode(\"\\n    \");\n  el4.appendChild(el10);\n  var el11 = document.createElement(\"div\");\n  el11.className += \" _coral-ColorInput-editHex\";\n  el11.setAttribute(\"role\", \"presentation\");\n  var el12 = document.createTextNode(\"\\n      \");\n  el11.appendChild(el12);\n  var el13 = document.createElement(\"label\");\n  el13.className += \" _coral-ColorInput-editHex-label\";\n  var el14 = document.createTextNode(\"\\n        \");\n  el13.appendChild(el14);\n  var el15 = document.createElement(\"span\");\n  el15.textContent = \"#\";\n  el13.appendChild(el15);\n  var el16 = document.createTextNode(\"\\n        \");\n  el13.appendChild(el16);\n  var el17 = this[\"hexInput\"] = document.createElement(\"input\",\"coral-textfield\");\n  el17.className += \" _coral-ColorInput-editHex-input\";\n  el17.setAttribute(\"type\", \"text\");\n  el17.setAttribute(\"handle\", \"hexInput\");\n  el17.setAttribute(\"is\", \"coral-textfield\");\n  el17.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('HEX'));\n  el17.setAttribute(\"placeholder\", data_0[\"i18n\"][\"get\"]('HEX'));\n  el17.setAttribute(\"maxlength\", \"6\");\n  el17.setAttribute(\"value\", \"\");\n  el17.setAttribute(\"variant\", \"quiet\");\n  el13.appendChild(el17);\n  var el18 = document.createTextNode(\"\\n      \");\n  el13.appendChild(el18);\n  el11.appendChild(el13);\n  var el19 = document.createTextNode(\"\\n    \");\n  el11.appendChild(el19);\n  el4.appendChild(el11);\n  var el20 = document.createTextNode(\"\\n  \");\n  el4.appendChild(el20);\n  el2.appendChild(el4);\n  var el21 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el21);\n  var el22 = document.createElement(\"div\");\n  el22.className += \" _coral-ColorInput-rgbaView _coral-ColorInput-editRgba\";\n  el22.setAttribute(\"role\", \"presentation\");\n  var el23 = document.createTextNode(\"\\n    \");\n  el22.appendChild(el23);\n  var el24 = document.createElement(\"div\");\n  el24.setAttribute(\"role\", \"group\");\n  el24.className += \" _coral-ColorInput-editRgba-group\";\n  var el25 = document.createTextNode(\"\\n      \");\n  el24.appendChild(el25);\n  var el26 = document.createElement(\"label\");\n  el26.className += \" _coral-ColorInput-editRgba-group-label\";\n  el26.setAttribute(\"for\", uid+\"-r\");\n  el26.textContent = data_0[\"i18n\"][\"get\"]('R');\n  el24.appendChild(el26);\n  var el27 = document.createTextNode(\"\\n      \");\n  el24.appendChild(el27);\n  var el28 = this[\"redSlider\"] = document.createElement(\"coral-colorinput-slider\");\n  el28.setAttribute(\"handle\", \"redSlider\");\n  el28.setAttribute(\"min\", \"0\");\n  el28.setAttribute(\"max\", \"255\");\n  el28.setAttribute(\"value\", \"0\");\n  el28.setAttribute(\"gradient\", \"#000000 #FF0000\");\n  el24.appendChild(el28);\n  var el29 = document.createTextNode(\"\\n      \");\n  el24.appendChild(el29);\n  var el30 = this[\"redInput\"] = document.createElement(\"input\",\"coral-textfield\");\n  el30.className += \" _coral-ColorInput-editRgba-group-input\";\n  el30.id = uid+\"-r\";\n  el30.setAttribute(\"handle\", \"redInput\");\n  el30.setAttribute(\"is\", \"coral-textfield\");\n  el30.setAttribute(\"type\", \"number\");\n  el30.setAttribute(\"placeholder\", data_0[\"i18n\"][\"get\"]('R'));\n  el30.setAttribute(\"maxlength\", \"3\");\n  el30.setAttribute(\"value\", \"\");\n  el30.setAttribute(\"variant\", \"quiet\");\n  el24.appendChild(el30);\n  var el31 = document.createTextNode(\"\\n    \");\n  el24.appendChild(el31);\n  el22.appendChild(el24);\n  var el32 = document.createTextNode(\"\\n    \");\n  el22.appendChild(el32);\n  var el33 = document.createElement(\"div\");\n  el33.setAttribute(\"role\", \"group\");\n  el33.className += \" _coral-ColorInput-editRgba-group\";\n  var el34 = document.createTextNode(\"\\n      \");\n  el33.appendChild(el34);\n  var el35 = document.createElement(\"label\");\n  el35.className += \" _coral-ColorInput-editRgba-group-label\";\n  el35.setAttribute(\"for\", uid+\"-g\");\n  el35.textContent = data_0[\"i18n\"][\"get\"]('G');\n  el33.appendChild(el35);\n  var el36 = document.createTextNode(\"\\n      \");\n  el33.appendChild(el36);\n  var el37 = this[\"greenSlider\"] = document.createElement(\"coral-colorinput-slider\");\n  el37.setAttribute(\"handle\", \"greenSlider\");\n  el37.setAttribute(\"min\", \"0\");\n  el37.setAttribute(\"max\", \"255\");\n  el37.setAttribute(\"value\", \"0\");\n  el37.setAttribute(\"gradient\", \"#000000 #00FF00\");\n  el33.appendChild(el37);\n  var el38 = document.createTextNode(\"\\n      \");\n  el33.appendChild(el38);\n  var el39 = this[\"greenInput\"] = document.createElement(\"input\",\"coral-textfield\");\n  el39.className += \" _coral-ColorInput-editRgba-group-input\";\n  el39.id = uid+\"-g\";\n  el39.setAttribute(\"handle\", \"greenInput\");\n  el39.setAttribute(\"is\", \"coral-textfield\");\n  el39.setAttribute(\"type\", \"number\");\n  el39.setAttribute(\"placeholder\", data_0[\"i18n\"][\"get\"]('G'));\n  el39.setAttribute(\"maxlength\", \"3\");\n  el39.setAttribute(\"value\", \"\");\n  el39.setAttribute(\"variant\", \"quiet\");\n  el33.appendChild(el39);\n  var el40 = document.createTextNode(\"\\n    \");\n  el33.appendChild(el40);\n  el22.appendChild(el33);\n  var el41 = document.createTextNode(\"\\n    \");\n  el22.appendChild(el41);\n  var el42 = document.createElement(\"div\");\n  el42.setAttribute(\"role\", \"group\");\n  el42.className += \" _coral-ColorInput-editRgba-group\";\n  var el43 = document.createTextNode(\"\\n      \");\n  el42.appendChild(el43);\n  var el44 = document.createElement(\"label\");\n  el44.className += \" _coral-ColorInput-editRgba-group-label\";\n  el44.setAttribute(\"for\", uid+\"-b\");\n  el44.textContent = data_0[\"i18n\"][\"get\"]('B');\n  el42.appendChild(el44);\n  var el45 = document.createTextNode(\"\\n      \");\n  el42.appendChild(el45);\n  var el46 = this[\"blueSlider\"] = document.createElement(\"coral-colorinput-slider\");\n  el46.setAttribute(\"handle\", \"blueSlider\");\n  el46.setAttribute(\"min\", \"0\");\n  el46.setAttribute(\"max\", \"255\");\n  el46.setAttribute(\"value\", \"0\");\n  el46.setAttribute(\"gradient\", \"#000000 #0000FF\");\n  el42.appendChild(el46);\n  var el47 = document.createTextNode(\"\\n      \");\n  el42.appendChild(el47);\n  var el48 = this[\"blueInput\"] = document.createElement(\"input\",\"coral-textfield\");\n  el48.className += \" _coral-ColorInput-editRgba-group-input\";\n  el48.id = uid+\"-b\";\n  el48.setAttribute(\"handle\", \"blueInput\");\n  el48.setAttribute(\"is\", \"coral-textfield\");\n  el48.setAttribute(\"type\", \"number\");\n  el48.setAttribute(\"placeholder\", data_0[\"i18n\"][\"get\"]('B'));\n  el48.setAttribute(\"maxlength\", \"3\");\n  el48.setAttribute(\"value\", \"\");\n  el48.setAttribute(\"variant\", \"quiet\");\n  el42.appendChild(el48);\n  var el49 = document.createTextNode(\"\\n    \");\n  el42.appendChild(el49);\n  el22.appendChild(el42);\n  var el50 = document.createTextNode(\"\\n    \");\n  el22.appendChild(el50);\n  var el51 = document.createElement(\"div\");\n  el51.setAttribute(\"role\", \"group\");\n  el51.className += \" _coral-ColorInput-editRgba-group\";\n  var el52 = document.createTextNode(\"\\n      \");\n  el51.appendChild(el52);\n  var el53 = document.createElement(\"label\");\n  el53.className += \" _coral-ColorInput-editRgba-group-label\";\n  el53.setAttribute(\"for\", uid+\"-a\");\n  el53.textContent = data_0[\"i18n\"][\"get\"]('A');\n  el51.appendChild(el53);\n  var el54 = document.createTextNode(\"\\n      \");\n  el51.appendChild(el54);\n  var el55 = this[\"alphaSlider\"] = document.createElement(\"coral-colorinput-slider\");\n  el55.setAttribute(\"handle\", \"alphaSlider\");\n  el55.setAttribute(\"min\", \"0\");\n  el55.setAttribute(\"max\", \"100\");\n  el55.setAttribute(\"value\", \"100\");\n  el55.setAttribute(\"gradient\", \"rgba(255,255,255,0) rgba(255,255,255,1)\");\n  el51.appendChild(el55);\n  var el56 = document.createTextNode(\"\\n      \");\n  el51.appendChild(el56);\n  var el57 = this[\"alphaInput\"] = document.createElement(\"input\",\"coral-textfield\");\n  el57.className += \" _coral-ColorInput-editRgba-group-input\";\n  el57.id = uid+\"-a\";\n  el57.setAttribute(\"handle\", \"alphaInput\");\n  el57.setAttribute(\"is\", \"coral-textfield\");\n  el57.setAttribute(\"type\", \"number\");\n  el57.setAttribute(\"placeholder\", data_0[\"i18n\"][\"get\"]('A'));\n  el57.setAttribute(\"maxlength\", \"3\");\n  el57.setAttribute(\"value\", \"\");\n  el57.setAttribute(\"variant\", \"quiet\");\n  el51.appendChild(el57);\n  var el58 = document.createTextNode(\"\\n    \");\n  el51.appendChild(el58);\n  el22.appendChild(el51);\n  var el59 = document.createTextNode(\"\\n  \");\n  el22.appendChild(el59);\n  el2.appendChild(el22);\n  var el60 = document.createTextNode(\"\\n\");\n  el2.appendChild(el60);\n  frag.appendChild(el2);\n  var el61 = document.createTextNode(\"\\n\");\n  frag.appendChild(el61);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport ColorInputAbstractSubviewMixin from './ColorInputAbstractSubviewMixin';\nimport Color from './Color';\nimport '../../../coralui-component-button';\nimport '../../../coralui-component-textfield';\nimport './ColorInputSlider';\nimport propertiesSubview from '../templates/colorProperties';\nimport {commons, i18n} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-ColorInput-colorProperties';\n\n/**\n @class Coral.ColorInput.ColorProperties\n @classdesc A ColorInput Color properties component\n @htmltag coral-colorinput-colorproperties\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {ColorInputAbstractSubviewMixin}\n */\nclass ColorInputColorProperties extends ColorInputAbstractSubviewMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    this._delegateEvents(commons.extend(this._events, {\n      'change [handle=\"redSlider\"]': '_onRedSliderChange',\n      'change [handle=\"greenSlider\"]': '_onGreenSliderChange',\n      'change [handle=\"blueSlider\"]': '_onBlueSliderChange',\n      'change [handle=\"alphaSlider\"]': '_onAlphaSliderChange',\n      'change ._coral-ColorInput-editHex': '_onChangeHex',\n      'change ._coral-ColorInput-editRgba': '_onChangeRgba'\n    }));\n    \n    // Templates\n    this._elements = {};\n    propertiesSubview.call(this._elements, {commons, i18n});\n  }\n  \n  /** @ignore */\n  _onColorInputChange() {\n    const newColor = this._colorinput.valueAsColor;\n    const colorPreview = this._elements.colorPreview2;\n    let rgba;\n  \n    if (!newColor) {\n      // update the colorPreview background color, state, and label\n      colorPreview.setAttribute('aria-pressed', 'true');\n      colorPreview.setAttribute('aria-label', i18n.get('Color not set'));\n    \n      //reset Hex value to empty\n      this._elements.hexInput.value = '';\n    }\n    else {\n      rgba = newColor.rgba;\n    \n      // update the colorPreview background color, state, and label\n      colorPreview.style.backgroundColor = newColor.rgbValue;\n      colorPreview.setAttribute('aria-pressed', 'false');\n      colorPreview.setAttribute('aria-label', i18n.get('{value}, Color', {\n        value: parseFloat(rgba.a) === 1 ? newColor.value : newColor.rgbaValue\n      }));\n    \n      // update the Hex input value\n      this._elements.hexInput.value = newColor.hexValue.substr(1);\n    }\n  \n    const prefixes = ['red', 'green', 'blue', 'alpha'];\n    const prefixesLength = prefixes.length;\n    let prefix;\n    let abbr;\n    let isAlpha;\n    let val;\n  \n    // update rgba slider and input values\n    for (let i = 0; i < prefixesLength; i++) {\n      prefix = prefixes[i];\n      abbr = prefix.substr(0, 1);\n      isAlpha = i === prefixesLength - 1;\n    \n      // default slider and input value\n      val = isAlpha ? 100 : 127;\n    \n      // with new color, get appropriate RGBA value\n      if (newColor) {\n        if (!rgba) {\n          val = '';\n        }\n        else if (isAlpha) {\n          val = parseInt(rgba[abbr] * 100, 10);\n        }\n        else {\n          val = rgba[abbr];\n        }\n      }\n    \n      // update the slider and input values\n      this._elements[`${prefix}Slider`].value = this._elements[`${prefix}Input`].value = val;\n    }\n  \n    if (colorPreview === document.activeElement) {\n      // force blur and focus on colorButton so that new color or state is announced\n      colorPreview.blur();\n    \n      // delay focus by 100ms so that screen reader has time to adjust to label with updated color value\n      window.setTimeout(() => {\n        colorPreview.focus();\n      }, 100);\n    }\n  }\n  \n  /** @ignore */\n  _onRedSliderChange(event) {\n    this._elements.redInput.value = this._elements.redSlider.value;\n    this._onChangeRgba(event);\n  }\n  \n  /** @ignore */\n  _onGreenSliderChange(event) {\n    this._elements.greenInput.value = this._elements.greenSlider.value;\n    this._onChangeRgba(event);\n  }\n  \n  /** @ignore */\n  _onBlueSliderChange(event) {\n    this._elements.blueInput.value = this._elements.blueSlider.value;\n    this._onChangeRgba(event);\n  }\n  \n  /** @ignore */\n  _onAlphaSliderChange(event) {\n    this._elements.alphaInput.value = this._elements.alphaSlider.value;\n    this._onChangeRgba(event);\n  }\n  \n  /** @ignore */\n  _onChangeHex(event) {\n    event.stopPropagation();\n  \n    //Value of hexInput field is without '#'.\n    const value = `#${this._elements.hexInput.value}`;\n    const color = new Color();\n    color.value = value;\n    \n    if (color.hex === null) {\n      // no valid color value\n      this._elements.hexInput.value = '';\n      //Save last valid color\n      if (this._colorinput.valueAsColor !== null) {\n        this.constructor._lastValidColor = this._colorinput.valueAsColor;\n      }\n      this._colorinput._setActiveColor(null);\n    }\n    else {\n      this._colorinput._setActiveColor(color);\n    }\n  }\n  \n  /** @ignore */\n  _onChangeRgba(event) {\n    event.stopPropagation();\n    \n    const r = parseInt(this._elements.redInput.value, 10);\n    const g = parseInt(this._elements.greenInput.value, 10);\n    const b = parseInt(this._elements.blueInput.value, 10);\n    const a = parseInt(this._elements.alphaInput.value, 10);\n    \n    let colorValid = true;\n    if (isNaN(r) || r < 0 || r > 255) {\n      colorValid = false;\n      this._elements.redInput.value = '';\n    }\n    \n    if (isNaN(g) || g < 0 || g > 255) {\n      colorValid = false;\n      this._elements.greenInput.value = '';\n    }\n    \n    if (isNaN(b) || b < 0 || b > 255) {\n      colorValid = false;\n      this._elements.blueInput.value = '';\n    }\n    \n    if (isNaN(a) || a < 0 || a > 100) {\n      colorValid = false;\n      this._elements.alphaInput.value = '';\n    }\n    \n    if (colorValid) {\n      const color = new Color();\n      color.rgba = {\n        r: r,\n        g: g,\n        b: b,\n        a: a / 100\n      };\n      this._colorinput._setActiveColor(color);\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Support cloneNode\n    const subview = this.querySelector('._coral-ColorInput-propertiesSubview');\n    if (subview) {\n      subview.remove();\n    }\n    \n    this.appendChild(this._elements.propertiesSubview);\n  }\n}\n\nexport default ColorInputColorProperties;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  var el0 = this[\"colorButton\"] = document.createElement(\"button\",\"coral-button\");\n  el0.setAttribute(\"is\", \"coral-button\");\n  el0.setAttribute(\"handle\", \"colorButton\");\n  el0.setAttribute(\"icon\", \"checkmark\");\n  el0.setAttribute(\"type\", \"button\");\n  el0.setAttribute(\"role\", \"presentation\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  data = data_0;\n  this.colorButton.label.classList.add('u-coral-screenReaderOnly');\n  data_0 = data;\n  var el3 = document.createTextNode(\"\\n\");\n  frag.appendChild(el3);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport ColorInputAbstractSubviewMixin from './ColorInputAbstractSubviewMixin';\nimport Color from './Color';\nimport '../../../coralui-component-button';\nimport colorButton from '../templates/colorButton';\nimport {i18n, transform} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-ColorInput-swatch';\n\n/**\n @class Coral.ColorInput.Swatch\n @classdesc A ColorInput Swatch component\n @htmltag coral-colorinput-swatch\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {ColorInputAbstractSubviewMixin}\n */\nclass ColorInputSwatch extends ColorInputAbstractSubviewMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents(this._events);\n    \n    // Templates\n    this._elements = {};\n    colorButton.call(this._elements);\n  }\n  \n  /**\n   Whether the Item is selected.\n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    value = transform.booleanAttr(value);\n    \n    if (!value || value && !this.disabled) {\n      this._selected = value;\n      this._reflectAttribute('selected', this.disabled ? false : this._selected);\n      \n      this.classList.toggle('is-selected', this._selected);\n      this.setAttribute('aria-selected', this._selected);\n  \n      this._elements.colorButton[this._selected ? 'setAttribute' : 'removeAttribute']('aria-label',\n        `${i18n.get('checked')} ${this._elements.colorButton.label.textContent}`);\n      \n      this.trigger('coral-colorinput-swatch:_selectedchanged');\n    }\n  }\n  \n  /**\n   The Coral.ColorInput.Item that the swatch is a visual representation of. It accepts a DOM element or a CSS selector.\n   If a CSS selector is provided, the first matching element will be used.\n   \n   @type {HTMLElement|String}\n   @default null\n   @htmlattribute targetcolor\n   */\n  get targetColor() {\n    return this._targetColor || null;\n  }\n  set targetColor(value) {\n    if (typeof value === 'string') {\n      value = this.querySelector(value);\n    }\n  \n    // Store new value\n    this._targetColor = value;\n  \n    let cssColorValue = '';\n    let hexColorValue = '';\n  \n    if (this._targetColor) {\n      const color = new Color();\n      color.value = this._targetColor.value;\n      cssColorValue = color.rgbaValue;\n      hexColorValue = color.hexValue;\n    }\n  \n    // Update background color and text label for color swatch\n    if (cssColorValue) {\n      this._elements.colorButton.style.backgroundColor = cssColorValue;\n      this._elements.colorButton.label.textContent = hexColorValue;\n      this.setAttribute('aria-value', hexColorValue);\n    }\n    else {\n      this._elements.colorButton.classList.add('_coral-ColorInput-swatch-novalue');\n      this._elements.colorButton.label.textContent = i18n.get('unset');\n      this.setAttribute('aria-value', '');\n    }\n  }\n\n  /**\n   Whether the color preview is disabled or not.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._elements.colorButton.disabled;\n  }\n  set disabled(value) {\n    this._elements.colorButton.disabled = value;\n    this._reflectAttribute('disabled', this.disabled);\n  }\n\n  /**\n   The tabindex of the color preview.\n   \n   @type {Integer}\n   @default 0\n   @htmlattribute tabindex\n   @htmlattributereflected\n   */\n  get tabIndex() {\n    return this._elements.colorButton.tabIndex;\n  }\n  set tabIndex(value) {\n    this._elements.colorButton.tabIndex = value;\n    this._reflectAttribute('tabindex', this.tabIndex);\n  }\n  \n  /** @ignore */\n  _onColorInputChange() {\n    if (this.targetColor) {\n      // sync selections\n      this.selected = this.targetColor.selected;\n    }\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['selected', 'tabindex', 'tabIndex', 'disabled', 'targetColor', 'targetcolor'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // adds the role to support accessibility\n    this.setAttribute('role', 'option');\n    \n    // Support cloneNode\n    const button = this.querySelector('[handle=\"colorButton\"]');\n    if (button) {\n      button.remove();\n    }\n  \n    this.appendChild(this._elements.colorButton);\n  }\n}\n\nexport default ColorInputSwatch;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"swatchesSubview\"] = document.createElement(\"div\");\n  el0.className += \" _coral-ColorInput-swatchesSubview\";\n  el0.setAttribute(\"role\", \"presentation\");\n  el0.setAttribute(\"handle\", \"swatchesSubview\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = document.createElement(\"div\");\n  el2.className += \" _coral-ColorInput-swatches-header-title coral-Heading coral-Heading--5\";\n  el2.setAttribute(\"role\", \"presentation\");\n  el2.setAttribute(\"aria-hidden\", \"true\");\n  var el3 = document.createTextNode(\"\\n    \");\n  el2.appendChild(el3);\n  var el4 = this[\"swatchesHeaderTitle\"] = document.createElement(\"span\");\n  el4.setAttribute(\"handle\", \"swatchesHeaderTitle\");\n  el4.id = data_0[\"commons\"][\"getUID\"]();\n  el4.setAttribute(\"role\", \"heading\");\n  el4.setAttribute(\"aria-level\", \"2\");\n  el4.textContent = \"\\n      \"+data_0[\"i18n\"][\"get\"]('Swatches');\n  el2.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el5);\n  el0.appendChild(el2);\n  var el6 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el6);\n  var el7 = document.createElement(\"div\");\n  el7.className += \" _coral-ColorInput-swatches-container\";\n  el7.setAttribute(\"role\", \"presentation\");\n  el7.setAttribute(\"aria-labelledby\", data_0[\"commons\"][\"getUID\"]());\n  var el8 = document.createTextNode(\"\\n    \");\n  el7.appendChild(el8);\n  var el9 = this[\"swatchesContainer\"] = document.createElement(\"div\");\n  el9.setAttribute(\"handle\", \"swatchesContainer\");\n  el9.setAttribute(\"role\", \"presentation\");\n  el7.appendChild(el9);\n  var el10 = document.createTextNode(\"\\n  \");\n  el7.appendChild(el10);\n  el0.appendChild(el7);\n  var el11 = document.createTextNode(\"\\n\");\n  el0.appendChild(el11);\n  frag.appendChild(el0);\n  var el12 = document.createTextNode(\"\\n\");\n  frag.appendChild(el12);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport ColorInputAbstractSubviewMixin from './ColorInputAbstractSubviewMixin';\nimport ColorInputSwatch from './ColorInputSwatch';\nimport Color from './Color';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport swatchesHeader from '../templates/swatchesHeader';\nimport {commons, i18n} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-ColorInput-swatches';\n\n/**\n @class Coral.ColorInput.Swatches\n @classdesc A ColorInput Swatches component\n @htmltag coral-colorinput-swatches\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {ColorInputAbstractSubviewMixin}\n */\nclass ColorInputSwatches extends ColorInputAbstractSubviewMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents(commons.extend(this._events, {\n      'click coral-colorinput-swatch': '_onSwatchClicked',\n      'keydown ._coral-ColorInput-swatch': '_onKeyDown',\n      'capture:focus coral-colorinput-swatch': '_onFocus',\n  \n      // private\n      'coral-colorinput-swatch:_selectedchanged': '_onItemSelectedChanged'\n    }));\n    \n    // Templates\n    this._elements = {};\n    swatchesHeader.call(this._elements, {commons, i18n});\n  \n    // Used for eventing\n    this._oldSelection = null;\n  \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // just init on demand\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-colorinput-swatch',\n        onItemAdded: this._validateSelection\n      });\n    }\n    return this._items;\n  }\n  \n  /**\n   The selected item.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getLastSelected();\n  }\n  \n  /** @private */\n  _onItemSelectedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    this._validateSelection(event.target);\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    const selectedItems = this.items._getAllSelected();\n    \n    // Last selected item wins\n    item = item || selectedItems[selectedItems.length - 1];\n    \n    if (item && item.hasAttribute('selected') && selectedItems.length > 1) {\n      selectedItems.forEach((selectedItem) => {\n        if (selectedItem !== item) {\n          // Don't trigger change events\n          this._preventTriggeringEvents = true;\n          selectedItem.removeAttribute('selected');\n        }\n      }, this);\n      \n      // We can trigger change events again\n      this._preventTriggeringEvents = false;\n    }\n    \n    this._triggerChangeEvent();\n  }\n  \n  /** @private */\n  _triggerChangeEvent() {\n    const selectedItem = this.selectedItem;\n    const oldSelection = this._oldSelection;\n    \n    if (!this._preventTriggeringEvents && selectedItem !== oldSelection) {\n      // update hidden fields\n      if (selectedItem) {\n        this.value = selectedItem.value;\n      }\n      \n      this.trigger('coral-colorinput-swatches:change', {\n        oldSelection: oldSelection,\n        selection: selectedItem\n      });\n      \n      this._oldSelection = selectedItem;\n    }\n  }\n  \n  /** @ignore */\n  _beforeOverlayOpen() {\n    // relayout swatches if items have been added/removed/moved...\n    const colorElements = this._colorinput.items.getAll();\n    let colorsElementsChanged = false;\n    if (!this._cachedColorElements) {\n      colorsElementsChanged = true;\n    }\n    else if (this._cachedColorElements.length !== colorElements.length) {\n      colorsElementsChanged = true;\n    }\n    else if (this._cachedColorElements.length === colorElements.length) {\n      for (let i = 0; i < colorElements.length; i++) {\n        if (this._cachedColorElements[i] !== colorElements[i]) {\n          colorsElementsChanged = true;\n          break;\n        }\n      }\n    }\n  \n    this._cachedColorElements = colorElements;\n  \n    if (colorsElementsChanged) {\n      this._layoutColorSwatch();\n    }\n  \n    this._ensureKeyboardAccess();\n  }\n  \n  /** @ignore */\n  _onColorInputChange() {\n    this._ensureKeyboardAccess();\n  }\n  \n  /**\n   If no swatch is selected, make sure that the first swatch is tabbable\n   @ignore\n   */\n  _ensureKeyboardAccess() {\n    if (!this.querySelector('coral-colorinput-swatch[selected]')) {\n      const firstSwatch = this.querySelector('coral-colorinput-swatch');\n      if (firstSwatch) {\n        firstSwatch.tabIndex = 0;\n      }\n    }\n  }\n  \n  /** @ignore */\n  _layoutColorSwatch() {\n    // Clear container before adding elements to avoid multiple addition\n    this._elements.swatchesContainer.innerHtml = '';\n    const colors = this._colorinput.items.getAll();\n    \n    const colorsLength = colors.length;\n    let swatchSelected = false;\n    for (let colorCount = 0; colorCount < colorsLength; colorCount++) {\n      const color = colors[colorCount];\n      \n      const swatch = new ColorInputSwatch();\n      this._elements.swatchesContainer.appendChild(swatch);\n      swatch.targetColor = color;\n      \n      if (color.selected) {\n        swatch.selected = color.selected;\n        swatchSelected = true;\n      }\n      \n      swatch.setAttribute('aria-selected', swatch.selected);\n      \n      // Update color button tabindex depending on selected state\n      swatch.tabIndex = swatch.selected ? 0 : -1;\n    }\n    \n    // If no swatch is selected, make sure that the first swatch is focusable\n    if (!swatchSelected) {\n      this._ensureKeyboardAccess();\n    }\n  }\n  \n  /** @ignore */\n  _onSwatchClicked(event) {\n    event.stopPropagation();\n    \n    const colorButton = event.target;\n    const swatch = colorButton.closest('coral-colorinput-swatch');\n    \n    if (!swatch.selected) {\n      const color = new Color();\n      color.value = swatch.targetColor ? swatch.targetColor.value : '';\n      this._colorinput._setActiveColor(color);\n      swatch.selected = true;\n    }\n    swatch.firstChild.focus();\n  }\n  \n  /** @ignore */\n  _onKeyDown(event) {\n    const overlay = this._colorinput._elements.overlay;\n    \n    // only if overlay is open\n    if (!overlay.open) {\n      return;\n    }\n    \n    const allItems = this.items.getAll();\n    \n    const currentIndex = allItems.indexOf(event.matchedTarget);\n    let preventDefault = true;\n    let newIndex = currentIndex;\n    \n    switch (event.which) {\n      //return\n      case 13:\n        // Wait a frame before closing so that focus is restored correctly\n        window.requestAnimationFrame(() => {\n          overlay.open = false;\n        });\n        break;\n      //left arrow\n      case 37:\n        newIndex -= 1;\n        break;\n      //up arrow\n      case 38:\n        newIndex -= 4;\n        break;\n      //right arrow\n      case 39:\n        newIndex += 1;\n        break;\n      //down arrow\n      case 40:\n        newIndex += 4;\n        break;\n      default:\n        preventDefault = false;\n        break;\n    }\n    \n    // If any action has been taken prevent event propagation\n    if (preventDefault) {\n      event.preventDefault();\n      \n      if (newIndex < 0 || newIndex >= allItems.length) {\n        return;\n      }\n      \n      // show right page in carousel and focus right swatch\n      const swatch = allItems[newIndex];\n      const color = new Color();\n      \n      color.value = swatch.targetColor ? swatch.targetColor.value : '';\n      this._colorinput._setActiveColor(color);\n      swatch.selected = true;\n      \n      swatch.firstChild.focus();\n    }\n  }\n  \n  /**\n   Ensure that only one swatch can receive tab focus at a time\n   @ignore\n   */\n  _onFocus(event) {\n    const allItems = this.items.getAll();\n    \n    for (let i = 0; i < allItems.length; i++) {\n      const swatch = allItems[i];\n      if (!swatch.contains(event.matchedTarget)) {\n        swatch.tabIndex = -1;\n      }\n    }\n    \n    event.matchedTarget.tabIndex = 0;\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // adds the role to support accessibility\n    this.setAttribute('role', 'listbox');\n  \n    // Support cloneNode\n    const swatchesSubview = this.querySelector('._coral-ColorInput-swatchesSubview');\n    if (swatchesSubview) {\n      swatchesSubview.remove();\n    }\n  \n    // add header\n    this.appendChild(this._elements.swatchesSubview);\n  \n    // add accessibility label\n    this.setAttribute('aria-labelledby', this._elements.swatchesHeaderTitle.id);\n  \n    // Don't trigger events once connected\n    this._preventTriggeringEvents = true;\n    this._validateSelection();\n    this._preventTriggeringEvents = false;\n  \n    this._oldSelection = this.selectedItem;\n  }\n}\n\nexport default ColorInputSwatches;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  var el0 = this[\"defaultPalette\"] = document.createElement(\"div\");\n  el0.setAttribute(\"handle\", \"defaultPalette\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = document.createElement(\"coral-colorinput-item\");\n  el2.setAttribute(\"value\", \"\");\n  el0.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el3);\n  var el4 = document.createElement(\"coral-colorinput-item\");\n  el4.setAttribute(\"value\", \"#001F3F\");\n  el0.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el5);\n  var el6 = document.createElement(\"coral-colorinput-item\");\n  el6.setAttribute(\"value\", \"#0074D9\");\n  el0.appendChild(el6);\n  var el7 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el7);\n  var el8 = document.createElement(\"coral-colorinput-item\");\n  el8.setAttribute(\"value\", \"#7FDBFF\");\n  el0.appendChild(el8);\n  var el9 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el9);\n  var el10 = document.createElement(\"coral-colorinput-item\");\n  el10.setAttribute(\"value\", \"#39CCCC\");\n  el0.appendChild(el10);\n  var el11 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el11);\n  var el12 = document.createElement(\"coral-colorinput-item\");\n  el12.setAttribute(\"value\", \"#3D9970\");\n  el0.appendChild(el12);\n  var el13 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el13);\n  var el14 = document.createElement(\"coral-colorinput-item\");\n  el14.setAttribute(\"value\", \"#2ECC40\");\n  el0.appendChild(el14);\n  var el15 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el15);\n  var el16 = document.createElement(\"coral-colorinput-item\");\n  el16.setAttribute(\"value\", \"#01FF70\");\n  el0.appendChild(el16);\n  var el17 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el17);\n  var el18 = document.createElement(\"coral-colorinput-item\");\n  el18.setAttribute(\"value\", \"#FFDC00\");\n  el0.appendChild(el18);\n  var el19 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el19);\n  var el20 = document.createElement(\"coral-colorinput-item\");\n  el20.setAttribute(\"value\", \"#FF851B\");\n  el0.appendChild(el20);\n  var el21 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el21);\n  var el22 = document.createElement(\"coral-colorinput-item\");\n  el22.setAttribute(\"value\", \"#FF4136\");\n  el0.appendChild(el22);\n  var el23 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el23);\n  var el24 = document.createElement(\"coral-colorinput-item\");\n  el24.setAttribute(\"value\", \"#85144B\");\n  el0.appendChild(el24);\n  var el25 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el25);\n  var el26 = document.createElement(\"coral-colorinput-item\");\n  el26.setAttribute(\"value\", \"#F012BE\");\n  el0.appendChild(el26);\n  var el27 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el27);\n  var el28 = document.createElement(\"coral-colorinput-item\");\n  el28.setAttribute(\"value\", \"#B10DC9\");\n  el0.appendChild(el28);\n  var el29 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el29);\n  var el30 = document.createElement(\"coral-colorinput-item\");\n  el30.setAttribute(\"value\", \"#111111\");\n  el0.appendChild(el30);\n  var el31 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el31);\n  var el32 = document.createElement(\"coral-colorinput-item\");\n  el32.setAttribute(\"value\", \"#AAAAAA\");\n  el0.appendChild(el32);\n  var el33 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el33);\n  var el34 = document.createElement(\"coral-colorinput-item\");\n  el34.setAttribute(\"value\", \"#DDDDDD\");\n  el0.appendChild(el34);\n  var el35 = document.createTextNode(\"\\n\");\n  el0.appendChild(el35);\n  frag.appendChild(el0);\n  var el36 = document.createTextNode(\"\\n\");\n  frag.appendChild(el36);\n  data = data_0;\n  var uid = data.commons.getUID();\n  data_0 = data;\n  var el38 = document.createTextNode(\"\\n\");\n  frag.appendChild(el38);\n  var el39 = this[\"input\"] = document.createElement(\"input\",\"coral-textfield\");\n  el39.setAttribute(\"handle\", \"input\");\n  el39.setAttribute(\"is\", \"coral-textfield\");\n  el39.className += \" _coral-ColorInput-input\";\n  el39.setAttribute(\"type\", \"text\");\n  el39.setAttribute(\"value\", \"\");\n  frag.appendChild(el39);\n  var el40 = document.createTextNode(\"\\n\");\n  frag.appendChild(el40);\n  var el41 = this[\"buttonWrapper\"] = document.createElement(\"div\");\n  el41.className += \" _coral-ColorInput-buttonWrapper\";\n  el41.setAttribute(\"handle\", \"buttonWrapper\");\n  el41.setAttribute(\"role\", \"presentation\");\n  var el42 = document.createTextNode(\"\\n  \");\n  el41.appendChild(el42);\n  var el43 = this[\"colorPreview\"] = document.createElement(\"button\",\"coral-button\");\n  el43.setAttribute(\"handle\", \"colorPreview\");\n  el43.setAttribute(\"is\", \"coral-button\");\n  el43.setAttribute(\"variant\", \"default\");\n  el43.className += \" _coral-ColorInput-button _coral-ColorInput-preview\";\n  el43.setAttribute(\"type\", \"button\");\n  el43.setAttribute(\"aria-haspopup\", \"true\");\n  el43.setAttribute(\"aria-expanded\", \"false\");\n  el43.setAttribute(\"aria-controls\", uid);\n  el41.appendChild(el43);\n  var el44 = document.createTextNode(\"\\n  \");\n  el41.appendChild(el44);\n  data = data_0;\n  \n    // Since we don't have a mutation observer anymore to replace content zones magically, we have to do it manually.\n    this.colorPreview.label.classList.add('u-coral-screenReaderOnly');\n    this.colorPreview.label.innerText = data.i18n.get('Color Picker');\n    this.id = uid + '-coral-button-label';\n  \n  data_0 = data;\n  var el46 = document.createTextNode(\"\\n\");\n  el41.appendChild(el46);\n  frag.appendChild(el41);\n  var el47 = document.createTextNode(\"\\n\");\n  frag.appendChild(el47);\n  var el48 = this[\"overlay\"] = document.createElement(\"coral-popover\");\n  el48.setAttribute(\"smart\", \"\");\n  el48.className += \" _coral-ColorInput-overlay\";\n  el48.setAttribute(\"variant\", \"flyout\");\n  el48.setAttribute(\"role\", \"dialog\");\n  el48.setAttribute(\"focusonshow\", \"on\");\n  el48.setAttribute(\"trapfocus\", \"on\");\n  el48.setAttribute(\"handle\", \"overlay\");\n  el48.setAttribute(\"breadthoffset\", \"50%r - 50%p\");\n  el48.setAttribute(\"placement\", \"bottom\");\n  el48.id = uid;\n  el48.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('Color Picker'));\n  var el49 = document.createTextNode(\"\\n  \");\n  el48.appendChild(el49);\n  var el50 = this[\"propertiesView\"] = document.createElement(\"coral-colorinput-colorproperties\");\n  el50.setAttribute(\"handle\", \"propertiesView\");\n  el48.appendChild(el50);\n  var el51 = document.createTextNode(\"\\n  \");\n  el48.appendChild(el51);\n  var el52 = this[\"swatchesView\"] = document.createElement(\"coral-colorinput-swatches\");\n  el52.setAttribute(\"handle\", \"swatchesView\");\n  el48.appendChild(el52);\n  var el53 = document.createTextNode(\"\\n\");\n  el48.appendChild(el53);\n  frag.appendChild(el48);\n  var el54 = document.createTextNode(\"\\n\");\n  frag.appendChild(el54);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport Color from './Color';\nimport ColorInputItem from './ColorInputItem';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport {Icon} from '../../../coralui-component-icon';\nimport '../../../coralui-component-textfield';\nimport '../../../coralui-component-button';\nimport '../../../coralui-component-popover';\nimport './ColorInputColorProperties';\nimport './ColorInputSwatches';\nimport base from '../templates/base';\nimport {validate, transform, commons, i18n} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-ColorInput';\n\n/**\n Enumeration for {@link ColorInput} variants.\n \n @typedef {Object} ColorInputVariantEnum\n \n @property {String} DEFAULT\n Use ColorInput as a formfield (default).\n @property {String} SWATCH\n Use a simple swatch as ColorInput.\n */\nconst variant = {\n  DEFAULT: 'default',\n  SWATCH: 'swatch'\n};\n\n/**\n Enumeration for {@link ColorInput} auto generated colors options.\n \n @typedef {Object} ColorInputAutoGenerateColorsEnum\n \n @property {String} OFF\n Disable auto generation.\n @property {String} SHADES\n Automatically generate shades (darker colors) of all colors.\n @property {String} TINTS\n Automatically generate tints (lighter colors) of all colors.\n */\nconst autoGenerateColors = {\n  OFF: 'off',\n  SHADES: 'shades',\n  TINTS: 'tints'\n};\n\n/**\n Enumeration for {@link ColorInput} swatches display options.\n \n @typedef {Object} ColorInputShowSwatchesEnum\n \n @property {String} ON\n Display swatches view (default).\n @property {String} OFF\n Hide swatches view.\n */\nconst showSwatches = {\n  ON: 'on',\n  OFF: 'off'\n};\n\n/**\n Enumeration for {@link ColorInput} color properties display options.\n \n @typedef {Object} ColorInputShowPropertiesEnum\n \n @property {String} ON\n Display color properties view (default).\n @property {String} OFF\n Hide color properties view.\n */\nconst showProperties = {\n  ON: 'on',\n  OFF: 'off'\n};\n\n/**\n Enumeration for {@link ColorInput} default colors display options.\n \n @typedef {Object} ColorInputShowDefaultColorsEnum\n \n @property {String} ON\n Display default colors (default).\n @property {String} OFF\n Hide default colors.\n */\nconst showDefaultColors = {\n  ON: 'on',\n  OFF: 'off'\n};\n\n/**\n @class Coral.ColorInput\n @classdesc A ColorInput component than can be used as a form field to select from a list of color options.\n @htmltag coral-colorinput\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass ColorInput extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {};\n    base.call(this._elements, {commons, i18n});\n    \n    const overlay = this._elements.overlay;\n    const overlayId = overlay.id;\n  \n    // Add a reference to this\n    overlay._colorinput = this;\n    \n    // Extend form field events\n    const events = commons.extend(this._events, {\n      'key:down ._coral-ColorInput-input:not([readonly])': '_onKeyDown',\n      'key:down [handle=\"colorPreview\"]': '_onKeyDown',\n      'click [handle=\"colorPreview\"]': '_onColorPreviewClick',\n      'key:esc input': '_onKeyEsc',\n      'key:enter input': '_onKeyEsc',\n  \n      // private\n      'coral-colorinput-item:_selectedchanged': '_onItemSelectedChanged'\n    });\n    \n    // Overlay\n    events[`global:capture:coral-overlay:beforeopen #${overlayId}`] = '_beforeOverlayOpen';\n    events[`global:capture:coral-overlay:close #${overlayId}`] = '_onOverlayClose';\n    \n    // Events\n    this._delegateEvents(events);\n  \n    // Pre-define labellable element\n    this._labellableElement = this._elements.input;\n  \n    // Used for eventing\n    this._oldSelection = null;\n  \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // just init on demand\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-colorinput-item',\n        onItemAdded: this._onItemAdded,\n        onItemRemoved: this._onItemRemoved\n      });\n    }\n    return this._items;\n  }\n  \n  /**\n   The selected item in the ColorInput.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getLastSelected();\n  }\n  \n  /**\n   The ColorInput variant. See {@link ColorInputVariantEnum}.\n   \n   @default ColorInputVariantEnum.DEFAULT\n   @type {String}\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n    \n    if (this._variant === variant.SWATCH) {\n      this.classList.add('_coral-ColorInput--swatch');\n      this._elements.input.setAttribute('tabindex', -1);\n      this._elements.colorPreview.removeAttribute('tabindex');\n    }\n    else {\n      this.classList.remove('_coral-ColorInput--swatch');\n      this._elements.input.removeAttribute('tabindex');\n      this._elements.colorPreview.setAttribute('tabindex', -1);\n    }\n  \n    this._syncColorPreviewIcon();\n  }\n  \n  /**\n   Convenient property to get/set the the current color. If the value is no valid color it will return\n   <code>null</code> (The getter will return a copy of the current selected color).\n   \n   @type {Color}\n   */\n  get valueAsColor() {\n    if (!this._color) {\n      this._color = new Color();\n    }\n  \n    // sync this._color with the hidden field if necessary\n    const newColor = new Color();\n    newColor.value = this.value;\n    if (!this._color.isSimilarTo(newColor, true)) {\n      this._color.value = newColor.value;\n      this._color.alpha = newColor.alpha;\n    }\n  \n    if (this._color.rgb === null) {\n      return null;\n    }\n  \n    return this._color.clone();\n  }\n  set valueAsColor(value) {\n    if (!this._color) {\n      this._color = new Color();\n    }\n  \n    if (!value) {\n      // clear color values\n      this._color.value = '';\n      this.value = '';\n    }\n    else {\n      // set color values\n      this._color = value;\n    \n      if (value.alpha < 1) {\n        // if an alpha value is used store rgba in the hidden field (it is the only format that can store alpha)\n        this.value = value.rgbaValue;\n      }\n      else {\n        this.value = value.value;\n      }\n    }\n  }\n  \n  /**\n   Should shades (darker colors) or tints (lighter colors) automatically be generated.\n   See {@link ColorInputAutoGenerateColorsEnum}.\n   \n   @default Coral.ColorInput.autoGenerateColors.OFF\n   @type {String}\n   @htmlattribute autogeneratecolors\n   */\n  get autoGenerateColors() {\n    return this._autoGenerateColors || autoGenerateColors.OFF;\n  }\n  set autoGenerateColors(value) {\n    value = transform.string(value).toLowerCase();\n    this._autoGenerateColors = validate.enumeration(autoGenerateColors)(value) && value || autoGenerateColors.OFF;\n    \n    this._recalculateGeneratedColors();\n  }\n\n  /**\n   Whether swatches view should be displayed. See {@link ColorInputSwatches}.\n   \n   @default ColorInputShowSwatchesEnum.ON\n   @type {ColorInputSwatches}\n   @htmlattribute showswatches\n   */\n  get showSwatches() {\n    return this._showSwatches || showSwatches.ON;\n  }\n  set showSwatches(value) {\n    value = transform.string(value).toLowerCase();\n    this._showSwatches = validate.enumeration(showSwatches)(value) && value || showSwatches.ON;\n  \n    this._showOrHideView(this._elements.swatchesView, this._showSwatches === showSwatches.OFF);\n  }\n\n  /**\n   Whether properties view should be displayed. See {@link ColorInputColorProperties}.\n   \n   @default ColorInputShowPropertiesEnum.ON\n   @type {String}\n   @htmlattribute showproperties\n   */\n  get showProperties() {\n    return this._showProperties || showProperties.ON;\n  }\n  set showProperties(value) {\n    value = transform.string(value).toLowerCase();\n    this._showProperties = validate.enumeration(showProperties)(value) && value || showProperties.ON;\n  \n    this._showOrHideView(this._elements.propertiesView, this._showProperties === showProperties.OFF);\n  }\n\n  /**\n   Whether default colors should be displayed. Link {@link ColorInputShowDefaultColorsEnum}.\n   \n   @default ColorInputShowDefaultColorsEnum.ON\n   @type {String}\n   @htmlattribute showdefaultcolors\n   */\n  get showDefaultColors() {\n    return this._showDefaultColors || showDefaultColors.ON;\n  }\n  set showDefaultColors(value) {\n    value = transform.string(value).toLowerCase();\n    this._showDefaultColors = validate.enumeration(showDefaultColors)(value) && value || showDefaultColors.ON;\n  \n    const defaultPalette = this._elements.defaultPalette;\n    if (this._showDefaultColors === showDefaultColors.ON) {\n      if (!defaultPalette.parentNode) {\n        this.insertBefore(defaultPalette, this.firstChild || null);\n      }\n    }\n    else if (defaultPalette.parentNode) {\n      defaultPalette.parentNode.removeChild(defaultPalette);\n    }\n  }\n\n\n  /**\n   Short hint that describes the expected value of the ColorInput. It is displayed when the ColorInput is empty\n   and the variant is {@link Coral.ColorInput.variant.DEFAULT}\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute placeholder\n   @htmlattributereflected\n   */\n  get placeholder() {\n    return this._elements.input.placeholder;\n  }\n  set placeholder(value) {\n    this._reflectAttribute('placeholder', value);\n    this._elements.input.placeholder = value;\n  }\n  \n  /**\n   The value of the color. This value can be set in 5 different formats (HEX, RGB, RGBA, HSB and CMYK). Corrects a\n   hex value, if it is represented by 3 or 6 characters with or without '#'\n   \n   e.g:\n   HEX:  #FFFFFF\n   RGB:  rgb(16,16,16)\n   RGBA: rgba(215,40,40,0.9)\n   RGBA: hsb(360,100,100)\n   CMYK: cmyk(0,100,50,0)\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    return this._value || '';\n  }\n  set value(value) {\n    const oldColor = new Color();\n    oldColor.value = this.value;\n  \n    const newColor = new Color();\n    newColor.value = value;\n  \n    if (!newColor.isSimilarTo(oldColor, false)) {\n      this._value = value;\n    \n      // make sure right ColorInput.Item is selected even if input field was set by hand\n      this._selectColorInputColor(newColor);\n    \n      // trigger a change event\n      this.trigger('coral-colorinput:_valuechange');\n    }\n  \n    // always set the input to the current value\n    this._elements.input.value = this.value;\n  \n    this._updateColorPreview();\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._elements.input.name;\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n  \n    this._elements.input.name = value;\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.setAttribute('aria-disabled', this._disabled);\n    this.classList.toggle('is-disabled', this._disabled);\n    \n    this._elements.input.disabled = this.disabled;\n    this._elements.colorPreview.disabled = this._disabled || this.readOnly;\n  \n    this._syncColorPreviewIcon();\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#invalid}.\n   */\n  get invalid() {\n    return super.invalid;\n  }\n  set invalid(value) {\n    super.invalid = value;\n    \n    this._elements.input.invalid = this.invalid;\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    this.setAttribute('aria-required', this._required);\n    this._elements.input.required = this._required;\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    this.setAttribute('aria-readonly', this._readOnly);\n  \n    this._elements.input.readOnly = this._readOnly;\n    this._elements.colorPreview.disabled = this.disabled || this._readOnly;\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#labelledBy}.\n   */\n  get labelledBy() {\n    return super.labelledBy;\n  }\n  set labelledBy(value) {\n    super.labelledBy = value;\n    \n    // Sync input aria-labelledby\n    this._elements.input[value ? 'setAttribute' : 'removeAttribute']('aria-labelledby', value);\n    \n    // in case the user focuses the buttons, he will still get a notion of the usage of the component\n    if (this.labelledBy) {\n      this.setAttribute('aria-labelledby', this.labelledBy);\n      this._elements.colorPreview.setAttribute('aria-labelledby',\n        [this.labelledBy,\n          this._elements.colorPreview.label.id].join(' '));\n    }\n    else {\n      this.removeAttribute('aria-labelledby');\n      this._elements.colorPreview.removeAttribute('aria-labelledby');\n    }\n  }\n  \n  /** @private */\n  _onItemSelectedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    this._validateSelection(event.target);\n  }\n  \n  /** @private */\n  _onItemAdded(item) {\n    this._validateSelection(item);\n    \n    if (this._elements.overlay.open) {\n      // simply close the overlay whenever a color is added\n      this._elements.overlay.open = false;\n    }\n  }\n  \n  /** @private */\n  _onItemRemoved() {\n    if (this._elements.overlay.open) {\n      // simply close the overlay whenever a color is removed\n      this._elements.overlay.open = false;\n    }\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    const selectedItems = this.items._getAllSelected();\n    \n    // Last selected item wins\n    item = item || selectedItems[selectedItems.length - 1];\n    \n    if (item && item.hasAttribute('selected') && selectedItems.length > 1) {\n      selectedItems.forEach((selectedItem) => {\n        if (selectedItem !== item) {\n          // Don't trigger change events\n          this._preventTriggeringEvents = true;\n          selectedItem.removeAttribute('selected');\n        }\n      }, this);\n      \n      // We can trigger change events again\n      this._preventTriggeringEvents = false;\n    }\n    \n    this._triggerChangeEvent();\n  }\n  \n  /** @private */\n  _triggerChangeEvent() {\n    const selectedItem = this.selectedItem;\n    const oldSelection = this._oldSelection;\n    \n    if (!this._preventTriggeringEvents && selectedItem !== oldSelection) {\n      // update hidden fields\n      if (selectedItem) {\n        this.value = selectedItem.getAttribute('value');\n      }\n      \n      this.trigger('coral-colorinput:change', {\n        oldSelection: oldSelection,\n        selection: selectedItem\n      });\n      \n      this._oldSelection = selectedItem;\n    }\n  }\n  \n  /** @ignore */\n  _onColorPreviewClick(event) {\n    // restore focus to appropriate element when overlay closes\n    this._elements.overlay.returnFocusTo(this.variant === variant.SWATCH ? event.matchedTarget : this._elements.input);\n  }\n  \n  // JSDocs inherited from Coral.mixin.formField\n  _onInputChange(event) {\n    // method used by Coral.mixin.formField as a callback whenever a form field changes\n    \n    if (event.target === this._elements.input) {\n      // only handle changes to the hidden input field ...\n      \n      // stops the current event\n      event.stopPropagation();\n      \n      const color = new Color();\n      color.value = event.target[this._eventTargetProperty];\n      \n      this._setActiveColor(color);\n    }\n  }\n  \n  /** @ignore */\n  _onKeyDown(event) {\n    event.stopPropagation();\n    \n    // restore focus to appropriate element when overlay closes\n    this._elements.overlay.returnFocusTo(this.variant === variant.SWATCH ? event.matchedTarget : this._elements.input);\n    \n    this._elements.overlay.open = true;\n  }\n  \n  /** @ignore */\n  _onKeyEsc() {\n    if (!this._elements.overlay.open) {\n      return;\n    }\n    \n    this._elements.overlay.open = false;\n  }\n  \n  /** @ignore */\n  _beforeOverlayOpen() {\n    // Make sure appropriate tabbable descendant will receive focus\n    if (this.showProperties === showProperties.ON) {\n      this._elements.overlay.focusOnShow = this._elements.propertiesView._elements.colorPreview2;\n    }\n    else if (this.showSwatches === showSwatches.ON) {\n      this._elements.overlay.focusOnShow =\n        this._elements.overlay.querySelector('coral-colorinput-swatch[selected] > button') ||\n        'coral-colorinput-swatch > button';\n    }\n    \n    // set aria-expanded state\n    this._elements.colorPreview.setAttribute('aria-expanded', true);\n  }\n  \n  /** @ignore */\n  _onOverlayClose() {\n    // set aria-expanded state\n    this._elements.colorPreview.setAttribute('aria-expanded', false);\n  }\n  \n  /**\n   Checks if the current input is valid or not. This check will only be performed on user interaction.\n   \n   @ignore\n   */\n  _validateInputValue() {\n    this.invalid = this.value !== '' && this.valueAsColor === null;\n  }\n  \n  /** @ignore */\n  _showOrHideView(view, hide) {\n    view.hidden = hide;\n    //Remove both classes and add only the required one\n    this._elements.overlay.classList.remove('_coral-ColorInput-onlySwatchesView', '_coral-ColorInput-onlyPropertiesView');\n    \n    if (!this._elements.propertiesView.hidden && this._elements.swatchesView.hidden) {\n      this._elements.overlay.classList.add('_coral-ColorInput-onlyPropertiesView');\n    }\n    else if (this._elements.propertiesView.hidden && !this._elements.swatchesView.hidden) {\n      this._elements.overlay.classList.add('_coral-ColorInput-onlySwatchesView');\n    }\n    \n    // Update accessibility label for colorPreview button when only swatches are shown\n    if (this.showProperties === showProperties.OFF &&\n      this.showSwatches === showSwatches.ON) {\n      this._elements.colorPreview.label.textContent = i18n.get('Swatches');\n      this._elements.overlay.setAttribute('aria-label', i18n.get('Swatches'));\n    }\n    else {\n      this._elements.colorPreview.label.textContent = i18n.get('Color Picker');\n      this._elements.overlay.setAttribute('aria-label', i18n.get('Color Picker'));\n    }\n  }\n  \n  /** @ignore */\n  _recalculateGeneratedColors() {\n    // remove old generated tint colors\n    const childrenList = this.querySelectorAll('coral-colorinput-item[coral-colorinput-generatedcolor]');\n    const childrenListLength = childrenList.length;\n    for (let i = 0; i < childrenListLength; i++) {\n      childrenList[i].remove();\n    }\n    \n    if (this.autoGenerateColors !== autoGenerateColors.OFF) {\n      const colorElements = this.items.getAll();\n      \n      let colorEl = null;\n      let color = null;\n      let colorIndex = 0;\n      let generatedIndex = 0;\n      \n      let generatedColorEl = null;\n      let generatedColors = [];\n      \n      for (colorIndex = 0; colorIndex < colorElements.length; colorIndex++) {\n        colorEl = colorElements[colorIndex];\n        color = new Color();\n        color.value = colorEl.value;\n        \n        generatedColors = this.autoGenerateColors === autoGenerateColors.TINTS ? color.calculateTintColors(5) : color.calculateShadeColors(5);\n        \n        for (generatedIndex = generatedColors.length - 1; generatedIndex >= 0; generatedIndex--) {\n          generatedColorEl = new ColorInputItem();\n          // be sure to add alpha\n          generatedColorEl.value = generatedColors[generatedIndex].rgbaValue;\n          generatedColorEl.setAttribute('coral-colorinput-generatedcolor', '');\n          colorEl.parentNode.insertBefore(generatedColorEl, colorEl.nextSibling);\n        }\n      }\n    }\n  }\n  \n  /** @ignore */\n  _syncColorPreviewIcon() {\n    const colorPreview = this._elements.colorPreview;\n    \n    colorPreview.icon = this.disabled && this.variant === variant.SWATCH ? 'lockClosed' : '';\n    colorPreview.iconSize = Icon.size.SMALL;\n  }\n  \n  /** @ignore */\n  _setActiveColor(color) {\n    // method used by subviews to set a color and trigger a change event if needed\n    const oldColor = this.valueAsColor ? this.valueAsColor : new Color();\n    this.valueAsColor = color;\n    \n    if (!oldColor.isSimilarTo(this.valueAsColor, false)) {\n      \n      // test if current color is invalid\n      this._validateInputValue();\n      \n      // trigger a change event (change events should only be triggered when an user interaction happened)\n      this.trigger('change');\n    }\n  }\n  \n  /** @ignore */\n  _selectColorInputColor(newColor) {\n    let selectColorInItems = true;\n    \n    if (this.selectedItem) {\n      const selectedColor = new Color();\n      selectedColor.value = this.selectedItem.value;\n      \n      // only select color if it is not already selected\n      selectColorInItems = !selectedColor.isSimilarTo(newColor, true);\n    }\n    \n    if (selectColorInItems) {\n      // select right color in this.items (if necessary and possible)\n      const selectedItem = this.selectedItem;\n      if (selectedItem) {\n        selectedItem.removeAttribute('selected');\n      }\n      \n      const colorElements = this.items.getAll();\n      const colorElementsCount = colorElements.length;\n      \n      let color = null;\n      for (let i = 0; i < colorElementsCount; i++) {\n        color = new Color();\n        color.value = colorElements[i].getAttribute('value');\n        \n        if (color.isSimilarTo(newColor, true)) {\n          colorElements[i].setAttribute('selected', '');\n          break;\n        }\n      }\n    }\n  }\n  \n  /** @private */\n  _setDefaultSelectedItem() {\n    const selectedItem = this.selectedItem;\n    const value = this.value;\n  \n    // Sync selectedItem if value is set\n    if (value && !selectedItem) {\n      const color = new Color();\n      color.value = value;\n      this._selectColorInputColor(color);\n    }\n    \n    // Also sync color preview\n    this._updateColorPreview();\n  }\n  \n  _updateColorPreview() {\n    const isValueEmpty = this.value === '';\n    \n    // update color preview\n    const currentColor = this.valueAsColor;\n    this._elements.colorPreview.style.backgroundColor = currentColor ? currentColor.rgbaValue : '';\n    this.classList.toggle('_coral-ColorInput--novalue', isValueEmpty);\n    \n    // Update preview in overlay\n    const preview = this._elements.overlay.querySelector('._coral-ColorInput-preview');\n    if (preview) {\n      preview.classList.toggle('_coral-ColorInput-preview--novalue', isValueEmpty);\n    }\n  }\n  \n  /**\n   Returns {@link ColorInput} variants.\n   \n   @return {ColorInputVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /**\n   Returns {@link ColorInput} auto generated colors options.\n   \n   @return {ColorInputAutoGenerateColorsEnum}\n   */\n  static get autoGenerateColors() { return autoGenerateColors; }\n  \n  /**\n   Returns {@link ColorInput} swatches display options.\n   \n   @return {ColorInputShowSwatchesEnum}\n   */\n  static get showSwatches() { return showSwatches; }\n  \n  /**\n   Returns {@link ColorInput} color properties display options.\n   \n   @return {ColorInputShowDefaultColorsEnum}\n   */\n  static get showDefaultColors() { return showDefaultColors; }\n  \n  /**\n   Returns {@link ColorInput} default colors display options.\n   \n   @return {ColorInputShowPropertiesEnum}\n   */\n  static get showProperties() { return showProperties; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'variant',\n      'autoGenerateColors',\n      'autogeneratecolors',\n      'showSwatches',\n      'showswatches',\n      'showProperties',\n      'showproperties',\n      'showDefaultColors',\n      'showdefaultcolors',\n      'placeholder'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n  \n    this.classList.add(CLASSNAME);\n  \n    this.setAttribute('role', 'combobox');\n    this.setAttribute('aria-expanded', false);\n    \n    const frag = document.createDocumentFragment();\n  \n    // Cannot be open by default when rendered\n    this._elements.overlay.removeAttribute('open');\n    \n    // Render template\n    frag.appendChild(this._elements.defaultPalette);\n    frag.appendChild(this._elements.input);\n    frag.appendChild(this._elements.buttonWrapper);\n    frag.appendChild(this._elements.overlay);\n    \n    // Support cloneNode\n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.ELEMENT_NODE && child.hasAttribute('handle')) {\n        this.removeChild(child);\n      }\n      else {\n        frag.appendChild(child);\n      }\n    }\n    \n    this.appendChild(frag);\n  \n    // Make sure colors are generated\n    this.autoGenerateColors = this.autoGenerateColors;\n    this.showDefaultColors = this.showDefaultColors;\n  \n    // Don't trigger events once connected\n    this._preventTriggeringEvents = true;\n    \n    // Make sure we don't have multiple items selected\n    this._validateSelection();\n  \n    // If value is set to default palette item value, we have to make sure it's selected\n    this._setDefaultSelectedItem();\n    \n    // We can trigger events gain\n    this._preventTriggeringEvents = false;\n  \n    this._oldSelection = this.selectedItem;\n    \n    // we use 'this' so properly aligns to the input\n    this._elements.overlay.target = this._elements.colorPreview;\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    \n    // In case it was moved out don't forget to remove it\n    if (!this.contains(this._elements.overlay)) {\n      this._elements.overlay.remove();\n    }\n  }\n}\n\nexport default ColorInput;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Color from './src/scripts/Color';\nimport ColorInput from './src/scripts/ColorInput';\nimport ColorInputItem from './src/scripts/ColorInputItem';\nimport ColorInputSwatches from './src/scripts/ColorInputSwatches';\nimport ColorInputSwatch from './src/scripts/ColorInputSwatch';\nimport ColorInputSlider from './src/scripts/ColorInputSlider';\nimport ColorInputColorProperties from './src/scripts/ColorInputColorProperties';\n\nimport translations from './i18n/translations.json';\nimport {strings, commons} from '../coralui-util';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-colorinput': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-colorinput', ColorInput);\nwindow.customElements.define('coral-colorinput-item', ColorInputItem);\nwindow.customElements.define('coral-colorinput-swatches', ColorInputSwatches);\nwindow.customElements.define('coral-colorinput-swatch', ColorInputSwatch);\nwindow.customElements.define('coral-colorinput-slider', ColorInputSlider);\nwindow.customElements.define('coral-colorinput-colorproperties', ColorInputColorProperties);\n\nColorInput.Item = ColorInputItem;\nColorInput.Swatches = ColorInputSwatches;\nColorInput.Swatch = ColorInputSwatch;\nColorInput.Slider = ColorInputSlider;\nColorInput.ColorProperties = ColorInputColorProperties;\n\nexport {Color, ColorInput};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {SelectableCollection} from '../../../coralui-collection';\n\n/**\n @class Coral.ColumnView.Collection\n @classdesc The ColumnView collection\n @extends {SelectableCollection}\n */\nclass ColumnViewCollection extends SelectableCollection {\n  _deselectAndDeactivateAllExcept(item) {\n    this\n      .getAll()\n      .forEach((el) => {\n        if (el.hasAttribute('selected') || el.hasAttribute('active')) {\n          el.removeAttribute('selected');\n          if (el !== item) {\n            el.removeAttribute('active');\n          }\n        }\n      });\n  }\n  \n  _deactivateAll() {\n    this._deselectAllExcept(null, 'active');\n  }\n  \n  _deactivateAllExceptFirst() {\n    this._deselectAllExceptFirst('active');\n  }\n  \n  _getAllActive() {\n    return this._getAllSelected('active');\n  }\n}\n\nexport default ColumnViewCollection;\n","/**\n Enumeration for {@link ColumnView} selection options.\n \n @typedef {Object} ColumnViewSelectionModeEnum\n \n @property {String} NONE\n None is default, selection of items does not happen based on click.\n @property {String} SINGLE\n Single selection mode, only one item per column can be selected.\n @property {String} MULTIPLE\n Multiple selection mode, multiple items per column can be selected.\n */\nconst selectionMode = {\n  NONE: 'none',\n  SINGLE: 'single',\n  MULTIPLE: 'multiple'\n};\n\nexport default selectionMode;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport ColumnViewCollection from './ColumnViewCollection';\nimport selectionMode from './selectionMode';\nimport {transform, validate, commons} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-MillerColumns';\n\nconst scrollTo = (element, to, duration, scrollCallback) => {\n  if (duration <= 0) {\n    return;\n  }\n  \n  const difference = to - element.scrollLeft;\n  const perTick = difference / duration * 10;\n  \n  window.setTimeout(() => {\n    element.scrollLeft = element.scrollLeft + perTick;\n    if (element.scrollLeft === to) {\n      if (scrollCallback) {\n        scrollCallback();\n      }\n    }\n    else {\n      scrollTo(element, to, duration - 10);\n    }\n  }, 10);\n};\n\n/**\n @class Coral.ColumnView\n @classdesc A ColumnView component to display and allow users to browse and select items in a dynamic tree structure\n (e.g. a filesystem or multi-level navigation).\n @htmltag coral-columnview\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ColumnView extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents({\n      // Prevents text selection while selecting multiple items\n      'global:keyup': '_onGlobalKeyUp',\n      'global:keydown': '_onGlobalKeyDown',\n  \n      'key:up': '_onKeyUp',\n      'key:down': '_onKeyDown',\n      'key:right': '_onKeyRight',\n      'key:left': '_onKeyLeft',\n      'key:shift+up': '_onKeyShiftAndUp',\n      'key:shift+down': '_onKeyShiftAndDown',\n      'key:space': '_onKeySpace',\n  \n      // column events\n      'coral-columnview-column:_loaditems': '_onColumnLoadItems',\n      'coral-columnview-column:_activeitemchanged': '_onColumnActiveItemChanged',\n      'coral-columnview-column:_selecteditemchanged': '_onColumnSelectedItemChanged'\n    });\n  \n    // Defaults\n    this._oldActiveItem = null;\n    this._oldSelection = [];\n    \n    // default value of inner flag to process events\n    this._bulkSelectionChange = false;\n  \n    // initializes the mutation observer that used to detect when new items are added or removed\n    this._observer = new MutationObserver(this._handleMutation.bind(this));\n    this._observer.observe(this, {\n      // only watch the childList, items will tell us if selected/value/content changes\n      childList: true\n    });\n  \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n    this.columns._startHandlingItems(true);\n  }\n  \n  /**\n   Collection that holds all the columns inside the ColumnView.\n   \n   @type {ColumnViewCollection}\n   @readonly\n   */\n  get columns() {\n    // constructs the collection on first request\n    if (!this._columns) {\n      this._columns = new ColumnViewCollection({\n        host: this,\n        itemTagName: 'coral-columnview-column'\n      });\n    }\n  \n    return this._columns;\n  }\n  \n  /**\n   Collection used to represent the coral-columnview-item across all columns.\n   \n   @type {ColumnViewCollection}\n   @readonly\n   \n   @private\n   */\n  get items() {\n    // constructs the collection on first request\n    if (!this._items) {\n      this._items = new ColumnViewCollection({\n        host: this,\n        itemTagName: 'coral-columnview-item'\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /**\n   Selection mode of the ColumnView. See {@link ColumnViewSelectionModeEnum}.\n   \n   @type {String}\n   @default ColumnViewSelectionModeEnum.NONE\n   @htmlattribute selectionmode\n   @htmlattributereflected\n   */\n  get selectionMode() {\n    return this._selectionMode || selectionMode.NONE;\n  }\n  set selectionMode(value) {\n    value = transform.string(value).toLowerCase();\n    this._selectionMode = validate.enumeration(selectionMode)(value) && value || selectionMode.NONE;\n    this._reflectAttribute('selectionmode', this._selectionMode);\n  \n    // propagates the selection mode to the columns\n    this.columns.getAll().forEach((item) => {\n      item.setAttribute('_selectionmode', this._selectionMode);\n    }, this);\n  \n    this.classList.remove(`${CLASSNAME}--selection`);\n  \n    if (this._selectionMode !== selectionMode.NONE) {\n      this.classList.add(`${CLASSNAME}--selection`);\n    }\n  \n    // @a11y\n    this.setAttribute('aria-multiselectable', this._selectionMode === selectionMode.MULTIPLE);\n  }\n  \n  /**\n   First selected item of the ColumnView.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.selectionMode !== selectionMode.NONE ? this.items._getFirstSelected() : null;\n  }\n  \n  /**\n   Array containing the set selected items. The items will match only one column since selection across columns is\n   not allowed.\n   \n   @type {Array.<HTMLElement>}\n   @readonly\n   */\n  get selectedItems() {\n    return this.selectionMode !== selectionMode.NONE ? this.items._getAllSelected() : [];\n  }\n  \n  /**\n   Active Item that corresponds to the last item in the path.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get activeItem() {\n    return this.items._getAllActive().pop() || null;\n  }\n  \n  /** @private */\n  _onColumnActiveItemChanged(event) {\n    // this is a private event and should not leave the column view\n    event.stopImmediatePropagation();\n    \n    // ignores event handling due to bulk select operation\n    if (this._bulkSelectionChange) {\n      return;\n    }\n    \n    const column = event.target;\n    \n    // clears the internal selection cursor\n    this._handleKeyboardMultiselect(null);\n    \n    this._bulkSelectionChange = true;\n    \n    if (!event.detail.activeItem) {\n      // all items to the right must be removed. we do this at the end to be able to extract the values before\n      // removing everything\n      this._afterItemSelectedInColumn(column);\n    }\n    else {\n      // when there is an active item, selection must not exist\n      this.items._deselectAllExcept();\n      \n      // we need to deactivate every item to the right of the new active item to keep a correct DOM representation\n      let nextColumn = column.nextElementSibling;\n      while (nextColumn) {\n        // We ignore preview columns\n        if (nextColumn.tagName === 'CORAL-COLUMNVIEW-COLUMN' && nextColumn.items) {\n          nextColumn.items._deactivateAll();\n        }\n        \n        nextColumn = nextColumn.nextElementSibling;\n      }\n    }\n    \n    this._bulkSelectionChange = false;\n    \n    // we trigger the appropiate events\n    this._validateColumnViewChange();\n  }\n  \n  /**\n   Requests external data to be loaded.\n   \n   @emits {coral-columnview:loaditems}\n   \n   @private\n   */\n  _onColumnLoadItems(event) {\n    // this is a private event and should not leave the column view\n    event.stopImmediatePropagation();\n    \n    // triggers an event to indicate more data could be loaded\n    this.trigger('coral-columnview:loaditems', {\n      column: event.target,\n      start: event.detail.start,\n      item: event.detail.item\n    });\n  }\n  \n  /** @private */\n  _onColumnSelectedItemChanged(event) {\n    // this is a private event and should not leave the column view\n    event.stopImmediatePropagation();\n    \n    // ignores event handling due to bulk select operation\n    if (this._bulkSelectionChange || this.selectionMode === selectionMode.NONE) {\n      return;\n    }\n    \n    this._bulkSelectionChange = true;\n    // we need to deselect any other selection that is not part of the same column\n    this._oldSelection.forEach((el) => {\n      if (event.detail.selection.indexOf(el) === -1) {\n        el.removeAttribute('selected');\n      }\n    });\n    this._bulkSelectionChange = false;\n    \n    // we trigger the appropiate events\n    this._validateColumnViewChange();\n  }\n  \n  /** @private */\n  _onGlobalKeyUp(event) {\n    // removes the class to stop selection\n    if (event.keyCode === 16) {\n      this.classList.remove('is-unselectable');\n    }\n  }\n  \n  /** @private */\n  _onGlobalKeyDown(event) {\n    // adds a class that prevents the text selection, otherwise shift + click would select the text\n    if (event.keyCode === 16) {\n      this.classList.add('is-unselectable');\n    }\n  }\n\n  /** @private */\n  _onKeyShiftAndUp(event) {\n    event.preventDefault();\n    \n    // using _oldSelection since it should be equivalent to this.items._getSelectedItems() but faster\n    const oldSelectedItems = this._oldSelection;\n    \n    this._isKeyBoardMultiselect = true;\n    \n    // first make sure to select the active item as we want to multiselect\n    if (oldSelectedItems.length === 0) {\n      const activeItem = this.activeItem;\n      \n      if (activeItem) {\n        activeItem.setAttribute('selected', '');\n      }\n    }\n    \n    // gets all the selected items of the active column. calling _getSelectedItems() will include the active item\n    // if it was selected\n    const selectedItems = this.items._getAllSelected();\n    // reference of the last selected item to know the direction of the selection while using the multiselection\n    const lastSelected = this._lastSelected;\n    \n    let selectedItem;\n    // when no previous selection is stored we need to initialize it with the current information\n    if (!lastSelected) {\n      selectedItem = selectedItems[0].previousElementSibling;\n      // selects the item\n      selectedItem.setAttribute('selected', '');\n    }\n    else if (lastSelected.item) {\n      selectedItem = lastSelected.item;\n      \n      // we have reached the upper selection limit\n      if (selectedItem.matches(':first-child')) {\n        this._isKeyBoardMultiselect = false;\n        return;\n      }\n      \n      if (!lastSelected.direction || lastSelected.direction === 'up') {\n        selectedItem = selectedItem.previousElementSibling;\n        selectedItem.setAttribute('selected', '');\n      }\n      else {\n        \n        if (selectedItem !== lastSelected.firstSelectedItem) {\n          selectedItem.removeAttribute('selected');\n        }\n        else {\n          // switches the direction if this was the last item selected\n          lastSelected.direction = 'up';\n        }\n        \n        selectedItem = selectedItem.previousElementSibling;\n        selectedItem.setAttribute('selected', '');\n      }\n    }\n    \n    // stores the reference and direction to be able to perform the multiple selection correctly\n    this._lastSelected = {\n      item: selectedItem,\n      direction: lastSelected && lastSelected.direction ? lastSelected.direction : 'up',\n      firstSelectedItem: lastSelected && lastSelected.firstSelectedItem ?\n        lastSelected.firstSelectedItem :\n        selectedItem.nextElementSibling\n    };\n    \n    this._isKeyBoardMultiselect = false;\n  }\n  \n  /** @private */\n  _onKeyShiftAndDown(event) {\n    event.preventDefault();\n    \n    // using _oldSelection since it should be equivalent to this.items._getSelectedItems() but faster\n    const oldSelectedItems = this._oldSelection;\n    \n    this._isKeyBoardMultiselect = true;\n    \n    // first make sure to select the active item as we want to multiselect\n    if (oldSelectedItems.length === 0) {\n      const activeItem = this.activeItem;\n      \n      if (activeItem) {\n        activeItem.setAttribute('selected', '');\n      }\n    }\n    \n    // gets all the selected items of the active column. calling _getSelectedItems() will include the active item\n    // if it was selected\n    const selectedItems = this.items._getAllSelected();\n    \n    // reference of the last selected item to know the direction of the selection while using the multiselection\n    const lastSelected = this._lastSelected;\n    \n    let selectedItem;\n    // when no previous selection is stored we need to initialize it with the current information\n    if (!lastSelected) {\n      selectedItem = selectedItems[selectedItems.length - 1].nextElementSibling;\n      // selects the item\n      selectedItem.setAttribute('selected', '');\n    }\n    else if (lastSelected.item) {\n      selectedItem = lastSelected.item;\n      \n      // we have reached the lower selection limit\n      if (selectedItem.matches(':last-child')) {\n        this._isKeyBoardMultiselect = false;\n        return;\n      }\n      \n      if (!lastSelected.direction || lastSelected.direction === 'down') {\n        selectedItem = selectedItem.nextElementSibling;\n        selectedItem.setAttribute('selected', '');\n      }\n      else {\n        if (selectedItem !== lastSelected.firstSelectedItem) {\n          selectedItem.removeAttribute('selected');\n        }\n        else {\n          // switches the direction if this was the last item selected\n          lastSelected.direction = 'down';\n        }\n        \n        selectedItem = selectedItem.nextElementSibling;\n        selectedItem.setAttribute('selected', '');\n      }\n    }\n    \n    // stores the reference and direction to be able to perform the multiple selection correctly\n    this._lastSelected = {\n      item: selectedItem,\n      direction: lastSelected && lastSelected.direction ? lastSelected.direction : 'down',\n      firstSelectedItem: lastSelected && lastSelected.firstSelectedItem ?\n        lastSelected.firstSelectedItem :\n        selectedItem.previousElementSibling\n    };\n    \n    this._isKeyBoardMultiselect = false;\n  }\n  \n  /** @private */\n  _onKeyUp(event) {\n    event.preventDefault();\n    \n    // selection will win over active buttons, because they are the right most item. using _oldSelection since it\n    // should be equivalent to this.items._getSelectedItems() but faster\n    const selectedItems = this._oldSelection;\n    \n    let item;\n    if (selectedItems.length !== 0) {\n      const selectedItem = selectedItems[0];\n      \n      item = selectedItem.previousElementSibling;\n      if (item) {\n        item = selectedItem;\n      }\n    }\n    // when there is no active item to select, we get the last item of the column. this way users can interact with\n    // the column view when there is nothing selected or activated\n    else if (this._oldActiveItem === null) {\n      item = this.items._getLastSelectable();\n    }\n    else {\n      item = this._oldActiveItem.previousElementSibling;\n    }\n    \n    // we use click instead of selected to force the deselection of the other items\n    item.click();\n  }\n  \n  /** @private */\n  _onKeyDown(event) {\n    event.preventDefault();\n    \n    // selection will win over active buttons, because they are the right most item. using _oldSelection since it\n    // should be equivalent to this.items._getSelectedItems() but faster\n    const selectedItems = this._oldSelection;\n    \n    let item;\n    if (selectedItems.length !== 0) {\n      const selectedItem = selectedItems[selectedItems.length - 1];\n      \n      item = selectedItem.nextElementSibling;\n      \n      // when\n      if (!item) {\n        item = selectedItem;\n      }\n    }\n    // when there is no active item to select, we get the first item of the column. this way users can interact with\n    // the column view when there is nothing selected or activated\n    else if (this._oldActiveItem === null) {\n      item = this.items._getFirstSelectable();\n    }\n    else {\n      item = this._oldActiveItem.nextElementSibling;\n    }\n    \n    // we use click instead of selected to force the deselection of the other items\n    item.click();\n  }\n  \n  /** @private */\n  _onKeyRight(event) {\n    event.preventDefault();\n    \n    const nextColumn = this.activeItem.closest('coral-columnview-column').nextElementSibling;\n    \n    if (nextColumn) {\n      nextColumn.items._getFirstSelectable().click();\n    }\n  }\n  \n  /** @private */\n  _onKeyLeft(event) {\n    event.preventDefault();\n    \n    // we can only navigate left when there is a column on the left side to navigate to\n    let previousColumn;\n    // using _oldSelection since it should be equivalent to this.items._getSelectedItems() but faster\n    const selectedItems = this._oldSelection;\n    \n    // when there is selection, we use the previous column as a reference\n    if (selectedItems.length !== 0) {\n      previousColumn = selectedItems[0].closest('coral-columnview-column').previousElementSibling;\n    }\n    // otherwise we use the activeItems as a reference\n    else {\n      previousColumn = this.activeItem.closest('coral-columnview-column').previousElementSibling;\n    }\n    \n    if (previousColumn) {\n      if (previousColumn.activeItem) {\n        // if there is an active item simply click it again\n        previousColumn.activeItem.click();\n      }\n      else {\n        // we need to find a candicate for activation\n        const firstSelectedItem = previousColumn.items._getFirstSelected();\n        \n        if (firstSelectedItem) {\n          firstSelectedItem.click();\n        }\n        else {\n          previousColumn.items._getFirstSelectable().click();\n        }\n      }\n    }\n  }\n  \n  /** @private */\n  _onKeySpace(event) {\n    event.preventDefault();\n    \n    // using _oldSelection since it should be equivalent to this.items._getSelectedItems() but faster\n    const selectedItems = this._oldSelection;\n    \n    // when there is a selection, we need to activate the first item of the selection\n    if (selectedItems.length !== 0) {\n      selectedItems[0].setAttribute('active', '');\n    }\n    else {\n      const activeItem = this.activeItem;\n      // toggles the selection between active and selected\n      if (activeItem) {\n        // select the item\n        activeItem.setAttribute('selected', '');\n      }\n    }\n  }\n  \n  /** @private */\n  _arraysAreDifferent(selection, oldSelection) {\n    let diff = [];\n    \n    if (oldSelection.length === selection.length) {\n      diff = oldSelection.filter((item) => selection.indexOf(item) === -1);\n    }\n    \n    // since we guarantee that they are arrays, we can start by comparing their size\n    return oldSelection.length !== selection.length || diff.length !== 0;\n  }\n  \n  /** @private */\n  _handleKeyboardMultiselect(newSelectedItem) {\n    if (!this._isKeyBoardMultiselect) {\n      this._lastSelected = undefined;\n      \n      // if there is a new selected item save this (but without direction info)\n      if (newSelectedItem) {\n        this._lastSelected = {\n          item: newSelectedItem,\n          direction: null,\n          firstSelectedItem: newSelectedItem\n        };\n      }\n    }\n  }\n  \n  /**\n   Scrolls the given {@link Coral.ColumnView.Column} into view.\n   \n   @param {HTMLElement} column\n   The column that needs to be scrolled into view.\n   @param {Boolean} clearEmptyColumns\n   Remove empty columns once animation is done.\n   @param {Boolean} triggerEvent\n   \n   @private\n   */\n  _scrollColumnIntoView(column, clearEmptyColumns, triggerEvent) {\n    // @todo: improve animation effect when key is kept press\n    let left = 0;\n    let duration;\n    \n    // we return if the column is not inside the current column view\n    if (!this.contains(column)) {\n      return;\n    }\n    \n    // make sure to clear columns next to this column if animation is done\n    const self = this;\n    const completeCallback = function() {\n      if (clearEmptyColumns) {\n        self._removeEmptyColumnsWithSmoothTransition(triggerEvent);\n      }\n    };\n    \n    // scroll right to the given column\n    if (column.getBoundingClientRect().left + column.offsetWidth >= this.offsetWidth) {\n      let next = column.nextElementSibling;\n      while (next) {\n        next.parentNode.removeChild(next);\n        next = column.nextElementSibling;\n      }\n      \n      left = this.scrollWidth - this.offsetWidth;\n      duration = left - this.scrollLeft;\n      scrollTo(this, left, duration, completeCallback);\n    }\n    else if (clearEmptyColumns) {\n      this._removeEmptyColumnsWithSmoothTransition(triggerEvent);\n    }\n  }\n  \n  /**\n   Handling of the column view after selecting an item.\n   \n   @param {HTMLElement} column\n   \n   @private\n   */\n  _afterItemSelectedInColumn(column) {\n    // @todo: emptying the columns allows them to be queried\n    this._emptyColumnsNextToColumn(column);\n    this._scrollColumnIntoView(column, true, true);\n  }\n  \n  /**\n   Empties all the columns to the right of the provided column.\n   \n   @param {HTMLElement} column\n   \n   @private\n   */\n  _emptyColumnsNextToColumn(column) {\n    if (column !== null) {\n      let next = column.nextElementSibling;\n      while (next && next.innerHTML.length) {\n        next.innerHTML = '';\n        next = next.nextElementSibling;\n      }\n    }\n  }\n  \n  /**\n   Remove all empty columns with a smooth transition. Optionally the navigate event is triggered when all the extra\n   columns are removed from the DOM.\n   \n   @param {Boolean} triggerEvent\n   Whether the navigate event must be triggered.\n   \n   @private\n   */\n  _removeEmptyColumnsWithSmoothTransition(triggerEvent) {\n    const self = this;\n    \n    // fade width of empty items to 0 before removing the columns (for better usability while navigating)\n    const emptyColumns = Array.prototype.filter.call(this.querySelectorAll('coral-columnview-column, coral-columnview-preview'), el => !el.firstChild);\n    \n    emptyColumns.forEach((column, i) => {\n      column.style.visibility = 'hidden';\n      column.classList.add('is-collapsing');\n      commons.transitionEnd(column, () => {\n        column.remove();\n        if (i === emptyColumns.length - 1 && triggerEvent) {\n          self._validateNavigation(self.columns.last());\n        }\n      });\n      column.style.width = 0;\n    });\n  }\n  \n  /** @private */\n  _triggerCollectionEvents(addedNodes, removedNodes) {\n    let item;\n    const addedNodesCount = addedNodes.length;\n    for (let i = 0; i < addedNodesCount; i++) {\n      item = addedNodes[i];\n      if (item.tagName === 'CORAL-COLUMNVIEW-COLUMN') {\n        // we use the property since the item may not be ready\n        item.setAttribute('_selectionmode', this.selectionMode);\n        this.trigger('coral-collection:add', {item});\n      }\n    }\n    \n    // @todo: check if special handling is needed when selected column is removed\n    const removedNodesCount = removedNodes.length;\n    for (let j = 0; j < removedNodesCount; j++) {\n      item = removedNodes[j];\n      // @todo: should I handle it specially if it was selected? should a selection and active event be triggered?\n      if (item.tagName === 'CORAL-COLUMNVIEW-COLUMN') {\n        this.trigger('coral-collection:remove', {item});\n      }\n    }\n  }\n  \n  /** @private */\n  _setStateFromDOM() {\n    // @todo: should I trigger change events?\n    // initial state of the columnview\n    this._oldActiveItem = this.activeItem;\n    this._oldSelection = this.selectedItems;\n  }\n  \n  /** @private */\n  _handleMutation(mutations) {\n    const mutationsCount = mutations.length;\n    for (let i = 0; i < mutationsCount; i++) {\n      const mutation = mutations[i];\n      \n      // we handle the collection events\n      this._triggerCollectionEvents(mutation.addedNodes, mutation.removedNodes);\n    }\n    \n    // sets the internal state based on the existing columns\n    this._setStateFromDOM();\n  }\n  \n  /**\n   Determines if something of the internal state of the component has changed. Active item event is always triggered\n   first and then the selection event.\n   \n   @private\n   */\n  _validateColumnViewChange() {\n    // we evaluate first the active event since we always need to trigger active first and then selection\n    const activeItem = this.activeItem;\n    const oldActiveItem = this._oldActiveItem;\n    \n    // same column events are only triggered if the active item changed, otherwise they are ignored\n    if (activeItem !== oldActiveItem) {\n      this.trigger('coral-columnview:activeitemchange', {activeItem, oldActiveItem});\n      \n      // we cache the old active item to be able to report correct change events\n      this._oldActiveItem = activeItem;\n    }\n    \n    // when there is no selection we avoid triggering any change event but we do not stop items from having the\n    // selected attribute\n    if (this.selectionMode === selectionMode.NONE) {\n      return;\n    }\n    \n    const newSelection = this.selectedItems;\n    const oldSelection = this._oldSelection || [];\n    \n    // use first newly selected item for new selection\n    const newSelectedItems = newSelection.filter((item) => oldSelection.indexOf(item) === -1);\n    this._handleKeyboardMultiselect(newSelectedItems.length > 0 ? newSelectedItems[0] : null);\n    \n    if (this._arraysAreDifferent(newSelection, oldSelection)) {\n      this.trigger('coral-columnview:change', {\n        selection: newSelection,\n        oldSelection: oldSelection\n      });\n      \n      // changes the old selection array since we selected something new\n      this._oldSelection = newSelection;\n    }\n  }\n  \n  /**\n   Triggers the navigation event. Navigation would happen when a) a new column is added, and it is ready to be\n   used or b) columns are removed and the active changed. In case the column is actually a preview column, the event\n   will only be triggered when there is no selection (meanning a real navigation was performed).\n   \n   @param {HTMLElement} column\n   Last column of the ColumnView.\n   \n   @emits {coral-columnview:navigate}\n   \n   @private\n   */\n  _validateNavigation(column) {\n    // we use _oldSelection because it is faster\n    if (column.tagName === 'CORAL-COLUMNVIEW-PREVIEW' && this._oldSelection.length !== 0) {\n      return;\n    }\n    \n    this.trigger('coral-columnview:navigate', {\n      activeItem: this.activeItem,\n      column: column\n    });\n  }\n  \n  /** @ignore */\n  focus() {\n    // selected items go first because there is no active item in a column with selection\n    const item = this.selectedItems[0] || this.activeItem;\n    if (item) {\n      item.focus();\n    }\n  }\n  \n  /**\n   Sets the next column given a reference column. This will handle cleaning the DOM and removing any columns as\n   required.\n   \n   @param {HTMLElement} newColumn\n   The new column to add to the column view. It will be placed next to the <code>referenceColumn</code> if\n   provided.\n   @param {HTMLElement} referenceColumn\n   The column that will be used as a reference to place the new column. This column needs to be already inside the\n   DOM.\n   @param {Boolean} [scrollToColumn = true]\n   Whether the columnview show scroll to have the <code>newColumn</code> visible.\n   \n   @emits {coral-columnview:navigate}\n   */\n  setNextColumn(newColumn, referenceColumn, scrollToColumn) {\n    scrollToColumn = typeof scrollToColumn === 'undefined' || scrollToColumn;\n    \n    const column = referenceColumn || null;\n    \n    // handles the case where the first column needs to be added\n    if (column === null || !this.contains(column)) {\n      this.appendChild(newColumn);\n    }\n    else {\n      const nextColumn = column.nextElementSibling;\n      \n      if (nextColumn) {\n        this._emptyColumnsNextToColumn(column);\n        const before = nextColumn.nextElementSibling;\n        this.removeChild(nextColumn);\n        this.insertBefore(newColumn, before);\n      }\n      else {\n        this.appendChild(newColumn);\n      }\n    }\n    \n    if (scrollToColumn) {\n      // event is not triggered because it is handled separately\n      this._scrollColumnIntoView(newColumn, true, false);\n    }\n    \n    // we notify that the columnview navigated and it is ready to be used\n    this._validateNavigation(newColumn);\n  }\n  \n  /**\n   Returns {@link ColumnView} selection options.\n   \n   @return {ColumnViewSelectionModeEnum}\n   */\n  static get selectionMode() { return selectionMode; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return [\n      'selectionmode',\n      'selectionMode'\n    ];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // @a11y: the columnview needs to be focusable to handle a11y properly\n    this.setAttribute('tabindex', '0');\n    \n    // Default reflect attributes\n    if (!this._selectionMode) { this._selectionMode = selectionMode.NONE; }\n  \n    // no need to wait for the mutation observers\n    this._setStateFromDOM();\n  }\n  \n  /**\n   Triggered when additional items can be loaded into the {@link ColumnView}. This will happen when the current column can\n   still hold more items, when the user scrolls down the current column or when a new column needs to be loaded. If\n   <code>preventDefault()</code> is called, then a loading indicator will be shown.\n   {@link ColumnViewColumn#loading} should be set to false to indicate that the data has been successfully\n   loaded.\n   \n   @typedef {CustomEvent} coral-columnview:loaditems\n   \n   @property {ColumnViewColumn} detail.column\n   The column that is requesting more items. While doing pagination, it will become the target of the loaded items.\n   @property {Number} detail.start\n   Indicates the current amount of items in the <code>column</code> to do pagination. If <code>item</code> is\n   available, start will be 0 to denote that the column should be loaded from the start.\n   @property {ColumnViewItem} detail.item\n   The item that initialized the load. If item is provided, it means that a new column needs to be added after\n   the load is performed. In this scenario, <code>column</code> will be refer to the column that holds the item.\n   */\n  \n  /**\n   Triggered when the selection inside the {@link ColumnViewColumn} changes. In case both the selection and the active item change,\n   the <code>coral-columnview:activeitemchange</code> will be triggered first.\n   \n   @typedef {CustomEvent} coral-columnview:change\n   \n   @property {ColumnViewColumn} detail.column\n   The column whose selection changed.\n   @property {ColumnViewItem|Array.<ColumnViewItem>} detail.selection\n   The new selection of the Column.\n   @property {ColumnViewItem|Array.<ColumnViewItem>} detail.oldSelection\n   The old selection of the Column.\n   */\n  \n  /**\n   Triggered when the active item of the {@link ColumnViewColumn} changes.\n   \n   @typedef {CustomEvent} coral-columnview:activeitemchange\n   \n   @property {ColumnViewColumn} detail.column\n   The column whose active item has changed.\n   @property {ColumnViewItem} detail.activeItem\n   The currently active item of the column.\n   @property {ColumnViewItem} detail.oldActiveItem\n   The item of the column that was active before.\n   */\n  \n  /**\n   Triggered when the {@link ColumnView} navigation is complete and the new columns are ready.\n   \n   @typedef {CustomEvent} coral-columnview:navigate\n   \n   @property {ColumnViewColumn} detail.column\n   The last Column of the ColumnView that is used to determine the path. If the navigate was triggered because a\n   new {@link ColumnViewColumn} was added, then it will match that column. In case the path was\n   reduced, the column will match the last column.\n   @property {ColumnViewItem} detail.activeItem\n   The currently active item of the ColumnView.\n   */\n}\n\nexport default ColumnView;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport ColumnViewCollection from './ColumnViewCollection';\nimport selectionMode from './selectionMode';\nimport {transform, validate} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-MillerColumn';\n\n/**\n The number of milliseconds for which scroll events should be debounced.\n \n @type {Number}\n @ignore\n */\nconst SCROLL_DEBOUNCE = 100;\n\n/**\n Height if every item to avoid using offsetHeight during calculations.\n \n @ignore\n */\nconst ITEM_HEIGHT = 40;\n\n/**\n @class Coral.ColumnView.Column\n @classdesc A ColumnView Column component\n @htmltag coral-columnview-column\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ColumnViewColumn extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents({\n      // we need to use capture as scroll events do not bubble\n      'capture:scroll coral-columnview-column-content': '_onContentScroll',\n      'click coral-columnview-column-content': '_onColumnContentClick',\n  \n      // item interaction\n      'click coral-columnview-item': '_onItemClick',\n      'click [coral-columnview-itemselect]': '_onItemSelectClick',\n  \n      // item events\n      'coral-columnview-item:_activechanged coral-columnview-item': '_onItemActiveChange',\n      'coral-columnview-item:_selectedchanged coral-columnview-item': '_onItemSelectedChange'\n    });\n    \n    // Content zone\n    this._elements = {\n      content: this.querySelector('coral-columnview-column-content') || document.createElement('coral-columnview-column-content')\n    };\n  \n    // default values\n    this._bulkSelectionChange = false;\n    this._oldSelection = [];\n    this._oldActiveItem = null;\n  \n    // cache bound event handler functions\n    this._onDebouncedScroll = this._onDebouncedScroll.bind(this);\n    this._toggleItemSelection = this._toggleItemSelection.bind(this);\n  \n    this._observer = new MutationObserver(this._handleMutation.bind(this));\n    // items outside the scroll area are not supported\n    this._observer.observe(this._elements.content, {\n      // only watch the childList, items will tell us if selected/value/content changes\n      childList: true\n    });\n  \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The current active item.\n   \n   @type {HTMLElement}\n   @readonly\n   @default null\n   */\n  get activeItem() {\n    return this.items._getAllActive()[0] || null;\n  }\n  \n  /**\n   The content of the column. This container is where the items should be added and is responsible for handling the\n   scrolling.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-columnview-column-content',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {ColumnViewCollection}\n   @readonly\n   */\n  get items() {\n    // we do lazy initialization of the collection\n    if (!this._items) {\n      this._items = new ColumnViewCollection({\n        host: this,\n        container: this._elements.content,\n        itemTagName: 'coral-columnview-item',\n        onItemAdded: this._toggleItemSelection\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /**\n   Returns the first selected item in the ColumnView. The value <code>null</code> is returned if no element is\n   selected.\n   \n   @type {?HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this._selectionMode !== selectionMode.NONE ? this.items._getFirstSelected() : null;\n  }\n  \n  /**\n   Returns an Array containing the set selected items inside this Column.\n   \n   @type {Array.<HTMLElement>}\n   @readonly\n   */\n  get selectedItems() {\n    return this._selectionMode !== selectionMode.NONE ? this.items._getAllSelected() : [];\n  }\n  \n  /**\n   Private property that indicates the selection mode. If the <code>Coral.ColumnView.Column</code> is not inside\n   a <code>Coral.ColumnView</code> this value will be <code>undefined</code>.\n   See {@link ColumnViewSelectionModeEnum}.\n   \n   @type {String}\n   @htmlattribute selectionmode\n   @htmlattributereflected\n   @private\n   */\n  get _selectionMode() {\n    return this.__selectionMode;\n  }\n  set _selectionMode(value) {\n    value = transform.string(value).toLowerCase();\n    this.__selectionMode = validate.enumeration(selectionMode)(value) && value || null;\n    this._reflectAttribute('selectionmode', this.__selectionMode);\n  \n    this.items.getAll().forEach(item => this._toggleItemSelection(item));\n    \n    this._setStateFromDOM();\n  }\n  \n  /**\n   Returns an Array containing the last selected items inside this Column in selected order.\n   \n   @type {Array.<HTMLElement>}\n   @private\n   */\n  get _lastSelectedItems() {\n    return this.__lastSelectedItems || this.selectedItems;\n  }\n  set _lastSelectedItems(value) {\n    this.__lastSelectedItems = value;\n  }\n  \n  /** @private */\n  _onItemClick(event) {\n    // since transform will kill the modification, we trigger the event manually\n    if (event.matchedTarget.hasAttribute('active')) {\n      // directly calls the event since setting the attribute will not trigger an event\n      this._onItemActiveChange(event);\n    }\n    else {\n      // sets the item as active. while handling mouse interaction, items are not toggled\n      event.matchedTarget.active = true;\n    }\n  }\n  \n  _toggleItemSelection(item) {\n    item[this._selectionMode !== selectionMode.NONE ? 'setAttribute' : 'removeAttribute']('_selectable', '');\n  }\n  \n  /** @private */\n  _onItemSelectClick(event) {\n    if (this._selectionMode && this._selectionMode !== selectionMode.NONE) {\n      // stops propagation so that active is not called as well\n      event.stopPropagation();\n      \n      const item = event.matchedTarget.parentElement;\n      \n      // toggles the selection of the item\n      const isSelected = item.hasAttribute('selected');\n      \n      if (!isSelected) {\n        if (this._selectionMode === selectionMode.SINGLE) {\n          item.setAttribute('active', '');\n        }\n        // Handle multi-selection with shiftKey\n        else if (event.shiftKey && this._selectionMode === selectionMode.MULTIPLE) {\n          const lastSelectedItem = this._lastSelectedItems[this._lastSelectedItems.length - 1];\n    \n          if (lastSelectedItem) {\n            const items = this.items.getAll();\n            const lastSelectedItemIndex = items.indexOf(lastSelectedItem);\n            const selectedItemIndex = items.indexOf(item);\n      \n            // true : selection goes up, false : selection goes down\n            const direction = selectedItemIndex < lastSelectedItemIndex;\n            const selectionRange = [];\n            let selectionIndex = lastSelectedItemIndex;\n      \n            // Retrieve all items in the range\n            while (selectedItemIndex !== selectionIndex) {\n              selectionIndex = direction ? selectionIndex - 1 : selectionIndex + 1;\n              selectionRange.push(items[selectionIndex]);\n            }\n      \n            // Select all items in the range silently\n            selectionRange.forEach((rangeItem) => {\n              // Except for item which is needed to trigger the selection change event\n              if (rangeItem !== item) {\n                rangeItem.set('selected', true, true);\n              }\n            });\n          }\n        }\n      }\n      \n      if (!isSelected && this._selectionMode === selectionMode.SINGLE) {\n        item.setAttribute('active', '');\n      }\n      \n      item[isSelected ? 'removeAttribute' : 'setAttribute']('selected', '');\n    }\n  }\n  \n  /**\n   Handles the item activation, this causes the current item to get active and sets the next column to the item's\n   src.\n   \n   @private\n   */\n  _onItemActiveChange(event) {\n    // we stop propagation since it is a private event\n    event.stopImmediatePropagation();\n    \n    // ignores event handling due to bulk select operation\n    if (this._bulkSelectionChange) {\n      return;\n    }\n    \n    const item = event.matchedTarget;\n    \n    this._bulkSelectionChange = true;\n    // clears the selection and keeps the item active. this force only 1 item to be active per column\n    this.items._deselectAndDeactivateAllExcept(item);\n    this._bulkSelectionChange = false;\n    \n    // we check if the selection requires an event to be triggered\n    this._validateColumnChange(item);\n    \n    // loads data using the item as the activator and 0 as the start since it is a new column\n    this._loadItems(0, item);\n  }\n  \n  /**\n   Handles selecting multiple items in the same column. Selection could result in none, a single or multiple selected\n   items.\n   \n   @private\n   */\n  _onItemSelectedChange(event) {\n    // we stop propagation since it is a private event\n    event.stopImmediatePropagation();\n    \n    // item that was selected\n    const item = event.target;\n    const isSelected = item.selected;\n  \n    if (isSelected) {\n      // Remember the last selected item\n      this._lastSelectedItems.push(item);\n    }\n    else {\n      const removedItemIndex = this._lastSelectedItems.indexOf(item);\n      if (removedItemIndex !== -1) {\n        this._lastSelectedItems = this._lastSelectedItems.splice(removedItemIndex, 1);\n      }\n    }\n    \n    // ignores event handling due to bulk select operation\n    if (this._bulkSelectionChange) {\n      return;\n    }\n    \n    // when the item is selected, we need to enforce the selection mode\n    if (isSelected) {\n      this._bulkSelectionChange = true;\n      // when there is selection, no item can be active\n      this.items._deactivateAll();\n      \n      // enforces the selection mode\n      if (this._selectionMode === selectionMode.SINGLE) {\n        this.items._deselectAllExcept(item);\n      }\n      this._bulkSelectionChange = false;\n    }\n    \n    // we make sure the change event is triggered before the load event.\n    this._validateColumnChange();\n  }\n  \n  /** @ignore */\n  _tryToLoadAdditionalItems() {\n    // makes sure that not too many events are triggered (only one per frame)\n    if (this._bulkCollectionChange) {\n      return;\n    }\n    \n    this._bulkCollectionChange = true;\n    \n    const self = this;\n    // we use setTimeout instead of nextFrame because macrotasks allow for more flexibility since they are less\n    // aggressive in executing the code\n    window.setTimeout(() => {\n      // trigger 'coral-columnview:loaditems' asynchronously in order to be sure the application is done\n      // adding/removing elements. Also make sure that only one event is triggered at once\n      \n      // bulkCollectionChange has to be reset before loading new items\n      self._bulkCollectionChange = false;\n      self._loadFittingAdditionalItems();\n    }, 0);\n  }\n  \n  /** @private */\n  _onContentScroll() {\n    window.clearTimeout(this._scrollTimeout);\n    this._scrollTimeout = window.setTimeout(this._onDebouncedScroll, SCROLL_DEBOUNCE);\n  }\n  \n  /**\n   Handles the column click. When the column body is clicked, we need to deselect everything up to that column.\n   \n   @private\n   */\n  _onColumnContentClick(event) {\n    // we make sure the content was clicked directly and not an item\n    if (event.target !== event.matchedTarget) {\n      return;\n    }\n    \n    event.preventDefault();\n    \n    // ignores event handling due to bulk select operation\n    if (this._bulkSelectionChange) {\n      return false;\n    }\n    \n    this._bulkSelectionChange = true;\n    // clears the current column\n    this.items._deselectAndDeactivateAllExcept();\n    this._bulkSelectionChange = false;\n    \n    // we check if the selection requires an event to be triggered\n    this._validateColumnChange();\n  }\n  \n  /** @private */\n  _onDebouncedScroll() {\n    const threshold = 20;\n    if (this.content.scrollTop + this.offsetHeight >= this.content.scrollHeight - threshold) {\n      this._loadItems(this.items.length, undefined);\n    }\n  }\n  \n  /** @private */\n  _arraysAreDifferent(selection, oldSelection) {\n    let diff = [];\n    \n    if (oldSelection.length === selection.length) {\n      diff = oldSelection.filter((item) => selection.indexOf(item) === -1);\n    }\n    \n    // since we guarantee that they are arrays, we can start by comparing their size\n    return oldSelection.length !== selection.length || diff.length !== 0;\n  }\n  \n  /** @private */\n  _validateColumnChange(item) {\n    const newActiveItem = this.activeItem;\n    const oldActiveItem = this._oldActiveItem || null;\n    \n    // we have to force the event in case the same active item was clicked again, but still try to avoid triggering as\n    // less events as possible\n    if (newActiveItem !== oldActiveItem || item === newActiveItem) {\n      this.trigger('coral-columnview-column:_activeitemchanged', {\n        activeItem: newActiveItem,\n        oldActiveItem: oldActiveItem\n      });\n      \n      // we cache the active item for the next time\n      this._oldActiveItem = newActiveItem;\n    }\n    \n    const newSelection = this.selectedItems;\n    const oldSelection = this._oldSelection;\n    \n    if (this._arraysAreDifferent(newSelection, oldSelection)) {\n      this.trigger('coral-columnview-column:_selecteditemchanged', {\n        selection: newSelection,\n        oldSelection: oldSelection\n      });\n      \n      // changes the old selection array since we selected something new\n      this._oldSelection = newSelection;\n    }\n  }\n  \n  /**\n   Loads additional Items if the current items of the column to not exceed its height and a path this.next is given.\n   \n   @private\n   */\n  _loadFittingAdditionalItems() {\n    const itemsCount = this.items.length;\n    // this value must match $columnview-item-height\n    const itemsHeight = itemsCount * ITEM_HEIGHT;\n    \n    // we request more items if there is still space for them. in case the values are the same, we request more data\n    // just to be sure, specially when the value is 0\n    if (itemsHeight <= this.offsetHeight) {\n      this._loadItems(itemsCount, undefined);\n    }\n  }\n  \n  /**\n   Loads additional items. If the given item is not <code>active</code>, no data will be requested.\n   \n   @param {Number} count\n   Amount of items in the column.\n   @param {?HTMLElement} item\n   Item that triggered the load.\n   \n   @private\n   */\n  _loadItems(count, item) {\n    // if the given item is not active, it should not request data\n    if (!item || item.hasAttribute('active')) {\n      this.trigger('coral-columnview-column:_loaditems', {\n        start: count,\n        item: item\n      });\n    }\n  }\n  \n  /**\n   Updates the active and selected options from the DOM.\n   \n   @ignore\n   */\n  _setStateFromDOM() {\n    // if the selection mode has not been set, we do no try to force selection\n    if (this._selectionMode) {\n      // single: only the last item is selected\n      if (this._selectionMode === selectionMode.SINGLE) {\n        this.items._deselectAllExceptLast();\n      }\n      // none: deselects everything\n      else if (this._selectionMode === selectionMode.NONE) {\n        this.items._deselectAllExcept();\n      }\n      \n      // makes sure only one item is active\n      this.items._deactivateAllExceptFirst();\n    }\n  }\n  \n  /** @private */\n  _handleMutation(mutations) {\n    const mutationsCount = mutations.length;\n    for (let i = 0; i < mutationsCount; i++) {\n      const mutation = mutations[i];\n      // we handle the collection events\n      this._triggerCollectionEvents(mutation.addedNodes, mutation.removedNodes);\n    }\n    \n    this._setStateFromDOM();\n    \n    // in case items were added removed and selection changed\n    this._validateColumnChange();\n    \n    // checks if more items can be added after the childlist change\n    this._tryToLoadAdditionalItems();\n  }\n  \n  /** @private */\n  _triggerCollectionEvents(addedNodes, removedNodes) {\n    let item;\n    const addedNodesCount = addedNodes.length;\n    for (let i = 0; i < addedNodesCount; i++) {\n      item = addedNodes[i];\n      if (item.tagName === 'CORAL-COLUMNVIEW-ITEM') {\n        this.trigger('coral-collection:add', {item});\n      }\n    }\n    \n    const removedNodesCount = removedNodes.length;\n    for (let j = 0; j < removedNodesCount; j++) {\n      item = removedNodes[j];\n      if (item.tagName === 'CORAL-COLUMNVIEW-ITEM') {\n        this.trigger('coral-collection:remove', {item});\n      }\n    }\n  }\n  \n  get _contentZones() { return {'coral-columnview-column-content': 'content'}; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return [\n      '_selectionmode',\n      '_selectionMode'\n    ];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // @a11y\n    this.setAttribute('role', 'group');\n  \n    // @todo: initial collection items needs to be triggered\n  \n    const content = this._elements.content;\n    \n    // when the content zone was not created, we need to make sure that everything is added inside it as a content.\n    // this stops the content zone from being voracious\n    if (!content.parentNode) {\n      // move the contents of the item into the content zone\n      while (this.firstChild) {\n        content.appendChild(this.firstChild);\n      }\n    }\n    \n    // Call content zone insert\n    this.content = content;\n  \n    // handles the initial selection\n    this._setStateFromDOM();\n  \n    // we keep a list of the last selection to determine if something changed. we need to do this after\n    // validateSelection since it modifies the initial state based on the option\n    this._oldSelection = this.selectedItems;\n    this._oldActiveItem = this.activeItem;\n    \n    // instead of being super aggressive on requesting data, we use setTimeout so it is scheduled after all the code\n    // has been executed (macrotask), this way events can be added before\n    const self = this;\n    window.setTimeout(() => {\n      self._loadFittingAdditionalItems();\n    });\n  }\n}\n\nexport default ColumnViewColumn;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.ColumnView.Column.Content\n @classdesc ColumnView's Column content component\n @htmltag coral-columnview-column-content\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-columnview-column-content');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {Icon} from '../../../coralui-component-icon';\nimport {Checkbox} from '../../../coralui-component-checkbox';\nimport {transform, validate} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-MillerColumn-item';\n\n/**\n Enumeration for {@link ColumnViewItem} variants.\n \n @typedef {Object} ColumnViewItemVariantEnum\n \n @property {String} DEFAULT\n Default item variant. Contains no special decorations.\n @property {String} DRILLDOWN\n An item with a right arrow indicating that the navigation will go one level down.\n */\nconst variant = {\n  DEFAULT: 'default',\n  DRILLDOWN: 'drilldown'\n};\n\n/**\n @class Coral.ColumnView.Item\n @classdesc A ColumnView Item component\n @htmltag coral-columnview-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ColumnViewItem extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Content zone\n    this._elements = {\n      content: this.querySelector('coral-columnview-item-content') || document.createElement('coral-columnview-item-content'),\n      thumbnail: this.querySelector('coral-columnview-item-thumbnail') || document.createElement('coral-columnview-item-thumbnail')\n    };\n  }\n  \n  /**\n   The content of the item.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-columnview-item-content',\n      insert: function(content) {\n        // Insert before chevron\n        this.insertBefore(content, this.querySelector('._coral-MillerColumn-childIndicator'));\n      }\n    });\n  }\n  \n  /**\n   The thumbnail of the item. It is used to hold an icon or an image.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get thumbnail() {\n    return this._getContentZone(this._elements.thumbnail);\n  }\n  set thumbnail(value) {\n    this._setContentZone('thumbnail', value, {\n      handle: 'thumbnail',\n      tagName: 'coral-columnview-item-thumbnail',\n      insert: function(thumbnail) {\n        // Insert before content\n        this.insertBefore(thumbnail, this.content || null);\n      }\n    });\n  }\n  \n  /**\n   The item's variant. See {@link ColumnViewItemVariantEnum}.\n   \n   @type {String}\n   @default ColumnViewItemVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration('variant', value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n  \n    if (this._variant === variant.DRILLDOWN) {\n      // Render chevron on demand\n      const childIndicator = this.querySelector('._coral-MillerColumn-childIndicator');\n      if (!childIndicator) {\n        this.insertAdjacentHTML('beforeend', Icon._renderSVG('spectrum-css-icon-MillerColumnRightChevron', ['_coral-MillerColumn-childIndicator']));\n      }\n      \n      this.classList.add('is-branch');\n    }\n    else {\n      this.classList.remove('is-branch');\n    }\n  }\n  \n  /**\n   Specifies the icon that will be placed inside the thumbnail. The size of the icon is always controlled by the\n   component.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   @htmlattributereflected\n   */\n  get icon() {\n    return this._icon || '';\n  }\n  set icon(value) {\n    this._icon = transform.string(value);\n    this._reflectAttribute('icon', this._icon);\n  \n    // ignored if it is an empty string\n    if (this._icon) {\n      // creates a new icon element\n      if (!this._elements.icon) {\n        this._elements.icon = new Icon();\n      }\n    \n      this._elements.icon.icon = this.icon;\n      this._elements.icon.size = Icon.size.SMALL;\n    \n      // removes all the items, since the icon attribute has precedence\n      this._elements.thumbnail.innerHTML = '';\n    \n      // adds the newly created icon\n      this._elements.thumbnail.appendChild(this._elements.icon);\n    }\n  }\n  \n  /**\n   Whether the item is selected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n  \n    this.classList.toggle('is-selected', this._selected);\n    this.setAttribute('aria-selected', this._selected || this.active);\n  \n    // Sync checkbox item selector\n    const itemSelector = this.querySelector('coral-checkbox[coral-columnview-itemselect]');\n    if (itemSelector) {\n      itemSelector[this._selected ? 'setAttribute' : 'removeAttribute']('checked', '');\n    }\n    \n    this.trigger('coral-columnview-item:_selectedchanged');\n  }\n  \n  /**\n   Whether the item is active.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribut active\n   @htmlattributereflected\n   */\n  get active() {\n    return this._active || false;\n  }\n  set active(value) {\n    this._active = transform.booleanAttr(value);\n    this._reflectAttribute('active', this._active);\n  \n    this.classList.toggle('is-navigated', this._active);\n    this.setAttribute('aria-selected', this._active || this.selected);\n    \n    this.trigger('coral-columnview-item:_activechanged');\n  }\n  \n  get _contentZones() {\n    return {\n      'coral-columnview-item-content': 'content',\n      'coral-columnview-item-thumbnail': 'thumbnail'\n    };\n  }\n  \n  /** @ignore */\n  attributeChangedCallback(name, oldValue, value) {\n    if (name === '_selectable') {\n      // Disable selection\n      if (value === null) {\n        this.classList.remove('is-branch-selectable');\n      }\n      // Enable selection\n      else {\n        this.classList.add('is-branch-selectable');\n        let itemSelector = this.querySelector('[coral-columnview-itemselect]');\n  \n        // Render checkbox on demand\n        if (!itemSelector) {\n          itemSelector = new Checkbox();\n          itemSelector.setAttribute('coral-columnview-itemselect', '');\n      \n          // Add the item selector as first child\n          this.insertBefore(itemSelector, this.firstChild);\n        }\n      }\n    }\n    else {\n      super.attributeChangedCallback(name, oldValue, value);\n    }\n  }\n  \n  /**\n   Returns {@link ColumnViewItem} variants.\n   \n   @return {ColumnViewItemVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return [\n      'variant',\n      'icon',\n      'selected',\n      'active',\n      '_selectable'\n    ];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // @a11y\n    this.setAttribute('role', 'treeitem');\n    \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n    \n    const thumbnail = this._elements.thumbnail;\n    const content = this._elements.content;\n    \n    const contentZoneProvided = content.parentNode || thumbnail.parentNode;\n    \n    if (!contentZoneProvided) {\n      // move the contents of the item into the content zone\n      while (this.firstChild) {\n        content.appendChild(this.firstChild);\n      }\n  \n      this.content = content;\n      this.thumbnail = thumbnail;\n    }\n    // Insert thumbnail if icon is specified\n    else if (this.icon) {\n      this.thumbnail = this._elements.thumbnail;\n    }\n  }\n}\n\nexport default ColumnViewItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.ColumnView.Item.Content\n @classdesc ColumnView's Item content component\n @htmltag coral-columnview-item-content\n @extends {HTMLElement}\n */\nclass ColumnViewItemContent extends HTMLElement {\n  connectedCallback() {\n    this.classList.add('_coral-MillerColumn-itemLabel');\n  }\n}\n\nexport default ColumnViewItemContent;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.ColumnView.Item.Thumbnail\n @classdesc ColumnView's Item thumbnail component\n @htmltag coral-columnview-item-thumbnail\n @extends {HTMLElement}\n */\n\nclass ColumnViewItemThumbnail extends HTMLElement {\n  connectedCallback() {\n    this.classList.add('_coral-MillerColumn-itemThumbnail');\n  }\n}\n\nexport default ColumnViewItemThumbnail;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\n\nconst CLASSNAME = '_coral-MillerColumn';\n\n/**\n @class Coral.ColumnView.Preview\n @classdesc A ColumnView Preview component\n @htmltag coral-columnview-preview\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ColumnViewPreview extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Content zone\n    this._elements = {\n      content: this.querySelector('coral-columnview-preview-content') || document.createElement('coral-columnview-preview-content')\n    };\n  }\n  \n  /**\n   The content of the Preview.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-columnview-preview-content',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  get _contentZones() { return {'coral-columnview-preview-content': 'content'}; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    const content = this._elements.content;\n  \n    // when the content zone was not created, we need to make sure that everything is added inside it as a content.\n    // this stops the content zone from being voracious\n    if (!content.parentNode) {\n      // move the contents of the item into the content zone\n      while (this.firstChild) {\n        content.appendChild(this.firstChild);\n      }\n    }\n    \n    // Call content zone insert\n    this.content = content;\n  }\n}\n\nexport default ColumnViewPreview;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.ColumnView.Preview.Asset\n @classdesc ColumnView's preview asset component\n @htmltag coral-columnview-preview-asset\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-columnview-preview-asset');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = 'coral-Body--small';\n\n/**\n @class Coral.ColumnView.Preview.Content\n @classdesc ColumnView's preview content component\n @htmltag coral-columnview-preview-content\n @extends {HTMLElement}\n */\nclass ColumnViewPreviewContent extends HTMLElement {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default ColumnViewPreviewContent;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.ColumnView.Preview.Label\n @classdesc ColumnView's preview label component\n @htmltag coral-columnview-preview-label\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-columnview-preview-label');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.ColumnView.Preview.Separator\n @classdesc ColumnView's preview separator component\n @htmltag coral-columnview-preview-separator\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-columnview-preview-separator');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.ColumnView.Preview.Value\n @classdesc ColumnView's preview value component\n @htmltag coral-columnview-preview-value\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-columnview-preview-value');\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport ColumnView from './src/scripts/ColumnView';\nimport ColumnViewColumn from './src/scripts/ColumnViewColumn';\nimport ColumnViewColumnContent from './src/scripts/ColumnViewColumnContent';\nimport ColumnViewItem from './src/scripts/ColumnViewItem';\nimport ColumnViewItemContent from './src/scripts/ColumnViewItemContent';\nimport ColumnViewItemThumbnail from './src/scripts/ColumnViewItemThumbnail';\nimport ColumnViewPreview from './src/scripts/ColumnViewPreview';\nimport ColumnViewPreviewAsset from './src/scripts/ColumnViewPreviewAsset';\nimport ColumnViewPreviewContent from './src/scripts/ColumnViewPreviewContent';\nimport ColumnViewPreviewLabel from './src/scripts/ColumnViewPreviewLabel';\nimport ColumnViewPreviewSeparator from './src/scripts/ColumnViewPreviewSeparator';\nimport ColumnViewPreviewValue from './src/scripts/ColumnViewPreviewValue';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-columnview', ColumnView);\nwindow.customElements.define('coral-columnview-column', ColumnViewColumn);\nwindow.customElements.define('coral-columnview-item', ColumnViewItem);\nwindow.customElements.define('coral-columnview-item-thumbnail', ColumnViewItemThumbnail);\nwindow.customElements.define('coral-columnview-item-content', ColumnViewItemContent);\nwindow.customElements.define('coral-columnview-preview', ColumnViewPreview);\nwindow.customElements.define('coral-columnview-preview-content', ColumnViewPreviewContent);\n\nColumnView.Column = ColumnViewColumn;\nColumnView.Column.Content = ColumnViewColumnContent;\nColumnView.Item = ColumnViewItem;\nColumnView.Item.Content = ColumnViewItemContent;\nColumnView.Item.Thumbnail = ColumnViewItemThumbnail;\nColumnView.Preview = ColumnViewPreview;\nColumnView.Preview.Asset = ColumnViewPreviewAsset;\nColumnView.Preview.Content = ColumnViewPreviewContent;\nColumnView.Preview.Label = ColumnViewPreviewLabel;\nColumnView.Preview.Separator = ColumnViewPreviewSeparator;\nColumnView.Preview.Value = ColumnViewPreviewValue;\n\nexport {ColumnView};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform, validate} from '../../../coralui-util';\n\n/**\n Enum for {CycleButtonItem} display options.\n \n @typedef {Object} CycleButtonItemDisplayModeEnum\n \n @property {String} ICON\n Icon display mode.\n @property {String} TEXT\n Text display mode.\n @property {String} ICON_TEXT\n Icon and text display mode.\n @property {String} INHERIT\n Inherit display mode.\n */\nconst displayMode = {\n  ICON: 'icon',\n  TEXT: 'text',\n  ICON_TEXT: 'icontext',\n  INHERIT: 'inherit'\n};\n\n/**\n @class Coral.CycleButton.Item\n @classdesc A CycleButton Item component\n @htmltag coral-cyclebutton-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass CycleButtonItem extends ComponentMixin(HTMLElement) {\n  /**\n   The Item's icon. See {@link Coral.Icon} for valid icon names.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   @htmlattributereflected\n   */\n  get icon() {\n    return this._icon || '';\n  }\n  set icon(value) {\n    this._icon = transform.string(value);\n    this._reflectAttribute('icon', this._icon);\n    \n    this.trigger('coral-cyclebutton-item:_iconchanged');\n  }\n  \n  /**\n   Item content element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    // Support configs\n    if (typeof value === 'object') {\n      for (const prop in value) {\n        /** @ignore */\n        this[prop] = value[prop];\n      }\n    }\n  }\n  \n  /**\n   Whether the Item is disabled. When set to true, this will prevent every user interacting with it.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.classList.toggle('is-disabled', this.disabled);\n    this.setAttribute('aria-disabled', this.disabled);\n    \n    if (this._disabled && this.selected) {\n      this.selected = false;\n    }\n    \n    if (!this._disabled && !this.selected) {\n      // We inform the parent to verify if this item should be selected because it's the only one left\n      this.trigger('coral-cyclebutton-item:_validateselection');\n    }\n  }\n  \n  /**\n   Whether the Item is selected.\n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    value = transform.booleanAttr(value);\n    \n    if (!value || value && !this.disabled) {\n      this._selected = value;\n      this._reflectAttribute('selected', this.disabled ? false : this._selected);\n      \n      this.classList.toggle('is-selected', this._selected);\n      this.setAttribute('aria-selected', this._selected);\n      \n      this.trigger('coral-cyclebutton-item:_selectedchanged');\n    }\n  }\n  \n  /**\n   The displayMode to be used when the particular item is selected. When this value is set to <code>inherit</code>\n   it will defer to the component level displayMode. If the selected item does not have the necessary icon or text\n   information, then fallback to show whichever is available. The appearance of collapsed items in the popover are\n   not affected by this property.\n   See {@link CycleButtonItemDisplayModeEnum}.\n   \n   @type {String}\n   @default CycleButtonItemDisplayModeEnum.INHERIT\n   @htmlattribute displaymode\n   @htmlattributereflected\n   */\n  get displayMode() {\n    return this._displayMode || displayMode.INHERIT;\n  }\n  set displayMode(value) {\n    value = transform.string(value).toLowerCase();\n    this._displayMode = validate.enumeration(displayMode)(value) && value || displayMode.INHERIT;\n    this._reflectAttribute('displaymode', this._displayMode);\n    \n    this.trigger('coral-cyclebutton-item:_displaymodechanged');\n  }\n  \n  /**\n   Returns {@link CycleButtonItem} display options.\n   \n   @return {CycleButtonItemDisplayModeEnum}\n   */\n  static get displayMode() { return displayMode; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['selected', 'disabled', 'icon', 'displayMode', 'displaymode'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    // adds the role to support accessibility\n    this.setAttribute('role', 'option');\n  \n    // Default reflected attributes\n    if (!this._displayMode) { this.displayMode = displayMode.INHERIT; }\n  }\n}\n\nexport default CycleButtonItem;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  var el0 = this[\"button\"] = document.createElement(\"button\",\"coral-button\");\n  el0.id = data_0[\"commons\"][\"getUID\"]();\n  el0.setAttribute(\"handle\", \"button\");\n  el0.className += \" _coral-CycleSelect-button _coral-Button--quiet--action\";\n  el0.setAttribute(\"is\", \"coral-button\");\n  el0.setAttribute(\"variant\", \"_custom\");\n  el0.setAttribute(\"iconsize\", \"S\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = this[\"label\"] = document.createElement(\"coral-button-label\");\n  el2.setAttribute(\"handle\", \"label\");\n  el0.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  el0.appendChild(el3);\n  frag.appendChild(el0);\n  var el4 = document.createTextNode(\"\\n\");\n  frag.appendChild(el4);\n  data = data_0;\n  \n  // Don't wait for button MO to pick up the label\n  this.button._elements.label = this.label;\n  // Render chevron icon\n  this.button.insertAdjacentHTML('afterbegin', data.Icon._renderSVG('spectrum-css-icon-SelectDownChevron', ['_coral-CycleSelect-icon']));\n\n  data_0 = data;\n  var el6 = document.createTextNode(\"\\n\");\n  frag.appendChild(el6);\n  var el7 = this[\"overlay\"] = document.createElement(\"coral-popover\");\n  el7.setAttribute(\"smart\", \"\");\n  el7.id = data_0[\"commons\"][\"getUID\"]();\n  el7.setAttribute(\"variant\", \"flyout\");\n  el7.setAttribute(\"handle\", \"overlay\");\n  el7.setAttribute(\"returnfocus\", \"on\");\n  el7.setAttribute(\"focusonshow\", \"coral-selectlist\");\n  el7.setAttribute(\"trapfocus\", \"on\");\n  el7.setAttribute(\"placement\", \"bottom\");\n  var el8 = document.createTextNode(\"\\n  \");\n  el7.appendChild(el8);\n  var el9 = this[\"selectList\"] = document.createElement(\"coral-selectlist\");\n  el9.className += \" _coral-CycleSelect-list\";\n  el9.setAttribute(\"handle\", \"selectList\");\n  el9.id = data_0[\"commons\"][\"getUID\"]();\n  el7.appendChild(el9);\n  var el10 = document.createTextNode(\"\\n  \");\n  el7.appendChild(el10);\n  var el11 = this[\"actionList\"] = document.createElement(\"coral-buttonlist\");\n  el11.setAttribute(\"handle\", \"actionList\");\n  el11.className += \" _coral-CycleSelect-buttonList\";\n  el11.setAttribute(\"hidden\", \"\");\n  el7.appendChild(el11);\n  var el12 = document.createTextNode(\"\\n\");\n  el7.appendChild(el12);\n  frag.appendChild(el7);\n  var el13 = document.createTextNode(\"\\n\");\n  frag.appendChild(el13);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport '../../../coralui-component-popover';\nimport '../../../coralui-component-button';\nimport CycleButtonItem from './CycleButtonItem';\nimport {Icon} from '../../../coralui-component-icon';\nimport {ButtonList, SelectList} from '../../../coralui-component-list';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport base from '../templates/base';\nimport {transform, validate, commons} from '../../../coralui-util';\n\n/**\n Enumeration for {@link CycleButton} display options.\n \n @typedef {Object} CycleButtonDisplayModeEnum\n \n @property {String} ICON\n Icon display mode.\n @property {String} TEXT\n Text display mode.\n @property {String} ICON_TEXT\n Icon and text display mode.\n */\nconst displayMode = {\n  ICON: 'icon',\n  TEXT: 'text',\n  ICON_TEXT: 'icontext'\n};\n\n/**\n Regex used to remove whitespace from selectedItem label for use as an aria-label for accessibility.\n \n @ignore\n */\nconst WHITESPACE_REGEX = /[\\t\\n\\r ]+/g;\n\n/** @ignore */\nconst ACTION_TAG_NAME = 'coral-cyclebutton-action';\n\nconst CLASSNAME = '_coral-CycleSelect';\n\n/**\n @class Coral.CycleButton\n @classdesc A CycleButton component is a simple multi-state toggle button that toggles between the possible items below\n a certain threshold, and shows them in a popover selector when above.\n @htmltag coral-cyclebutton\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass CycleButton extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Templates\n    this._elements = {};\n    base.call(this._elements, {Icon, commons});\n    \n    const events = {\n      'click ._coral-CycleSelect-button': '_onItemClick',\n      'click coral-cyclebutton-item': '_onItemClick',\n      'key:down ._coral-CycleSelect-button[aria-expanded=false]': '_onItemClick',\n      \n      // private\n      'coral-cyclebutton-item:_selectedchanged': '_onItemSelectedChanged',\n      'coral-cyclebutton-item:_validateselection': '_onValidateSelection',\n      'coral-cyclebutton-item:_iconchanged coral-cyclebutton-item[selected]': '_onSelectedItemPropertyChange',\n      'coral-cyclebutton-item:_displaymodechanged coral-cyclebutton-item[selected]': '_onSelectedItemPropertyChange'\n    };\n  \n    const overlay = this._elements.overlay;\n    const overlayId = overlay.id;\n    \n    // Overlay\n    events[`global:capture:click #${overlayId} button[is=\"coral-buttonlist-item\"]`] = '_onActionClick';\n    events[`global:capture:coral-selectlist:change #${overlayId}`] = '_onSelectListChange';\n    \n    // Attach events\n    this._delegateEvents(events);\n    \n    // Used for eventing\n    this._oldSelection = null;\n    \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // just init on demand\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-cyclebutton-item',\n        onItemAdded: this._onItemAdded,\n        onItemRemoved: this._onItemRemoved\n      });\n    }\n    return this._items;\n  }\n  \n  /**\n   The selected item in the CycleButton.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getLastSelected();\n  }\n  \n  /**\n   General icon of the CycleButton. The icon will be displayed no matter the selection. If the selected item has\n   its own icon, it will be overwritten.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   @htmlattributereflected\n   */\n  get icon() {\n    return this._icon || '';\n  }\n  set icon(value) {\n    this._icon = transform.string(value);\n    this._reflectAttribute('icon', this._icon);\n    \n    const selectedItem = this.selectedItem;\n    if (selectedItem) {\n      this._renderSelectedItem(selectedItem);\n    }\n  }\n  \n  /**\n   Number of items that can be directly cycled through before collapsing. If <code>0</code> is used, the items\n   will never be collapsed.\n   \n   @type {Number}\n   @default 3\n   @htmlattribute threshold\n   @htmlattributereflected\n   */\n  get threshold() {\n    return typeof this._threshold === 'number' ? this._threshold : 3;\n  }\n  set threshold(value) {\n    value = transform.number(value);\n    if (value > -1) {\n      this._threshold = value;\n      this._checkExtended();\n    }\n  }\n  \n  /**\n   The Collection Interface that allows interaction with the {@link CycleButtonAction} elements.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get actions() {\n    if (!this._actions) {\n      this._actions = new SelectableCollection({\n        host: this,\n        itemTagName: ACTION_TAG_NAME,\n        itemSelector: ACTION_TAG_NAME\n      });\n    }\n    return this._actions;\n  }\n  \n  /**\n   The CycleButton's displayMode. This defines how the selected item is displayed. If the selected item does not\n   have the necessary icon or text information then fallback to show whichever is available. The appearance of\n   collapsed items in the popover are not affected by this property. The displayMode property can be set on an\n   item to override the component level value when that item is selected.\n   See {@link CycleButtonDisplayModeEnum}.\n   \n   @type {String}\n   @default CycleButtonDisplayModeEnum.ICON\n   @htmlattribute displaymode\n   @htmlattributereflected\n   */\n  get displayMode() {\n    return this._displayMode || displayMode.ICON;\n  }\n  set displayMode(value) {\n    value = transform.string(value).toLowerCase();\n    this._displayMode = validate.enumeration(displayMode)(value) && value || displayMode.ICON;\n    this._reflectAttribute('displaymode', this._displayMode);\n  \n    const selectedItem = this.selectedItem;\n    if (selectedItem) {\n      this._renderSelectedItem(selectedItem);\n    }\n  }\n  \n  /** @private */\n  _onItemAdded(item) {\n    if (!this.selectedItem) {\n      item.setAttribute('selected', '');\n    }\n    else {\n      this._validateSelection(item);\n    }\n  \n    this._checkExtended();\n  }\n  \n  /** @private */\n  _onItemRemoved() {\n    if (!this.selectedItem) {\n      this._selectFirstItem();\n    }\n  \n    this._checkExtended();\n  }\n  \n  /** @private */\n  _onItemSelectedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    this._validateSelection(event.target);\n  }\n  \n  /** @private */\n  _onValidateSelection(event) {\n    event.stopImmediatePropagation();\n    \n    this._validateSelection();\n  }\n  \n  /** @private */\n  _selectFirstItem() {\n    const item = this.items._getFirstSelectable();\n    if (item) {\n      item.setAttribute('selected', '');\n    }\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    const selectedItems = this.items._getAllSelected();\n    \n    if (item) {\n      // Deselected item\n      if (!item.hasAttribute('selected') && !selectedItems.length) {\n        const siblingItem = this.items._getNextSelectable(item);\n        // Next selectable item is forced to be selected if selection is cleared\n        if (item !== siblingItem) {\n          siblingItem.setAttribute('selected', '');\n        }\n      }\n      // Selected item\n      else if (item.hasAttribute('selected') && selectedItems.length > 1) {\n        selectedItems.forEach((selectedItem) => {\n          if (selectedItem !== item) {\n            // Don't trigger change events\n            this._preventTriggeringEvents = true;\n            selectedItem.removeAttribute('selected');\n          }\n        }, this);\n        \n        // We can trigger change events again\n        this._preventTriggeringEvents = false;\n      }\n    }\n    else if (selectedItems.length > 1) {\n      // If multiple items are selected, the last one wins\n      item = selectedItems[selectedItems.length - 1];\n      \n      selectedItems.forEach((selectedItem) => {\n        if (selectedItem !== item) {\n          // Don't trigger change events\n          this._preventTriggeringEvents = true;\n          selectedItem.removeAttribute('selected');\n        }\n      }, this);\n      \n      // We can trigger change events again\n      this._preventTriggeringEvents = false;\n    }\n    // First selectable item is forced to be selected if no selection at all\n    else if (!selectedItems.length) {\n      this._selectFirstItem();\n    }\n  \n    this._renderSelectedItem(this.selectedItem);\n    \n    this._triggerChangeEvent();\n  }\n  \n  /** @private */\n  _triggerChangeEvent() {\n    const selectedItem = this.selectedItem;\n    const oldSelection = this._oldSelection;\n    \n    if (!this._preventTriggeringEvents && selectedItem !== oldSelection) {\n      this.trigger('coral-cyclebutton:change', {\n        oldSelection: oldSelection,\n        selection: selectedItem\n      });\n      \n      this._oldSelection = selectedItem;\n    }\n  }\n  \n  /** @private */\n  _onItemClick(event) {\n    event.preventDefault();\n    \n    const items = this.items.getAll();\n    const itemCount = items.length;\n    \n    // When we have more than a specified number of items, use the overlay selection. If threshold is 0, then we never\n    // show the popover. If there are actions, we always show the popover.\n    if (this._isExtended()) {\n      // we toggle the overlay if it was already open\n      if (this._elements.overlay.classList.contains('is-open')) {\n        this._hideOverlay();\n      }\n      else {\n        this._showOverlay();\n        // Set focus on selectList item after overlay opened\n        this._focusItem(this.selectedItem._selectListItem);\n      }\n    }\n    // Unless this is the only item we have, select the next item in line:\n    else if (itemCount > 1) {\n      this._selectCycleItem(this.selectedItem.nextElementSibling || items[0]);\n      this._focusItem(this._elements.button);\n    }\n  }\n  \n  /**\n   Render the provided item as selected according to resolved icon and displayMode properties.\n   \n   @private\n   */\n  _renderSelectedItem(item) {\n    if (!item || !item.content) {\n      return;\n    }\n  \n    // resolve effective values by checking for item and component level properties\n    let effectiveDisplayMode = this.displayMode;\n    const effectiveIcon = item.icon || this.icon || '';\n  \n    if (item.displayMode !== CycleButtonItem.displayMode.INHERIT) {\n      effectiveDisplayMode = item.displayMode;\n    }\n    if (!item.content.textContent.trim() || !effectiveIcon.trim()) {\n      // if icon or text missing then we fallback to showing whichever is available\n      effectiveDisplayMode = displayMode.ICON_TEXT;\n    }\n  \n    // manipulate button sub-component depending on display mode\n    if (effectiveDisplayMode === displayMode.ICON) {\n      this._elements.button.icon = effectiveIcon;\n      this._elements.button.label.innerHTML = '';\n    \n      // @a11y\n      const ariaLabel = item.content.textContent.replace(WHITESPACE_REGEX, ' ');\n      this._elements.button.setAttribute('aria-label', ariaLabel);\n      this._elements.button.setAttribute('title', ariaLabel);\n    }\n    else {\n      // handle display modes that include text\n      if (effectiveDisplayMode === displayMode.TEXT) {\n        this._elements.button.icon = '';\n      }\n      if (effectiveDisplayMode === displayMode.ICON_TEXT) {\n        this._elements.button.icon = effectiveIcon;\n      }\n      this._elements.button.label.innerHTML = item.content.innerHTML;\n    \n      // @a11y we do not require aria attributes since we already show text\n      this._elements.button.removeAttribute('aria-label');\n      this._elements.button.removeAttribute('title');\n    }\n  }\n  \n  /**\n   Update currently selected item if it's <code>icon</code> or <code>displayMode</code> properties have changed.\n   \n   @private\n   */\n  _onSelectedItemPropertyChange(event) {\n    // stops propagation because the event is internal to the component\n    event.stopImmediatePropagation();\n    this._renderSelectedItem(event.target);\n  }\n  \n  /** @private */\n  _onSelectListChange(event) {\n    event.stopImmediatePropagation();\n    event.preventDefault();\n    \n    const selectListItem = event.detail.selection;\n    if (selectListItem) {\n      const origNode = selectListItem._originalItem;\n      \n      this._selectCycleItem(origNode);\n      \n      // Hide the overlay, cleanup will be done before overlay.show()\n      this._hideOverlay();\n    }\n  }\n  \n  /** @private */\n  _onActionClick(event) {\n    event.stopPropagation();\n    \n    const item = event.matchedTarget;\n    const proxyEvent = item._originalItem.trigger('click');\n    \n    if (!proxyEvent.defaultPrevented) {\n      this._hideOverlay();\n    }\n  }\n  \n  /** @private */\n  _isExtended() {\n    const hasActions = this.actions.getAll().length > 0;\n    return this.threshold > 0 && this.items.getAll().length >= this.threshold || hasActions;\n  }\n  \n  /** @private */\n  _checkExtended() {\n    const isExtended = this._isExtended();\n    this.classList.toggle(`${CLASSNAME}--extended`, isExtended);\n    \n    // @a11y\n    if (isExtended) {\n      const uid = this._elements.selectList.id;\n      this._elements.button.setAttribute('aria-owns', uid);\n      this._elements.button.setAttribute('aria-controls', uid);\n      this._elements.button.setAttribute('aria-haspopup', true);\n      this._elements.button.setAttribute('aria-expanded', false);\n      \n      this._elements.overlay.hidden = false;\n    }\n    else {\n      this._elements.button.removeAttribute('aria-owns');\n      this._elements.button.removeAttribute('aria-controls');\n      this._elements.button.removeAttribute('aria-haspopup');\n      this._elements.button.removeAttribute('aria-expanded');\n      \n      this._elements.overlay.hidden = true;\n    }\n  }\n  \n  /** @ignore */\n  _focusItem(item) {\n    if (item) {\n      item.focus();\n    }\n  }\n  \n  /** @ignore */\n  _hideOverlay() {\n    // @a11y\n    this._elements.button.setAttribute('aria-expanded', false);\n    this._elements.overlay.hide();\n  \n    const self = this;\n    // Make sure the button is focused once closed\n    window.requestAnimationFrame(() => {\n      self._elements.button.focus();\n    });\n  }\n  \n  /** @ignore */\n  _getSelectListItem(item) {\n    const selectListItem = new SelectList.Item();\n  \n    // We do first the content, so that the icon is not destroyed\n    selectListItem.content.innerHTML = item.content.innerHTML;\n    \n    // If an icon was specified we need to create an element for it and add it directly to the selectList Item\n    if (item.icon) {\n      const icon = new Icon().set({\n        icon: item.icon,\n        size: Icon.size.SMALL\n      });\n      icon.classList.add(`${CLASSNAME}-list-icon`);\n  \n      selectListItem.content.insertBefore(icon, selectListItem.content.firstChild);\n    }\n    \n    selectListItem._originalItem = item;\n    item._selectListItem = selectListItem;\n    \n    return selectListItem;\n  }\n  \n  /** @ignore */\n  _getActionListItem(action) {\n    const actionListItem = new ButtonList.Item();\n    \n    actionListItem.icon = action.icon;\n    actionListItem.content.innerHTML = action.content.innerHTML;\n    \n    actionListItem._originalItem = action;\n    action._buttonListItem = actionListItem;\n    \n    return actionListItem;\n  }\n  \n  /** @ignore */\n  _populateLists() {\n    const selectList = this._elements.selectList;\n    const actionList = this._elements.actionList;\n    const items = this.items.getAll();\n    const actions = this.actions.getAll();\n    const itemCount = items.length;\n    const actionCount = actions.length;\n    let selectListItem;\n    let actionListItem;\n    \n    // we empty the existing items before populating the lists again\n    selectList.items.clear();\n    actionList.items.clear();\n    \n    // adds the items to the selectList\n    for (let i = 0; i < itemCount; i++) {\n      const item = items[i];\n      selectListItem = this._getSelectListItem(item);\n      \n      // we have set the selected state after attaching otherwise will get\n      // Uncaught Error: Coral.SelectList.Item cannot be selected before being added as a child\n      selectList.items.add(selectListItem);\n      \n      selectListItem.set({\n        disabled: item.disabled,\n        selected: item.selected\n      }, true);\n    }\n    \n    // adds any additional actions to the actions buttonList\n    if (actionCount > 0) {\n      for (let j = 0; j < actionCount; j++) {\n        const action = actions[j];\n        \n        actionListItem = this._getActionListItem(action);\n        actionList.items.add(actionListItem);\n        actionListItem.disabled = action.disabled;\n      }\n      \n      this._elements.actionList.removeAttribute('hidden');\n    }\n    else {\n      this._elements.actionList.setAttribute('hidden', true);\n    }\n  }\n  \n  /** @private */\n  _selectCycleItem(item) {\n    item.setAttribute('selected', '');\n  }\n  \n  /** @ignore */\n  _showOverlay() {\n    // @a11y\n    this._elements.button.setAttribute('aria-expanded', true);\n    \n    this._populateLists();\n    \n    const self = this;\n    // Wait for list to be populated before showing the overlay\n    window.requestAnimationFrame(() => {\n      self._elements.overlay.show();\n    });\n  }\n  \n  /**\n   Returns {@link CycleButton} display options.\n   \n   @return {CycleButtonDisplayModeEnum}\n   */\n  static get displayMode() { return displayMode; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['icon', 'threshold', 'displaymode', 'displayMode'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // Default reflected attributes\n    if (typeof this._threshold === 'undefined') { this.threshold = 3; }\n    if (!this._displayMode) { this.displayMode = displayMode.ICON; }\n    \n    // adds the role to support accessibility\n    this.setAttribute('role', 'presentation');\n    // checks the component's extended mode\n    this._checkExtended();\n  \n    ['button', 'overlay'].forEach((handleName) => {\n      const handle = this.querySelector(`[handle=\"${handleName}\"]`);\n      if (handle) {\n        handle.remove();\n      }\n    }, this);\n  \n    const frag = document.createDocumentFragment();\n  \n    // Cannot be open by default when rendered\n    this._elements.overlay.removeAttribute('open');\n  \n    // Render the base layout\n    frag.appendChild(this._elements.button);\n    frag.appendChild(this._elements.overlay);\n  \n    // Inserting the template before the items\n    this.insertBefore(frag, this.firstChild);\n  \n    // Assign the button as the target for the overlay\n    this._elements.overlay.target = this._elements.button;\n    \n    // Don't trigger events once connected\n    this._preventTriggeringEvents = true;\n    this._validateSelection();\n    this._preventTriggeringEvents = false;\n    \n    this._oldSelection = this.selectedItem;\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    \n    // In case it was moved out don't forget to remove it\n    if (!this.contains(this._elements.overlay)) {\n      this._elements.overlay.remove();\n    }\n  }\n  \n  /**\n   Triggered when the {@link CycleButton} selected item has changed.\n   \n   @typedef {CustomEvent} coral-cyclebutton:change\n   \n   @property {CycleButtonItem} detail.oldSelection\n   The prior selected item(s).\n   @property {CycleButtonItem} detail.selection\n   The newly selected item(s).\n   */\n}\n\nexport default CycleButton;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform} from '../../../coralui-util';\n\n/**\n @class Coral.CycleButton.Action\n @classdesc A CycleButton Action component\n @htmltag coral-cyclebutton-action\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass CycleButtonAction extends ComponentMixin(HTMLElement) {\n  /**\n   The Action's icon. See {@link Coral.Icon} for valid icon names.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   @htmlattributereflected\n   */\n  get icon() {\n    return this._icon || '';\n  }\n  set icon(value) {\n    this._icon = transform.string(value);\n    this._reflectAttribute('icon', this._icon);\n  }\n  \n  /**\n   Action content element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    // Support configs\n    if (typeof value === 'object') {\n      for (const prop in value) {\n        /** @ignore */\n        this[prop] = value[prop];\n      }\n    }\n  }\n}\n\nexport default CycleButtonAction;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport CycleButton from './src/scripts/CycleButton';\nimport CycleButtonItem from './src/scripts/CycleButtonItem';\nimport CycleButtonAction from './src/scripts/CycleButtonAction';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-cyclebutton', CycleButton);\nwindow.customElements.define('coral-cyclebutton-item', CycleButtonItem);\nwindow.customElements.define('coral-cyclebutton-action', CycleButtonAction);\n\nCycleButton.Item = CycleButtonItem;\nCycleButton.Action = CycleButtonAction;\n\nexport {CycleButton};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"overlay\"] = document.createElement(\"coral-popover\");\n  el0.setAttribute(\"smart\", \"\");\n  el0.setAttribute(\"variant\", \"flyout\");\n  el0.className += \" _coral-Datepicker-overlay\";\n  el0.setAttribute(\"handle\", \"overlay\");\n  el0.id = data_0[\"commons\"][\"getUID\"]();\n  el0.setAttribute(\"breadthoffset\", \"50%r - 50%p\");\n  el0.setAttribute(\"placement\", \"bottom\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"hiddenInput\"] = document.createElement(\"input\");\n  el2.setAttribute(\"type\", \"hidden\");\n  el2.setAttribute(\"handle\", \"hiddenInput\");\n  frag.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  frag.appendChild(el3);\n  var el4 = this[\"input\"] = document.createElement(\"input\",\"coral-textfield\");\n  el4.setAttribute(\"is\", \"coral-textfield\");\n  el4.setAttribute(\"type\", \"text\");\n  el4.setAttribute(\"handle\", \"input\");\n  el4.className += \" _coral-InputGroup-input\";\n  el4.setAttribute(\"role\", \"textbox\");\n  frag.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  frag.appendChild(el5);\n  var el6 = this[\"toggle\"] = document.createElement(\"button\",\"coral-button\");\n  el6.setAttribute(\"is\", \"coral-button\");\n  el6.setAttribute(\"variant\", \"_custom\");\n  el6.className += \" _coral-InputGroup-button _coral-Button--dropdown\";\n  el6.setAttribute(\"type\", \"button\");\n  el6.setAttribute(\"handle\", \"toggle\");\n  el6.setAttribute(\"aria-haspopup\", \"true\");\n  el6.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('Calendar'));\n  el6.setAttribute(\"title\", data_0[\"i18n\"][\"get\"]('Calendar'));\n  var el7 = document.createTextNode(\"\\n  \");\n  el6.appendChild(el7);\n  var el8 = this[\"icon\"] = document.createElement(\"coral-icon\");\n  el8.setAttribute(\"icon\", \"calendar\");\n  el8.setAttribute(\"iconsize\", \"S\");\n  el8.className += \" u-coral-noMargin\";\n  el8.setAttribute(\"handle\", \"icon\");\n  el6.appendChild(el8);\n  var el9 = document.createTextNode(\"\\n  \");\n  el6.appendChild(el9);\n  var el10 = document.createElement(\"coral-button-label\");\n  el6.appendChild(el10);\n  var el11 = document.createTextNode(\"\\n\");\n  el6.appendChild(el11);\n  frag.appendChild(el6);\n  var el12 = document.createTextNode(\"\\n\");\n  frag.appendChild(el12);\n  return frag;\n});\nexport default template;","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  data = data_0;\n  \n  var uid = data.commons.getUID();\n\n  data_0 = data;\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"calendar\"] = document.createElement(\"coral-calendar\");\n  el2.setAttribute(\"handle\", \"calendar\");\n  el2.className += \" _coral-Datepicker-calendar\";\n  el2.setAttribute(\"aria-labelledby\", uid+\"-calendar\");\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  var el4 = document.createElement(\"span\");\n  el4.id = uid+\"-calendar\";\n  el4.className += \" u-coral-screenReaderOnly\";\n  el4.setAttribute(\"hidden\", \"\");\n  el4.textContent = data_0[\"i18n\"][\"get\"](\"Calendar\");\n  el2.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  el2.appendChild(el5);\n  frag.appendChild(el2);\n  var el6 = document.createTextNode(\"\\n\");\n  frag.appendChild(el6);\n  var el7 = this[\"clock\"] = document.createElement(\"coral-clock\");\n  el7.setAttribute(\"handle\", \"clock\");\n  el7.className += \" _coral-Datepicker-clock\";\n  el7.setAttribute(\"aria-labelledby\", uid+\"-clock\");\n  var el8 = document.createTextNode(\"\\n  \");\n  el7.appendChild(el8);\n  var el9 = document.createElement(\"span\");\n  el9.id = uid+\"-clock\";\n  el9.className += \" u-coral-screenReaderOnly\";\n  el9.setAttribute(\"hidden\", \"\");\n  el9.textContent = data_0[\"i18n\"][\"get\"](\"Time\");\n  el7.appendChild(el9);\n  var el10 = document.createTextNode(\"\\n\");\n  el7.appendChild(el10);\n  frag.appendChild(el7);\n  var el11 = document.createTextNode(\"\\n\");\n  frag.appendChild(el11);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport {DateTime} from '../../../coralui-datetime';\nimport '../../../coralui-component-button';\nimport '../../../coralui-component-clock';\nimport '../../../coralui-component-calendar';\nimport '../../../coralui-component-popover';\nimport '../../../coralui-component-textfield';\nimport base from '../templates/base';\nimport overlayContent from '../templates/overlayContent';\nimport {transform, commons, validate, i18n} from '../../../coralui-util';\n\n/**\n Enum for {@link Datepicker} variant values.\n \n @typedef {Object} DatepickerVariantEnum\n \n @property {String} DEFAULT\n A default, gray Datepicker.\n @property {String} QUIET\n A Datepicker with no border or background.\n */\nconst variant = {\n  DEFAULT: 'default',\n  QUIET: 'quiet'\n};\n\nconst CLASSNAME = '_coral-InputGroup';\n\n// builds a string containing all possible variant classnames. This will be used to remove\n// classnames when the variant changes.\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantKey in variant) {\n  ALL_VARIANT_CLASSES.push(`${CLASSNAME}--${variant[variantKey]}`);\n}\n\n/** @ignore */\nfunction toMoment(value, format) {\n  if (value === 'today') {\n    return new DateTime.Moment();\n  }\n  else if (DateTime.Moment.isMoment(value)) {\n    return value.isValid() ? value.clone() : null;\n  }\n  \n  // if the value provided is a date it does not make sense to provide a format to parse the date\n  const result = new DateTime.Moment(value, value instanceof Date ? null : format);\n  return result.isValid() ? result : null;\n}\n\n/**\n Enumeration for {@link Datepicker} variants.\n \n @typedef {Object} DatepickerTypeEnum\n \n @property {String} DATE\n The selection overlay contains only a calendar.\n @property {String} DATETIME\n Provides both calendar and time controls in the selection overlay.\n @property {String} TIME\n The selection overlay provides only time controls.\n */\nconst type = {\n  DATE: 'date',\n  DATETIME: 'datetime',\n  TIME: 'time'\n};\n\n// Used to determine if the client is on a mobile device\nconst IS_MOBILE_DEVICE = navigator.userAgent.match(/iPhone|iPad|iPod|Android/i) !== null;\n\nconst NATIVE_FORMATS = {\n  date: 'YYYY-MM-DD',\n  datetime: 'YYYY-MM-DD[T]HH:mmZ',\n  time: 'HH:mm'\n};\n\nconst isNativeFormat = (format) => {\n  let res = false;\n  for (const key in NATIVE_FORMATS) {\n    if (format === NATIVE_FORMATS[key]) {\n      res = true;\n    }\n  }\n  return res;\n};\n\n/**\n @class Coral.Datepicker\n @classdesc A Datepicker component that can be used as a date and time selection form field. Leverages {@link momentJS}\n if loaded on the page.\n @htmltag coral-datepicker\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass Datepicker extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Prepare templates\n    this._elements = {};\n    base.call(this._elements, {commons, i18n});\n    // Creates and stores the contents of the popover separately\n    this._calendarFragment = overlayContent.call(this._elements, {commons, i18n});\n  \n    // Pre-define labellable element\n    this._labellableElement = this._elements.input;\n  \n    const overlayId = this._elements.overlay.id;\n    const events = {};\n    events[`global:capture:click #${overlayId} coral-calendar`] = '_onCalendarDayClick';\n    events[`global:capture:change #${overlayId}`] = '_onChange';\n    events[`global:capture:coral-overlay:beforeopen #${overlayId}`] = '_onPopoverBeforeOpen';\n    events[`global:capture:coral-overlay:open #${overlayId}`] = '_onPopoverOpenOrClose';\n    events[`global:capture:coral-overlay:close #${overlayId}`] = '_onPopoverOpenOrClose';\n    events['key:alt+down [handle=\"input\"],[handle=\"toggle\"]'] = '_onAltDownKey';\n    events['key:down [handle=\"toggle\"]'] = '_onAltDownKey';\n    \n    // Events\n    this._delegateEvents(commons.extend(this._events, events));\n  }\n  \n  /**\n   The type of datepicker to show to the user. See {@link DatepickerTypeEnum}.\n   \n   @type {DatepickerTypeEnum}\n   @default DatepickerTypeEnum.DATE\n   @htmlattribute type\n   @htmlattributereflected\n   */\n  get type() {\n    return this._type || type.DATE;\n  }\n  set type(value) {\n    // Flag to indicate that we are changing the type for the first time\n    this._typeFormatChanged = typeof this._type === 'undefined';\n    \n    value = transform.string(value).toLowerCase();\n    this._type = validate.enumeration(type)(value) && value || type.DATE;\n    this._reflectAttribute('type', this._type);\n  \n    const format = NATIVE_FORMATS[this._type];\n    const isTime = this._type === type.TIME;\n    const isDate = this._type === type.DATE;\n  \n    this._elements.icon.icon = isTime ? 'clock' : 'calendar';\n  \n    const toggleLabel = isTime ? i18n.get('Time') : i18n.get('Calendar');\n    this._elements.toggle.setAttribute('aria-label', toggleLabel);\n    this._elements.toggle.setAttribute('title', toggleLabel);\n  \n    this._elements.clock.hidden = isDate;\n    this._elements.clock.setAttribute('aria-hidden', isDate);\n  \n    this._elements.calendar.hidden = isTime;\n    this._elements.calendar.setAttribute('aria-hidden', isTime);\n    \n    // Change format if we have a native format set\n    if (isNativeFormat(this.valueFormat)) { this.valueFormat = format; }\n    if (isNativeFormat(this.displayFormat)) { this.displayFormat = format; }\n    \n    this._useNativeInput = this._useNativeInput;\n  \n    this._typeFormatChanged = false;\n  }\n  \n  /**\n   The format used to display the selected date(time) to the user. If the user manually types a date, this format\n   will be used to parse the value. When using this component on a mobile device, the display format must follow\n   the format used by the native input. If an empty string is provided, then the default value per type will\n   be used. The default value depends on the <code>type</code>, which can be one from <code>YYYY-MM-DD</code>,\n   <code>YYYY-MM-DD[T]HH:mmZ</code> or <code>HH:mm</code>.  Include momentjs to support additional format string options\n   see http://momentjs.com/docs/#/displaying/.\n   \n   @type {String}\n   @default \"YYYY-MM-DD\"\n   @htmlattribute displayformat\n   @htmlattributereflected\n   */\n  get displayFormat() {\n    // we ignore _useNativeInput when the type is datetime because it is not supported by mobile libraries\n    if (this._useNativeInput && this.type !== type.DATETIME) {\n      return NATIVE_FORMATS[this.type];\n    }\n    \n    return typeof this._displayFormat === 'undefined' ? NATIVE_FORMATS[this.type] : this._displayFormat;\n  }\n  set displayFormat(value) {\n    value = transform.string(value).trim();\n  \n    // In case a custom display format was set, we make sure that type doesn't change it to a native format\n    const displayFormatAttribute = this.getAttribute('displayformat');\n    if (this._typeFormatChanged && displayFormatAttribute && displayFormatAttribute !== value) {\n      value = displayFormatAttribute;\n    }\n    \n    this._displayFormat = value === '' ? NATIVE_FORMATS[this.type] : value;\n    this._reflectAttribute('displayformat', this._displayFormat);\n    \n    this._elements.clock.displayFormat = this._displayFormat;\n    this._elements.input.value = this._getValueAsString(this._value, this._displayFormat);\n  }\n  \n  /**\n   The format to use on expressing the selected date as a string on the <code>value</code> attribute. The value\n   will be sent to the server using this format. If an empty string is provided, then the default value per type\n   will be used. The default value depends on the <code>type</code>, which can be one from <code>YYYY-MM-DD</code>,\n   <code>YYYY-MM-DD[T]HH:mmZ</code> or <code>HH:mm</code>. Include momentjs to support additional format string options\n   see http://momentjs.com/docs/#/displaying/.\n   \n   @type {String}\n   @default \"YYYY-MM-DD\"\n   @htmlattribute valueformat\n   @htmlattributereflected\n   */\n  get valueFormat() {\n    return typeof this._valueFormat === 'undefined' ? NATIVE_FORMATS[this.type] : this._valueFormat;\n  }\n  set valueFormat(value) {\n    const setValueFormat = (newValue) => {\n      this._valueFormat = newValue === '' ? NATIVE_FORMATS[this.type] : newValue;\n      this._reflectAttribute('valueformat', this._valueFormat);\n    };\n  \n    value = transform.string(value).trim();\n  \n    // In case a custom display format was set, we make sure that type doesn't change it to a native format\n    const valueFormatAttribute = this.getAttribute('valueformat');\n    if (this._typeFormatChanged && valueFormatAttribute && valueFormatAttribute !== value) {\n      value = valueFormatAttribute;\n    }\n  \n    // Once the valueFormat is set, we make sure the value is also correct\n    if (!this._valueFormat && this._originalValue) {\n      setValueFormat(value);\n      this.value = this._originalValue;\n    }\n    else {\n      setValueFormat(value);\n    }\n    \n    this._elements.calendar.valueFormat = this._valueFormat;\n    this._elements.hiddenInput.value = this.value;\n  }\n  \n  /**\n   The value of the element, interpreted as a date, or <code>null</code> if conversion is not possible.\n   \n   @type {Date}\n   @default null\n   */\n  get valueAsDate() {\n    let value = this._value;\n  \n    // If type is DATE, then you strip out the time\n    if (this.type === 'date' && value) {\n      value = value.startOf('day');\n    }\n  \n    return value ? value.toDate() : null;\n  }\n  set valueAsDate(value) {\n    this._valueAsDate = value instanceof Date ? new DateTime.Moment(value) : '';\n  \n    this.value = this._valueAsDate;\n  }\n  \n  /**\n   The minimum date that the Datepicker will accept as valid. It must not be greated that its maximum. It accepts\n   both date and string values. When a string is provided, it should match the {@link Coral.Datepicker#valueFormat}.\n   \n   See {@link Coral.Calendar#min}\n   \n   @type {String|Date}\n   @default null\n   @htmlattribute min\n   */\n  get min() {\n    return this._elements.calendar.min;\n  }\n  set min(value) {\n    this._elements.calendar.min = value;\n  }\n  \n  /**\n   The maximum date that the Datepicker will accept as valid. It must not be less than its minimum. It accepts both\n   date and string values. When a string is provided, it should match the {@link Coral.Datepicker#valueFormat}.\n   \n   See {@link Coral.Calendar#max}\n   \n   @type {String|Date}\n   @default null\n   @htmlattribute max\n   */\n  get max() {\n    return this._elements.calendar.max;\n  }\n  set max(value) {\n    this._elements.calendar.max = value;\n  }\n  \n  /**\n   The format used to display the current month and year.\n   'MMMM YYYY' is supported by default. Include momentjs to support additional format string options see\n   http://momentjs.com/docs/#/displaying/.\n   \n   See {@link Coral.Calendar#startDay}\n   \n   @type {String}\n   @default \"MMMM YYYY\"\n   @htmlattribute headerformat\n   */\n  get headerFormat() {\n    return this._elements.calendar.headerFormat;\n  }\n  set headerFormat(value) {\n    this._elements.calendar.headerFormat = value;\n  }\n  \n  /**\n   Defines the start day for the week, 0 = Sunday, 1 = Monday etc., as depicted on the calendar days grid.\n   \n   See {@link Coral.Calendar#startDay}\n   \n   @type {Number}\n   @default 0\n   @htmlattribute startday\n   */\n  get startDay() {\n    return this._elements.calendar.startDay;\n  }\n  set startDay(value) {\n    this._elements.calendar.startDay = value;\n  }\n  \n  /**\n   The current value. When set to \"today\", the value is coerced into the client's local date expressed as string\n   formatted in accordance to the set <code>valueFormat</code>.\n   \n   See {@link Coral.Calendar#value}\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    return this._getValueAsString(this._value, this.valueFormat);\n  }\n  set value(value) {\n    // This is used to change the value if valueformat is also set but afterwards\n    this._originalValue = value;\n    \n    this._value = toMoment(value, this.valueFormat);\n  \n    this._elements.calendar.valueAsDate = this.valueAsDate;\n    this._elements.clock.valueAsDate = this.valueAsDate;\n    this._elements.input.value = this._getValueAsString(this._value, this.displayFormat);\n    this._elements.hiddenInput.value = this.value;\n  }\n  \n  /**\n   Short hint that describes the expected value of the Datepicker. It is displayed when the Datepicker is empty.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute placeholder\n   @htmlattributereflected\n   */\n  get placeholder() {\n    return this._elements.input.placeholder;\n  }\n  set placeholder(value) {\n    this._elements.input.placeholder = value;\n    this._reflectAttribute('placeholder', this.placeholder);\n  }\n  \n  /**\n   The datepicker's variant. See {@link DatepickerVariantEnum}.\n   \n   @type {DatepickerVariantEnum}\n   @default DatepickerVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n  \n    // passes down the variant to the underlying components\n    // we have to do this because default of button is not 'default', but 'secondary'\n    this._elements.toggle.classList.toggle('_coral-Button--dropdown', this._variant === variant.DEFAULT);\n    this._elements.toggle.classList.toggle('_coral-Button--quiet--dropdown', this._variant === variant.QUIET);\n    this._elements.input.variant = this._variant;\n  \n    // removes every existing variant\n    this.classList.remove(...ALL_VARIANT_CLASSES);\n  \n    if (this._variant !== variant.DEFAULT) {\n      this.classList.add(`${CLASSNAME}--${this._variant}`);\n    }\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._elements.hiddenInput.name;\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n  \n    this._elements.hiddenInput.name = value;\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.setAttribute('aria-disabled', this._disabled);\n    this.classList.toggle('is-disabled', this._disabled);\n  \n    this._elements.input.disabled = this._disabled;\n    this._elements.hiddenInput.disabled = this._disabled;\n    this._elements.toggle.disabled = this._disabled || this.readOnly;\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#invalid}.\n   */\n  get invalid() {\n    return super.invalid;\n  }\n  set invalid(value) {\n    super.invalid = value;\n    \n    this.classList.toggle('is-invalid', this.invalid);\n    this._elements.toggle.classList.toggle('is-invalid', this.invalid);\n    this._elements.input.invalid = this.invalid;\n    this._elements.input.setAttribute('aria-invalid', this.invalid);\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    this._elements.toggle.classList.toggle('is-invalid', this._required);\n    this.setAttribute('aria-required', this._required);\n    \n    this._elements.input.required = this._required;\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    this.setAttribute('aria-readonly', this._readOnly);\n  \n    this._elements.input.readOnly = this._readOnly;\n    this._elements.toggle.disabled = this._readOnly || this.disabled;\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#labelledBy}.\n   */\n  get labelledBy() {\n    return super.labelledBy;\n  }\n  set labelledBy(value) {\n    super.labelledBy = value;\n    \n    // in case the user focuses the buttons, he will still get a notion of the usage of the component\n    this[this.labelledBy ? 'setAttribute' : 'removeAttribute']('aria-labelledby', this.labelledBy);\n  }\n  \n  /**\n   When <code>true</code> the component will default to the native input for the date selection. When\n   {@link Coral.Datepicker.type.DATETIME} has been set, it will still use the Coral way because mobile browsers\n   cannot handle a datetime input.\n   \n   @ignore\n   */\n  get _useNativeInput() {\n    return this.__useNativeInput;\n  }\n  set _useNativeInput(value) {\n    this.__useNativeInput = value;\n  \n    // we ignore _useNativeInput when the type is datetime because it is not supported by mobile libraries\n    if (this.__useNativeInput && this.type !== type.DATETIME) {\n      // Switch to native date/time picker:\n      this._elements.toggle.hidden = true;\n      this._elements.input.setAttribute('type', this.type);\n    \n      // Hide pop-over and remove related attributes:\n      this._elements.overlay.hidden = true;\n      this.removeAttribute('aria-haspopup');\n      this.removeAttribute('aria-expanded');\n      this.removeAttribute('aria-owns');\n    }\n    else {\n      // Switch to Calendar picker\n      this._elements.toggle.hidden = false;\n      this._elements.input.setAttribute('type', 'text');\n    \n      // Show pop-over and add related attributes:\n      this._elements.overlay.hidden = false;\n      this.setAttribute('aria-haspopup', 'true');\n      this.setAttribute('aria-expanded', 'false');\n      this.setAttribute('aria-owns', this._elements.overlay.id);\n    }\n  }\n  \n  /** @ignore */\n  _onPopoverBeforeOpen() {\n    this._elements.calendar._validateCalendar();\n    this._renderCalendar();\n  }\n  \n  /**\n   Matches the accessibility to the state of the popover.\n   \n   @ignore\n   */\n  _onPopoverOpenOrClose() {\n    this.setAttribute('aria-expanded', this._elements.overlay.open);\n    \n    // set focus to calendar grid\n    if (this._elements.overlay.open) {\n      if (this.type === type.TIME) {\n        this._elements.clock.focus();\n      }\n      else {\n        this._elements.calendar.focus();\n      }\n    }\n  }\n  \n  /** @ignore */\n  _onCalendarDayClick(event) {\n    if (event.target.tagName === 'A') {\n      // since a selection has been made, we close the popover. we cannot use the _onChange listener to handle this\n      // because clicking on the same button will not trigger a change event\n      this._elements.overlay.open = false;\n    }\n  }\n  \n  /** @ignore */\n  _onInputChange(event) {\n    // because we are reimplementing the form field mix in, we will have to stop the propagation and trigger the\n    // 'change' event from here\n    event.stopPropagation();\n    \n    this.value = new DateTime.Moment(event.target.value, this.displayFormat);\n    this._validateValue();\n    \n    this.trigger('change');\n  }\n  \n  /** @ignore */\n  _onChange(event) {\n    if (event.target.tagName === 'CORAL-CALENDAR' || event.target.tagName === 'CORAL-CLOCK') {\n      event.stopPropagation();\n  \n      // we create the new value using both calendar and clock controls\n      // datepicker should set the current time as default when no time is set, but a date was chosen (if in datetime\n      // mode)\n      this.value = this._mergeCalendarAndClockDates(true);\n      this._validateValue();\n  \n      this.trigger('change');\n    }\n  }\n  \n  /** @private */\n  _onAltDownKey(event) {\n    // Stop any consequences of pressing the key\n    event.preventDefault();\n    \n    if (!this._elements.overlay.open) {\n      this._elements.overlay.open = true;\n    }\n  }\n  \n  /** @ignore */\n  _validateValue() {\n    // calendar validates only on user input, we have to manually force the validation\n    this._elements.calendar._validateCalendar();\n    \n    // check if the current value is valid and update the internal state of the component\n    if (this.type === type.DATE) {\n      this.invalid = this._elements.calendar.invalid;\n    }\n    else if (this.type === type.TIME) {\n      this.invalid = this._elements.clock.invalid;\n    }\n    else {\n      this.invalid = this._elements.calendar.invalid || this._elements.clock.invalid;\n    }\n  }\n  \n  /** @ignore */\n  _mergeCalendarAndClockDates(autoSetTimeIfNeeded) {\n    let value = new DateTime.Moment(this._elements.calendar.valueAsDate);\n    let time = this._elements.clock.valueAsDate;\n    \n    if (autoSetTimeIfNeeded && value && !time && this.type === type.DATETIME) {\n      // datepicker should set the current time as default when no time is set, but a date was chosen (if in datetime\n      // mode)\n      time = new DateTime.Moment().toDate();\n    }\n    \n    if (time) {\n      if (!value.isValid()) {\n        value = new DateTime.Moment();\n      }\n      \n      value.hours(time.getHours());\n      value.minutes(time.getMinutes());\n    }\n    \n    return value;\n  }\n  \n  /**\n   Helper class that converts the internal moment value into a String using the provided date format. If the value is\n   invalid, empty string will be returned.\n   \n   @param {?Moment} value\n   The value representing the date. It has to be a moment object or <code>null</code>\n   @param {String} format\n   The Date format to be used.\n   \n   @ignore\n   */\n  _getValueAsString(value, format) {\n    return value && value.isValid() ? value.format(format) : '';\n  }\n  \n  /** @ignore */\n  _renderCalendar() {\n    if (this._elements.overlay.content.innerHTML === '') {\n      this._elements.overlay.content.appendChild(this._calendarFragment);\n      this._calendarFragment = undefined;\n    }\n  }\n  \n  /**\n   Returns {@link Datepicker} variants.\n   \n   @return {DatepickerVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /**\n   Returns {@link Datepicker} types.\n   \n   @return {DatepickerTypeEnum}\n   */\n  static get type() { return type; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'min',\n      'max',\n      'type',\n      'placeholder',\n      'startday',\n      'startDay',\n      'headerFormat',\n      'headerFormat',\n      'displayformat',\n      'displayFormat',\n      'valueformat',\n      'valueFormat',\n      'variant'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // a11y we only have AUTO mode.\n    this._useNativeInput = IS_MOBILE_DEVICE;\n    this.setAttribute('role', 'datepicker');\n    \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n    // \"type\" takes care of reflecting \"displayFormat\" and \"valueFormat\"\n    if (!this._type) { this.type = type.DATE; }\n    \n    // clean up to be able to clone it\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n  \n    const frag = document.createDocumentFragment();\n  \n    // Cannot be open by default when rendered\n    this._elements.overlay.removeAttribute('open');\n    \n    // Render template\n    frag.appendChild(this._elements.overlay);\n    frag.appendChild(this._elements.hiddenInput);\n    frag.appendChild(this._elements.input);\n    frag.appendChild(this._elements.toggle);\n    \n    this.appendChild(frag);\n  \n    // Point at the button from the bottom\n    this._elements.overlay.target = this._elements.toggle;\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    \n    // In case it was moved out don't forget to remove it\n    if (!this.contains(this._elements.overlay)) {\n      this._elements.overlay.remove();\n    }\n  }\n}\n\nexport default Datepicker;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport translations from './i18n/translations.json';\nimport {strings, commons} from '../coralui-util';\nimport Datepicker from './src/scripts/Datepicker';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-datepicker': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-datepicker', Datepicker);\n\nexport {Datepicker};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"slider\"] = document.createElement(\"div\");\n  el0.setAttribute(\"handle\", \"slider\");\n  el0.className += \" _coral-Drawer-slider\";\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = this[\"contentWrapper\"] = document.createElement(\"div\");\n  el2.setAttribute(\"handle\", \"contentWrapper\");\n  el2.className += \" _coral-Drawer-content\";\n  el0.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  el0.appendChild(el3);\n  frag.appendChild(el0);\n  var el4 = document.createTextNode(\"\\n\");\n  frag.appendChild(el4);\n  var el5 = this[\"toggle\"] = document.createElement(\"div\");\n  el5.className += \" _coral-Drawer-toggle\";\n  el5.setAttribute(\"handle\", \"toggle\");\n  var el6 = document.createTextNode(\"\\n  \");\n  el5.appendChild(el6);\n  var el7 = this[\"toggleButton\"] = document.createElement(\"button\",\"coral-button\");\n  el7.className += \" _coral-Drawer-toggleButton\";\n  el7.setAttribute(\"type\", \"button\");\n  el7.setAttribute(\"handle\", \"toggleButton\");\n  el7.setAttribute(\"is\", \"coral-button\");\n  el7.setAttribute(\"variant\", \"quiet\");\n  el5.appendChild(el7);\n  var el8 = document.createTextNode(\"\\n\");\n  el5.appendChild(el8);\n  frag.appendChild(el5);\n  var el9 = document.createTextNode(\"\\n\");\n  frag.appendChild(el9);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport '../../../coralui-component-button';\nimport base from '../templates/base';\nimport {commons, transform, validate} from '../../../coralui-util';\n\n/**\n Enumeration for {@link Drawer} directions.\n \n @typedef {Object} DrawerDirectionEnum\n \n @property {String} DOWN\n A drawer with a toggle button on the bottom.\n @property {String} UP\n A drawer with a toggle button on top.\n */\nconst direction = {\n  DOWN: 'down',\n  UP: 'up'\n};\n\n// The drawer's base classname\nconst CLASSNAME = '_coral-Drawer';\n\n// A string of all possible direction classnames\nconst ALL_DIRECTION_CLASSES = [];\nfor (const directionValue in direction) {\n  ALL_DIRECTION_CLASSES.push(`${CLASSNAME}--${direction[directionValue]}`);\n}\n\n/**\n @class Coral.Drawer\n @classdesc A Drawer component to display content that can be opened and closed with a sliding animation.\n @htmltag coral-drawer\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Drawer extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Templates\n    this._elements = {\n      content: this.querySelector('coral-drawer-content') || document.createElement('coral-drawer-content')\n    };\n    base.call(this._elements);\n    \n    // Events\n    this._delegateEvents({\n      'click ._coral-Drawer-toggleButton': '_onClick'\n    });\n  }\n  \n  /**\n   Whether this item is disabled or not. This will stop every user interaction with the item.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n  \n    this.setAttribute('aria-disabled', this._disabled);\n    this._elements.toggle.hidden = this._disabled;\n  }\n  \n  /**\n   The drawer's content element.\n   \n   @type {HTMLElement}\n   @htmlttribute content\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-drawer-content',\n      insert: function(content) {\n        this._elements.contentWrapper.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   The drawer's direction. See {@link DrawerDirectionEnum}.\n   \n   @type {String}\n   @default DrawerDirectionEnum.DOWN\n   @htmlattribute direction\n   @htmlattributereflected\n   */\n  get direction() {\n    return this._direction || direction.DOWN;\n  }\n  set direction(value) {\n    value = transform.string(value).toLowerCase();\n    this._direction = validate.enumeration(direction)(value) && value || direction.DOWN;\n    this._reflectAttribute('direction', this._direction);\n  \n    this.classList.remove(...ALL_DIRECTION_CLASSES);\n    this.classList.add(`${CLASSNAME}--${this._direction}`);\n  }\n  \n  /**\n   Whether the Drawer is expanded or not.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute open\n   @htmlattributereflected\n   */\n  get open() {\n    return this._open || false;\n  }\n  set open(value) {\n    const silenced = this._silenced;\n    const self = this;\n    \n    this._open = transform.booleanAttr(value);\n    this._reflectAttribute('open', this._open);\n  \n    this.setAttribute('aria-expanded', this._open);\n  \n    // eslint-disable-next-line no-unused-vars\n    let offsetHeight;\n    \n    // Handle slider animation\n    const slider = this._elements.slider;\n    \n    // Don't animate on initialization\n    if (this._animate) {\n      commons.transitionEnd(slider, () => {\n        // Keep it silenced\n        self._silenced = silenced;\n        \n        // Remove height as we want the drawer to naturally grow if content is added later\n        if (self._open) {\n          slider.style.height = '';\n        }\n      \n        // Trigger once transition is finished\n        self.trigger(`coral-drawer:${(self._open ? 'open' : 'close')}`);\n        self._silenced = false;\n      });\n    \n      if (!this._open) {\n        // Force height to enable transition\n        slider.style.height = `${slider.scrollHeight}px`;\n      }\n      \n      // Do transition in next task as browser might batch up the height property change before painting\n      window.setTimeout(() => {\n        slider.style.height = self._open ? `${slider.scrollHeight}px` : 0;\n      }, 10);\n    }\n    else {\n      // Make sure it's animated next time\n      this._animate = true;\n    \n      // Hide it on initialization if closed\n      if (!this._open) {\n        slider.style.height = 0;\n      }\n    }\n  }\n  \n  /** @private */\n  _onClick() {\n    this.open = !this.open;\n  }\n  \n  get _contentZones() { return {'coral-drawer-content': 'content'}; }\n  \n  /**\n   Returns {@link Drawer} direction options.\n   \n   @return {DrawerDirectionEnum}\n   */\n  static get direction() { return direction; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return [\n      'disabled',\n      'direction',\n      'open'\n    ];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME, 'coral-Well');\n    \n    // Default reflected attributes\n    if (!this._direction) { this.direction = direction.DOWN; }\n    if (!this._open) { this.open = false; }\n  \n    // Create a fragment\n    const fragment = document.createDocumentFragment();\n  \n    const templateHandleNames = ['slider', 'toggle'];\n  \n    // Render the template\n    fragment.appendChild(this._elements.slider);\n    fragment.appendChild(this._elements.toggle);\n  \n    // Fetch or create the content content zone element\n    const content = this._elements.content;\n  \n    // Move any remaining elements into the content sub-component\n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && templateHandleNames.indexOf(child.getAttribute('handle')) === -1) {\n        // Add non-template elements to the label\n        content.appendChild(child);\n      }\n      else {\n        // Remove anything else\n        this.removeChild(child);\n      }\n    }\n  \n    // Add the frag to the component\n    this.appendChild(fragment);\n  \n    // Assign the content zone\n    this.content = content;\n  }\n  \n  /**\n   Triggered when the {@link Drawer} is opened.\n   \n   @typedef {CustomEvent} coral-drawer:open\n   */\n  \n  /**\n   Triggered when the {@link Drawer} is closed.\n   \n   @typedef {CustomEvent} coral-drawer:close\n   */\n}\n\nexport default Drawer;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Drawer.Content\n @classdesc Drawer content component\n @htmltag coral-drawer-content\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-drawer-content');\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Drawer from './src/scripts/Drawer';\nimport DrawerContent from './src/scripts/DrawerContent';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-drawer', Drawer);\n\nDrawer.Content = DrawerContent;\n\nexport {Drawer};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport MIME_TYPES from '../data/mimetypes.json';\nimport {transform, validate} from '../../../coralui-util';\n\n/**\n Enumeration for {@link FileUploadItem} response types.\n \n @typedef {Object} FileUploadItemResponseTypeEnum\n \n @property {String} TEXT\n String type.\n @property {String} ARRAY_BUFFER\n Array buffer type.\n @property {String} BLOB\n Blob type.\n @property {String} DOCUMENT\n Document type.\n @property {String} JSON\n JavaScript object, parsed from a JSON string returned by the server.\n */\nconst responseType = {\n  TEXT: 'text',\n  ARRAY_BUFFER: 'arraybuffer',\n  BLOB: 'blob',\n  DOCUMENT: 'document',\n  JSON: 'json'\n};\n\n// eg text/plain\nconst MIME_TYPE_REGEXP = /(.+)\\/(.+)$/;\n// eg .txt\nconst FILE_EXTENSION_REGEXP = /\\.(.+)$/;\n// eg text\nconst SHORTCUT_REGEXP = /.*/;\nconst MIME_TYPE_AUDIO = 'audio/*';\nconst MIME_TYPE_IMAGE = 'image/*';\nconst MIME_TYPE_VIDEO = 'video/*';\n\n/**\n @class Coral.FileUpload.Item\n @classdesc A FileUpload item encapsulating file meta-data\n @param {File|HTMLElement} file\n The file element.\n */\nclass FileUploadItem {\n  /**\n   Takes a {File} as argument.\n   \n   @param {File} file\n   */\n  constructor(file) {\n    this._originalFile = file;\n    this._xhr = null;\n  }\n  \n  /**\n   The File.\n   \n   @name file\n   @readonly\n   @type {File}\n   */\n  get file() {\n    return this._originalFile;\n  }\n  \n  /**\n   Array of additional parameters as key:value to be uploaded with the file.\n   A parameter must contain a <code>name</code> key:value and optionally a <code>value</code> key:value.\n   \n   @name parameters\n   @type {Array.<Object>}\n   @default []\n   */\n  get parameters() {\n    return this._parameters || [];\n  }\n  set parameters(value) {\n    const isValid = Array.isArray(value) && value.every((el) => el && el.name);\n  \n    if (isValid) {\n      this._parameters = value;\n    }\n  }\n  \n  /**\n   The item xhr <code>withCredentials</code> property.\n   \n   @name withCredentials\n   @type {Boolean}\n   @default false\n   */\n  get withCredentials() {\n    return this._withCredentials || false;\n  }\n  set withCredentials(value) {\n    this._withCredentials = transform.boolean(value);\n  }\n  \n  /**\n   The item xhr <code>timeout</code> property.\n   \n   @name timeout\n   @type {Number}\n   @default 0\n   */\n  get timeout() {\n    return this._timeout || 0;\n  }\n  set timeout(value) {\n    const timeout = transform.number(value);\n    if (timeout !== null) {\n      this._timeout = timeout;\n      if (this._xhr) {\n        this._xhr.timeout = timeout;\n      }\n    }\n  }\n  \n  /**\n   The item xhr <code>responseType</code> property. See {@link FileUploadItemResponseTypeEnum}.\n   \n   @name responseType\n   @default {FileUploadItemResponseTypeEnum.TEXT}\n   @type {String}\n   */\n  get responseType() {\n    return this._responseType || responseType.TEXT;\n  }\n  set responseType(value) {\n    value = transform.string(value).toLowerCase();\n    this._responseType = validate.enumeration(responseType)(value) && value || responseType.TEXT;\n    if (this._xhr) {\n      this._xhr.responseType = value;\n    }\n  }\n  \n  /**\n   The item xhr <code>readyState</code> property.\n   \n   @name readyState\n   @readonly\n   @default 0\n   @type {Number}\n   */\n  get readyState() {\n    return this._xhr ? this._xhr.readyState : this._readyState || 0;\n  }\n  \n  /**\n   The item xhr <code>responseType</code> property. Depends on {@link Coral.FileUpload.Item#responseType}.\n   \n   @name response\n   @readonly\n   @default \"\"\n   @type {String|ArrayBuffer|Blob|Document}\n   */\n  get response() {\n    return this._xhr ? this._xhr.response : this._response || '';\n  }\n  \n  /**\n   The item xhr <code>responseText</code> property.\n   \n   @name responseText\n   @readonly\n   @default \"\"\n   @type {String}\n   */\n  get responseText() {\n    return this._xhr ? this._xhr.responseText : this._responseText || '';\n  }\n  \n  /**\n   The item xhr <code>responseXML</code> property.\n   \n   @name responseXML\n   @readonly\n   @default null\n   @type {HTMLElement}\n   */\n  get responseXML() {\n    return this._xhr ? this._xhr.responseXML : this._responseXML || null;\n  }\n  \n  /**\n   The item xhr <code>status</code> property.\n   \n   @name status\n   @readonly\n   @default 0\n   @type {Number}\n   */\n  get status() {\n    return this._xhr ? this._xhr.status : this._status || 0;\n  }\n  \n  /**\n   The item xhr <code>statusText</code> property.\n   \n   @name statusText\n   @readonly\n   @default \"\"\n   @type {String}\n   */\n  get statusText() {\n    return this._xhr ? this._xhr.statusText : this._statusText || '';\n  }\n  \n  /** @private */\n  _isMimeTypeAllowed(acceptedMimeTypes) {\n    let isAllowed = false;\n    \n    // Unrecognized browser mime types have a file type of ''.\n    const fileType = this.file.type || 'application/unknown';\n    \n    if (!fileType.match(MIME_TYPE_REGEXP)) {\n      // File mime type is erroneous\n      return false;\n    }\n    \n    return acceptedMimeTypes.split(',').some((allowedMimeType) => {\n      allowedMimeType = allowedMimeType.trim();\n      \n      if (allowedMimeType === '*' ||\n        allowedMimeType === '.*' ||\n        allowedMimeType === '*/*' ||\n        fileType === 'application/unknown') {\n        // Explicit wildcard case: allow any file\n        // Allow unknown mime types\n        isAllowed = true;\n      }\n      else if (allowedMimeType.match(MIME_TYPE_REGEXP)) {\n        if (allowedMimeType === MIME_TYPE_AUDIO) {\n          isAllowed = fileType.indexOf(MIME_TYPE_AUDIO.slice(0, -1)) === 0;\n        }\n        else if (allowedMimeType === MIME_TYPE_IMAGE) {\n          isAllowed = fileType.indexOf(MIME_TYPE_IMAGE.slice(0, -1)) === 0;\n        }\n        else if (allowedMimeType === MIME_TYPE_VIDEO) {\n          isAllowed = fileType.indexOf(MIME_TYPE_VIDEO.slice(0, -1)) === 0;\n        }\n        else {\n          // Proper mime type case: directly compare with file mime type\n          isAllowed = fileType === allowedMimeType;\n        }\n      }\n      else if (allowedMimeType.match(FILE_EXTENSION_REGEXP)) {\n        // File extension case\n        const allowedMimeTypes = MIME_TYPES[allowedMimeType];\n  \n        // Depending on OS and browser, a file extension can map to different mime types\n        // e.g .csv maps to \"text/csv\" on Mac OS and to \"application/vnd.ms-excel\" on Windows\n        if (Array.isArray(allowedMimeTypes)) {\n          isAllowed = allowedMimeTypes.some((mimeType) => fileType === mimeType);\n        }\n        else {\n          isAllowed = fileType === MIME_TYPES[allowedMimeType];\n        }\n      }\n      else if (allowedMimeType.match(SHORTCUT_REGEXP)) {\n        // \"Shortcut\" case: only compare first part of the file mime type with the shortcut\n        isAllowed = fileType.split('/')[0] === allowedMimeType;\n      }\n      \n      // Break the loop if file mime type is allowed\n      return isAllowed;\n    });\n  }\n  \n  /**\n   Returns {@link FileUploadItem} response types.\n   \n   @return {FileUploadItemResponseTypeEnum}\n   */\n  static get responseType() { return responseType; }\n}\n\nexport default FileUploadItem;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"input\"] = document.createElement(\"input\");\n  el0.id = data_0[\"commons\"][\"getUID\"]();\n  el0.setAttribute(\"handle\", \"input\");\n  el0.className += \" _coral-FileUpload-input is-unselectable\";\n  el0.setAttribute(\"tabindex\", \"-1\");\n  el0.setAttribute(\"name\", \"\");\n  el0.setAttribute(\"type\", \"file\");\n  el0.setAttribute(\"accept\", \"\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport FileUploadItem from './FileUploadItem';\nimport base from '../templates/base';\nimport {transform, commons, validate} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-FileUpload';\n\nconst XHR_EVENT_NAMES = ['loadstart', 'progress', 'load', 'error', 'loadend', 'readystatechange', 'abort', 'timeout'];\n\n/**\n Enumeration for {@link FileUpload} HTTP methods that can be used to upload files.\n \n @typedef {Object} FileUploadMethodEnum\n \n @property {String} POST\n Send a POST request. Used when creating a resource.\n @property {String} PUT\n Send a PUT request. Used when replacing a resource.\n @property {String} PATCH\n Send a PATCH request. Used when partially updating a resource.\n */\nconst method = {\n  POST: 'POST',\n  PUT: 'PUT',\n  PATCH: 'PATCH'\n};\n\n/**\n @class Coral.FileUpload\n @classdesc A FileUpload component that manages the upload process of multiple files. Child elements of FileUpload can\n be given special attributes to enable functionality:\n - <code>[coral-fileupload-select]</code>. Click to choose file(s), replacing existing files.\n - <code>[coral-fileupload-dropzone]</code>. Drag and drop files to choose file(s), replacing existing files.\n - <code>[coral-fileupload-clear]</code>. Click to remove all files from the queue.\n - <code>[coral-fileupload-submit]</code>. Click to start uploading.\n - <code>[coral-fileupload-abort]</code>. Click to abort all uploads.\n - <code>[coral-fileupload-abortfile=\"filename.txt\"]</code>. Click to abort a specific file, leaving it in the queue.\n - <code>[coral-fileupload-removefile=\"filename.txt\"]</code>. Click to remove a specific file from the queue.\n - <code>[coral-fileupload-uploadfile=\"filename.txt\"]</code>. Click to start uploading a specific file.\n \n @htmltag coral-fileupload\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass FileUpload extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents(commons.extend(this._events, {\n      // Clickable hooks\n      'click [coral-fileupload-submit]': '_onSubmitButtonClick',\n      'click [coral-fileupload-clear]': 'clear',\n      'click [coral-fileupload-select]': '_showFileDialog',\n      'click [coral-fileupload-abort]': 'abort',\n      'click [coral-fileupload-abortfile]': '_onAbortFileClick',\n      'click [coral-fileupload-removefile]': '_onRemoveFileClick',\n      'click [coral-fileupload-uploadfile]': '_onUploadFileClick',\n  \n      // Drag & Drop zones\n      'dragenter [coral-fileupload-dropzone]': '_onDragAndDrop',\n      'dragover [coral-fileupload-dropzone]': '_onDragAndDrop',\n      'dragleave [handle=\"input\"]': '_onDragAndDrop',\n      'drop [handle=\"input\"]': '_onDragAndDrop',\n  \n      // Accessibility\n      'capture:focus [coral-fileupload-select]': '_onButtonFocusIn',\n      'capture:focus [handle=\"input\"]': '_onInputFocusIn',\n      'capture:blur [handle=\"input\"]': '_onInputFocusOut'\n    }));\n    \n    // Prepare templates\n    this._elements = {};\n    base.call(this._elements, {commons});\n  \n    // Pre-define labellable element\n    this._labellableElement = this._elements.input;\n    \n    // Used for items\n    this._uploadQueue = [];\n  \n    // this should refer to the fileupload\n    this._doAddDragClass = this._doAddDragClass.bind(this);\n    this._doRemoveDragClass = this._doRemoveDragClass.bind(this);\n    this._positionInputOnDropZone = this._positionInputOnDropZone.bind(this);\n    \n    // Reposition the input under the specified dropzone\n    this._observer = new MutationObserver(this._positionInputOnDropZone);\n    this._observer.observe(this, {\n      childList: true,\n      attributes: true,\n      attributeFilter: ['coral-fileupload-dropzone'],\n      subtree: true\n    });\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._elements.input.name;\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n    \n    this._elements.input.name = value;\n  }\n  \n  /**\n   This field's current value.\n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    const item = this._uploadQueue ? this._getQueueItem(0) : null;\n  \n    // The first selected filename, or the empty string if no files are selected.\n    return item ? `C:\\\\fakepath\\\\${item.file.name}` : '';\n  }\n  set value(value) {\n    if (value === '' || value === null) {\n      this._clearQueue();\n      this._clearFileInputValue();\n    }\n    else {\n      // Throws exception if value is different than an empty string or null\n      throw new Error('Coral.FileUpload accepts a filename, which may only be programmatically set to empty string.');\n    }\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._elements.input.disabled;\n  }\n  set disabled(value) {\n    this._elements.input.disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this.disabled);\n  \n    this.classList.toggle('is-disabled', this.disabled);\n    this._setElementState();\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#invalid}.\n   */\n  get invalid() {\n    return super.invalid;\n  }\n  set invalid(value) {\n    super.invalid = value;\n  \n    this._elements.input.setAttribute('aria-invalid', this.invalid);\n    this._setElementState();\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._elements.input.required;\n  }\n  set required(value) {\n    this._elements.input.required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this.required);\n    \n    this.setAttribute('aria-required', this.required);\n    this.classList.toggle('is-required', this.required);\n    this._setElementState();\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n  \n    this._elements.input.disabled = this._readOnly;\n    this.setAttribute('aria-readonly', this._readOnly);\n    this.classList.toggle('is-readOnly', this._readOnly);\n    this._setElementState();\n  }\n  \n  /**\n   The names of the currently selected files.\n   When {@link Coral.FileUpload#multiple} is <code>false</code>, this will be an array of length 1.\n   \n   @type {Array.<String>}\n   */\n  get values() {\n    let values = this._uploadQueue.map((item) => `C:\\\\fakepath\\\\${item.file.name}`);\n  \n    if (values.length && !this.multiple) {\n      values = [values[0]];\n    }\n  \n    return values;\n  }\n  set values(values) {\n    if (Array.isArray(values)) {\n      if (values.length) {\n        this.value = values[0];\n      }\n      else {\n        this.value = '';\n      }\n    }\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#labelledBy}.\n   */\n  get labelledBy() {\n    return super.labelledBy;\n  }\n  set labelledBy(value) {\n    super.labelledBy = value;\n  \n    // The specified labelledBy property.\n    const labelledBy = this.labelledBy;\n  \n    // An array of element ids to label control, the last being the select button element id.\n    const ids = [];\n  \n    const button = this.querySelector('[coral-fileupload-select]');\n  \n    if (button) {\n      ids.push(button.id);\n    }\n  \n    // If a labelledBy property exists,\n    if (labelledBy) {\n      // prepend the labelledBy value to the ids array\n      ids.unshift(labelledBy);\n    }\n  \n    // Set aria-labelledby attribute on the labellable element joining ids array into space-delimited list of ids.\n    this._elements.input.setAttribute('aria-labelledby', ids.join(' '));\n  \n    if (labelledBy) {\n      // Set label for attribute\n      const labelElement = document.getElementById(labelledBy);\n      if (labelElement && labelElement.tagName === 'LABEL') {\n        labelElement.setAttribute('for', this._elements.input.id);\n        this._labelElement = labelElement;\n      }\n    }\n    // Remove label for attribute\n    else if (this._labelElement) {\n      this._labelElement.removeAttribute('for');\n    }\n  }\n  \n  /**\n   Array of additional parameters as key:value to send in addition of files.\n   A parameter must contain a <code>name</code> key:value and optionally a <code>value</code> key:value.\n   \n   @type {Array.<Object>}\n   @default []\n   */\n  get parameters() {\n    return this._parameters || [];\n  }\n  set parameters(values) {\n    // Verify that every item has a name\n    const isValid = Array.isArray(values) && values.every((el) => el && el.name);\n    \n    if (isValid) {\n      this._parameters = values;\n  \n      if (!this.async) {\n        Array.prototype.forEach.call(this.querySelectorAll('input[type=\"hidden\"]'), (input) => {\n          input.parentNode.removeChild(input);\n        });\n    \n        // Add extra parameters\n        this.parameters.forEach((param) => {\n          const input = document.createElement('input');\n          input.type = 'hidden';\n          input.name = param.name;\n          input.value = param.value;\n      \n          this.appendChild(input);\n        }, this);\n      }\n    }\n  }\n  \n  /**\n   Whether files should be uploaded asynchronously via XHR or synchronously e.g. within a\n   <code>&lt;form&gt;</code> tag. One option excludes the other. Setting a new <code>async</code> value removes all\n   files from the queue.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute async\n   @htmlattributereflected\n   */\n  get async() {\n    return this._async || false;\n  }\n  set async(value) {\n    this._async = transform.booleanAttr(value);\n    this._reflectAttribute('async', this._async);\n  \n    // Sync extra parameters in case of form submission\n    if (!this._async) {\n      this.parameters = this.parameters;\n    }\n  \n    // Clear file selection\n    if (this._uploadQueue) {\n      this._clearQueue();\n      this._clearFileInputValue();\n    }\n  }\n  \n  /**\n   The URL where the upload request should be sent. When used within a <code>&lt;form&gt;</code> tag to upload\n   synchronously, the action of the form is used. If an element is clicked that has a\n   <code>[coral-fileupload-submit]</code> attribute as well as a <code>[formaction]</code> attribute, the action of\n   the clicked element will be used. Set this property before calling {@link Coral.FileUpload#upload} to reset the\n   action set by a click.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute action\n   @htmlattributereflected\n   */\n  get action() {\n    return this._action || '';\n  }\n  set action(value) {\n    this._action = transform.string(value);\n    this._reflectAttribute('action', this._action);\n  \n    // Reset button action as action was set explicitly\n    this._buttonAction = null;\n  }\n  \n  /**\n   The HTTP method to use when uploading files asynchronously. When used within a <code>&lt;form&gt;</code> tag to\n   upload synchronously, the method of the form is used. If an element is clicked that has a\n   <code>[coral-fileupload-submit]</code> attribute as well as a <code>[formmethod]</code> attribute, the method of\n   the clicked element will be used. Set this property before calling {@link FileUpload#upload} to reset the\n   method set by a click.\n   See {@link FileUploadMethodEnum}.\n   \n   @type {String}\n   @default FileUploadMethodEnum.POST\n   @htmlattribute method\n   @htmlattributereflected\n   */\n  get method() {\n    return this._method || method.POST;\n  }\n  set method(value) {\n    value = transform.string(value).toUpperCase();\n    this._method = validate.enumeration(method)(value) && value || method.POST;\n    this._reflectAttribute('method', this._method);\n    \n    // Reset button method as method was set explcitly\n    this._buttonMethod = null;\n  }\n  \n  /**\n   Whether more than one file can be chosen at the same time to upload.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute multiple\n   @htmlattributereflected\n   */\n  get multiple() {\n    return this._elements.input.multiple;\n  }\n  set multiple(value) {\n    this._elements.input.multiple = transform.booleanAttr(value);\n    this._reflectAttribute('multiple', this.multiple);\n  }\n  \n  /**\n   File size limit in bytes for one file. The value of 0 indicates unlimited, which is also the default.\n   \n   @type {Number}\n   @htmlattribute sizelimit\n   @htmlattributereflected\n   @default 0\n   */\n  get sizeLimit() {\n    return this._sizeLimit || 0;\n  }\n  set sizeLimit(value) {\n    this._sizeLimit = transform.number(value);\n    this._reflectAttribute('sizelimit', this._sizeLimit);\n  }\n  \n  /**\n   MIME types allowed for uploading (proper MIME types, wildcard '*' and file extensions are supported). To specify\n   more than one value, separate the values with a comma (e.g.\n   <code>&lt;input accept=\"audio/*,video/*,image/*\" /&gt;</code>.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute accept\n   @htmlattributereflected\n   */\n  get accept() {\n    return this._elements.input.accept;\n  }\n  set accept(value) {\n    this._elements.input.accept = value;\n    this._reflectAttribute('accept', this.accept);\n  }\n  \n  /**\n   Whether the upload should start immediately after file selection.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute autostart\n   @htmlattributereflected\n   */\n  get autoStart() {\n    return this._autoStart || false;\n  }\n  set autoStart(value) {\n    this._autoStart = transform.booleanAttr(value);\n    this._reflectAttribute('autostart', this._autoStart);\n  }\n  \n  /**\n   Files to be uploaded.\n   \n   @readonly\n   @default []\n   @type {Array.<Object>}\n   */\n  get uploadQueue() {\n    return this._uploadQueue;\n  }\n  \n  /** @private */\n  _onButtonFocusIn(event) {\n    // Get the input\n    const input = this._elements.input;\n    \n    // Get the button\n    const button = event.matchedTarget;\n    \n    // Move the input to after the button\n    // This lets the next focused item be the correct one according to tab order\n    button.parentNode.insertBefore(input, button.nextElementSibling);\n    \n    // Make sure the input gets focused on FF\n    window.setTimeout(() => {\n      input.focus();\n    }, 100);\n  }\n  \n  /** @private */\n  _onInputFocusIn() {\n    const button = this.querySelector('[coral-fileupload-select]');\n    if (button) {\n      // Remove from the tab order so shift+tab works\n      button.tabIndex = -1;\n      \n      // So shifting focus backwards with screen reader doesn't create a focus trap\n      button.setAttribute('aria-hidden', true);\n      \n      // Mark the button as focused\n      button.classList.add('is-focused');\n    }\n  }\n  \n  /** @private */\n  _onInputFocusOut() {\n    // Unmark all the focused buttons\n    const button = this.querySelector('[coral-fileupload-select].is-focused');\n    button.classList.remove('is-focused');\n    \n    // Wait a frame so that shifting focus backwards with screen reader doesn't create a focus trap\n    window.requestAnimationFrame(() => {\n      button.tabIndex = 0;\n      // @a11y: aria-hidden is removed to prevent focus trap when navigating backwards using a screen reader's\n      // virtual cursor\n      button.removeAttribute('aria-hidden');\n    });\n  }\n  \n  /** @private */\n  _onAbortFileClick(event) {\n    if (!this.async) {\n      throw new Error('Coral.FileUpload does not support aborting file(s) upload on synchronous mode.');\n    }\n    \n    // Get file to abort\n    const fileName = event.target.getAttribute('coral-fileupload-abortfile');\n    if (fileName) {\n      this._abortFile(fileName);\n    }\n  }\n  \n  /** @private */\n  _onRemoveFileClick(event) {\n    if (!this.async) {\n      throw new Error('Coral.FileUpload does not support removing a file from the queue on synchronous mode.');\n    }\n    else {\n      // Get file to remove\n      const fileName = event.target.getAttribute('coral-fileupload-removefile');\n      if (fileName) {\n        this._clearFile(fileName);\n      }\n    }\n  }\n  \n  /** @private */\n  _onUploadFileClick(event) {\n    if (!this.async) {\n      throw new Error('Coral.FileUpload does not support uploading a file from the queue on synchronous mode.');\n    }\n    \n    // Get file to upload\n    const fileName = event.target.getAttribute('coral-fileupload-uploadfile');\n    if (fileName) {\n      this.upload(fileName);\n    }\n  }\n  \n  /** @private */\n  _onDragAndDrop(event) {\n    // Set dragging classes\n    if (event.type === 'dragenter' || event.type === 'dragover') {\n      this._addDragClass();\n    }\n    else if (event.type === 'dragleave' || event.type === 'drop') {\n      this._removeDragClass();\n    }\n    \n    this.trigger(`coral-fileupload:${event.type}`);\n  }\n  \n  /** @private */\n  _addDragClass() {\n    window.clearTimeout(this._removeClassTimeout);\n    this._removeClassTimeout = window.setTimeout(this._doAddDragClass, 10);\n  }\n  \n  /** @private */\n  _doAddDragClass() {\n    this.classList.add('is-dragging');\n    \n    const dropZone = this.querySelector('[coral-fileupload-dropzone]');\n    if (dropZone) {\n      dropZone.classList.add('is-dragging');\n    }\n    \n    // Put the input on top to enable file drop\n    this._elements.input.classList.remove('is-unselectable');\n  }\n  \n  /** @private */\n  _removeDragClass() {\n    window.clearTimeout(this._removeClassTimeout);\n    this._removeClassTimeout = window.setTimeout(this._doRemoveDragClass, 10);\n  }\n  \n  /** @private */\n  _doRemoveDragClass() {\n    this.classList.remove('is-dragging');\n    \n    const dropZone = this.querySelector('[coral-fileupload-dropzone]');\n    if (dropZone) {\n      dropZone.classList.remove('is-dragging');\n    }\n    \n    // Disable user interaction with the input\n    this._elements.input.classList.add('is-unselectable');\n  }\n  \n  /**\n   Handles clicks to submit buttons\n   \n   @private\n   */\n  _onSubmitButtonClick(event) {\n    const target = event.matchedTarget;\n    \n    // Override or reset the action/method given the button's configuration\n    this._buttonAction = target.getAttribute('formaction');\n    \n    // Make sure the method provided by the button is valid\n    const buttonMethod = transform.string(target.getAttribute('formmethod')).toUpperCase();\n    this._buttonMethod = validate.enumeration(method)(buttonMethod) && buttonMethod || null;\n    \n    // Start the file upload\n    this.upload();\n  }\n  \n  /**\n   Handles changes to the input element.\n   \n   @private\n   */\n  _onInputChange(event) {\n    // Stop the current event\n    event.stopPropagation();\n    \n    if (this.disabled) {\n      return;\n    }\n    \n    const self = this;\n    let files = [];\n    const items = [];\n    \n    // Retrieve files for select event\n    if (event.target.files && event.target.files.length) {\n      this._clearQueue();\n      files = event.target.files;\n      \n      // Verify if multiple file upload is allowed\n      if (!this.multiple) {\n        files = [files[0]];\n      }\n    }\n    // Retrieve files for drop event\n    else if (event.dataTransfer && event.dataTransfer.files && event.dataTransfer.files.length) {\n      this._clearQueue();\n      files = event.dataTransfer.files;\n      \n      // Verify if multiple file upload is allowed\n      if (!this.multiple) {\n        files = [files[0]];\n      }\n    }\n    else {\n      return;\n    }\n    \n    \n    // Initialize items\n    for (let i = 0; i < files.length; i++) {\n      items.push(new FileUploadItem(files[i]));\n    }\n    \n    // Verify if file is allowed to be uploaded and trigger events accordingly\n    items.forEach((item) => {\n      \n      // If file is not found in uploadQueue using filename\n      if (!self._getQueueItemByFilename(item.file.name)) {\n        \n        // Check file size\n        if (self.sizeLimit && item.file.size > self.sizeLimit) {\n          self.trigger('coral-fileupload:filesizeexceeded', {item});\n        }\n        // Check mime type\n        else if (self.accept && !item._isMimeTypeAllowed(self.accept)) {\n          self.trigger('coral-fileupload:filemimetyperejected', {item});\n        }\n        else {\n          // Add item to queue\n          self._uploadQueue.push(item);\n          \n          self.trigger('coral-fileupload:fileadded', {item});\n        }\n      }\n    });\n    \n    if (this.autoStart) {\n      this.upload();\n    }\n    \n    // Explicitly re-emit the change event\n    if (this._triggerChangeEvent) {\n      this.trigger('change');\n    }\n    \n    // Clear file input once files are added to the queue to make sure next file selection will trigger a change event\n    if (this.async) {\n      this._clearFileInputValue();\n    }\n  }\n  \n  /**\n   Sets the disabled/readonly state of elements with the associated special attributes\n   \n   @private\n   */\n  _setElementState() {\n    Array.prototype.forEach.call(this.querySelectorAll(\n      '[coral-fileupload-select],' +\n      '[coral-fileupload-dropzone],' +\n      '[coral-fileupload-submit],' +\n      '[coral-fileupload-clear],' +\n      '[coral-fileupload-abort],' +\n      '[coral-fileupload-abortfile],' +\n      '[coral-fileupload-removefile],' +\n      '[coral-fileupload-uploadfile]'\n    ), (item) => {\n      item.classList.toggle('is-invalid', this.invalid);\n      item.classList.toggle('is-disabled', this.disabled);\n      item.classList.toggle('is-required', this.required);\n      item.classList.toggle('is-readOnly', this.readOnly);\n      item[this.disabled || this.readOnly ? 'setAttribute' : 'removeAttribute']('disabled', '');\n    }, this);\n  }\n  \n  /** @private */\n  _clearQueue() {\n    this._uploadQueue.slice().forEach((item) => {\n      this._clearFile(item.file.name);\n    }, this);\n  }\n  \n  /**\n   Clear file selection on the file input\n   \n   @private\n   */\n  _clearFileInputValue() {\n    this._elements.input.value = '';\n  }\n  \n  /**\n   Remove a file from the upload queue.\n   \n   @param {String} filename\n   The filename of the file to remove.\n   \n   @private\n   */\n  _clearFile(filename) {\n    const item = this._getQueueItemByFilename(filename);\n    if (item) {\n      // Abort file upload\n      this._abortFile(filename);\n      \n      // Remove file from queue\n      this._uploadQueue.splice(this._getQueueIndex(filename), 1);\n      \n      this.trigger('coral-fileupload:fileremoved', {item});\n    }\n  }\n  \n  /**\n   Uploads a file in the queue. If an array is provided as the first argument, it is used as the parameters.\n   \n   @param filename {String}\n   The name of the file to upload.\n   \n   @private\n   */\n  _uploadFile(filename) {\n    const item = this._getQueueItemByFilename(filename);\n    if (item) {\n      this._abortFile(filename);\n      this._ajaxUpload(item);\n    }\n  }\n  \n  /** @private */\n  _showFileDialog() {\n    // Show the dialog\n    // This ONLY works when the call stack traces back to another click event!\n    this._elements.input.click();\n  }\n  \n  /**\n   Abort specific file upload.\n   \n   @param {String} filename\n   The filename identifies the file to abort.\n   \n   @private\n   */\n  _abortFile(filename) {\n    const item = this._getQueueItemByFilename(filename);\n    if (item && item._xhr) {\n      item._xhr.abort();\n      item._xhr = null;\n    }\n  }\n  \n  /**\n   Handles the ajax upload.\n   \n   @private\n   */\n  _ajaxUpload(item) {\n    const self = this;\n    \n    // Use the action/method provided by the last button click, if provided\n    const action = this._buttonAction || this.action;\n    const requestMethod = this._buttonMethod ? this._buttonMethod.toUpperCase() : this.method;\n    \n    // We merge the global parameters with the specific file parameters and send them all together\n    const parameters = self.parameters.concat(item.parameters);\n    \n    const formData = new FormData();\n    \n    parameters.forEach((additionalParameter) => {\n      formData.append(additionalParameter.name, additionalParameter.value);\n    });\n    \n    formData.append('_charset_', 'utf-8');\n    formData.append(this.name, item._originalFile);\n    \n    // Store the XHR on the item itself\n    item._xhr = new XMLHttpRequest();\n    \n    // Opening before being able to set response type to avoid IE11 InvalidStateError\n    item._xhr.open(requestMethod, action);\n    \n    // Reflect specific xhr properties\n    item._xhr.timeout = item.timeout;\n    item._xhr.responseType = item.responseType;\n    item._xhr.withCredentials = item.withCredentials;\n    \n    XHR_EVENT_NAMES.forEach((name) => {\n      // Progress event is the only event among other ProgressEvents that can trigger multiple times.\n      // Hence it's the only one that gives away usable progress information.\n      const isProgressEvent = name === 'progress';\n      (isProgressEvent ? item._xhr.upload : item._xhr).addEventListener(name, (event) => {\n        const detail = {\n          item: item,\n          action: action,\n          method: requestMethod\n        };\n        \n        if (isProgressEvent) {\n          detail.lengthComputable = event.lengthComputable;\n          detail.loaded = event.loaded;\n          detail.total = event.total;\n        }\n        \n        self.trigger(`coral-fileupload:${name}`, detail);\n      });\n    });\n    \n    item._xhr.send(formData);\n  }\n  \n  /** @private */\n  _getLabellableElement() {\n    return this;\n  }\n  \n  /** @private */\n  _getQueueItemByFilename(filename) {\n    return this._getQueueItem(this._getQueueIndex(filename));\n  }\n  \n  /** @private */\n  _getQueueItem(index) {\n    return index > -1 ? this._uploadQueue[index] : null;\n  }\n  \n  /** @private */\n  _getQueueIndex(filename) {\n    let index = -1;\n    this._uploadQueue.some((item, i) => {\n      if (item.file.name === filename) {\n        index = i;\n        return true;\n      }\n      \n      return false;\n    });\n    return index;\n  }\n  \n  /** @private */\n  _getTargetChangeInput() {\n    return this._elements.input;\n  }\n  \n  /** @ignore */\n  _positionInputOnDropZone() {\n    const input = this._elements.input;\n    const dropZone = this.querySelector('[coral-fileupload-dropzone]');\n    \n    if (dropZone) {\n      const size = dropZone.getBoundingClientRect();\n      \n      input.style.top = `${parseInt(dropZone.offsetTop, 10)}px`;\n      input.style.left = `${parseInt(dropZone.offsetLeft, 10)}px`;\n      input.style.width = `${parseInt(size.width, 10)}px`;\n      input.style.height = `${parseInt(size.height, 10)}px`;\n    }\n    else {\n      input.style.width = '0';\n      input.style.height = '0';\n    }\n  }\n  \n  /**\n   Uploads the given filename, or all the files into the queue. It accepts extra parameters that are sent with the\n   file.\n   \n   @param {String} [filename]\n   The name of the file to upload.\n   */\n  upload(filename) {\n    if (!this.async) {\n      if (typeof filename === 'string') {\n        throw new Error('Coral.FileUpload does not support uploading a file from the queue on synchronous mode.');\n      }\n      \n      let form = this.closest('form');\n      if (!form) {\n        form = document.createElement('form');\n        form.method = this.method.toLowerCase();\n        form.enctype = 'multipart/form-data';\n        form.action = this.action;\n        form.hidden = true;\n        \n        form.appendChild(this._elements.input);\n        \n        Array.prototype.forEach.call(this.querySelectorAll('input[type=\"hidden\"]'), (hiddenInput) => {\n          form.appendChild(hiddenInput);\n        });\n        \n        // Make sure the form is connected before submission\n        this.appendChild(form);\n      }\n      \n      const input = document.createElement('input');\n      input.type = 'hidden';\n      input.name = '_charset_';\n      input.value = 'utf-8';\n      \n      form.submit();\n    }\n    else if (typeof filename === 'string') {\n      this._uploadFile(filename);\n    }\n    else {\n      this._uploadQueue.forEach((item) => {\n        this._abortFile(item.file.name);\n        this._ajaxUpload(item);\n      }, this);\n    }\n  }\n  \n  /**\n   Remove a file or all files from the upload queue.\n   \n   @param {String} [filename]\n   The filename of the file to remove. If a filename is not provided, all files will be removed.\n   */\n  clear(filename) {\n    if (!this.async) {\n      if (typeof filename === 'string') {\n        throw new Error('Coral.FileUpload does not support removing a file from the queue on synchronous mode.');\n      }\n      this._clearQueue();\n      this._clearFileInputValue();\n    }\n    else if (typeof filename === 'string') {\n      this._clearFile(filename);\n    }\n    else {\n      this._clearQueue();\n    }\n  }\n  \n  /**\n   Abort upload of a given file or all files in the queue.\n   \n   @param {String} [filename]\n   The filename of the file to abort. If a filename is not provided, all files will be aborted.\n   */\n  abort(filename) {\n    if (!this.async) {\n      throw new Error('Coral.FileUpload does not support aborting file(s) upload on synchronous mode.');\n    }\n    \n    if (typeof filename === 'string') {\n      // Abort a single file\n      this._abortFile(filename);\n    }\n    else {\n      // Abort all files\n      this._uploadQueue.forEach((item) => {\n        this._abortFile(item.file.name);\n      }, this);\n    }\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'async',\n      'action',\n      'method',\n      'multiple',\n      'sizelimit',\n      'sizeLimit',\n      'accept',\n      'autostart',\n      'autoStart'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // @a11y\n    this.setAttribute('role', 'group');\n  \n    const button = this.querySelector('[coral-fileupload-select]');\n    if (button) {\n      button.id = button.id || commons.getUID();\n    }\n    // If no labelledby is specified, ensure input is at labelledby the select button\n    this.labelledBy = this.labelledBy;\n    \n    // Fetch additional parameters if any\n    const parameters = [];\n    Array.prototype.forEach.call(this.querySelectorAll('input[type=\"hidden\"]'), (input) => {\n      parameters.push({\n        name: input.name,\n        value: input.value\n      });\n    });\n    this.parameters = parameters;\n  \n    // Remove the input if it's already there\n    // A fresh input is preferred to value = '' as it may not work in all browsers\n    const inputElement = this.querySelector('[handle=\"input\"]');\n    if (inputElement) {\n      inputElement.parentNode.removeChild(inputElement);\n    }\n  \n    // Remove the object if it's already there\n    const object = this.querySelector('object');\n    if (object && object.parentNode === this) {\n      this.removeChild(object);\n    }\n  \n    // Add the input to the component\n    this.appendChild(this._elements.input);\n  \n    const self = this;\n    // IE11 requires one more frame or the resize listener <object> will appear as an overlaying white box\n    window.requestAnimationFrame(() => {\n      // Handles the repositioning of the input to allow dropping files\n      commons.addResizeListener(self, self._positionInputOnDropZone);\n    });\n  }\n}\n\nexport default FileUpload;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport FileUpload from './src/scripts/FileUpload';\nimport FileUploadItem from './src/scripts/FileUploadItem';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-fileupload', FileUpload);\n\nFileUpload.Item = FileUploadItem;\n\nexport {FileUpload};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {DragAction} from '../../../coralui-dragaction';\nimport {transform, commons} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Masonry-item';\n\n/**\n @class Coral.Masonry.Item\n @classdesc A Masonry Item component\n @htmltag coral-masonry-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass MasonryItem extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Represents ownership (necessary when the item is moved which triggers callbacks)\n    this._masonry = null;\n    \n    // Default value\n    this._dragAction = null;\n  }\n  \n  /**\n   Item content element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    // Support configs\n    if (typeof value === 'object') {\n      for (const prop in value) {\n        /** @ignore */\n        this[prop] = value[prop];\n      }\n    }\n  }\n  \n  /**\n   Whether the item is selected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n  \n    this.setAttribute('aria-selected', this._selected);\n    this.classList.toggle('is-selected', this._selected);\n  }\n  \n  /**\n   Animates the insertion of the item.\n   \n   @private\n   */\n  _insert() {\n    if (this.classList.contains('is-beforeInserting')) {\n      this.classList.remove('is-beforeInserting');\n      this.classList.add('is-inserting');\n      \n      const self = this;\n      commons.transitionEnd(this, () => {\n        self.classList.remove('is-inserting');\n      });\n    }\n  }\n  \n  /** @private */\n  _setTabbable(tabbable) {\n    this.setAttribute('tabindex', tabbable ? 0 : -1);\n  }\n  \n  /** @private */\n  _updateDragAction(enabled) {\n    let handle;\n    if (enabled) {\n      // Find handle\n      if (this.getAttribute('coral-masonry-draghandle') !== null) {\n        handle = this;\n      }\n      else {\n        handle = this.querySelector('[coral-masonry-draghandle]');\n        if (!handle) {\n          // Disable drag&drop if handle wasn't found\n          enabled = false;\n        }\n      }\n    }\n    \n    if (enabled) {\n      if (!this._dragAction) {\n        this._dragAction = new DragAction(this);\n        this._dragAction.dropZone = this.parentNode;\n      }\n      this._dragAction.handle = handle;\n    }\n    else if (this._dragAction) {\n      this._dragAction.destroy();\n      this._dragAction = null;\n    }\n  }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['selected', '_removing', '_orderable']; }\n  \n  /** @ignore */\n  attributeChangedCallback(name, oldValue, value) {\n    if (name === '_removing') {\n      const self = this;\n      // Do it in the next frame so that the removing animation is visible\n      window.requestAnimationFrame(() => {\n        self.classList.toggle('is-removing', value !== null);\n      });\n    }\n    else if (name === '_orderable') {\n      this._updateDragAction(value !== null);\n    }\n    else {\n      super.attributeChangedCallback(name, oldValue, value);\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // @a11y\n    this.setAttribute('tabindex', '-1');\n    \n    // Inform masonry immediately\n    this.trigger('coral-masonry-item:_connected');\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n  \n    // Handle it in masonry immediately\n    const masonry = this._masonry;\n    if (masonry) {\n      masonry._onItemDisconnected(this);\n    }\n  }\n}\n\nexport default MasonryItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport MasonryItem from './MasonryItem';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport {transform, commons} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Masonry';\n\n/**\n Enumeration for {@link Masonry} layouts.\n \n @typedef {Object} MasonryLayoutsEnum\n \n @property {String} FIXED_CENTERED\n A Layout with fixed width centered items.\n @property {String} FIXED_SPREAD\n A layout with fixed width and evenly spread items.\n @property {String} VARIABLE\n A layout with variable width items.\n @property {String} DASHBOARD\n A layout with variable width items which are expanded in their height to fill gaps.\n */\nconst layouts = {\n  FIXED_CENTERED: 'fixed-centered',\n  FIXED_SPREAD: 'fixed-spread',\n  VARIABLE: 'variable',\n  DASHBOARD: 'dashboard'\n};\n\n// @temp - Enable debug messages when writing tests\nconst DEBUG = 0;\n\n// IE does not set the complete property to true if an image cannot be loaded. This code must be outside of the\n// masonry to make sure that the listener catches images which fail loading before the masonry is initalized.\n// @polyfill ie11\ndocument.addEventListener('error', (event) => {\n  const target = event.target;\n  if (target && target.tagName === 'IMG') {\n    target._loadError = true;\n  }\n}, true);\n\n// Ignore children which are being removed\nconst itemFilter = (element) => element && element.tagName === 'CORAL-MASONRY-ITEM' && !element.hasAttribute('_removing');\n\n// Filter out items being removed\nconst isRemovingOrRemoved = (item) => item.hasAttribute('_removing') || !item.parentNode;\n\n/**\n * Returns the position of the second element relative to the first element.\n */\nconst relativePosition = (el1, el2) => {\n  const rect1 = el1.getBoundingClientRect();\n  const rect2 = el2.getBoundingClientRect();\n  return {\n    left: rect2.left - rect1.left,\n    top: rect2.top - rect1.top\n  };\n};\n\nconst weightedDistance = (x1, y1, x2, y2, unitWidth, unitHeight) => Math.sqrt(Math.pow((x2 - x1) / unitWidth, 2) + Math.pow((y2 - y1) / unitHeight, 2));\n\nconst getPreviousItem = (item) => {\n  const previousItem = item.previousElementSibling;\n  return itemFilter(previousItem) ? previousItem : null;\n};\n\n/**\n @class Coral.Masonry\n @classdesc A Masonry component that allows to lay out items in a masonry grid.\n @htmltag coral-masonry\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Masonry extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Defaults\n    this._loaded = false;\n    this._layouted = false;\n    this._layoutScheduled = false;\n    this._forceDebounce = false;\n    this._debounceId = null;\n  \n    this._newItems = [];\n    this._tabbableItem = null;\n    \n    this._delegateEvents({\n      'global:resize': '_onWindowResize',\n  \n      // Loaded\n      'global:load': '_updateLoaded',\n      'capture:load img': '_updateLoaded',\n      'capture:error img': '_updateLoaded',\n  \n      // Drag and drop\n      'coral-dragaction:dragstart coral-masonry-item': '_onItemDragStart',\n      'coral-dragaction:dragover coral-masonry-item': '_onItemDragMove',\n      'coral-dragaction:dragend coral-masonry-item': '_onItemDragEnd',\n  \n      // Keyboard\n      'capture:focus coral-masonry-item': '_onItemFocus',\n      \n      // private\n      'coral-masonry-item:_connected': '_onItemConnected'\n    });\n  \n    // Relayout when child elements change or are added/removed\n    // Should this mutation observer become a bottleneck, it could be replaced with a resize listener\n    this._observer = new MutationObserver(this._scheduleLayout.bind(this, 'mutation'));\n    this._observer.observe(this, {\n      childList: true,\n      subtree: true,\n      characterData: true,\n      attributes: true\n    });\n  }\n  \n  /**\n   Allows to interact with the masonry items.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-masonry-item',\n        // allows masonry to be nested\n        itemSelector: ':scope > coral-masonry-item:not([_removing]):not([_placeholder])'\n      });\n    }\n    \n    return this._items;\n  }\n  \n  /**\n   The layout name for this masonry. Must be one of {@link Coral.Masonry.layouts}.\n   See {@link MasonryLayoutsEnum}.\n   \n   @type {String}\n   @default MasonryLayoutsEnum.FIXED_CENTERED\n   @htmlattribute layout\n   @htmlattributereflected\n   */\n  get layout() {\n    return this._layout || layouts.FIXED_CENTERED;\n  }\n  set layout(value) {\n    value = transform.string(value);\n    const layoutEnum = this.constructor._layouts;\n    \n    if (value === '') {\n      // Default is first registered layout which is \"fixed-centered\"\n      value = Object.keys(layoutEnum)[0];\n    }\n  \n    if (value !== this._layout) {\n      if (layoutEnum[value]) {\n        this._layout = value;\n        this._reflectAttribute('layout', this._layout);\n        \n        this._scheduleLayout('new layout');\n      }\n      else if (window.console) {\n        // @temp - Enable debug messages when writing tests\n        if (DEBUG) {\n          console.error('Coral.Masonry: Unknown layout:', value);\n        }\n      }\n    }\n  }\n  \n  /**\n   The first selected item or <code>null</code> if no item is selected.\n   \n   @type {MasonryItem}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getFirstSelected();\n  }\n  \n  /**\n   An array of all selected items.\n   \n   @type {Array.<MasonryItem>}\n   @readonly\n   */\n  get selectedItems() {\n    return this.items._getAllSelected();\n  }\n  \n  // TODO this is layout specific. move to layout?\n  /**\n   The spacing between the items and the masonry container in pixel. If this property is not set, then it falls\n   back to the CSS padding of the masonry and margin of the items.\n   \n   @type {?Number}\n   @default null\n   @htmlattribute spacing\n   */\n  get spacing() {\n    return this._spacing || null;\n  }\n  set spacing(value) {\n    value = transform.number(value);\n    this._spacing = value !== null ? Math.max(0, value) : null;\n  \n    this._scheduleLayout('spacing');\n  }\n  \n  /**\n   Whether or not it is possible to order items with drag & drop.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute orderable\n   */\n  get orderable() {\n    return this._orderable || false;\n  }\n  set orderable(value) {\n    this._orderable = transform.booleanAttr(value);\n  \n    const items = this.items.getAll();\n  \n    for (let i = 0; i < items.length; i++) {\n      items[i][this._orderable ? 'setAttribute' : 'removeAttribute']('_orderable', '');\n    }\n  }\n  \n  /** @private */\n  _setAllSelected(selected) {\n    const items = this.items.getAll();\n    for (let i = 0; i < items.length; i++) {\n      const item = items[i];\n      if (item.hasAttribute('selected') !== selected) {\n        item[selected ? 'setAttribute' : 'removeAttribute']('selected', '');\n      }\n    }\n  }\n  \n  /**\n   Schedules a layout for the next animation frame. Even if called many times, the layout happens still just once.\n   \n   @private\n   */\n  _scheduleLayout() {\n    if (!this._forceDebounce && !this._layoutScheduled) {\n      const self = this;\n      window.requestAnimationFrame(() => {\n        // Skip layout if a layout was forced in between\n        if (self._layoutScheduled) {\n          self._doLayout();\n          // Cancel potentially scheduled layout if the current layout was enforced by calling doLayout directly\n          self._layoutScheduled = false;\n        }\n      });\n      \n      this._layoutScheduled = true;\n    }\n  }\n  \n  /** @private */\n  _scheduleDebouncedLayout(force) {\n    // Do not force debounce if the masonry isn't layouted yet. Safari sometimes triggers resize events while loading.\n    if (force && this._layouted) {\n      this._forceDebounce = true;\n    }\n    window.clearTimeout(this._debounceId);\n    \n    const self = this;\n    this._debounceId = window.setTimeout(() => {\n      self._forceDebounce = false;\n      self._scheduleLayout('window resize');\n    }, 500);\n  }\n  \n  /**\n   Callback which has to be called when the dimensions have changed or the masonry turned visible.\n   \n   @private\n   */\n  _onResize() {\n    if (!this._layouted) {\n      // The masonry was first invisible, render it now immediately\n      this._doLayout('became visible');\n    }\n    else {\n      this._scheduleDebouncedLayout(false);\n    }\n  }\n  \n  /** @private */\n  _onWindowResize() {\n    this._scheduleDebouncedLayout(true);\n  }\n  \n  /**\n   Performs a layout. Should only be called by {@link #_scheduleLayout} if possible.\n   \n   @private\n   */\n  _doLayout() {\n    const visible = !!this.offsetParent;\n    const LayoutClass = this.constructor._layouts[this.layout];\n    if (this._forceDebounce || !LayoutClass || !visible) {\n      return;\n    }\n    \n    if (!this._layoutInstance) {\n      this._layoutInstance = new LayoutClass(this);\n    }\n    // Check if the layout has changed\n    else if (this._layoutInstance.name !== this.layout) {\n      this._layoutInstance.destroy();\n      this._layoutInstance = new LayoutClass(this);\n    }\n    \n    // Animate insertion. In the attachedCallback of the item, the is-beforeInserting class was already added. This\n    // class is now removed again which allows to transition between the is-beforeInserting and is-inserting class.\n    // By separating the code and batching the changes, the overhead is reduced significantly.\n    let i;\n    const newItems = this._newItems;\n    for (i = 0; i < newItems.length; i++) {\n      newItems[i]._insert();\n    }\n    \n    // Position the items\n    this._layoutInstance.layout();\n    this._layouted = true;\n    \n    // Mark newly added items as managed. Before this class is added, the items are invisible. The reason why this is\n    // done here after positioning the items is that it seems to be the only way to ensure that the items are never\n    // shown at the wrong position. There used to be two cases when this happened:\n    // - When the masonry is first invisible and later shown because the resize event is triggered too late.\n    // - In some browsers (e.g. Safari) always when items are added dynamically\n    for (i = 0; i < newItems.length; i++) {\n      newItems[i].classList.add('is-managed');\n    }\n    // clear\n    newItems.length = 0;\n    \n    // Update loaded class. Cannot be done in _updateLoaded because it has to happen after the positioning.\n    this.classList.toggle('is-loaded', this._loaded);\n    \n    // Ensure that the tabbable item is set & still valid\n    const tabbableItem = this._tabbableItem;\n    if (!tabbableItem || isRemovingOrRemoved(tabbableItem)) {\n      this._setTabbableItem(this.items.first());\n    }\n    \n    // Focus the next item if the previously focused item has been removed\n    const focusedItem = this._focusedItem;\n    if (focusedItem) {\n      if (isRemovingOrRemoved(focusedItem) && this._focusedItemNext) {\n        this._focusedItemNext.focus();\n      }\n      else if (focusedItem !== document.activeElement) {\n        this._focusedItem = null;\n        this._focusedItemNext = null;\n      }\n    }\n    \n    // Prevent endless observation loop (skip mutations which have been caused by the layout)\n    this._observer.takeRecords();\n  }\n  \n  /** @ignore */\n  _updateLoaded() {\n    // Wait until complete because fonts might be loaded after interactive\n    if (!this._loaded && document.readyState === 'complete') {\n      let loaded = true;\n      const images = this.querySelectorAll('img');\n      for (let i = 0; i < images.length; i++) {\n        const image = images[i];\n        // _loadError is set in a listener at the top of this file\n        if (image.src && !image.complete && !image._loadError) {\n          loaded = false;\n          break;\n        }\n      }\n      this._loaded = loaded;\n    }\n    // A loaded image might have made an item bigger\n    this._scheduleLayout();\n  }\n  \n  /** @private */\n  _onItemConnected(event) {\n    event.stopImmediatePropagation();\n  \n    // We don't care about transitions if the masonry is not in the body\n    if (!document.body.contains(this)) {\n      return;\n    }\n    \n    const item = event.target;\n  \n    // check if just moving\n    if (!item.hasAttribute('_removing') && this !== item._masonry && !item.hasAttribute('_placeholder')) {\n      item._masonry = this;\n\n      // Insert animation start style. This is separated from _insert because otherwise we would have to enforce a\n      // reflow between changing the classes for every item (which is slow).\n      item.classList.add('is-beforeInserting');\n  \n      // Do it in the next frame so that the inserting animation is visible\n      const self = this;\n      window.requestAnimationFrame(() => {\n        self._onItemAdded(item);\n      });\n    }\n  }\n  \n  /** @private */\n  _onItemDisconnected(item) {\n    // We don't care about transitions if the masonry is not in the body\n    if (!document.body.contains(this)) {\n      return;\n    }\n    \n    // Ignore the item being dropped after ordering\n    if (item._dropping) {\n      return;\n    }\n    \n    if (!item.hasAttribute('_removing')) {\n      // Attach again for remove transition\n      item.setAttribute('_removing', '');\n      this.appendChild(item);\n      commons.transitionEnd(item, () => {\n        item.remove();\n      });\n    }\n    // remove transition completed\n    else {\n      item.removeAttribute('_removing');\n      item._masonry = null;\n      \n      this._onItemRemoved(item);\n    }\n  }\n  \n  /** @private */\n  _onItemAdded(item) {\n    item._updateDragAction(this.orderable);\n    this._newItems.push(item);\n    \n    // Hack to prevent flickering in some browsers which don't support custom elements natively (e.g. Safari)\n    if (this._attaching && item.nextElementSibling === null) {\n      this._doLayout('last item attached');\n    }\n    \n    // Collection event\n    this.trigger('coral-collection:add', {item});\n  }\n  \n  /** @private */\n  _onItemRemoved(item) {\n    item._updateDragAction(false);\n    item.classList.remove('is-managed');\n    \n    // Collection event\n    this.trigger('coral-collection:remove', {item});\n  }\n  \n  /** @private */\n  _onItemFocus(e) {\n    const item = e.target;\n    if (item === e.matchedTarget) {\n      this._setTabbableItem(item);\n      \n      // Remember the focused item and a sibling for the case when the currently focused item is removed and another\n      // item has to be selected in _doLayout\n      this._focusedItem = item;\n      this._focusedItemNext = [item.nextElementSibling, item.previousElementSibling].filter(itemFilter)[0];\n    }\n  }\n  \n  /** @private */\n  _setTabbableItem(item) {\n    if (this._tabbableItem) {\n      this._tabbableItem._setTabbable(false);\n    }\n    if (item) {\n      item._setTabbable(true);\n    }\n    this._tabbableItem = item;\n  }\n  \n  /**\n   @return {Boolean} true if the new position isn't further away from the center of the placeholder than the\n   previous position.\n   \n   @private\n   */\n  _isApproachingPlaceholder(pos, prevPos, placeholder) {\n    const placeholderPos = relativePosition(this, placeholder);\n    const placeholderWidth = placeholder.offsetWidth;\n    const placeholderHeight = placeholder.offsetHeight;\n    const placeholderX = placeholderPos.left + placeholderWidth / 2;\n    const placeholderY = placeholderPos.top + placeholderHeight / 2;\n    \n    // A weighted distance is used to improve the user experience with rather long/high cards\n    return weightedDistance(placeholderX, placeholderY, pos.left, pos.top, placeholderWidth, placeholderHeight) <=\n      weightedDistance(placeholderX, placeholderY, prevPos.left, prevPos.top, placeholderWidth, placeholderHeight);\n  }\n  \n  /** @private */\n  _onItemDragStart(e) {\n    const item = e.target;\n    if (item === e.matchedTarget) {\n      this._layoutInstance.detach(item);\n      item._oldBefore = getPreviousItem(item);\n      \n      const placeholder = item._dropPlaceholder = new MasonryItem();\n      placeholder.setAttribute('_placeholder', '');\n      \n      // Add a content div with the right dimension instead of setting the dimension on the item directly. This is\n      // necessary because some layouts modify the dimensions as well.\n      const contentDiv = document.createElement('div');\n      contentDiv.style.width = `${item.clientWidth}px`;\n      contentDiv.style.height = `${item.clientHeight}px`;\n      placeholder.appendChild(contentDiv);\n      \n      // Insert placeholder before dragged item\n      placeholder.classList.add('_coral-Masonry-item--placeholder');\n      \n      this.insertBefore(placeholder, item);\n    }\n  }\n  \n  /** @private */\n  _onItemDragMove(e) {\n    const item = e.target;\n    const placeholder = item._dropPlaceholder;\n    if (item === e.matchedTarget && placeholder) {\n      const prevPos = item._prevDragPos;\n      const pos = relativePosition(this, item);\n      // If the current move is approaching the previous placeholder target, then it must not move the placeholder\n      // again. Otherwise it can happen with multi-column items that the items jump around hectically while dragging\n      // an item.\n      if (!prevPos || !this._isApproachingPlaceholder(pos, prevPos, placeholder)) {\n        // Find item below cursor\n        const itemBelow = this._layoutInstance.itemAt(pos.left, pos.top);\n        \n        if (itemBelow && itemBelow !== placeholder) {\n          // If the item below (the dragged item) is preceding the placeholder, then it has to insert the placeholder\n          // before the item below (the dragged item)\n          if (placeholder.compareDocumentPosition(itemBelow) & document.DOCUMENT_POSITION_PRECEDING) {\n            itemBelow.parentNode.insertBefore(placeholder, itemBelow);\n          }\n          else {\n            itemBelow.parentNode.insertBefore(placeholder, itemBelow.nextSibling);\n          }\n        }\n      }\n      item._prevDragPos = pos;\n    }\n  }\n  \n  /** @private */\n  _onItemDragEnd(e) {\n    const item = e.target;\n    const placeholder = item._dropPlaceholder;\n    if (item === e.matchedTarget && placeholder) {\n      item._dropping = true;\n      // Replace the drop placeholder with this item\n      this.replaceChild(item, placeholder);\n      item._dropping = false;\n      \n      // Trigger order event\n      item.trigger('coral-masonry:order', {\n        item: item,\n        oldBefore: item._oldBefore,\n        before: getPreviousItem(item)\n      }, true, false);\n\n      // // Drop transition\n      this._layoutInstance.reattach(item);\n      item.classList.add('is-dropping');\n      commons.transitionEnd(item, () => {\n        item.classList.remove('is-dropping');\n      });\n    }\n    item._oldBefore = null;\n    item._dropPlaceholder = null;\n    item._prevDragPos = null;\n  }\n  \n  /**\n   Registry for masonry layouts.\n   \n   @type {Object.<string,Layout>}\n   @private\n   @readonly\n   */\n  static get _layouts() {\n    if (!this.__layouts) {\n      this.__layouts = {};\n    }\n    \n    return this.__layouts;\n  }\n  \n  /**\n   Registers a layout with the given name.\n   The name can then be set at {@link Coral.Masonry.layout} to render a masonry with the this registered layout.\n   \n   @param {String} name of the layout\n   @param {Layout} Layout class which extends {@link Coral.Masonry.Layout}\n   */\n  static registerLayout(name, Layout) {\n    Layout.defineName(name);\n    this._layouts[name] = Layout;\n  }\n  \n  /**\n   Returns {@link Masonry} layouts.\n   \n   @return {MasonryLayoutsEnum}\n   */\n  static get layouts() { return layouts; }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['layout', 'spacing', 'orderable']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // Support cloneNode\n    const object = this.querySelector('object');\n    if (object && object.parentNode === this) { this.removeChild(object); }\n    \n    // Default reflected attributes\n    if (!this._layout) { this.layout = layouts.FIXED_CENTERED; }\n  \n    // Handles the resizing of the masonry\n    commons.addResizeListener(this, this._onResize.bind(this));\n\n    // This indicates that the initial items are being attached\n    this._attaching = true;\n    \n    const self = this;\n    window.requestAnimationFrame(() => {\n      self._attaching = false;\n      // Update loaded after all items have been attached\n      self._updateLoaded();\n    });\n  }\n  \n  /**\n   Triggered when a {@link Masonry} item is reordered.\n   \n   @typedef {CustomEvent} coral-masonry:order\n   \n   @property {MasonryItem} detail.item\n   The reordered item\n   @property {?MasonryItem} detail.oldBefore\n   The previous item before the reordering.\n   @property {?MasonryItem} detail.before\n   The previous item after the reordering.\n   */\n}\n\nexport default Masonry;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n Base class for masonry layouts.\n \n Whenever a change is detected, the {@link Coral.Masonry.Layout#layout} method is called. This method must then\n ensure that all the items are positioned correctly.\n \n Layout-specific keyboard support must be handled by adding event listeners to the masonry in the constructor. Such\n event listeners must be removed in the {@link Coral.Masonry.Layout#destroy} method.\n \n @param masonry\n @class Coral.Masonry.Layout\n */\nclass MasonryLayout {\n  /**\n   * this is constructor description.\n   * @param {number} arg1 this is arg1 description.\n   * @param {string[]} arg2 this is arg2 description.\n   */\n  constructor(masonry) {\n    this._masonry = masonry;\n  }\n  \n  /**\n   Layout name. Uses the constructor given name by default if defined.\n   \n   @type {String}\n   */\n  get name() {\n    return this._name || this.constructor._name;\n  }\n  set name(value) {\n    this._name = value;\n  }\n  \n  /**\n   Lays out the masonry items according to the implementation.\n   */\n  layout() {\n    // To override\n  }\n  \n  /**\n   Removes all layout-specific attributes, style, data and event listeners from the masonry and its items.\n   */\n  destroy() {\n    // To override\n  }\n  \n  /**\n   Removes the item from the control of the layout. This can be used to position the item differently,\n   for example for drag&drop.\n   \n   @param {MasonryItem} item\n   */\n  // eslint-disable-next-line no-unused-vars\n  detach(item) {\n    // To override\n  }\n  \n  /**\n   Adds the item to the control of the layout again. The layout has to ensure that the item will be transitioned to\n   its normal position flawlessly.\n   \n   @param {MasonryItem} item\n   */\n  // eslint-disable-next-line no-unused-vars\n  reattach(item) {\n    // To override\n  }\n  \n  /**\n   Returns the item at the given position. The position coordinates are relative to the masonry.\n   \n   If an item is being transitioned when this method is called, then it must choose the item based on the final\n   instead of the current position.\n   \n   @param {number} x\n   @param {number} y\n   @return {?Coral.Masonry.Item}\n   */\n  // eslint-disable-next-line no-unused-vars\n  itemAt(x, y) {\n    // To override\n  }\n  \n  /**\n   Defines the name of the Layout\n   \n   @param {String} name\n   */\n  static defineName(name) {\n    this._name = name;\n  }\n}\n\nexport default MasonryLayout;\n","/** @ignore */\nconst setTransform = (el, value) => {\n  el.style.setProperty('-webkit-transform', value);\n  el.style.setProperty('-ms-transform', value);\n  el.style.transform = value;\n};\n\n/** @ignore */\nconst setTransition = (el, value) => {\n  el.style.setProperty('-webkit-transition', value);\n  el.style.setProperty('-ms-transition', value);\n  el.style.transition = value;\n};\n\n/** @ignore */\nconst getFirstRowFilledColumns = (columns, items) => {\n  let filledColumns = 0;\n  for (let i = 0; i < items.length; i++) {\n    const item = items[i];\n    filledColumns += item._layoutData.colspan;\n    if (filledColumns >= columns.length) {\n      return columns.length;\n    }\n  }\n  return filledColumns;\n};\n\n/** @ignore */\nconst csspx = (el, property) => parseFloat(window.getComputedStyle(el)[property], 10);\n\n// TODO if the property changes, it will not automatically relayout the masonry\n// TODO test columnWidth and colspan property and default values\n/** @ignore */\nconst getPositiveNumberProperty = (element, property, attribute, defaultValue) => {\n  let value = element[property];\n  if (value === undefined) {\n    value = element.getAttribute(attribute);\n  }\n  value = parseInt(value, 10);\n  if (value <= 0 || isNaN(value)) {\n    value = defaultValue;\n  }\n  return value;\n};\n\nexport {setTransform, setTransition, getFirstRowFilledColumns, csspx, getPositiveNumberProperty};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport MasonryLayout from './MasonryLayout';\nimport {setTransition, setTransform, csspx, getPositiveNumberProperty} from './MasonryLayoutUtil';\nimport {Keys} from '../../../coralui-util';\n\n/**\n Base class for column-based masonry layouts.\n \n @class Coral.Masonry.ColumnLayout\n @classdesc A Masonry Column layout\n @extends {MasonryLayout}\n */\nclass MasonryColumnLayout extends MasonryLayout {\n  /**\n   Takes a {Masonry} instance as argument.\n   \n   @param {Masonry} masonry\n   */\n  constructor(masonry) {\n    super(masonry);\n  \n    this._columns = [];\n  \n    const up = this._moveFocusVertically.bind(this, true);\n    const down = this._moveFocusVertically.bind(this, false);\n    const left = this._moveFocusHorizontally.bind(this, true);\n    const right = this._moveFocusHorizontally.bind(this, false);\n    const home = this._moveFocusHomeEnd.bind(this, true);\n    const end = this._moveFocusHomeEnd.bind(this, false);\n  \n    const keys = this._keys = new Keys(masonry, {\n      context: this\n    });\n    keys.on('up', up).on('k', up);\n    keys.on('down', down).on('j', down);\n    keys.on('left', left).on('h', left);\n    keys.on('right', right).on('l', right);\n    keys.on('home', home);\n    keys.on('end', end);\n  }\n  \n  /**\n   Hook to remove layout specific style and data from the item.\n   \n   @param item\n   @private\n   */\n  // eslint-disable-next-line no-unused-vars\n  _resetItem(item) {\n    // To override\n  }\n  \n  /**\n   Initialize layout variables.\n   \n   @private\n   */\n  _init(items) {\n    const firstItem = items[0];\n    const masonry = this._masonry;\n    this._columnWidth = getPositiveNumberProperty(masonry, 'columnWidth', 'columnwidth', 200);\n    \n    this._zeroOffsetLeft = -csspx(firstItem, 'marginLeft');\n    // with padding\n    this._masonryInnerWidth = masonry.clientWidth;\n    \n    const spacing = this._masonry.spacing;\n    if (typeof spacing === 'number') {\n      this._horSpacing = spacing;\n      this._verSpacing = spacing;\n      this._offsetLeft = spacing + this._zeroOffsetLeft;\n      this._offsetTop = spacing - csspx(firstItem, 'marginTop');\n      this._verPadding = 2 * spacing;\n      this._masonryAvailableWidth = masonry.clientWidth - spacing;\n    }\n    else {\n      this._horSpacing = csspx(firstItem, 'marginLeft') + csspx(firstItem, 'marginRight');\n      this._verSpacing = csspx(firstItem, 'marginTop') + csspx(firstItem, 'marginBottom');\n      this._offsetLeft = csspx(masonry, 'paddingLeft');\n      this._offsetTop = csspx(masonry, 'paddingTop');\n      this._verPadding = this._offsetTop + this._verSpacing + csspx(masonry, 'paddingBottom');\n      this._masonryAvailableWidth = masonry.clientWidth - this._offsetLeft - csspx(masonry, 'paddingRight');\n    }\n    \n    // Initialize column objects\n    const columnCount = Math.max(1, Math.floor(this._masonryAvailableWidth / (this._columnWidth + this._horSpacing)));\n    this._columns.length = columnCount;\n    for (let ci = 0; ci < columnCount; ci++) {\n      this._columns[ci] = {\n        height: this._offsetTop,\n        items: []\n      };\n    }\n    \n    // Prepare layout data\n    for (let ii = 0; ii < items.length; ii++) {\n      const item = items[ii];\n      \n      let layoutData = item._layoutData;\n      if (!layoutData) {\n        item._layoutData = layoutData = {};\n      }\n      \n      // Read colspan\n      layoutData.colspan = Math.min(getPositiveNumberProperty(item, 'colspan', 'colspan', 1), this._columns.length);\n    }\n  }\n  \n  /**\n   Updates the width of all items.\n   \n   @param items\n   @private\n   */\n  _writeStyles(items) {\n    for (let i = 0; i < items.length; i++) {\n      const item = items[i];\n      const layoutData = item._layoutData;\n      \n      // Update width\n      const itemWidth = Math.round(this._getItemWidth(layoutData.colspan));\n      if (layoutData.width !== itemWidth) {\n        item.style.width = `${itemWidth}px`;\n        layoutData.width = itemWidth;\n      }\n      this._writeItemStyle(item);\n    }\n  }\n  \n  /**\n   @param colspan column span of the item\n   @return the width of the item for the given colspan\n   @private\n   */\n  // eslint-disable-next-line no-unused-vars\n  _getItemWidth(colspan) {\n    // To override\n  }\n  \n  /**\n   Hook to execute layout specific item preparation.\n   \n   @param item\n   @private\n   */\n  // eslint-disable-next-line no-unused-vars\n  _writeItemStyle(item) {\n    // To override\n  }\n  \n  /**\n   Reads the dimension of all items.\n   \n   @param items\n   @private\n   */\n  _readStyles(items) {\n    // Record size of items in a separate loop to avoid unneccessary reflows\n    for (let i = 0; i < items.length; i++) {\n      const item = items[i];\n      const layoutData = item._layoutData;\n      layoutData.height = Math.round(item.getBoundingClientRect().height);\n      layoutData.ignored = layoutData.detached || !item.offsetParent;\n    }\n  }\n  \n  /**\n   Update the position of all items.\n   \n   @param items\n   @private\n   */\n  _positionItems(items) {\n    let j;\n    \n    for (let i = 0; i < items.length; i++) {\n      const item = items[i];\n      const layoutData = item._layoutData;\n      // Skip ignored items\n      if (layoutData.ignored) {\n        continue;\n      }\n      \n      // Search for column with the least height\n      const maxLength = this._columns.length - (layoutData.colspan - 1);\n      let minColumnIndex = -1;\n      let minColumnHeight;\n      for (j = 0; j < maxLength; j++) {\n        // can be negative if set spacing < item css margin\n        let columnHeight = this._offsetTop;\n        for (let y = 0; y < layoutData.colspan; y++) {\n          columnHeight = Math.max(columnHeight, this._columns[j + y].height);\n        }\n        if (minColumnIndex === -1 || columnHeight < minColumnHeight) {\n          minColumnIndex = j;\n          minColumnHeight = columnHeight;\n        }\n      }\n      \n      const top = minColumnHeight;\n      const left = Math.round(this._getItemLeft(minColumnIndex));\n      \n      // Check if position has changed\n      if (layoutData.left !== left || layoutData.top !== top) {\n        layoutData.columnIndex = minColumnIndex;\n        layoutData.itemIndex = this._columns[minColumnIndex].items.length;\n        layoutData.left = left;\n        layoutData.top = top;\n        \n        setTransform(item, `translate(${left}px, ${top}px)`);\n      }\n      \n      // Remember new column height to position all other items\n      const newColumnHeight = top + layoutData.height + this._verSpacing;\n      for (j = 0; j < layoutData.colspan; j++) {\n        const column = this._columns[minColumnIndex + j];\n        column.height = newColumnHeight;\n        column.items.push(item);\n      }\n    }\n  }\n  \n  /**\n   @param columnIndex\n   @return the left position for the given column index\n   @private\n   */\n  // eslint-disable-next-line no-unused-vars\n  _getItemLeft(columnIndex) {\n    // To override\n  }\n  \n  /**\n   @returns {number} the height of the content (independent of the current gird container height)\n   @private\n   */\n  _getContentHeight() {\n    return this._columns.reduce((height, column) => Math.max(height, column.height), 0) - this._offsetTop;\n  }\n  \n  /**\n   Hook which is called after the positioning is done.\n   \n   @param contentHeight\n   @private\n   */\n  // eslint-disable-next-line no-unused-vars\n  _postLayout(contentHeight) {\n    // To override\n  }\n  \n  /**\n   Moves the focus vertically.\n   \n   @private\n   */\n  _moveFocusVertically(up, event) {\n    const currentLayoutData = event.target._layoutData;\n    if (!currentLayoutData) {\n      return;\n    }\n    \n    // Choose item above or below\n    const nextItemIndex = currentLayoutData.itemIndex + (up ? -1 : 1);\n    const nextItem = this._columns[currentLayoutData.columnIndex].items[nextItemIndex];\n    \n    if (nextItem) {\n      nextItem.focus();\n      // prevent scrolling at the same time\n      event.preventDefault();\n    }\n  }\n  \n  /**\n   Moves the focus horizontally.\n   \n   @private\n   */\n  _moveFocusHorizontally(left, event) {\n    const currentLayoutData = event.target._layoutData;\n    if (!currentLayoutData) {\n      return;\n    }\n    \n    let nextItem;\n    \n    // Choose item on the left or right which overlaps the most with the current item\n    const nextColumnIndex = currentLayoutData.columnIndex + (left ? -1 : currentLayoutData.colspan);\n    const nextColumn = this._columns[nextColumnIndex];\n    if (nextColumn) {\n      const currentItemBottom = currentLayoutData.top + currentLayoutData.height;\n      let nextItemOverlap = 0;\n      \n      // Iterate through all items in the bordering column and look for the item which overlaps the most\n      for (let i = 0; i < nextColumn.items.length; i++) {\n        const item = nextColumn.items[i];\n        const layoutData = item._layoutData;\n        const itemBottom = layoutData.top + layoutData.height;\n        \n        // Check if items overlap\n        if (currentLayoutData.top <= itemBottom && currentItemBottom >= layoutData.top) {\n          // Calculate the overlapping height\n          const itemOverlap = (currentLayoutData.height - Math.max(0, layoutData.top - currentLayoutData.top) -\n            // relative overlap with current item\n            Math.max(0, currentItemBottom - itemBottom)) / layoutData.height;\n          if (itemOverlap > nextItemOverlap) {\n            nextItemOverlap = itemOverlap;\n            nextItem = item;\n          }\n        }\n        else if (currentLayoutData.top + currentLayoutData.height < layoutData.top) {\n          // Item is too far below, stop searching\n          break;\n        }\n      }\n    }\n    \n    if (nextItem) {\n      nextItem.focus();\n      // prevent scrolling at the same time\n      event.preventDefault();\n    }\n  }\n  \n  /**\n   Moves the focus to first or last item based on the visual order.\n   \n   @private\n   */\n  _moveFocusHomeEnd(home, event) {\n    const currentLayoutData = event.target._layoutData;\n    if (!currentLayoutData) {\n      return;\n    }\n    \n    let nextItem;\n    const columns = this._columns;\n    \n    // when home is pressed, we take the first item of the first column\n    if (home) {\n      nextItem = columns[0] && columns[0].items[0];\n    }\n    else {\n      // when end is pressed, we take the last item of the last column; since some columns are empty, we need to\n      // iterate backwards to find the first column that has items\n      for (let i = columns.length - 1; i > -1; i--) {\n        // since we found a column with items, we take the last item as the next one\n        if (columns[i].items.length > 0) {\n          nextItem = columns[i].items[columns[i].items.length - 1];\n          break;\n        }\n      }\n    }\n    \n    if (nextItem) {\n      nextItem.focus();\n      // we prevent the scrolling\n      event.preventDefault();\n    }\n  }\n  \n  /** @inheritdoc */\n  layout(secondTry) {\n    const masonry = this._masonry;\n    \n    const items = masonry.items.getAll();\n    if (items.length > 0) {\n      // For best possible performance none of these function calls must both read and write attributes in a loop to\n      // avoid unnecessary reflows.\n      this._init(items);\n      this._writeStyles(items);\n      this._readStyles(items);\n      this._positionItems(items);\n    }\n    else {\n      this._columns.length = 0;\n    }\n    \n    // Update the height of the masonry (otherwise it has a height of 0px due to the absolutely positioned items)\n    const contentHeight = this._getContentHeight();\n    masonry.style.height = `${contentHeight - this._verSpacing + this._verPadding}px`;\n    \n    // Check if the masonry has changed its width due to the changed height (can happen because of appearing/disappearing scrollbars)\n    if (!secondTry && this._masonryInnerWidth !== masonry.clientWidth) {\n      this.layout(true);\n    }\n    else {\n      // Post layout hook for sub classes\n      this._postLayout(contentHeight);\n    }\n  }\n  \n  /** @inheritdoc */\n  destroy() {\n    this._keys.destroy();\n    \n    const items = this._masonry.items.getAll();\n    for (let i = 0; i < items.length; i++) {\n      const item = items[i];\n      item._layoutData = undefined;\n      setTransform(item, '');\n      this._resetItem(item);\n    }\n  }\n  \n  /** @inheritdoc */\n  detach(item) {\n    item._layoutData.detached = true;\n  }\n  \n  /** @inheritdoc */\n  reattach(item) {\n    const layoutData = item._layoutData;\n    layoutData.detached = false;\n    \n    const rect = item.getBoundingClientRect();\n    // Disable transition while repositioning\n    setTransition(item, 'none');\n    item.style.left = '';\n    item.style.top = '';\n    setTransform(item, '');\n    \n    const nullRect = item.getBoundingClientRect();\n    layoutData.left = rect.left - nullRect.left;\n    layoutData.top = rect.top - nullRect.top;\n    setTransform(item, `translate(${layoutData.left}px, ${layoutData.top}px)`);\n    // Enforce position\n    item.getBoundingClientRect();\n    // Enable transition again\n    setTransition(item, '');\n  }\n  \n  /** @inheritdoc */\n  itemAt(x, y) {\n    // TODO it would be more efficient to pick first the right column\n    const items = this._masonry.items.getAll();\n    \n    for (let i = 0; i < items.length; i++) {\n      const item = items[i];\n      const layoutData = item._layoutData;\n      \n      if (layoutData && !layoutData.ignored && (\n        layoutData.left <= x && layoutData.left + layoutData.width >= x &&\n        layoutData.top <= y && layoutData.top + layoutData.height >= y)) {\n        \n        return item;\n      }\n    }\n    \n    return null;\n  }\n}\n\nexport default MasonryColumnLayout;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport MasonryColumnLayout from './MasonryColumnLayout';\nimport {getFirstRowFilledColumns} from './MasonryLayoutUtil';\n\n/**\n Layout with fixed width centered items. The width of the items is defined with the <code>columnwidth</code>\n attribute.\n \n @example\n <coral-masonry layout=\"fixed-centered\" columnwidth=\"300\">\n \n @class Coral.Masonry.FixedCenteredLayout\n @extends {MasonryColumnLayout}\n */\nclass MasonryFixedCenteredLayout extends MasonryColumnLayout {\n  /** @inheritdoc */\n  _writeStyles(items) {\n    this._outerColumnWidth = this._columnWidth + this._horSpacing;\n    \n    // If the first row isn't filled, then the items will be centered\n    const filledColumns = getFirstRowFilledColumns(this._columns, items);\n    this._offsetLeft += (this._masonryAvailableWidth - filledColumns * this._outerColumnWidth) / 2;\n    \n    super._writeStyles(items);\n  }\n  \n  /** @inheritdoc */\n  _getItemWidth(colspan) {\n    return this._columnWidth * colspan + this._horSpacing * (colspan - 1);\n  }\n  \n  /** @inheritdoc */\n  _getItemLeft(columnIndex) {\n    return this._offsetLeft + this._outerColumnWidth * columnIndex;\n  }\n}\n\nexport default MasonryFixedCenteredLayout;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport MasonryColumnLayout from './MasonryColumnLayout';\nimport {getFirstRowFilledColumns} from './MasonryLayoutUtil';\n\n/**\n Layout with fixed width and evenly spread items. The width of the items is defined with the <code>columnwidth</code>\n attribute.\n \n @example\n <coral-masonry layout=\"fixed-spread\" columnwidth=\"300\">\n \n @class Coral.Masonry.FixedSpreadLayout\n @extends {MasonryColumnLayout}\n */\nclass MasonryFixedSpreadLayout extends MasonryColumnLayout {\n  /** @inheritdoc */\n  _writeStyles(items) {\n    const columns = this._columns;\n    \n    // If the first row is not filled, then the items should be aligned left\n    this._alignLeft = getFirstRowFilledColumns(columns, items) < columns.length;\n    if (!this._alignLeft) {\n      const remainingWidth = this._masonryInnerWidth - this._columnWidth * columns.length;\n      this._horSpacing = remainingWidth / (columns.length + 1);\n    }\n    \n    super._writeStyles(items);\n  }\n  \n  /** @inheritdoc */\n  _getItemWidth(colspan) {\n    return this._columnWidth * colspan + this._horSpacing * (colspan - 1);\n  }\n  \n  /** @inheritdoc */\n  _getItemLeft(columnIndex) {\n    return this._zeroOffsetLeft + this._columnWidth * columnIndex + this._horSpacing * (columnIndex + 1);\n  }\n}\n\nexport default MasonryFixedSpreadLayout;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport MasonryColumnLayout from './MasonryColumnLayout';\n\n/**\n Layout with variable width items. The minimal width of the items is defined with the <code>columnwidth</code>\n attribute.\n \n @example\n <coral-masonry layout=\"dashboard\" columnwidth=\"300\">\n \n @class Coral.Masonry.VariableLayout\n @extends {MasonryColumnLayout}\n */\nclass MasonryVariableLayout extends MasonryColumnLayout {\n  /** @inheritdoc */\n  _getItemWidth(colspan) {\n    return this._masonryAvailableWidth / this._columns.length * colspan - this._horSpacing;\n  }\n  \n  /** @inheritdoc */\n  _getItemLeft(columnIndex) {\n    return this._offsetLeft + this._masonryAvailableWidth * columnIndex / this._columns.length;\n  }\n}\n\nexport default MasonryVariableLayout;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport MasonryVariableLayout from './MasonryVariableLayout';\n\n/**\n Layout with variable width items which are expanded in their height to fill gaps (which are common with colspan).\n The minimal width of the items is defined with the <code>columnwidth</code> attribute.\n \n @example\n <coral-masonry layout=\"dashboard\" columnwidth=\"300\">\n \n @class Coral.Masonry.DashboardLayout\n @extends {MasonryVariableLayout}\n */\nclass MasonryDashboardLayout extends MasonryVariableLayout {\n  /** @inheritdoc */\n  _writeItemStyle(item) {\n    // Reset height because otherwise getBoundingClientRect() will not return the real height\n    this._resetItem(item);\n  }\n  \n  /** @inheritdoc */\n  _postLayout(contentHeight) {\n    for (let columnIndex = 0; columnIndex < this._columns.length; columnIndex++) {\n      const column = this._columns[columnIndex];\n      let nextItemTop = contentHeight + this._offsetTop;\n      \n      // Fill gaps by expanding the height of the items\n      for (let itemIndex = column.items.length - 1; itemIndex >= 0; itemIndex--) {\n        const item = column.items[itemIndex];\n        const layoutData = item._layoutData;\n        if (layoutData.columnIndex === columnIndex) {\n          const expandedHeight = nextItemTop - layoutData.top - this._verSpacing;\n          item.style.height = `${expandedHeight}px`;\n        }\n        nextItemTop = layoutData.top;\n      }\n    }\n  }\n  \n  /** @inheritdoc */\n  _resetItem(item) {\n    item.style.height = '';\n  }\n}\n\nexport default MasonryDashboardLayout;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Masonry from './src/scripts/Masonry';\nimport MasonryItem from './src/scripts/MasonryItem';\nimport MasonryLayout from './src/scripts/MasonryLayout';\nimport MasonryFixedCenteredLayout from './src/scripts/MasonryFixedCenteredLayout';\nimport MasonryFixedSpreadLayout from './src/scripts/MasonryFixedSpreadLayout';\nimport MasonryVariableLayout from './src/scripts/MasonryVariableLayout';\nimport MasonryDashboardLayout from './src/scripts/MasonryDashboardLayout';\n\n// Register layouts\nMasonry.registerLayout(Masonry.layouts.FIXED_CENTERED, MasonryFixedCenteredLayout);\nMasonry.registerLayout(Masonry.layouts.FIXED_SPREAD, MasonryFixedSpreadLayout);\nMasonry.registerLayout(Masonry.layouts.VARIABLE, MasonryVariableLayout);\nMasonry.registerLayout(Masonry.layouts.DASHBOARD, MasonryDashboardLayout);\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-masonry', Masonry);\nwindow.customElements.define('coral-masonry-item', MasonryItem);\n\nMasonry.Item = MasonryItem;\nMasonry.Layout = MasonryLayout;\n\nexport {Masonry};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n \nimport {Collection} from '../../../coralui-collection';\n\nclass MultifieldCollection extends Collection {\n  add(item, insertBefore) {\n    // _container and _itemTagName are the minimum options that need to be provided to automatically handle this function\n    if (this._container && this._itemTagName) {\n      if (!(item instanceof HTMLElement)) {\n        // creates an instance of an item from the object\n        item = document.createElement(this._itemTagName).set(item);\n      }\n    \n      if (!insertBefore) {\n        insertBefore = this.last();\n        if (insertBefore) {\n          // Insert before the last item\n          insertBefore = insertBefore.nextElementSibling;\n        }\n      }\n    \n      // inserts the element in the specified container\n      this._container.insertBefore(item, insertBefore || this._container.firstChild);\n    \n      return item;\n    }\n  }\n}\n\nexport default MultifieldCollection;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport MultifieldCollection from './MultifieldCollection';\nimport '../../../coralui-component-textfield';\nimport {commons} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Multifield';\nconst IS_DRAGGING_CLASS = 'is-dragging';\nconst IS_AFTER_CLASS = 'is-after';\nconst IS_BEFORE_CLASS = 'is-before';\nconst TEMPLATE_SUPPORT = 'content' in document.createElement('template');\n\n/**\n @class Coral.Multifield\n @classdesc A Multifield component that enables adding, reordering, and removing multiple instances of a component.\n Multifield partially supports the <code>template</code> element in IE 11. If adding/removing items in the template\n is required, <code>template.content</code> should be used.\n Child elements can be given a special attribute to enable functionality:\n - <code>[coral-multifield-add]</code>. Click to add an item.\n @htmltag coral-multifield\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Multifield extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Attach events\n    this._delegateEvents({\n      'coral-dragaction:dragstart coral-multifield-item': '_onDragStart',\n      'coral-dragaction:drag coral-multifield-item': '_onDrag',\n      'coral-dragaction:dragend coral-multifield-item': '_onDragEnd',\n  \n      'click [coral-multifield-add]': '_onAddItemClick',\n      'click ._coral-Multifield-remove': '_onRemoveItemClick'\n    });\n    \n    // Templates\n    this.setAttribute('id', this.id || commons.getUID());\n    this._elements = {\n      template: this.querySelector(`#${this.id} > template[coral-multifield-template]`) || document.createElement('template')\n    };\n    this._elements.template.setAttribute('coral-multifield-template', '');\n    \n    // In case <template> is not supported\n    this._handleTemplateSupport(this._elements.template);\n    \n    // Template support: move nodes added to the <template> to its content fragment\n    const self = this;\n    self._observer = new MutationObserver((mutations) => {\n      mutations.forEach((mutation) => {\n        for (let i = 0; i < mutation.addedNodes.length; i++) {\n          const addedNode = mutation.addedNodes[i];\n          const template = self.template;\n        \n          if (template.contains(addedNode) && template !== addedNode) {\n            // Move the node to the template content\n            template.content.appendChild(addedNode);\n            // Update all items content with the template content\n            self.items.getAll().forEach((item) => {\n              self._renderTemplate(item);\n            });\n          }\n        }\n      });\n    });\n  \n    // Watch for changes to the template element\n    self._observer.observe(self, {\n      childList: true,\n      subtree: true\n    });\n  \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the Coral.Multifield items that the component contains.\n   \n   @type {MultifieldCollection}\n   @readonly\n   */\n  get items() {\n    // just init on demand\n    if (!this._items) {\n      this._items = new MultifieldCollection({\n        host: this,\n        itemTagName: 'coral-multifield-item',\n        // allows multifields to be nested\n        itemSelector: ':scope > coral-multifield-item',\n        onItemAdded: this._onItemAdded\n      });\n    }\n    return this._items;\n  }\n  \n  /**\n   The Multifield template element. It will be used to render a new item once the element with the attribute\n   <code>coral-multifield-add</code> is clicked. It supports the <code>template</code> tag. While specifying the\n   template from markup, it should include the <code>coral-multifield-template</code> attribute.\n   NOTE: On IE11, only <code>template.content</code> is supported to add/remove elements to the template.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get template() {\n    return this._getContentZone(this._elements.template);\n  }\n  set template(value) {\n    this._setContentZone('template', value, {\n      handle: 'template',\n      tagName: 'template',\n      insert: function(template) {\n        this.appendChild(template);\n      },\n      set: function(content) {\n        // Additionally add support for template\n        this._handleTemplateSupport(content);\n      }\n    });\n  }\n  \n  /** @ignore */\n  _handleTemplateSupport(template) {\n    // @polyfill IE\n    if (!TEMPLATE_SUPPORT && !template.content) {\n      const frag = document.createDocumentFragment();\n      while (template.firstChild) {\n        frag.appendChild(template.firstChild);\n      }\n      template.content = frag;\n    }\n  }\n  \n  /** @ignore */\n  _onAddItemClick(event) {\n    if (event.matchedTarget.closest('coral-multifield') === this) {\n      this.items.add(document.createElement('coral-multifield-item'));\n  \n      const self = this;\n      // Wait for MO to render item template\n      window.requestAnimationFrame(() => {\n        self.trigger('change');\n      });\n    }\n  }\n  \n  /** @ignore */\n  _onRemoveItemClick(event) {\n    if (event.matchedTarget.closest('coral-multifield') === this) {\n      const item = event.matchedTarget.closest('coral-multifield-item');\n      if (item) {\n        item.remove();\n      }\n      \n      this.trigger('change');\n    }\n  }\n  \n  /** @ignore */\n  _onDragStart(event) {\n    if (event.target.closest('coral-multifield') === this) {\n      document.body.classList.add('u-coral-closedHand');\n      \n      const dragElement = event.detail.dragElement;\n      const items = this.items.getAll();\n      const dragElementIndex = items.indexOf(dragElement);\n    \n      dragElement.classList.add(IS_DRAGGING_CLASS);\n      items.forEach((item, i) => {\n        if (i < dragElementIndex) {\n          item.classList.add(IS_BEFORE_CLASS);\n        }\n        else if (i > dragElementIndex) {\n          item.classList.add(IS_AFTER_CLASS);\n        }\n      });\n    }\n  }\n  \n  /** @ignore */\n  _onDrag(event) {\n    if (event.target.closest('coral-multifield') === this) {\n      const items = this.items.getAll();\n      let marginBottom = 0;\n      \n      if (items.length) {\n        marginBottom = parseFloat(window.getComputedStyle(items[0]).marginBottom);\n      }\n      \n      items.forEach((item) => {\n        if (!item.classList.contains(IS_DRAGGING_CLASS)) {\n          const dragElement = event.detail.dragElement;\n          const dragElementBoundingClientRect = dragElement.getBoundingClientRect();\n          const itemBoundingClientRect = item.getBoundingClientRect();\n          const dragElementOffsetTop = dragElementBoundingClientRect.top;\n          const itemOffsetTop = itemBoundingClientRect.top;\n          \n          const isAfter = dragElementOffsetTop < itemOffsetTop;\n          const itemReorderedTop = `${dragElementBoundingClientRect.height + marginBottom}px`;\n          \n          item.classList.toggle(IS_AFTER_CLASS, isAfter);\n          item.classList.toggle(IS_BEFORE_CLASS, !isAfter);\n          \n          if (item.classList.contains(IS_AFTER_CLASS)) {\n            item.style.top = items.indexOf(item) < items.indexOf(dragElement) ? itemReorderedTop : '';\n          }\n          \n          if (item.classList.contains(IS_BEFORE_CLASS)) {\n            const afterDragElement = items.indexOf(item) > items.indexOf(dragElement);\n            item.style.top = afterDragElement ? `-${itemReorderedTop}` : '';\n          }\n        }\n      });\n    }\n  }\n  \n  /** @ignore */\n  _onDragEnd(event) {\n    if (event.target.closest('coral-multifield') === this) {\n      document.body.classList.remove('u-coral-closedHand');\n      \n      const dragElement = event.detail.dragElement;\n      const items = this.items.getAll();\n      const beforeArr = [];\n      const afterArr = [];\n      \n      items.forEach((item) => {\n        if (item.classList.contains(IS_AFTER_CLASS)) {\n          afterArr.push(item);\n        }\n        else if (item.classList.contains(IS_BEFORE_CLASS)) {\n          beforeArr.push(item);\n        }\n        \n        item.classList.remove(IS_DRAGGING_CLASS, IS_AFTER_CLASS, IS_BEFORE_CLASS);\n        item.style.top = '';\n        item.style.position = '';\n      });\n  \n      const before = afterArr.shift();\n      const after = beforeArr.pop();\n      \n      if (before) {\n        this.insertBefore(dragElement, before);\n        this.trigger('change');\n      }\n      if (after) {\n        this.insertBefore(dragElement, after.nextElementSibling);\n        this.trigger('change');\n      }\n    }\n  }\n  \n  /** @private */\n  _onItemAdded(item) {\n    // Update the item content with the template content\n    if (item.parentNode === this) {\n      this._renderTemplate(item);\n    }\n  }\n  \n  /** @private */\n  _renderTemplate(item) {\n    const content = item.content || item.querySelector('coral-multifield-item-content') || item;\n    \n    // Insert the template if item content is empty\n    if (!content.firstChild) {\n      // @polyfill IE\n      if (!TEMPLATE_SUPPORT) {\n        // Before cloning, put the nested templates content back in the DOM\n        const nestedTemplates = this.template.content.querySelectorAll('template[coral-multifield-template]');\n        \n        Array.prototype.forEach.call(nestedTemplates, (template) => {\n          while (template.content.firstChild) {\n            template.appendChild(template.content.firstChild);\n          }\n        });\n      }\n    \n      // Clone the template and append it to the item content\n      content.appendChild(document.importNode(this.template.content, true));\n    }\n  }\n  \n  get _contentZones() { return {template: 'template'}; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME, 'coral-Well');\n    \n    // a11y\n    this.setAttribute('role', 'list');\n    \n    // Assign the content zones, moving them into place in the process\n    this.template = this._elements.template;\n  \n    // Prepare items content based on the given template\n    this.items.getAll().forEach((item) => {\n      this._renderTemplate(item);\n    }, this);\n  }\n}\n\nexport default Multifield;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"remove\"] = document.createElement(\"button\",\"coral-button\");\n  el0.setAttribute(\"type\", \"button\");\n  el0.setAttribute(\"is\", \"coral-button\");\n  el0.setAttribute(\"handle\", \"remove\");\n  el0.setAttribute(\"variant\", \"quiet\");\n  el0.setAttribute(\"icon\", \"delete\");\n  el0.setAttribute(\"iconsize\", \"S\");\n  el0.className += \" _coral-Multifield-remove\";\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"move\"] = document.createElement(\"button\",\"coral-button\");\n  el2.setAttribute(\"type\", \"button\");\n  el2.setAttribute(\"is\", \"coral-button\");\n  el2.setAttribute(\"handle\", \"move\");\n  el2.setAttribute(\"variant\", \"quiet\");\n  el2.setAttribute(\"icon\", \"moveUpDown\");\n  el2.setAttribute(\"iconsize\", \"S\");\n  el2.className += \" _coral-Multifield-move u-coral-openHand\";\n  frag.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  frag.appendChild(el3);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport '../../../coralui-component-button';\nimport item from '../templates/item';\nimport {DragAction} from '../../../coralui-dragaction';\n\nconst CLASSNAME = '_coral-Multifield-item';\n\n/**\n @class Coral.Multifield.Item\n @classdesc A Multifield item component. It can have a pre-filled content different from the Multifield template but\n added items will always be rendered based on the template.\n @htmltag coral-multifield-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass MultifieldItem extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      // Create or fetch the content zones\n      content: this.querySelector('coral-multifield-item-content') || document.createElement('coral-multifield-item-content')\n    };\n    item.call(this._elements);\n  }\n  \n  /**\n   The item content.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-multifield-item-content',\n      insert: function(content) {\n        // Insert the content zone before the move and remove buttons\n        this.insertBefore(content, this.firstChild);\n      }\n    });\n  }\n  \n  get _contentZones() { return {'coral-multifield-item-content': 'content'}; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // a11y\n    this.setAttribute('role', 'listitem');\n  \n    // Create a fragment\n    const fragment = document.createDocumentFragment();\n  \n    const templateHandleNames = ['move', 'remove'];\n    \n    // Render the main template\n    fragment.appendChild(this._elements.move);\n    fragment.appendChild(this._elements.remove);\n  \n    const content = this._elements.content;\n  \n    // Remove it so we can process children\n    if (content.parentNode) {\n      this.removeChild(content);\n    }\n  \n    // Process remaining elements as necessary\n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && templateHandleNames.indexOf(child.getAttribute('handle')) === -1) {\n        // Add non-template elements to the label\n        content.appendChild(child);\n      }\n      else {\n        // Remove anything else\n        this.removeChild(child);\n      }\n    }\n  \n    // Add the frag to the component\n    this.appendChild(fragment);\n  \n    // Assign the content zones, moving them into place in the process\n    this.content = content;\n  \n    // Attach drag events\n    const dragAction = new DragAction(this);\n    dragAction.axis = 'vertical';\n    dragAction.handle = this._elements.move;\n  }\n}\n\nexport default MultifieldItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Multifield.Item.Content\n @classdesc The Multifield item content\n @htmltag coral-multifield-item-content\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-multifield-item-content');\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Multifield from './src/scripts/Multifield';\nimport MultifieldItem from './src/scripts/MultifieldItem';\nimport MultifieldItemContent from './src/scripts/MultifieldItemContent';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-multifield', Multifield);\nwindow.customElements.define('coral-multifield-item', MultifieldItem);\n\nMultifield.Item = MultifieldItem;\nMultifield.Item.Content = MultifieldItemContent;\n\nexport {Multifield};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  data = data_0;\n  \n  data.uid = data.commons.getUID();\n\n  data_0 = data;\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"presentation\"] = document.createElement(\"span\");\n  el2.className += \" _coral-Stepper-buttons\";\n  el2.setAttribute(\"role\", \"presentation\");\n  el2.setAttribute(\"handle\", \"presentation\");\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  var el4 = this[\"stepUp\"] = document.createElement(\"button\",\"coral-button\");\n  el4.setAttribute(\"variant\", \"_custom\");\n  el4.className += \" _coral-Stepper-stepUp _coral-Button--action\";\n  el4.setAttribute(\"type\", \"button\");\n  el4.setAttribute(\"is\", \"coral-button\");\n  el4.setAttribute(\"handle\", \"stepUp\");\n  el4.setAttribute(\"title\", data_0[\"i18n\"][\"get\"]('Increment'));\n  el4.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('Increment'));\n  el4.setAttribute(\"tabindex\", \"-1\");\n  el4.setAttribute(\"aria-controls\", data_0[\"uid\"]);\n  var el5 = document.createTextNode(\"\\n    \");\n  el4.appendChild(el5);\n  data = data_0;\n  \n      this.stepUp.innerHTML = data.Icon._renderSVG('spectrum-css-icon-StepperUpChevron', ['_coral-Stepper-stepUpIcon']);\n    \n  data_0 = data;\n  var el7 = document.createTextNode(\"\\n  \");\n  el4.appendChild(el7);\n  el2.appendChild(el4);\n  var el8 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el8);\n  var el9 = this[\"stepDown\"] = document.createElement(\"button\",\"coral-button\");\n  el9.setAttribute(\"variant\", \"_custom\");\n  el9.className += \" _coral-Stepper-stepDown _coral-Button--action\";\n  el9.setAttribute(\"type\", \"button\");\n  el9.setAttribute(\"is\", \"coral-button\");\n  el9.setAttribute(\"handle\", \"stepDown\");\n  el9.setAttribute(\"title\", data_0[\"i18n\"][\"get\"]('Decrement'));\n  el9.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('Decrement'));\n  el9.setAttribute(\"tabindex\", \"-1\");\n  el9.setAttribute(\"aria-controls\", data_0[\"uid\"]);\n  var el10 = document.createTextNode(\"\\n    \");\n  el9.appendChild(el10);\n  data = data_0;\n  \n      this.stepDown.innerHTML = data.Icon._renderSVG('spectrum-css-icon-StepperDownChevron', ['_coral-Stepper-stepDownIcon']);\n    \n  data_0 = data;\n  var el12 = document.createTextNode(\"\\n  \");\n  el9.appendChild(el12);\n  el2.appendChild(el9);\n  var el13 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el13);\n  var el14 = this[\"liveregion\"] = document.createElement(\"span\");\n  el14.setAttribute(\"role\", \"presentation\");\n  el14.setAttribute(\"handle\", \"liveregion\");\n  el14.setAttribute(\"aria-live\", \"assertive\");\n  el14.setAttribute(\"aria-atomic\", \"true\");\n  el14.setAttribute(\"aria-relevant\", \"additions text\");\n  el14.className += \" u-coral-screenReaderOnly\";\n  el14.setAttribute(\"hidden\", \"\");\n  el2.appendChild(el14);\n  var el15 = document.createTextNode(\"\\n\");\n  el2.appendChild(el15);\n  frag.appendChild(el2);\n  var el16 = document.createTextNode(\"\\n\");\n  frag.appendChild(el16);\n  var el17 = this[\"input\"] = document.createElement(\"input\",\"coral-textfield\");\n  el17.setAttribute(\"is\", \"coral-textfield\");\n  el17.setAttribute(\"handle\", \"input\");\n  el17.setAttribute(\"type\", \"number\");\n  el17.className += \" _coral-Stepper-input\";\n  el17.id = data_0[\"uid\"];\n  el17.setAttribute(\"step\", \"1\");\n  el17.setAttribute(\"aria-valuenow\", \"\");\n  el17.setAttribute(\"aria-valuetext\", \"\");\n  frag.appendChild(el17);\n  var el18 = document.createTextNode(\"\\n\");\n  frag.appendChild(el18);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport '../../../coralui-component-button';\nimport '../../../coralui-component-textfield';\nimport {Icon} from '../../../coralui-component-icon';\nimport base from '../templates/base';\nimport {transform, commons, i18n} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Stepper';\nlet clearLiveRegionTimeout;\nconst LIVEREGION_TIMEOUT_DELAY = 3000;\nconst MSPOINTER_TYPE_MOUSE = 0x00000004;\nlet flagTouchStart = false;\nlet flagStepButtonClick = false;\n\nfunction handleDecimalOperation(operator, value1, value2) {\n  let result = operator === '+' ? value1 + value2 : value1 - value2;\n  \n  // Check if we have decimals\n  if (value1 % 1 !== 0 || value2 % 1 !== 0) {\n    const value1Decimal = value1.toString().split('.');\n    const value2Decimal = value2.toString().split('.');\n    const value1DecimalLength = value1Decimal[1] && value1Decimal[1].length || 0;\n    const value2DecimalLength = value2Decimal[1] && value2Decimal[1].length || 0;\n    const multiplier = Math.pow(10, Math.max(value1DecimalLength, value2DecimalLength));\n    \n    // Transform the decimals to integers based on the multiplier\n    value1 = Math.round(value1 * multiplier);\n    value2 = Math.round(value2 * multiplier);\n    \n    // Perform the operation on integers values to make sure we don't get a fancy decimal value\n    result = operator === '+' ? value1 + value2 : value1 - value2;\n    \n    // Transform the integer result back to decimal\n    result /= multiplier;\n  }\n  \n  return result;\n}\n\n/**\n @class Coral.NumberInput\n @classdesc A NumberInput component is a numeric control form field. It follows the ARIA specification for spinbutton.\n This means the following keys are valid for interacting with it: <code>up</code>, <code>down</code>, <code>left</code>,\n <code>right</code>, <code>pageup</code>, <code>pagedown</code>, <code>home</code>, <code>end</code> and the Mouse Wheel.\n @htmltag coral-numberinput\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass NumberInput extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    this._delegateEvents(commons.extend(this._events, {\n      'key:up': '_onKeyUp',\n      'key:pageup': '_onKeyUp',\n      'key:down': '_onKeyDown',\n      'key:pagedown': '_onKeyDown',\n      'key:home': '_onKeyHome',\n      'key:end': '_onKeyEnd',\n      'touchstart [handle=stepUp], [handle=stepDown]': '_onTouchStart',\n      'pointerdown [handle=stepUp], [handle=stepDown]': '_onTouchStart',\n      'MSPointerDown [handle=stepUp], [handle=stepUp]': '_onTouchStart',\n      'MSPointerDown [handle=stepDown], [handle=stepDown]': '_onTouchStart',\n  \n      'click [handle=stepUp]': '_onStepUpButtonClick',\n      'click [handle=stepDown]': '_onStepDownButtonClick',\n  \n      'mousewheel [handle=\"input\"]': '_onInputMouseWheel',\n      'DOMMouseScroll [handle=\"input\"]': '_onInputMouseWheel',\n  \n      'capture:focus': '_onFocus',\n      'capture:blur': '_onBlur'\n    }));\n    \n    // Prepare templates\n    this._elements = {};\n    base.call(this._elements, {i18n, commons, Icon});\n  \n    // Pre-define labellable element\n    this._labellableElement = this._elements.input;\n  \n    // Default is null\n    this._min = this._max = null;\n  }\n  \n  /**\n   This field's current value.\n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    return this._elements.input.value;\n  }\n  set value(value) {\n    value = isNaN(value) ? '' : String(value);\n  \n    // sets the value immediately so it is picked up in form submits\n    this._elements.input.value = value;\n  \n    // in order to keep the reset value in sync, we need to handle the \"value\" attribute of the inner input\n    const valueAttribute = this.getAttribute('value');\n    this._elements.input[valueAttribute ? 'setAttribute' : 'removeAttribute']('value', valueAttribute);\n  \n    // @a11y: aria-valuetext is used so that VoiceOver does not announce a percentage\n    this._elements.input.setAttribute('aria-valuenow', this.value);\n    this._elements.input.setAttribute('aria-valuetext', this.value);\n  \n    // If the event triggering a value change is a click on a +/- button,\n    // announce the new value using the live region.\n    if (flagStepButtonClick || !!window.chrome) {\n      this._updateLiveRegion(this.value);\n      // Otherwise, clear the live region.\n    }\n    else {\n      this._updateLiveRegion();\n    }\n  \n    flagStepButtonClick = false;\n    \n    this.invalid = this.hasAttribute('invalid');\n    this.disabled = this.hasAttribute('disabled');\n  }\n  \n  /**\n   The value returned as a Number. Value is <code>NaN</code> if conversion to Number is not possible.\n   \n   @type {Number}\n   @default NaN\n   */\n  get valueAsNumber() {\n    let valueAsNumber = this._valueAsNumber;\n    \n    if (valueAsNumber !== null && !isNaN(valueAsNumber)) {\n      return valueAsNumber;\n    }\n    \n    valueAsNumber = transform.float(this.value);\n    if (valueAsNumber !== null && !isNaN(valueAsNumber)) {\n      return valueAsNumber;\n    }\n    \n    return NaN;\n  }\n  set valueAsNumber(value) {\n    this._valueAsNumber = transform.float(value);\n  \n    this.value = this._valueAsNumber;\n    this.invalid = this.hasAttribute('invalid');\n    this.disabled = this.hasAttribute('disabled');\n  }\n  \n  /**\n   The minimum value for the NumberInput. If a value below the minimum is set, the NumberInput will be marked as\n   invalid but the value will be preserved. Stepping down the NumberInput via {@link Coral.NumberInput#stepDown}\n   or the decrement button respects the minimum value. It reflects the <code>min</code> attribute to the DOM.\n   \n   @type {?Number}\n   @default null\n   @htmlattribute min\n   @htmlattributereflected\n   */\n  get min() {\n    return this._min;\n  }\n  set min(value) {\n    value = transform.number(value);\n  \n    this._min = isNaN(value) ? null : value;\n    \n    if (this._min === null) {\n      this._reflectAttribute('min', false);\n      \n      this._elements.input.removeAttribute('aria-valuemin');\n      this._elements.input.removeAttribute('min');\n    }\n    else {\n      this._reflectAttribute('min', this._min);\n      // sets the min in the input so that keyboard handles this component\n      this._elements.input.setAttribute('aria-valuemin', this._min);\n      this._elements.input.min = this._min;\n    }\n    \n    this.invalid = this.hasAttribute('invalid');\n    this.disabled = this.hasAttribute('disabled');\n  }\n  \n  /**\n   The maximum value for the NumberInput. If a value above the maximum is set, the NumberInput will be marked as\n   invalid but the value will be preserved. Stepping up the NumberInput via {@link Coral.NumberInput#stepUp} or\n   the increment button respects the maximum value. It reflects the <code>max</code> attribute to the DOM.\n   \n   @type {?Number}\n   @default null\n   @htmlattribute max\n   @htmlattributereflected\n   */\n  get max() {\n    return this._max;\n  }\n  set max(value) {\n    value = transform.number(value);\n  \n    this._max = isNaN(value) ? null : value;\n  \n    if (this.max === null) {\n      this._reflectAttribute('max', false);\n      \n      this._elements.input.removeAttribute('aria-valuemax');\n      this._elements.input.removeAttribute('max');\n    }\n    else {\n      this._reflectAttribute('max', this._max);\n      // sets the max in the input so that keyboard handles this component\n      this._elements.input.setAttribute('aria-valuemax', this._max);\n      this._elements.input.max = this._max;\n    }\n    \n    this.invalid = this.hasAttribute('invalid');\n    this.disabled = this.hasAttribute('disabled');\n  }\n  \n  /**\n   The amount to increment by when stepping up or down. It can be the string <code>any</code> or any positive\n   floating point number. If this is not set to <code>any<code>, the control accepts only values at multiples of\n   the step value greater than the minimum.\n   \n   @type {Number|String}\n   @default 1\n   @htmlattribute step\n   @htmlattributereflected\n   */\n  get step() {\n    return this._step || 1;\n  }\n  set step(value) {\n    if (value !== null && (value > 0 || value === 'any')) {\n      this._step = value === 'any' ? value : transform.number(value);\n      this._reflectAttribute('step', this._step);\n  \n      this._elements.input.step = this._step;\n    }\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._elements.input.name;\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n    \n    this._elements.input.name = value;\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.setAttribute('aria-disabled', this._disabled);\n    this.classList.toggle('is-disabled', this._disabled);\n    this._elements.input.disabled = this._disabled;\n    \n    this._setButtonState();\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    this.setAttribute('aria-required', this._required);\n    this._elements.input.required = this._required;\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    this.setAttribute('aria-readonly', this._readOnly);\n    this._elements.input.readOnly = this._readOnly;\n    this._setButtonState();\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#invalid}.\n   */\n  get invalid() {\n    return super.invalid;\n  }\n  set invalid(value) {\n    super.invalid = value;\n    this._elements.input.invalid = this._invalid;\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#labelledBy}.\n   */\n  get labelledBy() {\n    return super.labelledBy;\n  }\n  set labelledBy(value) {\n    super.labelledBy = value;\n    // in case the user focuses the buttons, he will still get a notion of the usage of the component\n    this[this.labelledBy ? 'setAttribute' : 'removeAttribute']('aria-labelledby', this.labelledBy);\n  }\n  \n  /**\n   Short hint that describes the expected value of the NumberInput. It is displayed when the NumberInput is empty.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute placeholder\n   @htmlattributereflected\n   */\n  get placeholder() {\n    return this._elements.input.placeholder || '';\n  }\n  set placeholder(value) {\n    value = transform.string(value);\n    this._reflectAttribute('placeholder', value);\n\n    this._elements.input.placeholder = value;\n  }\n  \n  // overrides the behavior from mixin-formfield\n  reset() {\n    // since there is an internal value, this one handles the reset\n    this._elements.input.reset();\n  }\n  \n  // overrides the behavior from mixin-formfield\n  clear() {\n    // since there is an internal value, this one handles the clear\n    this._elements.input.clear();\n  }\n  \n  /**\n   Increments the value by <code>step</code>. If the current value is <code>null</code> or <code>''</code>, it is\n   considered as 0. The new value will always respect the <code>min</code> and <code>max</code> values if available.\n   */\n  stepUp() {\n    // uses the Number representation since it simplifies the calculations\n    const value = this.valueAsNumber;\n    const step = this._getActualStep();\n    if (isNaN(value)) {\n      this.value = this.max !== null ? Math.min(step, this.max) : step;\n    }\n    else {\n      const newValue = handleDecimalOperation('+', value, step);\n  \n      this.value = this.max !== null ? Math.min(newValue, this.max) : newValue;\n    }\n  }\n  \n  /**\n   Decrements the value by <code>step</code>. If the current value is <code>null</code> or <code>''</code>, it is\n   considered as 0. The new value will always respect the <code>min</code> and <code>max</code> values if available.\n   */\n  stepDown() {\n    // uses the Number representation since it simplifies the calculations\n    const value = this.valueAsNumber;\n    const step = this._getActualStep();\n    if (isNaN(value)) {\n      this.value = this.min !== null ? Math.max(-step, this.min) : -step;\n    }\n    else {\n      const newValue = handleDecimalOperation('-', value, step);\n  \n      this.value = this.min !== null ? Math.max(newValue, this.min) : newValue;\n    }\n  }\n  \n  /**\n   If the value is 'any' there is no allowed step, that means we incremenet with the default (as if the step was not\n   defined).\n \n   @returns {Number} the valid step according to the specs.\n \n   @ignore\n   */\n  _getActualStep() {\n    return this.step === 'any' ? 1 : this.step;\n  }\n  \n  /**\n   Checks if the current NumberInput is valid or not. This is done by checking that the current value is between the\n   provided <code>min</code> and <code>max</code> values. This check is only performed on user interaction.\n \n   @ignore\n   */\n  _validateInputValue() {\n    this.invalid = this.value !== '' && (window.isNaN(Number(this.value)) ||\n      (this.max !== null && this.value > this.max || this.min !== null && this.value < this.min) ||\n      this.value % this._getActualStep() !== 0);\n  }\n  \n  /**\n   Sets the correct state of the buttons based on <code>disabled</code>, <code>min</code>, <code>max</code> and\n   <code>readOnly</code> properties.\n \n   @ignore\n   */\n  _setButtonState() {\n    this._elements.stepUp.disabled = this.disabled || this.max !== null && this.value >= this.max || this.readOnly;\n    this._elements.stepDown.disabled = this.disabled || this.min !== null && this.value <= this.min || this.readOnly;\n  }\n  \n  /**\n   Triggers a change event. This is only done if the provided values are different.\n \n   @param {String} newValue\n   The new value of the component.\n   @param {String} oldValue\n   The old value of the component.\n \n   @private\n   */\n  _triggerChange(newValue, oldValue) {\n    // if the underlaying value stayed the same, there no need to trigger an event\n    if (newValue !== oldValue) {\n      this.trigger('change');\n    }\n  }\n  \n  /**\n   Flags a touchstart or pointer event so that we can determine if an event originates from a touch screen interaction\n   or from a mouse interaction. An event originating from a mouse interaction should shift the focus to the input,\n   while an event originating from a touch interaction should not change the focus. On a touch screen, if the user\n   presses the increment or decrement button, focus should not shift to the input and open the software keyboard.\n \n   @ignore\n   */\n  _onTouchStart(event) {\n    if (event.type === 'touchstart' || event.pointerType !== 'mouse' && event.pointerType !== MSPOINTER_TYPE_MOUSE) {\n      flagTouchStart = true;\n    }\n  }\n  \n  /**\n   Per WAI-ARIA spinbutton design pattern, http://www.w3.org/TR/wai-aria-practices/#spinbutton, shift focus to the\n   input if it does not currently have focus. We make an exception for touch devices, because a better user\n   experience is for the focus to remain on an increment or decrement button without shifting focus and opening the\n   soft keyboard.\n \n   @ignore\n   */\n  _setFocusToInput() {\n    if (!flagTouchStart && document.activeElement !== this._elements.input) {\n      this._elements.input.focus();\n    }\n    flagTouchStart = false;\n  }\n  \n  /**\n   Handles the click on the step up button. It causes the NumberInput to step up its value and returns the focus back\n   to the input. This way the clicked button does not get focus.\n \n   @emits {change}\n   @ignore\n   */\n  _onStepUpButtonClick(event) {\n    event.preventDefault();\n  \n    // stores the old value before stepup\n    const oldValue = this.value;\n  \n    flagStepButtonClick = event.type === 'click';\n  \n    this._setFocusToInput();\n  \n    this.stepUp();\n  \n    // we only do this on user interaction\n    this._validateInputValue();\n  \n    // checks if we need to trigger a change event\n    this._triggerChange(this.value, oldValue);\n  }\n  \n  /**\n   Handles the click on the step down button. It causes the NumberInput to step down its value and returns the focus\n   back to the input. This way the clicked button does not get focus.\n \n   @emits {change}\n   @ignore\n   */\n  _onStepDownButtonClick(event) {\n    event.preventDefault();\n  \n    // stores the old value before stepdown\n    const oldValue = this.value;\n  \n    flagStepButtonClick = event.type === 'click';\n  \n    this._setFocusToInput();\n  \n    this.stepDown();\n  \n    // we only do this on user interaction\n    this._validateInputValue();\n  \n    // checks if we need to trigger a change event\n    this._triggerChange(this.value, oldValue);\n  }\n  \n  /**\n   Handles the home key press. If a max has been set, the value will be modified to match it, otherwise the key is\n   ignored.\n   \n   @ignore\n   */\n  _onKeyHome(event) {\n    event.preventDefault();\n    \n    // stops interaction if the numberinput is disabled or readonly\n    if (this.disabled || this.readOnly) {\n      return;\n    }\n    \n    // sets the max value only if it exists\n    if (this.max !== null) {\n      // stores the old value before setting the max\n      const oldValue = this.value;\n      \n      // When appropriate flagStepButtonClick will trigger a live region update.\n      flagStepButtonClick = true;\n      \n      this.value = this.max;\n      \n      // checks if we need to trigger a change event\n      this._triggerChange(this.value, oldValue);\n    }\n    \n    this._setFocusToInput();\n  }\n  \n  /**\n   Handles the end key press. If a min has been set, the value will be modified to match it, otherwise the key is\n   ignored.\n   \n   @ignore\n   */\n  _onKeyEnd(event) {\n    event.preventDefault();\n    \n    // stops interaction if the numberinput is disabled or readonly\n    if (this.disabled || this.readOnly) {\n      return;\n    }\n    \n    // sets the min value only if it exists\n    if (this.min !== null) {\n      // stores the old value before setting the min\n      const oldValue = this.value;\n      \n      // When appropriate, flagStepButtonClick will trigger a live region update.\n      flagStepButtonClick = true;\n      \n      this.value = this.min;\n      \n      // checks if we need to trigger a change event\n      this._triggerChange(this.value, oldValue);\n    }\n    \n    this._setFocusToInput();\n  }\n  \n  /**\n   Handles the up action by steping up the NumberInput. It prevents the default action.\n   \n   @ignore\n   */\n  _onKeyUp(event) {\n    event.preventDefault();\n    \n    // stops interaction if the numberinput is disabled or readonly\n    if (this.disabled || this.readOnly) {\n      return;\n    }\n    \n    this._onStepUpButtonClick(event);\n  }\n  \n  /**\n   Handles the down action by steping down the NumberInput. It prevents the default action.\n   \n   @ignore\n   */\n  _onKeyDown(event) {\n    event.preventDefault();\n    \n    // stops interaction if the numberinput is disabled or readonly\n    if (this.disabled || this.readOnly) {\n      return;\n    }\n    \n    this._onStepDownButtonClick(event);\n  }\n  \n  /**\n   Handles the Mousewheel to increment/decrement values.\n   \n   @ignore\n   */\n  _onInputMouseWheel(event) {\n    // stops interaction if the numberinput is disabled or readonly or is not focused (this is the case where its hovered but not focused)\n    if (this.disabled || this.readOnly || this._elements.input !== document.activeElement) {\n      return;\n    }\n    \n    // else we prevent the default event like user scrolling the page and handle the mouse wheel input\n    event.preventDefault();\n    \n    // stores the old value to calculate the change\n    const oldValue = this.value;\n    \n    const delta = Math.max(-1, Math.min(1, event.wheelDelta || -event.detail || event.deltaY));\n    if (delta < 0) {\n      this.stepDown();\n    }\n    else {\n      this.stepUp();\n    }\n    \n    // checks if we need to trigger a change event\n    this._triggerChange(this.value, oldValue);\n  }\n  \n  /**\n   Overrides the method from formField to be able to add validation after the user has changed the value.\n   \n   @private\n   */\n  _onInputChange(event) {\n    // stops the current event\n    event.stopPropagation();\n    \n    // we only do this on user interaction\n    this._validateInputValue();\n    \n    // we force the sync of the value,invalid and disabled properties\n    this.value = this.value;\n    this.invalid = this.invalid;\n    this.disabled = this.disabled;\n    \n    // we always trigger a change since it came from user interaction\n    this.trigger('change');\n  }\n  \n  /**\n   Handles focus event.\n   \n   @ignore\n   */\n  _onFocus() {\n    this.classList.add('is-focused');\n    this._elements.input.classList.add('is-focused');\n    this._elements.liveregion.removeAttribute('role');\n    this._elements.liveregion.removeAttribute('aria-hidden');\n  }\n  \n  /**\n   Handles blur event.\n   \n   @ignore\n   */\n  _onBlur() {\n    this.classList.remove('is-focused');\n    this._elements.input.classList.remove('is-focused');\n    \n    // clear liveregion\n    this._elements.liveregion.setAttribute('role', 'presentation');\n    this._elements.liveregion.setAttribute('aria-hidden', true);\n    this._clearLiveRegion();\n  }\n  \n  /** @ignore */\n  _clearLiveRegion() {\n    const liveregion = this._elements.liveregion;\n    if (liveregion.firstChild) {\n      liveregion.removeChild(liveregion.firstChild);\n    }\n  }\n  \n  /** @ignore */\n  _updateLiveRegion(value) {\n    const self = this;\n    let textNode;\n    \n    clearTimeout(clearLiveRegionTimeout);\n    this._clearLiveRegion();\n    \n    if (value && value !== '') {\n      textNode = document.createTextNode(value);\n      window.requestAnimationFrame(() => {\n        self._elements.liveregion.appendChild(textNode);\n        clearLiveRegionTimeout = setTimeout(self._clearLiveRegion.bind(self),\n          LIVEREGION_TIMEOUT_DELAY);\n      });\n    }\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'min',\n      'max',\n      'step',\n      'placeholder'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n\n    this.classList.add(CLASSNAME);\n\n    // Default reflected attributes\n    if (!this._step) { this.step = 1; }\n  \n    // a11y\n    this.setAttribute('role', 'group');\n  \n    if (this._elements.input.type === 'text') {\n      this._elements.input.setAttribute('role', 'spinbutton');\n    }\n  \n    // sets the very initial aria values, in case the 'value' property is never set\n    this._elements.input.setAttribute('aria-valuenow', '');\n    this._elements.input.setAttribute('aria-valuetext', '');\n    \n    const frag = document.createDocumentFragment();\n  \n    const templateHandleNames = ['presentation', 'input'];\n    \n    // Render main template\n    frag.appendChild(this._elements.presentation);\n    frag.appendChild(this._elements.input);\n  \n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && templateHandleNames.indexOf(child.getAttribute('handle')) === -1) {\n        // Add non-template elements to the frag\n        frag.appendChild(child);\n      }\n      else {\n        // Remove anything else\n        this.removeChild(child);\n      }\n    }\n    \n    this.appendChild(frag);\n  }\n}\n\nexport default NumberInput;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport translations from './i18n/translations.json';\nimport {strings, commons} from '../coralui-util';\nimport NumberInput from './src/scripts/NumberInput';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-numberinput': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-numberinput', NumberInput);\n\nexport {NumberInput};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {SelectableCollection} from '../../../coralui-collection';\n\nconst CLASSNAME = '_coral-PanelStack';\n\n/**\n @class Coral.PanelStack\n @classdesc A PanelStack component holding a collection of panels. It wraps content, keeping only the selected panel in view.\n @htmltag coral-panelstack\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass PanelStack extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Attach events\n    this._delegateEvents({\n      // private\n      'coral-panel:_selectedchanged': '_onItemSelectedChanged'\n    });\n    \n    // Used for eventing\n    this._oldSelection = null;\n    \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // just init on demand\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-panel',\n        // allows panels to be nested\n        itemSelector: ':scope > coral-panel',\n        onItemAdded: this._validateSelection,\n        onItemRemoved: this._validateSelection\n      });\n    }\n    return this._items;\n  }\n  \n  /**\n   The selected item of the PanelStack.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getLastSelected();\n  }\n  \n  /** @private */\n  _onItemSelectedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    this._validateSelection(event.target);\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    const selectedItems = this.items._getAllSelected();\n    \n    // Last selected item wins if multiple selection while not allowed\n    item = item || selectedItems[selectedItems.length - 1];\n\n    if (item && item.hasAttribute('selected') && selectedItems.length > 1) {\n      selectedItems.forEach((selectedItem) => {\n        if (selectedItem !== item) {\n          // Don't trigger change events\n          this._preventTriggeringEvents = true;\n          selectedItem.removeAttribute('selected');\n        }\n      }, this);\n  \n      // We can trigger change events again\n      this._preventTriggeringEvents = false;\n    }\n    \n    this._triggerChangeEvent();\n  }\n  \n  /** @private */\n  _triggerChangeEvent() {\n    const selectedItem = this.selectedItem;\n    const oldSelection = this._oldSelection;\n    \n    if (!this._preventTriggeringEvents && selectedItem !== oldSelection) {\n      this.trigger('coral-panelstack:change', {\n        oldSelection: oldSelection,\n        selection: selectedItem\n      });\n      \n      this._oldSelection = selectedItem;\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    this.setAttribute('role', 'presentation');\n    \n    // Don't trigger events once connected\n    this._preventTriggeringEvents = true;\n    this._validateSelection();\n    this._preventTriggeringEvents = false;\n    \n    this._oldSelection = this.selectedItem;\n  }\n  \n  /**\n   Triggered when {@link PanelStack} selected panel has changed.\n   \n   @typedef {CustomEvent} coral-panelstack:change\n   \n   @property {Panel} detail.selection\n   The new selected panel.\n   @property {Panel} detail.oldSelection\n   The prior selected panel.\n   */\n}\n\nexport default PanelStack;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Panel';\n\n/**\n @class Coral.Panel\n @classdesc A Panel component\n @htmltag coral-panel\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Panel extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Templates\n    this._elements = {\n      content: this.querySelector('coral-panel-content') || document.createElement('coral-panel-content')\n    };\n  }\n  \n  /**\n   The content of the panel.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-panel-content',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   Whether the item is selected. When true, the item will appear as the active element in the PanelStack. The item\n   must be a child of a PanelStack before this property is set to true. This property cannot be programmatically set\n   to false.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n    \n    this.classList.toggle('is-selected', this._selected);\n    this.setAttribute('aria-selected', this._selected);\n    this.setAttribute('aria-hidden', !this.selected);\n    \n    this.trigger('coral-panel:_selectedchanged');\n  }\n  \n  get _contentZones() { return {'coral-panel-content': 'content'}; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['selected'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // adds the role to support accessibility\n    this.setAttribute('role', 'tabpanel');\n  \n    // Fetch the content zone elements\n    const content = this._elements.content;\n    \n    // Remove it so we can process children\n    content.remove();\n  \n    // Finally, move any remaining elements into the content sub-component\n    while (this.firstChild) {\n      content.appendChild(this.firstChild);\n    }\n  \n    // Assign the content zone so the insert function will be called\n    this.content = content;\n  }\n}\n\nexport default Panel;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Panel.Content\n @classdesc A PanelStack Item Content component\n @htmltag coral-panel-content\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-panel-content');\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport PanelStack from './src/scripts/PanelStack';\nimport Panel from './src/scripts/Panel';\nimport PanelContent from './src/scripts/PanelContent';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-panelstack', PanelStack);\nwindow.customElements.define('coral-panel', Panel);\n\nPanel.Content = PanelContent;\n\nexport {PanelStack, Panel};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"percentage\"] = document.createElement(\"div\");\n  el0.className += \" _coral-Loader--bar-percentage\";\n  el0.setAttribute(\"handle\", \"percentage\");\n  el0.setAttribute(\"aria-hidden\", \"true\");\n  el0.setAttribute(\"style\", \"visibility: hidden\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"bar\"] = document.createElement(\"div\");\n  el2.setAttribute(\"handle\", \"bar\");\n  el2.className += \" _coral-Loader--bar-track\";\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  var el4 = this[\"status\"] = document.createElement(\"div\");\n  el4.className += \" _coral-Loader--bar-fill\";\n  el4.setAttribute(\"handle\", \"status\");\n  el2.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  el2.appendChild(el5);\n  frag.appendChild(el2);\n  var el6 = document.createTextNode(\"\\n\");\n  frag.appendChild(el6);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport base from '../templates/base';\nimport {transform, validate} from '../../../coralui-util';\n\n/**\n Enumeration for {@link Progress} variants.\n \n @typedef {Object} ProgressVariantEnum\n \n @property {String} DEFAULT\n The default progress bar.\n @property {String} MONOCHROME\n A black and white styled progress bar.\n */\nconst variant = {\n  DEFAULT: 'default',\n  MONOCHROME: 'monochrome'\n};\n\n/**\n Enumeration for {@link Progress} sizes.\n \n @typedef {Object} ProgressSizeEnum\n \n @property {String} SMALL\n A small progress bar.\n @property {String} MEDIUM\n A default medium progress bar.\n @property {String} LARGE\n Not supported. Falls back to MEDIUM.\n */\nconst size = {\n  SMALL: 'S',\n  MEDIUM: 'M',\n  LARGE: 'L'\n};\n\n/**\n Enumeration for {@link Progress} label positions.\n \n @typedef {Object} ProgressLabelPositionEnum\n \n @property {String} LEFT\n Show the label to the left of the bar.\n @property {String} RIGHT\n Show the label to the right of the bar.\n @property {String} SIDE\n Show the label to the side of the bar.\n @property {String} BOTTOM\n Not supported. Falls back to LEFT.\n */\nconst labelPosition = {\n  LEFT: 'left',\n  RIGHT: 'right',\n  SIDE: 'side',\n  BOTTOM: 'bottom'\n};\n\n// Base classname\nconst CLASSNAME = '_coral-Loader--bar';\n\n/**\n @class Coral.Progress\n @classdesc A Progress component to indicate progress of processes.\n @htmltag coral-progress\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Progress extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      // Fetch or create the content content zone element\n      label: this.querySelector('coral-progress-label') || document.createElement('coral-progress-label')\n    };\n    base.call(this._elements);\n  \n    // Watch for label changes\n    this._observer = new MutationObserver(this._toggleLabelVisibility.bind(this));\n    this._observer.observe(this._elements.label, {\n      characterData: true,\n      childList: true,\n      subtree: true\n    });\n  }\n  \n  /**\n   The progress variant. See {@link ProgressVariantEnum}.\n   \n   @type {String}\n   @default ProgressVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n    \n    this.classList.toggle(`${CLASSNAME}--fullpage`, this._variant === variant.MONOCHROME);\n  }\n  \n  /**\n   The current progress in percent.\n   \n   @type {Number}\n   @default 0\n   @emits {coral-progress:change}\n   @htmlattribute value\n   @htmlattributereflected\n   */\n  get value() {\n    return this.indeterminate ? 0 : this._value || 0;\n  }\n  set value(value) {\n    value = transform.number(value) || 0;\n    \n    // Stay within bounds\n    if (value > 100) {\n      value = 100;\n    }\n    else if (value < 0) {\n      value = 0;\n    }\n    \n    this._value = value;\n    this._reflectAttribute('value', this._value);\n  \n    this._elements.status.style.width = `${this.value}%`;\n  \n    if (!this.indeterminate) {\n      // ARIA: Reflect value for screenreaders\n      this.setAttribute('aria-valuenow', this._value);\n    \n      if (this.showPercent) {\n        // Only update label text in percent mode\n        this._setPercentage(`${this._value}%`);\n      }\n    }\n    \n    this.trigger('coral-progress:change');\n  }\n  \n  /**\n   Whether to hide the current value and show an animation. Set to true for operations whose progress cannot be\n   determined.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute indeterminate\n   @htmlattributereflected\n   */\n  get indeterminate() {\n    return this._indeterminate || false;\n  }\n  set indeterminate(value) {\n    this._indeterminate = transform.booleanAttr(value);\n    this._reflectAttribute('indeterminate', this._indeterminate);\n  \n    if (this._indeterminate) {\n      this.classList.add(`${CLASSNAME}--indeterminate`);\n    \n      // ARIA: Remove attributes\n      this.removeAttribute('aria-valuenow');\n      this.removeAttribute('aria-valuemin');\n      this.removeAttribute('aria-valuemax');\n      \n      this.value = 0;\n    }\n    else {\n      this.classList.remove(`${CLASSNAME}--indeterminate`);\n    \n      // ARIA: Add attributes\n      this.setAttribute('aria-valuemin', '0');\n      this.setAttribute('aria-valuemax', '100');\n  \n      this.value = this._oldValue;\n    }\n  }\n  \n  /**\n   The vertical and text size of this progress bar. To adjust the width, simply set the CSS width property.\n   See {@link ProgressSizeEnum}.\n   \n   @type {String}\n   @default ProgressSizeEnum.MEDIUM\n   @htmlattribute size\n   @htmlattributereflected size\n   */\n  get size() {\n    return this._size || size.MEDIUM;\n  }\n  set size(value) {\n    value = transform.string(value).toUpperCase();\n    this._size = validate.enumeration(size)(value) && value || size.MEDIUM;\n    this._reflectAttribute('size', this._size);\n    \n    this.classList.toggle(`${CLASSNAME}--small`, this._size === size.SMALL);\n  }\n  \n  /**\n   Boolean attribute to toggle showing progress percent as the label content.\n   Default is true.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute showpercent\n   */\n  get showPercent() {\n    return this._showPercent || false;\n  }\n  set showPercent(value) {\n    this._showPercent = transform.booleanAttr(value);\n    this._reflectAttribute('showpercent', this._showPercent);\n  \n    if (this._showPercent) {\n      const content = this.indeterminate ? '' : `${this.value}%`;\n      this._setPercentage(content);\n    }\n    \n    this._toggleLabelVisibility();\n  }\n  \n  /**\n   Used to access to the {@link Coral.Progress.Label} element. Keep in mind that the width of a custom label is\n   limited for {@link Coral.Progress.labelPosition.LEFT} and {@link Coral.Progress.labelPosition.RIGHT}.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get label() {\n    return this._getContentZone(this._elements.label);\n  }\n  set label(value) {\n    this._setContentZone('label', value, {\n      handle: 'label',\n      tagName: 'coral-progress-label',\n      insert: function(label) {\n        this.appendChild(label);\n      }\n    });\n  }\n  \n  /**\n   Label position. See {@link ProgressLabelPositionEnum}.\n   \n   @type {String}\n   @default ProgressLabelPositionEnum.LEFT\n   @htmlattribute labelposition\n   @htmlattributereflected\n   */\n  get labelPosition() {\n    return this._labelPosition || labelPosition.LEFT;\n  }\n  set labelPosition(value) {\n    value = transform.string(value).toLowerCase();\n    this._labelPosition = validate.enumeration(labelPosition)(value) && value || labelPosition.LEFT;\n    this._reflectAttribute('labelposition', this._labelPosition);\n    \n    this.classList.toggle('_coral-Loader--side-label', this._labelPosition === labelPosition.SIDE);\n    \n    let elements = ['label', 'percentage', 'bar'];\n    if (this.labelPosition === labelPosition.RIGHT) {\n      elements = ['percentage', 'label', 'bar'];\n    }\n    else if (this.labelPosition === labelPosition.SIDE) {\n      elements = ['label', 'bar', 'percentage'];\n    }\n    \n    // @spectrum should be supported with classes\n    elements.forEach((el, i) => {\n      this._elements[el].style.order = i;\n    });\n    \n    this._toggleLabelVisibility();\n  }\n  \n  /** @ignore */\n  _toggleLabelVisibility() {\n    const percentage = this._elements.percentage;\n    const label = this._elements.label;\n    const isSidePositioned = this.labelPosition === labelPosition.SIDE;\n    \n    // Handle percentage\n    if (this.showPercent) {\n      percentage.style.visibility = 'visible';\n      percentage.setAttribute('aria-hidden', 'false');\n      \n      if (isSidePositioned) {\n        percentage.hidden = false;\n      }\n    }\n    else {\n      percentage.style.visibility = 'hidden';\n      percentage.setAttribute('aria-hidden', 'true');\n\n      if (isSidePositioned) {\n        percentage.hidden = true;\n      }\n    }\n  \n    // Handle label\n    if (label.textContent.length > 0) {\n      label.style.visibility = 'visible';\n      label.setAttribute('aria-hidden', 'false');\n    \n      if (isSidePositioned) {\n        label.hidden = false;\n      }\n    \n      if (!this.showPercent) {\n        // Update the value for accessibility as it was cleared when the label was hidden\n        this.setAttribute('aria-valuetext', label.textContent);\n      }\n    }\n    else {\n      label.style.visibility = 'hidden';\n      label.setAttribute('aria-hidden', 'true');\n    \n      if (isSidePositioned) {\n        label.hidden = true;\n      }\n    \n      // Remove the value for accessibility so the screenreader knows we're unlabelled\n      this.removeAttribute('aria-valuetext');\n    }\n  }\n  \n  /** @ignore */\n  _setPercentage(content) {\n    this._elements.percentage.textContent = content;\n    \n    // ARIA\n    this[this.showPercent ? 'removeAttribute' : 'setAttribute']('aria-valuetext', content);\n  }\n  \n  get _contentZones() { return {'coral-progress-label': 'label'}; }\n  \n  /**\n   Returns {@link Progress} variants.\n   \n   @return {ProgressVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /**\n   Returns {@link Progress} label position options.\n   \n   @return {ProgressLabelPositionEnum}\n   */\n  static get labelPosition() { return labelPosition; }\n  \n  /**\n   Returns {@link Progress} sizes.\n   \n   @return {ProgressSizeEnum}\n   */\n  static get size() { return size; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return [\n      'variant',\n      'value',\n      'indeterminate',\n      'size',\n      'showpercent',\n      'showPercent',\n      'labelposition',\n      'labelPosition'\n    ];\n  }\n  \n  /** @ignore */\n  attributeChangedCallback(name, oldValue, value) {\n    if (name === 'indeterminate' && transform.booleanAttr(value)) {\n      // Remember current value in case indeterminate is toggled\n      this._oldValue = this._value || 0;\n    }\n    \n    super.attributeChangedCallback(name, oldValue, value);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n    if (!this._value) { this.value = this.value; }\n    if (!this._size) { this.size = size.MEDIUM; }\n    if (!this._labelPosition) { this.labelPosition = labelPosition.LEFT; }\n  \n    // Create a fragment\n    const fragment = document.createDocumentFragment();\n  \n    const templateHandleNames = ['bar', 'percentage'];\n    \n    // Render the template\n    fragment.appendChild(this._elements.percentage);\n    fragment.appendChild(this._elements.bar);\n    \n    const label = this._elements.label;\n  \n    // Remove it so we can process children\n    if (label.parentNode) {\n      label.parentNode.removeChild(label);\n    }\n  \n    // Move any remaining elements into the content sub-component\n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && templateHandleNames.indexOf(child.getAttribute('handle')) === -1) {\n        // Add non-template elements to the label\n        label.appendChild(child);\n      }\n      else {\n        // Remove anything else\n        this.removeChild(child);\n      }\n    }\n  \n    // Add the frag to the component\n    this.appendChild(fragment);\n  \n    // Assign the content zone\n    this.label = label;\n  \n    // Toggle label based on content\n    this._toggleLabelVisibility();\n  \n    // ARIA\n    this.setAttribute('role', 'progressbar');\n    this.setAttribute('aria-valuenow', '0');\n    this.setAttribute('aria-valuemin', '0');\n    this.setAttribute('aria-valuemax', '100');\n  }\n  \n  /**\n   Triggered when the {@link Progress} value is changed.\n   \n   @typedef {CustomEvent} coral-progress:change\n   */\n}\n\nexport default Progress;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Loader--bar-label';\n\n/**\n @class Coral.Progress.Label\n @classdesc The Progress label content\n @htmltag coral-progress-label\n @extends {HTMLElement}\n @private\n */\nclass ProgressLabel extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default ProgressLabel;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Progress from './src/scripts/Progress';\nimport ProgressLabel from './src/scripts/ProgressLabel';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-progress', Progress);\nwindow.customElements.define('coral-progress-label', ProgressLabel);\n\nProgress.Label = ProgressLabel;\n\nexport {Progress};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform, validate} from '../../../coralui-util';\n\n/**\n Enumeration for {@link QuickActionsItem} type values.\n \n @typedef {Object} QuickActionsItemTypeEnum\n \n @property {String} BUTTON\n Default button type\n @property {String} ANCHOR\n Anchor button type\n */\nconst type = {\n  BUTTON: 'button',\n  ANCHOR: 'anchor'\n};\n\n/**\n @class Coral.QuickActions.Item\n @classdesc A QuickActions item component\n @htmltag coral-quickactions-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass QuickActionsItem extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // QuickActions will add button/anchorbutton references to it\n    this._elements = {};\n  \n    this._observer = new MutationObserver(this._onMutation.bind(this));\n    this._observer.observe(this, {\n      characterData: true,\n      childList: true,\n      subtree: true\n    });\n  }\n  \n  /**\n   The Item's content zone.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    // Support configs\n    if (typeof value === 'object') {\n      for (const prop in value) {\n        /** @ignore */\n        this[prop] = value[prop];\n      }\n    }\n  }\n  \n  /**\n   When <code>type</code> is {@link Coral.QuickActions.Item.type.ANCHOR}, the href will be used for the anchor.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute href\n   @htmlattributereflected\n   @emits {coral-quickactions-item:_hrefchanged}\n   */\n  get href() {\n    return this._href || '';\n  }\n  set href(value) {\n    this._href = transform.string(value);\n    this._reflectAttribute('href', this._href);\n    \n    this.trigger('coral-quickactions-item:_hrefchanged');\n  }\n  \n  /**\n   Specifies the name of the icon to be shown in the QuickActions Item. See {@link Icon} for valid icon\n   names.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   @htmlattributereflected\n   @emits {coral-quickactions-item:_iconchanged}\n   */\n  get icon() {\n    return this._icon || '';\n  }\n  set icon(value) {\n    this._icon = transform.string(value);\n    this._reflectAttribute('icon', this._icon);\n    \n    this.trigger('coral-quickactions-item:_iconchanged');\n  }\n  \n  /**\n   The type of item that will be used. Setting {@link QuickActionsItemTypeEnum}.ANCHOR will allow users to\n   navigate using the quickactions proving the correct hypermedia to the users.\n   \n   @type {String}\n   @default QuickActionsItemTypeEnum.BUTTON\n   @htmlattribute type\n   @htmlattributereflected\n   */\n  get type() {\n    return this._type || type.BUTTON;\n  }\n  set type(value) {\n    value = transform.string(value).toLowerCase();\n    this._type = validate.enumeration(type)(value) && value || type.BUTTON;\n    this._reflectAttribute('type', this._type);\n    \n    this.trigger('coral-quickactions-item:_typechanged');\n  }\n  \n  /**\n   Handles mutations on the Item.\n   \n   @emits {coral-quickactions-item:_contentchanged}\n   \n   @private\n   */\n  _onMutation() {\n    this.trigger('coral-quickactions-item:_contentchanged');\n  }\n  \n  /**\n   Returns {@link QuickActionsItem} type options.\n   \n   @return {QuickActionsItemTypeEnum}\n   */\n  static get type() { return type; }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['href', 'icon', 'type']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    // Default reflected attributes\n    if (!this._type) { this.type = type.BUTTON; }\n  }\n  \n  /**\n   Triggered when an icon of a {@link QuickActionsItem} was changed.\n   \n   @typedef {CustomEvent} coral-quickactions-item:_iconchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when the content of a {@link QuickActionsItem} was changed.\n   \n   @typedef {CustomEvent} coral-quickactions-item:_contentchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when the href of a {@link QuickActionsItem} was changed.\n   \n   @typedef {CustomEvent} coral-quickactions-item:_hrefchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when the type of a {@link QuickActionsItem} was changed.\n   \n   @typedef {CustomEvent} coral-quickactions-item:_typechanged\n   \n   @private\n   */\n}\n\nexport default QuickActionsItem;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"moreButton\"] = document.createElement(\"button\",\"coral-button\");\n  el0.className += \" _coral-QuickActions-item\";\n  el0.setAttribute(\"variant\", \"_custom\");\n  el0.setAttribute(\"is\", \"coral-button\");\n  el0.setAttribute(\"type\", \"button\");\n  el0.setAttribute(\"icon\", \"more\");\n  el0.setAttribute(\"iconsize\", \"S\");\n  el0.setAttribute(\"handle\", \"moreButton\");\n  el0.setAttribute(\"title\", data_0[\"i18n\"][\"get\"]('More actions'));\n  el0.setAttribute(\"role\", \"menuitem\");\n  el0.setAttribute(\"aria-haspopup\", \"true\");\n  el0.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('More actions'));\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"overlay\"] = document.createElement(\"coral-popover\");\n  el2.setAttribute(\"smart\", \"\");\n  el2.id = data_0[\"commons\"][\"getUID\"]();\n  el2.setAttribute(\"variant\", \"flyout\");\n  el2.className += \" _coral-QuickActions-overlay\";\n  el2.setAttribute(\"offset\", \"5\");\n  el2.setAttribute(\"placement\", \"bottom\");\n  el2.setAttribute(\"handle\", \"overlay\");\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  var el4 = this[\"buttonList\"] = document.createElement(\"coral-buttonlist\");\n  el4.id = data_0[\"commons\"][\"getUID\"]();\n  el4.className += \" _coral-QuickActions-buttonList\";\n  el4.setAttribute(\"handle\", \"buttonList\");\n  el4.setAttribute(\"tabindex\", \"-1\");\n  el2.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  el2.appendChild(el5);\n  frag.appendChild(el2);\n  var el6 = document.createTextNode(\"\\n\");\n  frag.appendChild(el6);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {Icon} from '../../../coralui-component-icon';\nimport {Button} from '../../../coralui-component-button';\nimport {AnchorButton} from '../../../coralui-component-anchorbutton';\nimport {ButtonList, AnchorList} from '../../../coralui-component-list';\nimport {Overlay} from '../../../coralui-component-overlay';\nimport {Collection} from '../../../coralui-collection';\nimport QuickActionsItem from './QuickActionsItem';\nimport '../../../coralui-component-popover';\nimport base from '../templates/base';\nimport {transform, validate, commons, i18n} from '../../../coralui-util';\n\n// MUST be kept in sync with quickactions styles\nconst BUTTON_GAP = 12;\nconst BUTTON_FOCUSABLE_SELECTOR = '._coral-QuickActions-item:not([disabled]):not([hidden])';\n\n/**\n Enumeration for {@link QuickActions} interaction options.\n \n @typedef {Object} QuickActionsInteractionEnum\n \n @property {String} ON\n Show when the target is hovered or focused and hide when the mouse is moved out or focus is lost.\n @property {String} OFF\n Do not show or hide automatically.\n */\nconst interaction = {\n  ON: 'on',\n  OFF: 'off'\n};\n\n/**\n Enumeration for {@link QuickActions} anchored overlay target options.\n \n @typedef {Object} QuickActionsTargetEnum\n \n @property {String} PARENT\n Use the parent element in the DOM.\n @property {String} PREVIOUS\n Use the previous sibling element in the DOM.\n @property {String} NEXT\n Use the next sibling element in the DOM.\n */\nconst target = {\n  PARENT: '_parent',\n  PREVIOUS: '_prev',\n  NEXT: '_next'\n};\n\n/**\n Enumeration for {@link QuickActions} placement options.\n \n @typedef {Object} QuickActionsPlacementEnum\n \n @property {String} TOP\n QuickActions inset to the top of the target.\n @property {String} CENTER\n QuickActions inset to the center of the target.\n @property {String} BOTTOM\n QuickActions inset to the bottom the target.\n */\nconst placement = {\n  TOP: 'top',\n  CENTER: 'center',\n  BOTTOM: 'bottom'\n};\n\nconst OFFSET = 10;\n\nconst CLASSNAME = '_coral-QuickActions';\n\n/**\n @class Coral.QuickActions\n @classdesc A QuickActions component is an overlay component that reveals actions when interacting with a container.\n Hovering the target will display the QuickActions. They can also be launched by pressing the shift + F10 key combination\n when the target is focused.\n @htmltag coral-quickactions\n @extends {Overlay}\n */\nclass QuickActions extends Overlay {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Override defaults\n    this._overlayAnimationTime = Overlay.FADETIME;\n    this._alignMy = Overlay.align.CENTER_TOP;\n    this._alignAt = Overlay.align.CENTER_TOP;\n    this._lengthOffset = OFFSET;\n    this._inner = true;\n    this._target = target.PREVIOUS;\n    this._placement = placement.TOP;\n  \n    // Flag\n    this._openedBefore = false;\n  \n    // Debounce timer\n    this._timeout = null;\n    \n    // Template\n    base.call(this._elements, {commons, i18n});\n  \n    const events = {\n      'global:resize': '_onWindowResize',\n      'mouseout': '_onMouseOut',\n      'capture:blur': '_onBlur',\n\n      // Keyboard interaction\n      'key:home > ._coral-QuickActions-item': '_onHomeKeypress',\n      'key:end > ._coral-QuickActions-item': '_onEndKeypress',\n      'key:pagedown > ._coral-QuickActions-item': '_onButtonKeypressNext',\n      'key:right > ._coral-QuickActions-item': '_onButtonKeypressNext',\n      'key:down > ._coral-QuickActions-item': '_onButtonKeypressNext',\n      'key:pageup > ._coral-QuickActions-item': '_onButtonKeypressPrevious',\n      'key:left > ._coral-QuickActions-item': '_onButtonKeypressPrevious',\n      'key:up > ._coral-QuickActions-item': '_onButtonKeypressPrevious',\n    \n      // Buttons\n      'click > ._coral-QuickActions-item:not([handle=\"moreButton\"])': '_onButtonClick',\n    \n      // Accessibility\n      'capture:focus ._coral-QuickActions-item': '_onItemFocusIn',\n      'capture:blur ._coral-QuickActions-item': '_onItemFocusOut',\n    \n      // Items\n      'coral-quickactions-item:_contentchanged': '_onItemChange',\n      'coral-quickactions-item:_iconchanged': '_onItemChange',\n      'coral-quickactions-item:_hrefchanged': '_onItemChange',\n      'coral-quickactions-item:_typechanged': '_onItemTypeChange'\n    };\n  \n    const overlayId = this._elements.overlay.id;\n    \n    // Overlay\n    events[`global:capture:coral-overlay:beforeopen #${overlayId}`] = '_onOverlayBeforeOpen';\n    events[`global:capture:coral-overlay:beforeclose #${overlayId}`] = '_onOverlayBeforeClose';\n    events[`global:capture:coral-overlay:open #${overlayId}`] = '_onOverlayOpen';\n    events[`global:capture:coral-overlay:close #${overlayId}`] = '_onOverlayClose';\n    events[`global:capture:coral-overlay:positioned #${overlayId}`] = '_onOverlayPositioned';\n    events[`global:capture:click #${overlayId} [coral-list-item]`] = '_onButtonListItemClick';\n  \n    // Cache bound event handler functions\n    this._onTargetMouseEnter = this._onTargetMouseEnter.bind(this);\n    this._onTargetKeyUp = this._onTargetKeyUp.bind(this);\n    this._onTargetMouseLeave = this._onTargetMouseLeave.bind(this);\n  \n    // Events\n    this._delegateEvents(events);\n  \n    // delegates the item handling to the collection\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The Item collection.\n   \n   @type {Collection}\n   @readonly\n   */\n  get items() {\n    // we do lazy initialization of the collection\n    if (!this._items) {\n      this._items = new Collection({\n        host: this,\n        itemTagName: 'coral-quickactions-item',\n        onItemRemoved: this._onItemRemoved,\n        onCollectionChange: this._onCollectionChange\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /**\n   The number of items that are visible in QuickActions (excluding the show more actions button) before a collapse\n   is enforced. A value <= 0 disables this feature and shows as many items as possible. Regardless of this\n   property, the QuickActions will still fit within their target's width.\n   \n   @type {Number}\n   @default 4\n   @htmlattribute threshold\n   @htmlattributereflected\n   */\n  get threshold() {\n    return typeof this._threshold === 'number' ? this._threshold : 4;\n  }\n  set threshold(value) {\n    this._threshold = transform.number(value);\n    this._reflectAttribute('threshold', this._threshold);\n  }\n  \n  /**\n   The placement of the QuickActions. The value may be one of 'top', 'center' and 'bottom' and indicates the vertical\n   alignment of the QuickActions relative to their container.\n   See {@link OverlayPlacementEnum}.\n   \n   @type {String}\n   @default OverlayPlacementEnum.TOP\n   @htmlattribute placement\n   */\n  get placement() {\n    return super.placement;\n  }\n  set placement(value) {\n    value = transform.string(value).toLowerCase();\n    this._placement = validate.enumeration(placement) && value || placement.TOP;\n    \n    this.reposition();\n  }\n  \n  /**\n   Whether the QuickActions should show when the target is interacted with. See {@link QuickActionsInteractionEnum}.\n   \n   @type {String}\n   @default QuickActionsInteractionEnum.ON\n   @name interaction\n   @htmlattribute interaction\n   */\n  get interaction() {\n    return super.interaction;\n  }\n  set interaction(value) {\n    super.interaction = value;\n  \n    if (this.interaction === interaction.ON) {\n      this._addTargetEventListeners();\n    }\n    else {\n      this._removeTargetEventListeners();\n    }\n  }\n  \n  /**\n   Inherited from {@link Overlay#target}.\n   */\n  get target() {\n    return super.target;\n  }\n  set target(value) {\n    super.target = value;\n  \n    const targetElement = this._getTarget(value);\n    const targetHasChanged = targetElement !== this._previousTarget;\n  \n    if (targetElement && targetHasChanged) {\n      // Remove listeners from the previous target\n      if (this._previousTarget) {\n        const previousTarget = this._getTarget(this._previousTarget);\n        if (previousTarget) {\n          this._removeTargetEventListeners(previousTarget);\n          targetElement.removeAttribute('aria-haspopup');\n          targetElement.removeAttribute('aria-owns');\n        }\n      }\n\n      // Set up listeners for the new target\n      this._addTargetEventListeners();\n\n      // Mark the target as owning a popup\n      targetElement.setAttribute('aria-haspopup', 'true');\n      let ariaOwns = targetElement.getAttribute('aria-owns');\n      ariaOwns = ariaOwns && ariaOwns.length ? `${ariaOwns.trim()}  ${this.id}` : this.id;\n      targetElement.setAttribute('aria-owns', ariaOwns);\n\n      // Cache for use as previous target\n      this._previousTarget = targetElement;\n    }\n  }\n  \n  /**\n   Inherited from {@link Overlay#open}.\n   */\n  get open() {\n    return super.open;\n  }\n  set open(value) {\n    super.open = value;\n    \n    const self = this;\n    // Position once we can read items layout in the next frame\n    window.requestAnimationFrame(() => {\n      if (self.open && !self._openedBefore) {\n        // we iterate over all the items initializing them in the correct order\n        const items = self.items.getAll();\n        for (let i = 0, itemCount = items.length; i < itemCount; i++) {\n          self._attachItem(items[i], i);\n        }\n  \n        self._openedBefore = true;\n      }\n  \n      if (self.open) {\n        self._layout();\n        \n        // The QuickActions must be visible for us to be able to focus them,\n        // this may not be the case if we initially open them, due to the FOUC handling.\n        self.style.visibility = 'visible';\n        self.focus();\n      }\n  \n      // we toggle \"is-selected\" on the target to indicate that the over is open\n      const targetElement = self._getTarget();\n      if (targetElement) {\n        targetElement.classList.toggle('is-selected', self.open);\n      }\n    });\n  }\n  \n  /** @ignore */\n  _getTarget(targetValue) {\n    // Use passed target\n    targetValue = targetValue || this.target;\n    \n    if (targetValue instanceof Node) {\n      // Just return the provided Node\n      return targetValue;\n    }\n    \n    // Dynamically get the target node based on target\n    let newTarget = null;\n    if (typeof targetValue === 'string') {\n      if (targetValue === target.PARENT) {\n        newTarget = this.parentNode;\n      }\n      else {\n        // Delegate to Coral.Overlay for _prev, _next and general selector\n        newTarget = super._getTarget(targetValue);\n      }\n    }\n    \n    return newTarget;\n  }\n  \n  /** @ignore */\n  _addTargetEventListeners(targetElement) {\n    targetElement = targetElement || this._getTarget();\n    \n    if (!targetElement) {\n      return;\n    }\n    \n    // Interaction-sensitive listeners\n    if (this.interaction === interaction.ON) {\n      // We do not have to worry about the EventListener being called twice as duplicates are discarded\n      targetElement.addEventListener('mouseenter', this._onTargetMouseEnter);\n      targetElement.addEventListener('keyup', this._onTargetKeyUp);\n      targetElement.addEventListener('keydown', this._onTargetKeyDown);\n      targetElement.addEventListener('mouseleave', this._onTargetMouseLeave);\n    }\n  }\n  \n  /** @ignore */\n  _removeTargetEventListeners(targetElement) {\n    targetElement = targetElement || this._getTarget();\n    \n    if (!targetElement) {\n      return;\n    }\n    \n    targetElement.removeEventListener('mouseenter', this._onTargetMouseEnter);\n    targetElement.removeEventListener('keyup', this._onTargetKeyUp);\n    targetElement.removeEventListener('keydown', this._onTargetKeyDown);\n    targetElement.removeEventListener('mouseleave', this._onTargetMouseLeave);\n  }\n  \n  /**\n   Toggles whether or not an item is tabbable.\n   \n   @param {HTMLElement} item\n   The item to process.\n   \n   @param {Boolean} tabbable\n   Whether the item should be marked tabbable.\n   @ignore\n   */\n  _toggleTabbable(item, tabbable) {\n    if (item) {\n      if (tabbable) {\n        if (item.hasAttribute('tabIndex')) {\n          item.removeAttribute('tabIndex');\n        }\n      }\n      else {\n        item.setAttribute('tabIndex', '-1');\n      }\n    }\n  }\n  \n  /**\n   Gets the subsequent or previous focusable neighbour relative to an Item button.\n   \n   @param {HTMLElement} current\n   The current button element from which to find the next selectable neighbour.\n   @param {Boolean} [previous]\n   Whether to look for a previous neighbour rather than a subsequent one.\n   \n   @returns {HTMLElement|undefined} The focusable neighbour. Undefined if no suitable neighbour found.\n   \n   @private\n   */\n  _getFocusableNeighbour(current, previous) {\n    // we need to convert the result to an array in order to use .indexOf()\n    const focusableButtons = Array.prototype.slice.call(this._getFocusableButtons());\n    const index = focusableButtons.indexOf(current);\n    \n    if (index >= 0) {\n      if (!previous) {\n        // Pick the next focusable button\n        if (index < focusableButtons.length - 1) {\n          return focusableButtons[index + 1];\n        }\n      }\n      // Pick the previous focusable button\n      else if (index !== 0) {\n        return focusableButtons[index - 1];\n      }\n    }\n  }\n  \n  /**\n   Gets the buttons, optionally excluding the more button.\n   \n   @param {Boolean} excludeMore\n   Whether to exclude the more button.\n   \n   @returns {NodeList} The NodeList containing all the buttons.\n   \n   @private\n   */\n  _getButtons(excludeMore) {\n    let buttonSelector = '._coral-QuickActions-item';\n    buttonSelector = excludeMore ? `${buttonSelector}:not([handle=\"moreButton\"])` : buttonSelector;\n    \n    return this.querySelectorAll(buttonSelector);\n  }\n  \n  /**\n   An element is focusable if it is visible and not disabled.\n   \n   @returns {NodeList} A NodeList containing the focusable buttons.\n   \n   @private\n   */\n  _getFocusableButtons() {\n    // since we use the hidden attribute to hide the items, we can rely on this attribute to determine if the button\n    // is hidden, instead of using a more expensive :focusable selector\n    return this.querySelectorAll(BUTTON_FOCUSABLE_SELECTOR);\n  }\n  \n  /**\n   Gets the first focusable button.\n   \n   @returns {HTMLElement|undefined}\n   The first focusable button, undefined if none found.\n   @ignore\n   */\n  _getFirstFocusableButton() {\n    return this.querySelector(BUTTON_FOCUSABLE_SELECTOR);\n  }\n  \n  /** @ignore */\n  _proxyClick(item) {\n    const event = item.trigger('click');\n    \n    if (!event.defaultPrevented && this.interaction === interaction.ON) {\n      this._hideAll();\n    }\n  }\n  \n  /**\n   Gets data from an Item.\n   \n   @param {HTMLElement} item\n   The Item to get the data from.\n   @returns {Object}\n   The Item data.\n   @ignore\n   */\n  _getItemData(item) {\n    return {\n      htmlContent: item.innerHTML,\n      textContent: item.textContent,\n      // fallback to empty string in case it has no icon\n      icon: item.getAttribute('icon') || ''\n    };\n  }\n  \n  /** @ignore */\n  _attachItem(item, index) {\n    // since the button has already been initialized we make sure it is up to date\n    if (item._elements && item._elements.button) {\n      this._updateItem(item);\n      return;\n    }\n    \n    // if the index was not provided, we need to calculate it\n    if (typeof index === 'undefined') {\n      index = Array.prototype.indexOf.call(this.items.getAll(), item);\n    }\n    \n    const itemData = this._getItemData(item);\n    const type = QuickActionsItem.type;\n    \n    let button;\n    if (item.type === type.BUTTON) {\n      button = new Button().set({\n        icon: itemData.icon,\n        iconsize: Icon.size.SMALL,\n        type: 'button'\n      }, true);\n    }\n    else if (item.type === type.ANCHOR) {\n      button = new AnchorButton().set({\n        icon: itemData.icon,\n        iconsize: Icon.size.SMALL,\n        href: item.href\n      }, true);\n    }\n    \n    button.variant = Button.variant._CUSTOM;\n    button.classList.add('_coral-QuickActions-item');\n    button.setAttribute('tabindex', '-1');\n    button.setAttribute('title', itemData.textContent.trim());\n    button.setAttribute('aria-label', itemData.textContent.trim());\n    button.setAttribute('role', 'menuitem');\n    \n    this.insertBefore(button, this.children[index]);\n    \n    // ButtonList Item\n    let buttonListItem;\n    if (item.type === type.BUTTON) {\n      buttonListItem = new ButtonList.Item();\n    }\n    else if (item.type === type.ANCHOR) {\n      buttonListItem = new AnchorList.Item();\n      buttonListItem.href = item.href;\n    }\n    \n    const buttonListItemParent = this._elements.buttonList;\n    \n    buttonListItemParent.insertBefore(buttonListItem, buttonListItemParent.children[index]);\n    buttonListItem.tabIndex = -1;\n    buttonListItem.content.innerHTML = itemData.htmlContent;\n    buttonListItem.icon = itemData.icon;\n    \n    item._elements.button = button;\n    item._elements.buttonListItem = buttonListItem;\n    buttonListItem._elements.quickActionsItem = item;\n    button._elements.quickActionsItem = item;\n  }\n  \n  /**\n   Layout calculation; collapses QuickActions as necessary.\n   */\n  _layout() {\n    // Set the width of the QuickActions to match that of the target\n    this._setWidth();\n    \n    const buttons = this._getButtons(true);\n    \n    if (!buttons.length) {\n      return;\n    }\n    \n    const buttonListItems = this._elements.buttonList.items.getAll();\n    \n    // Temporarily display the QuickActions so we can do the calculation\n    const display = this.style.display;\n    let temporarilyShown = false;\n    \n    if (!this.open) {\n      this.style.left -= 10000;\n      this.style.top -= 10000;\n      this.style.display = 'block';\n      temporarilyShown = true;\n    }\n    \n    const totalAvailableWidth = this.offsetWidth - BUTTON_GAP;\n    const buttonOuterWidth = buttons[0].offsetWidth + BUTTON_GAP;\n    \n    let totalFittingButtons = 0;\n    let widthUsed = 0;\n    \n    while (totalAvailableWidth > widthUsed) {\n      widthUsed += buttonOuterWidth;\n      \n      if (totalAvailableWidth > widthUsed) {\n        totalFittingButtons++;\n      }\n    }\n    \n    const handleThreshold = this.threshold > 0;\n    const moreButtonsThanThreshold = handleThreshold && buttons.length > this.threshold;\n    const collapse = buttons.length > totalFittingButtons || moreButtonsThanThreshold;\n    \n    // +1 to account for the more button\n    const collapseToThreshold = collapse && handleThreshold && this.threshold + 1 < totalFittingButtons;\n    \n    let totalButtons;\n    if (collapse) {\n      if (collapseToThreshold) {\n        totalButtons = this.threshold + 1;\n      }\n      else {\n        totalButtons = totalFittingButtons;\n      }\n    }\n    else {\n      totalButtons = buttons.length;\n    }\n    \n    // Show all Buttons and ButtonList Items\n    for (let i = 0; i < buttons.length; i++) {\n      this._toggleTabbable(buttons[i], false);\n      buttons[i].hidden = false;\n      if (buttonListItems[i]) {\n        buttonListItems[i].hidden = false;\n      }\n    }\n    \n    this._toggleTabbable(this._elements.moreButton, false);\n    \n    if (collapse) {\n      if (totalButtons > 0) {\n        // Hide the buttons we're collapsing\n        for (let j = totalButtons - 1; j < buttons.length; j++) {\n          buttons[j].hide();\n        }\n        \n        // Hide the ButtonList items\n        for (let k = 0; k < totalButtons - 1; k++) {\n          buttonListItems[k].hide();\n        }\n        \n        // Mark the first button as tabbable\n        this._toggleTabbable(buttons[0], true);\n      }\n      else {\n        this._toggleTabbable(this._elements.moreButton, true);\n      }\n      \n      this._elements.moreButton.show();\n    }\n    else {\n      // Mark the first button as tabbable\n      this._toggleTabbable(buttons[0], true);\n      this._elements.moreButton.hide();\n    }\n    \n    // Reset the QuickActions display\n    if (temporarilyShown) {\n      this.style.left += 10000;\n      this.style.top += 10000;\n      this.style.display = display;\n    }\n    \n    // Do a reposition of the overlay\n    this.reposition();\n  }\n  \n  /**\n   Sets the width of QuickActions from the target.\n   \n   @ignore\n   */\n  _setWidth() {\n    const targetElement = this._getTarget();\n    \n    if (targetElement) {\n      this.style.width = `${targetElement.offsetWidth}px`;\n    }\n  }\n  \n  /** @ignore */\n  _setButtonListHeight() {\n    // Set height of ButtonList\n    this._elements.buttonList.style.height = '';\n    \n    // Measure actual height\n    const style = window.getComputedStyle(this._elements.buttonList);\n    const height = parseInt(style.height, 10);\n    const maxHeight = parseInt(style.maxHeight, 10);\n    \n    if (height < maxHeight) {\n      // Make it scrollable\n      this._elements.buttonList.style.height = `${height - 1}px`;\n    }\n  }\n  \n  /** @ignore */\n  _isInternalToComponent(element) {\n    const targetElement = this._getTarget();\n    \n    return element && (this.contains(element) || this._elements.overlay.contains(element) || targetElement && targetElement.contains(element));\n  }\n  \n  _onItemFocusIn(event) {\n    event.matchedTarget.classList.add('focus-ring');\n  }\n  \n  _onItemFocusOut(event) {\n    event.matchedTarget.classList.remove('focus-ring');\n  }\n  \n  /** @ignore */\n  _onWindowResize() {\n    this._layout();\n  }\n  \n  _handleEscape(event) {\n    if (typeof this._isTop === 'undefined') {\n      this._isTop = this._isTopOverlay();\n    }\n    \n    // Debounce\n    if (this._timeout !== null) {\n      window.clearTimeout(this._timeout);\n    }\n    \n    this._timeout = window.setTimeout(() => {\n      if (this._isTop) {\n        super._handleEscape(event);\n      }\n  \n      this._isTop = undefined;\n    });\n  }\n  \n  /** @ignore */\n  _onMouseOut(event) {\n    const toElement = event.toElement || event.relatedTarget;\n    \n    // Hide if we mouse leave to any element external to the component and its target\n    if (!this._isInternalToComponent(toElement) && this.interaction === interaction.ON) {\n      this._hideAll();\n    }\n  }\n  \n  /** @ignore */\n  _onBlur(event) {\n    let toElement = event.toElement || event.relatedTarget;\n    \n    if (this.interaction === interaction.ON) {\n      // In FF toElement is not available to us so we test the newly-focused element\n      if (!toElement) {\n        const self = this;\n        // The active element is not ready until the next frame\n        window.requestAnimationFrame(() => {\n          toElement = document.activeElement;\n          \n          if (!self._isInternalToComponent(toElement)) {\n            self._hideAll();\n          }\n        });\n      }\n      // Hide if we focus out to any element external to the component and its target\n      else if (!this._isInternalToComponent(toElement)) {\n        this._hideAll();\n      }\n    }\n  }\n  \n  _hideAll() {\n    this.hide();\n    this._elements.overlay.hide();\n  }\n  \n  /** @ignore */\n  _onTargetMouseEnter(event) {\n    const fromElement = event.fromElement || event.relatedTarget;\n    \n    // Open if we aren't already\n    if (!this.open && !this._isInternalToComponent(fromElement)) {\n      this.show();\n    }\n  }\n  \n  /** @ignore */\n  _onTargetKeyUp(event) {\n    const keyCode = event.keyCode;\n    \n    // shift + F10 or ctrl + space (http://www.w3.org/WAI/PF/aria-practices/#popupmenu)\n    if (event.shiftKey && keyCode === 121 || event.ctrlKey && keyCode === 32) {\n      if (!this.open) {\n        if (this.interaction === interaction.ON) {\n          // Launched via keyboard and interaction enabled implies a focus trap and return focus.\n          // Remember the relevant properties and return their values on hide.\n          this._previousTrapFocus = this.trapFocus;\n          this._previousReturnFocus = this.returnFocus;\n          this.trapFocus = this.constructor.trapFocus.ON;\n          this.returnFocus = this.constructor.returnFocus.ON;\n        }\n        \n        this.show();\n      }\n    }\n  }\n  \n  _onTargetKeyDown(event) {\n    const keyCode = event.keyCode;\n    \n    // shift + F10 or ctrl + space (http://www.w3.org/WAI/PF/aria-practices/#popupmenu)\n    if (event.shiftKey && keyCode === 121 || event.ctrlKey && keyCode === 32) {\n      // Prevent default context menu show or page scroll behaviour\n      event.preventDefault();\n    }\n  }\n  \n  /** @ignore */\n  _onTargetMouseLeave(event) {\n    const toElement = event.toElement || event.relatedTarget;\n    \n    // Do not hide if we entered the quick actions\n    if (!this._isInternalToComponent(toElement)) {\n      this._hideAll();\n    }\n  }\n  \n  /** @ignore */\n  _onHomeKeypress(event) {\n    // prevents the page from scrolling\n    event.preventDefault();\n    \n    const firstFocusableButton = this._getFirstFocusableButton();\n    \n    // Jump focus to the first focusable button\n    if (firstFocusableButton) {\n      firstFocusableButton.focus();\n    }\n  }\n  \n  /** @ignore */\n  _onEndKeypress(event) {\n    // prevents the page from scrolling\n    event.preventDefault();\n    \n    const focusableButtons = this._getFocusableButtons();\n    const lastFocusableButton = focusableButtons[focusableButtons.length - 1];\n    \n    // Jump focus to the last focusable button\n    if (lastFocusableButton) {\n      lastFocusableButton.focus();\n    }\n  }\n  \n  /** @ignore */\n  _onButtonKeypressNext(event) {\n    event.preventDefault();\n    \n    // Handle key presses that imply focus of the next focusable button\n    const nextButton = this._getFocusableNeighbour(event.matchedTarget);\n    if (nextButton) {\n      nextButton.focus();\n    }\n  }\n  \n  /** @ignore */\n  _onButtonKeypressPrevious(event) {\n    event.preventDefault();\n    \n    // Handle key presses that imply focus of the previous focusable button\n    const previousButton = this._getFocusableNeighbour(event.matchedTarget, true);\n    if (previousButton) {\n      previousButton.focus();\n    }\n  }\n  \n  /** @ignore */\n  _onButtonClick(event) {\n    event.stopPropagation();\n    \n    if (this._preventClick) {\n      return;\n    }\n    \n    const button = event.matchedTarget;\n    const item = button._elements.quickActionsItem;\n    this._proxyClick(item);\n    \n    // Prevent double click or alternate selection during animation\n    const self = this;\n    window.setTimeout(() => {\n      self._preventClick = false;\n    }, this._overlayAnimationTime);\n    \n    this._preventClick = true;\n  }\n  \n  /** @ignore */\n  _onOverlayBeforeOpen(event) {\n    if (event.target === this) {\n      // Reset double-click prevention flag\n      this._preventClick = false;\n      this._layout();\n    }\n    else if (event.target === this._elements.overlay) {\n      // do not allow internal Overlay events to escape QuickActions\n      event.stopImmediatePropagation();\n      this._setButtonListHeight();\n    }\n  }\n  \n  /** @ignore */\n  _onOverlayBeforeClose(event) {\n    if (event.target === this._elements.overlay) {\n      // do not allow internal Overlay events to escape QuickActions\n      event.stopImmediatePropagation();\n    }\n  }\n  \n  /** @ignore */\n  _onOverlayOpen(event) {\n    if (event.target === this._elements.overlay) {\n      // do not allow internal Overlay events to escape QuickActions\n      event.stopImmediatePropagation();\n      \n      const self = this;\n      window.requestAnimationFrame(() => {\n        const focusableItems = self._elements.buttonList.items.getAll().filter((item) => !item.hasAttribute('hidden') && !item.hasAttribute('disabled'));\n        \n        if (focusableItems.length > 0) {\n          focusableItems[0].focus();\n        }\n      });\n    }\n  }\n  \n  /** @ignore */\n  _onOverlayClose(event) {\n    if (event.target === this) {\n      this._elements.overlay.open = false;\n      \n      const self = this;\n      // Return the trapFocus and returnFocus properties to their state before open.\n      // Handles the keyboard launch and interaction enabled case, which implies focus trap and focus return.\n      // Wait a frame as this is called before the 'open' property sync. Otherwise, returnFocus is set prematurely.\n      window.requestAnimationFrame(() => {\n        if (self._previousTrapFocus) {\n          self.trapFocus = self._previousTrapFocus;\n          self._previousTrapFocus = undefined;\n        }\n        \n        if (self._previousReturnFocus) {\n          self.returnFocus = self._previousReturnFocus;\n          self._previousReturnFocus = undefined;\n        }\n      });\n    }\n    else if (event.target === this._elements.overlay) {\n      // do not allow internal Overlay events to escape QuickActions\n      event.stopImmediatePropagation();\n    }\n  }\n  \n  /** @ignore */\n  _onOverlayPositioned(event) {\n    if (event.target === this._elements.overlay) {\n      // do not allow internal Overlay events to escape QuickActions\n      event.stopImmediatePropagation();\n    }\n  }\n  \n  /** @ignore */\n  _onButtonListItemClick(event) {\n    // stops propagation so that this event remains internal to the component\n    event.stopImmediatePropagation();\n    \n    const buttonListItem = event.matchedTarget;\n    \n    if (!buttonListItem) {\n      return;\n    }\n    \n    const item = buttonListItem._elements.quickActionsItem;\n    this._proxyClick(item);\n  }\n  \n  /** @ignore */\n  _onItemRemoved(item) {\n    this._removeItemElements(item);\n  }\n  \n  /** @ignore */\n  _onCollectionChange(addedNodes) {\n    // Delay the item initialization if the component has not been opened before\n    if (!this._openedBefore) {\n      return;\n    }\n    \n    // we use the items to be able to find out the index of the added item in reference to the whole collection\n    const items = this.items.getAll();\n    let index;\n    for (let i = 0, addedNodesCount = addedNodes.length; i < addedNodesCount; i++) {\n      // we need to know the item's position in relation to the others\n      index = Array.prototype.indexOf.call(items, addedNodes[i]);\n      this._attachItem(addedNodes[i], index);\n    }\n    \n    this._layout();\n  }\n  \n  /** @ignore */\n  _onItemChange(event) {\n    // stops propagation so that this event remains internal to the component\n    event.stopImmediatePropagation();\n    \n    this._updateItem(event.target);\n  }\n  \n  /** @ignore */\n  _onItemTypeChange(event) {\n    // stops propagation so that this event remains internal to the component\n    event.stopImmediatePropagation();\n    \n    const item = event.target;\n    this._removeItemElements(item);\n    this._attachItem(item);\n    this._layout();\n  }\n  \n  /** @ignore */\n  _removeItemElements(item) {\n    // Remove the associated Button and ButtonList elements\n    if (item._elements.button) {\n      item._elements.button.remove();\n      item._elements.button._elements.quickActionsItem = undefined;\n      item._elements.button = undefined;\n    }\n    \n    if (item._elements.buttonListItem) {\n      item._elements.buttonListItem.remove();\n      item._elements.buttonListItem._elements.quickActionsItem = null;\n      item._elements.buttonListItem = undefined;\n    }\n  }\n  \n  /** @ignore */\n  _updateItem(item) {\n    const itemData = this._getItemData(item);\n    const type = QuickActionsItem.type;\n    \n    const button = item._elements.button;\n    if (button) {\n      button.icon = itemData.icon;\n      button.setAttribute('title', itemData.textContent.trim());\n      button.setAttribute('aria-label', itemData.textContent.trim());\n      button[item.type === type.ANCHOR ? 'setAttribute' : 'removeAttribute']('href', item.href);\n    }\n    \n    const buttonListItem = item._elements.buttonListItem;\n    if (buttonListItem) {\n      buttonListItem.content.innerHTML = itemData.htmlContent;\n      buttonListItem[item.type === type.ANCHOR ? 'setAttribute' : 'removeAttribute']('href', item.href);\n      buttonListItem.icon = itemData.icon;\n    }\n  }\n  \n  // Maps placement CENTER with RIGHT\n  _toggleCenterPlacement(toggle) {\n    if (toggle) {\n      if (this.placement === placement.CENTER) {\n        this._placement = Overlay.placement.RIGHT;\n      }\n    }\n    else if (this._placement === Overlay.placement.RIGHT) {\n      this._placement = placement.CENTER;\n    }\n  }\n  \n  /** @ignore */\n  reposition() {\n    // Override to support placement.CENTER\n    this._toggleCenterPlacement(true);\n    super.reposition();\n    this._toggleCenterPlacement(false);\n  }\n  \n  /** @ignore */\n  focus() {\n    if (this.open && !this.contains(document.activeElement)) {\n      const firstFocusableButton = this._getFirstFocusableButton();\n      if (firstFocusableButton) {\n        firstFocusableButton.focus();\n      }\n    }\n  }\n  \n  // Override placement and target\n  /**\n   Returns {@link QuickActions} placement options.\n   \n   @return {QuickActionsPlacementEnum}\n   */\n  static get placement() { return placement; }\n  \n  /**\n   Returns {@link QuickActions} target options.\n   \n   @return {QuickActionsTargetEnum}\n   */\n  static get target() { return target; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat(['threshold']);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n  \n    // @todo move to theme\n    this.style.maxWidth = 'none';\n    \n    this.classList.add(CLASSNAME);\n    \n    // Make QuickActions focusable\n    this.setAttribute('tabIndex', '-1');\n    this.setAttribute('role', 'menu');\n    \n    // Support cloneNode\n    ['moreButton', 'overlay'].forEach((handleName) => {\n      const handle = this.querySelector(`[handle=\"${handleName}\"]`);\n      if (handle) {\n        handle.remove();\n      }\n    }, this);\n  \n    // Cannot be open by default when rendered\n    this._elements.overlay.removeAttribute('open');\n  \n    // Inserting the overlay before the items\n    this.insertBefore(this._elements.overlay, this.firstChild);\n  \n    // Inserting the moreButton after the items\n    this.appendChild(this._elements.moreButton);\n  \n    // Link target\n    this._elements.overlay.target = this._elements.moreButton;\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    \n    // In case it was moved out don't forget to remove it\n    if (!this.contains(this._elements.overlay)) {\n      this._elements.overlay.remove();\n    }\n  }\n}\n\nexport default QuickActions;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport QuickActions from './src/scripts/QuickActions';\nimport QuickActionsItem from './src/scripts/QuickActionsItem';\nimport translations from './i18n/translations.json';\nimport {strings, commons} from '../coralui-util';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-quickactions': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-quickactions', QuickActions);\nwindow.customElements.define('coral-quickactions-item', QuickActionsItem);\n\nQuickActions.Item = QuickActionsItem;\n\nexport {QuickActions};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"input\"] = document.createElement(\"input\");\n  el0.setAttribute(\"type\", \"radio\");\n  el0.setAttribute(\"handle\", \"input\");\n  el0.className += \" _coral-Radio-input\";\n  el0.id = data_0[\"commons\"][\"getUID\"]();\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"checkmark\"] = document.createElement(\"span\");\n  el2.className += \" _coral-Radio-button\";\n  el2.setAttribute(\"handle\", \"checkmark\");\n  frag.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  frag.appendChild(el3);\n  var el4 = this[\"labelWrapper\"] = document.createElement(\"label\");\n  el4.className += \" _coral-Radio-label\";\n  el4.setAttribute(\"handle\", \"labelWrapper\");\n  el4.setAttribute(\"for\", this[\"input\"][\"id\"]);\n  el4.setAttribute(\"hidden\", \"\");\n  frag.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  frag.appendChild(el5);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport base from '../templates/base';\nimport {transform, commons} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Radio';\n\n/**\n @class Coral.Radio\n @classdesc A Radio component to be used as a form field.\n @htmltag coral-radio\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass Radio extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    this._delegateEvents(commons.extend(this._events, {\n      click: '_onClick',\n      mousedown: '_onMouseDown'\n    }));\n    \n    // Prepare templates\n    this._elements = {\n      // Try to find the label content zone\n      label: this.querySelector('coral-radio-label') || document.createElement('coral-radio-label')\n    };\n    base.call(this._elements, {commons});\n  \n    // Pre-define labellable element\n    this._labellableElement = this._elements.input;\n  \n    // Check if the label is empty whenever we get a mutation\n    this._observer = new MutationObserver(this._hideLabelIfEmpty.bind(this));\n  \n    // Watch for changes to the label element's children\n    this._observer.observe(this._elements.labelWrapper, {\n      // Catch changes to childList\n      childList: true,\n      // Catch changes to textContent\n      characterData: true,\n      // Monitor any child node\n      subtree: true\n    });\n  }\n  \n  /**\n   Checked state for the radio, <code>true</code> is checked and <code>false</code> is unchecked. Changing the\n   checked value will cause a {@link Coral.mixin.formField.event:change} event to be triggered.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute checked\n   @htmlattributereflected\n   @emits {change}\n   */\n  get checked() {\n    return this._checked || false;\n  }\n  set checked(value) {\n    this._checked = transform.booleanAttr(value);\n    this._reflectAttribute('checked', this._checked);\n    \n    this._elements.input.checked = this._checked;\n  \n    // handles related radios\n    this._syncRelatedRadios();\n  }\n  \n  /**\n   The radios's label element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get label() {\n    return this._getContentZone(this._elements.label);\n  }\n  set label(value) {\n    this._setContentZone('label', value, {\n      handle: 'label',\n      tagName: 'coral-radio-label',\n      insert: function(label) {\n        this._elements.labelWrapper.appendChild(label);\n      }\n    });\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._elements.input.name;\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n    \n    this._elements.input.name = value;\n  }\n  \n  /**\n   The value this radio should submit when checked. Changing this value will not trigger an event.\n   \n   @type {String}\n   @default \"on\"\n   @htmlattribute value\n   */\n  get value() {\n    return this._elements.input.value || 'on';\n  }\n  set value(value) {\n    this._elements.input.value = value;\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.setAttribute('aria-disabled', this._disabled);\n    this.classList.toggle('is-disabled', this._disabled);\n    this._elements.input.disabled = this._disabled;\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    this.setAttribute('aria-required', this._required);\n    this._elements.input.required = this._required;\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    \n    this.setAttribute('aria-readonly', this._readOnly);\n  }\n  \n  /*\n   Indicates to the formField that the 'checked' property needs to be set in this component.\n   \n   @protected\n   */\n  get _componentTargetProperty() { return 'checked'; }\n  \n  /*\n   Indicates to the formField that the 'checked' property has to be extracted from the event.\n   \n   @protected\n   */\n  get _eventTargetProperty() { return 'checked'; }\n  \n  /**\n   Takes care of keeping the checked property up to date, by unchecking every radio that has the same name. This is\n   only done if the radio is already in the DOM, it has a name and it is checked, otherwise this is not needed.\n \n   @ignore\n   */\n  _syncRelatedRadios() {\n    // if the radio has a name defined and it is checked, we need to ensure that other radios that share the name\n    // are not checked.\n    if (this.parentNode !== null && this.name && this.checked) {\n      // queries the document for all the coral-radios with the same name\n      const items = document.querySelectorAll(`${this.tagName}[name=${JSON.stringify(this.name)}]`);\n      const itemCount = items.length;\n    \n      for (let i = 0; i < itemCount; i++) {\n        if (items[i] !== this) {\n          // we uncheck all other radios with the same name\n          items[i].removeAttribute('checked');\n        }\n      }\n    }\n  }\n  \n  /**\n   Hide the label if it's empty.\n \n   @ignore\n   */\n  _hideLabelIfEmpty() {\n    const label = this.label;\n    // If it's empty and has no non-textnode children, hide the label\n    const hiddenValue = label.children.length === 0 && label.textContent.replace(/\\s*/g, '') === '';\n    // Only bother if the hidden status has changed\n    if (hiddenValue !== this._elements.labelWrapper.hidden) {\n      this._elements.labelWrapper.hidden = hiddenValue;\n    }\n  }\n  \n  /**\n   @private\n   */\n  _onClick(event) {\n    // Handle the click() just like the native radio\n    if (event.target === this && !this.checked) {\n      this.checked = true;\n      this.trigger('change');\n    }\n  }\n  \n  /**\n   Forces radio to receive focus on mousedown\n   @ignore\n   */\n  _onMouseDown() {\n    const target = this._elements.input;\n    requestAnimationFrame(() => {\n      if (target !== document.activeElement) {\n        target.focus();\n      }\n    });\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#clear}.\n   */\n  clear() {\n    this.checked = false;\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#reset}.\n   */\n  reset() {\n    this.checked = this._initialCheckedState;\n  }\n  \n  get _contentZones() { return {'coral-radio-label': 'label'}; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat(['checked']);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Create a fragment\n    const frag = document.createDocumentFragment();\n  \n    const templateHandleNames = ['input', 'checkmark', 'labelWrapper'];\n  \n    // Render the main template\n    frag.appendChild(this._elements.input);\n    frag.appendChild(this._elements.checkmark);\n    frag.appendChild(this._elements.labelWrapper);\n    \n    const label = this._elements.label;\n  \n    // Remove it so we can process children\n    if (label && label.parentNode) {\n      label.parentNode.removeChild(label);\n    }\n  \n    // Hide the labelWrapper by default (will be shown, via contentZone observer)\n    this._elements.labelWrapper.hidden = true;\n  \n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && templateHandleNames.indexOf(child.getAttribute('handle')) === -1) {\n        // Add non-template elements to the label\n        label.appendChild(child);\n      }\n      else {\n        // Remove anything else (e.g labelWrapper)\n        this.removeChild(child);\n      }\n    }\n  \n    // Add the frag to the component\n    this.appendChild(frag);\n  \n    // Assign the content zones, moving them into place in the process\n    this.label = label;\n  \n    // Cache the initial checked state of the radio button (in order to implement reset)\n    this._initialCheckedState = this.checked;\n  \n    // handles the case where the attached component was checked\n    this._syncRelatedRadios();\n  \n    // Check if we need to hide the label\n    // We must do this because IE does not catch mutations when nodes are not in the DOM\n    this._hideLabelIfEmpty();\n  }\n}\n\nexport default Radio;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Radio.Label\n @classdesc The Radio label\n @htmltag coral-radio-label\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-radio-label');\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Radio from './src/scripts/Radio';\nimport RadioLabel from './src/scripts/RadioLabel';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-radio', Radio);\n\nRadio.Label = RadioLabel;\n\nexport {Radio};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\n\nconst CLASSNAME = '_coral-Shell';\n\n/**\n @class Coral.Shell\n @classdesc The Shell base component to be used with its family for console like applications. See examples for how to\n integrate all Shell sub components.\n @htmltag coral-shell\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Shell extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      // Fetch or create the content zone elements\n      content: this.querySelector('coral-shell-content') || document.createElement('coral-shell-content')\n    };\n  }\n  \n  /**\n   The outer shell content zone.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-shell-content',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  get _contentZones() { return {'coral-shell-content': 'content'}; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    const content = this._elements.content;\n  \n    // If the the content zone is not provided, we need to make sure that it holds all children\n    if (!content.parentNode) {\n      while (this.firstChild) {\n        content.appendChild(this.firstChild);\n      }\n    }\n  \n    // Call the content zone insert\n    this.content = content;\n  }\n}\n\nexport default Shell;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Shell.Content\n @classdesc Shell's content component\n @htmltag coral-shell-content\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-shell-content');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\n\nconst CLASSNAME = '_coral-Shell-header';\n\n/**\n @class Coral.Shell.Header\n @classdesc A Shell Header component\n @htmltag coral-shell-header\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ShellHeader extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      // Fetch or create the content zone elements\n      home: this.querySelector('coral-shell-header-home') || document.createElement('coral-shell-header-home'),\n      actions: this.querySelector('coral-shell-header-actions') || document.createElement('coral-shell-header-actions'),\n      content: this.querySelector('coral-shell-header-content') || document.createElement('coral-shell-header-content')\n    };\n    \n    // Events\n    this._delegateEvents({\n      'global:coral-overlay:beforeopen': '_handleMenuBeforeOpenOrClose',\n      'global:coral-overlay:beforeclose': '_handleMenuBeforeOpenOrClose',\n      'global:coral-overlay:close': '_handleMenuClose'\n    });\n  }\n  \n  /**\n   The label of the panel.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get home() {\n    return this._getContentZone(this._elements.home);\n  }\n  set home(value) {\n    this._setContentZone('home', value, {\n      handle: 'home',\n      tagName: 'coral-shell-header-home',\n      insert: function(content) {\n        // a11y\n        this._enableHomeAccessibility(content);\n        this.appendChild(content);\n      }\n    });\n  }\n\n  /**\n   The main content zone of the panel.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-shell-header-content',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   The content zone where the actions are placed.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get actions() {\n    return this._getContentZone(this._elements.actions);\n  }\n  set actions(value) {\n    this._setContentZone('actions', value, {\n      handle: 'actions',\n      tagName: 'coral-shell-header-actions',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   Just before a menu is open or closed, we check that the zIndex of the Header is correct so that it animates\n   below the header.\n   \n   @ignore\n   */\n  _handleMenuBeforeOpenOrClose(event) {\n    const target = event.target;\n  \n    // header only changes zIndex due to menus\n    if (target.tagName === 'CORAL-SHELL-MENU') {\n      // we need one frame to make sure the zIndex is already set\n      window.requestAnimationFrame(() => {\n        this.style.zIndex = parseInt(target.style.zIndex, 10) + 100;\n        target.classList.add('is-animated');\n        \n        window.clearTimeout(this._zIndexTimeout);\n      });\n    }\n  }\n  \n  /**\n   Cleanup after _handleMenuBeforeOpenOrClose() to make sure\n   we do not leave high zIndex behind that overlay other element on the page\n   */\n  _handleMenuClose(event) {\n    const target = event.target;\n    \n    // header only changes zIndex due to menus\n    if (target.tagName === 'CORAL-SHELL-MENU') {\n      // we need additional time to make sure the zIndex is already set\n      this._zIndexTimeout = setTimeout(() => {\n        target.classList.remove('is-animated');\n  \n        this.style.zIndex = null;\n      }, target.constructor.FADETIME);\n    }\n  }\n  \n  /** @private */\n  _enableHomeAccessibility(home) {\n    home.setAttribute('role', 'heading');\n    home.setAttribute('aria-level', '2');\n  }\n  \n  get _contentZones() {\n    return {\n      'coral-shell-header-home': 'home',\n      'coral-shell-header-content': 'content',\n      'coral-shell-header-actions': 'actions'\n    };\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    // appheader only exists on dark theme\n    this.classList.add('coral--dark');\n    \n    const home = this._elements.home;\n    const actions = this._elements.actions;\n    const content = this._elements.content;\n    \n    // Remove them so we can process children\n    if (home.parentNode) { home.remove(); }\n    if (actions.parentNode) { actions.remove(); }\n    if (content.parentNode) { content.remove(); }\n    \n    // moves everything to the main content zone\n    while (this.firstChild) {\n      content.appendChild(this.firstChild);\n    }\n    \n    // // Call the content zone insert\n    this.home = home;\n    this.actions = actions;\n    this.content = content;\n  }\n}\n\nexport default ShellHeader;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"icon\"] = document.createElement(\"coral-icon\");\n  el0.setAttribute(\"handle\", \"icon\");\n  el0.className += \" _coral-Shell-homeAnchor-icon\";\n  el0.setAttribute(\"size\", \"M\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport '../../../coralui-component-icon';\nimport homeAnchorIcon from '../templates/homeAnchorIcon';\n\nconst CLASSNAME = '_coral-Shell-homeAnchor';\n\n/**\n @class Coral.Shell.HomeAnchor\n @classdesc A Shell Home Anchor component\n @htmltag coral-shell-homeanchor\n @htmlbasetag a\n @extends {HTMLAnchorElement}\n @extends {ComponentMixin}\n */\nclass ShellHomeAnchor extends ComponentMixin(HTMLAnchorElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      // Fetch or create the content zone elements\n      label: this.querySelector('coral-shell-homeanchor-label') || document.createElement('coral-shell-homeanchor-label')\n    };\n  \n    // Create icon by default\n    homeAnchorIcon.call(this._elements);\n  }\n  \n  /**\n   The label of the anchor.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get label() {\n    return this._getContentZone(this._elements.label);\n  }\n  set label(value) {\n    this._setContentZone('label', value, {\n      handle: 'label',\n      tagName: 'coral-shell-homeanchor-label',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   Specifies the icon name used in the anchor. See {@link Coral.Icon} for valid icon names.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   */\n  get icon() {\n    return this._elements.icon.icon;\n  }\n  set icon(value) {\n    this._elements.icon.icon = value;\n  \n    // removes the icon element from the DOM.\n    if (this.icon === '') {\n      this._elements.icon.remove();\n    }\n    // adds the icon back since it was blown away by textContent\n    else if (!this.contains(this._elements.icon)) {\n      this.insertBefore(this._elements.icon, this.firstChild);\n    }\n  }\n  \n  get _contentZones() { return {'coral-shell-homeanchor-label': 'label'}; }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['icon']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Create doc fragment\n    const fragment = document.createDocumentFragment();\n    \n    const label = this._elements.label;\n  \n    // Remove it so we can process children\n    if (label.parentNode) {\n      this.removeChild(label);\n    }\n  \n    // Move any remaining elements into the label\n    while (this.firstChild) {\n      const child = this.firstChild;\n    \n      if (child.nodeType === Node.TEXT_NODE) {\n        // Move text elements to the label\n        label.appendChild(child);\n      }\n      else if (child.nodeName === 'CORAL-ICON') {\n        if (!fragment.childNodes.length) {\n          // Conserve existing icon element to content\n          this._elements.icon = child;\n          fragment.appendChild(child);\n        }\n        else {\n          // Remove cloned icon\n          this.removeChild(child);\n        }\n      }\n      else {\n        // Remove anything else\n        this.removeChild(child);\n      }\n    }\n    \n    // Add fragment back\n    this.appendChild(fragment);\n    \n    // Call label insert\n    this.label = label;\n  }\n}\n\nexport default ShellHomeAnchor;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Shell.HomeAnchor.Label\n @classdesc Shell HomeAnchor's label component\n @htmltag coral-shell-homeanchor-label\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-shell-homeanchor-label');\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"input\"] = document.createElement(\"input\",\"coral-textfield\");\n  el0.setAttribute(\"type\", \"text\");\n  el0.className += \" _coral-Search-input\";\n  el0.setAttribute(\"is\", \"coral-textfield\");\n  el0.setAttribute(\"handle\", \"input\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"clearButton\"] = document.createElement(\"button\",\"coral-button\");\n  el2.setAttribute(\"type\", \"button\");\n  el2.setAttribute(\"aria-label\", data_0[\"i18n\"][\"get\"]('Clear search'));\n  el2.setAttribute(\"is\", \"coral-button\");\n  el2.setAttribute(\"icon\", \"spectrum-css-icon-SearchClear\");\n  el2.setAttribute(\"variant\", \"icon\");\n  el2.className += \" _coral-Search-clear\";\n  el2.setAttribute(\"handle\", \"clearButton\");\n  frag.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  frag.appendChild(el3);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport '../../../coralui-component-textfield';\nimport '../../../coralui-component-button';\nimport {Icon} from '../../../coralui-component-icon';\nimport base from '../templates/base';\nimport {transform, validate, commons, i18n} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Search';\n\n/**\n Enumeration for {@link Search} variants.\n \n @typedef {Object} SearchVariantEnum\n \n @property {String} DEFAULT\n A default, gray search input.\n @property {String} QUIET\n A search with no border, no background, no glow.\n */\nconst variant = {\n  DEFAULT: 'default',\n  QUIET: 'quiet'\n};\n\n/**\n @class Coral.Search\n @classdesc A Search component is a search styled form field.\n @htmltag coral-search\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass Search extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    this._delegateEvents(commons.extend(this._events, {\n      // @todo use Coral.keys when key combos don't interfere with single key execution\n      'keydown [handle=input]': '_onEnterKey',\n      'keyup [handle=input]': '_onKeyUp',\n  \n      // @todo use coralinternalinput from Autocomplete\n      'input [handle=input]': '_triggerInputEvent',\n  \n      'key:escape [handle=input]': '_clearInput',\n      'click [handle=clearButton]:not(:disabled)': '_clearInput'\n    }));\n    \n    // Prepare templates\n    this._elements = {};\n    base.call(this._elements, {i18n});\n  \n    // Pre-define labellable element\n    this._labellableElement = this._elements.input;\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._elements.input.name;\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n    \n    this._elements.input.name = value;\n  }\n  \n  /**\n   The submitted input value. Changing this value will not trigger an event.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   */\n  get value() {\n    return this._elements.input.value || '';\n  }\n  set value(value) {\n    this._elements.input.value = value;\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.setAttribute('aria-disabled', this._disabled);\n    this.classList.toggle('is-disabled', this._disabled);\n    this._elements.input.disabled = this._disabled;\n    this._elements.clearButton.disabled = this._disabled;\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    this.setAttribute('aria-required', this._required);\n    this._elements.input.required = this._required;\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    \n    this.setAttribute('aria-readonly', this._readOnly);\n    this._elements.input.readOnly = this._readOnly;\n    this._elements.clearButton.disabled = this._readOnly;\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#labelledBy}.\n   */\n  get labelledBy() {\n    return super.labelledBy;\n  }\n  set labelledBy(value) {\n    super.labelledBy = value;\n    // in case the user focuses the buttons, he will still get a notion of the usage of the component\n    this[this.labelledBy ? 'setAttribute' : 'removeAttribute']('aria-labelledby', this.labelledBy);\n  }\n  \n  /**\n   Short hint that describes the expected value of the Search. It is displayed when the Search is empty.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute placeholder\n   @htmlattributereflected\n   */\n  get placeholder() {\n    return this._elements.input.placeholder || '';\n  }\n  set placeholder(value) {\n    value = transform.string(value);\n    this._reflectAttribute('placeholder', value);\n  \n    this._elements.input.placeholder = value;\n  }\n  \n  /**\n   Max length for the Input field.\n   @type {Number}\n   @htmlattribute maxlength\n   @htmlattributereflected\n   */\n  get maxLength() {\n    return this._elements.input.maxLength;\n  }\n  set maxLength(value) {\n    this._elements.input.maxLength = value;\n    this._reflectAttribute('maxlength', this.maxLength);\n  }\n  \n  /**\n   The search's variant. See {@link SearchVariantEnum}.\n   \n   @type {String}\n   @default SearchVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n    \n    this._elements.input.variant = value;\n  }\n  \n  /**\n   @ignore\n   \n   Not supported anymore.\n   */\n  get icon() {\n    return this._icon || 'search';\n  }\n  set icon(value) {\n    this._icon = transform.string(value);\n    this._reflectAttribute('icon', this._icon);\n  }\n  \n  /**\n   @ignore\n   \n   Not supported anymore.\n   */\n  get invalid() {\n    return super.invalid;\n  }\n  set invalid(value) {\n    super.invalid = value;\n  }\n  \n  /** @ignore */\n  _triggerInputEvent() {\n    this.trigger('coral-search:input');\n  }\n  \n  /**\n   Handles the up action by steping up the Search. It prevents the default action.\n   \n   @ignore\n   */\n  _onEnterKey(event) {\n    if (event.which === 13) {\n      event.preventDefault();\n    \n      // stops interaction if the search is disabled\n      if (this.disabled) {\n        return;\n      }\n    \n      this.trigger('coral-search:submit');\n    }\n  }\n  \n  /**\n   Handles the keydown action.\n   \n   @ignore\n   */\n  _onKeyUp() {\n    this._updateClearButton();\n  }\n  \n  /**\n   Updates the clear button's display status.\n   \n   @ignore\n   */\n  _updateClearButton() {\n    if (this._elements.input.value === '') {\n      this._elements.clearButton.style.display = 'none';\n    }\n    else {\n      this._elements.clearButton.style.display = '';\n    }\n  }\n  \n  /**\n   Clears the text in the input box.\n   \n   @ignore\n   */\n  _clearInput() {\n    this._elements.input.value = '';\n    this._updateClearButton();\n    this._elements.input.focus();\n  \n    // If we've been cleared, trigger the event\n    this.trigger('coral-search:clear');\n  }\n  \n  // overrides the behavior from mixin-formfield\n  reset() {\n    // since there is an internal value, this one handles the reset\n    this._elements.input.reset();\n  }\n  \n  // overrides the behavior from mixin-formfield\n  clear() {\n    // since there is an internal value, this one handles the clear\n    this._elements.input.clear();\n  }\n  \n  /**\n   Returns {@link Search} variants.\n   \n   @return {SearchVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat(['placeholder', 'icon', 'variant', 'maxlength', 'maxLength']);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Default reflected attributes\n    if (!this._icon) { this.icon = 'search'; }\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n  \n    // Support cloneNode\n    const templates = this.querySelectorAll('._coral-Search-input, ._coral-Search-icon, ._coral-Search-clear');\n    for (let i = 0; i < templates.length; i++) {\n      templates[i].remove();\n    }\n    \n    // Create a fragment\n    const fragment = document.createDocumentFragment();\n  \n    // Render the main template\n    fragment.appendChild(this._elements.input);\n    fragment.appendChild(this._elements.clearButton);\n  \n    // Add the frag to the component\n    this.appendChild(fragment);\n    \n    // Insert search icon\n    this._elements.input.insertAdjacentHTML('afterend', Icon._renderSVG('spectrum-css-icon-SearchMagGlass', ['_coral-Search-icon']));\n   \n    this._updateClearButton();\n  }\n  \n  /**\n   Triggered when {@link Search} input is given.\n   \n   @typedef {CustomEvent} coral-search:input\n   */\n  \n  /**\n   Triggered when the user presses {@link Search} enter.\n   \n   @typedef {CustomEvent} coral-search:submit\n   */\n  \n  /**\n   Triggered when the {@link Search} is cleared.\n   \n   @typedef {CustomEvent} coral-search:clear\n   */\n}\n\nexport default Search;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport translations from './i18n/translations.json';\nimport {strings, commons} from '../coralui-util';\nimport Search from './src/scripts/Search';\n\n// i18n\ncommons.extend(strings, {\n  'coralui-component-search': translations\n});\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-search', Search);\n\nexport {Search};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  data = data_0;\n  \nvar labelId = data.commons.getUID();\n\n  data_0 = data;\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"contentWrapper\"] = document.createElement(\"div\");\n  el2.setAttribute(\"handle\", \"contentWrapper\");\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  var el4 = document.createElement(\"label\");\n  el4.className += \" u-coral-screenReaderOnly\";\n  el4.id = labelId;\n  el4.textContent = data_0[\"i18n\"][\"get\"]('Search for Help');\n  el2.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el5);\n  var el6 = this[\"search\"] = document.createElement(\"coral-search\");\n  el6.className += \" _coral-Shell-help-search\";\n  el6.setAttribute(\"handle\", \"search\");\n  el6.setAttribute(\"placeholder\", data_0[\"i18n\"][\"get\"]('Search for Help'));\n  el6.setAttribute(\"labelledby\", labelId);\n  el2.appendChild(el6);\n  var el7 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el7);\n  var el8 = this[\"items\"] = document.createElement(\"div\");\n  el8.className += \" _coral-Shell-help-items\";\n  el8.setAttribute(\"handle\", \"items\");\n  el2.appendChild(el8);\n  var el9 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el9);\n  var el10 = this[\"results\"] = document.createElement(\"coral-anchorlist\");\n  el10.className += \" _coral-Shell-help-results\";\n  el10.setAttribute(\"handle\", \"results\");\n  el10.setAttribute(\"hidden\", \"\");\n  el2.appendChild(el10);\n  var el11 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el11);\n  var el12 = this[\"resultMessage\"] = document.createElement(\"div\");\n  el12.className += \" _coral-Shell-help-resultMessage\";\n  el12.setAttribute(\"handle\", \"resultMessage\");\n  el12.setAttribute(\"hidden\", \"\");\n  el2.appendChild(el12);\n  var el13 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el13);\n  var el14 = this[\"loading\"] = document.createElement(\"div\");\n  el14.className += \" _coral-Shell-help-loading\";\n  el14.setAttribute(\"handle\", \"loading\");\n  el14.setAttribute(\"hidden\", \"\");\n  var el15 = document.createTextNode(\"\\n    \");\n  el14.appendChild(el15);\n  var el16 = document.createElement(\"coral-wait\");\n  el16.setAttribute(\"size\", \"S\");\n  el16.className += \" _coral-Shell-help-loading-wait\";\n  el14.appendChild(el16);\n  var el17 = document.createTextNode(\"\\n    \");\n  el14.appendChild(el17);\n  var el18 = document.createElement(\"span\");\n  el18.className += \" coral-Heading--2 _coral-Shell-help-loading-info\";\n  el18.textContent = data_0[\"i18n\"][\"get\"]('Searching Help…');\n  el14.appendChild(el18);\n  var el19 = document.createTextNode(\"\\n  \");\n  el14.appendChild(el19);\n  el2.appendChild(el14);\n  var el20 = document.createTextNode(\"\\n\");\n  el2.appendChild(el20);\n  frag.appendChild(el2);\n  var el21 = document.createTextNode(\"\\n\");\n  frag.appendChild(el21);\n  return frag;\n});\nexport default template;","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = document.createElement(\"coral-list-item-content\");\n  var el1 = document.createTextNode(data_0[\"title\"]+\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = document.createElement(\"div\");\n  el2.className += \" _coral-Shell-help-result-description\";\n  el2.textContent = data_0[\"description\"];\n  el0.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  el0.appendChild(el3);\n  frag.appendChild(el0);\n  var el4 = document.createTextNode(\"\\n\");\n  frag.appendChild(el4);\n  return frag;\n});\nexport default template;","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = document.createElement(\"div\");\n  el0.className += \" _coral-Shell-help-resultMessage-container\";\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = document.createElement(\"div\");\n  el2.className += \" coral-Heading--1 _coral-Shell-help-resultMessage-heading\";\n  el2.textContent = data_0[\"i18n\"][\"get\"]('Error fetching results');\n  el0.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  el0.appendChild(el3);\n  frag.appendChild(el0);\n  var el4 = document.createTextNode(\"\\n\");\n  frag.appendChild(el4);\n  return frag;\n});\nexport default template;","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = document.createElement(\"div\");\n  el0.className += \" _coral-Shell-help-resultMessage-container\";\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = document.createElement(\"h2\");\n  el2.className += \" coral-heading coral-Heading--2 _coral-Shell-help-resultMessage-heading\";\n  el2.textContent = data_0[\"i18n\"][\"get\"]('No results found');\n  el0.appendChild(el2);\n  frag.appendChild(el0);\n  var el3 = document.createTextNode(\"\\n\");\n  frag.appendChild(el3);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {Collection} from '../../../coralui-collection';\nimport '../../../coralui-component-search';\nimport {AnchorList} from '../../../coralui-component-list';\nimport '../../../coralui-component-wait';\nimport {commons, i18n} from '../../../coralui-util';\nimport help from '../templates/help';\nimport helpResult from '../templates/helpResult';\nimport helpSearchError from '../templates/helpSearchError';\nimport noHelpResults from '../templates/noHelpResults';\n\nconst CLASSNAMES = ['_coral-BasicList', '_coral-AnchorList', '_coral-Shell-help'];\n\n/**\n @class Coral.Shell.Help\n @classdesc A Shell Help component\n @htmltag coral-shell-help\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ShellHelp extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {};\n    help.call(this._elements, {commons, i18n});\n    \n    // Events\n    this._delegateEvents({\n      'coral-search:clear': '_showItems',\n      'coral-search:submit': '_performSearch'\n    });\n    \n    // Item handling\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The item collection.\n   \n   @type {Collection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request:\n    if (!this._items) {\n      this._items = new Collection({\n        host: this,\n        itemTagName: 'coral-shell-help-item',\n        itemBaseTagName: 'a',\n        container: this._elements.items\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /**\n   The search field placeholder.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute placeholder\n   */\n  get placeholder() {\n    return this._elements.search.placeholder;\n  }\n  set placeholder(value) {\n    this._elements.search.placeholder = value;\n  }\n  \n  /** @private */\n  _moveItems() {\n    this.setAttribute('id', this.id || commons.getUID());\n    Array.prototype.forEach.call(this.querySelectorAll(`#${this.id} > a[is=\"coral-shell-help-item\"]`), (item) => {\n      this._elements.items.appendChild(item);\n    }, this);\n  }\n  \n  /** @private */\n  _performSearch(event) {\n    event.stopPropagation();\n    \n    // Show loading\n    this._elements.items.hidden = true;\n    this._elements.loading.hidden = false;\n    this._elements.resultMessage.hidden = true;\n    this._elements.results.hidden = true;\n    \n    // Trigger event\n    const searchTerm = this._elements.search.value;\n    this.trigger('coral-shell-help:search', {\n      value: searchTerm\n    });\n  }\n  \n  /** @private */\n  _showItems(event) {\n    event.stopPropagation();\n    \n    // Hide search results\n    this._elements.results.hidden = true;\n    \n    // Hide loading\n    this._elements.loading.hidden = true;\n    \n    // Hide no-results\n    this._elements.resultMessage.hidden = true;\n    \n    // Show items\n    this._elements.items.hidden = false;\n  }\n  \n  /**\n   Indicate to the user that an error has occurred\n   */\n  showError() {\n    // Hide loading\n    this._elements.loading.hidden = true;\n    \n    this._elements.resultMessage.innerHTML = '';\n    \n    this._elements.resultMessage.appendChild(helpSearchError.call(this._elements, {i18n: i18n}));\n    \n    this._elements.resultMessage.hidden = false;\n  }\n  \n  /**\n   Show a set of search results.\n   \n   @param {Array.<ShellHelpResult>} results\n   A set of search result objects.\n   @param {Number} total\n   The total number of results.\n   @param {String} allResultsURL\n   The URL at which all results will be displayed.\n   */\n  showResults(results, total, allResultsURL) {\n    // Hide loading\n    this._elements.loading.hidden = true;\n    \n    if (!results || total === 0) {\n      // Clear existing result message\n      this._elements.resultMessage.innerHTML = '';\n      // Indicate to the user that no results were found\n      this._elements.resultMessage.appendChild(noHelpResults.call(this._elements, {i18n: i18n}));\n      // Show result message\n      this._elements.resultMessage.hidden = false;\n    }\n    else {\n      // Clear existing results\n      this._elements.results.innerHTML = '';\n      // Populate results\n      results.forEach((result) => {\n        // Tweak: make the space between bullets larger with a non-breaking space\n        const separator = ' & ';\n        const description = result.tags.join(separator);\n        \n        const item = new AnchorList.Item().set({\n          href: result.href,\n          target: result.target\n        });\n        \n        item.classList.add('_coral-Shell-help-result-item');\n        \n        item.content = helpResult.call(this._elements, {\n          title: result.title,\n          description: description\n        }).firstElementChild;\n        \n        this._elements.results.appendChild(item);\n      }, this);\n      \n      // Show results\n      this._elements.results.hidden = false;\n      \n      // Show total\n      if (total > 1) {\n        const seeAllItem = new AnchorList.Item().set({\n          href: allResultsURL,\n          content: {\n            innerHTML: i18n.get('See all {0} results', total)\n          },\n          target: '_blank'\n        });\n  \n        // Look like a link\n        seeAllItem.content.classList.add('coral-Link');\n        \n        this._elements.results.appendChild(seeAllItem);\n      }\n    }\n  }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['placeholder']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(...CLASSNAMES);\n  \n    // Move the items into the right place\n    this._moveItems();\n    \n    const contentWrapper = this.querySelector('[handle=\"contentWrapper\"]');\n  \n    // Support cloneNode\n    if (contentWrapper) {\n      this._elements.contentWrapper = contentWrapper;\n  \n      ['search', 'result', 'items', 'results', 'resultMessage', 'loading'].forEach((handle) => {\n        this._elements[handle] = this.querySelector(`[handle=\"${handle}\"]`);\n      }, this);\n      this._items._container = this._elements.items;\n    }\n    else {\n      this.appendChild(this._elements.contentWrapper);\n    }\n  }\n  \n  /**\n   A search result object.\n   \n   @typedef {Object} ShellHelpResult\n   \n   @property {String} title\n   The title of the search result.\n   @property {String} href\n   The URL of the search result.\n   @property {String} target\n   This property specifies where to display the search result. Use this property only if the href property is present.\n   @property {Array.<String>} tags\n   A set of tags associated with the search result.\n   */\n  \n  /**\n   Triggered when the user submits a search term\n   \n   @event Coral.Shell.Help#coral-shell-help:search\n   \n   @param {Object} event\n   Event object.\n   @param {HTMLElement} event.detail.value\n   The user-provided input value aka the search-term\n   */\n}\n\nexport default ShellHelp;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {AnchorList} from '../../../coralui-component-list';\n\nconst CLASSNAME = ['_coral-BasicList-item', '_coral-AnchorList-item', '_coral-Shell-help-item'];\n\n/**\n @class Coral.Shell.Help.Item\n @classdesc A Shell Help item component\n @htmltag coral-shell-help-item\n @extends {AnchorListItem}\n */\nclass ShellHelpItem extends AnchorList.Item {\n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(...CLASSNAME);\n  }\n}\n\nexport default ShellHelpItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {OverlayMixin} from '../../../coralui-mixin-overlay';\nimport {transform, validate} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Shell-menu';\n\n/**\n Enumeration for {@link ShellMenu} placement options.\n \n @typedef {Object} ShellMenuPlacementEnum\n \n @property {String} RIGHT\n Anchor to the right of the page.\n @property {String} TOP\n Anchor at the top of the page.\n */\nconst placement = {\n  RIGHT: 'right',\n  TOP: 'top'\n};\n\nconst ALL_PLACEMENT_CLASSES = [];\nfor (const placementValue in placement) {\n  ALL_PLACEMENT_CLASSES.push(`${CLASSNAME}--${placement[placementValue]}`);\n}\n\n/**\n Enumeration for {@link ShellMenu} overlay animation options.\n \n @typedef {Object} ShellMenuFromEnum\n \n @property {String} RIGHT\n Animate in from the right.\n @property {String} TOP\n Animate in from the top.\n */\nconst from = {\n  RIGHT: 'right',\n  TOP: 'top'\n};\n\nconst ALL_FROM_CLASSES = [];\nfor (const fromValue in from) {\n  ALL_FROM_CLASSES.push(`${CLASSNAME}--${from[fromValue]}`);\n}\n\n/**\n @class Coral.Shell.Menu\n @classdesc A Shell Menu component\n @htmltag coral-shell-menu\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {OverlayMixin}\n */\nclass ShellMenu extends OverlayMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Override defaults from Overlay\n    this._focusOnShow = this.constructor.focusOnShow.ON;\n    this._returnFocus = this.constructor.returnFocus.ON;\n    this._overlayAnimationTime = this.constructor.FADETIME;\n    \n    // Events\n    this._delegateEvents({\n      'click [coral-close]': '_handleCloseClick',\n      'global:key:escape': '_handleGlobalEscape',\n      'global:capture:click': '_handleGlobalClick'\n    });\n  }\n  \n  /**\n   The side of the page the overlay should be anchored to. See {@link ShellMenuPlacementEnum}.\n   \n   @type {String}\n   @default ShellMenuPlacementEnum.RIGHT\n   @htmlattribute placement\n   @htmlattributereflected\n   */\n  get placement() {\n    return this._placement || placement.RIGHT;\n  }\n  set placement(value) {\n    value = transform.string(value).toLowerCase();\n    this._placement = validate.enumeration(placement)(value) && value || placement.RIGHT;\n    this._reflectAttribute('placement', this._placement);\n    \n    this.classList.remove(...ALL_PLACEMENT_CLASSES);\n    this.classList.add(`${CLASSNAME}--placement-${this._placement}`);\n  }\n  \n  /**\n   The direction the overlay should animate from. See {@link ShellMenuFromEnum}.\n   \n   @type {String}\n   @default ShellMenuFromEnum.TOP\n   @htmlattribute from\n   @htmlattributereflected\n   */\n  get from() {\n    return this._from || from.TOP;\n  }\n  set from(value) {\n    value = transform.string(value).toLowerCase();\n    this._from = validate.enumeration(from)(value) && value || from.TOP;\n    this._reflectAttribute('from', this._from);\n  \n    this.classList.remove(...ALL_FROM_CLASSES);\n    this.classList.add(`${CLASSNAME}--from-${this._from}`);\n  }\n  \n  /**\n   Whether the overlay should use all available space.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute full\n   @htmlattributereflected\n   */\n  get full() {\n    return this._full || false;\n  }\n  set full(value) {\n    this._full = transform.booleanAttr(value);\n    this._reflectAttribute('full', this._full);\n  \n    this.classList.toggle(`${CLASSNAME}--full`, this._full);\n  }\n  \n  /**\n   Whether the overlay should always be on top.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute top\n   @htmlattributereflected\n   */\n  get top() {\n    return this._top || false;\n  }\n  set top(value) {\n    this._top = transform.booleanAttr(value);\n    this._reflectAttribute('top', this._top);\n  }\n  \n  /**\n   Inherited from {@link OverlayMixin#open}.\n   */\n  get open() {\n    return super.open;\n  }\n  set open(value) {\n    super.open = value;\n  \n    if (this.top) {\n      // Be higher than the next highest overlay\n      this.style.zIndex = parseInt(this.style.zIndex, 10) + 20;\n    }\n  }\n  \n  /** @ignore */\n  _handleGlobalEscape() {\n    // checks that it is the top most overlay before closing\n    if (this.open && this._isTopOverlay()) {\n      this.open = false;\n    }\n  }\n  \n  /**\n   @todo this is duplicated between ovelay components, maybe this should be in a mixin\n   \n   @ignore\n   */\n  _handleCloseClick(event) {\n    const dismissTarget = event.matchedTarget;\n    const dismissValue = dismissTarget.getAttribute('coral-close');\n    if (!dismissValue || this.matches(dismissValue)) {\n      this.hide();\n      event.stopPropagation();\n    }\n  }\n  \n  /**\n   Makes sure that the menu is closed when outside is clicked.\n   \n   @private\n   */\n  _handleGlobalClick(event) {\n    const eventTarget = event.target;\n  \n    // since this component does not have a target property like most overlays, we need to figure it if\n    // @todo: introduce target to be able to remove this behavior\n    const item = eventTarget.closest('coral-shell-menubar-item');\n  \n    // in case the target was clicked, we need to ignore the event\n    if (!(item && this === item._getMenu())) {\n      if (this.open && !this.contains(eventTarget)) {\n        // Close if we are open and the click was outside of the target and outside of the popover\n        this.hide();\n      }\n    }\n  }\n  \n  /**\n   Returns {@link ShellMenu} placement options.\n   \n   @return {ShellMenuPlacementEnum}\n   */\n  static get placement() { return placement; }\n  \n  /**\n   Returns {@link ShellMenu} overlay animation options.\n   \n   @return {ShellMenuFromEnum}\n   */\n  static get from() { return from; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat([\n      'placement',\n      'from',\n      'full',\n      'top'\n    ]);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // Default reflected attributes\n    if (!this._placement) { this.placement = placement.RIGHT; }\n    if (!this._from) { this.from = from.TOP; }\n  }\n}\n\nexport default ShellMenu;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {Collection} from '../../../coralui-collection';\n\nconst CLASSNAME = '_coral-Shell-menubar';\n\n/**\n @class Coral.Shell.MenuBar\n @classdesc A Shell MenuBar component\n @htmltag coral-shell-menubar\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ShellMenuBar extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The item collection.\n   \n   @type {Collection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request:\n    if (!this._items) {\n      this._items = new Collection({\n        host: this,\n        itemTagName: 'coral-shell-menubar-item'\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default ShellMenuBar;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"shellMenuButton\"] = document.createElement(\"button\",\"coral-button\");\n  el0.setAttribute(\"is\", \"coral-button\");\n  el0.setAttribute(\"variant\", \"_custom\");\n  el0.setAttribute(\"iconsize\", \"S\");\n  el0.className += \" _coral-Button--quiet--action _coral-Shell-menu-button\";\n  el0.setAttribute(\"handle\", \"shellMenuButton\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = this[\"shellMenuButtonLabel\"] = document.createElement(\"coral-button-label\");\n  el2.setAttribute(\"handle\", \"shellMenuButtonLabel\");\n  el0.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  el0.appendChild(el3);\n  frag.appendChild(el0);\n  var el4 = document.createTextNode(\"\\n\");\n  frag.appendChild(el4);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform, validate} from '../../../coralui-util';\nimport '../../../coralui-component-icon';\nimport '../../../coralui-component-button';\nimport '../../../coralui-component-anchorbutton';\nimport menuBarItem from '../templates/menuBarItem';\n\n/**\n Enumeration for {@link ShellMenuBarItem} icon variants.\n \n @typedef {Object} ShellMenuBarItemIconVariantEnum\n \n @property {String} DEFAULT\n A default menubar item.\n @property {String} CIRCLE\n A round image as menubar item.\n */\nconst iconVariant = {\n  DEFAULT: 'default',\n  CIRCLE: 'circle'\n};\n\n// the Menubar Item's base classname\nconst CLASSNAME = '_coral-Shell-menubar-item';\n\n// Builds a string containing all possible iconVariant classnames. This will be used to remove classnames when the variant\n// changes\nconst ALL_ICON_VARIANT_CLASSES = [];\nfor (const variantValue in iconVariant) {\n  ALL_ICON_VARIANT_CLASSES.push(`${CLASSNAME}--${iconVariant[variantValue]}`);\n}\n\n/**\n @class Coral.Shell.MenuBar.Item\n @classdesc A Shell MenuBar Item component\n @htmltag coral-shell-menubar-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ShellMenuBarItem extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Templates\n    this._elements = {};\n    menuBarItem.call(this._elements);\n    \n    // Events\n    this._delegateEvents({\n      'click [handle=\"shellMenuButton\"]': '_handleButtonClick',\n  \n      // it has to be global because the menus are not direct children\n      'global:coral-overlay:close': '_handleOverlayEvent',\n      'global:coral-overlay:open': '_handleOverlayEvent'\n    });\n  }\n  \n  /**\n   Specifies the icon name used inside the menu item.\n   See {@link Icon} for valid icon names.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   */\n  get icon() {\n    return this._elements.shellMenuButton.icon;\n  }\n  set icon(value) {\n    this._elements.shellMenuButton.icon = value;\n  }\n  \n  /**\n   Size of the icon. It accepts both lower and upper case sizes. See {@link ButtonIconSizeEnum}.\n   \n   @type {String}\n   @default ButtonIconSizeEnum.SMALL\n   @htmlattribute iconsize\n   @htmlattributereflected\n   */\n  get iconSize() {\n    return this._elements.shellMenuButton.iconSize;\n  }\n  set iconSize(value) {\n    this._elements.shellMenuButton.iconSize = value;\n    // Required for styling\n    this._reflectAttribute('iconsize', this.iconSize);\n  }\n  \n  /**\n   The menubar item's iconVariant. See {@link ShellMenuBarItemIconVariantEnum}.\n   \n   @type {String}\n   @default ShellMenuBarItemIconVariantEnum.DEFAULT\n   @htmlattribute iconvariant\n   */\n  get iconVariant() {\n    return this._iconVariant || iconVariant.DEFAULT;\n  }\n  set iconVariant(value) {\n    value = transform.string(value).toLowerCase();\n    this._iconVariant = validate.enumeration(iconVariant)(value) && value || iconVariant.DEFAULT;\n  \n    // removes all the existing variants\n    this.classList.remove(...ALL_ICON_VARIANT_CLASSES);\n    // adds the new variant\n    if (this.variant !== iconVariant.DEFAULT) {\n      this.classList.add(`${CLASSNAME}--${this._iconVariant}`);\n    }\n  }\n  \n  /**\n   The notification badge content.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute badge\n   */\n  get badge() {\n    return this._elements.shellMenuButton.getAttribute('badge') || '';\n  }\n  set badge(value) {\n    // Non-truthy values shouldn't show\n    // null, empty string, 0, etc\n    this._elements.shellMenuButton[!value || value === '0' ? 'removeAttribute' : 'setAttribute']('badge', value);\n  }\n  \n  /**\n   Whether the menu is open or not.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute open\n   @htmlattributereflected\n   \n   @emits {coral-shell-menubar-item:open}\n   @emits {coral-shell-menubar-item:close}\n   */\n  get open() {\n    return this._open || false;\n  }\n  set open(value) {\n    const menu = this._getMenu();\n  \n    // if we want to open the dialog we need to make sure there is a valid menu\n    if (menu !== null) {\n      this._open = transform.booleanAttr(value);\n      this._reflectAttribute('open', this._open);\n    \n      // Toggle the target menu\n      if (menu.open !== this._open) {\n        menu.open = this._open;\n      }\n  \n      this.trigger(`coral-shell-menubar-item:${this._open ? 'open' : 'close'}`);\n    }\n  }\n  \n  /**\n   The menubar item's label content zone.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get label() {\n    return this._getContentZone(this._elements.shellMenuButtonLabel);\n  }\n  set label(value) {\n    this._setContentZone('label', value, {\n      handle: 'shellMenuButtonLabel',\n      tagName: 'coral-button-label',\n      insert: function(label) {\n        this._elements.shellMenuButton.label = label;\n      }\n    });\n  }\n  \n  /**\n   The menu that this menu item should show. If a CSS selector is provided, the first matching element will be\n   used.\n   \n   @type {?HTMLElement|String}\n   @default null\n   @htmlattribute menu\n   */\n  get menu() {\n    return this._menu || null;\n  }\n  set menu(value) {\n    this._menu = value instanceof HTMLElement ? value : String(value);\n  }\n  \n  /** @private */\n  _handleOverlayEvent(event) {\n    const target = event.target;\n    \n    // matches the open state of the target in case it was open separately\n    if (target === this._getMenu() && this.open !== target.open) {\n      this.open = target.open;\n    }\n  }\n  \n  /** @ignore */\n  _handleButtonClick() {\n    this.open = !this.open;\n  }\n  \n  /** @ignore */\n  _getMenu(targetValue) {\n    // Use passed target\n    targetValue = targetValue || this.menu;\n    \n    if (targetValue instanceof Node) {\n      // Just return the provided Node\n      return targetValue;\n    }\n    \n    // Dynamically get the target node based on target\n    let newTarget = null;\n    if (typeof targetValue === 'string') {\n      newTarget = document.querySelector(targetValue);\n    }\n    \n    return newTarget;\n  }\n  \n  get _contentZones() { return {'coral-button-label': 'label'}; }\n  \n  /**\n   Returns {@link ShellMenuBarItem} icon variants.\n   \n   @return {ShellMenuBarItemIconVariantEnum}\n   */\n  static get iconVariant() { return iconVariant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return [\n      'icon',\n      'iconsize',\n      'iconSize',\n      'iconvariant',\n      'iconVariant',\n      'badge',\n      'open',\n      'menu'\n    ];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    const button = this.querySelector('._coral-Shell-menu-button');\n    \n    if (button) {\n      this._elements.shellMenuButton = button;\n      this._elements.shellMenuButtonLabel = this.querySelector('coral-button-label');\n    }\n    else {\n      while (this.firstChild) {\n        this._elements.shellMenuButtonLabel.appendChild(this.firstChild);\n      }\n  \n      this.appendChild(this._elements.shellMenuButton);\n    }\n  \n    this.label = this._elements.shellMenuButtonLabel;\n  }\n  \n  /**\n   Triggered after the {@link ShellMenuBarItem} is opened with <code>show()</code> or <code>instance.open = true</code>\n   \n   @typedef {CustomEvent} coral-shell-menubar-item:open\n   */\n  \n  /**\n   Triggered after the {@link ShellMenuBarItem} is closed with <code>hide()</code> or <code>instance.open = false</code>\n   \n   @typedef {CustomEvent} coral-shell-menubar-item:close\n   */\n}\n\nexport default ShellMenuBarItem;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"container\"] = document.createElement(\"div\");\n  el0.className += \" _coral-Shell-user-container\";\n  el0.setAttribute(\"handle\", \"container\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = this[\"image\"] = document.createElement(\"div\");\n  el2.className += \" _coral-Shell-user-image\";\n  el2.setAttribute(\"handle\", \"image\");\n  var el3 = document.createTextNode(\"\\n    \");\n  el2.appendChild(el3);\n  var el4 = this[\"avatar\"] = document.createElement(\"coral-icon\");\n  el4.setAttribute(\"icon\", data_0[\"icon\"]);\n  el4.className += \" _coral-Shell-user-avatar\";\n  el4.setAttribute(\"size\", \"XL\");\n  el4.setAttribute(\"handle\", \"avatar\");\n  el2.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el5);\n  el0.appendChild(el2);\n  var el6 = document.createTextNode(\"\\n\");\n  el0.appendChild(el6);\n  frag.appendChild(el0);\n  var el7 = document.createTextNode(\"\\n\");\n  frag.appendChild(el7);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport user from '../templates/user';\n\nconst CLASSNAME = '_coral-Shell-user';\n\n/**\n Enumeration for {@link ShellUser} avatar options. Avatar assets should use one of those provided, when no asset is set\n \n @typedef {Object} ShellUserAvatarEnum\n \n @property {String} DEFAULT\n Default avatar, show user icon from icon font.\n */\nconst avatar = {\n  DEFAULT: 'userCircleColor'\n};\n\n/**\n @class Coral.Shell.User\n @classdesc A Shell User component\n @htmltag coral-shell-user\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ShellUser extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      // Fetch or create the content zone elements\n      name: this.querySelector('coral-shell-user-name') || document.createElement('coral-shell-user-name'),\n      heading: this.querySelector('coral-shell-user-heading') || document.createElement('coral-shell-user-heading'),\n      subheading: this.querySelector('coral-shell-user-subheading') || document.createElement('coral-shell-user-subheading'),\n      content: this.querySelector('coral-shell-user-content') || document.createElement('coral-shell-user-content'),\n      footer: this.querySelector('coral-shell-user-footer') || document.createElement('coral-shell-user-footer')\n    };\n    \n    user.call(this._elements, {icon: avatar.DEFAULT});\n  }\n  \n  /**\n   Specifies the asset used inside the avatar view.\n   See {@link Icon} for valid usage and icon names.\n   \n   @type {String}\n   @default ShellUserAvatarEnum.DEFAULT\n   @htmlattribute avatar\n   */\n  get avatar() {\n    return this._elements.avatar.icon;\n  }\n  set avatar(value) {\n    this._elements.avatar.icon = value;\n  }\n  \n  /**\n   The name content zone of the user-menu.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get name() {\n    return this._getContentZone(this._elements.name);\n  }\n  set name(value) {\n    this._setContentZone('content', value, {\n      handle: 'name',\n      tagName: 'coral-shell-user-name',\n      insert: function(content) {\n        this._elements.container.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   The heading content zone of the user-menu.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get heading() {\n    return this._getContentZone(this._elements.heading);\n  }\n  set heading(value) {\n    this._setContentZone('heading', value, {\n      handle: 'heading',\n      tagName: 'coral-shell-user-heading',\n      insert: function(content) {\n        this._elements.container.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   The subheading content zone of the user-menu.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get subheading() {\n    return this._getContentZone(this._elements.subheading);\n  }\n  set subheading(value) {\n    this._setContentZone('subheading', value, {\n      handle: 'subheading',\n      tagName: 'coral-shell-user-subheading',\n      insert: function(content) {\n        this._elements.container.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   The main content zone of the user-menu.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-shell-user-content',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   The footer content zone of the user-menu.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get footer() {\n    return this._getContentZone(this._elements.content);\n  }\n  set footer(value) {\n    this._setContentZone('footer', value, {\n      handle: 'footer',\n      tagName: 'coral-shell-user-footer',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  get _contentZones() {\n    return {\n      'coral-shell-user-name': 'name',\n      'coral-shell-user-heading': 'heading',\n      'coral-shell-user-subheading': 'subheading',\n      'coral-shell-user-content': 'content',\n      'coral-shell-user-footer': 'footer'\n    };\n  }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['avatar']; }\n  \n  /**\n   Returns {@link ShellUser} avatar options.\n   \n   @return {ShellUserAvatarEnum}\n   */\n  static get avatar() { return avatar; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    const frag = document.createDocumentFragment();\n  \n    // Render template\n    frag.appendChild(this._elements.container);\n  \n    for (const contentZone in this._contentZones) {\n      const element = this._elements[this._contentZones[contentZone]];\n      // Remove it so we can process children\n      if (element.parentNode) {\n        element.parentNode.removeChild(element);\n      }\n    }\n  \n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && child.getAttribute('handle') !== 'container') {\n        // Add non-template elements to the content\n        this._elements.content.appendChild(child);\n      }\n      else {\n        // Remove anything else element\n        this.removeChild(child);\n      }\n    }\n    \n    this.appendChild(frag);\n  \n    // Assign the content zones so the insert functions will be called\n    for (const contentZone in this._contentZones) {\n      const contentZoneName = this._contentZones[contentZone];\n      const element = this._elements[this._contentZones[contentZone]];\n  \n      /** @ignore */\n      this[contentZoneName] = element;\n    }\n  }\n}\n\nexport default ShellUser;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Shell.User.Content\n @classdesc Shell's User content component\n @htmltag coral-shell-user-content\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-shell-user-content');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Shell.User.Footer\n @classdesc Shell's User footer component\n @htmltag coral-shell-user-footer\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-shell-user-footer');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Shell.User.Heading\n @classdesc Shell's User heading component\n @htmltag coral-shell-user-heading\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-shell-user-heading');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Shell.User.Name\n @classdesc Shell's User name component\n @htmltag coral-shell-user-name\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-shell-user-name');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Shell.User.Subheading\n @classdesc Shell's User subheading component\n @htmltag coral-shell-user-subheading\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-shell-user-subheading');\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {SelectableCollection} from '../../../coralui-collection';\n\nconst CLASSNAME = '_coral-Shell-workspaces';\n\n/**\n @class Coral.Shell.Workspaces\n @classdesc A Shell Workspaces component\n @htmltag coral-shell-workspaces\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ShellWorkspaces extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents({\n      'key:down [is=\"coral-shell-workspace\"]': '_focusNextItem',\n      'key:right [is=\"coral-shell-workspace\"]': '_focusNextItem',\n      'key:left [is=\"coral-shell-workspace\"]': '_focusPreviousItem',\n      'key:up [is=\"coral-shell-workspace\"]': '_focusPreviousItem',\n      'key:pageup [is=\"coral-shell-workspace\"]': '_focusPreviousItem',\n      'key:pagedown [is=\"coral-shell-workspace\"]': '_focusNextItem',\n      'key:home [is=\"coral-shell-workspace\"]': '_focusFirstItem',\n      'key:end [is=\"coral-shell-workspace\"]': '_focusLastItem',\n      // private\n      'coral-shell-workspace:_selectedchanged': '_onItemSelectedChanged'\n    });\n  \n    // Used for eventing\n    this._oldSelection = null;\n  \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The item collection.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request:\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-shell-workspace',\n        itemBaseTagName: 'a',\n        onItemAdded: this._validateSelection,\n        onItemRemoved: this._validateSelection\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /**\n   Returns the selected workspace.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getLastSelected();\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    // gets the current selection\n    const selection = this.items._getAllSelected();\n    const selectionCount = selection.length;\n    \n    // if no item is currently selected, we need to find a candidate\n    if (selectionCount === 0) {\n      // gets the first candidate for selection\n      const selectable = this.items._getFirstSelectable();\n      \n      if (selectable) {\n        selectable.setAttribute('selected', '');\n      }\n    }\n    // more items are selected, so we find a single item and deselect everything else\n    else if (selectionCount > 1) {\n      // By default, the last one stays selected\n      item = item || selection[selection.length - 1];\n      \n      for (let i = 0; i < selectionCount; i++) {\n        if (selection[i] !== item) {\n          // Don't trigger change events\n          this._preventTriggeringEvents = true;\n          selection[i].removeAttribute('selected');\n        }\n      }\n      \n      // We can trigger change events again\n      this._preventTriggeringEvents = false;\n    }\n    \n    this._triggerChangeEvent();\n  }\n  \n  /** @private */\n  _triggerChangeEvent() {\n    const selectedItem = this.selectedItem;\n    const oldSelection = this._oldSelection;\n    \n    if (!this._preventTriggeringEvents && selectedItem !== oldSelection) {\n      this.trigger('coral-shell-workspaces:change', {\n        oldSelection: oldSelection,\n        selection: selectedItem\n      });\n      \n      this._oldSelection = selectedItem;\n    }\n  }\n  \n  /** @private */\n  _onItemSelectedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const item = event.target;\n    this._validateSelection(item);\n  }\n  \n  /**\n   Returns true if the event is at the matched target.\n   \n   @private\n   */\n  _eventIsAtTarget(event) {\n    const target = event.target;\n    const listItem = event.matchedTarget;\n  \n    const isAtTarget = target === listItem;\n  \n    if (isAtTarget) {\n      // Don't let arrow keys etc scroll the page\n      event.preventDefault();\n      event.stopPropagation();\n    }\n  \n    return isAtTarget;\n  }\n  \n  /** @private */\n  _focusNextItem(event) {\n    if (!this._eventIsAtTarget(event)) {\n      return;\n    }\n  \n    const target = event.matchedTarget;\n    if (target.nextElementSibling) {\n      target.nextElementSibling.focus();\n    }\n    else {\n      this.items.first().focus();\n    }\n  }\n  \n  /** @private */\n  _focusPreviousItem(event) {\n    if (!this._eventIsAtTarget(event)) {\n      return;\n    }\n  \n    const target = event.matchedTarget;\n    if (target.previousElementSibling) {\n      target.previousElementSibling.focus();\n    }\n    else {\n      this.items.last().focus();\n    }\n  }\n  \n  /** @private */\n  _focusFirstItem(event) {\n    if (!this._eventIsAtTarget(event)) {\n      return;\n    }\n    \n    this.items.first().focus();\n  }\n  \n  /** @private */\n  _focusLastItem(event) {\n    if (!this._eventIsAtTarget(event)) {\n      return;\n    }\n  \n    this.items.last().focus();\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Don't trigger events once connected\n    this._preventTriggeringEvents = true;\n    this._validateSelection();\n    this._preventTriggeringEvents = false;\n  \n    this._oldSelection = this.selectedItem;\n  }\n}\n\nexport default ShellWorkspaces;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Shell-workspaces-workspace';\n\n/**\n @class Coral.Shell.Workspace\n @classdesc A Shell Workspace component\n @htmltag coral-shell-workspace\n @htmlbasetag a\n @extends {HTMLAnchorElement}\n @extends {ComponentMixin}\n */\nclass ShellWorkspace extends ComponentMixin(HTMLAnchorElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents({\n      click: '_onClick'\n    });\n  }\n  \n  /**\n   Whether this workspace is selected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n  \n    this.setAttribute('aria-selected', this._selected);\n    this.classList.toggle('is-selected', this._selected);\n    \n    this.trigger('coral-shell-workspace:_selectedchanged');\n  }\n  \n  /** @private */\n  _onClick() {\n    if (!this.selected) {\n      this.selected = true;\n    }\n  }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['selected']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  }\n  \n  /**\n   Triggered when a {@link ShellWorkspace} selection changed.\n   \n   @typedef {CustomEvent} coral-shell-workspace:_selectedchanged\n   \n   @private\n   */\n}\n\nexport default ShellWorkspace;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"container\"] = document.createElement(\"div\");\n  el0.setAttribute(\"handle\", \"container\");\n  el0.className += \" _coral-Shell-solutions-container\";\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {Collection} from '../../../coralui-collection';\nimport solutionSwitcher from '../templates/solutionSwitcher';\n\nconst CLASSNAME = '_coral-Shell-solutionSwitcher';\n\n/**\n @class Coral.Shell.SolutionSwitcher\n @classdesc A Shell Solution Switcher component\n @htmltag coral-shell-solutionswitcher\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ShellSolutionSwitcher extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Template\n    this._elements = {};\n    solutionSwitcher.call(this._elements);\n    \n    const self = this;\n    // Listen for mutations\n    const observer = new MutationObserver((mutations) => {\n      mutations.forEach((mutation) => {\n        for (let i = 0; i < mutation.addedNodes.length; i++) {\n          const addedNode = mutation.addedNodes[i];\n          // Move non secondary solutions to the container\n          if (addedNode.nodeName === 'CORAL-SHELL-SOLUTIONS' && !addedNode.hasAttribute('secondary')) {\n            self._elements.container.appendChild(addedNode);\n          }\n        }\n      });\n    });\n  \n    observer.observe(this, {\n      // Only care about direct children\n      childList: true\n    });\n  }\n  \n  /**\n   The item collection.\n   \n   @type {Collection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request\n    if (!this._items) {\n      this._items = new Collection({\n        host: this,\n        itemTagName: 'coral-shell-solutions'\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // force dark theme\n    this.classList.add('coral--dark');\n    \n    const container = this.querySelector('._coral-Shell-solutions-container') || this._elements.container;\n    \n    // Remove it so we can process solutions\n    if (container.parentNode) {\n      container.remove();\n    }\n  \n    // Move non secondary solutions to the container\n    Array.prototype.forEach.call(this.querySelectorAll('coral-shell-solutions:not([secondary])'), (item) => {\n      container.appendChild(item);\n    });\n  \n    // Put the container as first child\n    this.insertBefore(container, this.firstChild);\n  }\n}\n\nexport default ShellSolutionSwitcher;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {Collection} from '../../../coralui-collection';\nimport {transform} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Shell-solutions';\n\n/**\n @class Coral.Shell.Solutions\n @classdesc A Shell Solutions component\n @htmltag coral-shell-solutions\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass ShellSolutions extends ComponentMixin(HTMLElement) {\n  /**\n   The item collection.\n   \n   @type {Collection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request:\n    if (!this._items) {\n      this._items = new Collection({\n        host: this,\n        itemTagName: 'coral-shell-solution',\n        itemBaseTagName: 'a'\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /**\n   Whether the solution list is secondary.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute secondary\n   @htmlattributereflected\n   */\n  get secondary() {\n    return this._secondary || false;\n  }\n  set secondary(value) {\n    this._secondary = transform.booleanAttr(value);\n    this._reflectAttribute('secondary', this._secondary);\n  \n    this.classList.toggle(`${CLASSNAME}--secondary`, this._secondary);\n  }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['secondary']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default ShellSolutions;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Shell.Solutions.Header\n @classdesc Shell's solution sub-cloud name\n @htmltag coral-shell-solutions-header\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-shell-solutions-header');\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"icon\"] = document.createElement(\"coral-icon\");\n  el0.setAttribute(\"size\", \"XL\");\n  el0.setAttribute(\"handle\", \"icon\");\n  el0.className += \" _coral-Shell-solution-icon\";\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform} from '../../../coralui-util';\nimport solutionIcon from '../templates/solutionIcon';\n\nconst CLASSNAME = '_coral-Shell-solution';\n\n/**\n @class Coral.Shell.Solution\n @classdesc A Shell Solution component\n @htmltag coral-shell-solution\n @extends {HTMLAnchorElement}\n @extends {ComponentMixin}\n */\nclass ShellSolution extends ComponentMixin(HTMLAnchorElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      // Fetch or create the content zone elements\n      label: this.querySelector('coral-shell-solution-label') || document.createElement('coral-shell-solution-label')\n    };\n    solutionIcon.call(this._elements);\n  }\n  \n  /**\n   Specifies the icon name used inside the button. See {@link Icon} for valid icon names.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   */\n  get icon() {\n    return this._elements.icon.icon;\n  }\n  set icon(value) {\n    this._elements.icon.icon = value;\n  }\n  \n  /**\n   The solution's label content zone.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get label() {\n    return this._getContentZone(this._elements.label);\n  }\n  set label(value) {\n    this._setContentZone('label', value, {\n      handle: 'label',\n      tagName: 'coral-shell-solution-label',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   Whether a solution is linked or not\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute linked\n   @htmlattributereflected\n   */\n  get linked() {\n    return this._linked || false;\n  }\n  set linked(value) {\n    this._linked = transform.booleanAttr(value);\n    this._reflectAttribute('linked', this._linked);\n    \n    this.classList.toggle(`${CLASSNAME}--linked`, this._linked);\n  }\n  \n  get _contentZones() { return {'coral-shell-solution-label': 'label'}; }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['icon', 'linked']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    const fragment = document.createDocumentFragment();\n  \n    // Render template\n    fragment.appendChild(this._elements.icon);\n  \n    const label = this._elements.label;\n    \n    // Remove it so we can process children\n    if (label) { label.remove(); }\n  \n    // Move any remaining elements into the content sub-component\n    while (this.firstChild) {\n      const child = this.firstChild;\n      \n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && child.getAttribute('handle') !== 'icon') {\n        label.appendChild(child);\n      }\n      else {\n        this.removeChild(child);\n      }\n    }\n  \n    // Add template to component\n    this.appendChild(fragment);\n    \n    // Call the content zone insert\n    this.label = label;\n  }\n}\n\nexport default ShellSolution;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Shell.Solution.Label\n @classdesc Shell's Solution label component\n @htmltag coral-shell-solution-label\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-shell-solution-label');\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  data = data_0;\n  \nvar labelId = data.commons.getUID();\n\n  data_0 = data;\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"container\"] = document.createElement(\"div\");\n  el2.setAttribute(\"handle\", \"container\");\n  var el3 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el3);\n  var el4 = document.createElement(\"label\");\n  el4.className += \" u-coral-screenReaderOnly\";\n  el4.id = labelId;\n  el4.textContent = data_0[\"i18n\"][\"get\"]('Search Organizations');\n  el2.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el5);\n  var el6 = this[\"search\"] = document.createElement(\"coral-search\");\n  el6.className += \" _coral-Shell-orgSwitcher-search\";\n  el6.setAttribute(\"handle\", \"search\");\n  el6.setAttribute(\"placeholder\", data_0[\"i18n\"][\"get\"]('Search Organizations'));\n  el6.setAttribute(\"labelledby\", labelId);\n  el2.appendChild(el6);\n  var el7 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el7);\n  var el8 = this[\"items\"] = document.createElement(\"div\");\n  el8.className += \" _coral-Shell-orgSwitcher-items\";\n  el8.setAttribute(\"handle\", \"items\");\n  el2.appendChild(el8);\n  var el9 = document.createTextNode(\"\\n  \");\n  el2.appendChild(el9);\n  var el10 = this[\"resultMessage\"] = document.createElement(\"div\");\n  el10.className += \" _coral-Shell-orgSwitcher-resultMessage\";\n  el10.setAttribute(\"handle\", \"resultMessage\");\n  el10.setAttribute(\"hidden\", \"\");\n  var el11 = document.createTextNode(\"\\n    \");\n  el10.appendChild(el11);\n  var el12 = document.createElement(\"div\");\n  el12.className += \" _coral-Shell-orgSwitcher-resultMessage-container\";\n  var el13 = document.createTextNode(\"\\n      \");\n  el12.appendChild(el13);\n  var el14 = document.createElement(\"h2\");\n  el14.className += \" coral-Heading coral-Heading--2\";\n  el14.textContent = data_0[\"i18n\"][\"get\"]('No organizations found.');\n  el12.appendChild(el14);\n  var el15 = document.createTextNode(\"\\n    \");\n  el12.appendChild(el15);\n  el10.appendChild(el12);\n  var el16 = document.createTextNode(\"\\n  \");\n  el10.appendChild(el16);\n  el2.appendChild(el10);\n  var el17 = document.createTextNode(\"\\n\");\n  el2.appendChild(el17);\n  frag.appendChild(el2);\n  var el18 = document.createTextNode(\"\\n\");\n  frag.appendChild(el18);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {List} from '../../../coralui-component-list';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport orgSwitcher from '../templates/orgSwitcher';\nimport {commons, i18n} from '../../../coralui-util';\n\nconst CLASSNAMES = ['_coral-BasicList', '_coral-Shell-orgSwitcher'];\n\n/**\n Minimum number of entries required to show search control.\n \n @type {Number}\n @ignore\n */\nconst SEARCH_VISIBILITY_THRESHOLD = 6;\n\n/**\n @class Coral.Shell.OrgSwitcher\n @classdesc A Shell OrgSwitcher component\n @htmltag coral-shell-orgswitcher\n @extends {List}\n */\nclass ShellOrgSwitcher extends List {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents({\n      'coral-search:clear': '_showAll',\n      'coral-search:input': '_performSearch',\n      'coral-search:submit': '_selectFirst',\n      'coral-shell-organization:change': '_onOrganizationChange',\n      // private\n      'coral-shell-organization:_selectedchanged': '_onItemSelectedChanged',\n      'coral-shell-suborganization:_selectedchanged': '_onSubItemSelectedChanged'\n    });\n    \n    // Templates\n    this._elements = {\n      footer: this.querySelector('coral-shell-orgswitcher-footer') || document.createElement('coral-shell-orgswitcher-footer')\n    };\n    orgSwitcher.call(this._elements, {commons, i18n});\n  \n    // Used for eventing\n    this._oldSelection = null;\n    \n    // Item handling\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The item collection.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request:\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-shell-organization',\n        itemSelector: 'coral-shell-organization, coral-shell-suborganization',\n        container: this._elements.items,\n        onItemAdded: this._onCollectionChange,\n        onItemRemoved: this._onCollectionChange\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /**\n   The search field placeholder.\n   \n   @default ''\n   @type {String}\n   @htmlattribute placeholder\n   */\n  get placeholder() {\n    return this._elements.search.placeholder;\n  }\n  set placeholder(value) {\n    this._elements.search.placeholder = value;\n  }\n  \n  /**\n   Content zone where the buttons are located.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get footer() {\n    return this._getContentZone(this._elements.footer);\n  }\n  set footer(value) {\n    this._setContentZone('content', value, {\n      handle: 'footer',\n      tagName: 'coral-shell-orgswitcher-footer',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /** @private */\n  get _itemTagName() {\n    // Used for Collection\n    return 'coral-shell-organization';\n  }\n  \n  /** @private */\n  _onItemSelectedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const item = event.target;\n    this._validateSelection(item);\n  }\n  \n  /** @private */\n  _onSubItemSelectedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const item = event.target;\n    \n    // If a sub organization is selected, deselect all selected organization items\n    if (item.hasAttribute('selected')) {\n      this.items._getAllSelected().forEach((itemElement) => {\n        if (itemElement.tagName === 'CORAL-SHELL-ORGANIZATION') {\n          this._preventTriggeringEvents = true;\n          itemElement.removeAttribute('selected');\n        }\n      });\n  \n      this._preventTriggeringEvents = false;\n    }\n  }\n  \n  /** @private */\n  _onOrganizationChange() {\n    this._triggerChangeEvent();\n  }\n  \n  /**\n   Returns the selected workspace.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getLastSelected();\n  }\n  \n  /** @private */\n  _selectFirst(event) {\n    event.stopPropagation();\n  \n    const first = this.items.first();\n    if (first) {\n      first.setAttribute('selected', '');\n    }\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    // gets the current selection\n    const selection = this.items._getAllSelected();\n    const selectionCount = selection.length;\n    \n    if (selectionCount > 1) {\n      for (let i = 0; i < selectionCount; i++) {\n        if (selection[i] !== item) {\n          // Don't trigger change events\n          this._preventTriggeringEvents = true;\n          selection[i].removeAttribute('selected');\n        }\n      }\n      \n      // We can trigger change events again\n      this._preventTriggeringEvents = false;\n    }\n    \n    this._triggerChangeEvent();\n  }\n  \n  /** @private */\n  _triggerChangeEvent() {\n    const selectedItem = this.selectedItem;\n    const oldSelection = this._oldSelection;\n    \n    if (!this._preventTriggeringEvents && selectedItem !== oldSelection) {\n      this.trigger('coral-shell-orgswitcher:change', {\n        oldSelection: oldSelection,\n        selection: selectedItem\n      });\n      \n      this._oldSelection = selectedItem;\n    }\n  }\n  \n  /** @private */\n  _showAll(event) {\n    event.stopPropagation();\n  \n    this._elements.resultMessage.hidden = true;\n  \n    // Show all items\n    this.items.getAll().forEach((item) => {\n      item.hidden = false;\n    \n      if (item.items) {\n        // Show all sub-items\n        item.items.getAll().forEach((itemElement) => {\n          itemElement.hidden = false;\n        });\n      }\n    });\n  }\n  \n  /** @private */\n  _performSearch(event) {\n    event.stopPropagation();\n    \n    const searchTerm = this._elements.search.value.toLowerCase();\n    \n    this._elements.resultMessage.hidden = true;\n    \n    // Hide items that don't match\n    let resultCount = 0;\n    \n    this.items.getAll().forEach((item) => {\n      let matched = item.content.textContent.toLowerCase().indexOf(searchTerm) !== -1;\n      \n      let childMatched = false;\n      if (item.items) {\n        item.items.getAll().forEach((itemElement) => {\n          const elementMatch = itemElement.content.textContent.toLowerCase().indexOf(searchTerm) !== -1;\n          childMatched = childMatched || elementMatch;\n  \n          itemElement.hidden = !elementMatch;\n        });\n      }\n      \n      matched = matched || childMatched;\n      item.hidden = !matched;\n      \n      if (matched) {\n        resultCount++;\n      }\n    });\n    \n    if (resultCount === 0) {\n      this._elements.resultMessage.hidden = false;\n    }\n  }\n  \n  /** @private */\n  _moveItems() {\n    this.setAttribute('id', this.id || commons.getUID());\n    Array.prototype.forEach.call(this.querySelectorAll(`#${this.id} > coral-shell-organization`), (item) => {\n      this._elements.items.appendChild(item);\n    }, this);\n  }\n  \n  /** @private */\n  _onCollectionChange(item) {\n    // Move all items into the right place\n    this._moveItems();\n  \n    // Select the last selected item\n    this._validateSelection(item);\n  \n    // if mincountforsearch is set and number of organizations are less than or equal to it, hide the search\n    if (this.items.length <= SEARCH_VISIBILITY_THRESHOLD) {\n      this._elements.search.hide();\n    }\n    else {\n      this._elements.search.show();\n    }\n  }\n  \n  get _contentZones() { return {'coral-shell-orgswitcher-footer': 'footer'}; }\n  \n  /** @ignore */\n  static get observedAttributes() { return super.observedAttributes.concat(['placeholder']); }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(...CLASSNAMES);\n  \n    // Move the items into the right place\n    this._moveItems();\n\n    const container = this.querySelector('[handle=\"container\"]');\n\n    // Support cloneNode\n    if (container) {\n      this._elements.container = container;\n      this._elements.items = this.querySelector('._coral-Shell-orgSwitcher-items');\n      this._elements.search = this.querySelector('._coral-Shell-orgSwitcher-search');\n      this._elements.resultMessage = this.querySelector('._coral-Shell-orgSwitcher-resultMessage');\n      this._items._container = this._elements.items;\n    }\n    else {\n      this.appendChild(this._elements.container);\n    }\n    \n    // Call content zone insert\n    this.footer = this._elements.footer;\n  \n    // Don't trigger events once connected\n    this._preventTriggeringEvents = true;\n    this._validateSelection();\n    this._preventTriggeringEvents = false;\n  \n    this._oldSelection = this.selectedItem;\n  }\n  \n  /**\n   Triggered when the {@link ShellOrgSwitcher} selected organization has changed.\n   \n   @typedef {CustomEvent} coral-shell-orgswitcher:change\n   \n   @property {HTMLElement} detail.oldSelection\n   The prior selected organization item.\n   @property {HTMLElement} detail.selection\n   The newly selected organization item.\n   */\n}\n\nexport default ShellOrgSwitcher;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Shell.OrgSwitcher.Footer\n @classdesc Shell's OrgSwitcher footer component\n @htmltag coral-shell-orgswitcher-footer\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-shell-orgswitcher-footer');\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  var el0 = this[\"checkmark\"] = document.createElement(\"span\");\n  el0.setAttribute(\"handle\", \"checkmark\");\n  el0.setAttribute(\"hidden\", \"\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  data = data_0;\n  \n    this.checkmark.innerHTML = data.Icon._renderSVG('spectrum-css-icon-MenuCheckmark', ['_coral-SelectList-checkmark']);\n  \n  data_0 = data;\n  var el3 = document.createTextNode(\"\\n\");\n  el0.appendChild(el3);\n  frag.appendChild(el0);\n  var el4 = document.createTextNode(\"\\n\");\n  frag.appendChild(el4);\n  var el5 = this[\"items\"] = document.createElement(\"div\");\n  el5.setAttribute(\"handle\", \"items\");\n  el5.className += \" _coral-Shell-orgSwitcher-subitems\";\n  frag.appendChild(el5);\n  var el6 = document.createTextNode(\"\\n\\n\");\n  frag.appendChild(el6);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {List} from '../../../coralui-component-list';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport {Icon} from '../../../coralui-component-icon';\nimport organization from '../templates/organization';\nimport {transform, commons} from '../../../coralui-util';\n\nconst CLASSNAMES = ['_coral-BasicList-item', '_coral-Shell-orgSwitcher-item'];\n\n\n/**\n @class Coral.Shell.Organization\n @classdesc A Shell Organization component\n @htmltag coral-shell-organization\n @extends {ListItem}\n */\nclass ShellOrganization extends List.Item {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Events\n    this._delegateEvents({\n      'click': '_onClick',\n      'key:enter': '_onClick',\n      'key:space': '_onClick',\n      // Private\n      'coral-shell-suborganization:_selectedchanged': '_onItemSelectedChanged'\n    });\n  \n    organization.call(this._elements, {Icon});\n  \n    // Used for eventing\n    this._oldSelection = null;\n  \n    // Item handling\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The item collection.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request:\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-shell-suborganization',\n        container: this._elements.items,\n        onItemAdded: this._onItemAdded,\n        onItemRemoved: this._onItemRemoved\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /**\n   Returns the selected workspace.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getLastSelected();\n  }\n  \n  /**\n   Whether this organization is selected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n    \n    this.setAttribute('aria-selected', this._selected);\n    this.classList.toggle('is-selected', this._selected);\n    this._elements.checkmark.hidden = !this._selected;\n  \n    if (this.items) {\n      const selectedItem = this.selectedItem;\n    \n      this.classList.toggle('is-child-selected', selectedItem);\n    \n      if (!this._selected && selectedItem) {\n        // Always de-select children when de-selected\n        selectedItem.removeAttribute('selected');\n      }\n    }\n    \n    this.trigger(`${this.tagName.toLowerCase()}:_selectedchanged`);\n  }\n  \n  /**\n   The name of this organization.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._name || '';\n  }\n  set name(value) {\n    this._name = transform.string(value);\n    this._reflectAttribute('name', this._name);\n  }\n  \n  /** @private */\n  _onItemSelectedChanged(event) {\n    // Validate the selection only if we're an organization\n    if (this.tagName === 'CORAL-SHELL-ORGANIZATION') {\n      // Don't stop propagation here as the orgSwitcher listens to the event too\n      const item = event.target;\n      this._validateSelection(item);\n    }\n  }\n  \n  /** @private */\n  _onItemAdded(item) {\n    // Move all items into the right place\n    this._moveItems();\n    \n    this._validateSelection(item);\n  }\n  \n  /** @private */\n  _onItemRemoved(item) {\n    this._setParent();\n  \n    this._validateSelection(item);\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    // gets the current selection\n    const selection = this.items._getAllSelected();\n    const selectionCount = selection.length;\n    \n    if (selectionCount > 1) {\n      for (let i = 0; i < selectionCount; i++) {\n        if (selection[i] !== item) {\n          // Don't trigger change events\n          this._preventTriggeringEvents = true;\n          selection[i].removeAttribute('selected');\n        }\n      }\n      \n      // We can trigger change events again\n      this._preventTriggeringEvents = false;\n    }\n    \n    this._triggerChangeEvent();\n  }\n  \n  /** @private */\n  _triggerChangeEvent() {\n    const selectedItem = this.selectedItem;\n    const oldSelection = this._oldSelection;\n    \n    if (!this._preventTriggeringEvents && selectedItem !== oldSelection) {\n      this.trigger(`${this.tagName.toLowerCase()}:change`, {\n        oldSelection: oldSelection,\n        selection: selectedItem\n      });\n      \n      this._oldSelection = selectedItem;\n    }\n  }\n  \n  /** @private */\n  _moveItems() {\n    Array.prototype.forEach.call(this.querySelectorAll('coral-shell-suborganization'), (item) => {\n      if (!this._elements.items.contains(item)) {\n        this._elements.items.appendChild(item);\n      }\n    }, this);\n  }\n  \n  /** @private */\n  _setParent() {\n    const hasChildren = this.items.length !== 0;\n    \n    if (hasChildren) {\n      this.removeAttribute('role');\n      this.removeAttribute('tabindex');\n    }\n    else {\n      // Be accessible\n      this.setAttribute('role', 'button');\n      this.setAttribute('tabindex', 0);\n    }\n    \n    this.classList.toggle('is-parent', hasChildren);\n  }\n  \n  /** @private */\n  _onClick() {\n    if (this.items.length !== 0) {\n      // You can't be selected if you have sub-organizations\n      return;\n    }\n    \n    this.selected = true;\n  }\n  \n  /** @ignore */\n  static get observedAttributes() { return super.observedAttributes.concat(['name', 'selected']); }\n  \n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(...CLASSNAMES);\n  \n    // Move items into the right place\n    this._moveItems();\n  \n    // Move items before calling the voracious ListItem render to support cloneNode\n    super.connectedCallback();\n  \n    this.setAttribute('id', this.id || commons.getUID());\n    const items = this.querySelector(`#${this.id} > ._coral-Shell-orgSwitcher-subitems`);\n    \n    if (items) {\n      this._elements.items = items;\n      this._elements.checkmark = this.querySelector(`#${this.id} > ._coral-Shell-orgSwitcher-item-checkmark`);\n      this._items._container = this._elements.items;\n    }\n    else {\n      // Render template\n      const frag = document.createDocumentFragment();\n  \n      frag.appendChild(this._elements.checkmark);\n      frag.appendChild(this._elements.items);\n      this.appendChild(frag);\n  \n      this._elements.icon.size = Icon.size.SMALL;\n    }\n    \n    // Don't trigger events once connected\n    this._preventTriggeringEvents = true;\n    this._validateSelection();\n    this._preventTriggeringEvents = false;\n  \n    this._oldSelection = this.selectedItem;\n  \n    this._setParent();\n  }\n  \n  /**\n   Triggered when a {@link ShellOrganization} selection changed.\n   \n   @typedef {CustomEvent} coral-shell-organization:_selectedchanged\n   \n   @private\n   */\n}\n\nexport default ShellOrganization;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport ShellOrganization from './ShellOrganization';\nimport {Icon} from '../../../coralui-component-icon';\n\nconst CLASSNAME = `_coral-BasicList-item, _coral-Shell-orgSwitcher-subitem `;\n\n/**\n @class Coral.Shell.Suborganization\n @classdesc A Shell Sub organization component\n @htmltag coral-shell-suborganization\n @extends {ShellOrganization}\n */\nclass ShellSuborganization extends ShellOrganization {\n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    // Has to be first to override padding from ._coral-Shell-orgSwitcher-item\n    /** @ignore */\n    this.className = CLASSNAME + this.className;\n  \n    // Set the icon size\n    this._elements.icon.size = Icon.size.SMALL;\n  \n    // Be accessible\n    this.setAttribute('role', 'button');\n    this.setAttribute('tabindex', 0);\n  }\n}\n\nexport default ShellSuborganization;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport helpTranslations from './i18n/coralui-component-shell-help/translations.json';\nimport orgSwitcherTranslations from './i18n/coralui-component-shell-orgswitcher/translations.json';\nimport {strings, commons} from '../coralui-util';\n// i18n\ncommons.extend(strings, {\n  'coralui-component-shell-help': helpTranslations,\n  'coralui-component-shell-orgswitcher': orgSwitcherTranslations\n});\n\nimport Shell from './src/scripts/Shell';\nimport ShellContent from './src/scripts/ShellContent';\n\nimport ShellHeader from './src/scripts/ShellHeader';\nimport ShellHomeAnchor from './src/scripts/ShellHomeAnchor';\nimport ShellHomeAnchorLabel from './src/scripts/ShellHomeAnchorLabel';\n\nimport ShellHelp from './src/scripts/ShellHelp';\nimport ShellHelpItem from './src/scripts/ShellHelpItem';\n\nimport ShellMenu from './src/scripts/ShellMenu';\nimport ShellMenuBar from './src/scripts/ShellMenuBar';\nimport ShellMenuBarItem from './src/scripts/ShellMenuBarItem';\n\nimport ShellUser from './src/scripts/ShellUser';\nimport ShellUserContent from './src/scripts/ShellUserContent';\nimport ShellUserFooter from './src/scripts/ShellUserFooter';\nimport ShellUserHeading from './src/scripts/ShellUserHeading';\nimport ShellUserName from './src/scripts/ShellUserName';\nimport ShellUserSubheading from './src/scripts/ShellUserSubheading';\n\nimport ShellWorkspaces from './src/scripts/ShellWorkspaces';\nimport ShellWorkspace from './src/scripts/ShellWorkspace';\n\nimport ShellSolutionSwitcher from './src/scripts/ShellSolutionSwitcher';\nimport ShellSolutions from './src/scripts/ShellSolutions';\nimport ShellSolutionsHeader from './src/scripts/ShellSolutionsHeader';\nimport ShellSolution from './src/scripts/ShellSolution';\nimport ShellSolutionLabel from './src/scripts/ShellSolutionLabel';\n\nimport ShellOrgSwitcher from './src/scripts/ShellOrgSwitcher';\nimport ShellOrgSwitcherFooter from './src/scripts/ShellOrgSwitcherFooter';\nimport ShellOrganization from './src/scripts/ShellOrganization';\nimport ShellSuborganization from './src/scripts/ShellSuborganization';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-shell', Shell);\nwindow.customElements.define('coral-shell-header', ShellHeader);\nwindow.customElements.define('coral-shell-homeanchor', ShellHomeAnchor, {extends: 'a'});\nwindow.customElements.define('coral-shell-help', ShellHelp);\nwindow.customElements.define('coral-shell-help-item', ShellHelpItem, {extends: 'a'});\nwindow.customElements.define('coral-shell-menu', ShellMenu);\nwindow.customElements.define('coral-shell-menubar', ShellMenuBar);\nwindow.customElements.define('coral-shell-menubar-item', ShellMenuBarItem);\nwindow.customElements.define('coral-shell-user', ShellUser);\nwindow.customElements.define('coral-shell-workspaces', ShellWorkspaces);\nwindow.customElements.define('coral-shell-workspace', ShellWorkspace, {extends: 'a'});\nwindow.customElements.define('coral-shell-solutionswitcher', ShellSolutionSwitcher);\nwindow.customElements.define('coral-shell-solutions', ShellSolutions);\nwindow.customElements.define('coral-shell-solution', ShellSolution, {extends: 'a'});\nwindow.customElements.define('coral-shell-orgswitcher', ShellOrgSwitcher);\nwindow.customElements.define('coral-shell-organization', ShellOrganization);\nwindow.customElements.define('coral-shell-suborganization', ShellSuborganization);\n\nShell.Content = ShellContent;\nShell.Header = ShellHeader;\nShell.HomeAnchor = ShellHomeAnchor;\nShell.HomeAnchor.Label = ShellHomeAnchorLabel;\nShell.Help = ShellHelp;\nShell.Help.Item = ShellHelpItem;\nShell.Menu = ShellMenu;\nShell.MenuBar = ShellMenuBar;\nShell.MenuBar.Item = ShellMenuBarItem;\nShell.User = ShellUser;\nShell.User.Content = ShellUserContent;\nShell.User.Footer = ShellUserFooter;\nShell.User.Heading = ShellUserHeading;\nShell.User.Name = ShellUserName;\nShell.User.Subheading = ShellUserSubheading;\nShell.Workspaces = ShellWorkspaces;\nShell.Workspace = ShellWorkspace;\nShell.SolutionSwitcher = ShellSolutionSwitcher;\nShell.Solutions = ShellSolutions;\nShell.Solutions.Header = ShellSolutionsHeader;\nShell.Solution = ShellSolution;\nShell.Solution.Label = ShellSolutionLabel;\nShell.OrgSwitcher = ShellOrgSwitcher;\nShell.OrgSwitcher.Footer = ShellOrgSwitcherFooter;\nShell.Organization = ShellOrganization;\nShell.Suborganization = ShellSuborganization;\n\nexport {Shell};\n","/**\n Gets the target panel of the item.\n \n @private\n @param {HTMLElement|String} [targetValue]\n A specific target value to use.\n @returns {?HTMLElement}\n */\nexport default function getTarget(targetValue) {\n  if (targetValue instanceof Node) {\n    // Just return the provided Node\n    return targetValue;\n  }\n  \n  // Dynamically get the target node based on the target\n  let newTarget = null;\n  if (typeof targetValue === 'string' && targetValue.trim() !== '') {\n    newTarget = document.querySelector(targetValue);\n  }\n  \n  return newTarget;\n}\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport {transform, validate, commons} from '../../../coralui-util';\nimport getTarget from './getTarget';\n\n/**\n Enumeration for {@link StepList} interaction options.\n \n @todo support \"click only past steps\" mode\n \n @typedef {Object} StepListInteractionEnum\n \n @property {String} ON\n Steps can be clicked to visit them.\n @property {String} OFF\n Steps cannot be clicked.\n */\nconst interaction = {\n  ON: 'on',\n  OFF: 'off'\n};\n\n/**\n Enumeration for {@link StepList} sizes.\n \n @typedef {Object} StepListSizeEnum\n \n @property {String} SMALL\n A small-sized StepList.\n @property {String} LARGE\n A large-sized StepList.\n */\nconst size = {\n  SMALL: 'S',\n  LARGE: 'L'\n};\n\n// the StepList's base classname\nconst CLASSNAME = '_coral-Steplist';\n\n/**\n @class Coral.StepList\n @classdesc A StepList component that holds a collection of steps.\n @htmltag coral-steplist\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass StepList extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    this._delegateEvents({\n      'click > coral-step > [handle=\"stepMarkerContainer\"]': '_onStepClick',\n      'click > coral-step > coral-step-label': '_onStepClick',\n      'click > coral-step': '_onStepClick',\n  \n      'capture:focus > coral-step': '_onStepMouseEnter',\n      'capture:mouseenter > coral-step > [handle=\"stepMarkerContainer\"]': '_onStepMouseEnter',\n      'capture:blur > coral-step': '_onStepMouseLeave',\n      'capture:mouseleave > coral-step > [handle=\"stepMarkerContainer\"]': '_onStepMouseLeave',\n  \n      'key:enter > coral-step': '_onStepKeyboardSelect',\n      'key:space > coral-step': '_onStepKeyboardSelect',\n      'key:home > coral-step': '_onHomeKey',\n      'key:end > coral-step': '_onEndKey',\n      'key:pagedown > coral-step': '_selectNextItem',\n      'key:right > coral-step': '_selectNextItem',\n      'key:down > coral-step': '_selectNextItem',\n      'key:pageup > coral-step': '_selectPreviousItem',\n      'key:left > coral-step': '_selectPreviousItem',\n      'key:up > coral-step': '_selectPreviousItem',\n      \n      // private\n      'coral-step:_selectedchanged': '_onItemSelectedChanged'\n    });\n  \n    // Used for eventing\n    this._oldSelection = null;\n    \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // we do lazy initialization of the collection\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-step',\n        onItemAdded: this._validateSelection,\n        onItemRemoved: this._validateSelection\n      });\n    }\n    \n    return this._items;\n  }\n  \n  /**\n   Returns the selected step.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getLastSelected();\n  }\n  \n  /**\n   The target component that will be linked to the StepList. It accepts either a CSS selector or a DOM element. If\n   a CSS Selector is provided, the first matching element will be used. Items will be selected based on the index.\n   If both target and {@link Coral.Step#target} are set, the second will have higher priority.\n   \n   @type {?HTMLElement|String}\n   @default null\n   @htmlattribute target\n   */\n  get target() {\n    return this._target || null;\n  }\n  set target(value) {\n    if (value === null || typeof value === 'string' || value instanceof Node) {\n      this._target = value;\n  \n      const self = this;\n      // we do this in the sync in case the target was not yet in the DOM\n      window.requestAnimationFrame(() => {\n        const realTarget = getTarget(self._target);\n  \n        // we add proper accessibility if available\n        if (realTarget) {\n          const stepItems = self.items.getAll();\n          const panelItems = realTarget.items ? realTarget.items.getAll() : realTarget.children;\n    \n          // we need to add a11y to all components, regardless of whether they can be perfectly paired\n          const maxItems = Math.max(stepItems.length, panelItems.length);\n    \n          let step;\n          let panel;\n          for (let i = 0; i < maxItems; i++) {\n            step = stepItems[i];\n            panel = panelItems[i];\n      \n            // if the step has its own target, we assume the target component will handle its own accessibility.\n            // if the target is an empty string we simply ignore it\n            if (step && step.target && step.target.trim() !== '') {\n              continue;\n            }\n      \n            if (step && panel) {\n              // sets the required ids\n              step.id = step.id || commons.getUID();\n              panel.id = panel.id || commons.getUID();\n        \n              // creates a 2 way binding for accessibility\n              step.setAttribute('aria-controls', panel.id);\n              panel.setAttribute('aria-labelledby', step.id);\n            }\n            else if (step) {\n              // cleans the aria since there is no matching panel\n              step.removeAttribute('aria-controls');\n            }\n            else {\n              // cleans the aria since there is no matching Step\n              panel.removeAttribute('aria-labelledby');\n            }\n          }\n        }\n      });\n    }\n  }\n  \n  /**\n   The size of the StepList. It accepts both lower and upper case sizes. Currently only \"S\" and \"L\" (the default)\n   are available.\n   See {@link StepListSizeEnum}.\n   \n   @type {String}\n   @default StepListSizeEnum.LARGE\n   @htmlattribute size\n   @htmlattributereflected\n   */\n  get size() {\n    return this._size || size.LARGE;\n  }\n  set size(value) {\n    value = transform.string(value).toUpperCase();\n    this._size = validate.enumeration(size)(value) && value || size.LARGE;\n    this._reflectAttribute('size', this._size);\n  \n    this.classList.toggle(`${CLASSNAME}--small`, this._size === size.SMALL);\n  }\n  \n  /**\n   Whether Steps should be interactive or not. When interactive, a Step can be clicked to jump to it.\n   See {@link StepListInteractionEnum}.\n   \n   @type {String}\n   @default StepListInteractionEnum.OFF\n   @htmlattribute interaction\n   @htmlattributereflected\n   */\n  get interaction() {\n    return this._interaction || interaction.OFF;\n  }\n  set interaction(value) {\n    value = transform.string(value).toLowerCase();\n    this._interaction = validate.enumeration(interaction)(value) && value || interaction.OFF;\n    this._reflectAttribute('interaction', this._interaction);\n  \n    const isInteractive = this._interaction === interaction.ON;\n    this.classList.toggle(`${CLASSNAME}--interactive`, isInteractive);\n  \n    const steps = this.items.getAll();\n    const stepsCount = steps.length;\n  \n    // update tab index for all children\n    for (let i = 0; i < stepsCount; i++) {\n      this._syncItemTabIndex(steps[i]);\n    }\n  }\n  \n  /** @private */\n  _syncItemTabIndex(item) {\n    // when interaction is on, we enable the tabindex so users can tab into the items\n    if (this.interaction === interaction.ON) {\n      item.setAttribute('tabindex', item.hasAttribute('selected') ? '0' : '-1');\n      item.removeAttribute('aria-readonly');\n    }\n    else {\n      // when off, removing the tabindex allows the component to never get focus\n      item.removeAttribute('tabindex');\n      item.setAttribute('aria-readonly', 'true');\n    }\n  }\n  \n  /** @private */\n  _onItemSelectedChanged(event) {\n    event.stopImmediatePropagation();\n  \n    const item = event.target;\n    \n    this._syncItemTabIndex(item);\n    this._validateSelection(item);\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    // gets the current selection\n    const selection = this.items._getAllSelected();\n    const selectionCount = selection.length;\n    \n    // if no item is currently selected, we need to find a candidate\n    if (selectionCount === 0) {\n      // gets the first candidate for selection\n      const selectable = this.items._getFirstSelectable();\n      \n      if (selectable) {\n        selectable.setAttribute('selected', '');\n      }\n    }\n    // more items are selected, so we find a single item and deselect everything else\n    else if (selectionCount > 1) {\n      // By default, the last one stays selected\n      item = item || selection[selection.length - 1];\n      \n      for (let i = 0; i < selectionCount; i++) {\n        if (selection[i] !== item) {\n          // Don't trigger change events\n          this._preventTriggeringEvents = true;\n          selection[i].removeAttribute('selected');\n        }\n      }\n  \n      // We can trigger change events again\n      this._preventTriggeringEvents = false;\n    }\n  \n    // sets the state-related classes every time the selection changes\n    this._setStateClasses();\n  \n    if (this._allChildrenAdded) {\n      this._updateLabels();\n    }\n  \n    this._triggerChangeEvent();\n  }\n  \n  /** @private */\n  _triggerChangeEvent() {\n    const selectedItem = this.selectedItem;\n    const oldSelection = this._oldSelection;\n    \n    if (!this._preventTriggeringEvents && selectedItem !== oldSelection) {\n      this.trigger('coral-steplist:change', {\n        oldSelection: oldSelection,\n        selection: selectedItem\n      });\n      \n      this._oldSelection = selectedItem;\n    }\n  }\n  \n  /** @private */\n  _setStateClasses() {\n    let selectedItemIndex = Infinity;\n    this.items.getAll().forEach((item, index) => {\n      // Use attribute instead of property as items might not be initialized\n      if (item.hasAttribute('selected')) {\n        // Mark which one is selected\n        selectedItemIndex = index;\n      }\n    \n      // Add/remove classes based on index\n      item.classList.toggle('is-complete', index < selectedItemIndex);\n    });\n  }\n  \n  /** @private */\n  _onStepKeyboardSelect(event) {\n    if (this.interaction === interaction.ON) {\n      event.preventDefault();\n      event.stopPropagation();\n      \n      const item = event.matchedTarget;\n      this._selectAndFocusItem(item);\n    }\n  }\n  \n  /** @private */\n  _onStepClick(event) {\n    if (this.interaction === interaction.ON) {\n      event.preventDefault();\n      event.stopPropagation();\n      \n      const item = event.matchedTarget.closest('coral-step');\n      this._selectAndFocusItem(item);\n    }\n  }\n  \n  /** @private */\n  _onStepMouseEnter() {\n    if (this.size === size.SMALL || this._isHybridMode) {\n      const step = event.target.closest('coral-step');\n      if (step.hasAttribute('selected') && this._isHybridMode) {\n        return;\n      }\n    \n      // we only show the tooltip if we have a label to show\n      if (step._elements.label.innerHTML.trim() !== '') {\n        step._elements.tooltip.content.innerHTML = step._elements.label.innerHTML;\n        step._elements.tooltip.open = true;\n      }\n    }\n  }\n  \n  /** @private */\n  _onStepMouseLeave(event) {\n    if (this.size === size.SMALL || this._isHybridMode) {\n      const step = event.target.closest('coral-step');\n      step._elements.tooltip.open = false;\n    }\n  }\n  \n  /** @private */\n  _onHomeKey(event) {\n    if (this.interaction === interaction.ON) {\n      event.preventDefault();\n      \n      const item = this.items._getFirstSelectable();\n      this._selectAndFocusItem(item);\n    }\n  }\n  \n  /** @private */\n  _onEndKey(event) {\n    if (this.interaction === interaction.ON) {\n      event.preventDefault();\n    \n      const item = this.items._getLastSelectable();\n      this._selectAndFocusItem(item);\n    }\n  }\n  \n  /** @private */\n  _selectNextItem(event) {\n    if (this.interaction === interaction.ON) {\n      event.preventDefault();\n    \n      this.next();\n    }\n  }\n  \n  /** @private */\n  _selectPreviousItem(event) {\n    if (this.interaction === interaction.ON) {\n      event.preventDefault();\n    \n      this.previous();\n    }\n  }\n  \n  /** @private */\n  _selectAndFocusItem(item) {\n    if (item) {\n      item.setAttribute('selected', '');\n      item.focus();\n    }\n  }\n  \n  /** @private */\n  _setHybridLabel(item) {\n    if (this._isHybridMode) {\n      const items = this.items.getAll();\n      const itemIndex = items.indexOf(item);\n      const middle = items.length / 2;\n      const stepSize = 120;\n  \n      // Position item label\n      const marginLeft = (middle - itemIndex) * stepSize - stepSize / 2;\n      item.label.style.marginLeft = `${marginLeft}px`;\n  \n      // Indicate item index\n      item.label.dataset.coralStepIndex = ` (${(itemIndex + 1)}/${items.length})`;\n    }\n  }\n  \n  /** @private */\n  _updateLabels() {\n    let hasOversizedLabel = false;\n    const hybridClass = `${CLASSNAME}--hybrid`;\n    \n    this._isHybridMode = false;\n    this.classList.remove(hybridClass);\n  \n    // when the steplist is small no check is needed\n    if (this.size === size.SMALL) {\n      return;\n    }\n  \n    // Check if one label is oversized\n    const steps = this.items.getAll();\n    const stepsCount = steps.length;\n    let actualStep;\n    \n    for (actualStep = 0; actualStep < stepsCount; actualStep++) {\n      if (steps[actualStep]._labelIsHidden) {\n        hasOversizedLabel = true;\n        this._isHybridMode = true;\n        this.classList.add(hybridClass);\n        \n        break;\n      }\n    }\n  \n    for (actualStep = 0; actualStep < stepsCount; actualStep++) {\n      if (steps[actualStep].label) {\n        steps[actualStep].label.hidden = !(steps[actualStep].hasAttribute('selected') || !hasOversizedLabel);\n      }\n    }\n    \n    this._setHybridLabel(this.selectedItem);\n  }\n  \n  /**\n   Show the next Step.\n   \n   @emits {coral-steplist:change}\n   */\n  next() {\n    let item = this.selectedItem;\n    if (item) {\n      item = this.items._getNextSelectable(item);\n      this._selectAndFocusItem(item);\n    }\n  }\n  \n  /**\n   Show the previous Step.\n   \n   @emits {coral-steplist:change}\n   */\n  previous() {\n    let item = this.selectedItem;\n    if (item) {\n      item = this.items._getPreviousSelectable(item);\n      this._selectAndFocusItem(item);\n    }\n  }\n  \n  /**\n   Returns {@link StepList} sizes.\n   \n   @return {StepListSizeEnum}\n   */\n  static get size() { return size; }\n  \n  /**\n   Returns {@link StepList} interaction options.\n   \n   @return {StepListInteractionEnum}\n   */\n  static get interaction() { return interaction; }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['target', 'size', 'interaction']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // Default reflected attributes\n    if (!this._interaction) { this.interaction = interaction.OFF; }\n    if (!this._size) { this.size = size.LARGE; }\n    \n    // A11y\n    this.setAttribute('role', 'tablist');\n    this.setAttribute('aria-multiselectable', 'false');\n  \n    // Don't trigger events once connected\n    this._preventTriggeringEvents = true;\n    this._validateSelection();\n    this._preventTriggeringEvents = false;\n  \n    this._oldSelection = this.selectedItem;\n    \n    const self = this;\n    window.customElements.whenDefined('coral-step').then(() => {\n      self._allChildrenAdded = true;\n      // Force label update\n      self._updateLabels();\n    });\n  }\n  \n  /**\n   Triggered when the {@link StepList} selected {@link Step} has changed.\n   \n   @typedef {CustomEvent} coral-steplist:change\n   \n   @property {Step} detail.selection\n   The newly selected Step.\n   @property {Step} detail.oldSelection\n   The previously selected Step.\n   */\n}\n\nexport default StepList;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"stepMarkerContainer\"] = document.createElement(\"span\");\n  el0.className += \" _coral-Steplist-markerContainer\";\n  el0.setAttribute(\"handle\", \"stepMarkerContainer\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = document.createElement(\"span\");\n  el2.className += \" _coral-Steplist-marker\";\n  el0.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  el0.appendChild(el3);\n  frag.appendChild(el0);\n  var el4 = document.createTextNode(\"\\n\");\n  frag.appendChild(el4);\n  var el5 = this[\"tooltip\"] = document.createElement(\"coral-tooltip\");\n  el5.setAttribute(\"smart\", \"\");\n  el5.setAttribute(\"focusonshow\", \"off\");\n  el5.setAttribute(\"handle\", \"tooltip\");\n  el5.setAttribute(\"placement\", \"top\");\n  el5.setAttribute(\"variant\", \"inspect\");\n  el5.setAttribute(\"interaction\", \"off\");\n  el5.setAttribute(\"lengthoffset\", \"5\");\n  el5.setAttribute(\"breadthoffset\", \"2\");\n  frag.appendChild(el5);\n  var el6 = document.createTextNode(\"\\n\");\n  frag.appendChild(el6);\n  var el7 = this[\"line\"] = document.createElement(\"span\");\n  el7.className += \" _coral-Steplist-segment\";\n  el7.setAttribute(\"handle\", \"line\");\n  frag.appendChild(el7);\n  var el8 = document.createTextNode(\"\\n\");\n  frag.appendChild(el8);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport '../../../coralui-component-tooltip';\nimport step from '../templates/step';\nimport {transform, commons} from '../../../coralui-util';\nimport getTarget from './getTarget';\n\nconst CLASSNAME = '_coral-Steplist-item';\n\n/**\n @class Coral.Step\n @classdesc A Step component\n @htmltag coral-step\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Step extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Fetch or create content zone\n    this._elements = {\n      label: this.querySelector('coral-step-label') || document.createElement('coral-step-label')\n    };\n    step.call(this._elements);\n  }\n  \n  /**\n   The label of the step.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get label() {\n    return this._getContentZone(this._elements.label);\n  }\n  set label(value) {\n    this._setContentZone('label', value, {\n      handle: 'label',\n      tagName: 'coral-step-label',\n      insert: function(label) {\n        this.appendChild(label);\n      }\n    });\n  }\n  \n  /**\n   Whether the item is selected. When <code>true</code>, the item will appear as the active element in the\n   StepList. The item must be a child of a StepList before this property is set to <code>true</code>.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n  \n    this.classList.toggle('is-selected', this.selected);\n    this.setAttribute('aria-selected', this.selected);\n  \n    const stepList = this.parentNode;\n    let realTarget;\n  \n    // in case the Step is selected, we need to communicate it to the panels\n    if (this._selected) {\n      realTarget = getTarget(this.target);\n      // if the target was defined at the Step level, it has precedence over everything\n      if (realTarget) {\n        realTarget.setAttribute('selected', '');\n      }\n      // we use the target defined at the StepList level\n      else if (stepList && stepList.target) {\n        realTarget = getTarget(stepList.target);\n      \n        if (realTarget) {\n          // we get the position of this step inside the steplist\n          const currentIndex = stepList.items.getAll().indexOf(this);\n        \n          // we select the item with the same index\n          const targetItem = (realTarget.items ? realTarget.items.getAll() : realTarget.children)[currentIndex];\n        \n          // we select the item if it exists\n          if (targetItem) {\n            targetItem.setAttribute('selected', '');\n          }\n        }\n      }\n    }\n    \n    this.trigger('coral-step:_selectedchanged');\n  }\n  \n  /**\n   The target element that will be selected when this Step is selected. It accepts a CSS selector or a DOM element.\n   If a CSS Selector is provided, the first matching element will be used.\n   \n   @type {?HTMLElement|String}\n   @default null\n   @htmlattribute target\n   */\n  get target() {\n    return this._target || null;\n  }\n  set target(value) {\n    if (value === null || typeof value === 'string' || value instanceof Node) {\n      this._target = value;\n      const realTarget = getTarget(this._target);\n  \n      // we add proper accessibility if available\n      if (realTarget) {\n        // creates a 2 way binding for accessibility\n        this.setAttribute('aria-controls', realTarget.id);\n        realTarget.setAttribute('aria-labelledby', this.id);\n      }\n    }\n  }\n  \n  _isHybrid() {\n    const label = this.label;\n    const maxWidth = this.label.clientWidth;\n    \n    // Required to be able to measure full width\n    label.style.position = 'relative';\n    label.style.whiteSpace = 'inherit';\n    label.style.display = 'inline';\n  \n    // Mark it for hybrid mode\n    this._labelIsHidden = label.getBoundingClientRect().width > maxWidth;\n    \n    // Restore defaults\n    label.style.position = '';\n    label.style.whiteSpace = '';\n    label.style.display = '';\n  }\n  \n  get _contentZones() { return {'coral-step-label': 'label'}; }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['selected', 'target']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Generate a unique ID for the Step panel if one isn't already present\n    // This will be used for accessibility purposes\n    this.setAttribute('id', this.id || commons.getUID());\n    \n    // A11y\n    this.setAttribute('role', 'tab');\n    \n    const frag = document.createDocumentFragment();\n  \n    // Discard the template created tooltip if one is provided by markup\n    this._elements.tooltip = this.querySelector('coral-tooltip') || this._elements.tooltip;\n  \n    // Cannot be open by default when rendered\n    this._elements.tooltip.removeAttribute('open');\n    \n    // Render main template\n    frag.appendChild(this._elements.stepMarkerContainer);\n    frag.appendChild(this._elements.tooltip);\n    frag.appendChild(this._elements.line);\n    \n    const templateHandleNames = ['stepMarkerContainer', 'tooltip', 'line'];\n  \n    const label = this._elements.label;\n    \n    // Remove it so we can process children\n    if (label.parentNode) {\n      label.remove();\n    }\n    \n    while (this.firstChild) {\n      const child = this.firstChild;\n      \n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && templateHandleNames.indexOf(child.getAttribute('handle')) === -1) {\n        label.appendChild(child);\n      }\n      else {\n        this.removeChild(child);\n      }\n    }\n    \n    this.appendChild(frag);\n  \n    // Link tooltip target\n    this._elements.tooltip.target = this._elements.stepMarkerContainer;\n    \n    // Assign the content zone so the insert function will be called\n    this.label = label;\n    \n    // Measure hybrid potential\n    this._isHybrid();\n  }\n  \n  /** @ignore */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    \n    // In case it was moved out don't forget to remove it\n    if (!this.contains(this._elements.tooltip)) {\n      this._elements.tooltip.remove();\n    }\n  }\n}\n\nexport default Step;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-Steplist-label';\n\n/**\n @class Coral.Step.Label\n @classdesc A Step Label\n @htmltag coral-step-label\n @extends {HTMLElement}\n */\nclass StepLabel extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default StepLabel;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport StepList from './src/scripts/StepList';\nimport Step from './src/scripts/Step';\nimport StepLabel from './src/scripts/StepLabel';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-steplist', StepList);\nwindow.customElements.define('coral-step', Step);\nwindow.customElements.define('coral-step-label', StepLabel);\n\nStep.Label = StepLabel;\n\nexport {StepList, Step};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"input\"] = document.createElement(\"input\");\n  el0.setAttribute(\"type\", \"checkbox\");\n  el0.setAttribute(\"handle\", \"input\");\n  el0.className += \" _coral-ToggleSwitch-input\";\n  el0.id = data_0[\"commons\"][\"getUID\"]();\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  var el2 = this[\"switch\"] = document.createElement(\"span\");\n  el2.setAttribute(\"handle\", \"switch\");\n  el2.className += \" _coral-ToggleSwitch-switch\";\n  frag.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n\");\n  frag.appendChild(el3);\n  var el4 = this[\"labelWrapper\"] = document.createElement(\"label\");\n  el4.className += \" _coral-ToggleSwitch-label\";\n  el4.setAttribute(\"for\", this[\"input\"][\"id\"]);\n  el4.setAttribute(\"handle\", \"labelWrapper\");\n  el4.setAttribute(\"hidden\", \"\");\n  frag.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  frag.appendChild(el5);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport base from '../templates/base';\nimport {transform, commons} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-ToggleSwitch';\n\n/**\n @class Coral.Switch\n @classdesc A Switch component is a toggle form field similar to a Checkbox component.\n @htmltag coral-switch\n @extends {HTMLElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass Switch extends FormFieldMixin(ComponentMixin(HTMLElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Make sure the events from the FormField are attached\n    this._delegateEvents(commons.extend(this._events, {\n      'capture:focus ._coral-ToggleSwitch-input': '_onFocus',\n      'capture:blur ._coral-ToggleSwitch-input': '_onBlur'\n    }));\n    \n    // Prepare templates\n    this._elements = {\n      // Try to find the label content zone\n      label: this.querySelector('coral-switch-label') || document.createElement('coral-switch-label')\n    };\n    base.call(this._elements, {commons});\n  \n    // Pre-define labellable element\n    this._labellableElement = this._elements.input;\n  \n    // Check if the label is empty whenever we get a mutation\n    this._observer = new MutationObserver(this._hideLabelIfEmpty.bind(this));\n  \n    // Watch for changes to the label element's children\n    this._observer.observe(this._elements.labelWrapper, {\n      // Catch changes to childList\n      childList: true,\n      // Catch changes to textContent\n      characterData: true,\n      // Monitor any child node\n      subtree: true\n    });\n  }\n  \n  /**\n   Whether the switch is on or off. Changing the checked value will cause a\n   {@link Coral.mixin.formField#event:change} event to be triggered.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute checked\n   @htmlattributereflected\n   @emits {change}\n   */\n  get checked() {\n    return this._checked || false;\n  }\n  set checked(value) {\n    this._checked = transform.booleanAttr(value);\n    this._reflectAttribute('checked', this._checked);\n    \n    this._elements.input.checked = this._checked;\n  }\n  \n  /**\n   The switch's label element.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get label() {\n    return this._getContentZone(this._elements.label);\n  }\n  set label(value) {\n    this._setContentZone('label', value, {\n      handle: 'label',\n      tagName: 'coral-switch-label',\n      insert: function(label) {\n        this._elements.labelWrapper.appendChild(label);\n      }\n    });\n  }\n  \n  /**\n   Name used to submit the data in a form.\n   @type {String}\n   @default \"\"\n   @htmlattribute name\n   @htmlattributereflected\n   */\n  get name() {\n    return this._elements.input.name;\n  }\n  set name(value) {\n    this._reflectAttribute('name', value);\n    \n    this._elements.input.name = value;\n  }\n  \n  /**\n   The value that will be submitted when the checkbox is checked. Changing this value will not trigger an event.\n   \n   @type {String}\n   @default \"on\"\n   @htmlattribute value\n   */\n  get value() {\n    return this._elements.input.value || 'on';\n  }\n  set value(value) {\n    this._elements.input.value = value;\n  }\n  \n  /**\n   Whether this field is disabled or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n    \n    this.setAttribute('aria-disabled', this._disabled);\n    this.classList.toggle('is-disabled', this._disabled);\n    this._elements.input.disabled = this._disabled;\n  }\n  \n  /**\n   Whether this field is required or not.\n   @type {Boolean}\n   @default false\n   @htmlattribute required\n   @htmlattributereflected\n   */\n  get required() {\n    return this._required || false;\n  }\n  set required(value) {\n    this._required = transform.booleanAttr(value);\n    this._reflectAttribute('required', this._required);\n    \n    this.setAttribute('aria-required', this._required);\n    this._elements.input.required = this._required;\n  }\n  \n  /**\n   Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.\n   @type {Boolean}\n   @default false\n   @htmlattribute readonly\n   @htmlattributereflected\n   */\n  get readOnly() {\n    return this._readOnly || false;\n  }\n  set readOnly(value) {\n    this._readOnly = transform.booleanAttr(value);\n    this._reflectAttribute('readonly', this._readOnly);\n    \n    this.setAttribute('aria-readonly', this._readOnly);\n  }\n  \n  /*\n   Indicates to the formField that the 'checked' property needs to be set in this component.\n   \n   @protected\n   */\n  get _componentTargetProperty() { return 'checked'; }\n  \n  /*\n   Indicates to the formField that the 'checked' property has to be extracted from the event.\n   \n   @protected\n   */\n  get _eventTargetProperty() { return 'checked'; }\n  \n  /**\n   Hide the label if it's empty.\n   \n   @ignore\n   */\n  _hideLabelIfEmpty() {\n    const label = this.label;\n    // If it's empty and has no non-textnode children, hide the label\n    const hiddenValue = label.children.length === 0 && label.textContent.replace(/\\s*/g, '') === '';\n    // Only bother if the hidden status has changed\n    if (hiddenValue !== this._elements.labelWrapper.hidden) {\n      this._elements.labelWrapper.hidden = hiddenValue;\n    }\n  }\n  \n  _onFocus() {\n    this._elements.input.classList.add('focus-ring');\n  }\n  \n  _onBlur() {\n    this._elements.input.classList.remove('focus-ring');\n  }\n  \n  get _contentZones() { return {'coral-switch-label': 'label'}; }\n  \n  /**\n   Inherited from {@link FormFieldMixin#clear}.\n   */\n  clear() {\n    this.checked = false;\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#reset}.\n   */\n  reset() {\n    this.checked = this._initialCheckedState;\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat(['checked']);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Create a fragment\n    const frag = document.createDocumentFragment();\n  \n    const templateHandleNames = ['input', 'switch', 'labelWrapper'];\n  \n    // Render the template\n    frag.appendChild(this._elements.input);\n    frag.appendChild(this._elements.switch);\n    frag.appendChild(this._elements.labelWrapper);\n  \n    const label = this._elements.label;\n  \n    // Remove it so we can process children\n    if (label && label.parentNode) {\n      label.parentNode.removeChild(label);\n    }\n  \n    // Hide the labelWrapper by default (will be shown, via contentZone observer)\n    this._elements.labelWrapper.hidden = true;\n  \n    // Clean up\n    while (this.firstChild) {\n      const child = this.firstChild;\n      // Only works if all root template elements have a handle attribute\n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && templateHandleNames.indexOf(child.getAttribute('handle')) === -1) {\n        // Add non-template elements to the content\n        label.appendChild(child);\n      }\n      else {\n        // Remove anything else\n        this.removeChild(child);\n      }\n    }\n  \n    // Append the fragment to the component\n    this.appendChild(frag);\n  \n    // Assign the content zones, moving them into place in the process\n    this.label = label;\n  \n    // Cache the initial checked state of the switch (in order to implement reset)\n    this._initialCheckedState = this.checked;\n  \n    // Check if we need to hide the label\n    // We must do this because IE does not catch mutations when nodes are not in the DOM\n    this._hideLabelIfEmpty();\n  }\n}\n\nexport default Switch;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Switch.Label\n @classdesc The Switch label\n @htmltag coral-switch-label\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-switch-label');\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Switch from './src/scripts/Switch';\nimport SwitchLabel from './src/scripts/SwitchLabel';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-switch', Switch);\n\nSwitch.Label = SwitchLabel;\n\nexport {Switch};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/** @ignore */\nconst getIndexOf = (el) => {\n  const parent = el.parentNode;\n  if (!parent) {\n    return -1;\n  }\n  \n  return Array.prototype.indexOf.call(parent.children, el);\n};\n\n/** @ignore */\nconst getSiblingsOf = (el, selector, type) => {\n  const stack = [];\n  \n  // Returns siblings of el\n  if (!type) {\n    ['previousElementSibling', 'nextElementSibling'].forEach((direction) => {\n      let sibling = el;\n      while (sibling[direction]) {\n        sibling = sibling[direction];\n        if (sibling.matches(selector)) {\n          stack.push(sibling);\n        }\n      }\n    });\n  }\n  else {\n    const direction = type.indexOf('next') === 0 ? 'nextElementSibling' : 'previousElementSibling';\n    \n    // All following siblings of el up to but not including the element matched by the selector\n    if (type.indexOf('Until') !== -1) {\n      const matches = function() {\n        if (typeof selector === 'string') {\n          return el[direction].matches(selector);\n        }\n        \n        return el[direction] === selector;\n      };\n      \n      while (el[direction] && !matches()) {\n        stack.push(el = el[direction]);\n      }\n    }\n    // All following siblings of el filtered by a selector.\n    else if (type.indexOf('All') !== -1) {\n      while (el[direction]) {\n        el = el[direction];\n        if (el.matches(selector)) {\n          stack.push(el);\n        }\n      }\n    }\n    // Returns the sibling only if it matches that selector.\n    else {\n      const sibling = el[direction];\n      return sibling && sibling.matches(selector) ? sibling : null;\n    }\n  }\n  \n  return stack;\n};\n\n/** @ignore */\nconst listToArray = (list) => {\n  const res = [];\n  for (let i = 0, listCount = res.length = list.length; i < listCount; i++) {\n    res[i] = list[i];\n  }\n  return res;\n};\n\n/** @ignore */\nconst getColumns = (colgroup) => listToArray(colgroup.querySelectorAll('col[is=\"coral-table-column\"]'));\n\n/** @ignore */\nconst getRows = (sections) => {\n  let rows = [];\n  \n  sections.forEach((section) => {\n    if (section) {\n      rows = rows.concat(listToArray(section.querySelectorAll('tr[is=\"coral-table-row\"]')));\n    }\n  });\n  \n  return rows;\n};\n\n/** @ignore */\nconst getCells = (row) => listToArray(row.querySelectorAll('td[is=\"coral-table-cell\"], th[is=\"coral-table-headercell\"]'));\n\n/** @ignore */\nconst getContentCells = (row) => listToArray(row.querySelectorAll('td[is=\"coral-table-cell\"]'));\n\n/** @ignore */\nconst getHeaderCells = (row) => listToArray(row.querySelectorAll('th[is=\"coral-table-headercell\"]'));\n\n/** @ignore */\nconst getCellByIndex = (row, index) => getCells(row).filter(cell => getIndexOf(cell) === index)[0] || null;\n\n/**\n Enumeration for {@link TableHead}, {@link TableBody} and {@link TableFoot} divider values.\n \n @typedef {Object} TableSectionDividerEnum\n \n @property {String} NONE\n No divider.\n @property {String} ROW\n Row divider.\n @property {String} COLUMN\n Column divider.\n @property {String} CELL\n Row and Column divider.\n */\nconst divider = {\n  NONE: 'none',\n  ROW: 'row',\n  COLUMN: 'column',\n  CELL: 'cell'\n};\n\n/**\n Enumeration for {@link TableColumn} alignment options.\n \n @typedef {Object} TableColumnAlignmentEnum\n \n @property {String} LEFT\n Left alignment.\n @property {String} CENTER\n Center alignment.\n @property {String} RIGHT\n Right alignment.\n */\nconst alignment = {\n  LEFT: 'left',\n  CENTER: 'center',\n  RIGHT: 'right'\n};\n\nexport {\n  divider,\n  alignment,\n  getColumns,\n  getCells,\n  getContentCells,\n  getHeaderCells,\n  getCellByIndex,\n  getIndexOf,\n  getSiblingsOf,\n  getRows\n};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {alignment} from './TableUtil';\nimport {transform, validate} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Table-column';\n\n/**\n Enumeration for {@link TableColumn} sortable direction options.\n \n @typedef {Object} TableColumnSortableDirectionEnum\n \n @property {String} DEFAULT\n Default. No sorting applied.\n @property {String} ASCENDING\n Ascending sort.\n @property {String} DESCENDING\n Descending sort.\n */\nconst sortableDirection = {\n  DEFAULT: 'default',\n  ASCENDING: 'ascending',\n  DESCENDING: 'descending'\n};\n\n/**\n Enumeration for {@link TableColumn} sortable type options.\n \n @typedef {Object} TableColumnSortableTypeEnum\n \n @property {String} ALPHANUMERIC\n Alphanumeric type. If sorting is based on {@link TableCell#value}, use {String}.\n @property {String} NUMBER\n Number type. If sorting is based on {@link TableCell#value}, use {Number}.\n @property {String} DATE\n Date type. If sorting is based on {@link TableCell#value}, use {Date} in milliseconds.\n @property {String} CUSTOM\n Custom type. Sorting is based on user defined sorting.\n */\nconst sortableType = {\n  ALPHANUMERIC: 'alphanumeric',\n  NUMBER: 'number',\n  DATE: 'date',\n  CUSTOM: 'custom'\n};\n\n/**\n @class Coral.Table.Column\n @classdesc A Table column component\n @htmltag coral-table-column\n @htmlbasetag col\n @extends {HTMLTableColElement}\n @extends {ComponentMixin}\n */\nclass TableColumn extends ComponentMixin(HTMLTableColElement) {\n  /**\n   The column cells alignment. The alignment should take the {@link i18n} configuration into account.\n   \n   @type {String}\n   @default TableColumnAlignmentEnum.LEFT\n   @htmlattribute alignment\n   @htmlattributereflected\n   */\n  get alignment() {\n    return this._alignment || alignment.LEFT;\n  }\n  set alignment(value) {\n    const oldValue = this._alignment;\n    \n    value = transform.string(value).toLowerCase();\n    this._alignment = validate.enumeration(alignment)(value) && value || alignment.LEFT;\n    this._reflectAttribute('alignment', this._alignment);\n  \n    // Don't trigger on initialization if alignment is LEFT to improve performance\n    if (!(typeof oldValue === 'undefined' && this._alignment === alignment.LEFT)) {\n      this.trigger('coral-table-column:_alignmentchanged');\n    }\n  }\n  \n  /**\n   Whether the column has a fixed width.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute fixedwidth\n   @htmlattributereflected\n   */\n  get fixedWidth() {\n    return this._fixedWidth || false;\n  }\n  set fixedWidth(value) {\n    this._fixedWidth = transform.booleanAttr(value);\n    this._reflectAttribute('fixedwidth', this._fixedWidth);\n    \n    this.trigger('coral-table-column:_fixedwidthchanged');\n  }\n  \n  /**\n   Whether the column is hidden.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute hidden\n   @htmlattributereflected\n   */\n  get hidden() {\n    return this._hidden || false;\n  }\n  set hidden(value) {\n    this._hidden = transform.booleanAttr(value);\n    this._reflectAttribute('hidden', this._hidden);\n    \n    this.trigger('coral-table-column:_hiddenchanged');\n  }\n  \n  /**\n   Whether the table column is orderable.\n   Note that this does not affect the underlying data, only presentation.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute orderable\n   @htmlattributereflected\n   */\n  get orderable() {\n    return this._orderable || false;\n  }\n  set orderable(value) {\n    this._orderable = transform.booleanAttr(value);\n    this._reflectAttribute('orderable', this._orderable);\n    \n    const self = this;\n    window.requestAnimationFrame(() => {\n      self.trigger('coral-table-column:_orderablechanged');\n    });\n  }\n  \n  /**\n   Whether the column is sortable by user interaction.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute sortable\n   @htmlattributereflected\n   */\n  get sortable() {\n    return this._sortable || false;\n  }\n  set sortable(value) {\n    this._sortable = transform.booleanAttr(value);\n    this._reflectAttribute('sortable', this._sortable);\n    \n    const self = this;\n    window.requestAnimationFrame(() => {\n      self.trigger('coral-table-column:_sortablechanged');\n    });\n  }\n  \n  /**\n   The sorting type. See {@link TableColumnSortableTypeEnum}. If setting to <code>custom</code>, columns won't sort\n   based on the default table sorting.\n   Instead, a custom sorting can be performed when triggered by user interaction. This can be defined by listening to\n   the {@link coral-table:beforecolumnsort} event.\n   \n   @type {String}\n   @default TableColumnSortableTypeEnum.ALPHANUMERIC\n   @htmlattribute sortabletype\n   @htmlattributereflected\n   */\n  get sortableType() {\n    return this._sortableType || sortableType.ALPHANUMERIC;\n  }\n  set sortableType(value) {\n    value = transform.string(value).toLowerCase();\n    this._sortableType = validate.enumeration(sortableType)(value) && value || sortableType.ALPHANUMERIC;\n    this._reflectAttribute('sortabletype', this._sortableType);\n  }\n  \n  /**\n   The sorting direction. Sorts the column cells based on {@link TableCell#value}.\n   If not present, the sort is based on the cell text content. See {@link TableColumnSortableDirectionEnum}.\n   \n   @type {String}\n   @default TableColumnSortableDirectionEnum.DEFAULT\n   @htmlattribute sortabledirection\n   @htmlattributereflected\n   */\n  get sortableDirection() {\n    return this._sortableDirection || sortableDirection.DEFAULT;\n  }\n  set sortableDirection(value) {\n    value = transform.string(value).toLowerCase();\n    this._sortableDirection = validate.enumeration(sortableDirection)(value) && value || sortableDirection.DEFAULT;\n    this._reflectAttribute('sortabledirection', this._sortableDirection);\n    \n    // Prevent sorting if unnecessary\n    if (!this._preventSort) {\n      this._doSort();\n      \n      this.trigger('coral-table-column:_sortabledirectionchanged');\n    }\n  }\n  \n  /** @private */\n  _sort() {\n    let newSortableDirection;\n    if (this.sortableDirection === sortableDirection.DEFAULT) {\n      newSortableDirection = sortableDirection.ASCENDING;\n    }\n    else if (this.sortableDirection === sortableDirection.ASCENDING) {\n      newSortableDirection = sortableDirection.DESCENDING;\n    }\n    else if (this.sortableDirection === sortableDirection.DESCENDING) {\n      newSortableDirection = sortableDirection.DEFAULT;\n    }\n    \n    this.trigger('coral-table-column:_beforecolumnsort', {newSortableDirection});\n  }\n  \n  /** @private */\n  _doSort(onInitialization) {\n    this.trigger('coral-table-column:_sort', {onInitialization, sortableDirection, sortableType});\n  }\n  \n  /**\n   Returns {@link TableColumn} sortable direction options.\n   \n   @return {TableColumnSortableDirectionEnum}\n   */\n  static get sortableDirection() { return sortableDirection; }\n  \n  /**\n   Returns {@link TableColumn} sortable type options.\n   \n   @return {TableColumnSortableTypeEnum}\n   */\n  static get sortableType() { return sortableType; }\n  \n  /**\n   Returns {@link TableColumn} alignment options.\n   \n   @return {TableColumnAlignmentEnum}\n   */\n  static get alignment() { return alignment; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return [\n      'fixedwidth',\n      'fixedWidth',\n      'hidden',\n      'alignment',\n      'orderable',\n      'sortable',\n      'sortabletype',\n      'sortableType',\n      'sortabledirection',\n      'sortableDirection'\n    ];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // Default reflected attributes\n    if (!this._sortableType) { this.sortableType = sortableType.ALPHANUMERIC; }\n    if (!this._sortableDirection) { this.sortableDirection = sortableDirection.DEFAULT; }\n    if (!this._alignment) { this.alignment = alignment.LEFT; }\n  }\n  \n  /**\n   Triggered when {@link TableColumn#alignment} changed.\n   \n   @typedef {CustomEvent} coral-table-column:_alignmentchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TableColumn#fixedWidth} changed.\n   \n   @typedef {CustomEvent} coral-table-column:_fixedwidthchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TableColumn#orderable} changed.\n \n   @typedef {CustomEvent} coral-table-column:_orderablechanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TableColumn#sortable} changed.\n \n   @typedef {CustomEvent} coral-table-column:_sortablechanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TableColumn#sortableDirection} changed.\n \n   @typedef {CustomEvent} coral-table-column:_sortabledirectionchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TableColumn#hidden} changed.\n \n   @typedef {CustomEvent} coral-table-column:_hiddenchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered before {@link TableColumn#sortableDirection} changed.\n \n   @typedef {CustomEvent} coral-table-column:_beforecolumnsort\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TableColumn#sortableDirection} changed.\n \n   @typedef {CustomEvent} coral-table-column:_sort\n   \n   @private\n   */\n}\n\nexport default TableColumn;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {transform} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Table-cell';\n\n/**\n @class Coral.Table.Cell\n @classdesc A Table cell component\n @htmltag coral-table-cell\n @htmlbasetag td\n @extends {HTMLTableCellElement}\n @extends {ComponentMixin}\n */\nclass TableCell extends ComponentMixin(HTMLTableCellElement) {\n  /**\n   The cell's content.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this;\n  }\n  set content(value) {\n    // Support configs\n    if (typeof value === 'object') {\n      for (const prop in value) {\n        /** @ignore */\n        this[prop] = value[prop];\n      }\n    }\n  }\n  \n  /**\n   Whether the table cell is selected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this.trigger('coral-table-cell:_beforeselectedchanged');\n    \n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n    \n    this.trigger('coral-table-cell:_selectedchanged');\n  \n    this._syncAriaSelectedState();\n    this._syncSelectHandle();\n  }\n  \n  /**\n   The cell's value. It is used to compare cells during a column sort. If not set, the sorting will be performed on the\n   cell content. The content will be parse accordingly based on the column's <code>sortabletype</code> property.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute value\n   @htmlattributereflected\n   */\n  get value() {\n    return this.getAttribute('value') || '';\n  }\n  set value(value) {\n    this.setAttribute('value', transform.string(value));\n  }\n  \n  /** @private */\n  _setHandle(handle) {\n    // Specify handle directly on the cell if none found\n    if (!this.querySelector(`[${handle}]`)) {\n      this.setAttribute(handle, '');\n    }\n  }\n  \n  /** @private */\n  _toggleSelectable(selectable) {\n    if (selectable) {\n      this._setHandle('coral-table-cellselect');\n    }\n    else {\n      // Clear selection\n      this.selected = false;\n    }\n  }\n  \n  /** @private */\n  _syncAriaSelectedState() {\n    this.classList.toggle('is-selected', this.selected);\n    this.setAttribute('aria-selected', this.selected);\n  }\n  \n  /** @private */\n  _syncSelectHandle() {\n    // Check/uncheck the select handle\n    const selectHandle = this.querySelector('[coral-table-cellselect]');\n    if (selectHandle) {\n      if (typeof selectHandle.indeterminate !== 'undefined') {\n        selectHandle.indeterminate = false;\n      }\n      \n      if (typeof selectHandle.checked !== 'undefined') {\n        selectHandle.checked = this.selected;\n      }\n    }\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['selected', '_selectable'];\n  }\n  \n  /** @ignore */\n  attributeChangedCallback(name, oldValue, value) {\n    if (name === '_selectable') {\n      this._toggleSelectable(value !== null);\n    }\n    else {\n      super.attributeChangedCallback(name, oldValue, value);\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n\n    this.classList.add(CLASSNAME);\n\n    // a11y\n    this.setAttribute('role', 'gridcell');\n  }\n  \n  /**\n   Triggered before {@link TableCell#selected} is changed.\n   \n   @typedef {CustomEvent} coral-table-cell:_beforeselectedchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TableCell#selected} changed.\n   \n   @typedef {CustomEvent} coral-table-cell:_selectedchanged\n   \n   @private\n   */\n}\n\nexport default TableCell;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\n\nconst CLASSNAME = '_coral-Table-headerCell';\n\n/**\n @class Coral.Table.HeaderCell\n @classdesc A Table header cell component\n @htmltag coral-table-headercell\n @htmlbasetag th\n @extends {HTMLTableCellElement}\n @extends {ComponentMixin}\n */\nclass TableHeaderCell extends ComponentMixin(HTMLTableCellElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Templates\n    this._elements = {\n      content: this.querySelector('coral-table-headercell-content') || document.createElement('coral-table-headercell-content')\n    };\n  \n    // Watch for content changes in sticky header cell\n    this._stickyCellObserver = new MutationObserver(this._handleMutations.bind(this));\n    this._stickyCellObserver.observe(this._elements.content, {\n      childList: true,\n      subtree: true\n    });\n  }\n  \n  /**\n   The header cell's content.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-table-headercell-content',\n      insert: function(content) {\n        this.appendChild(content);\n      }\n    });\n  }\n  \n  /** @private */\n  _handleMutations() {\n    this.trigger('coral-table-headercell:_contentchanged');\n  }\n  \n  get _contentZones() { return {'coral-table-headercell-content': 'content'}; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // Fetch or create the content zone element\n    const content = this._elements.content;\n    \n    if (!content.parentNode) {\n      // Move component children into the content\n      while (this.firstChild) {\n        content.appendChild(this.firstChild);\n      }\n    }\n    \n    // Assign the content zone so the insert function will be called\n    this.content = content;\n  }\n  \n  /**\n   Triggered when the {@link TableHeaderCell} content changed.\n \n   @typedef {CustomEvent} coral-table-headercell:_contentchanged\n   \n   @private\n   */\n}\n\nexport default TableHeaderCell;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport {transform} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Table-row';\n\n/**\n @class Coral.Table.Row\n @classdesc A Table row component\n @htmltag coral-table-row\n @htmlbasetag tr\n @extends {HTMLTableRowElement}\n @extends {ComponentMixin}\n */\nclass TableRow extends ComponentMixin(HTMLTableRowElement) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Required for coral-table-row:change event\n    this._oldSelection = [];\n    \n    // Events\n    this._delegateEvents({\n      // Private\n      'coral-table-cell:_beforeselectedchanged': '_onBeforeCellSelectionChanged',\n      'coral-table-cell:_selectedchanged': '_onCellSelectionChanged'\n    });\n  \n    // Initialize content MO\n    this._observer = new MutationObserver(this._handleMutations.bind(this));\n    this._observer.observe(this, {\n      childList: true\n    });\n  }\n  \n  /**\n   Whether the table row is locked.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute locked\n   @htmlattributereflected\n   */\n  get locked() {\n    return this._locked || false;\n  }\n  set locked(value) {\n    this._locked = transform.booleanAttr(value);\n    this._reflectAttribute('locked', this._locked);\n    \n    this.trigger('coral-table-row:_lockedchanged');\n  }\n  \n  /**\n   Whether the table row is selected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this.trigger('coral-table-row:_beforeselectedchanged');\n    \n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n  \n    this.trigger('coral-table-row:_selectedchanged');\n    \n    this._syncAriaSelectedState();\n    this._syncSelectHandle();\n  }\n  \n  /**\n   Whether the items are selectable.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selectable\n   @htmlattributereflected\n   */\n  get selectable() {\n    return this._selectable || false;\n  }\n  set selectable(value) {\n    this._selectable = transform.booleanAttr(value);\n    this._reflectAttribute('selectable', this._selectable);\n    \n    this.items.getAll().forEach((cell) => {\n      cell[this._selectable ? 'setAttribute' : 'removeAttribute']('_selectable', '');\n    }, this);\n  }\n  \n  /**\n   Whether multiple items can be selected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute multiple\n   @htmlattributereflected\n   */\n  get multiple() {\n    return this._multiple || false;\n  }\n  set multiple(value) {\n    this._multiple = transform.booleanAttr(value);\n    this._reflectAttribute('multiple', this._multiple);\n    \n    this.trigger('coral-table-row:_multiplechanged');\n  }\n  \n  /**\n   Returns an Array containing the selected items.\n   \n   @type {Array.<HTMLElement>}\n   @readonly\n   */\n  get selectedItems() {\n    return this.items._getAllSelected();\n  }\n  \n  /**\n   Returns the first selected item of the row. The value <code>null</code> is returned if no element is\n   selected.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getFirstSelected();\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemBaseTagName: 'td',\n        itemTagName: 'coral-table-cell'\n      });\n    }\n  \n    return this._items;\n  }\n  \n  _triggerChangeEvent() {\n    const selectedItems = this.selectedItems;\n    this.trigger('coral-table-row:_change', {\n      oldSelection: this._oldSelection,\n      selection: selectedItems\n    });\n    this._oldSelection = selectedItems;\n  }\n  \n  /** @private */\n  _onCellSelectionChanged(event) {\n    event.stopImmediatePropagation();\n    \n    this._triggerChangeEvent();\n  }\n  \n  /** @private */\n  _onBeforeCellSelectionChanged(event) {\n    event.stopImmediatePropagation();\n    \n    // In single selection, if the added item is selected, the rest should be deselected\n    const selectedItem = this.selectedItem;\n    if (!this.multiple && selectedItem && !event.target.selected) {\n      selectedItem.set('selected', false, true);\n    }\n  }\n  \n  /** @private */\n  _syncAriaSelectedState() {\n    this.classList.toggle('is-selected', this.selected);\n    this.setAttribute('aria-selected', this.selected);\n  }\n  \n  /** @private */\n  _syncSelectHandle() {\n    // Check/uncheck the select handle\n    const selectHandle = this.querySelector('[coral-table-rowselect]');\n    if (selectHandle) {\n      if (typeof selectHandle.indeterminate !== 'undefined') {\n        selectHandle.indeterminate = false;\n      }\n      \n      if (typeof selectHandle.checked !== 'undefined') {\n        selectHandle.checked = this.selected;\n      }\n    }\n  }\n  \n  /** @private */\n  _toggleSelectable(selectable) {\n    if (selectable) {\n      this._setHandle('coral-table-rowselect');\n    }\n    else {\n      // Clear selection but leave the handle if any\n      this.set('selected', false, true);\n    }\n  }\n  \n  /** @private */\n  _toggleOrderable(orderable) {\n    if (orderable) {\n      this._setHandle('coral-table-roworder');\n    }\n    // Remove DragAction instance\n    else if (this.dragAction) {\n      this.dragAction.destroy();\n    }\n  }\n  \n  /** @private */\n  _toggleLockable(lockable) {\n    if (lockable) {\n      this._setHandle('coral-table-rowlock');\n    }\n  }\n  \n  /** @private */\n  _setHandle(handle) {\n    // Specify handle directly on the row if none found\n    if (!this.querySelector(`[${handle}]`)) {\n      this.setAttribute(handle, '');\n    }\n  }\n  \n  /** @private */\n  _handleMutations(mutations) {\n    mutations.forEach((mutation) => {\n      // Sync added nodes\n      this.trigger('coral-table-row:_contentchanged', {\n        addedNodes: mutation.addedNodes,\n        removedNodes: mutation.removedNodes\n      });\n    }, this);\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['locked', 'selected', 'multiple', 'selectable', '_selectable', '_orderable', '_lockable'];\n  }\n  \n  /** @ignore */\n  attributeChangedCallback(name, oldValue, value) {\n    if (name === '_selectable') {\n      this._toggleSelectable(value !== null);\n    }\n    else if (name === '_orderable') {\n      this._toggleOrderable(value !== null);\n    }\n    else if (name === '_lockable') {\n      this._toggleLockable(value !== null);\n    }\n    else {\n      super.attributeChangedCallback(name, oldValue, value);\n    }\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // a11y\n    this.setAttribute('role', 'row');\n  }\n  \n  /**\n   Triggered before {@link TableRow#selected} is changed.\n \n   @typedef {CustomEvent} coral-table-row:_beforeselectedchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TableRow#selected} changed.\n \n   @typedef {CustomEvent} coral-table-row:_selectedchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TableRow#locked} changed.\n \n   @typedef {CustomEvent} coral-table-row:_lockedchanged\n   \n   @private\n   */\n  \n  \n  /**\n   Triggered when {@link TableRow#multiple} changed.\n   \n   @typedef {CustomEvent} coral-table-row:_multiplechanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when the {@link TableRow} selection changed.\n \n   @typedef {CustomEvent} coral-table-row:_change\n   \n   @property {Array.<TableCell>} detail.oldSelection\n   The old item selection. When {@link TableRow#multiple}, it includes an Array.\n   @property {Array.<TableCell>} event.detail.selection\n   The item selection. When {@link TableRow#multiple}, it includes an Array.\n   \n   @private\n   */\n}\n\nexport default TableRow;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {divider} from './TableUtil';\nimport {transform, validate} from '../../../coralui-util';\n\n// Builds a string containing all possible divider classnames. This will be used to remove classnames when the\n// divider changes\nconst ALL_DIVIDER_CLASSES = [];\nfor (const dividerValue in divider) {\n  ALL_DIVIDER_CLASSES.push(`_coral-Table-divider--${divider[dividerValue]}`);\n}\n\n/**\n @mixin TableSectionMixin\n @classdesc The base element for table sections\n */\nconst TableSectionMixin = (superClass) => class extends superClass {\n  /**\n   The table section divider. See {@link TableSectionDividerEnum}.\n   \n   @type {String}\n   @default TableSectionDividerEnum.ROW\n   @htmlattributereflected\n   @htmlattribute divider\n   */\n  get divider() {\n    return this._divider || divider.ROW;\n  }\n  set divider(value) {\n    value = transform.string(value).toLowerCase();\n    this._divider = validate.enumeration(divider)(value) && value || divider.ROW;\n    this._reflectAttribute('divider', this._divider);\n  \n    this.classList.remove(...ALL_DIVIDER_CLASSES);\n    this.classList.add(`_coral-Table-divider--${this.divider}`);\n  }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['divider']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n  \n    // a11y\n    this.setAttribute('role', 'rowgroup');\n    \n    // Default reflected attributes\n    if (!this._divider) { this.divider = divider.ROW; }\n  }\n};\n\nexport default TableSectionMixin;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport TableSectionMixin from './TableSectionMixin';\nimport {transform} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Table-head';\n\n/**\n @class Coral.Table.Head\n @classdesc A Table head component\n @htmltag coral-table-head\n @htmlbasetag thead\n @extends {HTMLTableSectionElement}\n @extends {ComponentMixin}\n @extends {TableSectionMixin}\n */\nclass TableHead extends TableSectionMixin(ComponentMixin(HTMLTableSectionElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Initialize content MO\n    this._observer = new MutationObserver(this._handleMutations.bind(this));\n    this._observer.observe(this, {\n      childList: true,\n      subtree: true\n    });\n  }\n  \n  /**\n   Whether the table head is sticky. The table content becomes automatically scrollable if the table wrapper height\n   is smaller than its content.\n   Table exposes the <code>coral-table-scroll</code> attribute that allows in sticky mode to define the table\n   scrolling container max-height. This is particularly useful if the table contains dynamic content.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute sticky\n   @htmlattributereflected\n   */\n  get sticky() {\n    return this._sticky || false;\n  }\n  set sticky(value) {\n    this._sticky = transform.booleanAttr(value);\n    this._reflectAttribute('sticky', this._sticky);\n    \n    const self = this;\n    // Delay execution for better performance\n    window.requestAnimationFrame(() => {\n      self.trigger('coral-table-head:_stickychanged');\n    });\n  }\n  \n  /** @private */\n  _handleMutations(mutations) {\n    mutations.forEach((mutation) => {\n      this.trigger('coral-table-head:_contentchanged', {\n        addedNodes: mutation.addedNodes,\n        removedNodes: mutation.removedNodes\n      });\n    }, this);\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super.observedAttributes.concat(['sticky']);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  }\n  \n  /**\n   Triggered when the {@link TableHead} content changed.\n \n   @typedef {CustomEvent} coral-table-head:_contentchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TableHead#sticky} changed.\n \n   @typedef {CustomEvent} coral-table-head:_stickychanged\n   \n   @private\n   */\n}\n\nexport default TableHead;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport TableSectionMixin from './TableSectionMixin';\nimport {getRows} from './TableUtil';\n\nconst CLASSNAME = '_coral-Table-body';\n\n/**\n @class Coral.Table.Body\n @classdesc A Table body component\n @htmltag coral-table-body\n @htmlbasetag tbody\n @extends {HTMLTableSectionElement}\n @extends {ComponentMixin}\n @extends {TableSectionMixin}\n */\nclass TableBody extends TableSectionMixin(ComponentMixin(HTMLTableSectionElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    // Init content MO\n    this._observer = new MutationObserver(this._handleMutations.bind(this));\n  \n    this._observer.observe(this, {\n      childList: true,\n      subtree: true\n    });\n  }\n  \n  /** @private */\n  _handleMutations(mutations) {\n    mutations.forEach((mutation) => {\n      this.trigger('coral-table-body:_contentchanged', {\n        addedNodes: mutation.addedNodes,\n        removedNodes: mutation.removedNodes\n      });\n    }, this);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    if (getRows([this]).length === 0) {\n      this.trigger('coral-table-body:_empty');\n    }\n  }\n  \n  /**\n   Triggered when the {@link TableBody} content changed.\n   \n   @typedef {CustomEvent} coral-table-body:_contentchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when the {@link TableBody} is initialized without rows.\n   \n   @typedef {CustomEvent} coral-table-body:_empty\n   \n   @private\n   */\n}\n\nexport default TableBody;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport TableSectionMixin from './TableSectionMixin';\n\nconst CLASSNAME = '_coral-Table-foot';\n\n/**\n @class Coral.Table.Foot\n @classdesc A Table foot component\n @htmltag coral-table-foot\n @htmlbasetag tfoot\n @extends {HTMLTableSectionElement}\n @extends {ComponentMixin}\n @extends {TableSectionMixin}\n */\nclass TableFoot extends TableSectionMixin(ComponentMixin(HTMLTableSectionElement)) {\n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default TableFoot;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"container\"] = document.createElement(\"div\");\n  el0.setAttribute(\"handle\", \"container\");\n  el0.className += \" _coral-Table-wrapper-container\";\n  el0.setAttribute(\"role\", \"presentation\");\n  el0.setAttribute(\"coral-table-scroll\", \"\");\n  var el1 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el1);\n  var el2 = this[\"hiddenStyle\"] = document.createElement(\"style\");\n  el2.setAttribute(\"handle\", \"hiddenStyle\");\n  el0.appendChild(el2);\n  var el3 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el3);\n  var el4 = this[\"alignmentStyle\"] = document.createElement(\"style\");\n  el4.setAttribute(\"handle\", \"alignmentStyle\");\n  el0.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n  \");\n  el0.appendChild(el5);\n  var el6 = this[\"table\"] = document.createElement(\"table\");\n  el6.setAttribute(\"handle\", \"table\");\n  el6.className += \" _coral-Table\";\n  el6.setAttribute(\"role\", \"grid\");\n  el0.appendChild(el6);\n  var el7 = document.createTextNode(\"\\n\");\n  el0.appendChild(el7);\n  frag.appendChild(el0);\n  var el8 = document.createTextNode(\"\\n\");\n  frag.appendChild(el8);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {DragAction} from '../../../coralui-dragaction';\nimport TableColumn from './TableColumn';\nimport TableCell from './TableCell';\nimport TableHeaderCell from './TableHeaderCell';\nimport TableRow from './TableRow';\nimport TableHead from './TableHead';\nimport TableBody from './TableBody';\nimport TableFoot from './TableFoot';\nimport '../../../coralui-component-button';\nimport {Checkbox} from '../../../coralui-component-checkbox';\nimport base from '../templates/base';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport {getCellByIndex, getColumns, getCells, getContentCells, getHeaderCells, getRows, getSiblingsOf, getIndexOf, divider} from './TableUtil';\nimport {transform, validate, commons, Keys} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Table-wrapper';\n\n/**\n Enumeration for {@link Table} variants\n \n @typedef {Object} TableVariantEnum\n \n @property {String} DEFAULT\n A default table.\n @property {String} QUIET\n A quiet table with transparent borders and background.\n @property {String} LIST\n Not supported. Falls back to DEFAULT.\n */\nconst variant = {\n  DEFAULT: 'default',\n  QUIET: 'quiet',\n  LIST: 'list'\n};\n\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantValue in variant) {\n  ALL_VARIANT_CLASSES.push(`${CLASSNAME}--${variant[variantValue]}`);\n}\n\nconst IS_HIDDEN = 'is-hidden';\nconst IS_DISABLED = 'is-disabled';\nconst IS_SORTED = 'is-sorted';\nconst IS_UNSELECTABLE = 'is-unselectable';\nconst IS_FIRST_ITEM_DRAGGED = 'is-draggedFirstItem';\nconst IS_LAST_ITEM_DRAGGED = 'is-draggedLastItem';\nconst IS_DRAGGING_CLASS = 'is-dragging';\nconst IS_BEFORE_CLASS = 'is-before';\nconst IS_AFTER_CLASS = 'is-after';\nconst IS_IE_OR_EDGE = navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0 ||\n  navigator.userAgent.indexOf('Edge') !== -1;\nconst IS_FIREFOX = navigator.userAgent.indexOf('Firefox') !== -1;\nconst KEY_SPACE = Keys.keyToCode('space');\n\n/**\n @class Coral.Table\n @classdesc A Table component is a container component to display and manipulate data in two dimensions.\n To define table actions on specific elements, handles can be used.\n A handle is given a special attribute :\n - <code>[coral-table-select]</code>. Select/unselect all table items.\n - <code>[coral-table-rowselect]</code>. Select/unselect the table item.\n - <code>[coral-table-roworder]</code>. Drag to order the table item.\n - <code>[coral-table-rowlock]</code>. Lock/unlock the table item.\n @htmltag coral-table\n @htmlbasetag table\n @extends {HTMLTableElement}\n @extends {ComponentMixin}\n */\nclass Table extends ComponentMixin(HTMLTableElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Templates\n    this._elements = {\n      head: this.querySelector('thead[is=\"coral-table-head\"]') || new TableHead(),\n      body: this.querySelector('tbody[is=\"coral-table-body\"]') || new TableBody(),\n      foot: this.querySelector('tfoot[is=\"coral-table-foot\"]') || new TableFoot(),\n      columns: this.querySelector('colgroup') || document.createElement('colgroup')\n    };\n    base.call(this._elements);\n    \n    // Events\n    this._delegateEvents({\n      // Table specific\n      'global:coral-commons:_webfontactive': '_resetLayout',\n      'change [coral-table-select]': '_onSelectAll',\n      'capture:scroll [handle=\"container\"]': '_onScroll',\n  \n      // Head specific\n      'click thead[is=\"coral-table-head\"] th[is=\"coral-table-headercell\"]': '_onHeaderCellSort',\n      'coral-dragaction:dragstart thead[is=\"coral-table-head\"] th[is=\"coral-table-headercell\"]': '_onHeaderCellDragStart',\n      'coral-dragaction:drag thead[is=\"coral-table-head\"] tr[is=\"coral-table-row\"] > th[is=\"coral-table-headercell\"]': '_onHeaderCellDrag',\n      'coral-dragaction:dragend thead[is=\"coral-table-head\"] tr[is=\"coral-table-row\"] > th[is=\"coral-table-headercell\"]': '_onHeaderCellDragEnd',\n      // a11y\n      'key:enter th[is=\"coral-table-headercell\"]': '_onHeaderCellSort',\n      'key:space th[is=\"coral-table-headercell\"]': '_onHeaderCellSort',\n  \n      // Body specific\n      'click tbody[is=\"coral-table-body\"] [coral-table-rowlock]': '_onRowLock',\n      'click tbody[is=\"coral-table-body\"] [coral-table-rowselect]': '_onRowSelect',\n      'click tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"][selectable] [coral-table-cellselect]': '_onCellSelect',\n      'capture:mousedown tbody[is=\"coral-table-body\"] [coral-table-roworder]:not([disabled])': '_onRowOrder',\n      'capture:touchstart tbody[is=\"coral-table-body\"] [coral-table-roworder]:not([disabled])': '_onRowOrder',\n      'coral-dragaction:dragstart tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onRowDragStart',\n      'coral-dragaction:drag tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onRowDrag',\n      'coral-dragaction:dragover tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onRowDragOver',\n      'coral-dragaction:dragend tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onRowDragEnd',\n      // a11y\n      'mousedown tbody[is=\"coral-table-body\"] [coral-table-rowselect]': '_onRowDown',\n      'key:enter tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onRowSelect',\n      'key:space tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onRowSelect',\n      'key:pageup tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onFocusPreviousItem',\n      'key:pagedown tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onFocusNextItem',\n      'key:left tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onFocusPreviousItem',\n      'key:right tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onFocusNextItem',\n      'key:up tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onFocusPreviousItem',\n      'key:down tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onFocusNextItem',\n      'key:home tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onFocusFirstItem',\n      'key:end tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onFocusLastItem',\n      'key:shift+pageup tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onSelectPreviousItem',\n      'key:shift+pagedown tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onSelectNextItem',\n      'key:shift+left tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onSelectPreviousItem',\n      'key:shift+right tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onSelectNextItem',\n      'key:shift+up tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onSelectPreviousItem',\n      'key:shift+down tbody[is=\"coral-table-body\"] tr[is=\"coral-table-row\"]': '_onSelectNextItem',\n  \n      // Private\n      'coral-table-row:_multiplechanged': '_onRowMultipleChanged',\n      'coral-table-row:_beforeselectedchanged': '_onBeforeRowSelectionChanged',\n      'coral-table-row:_selectedchanged': '_onRowSelectionChanged',\n      'coral-table-row:_lockedchanged': '_onRowLockedChanged',\n      'coral-table-row:_change': '_onRowChange',\n      'coral-table-row:_contentchanged': '_onRowContentChanged',\n      'coral-table-headercell:_contentchanged': '_resetLayout',\n      'coral-table-head:_contentchanged': '_onHeadContentChanged',\n      'coral-table-body:_contentchanged': '_onBodyContentChanged',\n      'coral-table-body:_empty': '_onBodyEmpty',\n      'coral-table-column:_alignmentchanged': '_onAlignmentChanged',\n      'coral-table-column:_fixedwidthchanged': '_onFixedWidthChanged',\n      'coral-table-column:_orderablechanged': '_onColumnOrderableChanged',\n      'coral-table-column:_sortablechanged': '_onColumnSortableChanged',\n      'coral-table-column:_sortabledirectionchanged': '_onColumnSortableDirectionChanged',\n      'coral-table-column:_hiddenchanged': '_onColumnHiddenChanged',\n      'coral-table-column:_beforecolumnsort': '_onBeforeColumnSort',\n      'coral-table-column:_sort': '_onColumnSort',\n      'coral-table-head:_stickychanged': '_onHeadStickyChanged'\n    });\n  \n    // Required for coral-table:change event\n    this._oldSelection = [];\n    // References selected items in their selection order and is only used for keyboard selection\n    this._lastSelectedItems = {\n      items: [],\n      direction: null\n    };\n    \n    // Don't sort by default\n    this._allowSorting = false;\n  \n    // Debounce timer\n    this._timeout = null;\n    // Debounce wait in milliseconds\n    this._wait = 50;\n    \n    // Used by resizing detector\n    this._resetLayout = this._resetLayout.bind(this);\n  \n    // Initialize content MO\n    this._observer = new MutationObserver(this._handleMutations.bind(this));\n    this._observer.observe(this, {\n      childList: true,\n      subtree: true\n    });\n  }\n  \n  /**\n   The head of the table.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get head() {\n    return this._getContentZone(this._elements.head);\n  }\n  set head(value) {\n    this._setContentZone('head', value, {\n      handle: 'head',\n      tagName: 'thead',\n      insert: function(content) {\n        // Using the native table API allows to position the head element at the correct position.\n        this._elements.table.tHead = content;\n      }\n    });\n  }\n  \n  /**\n   The body of the table. Multiple bodies are not supported.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get body() {\n    return this._getContentZone(this._elements.body);\n  }\n  set body(value) {\n    this._setContentZone('body', value, {\n      handle: 'body',\n      tagName: 'tbody',\n      insert: function(content) {\n        this._elements.table.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   The foot of the table.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get foot() {\n    return this._getContentZone(this._elements.foot);\n  }\n  set foot(value) {\n    this._setContentZone('foot', value, {\n      handle: 'foot',\n      tagName: 'tfoot',\n      insert: function(content) {\n        // Using the native table API allows to position the head element at the correct position.\n        this._elements.table.tFoot = content;\n      }\n    });\n  }\n  \n  /**\n   The columns of the table.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get columns() {\n    return this._getContentZone(this._elements.columns);\n  }\n  set columns(value) {\n    this._setContentZone('columns', value, {\n      handle: 'columns',\n      tagName: 'colgroup',\n      insert: function(content) {\n        this._elements.table.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   The table's variant. See {@link TableVariantEnum}.\n   \n   @type {String}\n   @default TableVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n  \n    this.classList.remove(...ALL_VARIANT_CLASSES);\n    this.classList.add(`${CLASSNAME}--${this._variant}`);\n  \n    // @compat\n    const body = this.body;\n    if (body) {\n      const rows = getRows([body]);\n      // Use the first column as selection column\n      rows.forEach(row => this._toggleSelectionCheckbox(row));\n    }\n  }\n  \n  /**\n   Whether the items are selectable.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selectable\n   @htmlattributereflected\n   */\n  get selectable() {\n    return this._selectable || false;\n  }\n  set selectable(value) {\n    this._selectable = transform.booleanAttr(value);\n    this._reflectAttribute('selectable', this._selectable);\n  \n    const rows = getRows([this.body]);\n  \n    if (this._selectable) {\n      rows.forEach((row) => {\n        row.setAttribute('_selectable', '');\n      });\n    }\n    else {\n      // Clear selection\n      rows.forEach((row) => {\n        row.removeAttribute('_selectable');\n      });\n    \n      this.trigger('coral-table:change', {\n        selection: [],\n        oldSelection: this._oldSelection\n      });\n    \n      // Sync used collection\n      this._oldSelection = [];\n      this._lastSelectedItems.items = [];\n    }\n\n    // a11y\n    this._toggleFocusable();\n  }\n  \n  /**\n   Whether the table is orderable. If the table is sorted, ordering handles are hidden.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute orderable\n   @htmlattributereflected\n   */\n  get orderable() {\n    return this._orderable || false;\n  }\n  set orderable(value) {\n    this._orderable = transform.booleanAttr(value);\n    this._reflectAttribute('orderable', this._orderable);\n  \n    getRows([this.body]).forEach((row) => {\n      row[this._orderable ? 'setAttribute' : 'removeAttribute']('_orderable', '');\n    }, this);\n  \n    // a11y\n    this._toggleFocusable();\n  }\n  \n  /**\n   Whether multiple items can be selected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute multiple\n   @htmlattributereflected\n   */\n  get multiple() {\n    return this._multiple || false;\n  }\n  set multiple(value) {\n    this._multiple = transform.booleanAttr(value);\n    this._reflectAttribute('multiple', this._multiple);\n    \n    this._elements.table.setAttribute('aria-multiselectable', this._multiple);\n  \n    // Deselect all except last\n    if (!this.multiple) {\n    \n      const selection = this.selectedItems;\n    \n      if (selection.length > 1) {\n        selection.forEach((row, i) => {\n          // Don't trigger too many events\n          row.set('selected', i === selection.length - 1, true);\n        });\n      \n        // Synchronise the table select handle\n        const newSelection = this.selectedItems;\n      \n        if (newSelection.length) {\n          this._setSelectAllHandleState('indeterminate');\n        }\n        else {\n          this._setSelectAllHandleState('unchecked');\n        }\n      \n        this.trigger('coral-table:change', {\n          selection: newSelection,\n          oldSelection: selection\n        });\n\n        // Sync used collection\n        this._oldSelection = newSelection;\n        this._lastSelectedItems.items = newSelection;\n      }\n    }\n  }\n  \n  /**\n   Whether the table rows can be locked/unlocked. If rows are locked, they float to the top of the table and aren't\n   affected by column sorting.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute lockable\n   @htmlattributereflected\n   */\n  get lockable() {\n    return this._lockable || false;\n  }\n  set lockable(value) {\n    this._lockable = transform.booleanAttr(value);\n    this._reflectAttribute('lockable', this._lockable);\n  \n    getRows([this.body]).forEach((row) => {\n      row[this._lockable ? 'setAttribute' : 'removeAttribute']('_lockable', '');\n    }, this);\n  \n    // a11y\n    this._toggleFocusable();\n  }\n  \n  /**\n   Returns an Array containing the selected items.\n   \n   @type {Array.<HTMLElement>}\n   @readonly\n   */\n  get selectedItems() {\n    return this.items._getAllSelected();\n  }\n  \n  /**\n   Returns the first selected item of the table. The value <code>null</code> is returned if no element is\n   selected.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getFirstSelected();\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        container: this.body,\n        itemBaseTagName: 'tr',\n        itemTagName: 'coral-table-row'\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /** @private */\n  _onSelectAll(event) {\n    if (this.selectable) {\n      let rows = getRows([this.body]);\n      \n      if (rows.length) {\n        if (this.multiple) {\n          const selected = event.target.checked;\n          \n          rows.forEach((row) => {\n            // Don't trigger too many events\n            row.set('selected', selected, true);\n          });\n          \n          rows = selected ? rows : [];\n          \n          // Synchronise the table select handle\n          this._setSelectAllHandleState(selected ? 'checked' : 'unchecked');\n          \n          this.trigger('coral-table:change', {\n            selection: rows,\n            oldSelection: this._oldSelection\n          });\n          \n          // Sync used collection\n          this._oldSelection = rows;\n          this._lastSelectedItems.items = rows;\n        }\n        else {\n          // Only select last item\n          const lastItem = rows[rows.length - 1];\n          lastItem.selected = !lastItem.selected;\n        }\n      }\n    }\n  }\n  \n  _triggerChangeEvent() {\n    if (!this._preventTriggeringEvents) {\n      const selectedItems = this.selectedItems;\n      this.trigger('coral-table:change', {\n        oldSelection: this._oldSelection,\n        selection: selectedItems\n      });\n      \n      this._oldSelection = selectedItems;\n    }\n  }\n  \n  /** @private */\n  _onRowOrder(event) {\n    const table = this;\n    const row = event.target.closest('tr[is=\"coral-table-row\"]');\n    \n    if (row && table.orderable) {\n      const head = table.head;\n      const body = table.body;\n      const sticky = head && head.sticky;\n      const style = row.getAttribute('style');\n      const index = getIndexOf(row);\n      const oldBefore = row.nextElementSibling;\n      const dragAction = new DragAction(row);\n      const items = getRows([body]);\n      const tableBoundingClientRect = table.getBoundingClientRect();\n      const rowBoundingClientRect = row.getBoundingClientRect();\n      \n      if (row === items[0]) {\n        table.classList.add(IS_FIRST_ITEM_DRAGGED);\n      }\n      else if (row === items[items.length - 1]) {\n        table.classList.add(IS_LAST_ITEM_DRAGGED);\n      }\n      \n      dragAction.axis = 'vertical';\n      // Handle the scroll in table\n      dragAction.scroll = false;\n      // Specify selection handle directly on the row if none found\n      dragAction.handle = row.querySelector('[coral-table-roworder]');\n      \n      // The row placeholder indicating where the dragged element will be dropped\n      const placeholder = row.cloneNode(true);\n      placeholder.classList.add('_coral-Table-row--placeholder');\n      \n      // Prepare the row position before inserting its placeholder\n      row.style.top = `${rowBoundingClientRect.top - tableBoundingClientRect.top}px`;\n      \n      // Prevent change event from triggering if the cloned node is selected\n      table._preventTriggeringEvents = true;\n      body.insertBefore(placeholder, row.nextElementSibling);\n      window.requestAnimationFrame(() => {\n        table._preventTriggeringEvents = false;\n      });\n      \n      // Store the data to avoid re-reading the layout on drag events\n      const dragData = {\n        placeholder: placeholder,\n        index: index,\n        oldBefore: oldBefore,\n        // Backup styles to restore them later\n        style: {\n          row: style\n        }\n      };\n      \n      // Required to handle the scrolling of the sticky table on drag events\n      if (sticky) {\n        dragData.sticky = sticky;\n        dragData.tableTop = tableBoundingClientRect.top;\n        dragData.tableSize = tableBoundingClientRect.height;\n        dragData.headSize = parseFloat(table._elements.container.style.marginTop);\n        dragData.dragElementSize = rowBoundingClientRect.height;\n      }\n      \n      row.dragAction._dragData = dragData;\n    }\n  }\n  \n  /** @private */\n  _onHeaderCellSort(event) {\n    const table = this;\n    const matchedTarget = event.matchedTarget;\n    \n    // Don't sort if the column was dragged\n    if (!matchedTarget._isDragging) {\n      const column = table._getColumn(matchedTarget);\n      // Only sort if actually sortable and event not defaultPrevented\n      if (column && column.sortable) {\n        event.preventDefault();\n        column._sort();\n        \n        // Restore focus on the header cell in any case\n        matchedTarget.focus();\n      }\n    }\n  }\n  \n  /** @private */\n  _onHeaderCellDragStart(event) {\n    const table = this;\n    const matchedTarget = event.matchedTarget;\n    const dragElement = event.detail.dragElement;\n    const siblingHeaderCellSelector = matchedTarget === dragElement ? 'th[is=\"coral-table-headercell\"]' : 'th[is=\"coral-table-headercell\"] coral-table-headercell-content';\n    const tableBoundingClientRect = table.getBoundingClientRect();\n    \n    // Store the data to be used on drag events\n    dragElement.dragAction._dragData = {\n      draggedColumnIndex: getIndexOf(matchedTarget),\n      tableLeft: tableBoundingClientRect.left,\n      tableSize: tableBoundingClientRect.width,\n      dragElementSize: matchedTarget.getBoundingClientRect().width,\n      tableScrollWidth: table._elements.container.scrollWidth\n    };\n    \n    getSiblingsOf(matchedTarget, siblingHeaderCellSelector, 'prevAll').forEach((item) => {\n      item.classList.add(IS_BEFORE_CLASS);\n    });\n    \n    getSiblingsOf(matchedTarget, siblingHeaderCellSelector, 'nextAll').forEach((item) => {\n      item.classList.add(IS_AFTER_CLASS);\n    });\n  }\n  \n  /** @private */\n  _onHeaderCellDrag(event) {\n    const table = this;\n    const container = table._elements.container;\n    const matchedTarget = event.matchedTarget;\n    const dragElement = event.detail.dragElement;\n    const dragData = dragElement.dragAction._dragData;\n    const row = matchedTarget.parentElement;\n    const isHeaderCellDragged = matchedTarget === dragElement;\n    const containerScrollLeft = container.scrollLeft;\n    const documentScrollLeft = document.body.scrollLeft;\n    \n    // Prevent sorting on header cell click if the header cell is being dragged\n    matchedTarget._isDragging = true;\n    \n    // Scroll left/right if table edge is reached\n    const position = dragElement.getBoundingClientRect().left - dragData.tableLeft;\n    const leftScrollLimit = 0;\n    const rightScrollLimit = dragData.tableSize - dragData.dragElementSize;\n    const scrollOffset = 10;\n    \n    if (position < leftScrollLimit) {\n      container.scrollLeft -= scrollOffset;\n    }\n    // 2nd condition is required to avoid increasing the container scroll width\n    else if (position > rightScrollLimit && containerScrollLeft + dragData.tableSize < dragData.tableScrollWidth) {\n      container.scrollLeft += scrollOffset;\n    }\n    \n    // Position sibling header cells based on the dragged element\n    getHeaderCells(row).forEach((headerCell) => {\n      const draggedHeaderCell = isHeaderCellDragged ? headerCell : headerCell.content;\n      \n      if (!draggedHeaderCell.classList.contains(IS_DRAGGING_CLASS)) {\n  \n        const offsetLeft = draggedHeaderCell.getBoundingClientRect().left + documentScrollLeft;\n        const isAfter = event.detail.pageX < offsetLeft + draggedHeaderCell.offsetWidth / 3;\n        \n        draggedHeaderCell.classList.toggle(IS_AFTER_CLASS, isAfter);\n        draggedHeaderCell.classList.toggle(IS_BEFORE_CLASS, !isAfter);\n  \n        const columnIndex = getIndexOf(headerCell);\n        const dragElementIndex = getIndexOf(matchedTarget);\n        \n        // Place headercell after\n        if (draggedHeaderCell.classList.contains(IS_AFTER_CLASS)) {\n          if (columnIndex < dragElementIndex) {\n            const draggedHeaderCellComputedStyle = window.getComputedStyle(draggedHeaderCell);\n            const nextHeaderCellPadding = parseFloat(draggedHeaderCellComputedStyle.paddingLeft) + parseFloat(draggedHeaderCellComputedStyle.paddingRight);\n            \n            // Position the header cells based on their siblings position\n            if (isHeaderCellDragged) {\n              const nextHeaderCellWidth = parseFloat(draggedHeaderCellComputedStyle.width);\n              draggedHeaderCell.style.left = `${nextHeaderCellWidth + nextHeaderCellPadding}px`;\n            }\n            else {\n              const nextHeaderCell = getSiblingsOf(headerCell, 'th[is=\"coral-table-headercell\"]', 'next');\n              const nextHeaderCellLeftOffset = nextHeaderCell.getBoundingClientRect().left + documentScrollLeft;\n              draggedHeaderCell.style.left = `${nextHeaderCellLeftOffset - nextHeaderCellPadding + containerScrollLeft}px`;\n            }\n          }\n          else {\n            draggedHeaderCell.style.left = '';\n          }\n        }\n        \n        // Place headerCell before\n        if (draggedHeaderCell.classList.contains(IS_BEFORE_CLASS)) {\n          if (columnIndex > dragElementIndex) {\n            const prev = getSiblingsOf(headerCell, 'th[is=\"coral-table-headercell\"]', 'prev');\n            const prevHeaderCellComputedStyle = window.getComputedStyle(prev);\n            const beforeHeaderCellPadding = parseFloat(prevHeaderCellComputedStyle.paddingLeft) + parseFloat(prevHeaderCellComputedStyle.paddingRight);\n            \n            // Position the header cells based on their siblings position\n            if (isHeaderCellDragged) {\n              const beforeHeaderCellWidth = parseFloat(prevHeaderCellComputedStyle.width);\n              draggedHeaderCell.style.left = `${-1 * (beforeHeaderCellWidth + beforeHeaderCellPadding)}px`;\n            }\n            else {\n              const beforeHeaderCellLeftOffset = prev.getBoundingClientRect().left + documentScrollLeft;\n              draggedHeaderCell.style.left = `${beforeHeaderCellLeftOffset - beforeHeaderCellPadding + containerScrollLeft}px`;\n            }\n          }\n          else {\n            draggedHeaderCell.style.left = '';\n          }\n        }\n      }\n    });\n  }\n  \n  /** @private */\n  _onHeaderCellDragEnd(event) {\n    const table = this;\n    const matchedTarget = event.matchedTarget;\n    const dragElement = event.detail.dragElement;\n    const dragData = dragElement.dragAction._dragData;\n    const column = table._getColumn(matchedTarget);\n    const headRows = getRows([table.head]);\n    const isHeaderCellDragged = matchedTarget === dragElement;\n    const row = matchedTarget.parentElement;\n    \n    // Select all cells in table body and foot given the index\n    const getCellsByIndex = (cellIndex) => {\n      const cellElements = [];\n      const rows = getRows([table.body, table.foot]);\n      rows.forEach((rowElement) => {\n        const cell = getCellByIndex(rowElement, cellIndex);\n        if (cell) {\n          cellElements.push(cell);\n        }\n      });\n      return cellElements;\n    };\n    \n    const cells = getCellsByIndex(getIndexOf(matchedTarget));\n    let before = null;\n    let after = null;\n    \n    // Siblings are either header cell or header cell content based on the current sticky state\n    if (isHeaderCellDragged) {\n      before = row.querySelector(`th[is=\"coral-table-headercell\"].${IS_AFTER_CLASS}`);\n      \n      after = row.querySelectorAll(`th[is=\"coral-table-headercell\"].${IS_BEFORE_CLASS}`);\n      after = after.length ? after[after.length - 1] : null;\n    }\n    else {\n      before = row.querySelector(`th[is=\"coral-table-headercell\"] > coral-table-headercell-content.${IS_AFTER_CLASS}`);\n      before = before ? before.parentNode : null;\n      \n      after = row.querySelectorAll(`th[is=\"coral-table-headercell\"] > coral-table-headercell-content.${IS_BEFORE_CLASS}`);\n      after = after.length ? after[after.length - 1].parentNode : null;\n    }\n    \n    // Did header cell order change ?\n    const swapped = !(before && before.previousElementSibling === matchedTarget || after && after.nextElementSibling === matchedTarget);\n    \n    // Switch whole columns based on the new position of the dragged element\n    if (swapped) {\n      const beforeColumn = before ? table._getColumn(before) : null;\n      \n      // Trigger the event on table\n      const beforeEvent = table.trigger('coral-table:beforecolumndrag', {\n        column: column,\n        before: beforeColumn\n      });\n      \n      const oldBefore = column.nextElementSibling;\n      \n      if (!beforeEvent.defaultPrevented) {\n        // Insert the headercell at the new position\n        if (before) {\n          const beforeIndex = getIndexOf(before);\n          const beforeCells = getCellsByIndex(beforeIndex);\n          cells.forEach((cell, i) => {\n            cell.parentNode.insertBefore(cell, beforeCells[i]);\n          });\n          \n          // Sync <coral-table-column> by reordering it too\n          const beforeCol = getColumns(table.columns)[beforeIndex];\n          if (beforeCol && column) {\n            table.columns.insertBefore(column, beforeCol);\n          }\n          \n          row.insertBefore(matchedTarget, before);\n        }\n        if (after) {\n          const afterIndex = getIndexOf(after);\n          const afterCells = getCellsByIndex(afterIndex);\n          cells.forEach((cell, i) => {\n            cell.parentNode.insertBefore(cell, afterCells[i].nextElementSibling);\n          });\n          \n          // Sync <coral-table-column> by reordering it too\n          const afterCol = getColumns(table.columns)[afterIndex];\n          if (afterCol && column) {\n            table.columns.insertBefore(column, afterCol.nextElementSibling);\n          }\n          \n          row.insertBefore(matchedTarget, after.nextElementSibling);\n        }\n        \n        // Trigger the order event if the column position changed\n        if (dragData.draggedColumnIndex !== getIndexOf(matchedTarget)) {\n          const newBefore = getColumns(table.columns)[getIndexOf(column) + 1];\n          table.trigger('coral-table:columndrag', {\n            column: column,\n            oldBefore: oldBefore,\n            before: newBefore || null\n          });\n        }\n      }\n    }\n    \n    // Restoring default header cells styling\n    headRows.forEach((rowElement) => {\n      getHeaderCells(rowElement).forEach((headerCell) => {\n        headerCell = isHeaderCellDragged ? headerCell : headerCell.content;\n        headerCell.classList.remove(IS_AFTER_CLASS);\n        headerCell.classList.remove(IS_BEFORE_CLASS);\n        headerCell.style.left = '';\n      });\n    });\n    \n    // Trigger a relayout\n    table._resetLayout();\n    \n    window.requestAnimationFrame(() => {\n      // Allows sorting again after dragging completed\n      matchedTarget._isDragging = undefined;\n      // Refocus the dragged element manually\n      table._toggleElementTabIndex(dragElement, null, true);\n    });\n  }\n  \n  /** @private */\n  _onCellSelect(event) {\n    const cell = event.target.closest('td[is=\"coral-table-cell\"]');\n    \n    if (cell) {\n      cell.selected = !cell.selected;\n    }\n  }\n  \n  /** @private */\n  _onRowSelect(event) {\n    const table = this;\n    const row = event.target.closest('tr[is=\"coral-table-row\"]');\n    \n    if (row) {\n      // Ignore selection if the row is locked\n      if (table.lockable && row.locked) {\n        return;\n      }\n      \n      // Restore text-selection\n      table.classList.remove(IS_UNSELECTABLE);\n      \n      // Prevent row selection when it's the selection handle and the target is an input\n      if (table.selectable && (Keys.filterInputs(event) || !row.hasAttribute('coral-table-rowselect'))) {\n        // Pressing space scrolls the sticky table to the bottom if scrollable\n        if (event.keyCode === KEY_SPACE) {\n          event.preventDefault();\n        }\n        \n        if (event.shiftKey) {\n          let lastSelectedItem = table._lastSelectedItems.items[table._lastSelectedItems.items.length - 1];\n          const lastSelectedDirection = table._lastSelectedItems.direction;\n          \n          // If no selected items, by default set the first item as last selected item\n          if (!table.selectedItem) {\n            const rows = getRows([table.body]);\n            if (rows.length) {\n              lastSelectedItem = rows[0];\n              lastSelectedItem.set('selected', true, true);\n            }\n          }\n          \n          // Don't continue if table has no items or if the last selected item is the clicked item\n          if (lastSelectedItem && getIndexOf(row) !== getIndexOf(lastSelectedItem)) {\n            \n            // Range selection direction\n            const before = getIndexOf(row) < getIndexOf(lastSelectedItem);\n            const rangeQuery = before ? 'prevUntil' : 'nextUntil';\n            \n            // Store direction\n            table._lastSelectedItems.direction = before ? 'up' : 'down';\n            \n            if (!row.selected) {\n              \n              // Store selection range\n              const selectionRange = getSiblingsOf(lastSelectedItem, 'tr[is=\"coral-table-row\"]:not([selected])', rangeQuery);\n              selectionRange[before ? 'push' : 'unshift'](lastSelectedItem);\n              \n              // Direction change\n              if (!before && lastSelectedDirection === 'up' || before && lastSelectedDirection === 'down') {\n                selectionRange.forEach((item) => {\n                  item.set('selected', false, true);\n                });\n              }\n              \n              // Select item\n              const selectionRangeRow = selectionRange[before ? 0 : selectionRange.length - 1];\n              selectionRangeRow.set('selected', true, true);\n              getSiblingsOf(selectionRangeRow, row, rangeQuery).forEach((item) => {\n                item.set('selected', true, true);\n              });\n            }\n            else {\n              const selection = getSiblingsOf(lastSelectedItem, row, rangeQuery);\n              \n              // If some items are not selected\n              if (selection.some((item) => !item.hasAttribute('selected'))) {\n                // Select all items in between\n                selection.forEach((item) => {\n                  item.set('selected', true, true);\n                });\n                \n                // Deselect selected item right before/after the selection range\n                getSiblingsOf(row, 'tr[is=\"coral-table-row\"]:not([selected])', rangeQuery).forEach((item) => {\n                  item.set('selected', false, true);\n                });\n              }\n              else {\n                // Deselect items\n                selection[before ? 'push' : 'unshift'](lastSelectedItem);\n                selection.forEach((item) => {\n                  item.set('selected', false, true);\n                });\n              }\n            }\n          }\n        }\n        else {\n          // Remove direction if simple click without shift key pressed\n          table._lastSelectedItems.direction = null;\n        }\n        \n        // Select the row that was clicked and keep the row selected if shift key was pressed\n        row.selected = event.shiftKey ? true : !row.selected;\n        \n        // Don't focus the row if the target isn't the row and focusable\n        table._focusItem(row, event.target === event.matchedTarget || event.target.tabIndex < 0);\n      }\n    }\n  }\n  \n  /** @private */\n  _onRowLock(event) {\n    const table = this;\n    \n    if (table.lockable) {\n      const row = event.target.closest('tr[is=\"coral-table-row\"]');\n      if (row) {\n        event.preventDefault();\n        event.stopPropagation();\n        row.locked = !row.locked;\n        \n        // Refocus the locked/unlocked item manually\n        window.requestAnimationFrame(() => {\n          table._focusItem(row, true);\n        });\n      }\n    }\n  }\n  \n  /** @private */\n  _onRowDown(event) {\n    const table = this;\n    \n    // Prevent text-selection\n    if (table.selectedItem && event.shiftKey) {\n      table.classList.add(IS_UNSELECTABLE);\n      \n      // @polyfill IE\n      // Store text selection feature\n      const onSelectStart = document.onselectstart;\n      // Kill text selection feature\n      document.onselectstart = () => false;\n      // Restore text selection feature\n      window.requestAnimationFrame(() => {\n        document.onselectstart = onSelectStart;\n      });\n    }\n  }\n  \n  /** @private */\n  _onRowDragStart(event) {\n    const table = this;\n    const body = table.body;\n    const dragElement = event.detail.dragElement;\n    const dragData = dragElement.dragAction._dragData;\n    \n    dragData.style.cells = [];\n    getCells(dragElement).forEach((cell) => {\n      // Backup styles to restore them later\n      dragData.style.cells.push(cell.getAttribute('style'));\n      // Cells will shrink otherwise\n      cell.style.width = window.getComputedStyle(cell).width;\n    });\n    \n    dragElement.style.position = 'absolute';\n    \n    // Setting drop zones allows to listen for coral-dragaction:dragover event\n    dragElement.dragAction.dropZone = body.querySelectorAll(`tr[is=\"coral-table-row\"]:not(.${IS_DRAGGING_CLASS})`);\n    \n    // We cannot rely on :focus since the row is being moved in the dom while dnd\n    dragElement.classList.add('is-focused');\n  }\n  \n  /** @private */\n  _onRowDrag(event) {\n    const table = this;\n    const body = table.body;\n    const dragElement = event.detail.dragElement;\n    const dragData = dragElement.dragAction._dragData;\n    const firstRow = getRows([body])[0];\n    \n    // Insert the placeholder at the top\n    if (dragElement.getBoundingClientRect().top <= firstRow.getBoundingClientRect().top) {\n      table._preventTriggeringEvents = true;\n      body.insertBefore(dragData.placeholder, firstRow);\n      window.requestAnimationFrame(() => {\n        table._preventTriggeringEvents = false;\n      });\n    }\n    \n    // Scroll up/down if table edge is reached\n    if (dragData.sticky) {\n      const dragElementTop = dragElement.getBoundingClientRect().top;\n      const position = dragElementTop - dragData.tableTop - dragData.headSize;\n      const topScrollLimit = 0;\n      const bottomScrollTimit = dragData.tableSize - dragData.dragElementSize - dragData.headSize;\n      const scrollOffset = 10;\n      \n      // Handle the scrollbar position based on the dragged element position.\n      // nextFrame is required else Chrome wouldn't take scrollTop changes in account when dragging the first row down\n      window.requestAnimationFrame(() => {\n        if (position < topScrollLimit) {\n          table._elements.container.scrollTop -= scrollOffset;\n        }\n        else if (position > bottomScrollTimit) {\n          table._elements.container.scrollTop += scrollOffset;\n        }\n      });\n    }\n  }\n  \n  /** @private */\n  _onRowDragOver(event) {\n    const table = this;\n    const body = table.body;\n    const dragElement = event.detail.dragElement;\n    const dropElement = event.detail.dropElement;\n    const dragData = dragElement.dragAction._dragData;\n    \n    // Swap the placeholder\n    if (dragElement.getBoundingClientRect().top >= dropElement.getBoundingClientRect().top) {\n      table._preventTriggeringEvents = true;\n      body.insertBefore(dragData.placeholder, dropElement.nextElementSibling);\n      window.requestAnimationFrame(() => {\n        table._preventTriggeringEvents = false;\n      });\n    }\n  }\n  \n  /** @private */\n  _onRowDragEnd(event) {\n    const table = this;\n    const body = table.body;\n    const dragElement = event.detail.dragElement;\n    \n    const dragData = dragElement.dragAction._dragData;\n    const before = dragData.placeholder.nextElementSibling;\n    \n    // Clean up\n    table.classList.remove(IS_FIRST_ITEM_DRAGGED);\n    table.classList.remove(IS_LAST_ITEM_DRAGGED);\n    \n    body.removeChild(dragData.placeholder);\n    dragElement.dragAction.destroy();\n    \n    // Restore specific styling\n    dragElement.setAttribute('style', dragData.style.row || '');\n    getCells(dragElement).forEach((cell, i) => {\n      cell.setAttribute('style', dragData.style.cells[i] || '');\n    });\n    \n    // Trigger the event on table\n    const beforeEvent = table.trigger('coral-table:beforeroworder', {\n      row: dragElement,\n      before: before\n    });\n    \n    if (!beforeEvent.defaultPrevented) {\n      // Did row order change ?\n      const rows = getRows([body]).filter((item) => item !== dragElement);\n      \n      if (dragData.index !== rows.indexOf(dragData.placeholder)) {\n        // Insert the row at the new position and prevent change event from triggering\n        table._preventTriggeringEvents = true;\n        body.insertBefore(dragElement, before);\n        window.requestAnimationFrame(() => {\n          table._preventTriggeringEvents = false;\n        });\n        \n        // Trigger the order event if the row position changed\n        table.trigger('coral-table:roworder', {\n          row: dragElement,\n          oldBefore: dragData.oldBefore,\n          before: before\n        });\n      }\n    }\n    \n    // Refocus the dragged element manually\n    window.requestAnimationFrame(() => {\n      dragElement.classList.remove('is-focused');\n      table._focusItem(dragElement, true);\n    });\n  }\n  \n  /** @private */\n  _onRowMultipleChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const table = this;\n    const row = event.target;\n    \n    // Deselect all except last\n    if (!row.multiple) {\n      const selectedItems = row.selectedItems;\n      table._preventTriggeringEvents = true;\n      selectedItems.forEach((cell, i) => {\n        cell.selected = i === selectedItems.length - 1;\n      });\n      \n      window.requestAnimationFrame(() => {\n        table._preventTriggeringEvents = false;\n        \n        table.trigger('coral-table:rowchange', {\n          oldSelection: selectedItems,\n          selection: row.selectedItems,\n          row: row\n        });\n      });\n    }\n  }\n  \n  /** @private */\n  _onBeforeRowSelectionChanged(event) {\n    event.stopImmediatePropagation();\n    \n    // In single selection, if the added item is selected, the rest should be deselected\n    const selectedItem = this.selectedItem;\n    if (!this.multiple && selectedItem && !event.target.selected) {\n      selectedItem.set('selected', false, true);\n      this._removeLastSelectedItem(selectedItem);\n    }\n  }\n  \n  /** @private */\n  _syncSelectAllHandle(selectedItems, items) {\n    if (items.length && selectedItems.length === items.length) {\n      this._setSelectAllHandleState('checked');\n    }\n    else if (!selectedItems.length) {\n      this._setSelectAllHandleState('unchecked');\n    }\n    else {\n      this._setSelectAllHandleState('indeterminate');\n    }\n  }\n  \n  /** @private */\n  _setSelectAllHandleState(state) {\n    const handle = this.querySelector('[coral-table-select]');\n    \n    if (handle) {\n      if (state === 'checked') {\n        if (typeof handle.indeterminate !== 'undefined') {\n          handle.indeterminate = false;\n        }\n        \n        if (typeof handle.checked !== 'undefined') {\n          handle.checked = true;\n        }\n      }\n      else if (state === 'unchecked') {\n        if (typeof handle.indeterminate !== 'undefined') {\n          handle.indeterminate = false;\n        }\n        \n        if (typeof handle.checked !== 'undefined') {\n          handle.checked = false;\n        }\n      }\n      else if (state === 'indeterminate') {\n        if (typeof handle.indeterminate !== 'undefined') {\n          handle.indeterminate = true;\n        }\n      }\n    }\n  }\n  \n  /** @private */\n  _onRowSelectionChanged(event) {\n    event.stopImmediatePropagation();\n    \n    this._triggerChangeEvent();\n    \n    const table = this;\n    const body = table.body;\n    const row = event.target;\n  \n    // Synchronise the table select handle\n    if (body && body.contains(row)) {\n      const selection = table.selectedItems;\n      const rows = getRows([body]);\n      \n      // Sync select all handle\n      table._syncSelectAllHandle(selection, rows);\n      \n      // Store or remove the row reference\n      table[row.selected ? '_addLastSelectedItem' : '_removeLastSelectedItem'](row);\n      \n      // Store selected items range\n      const lastSelectedItem = table._lastSelectedItems.items[table._lastSelectedItems.items.length - 1];\n      const next = table._lastSelectedItems.direction === 'down';\n      if (row.selected && lastSelectedItem && lastSelectedItem.selected && getSiblingsOf(lastSelectedItem, 'tr[is=\"coral-table-row\"][selected]', next ? 'next' : 'prev')) {\n        getSiblingsOf(lastSelectedItem, 'tr[is=\"coral-table-row\"]:not([selected])', next ? 'nextUntil' : 'prevUntil').forEach((item) => {\n          table._addLastSelectedItem(item);\n        });\n      }\n    }\n  }\n  \n  _onRowLockedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const table = this;\n    const body = this.body;\n    const row = event.target;\n    \n    if (body && body.contains(row)) {\n      if (row.locked) {\n        // Store the row index as reference to place it back if unlocked and its selection state\n        row._rowIndex = getIndexOf(row);\n        \n        // Insert row at first position of its tbody\n        table._preventTriggeringEvents = true;\n        body.insertBefore(row, getRows([body])[0]);\n        window.requestAnimationFrame(() => {\n          table._preventTriggeringEvents = false;\n        });\n        \n        // Trigger event on table\n        table.trigger('coral-table:rowlock', {row});\n      }\n      else {\n        // Put the row back to its initial position\n        if (row._rowIndex >= 0) {\n          const beforeRow = getRows([body])[row._rowIndex];\n          if (beforeRow) {\n            // Insert row at its initial position\n            table._preventTriggeringEvents = true;\n            body.insertBefore(row, beforeRow.nextElementSibling);\n            window.requestAnimationFrame(() => {\n              table._preventTriggeringEvents = false;\n            });\n          }\n        }\n        \n        // Trigger event on table\n        table.trigger('coral-table:rowunlock', {row});\n      }\n    }\n  }\n  \n  _onHeadContentChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const table = this;\n    const head = table.head;\n    const addedNodes = event.detail.addedNodes;\n    \n    for (let i = 0; i < addedNodes.length; i++) {\n      const node = addedNodes[i];\n      \n      // Sync header cell whether sticky or not\n      if (node instanceof TableHeaderCell) {\n        table._toggleStickyHeaderCell(node, head.sticky);\n      }\n    }\n  }\n  \n  /** @private */\n  _onBodyContentChanged(event) {\n    if (event.stopImmediatePropagation) {\n      event.stopImmediatePropagation();\n    }\n    \n    const table = this;\n    const addedNodes = event.detail.addedNodes;\n    const removedNodes = event.detail.removedNodes;\n    let addedNode = null;\n    const selectItem = (item) => {\n      item.selected = item === addedNode;\n    };\n    let changed = false;\n    \n    // Sync added nodes\n    for (let i = 0; i < addedNodes.length; i++) {\n      addedNode = addedNodes[i];\n      \n      // Sync row state with table properties\n      if (addedNode instanceof TableRow) {\n        changed = true;\n        \n        addedNode._toggleSelectable(table.selectable);\n        addedNode._toggleOrderable(table.orderable);\n        addedNode._toggleLockable(table.lockable);\n  \n        // @compat\n        this._toggleSelectionCheckbox(addedNode);\n        \n        const selectedItems = table.selectedItems;\n        if (addedNode.selected) {\n          // In single selection, if the added item is selected, the rest should be deselected\n          if (!table.multiple && selectedItems.length > 1) {\n            selectedItems.forEach(selectItem);\n          }\n          \n          table._triggerChangeEvent();\n        }\n        \n        // Cells are selectable too\n        if (addedNode.selectable) {\n          addedNode.trigger('coral-table-row:_contentchanged', {\n            addedNodes: getContentCells(addedNode),\n            removedNodes: []\n          });\n        }\n        \n        // Trigger collection event\n        if (!table._preventTriggeringEvents) {\n          table.trigger('coral-collection:add', {\n            item: addedNode\n          });\n        }\n        \n        // a11y\n        table._toggleFocusable();\n      }\n    }\n    \n    // Sync removed nodes\n    for (let k = 0; k < removedNodes.length; k++) {\n      const removedNode = removedNodes[k];\n      \n      if (removedNode instanceof TableRow) {\n        changed = true;\n        \n        // If the focusable item is removed, the first item becomes the new focusable item\n        if (removedNode.getAttribute('tabindex') === '0') {\n          const firstItem = getRows([table.body])[0];\n          if (firstItem) {\n            table._focusItem(firstItem);\n          }\n        }\n        \n        if (removedNode.selected) {\n          table._triggerChangeEvent();\n        }\n        \n        // Sync _lastSelectedItems array\n        const removedItemIndex = table._lastSelectedItems.items.indexOf(removedNode);\n        if (removedItemIndex !== -1) {\n          table._lastSelectedItems.items = table._lastSelectedItems.items.splice(removedItemIndex, 1);\n        }\n        \n        // Trigger collection event\n        if (!table._preventTriggeringEvents) {\n          table.trigger('coral-collection:remove', {\n            item: removedNode\n          });\n        }\n      }\n    }\n    \n    if (changed) {\n      const items = getRows([table.body]);\n      // Sync select all handle if any.\n      table._syncSelectAllHandle(table.selectedItems, items);\n      // Disable table features if no items.\n      table._toggleInteractivity(items.length === 0);\n    }\n  }\n  \n  /** @private */\n  _onBodyEmpty(event) {\n    event.stopImmediatePropagation();\n    this._toggleInteractivity(true);\n  }\n  \n  /** @private */\n  _onRowChange(event) {\n    event.stopImmediatePropagation();\n    \n    if (!this._preventTriggeringEvents) {\n      this.trigger('coral-table:rowchange', {\n        oldSelection: event.detail.oldSelection,\n        selection: event.detail.selection,\n        row: event.target\n      });\n    }\n  }\n  \n  /** @private */\n  _onRowContentChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const table = this;\n    const row = event.target;\n    const addedNodes = event.detail.addedNodes;\n    let addedNode = null;\n    const removedNodes = event.detail.removedNodes;\n    const selectItem = (item) => {\n      item.selected = item === addedNode;\n    };\n    \n    // Sync added nodes\n    for (let i = 0; i < addedNodes.length; i++) {\n      addedNode = addedNodes[i];\n      \n      // Sync row state with table properties\n      if (addedNode instanceof TableCell) {\n        addedNode._toggleSelectable(row.selectable);\n        \n        const selectedItems = row.selectedItems;\n        if (addedNode.selected) {\n          // In single selection, if the added item is selected, the rest should be deselected\n          if (!row.multiple && selectedItems.length > 1) {\n            selectedItems.forEach(selectItem);\n          }\n          \n          row._triggerChangeEvent();\n        }\n        \n        // Trigger collection event\n        if (!table._preventTriggeringEvents) {\n          row.trigger('coral-collection:add', {\n            item: addedNode\n          });\n        }\n      }\n      // Add appropriate scope depending on whether headercell is in THEAD or TBODY\n      else if (addedNode instanceof TableHeaderCell) {\n        table._setHeaderCellScope(addedNode, row.parentNode);\n      }\n    }\n    \n    // Sync removed nodes\n    for (let k = 0; k < removedNodes.length; k++) {\n      const removedNode = removedNodes[k];\n      \n      if (removedNode instanceof TableCell) {\n        \n        if (removedNode.selected) {\n          row._triggerChangeEvent();\n        }\n        \n        // Trigger collection event\n        if (!table._preventTriggeringEvents) {\n          row.trigger('coral-collection:remove', {\n            item: removedNode\n          });\n        }\n      }\n    }\n  }\n  \n  /** @private */\n  _toggleInteractivity(disable) {\n    const table = this;\n    const selectAll = table.querySelector('[coral-table-select]');\n    \n    if (selectAll) {\n      selectAll.disabled = disable;\n    }\n    \n    table.classList.toggle(IS_DISABLED, disable);\n  }\n  \n  _onAlignmentChanged(event) {\n    event.stopImmediatePropagation();\n  \n    this._resetAlignmentColumns();\n  }\n  \n  /** @private */\n  _onFixedWidthChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const table = this;\n    const head = table.head;\n    const column = event.target;\n    \n    if (head) {\n      const headRows = getRows([head]);\n      const columnIndex = getIndexOf(event.target);\n      \n      headRows.forEach((row) => {\n        const headerCell = getCellByIndex(row, columnIndex);\n        if (headerCell && headerCell.tagName === 'TH') {\n          headerCell[column.fixedWidth ? 'setAttribute' : 'removeAttribute']('fixedwidth', '');\n        }\n      });\n    }\n    \n    table._resetLayout();\n  }\n  \n  /** @private */\n  _onColumnOrderableChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const table = this;\n    const head = this.head;\n    const column = event.target;\n    const headerCell = table._getColumnHeaderCell(column);\n    \n    if (headerCell) {\n      // Move the drag handle\n      table._toggleDragActionHandle(headerCell, head && head.sticky);\n      \n      table._resetLayout();\n    }\n  }\n  \n  /** @private */\n  _onColumnSortableChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const table = this;\n    const head = this.head;\n    const column = event.target;\n    const headerCell = table._getColumnHeaderCell(column);\n    \n    if (headerCell) {\n      // For icons (chevron up/down) styling\n      headerCell[column.sortable ? 'setAttribute' : 'removeAttribute']('sortable', '');\n      \n      // Toggle tab index. Sortable headercells are focusable.\n      table._toggleHeaderCellTabIndex(headerCell, head && head.sticky);\n      \n      table._resetLayout();\n    }\n  }\n  \n  _onColumnSortableDirectionChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const table = this;\n    const column = event.target;\n    const sortableDirection = TableColumn.sortableDirection;\n    \n    // Hide coral-table-roworder handles if table is sorted\n    table.classList.toggle(IS_SORTED, table._isSorted());\n    \n    const headerCell = table._getColumnHeaderCell(column);\n    if (headerCell) {\n      // For icons (chevron up/down) styling\n      headerCell.setAttribute('sortabledirection', column.sortableDirection);\n      headerCell.setAttribute('aria-sort',\n        column.sortableDirection === sortableDirection.DEFAULT ? 'none' : column.sortableDirection);\n    }\n  }\n  \n  _onColumnHiddenChanged(event) {\n    event.stopImmediatePropagation();\n    \n    this._resetHiddenColumns(true);\n  }\n  \n  _onBeforeColumnSort(event) {\n    event.stopImmediatePropagation();\n    \n    const table = this;\n    const column = event.target;\n    const newSortableDirection = event.detail.newSortableDirection;\n    \n    const beforeEvent = table.trigger('coral-table:beforecolumnsort', {\n      column: column,\n      direction: newSortableDirection\n    });\n    \n    if (!beforeEvent.defaultPrevented) {\n      column.sortableDirection = newSortableDirection;\n    }\n  }\n  \n  _onColumnSort(event) {\n    event.stopImmediatePropagation();\n    \n    // Don't sort yet\n    if (!this._allowSorting) {\n      return;\n    }\n    \n    const table = this;\n    const body = table.body;\n    const column = event.target;\n    const columnIndex = getIndexOf(column);\n    const colHeaderCell = table._getColumnHeaderCell(column);\n    const onInitialization = event.detail.onInitialization;\n    const sortableDirection = event.detail.sortableDirection;\n    const sortableType = event.detail.sortableType;\n    \n    const rows = getRows([body]);\n    const cells = [];\n    \n    // Prevent change event from triggering when sorting\n    if (table) {\n      table._preventTriggeringEvents = true;\n    }\n    \n    // Store a reference of the default row index for default sortable direction\n    rows.forEach((row, i) => {\n      if (typeof row._defaultRowIndex === 'undefined') {\n        row._defaultRowIndex = i;\n      }\n      \n      const cell = getCellByIndex(row, columnIndex);\n      if (cell) {\n        cells.push(cell);\n      }\n    });\n    \n    if (column.sortableDirection === sortableDirection.ASCENDING) {\n      // Remove sortable direction on sibling columns\n      getSiblingsOf(column, 'col[is=\"coral-table-column\"]').forEach((col) => {\n        col._preventSort = true;\n        col.setAttribute('sortabledirection', sortableDirection.DEFAULT);\n        col._preventSort = false;\n      });\n      \n      if (colHeaderCell) {\n        // For icons (chevron up/down) styling\n        getSiblingsOf(colHeaderCell, 'th[is=\"coral-table-headercell\"]').forEach((headerCell) => {\n          headerCell.setAttribute('sortabledirection', sortableDirection.DEFAULT);\n          headerCell.setAttribute('aria-sort', 'none');\n        });\n      }\n      \n      // Use cell value to sort and fallback if not specified\n      cells.sort((a, b) => {\n        if (column.sortableType === sortableType.ALPHANUMERIC) {\n          const aText = a.value ? a.value : a.textContent;\n          const bText = b.value ? b.value : b.textContent;\n          return aText.localeCompare(bText);\n        }\n        else if (column.sortableType === sortableType.NUMBER) {\n          // Remove all spaces and replace commas with dots for decimal values\n          const aNumber = parseFloat(a.value ? a.value : a.textContent.replace(/\\s+/g, '').replace(/,/g, '.'));\n          const bNumber = parseFloat(b.value ? b.value : b.textContent.replace(/\\s+/g, '').replace(/,/g, '.'));\n          return aNumber > bNumber ? 1 : -1;\n        }\n        else if (column.sortableType === sortableType.DATE) {\n          const aDate = a.value ? new Date(parseInt(a.value, 10)) : new Date(a.textContent);\n          const bDate = b.value ? new Date(parseInt(b.value, 10)) : new Date(b.textContent);\n          return aDate > bDate ? 1 : -1;\n        }\n      });\n      \n      // Only sort if not custom sorting\n      if (column.sortableType !== sortableType.CUSTOM) {\n        if (body) {\n          // Insert the row at the new position if actually sorted\n          cells.forEach((cell) => {\n            const row = cell.parentElement;\n            // Prevent locked row to be sorted\n            if (!row.locked) {\n              body.appendChild(row);\n            }\n          });\n        }\n        \n        // Trigger on table\n        table.trigger('coral-table:columnsort', {column});\n      }\n      \n      // Table is in a sorted state. Disable orderable actions\n      rows.forEach((row) => {\n        if (row.dragAction) {\n          row.dragAction.destroy();\n        }\n      });\n    }\n    else if (column.sortableDirection === sortableDirection.DESCENDING) {\n      getSiblingsOf(column, 'col[is=\"coral-table-column\"]').forEach((col) => {\n        col._preventSort = true;\n        col.setAttribute('sortabledirection', sortableDirection.DEFAULT);\n        col._preventSort = false;\n      });\n      \n      if (colHeaderCell) {\n        getSiblingsOf(colHeaderCell, 'th[is=\"coral-table-headercell\"]').forEach((headerCell) => {\n          headerCell.setAttribute('sortabledirection', sortableDirection.DEFAULT);\n          headerCell.setAttribute('aria-sort', 'none');\n        });\n      }\n      \n      cells.sort((a, b) => {\n        if (column.sortableType === sortableType.ALPHANUMERIC) {\n          const aText = a.value ? a.value : a.textContent;\n          const bText = b.value ? b.value : b.textContent;\n          return bText.localeCompare(aText);\n        }\n        else if (column.sortableType === sortableType.NUMBER) {\n          // Remove all spaces and replace commas with dots for decimal values\n          const aNumber = parseFloat(a.value ? a.value : a.textContent.replace(/\\s+/g, '').replace(/,/g, '.'));\n          const bNumber = parseFloat(b.value ? b.value : b.textContent.replace(/\\s+/g, '').replace(/,/g, '.'));\n          return aNumber < bNumber ? 1 : -1;\n        }\n        else if (column.sortableType === sortableType.DATE) {\n          const aDate = a.value ? new Date(parseInt(a.value, 10)) : new Date(a.textContent);\n          const bDate = b.value ? new Date(parseInt(b.value, 10)) : new Date(b.textContent);\n          return aDate < bDate ? 1 : -1;\n        }\n      });\n      \n      // Only sort if not custom sorting\n      if (column.sortableType !== sortableType.CUSTOM) {\n        if (body) {\n          // Insert the row at the new position if actually sorted\n          cells.forEach((cell) => {\n            const row = cell.parentElement;\n            // Prevent locked row to be sorted\n            if (!row.locked) {\n              body.appendChild(row);\n            }\n          });\n        }\n        \n        // Trigger on table\n        table.trigger('coral-table:columnsort', {column});\n      }\n      \n      // Table is in a sorted state. Disable orderable actions\n      rows.forEach((row) => {\n        if (row.dragAction) {\n          row.dragAction.destroy();\n        }\n      });\n    }\n    else if (column.sortableDirection === sortableDirection.DEFAULT && !onInitialization) {\n      \n      // Only sort if not custom sorting\n      if (column.sortableType !== sortableType.CUSTOM) {\n        // Put rows back to their initial position\n        rows.sort((a, b) => a._defaultRowIndex > b._defaultRowIndex ? 1 : -1);\n        \n        rows.forEach((row) => {\n          // Prevent locked row to be sorted\n          if (body && !row.locked) {\n            body.appendChild(row);\n          }\n        });\n        \n        // Trigger on table\n        table.trigger('coral-table:columnsort', {column});\n      }\n    }\n    \n    // Allow triggering change events again after sorting\n    window.requestAnimationFrame(() => {\n      table._preventTriggeringEvents = false;\n    });\n  }\n  \n  _onHeadStickyChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const table = this;\n    const head = event.target;\n    \n    // Hide the sticky table head until it is properly positioned\n    head.classList.toggle(IS_HIDDEN, head.sticky);\n    \n    // Defines the head height\n    table._resetContainerLayout(head.sticky ? `${head.getBoundingClientRect().height}px` : null);\n    \n    getRows([head]).forEach((row) => {\n      getHeaderCells(row).forEach((headerCell) => {\n        table._toggleStickyHeaderCell(headerCell, head.sticky);\n      });\n    });\n    \n    // Make sure sticky styling is applied\n    table.classList.toggle(`${CLASSNAME}--sticky`, head.sticky);\n    \n    // Layout sticky head\n    table._resetLayout();\n  }\n  \n  /** @private */\n  _getColumnHeaderCell(column) {\n    const table = this;\n    const head = table.head;\n    let headerCell = null;\n    \n    if (head) {\n      const headRows = getRows([head]);\n      const columnIndex = getIndexOf(column);\n      if (headRows.length) {\n        headerCell = getCellByIndex(headRows[headRows.length - 1], columnIndex);\n        headerCell = headerCell && headerCell.tagName === 'TH' ? headerCell : null;\n      }\n    }\n    \n    return headerCell;\n  }\n  \n  /** @private */\n  _getColumn(headerCell) {\n    // Get the corresponding column\n    return getColumns(this.columns)[getIndexOf(headerCell)] || null;\n  }\n  \n  /** @private */\n  _toggleStickyHeaderCell(headerCell, sticky) {\n    // Set the size\n    this._layoutStickyCell(headerCell, sticky);\n    \n    // Define DragAction on the sticky cell instead of the headercell\n    this._toggleDragActionHandle(headerCell, sticky);\n    \n    // Toggle tab index. Sortable headercells are focusable.\n    this._toggleHeaderCellTabIndex(headerCell, sticky);\n  }\n  \n  _layoutStickyCell(headerCell, sticky) {\n    if (sticky) {\n      const computedStyle = window.getComputedStyle(headerCell);\n      \n      // Don't allow the column to shrink less than its minimum allowed\n      if (!headerCell.style.minWidth) {\n        const width = headerCell.content.getBoundingClientRect().width;\n        // Don't set the width if the header cell is hidden\n        if (width > 0) {\n          headerCell.style.minWidth = `${width}px`;\n        }\n      }\n      \n      const cellWidth = parseFloat(computedStyle.width);\n      const cellPadding = parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight);\n      const borderRightWidth = parseFloat(computedStyle.borderRightWidth);\n      \n      // Reflect headercell size on sticky cell\n      headerCell.content.style.width = `${cellWidth + cellPadding + borderRightWidth}px`;\n    }\n    else {\n      // Restore headercell style\n      headerCell.style.minWidth = '';\n      headerCell.content.style.width = '';\n      headerCell.content.style.height = '';\n      headerCell.content.style.top = '';\n      headerCell.content.style.marginLeft = '';\n      \n      // @polyfill ie/edge/firefox\n      if (IS_IE_OR_EDGE || IS_FIREFOX) {\n        headerCell.content.style.paddingTop = '';\n      }\n    }\n  }\n  \n  /** @private */\n  _toggleDragActionHandle(headerCell, sticky) {\n    const column = this._getColumn(headerCell);\n    \n    if (headerCell.dragAction) {\n      headerCell.dragAction.destroy();\n    }\n    if (headerCell.content.dragAction) {\n      headerCell.content.dragAction.destroy();\n    }\n    \n    if (column && column.orderable) {\n      const dragAction = new DragAction(sticky ? headerCell.content : headerCell);\n      dragAction.axis = 'horizontal';\n      // Handle the scroll in table\n      dragAction.scroll = false;\n      headerCell.setAttribute('orderable', '');\n    }\n    else {\n      headerCell.removeAttribute('orderable');\n    }\n  }\n  \n  /** @private */\n  _toggleFocusable() {\n    const firstItem = getRows([this.body])[0];\n    if (!firstItem) {\n      return;\n    }\n    \n    const focusableItem = this._getFocusableItem();\n    if (this.selectable || this.lockable || this.orderable) {\n      // First item is focusable by default but don't remove the tabindex of the existing focusable item\n      if (!focusableItem) {\n        this._toggleElementTabIndex(firstItem);\n      }\n    }\n    else if (focusableItem) {\n      // Basic table is not focusable\n      focusableItem.removeAttribute('tabindex');\n    }\n  }\n  \n  /** @private */\n  _toggleElementTabIndex(element, oldFocusable, forceFocus) {\n    if (oldFocusable) {\n      oldFocusable.removeAttribute('tabindex');\n    }\n    \n    element.setAttribute('tabindex', '0');\n    if (forceFocus) {\n      element.focus();\n    }\n  }\n  \n  /** @private */\n  _toggleHeaderCellTabIndex(headerCell, sticky) {\n    const column = this._getColumn(headerCell);\n    const sortable = column && (column.sortable || column.orderable);\n    headerCell[sortable && !sticky ? 'setAttribute' : 'removeAttribute']('tabindex', '0');\n    headerCell.content[sortable && sticky ? 'setAttribute' : 'removeAttribute']('tabindex', '0');\n  }\n  \n  /** @private */\n  _isSorted() {\n    let column = null;\n    const isSorted = getColumns(this.columns).some((col) => {\n      column = col;\n      return col.sortableDirection !== TableColumn.sortableDirection.DEFAULT;\n    });\n    \n    return isSorted ? column : false;\n  }\n  \n  /** @private */\n  _focusEdgeItem(event, first) {\n    const items = getRows([this.body]);\n    if (items.length) {\n      event.preventDefault();\n      \n      let item = this._getFocusableItem();\n      if (item) {\n        item.removeAttribute('tabindex');\n      }\n      \n      item = items[first ? 0 : items.length - 1];\n      item.setAttribute('tabindex', '0');\n      item.focus();\n    }\n  }\n  \n  /** @private */\n  _focusSiblingItem(event, next) {\n    const item = this._getFocusableItem();\n    if (item) {\n      event.preventDefault();\n      \n      const siblingItem = getSiblingsOf(item, 'tr[is=\"coral-table-row\"]', next ? 'next' : 'prev');\n      if (siblingItem) {\n        item.removeAttribute('tabindex');\n        siblingItem.setAttribute('tabindex', '0');\n        siblingItem.focus();\n      }\n    }\n  }\n  \n  /** @private */\n  _selectSiblingItem(next) {\n    if (this.selectable && this.multiple) {\n      const selectedItems = this.selectedItems;\n      let lastSelectedItem = this._lastSelectedItems.items[this._lastSelectedItems.items.length - 1];\n      \n      if (selectedItems.length) {\n        // Prevent selection if we reached the edge\n        if (next && lastSelectedItem.matches(':last-of-type') || !next && lastSelectedItem.matches(':first-of-type')) {\n          return;\n        }\n        \n        //Target sibling item\n        const sibling = getSiblingsOf(lastSelectedItem, 'tr[is=\"coral-table-row\"]', next ? 'next' : 'prev');\n        if (!sibling.hasAttribute('selected')) {\n          lastSelectedItem = sibling;\n        }\n        \n        // Store last selection\n        this._lastSelectedItems.direction = next ? 'down' : 'up';\n        \n        // Toggle selection\n        lastSelectedItem.selected = !lastSelectedItem.selected;\n      }\n      else if (getRows([this.body]).length) {\n        const focusableItem = this._getFocusableItem();\n  \n        // Store last selection\n        this._lastSelectedItems.direction = next ? 'down' : 'up';\n  \n        // Select focusable item by default if no items selected\n        focusableItem.selected = true;\n      }\n    }\n    \n    const self = this;\n    // Focus last selected item\n    window.requestAnimationFrame(() => {\n      const itemToFocus = self._lastSelectedItems.items[self._lastSelectedItems.items.length - 1];\n      if (itemToFocus) {\n        self._focusItem(itemToFocus, true);\n      }\n    });\n  }\n  \n  /** @private */\n  _getFocusableItem() {\n    return this.body && this.body.querySelector('tr[is=\"coral-table-row\"][tabindex=\"0\"]');\n  }\n  \n  /** @private */\n  _getFocusableHeaderCell() {\n    return this.head && this.head.querySelector('th[is=\"coral-table-headercell\"][tabindex=\"0\"], coral-table-headercell-label[tabindex=\"0\"]');\n  }\n  \n  /** @private */\n  _addLastSelectedItem(item) {\n    if (this._lastSelectedItems.items.indexOf(item) === -1) {\n      this._lastSelectedItems.items.push(item);\n    }\n    else {\n      // Push it at the end\n      this._removeLastSelectedItem(item);\n      this._addLastSelectedItem(item);\n    }\n  }\n  \n  /** @private */\n  _removeLastSelectedItem(item) {\n    this._lastSelectedItems.items.splice(this._lastSelectedItems.items.indexOf(item), 1);\n  }\n  \n  /** @private */\n  _focusItem(item, forceFocus) {\n    this._toggleElementTabIndex(item, this._getFocusableItem(), forceFocus);\n  }\n  \n  /** @private */\n  _onFocusFirstItem(event) {\n    this._focusEdgeItem(event, true);\n  }\n  \n  /** @private */\n  _onFocusLastItem(event) {\n    this._focusEdgeItem(event, false);\n  }\n  \n  /** @private */\n  _onFocusNextItem(event) {\n    this._focusSiblingItem(event, true);\n  }\n  \n  /** @private */\n  _onFocusPreviousItem(event) {\n    this._focusSiblingItem(event, false);\n  }\n  \n  /** @private */\n  _onSelectNextItem() {\n    this._selectSiblingItem(true);\n  }\n  \n  /** @private */\n  _onSelectPreviousItem() {\n    this._selectSiblingItem(false);\n  }\n  \n  /** @private */\n  _resetLayout() {\n    if (this._preventResetLayout) {\n      return;\n    }\n    \n    // Debounce\n    if (this._timeout !== null) {\n      window.clearTimeout(this._timeout);\n    }\n    \n    const self = this;\n    this._timeout = window.setTimeout(() => {\n      self._timeout = null;\n      self._resizeStickyHead();\n      self._resizeContainer();\n    }, this._wait);\n  }\n  \n  /** @private */\n  _resizeStickyHead() {\n    const table = this;\n    const head = table.head;\n    if (head && head.sticky) {\n      getRows([head]).forEach((row) => {\n        getHeaderCells(row).forEach((headerCell) => {\n          table._layoutStickyCell(headerCell, true);\n        });\n      });\n    }\n  }\n  \n  /** @private */\n  _resizeContainer() {\n    const table = this;\n    const head = table.head;\n    \n    if (head && head.sticky) {\n      let calculatedHeadSize = 0;\n      let previousRowHeight = 0;\n      \n      // Reset head layout\n      getRows([head]).forEach((row, i) => {\n        const headerCells = getHeaderCells(row);\n        \n        if (headerCells.length) {\n          const computedStyle = window.getComputedStyle(headerCells[0].content);\n          let rowHeight = 0;\n          // Default min-height is 37px\n          const stickyHeaderCellMinHeight = parseFloat(computedStyle.minHeight);\n          // Divider 'row' or 'cell'  adds a border top\n          const borderTop = parseFloat(computedStyle.borderTopWidth);\n          \n          headerCells.forEach((headerCell) => {\n            // Reset to default\n            headerCell.content.style.height = '';\n            // The highest header cell defines the row height\n            rowHeight = Math.max(rowHeight, headerCell.content.getBoundingClientRect().height);\n          });\n          \n          // Add the row height to the table head height\n          calculatedHeadSize += rowHeight;\n          \n          headerCells.forEach((headerCell) => {\n            // Expand the header cell height to the row height\n            if (rowHeight - borderTop !== stickyHeaderCellMinHeight) {\n              headerCell.content.style.height = `${rowHeight}px`;\n            }\n            \n            // @polyfill ie/edge/firefox\n            // Vertically align text in sticky cell by getting the label height\n            if ((IS_IE_OR_EDGE || IS_FIREFOX) && headerCell.content.textContent.trim().length) {\n              const stickyHeaderCellHeight = headerCell.content.getBoundingClientRect().height;\n              const span = document.createElement('span');\n              \n              // Prevents a recursive table relayout that is triggered from changing the header cell content\n              table._preventResetLayout = true;\n              \n              while (headerCell.content.firstChild) {\n                span.appendChild(headerCell.content.firstChild);\n              }\n              headerCell.content.appendChild(span);\n              \n              const labelHeight = span.getBoundingClientRect().height;\n              const paddingTop = (stickyHeaderCellHeight - labelHeight) / 2;\n              \n              while (span.firstChild) {\n                headerCell.content.appendChild(span.firstChild);\n              }\n              headerCell.content.removeChild(span);\n              \n              headerCell.content.style.paddingTop = `${paddingTop}px`;\n              \n              window.requestAnimationFrame(() => {\n                table._preventResetLayout = false;\n              });\n            }\n            \n            // Position the sticky cell\n            previousRowHeight = previousRowHeight || rowHeight;\n            headerCell.content.style.top = `${i > 0 ? previousRowHeight * i + borderTop * (i - 1) : 0}px`;\n          });\n        }\n      });\n      \n      const containerComputedStyle = window.getComputedStyle(this._elements.container);\n      const borderTopWidth = parseFloat(containerComputedStyle.borderTopWidth);\n      const borderBottomWidth = parseFloat(containerComputedStyle.borderBottomWidth);\n  \n      const containerBorderSize = borderTopWidth + borderBottomWidth;\n      const containerMarginTop = `${calculatedHeadSize}px`;\n      const containerHeight = `calc(100% - ${calculatedHeadSize + containerBorderSize}px)`;\n      this._resetContainerLayout(containerMarginTop, containerHeight);\n      \n      // Once the sticky table head is properly positioned, we don't need to hide it anymore\n      head.classList.remove(IS_HIDDEN);\n    }\n    else {\n      this._resetContainerLayout();\n    }\n  }\n  \n  /** @private */\n  _resetContainerLayout(marginTop, height) {\n    this._elements.container.style.marginTop = marginTop ? marginTop : '';\n    this._elements.container.style.height = height ? height : '';\n  }\n  \n  /** @private */\n  _resetHiddenColumns(resetLayout) {\n    this.id = this.id || commons.getUID();\n    \n    // Delete styles\n    this._elements.hiddenStyle.innerHTML = '';\n    \n    // Render styles for each column\n    getColumns(this.columns).forEach((column) => {\n      if (column.hidden) {\n        const columnIndex = getIndexOf(column) + 1;\n        \n        this._elements.hiddenStyle.innerHTML += `\n           #${this.id} ._coral-Table-cell:nth-child(${columnIndex}),\n           #${this.id} ._coral-Table-headerCell:nth-child(${columnIndex}) {\n             display: none;\n           }\n        `;\n      }\n    });\n    \n    if (resetLayout) {\n      this._resetLayout();\n    }\n  }\n  \n  _resetAlignmentColumns() {\n    this.id = this.id || commons.getUID();\n  \n    // Delete styles\n    this._elements.alignmentStyle.innerHTML = '';\n  \n    getColumns(this.columns).forEach((column) => {\n      const columnAlignment = column.alignment;\n      const columnIndex = getIndexOf(column) + 1;\n      \n      this._elements.alignmentStyle.innerHTML += `\n         #${this.id} ._coral-Table-cell:nth-child(${columnIndex}),\n         #${this.id} ._coral-Table-headerCell:nth-child(${columnIndex}) {\n           text-align: ${columnAlignment};\n         }\n      `;\n    });\n  }\n  \n  /** @private */\n  _onScroll() {\n    const table = this;\n    const head = table.head;\n    \n    // Ignore if only vertical scroll\n    const scrollLeft = table._elements.container.scrollLeft;\n    if (table._lastScrollLeft === scrollLeft) {\n      return;\n    }\n    table._lastScrollLeft = scrollLeft;\n    \n    if (head && head.sticky) {\n      // Trigger a reflow that will reposition the sticky cells for FF only.\n      head.style.margin = '1px';\n      \n      window.requestAnimationFrame(() => {\n        head.style.margin = '';\n        \n        // In other browsers e.g Chrome or IE, we need to adjust the position of the sticky cells manually\n        if (!table._preventLayoutStickyCellOnScroll) {\n          const firstHeaderCell = head.querySelector('tr[is=\"coral-table-row\"] th[is=\"coral-table-headercell\"]');\n          \n          if (firstHeaderCell) {\n            // Verify if the sticky cells need to be adjusted. If the first one didn't move, we can assume that they\n            // all need to be adjusted. By default, the left offset is 1px because of the table border.\n            if (table._layoutStickyCellOnScroll || firstHeaderCell.content.offsetLeft === 1) {\n              table._layoutStickyCellOnScroll = true;\n              \n              getRows([head]).forEach((row) => {\n                getHeaderCells(row).forEach((headerCell) => {\n                  const paddingLeft = parseFloat(window.getComputedStyle(headerCell).paddingLeft);\n                  headerCell.content.style.marginLeft = `-${scrollLeft + paddingLeft}px`;\n                });\n              });\n            }\n            else {\n              // We don't need to layout the sticky cells manually\n              table._preventLayoutStickyCellOnScroll = true;\n            }\n          }\n        }\n      });\n    }\n  }\n  \n  // @compat\n  _toggleSelectionCheckbox(row) {\n    // Use the first column as selection column\n    const cell = getContentCells(row)[0];\n    \n    // On condition handle attribute is set\n    if (cell && cell.hasAttribute('coral-table-rowselect')) {\n      cell.classList.add('_coral-Table-cell--check');\n      \n      cell.removeAttribute('coral-table-rowselect');\n  \n      // Support cloneNode\n      cell._checkbox = cell._checkbox || cell.querySelector('coral-checkbox');\n      \n      // Render checkbox if none\n      if (!cell._checkbox) {\n        cell._checkbox = new Checkbox();\n      }\n  \n      // Identifies as selection handle\n      cell._checkbox.setAttribute('coral-table-rowselect', '');\n      \n      // Sync selection\n      cell._checkbox[row.selected ? 'setAttribute' : 'removeAttribute']('checked', '');\n      \n      // Add checkbox\n      cell.insertBefore(cell._checkbox, cell.firstChild);\n    }\n  }\n  \n  /** @private */\n  _setHeaderCellScope(headerCell, tableSection) {\n    // Add appropriate scope depending on whether header cell is in THEAD or TBODY\n    const scope = tableSection.nodeName === 'THEAD' || tableSection.nodeName === 'TFOOT' ? 'col' : 'row';\n    const ariaRole = scope === 'col' ? 'columnheader' : 'rowheader';\n    headerCell.setAttribute('role', ariaRole);\n    headerCell.setAttribute('scope', scope);\n  }\n  \n  /**  @private */\n  _handleMutations(mutations) {\n    mutations.forEach((mutation) => {\n      // Sync removed nodes\n      for (let k = 0; k < mutation.removedNodes.length; k++) {\n        const removedNode = mutation.removedNodes[k];\n\n        if (removedNode instanceof TableBody) {\n          this._onBodyContentChanged({\n            target: removedNode,\n            detail: {\n              addedNodes: [],\n              removedNodes: getRows([removedNode])\n            }\n          });\n        }\n      }\n    }, this);\n  \n    this._resetLayout();\n  }\n  \n  get _contentZones() {\n    return {\n      tbody: 'body',\n      thead: 'head',\n      tfoot: 'foot',\n      colgroup: 'columns'\n    };\n  }\n  \n  /**\n   Returns {@link Table} variants.\n   \n   @return {TableVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /**\n   Returns divider options for {@link TableHead}, {@link TableBody} and {@link TableFoot}.\n   \n   @return {TableSectionDividerEnum}\n   */\n  static get divider() { return divider; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['variant', 'selectable', 'orderable', 'multiple', 'lockable'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // @polyfill ie/edge/firefox\n    if (IS_IE_OR_EDGE || IS_FIREFOX) {\n      this.classList.add(`${CLASSNAME}--IE`);\n    }\n    \n    // Wrapper should have role=\"presentation\" because it wraps another table\n    this.setAttribute('role', 'presentation');\n    \n    // Default reflected attribute\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n    \n    const head = this._elements.head;\n    const body = this._elements.body;\n    const foot = this._elements.foot;\n    const columns = this._elements.columns;\n  \n    // Render template\n    const frag = document.createDocumentFragment();\n    frag.appendChild(this._elements.container);\n  \n    // Disconnect MO observer while moving table sections around\n    this._observer.disconnect();\n    \n    // Support row only content\n    if (!body.parentNode) {\n      // Look for the table auto generated table body\n      const tableAutoCreatedBody = this.querySelector('tbody');\n      if (tableAutoCreatedBody) {\n        // Move the rows inside the coral table body\n        while (tableAutoCreatedBody.firstChild) {\n          body.appendChild(tableAutoCreatedBody.firstChild);\n        }\n        // Remove the auto generated table body\n        tableAutoCreatedBody.remove();\n      }\n    }\n    \n    // Call content zone inserts\n    this.head = head;\n    this.body = body;\n    this.foot = foot;\n    this.columns = columns;\n    \n    // cloneNode support\n    const wrapper = this.querySelector('._coral-Table-wrapper-container');\n    const object = this.querySelector('object');\n    \n    if (wrapper) { wrapper.remove(); }\n    if (object && object.parentNode === this) { this.removeChild(object); }\n  \n    // Append frag\n    this.appendChild(frag);\n    \n    // Reconnect observer\n    this._observer.observe(this, {\n      childList: true,\n      subtree: true\n    });\n  \n    // Set header cell scope\n    getRows([this._elements.table]).forEach((row) => {\n      getHeaderCells(row).forEach((headerCell) => {\n        this._setHeaderCellScope(headerCell, row.parentNode);\n      }, this);\n    }, this);\n    \n    // Detect table size changes\n    commons.addResizeListener(this, this._resetLayout);\n    \n    // Disable table features if no items.\n    const items = getRows([this.body]);\n    this._toggleInteractivity(items.length === 0);\n  \n    // Sync selection state\n    if (this.selectable) {\n      const selectedItems = this.selectedItems;\n    \n      // Sync select all handle if any\n      this._syncSelectAllHandle(selectedItems, items);\n    \n      // Sync used collections\n      if (selectedItems.length) {\n        this._oldSelection = selectedItems;\n        this._lastSelectedItems.items = selectedItems;\n      }\n    }\n    \n    // Sync sorted\n    this._allowSorting = true;\n    const column = this._isSorted();\n    if (column) {\n      column._doSort(true);\n    }\n  }\n  \n  /**\n   Triggered before a {@link Table} column gets sorted by user interaction. Can be used to cancel column sorting and define\n   custom sorting.\n   \n   @typedef {CustomEvent} coral-table:beforecolumnsort\n   \n   @property {TableColumn} detail.column\n   The column to be sorted.\n   @property {String} detail.direction\n   The requested sorting direction for the column.\n   */\n  \n  /**\n   Triggered when a {@link Table} column is sorted.\n   \n   @typedef {CustomEvent} coral-table:columnsort\n   \n   @param {TableColumn} detail.column\n   The sorted column.\n   */\n  \n  /**\n   Triggered before a {@link Table} column is dragged. Can be used to cancel column dragging.\n   \n   @typedef {CustomEvent} coral-table:beforecolumndrag\n   \n   @property {TableColumn} detail.column\n   The dragged column.\n   @property {TableColumn} detail.before\n   The column will be inserted before this sibling column.\n   If <code>null</code>, the column is inserted at the end.\n   */\n  \n  /**\n   Triggered when a {@link Table} column is dragged.\n   \n   @typedef {CustomEvent} coral-table:columndrag\n   \n   @property {TableColumn} detail.column\n   The dragged column.\n   @property {TableColumn} detail.oldBefore\n   The column next sibling before the swap.\n   If <code>null</code>, the column was the last item.\n   @property {TableColumn} detail.before\n   The column is inserted before this sibling column.\n   If <code>null</code>, the column is inserted at the end.\n   */\n  \n  /**\n   Triggered before a {@link Table} row is ordered. Can be used to cancel row ordering.\n   \n   @typedef {CustomEvent} coral-table:beforeroworder\n   \n   @property {TableRow} detail.row\n   The row to be ordered.\n   @property {TableRow} detail.before\n   The row will be inserted before this sibling row.\n   If <code>null</code>, the row is inserted at the end.\n   */\n  \n  /**\n   Triggered when a {@link Table} row is ordered.\n   \n   @typedef {CustomEvent} coral-table:roworder\n   \n   @property {TableRow} detail.row\n   The ordered row.\n   @property {TableRow} detail.oldBefore\n   The row next sibling before the swap.\n   If <code>null</code>, the row was the last item.\n   @param {TableRow} detail.before\n   The row is inserted before this sibling row.\n   If <code>null</code>, the row is inserted at the end.\n   */\n  \n  /**\n   Triggered when a {@linked Table} row is locked.\n   \n   @typedef {CustomEvent} coral-table:rowlock\n   \n   @property {TableRow} detail.row\n   The locked row.\n   */\n  \n  /**\n   Triggered when {@link Table} a row is locked.\n   \n   @typedef {CustomEvent} coral-table:rowunlock\n   \n   @property {TableRow} detail.row\n   The unlocked row.\n   */\n  \n  /**\n   Triggered when a {@link Table} row selection changed.\n   \n   @typedef {CustomEvent} coral-table:rowchange\n   \n   @property {Array.<TableCell>} detail.oldSelection\n   The old item selection. When {@link TableRow#multiple}, it includes an Array.\n   @property {Array.<TableCell>} detail.selection\n   The item selection. When {@link Coral.Table.Row#multiple}, it includes an Array.\n   @property {TableRow} detail.row\n   The targeted row.\n   */\n  \n  /**\n   Triggered when the {@link Table} selection changed.\n   \n   @typedef {CustomEvent} coral-table:change\n   \n   @property {Array.<TableRow>} detail.oldSelection\n   The old item selection. When {@link Table#multiple}, it includes an Array.\n   @property {Array.<TableRow>} detail.selection\n   The item selection. When {@link Table#multiple}, it includes an Array.\n   */\n}\n\nexport default Table;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Table.HeaderCell.Content\n @classdesc The Table HeaderCell content\n @htmltag coral-table-headercell-content\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-table-headercell-content');\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Table from './src/scripts/Table';\nimport TableColumn from './src/scripts/TableColumn';\nimport TableCell from './src/scripts/TableCell';\nimport TableHeaderCell from './src/scripts/TableHeaderCell';\nimport TableHeaderCellContent from './src/scripts/TableHeaderCellContent';\nimport TableRow from './src/scripts/TableRow';\nimport TableHead from './src/scripts/TableHead';\nimport TableBody from './src/scripts/TableBody';\nimport TableFoot from './src/scripts/TableFoot';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-table-column', TableColumn, {extends: 'col'});\nwindow.customElements.define('coral-table-cell', TableCell, {extends: 'td'});\nwindow.customElements.define('coral-table-headercell', TableHeaderCell, {extends: 'th'});\nwindow.customElements.define('coral-table-row', TableRow, {extends: 'tr'});\nwindow.customElements.define('coral-table-head', TableHead, {extends: 'thead'});\nwindow.customElements.define('coral-table-body', TableBody, {extends: 'tbody'});\nwindow.customElements.define('coral-table-foot', TableFoot, {extends: 'tfoot'});\nwindow.customElements.define('coral-table', Table, {extends: 'table'});\n\nTable.Column = TableColumn;\nTable.Cell = TableCell;\nTable.HeaderCell = TableHeaderCell;\nTable.HeaderCell.Content = TableHeaderCellContent;\nTable.Row = TableRow;\nTable.Head = TableHead;\nTable.Body = TableBody;\nTable.Foot = TableFoot;\n\nexport {Table};\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"icon\"] = document.createElement(\"coral-icon\");\n  el0.setAttribute(\"handle\", \"icon\");\n  el0.setAttribute(\"size\", \"XS\");\n  el0.className += \" _coral-TabList-item-icon\";\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n Gets the target panel of the item.\n \n @private\n @param {HTMLElement|String} [targetValue]\n A specific target value to use.\n \n @returns {?HTMLElement}\n */\nexport default function getTarget(targetValue) {\n  \n  if (targetValue instanceof Node) {\n    // Just return the provided Node\n    return targetValue;\n  }\n  \n  // Dynamically get the target node based on target\n  let newTarget = null;\n  if (typeof targetValue === 'string' && targetValue.trim() !== '') {\n    newTarget = document.querySelector(targetValue);\n  }\n  \n  return newTarget;\n}\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport base from '../templates/base';\nimport {transform, commons} from '../../../coralui-util';\nimport {Icon} from '../../../coralui-component-icon';\nimport getTarget from './getTarget';\n\nconst CLASSNAME = '_coral-TabList-item';\n\n/**\n @class Coral.Tab\n @classdesc A Tab component\n @htmltag coral-tab\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Tab extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Templates\n    this._elements = {\n      label: this.querySelector('coral-tab-label') || document.createElement('coral-tab-label')\n    };\n    base.call(this._elements);\n  \n    // Listen for mutations\n    this._observer = new MutationObserver(() => {\n      // Change icon size if the label is empty\n      const icon = this._elements.icon;\n      if (icon) {\n        icon.size = this._elements.label.textContent.trim().length ? Icon.size.EXTRA_SMALL : Icon.size.SMALL;\n      }\n      \n      this.trigger('coral-tab:_sizechanged');\n    });\n  \n    // Watch for changes to the label element\n    this._observer.observe(this._elements.label, {\n      childList: true,\n      characterData: true,\n      subtree: true\n    });\n  }\n  \n  /**\n   The label of the tab.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get label() {\n    return this._getContentZone(this._elements.label);\n  }\n  set label(value) {\n    this._setContentZone('label', value, {\n      handle: 'label',\n      tagName: 'coral-tab-label',\n      insert: function(label) {\n        this.appendChild(label);\n      }\n    });\n  }\n  \n  /**\n   Specifies the name of the icon used inside the Tab. See {@link Icon} for valid icon names.\n   \n   @type {String}\n   @default \"\"\n   @htmlattribute icon\n   */\n  get icon() {\n    const iconElement = this._elements.icon;\n    return iconElement ? iconElement.icon : '';\n  }\n  set icon(value) {\n    const iconElement = this._elements.icon;\n    iconElement.icon = value;\n  \n    // removes the icon element from the DOM.\n    if (this.icon === '') {\n      iconElement.remove();\n      this.trigger('coral-tab:_sizechanged');\n    }\n    // adds the icon back since it was blown away by textContent\n    else if (!iconElement.parentElement) {\n      // Change icon size if the label is empty\n      if (!this._elements.label.textContent.trim().length) {\n        iconElement.size = Icon.size.SMALL;\n      }\n      this.insertBefore(iconElement, this.firstChild);\n      this.trigger('coral-tab:_sizechanged');\n    }\n  }\n  \n  /**\n   Whether the current Tab is invalid.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute invalid\n   @htmlattributereflected\n   */\n  get invalid() {\n    return this._invalid || false;\n  }\n  set invalid(value) {\n    this._invalid = transform.booleanAttr(value);\n    this._reflectAttribute('invalid', this._invalid);\n    \n    this.classList.toggle('is-invalid', this._invalid);\n    this.setAttribute('aria-invalid', this._invalid);\n  }\n  \n  /**\n   Whether this Tab is disabled. When set to true, this will prevent every user interacting with the Tab. If\n   disabled is set to true for a selected Tab it will be deselected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n  \n    this.classList.toggle('is-disabled', this.disabled);\n    this.setAttribute('aria-disabled', this.disabled);\n    \n    if (this._disabled && this.selected) {\n      this.selected = false;\n    }\n    \n    if (!this._disabled && !this.selected) {\n      // We inform the parent to verify if this item should be selected because it's the only one left\n      this.trigger('coral-tab:_validateselection');\n    }\n  }\n  \n  /**\n   Whether the tab is selected.\n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    value = transform.booleanAttr(value);\n    \n    if (!value || value && !this.disabled) {\n      this._selected = value;\n      this._reflectAttribute('selected', this.disabled ? false : this._selected);\n  \n      this.classList.toggle('is-selected', this._selected);\n      this.setAttribute('tabindex', this._selected ? '0' : '-1');\n      this.setAttribute('aria-selected', this._selected);\n  \n      // in case the tab is selected, we need to communicate it to the panels.\n      if (this._selected) {\n        this._selectTarget();\n      }\n      this.trigger('coral-tab:_selectedchanged');\n    }\n  }\n  \n  /**\n   The target element that will be selected when this Tab is selected. It accepts a CSS selector or a DOM element.\n   If a CSS Selector is provided, the first matching element will be used.\n   \n   @type {?HTMLElement|String}\n   @default null\n   @htmlattribute target\n   */\n  get target() {\n    return typeof this._target === 'string' ? this._target : this._target || null;\n  }\n  set target(value) {\n    if (value === null || typeof value === 'string' || value instanceof Node) {\n      this._target = value;\n  \n      const realTarget = getTarget(this.target);\n  \n      // we add proper accessibility if available\n      if (realTarget) {\n        // creates a 2 way binding for accessibility\n        this.setAttribute('aria-controls', realTarget.id);\n        realTarget.setAttribute('aria-labelledby', this.id);\n      }\n    }\n  }\n  \n  /**\n   Selects the target item\n   \n   @ignore\n   */\n  _selectTarget() {\n    let realTarget = getTarget(this.target);\n    // if the target was define at the tab level, it has precedence over everything\n    if (realTarget) {\n      realTarget.setAttribute('selected', '');\n    }\n    // otherwise, we use the target defined at the tablist level\n    else {\n      const tabList = this.parentNode;\n    \n      if (tabList && tabList.target) {\n        realTarget = getTarget(tabList.target);\n      \n        if (realTarget) {\n          // we get the position of this tab inside the tablist\n          const currentIndex = tabList.items.getAll().indexOf(this);\n        \n          // we select the item with the same index\n          const targetItem = (realTarget.items ? realTarget.items.getAll() : realTarget.children)[currentIndex];\n        \n          // we select the item if it exists\n          if (targetItem) {\n            targetItem.setAttribute('selected', '');\n          }\n        }\n      }\n    }\n  }\n  \n  get _contentZones() { return {'coral-tab-label': 'label'}; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['selected', 'disabled', 'icon', 'invalid', 'target'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // adds the role to support accessibility\n    this.setAttribute('role', 'tab');\n  \n    // Generate a unique ID for the tab panel if one isn't already present\n    // This will be used for accessibility purposes\n    this.setAttribute('id', this.id || commons.getUID());\n  \n    // Create a fragment\n    const frag = document.createDocumentFragment();\n    \n    // Render the main template\n    if (this.icon) {\n      frag.appendChild(this._elements.icon);\n    }\n  \n    const label = this._elements.label;\n  \n    // Remove it so we can process children\n    if (label.parentNode) {\n      label.parentNode.removeChild(label);\n    }\n    \n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && child.getAttribute('handle') !== 'icon') {\n        // Add non-template elements to the label\n        label.appendChild(child);\n      }\n      else {\n        this.removeChild(child);\n      }\n    }\n  \n    // Add the frag to the component\n    this.appendChild(frag);\n  \n    // Assign the content zones, moving them into place in the process\n    this.label = label;\n  \n    // Query the tab target once the tab item is inserted in the DOM\n    if (this.selected) {\n      this._selectTarget();\n    }\n  }\n}\n\nexport default Tab;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nconst CLASSNAME = '_coral-TabList-item-label';\n\n/**\n @class Coral.Tab.Label\n @classdesc Tab's label component\n @htmltag coral-tab-label\n @extends {HTMLElement}\n */\nclass TabLabel extends HTMLElement {\n  /** @ignore */\n  connectedCallback() {\n    this.classList.add(CLASSNAME);\n  }\n}\n\nexport default TabLabel;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0;\n  var el0 = this[\"line\"] = document.createElement(\"div\");\n  el0.setAttribute(\"handle\", \"line\");\n  el0.setAttribute(\"hidden\", \"\");\n  el0.className += \" _coral-TabList-item-line\";\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport {transform, validate, commons} from '../../../coralui-util';\nimport line from '../templates/line';\nimport getTarget from './getTarget';\n\n/**\n Enumeration for {@link TabList} sizes.\n \n @typedef {Object} TabListSizeEnum\n \n @property {String} MEDIUM\n A medium-sized tablist. This is the default.\n @property {String} LARGE\n Not supported. Falls back to MEDIUM.\n */\nconst size = {\n  MEDIUM: 'M',\n  LARGE: 'L'\n};\n\n/**\n Enumeration for {@link TabList} orientations.\n \n @typedef {Object} TabListOrientationEnum\n \n @property {String} HORIZONTAL\n Horizontal TabList, this is the default value.\n @property {String} VERTICAL\n Vertical TabList.\n */\nconst orientation = {\n  HORIZONTAL: 'horizontal',\n  VERTICAL: 'vertical'\n};\n\n/**\n Enumeration for {@link TabList} variant.\n \n @typedef {Object} TabListVariantEnum\n \n @property {String} PAGE\n A page TabList. This is the default value.\n @property {String} PANEL\n A panel TabList.\n @property {String} ANCHORED\n An anchored TabList.\n */\nconst variant = {\n  PAGE: 'page',\n  PANEL: 'panel',\n  ANCHORED: 'anchored'\n};\n\n// the tablist's base classname\nconst CLASSNAME = '_coral-TabList';\n\n// An array of all possible variant classnames\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantValue in variant) {\n  ALL_VARIANT_CLASSES.push(`${CLASSNAME}--${variant[variantValue]}`);\n}\n\n/**\n @class Coral.TabList\n @classdesc A TabList component holds a collection of tabs.\n @htmltag coral-tablist\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass TabList extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Templates\n    this._elements = {};\n    line.call(this._elements);\n    \n    // Attach events\n    this._delegateEvents({\n      'click > coral-tab': '_onTabClick',\n      'key:home > coral-tab': '_onHomeKey',\n      'key:end > coral-tab': '_onEndKey',\n      'key:pagedown > coral-tab': '_selectNextItem',\n      'key:right > coral-tab': '_selectNextItem',\n      'key:down > coral-tab': '_selectNextItem',\n      'key:pageup > coral-tab': '_selectPreviousItem',\n      'key:left > coral-tab': '_selectPreviousItem',\n      'key:up > coral-tab': '_selectPreviousItem',\n      \n      // private\n      'coral-tab:_selectedchanged': '_onItemSelectedChanged',\n      'coral-tab:_validateselection': '_onValidateSelection',\n      'coral-tab:_sizechanged': '_setLine'\n    });\n    \n    // Used for eventing\n    this._oldSelection = null;\n    \n    this._setLine = this._setLine.bind(this);\n    \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  }\n  \n  /**\n   The TabList variant style to use. See {@link TabListVariantEnum}.\n   \n   @type {String}\n   @default TabListVariantEnum.PAGE\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.PAGE;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.PAGE;\n    this._reflectAttribute('variant', this._variant);\n    \n    // Remove all variant classes\n    this.classList.remove(...ALL_VARIANT_CLASSES);\n    \n    // Set new variant class\n    this.classList.add(`${CLASSNAME}--${this._variant}`);\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // just init on demand\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-tab',\n        onItemAdded: this._onItemAdded,\n        onItemRemoved: this._onItemRemoved\n      });\n    }\n    return this._items;\n  }\n  \n  /**\n   The selected item in the TabList.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getLastSelected();\n  }\n  \n  /**\n   The target component that will be linked to the TabList. It accepts either a CSS selector or a DOM element. If a\n   CSS Selector is provided, the first matching element will be used. Items will be selected based on the index. If\n   both target and {@link Coral.Tab#target} are set, the second will have higher priority.\n   \n   @type {?HTMLElement|String}\n   @default null\n   @htmlattribute target\n   */\n  get target() {\n    return typeof this._target === 'string' ? this._target : this._target || null;\n  }\n  set target(value) {\n    if (value === null || typeof value === 'string' || value instanceof Node) {\n      this._target = value;\n      \n      const self = this;\n      // we do in case the target was not yet in the DOM\n      window.requestAnimationFrame(() => {\n        const realTarget = getTarget(self._target);\n  \n        // we add proper accessibility if available\n        if (realTarget) {\n    \n          const tabItems = self.items.getAll();\n          const panelItems = realTarget.items ? realTarget.items.getAll() : realTarget.children;\n    \n          // we need to add a11y to all component, no matter if they can be perfectly paired\n          const maxItems = Math.max(tabItems.length, panelItems.length);\n    \n          let tab;\n          let panel;\n          for (let i = 0; i < maxItems; i++) {\n      \n            tab = tabItems[i];\n            panel = panelItems[i];\n      \n            // if the tab has its own target, we assume the target component will handle its own accessibility. if the\n            // target is an empty string we simply ignore it\n            if (tab && tab.target && tab.target.trim() !== '') {\n              continue;\n            }\n      \n            if (tab && panel) {\n              // sets the required ids\n              tab.id = tab.id || commons.getUID();\n              panel.id = panel.id || commons.getUID();\n        \n              // creates a 2 way binding for accessibility\n              tab.setAttribute('aria-controls', panel.id);\n              panel.setAttribute('aria-labelledby', tab.id);\n            }\n            else if (tab) {\n              // cleans the aria since there is no matching panel\n              tab.removeAttribute('aria-controls');\n            }\n            else {\n              // cleans the aria since there is no matching tab\n              panel.removeAttribute('aria-labelledby');\n            }\n          }\n        }\n      });\n    }\n  }\n  \n  /**\n   The size of the TabList. It accepts both lower and upper case sizes. Currently only \"M\" (the default) and \"L\"\n   are available.\n   See {@link TabListSizeEnum}.\n   \n   @type {String}\n   @default TabListSizeEnum.MEDIUM\n   @htmlattribute size\n   @htmlattributereflected\n   */\n  get size() {\n    return this._size || size.MEDIUM;\n  }\n  set size(value) {\n    value = transform.string(value).toUpperCase();\n    this._size = validate.enumeration(size)(value) && value || size.MEDIUM;\n    this._reflectAttribute('size', this._size);\n    \n    this.classList[this._size === size.LARGE ? 'add' : 'remove'](`${CLASSNAME}--large`);\n  }\n  \n  /**\n   Orientation of the TabList. See {@link TabListOrientationEnum}.\n   \n   @type {String}\n   @default TabListOrientationEnum.HORIZONTAL\n   @htmlattribute orientation\n   @htmlattributereflected\n   */\n  get orientation() {\n    return this._orientation || orientation.HORIZONTAL;\n  }\n  set orientation(value) {\n    value = transform.string(value).toLowerCase();\n    this._orientation = validate.enumeration(orientation)(value) && value || orientation.HORIZONTAL;\n    this._reflectAttribute('orientation', this._orientation);\n  \n    this.classList.toggle(`${CLASSNAME}--vertical`, this._orientation === orientation.VERTICAL);\n    this.classList.toggle(`${CLASSNAME}--horizontal`, this._orientation === orientation.HORIZONTAL);\n    \n    this._setLine(true);\n  }\n  \n  /** @private */\n  _onItemAdded(item) {\n    if (!this.selectedItem) {\n      item.setAttribute('selected', '');\n    }\n    else {\n      this._validateSelection(item);\n    }\n  }\n  \n  /** @private */\n  _onItemRemoved() {\n    if (!this.selectedItem) {\n      this._selectFirstItem();\n    }\n  }\n  \n  /** @private */\n  _onTabClick(event) {\n    event.preventDefault();\n    \n    const item = event.matchedTarget;\n    this._toggleItemSelectionAndFocus(item);\n  }\n  \n  /** @private */\n  _onHomeKey(event) {\n    event.preventDefault();\n    \n    const item = this.items._getFirstSelectable();\n    this._toggleItemSelectionAndFocus(item);\n  }\n  \n  /** @private */\n  _onEndKey(event) {\n    event.preventDefault();\n    \n    const item = this.items._getLastSelectable();\n    this._toggleItemSelectionAndFocus(item);\n  }\n  \n  /** @private */\n  _selectNextItem(event) {\n    event.preventDefault();\n    \n    const item = this.selectedItem;\n    this._toggleItemSelectionAndFocus(this.items._getNextSelectable(item));\n  }\n  \n  /** @private */\n  _selectPreviousItem(event) {\n    event.preventDefault();\n    \n    const item = this.selectedItem;\n    this._toggleItemSelectionAndFocus(this.items._getPreviousSelectable(item));\n  }\n  \n  /** @private */\n  _toggleItemSelectionAndFocus(item) {\n    if (item && !item.hasAttribute('selected')) {\n      item.setAttribute('selected', '');\n      item.focus();\n    }\n  }\n  \n  /** @private */\n  _onItemSelectedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    this._validateSelection(event.target);\n  }\n  \n  /** @private */\n  _onValidateSelection(event) {\n    event.stopImmediatePropagation();\n    \n    this._validateSelection();\n  }\n  \n  /** @private */\n  _selectFirstItem() {\n    const item = this.items._getFirstSelectable();\n    if (item) {\n      item.setAttribute('selected', '');\n    }\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    const selectedItems = this.items._getAllSelected();\n    \n    if (item) {\n      // Deselected item\n      if (!item.hasAttribute('selected') && !selectedItems.length) {\n        const siblingItem = this.items._getNextSelectable(item);\n        // Next selectable item is forced to be selected if selection is cleared\n        if (item !== siblingItem) {\n          siblingItem.setAttribute('selected', '');\n        }\n      }\n      // Selected item\n      else if (item.hasAttribute('selected') && selectedItems.length > 1) {\n        selectedItems.forEach((selectedItem) => {\n          if (selectedItem !== item) {\n            // Don't trigger change events\n            this._preventTriggeringEvents = true;\n            selectedItem.removeAttribute('selected');\n          }\n        }, this);\n  \n        // We can trigger change events again\n        this._preventTriggeringEvents = false;\n      }\n    }\n    else if (selectedItems.length > 1) {\n      // If multiple items are selected, the last one wins\n      item = selectedItems[selectedItems.length - 1];\n      \n      selectedItems.forEach((selectedItem) => {\n        if (selectedItem !== item) {\n          // Don't trigger change events\n          this._preventTriggeringEvents = true;\n          selectedItem.removeAttribute('selected');\n        }\n      }, this);\n  \n      // We can trigger change events again\n      this._preventTriggeringEvents = false;\n    }\n    // First selectable item is forced to be selected if no selection at all\n    else if (!selectedItems.length) {\n      this._selectFirstItem();\n    }\n    \n    this._setLine();\n    \n    this._triggerChangeEvent();\n  }\n  \n  _setLine(clear) {\n    window.requestAnimationFrame(() => {\n      const selectedItem = this.selectedItem;\n      \n      // Position line under the selected item\n      if (selectedItem) {\n        if (this.orientation === orientation.HORIZONTAL) {\n          const padding = window.parseInt(window.getComputedStyle(selectedItem).paddingLeft);\n          const left = selectedItem.offsetLeft + padding;\n          const width = selectedItem.clientWidth - padding * 2;\n  \n          // Orientation changed\n          if (clear) {\n            this._elements.line.style.height = '';\n          }\n          \n          this._elements.line.style.width = `${width}px`;\n          this._elements.line.style.transform = `translate(${left}px, 0)`;\n        }\n        else if (this.orientation === orientation.VERTICAL) {\n          const top = selectedItem.offsetTop;\n          const height = selectedItem.clientHeight;\n  \n          // Orientation changed\n          if (clear) {\n            this._elements.line.style.width = '';\n          }\n          \n          this._elements.line.style.height = `${height}px`;\n          this._elements.line.style.transform = `translate(0, ${top}px)`;\n        }\n        \n        this._elements.line.hidden = false;\n      }\n      else {\n        // Hide line if no selected item\n        this._elements.line.hidden = true;\n      }\n    });\n  }\n  \n  /** @private */\n  _triggerChangeEvent() {\n    const selectedItem = this.selectedItem;\n    const oldSelection = this._oldSelection;\n    \n    if (!this._preventTriggeringEvents && selectedItem !== oldSelection) {\n      this.trigger('coral-tablist:change', {\n        oldSelection: oldSelection,\n        selection: selectedItem\n      });\n      \n      this._oldSelection = selectedItem;\n    }\n  }\n  \n  /**\n   Returns {@link TabList} sizes.\n   \n   @return {TabListSizeEnum}\n   */\n  static get size() {\n    return size;\n  }\n  \n  /**\n   Returns {@link TabList} orientation options.\n   \n   @return {TabListOrientationEnum}\n   */\n  static get orientation() {\n    return orientation;\n  }\n  \n  /**\n   Returns {@link TabList} variants.\n   \n   @return {TabListVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['target', 'size', 'orientation', 'variant'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // adds the role to support accessibility\n    this.setAttribute('role', 'tablist');\n    this.setAttribute('aria-multiselectable', 'false');\n    \n    // Default reflected attributes\n    if (!this._size) { this.size = size.MEDIUM; }\n    if (!this._orientation) { this.orientation = orientation.HORIZONTAL; }\n    if (!this._variant) { this.variant = variant.PAGE; }\n    \n    // Support cloneNode\n    const template = this.querySelector('._coral-TabList-item-line');\n    if (template) {\n      template.remove();\n    }\n  \n    // Remove the object if it's already there\n    const object = this.querySelector('object');\n    if (object && object.parentNode === this) {\n      this.removeChild(object);\n    }\n    \n    // Insert tab line\n    this.appendChild(this._elements.line);\n    \n    // Don't trigger events once connected\n    this._preventTriggeringEvents = true;\n    this._validateSelection();\n    this._preventTriggeringEvents = false;\n    \n    this._oldSelection = this.selectedItem;\n    \n    // Display line once tabList is shown\n    commons.addResizeListener(this, this._setLine);\n  }\n  \n  /**\n   Triggered when the {@link TabList} selected item has changed.\n \n   @typedef {CustomEvent} coral-tablist:change\n   \n   @property {Tab} event.detail.oldSelection\n   The prior selected item(s).\n   @property {Tab} event.detail.selection\n   The newly selected item(s).\n   */\n}\n\nexport default TabList;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Tab from './src/scripts/Tab';\nimport TabLabel from './src/scripts/TabLabel';\nimport TabList from './src/scripts/TabList';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-tab', Tab);\nwindow.customElements.define('coral-tab-label', TabLabel);\nwindow.customElements.define('coral-tablist', TabList);\n\nTab.Label = TabLabel;\n\nexport {Tab, TabList};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport '../../../coralui-component-panelstack';\nimport '../../../coralui-component-tablist';\nimport {commons} from '../../../coralui-util';\n\n/**\n Enumeration for {@link TabView} orientations.\n \n @typedef {Object} TabViewOrientationEnum\n \n @property {String} HORIZONTAL\n Tabs on top of the panels. This is the default.\n @property {String} VERTICAL\n Tabs are rendered on the side and match the height of the panels.\n */\n\nconst orientation = {\n  HORIZONTAL: 'horizontal',\n  VERTICAL: 'vertical'\n};\n\n// the tabview's base classname\nconst CLASSNAME = '_coral-TabView';\n\n/**\n @class Coral.TabView\n @classdesc A TabView component is the wrapping container used to create the typical Tabbed pattern.\n This is intended to be used with a {@link TabList} and {@link PanelStack}.\n @htmltag coral-tabview\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass TabView extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      // Fetch or create the content zone elements\n      tabList: this.querySelector('coral-tablist') || document.createElement('coral-tablist'),\n      panelStack: this.querySelector('coral-panelstack') || document.createElement('coral-panelstack')\n    };\n    \n    // Events\n    this._delegateEvents({\n      'coral-tablist:change > coral-tablist': '_onTabListChange',\n      'coral-panelstack:change > coral-panelstack': '_onPanelStackChange',\n      'coral-collection:add > coral-tablist': '_syncTabListAndPanelStack',\n      'coral-collection:remove > coral-tablist': '_syncTabListAndPanelStack',\n      'coral-collection:add > coral-panelstack': '_syncTabListAndPanelStack',\n      'coral-collection:remove > coral-panelstack': '_syncTabListAndPanelStack'\n    });\n  }\n  \n  /**\n   The TabView's orientation. See {@link TabViewOrientationEnum}.\n   \n   @type {String}\n   @default TabViewOrientationEnum.HORIZONTAL\n   @htmlattribute orientation\n   @htmlattributereflected\n   */\n  get orientation() {\n    return this._elements.tabList.getAttribute('orientation') || orientation.HORIZONTAL;\n  }\n  set orientation(value) {\n    // We rely on the tablist orientation enum so don't need to double check enums\n    this._elements.tabList.setAttribute('orientation', value);\n    this._reflectAttribute('orientation', this.orientation);\n  \n    this.classList[this.orientation === orientation.VERTICAL ? 'add' : 'remove'](`${CLASSNAME}--vertical`);\n  }\n  \n  /**\n   The TabList which handles all the tabs.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get tabList() {\n    return this._getContentZone(this._elements.tabList);\n  }\n  set tabList(value) {\n    this._setContentZone('tabList', value, {\n      handle: 'tabList',\n      tagName: 'coral-tablist',\n      insert: function(tabs) {\n        this.insertBefore(tabs, this._elements.panelStack || null);\n      }\n    });\n  }\n  \n  /**\n   The PanelStack which contains all the panels.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get panelStack() {\n    return this._getContentZone(this._elements.panelStack);\n  }\n  set panelStack(value) {\n    this._setContentZone('panelStack', value, {\n      handle: 'panelStack',\n      tagName: 'coral-panelstack',\n      insert: function(panels) {\n        this.appendChild(panels);\n      }\n    });\n  }\n  \n  /**\n   Detects a change in the TabList and triggers an event.\n   \n   @private\n   */\n  _onTabListChange(event) {\n    this.trigger('coral-tabview:change', {\n      selection: event.detail.selection,\n      oldSelection: event.detail.oldSelection\n    });\n  }\n  \n  /** @private */\n  _onPanelStackChange(event) {\n    // everytime the panelstack changes, we verify that the tablist and panelstack are up to date\n    if (event.detail.selection) {\n    \n      const tabSelector = event.detail.selection.getAttribute('aria-labelledby');\n      const tab = document.getElementById(tabSelector);\n    \n      // we select the tab if this was not the case\n      if (tab && !tab.hasAttribute('selected')) {\n        tab.setAttribute('selected', '');\n      }\n    }\n  }\n  \n  /** @private */\n  _syncTabListAndPanelStack() {\n    this._elements.tabList.target = this._elements.tabList.target;\n  }\n  \n  get _contentZones() {\n    return {\n      'coral-tablist': 'tabList',\n      'coral-panelstack': 'panelStack'\n    };\n  }\n  \n  /**\n   Returns {@link TabView} orientation options.\n   \n   @return {TabViewOrientationEnum}\n   */\n  static get orientation() { return orientation; }\n  \n  /** @ignore */\n  static get observedAttributes() { return ['orientation']; }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // Default reflected attributes\n    if (!this._orientation) { this.orientation = this.orientation; }\n  \n    // Fetch or create the content zone elements\n    const tabs = this._elements.tabList;\n    const panels = this._elements.panelStack;\n  \n    // Bind the tablist and panel stack together, using the panel id\n    panels.id = panels.id || commons.getUID();\n    tabs.setAttribute('target', `#${panels.id}`);\n  \n    // Assign the content zones.\n    this.panelStack = panels;\n    this.tabList = tabs;\n  }\n  \n  /**\n   Triggered when the {@link TabView} selected tab panel item has changed.\n \n   @typedef {CustomEvent} coral-tabview:change\n   \n   @property {Tab} event.detail.selection\n   The new selected tab panel item.\n   @param {Tab} event.detail.oldSelection\n   The prior selected tab panel item.\n   */\n}\n\nexport default TabView;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport TabView from './src/scripts/TabView';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-tabview', TabView);\n\nexport {TabView};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {FormFieldMixin} from '../../../coralui-mixin-formfield';\nimport {transform, validate, commons} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-Textfield';\n\n/**\n Enumeration for {@link Textarea} variants.\n \n @typedef {Object} TextareaVariantEnum\n \n @property {String} DEFAULT\n A default textarea.\n @property {String} QUIET\n A textarea with no border or background.\n */\nconst variant = {\n  DEFAULT: 'default',\n  QUIET: 'quiet'\n};\n\n// Builds a string containing all possible variant classnames. This will be used to remove classnames when the variant\n// changes\nconst ALL_VARIANT_CLASSES = [];\nfor (const variantValue in variant) {\n  ALL_VARIANT_CLASSES.push(`${CLASSNAME}--${variant[variantValue]}`);\n}\n\n/**\n @class Coral.Textarea\n @classdesc A Textarea component is the default multi-line text form field.\n @htmltag coral-textarea\n @htmlbasetag textarea\n @extends {HTMLTextAreaElement}\n @extends {ComponentMixin}\n @extends {FormFieldMixin}\n */\nclass Textarea extends FormFieldMixin(ComponentMixin(HTMLTextAreaElement)) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    this._delegateEvents(commons.extend(this._events, {\n      input: '_onInput'\n    }));\n  }\n  \n  /**\n   The textarea's variant. See {@link TextareaVariantEnum}.\n   \n   @type {String}\n   @default TextareaVariantEnum.DEFAULT\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DEFAULT;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant)(value) && value || variant.DEFAULT;\n    this._reflectAttribute('variant', this._variant);\n  \n    // removes every existing variant\n    this.classList.remove(...ALL_VARIANT_CLASSES);\n\n    if (this._variant !== variant.DEFAULT) {\n      this.classList.add(`${CLASSNAME}--${this._variant}`);\n    }\n    \n    // Restore the original height\n    if (this._variant === variant.QUIET) {\n      this._defaultHeight = this._defaultHeight || this.style.height;\n    }\n    else {\n      this.style.height = this._defaultHeight;\n      this._defaultHeight = undefined;\n    }\n\n    this._onInput();\n  }\n  \n  /**\n   Inherited from {@link FormFieldMixin#reset}.\n   */\n  reset() {\n    // the textarea uses the textContent to save the old value and not the value attribute\n    /** @ignore */\n    this.value = this.textContent;\n  }\n  \n  /** @private */\n  _onInput() {\n    if (this.variant === variant.QUIET) {\n      this.style.height = 'auto';\n      this.style.height = `${this.scrollHeight}px`;\n    }\n  }\n  \n  /**\n   Returns {@link Textarea} variants.\n   \n   @return {TextareaVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return super._nativeObservedAttributes.concat(['variant']);\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    this.classList.add(`${CLASSNAME}--multiline`);\n    \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DEFAULT; }\n  }\n}\n\nexport default Textarea;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Textarea from './src/scripts/Textarea';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-textarea', Textarea, {extends: 'textarea'});\n\nexport {Textarea};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {SelectableCollection} from '../../../coralui-collection';\nimport {transform} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-TreeView';\n\nconst INDICATOR_HIT_SIZE = {x: 30, y: 36};\n\n/**\n @class Coral.Tree\n @classdesc A Tree component is a container component to display collapsible content.\n Tree items don't expand by default. It's the developer's responsibility to handle it by listening to the\n {@link coral-collection:add} and {@link coral-collection:remove} events.\n @htmltag coral-tree\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass Tree extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Attach events\n    this._delegateEvents({\n      'click ._coral-TreeView-link': '_onItemClick',\n      'coral-collection:add coral-tree-item': '_onCollectionChange',\n      'coral-collection:remove coral-tree-item': '_onCollectionChange',\n      // a11y\n      'key:space ._coral-TreeView-link': '_onItemClick',\n      'key:enter ._coral-TreeView-link': '_onExpandCollapseClick',\n      'key:pageup ._coral-TreeView-link': '_onFocusPreviousItem',\n      'key:left ._coral-TreeView-link': '_onFocusPreviousItem',\n      'key:up ._coral-TreeView-link': '_onFocusPreviousItem',\n      'key:pagedown ._coral-TreeView-link': '_onFocusNextItem',\n      'key:right ._coral-TreeView-link': '_onFocusNextItem',\n      'key:down ._coral-TreeView-link': '_onFocusNextItem',\n      'key:home ._coral-TreeView-link': '_onFocusFirstItem',\n      'key:end ._coral-TreeView-link': '_onFocusLastItem',\n      'capture:blur ._coral-TreeView-link[tabindex=\"0\"]': '_onItemBlur',\n      // private\n      'coral-tree-item:_selectedchanged': '_onItemSelectedChanged',\n      'coral-tree-item:_disabledchanged': '_onFocusableChanged',\n      'coral-tree-item:_expandedchanged': '_onFocusableChanged',\n      'coral-tree-item:_afterexpandedchanged': '_onExpandedChanged',\n      'coral-tree-item:_hiddenchanged': '_onFocusableChanged'\n    });\n    \n    // Used for eventing\n    this._oldSelection = [];\n    \n    // Init the collection mutation observer\n    this.items._startHandlingItems(true);\n  \n    // Listen for mutations for Torq compatibility\n    const self = this;\n    const observer = new MutationObserver((mutations) => {\n      mutations.forEach((mutation) => {\n        for (let i = 0; i < mutation.addedNodes.length; i++) {\n          const addedNode = mutation.addedNodes[i];\n          if (addedNode.tagName === 'CORAL-TREE-ITEM') {\n            // Move tree items to their container\n            if (addedNode.parentNode.tagName === addedNode.tagName) {\n              addedNode.parentNode._elements.subTreeContainer.appendChild(addedNode);\n            }\n          }\n        }\n      });\n    });\n\n    observer.observe(self, {\n      childList: true,\n      subtree: true\n    });\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {SelectableCollection}\n   @readonly\n   */\n  get items() {\n    // just init on demand\n    if (!this._items) {\n      this._items = new SelectableCollection({\n        host: this,\n        itemTagName: 'coral-tree-item'\n      });\n    }\n    return this._items;\n  }\n  \n  /**\n   Indicates whether the tree accepts multiple selected items.\n   @type {Boolean}\n   @default false\n   @htmlattribute multiple\n   @htmlattributereflected\n   */\n  get multiple() {\n    return this._multiple || false;\n  }\n  set multiple(value) {\n    this._multiple = transform.booleanAttr(value);\n    this._reflectAttribute('multiple', this._multiple);\n    \n    this.setAttribute('aria-multiselectable', this._multiple);\n    \n    this._validateSelection();\n  }\n  \n  /**\n   Returns an Array containing the set selected items.\n   @type {Array.<HTMLElement>}\n   @readonly\n   */\n  get selectedItems() {\n    return this.items._getAllSelected();\n  }\n  \n  /**\n   Returns the first selected item in the Tree. The value <code>null</code> is returned if no element is\n   selected.\n   @type {?HTMLElement}\n   @readonly\n   */\n  get selectedItem() {\n    return this.items._getAllSelected()[0] || null;\n  }\n  \n  /** @private */\n  _onItemSelectedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    this._validateSelection(event.target);\n  }\n  \n  /** @private */\n  _validateSelection(item) {\n    const selectedItems = this.selectedItems;\n    \n    if (!this.multiple) {\n      // Last selected item wins if multiple selection while not allowed\n      item = item || selectedItems[selectedItems.length - 1];\n      \n      if (item && item.hasAttribute('selected') && selectedItems.length > 1) {\n        selectedItems.forEach((selectedItem) => {\n          if (selectedItem !== item) {\n            // Don't trigger change events\n            this._preventTriggeringEvents = true;\n            selectedItem.removeAttribute('selected');\n          }\n        }, this);\n        \n        // We can trigger change events again\n        this._preventTriggeringEvents = false;\n      }\n    }\n    \n    this._triggerChangeEvent();\n  }\n  \n  /** @private */\n  _triggerChangeEvent() {\n    const selectedItems = this.selectedItems;\n    const oldSelection = this._oldSelection;\n    \n    if (!this._preventTriggeringEvents && this._arraysAreDifferent(selectedItems, oldSelection)) {\n      // We differentiate whether multiple is on or off and return an array or HTMLElement respectively\n      if (this.multiple) {\n        this.trigger('coral-tree:change', {\n          oldSelection: oldSelection,\n          selection: selectedItems\n        });\n      }\n      else {\n        // Return all items if we just switched from multiple=true to multiple=false and we had >1 selected items\n        this.trigger('coral-tree:change', {\n          oldSelection: oldSelection.length > 1 ? oldSelection : oldSelection[0] || null,\n          selection: selectedItems[0] || null\n        });\n      }\n      \n      this._oldSelection = selectedItems;\n    }\n  }\n  \n  /** @private */\n  _arraysAreDifferent(selection, oldSelection) {\n    let diff = [];\n    \n    if (oldSelection.length === selection.length) {\n      diff = oldSelection.filter((item) => selection.indexOf(item) === -1);\n    }\n    \n    // since we guarantee that they are arrays, we can start by comparing their size\n    return oldSelection.length !== selection.length || diff.length !== 0;\n  }\n  \n  /** @private */\n  _toggleItemAttribute(item, attributeName) {\n    if (item) {\n      item[item.hasAttribute(attributeName) ? 'removeAttribute' : 'setAttribute'](attributeName, '');\n    }\n  }\n  \n  /** @private */\n  _onCollectionChange(event) {\n    // Prevent triggering collection event twice. Only coral-tree collection events are propagated.\n    event.stopImmediatePropagation();\n  }\n  \n  /** @private */\n  _onItemClick(event) {\n    // Clickable item inside Tree Item should not trigger selection of item\n    if (event.target.hasAttribute('coral-interactive') || event.target.closest('[coral-interactive]')) {\n      return;\n    }\n    \n    // If the indicator is clicked, expand/collapse the tree item\n    if (event.target === event.matchedTarget && event.offsetX <= INDICATOR_HIT_SIZE.x && event.offsetY <= INDICATOR_HIT_SIZE.y) {\n      this._onExpandCollapseClick(event);\n      return;\n    }\n  \n    // The click was performed on the header so we select the item (parentNode) the selection is toggled\n    const item = event.target.closest('coral-tree-item');\n    if (item && !item.hasAttribute('disabled')) {\n      event.preventDefault();\n      event.stopPropagation();\n    \n      // We ignore the selection if the item is disabled\n      this._toggleItemAttribute(item, 'selected');\n      const focusable = this._getFocusable();\n      if (focusable) {\n        focusable.setAttribute('tabindex', '-1');\n      }\n      item._elements.header.setAttribute('tabindex', '0');\n      item._elements.header.focus();\n    }\n  }\n  \n  /** @private */\n  _onExpandCollapseClick(event) {\n    event.preventDefault();\n    event.stopPropagation();\n  \n    // The click was performed on the icon to expand/collapse  the sub tree\n    const item = event.target.closest('coral-tree-item');\n    if (item) {\n      // We ignore the expand/collapse if the item is disabled\n      if (item.hasAttribute('disabled')) {\n        return;\n      }\n    \n      // Toggle the expanded of the item:\n      this._toggleItemAttribute(item, 'expanded');\n    }\n  }\n  \n  /** @private */\n  _focusSiblingItem(item, next) {\n    const focusableItems = this._getFocusableItems();\n  \n    // There's not enough items to change focus\n    if (focusableItems.length < 2) {\n      return;\n    }\n  \n    let index = focusableItems.indexOf(item) + (next ? 1 : -1);\n    let siblingItem = null;\n  \n    // If we reached the edge, target the other edge\n    if (index > focusableItems.length - 1) {\n      siblingItem = focusableItems[0];\n    }\n    else if (index < 0) {\n      siblingItem = focusableItems[focusableItems.length - 1];\n    }\n  \n    // Find the sibling item\n    while (!siblingItem) {\n      siblingItem = focusableItems[index];\n      // The item might be hidden because a parent is collapsed\n      if (siblingItem.parentNode.closest('coral-tree-item.is-collapsed')) {\n        if (next) {\n          index++;\n          siblingItem = index > focusableItems.length - 1 ? item : null;\n        }\n        else {\n          index--;\n          siblingItem = index < 0 ? item : null;\n        }\n      }\n    }\n  \n    // Change focus\n    if (siblingItem !== item) {\n      item._elements.header.setAttribute('tabindex', '-1');\n      item._elements.header.classList.remove('focus-ring');\n      \n      siblingItem._elements.header.setAttribute('tabindex', '0');\n      siblingItem._elements.header.classList.add('focus-ring');\n      siblingItem._elements.header.focus();\n    }\n  }\n  \n  /** @private */\n  _focusEdgeItem(last) {\n    // Query the focusable item\n    const focusable = this._getFocusable();\n    if (focusable) {\n      const focusableItems = this._getFocusableItems();\n      const edgeItem = focusableItems[last ? focusableItems.length - 1 : 0];\n    \n      // Change focus\n      if (edgeItem !== focusable) {\n        focusable.setAttribute('tabindex', '-1');\n        edgeItem._elements.header.setAttribute('tabindex', '0');\n        edgeItem._elements.header.focus();\n      }\n    }\n  }\n  \n  /** @private */\n  _onFocusNextItem(event) {\n    event.preventDefault();\n    event.stopPropagation();\n  \n    const item = event.target.closest('coral-tree-item');\n    if (item) {\n      this._focusSiblingItem(item, true);\n    }\n  }\n  \n  /** @private */\n  _onFocusPreviousItem(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    \n    const item = event.target.closest('coral-tree-item');\n    if (item) {\n      this._focusSiblingItem(item, false);\n    }\n  }\n  \n  /** @private */\n  _onFocusFirstItem(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    \n    this._focusEdgeItem(false);\n  }\n  \n  /** @private */\n  _onFocusLastItem(event) {\n    event.preventDefault();\n    event.stopPropagation();\n  \n    this._focusEdgeItem(true);\n  }\n  \n  /** @private */\n  _onFocusableChanged(event) {\n    event.preventDefault();\n    event.stopPropagation();\n  \n    if (event.target.contains(this._getFocusable())) {\n      this._resetFocusableItem();\n    }\n  }\n  \n  /** @private */\n  _onExpandedChanged(event) {\n    event.stopImmediatePropagation();\n    \n    const item = event.target;\n    this.trigger(`coral-tree:${item.expanded ? 'expand' : 'collapse'}`, {item});\n  }\n  \n  /** @private */\n  _getFocusable() {\n    return this.querySelector('coral-tree-item > ._coral-TreeView-link[tabindex=\"0\"]');\n  }\n  \n  /** @private */\n  _getFocusableItems() {\n    return this.items.getAll().filter((item) => !item.closest('coral-tree-item[disabled]') && !item.closest('coral-tree-item[hidden]'));\n  }\n  \n  _onItemBlur() {\n    const focused = this.querySelector('._coral-TreeView-link.focus-ring');\n    if (focused) {\n      focused.classList.remove('focus-ring');\n    }\n  }\n  \n  /** @private */\n  _resetFocusableItem(item) {\n    // Old focusable becomes unfocusable\n    const focusable = this._getFocusable();\n    if (focusable) {\n      focusable.setAttribute('tabindex', '-1');\n      focusable.classList.remove('focus-ring');\n    }\n  \n    // Defined item or first item by default gets the focus\n    item = item || this._getFocusableItems()[0];\n    if (item) {\n      item._elements.header.setAttribute('tabindex', '0');\n    }\n  }\n  \n  /** @private */\n  _expandCollapseAll(expand) {\n    const coralTreeItems = this.querySelectorAll('coral-tree-item');\n    if (coralTreeItems) {\n      let item;\n      const length = coralTreeItems.length;\n      if (length > 0) {\n        for (let index = 0; index < length; index++) {\n          item = coralTreeItems[index];\n          if (item) {\n            item.expanded = expand;\n          }\n        }\n      }\n    }\n  }\n  \n  /**\n   Expand all the Tree Items\n   */\n  expandAll() {\n    this._expandCollapseAll(true);\n  }\n  \n  /**\n   Collapse all the Tree Items\n   */\n  collapseAll() {\n    this._expandCollapseAll(false);\n  }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['multiple'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n    \n    // a11y\n    this.setAttribute('role', 'tree');\n    this.setAttribute('aria-multiselectable', this.multiple);\n    \n    const self = this;\n    // Requires tree item API to be defined\n    window.customElements.whenDefined('coral-tree-item').then(() => {\n      // Enable keyboard interaction\n      self._resetFocusableItem();\n    });\n    \n    // Don't trigger events once connected\n    this._preventTriggeringEvents = true;\n    this._validateSelection();\n    this._preventTriggeringEvents = false;\n    \n    this._oldSelection = this.selectedItems;\n  }\n  \n  /**\n   Triggered when the {@link Tree} selection changed.\n \n   @typedef {CustomEvent} coral-tree:change\n   \n   @property {Array.<TreeItem>} detail.oldSelection\n   The old selected item.\n   @property {Array.<TreeItem>} detail.selection\n   The selected items.\n   */\n  \n  /**\n   Triggered when a {@link Tree} item expanded.\n \n   @typedef {CustomEvent} coral-tree:expand\n   \n   @property {TreeItem} detail.item\n   The expanded item.\n   */\n  \n  /**\n   Triggered when a {@link Tree} item collapsed.\n \n   @typedef {CustomEvent} coral-tree:collapse\n   \n   @property {TreeItem} detail.item\n   The collapsed item.\n   */\n}\n\nexport default Tree;\n","const template = (function anonymous(data_0\n/*``*/) {\n  var frag = document.createDocumentFragment();\n  var data = data_0 = typeof data_0 === \"undefined\" ? {} : data_0;\n  var el0 = this[\"header\"] = document.createElement(\"div\");\n  el0.className += \" _coral-TreeView-link\";\n  el0.setAttribute(\"tabindex\", \"-1\");\n  el0.setAttribute(\"role\", \"tab\");\n  el0.id = data_0[\"commons\"][\"getUID\"]();\n  el0.setAttribute(\"handle\", \"header\");\n  frag.appendChild(el0);\n  var el1 = document.createTextNode(\"\\n\");\n  frag.appendChild(el1);\n  data = data_0;\n  \n  this.header.insertAdjacentHTML('afterbegin', data.Icon._renderSVG('spectrum-css-icon-AccordionChevron', ['_coral-TreeView-indicator']));\n\n  data_0 = data;\n  var el3 = document.createTextNode(\"\\n\");\n  frag.appendChild(el3);\n  var el4 = this[\"subTreeContainer\"] = document.createElement(\"div\");\n  el4.className += \" _coral-TreeView\";\n  el4.setAttribute(\"handle\", \"subTreeContainer\");\n  el4.id = data_0[\"commons\"][\"getUID\"]();\n  el4.setAttribute(\"role\", \"tabpanel\");\n  frag.appendChild(el4);\n  var el5 = document.createTextNode(\"\\n\");\n  frag.appendChild(el5);\n  return frag;\n});\nexport default template;","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {Collection} from '../../../coralui-collection';\nimport {Icon} from '../../../coralui-component-icon';\nimport treeItem from '../templates/treeItem';\nimport {transform, commons, validate} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-TreeView-item';\n\n/**\n Enumeration for {@link TreeItem} variants.\n \n @typedef {Object} TreeItemVariantEnum\n \n @property {String} DRILLDOWN\n Default variant with icon to expand/collapse subtree.\n @property {String} LEAF\n Variant for leaf items. Icon to expand/collapse subtree is hidden.\n */\nconst variant = {\n  /* Default variant with icon to expand/collapse subtree. */\n  DRILLDOWN: 'drilldown',\n  /* Variant for leaf items. Icon to expand/collapse subtree is hidden. */\n  LEAF: 'leaf'\n};\n\nconst ALL_VARIANT_CLASSES = [];\n\nfor (const variantValue in variant) {\n  ALL_VARIANT_CLASSES.push(`${CLASSNAME}--${variant[variantValue]}`);\n}\n\n/**\n @class Coral.Tree.Item\n @classdesc A Tree item component\n @htmltag coral-tree-item\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass TreeItem extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n    \n    // Prepare templates\n    this._elements = {\n      // Create or fetch the content zones\n      content: this.querySelector('coral-tree-item-content') || document.createElement('coral-tree-item-content')\n    };\n    treeItem.call(this._elements, {Icon, commons});\n  \n    // Tells the collection to automatically detect the items and handle the events\n    this.items._startHandlingItems();\n  }\n  \n  /**\n   The parent tree. Returns <code>null</code> if item is the root.\n   \n   @type {HTMLElement}\n   @readonly\n   */\n  get parent() {\n    return this._parent || null;\n  }\n  \n  /**\n   The content of this tree item.\n   \n   @type {HTMLElement}\n   @contentzone\n   */\n  get content() {\n    return this._getContentZone(this._elements.content);\n  }\n  set content(value) {\n    this._setContentZone('content', value, {\n      handle: 'content',\n      tagName: 'coral-tree-item-content',\n      insert: function(content) {\n        this._elements.header.appendChild(content);\n      }\n    });\n  }\n  \n  /**\n   The Collection Interface that allows interacting with the items that the component contains.\n   \n   @type {Collection}\n   @readonly\n   */\n  get items() {\n    // Construct the collection on first request\n    if (!this._items) {\n      this._items = new Collection({\n        host: this,\n        itemTagName: 'coral-tree-item',\n        itemSelector: ':scope > coral-tree-item',\n        container: this._elements.subTreeContainer,\n        filter: this._filterItem.bind(this),\n        onItemAdded: this._onItemAdded,\n        onItemRemoved: this._onItemRemoved\n      });\n    }\n  \n    return this._items;\n  }\n  \n  /**\n   Whether the item is expanded. Expanded cannot be set to <code>true</code> if the item is disabled.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute expanded\n   @htmlattributereflected\n   */\n  get expanded() {\n    return this._expanded || false;\n  }\n  set expanded(value) {\n    value = transform.booleanAttr(value);\n    const triggerEvent = this.expanded !== value;\n    \n    this._expanded = value;\n    this._reflectAttribute('expanded', this._expanded);\n  \n    const header = this._elements.header;\n    const subTreeContainer = this._elements.subTreeContainer;\n  \n    this.classList.toggle('is-open', this._expanded);\n    this.classList.toggle('is-collapsed', !this._expanded);\n    \n    header.setAttribute('aria-expanded', this._expanded);\n    subTreeContainer.setAttribute('aria-hidden', !this._expanded);\n    \n    this.trigger('coral-tree-item:_expandedchanged');\n  \n    const self = this;\n    // Do animation in next frame to avoid a forced reflow\n    window.requestAnimationFrame(() => {\n      // Don't animate on initialization\n      if (self._animate) {\n        // Remove height as we want the drawer to naturally grow if content is added later\n        commons.transitionEnd(subTreeContainer, () => {\n          if (self.expanded) {\n            subTreeContainer.style.height = '';\n          }\n          else {\n            subTreeContainer.hidden = true;\n          }\n  \n          // Trigger once the animation is over to inform coral-tree\n          if (triggerEvent) {\n            self.trigger('coral-tree-item:_afterexpandedchanged');\n          }\n        });\n    \n        // Force height to enable transition\n        if (!self.expanded) {\n          subTreeContainer.style.height = `${subTreeContainer.scrollHeight}px`;\n        }\n        else {\n          subTreeContainer.hidden = false;\n        }\n  \n        // We read the offset height to force a reflow, this is needed to start the transition between absolute values\n        // https://blog.alexmaccaw.com/css-transitions under Redrawing\n        // eslint-disable-next-line no-unused-vars\n        const offsetHeight = subTreeContainer.offsetHeight;\n        \n        subTreeContainer.style.height = self.expanded ? `${subTreeContainer.scrollHeight}px` : 0;\n      }\n      else {\n        // Make sure it's animated next time\n        self._animate = true;\n    \n        // Hide it on initialization if closed\n        if (!self.expanded) {\n          subTreeContainer.style.height = 0;\n          subTreeContainer.hidden = true;\n        }\n      }\n    });\n  }\n  \n  /**\n   The item's variant. See {@link TreeItemVariantEnum}.\n   \n   @type {String}\n   @default TreeItemVariant.DRILLDOWN\n   @htmlattribute variant\n   @htmlattributereflected\n   */\n  get variant() {\n    return this._variant || variant.DRILLDOWN;\n  }\n  set variant(value) {\n    value = transform.string(value).toLowerCase();\n    this._variant = validate.enumeration(variant, value) && value || variant.DRILLDOWN;\n  \n    // removes every existing variant\n    this.classList.remove(...ALL_VARIANT_CLASSES);\n    this.classList.add(`${CLASSNAME}--${this._variant}`);\n  }\n  \n  /**\n   Whether the item is selected.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute selected\n   @htmlattributereflected\n   */\n  get selected() {\n    return this._selected || false;\n  }\n  set selected(value) {\n    this._selected = transform.booleanAttr(value);\n    this._reflectAttribute('selected', this._selected);\n  \n    this._elements.header.classList.toggle('is-selected', this._selected);\n    this._elements.header.setAttribute('aria-selected', this._selected);\n    \n    this.trigger('coral-tree-item:_selectedchanged');\n  }\n  \n  /**\n   Whether this item is disabled.\n   \n   @type {Boolean}\n   @default false\n   @htmlattribute disabled\n   @htmlattributereflected\n   */\n  get disabled() {\n    return this._disabled || false;\n  }\n  set disabled(value) {\n    this._disabled = transform.booleanAttr(value);\n    this._reflectAttribute('disabled', this._disabled);\n  \n    this._elements.header.classList.toggle('is-disabled', this._disabled);\n    this._elements.header.setAttribute('aria-disabled', this._disabled);\n    \n    this.trigger('coral-tree-item:_disabledchanged');\n  }\n  \n  /**\n   @ignore\n   */\n  get hidden() {\n    return this.hasAttribute('hidden');\n  }\n  set hidden(value) {\n    this._reflectAttribute('hidden', transform.booleanAttr(value));\n  \n    // We redefine hidden to trigger an event\n    this.trigger('coral-tree-item:_hiddenchanged');\n  }\n  \n  /** @private */\n  _filterItem(item) {\n    // Handle nesting check for parent tree item\n    // Use parentNode for added items\n    // Use _parent for removed items\n    return item.parentNode && item.parentNode.parentNode === this || item._parent === this;\n  }\n  \n  /** @private */\n  _onItemAdded(item) {\n    item._parent = this;\n  }\n  \n  /** @private */\n  _onItemRemoved(item) {\n    item._parent = undefined;\n  }\n  \n  /**\n   Handles the focus of the item.\n \n   @ignore\n   */\n  focus() {\n    this._elements.header.focus();\n  }\n  \n  /**\n   Returns {@link TreeItem} variants.\n   \n   @return {TreeItemVariantEnum}\n   */\n  static get variant() { return variant; }\n  \n  get _contentZones() { return {'coral-tree-item-content': 'content'}; }\n  \n  /** @ignore */\n  static get observedAttributes() {\n    return ['selected', 'disabled', 'variant', 'expanded', 'hidden'];\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    // a11y\n    this.setAttribute('role', 'treeitem');\n    this.setAttribute('aria-selected', this.selected);\n    this._elements.header.setAttribute('aria-controls', this._elements.subTreeContainer.id);\n    this._elements.subTreeContainer.setAttribute('aria-labelledby', this._elements.header.id);\n  \n    // Default reflected attributes\n    if (!this._variant) { this.variant = variant.DRILLDOWN; }\n    this.expanded = this.expanded;\n    \n    // Render the template and set element references\n    const frag = document.createDocumentFragment();\n  \n    const templateHandleNames = ['header', 'icon', 'subTreeContainer'];\n    \n    const subTree = this.querySelector('._coral-TreeView');\n    if (subTree) {\n      const items = subTree.querySelectorAll('coral-tree-item');\n      for (let i = 0; i < items.length; i++) {\n        this._elements.subTreeContainer.appendChild(items[i]);\n      }\n    }\n    \n    // Add templates into the frag\n    frag.appendChild(this._elements.header);\n    frag.appendChild(this._elements.subTreeContainer);\n  \n    const content = this._elements.content;\n    const subTreeContainer = this._elements.subTreeContainer;\n  \n    // Assign the content zones, moving them into place in the process\n    this.content = content;\n  \n    // Move any remaining elements into the content sub-component\n    while (this.firstChild) {\n      const child = this.firstChild;\n      if (child.nodeName === 'CORAL-TREE-ITEM') {\n        // Adding parent attribute to access the parent directly\n        child._parent = this;\n        // Add tree items to the sub tree container\n        subTreeContainer.appendChild(child);\n      }\n      else if (child.nodeType === Node.TEXT_NODE ||\n        child.nodeType === Node.ELEMENT_NODE && templateHandleNames.indexOf(child.getAttribute('handle')) === -1) {\n        // Add non-template elements to the content\n        content.appendChild(child);\n      }\n      else {\n        // Remove anything else element\n        this.removeChild(child);\n      }\n    }\n  \n    // Lastly, add the fragment into the container\n    this.appendChild(frag);\n  }\n  \n  /**\n   Triggered when {@link TreeItem#selected} changed.\n \n   @typedef {CustomEvent} coral-tree-item:_selectedchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TreeItem#expanded} changed.\n \n   @typedef {CustomEvent} coral-tree-item:_expandedchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TreeItem#hidden} changed.\n \n   @typedef {CustomEvent} coral-tree-item:_hiddenchanged\n   \n   @private\n   */\n  \n  /**\n   Triggered when {@link TreeItem#disabled} changed.\n \n   @typedef {CustomEvent} coral-tree-item:_disabledchanged\n   \n   @private\n   */\n}\n\nexport default TreeItem;\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\n/**\n @class Coral.Tree.Item.Content\n @classdesc Tree item's content component\n @htmltag coral-tree-item-content\n @return {HTMLElement}\n */\nexport default () => document.createElement('coral-tree-item-content');\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport Tree from './src/scripts/Tree';\nimport TreeItem from './src/scripts/TreeItem';\nimport TreeItemContent from './src/scripts/TreeItemContent';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-tree', Tree);\nwindow.customElements.define('coral-tree-item', TreeItem);\n\nTree.Item = TreeItem;\nTree.Item.Content = TreeItemContent;\n\nexport {Tree, TreeItem};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2017 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n\nimport {ComponentMixin} from '../../../coralui-mixin-component';\nimport {Collection} from '../../../coralui-collection';\nimport '../../../coralui-component-steplist';\nimport '../../../coralui-component-panelstack';\nimport {commons} from '../../../coralui-util';\n\nconst CLASSNAME = '_coral-WizardView';\n\n/**\n @class Coral.WizardView\n @classdesc A WizardView component is the wrapping container used to create the typical Wizard pattern. This is intended\n to be used with a {@link StepList} and a {@link PanelStack}.\n @htmltag coral-wizardview\n @extends {HTMLElement}\n @extends {ComponentMixin}\n */\nclass WizardView extends ComponentMixin(HTMLElement) {\n  /** @ignore */\n  constructor() {\n    super();\n  \n    this._delegateEvents({\n      'coral-steplist:change coral-steplist[coral-wizardview-steplist]': '_onStepListChange',\n      'click [coral-wizardview-previous]': '_onPreviousClick',\n      'click [coral-wizardview-next]': '_onNextClick'\n    });\n  \n    // Init the collection mutation observer\n    this.stepLists._startHandlingItems(true);\n    this.panelStacks._startHandlingItems(true);\n  }\n  \n  /**\n   The set of controlled PanelStacks. Each PanelStack must have the <code>coral-wizardview-panelstack</code> attribute.\n   \n   @type {Collection}\n   @readonly\n   */\n  get panelStacks() {\n    // Construct the collection on first request:\n    if (!this._panelStacks) {\n      this._panelStacks = new Collection({\n        host: this,\n        itemTagName: 'coral-panelstack',\n        // allows panelstack to be nested\n        itemSelector: ':scope > coral-panelstack[coral-wizardview-panelstack]',\n        onItemAdded: this._onItemAdded\n      });\n    }\n  \n    return this._panelStacks;\n  }\n  \n  /**\n   The set of controlling StepLists. Each StepList must have the <code>coral-wizardview-steplist</code> attribute.\n   \n   @type {Collection}\n   @readonly\n   */\n  get stepLists() {\n    // Construct the collection on first request:\n    if (!this._stepLists) {\n      this._stepLists = new Collection({\n        host: this,\n        itemTagName: 'coral-steplist',\n        // allows steplist to be nested\n        itemSelector: ':scope > coral-steplist[coral-wizardview-steplist]',\n        onItemAdded: this._onItemAdded\n      });\n    }\n  \n    return this._stepLists;\n  }\n  \n  /**\n   Called by the Collection when an item is added\n   \n   @private\n   */\n  _onItemAdded(item) {\n    this._selectItemByIndex(item, this._getSelectedIndex());\n  }\n  \n  /**\n   Handles the next button click.\n   \n   @private\n   */\n  _onNextClick(event) {\n    // we stop propagation in case the wizard views are nested\n    event.stopPropagation();\n    \n    this.next();\n  }\n  \n  /**\n   Handles the previous button click.\n   \n   @private\n   */\n  _onPreviousClick(event) {\n    // we stop propagation in case the wizard views are nested\n    event.stopPropagation();\n    \n    this.previous();\n  }\n  \n  /**\n   Detects a change in the StepList and triggers an event.\n   \n   @private\n   */\n  _onStepListChange(event) {\n    // Stop propagation of the events to support nested panels\n    event.stopPropagation();\n    \n    // Get the step number\n    const index = event.target.items.getAll().indexOf(event.detail.selection);\n    \n    // Sync the other StepLists\n    this._selectStep(index);\n    \n    this.trigger('coral-wizardview:change', {\n      selection: event.detail.selection,\n      oldSelection: event.detail.oldSelection\n    });\n  }\n  \n  /** @private */\n  _getSelectedIndex() {\n    const stepList = this.stepLists.first();\n    if (!stepList) {\n      return -1;\n    }\n    \n    let stepIndex = -1;\n    if (stepList.items) {\n      stepIndex = stepList.items.getAll().indexOf(stepList.selectedItem);\n    }\n    else {\n      // Manually get the selected step\n      const steps = stepList.querySelectorAll('coral-step');\n      \n      // Find the last selected step\n      for (let i = steps.length - 1; i >= 0; i--) {\n        if (steps[i].hasAttribute('selected')) {\n          stepIndex = i;\n          break;\n        }\n      }\n    }\n    \n    return stepIndex;\n  }\n  \n  /**\n   Select the step according to the provided index.\n   \n   @param {*} component\n   The StepList or PanelStack to select the step on.\n   @param {Number} index\n   The index of the step that should be selected.\n   \n   @private\n   */\n  _selectItemByIndex(component, index) {\n    let item = null;\n    \n    // we need to set an id to be able to find direct children\n    component.id = component.id || commons.getUID();\n    \n    // if collection api is available we use it to find the correct item\n    if (component.items) {\n      // Get the corresponding item\n      item = component.items.getAll()[index];\n    }\n    // Resort to querying manually on immediately children\n    else if (component.tagName === 'CORAL-STEPLIST') {\n      // @polyfill IE - we use id since :scope is not supported\n      item = component.querySelectorAll(`#${component.id} > coral-step`)[index];\n    }\n    else if (component.tagName === 'CORAL-PANELSTACK') {\n      // @polyfill IE - we use id since :scope is not supported\n      item = component.querySelectorAll(`#${component.id} > coral-panel`)[index];\n    }\n    \n    if (item) {\n      // we only select if not select to avoid mutations\n      if (!item.hasAttribute('selected')) {\n        item.setAttribute('selected', '');\n      }\n    }\n    // if we did not find an item to select, it means that the \"index\" is not available in the component, therefore we\n    // need to deselect all items\n    else {\n      // we use the component id to be able to find direct children\n      if (component.tagName === 'CORAL-STEPLIST') {\n        // @polyfill IE - we use id since :scope is not supported\n        item = component.querySelector(`#${component.id} > coral-step[selected]`);\n      }\n      else if (component.tagName === 'CORAL-PANELSTACK') {\n        // @polyfill IE - we use id since :scope is not supported\n        item = component.querySelector(`#${component.id} > coral-panel[selected]`);\n      }\n      \n      if (item) {\n        item.removeAttribute('selected');\n      }\n    }\n  }\n  \n  /** @private */\n  _selectStep(index) {\n    // we apply the selection to all available steplists\n    this.stepLists.getAll().forEach((stepList) => {\n      this._selectItemByIndex(stepList, index);\n    }, this);\n    \n    // we apply the selection to all available panelstacks\n    this.panelStacks.getAll().forEach((panelStack) => {\n      this._selectItemByIndex(panelStack, index);\n    }, this);\n  }\n  \n  /**\n   Sets the correct selected item in every PanelStack.\n   \n   @private\n   */\n  _syncPanelStackSelection(defaultIndex) {\n    // Find out which step we're on by checking the first StepList\n    let index = this._getSelectedIndex();\n    \n    if (index === -1) {\n      if (typeof defaultIndex !== 'undefined') {\n        index = defaultIndex;\n      }\n      else {\n        // No panel selected\n        return;\n      }\n    }\n    \n    this.panelStacks.getAll().forEach((panelStack) => {\n      this._selectItemByIndex(panelStack, index);\n    }, this);\n  }\n  \n  /**\n   Selects the correct step in every StepList.\n   \n   @private\n   */\n  _syncStepListSelection(defaultIndex) {\n    // Find out which step we're on by checking the first StepList\n    let index = this._getSelectedIndex();\n    \n    if (index === -1) {\n      if (typeof defaultIndex !== 'undefined') {\n        index = defaultIndex;\n      }\n      else {\n        // No step selected\n        return;\n      }\n    }\n    \n    this.stepLists.getAll().forEach((stepList) => {\n      this._selectItemByIndex(stepList, index);\n    }, this);\n  }\n  \n  /**\n   Shows the next step. If the WizardView is already in the last step nothing will happen.\n   \n   @emits {coral-wizardview:change}\n   */\n  next() {\n    const stepList = this.stepLists.first();\n    if (!stepList) {\n      return;\n    }\n    \n    // Change to the next step\n    stepList.next();\n    \n    // Select the step everywhere\n    this._selectStep(stepList.items.getAll().indexOf(stepList.selectedItem));\n  }\n  \n  /**\n   Shows the previous step. If the WizardView is already in the first step nothing will happen.\n   \n   @emits {coral-wizardview:change}\n   */\n  previous() {\n    const stepList = this.stepLists.first();\n    if (!stepList) {\n      return;\n    }\n    \n    // Change to the previous step\n    stepList.previous();\n    \n    // Select the step everywhere\n    this._selectStep(stepList.items.getAll().indexOf(stepList.selectedItem));\n  }\n  \n  /** @ignore */\n  connectedCallback() {\n    super.connectedCallback();\n    \n    this.classList.add(CLASSNAME);\n  \n    this._syncStepListSelection(0);\n    this._syncPanelStackSelection(0);\n  }\n  \n  /**\n   Triggered when the {@link WizardView} selected step list item has changed.\n \n   @typedef {CustomEvent} coral-wizardview:change\n   \n   @property {Step} event.detail.selection\n   The new selected step list item.\n   @property {Step} event.detail.oldSelection\n   The prior selected step list item.\n   */\n}\n\nexport default WizardView;\n","import '../coralui-theme-spectrum';\nimport '../coralui-externals';\n\nimport WizardView from './src/scripts/WizardView';\n\n// Expose component on the Coral namespace\nwindow.customElements.define('coral-wizardview', WizardView);\n\nexport {WizardView};\n","/*! (C) Andrea Giammarchi - @WebReflection - Mit Style License */\n(function(e,t){\"use strict\";function Ht(){var e=wt.splice(0,wt.length);Et=0;while(e.length)e.shift().call(null,e.shift())}function Bt(e,t){for(var n=0,r=e.length;n<r;n++)Jt(e[n],t)}function jt(e){for(var t=0,n=e.length,r;t<n;t++)r=e[t],Pt(r,A[It(r)])}function Ft(e){return function(t){ut(t)&&(Jt(t,e),O.length&&Bt(t.querySelectorAll(O),e))}}function It(e){var t=ht.call(e,\"is\"),n=e.nodeName.toUpperCase(),r=_.call(L,t?N+t.toUpperCase():T+n);return t&&-1<r&&!qt(n,t)?-1:r}function qt(e,t){return-1<O.indexOf(e+'[is=\"'+t+'\"]')}function Rt(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target,s=e[y]||2,o=e[w]||3;kt&&(!i||i===t)&&t[h]&&r!==\"style\"&&(e.prevValue!==e.newValue||e.newValue===\"\"&&(n===s||n===o))&&t[h](r,n===s?null:e.prevValue,n===o?null:e.newValue)}function Ut(e){var t=Ft(e);return function(e){wt.push(t,e.target),Et&&clearTimeout(Et),Et=setTimeout(Ht,1)}}function zt(e){Ct&&(Ct=!1,e.currentTarget.removeEventListener(S,zt)),O.length&&Bt((e.target||n).querySelectorAll(O),e.detail===l?l:a),st&&Vt()}function Wt(e,t){var n=this;vt.call(n,e,t),Lt.call(n,{target:n})}function Xt(e,t){nt(e,t),Mt?Mt.observe(e,yt):(Nt&&(e.setAttribute=Wt,e[o]=Ot(e),e[u](x,Lt)),e[u](E,Rt)),e[m]&&kt&&(e.created=!0,e[m](),e.created=!1)}function Vt(){for(var e,t=0,n=at.length;t<n;t++)e=at[t],M.contains(e)||(n--,at.splice(t--,1),Jt(e,l))}function $t(e){throw new Error(\"A \"+e+\" type is already registered\")}function Jt(e,t){var n,r=It(e),i;-1<r&&(Dt(e,A[r]),r=0,t===a&&!e[a]?(e[l]=!1,e[a]=!0,i=\"connected\",r=1,st&&_.call(at,e)<0&&at.push(e)):t===l&&!e[l]&&(e[a]=!1,e[l]=!0,i=\"disconnected\",r=1),r&&(n=e[t+f]||e[i+f])&&n.call(e))}function Kt(){}function Qt(e,t,r){var i=r&&r[c]||\"\",o=t.prototype,u=tt(o),a=t.observedAttributes||j,f={prototype:u};ot(u,m,{value:function(){if(Q)Q=!1;else if(!this[W]){this[W]=!0,new t(this),o[m]&&o[m].call(this);var e=G[Z.get(t)];(!V||e.create.length>1)&&Zt(this)}}}),ot(u,h,{value:function(e){-1<_.call(a,e)&&o[h].apply(this,arguments)}}),o[d]&&ot(u,p,{value:o[d]}),o[v]&&ot(u,g,{value:o[v]}),i&&(f[c]=i),e=e.toUpperCase(),G[e]={constructor:t,create:i?[i,et(e)]:[e]},Z.set(t,e),n[s](e.toLowerCase(),f),en(e),Y[e].r()}function Gt(e){var t=G[e.toUpperCase()];return t&&t.constructor}function Yt(e){return typeof e==\"string\"?e:e&&e.is||\"\"}function Zt(e){var t=e[h],n=t?e.attributes:j,r=n.length,i;while(r--)i=n[r],t.call(e,i.name||i.nodeName,null,i.value||i.nodeValue)}function en(e){return e=e.toUpperCase(),e in Y||(Y[e]={},Y[e].p=new K(function(t){Y[e].r=t})),Y[e].p}function tn(){X&&delete e.customElements,B(e,\"customElements\",{configurable:!0,value:new Kt}),B(e,\"CustomElementRegistry\",{configurable:!0,value:Kt});for(var t=function(t){var r=e[t];if(r){e[t]=function(t){var i,s;return t||(t=this),t[W]||(Q=!0,i=G[Z.get(t.constructor)],s=V&&i.create.length===1,t=s?Reflect.construct(r,j,i.constructor):n.createElement.apply(n,i.create),t[W]=!0,Q=!1,s||Zt(t)),t},e[t].prototype=r.prototype;try{r.prototype.constructor=e[t]}catch(i){z=!0,B(r,W,{value:e[t]})}}},r=i.get(/^HTML[A-Z]*[a-z]/),o=r.length;o--;t(r[o]));n.createElement=function(e,t){var n=Yt(t);return n?gt.call(this,e,et(n)):gt.call(this,e)},St||(Tt=!0,n[s](\"\"))}var n=e.document,r=e.Object,i=function(e){var t=/^[A-Z]+[a-z]/,n=function(e){var t=[],n;for(n in s)e.test(n)&&t.push(n);return t},i=function(e,t){t=t.toLowerCase(),t in s||(s[e]=(s[e]||[]).concat(t),s[t]=s[t.toUpperCase()]=e)},s=(r.create||r)(null),o={},u,a,f,l;for(a in e)for(l in e[a]){f=e[a][l],s[l]=f;for(u=0;u<f.length;u++)s[f[u].toLowerCase()]=s[f[u].toUpperCase()]=l}return o.get=function(r){return typeof r==\"string\"?s[r]||(t.test(r)?[]:\"\"):n(r)},o.set=function(n,r){return t.test(n)?i(n,r):i(r,n),o},o}({collections:{HTMLAllCollection:[\"all\"],HTMLCollection:[\"forms\"],HTMLFormControlsCollection:[\"elements\"],HTMLOptionsCollection:[\"options\"]},elements:{Element:[\"element\"],HTMLAnchorElement:[\"a\"],HTMLAppletElement:[\"applet\"],HTMLAreaElement:[\"area\"],HTMLAttachmentElement:[\"attachment\"],HTMLAudioElement:[\"audio\"],HTMLBRElement:[\"br\"],HTMLBaseElement:[\"base\"],HTMLBodyElement:[\"body\"],HTMLButtonElement:[\"button\"],HTMLCanvasElement:[\"canvas\"],HTMLContentElement:[\"content\"],HTMLDListElement:[\"dl\"],HTMLDataElement:[\"data\"],HTMLDataListElement:[\"datalist\"],HTMLDetailsElement:[\"details\"],HTMLDialogElement:[\"dialog\"],HTMLDirectoryElement:[\"dir\"],HTMLDivElement:[\"div\"],HTMLDocument:[\"document\"],HTMLElement:[\"element\",\"abbr\",\"address\",\"article\",\"aside\",\"b\",\"bdi\",\"bdo\",\"cite\",\"code\",\"command\",\"dd\",\"dfn\",\"dt\",\"em\",\"figcaption\",\"figure\",\"footer\",\"header\",\"i\",\"kbd\",\"mark\",\"nav\",\"noscript\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"section\",\"small\",\"strong\",\"sub\",\"summary\",\"sup\",\"u\",\"var\",\"wbr\"],HTMLEmbedElement:[\"embed\"],HTMLFieldSetElement:[\"fieldset\"],HTMLFontElement:[\"font\"],HTMLFormElement:[\"form\"],HTMLFrameElement:[\"frame\"],HTMLFrameSetElement:[\"frameset\"],HTMLHRElement:[\"hr\"],HTMLHeadElement:[\"head\"],HTMLHeadingElement:[\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\"],HTMLHtmlElement:[\"html\"],HTMLIFrameElement:[\"iframe\"],HTMLImageElement:[\"img\"],HTMLInputElement:[\"input\"],HTMLKeygenElement:[\"keygen\"],HTMLLIElement:[\"li\"],HTMLLabelElement:[\"label\"],HTMLLegendElement:[\"legend\"],HTMLLinkElement:[\"link\"],HTMLMapElement:[\"map\"],HTMLMarqueeElement:[\"marquee\"],HTMLMediaElement:[\"media\"],HTMLMenuElement:[\"menu\"],HTMLMenuItemElement:[\"menuitem\"],HTMLMetaElement:[\"meta\"],HTMLMeterElement:[\"meter\"],HTMLModElement:[\"del\",\"ins\"],HTMLOListElement:[\"ol\"],HTMLObjectElement:[\"object\"],HTMLOptGroupElement:[\"optgroup\"],HTMLOptionElement:[\"option\"],HTMLOutputElement:[\"output\"],HTMLParagraphElement:[\"p\"],HTMLParamElement:[\"param\"],HTMLPictureElement:[\"picture\"],HTMLPreElement:[\"pre\"],HTMLProgressElement:[\"progress\"],HTMLQuoteElement:[\"blockquote\",\"q\",\"quote\"],HTMLScriptElement:[\"script\"],HTMLSelectElement:[\"select\"],HTMLShadowElement:[\"shadow\"],HTMLSlotElement:[\"slot\"],HTMLSourceElement:[\"source\"],HTMLSpanElement:[\"span\"],HTMLStyleElement:[\"style\"],HTMLTableCaptionElement:[\"caption\"],HTMLTableCellElement:[\"td\",\"th\"],HTMLTableColElement:[\"col\",\"colgroup\"],HTMLTableElement:[\"table\"],HTMLTableRowElement:[\"tr\"],HTMLTableSectionElement:[\"thead\",\"tbody\",\"tfoot\"],HTMLTemplateElement:[\"template\"],HTMLTextAreaElement:[\"textarea\"],HTMLTimeElement:[\"time\"],HTMLTitleElement:[\"title\"],HTMLTrackElement:[\"track\"],HTMLUListElement:[\"ul\"],HTMLUnknownElement:[\"unknown\",\"vhgroupv\",\"vkeygen\"],HTMLVideoElement:[\"video\"]},nodes:{Attr:[\"node\"],Audio:[\"audio\"],CDATASection:[\"node\"],CharacterData:[\"node\"],Comment:[\"#comment\"],Document:[\"#document\"],DocumentFragment:[\"#document-fragment\"],DocumentType:[\"node\"],HTMLDocument:[\"#document\"],Image:[\"img\"],Option:[\"option\"],ProcessingInstruction:[\"node\"],ShadowRoot:[\"#shadow-root\"],Text:[\"#text\"],XMLDocument:[\"xml\"]}});typeof t!=\"object\"&&(t={type:t||\"auto\"});var s=\"registerElement\",o=\"__\"+s+(e.Math.random()*1e5>>0),u=\"addEventListener\",a=\"attached\",f=\"Callback\",l=\"detached\",c=\"extends\",h=\"attributeChanged\"+f,p=a+f,d=\"connected\"+f,v=\"disconnected\"+f,m=\"created\"+f,g=l+f,y=\"ADDITION\",b=\"MODIFICATION\",w=\"REMOVAL\",E=\"DOMAttrModified\",S=\"DOMContentLoaded\",x=\"DOMSubtreeModified\",T=\"<\",N=\"=\",C=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,k=[\"ANNOTATION-XML\",\"COLOR-PROFILE\",\"FONT-FACE\",\"FONT-FACE-SRC\",\"FONT-FACE-URI\",\"FONT-FACE-FORMAT\",\"FONT-FACE-NAME\",\"MISSING-GLYPH\"],L=[],A=[],O=\"\",M=n.documentElement,_=L.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},D=r.prototype,P=D.hasOwnProperty,H=D.isPrototypeOf,B=r.defineProperty,j=[],F=r.getOwnPropertyDescriptor,I=r.getOwnPropertyNames,q=r.getPrototypeOf,R=r.setPrototypeOf,U=!!r.__proto__,z=!1,W=\"__dreCEv1\",X=e.customElements,V=!/^force/.test(t.type)&&!!(X&&X.define&&X.get&&X.whenDefined),$=r.create||r,J=e.Map||function(){var t=[],n=[],r;return{get:function(e){return n[_.call(t,e)]},set:function(e,i){r=_.call(t,e),r<0?n[t.push(e)-1]=i:n[r]=i}}},K=e.Promise||function(e){function i(e){n=!0;while(t.length)t.shift()(e)}var t=[],n=!1,r={\"catch\":function(){return r},then:function(e){return t.push(e),n&&setTimeout(i,1),r}};return e(i),r},Q=!1,G=$(null),Y=$(null),Z=new J,et=function(e){return e.toLowerCase()},tt=r.create||function sn(e){return e?(sn.prototype=e,new sn):this},nt=R||(U?function(e,t){return e.__proto__=t,e}:I&&F?function(){function e(e,t){for(var n,r=I(t),i=0,s=r.length;i<s;i++)n=r[i],P.call(e,n)||B(e,n,F(t,n))}return function(t,n){do e(t,n);while((n=q(n))&&!H.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),rt=e.MutationObserver||e.WebKitMutationObserver,it=(e.HTMLElement||e.Element||e.Node).prototype,st=!H.call(it,M),ot=st?function(e,t,n){return e[t]=n.value,e}:B,ut=st?function(e){return e.nodeType===1}:function(e){return H.call(it,e)},at=st&&[],ft=it.attachShadow,lt=it.cloneNode,ct=it.dispatchEvent,ht=it.getAttribute,pt=it.hasAttribute,dt=it.removeAttribute,vt=it.setAttribute,mt=n.createElement,gt=mt,yt=rt&&{attributes:!0,characterData:!0,attributeOldValue:!0},bt=rt||function(e){Nt=!1,M.removeEventListener(E,bt)},wt,Et=0,St=s in n&&!/^force-all/.test(t.type),xt=!0,Tt=!1,Nt=!0,Ct=!0,kt=!0,Lt,At,Ot,Mt,_t,Dt,Pt;St||(R||U?(Dt=function(e,t){H.call(t,e)||Xt(e,t)},Pt=Xt):(Dt=function(e,t){e[o]||(e[o]=r(!0),Xt(e,t))},Pt=Dt),st?(Nt=!1,function(){var e=F(it,u),t=e.value,n=function(e){var t=new CustomEvent(E,{bubbles:!0});t.attrName=e,t.prevValue=ht.call(this,e),t.newValue=null,t[w]=t.attrChange=2,dt.call(this,e),ct.call(this,t)},r=function(e,t){var n=pt.call(this,e),r=n&&ht.call(this,e),i=new CustomEvent(E,{bubbles:!0});vt.call(this,e,t),i.attrName=e,i.prevValue=n?r:null,i.newValue=t,n?i[b]=i.attrChange=1:i[y]=i.attrChange=0,ct.call(this,i)},i=function(e){var t=e.currentTarget,n=t[o],r=e.propertyName,i;n.hasOwnProperty(r)&&(n=n[r],i=new CustomEvent(E,{bubbles:!0}),i.attrName=n.name,i.prevValue=n.value||null,i.newValue=n.value=t[r]||null,i.prevValue==null?i[y]=i.attrChange=0:i[b]=i.attrChange=1,ct.call(t,i))};e.value=function(e,s,u){e===E&&this[h]&&this.setAttribute!==r&&(this[o]={className:{name:\"class\",value:this.className}},this.setAttribute=r,this.removeAttribute=n,t.call(this,\"propertychange\",i)),t.call(this,e,s,u)},B(it,u,e)}()):rt||(M[u](E,bt),M.setAttribute(o,1),M.removeAttribute(o),Nt&&(Lt=function(e){var t=this,n,r,i;if(t===e.target){n=t[o],t[o]=r=Ot(t);for(i in r){if(!(i in n))return At(0,t,i,n[i],r[i],y);if(r[i]!==n[i])return At(1,t,i,n[i],r[i],b)}for(i in n)if(!(i in r))return At(2,t,i,n[i],r[i],w)}},At=function(e,t,n,r,i,s){var o={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};o[s]=e,Rt(o)},Ot=function(e){for(var t,n,r={},i=e.attributes,s=0,o=i.length;s<o;s++)t=i[s],n=t.name,n!==\"setAttribute\"&&(r[n]=t.value);return r})),n[s]=function(t,r){p=t.toUpperCase(),xt&&(xt=!1,rt?(Mt=function(e,t){function n(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}return new rt(function(r){for(var i,s,o,u=0,a=r.length;u<a;u++)i=r[u],i.type===\"childList\"?(n(i.addedNodes,e),n(i.removedNodes,t)):(s=i.target,kt&&s[h]&&i.attributeName!==\"style\"&&(o=ht.call(s,i.attributeName),o!==i.oldValue&&s[h](i.attributeName,i.oldValue,o)))})}(Ft(a),Ft(l)),_t=function(e){return Mt.observe(e,{childList:!0,subtree:!0}),e},_t(n),ft&&(it.attachShadow=function(){return _t(ft.apply(this,arguments))})):(wt=[],n[u](\"DOMNodeInserted\",Ut(a)),n[u](\"DOMNodeRemoved\",Ut(l))),n[u](S,zt),n[u](\"readystatechange\",zt),it.cloneNode=function(e){var t=lt.call(this,!!e),n=It(t);return-1<n&&Pt(t,A[n]),e&&O.length&&jt(t.querySelectorAll(O)),t});if(Tt)return Tt=!1;-2<_.call(L,N+p)+_.call(L,T+p)&&$t(t);if(!C.test(p)||-1<_.call(k,p))throw new Error(\"The type \"+t+\" is invalid\");var i=function(){return o?n.createElement(f,p):n.createElement(f)},s=r||D,o=P.call(s,c),f=o?r[c].toUpperCase():p,p,d;return o&&-1<_.call(L,T+f)&&$t(f),d=L.push((o?N:T)+p)-1,O=O.concat(O.length?\",\":\"\",o?f+'[is=\"'+t.toLowerCase()+'\"]':f),i.prototype=A[d]=P.call(s,\"prototype\")?s.prototype:tt(it),O.length&&Bt(n.querySelectorAll(O),a),i},n.createElement=gt=function(e,t){var r=Yt(t),i=r?mt.call(n,e,et(r)):mt.call(n,e),s=\"\"+e,o=_.call(L,(r?N:T)+(r||s).toUpperCase()),u=-1<o;return r&&(i.setAttribute(\"is\",r=r.toLowerCase()),u&&(u=qt(s.toUpperCase(),r))),kt=!n.createElement.innerHTMLHelper,u&&Pt(i,A[o]),i}),Kt.prototype={constructor:Kt,define:V?function(e,t,n){if(n)Qt(e,t,n);else{var r=e.toUpperCase();G[r]={constructor:t,create:[r]},Z.set(t,r),X.define(e,t)}}:Qt,get:V?function(e){return X.get(e)||Gt(e)}:Gt,whenDefined:V?function(e){return K.race([X.whenDefined(e),en(e)])}:en};if(!X||/^force/.test(t.type))tn();else if(!t.noBuiltIn)try{(function(t,r,i){r[c]=\"a\",t.prototype=tt(HTMLAnchorElement.prototype),t.prototype.constructor=t,e.customElements.define(i,t,r);if(ht.call(n.createElement(\"a\",{is:i}),\"is\")!==i||V&&ht.call(new t,\"is\")!==i)throw r})(function on(){return Reflect.construct(HTMLAnchorElement,[],on)},{},\"document-register-element-a\")}catch(nn){tn()}if(!t.noBuiltIn)try{mt.call(n,\"a\",\"a\")}catch(rn){et=function(e){return{is:e.toLowerCase()}}}})(window);","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2015 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n/* global module: true, exports: true */\nvar Coral = window.Coral = window.Coral || {};\n\n// CommonJS and Node.js module support\nif (typeof exports !== 'undefined') {\n  // Support Node.js specific `module.exports` (which can be a function)\n  if (typeof module !== 'undefined' && module.exports) {\n    exports = module.exports = Coral;\n  }\n  // But always support CommonJS module 1.1.1 spec, Coral is an object\n  exports = Coral;\n}\n\n/**\n A property descriptor.\n \n @typedef {Object} Coral~PropertyDescriptor\n @property {Function} [transform=null]\n The value transformation function. Values passed to setters will be ran through this function first.\n @property {Function} [attributeTransform=transform]\n The value transformation function for attribute. The value given by <code>attributeChangedCallback</code> will be\n ran through this function first before passed to setters.\n @property {Coral.validate~validationFunction} [validate={@link Coral.validate.valueMustChange}]\n The value validation function. A validation function that takes two arguments, <code>newValue</code> and\n <code>oldValue</code>, returning true if the setter should run or false if not.\n @property {String|Function} [trigger=null]\n The name of the event to trigger after this property changes, or a {Function} to call that will trigger the event.\n The function is passed the <code>newValue</code> and <code>oldValue</code>.\n @property {String|Function} [triggerBefore=null]\n The name of the event to trigger before this property changes, a {Function} to call that will trigger the event,\n or <code>true</code> to set the name automatically. The function is passed the <code>newValue</code> and\n <code>oldValue</code> and must return the Event object for <code>preventDefault()</code> to work within handlers. If\n set to <code>true</code>, {@link Coral~PropertyDescriptor} must be a string with a colon in it, such as\n <code>coral-component:change</code>, which results in <code>coral-component:beforechange</code>. If set to\n <code>false</code>, no event will be triggered before the setter is ran.\n @property {String} [attribute=propName]\n The name of the attribute corresponding to this property. If not provided, the property name itself will be used.\n If <code>null</code> is provided, the property will not be set by a corresponding attribute.\n @property {Boolean} [reflectAttribute=false]\n Whether this property should be reflected as an attribute when changed. This is useful when you want to style CSS\n according to the property's existence or value.\n @property {Function} [sync=null]\n The method to be called when this property's value should be synced to the DOM.\n @property {String|Array.<String>} [alsoSync=null]\n A property or list of properties that should be synced after this property is synced.\n @property {Function} [set={@link Coral~defaultSet}]\n The setter for this property.\n @property {Function} [get={@link Coral~defaultGet}]\n The getter for this property.\n @property {Boolean} [override=false]\n Whether this property descriptor should completely override. If <code>false</code>, this descriptor will augment\n the existing descriptor. See {@link Coral.register.augmentProperties} for details.\n @property {Boolean} [contentZone=false]\n Whether this property represents a content zone. Content zones are treated differently when set() is invoked such\n that the provided value is passed to the content zone's set() method.\n */\n(function() {\n  'use strict';\n  \n  // These properties won't be treated as methods\n  var specialProperties = {\n    extend: true,\n    properties: true,\n    events: true,\n    _elements: true,\n    name: true,\n    tagName: true,\n    baseTagName: true,\n    className: true\n  };\n  \n  function noop() {\n  }\n  function passThrough(value) {\n    return value;\n  }\n  \n  /**\n   Creates an array with validation functions for the given properties. If no validate is specified, then the default\n   validator is used.\n   @ignore\n   */\n  function makeValidate(descriptor) {\n    if (!descriptor.validate) {\n      return [Coral.validate.valueMustChange];\n    }\n    \n    if (Array.isArray(descriptor.validate)) {\n      return descriptor.validate;\n    }\n    \n    return [descriptor.validate];\n  }\n  \n  /**\n   Make a attribute reflect function for the given property. If the property is not reflected, return a noop.\n   @ignore\n   */\n  function makeReflect(propName, descriptor) {\n    if (!descriptor.reflectAttribute) {\n      return noop;\n    }\n    \n    var attrName = descriptor.attribute || propName;\n    \n    return function doReflect(value, silent) {\n      // Reflect the property\n      if (value === false || value === null) {\n        // Non-truthy attributes should be destroyed\n        this.removeAttribute(attrName);\n      }\n      else {\n        // Boolean true for a value just means the property should exist\n        if (value === true) {\n          value = '';\n        }\n        \n        // Only perform the set if the attribute is of a different value\n        // This avoids triggering mutation observers unnecessarily\n        if (this.getAttribute(attrName) !== value) {\n          this.setAttribute(attrName, value);\n        }\n      }\n    };\n  }\n  \n  /**\n   Make an event trigger function for the given property. If no event should be triggered, return a noop.\n   @ignore\n   */\n  function makeTrigger(trigger) {\n    if (!trigger) {\n      return noop;\n    }\n    \n    if (typeof trigger === 'function') {\n      return trigger;\n    }\n    \n    var eventName = trigger;\n    \n    return function doTrigger(newValue, oldValue) {\n      // Trigger an event that has the new and old values under detail\n      return this.trigger(eventName, {\n        oldValue: oldValue,\n        value: newValue\n      });\n    };\n  }\n  \n  /**\n   Make a queue sync function for the given property. If nothing needs to be synced, return a noop.\n   @ignore\n   */\n  function makeQueueSync(propName, descriptor) {\n    var propList = descriptor.alsoSync;\n    var sync = descriptor.sync;\n    \n    if (!sync && !propList) {\n      return noop;\n    }\n    \n    if (propList) {\n      // Other properties in addition to ours\n      if (Array.isArray(propList)) {\n        propList.unshift(propName);\n      }\n      else {\n        propList = [propName, propList];\n      }\n      return function doMultiSync(value) {\n        // Sync the list of properties\n        this._queueSync.apply(this, propList);\n      };\n    }\n    \n    return function doSync(value) {\n      // Sync the property\n      this._queueSync(propName);\n    };\n  }\n  \n  /**\n   Create and store the methods back to the property descriptor, then store the descriptor on the prototype.\n   This enables overriding descriptor parts.\n   \n   @ignore\n   */\n  function storeDescriptor(proto, propName, descriptor) {\n    // triggerBefore can be function, boolean, or string\n    var triggerBeforeValue;\n    if (typeof descriptor.triggerBefore === 'function' || typeof descriptor.triggerBefore === 'string') {\n      // Directly use string or function, makeTrigger will do the rest\n      triggerBeforeValue = descriptor.triggerBefore;\n    }\n    else if (descriptor.triggerBefore === true) {\n      // Automatically set name based on descriptor.trigger\n      if (typeof descriptor.trigger === 'string' && descriptor.trigger.indexOf(':') !== -1) {\n        triggerBeforeValue = descriptor.trigger.replace(':', ':before');\n      }\n      else {\n        throw new Error('Coral.register: Cannot automatically set \"before\" event name unless descriptor.trigger ' +\n          'is a string that conatins a colon');\n      }\n    }\n    \n    // Use provided setter, or make a setter that sets a \"private\" underscore-prefixed variable\n    descriptor.set = descriptor.set || makeBasicSetter(propName);\n    \n    // Use provided getter, or make a getter that returns a \"private\" underscore-prefixed variable\n    descriptor.get = descriptor.get || makeBasicGetter(propName);\n    \n    // Store methods\n    var inheritedMethods = descriptor._methods;\n    descriptor._methods = {};\n    \n    // store references to inherited methods in descriptor._methods\n    if (inheritedMethods) {\n      for (var methodName in inheritedMethods) {\n        descriptor._methods[methodName] = inheritedMethods[methodName];\n      }\n    }\n    \n    descriptor._methods.triggerBefore = makeTrigger(triggerBeforeValue);\n    descriptor._methods.trigger = makeTrigger(descriptor.trigger);\n    descriptor._methods.transform = descriptor.transform || passThrough;\n    descriptor._methods.attributeTransform = descriptor.attributeTransform || passThrough;\n    descriptor._methods.reflectAttribute = makeReflect(propName, descriptor);\n    descriptor._methods.queueSync = makeQueueSync(propName, descriptor);\n    \n    // We need to store the list of validators back on the descriptor as we modify this inside of makeValidate\n    descriptor._methods.validate = makeValidate(descriptor);\n    \n    // Store reverse mapping of attribute -> property\n    if (descriptor.attribute) {\n      proto._attributes[descriptor.attribute] = propName;\n    }\n    else {\n      // Remove the mapping in case it was overridden\n      proto._attributes[descriptor.attribute] = null;\n    }\n    \n    // Store the descriptor\n    proto._properties[propName] = descriptor;\n  }\n  \n  /**\n   Create a generic getter.\n   \n   @param {String} propName\n   The property name whose getter should be invoked.\n   \n   @ignore\n   */\n  function makeGetter(propName) {\n    return function getter() {\n      // Invoke the original getter\n      return this._properties[propName].get.call(this);\n    };\n  }\n  \n  /**\n   Create a genertic setter.\n   \n   @param {String} propName\n   The name of the property.\n   \n   @alias Coral.register.makeSetter\n   \n   @returns {Function} The setter function.\n   */\n  function makeSetter(propName) {\n    return function setter(value, silent) {\n      var descriptor = this._properties[propName];\n      var methods = descriptor._methods;\n      \n      // Transform the value, passing the default\n      // The default value cannot be cached in the outer closure as that would prevent monkey-patching\n      var newValue = methods.transform.call(this, value, this._properties[propName].default);\n      \n      // Store the old value before the setter is invoked\n      var oldValue = this[propName];\n      \n      // Performs all the validations until one of them fails\n      var self = this;\n      var failed = methods.validate.some(function(validator) {\n        return !validator.call(self, newValue, oldValue);\n      });\n      \n      // If a validation failed then we return\n      if (failed) {\n        return;\n      }\n      \n      if (!silent) {\n        var event = methods.triggerBefore.call(this, newValue, oldValue);\n        if (event && event.defaultPrevented) {\n          // Allow calls to preventDefault() to stop events\n          return;\n        }\n      }\n      \n      // Invoke the original setter\n      descriptor.set.call(this, newValue, silent);\n      \n      // Reflect the attribute\n      methods.reflectAttribute.call(this, newValue);\n      \n      // Queue property sync. Do this before trigger, in case an event listener wants to unroll the sync queue\n      methods.queueSync.call(this);\n      \n      // Trigger an event\n      if (!silent) {\n        methods.trigger.call(this, newValue, oldValue);\n      }\n      \n      // Store that this prop has been set\n      // This is used during initialization when deciding whether to apply default values\n      this._setProps[propName] = true;\n    };\n  }\n  \n  function makeBasicGetter(propName) {\n    var tempVarName = '_' + propName;\n    \n    /**\n     Gets the corresponding underscore prefixed \"private\" property by the same name.\n     \n     @function Coral~defaultGet\n     @returns The prefixed property\n     */\n    return function getter() {\n      return this[tempVarName];\n    };\n  }\n  \n  function makeBasicSetter(propName) {\n    var tempVarName = '_' + propName;\n    \n    /**\n     Sets the corresponding underscore prefixed \"private\" property by the same name.\n     \n     @param {*} value  The value to set\n     @function Coral~defaultSet\n     */\n    return function setter(value) {\n      this[tempVarName] = value;\n    };\n  }\n  \n  /**\n   Define a set of {@link Coral~PropertyDescriptors} on the passed object\n   \n   @param {Object} proto\n   The object to define properties on, usually a prototype.\n   @param {Object.<String, Coral~PropertyDescriptor>} properties\n   A map of property names to their corresponding descriptors.\n   \n   @alias Coral.register.defineProperties\n   */\n  function defineProperties(proto, properties) {\n    // Loop over properties and define them on the prototype\n    for (var propName in properties) {\n      if (!properties[propName]) {\n        // Skip properties that were removed to avoid redefinition\n        continue;\n      }\n      defineProperty(proto, propName, properties[propName]);\n    }\n  }\n  \n  /**\n   Define a single {@link Coral~PropertyDescriptors} on the passed object\n   \n   @param {Object} proto\n   The object to define properties on, usually a prototype.\n   @param {String} propName\n   The name of the property.\n   @param {Coral~PropertyDescriptor} descriptor\n   A property descriptor\n   \n   @alias Coral.register.defineProperty\n   */\n  function defineProperty(proto, propName, descriptor) {\n    // Handle mixin case\n    if (typeof descriptor === 'function') {\n      // Let descriptor apply itself to the prototype\n      // This allows it to add methods\n      // Use its return value as the actual descriptor\n      descriptor = descriptor(proto, propName);\n      \n      // If nothing is returned, we're done with this property\n      if (!descriptor) {\n        throw new Error('Coral.register.defineProperty: Property function did not return a descriptor for ' + propName);\n      }\n    }\n    \n    // Store the associated methods\n    storeDescriptor(proto, propName, descriptor);\n    \n    // Create the generic setters and getters for this property\n    // Store them back so we can access them for silent sets\n    // These do not need to be overridden as they delegate to this._properties._methods\n    var actualSetter = descriptor._methods.set = makeSetter(propName);\n    var actualGetter = descriptor._methods.get = makeGetter(propName);\n    \n    // Define the property\n    Object.defineProperty(proto, propName, {\n      // All properties are enumerable\n      enumerable: true,\n      // No properties are configurable\n      configurable: false,\n      set: actualSetter,\n      get: actualGetter\n    });\n  }\n  \n  var tagPrototypes = {};\n  /**\n   Memoized getProtoTypeOf for HTML tags\n   @ignore\n   */\n  function getPrototypeOfTag(tagName) {\n    tagPrototypes[tagName] = tagPrototypes[tagName] || Object.getPrototypeOf(document.createElement(tagName));\n    return tagPrototypes[tagName];\n  }\n  \n  /**\n   Register a Coral component, setting up inheritance, mixins, properties, and the associated custom element.\n   \n   @memberof Coral\n   @static\n   \n   @param {Object} options\n   Component options.\n   @param {String} options.name\n   Name of the constructor (i.e. 'Accordion.Item'). The constructor will be available under 'Coral' at the path\n   specified by the name.\n   @param {String} options.tagName\n   Name of the new element (i.e 'coral-component').\n   @param {String} [options.baseTagName = (none)]\n   Name of the tag to extend (i.e. 'button'). This is only required when extending an existing HTML element such that\n   the <code>&lt;button is=\"custom-element\"&gt;</code> style will be used.\n   @param {Object} [options.extend = Coral.Component]\n   Base class of the component. When extending an existing HTML element, this should match the interface implemented\n   by the tag -- that is, for <code>baseTagName: 'button'</code> you should pass\n   <code>extend: HTMLButtonElement</code>.\n   @param {Array.<Object|Coral~mixin>} [options.mixins]\n   Mixin or {Array} of mixins to add. Mixins can be an {Object} or a {Coral~mixin}.\n   @param {Object.<String, Coral~PropertyDescriptor>} [options.properties]\n   A map of property names to their corresponding descriptors.\n   @param {Object} [options.events]\n   Map of the events and their handler.\n   @param {Object} [options._elements]\n   Map of elements and their locations used for caching.\n   */\n  Coral.register = function(options) {\n    // Throw away options.extend if baseTagName provided and the prototype isn't part of Coral.Component\n    if (options.extend && !options.extend.prototype._methods) {\n      options.extend = Coral.Component;\n    }\n    \n    // Extend Coral.Component if nothing is provided\n    var extend = options.extend || Coral.Component;\n    \n    // We'll use the prototype of the argument passed constructor we're extending\n    var baseComponentProto = extend.prototype;\n    var actualPrototype = baseComponentProto;\n    \n    // Use passed or be an empty object so mixins can add properties to components that don't define any\n    // Don't modify the passed properties object directly\n    var properties = options.properties ? Coral.commons.extend({}, options.properties) : {};\n    \n    if (options.baseTagName) {\n      // If we're extending a base tag, we need to use its prototype, not the Component's\n      actualPrototype = getPrototypeOfTag(options.baseTagName);\n    }\n    \n    // Setup the prototype chain\n    var proto = Object.create(\n      actualPrototype\n    );\n    \n    // Store a reference to the next component's prototype in the chain\n    // This allows us to crawl up the component prototype chain later\n    proto._proto = baseComponentProto;\n    \n    if (options.baseTagName) {\n      var protoChain = [];\n      \n      // Build the prototype chain\n      var curBaseProto = baseComponentProto;\n      while (curBaseProto && curBaseProto._methods) {\n        protoChain.unshift(curBaseProto);\n        curBaseProto = curBaseProto._proto;\n      }\n      \n      // Iterate over the prototype chain and mix all the methods in\n      while (curBaseProto = protoChain.shift()) {\n        for (var methodName in curBaseProto._methods) {\n          proto[methodName] = curBaseProto[methodName];\n        }\n      }\n      \n      // Note that we'll already get a flattened list of properties from _properties\n      // So we don't have to do something similar there\n    }\n    \n    // Create attribute -> property mappings and the property descriptor map\n    // Do this before we mixin/override properties as storeDescriptor() will write back to _attributes and _properties\n    proto._attributes = Coral.commons.extend({}, baseComponentProto._attributes);\n    proto._properties = {};\n    \n    // Define and inherit events from parent class\n    proto._events = Coral.commons.extend({}, baseComponentProto._events, options.events);\n    \n    // Define and inherit sub-elements from parent class\n    proto._elements = Coral.commons.extend({}, baseComponentProto._elements, options._elements);\n    \n    // Store the name on the prototype\n    // the toString method of Coral.Component uses this\n    proto._componentName = options.name;\n    \n    // CSS className\n    proto._className = options.className;\n    \n    // Add methods to the prototype, and store them in an object for easy access\n    // We'll use this object when extending base tagnames later\n    var _methods = proto._methods = {};\n    for (var method in options) {\n      if (!specialProperties[method]) {\n        proto[method] = _methods[method] = options[method];\n      }\n    }\n    \n    // Add mixins to the prototype\n    // Do this before combining properties to allow seemless modification of properties overridden by mixins\n    if (options.mixins) {\n      Coral.commons.mixin(\n        proto,\n        // A single Object, Function, or Array thereof\n        options.mixins,\n        {\n          // Pass properties so functional mixins can augment them\n          properties: properties\n        }\n      );\n    }\n    \n    // Store and override property descriptors\n    Coral.commons.augment(proto._properties, baseComponentProto._properties, properties, function(existingDesc, newDesc, propName) {\n      // Drop properties that are not defined\n      if (!newDesc) {\n        return null;\n      }\n      \n      // The child component (newDesc) determines whether to ignore the base component's descriptor\n      if (newDesc.override === true) {\n        // The new component wants to ignore the base component's descriptor\n        return newDesc;\n      }\n      \n      // Combine and override as necessary\n      // The order of arguments seems backwards because we use this method in Coral.register.augmentProperties\n      // This makes it so the existing setter is called first\n      // It also makes it so the new descriptor will override other properties\n      var combinedDesc = Coral.commons.augment(\n        // Don't modify the existing descriptor\n        {},\n        newDesc,\n        existingDesc,\n        handleAugmentPropertyCollision\n      );\n      \n      // Store the new methods and descriptor\n      storeDescriptor(proto, propName, combinedDesc);\n      \n      // The property is already defined, so tell defineProperties not to define it again\n      properties[propName] = undefined;\n      \n      // storeDescriptor() already stored the descriptor, but we have to return it anyway\n      return combinedDesc;\n    });\n    \n    // Removed properties that have been removed by inheriting components\n    for (var propName in proto._properties) {\n      if (!proto._properties[propName]) {\n        delete proto._properties[propName];\n      }\n    }\n    \n    // Define properties last\n    // This allows mixins to merge and modify properties\n    if (options.baseTagName) {\n      // Define ALL properties as we don't pick up any from the prototype\n      defineProperties(proto, proto._properties);\n    }\n    else {\n      // Define just the new properties\n      defineProperties(proto, properties);\n    }\n    \n    // The options to be passed to registerElement\n    var registrationOptions = {\n      prototype: proto\n    };\n    \n    if (options.baseTagName) {\n      // When a base tag is provided, we need to tell registerElement\n      registrationOptions.extends = options.baseTagName;\n    }\n    \n    // Register the element\n    // This returns a constructor\n    var Constructor = document.registerElement(options.tagName, registrationOptions);\n    \n    // Assign the constructor at the correct location within the Coral namespace\n    Coral.commons.setSubProperty(Coral, options.name, Constructor);\n    \n    return Constructor;\n  };\n  \n  // Expose globally\n  Coral.register.defineProperties = defineProperties;\n  Coral.register.defineProperty = defineProperty;\n  \n  /**\n   Augment a set of property descriptors with another set.\n   The <code>dest</code> property descriptors map is modified in place.\n   The individual property descriptors (values of <code>dest</code>) are not modified.\n   \n   @param {Object<String,Coral~PropertyDescriptor>} dest\n   The set of property descriptors to agument.\n   @param {Object<String,Coral~PropertyDescriptor>} source\n   The set of property descriptors to use.\n   @param {Coral.commons~handleCollision} [handleCollision]\n   Called if the descriptor property being copied is already present on the destination.\n   The return value will be used as the property value.\n   By default, if <code>sync</code> or <code>set</code> collides, both provided methods will be called.\n   By default, if any other descriptor property collides, the destination's value will be used.\n   */\n  Coral.register.augmentProperties = function(dest, source, handleCollision) {\n    Coral.commons.augment(dest, source, function(existingDesc, newDesc, propName) {\n      // The mixin target (dest) determines whether to ignore the mixin's properties\n      if (existingDesc.override === true) {\n        // The mixin target (dest) wants to ignore the mixin's descriptor\n        return existingDesc;\n      }\n      \n      // Deep-augment individual property descriptor properties\n      var combinedDesc = Coral.commons.augment(\n        // Don't modify the existing descriptor\n        {},\n        existingDesc,\n        newDesc,\n        handleCollision || handleAugmentPropertyCollision\n      );\n      \n      return combinedDesc;\n    });\n  };\n  \n  /**\n   Default collision handler when augmenting properties\n   @ignore\n   */\n  function handleAugmentPropertyCollision(destValue, sourceValue, descPropName) {\n    switch (descPropName) {\n      case 'sync':\n      case 'set':\n        // Use both methods\n        return callBoth(sourceValue, destValue);\n      default:\n        // Use component's value\n        return destValue;\n    }\n  }\n  \n  /**\n   Return a function that calls both functions and ignores their return values\n   @ignore\n   */\n  function callBoth(first, second) {\n    return function() {\n      first.apply(this, arguments);\n      second.apply(this, arguments);\n    };\n  }\n}());\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2015 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n/**\n Property descriptor factory factories\n @namespace\n */\nCoral.property = {};\n\n/**\n A factory that creates descriptor factories that proxy a local property/attribute to a sub-property.\n This factory should be used when you need the property of an sub-object to be set or queued for sync when a local\n property changes.\n This is especially useful for setting the innerHTML or other properties of sub-elements.\n \n @param {Coral~PropertyDescriptor} descriptor\n The property descriptor\n @param {String} path\n The path under <code>this</code> to proxy to. For instance, <code>_elements.header.innerHTML</code> would proxy\n to the <code>innerHTML</code> of the element with the handle <code>header</code>\n @param {Boolean} [needsDOMSync=false]\n Whether the property set should happen asynchronously on the next animation frame.\n \n @returns {Function} The descriptor factory.\n */\nCoral.property.proxy = function(descriptor) {\n  'use strict';\n  \n  // Store the path\n  var path = descriptor.path;\n  \n  function setProxy(value, silent) {\n    /* jshint validthis: true */\n    Coral.commons.setSubProperty(this, path, value);\n  }\n  \n  function getProxy() {\n    /* jshint validthis: true */\n    return Coral.commons.getSubProperty(this, path);\n  }\n  \n  var functionalDescriptor = function(proto, propName) {\n    var tempPropName = '_' + propName;\n    \n    if (descriptor.needsDOMSync) {\n      // If a sync needs to happen, define a method\n      descriptor.sync = function() {\n        Coral.commons.setSubProperty(this, path, this[tempPropName]);\n        \n        // Use undefined here, not null\n        this[tempPropName] = undefined;\n      };\n      \n      descriptor.set = function(value, silent) {\n        this[tempPropName] = value;\n      };\n      \n      descriptor.get = function() {\n        // Return the temporary variable if it's set, otherwise get the property we're proxying\n        return typeof this[tempPropName] === 'undefined' ?\n          Coral.commons.getSubProperty(this, path) : this[tempPropName];\n      };\n    }\n    else {\n      // If we don't need to sync, simply delegate to the property\n      // @todo test if it's faster to compose a function with new Function()\n      descriptor.set = setProxy;\n      descriptor.get = getProxy;\n      descriptor.sync = null;\n    }\n    \n    return descriptor;\n  };\n  \n  // Override by default\n  // Store this on the function so Coral.register can check it\n  functionalDescriptor.override = typeof descriptor.override !== 'undefined' ? descriptor.override : true;\n  \n  // Return a function that sets up the property\n  return functionalDescriptor;\n};\n\n/**\n A factory that creates descriptor factories that proxy a local property/attribute to a sub-element's attribute.\n \n This is useful when you want to proxy a property/attrubute to a sub-element as an attribute set/removal.\n For instance, you may want to proxy the <code>aria-labelledby</code> property of a field component to the actual\n input inside of the component for accessibility purposes.\n \n When using this property factory, be sure to specify a property name not implemented by the browser already.\n \n @param {Coral~PropertyDescriptor} descriptor\n The property descriptor.\n @param {String} descriptor.attribute\n The attribute to proxy.\n @param {String} descriptor.handle\n The handle of the element to proxy the attribute to.\n */\nCoral.property.proxyAttr = function(descriptor) {\n  'use strict';\n  \n  var attribute = descriptor.attribute;\n  var handle = descriptor.handle;\n  \n  var functionalDescriptor = function(proto, propName) {\n    return Coral.commons.extend({\n      attribute: attribute,\n      set: function(value) {\n        // Both false and null should remove the attribute\n        // This supports the behavior of Coral.transform.boolean as well as non-transformed attributes\n        // Any other value, including empty string, should set it\n        this._elements[handle][value === false || value === null ? 'removeAttribute' : 'setAttribute'](attribute, value);\n      },\n      get: function() {\n        return this._elements[handle].getAttribute(attribute);\n      }\n    }, descriptor);\n  };\n  \n  // Override by default\n  // Store this on the function so Coral.register can check it\n  functionalDescriptor.override = typeof descriptor.override !== 'undefined' ? descriptor.override : true;\n  \n  return functionalDescriptor;\n};\n\n/**\n A factory that creates descriptor factories for content zones.\n \n @param {Coral~PropertyDescriptor} descriptor\n The property descriptor.\n @param {String} descriptor.handle\n The handle of the element to proxy the attribute to.\n @param {String} [descriptor.tagName]\n The tag name to expect. If not provided, any tag will be accepted.\n @param {Function} [descriptor.set]\n Executed after the property is set.\n @param {Function} [descriptor.get]\n An alternate getter. If not provided, the element specified by the handle will be returned.\n @param {Function} [descriptor.insert]\n The method that inserts the content zone into the element.\n @param {Booelean} defaultContentZone\n Set to true if this is the default content zone that {@link Coral.Component#render} moves orphaned elements into.\n */\nCoral.property.contentZone = function(descriptor) {\n  'use strict';\n  \n  var handle = descriptor.handle;\n  var expectedTagName = descriptor.tagName;\n  var additionalSetter = descriptor.set;\n  var alternateGetter = descriptor.get;\n  var insert = descriptor.insert;\n  \n  var functionalDescriptor = function(proto, propName) {\n    if (descriptor.defaultContentZone) {\n      // Alias the setter/getter to the content zone's property\n      Object.defineProperty(proto, 'defaultContentZone', {\n        set: function(value) {\n          this[propName] = value;\n        },\n        get: function() {\n          return this[propName];\n        }\n      });\n    }\n    \n    // Combine the provided descriptor with the factory's properties\n    // Give precidence to the factory's properties\n    return Coral.commons.extend({}, descriptor, {\n      contentZone: true,\n      set: function(value) {\n        var oldNode;\n        \n        if (!!value) {\n          if (!(value instanceof HTMLElement)) {\n            throw new Error('DOMException: Failed to set the \"' + propName + '\" property on \"' + this.toString() +\n              '\": The provided value is not of type \"HTMLElement\".');\n          }\n          \n          if (expectedTagName && value.tagName.toLowerCase() !== expectedTagName) {\n            throw new Error('DOMException: Failed to set the \"' + propName + '\" property on \"' + this.toString() +\n              '\": The new ' + propName + ' element is of type \"' + value.tagName + '\". It must be a \"' +\n              expectedTagName.toUpperCase() + '\" element.');\n          }\n          \n          oldNode = this._elements[handle];\n          \n          // Replace the existing element\n          if (insert) {\n            // Remove old node\n            if (oldNode && oldNode.parentNode) {\n              oldNode.parentNode.removeChild(oldNode);\n            }\n            // Insert new node\n            insert.call(this, value);\n          }\n          else {\n            if (oldNode && oldNode.parentNode) {\n              console.warn(this._componentName + ' does not define an insert method for content zone ' + handle + ', falling back to replace.');\n              // Old way -- assume we have an old node\n              this._elements[handle].parentNode.replaceChild(value, this._elements[handle]);\n            }\n            else {\n              console.error(this._componentName + ' does not define an insert method for content zone ' + handle + ', falling back to append.');\n              // Just append, which may introduce bugs, but at least doesn't crazy\n              this.appendChild(value);\n            }\n          }\n        }\n        else {\n          // we need to remove the content zone if it exists\n          oldNode = this._elements[handle];\n          if (oldNode && oldNode.parentNode) {\n            oldNode.parentNode.removeChild(oldNode);\n          }\n        }\n        \n        // Re-assign the handle to the new element\n        this._elements[handle] = value;\n        \n        // Invoke the setter\n        if (typeof additionalSetter === 'function') {\n          additionalSetter.call(this, value);\n        }\n      },\n      get: alternateGetter || function() {\n        return this._elements[handle];\n      }\n    });\n  };\n  \n  return functionalDescriptor;\n};\n","/*\n * ADOBE CONFIDENTIAL\n *\n * Copyright 2015 Adobe Systems Incorporated\n * All Rights Reserved.\n *\n * NOTICE:  All information contained herein is, and remains\n * the property of Adobe Systems Incorporated and its suppliers,\n * if any.  The intellectual and technical concepts contained\n * herein are proprietary to Adobe Systems Incorporated and its\n * suppliers and may be covered by U.S. and Foreign Patents,\n * patents in process, and are protected by trade secret or copyright law.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe Systems Incorporated.\n */\n/* global Vent: true */\n/* jshint -W064 */\n(function() {\n  'use strict';\n  \n  // Used to split events by type/target\n  var delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n  \n  // Enum value is referenced for speed\n  var ELEMENT_NODE = Node.ELEMENT_NODE;\n  \n  /**\n   Return the method corresponding to the method name or the function, if passed.\n   \n   @ignore\n   */\n  function getListenerFromMethodNameOrFunction(obj, eventName, methodNameOrFunction) {\n    // Try to get the method\n    if (typeof methodNameOrFunction === 'function') {\n      return methodNameOrFunction;\n    }\n    else if (typeof methodNameOrFunction === 'string') {\n      if (!obj[methodNameOrFunction]) {\n        throw new Error('Coral.Component: Unable to add ' + eventName + ' listener for ' + obj.toString() +\n          ', method ' + methodNameOrFunction + ' not found');\n      }\n      \n      var listener = obj[methodNameOrFunction];\n      \n      if (typeof listener !== 'function') {\n        throw new Error('Coral.Component: Unable to add ' + eventName + ' listener for ' + obj.toString() +\n          ', listener is a ' + (typeof listener) + ' but should be a function');\n      }\n      \n      return listener;\n    }\n    else if (methodNameOrFunction) {\n      // If we're passed something that's truthy (like an object), but it's not a valid method name or a function, get\n      // angry\n      throw new Error('Coral.Component: Unable to add ' + eventName + ' listener for ' + obj.toString() + ', ' +\n        methodNameOrFunction + ' is neither a method name or a function');\n    }\n    \n    return null;\n  }\n  \n  /**\n   @class Coral.Component\n   @classdesc The base element for all Coral components\n   @extends {HTMLElement}\n   */\n  Coral.Component = function() {\n    throw new Error('Coral.Component is not meant to be invoked directly. Inherit from its prototype instead.');\n  };\n  \n  // Inherit from HTMLElement\n  Coral.Component.prototype = Object.create(HTMLElement.prototype);\n  \n  // Store a reference to properties\n  Coral.Component.prototype._properties = {};\n  \n  /**\n   Return this component's name.\n   \n   @ignore\n   */\n  Coral.Component.prototype.toString = function() {\n    return 'Coral.' + this._componentName;\n  };\n  \n  /**\n   Events map. Key is Backbone-style event description, value is string indicating method name or function. Handlers\n   are always called with <code>this</code> as the element.\n   \n   @type {Object}\n   @protected\n   */\n  Coral.Component.prototype._events = {\n  \n  };\n  \n  /**\n   Called when the component is being constructed. This method applies the CSS class, renders the component, binds\n   events, and sets initial property values.\n   \n   {@link Coral.Component#_initialize} is called after the above operations are complete.\n   @protected\n   */\n  Coral.Component.prototype.createdCallback = function() {\n    // We have to add toString directly on the instance or it doesn't work in IE 9\n    // A side-effect of this is that toString cannot be overridden\n    if (this.toString !== Coral.Component.prototype.toString) {\n      this.toString = Coral.Component.prototype.toString;\n    }\n    \n    // Track which properties have been set\n    // This is used when setting defaults\n    this._setProps = {};\n    \n    this._syncQueue = [];\n    \n    // Make sure context is correct when called by nextFrame\n    this._syncDOM = this._syncDOM.bind(this);\n    \n    // Create a Vent instance to handle local events\n    this._vent = new Vent(this);\n    \n    // Apply the class name\n    if (this._className) {\n      this.classList.add.apply(this.classList, this._className.split(' '));\n    }\n    \n    // Create the elements property before the template. Templates that use handle=\"someName\" attrs will need this\n    this._elements = {};\n    \n    // Render template, if necessary\n    if (typeof this._render === 'function') {\n      this._render();\n    }\n    \n    var prop;\n    var attr;\n    var value;\n    var descriptor;\n    var methods;\n    \n    // A hash where all the content zone names are stored using the tagName as key and property as value\n    this._contentZones = {};\n    \n    // A list of attribute values indexed by property name\n    // prop -> attrValue\n    var attrValues = {};\n    \n    // Build a cache of attribute values provided via the markup and check for content zones\n    for (prop in this._properties) {\n      descriptor = this._properties[prop];\n      \n      if (descriptor.contentZone) {\n        // Check if the tag name is unique\n        if (this._contentZones[descriptor.tagName]) {\n          console.warn('Coral.Component: content zone for \"%s\" is already defined', descriptor.tagName);\n        }\n        \n        // Add the prop to the hash\n        this._contentZones[descriptor.tagName] = prop;\n      }\n      \n      // Use the attribute name specified by the map\n      attr = descriptor.attribute || prop;\n      \n      // Fetch the attribute corresponding to the property from the element\n      attrValues[prop] = this.getAttribute(attr);\n    }\n    \n    // Apply default values for all properties and their associated attributes\n    for (prop in this._properties) {\n      descriptor = this._properties[prop];\n      methods = descriptor._methods;\n      \n      // Get the attribute value from the cache\n      value = attrValues[prop];\n      \n      if (value !== null) {\n        // Since the value is loaded as an attribute, it needs to be transformed from its attribute value\n        if (methods.attributeTransform) {\n          value = methods.attributeTransform.call(this, value, descriptor.default);\n        }\n        \n        // Run the value transform function\n        if (descriptor.transform) {\n          value = methods.transform.call(this, value, descriptor.default);\n        }\n        \n        // Check if the value valdiates\n        if (methods.validate) {\n          for (var i = 0; i < methods.validate.length; i++) {\n            // Don't pass the old value\n            if (!methods.validate[i].call(this, value)) {\n              // If it fails validation, we'll use the default\n              value = null;\n              break;\n            }\n          }\n        }\n      }\n      \n      if (value === null) {\n        // If the property has already been set in another setter, don't apply the default\n        if (this._setProps[prop]) {\n          continue;\n        }\n        \n        // If the default is a function we call it\n        if (typeof descriptor.default === 'function') {\n          // Call method if the default value is a method\n          value = descriptor.default.call(this);\n        }\n        else {\n          // Otherwise we set it from the descriptor directly\n          value = descriptor.default;\n        }\n        \n        // If the value that came out of the default is undefined,\n        // this means that the property does not really have a default value\n        // so we continue in order to avoid setting it\n        if (typeof value === 'undefined') {\n          continue;\n        }\n      }\n      \n      // Invoke the setter silently so we don't trigger \"change\" events on initialization\n      this.set(prop, value, true);\n    }\n    \n    this._delegateEvents();\n    \n    // Call the initialize method, if necessary\n    if (typeof this._initialize === 'function') {\n      this._initialize();\n    }\n    \n    // Add MutationObserver for content zones\n    if (Object.keys(this._contentZones).length) {\n      // Watch for childlist modifications\n      this._observer = new MutationObserver(this._handleContentZones.bind(this));\n      this._observer.observe(this, {\n        childList: true,\n        subtree: false // don't care about nested stuff\n      });\n    }\n    \n    // Trigger ready event\n    this._componentReady = true;\n  };\n  \n  /**\n   Detects when items are added and removed to make sure that the state of the content zone is accurate.\n   \n   @param {Array.<MutationRecord>} records\n   \n   @private\n   */\n  Coral.Component.prototype._handleContentZones = function(records) {\n    var record;\n    var addedNodes;\n    var removedNodes;\n    var node;\n    var tagName;\n    var propertyName;\n    \n    for (var i = 0, recordsCount = records.length; i < recordsCount; i++) {\n      record = records[i];\n      \n      addedNodes = record.addedNodes;\n      removedNodes = record.removedNodes;\n      \n      // Handle removed nodes\n      for (var k = 0, removedNodesCount = removedNodes.length; k < removedNodesCount; k++) {\n        node = removedNodes[k];\n        \n        // only bother with element nodes\n        if (node.nodeType === ELEMENT_NODE) {\n          tagName = node.tagName.toLowerCase();\n          \n          // we use the content zone hash to check if there is an item assigned\n          propertyName = this._contentZones[tagName];\n          \n          // the content zone needs to be cleared if it matches the previous item; while calling the insert, content\n          // zones are removed and added again in the correct location triggering a mutation\n          if (propertyName && this[propertyName] === node && node.parentNode === null) {\n            this[propertyName] = undefined;\n          }\n        }\n      }\n      \n      // Handle added nodes\n      for (var j = 0, addedNodesCount = addedNodes.length; j < addedNodesCount; j++) {\n        node = addedNodes[j];\n        \n        // only bother with element nodes\n        if (node.nodeType === ELEMENT_NODE) {\n          tagName = node.tagName.toLowerCase();\n          \n          // check if the added node matches a content zone; use the content zone hash to find if the tag name exists\n          propertyName = this._contentZones[tagName];\n          \n          // we update the content zone if the value is different than the current\n          if (propertyName && this[propertyName] !== node) {\n            // assign to content zone\n            this[propertyName] = node;\n          }\n        }\n      }\n    }\n  };\n  \n  /**\n   Called after the element has been constructed, template rendered, and attributes applied.\n   \n   @function _initialize\n   @protected\n   @memberof Coral.Component#\n   */\n  \n  /**\n   The CSS class name to apply to the element.\n   \n   @type {String}\n   @member _className\n   @protected\n   @memberof Coral.Component#\n   */\n  \n  /**\n   Called during construction, is responsible for rendering any required sub-elements.\n   \n   @function _render\n   @protected\n   @memberof Coral.Component#\n   */\n  \n  /**\n   The filter function for keyboard events. By default, any child element can trigger keyboard events. You can pass\n   {@link Coral.Keys.filterInputs} to avoid listening to key events triggered from within inputs.\n   \n   @function _filterKeys\n   @protected\n   @memberof Coral.Component#\n   */\n  Coral.Component.prototype._filterKeys = function() {\n    return true;\n  };\n  \n  /**\n   Called when this element is inserted into the DOM.\n   \n   @fires Coral.Component#coral-component:attached\n   @private\n   */\n  Coral.Component.prototype.attachedCallback = function() {\n    this.trigger('coral-component:attached');\n    \n    // A component that is in the DOM should respond to global events\n    this._delegateGlobalEvents();\n  };\n  \n  /**\n   Called when this element is removed from the DOM.\n   \n   @fires Coral.Component#coral-component:detached\n   @private\n   */\n  Coral.Component.prototype.detachedCallback = function() {\n    this.trigger('coral-component:detached');\n    \n    // A component that isn't in the DOM should not be responding to global events\n    this._undelegateGlobalEvents();\n  };\n  \n  /**\n   Apply attribute changes by invoking setters. This creates a one-way relationship between attributes and properties.\n   Changing an attribute updates the property, but changing the property does not update the attribute.\n   \n   @private\n   */\n  Coral.Component.prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {\n    // Use the property name from the attribute map, otherwise just set the property by the same name\n    var propName = this._attributes[attrName] || attrName;\n    \n    // Case 1: We are handling sets/gets for this property\n    var descriptor = this._properties[propName];\n    if (typeof descriptor !== 'undefined') {\n      if (descriptor.attribute === null) {\n        // Don't set properties that have explicitly asked to have no corresponding attribute\n        return;\n      }\n      \n      ['attributeTransform', 'transform'].forEach(function(v) {\n        // Use the stored methods\n        var transform = descriptor._methods[v];\n        if (transform) {\n          newValue = transform.call(this, newValue, descriptor.default);\n        }\n      }, this);\n      \n      // Don't bother with the setter unless the value changed\n      if (newValue !== this[propName]) {\n        // Just invoke setter\n        this[propName] = newValue;\n      }\n    }\n    \n    // Case 2: We have a passive setter for this attribute\n    if (this._properties['_' + propName]) {\n      this._properties['_' + propName].set.call(this, newValue);\n    }\n  };\n  \n  /**\n   Queue a DOM sync for the next animation frame. In order for this to work as expected, sync methods should never\n   rely on the result of another value being synced.\n   \n   @protected\n   */\n  Coral.Component.prototype._queueSync = function() {\n    for (var i = 0, ni = arguments.length; i < ni; i++) {\n      var propName = arguments[i];\n      \n      // Check if a sync is already queued\n      var currentIndex = this._syncQueue.indexOf(propName);\n      if (currentIndex !== -1) {\n        // Move to the bottom of the queue.\n        // This is necessary if a sync has already been queued for a property,\n        // but another property sync is queued and specifies that this sync should come later.\n        // This happens when Button.text is synced, as it wants to sync icon afterwards\n        this._syncQueue.splice(currentIndex, 1);\n      }\n      \n      // Queue the sync\n      this._syncQueue.push(propName);\n    }\n    \n    if (!this._syncPending) {\n      Coral.commons.nextFrame(this._syncDOM);\n      this._syncPending = true;\n    }\n  };\n  \n  /**\n   Sync the specified property to the DOM.\n   \n   @param {String} propName\n   The name of the property to sync.\n   @param {Boolean} [leaveInQueue=false]\n   Whether the property should be left in the queue.\n   \n   @protected\n   */\n  Coral.Component.prototype._syncProp = function(propName, leaveInQueue) {\n    // De-queue each sync operation\n    var method = this._properties[propName].sync;\n    if (method) {\n      method.call(this);\n    }\n    else {\n      console.warn('Coral.Component: sync method for %s is not defined', propName);\n    }\n    \n    if (!leaveInQueue) {\n      var index = this._syncQueue.indexOf(propName);\n      if (index !== -1) {\n        this._syncQueue.splice(index, 1);\n      }\n    }\n  };\n  \n  /**\n   Sync all changed properties to the DOM.\n   \n   @protected\n   */\n  Coral.Component.prototype._syncDOM = function() {\n    var propName;\n    \n    // De-queue each sync operation\n    while (propName = this._syncQueue.shift()) {\n      // Sync the property, and avoid removing it because we already have\n      this._syncProp(propName, true);\n    }\n    \n    this._syncPending = false;\n  };\n  \n  /**\n   Add local event and key combo listeners for this component, store global event/key combo listeners for later.\n   \n   @private\n   \n   @returns {Coral.Component} this, chainable.\n   */\n  Coral.Component.prototype._delegateEvents = function() {\n    /*\n     Add listeners to new event\n     - Include in hash\n     Add listeners to existing event\n     - Override method and use super\n     Remove existing event\n     - Pass null\n     */\n    var match;\n    var eventName;\n    var eventInfo;\n    var listener;\n    var selector;\n    var elements;\n    var isGlobal;\n    var isKey;\n    var isResize;\n    var isCapture;\n    \n    for (eventInfo in this._events) {\n      listener = this._events[eventInfo];\n      \n      // Extract the event name and the selector\n      match = eventInfo.match(delegateEventSplitter);\n      eventName = match[1] + '.CoralComponent';\n      selector = match[2];\n      \n      if (selector === '') {\n        // instead of null because the key module checks for undefined\n        selector = undefined;\n      }\n      \n      // Try to get the method corresponding to the value in the map\n      listener = getListenerFromMethodNameOrFunction(this, eventName, listener);\n      \n      if (listener) {\n        // Always execute in the context of the object\n        // @todo is this necessary? this should be correct anyway\n        listener = listener.bind(this);\n        \n        // Check if the listener is on the window\n        isGlobal = eventName.indexOf('global:') === 0;\n        if (isGlobal) {\n          eventName = eventName.substr(7);\n        }\n        \n        // Check if the listener is a capture listener\n        isCapture = eventName.indexOf('capture:') === 0;\n        if (isCapture) {\n          // @todo Limitation: It should be possible to do capture:global:, but it isn't\n          eventName = eventName.substr(8);\n        }\n        \n        // Check if the listener is a key listener\n        isKey = eventName.indexOf('key:') === 0;\n        if (isKey) {\n          if (isCapture) {\n            throw new Error('Coral.Keys does not currently support listening to key events with capture');\n          }\n          eventName = eventName.substr(4);\n        }\n        \n        // Check if the listener is a resize listener\n        isResize = eventName.indexOf('resize') === 0;\n        if (isResize) {\n          if (isCapture) {\n            throw new Error('Coral.commons.addResizeListener does not currently support listening to resize event with capture');\n          }\n        }\n        \n        if (isGlobal) {\n          // Store for adding/removal\n          if (isKey) {\n            this._globalKeys = this._globalKeys || [];\n            this._globalKeys.push({\n              keyCombo: eventName,\n              selector: selector,\n              listener: listener\n            });\n          }\n          else {\n            this._globalEvents = this._globalEvents || [];\n            this._globalEvents.push({\n              eventName: eventName,\n              selector: selector,\n              listener: listener,\n              isCapture: isCapture\n            });\n          }\n        }\n        else {\n          // Events on the element itself\n          if (isKey) {\n            // Create the keys instance only if its needed\n            this._keys = this._keys || new Coral.Keys(this, {\n                filter: this._filterKeys,\n                // Execute key listeners in the context of the element\n                context: this\n              });\n            \n            // Add listener locally\n            this._keys.on(eventName, selector, listener);\n          }\n          else if (isResize) {\n            if (selector) {\n              elements = document.querySelectorAll(selector);\n              for (var i = 0; i < elements.length; ++i) {\n                Coral.commons.addResizeListener(elements[i], listener);\n              }\n            }\n            else {\n              Coral.commons.addResizeListener(this, listener);\n            }\n          }\n          else {\n            this._vent.on(eventName, selector, listener, isCapture);\n          }\n        }\n      }\n    }\n  };\n  \n  /**\n   Remove global event listeners for this component.\n   \n   @private\n   \n   @returns {Coral.Component} this, chainable.\n   */\n  Coral.Component.prototype._undelegateGlobalEvents = function() {\n    var i;\n    if (this._globalEvents) {\n      // Remove global event listeners\n      for (i = 0; i < this._globalEvents.length; i++) {\n        var event = this._globalEvents[i];\n        Coral.events.off(event.eventName, event.selector, event.listener, event.isCapture);\n      }\n    }\n    \n    if (this._globalKeys) {\n      // Remove global key listeners\n      for (i = 0; i < this._globalKeys.length; i++) {\n        var key = this._globalKeys[i];\n        Coral.keys.off(key.keyCombo, key.selector, key.listener);\n      }\n    }\n    \n    if (this._keys) {\n      this._keys.destroy(true);\n    }\n    \n    return this;\n  };\n  \n  /**\n   Add global event listeners for this component.\n   \n   @private\n   \n   @returns {Coral.Component} this, chainable.\n   */\n  Coral.Component.prototype._delegateGlobalEvents = function() {\n    var i;\n    if (this._globalEvents) {\n      // Add global event listeners\n      for (i = 0; i < this._globalEvents.length; i++) {\n        var event = this._globalEvents[i];\n        Coral.events.on(event.eventName, event.selector, event.listener, event.isCapture);\n      }\n    }\n    \n    if (this._globalKeys) {\n      // Add global key listeners\n      for (i = 0; i < this._globalKeys.length; i++) {\n        var key = this._globalKeys[i];\n        Coral.keys.on(key.keyCombo, key.selector, key.listener);\n      }\n    }\n    \n    if (this._keys) {\n      this._keys.init(true);\n    }\n    \n    return this;\n  };\n  \n  /**\n   Add an event listener.\n   \n   @param {String} eventName\n   The event name to listen for.\n   @param {String} [selector]\n   The selector to use for event delegation.\n   @param {Function} func\n   The function that will be called when the event is triggered.\n   @param {Boolean} [useCapture=false]\n   Whether or not to listen during the capturing or bubbling phase.\n   \n   @returns {Coral.Component} this, chainable.\n   */\n  Coral.Component.prototype.on = function(eventName, selector, func, useCapture) {\n    this._vent.on(eventName, selector, func, useCapture);\n    return this;\n  };\n  \n  /**\n   Remove an event listener.\n   \n   @param {String} eventName\n   The event name to stop listening for.\n   @param {String} [selector]\n   The selector that was used for event delegation.\n   @param {Function} func\n   The function that was passed to <code>on()</code>.\n   @param {Boolean} [useCapture]\n   Only remove listeners with <code>useCapture</code> set to the value passed in.\n   \n   @returns {Coral.Component} this, chainable.\n   */\n  Coral.Component.prototype.off = function(eventName, selector, func, useCapture) {\n    this._vent.off(eventName, selector, func, useCapture);\n    return this;\n  };\n  \n  /**\n   Trigger an event.\n   \n   @param {String} eventName\n   The event name to trigger.\n   @param {Object} [props]\n   Additional properties to make available to handlers as <code>event.detail</code>.\n   @param {Boolean} [bubbles=true]\n   Set to <code>false</code> to prevent the event from bubbling.\n   @param {Boolean} [cancelable=true]\n   Set to <code>false</code> to prevent the event from being cancelable.\n   \n   @returns {CustomEvent} CustomEvent object\n   */\n  Coral.Component.prototype.trigger = function(eventName, props, bubbles, cancelable) {\n    // When 'bubbles' is not set, then default to true:\n    bubbles = bubbles || bubbles === undefined;\n    \n    // When 'cancelable' is not set, then default to true:\n    cancelable = cancelable || cancelable === undefined;\n    \n    // CustomEvent is polyfilled for IE via Polymer:\n    // https://github.com/Polymer/CustomElements/blob/master/src/boot.js#L84-L93\n    var event = new CustomEvent(eventName, {\n      bubbles: bubbles,\n      cancelable: cancelable,\n      detail: props\n    });\n    \n    // default value in case the dispatching fails\n    var defaultPrevented = false;\n    \n    try {\n      // leads to NS_ERROR_UNEXPECTED in Firefox\n      // https://bugzilla.mozilla.org/show_bug.cgi?id=329509\n      defaultPrevented = !this.dispatchEvent(event);\n    } catch (e) {}\n    \n    // Check if the defaultPrevented status was correctly stored back to the event object\n    if (defaultPrevented !== event.defaultPrevented) {\n      // dispatchEvent() doesn't correctly set event.defaultPrevented in IE 9\n      // However, it does return false if preventDefault() was called\n      // Unfortunately, the returned event's defaultPrevented property is read-only\n      // We need to work around this such that (patchedEvent instanceof Event) === true\n      // First, we'll create an object that uses the event as its prototype\n      // This gives us an object we can modify that is still technically an instanceof Event\n      var patchedEvent = Object.create(event);\n      \n      // Next, we set the correct value for defaultPrevented on the new object\n      // We cannot simply assign defaultPrevented, it causes a \"Invalid Calling Object\" error in IE 9\n      // For some reason, defineProperty doesn't cause this\n      Object.defineProperty(patchedEvent, 'defaultPrevented', {\n        value: defaultPrevented\n      });\n      \n      return patchedEvent;\n    }\n    \n    return event;\n  };\n  \n  /**\n   Non-destructively remove this element. It can be re-added by simply appending it to the document again.\n   It will be garbage collected if there are no more references to it.\n   */\n  Coral.Component.prototype.remove = function() {\n    if (this.parentNode) {\n      // Just remove the element from its parent. This will automatically invoke detachedCallback\n      this.parentNode.removeChild(this);\n    }\n  };\n  \n  /**\n   @ignore\n   @private\n   */\n  Coral.Component.prototype._doSet = function(property, value, silent) {\n    // Get property descriptor from constructor. Property descriptors are stored on constructor with methods\n    // dereferenced to actual functions\n    var descriptor = this._properties && this._properties[property];\n    \n    if (descriptor) {\n      if (descriptor.contentZone && !(value instanceof HTMLElement) && this[property].set) {\n        // If the property is a content zone and the passed value is not a HTML element,\n        // assume we're setting multiple properties of the existing content zone with an object\n        this[property].set(value);\n      }\n      // In case the Content Zone is not a Coral.Component, we still want to be able to set the new values into it\n      else if (descriptor.contentZone && !(value instanceof HTMLElement) && typeof value === 'object' && this[property] instanceof HTMLElement) {\n        Object.keys(value).forEach(function(prop) {\n          this[prop] = value[prop];\n        }, this[property]);\n      }\n      else if (descriptor._methods && descriptor._methods.set) {\n        // Call and pass true silent\n        // Use the actual setter method instead of the original method so events are triggered etc\n        descriptor._methods.set.call(this, value, !!silent);\n      }\n      else {\n        this[property] = value;\n      }\n    }\n    else {\n      // Simply set the property if it doesn't exist or has no setter\n      this[property] = value;\n    }\n  };\n  \n  /**\n   Set a single property.\n   \n   @name Coral.Component#set\n   @function\n   \n   @param {String} property\n   The name of the property to set.\n   @param {*} value\n   The value to set the property to.\n   @param {Boolean} silent\n   If true, events should not be triggered as a result of this set.\n   \n   @returns {Coral.Component} this, chainable.\n   */\n  \n  /**\n   Set multiple properties.\n   \n   @name Coral.Component#set\n   @function\n   \n   @param {Object.<String, *>} properties\n   An object of property/value pairs to set.\n   @param {Boolean} silent\n   If true, events should not be triggered as a result of this set.\n   \n   @returns {Coral.Component} this, chainable.\n   */\n  Coral.Component.prototype.set = function(propertyOrProperties, valueOrSilent, silent) {\n    var property;\n    var properties;\n    var value;\n    \n    if (typeof propertyOrProperties === 'string') {\n      // Set a single property\n      property = propertyOrProperties;\n      value = valueOrSilent;\n      this._doSet(property, value, silent);\n    }\n    else {\n      properties = propertyOrProperties;\n      silent = valueOrSilent;\n      \n      // Set a map of properties\n      for (property in properties) {\n        value = properties[property];\n        \n        this._doSet(property, value, silent);\n      }\n    }\n    \n    return this;\n  };\n  \n  /**\n   Get the value of a property.\n   \n   @param {String} property\n   The name of the property to fetch the value of.\n   \n   @returns {*} Property value.\n   */\n  Coral.Component.prototype.get = function(property) {\n    return this[property];\n  };\n  \n  /**\n   Show this component.\n   \n   @returns {Coral.Component} this, chainable\n   */\n  Coral.Component.prototype.show = function() {\n    if (!this.hidden) {\n      return this;\n    }\n    \n    this.hidden = false;\n    return this;\n  };\n  \n  /**\n   Hide this component.\n   \n   @returns {Coral.Component} this, chainable\n   */\n  Coral.Component.prototype.hide = function() {\n    if (this.hidden) {\n      return this;\n    }\n    \n    this.hidden = true;\n    return this;\n  };\n  \n  // Copy all methods for baseTagName-style inheritance\n  Coral.Component.prototype._methods = {};\n  for (var prop in Coral.Component.prototype) {\n    if (Coral.Component.prototype.hasOwnProperty(prop)) {\n      Coral.Component.prototype._methods[prop] = Coral.Component.prototype[prop];\n    }\n  }\n  \n  /**\n   Whether this component is hidden or not.\n   \n   @name hidden\n   @type {Boolean}\n   @default false\n   @htmlattribute hidden\n   @htmlattributereflected\n   @memberof Coral.Component#\n   */\n  \n  /**\n   Triggered when the component is attached to the DOM.\n   \n   @event Coral.Component#coral-component:attached\n   @deprecated since 1.14.0, use <code>MutationObserver</code> instead.\n   \n   @param {Object} event\n   Event object.\n   */\n  \n  /**\n   Triggered when the component is detached to the DOM.\n   \n   @event Coral.Component#coral-component:detached\n   @deprecated since 1.14.0, use <code>MutationObserver</code> instead.\n   \n   @param {Object} event\n   Event object.\n   */\n  \n  /**\n   Triggerred when the component has been upgraded and is ready for use.\n   \n   @event Coral.Component#coral-component:ready\n   @deprecated since 1.9.0, use <code>Coral.commons.ready()</code> instead.\n   \n   @param {Object} event\n   Event object.\n   */\n}());\n","import {Vent, Promise} from '../coralui-externals';\nimport {commons, events, i18n, keys, Keys, mixin, strings, transform, validate} from '../coralui-util';\nimport 'document-register-element/build/document-register-element';\nimport './libs/Coral.register';\nimport './libs/Coral.Property';\nimport './libs/Coral.Component';\n\n// @ie11\nwindow.Promise = window.Promise || Promise;\n\n// @compat\nwindow.Vent = window.Vent || Vent;\nwindow.Coral = window.Coral || {};\nwindow.Coral.commons = commons;\nwindow.Coral.events = events;\nwindow.Coral.i18n = i18n;\nwindow.Coral.keys = keys;\nwindow.Coral.Keys = Keys;\nwindow.Coral.mixin = mixin;\nwindow.Coral.strings = strings;\nwindow.Coral.transform = transform;\nwindow.Coral.validate = validate;\n","export {Collection, SelectableCollection} from './coralui-collection';\nexport {DateTime} from './coralui-datetime';\nexport {DragAction} from './coralui-dragaction';\n\nexport {Accordion} from './coralui-component-accordion';\nexport {ActionBar} from './coralui-component-actionbar';\nexport {Alert} from './coralui-component-alert';\nexport {AnchorButton} from './coralui-component-anchorbutton';\nexport {Autocomplete} from './coralui-component-autocomplete';\nexport {Button} from './coralui-component-button';\nexport {ButtonGroup} from './coralui-component-buttongroup';\nexport {Calendar} from './coralui-component-calendar';\nexport {Card} from './coralui-component-card';\nexport {CharacterCount} from './coralui-component-charactercount';\nexport {Checkbox} from './coralui-component-checkbox';\nexport {Clock} from './coralui-component-clock';\nexport {Color, ColorInput} from './coralui-component-colorinput';\nexport {ColumnView} from './coralui-component-columnview';\nexport {CycleButton} from './coralui-component-cyclebutton';\nexport {Datepicker} from './coralui-component-datepicker';\nexport {Dialog} from './coralui-component-dialog';\nexport {Drawer} from './coralui-component-drawer';\nexport {FileUpload} from './coralui-component-fileupload';\nexport {Icon} from './coralui-component-icon';\nexport {List, AnchorList, ButtonList, SelectList} from './coralui-component-list';\nexport {Masonry} from './coralui-component-masonry';\nexport {Multifield} from './coralui-component-multifield';\nexport {NumberInput} from './coralui-component-numberinput';\nexport {Overlay} from './coralui-component-overlay';\nexport {Panel, PanelStack} from './coralui-component-panelstack';\nexport {Popover} from './coralui-component-popover';\nexport {Progress} from './coralui-component-progress';\nexport {QuickActions} from './coralui-component-quickactions';\nexport {Radio} from './coralui-component-radio';\nexport {Shell} from './coralui-component-shell';\nexport {Select} from './coralui-component-select';\nexport {Search} from './coralui-component-search';\nexport {Slider, RangedSlider} from './coralui-component-slider';\nexport {StepList, Step} from './coralui-component-steplist';\nexport {Switch} from './coralui-component-switch';\nexport {Table} from './coralui-component-table';\nexport {Tab, TabList} from './coralui-component-tablist';\nexport {TabView} from './coralui-component-tabview';\nexport {Tag, TagList} from './coralui-component-taglist';\nexport {Textarea} from './coralui-component-textarea';\nexport {Textfield} from './coralui-component-textfield';\nexport {Tooltip} from './coralui-component-tooltip';\nexport {Tree, TreeItem} from './coralui-component-tree';\nexport {Wait} from './coralui-component-wait';\nexport {WizardView} from './coralui-component-wizardview';\n\n// For Coral3 custom elements registration support\nimport './coralui-compat';\n"],"names":["Element","prototype","closest","selector","node","matches","parentElement","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","s","document","ownerDocument","querySelectorAll","i","length","item","remove","parentNode","removeChild","testElement","createElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","len","arguments","call","toggle","_toggle","force","createElementNS","descr","Object","getOwnPropertyDescriptor","HTMLElement","defineProperty","SVGElement","lastTime","vendors","x","window","requestAnimationFrame","cancelAnimationFrame","callback","element","currTime","Date","getTime","timeToCall","Math","max","id","setTimeout","CustomEvent","event","params","bubbles","cancelable","detail","undefined","evt","createEvent","initCustomEvent","Event","NAVIGATION_KEYS","TEXT_INPUT_TYPES","keyboardFocus","elements","getElementsByClassName","onKeydownHandler","ctrlKey","altKey","metaKey","indexOf","key","activeElement","body","tagName","type","onMousedownHandler","onFocusHandler","target","onBlurHandler","addEventListener","root","setTimeoutFunc","noop","bind","fn","thisArg","apply","Promise","TypeError","_state","_handled","_value","_deferreds","handle","self","deferred","push","_immediateFn","cb","onFulfilled","onRejected","resolve","reject","promise","ret","e","newValue","then","finale","_unhandledRejectionFn","Handler","doResolve","done","value","reason","ex","prom","constructor","all","arr","args","Array","slice","remaining","res","val","race","values","setImmediate","err","console","warn","_setImmediateFn","_setUnhandledRejectionFn","module","exports","this","isBrowser","longerTimeoutBrowsers","timeoutDuration","navigator","userAgent","microtaskDebounce","called","taskDebounce","scheduled","supportsMicroTasks","debounce","isFunction","functionToCheck","getType","toString","getStyleComputedProperty","property","nodeType","css","getComputedStyle","getParentNode","nodeName","host","getScrollParent","_getStyleComputedProp","overflow","overflowX","overflowY","test","getOffsetParent","offsetParent","documentElement","isOffsetContainer","firstElementChild","getRoot","findCommonOffsetParent","element1","element2","order","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","start","end","range","createRange","setStart","setEnd","commonAncestorContainer","element1root","getScroll","side","upperSide","html","scrollingElement","includeScroll","rect","subtract","scrollTop","scrollLeft","modifier","top","bottom","left","right","getBordersSize","styles","axis","sideA","sideB","parseFloat","isIE10","isIE10$1","appVersion","getSize","computedStyle","getWindowSizes","classCallCheck","instance","Constructor","createClass","defineProperties","props","descriptor","enumerable","configurable","writable","protoProps","staticProps","obj","_extends","assign","source","hasOwnProperty","getClientRect","offsets","width","height","getBoundingClientRect","result","sizes","clientWidth","clientHeight","horizScrollbar","offsetWidth","vertScrollbar","offsetHeight","getOffsetRectRelativeToArbitraryNode","children","parent","isHTML","childrenRect","parentRect","scrollParent","borderTopWidth","borderLeftWidth","marginTop","marginLeft","getViewportOffsetRectRelativeToArtbitraryNode","relativeOffset","innerWidth","innerHeight","offset","isFixed","getBoundaries","popper","reference","padding","boundariesElement","boundaries","boundariesNode","_getWindowSizes","getArea","_ref","computeAutoPlacement","placement","refRect","rects","sortedAreas","keys","map","sort","a","b","area","filteredAreas","filter","_ref2","computedPlacement","variation","split","getReferenceOffsets","state","commonOffsetParent","getOuterSizes","marginBottom","y","marginRight","getOppositePlacement","hash","replace","matched","getPopperOffsets","referenceOffsets","popperRect","popperOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","find","check","findIndex","prop","cur","match","runModifiers","modifiers","data","ends","modifiersToRun","forEach","enabled","update","isDestroyed","options","flip","originalPlacement","position","isCreated","onCreate","onUpdate","isModifierEnabled","modifierName","some","name","getSupportedPropertyName","prefixes","upperProp","charAt","toUpperCase","prefix","toCheck","style","destroy","removeAttribute","disableEventListeners","removeOnDestroy","getWindow","defaultView","attachToScrollParents","scrollParents","isBody","passive","setupEventListeners","updateBound","scrollElement","eventsEnabled","enableEventListeners","scheduleUpdate","removeEventListeners","removeEventListener","isNumeric","n","isNaN","isFinite","setStyles","unit","setAttributes","attributes","setAttribute","applyStyle","arrowElement","arrowStyles","applyStyleOnLoad","modifierOptions","computeStyle","legacyGpuAccelerationOption","gpuAcceleration","offsetParentRect","floor","prefixedProperty","willChange","invertTop","invertLeft","arrow","isModifierRequired","requestingName","requestedName","requesting","isRequired","_requesting","requested","_data$offsets$arrow","querySelector","_data$offsets","isVertical","sideCapitalized","toLowerCase","altSide","opSide","arrowElementSize","center","popperMarginSide","popperBorderSide","sideValue","min","round","getOppositeVariation","placements","validPlacements","clockwise","counter","index","concat","reverse","BEHAVIORS","flipped","placementOpposite","flipOrder","behavior","FLIP","CLOCKWISE","COUNTERCLOCKWISE","step","refOffsets","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariation","flipVariations","keepTogether","toValue","str","size","parseOffset","basePlacement","useHeight","fragments","frag","trim","divider","search","splitRegex","ops","op","mergeWithPrevious","reduce","index2","preventOverflow","priority","primary","escapeWithReference","secondary","shift","shiftvariation","shiftOffsets","hide","bound","inner","subtractLength","Defaults","Popper","_this","jquery","onLoad","update$$1","destroy$$1","enableEventListeners$$1","disableEventListeners$$1","Utils","global","PopperUtils","factory","define","amd","Vent","lastID","scopedSelectorRegex","set","subSet","isScoped","ventStopPropagation","_ventPropagationStopped","stopPropagation","ventStopImmediatePropagation","_ventImmediatePropagationStopped","stopImmediatePropagation","proto","Error","elementOrSelector","_listenersByType","create","_allListeners","_executeCaptureListeners","_executeBubbleListeners","_id","_listenerMatchesRootTarget","listener","_listenerMatchesDelegateTarget","_listenerMatchesEventPhase","useCapture","_executeListenersAtElement","listeners","returnValue","listenerIndex","disabled","matchedTarget","handler","preventDefault","executeListeners","_decorateEvent","eventPath","_getPath","eventPathIndex","trickleDown","currentTargetElement","_undecorateEvent","shouldBubble","bubbleUp","TEXT_NODE","pathEl","on","eventName","namespaces","dotIndex","listenerList","listenerIsScoped","eventObject","off","splice","mapList","dispatch","dispatchEvent","defaultPrevented","patchedEvent","destroyed","template","anonymous","data_0","createDocumentFragment","el0","textContent","appendChild","el1","createTextNode","ResizeObserver","isIE","useNativeResizeSupport","attachEvent","_resizeListenerObject","resizer","cloneNode","listenerFunction","_getResizeListenerObject","_resizeTriggerElement","onload","contentDocument","_originalElement","_listenerFunction","lang","title","triggerElement","targetElement","srcElement","trigger","_resizeListeners","onResize","_addTriggerElement","_fireResizeListeners","fnIndex","_removeTriggerElement","nextID","cleanOption","TRANSITION_DURATION_THRESHOLD","FOCUSABLE_ELEMENTS","contentZoneNames","cssTimeToMilliseconds","time","num","returnFirst","first","second","object","isHTMLUnknownElementIE","names","pop","Commons","_resizeEvent","focusableElements","_focusableElementsSelector","join","_tabbableElementsSelector","scripts","getElementsByTagName","_script","dest","ni","handleCollision","argCount","lastArg","onNextFrame","onTransitionEndCallback","propertyName","hasTransitionEnded","transitionEndEventName","transitions","transitionEndTimeout","onTransitionEnd","transitionStoppedByTimeout","timeoutDelay","transitionDuration","onDefined","promises","nodeNames","addName","el","HTMLUnknownElement","customElements","whenDefined","String","getAttribute","catch","error","path","nsParts","curObj","part","mixin","mixinType","extend","mixins","isArray","_applyMixin","nth","funcToReturn","functions","finalRet","func","_addResizeListener","_removeResizeListener","dataset","commons","Events","_vent","events","locales","strings","I18nProvider","_locale","locale","_evaluate","generic","translationHint","babelHelpers.typeof","placeholderMatches","variablePlaceholderCount","variables","variableCount","placeholderName","component","newLocale","docLang","i18n","modifierCodes","modifierCodeMap","modifierEventPropertyNames","normalizedCodes","specialKeyCodes","namespaceRE","needsContextRE","restrictedTagNames","normalizeCode","code","mapSpecialEventKeyToSpecialAPIDefinition","eventKey","keyToCode","charCodeAt","cleanupFilteredListeners","keycombo","originalString","Keys","elOrSelector","_el","_context","context","_filter","filterInputs","_preventDefault","_stopPropagation","_keyListeners","_keySequences","_currentKeys","_currentKeyCombo","_sequenceTimeout","_handleKeyDown","_handleKeyUp","_resetSequence","reset","init","clearTimeout","sequence","currentPart","currentModifiers","propName","activeSequenceListeners","parts","keyup","doc","currentTarget","comboListeners","sequenceListeners","_processSequences","needsContext","getUID","sequenceTime","keyCode","_setCurrentKeyCombo","_executeListeners","keyCombo","_keyComboToCodeString","combo","namespace","namespaceMatch","exec","sequenceParts","_keySequenceStringToArray","keyComboString","_offByKeyComboString","globalsOnly","escape","isContentEditable","isRestrictedTag","Transformation","Number","transform","Validation","oldValue","enumeration","enumReversed","swapKeysAndValues","validate","typeKitId","typekit","config","Typekit","h","className","t","scriptTimeout","tk","d","src","kitId","async","onreadystatechange","readyState","load","insertBefore","forcePolyfill","g","aa","Set","k","has","l","isConnected","__CE_isImportDocument","Document","ShadowRoot","m","nextSibling","c","ELEMENT_NODE","localName","import","firstChild","__CE_shadowRoot","p","q","Map","f","ba","r","v","w","__CE_patched","__CE_state","connectedCallback","z","disconnectedCallback","A","__CE_hasRegistry","__CE_documentLoadHandled","delete","__CE_is","get","constructionStack","__CE_definition","attributeChangedCallback","observedAttributes","B","MutationObserver","observe","childList","subtree","C","disconnect","addedNodes","ca","D","E","j","Function","SyntaxError","extends","enableCustomizedBuiltins","u","P","Q","xa","adoptedCallback","CustomElementRegistry","polyfillWrapFlushCallback","F","da","ea","importNode","fa","prepend","ga","append","G","H","I","J","K","replaceChild","L","M","attachShadow","N","O","R","S","T","getAttributeNS","U","setAttributeNS","V","removeAttributeNS","W","insertAdjacentElement","ha","ia","ja","before","ka","after","la","replaceWith","ma","na","X","oa","pa","Button","HTMLButtonElement","Canvas","HTMLCanvasElement","Data","HTMLDataElement","Head","HTMLHeadElement","Mod","HTMLModElement","TableCell","HTMLTableCellElement","TableCol","HTMLTableColElement","Anchor","HTMLAnchorElement","Area","HTMLAreaElement","Base","HTMLBaseElement","Body","HTMLBodyElement","BR","HTMLBRElement","HTMLDataListElement","Details","HTMLDetailsElement","Dialog","HTMLDialogElement","Div","HTMLDivElement","DList","HTMLDListElement","Embed","HTMLEmbedElement","FieldSet","HTMLFieldSetElement","Form","HTMLFormElement","Heading","HTMLHeadingElement","HR","HTMLHRElement","Html","HTMLHtmlElement","IFrame","HTMLIFrameElement","Image","HTMLImageElement","Input","HTMLInputElement","Keygen","HTMLKeygenElement","Label","HTMLLabelElement","Legend","HTMLLegendElement","HTMLLIElement","Link","HTMLLinkElement","HTMLMapElement","Media","HTMLMediaElement","Menu","HTMLMenuElement","MenuItem","HTMLMenuItemElement","Meta","HTMLMetaElement","Meter","HTMLMeterElement","HTMLObjectElement","OList","HTMLOListElement","OptGroup","HTMLOptGroupElement","Option","HTMLOptionElement","Output","HTMLOutputElement","Paragraph","HTMLParagraphElement","Param","HTMLParamElement","Picture","HTMLPictureElement","Pre","HTMLPreElement","HTMLProgressElement","Quote","HTMLQuoteElement","Script","HTMLScriptElement","Select","HTMLSelectElement","Slot","HTMLSlotElement","Source","HTMLSourceElement","Span","HTMLSpanElement","Style","HTMLStyleElement","TableCaption","HTMLTableCaptionElement","Table","HTMLTableElement","TableRow","HTMLTableRowElement","TableSection","HTMLTableSectionElement","Template","HTMLTemplateElement","TextArea","HTMLTextAreaElement","Time","HTMLTimeElement","HTMLTitleElement","Track","HTMLTrackElement","UList","HTMLUListElement","Unknown","qa","Y","setPrototypeOf","ra","sa","o","ta","is","ua","childNodes","DocumentFragment","va","wa","innerHTML","content","Z","documentCreateElement","listToArray","list","listCount","COLLECTION_ID","SCOPE_SELECTOR","getTagSelector","tag","nativeTag","filterItem","Collection","_host","_itemTagName","itemTagName","_itemBaseTagName","itemBaseTagName","_itemSelector","itemSelector","_container","container","_handleItems","_allItemsSelector","_useItemTagName","_liveCollection","_onItemAdded","onItemAdded","_onItemRemoved","onItemRemoved","_onCollectionChange","onCollectionChange","items","getAll","removed","Text","skipInitialItems","_observer","_handleMutation","itemCount","mutations","mutation","mutationsCount","addedNodesCount","removedNodes","removedNodesCount","validAddedNodes","validRemovedNodes","itemChanges","_isPartOfCollection","_onItemAttached","_onItemDetached","SelectableCollection","_selectableItemSelector","_selectedItemSelector","_deselectAllExceptSelector","sibling","previousElementSibling","nextElementSibling","selectedAttribute","attributeToRemove","itemsCount","itemOrSelectedAttribute","dateTimeFormats","DEFAULT_FORMAT","transform2digit","globalLocale","language","formatDate","date","formattedDateString","JSON","stringify","dateTimeFormat","Intl","DateTimeFormat","format","message","DateTime","_date","isTime","hours","parseInt","minutes","setHours","setMinutes","clone","getFullYear","getMonth","getDate","month","weekday","getHours","getMinutes","timezone","getTimezoneOffset","abs","UTC","dayNum","getUTCDay","setUTCDate","getUTCDate","yearStart","getUTCFullYear","ceil","day","setDate","getDay","setMonth","diff","coralDate","startOf","moment","DROP_ZONE_ATTRIBUTE","HANDLE_ATTRIBUTE","AXIS_ATTRIBUTE","SCROLL_ATTRIBUTE","CONTAINMENT_ATTRIBUTE","OPEN_HAND_CLASS","CLOSE_HAND_CLASS","IS_DRAGGING_CLASS","DEFAULT_SCROLL_OFFSET","DEFAULT_SCROLL_BY","getViewContainer","transformToArray","getPagePosition","touch","changedTouches","touches","pageX","pageY","within","aBoundingClientRect","bBoundingClientRect","documentScrollTop","documentScrollLeft","al","ar","bl","br","at","ab","bt","bb","isOverDropZone","_dropZones","dropZone","_scrollingElement","_dragElement","DragAction","dragElement","_dragElementValue","dragAction","_initialPosition","_dragEvents","scroll","containment","_drag","_dragEnd","_overflow","pagePosition","dragElementBoundingClientRect","_dragPosition","_handles","dragElementHeight","dragElementWidth","dragElementPosition","dragElementComputedStyle","dragElementCSSPosition","containerBoundingClientRect","containerWidth","containerHeight","containerPosition","selection","empty","getSelection","removeAllRanges","scrollHeight","scrollWidth","newPosition","_dropElement","_dropZoneEntered","restorePosition","_handle","_dragStart","_dropZone","_axis","string","FREE","_scroll","boolean","_containment","delegateEventSplitter","getListenerFromMethodNameOrFunction","methodNameOrFunction","delegateEvents","eventInfo","isGlobal","isKey","isResize","isCapture","_events","substr","_globalKeys","_globalEvents","_keys","_filterKeys","addResizeListener","delegateGlobalEvents","undelegateGlobalEvents","REG_EXP_UPPERCASE","getConstructorName","constructorName","originalConstructor","_namespace","constructorToFind","found","subObj","Coral","_componentName","getAttributePropertyMap","attributePropertyMap","attribute","_attributePropertyMap","ComponentMixin","superClass","_contentZones","_contentZoneObserver","addedNode","contentZone","_contentZoned","eventMap","expectedTagName","additionalSetter","insert","oldNode","_elements","attributeName","hasAttribute","_reflectedAttribute","_silenced","propertyOrProperties","valueOrSilent","silent","properties","isContentZone","updateContentZone","contentZoneProperty","setProperty","hidden","_attributes","_disconnected","_component","PAGE_UP","PAGE_DOWN","LEFT_ARROW","UP_ARROW","variant","CLASSNAME","Accordion","_delegateEvents","_oldSelection","_startHandlingItems","_focusItem","_getFirstSelectable","_getLastSelectable","prevItem","_getPreviousSelectable","_toggleItemSelection","nextItem","_getNextSelectable","_validateSelection","selectedItems","multiple","selectedItem","_preventTriggeringEvents","_resetTabTarget","_triggerChangeEvent","oldSelection","_arraysAreDifferent","_resetTabTargetScheduled","_getAllSelected","_tabTarget","focus","_variant","DEFAULT","_reflectAttribute","_items","_multiple","booleanAttr","__tabTarget","_isTabTarget","injectSVG","status","parser","DOMParser","parseFromString","responseText","svg","display","head","loadIcons","svgURL","req","XMLHttpRequest","open","log","send","$AS","AdobeSpectrum","SPECTRUM_ICONS","SPECTRUM_ICONS_COLOR","SPECTRUM_CSS_ICONS","ICONS","ICONS_PATH","icons","SPECTRUM_ICONS_IDENTIFIER","SPECTRUM_COLORED_ICONS_IDENTIFIER","URL_REGEX","SPLIT_CAMELCASE_REGEX","capitalize","ALL_SIZE_CLASSES","sizeValue","sizeMap","Icon","_delayedRendering","iconId","icon","iconMapped","ICON_MAP","iconName","spectrumIcon","spectrumIconLight","spectrumIconDark","identifier","sizeAttribute","iconSize","SMALL","insertAdjacentHTML","_renderSVG","lastElementChild","isImage","image","altText","role","roleOverride","_updateAltText","_size","_updateIcon","_icon","oldSize","additionalClasses","unshift","url","resolveIconsPath","iconsPath","SPECTRUM_ICONS_PATH","SPECTRUM_ICONS_COLOR_PATH","SPECTRUM_CSS_ICONS_PATH","iconSet","AccordionItem","classes","label","_insertTemplate","selected","_getContentZone","_setContentZone","_setAria","_selected","transitionEnd","_disabled","__isTabTarget","AccordionItemLabel","AccordionItemContent","Item","Content","getFirstSelectableWrappedItem","wrapperItem","child","FOCUSABLE_ELEMENT_SELECTOR","ActionBar","_wait","_onLayout","_debounceOnLayout","_recalculateLayoutOnMutation","previousItem","_getPreviousSelectableWrappedItem","nextWrappedItem","_getNextSelectableWrappedItem","popovers","overlay","focusedItem","ERROR_MARGIN","leftItems","rightItems","itemLeft","itemRight","widthCache","_newWidthCache","leftMoreButtonWidth","getOuterWidth","moreButton","rightMoreButtonWidth","borderWidthLeftContainer","borderWidthRightContainer","primaryLeftOffset","offsetLeft","secondaryRightOffset","availableWidth","currentUsedWidth","leftVisibleItems","rightVisibleItems","moreButtonLeftVisible","moreButtonRightVisible","showItem","itemWidth","_moveToScreen","threshold","_makeItemTabEnabled","_hideItem","wrappedItem","_getAllSelectableItems","currentItem","selectableItems","popoverItems","_itemsInPopover","leftSelectableItems","_getAllSelectable","rightSelectableItems","_outerWidth","isWebkit","_cachedOffsetHeight","_forceWebkitRedraw","show","tabable","_timeout","_moveDirectItemChildren","resizeHelpers","resizeElement","primaryProvided","containers","legacyContainer","targetContainer","containersCount","ActionBarItem","ActionBarContainerCollection","excludedIconSizes","LARGE","EXTRA_LARGE","EXTRA_EXTRA_LARGE","ALL_VARIANT_CLASSES","variantValue","QUIET","iconPosition","ButtonMixin","_contentZoneTagName","_makeAccessible","iconElement","_getIconElement","_iconPosition","LEFT","hasLabel","alt","PRIMARY","MEDIUM","fragment","contentZoneProvided","iconAdded","_block","MINIMAL","_CUSTOM","ICON","_button","ButtonLabel","SPACE","AnchorButton","_onClick","click","babelHelpers.get","AnchorButtonLabel","el2","el3","el4","el5","trapFocus","returnFocus","focusOnShow","FADETIME","COMPONENTS_WITH_OVERLAY","topTabCaptureEl","bottomTabCaptureEl","backdropEl","startZIndex","TAB_KEY","_overlays","overlays","fadeTimeout","cancelBackdropHide","hideEverythingBut","currentAriaHidden","_previousAriaHidden","doRepositionBackdrop","backdrop","zIndex","getHighestZIndex","createDocumentTabCaptureEls","tabIndex","ON","TABBABLE_ELEMENT_SELECTOR","tabbableElement","hideDocumentTabCaptureEls","showEverything","doBackdropHide","_isOpen","hideOrRepositionBackdrop","keepBackdrop","_requestedBackdrop","handleBackdropClick","backdropClickedCallback","doBackdropShow","OverlayMixin","components","_debounceId","_showBackdropOnAttached","_focusOn","_ignoreTabCapture","which","intermediateTabCapture","OFF","selectedElement","_elementToFocusWhenHidden","tabTarget","tabbableElements","tempVent","_returnFocusToElement","_pushOverlay","_showBackdrop","_popOverlay","_trapFocus","topTabCapture","bottomTabCapture","_handleTabCaptureFocus","_handleRootKeypress","_returnFocus","_focusOnShow","_open","silenced","beforeEvent","openComplete","_debounce","_handleFocus","_overlayAnimationTime","closeComplete","_handleReturnFocus","_closeChildOverlays","_overlay","DEPRECATED_ALIGN","DEPRECATED_FLIP_FIT","align","alignSwapped","collision","interaction","Overlay","reposition","_oldPosition","dismissTarget","dismissValue","_isTopOverlay","targetValue","newTarget","PREVIOUS","NEXT","ALIGN_MAP","alignMy","alignAt","forceReposition","_popper","_getTarget","breadthOffset","lengthOffset","FIT","NONE","_target","returnFocusTo","PopperJS","_onUpdate","_alignMy","CENTER_CENTER","_popperMapping","_alignAt","number","_inner","_lengthOffset","_breadthOffset","_placement","RIGHT","_within","_collision","FLIP_FIT","_interaction","_smart","smart","_validateParentOverflow","OFFSET","closable","ALL_PLACEMENT_CLASSES","placementKey","Popover","_hideContentZoneIfEmpty","_observeContentZone","WARNING","ERROR","FLYOUT","headerWrapper","observer","hiddenValue","eventTarget","targetEl","eventIsWithinTarget","_closable","header","footer","tabCapture","closeButton","tip","_insertTypeIcon","isFlyoutVariant","_targetWasSelected","FULLSCREEN_CLASSNAME","_headerObserver","_hideHeaderIfEmpty","_observeHeader","MODAL","fullscreen","_backdrop","contentZoneTarget","_openInDOM","showBackdrop","_fullscreen","movable","_moveToDocumentBody","_movable","DialogHeader","DialogContent","DialogFooter","translations","Header","Footer","PopoverHeader","PopoverContent","PopoverFooter","CLASSNAMES","PopoverSeparator","Separator","excludedAttributes","copyAttributes","from","to","attr","nodeValue","iterated_1","i1","ni1","data_1","el7","el8","el9","buttonListItem","el11","el12","el13","el14","el16","popover","_popover","buttonList","el18","el19","el20","el21","el22","el23","el25","el26","el27","el29","el30","el31","anchorListItem","el33","el34","el35","el36","el38","anchorList","el40","el41","el42","el43","el44","el45","el46","el47","el49","el50","el51","el53","el54","el55","el56","el57","el58","ActionBarContainerMixin","overlayId","button","oldVariant","newVariant","_getAllOffScreen","isButtonList","every","isAnchorList","overlayContent","loop","focusFirstItem","childPopovers","_returnElementsFromPopover","isFocusedItemInsideActionBar","isFocusedItemOffscreen","more","moreButtonText","_styleItem","_threshold","_moreButtonText","ActionBarPrimary","_attachMoreButtonToContainer","ActionBarContainer","ActionBarSecondary","ListMixin","listItem","isAtTarget","_eventIsAtTarget","_getSelectableItems","el6","ListItemMixin","outerContainer","handleItem","contentContainer","_list","List","ListDivider","ListItem","ListItemContent","AnchorList","AnchorListItem","ButtonList","ButtonListItem","Wait","_oldValue","indeterminate","centered","_centered","MONOCHROME","_indeterminate","backgroundPosition","KEYPRESS_TIMEOUT_DURATION","SCROLL_BOTTOM_THRESHOLD","SCROLL_DEBOUNCE","ITEM_TAG_NAME","GROUP_TAG_NAME","SelectList","_keypressTimeoutDuration","_keypressTimeoutID","_keypressSearchString","_onDebouncedScroll","beforeChangeEvent","newString","fromCharCode","currentIndex","newFocusItem","comparison","_scrollTimeout","_groups","_loading","loadIndicator","loading","scrollToBottom","SelectListGroup","_label","SelectListItem","Divider","Group","SelectListItemContent","SECONDARY","INVALID","Primary","Secondary","Container","Alert","INFO","contentZoneName","AlertHeader","AlertContent","AlertFooter","LABELLABLE_ELEMENTS_SELECTOR","TARGET_INPUT_SELECTOR","FormFieldMixin","_labellableElement","_targetChangeInput","_getLabellableElement","_componentTargetProperty","_eventTargetProperty","targetInput","_getTargetChangeInput","_onInputChange","labelledBy","elementId","labelIds","currentValue","labelElement","getElementById","forAttribute","_invalid","currentLabelledBy","_updateForAttributes","_formField","LABEL_CLASSNAME","color","colorMap","ALL_COLOR_CLASSES","colorValue","QUIET_CLASSNAME","MULTILINE_CLASSNAME","LARGE_CLASSNAME","bullsEye","getOffsetCenter","pageYOffset","pageXOffset","clientTop","clientLeft","Tag","_onTagButtonClicked","clientX","clientY","_onRemoveButtonClick","offsetCenter","_onMouseUp","labelText","buttonAriaLabel","labelTextContent","_color","templateHandleNames","_onItemDisconnected","_updateAriaLabel","_toggleTagVariant","_quiet","_multiline","isColored","TagLabel","ITEM_TAGNAME","itemValueFromDOM","TagList","_itemToFocusAfterDelete","_input","input","attachedItem","duplicate","_attachInputToItem","readOnly","detachedItem","_setItemToFocusOnDelete","_onSiblingItemFocus","itemToFocusAfterDelete","_onItemConnected","_initialValues","clear","_name","_readOnly","_required","AutocompleteItem","Textfield","maxHeight","el10","el15","DEBUG","Autocomplete","tagList","_tagMap","_values","_options","_optionsMap","_initialSelectedValues","_handleScrollBottom","_startObserving","field","inputText","forceSelection","_setStateFromDOM","_createOptionsFromDOM","_setSelectedFromDOM","itemObj","innerText","_setInputValues","_resetValues","_addValue","last","_deselectExcept","exceptItem","_stopObserving","asHTML","labelContent","selectList","_scrollItemIntoView","inputValue","clearSuggestions","_showSuggestionsCalled","showSuggestions","addSuggestions","_getMatches","_optionContainsValue","minWidth","deltaY","inputBlur","_blurTimeout","relatedTarget","focusOutside","_handleInput","hideSuggestions","_hideSuggestionsAndFocus","_showSuggestions","itemRect","selectListRect","scrollIntoView","optionMatchesValue","_matchFunction","buttons","option","invalid","delay","focusedItemValue","isChange","exactMatches","_optionEqualsValue","exactMatch","_selectItem","_updateButtonAccessibilityLabel","_focusPreviousItem","_focusNextItem","selectListItem","tagValue","removeValue","tags","_removeValue","text","_clearValues","suggestions","inputGroup","_setName","_delay","_forceSelection","placeholder","maxLength","_match","CONTAINS","STARTSWITH","_optionStartsWithValue","selectedValues","_reflectCurrentValue","_getName","disabledOrReadOnly","readOnlyOrDisabled","required","selectionMode","ITEM_SELECTOR","ButtonGroup","_initalSelectedValues","_onButtonFocus","SINGLE","MULTIPLE","buttonsCount","tabindex","selectedItemsLength","firstSelectable","isSelected","_setFocusToButton","_initialVariant","_addItemOption","ariaCheckedAttr","tabIndexAttr","selectedItemsCount","nativeSelect","selectionCount","selectable","_selectionMode","_setInitialValues","_syncItemOptions","_removeItemOptions","_selectItemByValue","_getFirstSelected","_getLastSelected","selectedOptions","selectedOptionsCount","isDisabled","el17","iterated_2","i2","ni2","data_2","calendarTitle","calendarDate","dateLabel","formattedDate","isToday","ariaSelected","el28","cssClass","cell","el37","el39","el48","isDateInRange","startDate","endDate","toDate","toMoment","Moment","isMoment","isValid","validateAsChangedAndValidMoment","isSame","TableAnimator","_addContainerIfNotPresent","_removeContainerIfEmpty","slide","newTable","direction","isLeft","oldTable","boundingClientRect","ARRAYOF6","ARRAYOF7","INTERNAL_FORMAT","timeUnit","Calendar","_cursor","_activeDescendant","_animator","cursor","_requireCursor","displayYear","year","displayMonth","heading","headerFormat","_renderTable","_setActiveDescendant","currentMoment","isBefore","isAfter","_isBeforeMin","_isAfterMax","dates","_updateTableCaption","caption","activeDescendant","captionText","firstDate","monthStartsAt","startDay","dateLocal","dayMoment","currentWeekIndex","weekIndex","currentDayIndex","dayIndex","ariaInvalid","isCurrentMonth","dayOfWeek","cursorLocal","dateAttr","week","dateText","handles","table","isNext","operator","currentActive","newMoment","difference","_isInRange","_getToNewMoment","_renderCalendar","isInvalid","_gotoPreviousOrNextTimeUnit","MONTH","next","_validateCalendar","currentMonth","currentYear","newMonth","newYear","newMomentValue","dateQuery","newDescendant","WEEK","DAY","isHome","daysInMonth","YEAR","_valueFormat","valueFormat","_startDay","localeData","firstDayOfWeek","_headerFormat","_min","_max","setValueFormat","_originalValue","_valueAsDate","prev","COLOR_HINT_REG_EXP","Card","_hideBannerIfEmpty","banner","_loaded","asset","bannerHeader","bannerContent","headerHiddenValue","contentHiddenValue","images","imagesCount","complete","info","wrapper","_assetHeight","assetWidth","clientRect","ratio","CONDENSED","INVERTED","_assetWidth","_colorHint","_fixedWidth","_stacked","assetHeight","CardBanner","CardBannerHeader","CardBannerContent","CardProperty","CardTitle","CardSubtitle","CardContext","CardDescription","Banner","Property","CardPropertyContent","Title","Subtitle","Context","Description","Asset","CardAsset","CardOverlay","Info","CardInfo","CardContent","PropertyList","CardPropertyList","CharacterCount","elementLength","_targetEl","_maxLength","currentCount","_getCharCount","isMaxExceeded","_refreshCharCount","checkbox","IS_IE_OR_EDGE","Checkbox","_hideLabelIfEmpty","labelWrapper","checked","_initialCheckedState","_checked","CheckboxLabel","buttonId","listId","IS_MOBILE_DEVICE","arrayDiff","item2","_bulkSelectionChange","_useNativeInput","taglist","checkAvailableSpace","ITEM_SIZE_THRESHOLD","viewportHeight","outerHeight","eventTargetWithinOverlayTarget","eventTargetWithinItself","_hideOptions","selectListItemParent","_selectListItem","nativeOption","_nativeOption","_addTagToTagList","_removeTagFromTagList","newSelection","itemValue","_tag","_showOptions","MouseEvent","oldSelectedOptions","_syncSelectedItemPlaceholder","nodes","nodeCount","_validateInitialState","_deselectAllExceptLast","_updateLabel","_onItemSelected","_deselectAllExcept","_onItemDeselected","templateElements","currentElement","_nativeInput","selectedIndex","_placeholder","limitWidth","placeholderItem","maxWidth","targetItem","isReadOnly","invalidIcon","SelectItem","DEFAULT_HOUR_FORMAT","DEFAULT_MINUTE_FORMAT","DEFAULT_TIME_FORMAT","AUTHORIZED_TOKENS","TIME_REG_EXP","RegExp","HOUR_REG_EXP","MIN_REG_EXP","Clock","regExp","defaultFormat","hourFormat","_extractTimeFormat","displayFormat","minuteFormat","_getValueAsString","_syncPeriod","_syncValueAsText","period","am","pm","_togglePeriod","valueAsText","newTime","oldTime","_displayFormat","_syncDisplay","ids","_labelElement","colorSpace","_hex","_slice","startStr","sliced","substring","lastIndexOf","_parseRGB","rgbStr","_serializeRGB","rgb","_parseRGBA","rgbaStr","_serializeRGBA","rgba","_parseCMYK","cmykStr","_serializeCMYK","cmyk","toFixed","_parseHex","hexStr","isOk","_hexToRgb","hex","_serializeHex","_rgbToHex","_cmykToRgb","_rgbToCmyk","_parseHSB","hsbStr","_serializeHSB","hsb","_hsbToRgb","_rgbToHsb","_parseHSL","hslStr","_serializeHSL","hsl","_hslToRgb","hue2rgb","qValue","pValue","_rgbToHsl","_parseHSLA","hslaStr","_serializeHSLA","hsla","Color","_colorSpace","HEX","_alpha","alpha","compareColor","allowSlightColorDifference","allowedRgbDifference","allowedAlphaDifference","rgb2","rDiff","gDiff","bDiff","aDiff","amount","tintColors","tintColor","tintFactor","shadeColors","shadeColor","shadeFactor","RGB","HSL","CMYK","HSB","ColorInputItem","ColorInputAbstractSubviewMixin","_lastValidColor","_colorinput","valueAsColor","_setActiveColor","__beforeOverlayOpen","_beforeOverlayOpen","__onColorInputChange","_onColorInputChange","CLASSNAME_HANDLE","CLASSNAME_INPUT","orientation","Slider","_getTemplate","leftInput","handleContainer","controls","inputs","_onInteraction","defaultValue","_currentHandle","_getPoint","_getValueFromCoord","_findNearestHandle","_updateValue","_setHandleFocus","_draggingHandler","_handleDragging","_mouseUpHandler","_mouseUp","_focus","idx","mouseX","mouseY","closestDistance","Infinity","closestHandle","calculateDistance","elem","box","sqrt","pow","distance","calculatePercent","labelValue","percent","_getLabel","oninput","_onInputChangeHandler","blur","forceEvent","oldValues","newValues","posX","posY","restrictBounds","elementWidth","NaN","rawValue","_snapValueToStep","remainder","floatString","precision","snappedValue","fillHandle","base","_step","_orientation","HORIZONTAL","_moveHandles","_updateFill","_getValueOf","showValue","_showValue","_filled","float","valueAttribute","SliderItem","uidMin","uidMax","el24","RangedSlider","rightInput","rightHandle","leftHandle","resValue","deltaMaxMinBase","_getLowestValue","percentDiff","_getHighestValue","startValue","endValue","initialStartValue","initialEndValue","SliderContent","arrowMap","TOOLTIP_ARROW_SIZE","variantName","placementClassMap","placementClass","Tooltip","targetIsFocused","_cancelShow","_showTimeout","_hideTimeout","_handleFocusOut","_oldTarget","oldTarget","_removeTargetListeners","_targetEvents","_cancelHide","_startHide","_addTargetListeners","TooltipContent","ColorInputSlider","sliderBase","_gradient","bar","barStyle","stops","gradient","amountStops","backgroundImage","partialGradientStr","uid","el32","el52","el59","el60","el61","ColorInputColorProperties","newColor","colorPreview","colorPreview2","hexInput","backgroundColor","rgbValue","rgbaValue","hexValue","prefixesLength","abbr","isAlpha","redInput","redSlider","_onChangeRgba","greenInput","greenSlider","blueInput","blueSlider","alphaInput","alphaSlider","colorValid","subview","propertiesSubview","colorButton","ColorInputSwatch","targetColor","_targetColor","cssColorValue","hexColorValue","ColorInputSwatches","colorElements","colorsElementsChanged","_cachedColorElements","_layoutColorSwatch","_ensureKeyboardAccess","firstSwatch","swatchesContainer","innerHtml","colors","colorsLength","swatchSelected","colorCount","swatch","allItems","newIndex","swatchesSubview","swatchesHeaderTitle","autoGenerateColors","showSwatches","showProperties","showDefaultColors","ColorInput","SWATCH","propertiesView","view","swatchesView","childrenList","childrenListLength","colorEl","colorIndex","generatedIndex","generatedColorEl","generatedColors","TINTS","calculateTintColors","calculateShadeColors","oldColor","isSimilarTo","_validateInputValue","selectColorInItems","selectedColor","colorElementsCount","_selectColorInputColor","_updateColorPreview","isValueEmpty","currentColor","preview","defaultPalette","buttonWrapper","_setDefaultSelectedItem","_syncColorPreviewIcon","_autoGenerateColors","_recalculateGeneratedColors","_showSwatches","_showOrHideView","_showProperties","_showDefaultColors","Swatches","Swatch","ColorProperties","ColumnViewCollection","_deselectAllExceptFirst","scrollTo","duration","scrollCallback","perTick","ColumnView","_oldActiveItem","columns","column","_handleKeyboardMultiselect","activeItem","_afterItemSelectedInColumn","nextColumn","_deactivateAll","_validateColumnViewChange","oldSelectedItems","_isKeyBoardMultiselect","lastSelected","_lastSelected","firstSelectedItem","previousColumn","newSelectedItem","clearEmptyColumns","triggerEvent","completeCallback","_removeEmptyColumnsWithSmoothTransition","_emptyColumnsNextToColumn","_scrollColumnIntoView","emptyColumns","visibility","_validateNavigation","_triggerCollectionEvents","oldActiveItem","newSelectedItems","newColumn","referenceColumn","scrollToColumn","_columns","_getAllActive","ITEM_HEIGHT","ColumnViewColumn","_onItemActiveChange","active","shiftKey","lastSelectedItem","_lastSelectedItems","lastSelectedItemIndex","selectedItemIndex","selectionRange","selectionIndex","rangeItem","_deselectAndDeactivateAllExcept","_validateColumnChange","_loadItems","removedItemIndex","_bulkCollectionChange","_loadFittingAdditionalItems","newActiveItem","itemsHeight","count","_deactivateAllExceptFirst","_tryToLoadAdditionalItems","__selectionMode","__lastSelectedItems","ColumnViewItem","thumbnail","DRILLDOWN","childIndicator","_active","ColumnViewItemContent","ColumnViewItemThumbnail","ColumnViewPreview","ColumnViewPreviewContent","Column","ColumnViewColumnContent","Thumbnail","Preview","ColumnViewPreviewAsset","ColumnViewPreviewLabel","ColumnViewPreviewSeparator","Value","ColumnViewPreviewValue","displayMode","CycleButtonItem","_displayMode","INHERIT","WHITESPACE_REGEX","ACTION_TAG_NAME","CycleButton","_checkExtended","_selectFirstItem","siblingItem","_renderSelectedItem","_isExtended","_hideOverlay","_showOverlay","_selectCycleItem","effectiveDisplayMode","effectiveIcon","ICON_TEXT","ariaLabel","TEXT","origNode","_originalItem","proxyEvent","hasActions","actions","isExtended","action","actionListItem","_buttonListItem","actionList","actionCount","_getSelectListItem","_getActionListItem","_populateLists","handleName","_actions","CycleButtonAction","Action","variantKey","NATIVE_FORMATS","isNativeFormat","Datepicker","_calendarFragment","calendar","TIME","clock","_validateValue","_mergeCalendarAndClockDates","DATE","autoSetTimeIfNeeded","valueAsDate","DATETIME","_type","hiddenInput","_typeFormatChanged","isDate","toggleLabel","displayFormatAttribute","valueFormatAttribute","__useNativeInput","ALL_DIRECTION_CLASSES","directionValue","Drawer","_direction","DOWN","slider","contentWrapper","_animate","DrawerContent","responseType","MIME_TYPE_REGEXP","FILE_EXTENSION_REGEXP","SHORTCUT_REGEXP","MIME_TYPE_AUDIO","MIME_TYPE_IMAGE","MIME_TYPE_VIDEO","FileUploadItem","file","_originalFile","_xhr","acceptedMimeTypes","isAllowed","fileType","allowedMimeType","allowedMimeTypes","MIME_TYPES","mimeType","_parameters","_withCredentials","timeout","_responseType","_readyState","response","_response","_responseText","responseXML","_responseXML","_status","statusText","_statusText","XHR_EVENT_NAMES","FileUpload","_uploadQueue","_doAddDragClass","_doRemoveDragClass","_positionInputOnDropZone","fileName","_abortFile","_clearFile","upload","_addDragClass","_removeDragClass","_removeClassTimeout","_buttonAction","buttonMethod","_buttonMethod","files","_clearQueue","dataTransfer","_getQueueItemByFilename","sizeLimit","accept","_isMimeTypeAllowed","autoStart","_clearFileInputValue","filename","_getQueueIndex","_ajaxUpload","abort","requestMethod","parameters","formData","FormData","additionalParameter","withCredentials","isProgressEvent","lengthComputable","loaded","total","_getQueueItem","offsetTop","form","enctype","submit","_uploadFile","inputElement","_setElementState","param","_async","_action","_method","POST","_sizeLimit","_autoStart","MasonryItem","_masonry","_dragAction","tabbable","_updateDragAction","masonry","layouts","_loadError","itemFilter","isRemovingOrRemoved","relativePosition","rect1","rect2","weightedDistance","x1","y1","x2","y2","unitWidth","unitHeight","getPreviousItem","Masonry","_layouted","_layoutScheduled","_forceDebounce","_newItems","_tabbableItem","_scheduleLayout","_doLayout","_scheduleDebouncedLayout","visible","LayoutClass","_layouts","layout","_layoutInstance","newItems","_insert","tabbableItem","_setTabbableItem","_focusedItem","_focusedItemNext","takeRecords","_dropping","orderable","_attaching","_setTabbable","pos","prevPos","placeholderPos","placeholderWidth","placeholderHeight","placeholderX","placeholderY","detach","_oldBefore","_dropPlaceholder","contentDiv","_prevDragPos","_isApproachingPlaceholder","itemBelow","itemAt","DOCUMENT_POSITION_PRECEDING","reattach","_layout","FIXED_CENTERED","_onResize","_updateLoaded","layoutEnum","_spacing","_orderable","Layout","defineName","__layouts","MasonryLayout","setTransform","setTransition","transition","getFirstRowFilledColumns","filledColumns","_layoutData","colspan","csspx","getPositiveNumberProperty","MasonryColumnLayout","up","_moveFocusVertically","down","_moveFocusHorizontally","home","_moveFocusHomeEnd","firstItem","_columnWidth","_zeroOffsetLeft","_masonryInnerWidth","spacing","_horSpacing","_verSpacing","_offsetLeft","_offsetTop","_verPadding","_masonryAvailableWidth","columnCount","ci","ii","layoutData","_getItemWidth","_writeItemStyle","ignored","detached","minColumnIndex","minColumnHeight","columnHeight","_getItemLeft","columnIndex","itemIndex","newColumnHeight","contentHeight","currentLayoutData","nextItemIndex","nextColumnIndex","currentItemBottom","nextItemOverlap","itemBottom","itemOverlap","secondTry","_init","_writeStyles","_readStyles","_positionItems","_getContentHeight","_postLayout","_resetItem","nullRect","MasonryFixedCenteredLayout","_outerColumnWidth","MasonryFixedSpreadLayout","_alignLeft","remainingWidth","MasonryVariableLayout","MasonryDashboardLayout","nextItemTop","expandedHeight","registerLayout","FIXED_SPREAD","VARIABLE","DASHBOARD","MultifieldCollection","IS_AFTER_CLASS","IS_BEFORE_CLASS","TEMPLATE_SUPPORT","Multifield","_handleTemplateSupport","_renderTemplate","dragElementIndex","itemBoundingClientRect","dragElementOffsetTop","itemOffsetTop","itemReorderedTop","afterDragElement","beforeArr","afterArr","nestedTemplates","MultifieldItem","move","MultifieldItemContent","stepUp","stepDown","clearLiveRegionTimeout","LIVEREGION_TIMEOUT_DELAY","MSPOINTER_TYPE_MOUSE","flagTouchStart","flagStepButtonClick","handleDecimalOperation","value1","value2","value1Decimal","value2Decimal","value1DecimalLength","value2DecimalLength","multiplier","NumberInput","valueAsNumber","_getActualStep","pointerType","_setFocusToInput","_triggerChange","_onStepUpButtonClick","_onStepDownButtonClick","delta","wheelDelta","liveregion","_clearLiveRegion","textNode","presentation","chrome","_updateLiveRegion","_valueAsNumber","_setButtonState","PanelStack","Panel","PanelContent","labelPosition","Progress","_toggleLabelVisibility","percentage","isSidePositioned","SIDE","showPercent","_labelPosition","_setPercentage","_showPercent","ProgressLabel","QuickActionsItem","_onMutation","BUTTON","_href","BUTTON_GAP","BUTTON_FOCUSABLE_SELECTOR","QuickActions","CENTER_TOP","TOP","_openedBefore","_onTargetMouseEnter","_onTargetKeyUp","_onTargetMouseLeave","PARENT","_onTargetKeyDown","current","previous","focusableButtons","_getFocusableButtons","excludeMore","buttonSelector","_hideAll","_updateItem","itemData","_getItemData","ANCHOR","href","buttonListItemParent","htmlContent","quickActionsItem","_setWidth","_getButtons","buttonListItems","temporarilyShown","totalAvailableWidth","buttonOuterWidth","totalFittingButtons","widthUsed","handleThreshold","moreButtonsThanThreshold","collapse","collapseToThreshold","totalButtons","_toggleTabbable","_isTop","toElement","_isInternalToComponent","fromElement","_previousTrapFocus","_previousReturnFocus","firstFocusableButton","_getFirstFocusableButton","lastFocusableButton","nextButton","_getFocusableNeighbour","previousButton","_preventClick","_proxyClick","_setButtonListHeight","focusableItems","_removeItemElements","_attachItem","CENTER","_toggleCenterPlacement","_addTargetEventListeners","_removeTargetEventListeners","targetHasChanged","_previousTarget","previousTarget","ariaOwns","Radio","checkmark","_syncRelatedRadios","RadioLabel","Shell","ShellHeader","_zIndexTimeout","_enableHomeAccessibility","ShellHomeAnchor","Search","_updateClearButton","clearButton","templates","labelId","ShellHelp","resultMessage","results","searchTerm","helpSearchError","allResultsURL","noHelpResults","separator","description","helpResult","seeAllItem","_moveItems","ShellHelpItem","placementValue","ALL_FROM_CLASSES","fromValue","ShellMenu","_getMenu","_from","_full","_top","ShellMenuBar","iconVariant","ALL_ICON_VARIANT_CLASSES","ShellMenuBarItem","menu","shellMenuButton","shellMenuButtonLabel","_iconVariant","_menu","avatar","ShellUser","subheading","ShellWorkspaces","ShellWorkspace","ShellSolutionSwitcher","ShellSolutions","_secondary","ShellSolution","_linked","SEARCH_VISIBILITY_THRESHOLD","ShellOrgSwitcher","itemElement","resultCount","childMatched","elementMatch","ShellOrganization","_setParent","hasChildren","ShellSuborganization","helpTranslations","orgSwitcherTranslations","ShellContent","HomeAnchor","ShellHomeAnchorLabel","Help","MenuBar","User","ShellUserContent","ShellUserFooter","ShellUserHeading","Name","ShellUserName","Subheading","ShellUserSubheading","Workspaces","Workspace","SolutionSwitcher","Solutions","ShellSolutionsHeader","Solution","ShellSolutionLabel","OrgSwitcher","ShellOrgSwitcherFooter","Organization","Suborganization","getTarget","StepList","_syncItemTabIndex","_setStateClasses","_allChildrenAdded","_updateLabels","_selectAndFocusItem","_isHybridMode","tooltip","middle","stepSize","coralStepIndex","hasOversizedLabel","hybridClass","steps","stepsCount","actualStep","_labelIsHidden","_setHybridLabel","realTarget","stepItems","panelItems","maxItems","panel","isInteractive","Step","whiteSpace","stepMarkerContainer","line","_isHybrid","stepList","StepLabel","Switch","switch","SwitchLabel","getIndexOf","getSiblingsOf","stack","getColumns","colgroup","getRows","sections","rows","section","getCells","row","getContentCells","getHeaderCells","getCellByIndex","alignment","sortableDirection","sortableType","TableColumn","newSortableDirection","ASCENDING","DESCENDING","onInitialization","_sortableType","ALPHANUMERIC","_sortableDirection","_alignment","_hidden","_sortable","_preventSort","_doSort","_setHandle","selectHandle","_toggleSelectable","_syncAriaSelectedState","_syncSelectHandle","TableHeaderCell","_stickyCellObserver","_handleMutations","lockable","_toggleOrderable","_toggleLockable","_locked","_selectable","ALL_DIVIDER_CLASSES","dividerValue","TableSectionMixin","_divider","ROW","TableHead","_sticky","TableBody","TableFoot","IS_HIDDEN","IS_DISABLED","IS_SORTED","IS_UNSELECTABLE","IS_FIRST_ITEM_DRAGGED","IS_LAST_ITEM_DRAGGED","IS_FIREFOX","KEY_SPACE","_allowSorting","_resetLayout","_setSelectAllHandleState","lastItem","sticky","oldBefore","tableBoundingClientRect","rowBoundingClientRect","dragData","tableTop","tableSize","headSize","dragElementSize","_dragData","_isDragging","_getColumn","sortable","_sort","siblingHeaderCellSelector","isHeaderCellDragged","containerScrollLeft","tableLeft","leftScrollLimit","rightScrollLimit","scrollOffset","tableScrollWidth","headerCell","draggedHeaderCell","draggedHeaderCellComputedStyle","nextHeaderCellPadding","paddingLeft","paddingRight","nextHeaderCellWidth","nextHeaderCell","nextHeaderCellLeftOffset","prevHeaderCellComputedStyle","beforeHeaderCellPadding","beforeHeaderCellWidth","beforeHeaderCellLeftOffset","headRows","getCellsByIndex","cellIndex","cellElements","foot","rowElement","cells","swapped","beforeColumn","beforeIndex","beforeCells","beforeCol","afterIndex","afterCells","afterCol","draggedColumnIndex","newBefore","_toggleElementTabIndex","locked","lastSelectedDirection","rangeQuery","selectionRangeRow","onSelectStart","onselectstart","firstRow","dragElementTop","topScrollLimit","bottomScrollTimit","dropElement","_removeLastSelectedItem","_syncSelectAllHandle","_addLastSelectedItem","_rowIndex","beforeRow","_toggleStickyHeaderCell","selectItem","changed","_toggleSelectionCheckbox","_toggleFocusable","removedNode","_toggleInteractivity","_setHeaderCellScope","disable","selectAll","_resetAlignmentColumns","fixedWidth","_getColumnHeaderCell","_toggleDragActionHandle","_toggleHeaderCellTabIndex","_isSorted","_resetHiddenColumns","colHeaderCell","_defaultRowIndex","col","aText","bText","localeCompare","NUMBER","aNumber","bNumber","aDate","bDate","CUSTOM","_resetContainerLayout","_layoutStickyCell","cellWidth","cellPadding","borderRightWidth","paddingTop","focusableItem","_getFocusableItem","oldFocusable","forceFocus","isSorted","itemToFocus","_focusEdgeItem","_focusSiblingItem","_selectSiblingItem","_preventResetLayout","_resizeStickyHead","_resizeContainer","calculatedHeadSize","previousRowHeight","headerCells","rowHeight","stickyHeaderCellMinHeight","minHeight","borderTop","stickyHeaderCellHeight","span","labelHeight","containerComputedStyle","borderBottomWidth","containerBorderSize","containerMarginTop","resetLayout","hiddenStyle","alignmentStyle","columnAlignment","_lastScrollLeft","margin","_preventLayoutStickyCellOnScroll","firstHeaderCell","_layoutStickyCellOnScroll","_checkbox","tableSection","scope","ariaRole","_onBodyContentChanged","tableAutoCreatedBody","tHead","tFoot","_lockable","Cell","HeaderCell","TableHeaderCellContent","Row","Foot","Tab","EXTRA_SMALL","tabList","_selectTarget","TabLabel","TabList","_setLine","_toggleItemSelectionAndFocus","VERTICAL","PAGE","tabItems","tab","TabView","tabSelector","tabs","panels","panelStack","Textarea","_defaultHeight","_onInput","INDICATOR_HIT_SIZE","Tree","subTreeContainer","offsetX","offsetY","_onExpandCollapseClick","_toggleItemAttribute","focusable","_getFocusable","_getFocusableItems","edgeItem","_resetFocusableItem","expanded","focused","expand","coralTreeItems","_expandCollapseAll","TreeItem","_parent","subTree","_filterItem","_expanded","TreeItemContent","WizardView","stepLists","panelStacks","_selectItemByIndex","_getSelectedIndex","_selectStep","stepIndex","defaultIndex","_syncStepListSelection","_syncPanelStackSelection","_panelStacks","_stepLists","Ht","wt","Et","Bt","jt","Pt","It","Ft","Jt","ht","_","qt","Rt","attrChange","attrName","kt","prevValue","Ut","zt","Ct","st","Vt","Wt","vt","Lt","Xt","Mt","yt","Nt","Ot","created","$t","Dt","Kt","Qt","tt","ot","Zt","et","en","Gt","Yt","tn","Reflect","construct","gt","St","Tt","collections","HTMLAllCollection","HTMLCollection","HTMLFormControlsCollection","HTMLOptionsCollection","HTMLAppletElement","HTMLAttachmentElement","HTMLAudioElement","HTMLContentElement","HTMLDirectoryElement","HTMLDocument","HTMLFontElement","HTMLFrameElement","HTMLFrameSetElement","HTMLMarqueeElement","HTMLShadowElement","HTMLVideoElement","Attr","Audio","CDATASection","CharacterData","Comment","DocumentType","ProcessingInstruction","XMLDocument","random","isPrototypeOf","getOwnPropertyNames","getPrototypeOf","__proto__","$","sn","nt","rt","WebKitMutationObserver","it","ut","ft","lt","ct","pt","dt","mt","characterData","attributeOldValue","xt","At","_t","innerHTMLHelper","noBuiltIn","nn","rn","specialProperties","passThrough","makeValidate","valueMustChange","makeReflect","reflectAttribute","doReflect","makeTrigger","doTrigger","makeQueueSync","propList","alsoSync","sync","doMultiSync","_queueSync","doSync","storeDescriptor","triggerBeforeValue","triggerBefore","makeBasicSetter","makeBasicGetter","inheritedMethods","_methods","methodName","attributeTransform","queueSync","_properties","makeGetter","getter","makeSetter","setter","methods","default","failed","validator","_setProps","tempVarName","actualSetter","actualGetter","tagPrototypes","getPrototypeOfTag","register","Component","baseComponentProto","actualPrototype","baseTagName","_proto","protoChain","curBaseProto","_className","augment","existingDesc","newDesc","override","combinedDesc","handleAugmentPropertyCollision","registrationOptions","registerElement","setSubProperty","augmentProperties","destValue","sourceValue","descPropName","callBoth","proxy","setProxy","getProxy","getSubProperty","functionalDescriptor","tempPropName","needsDOMSync","proxyAttr","alternateGetter","defaultContentZone","createdCallback","_syncQueue","_syncDOM","_render","attrValues","_initialize","_handleContentZones","_componentReady","records","record","recordsCount","attachedCallback","_delegateGlobalEvents","detachedCallback","_undelegateGlobalEvents","_syncPending","nextFrame","_syncProp","leaveInQueue","_doSet"],"mappings":";;;AAAA;AACA,CAAC,YAAW;;MAEN,CAACA,QAAQC,SAAR,CAAkBC,OAAvB,EAAgC;YACtBD,SAAR,CAAkBC,OAAlB,GAA4B,UAASC,QAAT,EAAmB;UACzCC,OAAO,IAAX;;aAEOA,IAAP,EAAa;YACPA,KAAKC,OAAL,CAAaF,QAAb,CAAJ,EAA4B,OAAOC,IAAP,CAA5B,KACKA,OAAOA,KAAKE,aAAZ;;aAEA,IAAP;KAPF;;CAHJ;;ACDA;AACA,CAAC,YAAW;;;MAGN,CAACN,QAAQC,SAAR,CAAkBI,OAAvB,EAAgC;YACtBJ,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