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6BzD,KAAW8B,IACvEL,EAAS4B,oBAAoBN,EAAUQ,GACvC9B,EAAS4B,oBAAoBL,EAAaO,GACrC,OAAL3B,QAAK,IAALA,GAAAA,IACAsB,KAjBJzB,EAASkC,iBAAiBb,EAAYQ,GACtC7B,EAASkC,iBAAiBZ,EAAUQ,GACpC9B,EAASkC,iBAAiBX,EAAaO,OApDpC,6C,sBA6EP,SAASE,GAA6BzD,GACpC,OALF,SAA2BA,GACzB,MAAO,iBAAkBA,EAIlB4D,CAAkB5D,GAASA,EAAM6D,aAAe7D,EAAMuC,gB,0DCzxBlDzF,EAAO,iBAAkB,CAAC,EAAG,EAAG,EAAG,EAAG,GAV9CgC,KAAI,SAACgF,GAEJ,IADA,IAAIC,EAAM,GACDpL,EAAI,EAAGA,EAAImL,EAAOnL,IACzBoL,IAA+B,OAArB,EAAIC,KAAKC,UAAuB,GAAGnE,SAAS,IAAIoE,UAAU,GAEtE,OAAOH,KAERtQ,KAAK","sources":["../node_modules/@esri/calcite-components/node_modules/tabbable/dist/index.esm.js","../node_modules/@esri/calcite-components/dist/components/src/utils/dom.ts","../node_modules/@esri/calcite-components/dist/components/src/utils/guid.ts"],"sourcesContent":["/*!\n* tabbable 6.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n//  `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n//  the entire query to fail, resulting in no nodes found, which will break a lot\n//  of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n  var _element$getRootNode;\n  return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n  return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n *  see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n *  False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n  var _node$getAttribute;\n  if (lookUp === void 0) {\n    lookUp = true;\n  }\n  // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n  //  JS API property; we have to check the attribute, which can either be empty or 'true';\n  //  if it's `null` (not specified) or 'false', it's an active element\n  var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n  var inert = inertAtt === '' || inertAtt === 'true';\n\n  // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n  //  if it weren't for `matches()` not being a function on shadow roots; the following\n  //  code works for any kind of node\n  // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n  //  so it likely would not support `:is([inert] *)` either...\n  var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n  return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n  var _node$getAttribute2;\n  // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n  //  to use the attribute directly to check for this, which can either be empty or 'true';\n  //  if it's `null` (not specified) or 'false', it's a non-editable element\n  var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n  return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n  // even if `includeContainer=false`, we still have to check it for inertness because\n  //  if it's inert, all its children are inert\n  if (isInert(el)) {\n    return [];\n  }\n  var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n  if (includeContainer && matches.call(el, candidateSelector)) {\n    candidates.unshift(el);\n  }\n  candidates = candidates.filter(filter);\n  return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n *  if a function, implies shadow support is enabled and either returns the shadow root of an element\n *  or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n  var candidates = [];\n  var elementsToCheck = Array.from(elements);\n  while (elementsToCheck.length) {\n    var element = elementsToCheck.shift();\n    if (isInert(element, false)) {\n      // no need to look up since we're drilling down\n      // anything inside this container will also be inert\n      continue;\n    }\n    if (element.tagName === 'SLOT') {\n      // add shadow dom slot scope (slot itself cannot be focusable)\n      var assigned = element.assignedElements();\n      var content = assigned.length ? assigned : element.children;\n      var nestedCandidates = getCandidatesIteratively(content, true, options);\n      if (options.flatten) {\n        candidates.push.apply(candidates, nestedCandidates);\n      } else {\n        candidates.push({\n          scopeParent: element,\n          candidates: nestedCandidates\n        });\n      }\n    } else {\n      // check candidate element\n      var validCandidate = matches.call(element, candidateSelector);\n      if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n        candidates.push(element);\n      }\n\n      // iterate over shadow content if possible\n      var shadowRoot = element.shadowRoot ||\n      // check for an undisclosed shadow\n      typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n      // no inert look up because we're already drilling down and checking for inertness\n      //  on the way down, so all containers to this root node should have already been\n      //  vetted as non-inert\n      var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n      if (shadowRoot && validShadowRoot) {\n        // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n        //  shadow exists, so look at light dom children as fallback BUT create a scope for any\n        //  child candidates found because they're likely slotted elements (elements that are\n        //  children of the web component element (which has the shadow), in the light dom, but\n        //  slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n        //  _after_ we return from this recursive call\n        var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n        if (options.flatten) {\n          candidates.push.apply(candidates, _nestedCandidates);\n        } else {\n          candidates.push({\n            scopeParent: element,\n            candidates: _nestedCandidates\n          });\n        }\n      } else {\n        // there's not shadow so just dig into the element's (light dom) children\n        //  __without__ giving the element special scope treatment\n        elementsToCheck.unshift.apply(elementsToCheck, element.children);\n      }\n    }\n  }\n  return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n  return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (node.tabIndex < 0) {\n    // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n    // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n    // yet they are still part of the regular tab order; in FF, they get a default\n    // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n    // order, consider their tab index to be 0.\n    // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n    // so if they don't have a tabindex attribute specifically set, assume it's 0.\n    if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n      return 0;\n    }\n  }\n  return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n *  has tabIndex -1, but needs to be sorted by document order in order for its content to be\n *  inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n  var tabIndex = getTabIndex(node);\n  if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n    return 0;\n  }\n  return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n  return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n  return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n  return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n  var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n    return child.tagName === 'SUMMARY';\n  });\n  return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n  for (var i = 0; i < nodes.length; i++) {\n    if (nodes[i].checked && nodes[i].form === form) {\n      return nodes[i];\n    }\n  }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n  if (!node.name) {\n    return true;\n  }\n  var radioScope = node.form || getRootNode(node);\n  var queryRadios = function queryRadios(name) {\n    return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n  };\n  var radioSet;\n  if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n    radioSet = queryRadios(window.CSS.escape(node.name));\n  } else {\n    try {\n      radioSet = queryRadios(node.name);\n    } catch (err) {\n      // eslint-disable-next-line no-console\n      console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n      return false;\n    }\n  }\n  var checked = getCheckedRadio(radioSet, node.form);\n  return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n  return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n  return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n  var _nodeRoot;\n  // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n  //  (but NOT _the_ document; see second 'If' comment below for more).\n  // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n  //  is attached, and the one we need to check if it's in the document or not (because the\n  //  shadow, and all nodes it contains, is never considered in the document since shadows\n  //  behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n  //  is hidden, or is not in the document itself but is detached, it will affect the shadow's\n  //  visibility, including all the nodes it contains). The host could be any normal node,\n  //  or a custom element (i.e. web component). Either way, that's the one that is considered\n  //  part of the document, not the shadow root, nor any of its children (i.e. the node being\n  //  tested).\n  // To further complicate things, we have to look all the way up until we find a shadow HOST\n  //  that is attached (or find none) because the node might be in nested shadows...\n  // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n  //  document (per the docs) and while it's a Document-type object, that document does not\n  //  appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n  //  to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n  //  using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n  //  node is actually detached.\n  // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n  //  if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n  //  from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n  //  `ownerDocument` will be `null`, hence the optional chaining on it.\n  var nodeRoot = node && getRootNode(node);\n  var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n  // in some cases, a detached node will return itself as the root instead of a document or\n  //  shadow root object, in which case, we shouldn't try to look further up the host chain\n  var attached = false;\n  if (nodeRoot && nodeRoot !== node) {\n    var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n    attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n    while (!attached && nodeRootHost) {\n      var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n      // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n      //  which means we need to get the host's host and check if that parent host is contained\n      //  in (i.e. attached to) the document\n      nodeRoot = getRootNode(nodeRootHost);\n      nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n      attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n    }\n  }\n  return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n  var _node$getBoundingClie = node.getBoundingClientRect(),\n    width = _node$getBoundingClie.width,\n    height = _node$getBoundingClie.height;\n  return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n  var displayCheck = _ref.displayCheck,\n    getShadowRoot = _ref.getShadowRoot;\n  // NOTE: visibility will be `undefined` if node is detached from the document\n  //  (see notes about this further down), which means we will consider it visible\n  //  (this is legacy behavior from a very long way back)\n  // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n  //  _visibility_ check, not a _display_ check\n  if (getComputedStyle(node).visibility === 'hidden') {\n    return true;\n  }\n  var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n  var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n  if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n    return true;\n  }\n  if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {\n    if (typeof getShadowRoot === 'function') {\n      // figure out if we should consider the node to be in an undisclosed shadow and use the\n      //  'non-zero-area' fallback\n      var originalNode = node;\n      while (node) {\n        var parentElement = node.parentElement;\n        var rootNode = getRootNode(node);\n        if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n        ) {\n          // node has an undisclosed shadow which means we can only treat it as a black box, so we\n          //  fall back to a non-zero-area test\n          return isZeroArea(node);\n        } else if (node.assignedSlot) {\n          // iterate up slot\n          node = node.assignedSlot;\n        } else if (!parentElement && rootNode !== node.ownerDocument) {\n          // cross shadow boundary\n          node = rootNode.host;\n        } else {\n          // iterate up normal dom\n          node = parentElement;\n        }\n      }\n      node = originalNode;\n    }\n    // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n    //  (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n    //  it might be a falsy value, which means shadow DOM support is disabled\n\n    // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n    //  now we can just test to see if it would normally be visible or not, provided it's\n    //  attached to the main document.\n    // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n    //  `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n    if (isNodeAttached(node)) {\n      // this works wherever the node is: if there's at least one client rect, it's\n      //  somehow displayed; it also covers the CSS 'display: contents' case where the\n      //  node itself is hidden in place of its contents; and there's no need to search\n      //  up the hierarchy either\n      return !node.getClientRects().length;\n    }\n\n    // Else, the node isn't attached to the document, which means the `getClientRects()`\n    //  API will __always__ return zero rects (this can happen, for example, if React\n    //  is used to render nodes onto a detached tree, as confirmed in this thread:\n    //  https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n    //\n    // It also means that even window.getComputedStyle(node).display will return `undefined`\n    //  because styles are only computed for nodes that are in the document.\n    //\n    // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n    //  somehow. Though it was never stated officially, anyone who has ever used tabbable\n    //  APIs on nodes in detached containers has actually implicitly used tabbable in what\n    //  was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n    //  considering __everything__ to be visible because of the innability to determine styles.\n    //\n    // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n    //  nodes as visible with the 'none' fallback.__\n    if (displayCheck !== 'legacy-full') {\n      return true; // hidden\n    }\n    // else, fallback to 'none' mode and consider the node visible\n  } else if (displayCheck === 'non-zero-area') {\n    // NOTE: Even though this tests that the node's client rect is non-zero to determine\n    //  whether it's displayed, and that a detached node will __always__ have a zero-area\n    //  client rect, we don't special-case for whether the node is attached or not. In\n    //  this mode, we do want to consider nodes that have a zero area to be hidden at all\n    //  times, and that includes attached or not.\n    return isZeroArea(node);\n  }\n\n  // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n  //  it's visible\n  return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n//  unless they are in the _first_ <legend> element of the top-most disabled\n//  fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n    var parentNode = node.parentElement;\n    // check if `node` is contained in a disabled <fieldset>\n    while (parentNode) {\n      if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n        // look for the first <legend> among the children of the disabled <fieldset>\n        for (var i = 0; i < parentNode.children.length; i++) {\n          var child = parentNode.children.item(i);\n          // when the first <legend> (in document order) is found\n          if (child.tagName === 'LEGEND') {\n            // if its parent <fieldset> is not nested in another disabled <fieldset>,\n            // return whether `node` is a descendant of its first <legend>\n            return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n          }\n        }\n        // the disabled <fieldset> containing `node` has no <legend>\n        return true;\n      }\n      parentNode = parentNode.parentElement;\n    }\n  }\n\n  // else, node's tabbable/focusable state should not be affected by a fieldset's\n  //  enabled/disabled state\n  return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n  if (node.disabled ||\n  // we must do an inert look up to filter out any elements inside an inert ancestor\n  //  because we're limited in the type of selectors we can use in JSDom (see related\n  //  note related to `candidateSelectors`)\n  isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n  // For a details element with a summary, the summary element gets the focus\n  isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n    return false;\n  }\n  return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n  if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n    return false;\n  }\n  return true;\n};\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {\n  var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n  if (isNaN(tabIndex) || tabIndex >= 0) {\n    return true;\n  }\n  // If a custom element has an explicit negative tabindex,\n  // browsers will not allow tab targeting said element's children.\n  return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar sortByOrder = function sortByOrder(candidates) {\n  var regularTabbables = [];\n  var orderedTabbables = [];\n  candidates.forEach(function (item, i) {\n    var isScope = !!item.scopeParent;\n    var element = isScope ? item.scopeParent : item;\n    var candidateTabindex = getSortOrderTabIndex(element, isScope);\n    var elements = isScope ? sortByOrder(item.candidates) : element;\n    if (candidateTabindex === 0) {\n      isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n    } else {\n      orderedTabbables.push({\n        documentOrder: i,\n        tabIndex: candidateTabindex,\n        item: item,\n        isScope: isScope,\n        content: elements\n      });\n    }\n  });\n  return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n    sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n    return acc;\n  }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n  options = options || {};\n  var candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([container], options.includeContainer, {\n      filter: isNodeMatchingSelectorTabbable.bind(null, options),\n      flatten: false,\n      getShadowRoot: options.getShadowRoot,\n      shadowRootFilter: isValidShadowRootTabbable\n    });\n  } else {\n    candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n  }\n  return sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n  options = options || {};\n  var candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([container], options.includeContainer, {\n      filter: isNodeMatchingSelectorFocusable.bind(null, options),\n      flatten: true,\n      getShadowRoot: options.getShadowRoot\n    });\n  } else {\n    candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n  }\n  return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, candidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, focusableCandidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","import { tabbable } from \"tabbable\";\nimport { IconNameOrString } from \"../components/icon/interfaces\";\nimport { guid } from \"./guid\";\nimport { CSS_UTILITY } from \"./resources\";\n\n/**\n * The default `focus-trap/tabbable` options.\n *\n * See https://github.com/focus-trap/tabbable#tabbable\n */\nexport const tabbableOptions = {\n  getShadowRoot: true,\n};\n\n/**\n * This helper will guarantee an ID on the provided element.\n *\n * If it already has an ID, it will be preserved, otherwise a unique one will be generated and assigned.\n *\n * @param {Element} el An element.\n * @returns {string} The element's ID.\n */\nexport function ensureId(el: Element): string {\n  if (!el) {\n    return \"\";\n  }\n\n  return (el.id = el.id || `${el.tagName.toLowerCase()}-${guid()}`);\n}\n\n/**\n * This helper returns an array from a NodeList.\n *\n * @param {NodeList} nodeList A NodeList.\n * @returns {Element[]} An array of elements.\n */\nexport function nodeListToArray<T extends Element>(nodeList: HTMLCollectionOf<T> | NodeListOf<T> | T[]): T[] {\n  return Array.isArray(nodeList) ? nodeList : Array.from(nodeList);\n}\n\nexport type Direction = \"ltr\" | \"rtl\";\n\n/**\n * This helper returns the Calcite \"mode\" of an element.\n *\n * @param {HTMLElement} el An element.\n * @returns {\"light\"|\"dark\"} The Calcite mode.\n */\nexport function getModeName(el: HTMLElement): \"light\" | \"dark\" {\n  const closestElWithMode = closestElementCrossShadowBoundary(\n    el,\n    `.${CSS_UTILITY.darkMode}, .${CSS_UTILITY.lightMode}`,\n  );\n  return closestElWithMode?.classList.contains(\"calcite-mode-dark\") ? \"dark\" : \"light\";\n}\n\n/**\n * This helper returns the direction of a HTML element.\n *\n * @param {HTMLElement} el An element.\n * @returns {Direction} The direction.\n */\nexport function getElementDir(el: HTMLElement): Direction {\n  const prop = \"dir\";\n  const selector = `[${prop}]`;\n  const closest = closestElementCrossShadowBoundary(el, selector);\n  return closest ? (closest.getAttribute(prop) as Direction) : \"ltr\";\n}\n\n/**\n * This helper returns the value of an attribute on an element.\n *\n * @param {HTMLElement} el An element.\n * @param {string} attribute An attribute name.\n * @param {any} fallbackValue A fallback value.\n * @returns {any} The value.\n * @deprecated\n */\nexport function getElementProp(el: Element, attribute: string, fallbackValue: any): any {\n  const selector = `[${attribute}]`;\n  const closest = el.closest(selector);\n  return closest ? closest.getAttribute(attribute) : fallbackValue;\n}\n\n/**\n * This helper returns the computed width in pixels of a rendered HTMLElement.\n *\n * @param {HTMLElement} el An element.\n * @returns {number} The element's width.\n */\nexport function getElementWidth(el: HTMLElement): number {\n  if (!el) {\n    return 0;\n  }\n  return parseFloat(getComputedStyle(el).inlineSize);\n}\n\n/**\n * This helper returns the rootNode of an element.\n *\n * @param {Element} el An element.\n * @returns {Document|ShadowRoot} The element's root node.\n */\nexport function getRootNode(el: Element): Document | ShadowRoot {\n  return el.getRootNode() as Document | ShadowRoot;\n}\n\n/**\n * This helper returns the node's shadowRoot root node if it exists.\n *\n * @param {Element} el The element.\n * @returns {ShadowRoot|null} The element's root node ShadowRoot.\n */\nexport function getShadowRootNode(el: Element): ShadowRoot | null {\n  const rootNode = getRootNode(el);\n  return \"host\" in rootNode ? rootNode : null;\n}\n\n/**\n * This helper returns the computed width in pixels a given text string takes up on screen.\n *\n * See https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript\n *\n * @param {string} text The string of text to measure.\n * @param {string} font The CSS font attribute's value, which should include size and face, e.g. \"12px Arial\".\n */\nexport function getTextWidth(text: string, font: string): number {\n  if (!text) {\n    return 0;\n  }\n  const canvas = document.createElement(\"canvas\");\n  const context = canvas.getContext(\"2d\");\n  context.font = font;\n  return context.measureText(text).width;\n}\n/**\n * This helper returns the host of a ShadowRoot.\n *\n * @param {Document | ShadowRoot} root A root element.\n * @returns {Element | null} The host element.\n */\nexport function getHost(root: Document | ShadowRoot): Element | null {\n  return (root as ShadowRoot).host || null;\n}\n\n/**\n * This helper queries an element's rootNode and any ancestor rootNodes.\n *\n * If both an 'id' and 'selector' are supplied, 'id' will take precedence over 'selector'.\n *\n * @param {Element} element An element.\n * @param root0\n * @param root0.selector\n * @param root0.id\n * @returns {Element} An element.\n */\nexport function queryElementRoots<T extends Element = Element>(\n  element: Element,\n  {\n    selector,\n    id,\n  }: {\n    selector?: string;\n    id?: string;\n  },\n): T | null {\n  // Gets the rootNode and any ancestor rootNodes (shadowRoot or document) of an element and queries them for a selector.\n  // Based on: https://stackoverflow.com/q/54520554/194216\n  function queryFrom<T extends Element = Element>(el: Element): T | null {\n    if (!el) {\n      return null;\n    }\n\n    if ((el as Slottable).assignedSlot) {\n      el = (el as Slottable).assignedSlot;\n    }\n\n    const rootNode = getRootNode(el);\n\n    const found = id\n      ? \"getElementById\" in rootNode\n        ? /*\n          Check to make sure 'getElementById' exists in cases where element is no longer connected to the DOM and getRootNode() returns the element.\n          https://github.com/Esri/calcite-design-system/pull/4280\n           */\n          (rootNode.getElementById(id) as Element as T)\n        : null\n      : selector\n        ? (rootNode.querySelector(selector) as T)\n        : null;\n\n    const host = getHost(rootNode);\n\n    return found ? found : host ? queryFrom(host) : null;\n  }\n\n  return queryFrom(element);\n}\n\n/**\n * This helper returns the closest element matching the selector by crossing he shadow boundary if necessary.\n *\n * @param {Element} element The starting element.\n * @param {string} selector The selector.\n * @returns {Element} The targeted element.\n */\nexport function closestElementCrossShadowBoundary<T extends Element = Element>(\n  element: Element,\n  selector: string,\n): T | null {\n  // based on https://stackoverflow.com/q/54520554/194216\n  function closestFrom<T extends Element = Element>(el: Element): T | null {\n    return el ? el.closest(selector) || closestFrom(getHost(getRootNode(el))) : null;\n  }\n\n  return closestFrom(element);\n}\n\n/**\n * This utility helps invoke a callback as it traverses a node and its ancestors until reaching the root document.\n *\n * Returning early or undefined in `onVisit` will continue traversing up the DOM tree. Otherwise, traversal will halt with the returned value as the result of the function\n *\n * @param {Element} element An element.\n * @param {(node: Node) => Element} onVisit The callback.\n * @returns {Element} The result.\n */\nexport function walkUpAncestry<T = any>(element: Element, onVisit: (node: Node) => T): T {\n  return visit(element, onVisit);\n}\n\nfunction visit<T = any>(node: Node, onVisit: (node: Node) => T): T {\n  if (!node) {\n    return;\n  }\n\n  const result = onVisit(node);\n  if (result !== undefined) {\n    return result;\n  }\n\n  const { parentNode } = node;\n\n  return visit(parentNode instanceof ShadowRoot ? parentNode.host : parentNode, onVisit);\n}\n\n/**\n * This helper returns true when an element has the descendant in question.\n *\n * @param {Element} element The starting element.\n * @param {Element} maybeDescendant The descendant.\n * @returns {boolean} The result.\n */\nexport function containsCrossShadowBoundary(element: Element, maybeDescendant: Element): boolean {\n  return !!walkUpAncestry(maybeDescendant, (node) => (node === element ? true : undefined));\n}\n\n/**\n * An element which may contain a `setFocus` method.\n */\nexport interface FocusableElement extends HTMLElement {\n  setFocus?: () => Promise<void>;\n}\n\n/**\n * This helper returns true when an element has a setFocus method.\n *\n * @param {Element} el An element.\n * @returns {boolean} The result.\n */\nexport function isCalciteFocusable(el: FocusableElement): boolean {\n  return typeof el?.setFocus === \"function\";\n}\n\n/**\n * This helper focuses an element using the `setFocus` method if available and falls back to using the `focus` method if not available.\n *\n * @param {Element} el An element.\n */\nexport async function focusElement(el: FocusableElement): Promise<void> {\n  if (!el) {\n    return;\n  }\n\n  return isCalciteFocusable(el) ? el.setFocus() : el.focus();\n}\n\n/**\n * Helper to get the first tabbable element.\n *\n * @param {HTMLElement} element The html element containing tabbable elements.\n * @returns the first tabbable element.\n */\nexport function getFirstTabbable(element: HTMLElement): HTMLElement {\n  if (!element) {\n    return;\n  }\n\n  return (tabbable(element, tabbableOptions)[0] ?? element) as HTMLElement;\n}\n\n/**\n * Helper to focus the first tabbable element.\n *\n * @param {HTMLElement} element The html element containing tabbable elements.\n */\nexport function focusFirstTabbable(element: HTMLElement): void {\n  getFirstTabbable(element)?.focus();\n}\n\ninterface GetSlottedOptions {\n  all?: boolean;\n  direct?: boolean;\n  matches?: string;\n  selector?: string;\n}\n\nconst defaultSlotSelector = \":not([slot])\";\n\n/**\n * Gets slotted elements for a named slot.\n *\n * @param {Element} element An element.\n * @param {string} slotName The slot name.\n * @param {GetSlottedOptions & { all: true }} options The options.\n * @returns {Element | Element[] | null} returns element(s) or null.\n * @deprecated Use `onSlotchange` event instead.\n *\n * ```\n * <slot onSlotchange={(event) => this.myElements = slotChangeGetAssignedElements(event)} />}\n * ```\n */\nexport function getSlotted<T extends Element = Element>(\n  element: Element,\n  slotName: string | string[] | (GetSlottedOptions & { all: true }),\n  options: GetSlottedOptions & { all: true },\n): T[];\nexport function getSlotted<T extends Element = Element>(\n  element: Element,\n  slotName?: string | string[] | GetSlottedOptions,\n  options?: GetSlottedOptions,\n): T | null;\nexport function getSlotted<T extends Element = Element>(\n  element: Element,\n  slotName?: string | string[] | GetSlottedOptions,\n  options?: GetSlottedOptions,\n): (T | null) | T[] {\n  if (slotName && !Array.isArray(slotName) && typeof slotName !== \"string\") {\n    options = slotName;\n    slotName = null;\n  }\n\n  const slotSelector = slotName\n    ? Array.isArray(slotName)\n      ? slotName.map((name) => `[slot=\"${name}\"]`).join(\",\")\n      : `[slot=\"${slotName}\"]`\n    : defaultSlotSelector;\n\n  if (options?.all) {\n    return queryMultiple<T>(element, slotSelector, options);\n  }\n\n  return querySingle<T>(element, slotSelector, options);\n}\n\nfunction getDirectChildren<T extends Element = Element>(el: Element, selector: string): T[] {\n  return el ? (Array.from(el.children || []) as T[]).filter((child) => child?.matches(selector)) : [];\n}\n\nfunction queryMultiple<T extends Element = Element>(\n  element: Element,\n  slotSelector: string,\n  options?: GetSlottedOptions,\n): T[] {\n  let matches =\n    slotSelector === defaultSlotSelector\n      ? getDirectChildren<T>(element, defaultSlotSelector)\n      : Array.from(element.querySelectorAll<T>(slotSelector));\n\n  matches = options && options.direct === false ? matches : matches.filter((el) => el.parentElement === element);\n\n  matches = options?.matches ? matches.filter((el) => el?.matches(options.matches)) : matches;\n\n  const selector = options?.selector;\n  return selector\n    ? matches\n        .map((item) => Array.from(item.querySelectorAll<T>(selector)))\n        .reduce((previousValue, currentValue) => [...previousValue, ...currentValue], [])\n        .filter((match) => !!match)\n    : matches;\n}\n\nfunction querySingle<T extends Element = Element>(\n  element: Element,\n  slotSelector: string,\n  options?: GetSlottedOptions,\n): T | null {\n  let match =\n    slotSelector === defaultSlotSelector\n      ? getDirectChildren<T>(element, defaultSlotSelector)[0] || null\n      : element.querySelector<T>(slotSelector);\n\n  match = options && options.direct === false ? match : match?.parentElement === element ? match : null;\n\n  match = options?.matches ? (match?.matches(options.matches) ? match : null) : match;\n\n  const selector = options?.selector;\n  return selector ? match?.querySelector<T>(selector) : match;\n}\n\n/**\n * Filters direct children.\n *\n * @param {Element} el An element.\n * @param {string} selector The selector.\n * @returns {Element[]} An array of elements.\n */\nexport function filterDirectChildren<T extends Element>(el: Element, selector: string): T[] {\n  return Array.from(el.children).filter((child): child is T => child.matches(selector));\n}\n\n/**\n * Filters an array of HTML elements by the provided css selector string.\n *\n * @param {Element[]} elements An array of elements, such as one returned by HTMLSlotElement.assignedElements().\n * @param {string} selector The CSS selector string to filter the returned elements by.\n * @returns {Element[]} A filtered array of elements.\n */\nexport function filterElementsBySelector<T extends Element>(elements: Element[], selector: string): T[] {\n  return elements.filter((element): element is T => element.matches(selector));\n}\n\n/**\n * Set a default icon from a defined set or allow an override with an icon name string\n *\n * @param {Record<string, string>} iconObject The icon object.\n * @param {string | boolean} iconValue The icon value.\n * @param {string} matchedValue The matched value.\n * @returns {string|undefined} The resulting icon value.\n */\nexport function setRequestedIcon(\n  iconObject: Record<string, IconNameOrString>,\n  iconValue: IconNameOrString | boolean | \"\",\n  matchedValue: string,\n): IconNameOrString | undefined {\n  if (typeof iconValue === \"string\" && iconValue !== \"\") {\n    return iconValue;\n  } else if (iconValue === \"\") {\n    return iconObject[matchedValue];\n  }\n}\n\n/**\n * This helper returns true when two rectangles intersect.\n *\n * @param {DOMRect} rect1 The first rectangle.\n * @param {DOMRect} rect2 The second rectangle.\n * @returns {boolean} The result.\n */\nexport function intersects(rect1: DOMRect, rect2: DOMRect): boolean {\n  return !(\n    rect2.left > rect1.right ||\n    rect2.right < rect1.left ||\n    rect2.top > rect1.bottom ||\n    rect2.bottom < rect1.top\n  );\n}\n\n/**\n * This helper makes sure that boolean aria attributes are properly converted to a string.\n *\n * It should only be used for aria attributes that require a string value of \"true\" or \"false\".\n *\n * @param {boolean} value The value.\n * @returns {string} The string conversion of a boolean value (\"true\" | \"false\").\n */\nexport function toAriaBoolean(value: boolean): string {\n  return Boolean(value).toString();\n}\n\n/**\n * This helper returns `true` if the target `slot` element from the `onSlotchange` event has any content (text or elements).\n *\n * ```\n * <slot onSlotchange={(event) => this.mySlotHasContent = slotChangeHasContent(event)} />}\n * ```\n *\n * @param {Event} event The event.\n * @returns {boolean} Whether the slot has any content.\n */\nexport function slotChangeHasContent(event: Event): boolean {\n  return slotChangeHasAssignedElement(event) || slotChangeHasTextContent(event);\n}\n\n/**\n * This helper returns a string of textContent if the target `slot` element from the `onSlotchange` event has any text content.\n *\n * ```\n * <slot onSlotchange={(event) => this.mySlotText = slotChangeGetTextContent(event)} />}\n * ```\n *\n * @param {Event} event The event.\n * @returns {string} The slots text.\n */\nexport function slotChangeGetTextContent(event: Event): string {\n  return slotChangeGetAssignedNodes(event)\n    .filter((node) => node.nodeType === Node.TEXT_NODE)\n    .map((node) => node.textContent)\n    .join(\"\")\n    .trim();\n}\n\n/**\n * This helper returns `true` if the target `slot` element from the `onSlotchange` event has any text content.\n *\n * ```\n * <slot onSlotchange={(event) => this.mySlotHasTextContent = slotChangeHasTextContent(event)} />}\n * ```\n *\n * @param {Event} event The event.\n * @returns {boolean} Whether the slot has any text content.\n */\nexport function slotChangeHasTextContent(event: Event): boolean {\n  return !!slotChangeGetTextContent(event);\n}\n\n/**\n * This helper returns `true` if the target `slot` element from the `onSlotchange` event has an assigned node.\n *\n * ```\n * <slot onSlotchange={(event) => this.mySlotHasNode = slotChangeHasAssignedNode(event)} />}\n * ```\n *\n * @param {Event} event The event.\n * @returns {boolean} Whether the slot has any assigned nodes.\n */\nexport function slotChangeHasAssignedNode(event: Event): boolean {\n  return !!slotChangeGetAssignedNodes(event).length;\n}\n\n/**\n * This helper returns the assigned nodes on a `slot` element from the `onSlotchange` event.\n *\n * ```\n * <slot onSlotchange={(event) => this.mySlotNodes = slotChangeGetAssignedNodes(event)} />}\n * ```\n *\n * @param {Event} event The event.\n * @returns {boolean} Whether the slot has any assigned nodes.\n */\nexport function slotChangeGetAssignedNodes(event: Event): Node[] {\n  return (event.currentTarget as HTMLSlotElement).assignedNodes({\n    flatten: true,\n  });\n}\n\n/**\n * This helper returns `true` if the target `slot` element from the `onSlotchange` event has an assigned element.\n *\n * ```\n * <slot onSlotchange={(event) => this.mySlotHasElement = slotChangeHasAssignedElement(event)} />}\n * ```\n *\n * @param {Event} event The event.\n * @returns {boolean} Whether the slot has any assigned elements.\n */\nexport function slotChangeHasAssignedElement(event: Event): boolean {\n  return !!slotChangeGetAssignedElements(event).length;\n}\n\n/**\n * This helper returns the assigned elements on a `slot` element from the `onSlotchange` event.\n *\n * ```\n * <slot onSlotchange={(event) => this.mySlotElements = slotChangeGetAssignedElements(event)} />}\n * ```\n *\n * @param {Event} event The event.\n * @param {string} selector The CSS selector string to filter the returned elements by.\n * @returns {Element[]} An array of elements.\n */\nexport function slotChangeGetAssignedElements<T extends Element>(event: Event, selector?: string): T[] | null {\n  return getSlotAssignedElements(event.target as HTMLSlotElement, selector);\n}\n\n/**\n * This helper returns the assigned elements on a `slot` element, filtered by an optional css selector.\n *\n * @param {HTMLSlotElement} slot The slot element.\n * @param {string} selector CSS selector string to filter the returned elements by.\n * @returns {Element[]} An array of elements.\n */\nexport function getSlotAssignedElements<T extends Element>(slot: HTMLSlotElement, selector?: string): T[] | null {\n  const assignedElements = slot.assignedElements({\n    flatten: true,\n  });\n  return selector ? filterElementsBySelector<T>(assignedElements, selector) : (assignedElements as T[]);\n}\n\n/**\n * This helper returns true if the pointer event fired from the primary button of the device.\n *\n * See https://www.w3.org/TR/pointerevents/#the-button-property.\n *\n * @param {PointerEvent} event The pointer event.\n * @returns {boolean} The value.\n */\nexport function isPrimaryPointerButton(event: PointerEvent): boolean {\n  return !!(event.isPrimary && event.button === 0);\n}\n\n/**\n * This helper returns true if the mouse event was triggered by a keyboard click.\n *\n * @param {MouseEvent} event The mouse event.\n * @returns {boolean} The value.\n */\nexport function isKeyboardTriggeredClick(event: MouseEvent): boolean {\n  // we assume event.detail = 0 is a keyboard click\n  // see https://www.w3.org/TR/uievents/#event-type-click\n  // see https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event#usage_notes\n  return event.detail === 0;\n}\n\nexport type FocusElementInGroupDestination = \"first\" | \"last\" | \"next\" | \"previous\";\n\n/**\n * This helper sets focus on and returns a destination element from within a group of provided elements.\n *\n * @param {Element[]} elements An array of elements.\n * @param {Element} currentElement The current element.\n * @param {FocusElementInGroupDestination} destination The target destination element to focus.\n * @param {boolean} cycle Should navigation cycle through elements or stop at extent - defaults to true.\n * @returns {Element} The focused element\n */\nexport const focusElementInGroup = <T extends Element = Element>(\n  elements: Element[],\n  currentElement: Element,\n  destination: FocusElementInGroupDestination,\n  cycle = true,\n): T => {\n  const currentIndex = elements.indexOf(currentElement);\n  const isFirstItem = currentIndex === 0;\n  const isLastItem = currentIndex === elements.length - 1;\n  if (cycle) {\n    destination =\n      destination === \"previous\" && isFirstItem ? \"last\" : destination === \"next\" && isLastItem ? \"first\" : destination;\n  }\n\n  let focusTarget;\n  if (destination === \"previous\") {\n    focusTarget = elements[currentIndex - 1] || elements[cycle ? elements.length - 1 : currentIndex];\n  } else if (destination === \"next\") {\n    focusTarget = elements[currentIndex + 1] || elements[cycle ? 0 : currentIndex];\n  } else if (destination === \"last\") {\n    focusTarget = elements[elements.length - 1];\n  } else {\n    focusTarget = elements[0];\n  }\n\n  focusElement(focusTarget);\n  return focusTarget;\n};\n\n/**\n * This helper determines if an element is before another element in the DOM.\n *\n * @param a the reference element to compare\n * @param b the element to compare against\n *\n * @returns true when a is before b in the DOM\n */\nexport function isBefore(a: HTMLElement, b: HTMLElement): boolean {\n  if (a.parentNode !== b.parentNode) {\n    return false;\n  }\n\n  const children = Array.from(a.parentNode.children);\n  return children.indexOf(a) < children.indexOf(b);\n}\n\n/**\n * This util helps determine when an animation has completed.\n *\n * @param targetEl The element to watch for the animation to complete.\n * @param animationName The name of the animation to watch for completion.\n * @param onStart A callback to run when the animation starts.\n * @param onEnd A callback to run when the animation ends or is canceled.\n */\nexport async function whenAnimationDone(\n  targetEl: HTMLElement,\n  animationName: string,\n  onStart?: () => void,\n  onEnd?: () => void,\n): Promise<void> {\n  return whenTransitionOrAnimationDone(targetEl, animationName, \"animation\", onStart, onEnd);\n}\n\n/**\n * This util helps determine when a transition has completed.\n *\n * @param targetEl The element to watch for the transition to complete.\n * @param transitionProp The name of the transition to watch for completion.\n * @param onStart A callback to run when the transition starts.\n * @param onEnd A callback to run when the transition ends or is canceled.\n */\nexport async function whenTransitionDone(\n  targetEl: HTMLElement,\n  transitionProp: string,\n  onStart?: () => void,\n  onEnd?: () => void,\n): Promise<void> {\n  return whenTransitionOrAnimationDone(targetEl, transitionProp, \"transition\", onStart, onEnd);\n}\n\ntype TransitionOrAnimation = \"transition\" | \"animation\";\ntype TransitionOrAnimationEvent = TransitionEvent | AnimationEvent;\n\n/**\n * This util helps determine when a transition has completed.\n *\n * @param targetEl The element to watch for the transition or animation to complete.\n * @param transitionPropOrAnimationName The transition or animation property to watch for completion.\n * @param type The type of property to watch for completion. Defaults to \"transition\".\n * @param onStart A callback to run when the transition or animation starts.\n * @param onEnd A callback to run when the transition or animation ends or is canceled.\n */\nexport async function whenTransitionOrAnimationDone(\n  targetEl: HTMLElement,\n  transitionPropOrAnimationName: string,\n  type: TransitionOrAnimation,\n  onStart?: () => void,\n  onEnd?: () => void,\n): Promise<void> {\n  const style = window.getComputedStyle(targetEl);\n  const allDurations = type === \"transition\" ? style.transitionDuration : style.animationDuration;\n  const allProps = type === \"transition\" ? style.transitionProperty : style.animationName;\n\n  const allDurationsArray = allDurations.split(\",\");\n  const allPropsArray = allProps.split(\",\").map((prop) => prop.trim());\n  const propIndex = allPropsArray.indexOf(transitionPropOrAnimationName);\n  const duration =\n    allDurationsArray[propIndex] ??\n    /* Safari will have a single duration value for the shorthand prop when multiple, separate names/props are defined,\n            so we fall back to it if there's no matching prop duration */\n    allDurationsArray[0];\n\n  function triggerFallbackStartEnd(): void {\n    // offset callbacks by a frame to simulate event counterparts\n    requestAnimationFrame(() => {\n      onStart?.();\n\n      requestAnimationFrame(() => onEnd?.());\n    });\n  }\n\n  if (duration === \"0s\") {\n    triggerFallbackStartEnd();\n    return;\n  }\n\n  const startEvent = type === \"transition\" ? \"transitionstart\" : \"animationstart\";\n  const endEvent = type === \"transition\" ? \"transitionend\" : \"animationend\";\n  const cancelEvent = type === \"transition\" ? \"transitioncancel\" : \"animationcancel\";\n\n  return new Promise<void>((resolve) => {\n    const fallbackTimeoutId = window.setTimeout(\n      (): void => {\n        targetEl.removeEventListener(startEvent, onTransitionOrAnimationStart);\n        targetEl.removeEventListener(endEvent, onTransitionOrAnimationEndOrCancel);\n        targetEl.removeEventListener(cancelEvent, onTransitionOrAnimationEndOrCancel);\n        triggerFallbackStartEnd();\n        resolve();\n      },\n      parseFloat(duration) * 1000,\n    );\n\n    targetEl.addEventListener(startEvent, onTransitionOrAnimationStart);\n    targetEl.addEventListener(endEvent, onTransitionOrAnimationEndOrCancel);\n    targetEl.addEventListener(cancelEvent, onTransitionOrAnimationEndOrCancel);\n\n    function onTransitionOrAnimationStart(event: TransitionOrAnimationEvent): void {\n      if (event.target === targetEl && getTransitionOrAnimationName(event) === transitionPropOrAnimationName) {\n        window.clearTimeout(fallbackTimeoutId);\n        targetEl.removeEventListener(startEvent, onTransitionOrAnimationStart);\n        onStart?.();\n      }\n    }\n\n    function onTransitionOrAnimationEndOrCancel(event: TransitionOrAnimationEvent): void {\n      if (event.target === targetEl && getTransitionOrAnimationName(event) === transitionPropOrAnimationName) {\n        targetEl.removeEventListener(endEvent, onTransitionOrAnimationEndOrCancel);\n        targetEl.removeEventListener(cancelEvent, onTransitionOrAnimationEndOrCancel);\n        onEnd?.();\n        resolve();\n      }\n    }\n  });\n}\n\nfunction isTransitionEvent(event: TransitionOrAnimationEvent): event is TransitionEvent {\n  return \"propertyName\" in event;\n}\n\nfunction getTransitionOrAnimationName(event: TransitionOrAnimationEvent): string {\n  return isTransitionEvent(event) ? event.propertyName : event.animationName;\n}\n","function gen(counts: number[]): string {\n  return counts\n    .map((count) => {\n      let out = \"\";\n      for (let i = 0; i < count; i++) {\n        out += (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);\n      }\n      return out;\n    })\n    .join(\"-\");\n}\n\nexport const guid = (): string => gen([2, 1, 1, 1, 3]);\n"],"names":["candidateSelectors","candidateSelector","join","NoElement","Element","matches","prototype","msMatchesSelector","webkitMatchesSelector","getRootNode","element","_element$getRootNode","call","ownerDocument","isInert","node","lookUp","_node$getAttribute","inertAtt","getAttribute","parentNode","getCandidates","el","includeContainer","filter","candidates","Array","slice","apply","querySelectorAll","unshift","getCandidatesIteratively","elements","options","elementsToCheck","from","length","shift","tagName","assigned","assignedElements","nestedCandidates","children","flatten","push","scopeParent","includes","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","hasTabIndex","isNaN","parseInt","getTabIndex","Error","tabIndex","test","_node$getAttribute2","attValue","isContentEditable","sortOrderedTabbables","a","b","documentOrder","isInput","isNonTabbableRadio","type","isRadio","name","radioSet","radioScope","form","queryRadios","window","CSS","escape","err","console","error","message","checked","nodes","i","getCheckedRadio","isTabbableRadio","isZeroArea","_node$getBoundingClie","getBoundingClientRect","width","height","isHidden","_ref","displayCheck","getComputedStyle","visibility","nodeUnderDetails","parentElement","originalNode","rootNode","assignedSlot","host","_nodeRoot","_nodeRootHost","_nodeRootHost$ownerDo","_node$ownerDocument","nodeRoot","nodeRootHost","attached","contains","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isNodeAttached","getClientRects","isNodeMatchingSelectorFocusable","disabled","isHiddenInput","some","child","isDetailsWithSummary","item","isDisabledFromFieldset","isNodeMatchingSelectorTabbable","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","forEach","isScope","candidateTabindex","getSortOrderTabIndex","content","sort","reduce","acc","sortable","concat","tabbable","container","bind","focusable","isTabbable","focusableCandidateSelector","isFocusable","tabbableOptions","ensureId","id","toLowerCase","guid","getElementDir","closest","closestElementCrossShadowBoundary","getHost","root","queryElementRoots","selector","queryFrom","found","getElementById","querySelector","closestFrom","walkUpAncestry","onVisit","visit","result","undefined","ShadowRoot","containsCrossShadowBoundary","maybeDescendant","isCalciteFocusable","setFocus","focusElement","focus","getFirstTabbable","focusFirstTabbable","defaultSlotSelector","getSlotted","slotName","isArray","slotSelector","map","all","getDirectChildren","direct","previousValue","currentValue","match","queryMultiple","querySingle","setRequestedIcon","iconObject","iconValue","matchedValue","toAriaBoolean","value","Boolean","toString","slotChangeHasContent","event","slotChangeHasAssignedElement","currentTarget","assignedNodes","slotChangeGetAssignedNodes","nodeType","Node","TEXT_NODE","textContent","trim","slotChangeGetTextContent","slotChangeHasTextContent","slotChangeGetAssignedElements","slot","filterElementsBySelector","getSlotAssignedElements","target","isPrimaryPointerButton","isPrimary","button","isKeyboardTriggeredClick","detail","isBefore","indexOf","whenTransitionDone","targetEl","transitionProp","onStart","onEnd","whenTransitionOrAnimationDone","transitionPropOrAnimationName","triggerFallbackStartEnd","requestAnimationFrame","style","allDurations","transitionDuration","animationDuration","allProps","transitionProperty","animationName","allDurationsArray","split","allPropsArray","prop","propIndex","duration","startEvent","endEvent","cancelEvent","Promise","resolve","fallbackTimeoutId","setTimeout","removeEventListener","onTransitionOrAnimationStart","onTransitionOrAnimationEndOrCancel","parseFloat","getTransitionOrAnimationName","clearTimeout","addEventListener","isTransitionEvent","propertyName","count","out","Math","random","substring"],"sourceRoot":""}