{
  "version": 3,
  "sources": ["../node_modules/@fluentui/web-components/dist/web-components.js", "../node_modules/@microsoft/fast-colors/dist/math-utilities.js", "../node_modules/@microsoft/fast-colors/dist/color-rgba-64.js", "../node_modules/@microsoft/fast-colors/dist/parse-color.js", "../src/SplitPanels.ts", "../src/Design/ColorsUtils.ts", "../src/Design/ThemeStorage.ts", "../src/Design/Synchronization.ts", "../src/DesignTheme.ts", "../src/FluentPageScript.ts", "../src/index.ts"],
  "sourcesContent": ["/**\n * A reference to globalThis, with support\n * for browsers that don't yet support the spec.\n * @public\n */\nconst $global = function () {\n  if (typeof globalThis !== \"undefined\") {\n    // We're running in a modern environment.\n    return globalThis;\n  }\n  if (typeof global !== \"undefined\") {\n    // We're running in NodeJS\n    return global;\n  }\n  if (typeof self !== \"undefined\") {\n    // We're running in a worker.\n    return self;\n  }\n  if (typeof window !== \"undefined\") {\n    // We're running in the browser's main thread.\n    return window;\n  }\n  try {\n    // Hopefully we never get here...\n    // Not all environments allow eval and Function. Use only as a last resort:\n    // eslint-disable-next-line no-new-func\n    return new Function(\"return this\")();\n  } catch (_a) {\n    // If all fails, give up and create an object.\n    // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n    return {};\n  }\n}();\n// API-only Polyfill for trustedTypes\nif ($global.trustedTypes === void 0) {\n  $global.trustedTypes = {\n    createPolicy: (n, r) => r\n  };\n}\nconst propConfig = {\n  configurable: false,\n  enumerable: false,\n  writable: false\n};\nif ($global.FAST === void 0) {\n  Reflect.defineProperty($global, \"FAST\", Object.assign({\n    value: Object.create(null)\n  }, propConfig));\n}\n/**\n * The FAST global.\n * @internal\n */\nconst FAST = $global.FAST;\nif (FAST.getById === void 0) {\n  const storage = Object.create(null);\n  Reflect.defineProperty(FAST, \"getById\", Object.assign({\n    value(id, initialize) {\n      let found = storage[id];\n      if (found === void 0) {\n        found = initialize ? storage[id] = initialize() : null;\n      }\n      return found;\n    }\n  }, propConfig));\n}\n/**\n * A readonly, empty array.\n * @remarks\n * Typically returned by APIs that return arrays when there are\n * no actual items to return.\n * @internal\n */\nconst emptyArray = Object.freeze([]);\n/**\n * Creates a function capable of locating metadata associated with a type.\n * @returns A metadata locator function.\n * @internal\n */\nfunction createMetadataLocator() {\n  const metadataLookup = new WeakMap();\n  return function (target) {\n    let metadata = metadataLookup.get(target);\n    if (metadata === void 0) {\n      let currentTarget = Reflect.getPrototypeOf(target);\n      while (metadata === void 0 && currentTarget !== null) {\n        metadata = metadataLookup.get(currentTarget);\n        currentTarget = Reflect.getPrototypeOf(currentTarget);\n      }\n      metadata = metadata === void 0 ? [] : metadata.slice(0);\n      metadataLookup.set(target, metadata);\n    }\n    return metadata;\n  };\n}\n\nconst updateQueue = $global.FAST.getById(1 /* updateQueue */, () => {\n  const tasks = [];\n  const pendingErrors = [];\n  function throwFirstError() {\n    if (pendingErrors.length) {\n      throw pendingErrors.shift();\n    }\n  }\n  function tryRunTask(task) {\n    try {\n      task.call();\n    } catch (error) {\n      pendingErrors.push(error);\n      setTimeout(throwFirstError, 0);\n    }\n  }\n  function process() {\n    const capacity = 1024;\n    let index = 0;\n    while (index < tasks.length) {\n      tryRunTask(tasks[index]);\n      index++;\n      // Prevent leaking memory for long chains of recursive calls to `DOM.queueUpdate`.\n      // If we call `DOM.queueUpdate` within a task scheduled by `DOM.queueUpdate`, the queue will\n      // grow, but to avoid an O(n) walk for every task we execute, we don't\n      // shift tasks off the queue after they have been executed.\n      // Instead, we periodically shift 1024 tasks off the queue.\n      if (index > capacity) {\n        // Manually shift all values starting at the index back to the\n        // beginning of the queue.\n        for (let scan = 0, newLength = tasks.length - index; scan < newLength; scan++) {\n          tasks[scan] = tasks[scan + index];\n        }\n        tasks.length -= index;\n        index = 0;\n      }\n    }\n    tasks.length = 0;\n  }\n  function enqueue(callable) {\n    if (tasks.length < 1) {\n      $global.requestAnimationFrame(process);\n    }\n    tasks.push(callable);\n  }\n  return Object.freeze({\n    enqueue,\n    process\n  });\n});\n/* eslint-disable */\nconst fastHTMLPolicy = $global.trustedTypes.createPolicy(\"fast-html\", {\n  createHTML: html => html\n});\n/* eslint-enable */\nlet htmlPolicy = fastHTMLPolicy;\nconst marker = `fast-${Math.random().toString(36).substring(2, 8)}`;\n/** @internal */\nconst _interpolationStart = `${marker}{`;\n/** @internal */\nconst _interpolationEnd = `}${marker}`;\n/**\n * Common DOM APIs.\n * @public\n */\nconst DOM = Object.freeze({\n  /**\n   * Indicates whether the DOM supports the adoptedStyleSheets feature.\n   */\n  supportsAdoptedStyleSheets: Array.isArray(document.adoptedStyleSheets) && \"replace\" in CSSStyleSheet.prototype,\n  /**\n   * Sets the HTML trusted types policy used by the templating engine.\n   * @param policy - The policy to set for HTML.\n   * @remarks\n   * This API can only be called once, for security reasons. It should be\n   * called by the application developer at the start of their program.\n   */\n  setHTMLPolicy(policy) {\n    if (htmlPolicy !== fastHTMLPolicy) {\n      throw new Error(\"The HTML policy can only be set once.\");\n    }\n    htmlPolicy = policy;\n  },\n  /**\n   * Turns a string into trusted HTML using the configured trusted types policy.\n   * @param html - The string to turn into trusted HTML.\n   * @remarks\n   * Used internally by the template engine when creating templates\n   * and setting innerHTML.\n   */\n  createHTML(html) {\n    return htmlPolicy.createHTML(html);\n  },\n  /**\n   * Determines if the provided node is a template marker used by the runtime.\n   * @param node - The node to test.\n   */\n  isMarker(node) {\n    return node && node.nodeType === 8 && node.data.startsWith(marker);\n  },\n  /**\n   * Given a marker node, extract the {@link HTMLDirective} index from the placeholder.\n   * @param node - The marker node to extract the index from.\n   */\n  extractDirectiveIndexFromMarker(node) {\n    return parseInt(node.data.replace(`${marker}:`, \"\"));\n  },\n  /**\n   * Creates a placeholder string suitable for marking out a location *within*\n   * an attribute value or HTML content.\n   * @param index - The directive index to create the placeholder for.\n   * @remarks\n   * Used internally by binding directives.\n   */\n  createInterpolationPlaceholder(index) {\n    return `${_interpolationStart}${index}${_interpolationEnd}`;\n  },\n  /**\n   * Creates a placeholder that manifests itself as an attribute on an\n   * element.\n   * @param attributeName - The name of the custom attribute.\n   * @param index - The directive index to create the placeholder for.\n   * @remarks\n   * Used internally by attribute directives such as `ref`, `slotted`, and `children`.\n   */\n  createCustomAttributePlaceholder(attributeName, index) {\n    return `${attributeName}=\"${this.createInterpolationPlaceholder(index)}\"`;\n  },\n  /**\n   * Creates a placeholder that manifests itself as a marker within the DOM structure.\n   * @param index - The directive index to create the placeholder for.\n   * @remarks\n   * Used internally by structural directives such as `repeat`.\n   */\n  createBlockPlaceholder(index) {\n    return `<!--${marker}:${index}-->`;\n  },\n  /**\n   * Schedules DOM update work in the next async batch.\n   * @param callable - The callable function or object to queue.\n   */\n  queueUpdate: updateQueue.enqueue,\n  /**\n   * Immediately processes all work previously scheduled\n   * through queueUpdate.\n   * @remarks\n   * This also forces nextUpdate promises\n   * to resolve.\n   */\n  processUpdates: updateQueue.process,\n  /**\n   * Resolves with the next DOM update.\n   */\n  nextUpdate() {\n    return new Promise(updateQueue.enqueue);\n  },\n  /**\n   * Sets an attribute value on an element.\n   * @param element - The element to set the attribute value on.\n   * @param attributeName - The attribute name to set.\n   * @param value - The value of the attribute to set.\n   * @remarks\n   * If the value is `null` or `undefined`, the attribute is removed, otherwise\n   * it is set to the provided value using the standard `setAttribute` API.\n   */\n  setAttribute(element, attributeName, value) {\n    if (value === null || value === undefined) {\n      element.removeAttribute(attributeName);\n    } else {\n      element.setAttribute(attributeName, value);\n    }\n  },\n  /**\n   * Sets a boolean attribute value.\n   * @param element - The element to set the boolean attribute value on.\n   * @param attributeName - The attribute name to set.\n   * @param value - The value of the attribute to set.\n   * @remarks\n   * If the value is true, the attribute is added; otherwise it is removed.\n   */\n  setBooleanAttribute(element, attributeName, value) {\n    value ? element.setAttribute(attributeName, \"\") : element.removeAttribute(attributeName);\n  },\n  /**\n   * Removes all the child nodes of the provided parent node.\n   * @param parent - The node to remove the children from.\n   */\n  removeChildNodes(parent) {\n    for (let child = parent.firstChild; child !== null; child = parent.firstChild) {\n      parent.removeChild(child);\n    }\n  },\n  /**\n   * Creates a TreeWalker configured to walk a template fragment.\n   * @param fragment - The fragment to walk.\n   */\n  createTemplateWalker(fragment) {\n    return document.createTreeWalker(fragment, 133,\n    // element, text, comment\n    null, false);\n  }\n});\n\n/**\n * An implementation of {@link Notifier} that efficiently keeps track of\n * subscribers interested in a specific change notification on an\n * observable source.\n *\n * @remarks\n * This set is optimized for the most common scenario of 1 or 2 subscribers.\n * With this in mind, it can store a subscriber in an internal field, allowing it to avoid Array#push operations.\n * If the set ever exceeds two subscribers, it upgrades to an array automatically.\n * @public\n */\nclass SubscriberSet {\n  /**\n   * Creates an instance of SubscriberSet for the specified source.\n   * @param source - The object source that subscribers will receive notifications from.\n   * @param initialSubscriber - An initial subscriber to changes.\n   */\n  constructor(source, initialSubscriber) {\n    this.sub1 = void 0;\n    this.sub2 = void 0;\n    this.spillover = void 0;\n    this.source = source;\n    this.sub1 = initialSubscriber;\n  }\n  /**\n   * Checks whether the provided subscriber has been added to this set.\n   * @param subscriber - The subscriber to test for inclusion in this set.\n   */\n  has(subscriber) {\n    return this.spillover === void 0 ? this.sub1 === subscriber || this.sub2 === subscriber : this.spillover.indexOf(subscriber) !== -1;\n  }\n  /**\n   * Subscribes to notification of changes in an object's state.\n   * @param subscriber - The object that is subscribing for change notification.\n   */\n  subscribe(subscriber) {\n    const spillover = this.spillover;\n    if (spillover === void 0) {\n      if (this.has(subscriber)) {\n        return;\n      }\n      if (this.sub1 === void 0) {\n        this.sub1 = subscriber;\n        return;\n      }\n      if (this.sub2 === void 0) {\n        this.sub2 = subscriber;\n        return;\n      }\n      this.spillover = [this.sub1, this.sub2, subscriber];\n      this.sub1 = void 0;\n      this.sub2 = void 0;\n    } else {\n      const index = spillover.indexOf(subscriber);\n      if (index === -1) {\n        spillover.push(subscriber);\n      }\n    }\n  }\n  /**\n   * Unsubscribes from notification of changes in an object's state.\n   * @param subscriber - The object that is unsubscribing from change notification.\n   */\n  unsubscribe(subscriber) {\n    const spillover = this.spillover;\n    if (spillover === void 0) {\n      if (this.sub1 === subscriber) {\n        this.sub1 = void 0;\n      } else if (this.sub2 === subscriber) {\n        this.sub2 = void 0;\n      }\n    } else {\n      const index = spillover.indexOf(subscriber);\n      if (index !== -1) {\n        spillover.splice(index, 1);\n      }\n    }\n  }\n  /**\n   * Notifies all subscribers.\n   * @param args - Data passed along to subscribers during notification.\n   */\n  notify(args) {\n    const spillover = this.spillover;\n    const source = this.source;\n    if (spillover === void 0) {\n      const sub1 = this.sub1;\n      const sub2 = this.sub2;\n      if (sub1 !== void 0) {\n        sub1.handleChange(source, args);\n      }\n      if (sub2 !== void 0) {\n        sub2.handleChange(source, args);\n      }\n    } else {\n      for (let i = 0, ii = spillover.length; i < ii; ++i) {\n        spillover[i].handleChange(source, args);\n      }\n    }\n  }\n}\n/**\n * An implementation of Notifier that allows subscribers to be notified\n * of individual property changes on an object.\n * @public\n */\nclass PropertyChangeNotifier {\n  /**\n   * Creates an instance of PropertyChangeNotifier for the specified source.\n   * @param source - The object source that subscribers will receive notifications from.\n   */\n  constructor(source) {\n    this.subscribers = {};\n    this.sourceSubscribers = null;\n    this.source = source;\n  }\n  /**\n   * Notifies all subscribers, based on the specified property.\n   * @param propertyName - The property name, passed along to subscribers during notification.\n   */\n  notify(propertyName) {\n    var _a;\n    const subscribers = this.subscribers[propertyName];\n    if (subscribers !== void 0) {\n      subscribers.notify(propertyName);\n    }\n    (_a = this.sourceSubscribers) === null || _a === void 0 ? void 0 : _a.notify(propertyName);\n  }\n  /**\n   * Subscribes to notification of changes in an object's state.\n   * @param subscriber - The object that is subscribing for change notification.\n   * @param propertyToWatch - The name of the property that the subscriber is interested in watching for changes.\n   */\n  subscribe(subscriber, propertyToWatch) {\n    var _a;\n    if (propertyToWatch) {\n      let subscribers = this.subscribers[propertyToWatch];\n      if (subscribers === void 0) {\n        this.subscribers[propertyToWatch] = subscribers = new SubscriberSet(this.source);\n      }\n      subscribers.subscribe(subscriber);\n    } else {\n      this.sourceSubscribers = (_a = this.sourceSubscribers) !== null && _a !== void 0 ? _a : new SubscriberSet(this.source);\n      this.sourceSubscribers.subscribe(subscriber);\n    }\n  }\n  /**\n   * Unsubscribes from notification of changes in an object's state.\n   * @param subscriber - The object that is unsubscribing from change notification.\n   * @param propertyToUnwatch - The name of the property that the subscriber is no longer interested in watching.\n   */\n  unsubscribe(subscriber, propertyToUnwatch) {\n    var _a;\n    if (propertyToUnwatch) {\n      const subscribers = this.subscribers[propertyToUnwatch];\n      if (subscribers !== void 0) {\n        subscribers.unsubscribe(subscriber);\n      }\n    } else {\n      (_a = this.sourceSubscribers) === null || _a === void 0 ? void 0 : _a.unsubscribe(subscriber);\n    }\n  }\n}\n\n/**\n * Common Observable APIs.\n * @public\n */\nconst Observable = FAST.getById(2 /* observable */, () => {\n  const volatileRegex = /(:|&&|\\|\\||if)/;\n  const notifierLookup = new WeakMap();\n  const queueUpdate = DOM.queueUpdate;\n  let watcher = void 0;\n  let createArrayObserver = array => {\n    throw new Error(\"Must call enableArrayObservation before observing arrays.\");\n  };\n  function getNotifier(source) {\n    let found = source.$fastController || notifierLookup.get(source);\n    if (found === void 0) {\n      if (Array.isArray(source)) {\n        found = createArrayObserver(source);\n      } else {\n        notifierLookup.set(source, found = new PropertyChangeNotifier(source));\n      }\n    }\n    return found;\n  }\n  const getAccessors = createMetadataLocator();\n  class DefaultObservableAccessor {\n    constructor(name) {\n      this.name = name;\n      this.field = `_${name}`;\n      this.callback = `${name}Changed`;\n    }\n    getValue(source) {\n      if (watcher !== void 0) {\n        watcher.watch(source, this.name);\n      }\n      return source[this.field];\n    }\n    setValue(source, newValue) {\n      const field = this.field;\n      const oldValue = source[field];\n      if (oldValue !== newValue) {\n        source[field] = newValue;\n        const callback = source[this.callback];\n        if (typeof callback === \"function\") {\n          callback.call(source, oldValue, newValue);\n        }\n        getNotifier(source).notify(this.name);\n      }\n    }\n  }\n  class BindingObserverImplementation extends SubscriberSet {\n    constructor(binding, initialSubscriber, isVolatileBinding = false) {\n      super(binding, initialSubscriber);\n      this.binding = binding;\n      this.isVolatileBinding = isVolatileBinding;\n      this.needsRefresh = true;\n      this.needsQueue = true;\n      this.first = this;\n      this.last = null;\n      this.propertySource = void 0;\n      this.propertyName = void 0;\n      this.notifier = void 0;\n      this.next = void 0;\n    }\n    observe(source, context) {\n      if (this.needsRefresh && this.last !== null) {\n        this.disconnect();\n      }\n      const previousWatcher = watcher;\n      watcher = this.needsRefresh ? this : void 0;\n      this.needsRefresh = this.isVolatileBinding;\n      const result = this.binding(source, context);\n      watcher = previousWatcher;\n      return result;\n    }\n    disconnect() {\n      if (this.last !== null) {\n        let current = this.first;\n        while (current !== void 0) {\n          current.notifier.unsubscribe(this, current.propertyName);\n          current = current.next;\n        }\n        this.last = null;\n        this.needsRefresh = this.needsQueue = true;\n      }\n    }\n    watch(propertySource, propertyName) {\n      const prev = this.last;\n      const notifier = getNotifier(propertySource);\n      const current = prev === null ? this.first : {};\n      current.propertySource = propertySource;\n      current.propertyName = propertyName;\n      current.notifier = notifier;\n      notifier.subscribe(this, propertyName);\n      if (prev !== null) {\n        if (!this.needsRefresh) {\n          // Declaring the variable prior to assignment below circumvents\n          // a bug in Angular's optimization process causing infinite recursion\n          // of this watch() method. Details https://github.com/microsoft/fast/issues/4969\n          let prevValue;\n          watcher = void 0;\n          /* eslint-disable-next-line */\n          prevValue = prev.propertySource[prev.propertyName];\n          /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n          watcher = this;\n          if (propertySource === prevValue) {\n            this.needsRefresh = true;\n          }\n        }\n        prev.next = current;\n      }\n      this.last = current;\n    }\n    handleChange() {\n      if (this.needsQueue) {\n        this.needsQueue = false;\n        queueUpdate(this);\n      }\n    }\n    call() {\n      if (this.last !== null) {\n        this.needsQueue = true;\n        this.notify(this);\n      }\n    }\n    records() {\n      let next = this.first;\n      return {\n        next: () => {\n          const current = next;\n          if (current === undefined) {\n            return {\n              value: void 0,\n              done: true\n            };\n          } else {\n            next = next.next;\n            return {\n              value: current,\n              done: false\n            };\n          }\n        },\n        [Symbol.iterator]: function () {\n          return this;\n        }\n      };\n    }\n  }\n  return Object.freeze({\n    /**\n     * @internal\n     * @param factory - The factory used to create array observers.\n     */\n    setArrayObserverFactory(factory) {\n      createArrayObserver = factory;\n    },\n    /**\n     * Gets a notifier for an object or Array.\n     * @param source - The object or Array to get the notifier for.\n     */\n    getNotifier,\n    /**\n     * Records a property change for a source object.\n     * @param source - The object to record the change against.\n     * @param propertyName - The property to track as changed.\n     */\n    track(source, propertyName) {\n      if (watcher !== void 0) {\n        watcher.watch(source, propertyName);\n      }\n    },\n    /**\n     * Notifies watchers that the currently executing property getter or function is volatile\n     * with respect to its observable dependencies.\n     */\n    trackVolatile() {\n      if (watcher !== void 0) {\n        watcher.needsRefresh = true;\n      }\n    },\n    /**\n     * Notifies subscribers of a source object of changes.\n     * @param source - the object to notify of changes.\n     * @param args - The change args to pass to subscribers.\n     */\n    notify(source, args) {\n      getNotifier(source).notify(args);\n    },\n    /**\n     * Defines an observable property on an object or prototype.\n     * @param target - The target object to define the observable on.\n     * @param nameOrAccessor - The name of the property to define as observable;\n     * or a custom accessor that specifies the property name and accessor implementation.\n     */\n    defineProperty(target, nameOrAccessor) {\n      if (typeof nameOrAccessor === \"string\") {\n        nameOrAccessor = new DefaultObservableAccessor(nameOrAccessor);\n      }\n      getAccessors(target).push(nameOrAccessor);\n      Reflect.defineProperty(target, nameOrAccessor.name, {\n        enumerable: true,\n        get: function () {\n          return nameOrAccessor.getValue(this);\n        },\n        set: function (newValue) {\n          nameOrAccessor.setValue(this, newValue);\n        }\n      });\n    },\n    /**\n     * Finds all the observable accessors defined on the target,\n     * including its prototype chain.\n     * @param target - The target object to search for accessor on.\n     */\n    getAccessors,\n    /**\n     * Creates a {@link BindingObserver} that can watch the\n     * provided {@link Binding} for changes.\n     * @param binding - The binding to observe.\n     * @param initialSubscriber - An initial subscriber to changes in the binding value.\n     * @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.\n     */\n    binding(binding, initialSubscriber, isVolatileBinding = this.isVolatileBinding(binding)) {\n      return new BindingObserverImplementation(binding, initialSubscriber, isVolatileBinding);\n    },\n    /**\n     * Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated\n     * on every evaluation of the value.\n     * @param binding - The binding to inspect.\n     */\n    isVolatileBinding(binding) {\n      return volatileRegex.test(binding.toString());\n    }\n  });\n});\n/**\n * Decorator: Defines an observable property on the target.\n * @param target - The target to define the observable on.\n * @param nameOrAccessor - The property name or accessor to define the observable as.\n * @public\n */\nfunction observable(target, nameOrAccessor) {\n  Observable.defineProperty(target, nameOrAccessor);\n}\n/**\n * Decorator: Marks a property getter as having volatile observable dependencies.\n * @param target - The target that the property is defined on.\n * @param name - The property name.\n * @param name - The existing descriptor.\n * @public\n */\nfunction volatile(target, name, descriptor) {\n  return Object.assign({}, descriptor, {\n    get: function () {\n      Observable.trackVolatile();\n      return descriptor.get.apply(this);\n    }\n  });\n}\nconst contextEvent = FAST.getById(3 /* contextEvent */, () => {\n  let current = null;\n  return {\n    get() {\n      return current;\n    },\n    set(event) {\n      current = event;\n    }\n  };\n});\n/**\n * Provides additional contextual information available to behaviors and expressions.\n * @public\n */\nclass ExecutionContext {\n  constructor() {\n    /**\n     * The index of the current item within a repeat context.\n     */\n    this.index = 0;\n    /**\n     * The length of the current collection within a repeat context.\n     */\n    this.length = 0;\n    /**\n     * The parent data object within a repeat context.\n     */\n    this.parent = null;\n    /**\n     * The parent execution context when in nested context scenarios.\n     */\n    this.parentContext = null;\n  }\n  /**\n   * The current event within an event handler.\n   */\n  get event() {\n    return contextEvent.get();\n  }\n  /**\n   * Indicates whether the current item within a repeat context\n   * has an even index.\n   */\n  get isEven() {\n    return this.index % 2 === 0;\n  }\n  /**\n   * Indicates whether the current item within a repeat context\n   * has an odd index.\n   */\n  get isOdd() {\n    return this.index % 2 !== 0;\n  }\n  /**\n   * Indicates whether the current item within a repeat context\n   * is the first item in the collection.\n   */\n  get isFirst() {\n    return this.index === 0;\n  }\n  /**\n   * Indicates whether the current item within a repeat context\n   * is somewhere in the middle of the collection.\n   */\n  get isInMiddle() {\n    return !this.isFirst && !this.isLast;\n  }\n  /**\n   * Indicates whether the current item within a repeat context\n   * is the last item in the collection.\n   */\n  get isLast() {\n    return this.index === this.length - 1;\n  }\n  /**\n   * Sets the event for the current execution context.\n   * @param event - The event to set.\n   * @internal\n   */\n  static setEvent(event) {\n    contextEvent.set(event);\n  }\n}\nObservable.defineProperty(ExecutionContext.prototype, \"index\");\nObservable.defineProperty(ExecutionContext.prototype, \"length\");\n/**\n * The default execution context used in binding expressions.\n * @public\n */\nconst defaultExecutionContext = Object.seal(new ExecutionContext());\n\n/**\n * Instructs the template engine to apply behavior to a node.\n * @public\n */\nclass HTMLDirective {\n  constructor() {\n    /**\n     * The index of the DOM node to which the created behavior will apply.\n     */\n    this.targetIndex = 0;\n  }\n}\n/**\n * A {@link HTMLDirective} that targets a named attribute or property on a node.\n * @public\n */\nclass TargetedHTMLDirective extends HTMLDirective {\n  constructor() {\n    super(...arguments);\n    /**\n     * Creates a placeholder string based on the directive's index within the template.\n     * @param index - The index of the directive within the template.\n     */\n    this.createPlaceholder = DOM.createInterpolationPlaceholder;\n  }\n}\n/**\n * A directive that attaches special behavior to an element via a custom attribute.\n * @public\n */\nclass AttachedBehaviorHTMLDirective extends HTMLDirective {\n  /**\n   *\n   * @param name - The name of the behavior; used as a custom attribute on the element.\n   * @param behavior - The behavior to instantiate and attach to the element.\n   * @param options - Options to pass to the behavior during creation.\n   */\n  constructor(name, behavior, options) {\n    super();\n    this.name = name;\n    this.behavior = behavior;\n    this.options = options;\n  }\n  /**\n   * Creates a placeholder string based on the directive's index within the template.\n   * @param index - The index of the directive within the template.\n   * @remarks\n   * Creates a custom attribute placeholder.\n   */\n  createPlaceholder(index) {\n    return DOM.createCustomAttributePlaceholder(this.name, index);\n  }\n  /**\n   * Creates a behavior for the provided target node.\n   * @param target - The node instance to create the behavior for.\n   * @remarks\n   * Creates an instance of the `behavior` type this directive was constructed with\n   * and passes the target and options to that `behavior`'s constructor.\n   */\n  createBehavior(target) {\n    return new this.behavior(target, this.options);\n  }\n}\n\nfunction normalBind(source, context) {\n  this.source = source;\n  this.context = context;\n  if (this.bindingObserver === null) {\n    this.bindingObserver = Observable.binding(this.binding, this, this.isBindingVolatile);\n  }\n  this.updateTarget(this.bindingObserver.observe(source, context));\n}\nfunction triggerBind(source, context) {\n  this.source = source;\n  this.context = context;\n  this.target.addEventListener(this.targetName, this);\n}\nfunction normalUnbind() {\n  this.bindingObserver.disconnect();\n  this.source = null;\n  this.context = null;\n}\nfunction contentUnbind() {\n  this.bindingObserver.disconnect();\n  this.source = null;\n  this.context = null;\n  const view = this.target.$fastView;\n  if (view !== void 0 && view.isComposed) {\n    view.unbind();\n    view.needsBindOnly = true;\n  }\n}\nfunction triggerUnbind() {\n  this.target.removeEventListener(this.targetName, this);\n  this.source = null;\n  this.context = null;\n}\nfunction updateAttributeTarget(value) {\n  DOM.setAttribute(this.target, this.targetName, value);\n}\nfunction updateBooleanAttributeTarget(value) {\n  DOM.setBooleanAttribute(this.target, this.targetName, value);\n}\nfunction updateContentTarget(value) {\n  // If there's no actual value, then this equates to the\n  // empty string for the purposes of content bindings.\n  if (value === null || value === undefined) {\n    value = \"\";\n  }\n  // If the value has a \"create\" method, then it's a template-like.\n  if (value.create) {\n    this.target.textContent = \"\";\n    let view = this.target.$fastView;\n    // If there's no previous view that we might be able to\n    // reuse then create a new view from the template.\n    if (view === void 0) {\n      view = value.create();\n    } else {\n      // If there is a previous view, but it wasn't created\n      // from the same template as the new value, then we\n      // need to remove the old view if it's still in the DOM\n      // and create a new view from the template.\n      if (this.target.$fastTemplate !== value) {\n        if (view.isComposed) {\n          view.remove();\n          view.unbind();\n        }\n        view = value.create();\n      }\n    }\n    // It's possible that the value is the same as the previous template\n    // and that there's actually no need to compose it.\n    if (!view.isComposed) {\n      view.isComposed = true;\n      view.bind(this.source, this.context);\n      view.insertBefore(this.target);\n      this.target.$fastView = view;\n      this.target.$fastTemplate = value;\n    } else if (view.needsBindOnly) {\n      view.needsBindOnly = false;\n      view.bind(this.source, this.context);\n    }\n  } else {\n    const view = this.target.$fastView;\n    // If there is a view and it's currently composed into\n    // the DOM, then we need to remove it.\n    if (view !== void 0 && view.isComposed) {\n      view.isComposed = false;\n      view.remove();\n      if (view.needsBindOnly) {\n        view.needsBindOnly = false;\n      } else {\n        view.unbind();\n      }\n    }\n    this.target.textContent = value;\n  }\n}\nfunction updatePropertyTarget(value) {\n  this.target[this.targetName] = value;\n}\nfunction updateClassTarget(value) {\n  const classVersions = this.classVersions || Object.create(null);\n  const target = this.target;\n  let version = this.version || 0;\n  // Add the classes, tracking the version at which they were added.\n  if (value !== null && value !== undefined && value.length) {\n    const names = value.split(/\\s+/);\n    for (let i = 0, ii = names.length; i < ii; ++i) {\n      const currentName = names[i];\n      if (currentName === \"\") {\n        continue;\n      }\n      classVersions[currentName] = version;\n      target.classList.add(currentName);\n    }\n  }\n  this.classVersions = classVersions;\n  this.version = version + 1;\n  // If this is the first call to add classes, there's no need to remove old ones.\n  if (version === 0) {\n    return;\n  }\n  // Remove classes from the previous version.\n  version -= 1;\n  for (const name in classVersions) {\n    if (classVersions[name] === version) {\n      target.classList.remove(name);\n    }\n  }\n}\n/**\n * A directive that configures data binding to element content and attributes.\n * @public\n */\nclass HTMLBindingDirective extends TargetedHTMLDirective {\n  /**\n   * Creates an instance of BindingDirective.\n   * @param binding - A binding that returns the data used to update the DOM.\n   */\n  constructor(binding) {\n    super();\n    this.binding = binding;\n    this.bind = normalBind;\n    this.unbind = normalUnbind;\n    this.updateTarget = updateAttributeTarget;\n    this.isBindingVolatile = Observable.isVolatileBinding(this.binding);\n  }\n  /**\n   * Gets/sets the name of the attribute or property that this\n   * binding is targeting.\n   */\n  get targetName() {\n    return this.originalTargetName;\n  }\n  set targetName(value) {\n    this.originalTargetName = value;\n    if (value === void 0) {\n      return;\n    }\n    switch (value[0]) {\n      case \":\":\n        this.cleanedTargetName = value.substr(1);\n        this.updateTarget = updatePropertyTarget;\n        if (this.cleanedTargetName === \"innerHTML\") {\n          const binding = this.binding;\n          this.binding = (s, c) => DOM.createHTML(binding(s, c));\n        }\n        break;\n      case \"?\":\n        this.cleanedTargetName = value.substr(1);\n        this.updateTarget = updateBooleanAttributeTarget;\n        break;\n      case \"@\":\n        this.cleanedTargetName = value.substr(1);\n        this.bind = triggerBind;\n        this.unbind = triggerUnbind;\n        break;\n      default:\n        this.cleanedTargetName = value;\n        if (value === \"class\") {\n          this.updateTarget = updateClassTarget;\n        }\n        break;\n    }\n  }\n  /**\n   * Makes this binding target the content of an element rather than\n   * a particular attribute or property.\n   */\n  targetAtContent() {\n    this.updateTarget = updateContentTarget;\n    this.unbind = contentUnbind;\n  }\n  /**\n   * Creates the runtime BindingBehavior instance based on the configuration\n   * information stored in the BindingDirective.\n   * @param target - The target node that the binding behavior should attach to.\n   */\n  createBehavior(target) {\n    /* eslint-disable-next-line @typescript-eslint/no-use-before-define */\n    return new BindingBehavior(target, this.binding, this.isBindingVolatile, this.bind, this.unbind, this.updateTarget, this.cleanedTargetName);\n  }\n}\n/**\n * A behavior that updates content and attributes based on a configured\n * BindingDirective.\n * @public\n */\nclass BindingBehavior {\n  /**\n   * Creates an instance of BindingBehavior.\n   * @param target - The target of the data updates.\n   * @param binding - The binding that returns the latest value for an update.\n   * @param isBindingVolatile - Indicates whether the binding has volatile dependencies.\n   * @param bind - The operation to perform during binding.\n   * @param unbind - The operation to perform during unbinding.\n   * @param updateTarget - The operation to perform when updating.\n   * @param targetName - The name of the target attribute or property to update.\n   */\n  constructor(target, binding, isBindingVolatile, bind, unbind, updateTarget, targetName) {\n    /** @internal */\n    this.source = null;\n    /** @internal */\n    this.context = null;\n    /** @internal */\n    this.bindingObserver = null;\n    this.target = target;\n    this.binding = binding;\n    this.isBindingVolatile = isBindingVolatile;\n    this.bind = bind;\n    this.unbind = unbind;\n    this.updateTarget = updateTarget;\n    this.targetName = targetName;\n  }\n  /** @internal */\n  handleChange() {\n    this.updateTarget(this.bindingObserver.observe(this.source, this.context));\n  }\n  /** @internal */\n  handleEvent(event) {\n    ExecutionContext.setEvent(event);\n    const result = this.binding(this.source, this.context);\n    ExecutionContext.setEvent(null);\n    if (result !== true) {\n      event.preventDefault();\n    }\n  }\n}\n\nlet sharedContext = null;\nclass CompilationContext {\n  addFactory(factory) {\n    factory.targetIndex = this.targetIndex;\n    this.behaviorFactories.push(factory);\n  }\n  captureContentBinding(directive) {\n    directive.targetAtContent();\n    this.addFactory(directive);\n  }\n  reset() {\n    this.behaviorFactories = [];\n    this.targetIndex = -1;\n  }\n  release() {\n    /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n    sharedContext = this;\n  }\n  static borrow(directives) {\n    const shareable = sharedContext || new CompilationContext();\n    shareable.directives = directives;\n    shareable.reset();\n    sharedContext = null;\n    return shareable;\n  }\n}\nfunction createAggregateBinding(parts) {\n  if (parts.length === 1) {\n    return parts[0];\n  }\n  let targetName;\n  const partCount = parts.length;\n  const finalParts = parts.map(x => {\n    if (typeof x === \"string\") {\n      return () => x;\n    }\n    targetName = x.targetName || targetName;\n    return x.binding;\n  });\n  const binding = (scope, context) => {\n    let output = \"\";\n    for (let i = 0; i < partCount; ++i) {\n      output += finalParts[i](scope, context);\n    }\n    return output;\n  };\n  const directive = new HTMLBindingDirective(binding);\n  directive.targetName = targetName;\n  return directive;\n}\nconst interpolationEndLength = _interpolationEnd.length;\nfunction parseContent(context, value) {\n  const valueParts = value.split(_interpolationStart);\n  if (valueParts.length === 1) {\n    return null;\n  }\n  const bindingParts = [];\n  for (let i = 0, ii = valueParts.length; i < ii; ++i) {\n    const current = valueParts[i];\n    const index = current.indexOf(_interpolationEnd);\n    let literal;\n    if (index === -1) {\n      literal = current;\n    } else {\n      const directiveIndex = parseInt(current.substring(0, index));\n      bindingParts.push(context.directives[directiveIndex]);\n      literal = current.substring(index + interpolationEndLength);\n    }\n    if (literal !== \"\") {\n      bindingParts.push(literal);\n    }\n  }\n  return bindingParts;\n}\nfunction compileAttributes(context, node, includeBasicValues = false) {\n  const attributes = node.attributes;\n  for (let i = 0, ii = attributes.length; i < ii; ++i) {\n    const attr = attributes[i];\n    const attrValue = attr.value;\n    const parseResult = parseContent(context, attrValue);\n    let result = null;\n    if (parseResult === null) {\n      if (includeBasicValues) {\n        result = new HTMLBindingDirective(() => attrValue);\n        result.targetName = attr.name;\n      }\n    } else {\n      result = createAggregateBinding(parseResult);\n    }\n    if (result !== null) {\n      node.removeAttributeNode(attr);\n      i--;\n      ii--;\n      context.addFactory(result);\n    }\n  }\n}\nfunction compileContent(context, node, walker) {\n  const parseResult = parseContent(context, node.textContent);\n  if (parseResult !== null) {\n    let lastNode = node;\n    for (let i = 0, ii = parseResult.length; i < ii; ++i) {\n      const currentPart = parseResult[i];\n      const currentNode = i === 0 ? node : lastNode.parentNode.insertBefore(document.createTextNode(\"\"), lastNode.nextSibling);\n      if (typeof currentPart === \"string\") {\n        currentNode.textContent = currentPart;\n      } else {\n        currentNode.textContent = \" \";\n        context.captureContentBinding(currentPart);\n      }\n      lastNode = currentNode;\n      context.targetIndex++;\n      if (currentNode !== node) {\n        walker.nextNode();\n      }\n    }\n    context.targetIndex--;\n  }\n}\n/**\n * Compiles a template and associated directives into a raw compilation\n * result which include a cloneable DocumentFragment and factories capable\n * of attaching runtime behavior to nodes within the fragment.\n * @param template - The template to compile.\n * @param directives - The directives referenced by the template.\n * @remarks\n * The template that is provided for compilation is altered in-place\n * and cannot be compiled again. If the original template must be preserved,\n * it is recommended that you clone the original and pass the clone to this API.\n * @public\n */\nfunction compileTemplate(template, directives) {\n  const fragment = template.content;\n  // https://bugs.chromium.org/p/chromium/issues/detail?id=1111864\n  document.adoptNode(fragment);\n  const context = CompilationContext.borrow(directives);\n  compileAttributes(context, template, true);\n  const hostBehaviorFactories = context.behaviorFactories;\n  context.reset();\n  const walker = DOM.createTemplateWalker(fragment);\n  let node;\n  while (node = walker.nextNode()) {\n    context.targetIndex++;\n    switch (node.nodeType) {\n      case 1:\n        // element node\n        compileAttributes(context, node);\n        break;\n      case 3:\n        // text node\n        compileContent(context, node, walker);\n        break;\n      case 8:\n        // comment\n        if (DOM.isMarker(node)) {\n          context.addFactory(directives[DOM.extractDirectiveIndexFromMarker(node)]);\n        }\n    }\n  }\n  let targetOffset = 0;\n  if (\n  // If the first node in a fragment is a marker, that means it's an unstable first node,\n  // because something like a when, repeat, etc. could add nodes before the marker.\n  // To mitigate this, we insert a stable first node. However, if we insert a node,\n  // that will alter the result of the TreeWalker. So, we also need to offset the target index.\n  DOM.isMarker(fragment.firstChild) ||\n  // Or if there is only one node and a directive, it means the template's content\n  // is *only* the directive. In that case, HTMLView.dispose() misses any nodes inserted by\n  // the directive. Inserting a new node ensures proper disposal of nodes added by the directive.\n  fragment.childNodes.length === 1 && directives.length) {\n    fragment.insertBefore(document.createComment(\"\"), fragment.firstChild);\n    targetOffset = -1;\n  }\n  const viewBehaviorFactories = context.behaviorFactories;\n  context.release();\n  return {\n    fragment,\n    viewBehaviorFactories,\n    hostBehaviorFactories,\n    targetOffset\n  };\n}\n\n// A singleton Range instance used to efficiently remove ranges of DOM nodes.\n// See the implementation of HTMLView below for further details.\nconst range = document.createRange();\n/**\n * The standard View implementation, which also implements ElementView and SyntheticView.\n * @public\n */\nclass HTMLView {\n  /**\n   * Constructs an instance of HTMLView.\n   * @param fragment - The html fragment that contains the nodes for this view.\n   * @param behaviors - The behaviors to be applied to this view.\n   */\n  constructor(fragment, behaviors) {\n    this.fragment = fragment;\n    this.behaviors = behaviors;\n    /**\n     * The data that the view is bound to.\n     */\n    this.source = null;\n    /**\n     * The execution context the view is running within.\n     */\n    this.context = null;\n    this.firstChild = fragment.firstChild;\n    this.lastChild = fragment.lastChild;\n  }\n  /**\n   * Appends the view's DOM nodes to the referenced node.\n   * @param node - The parent node to append the view's DOM nodes to.\n   */\n  appendTo(node) {\n    node.appendChild(this.fragment);\n  }\n  /**\n   * Inserts the view's DOM nodes before the referenced node.\n   * @param node - The node to insert the view's DOM before.\n   */\n  insertBefore(node) {\n    if (this.fragment.hasChildNodes()) {\n      node.parentNode.insertBefore(this.fragment, node);\n    } else {\n      const end = this.lastChild;\n      if (node.previousSibling === end) return;\n      const parentNode = node.parentNode;\n      let current = this.firstChild;\n      let next;\n      while (current !== end) {\n        next = current.nextSibling;\n        parentNode.insertBefore(current, node);\n        current = next;\n      }\n      parentNode.insertBefore(end, node);\n    }\n  }\n  /**\n   * Removes the view's DOM nodes.\n   * The nodes are not disposed and the view can later be re-inserted.\n   */\n  remove() {\n    const fragment = this.fragment;\n    const end = this.lastChild;\n    let current = this.firstChild;\n    let next;\n    while (current !== end) {\n      next = current.nextSibling;\n      fragment.appendChild(current);\n      current = next;\n    }\n    fragment.appendChild(end);\n  }\n  /**\n   * Removes the view and unbinds its behaviors, disposing of DOM nodes afterward.\n   * Once a view has been disposed, it cannot be inserted or bound again.\n   */\n  dispose() {\n    const parent = this.firstChild.parentNode;\n    const end = this.lastChild;\n    let current = this.firstChild;\n    let next;\n    while (current !== end) {\n      next = current.nextSibling;\n      parent.removeChild(current);\n      current = next;\n    }\n    parent.removeChild(end);\n    const behaviors = this.behaviors;\n    const oldSource = this.source;\n    for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n      behaviors[i].unbind(oldSource);\n    }\n  }\n  /**\n   * Binds a view's behaviors to its binding source.\n   * @param source - The binding source for the view's binding behaviors.\n   * @param context - The execution context to run the behaviors within.\n   */\n  bind(source, context) {\n    const behaviors = this.behaviors;\n    if (this.source === source) {\n      return;\n    } else if (this.source !== null) {\n      const oldSource = this.source;\n      this.source = source;\n      this.context = context;\n      for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n        const current = behaviors[i];\n        current.unbind(oldSource);\n        current.bind(source, context);\n      }\n    } else {\n      this.source = source;\n      this.context = context;\n      for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n        behaviors[i].bind(source, context);\n      }\n    }\n  }\n  /**\n   * Unbinds a view's behaviors from its binding source.\n   */\n  unbind() {\n    if (this.source === null) {\n      return;\n    }\n    const behaviors = this.behaviors;\n    const oldSource = this.source;\n    for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n      behaviors[i].unbind(oldSource);\n    }\n    this.source = null;\n  }\n  /**\n   * Efficiently disposes of a contiguous range of synthetic view instances.\n   * @param views - A contiguous range of views to be disposed.\n   */\n  static disposeContiguousBatch(views) {\n    if (views.length === 0) {\n      return;\n    }\n    range.setStartBefore(views[0].firstChild);\n    range.setEndAfter(views[views.length - 1].lastChild);\n    range.deleteContents();\n    for (let i = 0, ii = views.length; i < ii; ++i) {\n      const view = views[i];\n      const behaviors = view.behaviors;\n      const oldSource = view.source;\n      for (let j = 0, jj = behaviors.length; j < jj; ++j) {\n        behaviors[j].unbind(oldSource);\n      }\n    }\n  }\n}\n\n/**\n * A template capable of creating HTMLView instances or rendering directly to DOM.\n * @public\n */\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nclass ViewTemplate {\n  /**\n   * Creates an instance of ViewTemplate.\n   * @param html - The html representing what this template will instantiate, including placeholders for directives.\n   * @param directives - The directives that will be connected to placeholders in the html.\n   */\n  constructor(html, directives) {\n    this.behaviorCount = 0;\n    this.hasHostBehaviors = false;\n    this.fragment = null;\n    this.targetOffset = 0;\n    this.viewBehaviorFactories = null;\n    this.hostBehaviorFactories = null;\n    this.html = html;\n    this.directives = directives;\n  }\n  /**\n   * Creates an HTMLView instance based on this template definition.\n   * @param hostBindingTarget - The element that host behaviors will be bound to.\n   */\n  create(hostBindingTarget) {\n    if (this.fragment === null) {\n      let template;\n      const html = this.html;\n      if (typeof html === \"string\") {\n        template = document.createElement(\"template\");\n        template.innerHTML = DOM.createHTML(html);\n        const fec = template.content.firstElementChild;\n        if (fec !== null && fec.tagName === \"TEMPLATE\") {\n          template = fec;\n        }\n      } else {\n        template = html;\n      }\n      const result = compileTemplate(template, this.directives);\n      this.fragment = result.fragment;\n      this.viewBehaviorFactories = result.viewBehaviorFactories;\n      this.hostBehaviorFactories = result.hostBehaviorFactories;\n      this.targetOffset = result.targetOffset;\n      this.behaviorCount = this.viewBehaviorFactories.length + this.hostBehaviorFactories.length;\n      this.hasHostBehaviors = this.hostBehaviorFactories.length > 0;\n    }\n    const fragment = this.fragment.cloneNode(true);\n    const viewFactories = this.viewBehaviorFactories;\n    const behaviors = new Array(this.behaviorCount);\n    const walker = DOM.createTemplateWalker(fragment);\n    let behaviorIndex = 0;\n    let targetIndex = this.targetOffset;\n    let node = walker.nextNode();\n    for (let ii = viewFactories.length; behaviorIndex < ii; ++behaviorIndex) {\n      const factory = viewFactories[behaviorIndex];\n      const factoryIndex = factory.targetIndex;\n      while (node !== null) {\n        if (targetIndex === factoryIndex) {\n          behaviors[behaviorIndex] = factory.createBehavior(node);\n          break;\n        } else {\n          node = walker.nextNode();\n          targetIndex++;\n        }\n      }\n    }\n    if (this.hasHostBehaviors) {\n      const hostFactories = this.hostBehaviorFactories;\n      for (let i = 0, ii = hostFactories.length; i < ii; ++i, ++behaviorIndex) {\n        behaviors[behaviorIndex] = hostFactories[i].createBehavior(hostBindingTarget);\n      }\n    }\n    return new HTMLView(fragment, behaviors);\n  }\n  /**\n   * Creates an HTMLView from this template, binds it to the source, and then appends it to the host.\n   * @param source - The data source to bind the template to.\n   * @param host - The Element where the template will be rendered.\n   * @param hostBindingTarget - An HTML element to target the host bindings at if different from the\n   * host that the template is being attached to.\n   */\n  render(source, host, hostBindingTarget) {\n    if (typeof host === \"string\") {\n      host = document.getElementById(host);\n    }\n    if (hostBindingTarget === void 0) {\n      hostBindingTarget = host;\n    }\n    const view = this.create(hostBindingTarget);\n    view.bind(source, defaultExecutionContext);\n    view.appendTo(host);\n    return view;\n  }\n}\n// Much thanks to LitHTML for working this out!\nconst lastAttributeNameRegex = /* eslint-disable-next-line no-control-regex */\n/([ \\x09\\x0a\\x0c\\x0d])([^\\0-\\x1F\\x7F-\\x9F \"'>=/]+)([ \\x09\\x0a\\x0c\\x0d]*=[ \\x09\\x0a\\x0c\\x0d]*(?:[^ \\x09\\x0a\\x0c\\x0d\"'`<>=]*|\"[^\"]*|'[^']*))$/;\n/**\n * Transforms a template literal string into a renderable ViewTemplate.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @remarks\n * The html helper supports interpolation of strings, numbers, binding expressions,\n * other template instances, and Directive instances.\n * @public\n */\nfunction html(strings, ...values) {\n  const directives = [];\n  let html = \"\";\n  for (let i = 0, ii = strings.length - 1; i < ii; ++i) {\n    const currentString = strings[i];\n    let value = values[i];\n    html += currentString;\n    if (value instanceof ViewTemplate) {\n      const template = value;\n      value = () => template;\n    }\n    if (typeof value === \"function\") {\n      value = new HTMLBindingDirective(value);\n    }\n    if (value instanceof TargetedHTMLDirective) {\n      const match = lastAttributeNameRegex.exec(currentString);\n      if (match !== null) {\n        value.targetName = match[2];\n      }\n    }\n    if (value instanceof HTMLDirective) {\n      // Since not all values are directives, we can't use i\n      // as the index for the placeholder. Instead, we need to\n      // use directives.length to get the next index.\n      html += value.createPlaceholder(directives.length);\n      directives.push(value);\n    } else {\n      html += value;\n    }\n  }\n  html += strings[strings.length - 1];\n  return new ViewTemplate(html, directives);\n}\n\n/**\n * Represents styles that can be applied to a custom element.\n * @public\n */\nclass ElementStyles {\n  constructor() {\n    this.targets = new WeakSet();\n  }\n  /** @internal */\n  addStylesTo(target) {\n    this.targets.add(target);\n  }\n  /** @internal */\n  removeStylesFrom(target) {\n    this.targets.delete(target);\n  }\n  /** @internal */\n  isAttachedTo(target) {\n    return this.targets.has(target);\n  }\n  /**\n   * Associates behaviors with this set of styles.\n   * @param behaviors - The behaviors to associate.\n   */\n  withBehaviors(...behaviors) {\n    this.behaviors = this.behaviors === null ? behaviors : this.behaviors.concat(behaviors);\n    return this;\n  }\n}\n/**\n * Create ElementStyles from ComposableStyles.\n */\nElementStyles.create = (() => {\n  if (DOM.supportsAdoptedStyleSheets) {\n    const styleSheetCache = new Map();\n    return styles =>\n    // eslint-disable-next-line @typescript-eslint/no-use-before-define\n    new AdoptedStyleSheetsStyles(styles, styleSheetCache);\n  }\n  // eslint-disable-next-line @typescript-eslint/no-use-before-define\n  return styles => new StyleElementStyles(styles);\n})();\nfunction reduceStyles(styles) {\n  return styles.map(x => x instanceof ElementStyles ? reduceStyles(x.styles) : [x]).reduce((prev, curr) => prev.concat(curr), []);\n}\nfunction reduceBehaviors(styles) {\n  return styles.map(x => x instanceof ElementStyles ? x.behaviors : null).reduce((prev, curr) => {\n    if (curr === null) {\n      return prev;\n    }\n    if (prev === null) {\n      prev = [];\n    }\n    return prev.concat(curr);\n  }, null);\n}\n/**\n * A Symbol that can be added to a CSSStyleSheet to cause it to be prepended (rather than appended) to adoptedStyleSheets.\n * @public\n */\nconst prependToAdoptedStyleSheetsSymbol = Symbol(\"prependToAdoptedStyleSheets\");\nfunction separateSheetsToPrepend(sheets) {\n  const prepend = [];\n  const append = [];\n  sheets.forEach(x => (x[prependToAdoptedStyleSheetsSymbol] ? prepend : append).push(x));\n  return {\n    prepend,\n    append\n  };\n}\nlet addAdoptedStyleSheets = (target, sheets) => {\n  const {\n    prepend,\n    append\n  } = separateSheetsToPrepend(sheets);\n  target.adoptedStyleSheets = [...prepend, ...target.adoptedStyleSheets, ...append];\n};\nlet removeAdoptedStyleSheets = (target, sheets) => {\n  target.adoptedStyleSheets = target.adoptedStyleSheets.filter(x => sheets.indexOf(x) === -1);\n};\nif (DOM.supportsAdoptedStyleSheets) {\n  try {\n    // Test if browser implementation uses FrozenArray.\n    // If not, use push / splice to alter the stylesheets\n    // in place. This circumvents a bug in Safari 16.4 where\n    // periodically, assigning the array would previously\n    // cause sheets to be removed.\n    document.adoptedStyleSheets.push();\n    document.adoptedStyleSheets.splice();\n    addAdoptedStyleSheets = (target, sheets) => {\n      const {\n        prepend,\n        append\n      } = separateSheetsToPrepend(sheets);\n      target.adoptedStyleSheets.splice(0, 0, ...prepend);\n      target.adoptedStyleSheets.push(...append);\n    };\n    removeAdoptedStyleSheets = (target, sheets) => {\n      for (const sheet of sheets) {\n        const index = target.adoptedStyleSheets.indexOf(sheet);\n        if (index !== -1) {\n          target.adoptedStyleSheets.splice(index, 1);\n        }\n      }\n    };\n  } catch (e) {\n    // Do nothing if an error is thrown, the default\n    // case handles FrozenArray.\n  }\n}\n/**\n * https://wicg.github.io/construct-stylesheets/\n * https://developers.google.com/web/updates/2019/02/constructable-stylesheets\n *\n * @internal\n */\nclass AdoptedStyleSheetsStyles extends ElementStyles {\n  constructor(styles, styleSheetCache) {\n    super();\n    this.styles = styles;\n    this.styleSheetCache = styleSheetCache;\n    this._styleSheets = void 0;\n    this.behaviors = reduceBehaviors(styles);\n  }\n  get styleSheets() {\n    if (this._styleSheets === void 0) {\n      const styles = this.styles;\n      const styleSheetCache = this.styleSheetCache;\n      this._styleSheets = reduceStyles(styles).map(x => {\n        if (x instanceof CSSStyleSheet) {\n          return x;\n        }\n        let sheet = styleSheetCache.get(x);\n        if (sheet === void 0) {\n          sheet = new CSSStyleSheet();\n          sheet.replaceSync(x);\n          styleSheetCache.set(x, sheet);\n        }\n        return sheet;\n      });\n    }\n    return this._styleSheets;\n  }\n  addStylesTo(target) {\n    addAdoptedStyleSheets(target, this.styleSheets);\n    super.addStylesTo(target);\n  }\n  removeStylesFrom(target) {\n    removeAdoptedStyleSheets(target, this.styleSheets);\n    super.removeStylesFrom(target);\n  }\n}\nlet styleClassId = 0;\nfunction getNextStyleClass() {\n  return `fast-style-class-${++styleClassId}`;\n}\n/**\n * @internal\n */\nclass StyleElementStyles extends ElementStyles {\n  constructor(styles) {\n    super();\n    this.styles = styles;\n    this.behaviors = null;\n    this.behaviors = reduceBehaviors(styles);\n    this.styleSheets = reduceStyles(styles);\n    this.styleClass = getNextStyleClass();\n  }\n  addStylesTo(target) {\n    const styleSheets = this.styleSheets;\n    const styleClass = this.styleClass;\n    target = this.normalizeTarget(target);\n    for (let i = 0; i < styleSheets.length; i++) {\n      const element = document.createElement(\"style\");\n      element.innerHTML = styleSheets[i];\n      element.className = styleClass;\n      target.append(element);\n    }\n    super.addStylesTo(target);\n  }\n  removeStylesFrom(target) {\n    target = this.normalizeTarget(target);\n    const styles = target.querySelectorAll(`.${this.styleClass}`);\n    for (let i = 0, ii = styles.length; i < ii; ++i) {\n      target.removeChild(styles[i]);\n    }\n    super.removeStylesFrom(target);\n  }\n  isAttachedTo(target) {\n    return super.isAttachedTo(this.normalizeTarget(target));\n  }\n  normalizeTarget(target) {\n    return target === document ? document.body : target;\n  }\n}\n\n/**\n * Metadata used to configure a custom attribute's behavior.\n * @public\n */\nconst AttributeConfiguration = Object.freeze({\n  /**\n   * Locates all attribute configurations associated with a type.\n   */\n  locate: createMetadataLocator()\n});\n/**\n * A {@link ValueConverter} that converts to and from `boolean` values.\n * @remarks\n * Used automatically when the `boolean` {@link AttributeMode} is selected.\n * @public\n */\nconst booleanConverter = {\n  toView(value) {\n    return value ? \"true\" : \"false\";\n  },\n  fromView(value) {\n    if (value === null || value === void 0 || value === \"false\" || value === false || value === 0) {\n      return false;\n    }\n    return true;\n  }\n};\n/**\n * A {@link ValueConverter} that converts to and from `number` values.\n * @remarks\n * This converter allows for nullable numbers, returning `null` if the\n * input was `null`, `undefined`, or `NaN`.\n * @public\n */\nconst nullableNumberConverter = {\n  toView(value) {\n    if (value === null || value === undefined) {\n      return null;\n    }\n    const number = value * 1;\n    return isNaN(number) ? null : number.toString();\n  },\n  fromView(value) {\n    if (value === null || value === undefined) {\n      return null;\n    }\n    const number = value * 1;\n    return isNaN(number) ? null : number;\n  }\n};\n/**\n * An implementation of {@link Accessor} that supports reactivity,\n * change callbacks, attribute reflection, and type conversion for\n * custom elements.\n * @public\n */\nclass AttributeDefinition {\n  /**\n   * Creates an instance of AttributeDefinition.\n   * @param Owner - The class constructor that owns this attribute.\n   * @param name - The name of the property associated with the attribute.\n   * @param attribute - The name of the attribute in HTML.\n   * @param mode - The {@link AttributeMode} that describes the behavior of this attribute.\n   * @param converter - A {@link ValueConverter} that integrates with the property getter/setter\n   * to convert values to and from a DOM string.\n   */\n  constructor(Owner, name, attribute = name.toLowerCase(), mode = \"reflect\", converter) {\n    this.guards = new Set();\n    this.Owner = Owner;\n    this.name = name;\n    this.attribute = attribute;\n    this.mode = mode;\n    this.converter = converter;\n    this.fieldName = `_${name}`;\n    this.callbackName = `${name}Changed`;\n    this.hasCallback = this.callbackName in Owner.prototype;\n    if (mode === \"boolean\" && converter === void 0) {\n      this.converter = booleanConverter;\n    }\n  }\n  /**\n   * Sets the value of the attribute/property on the source element.\n   * @param source - The source element to access.\n   * @param value - The value to set the attribute/property to.\n   */\n  setValue(source, newValue) {\n    const oldValue = source[this.fieldName];\n    const converter = this.converter;\n    if (converter !== void 0) {\n      newValue = converter.fromView(newValue);\n    }\n    if (oldValue !== newValue) {\n      source[this.fieldName] = newValue;\n      this.tryReflectToAttribute(source);\n      if (this.hasCallback) {\n        source[this.callbackName](oldValue, newValue);\n      }\n      source.$fastController.notify(this.name);\n    }\n  }\n  /**\n   * Gets the value of the attribute/property on the source element.\n   * @param source - The source element to access.\n   */\n  getValue(source) {\n    Observable.track(source, this.name);\n    return source[this.fieldName];\n  }\n  /** @internal */\n  onAttributeChangedCallback(element, value) {\n    if (this.guards.has(element)) {\n      return;\n    }\n    this.guards.add(element);\n    this.setValue(element, value);\n    this.guards.delete(element);\n  }\n  tryReflectToAttribute(element) {\n    const mode = this.mode;\n    const guards = this.guards;\n    if (guards.has(element) || mode === \"fromView\") {\n      return;\n    }\n    DOM.queueUpdate(() => {\n      guards.add(element);\n      const latestValue = element[this.fieldName];\n      switch (mode) {\n        case \"reflect\":\n          const converter = this.converter;\n          DOM.setAttribute(element, this.attribute, converter !== void 0 ? converter.toView(latestValue) : latestValue);\n          break;\n        case \"boolean\":\n          DOM.setBooleanAttribute(element, this.attribute, latestValue);\n          break;\n      }\n      guards.delete(element);\n    });\n  }\n  /**\n   * Collects all attribute definitions associated with the owner.\n   * @param Owner - The class constructor to collect attribute for.\n   * @param attributeLists - Any existing attributes to collect and merge with those associated with the owner.\n   * @internal\n   */\n  static collect(Owner, ...attributeLists) {\n    const attributes = [];\n    attributeLists.push(AttributeConfiguration.locate(Owner));\n    for (let i = 0, ii = attributeLists.length; i < ii; ++i) {\n      const list = attributeLists[i];\n      if (list === void 0) {\n        continue;\n      }\n      for (let j = 0, jj = list.length; j < jj; ++j) {\n        const config = list[j];\n        if (typeof config === \"string\") {\n          attributes.push(new AttributeDefinition(Owner, config));\n        } else {\n          attributes.push(new AttributeDefinition(Owner, config.property, config.attribute, config.mode, config.converter));\n        }\n      }\n    }\n    return attributes;\n  }\n}\nfunction attr(configOrTarget, prop) {\n  let config;\n  function decorator($target, $prop) {\n    if (arguments.length > 1) {\n      // Non invocation:\n      // - @attr\n      // Invocation with or w/o opts:\n      // - @attr()\n      // - @attr({...opts})\n      config.property = $prop;\n    }\n    AttributeConfiguration.locate($target.constructor).push(config);\n  }\n  if (arguments.length > 1) {\n    // Non invocation:\n    // - @attr\n    config = {};\n    decorator(configOrTarget, prop);\n    return;\n  }\n  // Invocation with or w/o opts:\n  // - @attr()\n  // - @attr({...opts})\n  config = configOrTarget === void 0 ? {} : configOrTarget;\n  return decorator;\n}\n\nconst defaultShadowOptions = {\n  mode: \"open\"\n};\nconst defaultElementOptions = {};\nconst fastRegistry = FAST.getById(4 /* elementRegistry */, () => {\n  const typeToDefinition = new Map();\n  return Object.freeze({\n    register(definition) {\n      if (typeToDefinition.has(definition.type)) {\n        return false;\n      }\n      typeToDefinition.set(definition.type, definition);\n      return true;\n    },\n    getByType(key) {\n      return typeToDefinition.get(key);\n    }\n  });\n});\n/**\n * Defines metadata for a FASTElement.\n * @public\n */\nclass FASTElementDefinition {\n  /**\n   * Creates an instance of FASTElementDefinition.\n   * @param type - The type this definition is being created for.\n   * @param nameOrConfig - The name of the element to define or a config object\n   * that describes the element to define.\n   */\n  constructor(type, nameOrConfig = type.definition) {\n    if (typeof nameOrConfig === \"string\") {\n      nameOrConfig = {\n        name: nameOrConfig\n      };\n    }\n    this.type = type;\n    this.name = nameOrConfig.name;\n    this.template = nameOrConfig.template;\n    const attributes = AttributeDefinition.collect(type, nameOrConfig.attributes);\n    const observedAttributes = new Array(attributes.length);\n    const propertyLookup = {};\n    const attributeLookup = {};\n    for (let i = 0, ii = attributes.length; i < ii; ++i) {\n      const current = attributes[i];\n      observedAttributes[i] = current.attribute;\n      propertyLookup[current.name] = current;\n      attributeLookup[current.attribute] = current;\n    }\n    this.attributes = attributes;\n    this.observedAttributes = observedAttributes;\n    this.propertyLookup = propertyLookup;\n    this.attributeLookup = attributeLookup;\n    this.shadowOptions = nameOrConfig.shadowOptions === void 0 ? defaultShadowOptions : nameOrConfig.shadowOptions === null ? void 0 : Object.assign(Object.assign({}, defaultShadowOptions), nameOrConfig.shadowOptions);\n    this.elementOptions = nameOrConfig.elementOptions === void 0 ? defaultElementOptions : Object.assign(Object.assign({}, defaultElementOptions), nameOrConfig.elementOptions);\n    this.styles = nameOrConfig.styles === void 0 ? void 0 : Array.isArray(nameOrConfig.styles) ? ElementStyles.create(nameOrConfig.styles) : nameOrConfig.styles instanceof ElementStyles ? nameOrConfig.styles : ElementStyles.create([nameOrConfig.styles]);\n  }\n  /**\n   * Indicates if this element has been defined in at least one registry.\n   */\n  get isDefined() {\n    return !!fastRegistry.getByType(this.type);\n  }\n  /**\n   * Defines a custom element based on this definition.\n   * @param registry - The element registry to define the element in.\n   */\n  define(registry = customElements) {\n    const type = this.type;\n    if (fastRegistry.register(this)) {\n      const attributes = this.attributes;\n      const proto = type.prototype;\n      for (let i = 0, ii = attributes.length; i < ii; ++i) {\n        Observable.defineProperty(proto, attributes[i]);\n      }\n      Reflect.defineProperty(type, \"observedAttributes\", {\n        value: this.observedAttributes,\n        enumerable: true\n      });\n    }\n    if (!registry.get(this.name)) {\n      registry.define(this.name, type, this.elementOptions);\n    }\n    return this;\n  }\n}\n/**\n * Gets the element definition associated with the specified type.\n * @param type - The custom element type to retrieve the definition for.\n */\nFASTElementDefinition.forType = fastRegistry.getByType;\n\nconst shadowRoots = new WeakMap();\nconst defaultEventOptions = {\n  bubbles: true,\n  composed: true,\n  cancelable: true\n};\nfunction getShadowRoot(element) {\n  return element.shadowRoot || shadowRoots.get(element) || null;\n}\n/**\n * Controls the lifecycle and rendering of a `FASTElement`.\n * @public\n */\nclass Controller extends PropertyChangeNotifier {\n  /**\n   * Creates a Controller to control the specified element.\n   * @param element - The element to be controlled by this controller.\n   * @param definition - The element definition metadata that instructs this\n   * controller in how to handle rendering and other platform integrations.\n   * @internal\n   */\n  constructor(element, definition) {\n    super(element);\n    this.boundObservables = null;\n    this.behaviors = null;\n    this.needsInitialization = true;\n    this._template = null;\n    this._styles = null;\n    this._isConnected = false;\n    /**\n     * This allows Observable.getNotifier(...) to return the Controller\n     * when the notifier for the Controller itself is being requested. The\n     * result is that the Observable system does not need to create a separate\n     * instance of Notifier for observables on the Controller. The component and\n     * the controller will now share the same notifier, removing one-object construct\n     * per web component instance.\n     */\n    this.$fastController = this;\n    /**\n     * The view associated with the custom element.\n     * @remarks\n     * If `null` then the element is managing its own rendering.\n     */\n    this.view = null;\n    this.element = element;\n    this.definition = definition;\n    const shadowOptions = definition.shadowOptions;\n    if (shadowOptions !== void 0) {\n      const shadowRoot = element.attachShadow(shadowOptions);\n      if (shadowOptions.mode === \"closed\") {\n        shadowRoots.set(element, shadowRoot);\n      }\n    }\n    // Capture any observable values that were set by the binding engine before\n    // the browser upgraded the element. Then delete the property since it will\n    // shadow the getter/setter that is required to make the observable operate.\n    // Later, in the connect callback, we'll re-apply the values.\n    const accessors = Observable.getAccessors(element);\n    if (accessors.length > 0) {\n      const boundObservables = this.boundObservables = Object.create(null);\n      for (let i = 0, ii = accessors.length; i < ii; ++i) {\n        const propertyName = accessors[i].name;\n        const value = element[propertyName];\n        if (value !== void 0) {\n          delete element[propertyName];\n          boundObservables[propertyName] = value;\n        }\n      }\n    }\n  }\n  /**\n   * Indicates whether or not the custom element has been\n   * connected to the document.\n   */\n  get isConnected() {\n    Observable.track(this, \"isConnected\");\n    return this._isConnected;\n  }\n  setIsConnected(value) {\n    this._isConnected = value;\n    Observable.notify(this, \"isConnected\");\n  }\n  /**\n   * Gets/sets the template used to render the component.\n   * @remarks\n   * This value can only be accurately read after connect but can be set at any time.\n   */\n  get template() {\n    return this._template;\n  }\n  set template(value) {\n    if (this._template === value) {\n      return;\n    }\n    this._template = value;\n    if (!this.needsInitialization) {\n      this.renderTemplate(value);\n    }\n  }\n  /**\n   * Gets/sets the primary styles used for the component.\n   * @remarks\n   * This value can only be accurately read after connect but can be set at any time.\n   */\n  get styles() {\n    return this._styles;\n  }\n  set styles(value) {\n    if (this._styles === value) {\n      return;\n    }\n    if (this._styles !== null) {\n      this.removeStyles(this._styles);\n    }\n    this._styles = value;\n    if (!this.needsInitialization && value !== null) {\n      this.addStyles(value);\n    }\n  }\n  /**\n   * Adds styles to this element. Providing an HTMLStyleElement will attach the element instance to the shadowRoot.\n   * @param styles - The styles to add.\n   */\n  addStyles(styles) {\n    const target = getShadowRoot(this.element) || this.element.getRootNode();\n    if (styles instanceof HTMLStyleElement) {\n      target.append(styles);\n    } else if (!styles.isAttachedTo(target)) {\n      const sourceBehaviors = styles.behaviors;\n      styles.addStylesTo(target);\n      if (sourceBehaviors !== null) {\n        this.addBehaviors(sourceBehaviors);\n      }\n    }\n  }\n  /**\n   * Removes styles from this element. Providing an HTMLStyleElement will detach the element instance from the shadowRoot.\n   * @param styles - the styles to remove.\n   */\n  removeStyles(styles) {\n    const target = getShadowRoot(this.element) || this.element.getRootNode();\n    if (styles instanceof HTMLStyleElement) {\n      target.removeChild(styles);\n    } else if (styles.isAttachedTo(target)) {\n      const sourceBehaviors = styles.behaviors;\n      styles.removeStylesFrom(target);\n      if (sourceBehaviors !== null) {\n        this.removeBehaviors(sourceBehaviors);\n      }\n    }\n  }\n  /**\n   * Adds behaviors to this element.\n   * @param behaviors - The behaviors to add.\n   */\n  addBehaviors(behaviors) {\n    const targetBehaviors = this.behaviors || (this.behaviors = new Map());\n    const length = behaviors.length;\n    const behaviorsToBind = [];\n    for (let i = 0; i < length; ++i) {\n      const behavior = behaviors[i];\n      if (targetBehaviors.has(behavior)) {\n        targetBehaviors.set(behavior, targetBehaviors.get(behavior) + 1);\n      } else {\n        targetBehaviors.set(behavior, 1);\n        behaviorsToBind.push(behavior);\n      }\n    }\n    if (this._isConnected) {\n      const element = this.element;\n      for (let i = 0; i < behaviorsToBind.length; ++i) {\n        behaviorsToBind[i].bind(element, defaultExecutionContext);\n      }\n    }\n  }\n  /**\n   * Removes behaviors from this element.\n   * @param behaviors - The behaviors to remove.\n   * @param force - Forces unbinding of behaviors.\n   */\n  removeBehaviors(behaviors, force = false) {\n    const targetBehaviors = this.behaviors;\n    if (targetBehaviors === null) {\n      return;\n    }\n    const length = behaviors.length;\n    const behaviorsToUnbind = [];\n    for (let i = 0; i < length; ++i) {\n      const behavior = behaviors[i];\n      if (targetBehaviors.has(behavior)) {\n        const count = targetBehaviors.get(behavior) - 1;\n        count === 0 || force ? targetBehaviors.delete(behavior) && behaviorsToUnbind.push(behavior) : targetBehaviors.set(behavior, count);\n      }\n    }\n    if (this._isConnected) {\n      const element = this.element;\n      for (let i = 0; i < behaviorsToUnbind.length; ++i) {\n        behaviorsToUnbind[i].unbind(element);\n      }\n    }\n  }\n  /**\n   * Runs connected lifecycle behavior on the associated element.\n   */\n  onConnectedCallback() {\n    if (this._isConnected) {\n      return;\n    }\n    const element = this.element;\n    if (this.needsInitialization) {\n      this.finishInitialization();\n    } else if (this.view !== null) {\n      this.view.bind(element, defaultExecutionContext);\n    }\n    const behaviors = this.behaviors;\n    if (behaviors !== null) {\n      for (const [behavior] of behaviors) {\n        behavior.bind(element, defaultExecutionContext);\n      }\n    }\n    this.setIsConnected(true);\n  }\n  /**\n   * Runs disconnected lifecycle behavior on the associated element.\n   */\n  onDisconnectedCallback() {\n    if (!this._isConnected) {\n      return;\n    }\n    this.setIsConnected(false);\n    const view = this.view;\n    if (view !== null) {\n      view.unbind();\n    }\n    const behaviors = this.behaviors;\n    if (behaviors !== null) {\n      const element = this.element;\n      for (const [behavior] of behaviors) {\n        behavior.unbind(element);\n      }\n    }\n  }\n  /**\n   * Runs the attribute changed callback for the associated element.\n   * @param name - The name of the attribute that changed.\n   * @param oldValue - The previous value of the attribute.\n   * @param newValue - The new value of the attribute.\n   */\n  onAttributeChangedCallback(name, oldValue, newValue) {\n    const attrDef = this.definition.attributeLookup[name];\n    if (attrDef !== void 0) {\n      attrDef.onAttributeChangedCallback(this.element, newValue);\n    }\n  }\n  /**\n   * Emits a custom HTML event.\n   * @param type - The type name of the event.\n   * @param detail - The event detail object to send with the event.\n   * @param options - The event options. By default bubbles and composed.\n   * @remarks\n   * Only emits events if connected.\n   */\n  emit(type, detail, options) {\n    if (this._isConnected) {\n      return this.element.dispatchEvent(new CustomEvent(type, Object.assign(Object.assign({\n        detail\n      }, defaultEventOptions), options)));\n    }\n    return false;\n  }\n  finishInitialization() {\n    const element = this.element;\n    const boundObservables = this.boundObservables;\n    // If we have any observables that were bound, re-apply their values.\n    if (boundObservables !== null) {\n      const propertyNames = Object.keys(boundObservables);\n      for (let i = 0, ii = propertyNames.length; i < ii; ++i) {\n        const propertyName = propertyNames[i];\n        element[propertyName] = boundObservables[propertyName];\n      }\n      this.boundObservables = null;\n    }\n    const definition = this.definition;\n    // 1. Template overrides take top precedence.\n    if (this._template === null) {\n      if (this.element.resolveTemplate) {\n        // 2. Allow for element instance overrides next.\n        this._template = this.element.resolveTemplate();\n      } else if (definition.template) {\n        // 3. Default to the static definition.\n        this._template = definition.template || null;\n      }\n    }\n    // If we have a template after the above process, render it.\n    // If there's no template, then the element author has opted into\n    // custom rendering and they will managed the shadow root's content themselves.\n    if (this._template !== null) {\n      this.renderTemplate(this._template);\n    }\n    // 1. Styles overrides take top precedence.\n    if (this._styles === null) {\n      if (this.element.resolveStyles) {\n        // 2. Allow for element instance overrides next.\n        this._styles = this.element.resolveStyles();\n      } else if (definition.styles) {\n        // 3. Default to the static definition.\n        this._styles = definition.styles || null;\n      }\n    }\n    // If we have styles after the above process, add them.\n    if (this._styles !== null) {\n      this.addStyles(this._styles);\n    }\n    this.needsInitialization = false;\n  }\n  renderTemplate(template) {\n    const element = this.element;\n    // When getting the host to render to, we start by looking\n    // up the shadow root. If there isn't one, then that means\n    // we're doing a Light DOM render to the element's direct children.\n    const host = getShadowRoot(element) || element;\n    if (this.view !== null) {\n      // If there's already a view, we need to unbind and remove through dispose.\n      this.view.dispose();\n      this.view = null;\n    } else if (!this.needsInitialization) {\n      // If there was previous custom rendering, we need to clear out the host.\n      DOM.removeChildNodes(host);\n    }\n    if (template) {\n      // If a new template was provided, render it.\n      this.view = template.render(element, host, element);\n    }\n  }\n  /**\n   * Locates or creates a controller for the specified element.\n   * @param element - The element to return the controller for.\n   * @remarks\n   * The specified element must have a {@link FASTElementDefinition}\n   * registered either through the use of the {@link customElement}\n   * decorator or a call to `FASTElement.define`.\n   */\n  static forCustomElement(element) {\n    const controller = element.$fastController;\n    if (controller !== void 0) {\n      return controller;\n    }\n    const definition = FASTElementDefinition.forType(element.constructor);\n    if (definition === void 0) {\n      throw new Error(\"Missing FASTElement definition.\");\n    }\n    return element.$fastController = new Controller(element, definition);\n  }\n}\n\n/* eslint-disable-next-line @typescript-eslint/explicit-function-return-type */\nfunction createFASTElement(BaseType) {\n  return class extends BaseType {\n    constructor() {\n      /* eslint-disable-next-line */\n      super();\n      Controller.forCustomElement(this);\n    }\n    $emit(type, detail, options) {\n      return this.$fastController.emit(type, detail, options);\n    }\n    connectedCallback() {\n      this.$fastController.onConnectedCallback();\n    }\n    disconnectedCallback() {\n      this.$fastController.onDisconnectedCallback();\n    }\n    attributeChangedCallback(name, oldValue, newValue) {\n      this.$fastController.onAttributeChangedCallback(name, oldValue, newValue);\n    }\n  };\n}\n/**\n * A minimal base class for FASTElements that also provides\n * static helpers for working with FASTElements.\n * @public\n */\nconst FASTElement = Object.assign(createFASTElement(HTMLElement), {\n  /**\n   * Creates a new FASTElement base class inherited from the\n   * provided base type.\n   * @param BaseType - The base element type to inherit from.\n   */\n  from(BaseType) {\n    return createFASTElement(BaseType);\n  },\n  /**\n   * Defines a platform custom element based on the provided type and definition.\n   * @param type - The custom element type to define.\n   * @param nameOrDef - The name of the element to define or a definition object\n   * that describes the element to define.\n   */\n  define(type, nameOrDef) {\n    return new FASTElementDefinition(type, nameOrDef).define().type;\n  }\n});\n\n/**\n * Directive for use in {@link css}.\n *\n * @public\n */\nclass CSSDirective {\n  /**\n   * Creates a CSS fragment to interpolate into the CSS document.\n   * @returns - the string to interpolate into CSS\n   */\n  createCSS() {\n    return \"\";\n  }\n  /**\n   * Creates a behavior to bind to the host element.\n   * @returns - the behavior to bind to the host element, or undefined.\n   */\n  createBehavior() {\n    return undefined;\n  }\n}\n\nfunction collectStyles(strings, values) {\n  const styles = [];\n  let cssString = \"\";\n  const behaviors = [];\n  for (let i = 0, ii = strings.length - 1; i < ii; ++i) {\n    cssString += strings[i];\n    let value = values[i];\n    if (value instanceof CSSDirective) {\n      const behavior = value.createBehavior();\n      value = value.createCSS();\n      if (behavior) {\n        behaviors.push(behavior);\n      }\n    }\n    if (value instanceof ElementStyles || value instanceof CSSStyleSheet) {\n      if (cssString.trim() !== \"\") {\n        styles.push(cssString);\n        cssString = \"\";\n      }\n      styles.push(value);\n    } else {\n      cssString += value;\n    }\n  }\n  cssString += strings[strings.length - 1];\n  if (cssString.trim() !== \"\") {\n    styles.push(cssString);\n  }\n  return {\n    styles,\n    behaviors\n  };\n}\n/**\n * Transforms a template literal string into styles.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @remarks\n * The css helper supports interpolation of strings and ElementStyle instances.\n * @public\n */\nfunction css(strings, ...values) {\n  const {\n    styles,\n    behaviors\n  } = collectStyles(strings, values);\n  const elementStyles = ElementStyles.create(styles);\n  if (behaviors.length) {\n    elementStyles.withBehaviors(...behaviors);\n  }\n  return elementStyles;\n}\nclass CSSPartial extends CSSDirective {\n  constructor(styles, behaviors) {\n    super();\n    this.behaviors = behaviors;\n    this.css = \"\";\n    const stylesheets = styles.reduce((accumulated, current) => {\n      if (typeof current === \"string\") {\n        this.css += current;\n      } else {\n        accumulated.push(current);\n      }\n      return accumulated;\n    }, []);\n    if (stylesheets.length) {\n      this.styles = ElementStyles.create(stylesheets);\n    }\n  }\n  createBehavior() {\n    return this;\n  }\n  createCSS() {\n    return this.css;\n  }\n  bind(el) {\n    if (this.styles) {\n      el.$fastController.addStyles(this.styles);\n    }\n    if (this.behaviors.length) {\n      el.$fastController.addBehaviors(this.behaviors);\n    }\n  }\n  unbind(el) {\n    if (this.styles) {\n      el.$fastController.removeStyles(this.styles);\n    }\n    if (this.behaviors.length) {\n      el.$fastController.removeBehaviors(this.behaviors);\n    }\n  }\n}\n/**\n * Transforms a template literal string into partial CSS.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @public\n */\nfunction cssPartial(strings, ...values) {\n  const {\n    styles,\n    behaviors\n  } = collectStyles(strings, values);\n  return new CSSPartial(styles, behaviors);\n}\n\n/** @internal */\nfunction newSplice(index, removed, addedCount) {\n  return {\n    index: index,\n    removed: removed,\n    addedCount: addedCount\n  };\n}\nconst EDIT_LEAVE = 0;\nconst EDIT_UPDATE = 1;\nconst EDIT_ADD = 2;\nconst EDIT_DELETE = 3;\n// Note: This function is *based* on the computation of the Levenshtein\n// \"edit\" distance. The one change is that \"updates\" are treated as two\n// edits - not one. With Array splices, an update is really a delete\n// followed by an add. By retaining this, we optimize for \"keeping\" the\n// maximum array items in the original array. For example:\n//\n//   'xxxx123' -> '123yyyy'\n//\n// With 1-edit updates, the shortest path would be just to update all seven\n// characters. With 2-edit updates, we delete 4, leave 3, and add 4. This\n// leaves the substring '123' intact.\nfunction calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd) {\n  // \"Deletion\" columns\n  const rowCount = oldEnd - oldStart + 1;\n  const columnCount = currentEnd - currentStart + 1;\n  const distances = new Array(rowCount);\n  let north;\n  let west;\n  // \"Addition\" rows. Initialize null column.\n  for (let i = 0; i < rowCount; ++i) {\n    distances[i] = new Array(columnCount);\n    distances[i][0] = i;\n  }\n  // Initialize null row\n  for (let j = 0; j < columnCount; ++j) {\n    distances[0][j] = j;\n  }\n  for (let i = 1; i < rowCount; ++i) {\n    for (let j = 1; j < columnCount; ++j) {\n      if (current[currentStart + j - 1] === old[oldStart + i - 1]) {\n        distances[i][j] = distances[i - 1][j - 1];\n      } else {\n        north = distances[i - 1][j] + 1;\n        west = distances[i][j - 1] + 1;\n        distances[i][j] = north < west ? north : west;\n      }\n    }\n  }\n  return distances;\n}\n// This starts at the final weight, and walks \"backward\" by finding\n// the minimum previous weight recursively until the origin of the weight\n// matrix.\nfunction spliceOperationsFromEditDistances(distances) {\n  let i = distances.length - 1;\n  let j = distances[0].length - 1;\n  let current = distances[i][j];\n  const edits = [];\n  while (i > 0 || j > 0) {\n    if (i === 0) {\n      edits.push(EDIT_ADD);\n      j--;\n      continue;\n    }\n    if (j === 0) {\n      edits.push(EDIT_DELETE);\n      i--;\n      continue;\n    }\n    const northWest = distances[i - 1][j - 1];\n    const west = distances[i - 1][j];\n    const north = distances[i][j - 1];\n    let min;\n    if (west < north) {\n      min = west < northWest ? west : northWest;\n    } else {\n      min = north < northWest ? north : northWest;\n    }\n    if (min === northWest) {\n      if (northWest === current) {\n        edits.push(EDIT_LEAVE);\n      } else {\n        edits.push(EDIT_UPDATE);\n        current = northWest;\n      }\n      i--;\n      j--;\n    } else if (min === west) {\n      edits.push(EDIT_DELETE);\n      i--;\n      current = west;\n    } else {\n      edits.push(EDIT_ADD);\n      j--;\n      current = north;\n    }\n  }\n  edits.reverse();\n  return edits;\n}\nfunction sharedPrefix(current, old, searchLength) {\n  for (let i = 0; i < searchLength; ++i) {\n    if (current[i] !== old[i]) {\n      return i;\n    }\n  }\n  return searchLength;\n}\nfunction sharedSuffix(current, old, searchLength) {\n  let index1 = current.length;\n  let index2 = old.length;\n  let count = 0;\n  while (count < searchLength && current[--index1] === old[--index2]) {\n    count++;\n  }\n  return count;\n}\nfunction intersect(start1, end1, start2, end2) {\n  // Disjoint\n  if (end1 < start2 || end2 < start1) {\n    return -1;\n  }\n  // Adjacent\n  if (end1 === start2 || end2 === start1) {\n    return 0;\n  }\n  // Non-zero intersect, span1 first\n  if (start1 < start2) {\n    if (end1 < end2) {\n      return end1 - start2; // Overlap\n    }\n    return end2 - start2; // Contained\n  }\n  // Non-zero intersect, span2 first\n  if (end2 < end1) {\n    return end2 - start1; // Overlap\n  }\n  return end1 - start1; // Contained\n}\n/**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was transformed into a new array of items. Conceptually it is a list of\n * tuples of\n *\n *   <index, removed, addedCount>\n *\n * which are kept in ascending index order of. The tuple represents that at\n * the |index|, |removed| sequence of items were removed, and counting forward\n * from |index|, |addedCount| items were added.\n */\n/**\n * @internal\n * @remarks\n * Lacking individual splice mutation information, the minimal set of\n * splices can be synthesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortest path through it.\n *\n * Complexity: O(l * p)\n *   l: The length of the current array\n *   p: The length of the old array\n */\nfunction calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd) {\n  let prefixCount = 0;\n  let suffixCount = 0;\n  const minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n  if (currentStart === 0 && oldStart === 0) {\n    prefixCount = sharedPrefix(current, old, minLength);\n  }\n  if (currentEnd === current.length && oldEnd === old.length) {\n    suffixCount = sharedSuffix(current, old, minLength - prefixCount);\n  }\n  currentStart += prefixCount;\n  oldStart += prefixCount;\n  currentEnd -= suffixCount;\n  oldEnd -= suffixCount;\n  if (currentEnd - currentStart === 0 && oldEnd - oldStart === 0) {\n    return emptyArray;\n  }\n  if (currentStart === currentEnd) {\n    const splice = newSplice(currentStart, [], 0);\n    while (oldStart < oldEnd) {\n      splice.removed.push(old[oldStart++]);\n    }\n    return [splice];\n  } else if (oldStart === oldEnd) {\n    return [newSplice(currentStart, [], currentEnd - currentStart)];\n  }\n  const ops = spliceOperationsFromEditDistances(calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));\n  const splices = [];\n  let splice = void 0;\n  let index = currentStart;\n  let oldIndex = oldStart;\n  for (let i = 0; i < ops.length; ++i) {\n    switch (ops[i]) {\n      case EDIT_LEAVE:\n        if (splice !== void 0) {\n          splices.push(splice);\n          splice = void 0;\n        }\n        index++;\n        oldIndex++;\n        break;\n      case EDIT_UPDATE:\n        if (splice === void 0) {\n          splice = newSplice(index, [], 0);\n        }\n        splice.addedCount++;\n        index++;\n        splice.removed.push(old[oldIndex]);\n        oldIndex++;\n        break;\n      case EDIT_ADD:\n        if (splice === void 0) {\n          splice = newSplice(index, [], 0);\n        }\n        splice.addedCount++;\n        index++;\n        break;\n      case EDIT_DELETE:\n        if (splice === void 0) {\n          splice = newSplice(index, [], 0);\n        }\n        splice.removed.push(old[oldIndex]);\n        oldIndex++;\n        break;\n      // no default\n    }\n  }\n  if (splice !== void 0) {\n    splices.push(splice);\n  }\n  return splices;\n}\nconst $push = Array.prototype.push;\nfunction mergeSplice(splices, index, removed, addedCount) {\n  const splice = newSplice(index, removed, addedCount);\n  let inserted = false;\n  let insertionOffset = 0;\n  for (let i = 0; i < splices.length; i++) {\n    const current = splices[i];\n    current.index += insertionOffset;\n    if (inserted) {\n      continue;\n    }\n    const intersectCount = intersect(splice.index, splice.index + splice.removed.length, current.index, current.index + current.addedCount);\n    if (intersectCount >= 0) {\n      // Merge the two splices\n      splices.splice(i, 1);\n      i--;\n      insertionOffset -= current.addedCount - current.removed.length;\n      splice.addedCount += current.addedCount - intersectCount;\n      const deleteCount = splice.removed.length + current.removed.length - intersectCount;\n      if (!splice.addedCount && !deleteCount) {\n        // merged splice is a noop. discard.\n        inserted = true;\n      } else {\n        let currentRemoved = current.removed;\n        if (splice.index < current.index) {\n          // some prefix of splice.removed is prepended to current.removed.\n          const prepend = splice.removed.slice(0, current.index - splice.index);\n          $push.apply(prepend, currentRemoved);\n          currentRemoved = prepend;\n        }\n        if (splice.index + splice.removed.length > current.index + current.addedCount) {\n          // some suffix of splice.removed is appended to current.removed.\n          const append = splice.removed.slice(current.index + current.addedCount - splice.index);\n          $push.apply(currentRemoved, append);\n        }\n        splice.removed = currentRemoved;\n        if (current.index < splice.index) {\n          splice.index = current.index;\n        }\n      }\n    } else if (splice.index < current.index) {\n      // Insert splice here.\n      inserted = true;\n      splices.splice(i, 0, splice);\n      i++;\n      const offset = splice.addedCount - splice.removed.length;\n      current.index += offset;\n      insertionOffset += offset;\n    }\n  }\n  if (!inserted) {\n    splices.push(splice);\n  }\n}\nfunction createInitialSplices(changeRecords) {\n  const splices = [];\n  for (let i = 0, ii = changeRecords.length; i < ii; i++) {\n    const record = changeRecords[i];\n    mergeSplice(splices, record.index, record.removed, record.addedCount);\n  }\n  return splices;\n}\n/** @internal */\nfunction projectArraySplices(array, changeRecords) {\n  let splices = [];\n  const initialSplices = createInitialSplices(changeRecords);\n  for (let i = 0, ii = initialSplices.length; i < ii; ++i) {\n    const splice = initialSplices[i];\n    if (splice.addedCount === 1 && splice.removed.length === 1) {\n      if (splice.removed[0] !== array[splice.index]) {\n        splices.push(splice);\n      }\n      continue;\n    }\n    splices = splices.concat(calcSplices(array, splice.index, splice.index + splice.addedCount, splice.removed, 0, splice.removed.length));\n  }\n  return splices;\n}\n\nlet arrayObservationEnabled = false;\nfunction adjustIndex(changeRecord, array) {\n  let index = changeRecord.index;\n  const arrayLength = array.length;\n  if (index > arrayLength) {\n    index = arrayLength - changeRecord.addedCount;\n  } else if (index < 0) {\n    index = arrayLength + changeRecord.removed.length + index - changeRecord.addedCount;\n  }\n  if (index < 0) {\n    index = 0;\n  }\n  changeRecord.index = index;\n  return changeRecord;\n}\nclass ArrayObserver extends SubscriberSet {\n  constructor(source) {\n    super(source);\n    this.oldCollection = void 0;\n    this.splices = void 0;\n    this.needsQueue = true;\n    this.call = this.flush;\n    Reflect.defineProperty(source, \"$fastController\", {\n      value: this,\n      enumerable: false\n    });\n  }\n  subscribe(subscriber) {\n    this.flush();\n    super.subscribe(subscriber);\n  }\n  addSplice(splice) {\n    if (this.splices === void 0) {\n      this.splices = [splice];\n    } else {\n      this.splices.push(splice);\n    }\n    if (this.needsQueue) {\n      this.needsQueue = false;\n      DOM.queueUpdate(this);\n    }\n  }\n  reset(oldCollection) {\n    this.oldCollection = oldCollection;\n    if (this.needsQueue) {\n      this.needsQueue = false;\n      DOM.queueUpdate(this);\n    }\n  }\n  flush() {\n    const splices = this.splices;\n    const oldCollection = this.oldCollection;\n    if (splices === void 0 && oldCollection === void 0) {\n      return;\n    }\n    this.needsQueue = true;\n    this.splices = void 0;\n    this.oldCollection = void 0;\n    const finalSplices = oldCollection === void 0 ? projectArraySplices(this.source, splices) : calcSplices(this.source, 0, this.source.length, oldCollection, 0, oldCollection.length);\n    this.notify(finalSplices);\n  }\n}\n/* eslint-disable prefer-rest-params */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/**\n * Enables the array observation mechanism.\n * @remarks\n * Array observation is enabled automatically when using the\n * {@link RepeatDirective}, so calling this API manually is\n * not typically necessary.\n * @public\n */\nfunction enableArrayObservation() {\n  if (arrayObservationEnabled) {\n    return;\n  }\n  arrayObservationEnabled = true;\n  Observable.setArrayObserverFactory(collection => {\n    return new ArrayObserver(collection);\n  });\n  const proto = Array.prototype;\n  // Don't patch Array if it has already been patched\n  // by another copy of fast-element.\n  if (proto.$fastPatch) {\n    return;\n  }\n  Reflect.defineProperty(proto, \"$fastPatch\", {\n    value: 1,\n    enumerable: false\n  });\n  const pop = proto.pop;\n  const push = proto.push;\n  const reverse = proto.reverse;\n  const shift = proto.shift;\n  const sort = proto.sort;\n  const splice = proto.splice;\n  const unshift = proto.unshift;\n  proto.pop = function () {\n    const notEmpty = this.length > 0;\n    const methodCallResult = pop.apply(this, arguments);\n    const o = this.$fastController;\n    if (o !== void 0 && notEmpty) {\n      o.addSplice(newSplice(this.length, [methodCallResult], 0));\n    }\n    return methodCallResult;\n  };\n  proto.push = function () {\n    const methodCallResult = push.apply(this, arguments);\n    const o = this.$fastController;\n    if (o !== void 0) {\n      o.addSplice(adjustIndex(newSplice(this.length - arguments.length, [], arguments.length), this));\n    }\n    return methodCallResult;\n  };\n  proto.reverse = function () {\n    let oldArray;\n    const o = this.$fastController;\n    if (o !== void 0) {\n      o.flush();\n      oldArray = this.slice();\n    }\n    const methodCallResult = reverse.apply(this, arguments);\n    if (o !== void 0) {\n      o.reset(oldArray);\n    }\n    return methodCallResult;\n  };\n  proto.shift = function () {\n    const notEmpty = this.length > 0;\n    const methodCallResult = shift.apply(this, arguments);\n    const o = this.$fastController;\n    if (o !== void 0 && notEmpty) {\n      o.addSplice(newSplice(0, [methodCallResult], 0));\n    }\n    return methodCallResult;\n  };\n  proto.sort = function () {\n    let oldArray;\n    const o = this.$fastController;\n    if (o !== void 0) {\n      o.flush();\n      oldArray = this.slice();\n    }\n    const methodCallResult = sort.apply(this, arguments);\n    if (o !== void 0) {\n      o.reset(oldArray);\n    }\n    return methodCallResult;\n  };\n  proto.splice = function () {\n    const methodCallResult = splice.apply(this, arguments);\n    const o = this.$fastController;\n    if (o !== void 0) {\n      o.addSplice(adjustIndex(newSplice(+arguments[0], methodCallResult, arguments.length > 2 ? arguments.length - 2 : 0), this));\n    }\n    return methodCallResult;\n  };\n  proto.unshift = function () {\n    const methodCallResult = unshift.apply(this, arguments);\n    const o = this.$fastController;\n    if (o !== void 0) {\n      o.addSplice(adjustIndex(newSplice(0, [], arguments.length), this));\n    }\n    return methodCallResult;\n  };\n}\n/* eslint-enable prefer-rest-params */\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n\n/**\n * The runtime behavior for template references.\n * @public\n */\nclass RefBehavior {\n  /**\n   * Creates an instance of RefBehavior.\n   * @param target - The element to reference.\n   * @param propertyName - The name of the property to assign the reference to.\n   */\n  constructor(target, propertyName) {\n    this.target = target;\n    this.propertyName = propertyName;\n  }\n  /**\n   * Bind this behavior to the source.\n   * @param source - The source to bind to.\n   * @param context - The execution context that the binding is operating within.\n   */\n  bind(source) {\n    source[this.propertyName] = this.target;\n  }\n  /**\n   * Unbinds this behavior from the source.\n   * @param source - The source to unbind from.\n   */\n  /* eslint-disable-next-line @typescript-eslint/no-empty-function */\n  unbind() {}\n}\n/**\n * A directive that observes the updates a property with a reference to the element.\n * @param propertyName - The name of the property to assign the reference to.\n * @public\n */\nfunction ref(propertyName) {\n  return new AttachedBehaviorHTMLDirective(\"fast-ref\", RefBehavior, propertyName);\n}\n\n/**\n * Determines whether or not an object is a function.\n * @public\n */\nconst isFunction = object => typeof object === \"function\";\n\nconst noTemplate = () => null;\nfunction normalizeBinding(value) {\n  return value === undefined ? noTemplate : isFunction(value) ? value : () => value;\n}\n/**\n * A directive that enables basic conditional rendering in a template.\n * @param binding - The condition to test for rendering.\n * @param templateOrTemplateBinding - The template or a binding that gets\n * the template to render when the condition is true.\n * @param elseTemplateOrTemplateBinding - Optional template or binding that that\n * gets the template to render when the conditional is false.\n * @public\n */\nfunction when(binding, templateOrTemplateBinding, elseTemplateOrTemplateBinding) {\n  const dataBinding = isFunction(binding) ? binding : () => binding;\n  const templateBinding = normalizeBinding(templateOrTemplateBinding);\n  const elseBinding = normalizeBinding(elseTemplateOrTemplateBinding);\n  return (source, context) => dataBinding(source, context) ? templateBinding(source, context) : elseBinding(source, context);\n}\n\nconst defaultRepeatOptions = Object.freeze({\n  positioning: false,\n  recycle: true\n});\nfunction bindWithoutPositioning(view, items, index, context) {\n  view.bind(items[index], context);\n}\nfunction bindWithPositioning(view, items, index, context) {\n  const childContext = Object.create(context);\n  childContext.index = index;\n  childContext.length = items.length;\n  view.bind(items[index], childContext);\n}\n/**\n * A behavior that renders a template for each item in an array.\n * @public\n */\nclass RepeatBehavior {\n  /**\n   * Creates an instance of RepeatBehavior.\n   * @param location - The location in the DOM to render the repeat.\n   * @param itemsBinding - The array to render.\n   * @param isItemsBindingVolatile - Indicates whether the items binding has volatile dependencies.\n   * @param templateBinding - The template to render for each item.\n   * @param isTemplateBindingVolatile - Indicates whether the template binding has volatile dependencies.\n   * @param options - Options used to turn on special repeat features.\n   */\n  constructor(location, itemsBinding, isItemsBindingVolatile, templateBinding, isTemplateBindingVolatile, options) {\n    this.location = location;\n    this.itemsBinding = itemsBinding;\n    this.templateBinding = templateBinding;\n    this.options = options;\n    this.source = null;\n    this.views = [];\n    this.items = null;\n    this.itemsObserver = null;\n    this.originalContext = void 0;\n    this.childContext = void 0;\n    this.bindView = bindWithoutPositioning;\n    this.itemsBindingObserver = Observable.binding(itemsBinding, this, isItemsBindingVolatile);\n    this.templateBindingObserver = Observable.binding(templateBinding, this, isTemplateBindingVolatile);\n    if (options.positioning) {\n      this.bindView = bindWithPositioning;\n    }\n  }\n  /**\n   * Bind this behavior to the source.\n   * @param source - The source to bind to.\n   * @param context - The execution context that the binding is operating within.\n   */\n  bind(source, context) {\n    this.source = source;\n    this.originalContext = context;\n    this.childContext = Object.create(context);\n    this.childContext.parent = source;\n    this.childContext.parentContext = this.originalContext;\n    this.items = this.itemsBindingObserver.observe(source, this.originalContext);\n    this.template = this.templateBindingObserver.observe(source, this.originalContext);\n    this.observeItems(true);\n    this.refreshAllViews();\n  }\n  /**\n   * Unbinds this behavior from the source.\n   * @param source - The source to unbind from.\n   */\n  unbind() {\n    this.source = null;\n    this.items = null;\n    if (this.itemsObserver !== null) {\n      this.itemsObserver.unsubscribe(this);\n    }\n    this.unbindAllViews();\n    this.itemsBindingObserver.disconnect();\n    this.templateBindingObserver.disconnect();\n  }\n  /** @internal */\n  handleChange(source, args) {\n    if (source === this.itemsBinding) {\n      this.items = this.itemsBindingObserver.observe(this.source, this.originalContext);\n      this.observeItems();\n      this.refreshAllViews();\n    } else if (source === this.templateBinding) {\n      this.template = this.templateBindingObserver.observe(this.source, this.originalContext);\n      this.refreshAllViews(true);\n    } else {\n      this.updateViews(args);\n    }\n  }\n  observeItems(force = false) {\n    if (!this.items) {\n      this.items = emptyArray;\n      return;\n    }\n    const oldObserver = this.itemsObserver;\n    const newObserver = this.itemsObserver = Observable.getNotifier(this.items);\n    const hasNewObserver = oldObserver !== newObserver;\n    if (hasNewObserver && oldObserver !== null) {\n      oldObserver.unsubscribe(this);\n    }\n    if (hasNewObserver || force) {\n      newObserver.subscribe(this);\n    }\n  }\n  updateViews(splices) {\n    const childContext = this.childContext;\n    const views = this.views;\n    const bindView = this.bindView;\n    const items = this.items;\n    const template = this.template;\n    const recycle = this.options.recycle;\n    const leftoverViews = [];\n    let leftoverIndex = 0;\n    let availableViews = 0;\n    for (let i = 0, ii = splices.length; i < ii; ++i) {\n      const splice = splices[i];\n      const removed = splice.removed;\n      let removeIndex = 0;\n      let addIndex = splice.index;\n      const end = addIndex + splice.addedCount;\n      const removedViews = views.splice(splice.index, removed.length);\n      const totalAvailableViews = availableViews = leftoverViews.length + removedViews.length;\n      for (; addIndex < end; ++addIndex) {\n        const neighbor = views[addIndex];\n        const location = neighbor ? neighbor.firstChild : this.location;\n        let view;\n        if (recycle && availableViews > 0) {\n          if (removeIndex <= totalAvailableViews && removedViews.length > 0) {\n            view = removedViews[removeIndex];\n            removeIndex++;\n          } else {\n            view = leftoverViews[leftoverIndex];\n            leftoverIndex++;\n          }\n          availableViews--;\n        } else {\n          view = template.create();\n        }\n        views.splice(addIndex, 0, view);\n        bindView(view, items, addIndex, childContext);\n        view.insertBefore(location);\n      }\n      if (removedViews[removeIndex]) {\n        leftoverViews.push(...removedViews.slice(removeIndex));\n      }\n    }\n    for (let i = leftoverIndex, ii = leftoverViews.length; i < ii; ++i) {\n      leftoverViews[i].dispose();\n    }\n    if (this.options.positioning) {\n      for (let i = 0, ii = views.length; i < ii; ++i) {\n        const currentContext = views[i].context;\n        currentContext.length = ii;\n        currentContext.index = i;\n      }\n    }\n  }\n  refreshAllViews(templateChanged = false) {\n    const items = this.items;\n    const childContext = this.childContext;\n    const template = this.template;\n    const location = this.location;\n    const bindView = this.bindView;\n    let itemsLength = items.length;\n    let views = this.views;\n    let viewsLength = views.length;\n    if (itemsLength === 0 || templateChanged || !this.options.recycle) {\n      // all views need to be removed\n      HTMLView.disposeContiguousBatch(views);\n      viewsLength = 0;\n    }\n    if (viewsLength === 0) {\n      // all views need to be created\n      this.views = views = new Array(itemsLength);\n      for (let i = 0; i < itemsLength; ++i) {\n        const view = template.create();\n        bindView(view, items, i, childContext);\n        views[i] = view;\n        view.insertBefore(location);\n      }\n    } else {\n      // attempt to reuse existing views with new data\n      let i = 0;\n      for (; i < itemsLength; ++i) {\n        if (i < viewsLength) {\n          const view = views[i];\n          bindView(view, items, i, childContext);\n        } else {\n          const view = template.create();\n          bindView(view, items, i, childContext);\n          views.push(view);\n          view.insertBefore(location);\n        }\n      }\n      const removed = views.splice(i, viewsLength - i);\n      for (i = 0, itemsLength = removed.length; i < itemsLength; ++i) {\n        removed[i].dispose();\n      }\n    }\n  }\n  unbindAllViews() {\n    const views = this.views;\n    for (let i = 0, ii = views.length; i < ii; ++i) {\n      views[i].unbind();\n    }\n  }\n}\n/**\n * A directive that configures list rendering.\n * @public\n */\nclass RepeatDirective extends HTMLDirective {\n  /**\n   * Creates an instance of RepeatDirective.\n   * @param itemsBinding - The binding that provides the array to render.\n   * @param templateBinding - The template binding used to obtain a template to render for each item in the array.\n   * @param options - Options used to turn on special repeat features.\n   */\n  constructor(itemsBinding, templateBinding, options) {\n    super();\n    this.itemsBinding = itemsBinding;\n    this.templateBinding = templateBinding;\n    this.options = options;\n    /**\n     * Creates a placeholder string based on the directive's index within the template.\n     * @param index - The index of the directive within the template.\n     */\n    this.createPlaceholder = DOM.createBlockPlaceholder;\n    enableArrayObservation();\n    this.isItemsBindingVolatile = Observable.isVolatileBinding(itemsBinding);\n    this.isTemplateBindingVolatile = Observable.isVolatileBinding(templateBinding);\n  }\n  /**\n   * Creates a behavior for the provided target node.\n   * @param target - The node instance to create the behavior for.\n   */\n  createBehavior(target) {\n    return new RepeatBehavior(target, this.itemsBinding, this.isItemsBindingVolatile, this.templateBinding, this.isTemplateBindingVolatile, this.options);\n  }\n}\n/**\n * A directive that enables list rendering.\n * @param itemsBinding - The array to render.\n * @param templateOrTemplateBinding - The template or a template binding used obtain a template\n * to render for each item in the array.\n * @param options - Options used to turn on special repeat features.\n * @public\n */\nfunction repeat(itemsBinding, templateOrTemplateBinding, options = defaultRepeatOptions) {\n  const templateBinding = typeof templateOrTemplateBinding === \"function\" ? templateOrTemplateBinding : () => templateOrTemplateBinding;\n  return new RepeatDirective(itemsBinding, templateBinding, Object.assign(Object.assign({}, defaultRepeatOptions), options));\n}\n\n/**\n * Creates a function that can be used to filter a Node array, selecting only elements.\n * @param selector - An optional selector to restrict the filter to.\n * @public\n */\nfunction elements(selector) {\n  if (selector) {\n    return function (value, index, array) {\n      return value.nodeType === 1 && value.matches(selector);\n    };\n  }\n  return function (value, index, array) {\n    return value.nodeType === 1;\n  };\n}\n/**\n * A base class for node observation.\n * @internal\n */\nclass NodeObservationBehavior {\n  /**\n   * Creates an instance of NodeObservationBehavior.\n   * @param target - The target to assign the nodes property on.\n   * @param options - The options to use in configuring node observation.\n   */\n  constructor(target, options) {\n    this.target = target;\n    this.options = options;\n    this.source = null;\n  }\n  /**\n   * Bind this behavior to the source.\n   * @param source - The source to bind to.\n   * @param context - The execution context that the binding is operating within.\n   */\n  bind(source) {\n    const name = this.options.property;\n    this.shouldUpdate = Observable.getAccessors(source).some(x => x.name === name);\n    this.source = source;\n    this.updateTarget(this.computeNodes());\n    if (this.shouldUpdate) {\n      this.observe();\n    }\n  }\n  /**\n   * Unbinds this behavior from the source.\n   * @param source - The source to unbind from.\n   */\n  unbind() {\n    this.updateTarget(emptyArray);\n    this.source = null;\n    if (this.shouldUpdate) {\n      this.disconnect();\n    }\n  }\n  /** @internal */\n  handleEvent() {\n    this.updateTarget(this.computeNodes());\n  }\n  computeNodes() {\n    let nodes = this.getNodes();\n    if (this.options.filter !== void 0) {\n      nodes = nodes.filter(this.options.filter);\n    }\n    return nodes;\n  }\n  updateTarget(value) {\n    this.source[this.options.property] = value;\n  }\n}\n\n/**\n * The runtime behavior for slotted node observation.\n * @public\n */\nclass SlottedBehavior extends NodeObservationBehavior {\n  /**\n   * Creates an instance of SlottedBehavior.\n   * @param target - The slot element target to observe.\n   * @param options - The options to use when observing the slot.\n   */\n  constructor(target, options) {\n    super(target, options);\n  }\n  /**\n   * Begins observation of the nodes.\n   */\n  observe() {\n    this.target.addEventListener(\"slotchange\", this);\n  }\n  /**\n   * Disconnects observation of the nodes.\n   */\n  disconnect() {\n    this.target.removeEventListener(\"slotchange\", this);\n  }\n  /**\n   * Retrieves the nodes that should be assigned to the target.\n   */\n  getNodes() {\n    return this.target.assignedNodes(this.options);\n  }\n}\n/**\n * A directive that observes the `assignedNodes()` of a slot and updates a property\n * whenever they change.\n * @param propertyOrOptions - The options used to configure slotted node observation.\n * @public\n */\nfunction slotted(propertyOrOptions) {\n  if (typeof propertyOrOptions === \"string\") {\n    propertyOrOptions = {\n      property: propertyOrOptions\n    };\n  }\n  return new AttachedBehaviorHTMLDirective(\"fast-slotted\", SlottedBehavior, propertyOrOptions);\n}\n\n/**\n * The runtime behavior for child node observation.\n * @public\n */\nclass ChildrenBehavior extends NodeObservationBehavior {\n  /**\n   * Creates an instance of ChildrenBehavior.\n   * @param target - The element target to observe children on.\n   * @param options - The options to use when observing the element children.\n   */\n  constructor(target, options) {\n    super(target, options);\n    this.observer = null;\n    options.childList = true;\n  }\n  /**\n   * Begins observation of the nodes.\n   */\n  observe() {\n    if (this.observer === null) {\n      this.observer = new MutationObserver(this.handleEvent.bind(this));\n    }\n    this.observer.observe(this.target, this.options);\n  }\n  /**\n   * Disconnects observation of the nodes.\n   */\n  disconnect() {\n    this.observer.disconnect();\n  }\n  /**\n   * Retrieves the nodes that should be assigned to the target.\n   */\n  getNodes() {\n    if (\"subtree\" in this.options) {\n      return Array.from(this.target.querySelectorAll(this.options.selector));\n    }\n    return Array.from(this.target.childNodes);\n  }\n}\n/**\n * A directive that observes the `childNodes` of an element and updates a property\n * whenever they change.\n * @param propertyOrOptions - The options used to configure child node observation.\n * @public\n */\nfunction children(propertyOrOptions) {\n  if (typeof propertyOrOptions === \"string\") {\n    propertyOrOptions = {\n      property: propertyOrOptions\n    };\n  }\n  return new AttachedBehaviorHTMLDirective(\"fast-children\", ChildrenBehavior, propertyOrOptions);\n}\n\n/**\n * A mixin class implementing start and end elements.\n * These are generally used to decorate text elements with icons or other visual indicators.\n * @public\n */\nclass StartEnd {\n  handleStartContentChange() {\n    this.startContainer.classList.toggle(\"start\", this.start.assignedNodes().length > 0);\n  }\n  handleEndContentChange() {\n    this.endContainer.classList.toggle(\"end\", this.end.assignedNodes().length > 0);\n  }\n}\n/**\n * The template for the end element.\n * For use with {@link StartEnd}\n *\n * @public\n */\nconst endSlotTemplate = (context, definition) => html`<span part=\"end\" ${ref(\"endContainer\")} class=${x => definition.end ? \"end\" : void 0}><slot name=\"end\" ${ref(\"end\")} @slotchange=\"${x => x.handleEndContentChange()}\">${definition.end || \"\"}</slot></span>`;\n/**\n * The template for the start element.\n * For use with {@link StartEnd}\n *\n * @public\n */\nconst startSlotTemplate = (context, definition) => html`<span part=\"start\" ${ref(\"startContainer\")} class=\"${x => definition.start ? \"start\" : void 0}\"><slot name=\"start\" ${ref(\"start\")} @slotchange=\"${x => x.handleStartContentChange()}\">${definition.start || \"\"}</slot></span>`;\n/**\n * The template for the end element.\n * For use with {@link StartEnd}\n *\n * @public\n * @deprecated - use endSlotTemplate\n */\nconst endTemplate = html`<span part=\"end\" ${ref(\"endContainer\")}><slot name=\"end\" ${ref(\"end\")} @slotchange=\"${x => x.handleEndContentChange()}\"></slot></span>`;\n/**\n * The template for the start element.\n * For use with {@link StartEnd}\n *\n * @public\n * @deprecated - use startSlotTemplate\n */\nconst startTemplate = html`<span part=\"start\" ${ref(\"startContainer\")}><slot name=\"start\" ${ref(\"start\")} @slotchange=\"${x => x.handleStartContentChange()}\"></slot></span>`;\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(AccordionItem:class)} component.\n * @public\n */\nconst accordionItemTemplate = (context, definition) => html`<template class=\"${x => x.expanded ? \"expanded\" : \"\"}\"><div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=\"${x => x.headinglevel}\"><button class=\"button\" part=\"button\" ${ref(\"expandbutton\")} aria-expanded=\"${x => x.expanded}\" aria-controls=\"${x => x.id}-panel\" id=\"${x => x.id}\" @click=\"${(x, c) => x.clickHandler(c.event)}\"><span class=\"heading-content\" part=\"heading-content\"><slot name=\"heading\"></slot></span></button>${startSlotTemplate(context, definition)} ${endSlotTemplate(context, definition)}<span class=\"icon\" part=\"icon\" aria-hidden=\"true\"><slot name=\"expanded-icon\" part=\"expanded-icon\">${definition.expandedIcon || \"\"}</slot><slot name=\"collapsed-icon\" part=\"collapsed-icon\">${definition.collapsedIcon || \"\"}</slot><span></div><div class=\"region\" part=\"region\" id=\"${x => x.id}-panel\" role=\"region\" aria-labelledby=\"${x => x.id}\"><slot></slot></div></template>`;\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\nfunction __decorate$1(decorators, target, key, desc) {\n  var c = arguments.length,\n    r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n    d;\n  if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n  return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\n/**\n * Big thanks to https://github.com/fkleuver and the https://github.com/aurelia/aurelia project\n * for the bulk of this code and many of the associated tests.\n */\n// Tiny polyfill for TypeScript's Reflect metadata API.\nconst metadataByTarget = new Map();\nif (!(\"metadata\" in Reflect)) {\n  Reflect.metadata = function (key, value) {\n    return function (target) {\n      Reflect.defineMetadata(key, value, target);\n    };\n  };\n  Reflect.defineMetadata = function (key, value, target) {\n    let metadata = metadataByTarget.get(target);\n    if (metadata === void 0) {\n      metadataByTarget.set(target, metadata = new Map());\n    }\n    metadata.set(key, value);\n  };\n  Reflect.getOwnMetadata = function (key, target) {\n    const metadata = metadataByTarget.get(target);\n    if (metadata !== void 0) {\n      return metadata.get(key);\n    }\n    return void 0;\n  };\n}\n/**\n * A utility class used that constructs and registers resolvers for a dependency\n * injection container. Supports a standard set of object lifetimes.\n * @public\n */\nclass ResolverBuilder {\n  /**\n   *\n   * @param container - The container to create resolvers for.\n   * @param key - The key to register resolvers under.\n   */\n  constructor(container, key) {\n    this.container = container;\n    this.key = key;\n  }\n  /**\n   * Creates a resolver for an existing object instance.\n   * @param value - The instance to resolve.\n   * @returns The resolver.\n   */\n  instance(value) {\n    return this.registerResolver(0 /* instance */, value);\n  }\n  /**\n   * Creates a resolver that enforces a singleton lifetime.\n   * @param value - The type to create and cache the singleton for.\n   * @returns The resolver.\n   */\n  singleton(value) {\n    return this.registerResolver(1 /* singleton */, value);\n  }\n  /**\n   * Creates a resolver that creates a new instance for every dependency request.\n   * @param value - The type to create instances of.\n   * @returns - The resolver.\n   */\n  transient(value) {\n    return this.registerResolver(2 /* transient */, value);\n  }\n  /**\n   * Creates a resolver that invokes a callback function for every dependency resolution\n   * request, allowing custom logic to return the dependency.\n   * @param value - The callback to call during resolution.\n   * @returns The resolver.\n   */\n  callback(value) {\n    return this.registerResolver(3 /* callback */, value);\n  }\n  /**\n   * Creates a resolver that invokes a callback function the first time that a dependency\n   * resolution is requested. The returned value is then cached and provided for all\n   * subsequent requests.\n   * @param value - The callback to call during the first resolution.\n   * @returns The resolver.\n   */\n  cachedCallback(value) {\n    return this.registerResolver(3 /* callback */, cacheCallbackResult(value));\n  }\n  /**\n   * Aliases the current key to a different key.\n   * @param destinationKey - The key to point the alias to.\n   * @returns The resolver.\n   */\n  aliasTo(destinationKey) {\n    return this.registerResolver(5 /* alias */, destinationKey);\n  }\n  registerResolver(strategy, state) {\n    const {\n      container,\n      key\n    } = this;\n    /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n    this.container = this.key = void 0;\n    return container.registerResolver(key, new ResolverImpl(key, strategy, state));\n  }\n}\nfunction cloneArrayWithPossibleProps(source) {\n  const clone = source.slice();\n  const keys = Object.keys(source);\n  const len = keys.length;\n  let key;\n  for (let i = 0; i < len; ++i) {\n    key = keys[i];\n    if (!isArrayIndex(key)) {\n      clone[key] = source[key];\n    }\n  }\n  return clone;\n}\n/**\n * A set of default resolvers useful in configuring a container.\n * @public\n */\nconst DefaultResolver = Object.freeze({\n  /**\n   * Disables auto-registration and throws for all un-registered dependencies.\n   * @param key - The key to create the resolver for.\n   */\n  none(key) {\n    throw Error(`${key.toString()} not registered, did you forget to add @singleton()?`);\n  },\n  /**\n   * Provides default singleton resolution behavior during auto-registration.\n   * @param key - The key to create the resolver for.\n   * @returns The resolver.\n   */\n  singleton(key) {\n    return new ResolverImpl(key, 1 /* singleton */, key);\n  },\n  /**\n   * Provides default transient resolution behavior during auto-registration.\n   * @param key - The key to create the resolver for.\n   * @returns The resolver.\n   */\n  transient(key) {\n    return new ResolverImpl(key, 2 /* transient */, key);\n  }\n});\n/**\n * Configuration for a dependency injection container.\n * @public\n */\nconst ContainerConfiguration = Object.freeze({\n  /**\n   * The default configuration used when creating a DOM-disconnected container.\n   * @remarks\n   * The default creates a root container, with no parent container. It does not handle\n   * owner requests and it uses singleton resolution behavior for auto-registration.\n   */\n  default: Object.freeze({\n    parentLocator: () => null,\n    responsibleForOwnerRequests: false,\n    defaultResolver: DefaultResolver.singleton\n  })\n});\nconst dependencyLookup = new Map();\nfunction getParamTypes(key) {\n  return Type => {\n    return Reflect.getOwnMetadata(key, Type);\n  };\n}\nlet rootDOMContainer = null;\n/**\n * The gateway to dependency injection APIs.\n * @public\n */\nconst DI = Object.freeze({\n  /**\n   * Creates a new dependency injection container.\n   * @param config - The configuration for the container.\n   * @returns A newly created dependency injection container.\n   */\n  createContainer(config) {\n    return new ContainerImpl(null, Object.assign({}, ContainerConfiguration.default, config));\n  },\n  /**\n   * Finds the dependency injection container responsible for providing dependencies\n   * to the specified node.\n   * @param node - The node to find the responsible container for.\n   * @returns The container responsible for providing dependencies to the node.\n   * @remarks\n   * This will be the same as the parent container if the specified node\n   * does not itself host a container configured with responsibleForOwnerRequests.\n   */\n  findResponsibleContainer(node) {\n    const owned = node.$$container$$;\n    if (owned && owned.responsibleForOwnerRequests) {\n      return owned;\n    }\n    return DI.findParentContainer(node);\n  },\n  /**\n   * Find the dependency injection container up the DOM tree from this node.\n   * @param node - The node to find the parent container for.\n   * @returns The parent container of this node.\n   * @remarks\n   * This will be the same as the responsible container if the specified node\n   * does not itself host a container configured with responsibleForOwnerRequests.\n   */\n  findParentContainer(node) {\n    const event = new CustomEvent(DILocateParentEventType, {\n      bubbles: true,\n      composed: true,\n      cancelable: true,\n      detail: {\n        container: void 0\n      }\n    });\n    node.dispatchEvent(event);\n    return event.detail.container || DI.getOrCreateDOMContainer();\n  },\n  /**\n   * Returns a dependency injection container if one is explicitly owned by the specified\n   * node. If one is not owned, then a new container is created and assigned to the node.\n   * @param node - The node to find or create the container for.\n   * @param config - The configuration for the container if one needs to be created.\n   * @returns The located or created container.\n   * @remarks\n   * This API does not search for a responsible or parent container. It looks only for a container\n   * directly defined on the specified node and creates one at that location if one does not\n   * already exist.\n   */\n  getOrCreateDOMContainer(node, config) {\n    if (!node) {\n      return rootDOMContainer || (rootDOMContainer = new ContainerImpl(null, Object.assign({}, ContainerConfiguration.default, config, {\n        parentLocator: () => null\n      })));\n    }\n    return node.$$container$$ || new ContainerImpl(node, Object.assign({}, ContainerConfiguration.default, config, {\n      parentLocator: DI.findParentContainer\n    }));\n  },\n  /**\n   * Gets the \"design:paramtypes\" metadata for the specified type.\n   * @param Type - The type to get the metadata for.\n   * @returns The metadata array or undefined if no metadata is found.\n   */\n  getDesignParamtypes: getParamTypes(\"design:paramtypes\"),\n  /**\n   * Gets the \"di:paramtypes\" metadata for the specified type.\n   * @param Type - The type to get the metadata for.\n   * @returns The metadata array or undefined if no metadata is found.\n   */\n  getAnnotationParamtypes: getParamTypes(\"di:paramtypes\"),\n  /**\n   *\n   * @param Type - Gets the \"di:paramtypes\" metadata for the specified type. If none is found,\n   * an empty metadata array is created and added.\n   * @returns The metadata array.\n   */\n  getOrCreateAnnotationParamTypes(Type) {\n    let annotationParamtypes = this.getAnnotationParamtypes(Type);\n    if (annotationParamtypes === void 0) {\n      Reflect.defineMetadata(\"di:paramtypes\", annotationParamtypes = [], Type);\n    }\n    return annotationParamtypes;\n  },\n  /**\n   * Gets the dependency keys representing what is needed to instantiate the specified type.\n   * @param Type - The type to get the dependencies for.\n   * @returns An array of dependency keys.\n   */\n  getDependencies(Type) {\n    // Note: Every detail of this getDependencies method is pretty deliberate at the moment, and probably not yet 100% tested from every possible angle,\n    // so be careful with making changes here as it can have a huge impact on complex end user apps.\n    // Preferably, only make changes to the dependency resolution process via a RFC.\n    let dependencies = dependencyLookup.get(Type);\n    if (dependencies === void 0) {\n      // Type.length is the number of constructor parameters. If this is 0, it could mean the class has an empty constructor\n      // but it could also mean the class has no constructor at all (in which case it inherits the constructor from the prototype).\n      // Non-zero constructor length + no paramtypes means emitDecoratorMetadata is off, or the class has no decorator.\n      // We're not doing anything with the above right now, but it's good to keep in mind for any future issues.\n      const inject = Type.inject;\n      if (inject === void 0) {\n        // design:paramtypes is set by tsc when emitDecoratorMetadata is enabled.\n        const designParamtypes = DI.getDesignParamtypes(Type);\n        // di:paramtypes is set by the parameter decorator from DI.createInterface or by @inject\n        const annotationParamtypes = DI.getAnnotationParamtypes(Type);\n        if (designParamtypes === void 0) {\n          if (annotationParamtypes === void 0) {\n            // Only go up the prototype if neither static inject nor any of the paramtypes is defined, as\n            // there is no sound way to merge a type's deps with its prototype's deps\n            const Proto = Object.getPrototypeOf(Type);\n            if (typeof Proto === \"function\" && Proto !== Function.prototype) {\n              dependencies = cloneArrayWithPossibleProps(DI.getDependencies(Proto));\n            } else {\n              dependencies = [];\n            }\n          } else {\n            // No design:paramtypes so just use the di:paramtypes\n            dependencies = cloneArrayWithPossibleProps(annotationParamtypes);\n          }\n        } else if (annotationParamtypes === void 0) {\n          // No di:paramtypes so just use the design:paramtypes\n          dependencies = cloneArrayWithPossibleProps(designParamtypes);\n        } else {\n          // We've got both, so merge them (in case of conflict on same index, di:paramtypes take precedence)\n          dependencies = cloneArrayWithPossibleProps(designParamtypes);\n          let len = annotationParamtypes.length;\n          let auAnnotationParamtype;\n          for (let i = 0; i < len; ++i) {\n            auAnnotationParamtype = annotationParamtypes[i];\n            if (auAnnotationParamtype !== void 0) {\n              dependencies[i] = auAnnotationParamtype;\n            }\n          }\n          const keys = Object.keys(annotationParamtypes);\n          len = keys.length;\n          let key;\n          for (let i = 0; i < len; ++i) {\n            key = keys[i];\n            if (!isArrayIndex(key)) {\n              dependencies[key] = annotationParamtypes[key];\n            }\n          }\n        }\n      } else {\n        // Ignore paramtypes if we have static inject\n        dependencies = cloneArrayWithPossibleProps(inject);\n      }\n      dependencyLookup.set(Type, dependencies);\n    }\n    return dependencies;\n  },\n  /**\n   * Defines a property on a web component class. The value of this property will\n   * be resolved from the dependency injection container responsible for the element\n   * instance, based on where it is connected in the DOM.\n   * @param target - The target to define the property on.\n   * @param propertyName - The name of the property to define.\n   * @param key - The dependency injection key.\n   * @param respectConnection - Indicates whether or not to update the property value if the\n   * hosting component is disconnected and then re-connected at a different location in the DOM.\n   * @remarks\n   * The respectConnection option is only applicable to elements that descend from FASTElement.\n   */\n  defineProperty(target, propertyName, key, respectConnection = false) {\n    const diPropertyKey = `$di_${propertyName}`;\n    Reflect.defineProperty(target, propertyName, {\n      get: function () {\n        let value = this[diPropertyKey];\n        if (value === void 0) {\n          const container = this instanceof HTMLElement ? DI.findResponsibleContainer(this) : DI.getOrCreateDOMContainer();\n          value = container.get(key);\n          this[diPropertyKey] = value;\n          if (respectConnection && this instanceof FASTElement) {\n            const notifier = this.$fastController;\n            const handleChange = () => {\n              const newContainer = DI.findResponsibleContainer(this);\n              const newValue = newContainer.get(key);\n              const oldValue = this[diPropertyKey];\n              if (newValue !== oldValue) {\n                this[diPropertyKey] = value;\n                notifier.notify(propertyName);\n              }\n            };\n            notifier.subscribe({\n              handleChange\n            }, \"isConnected\");\n          }\n        }\n        return value;\n      }\n    });\n  },\n  /**\n   * Creates a dependency injection key.\n   * @param nameConfigOrCallback - A friendly name for the key or a lambda that configures a\n   * default resolution for the dependency.\n   * @param configuror - If a friendly name was provided for the first parameter, then an optional\n   * lambda that configures a default resolution for the dependency can be provided second.\n   * @returns The created key.\n   * @remarks\n   * The created key can be used as a property decorator or constructor parameter decorator,\n   * in addition to its standard use in an inject array or through direct container APIs.\n   */\n  createInterface(nameConfigOrCallback, configuror) {\n    const configure = typeof nameConfigOrCallback === \"function\" ? nameConfigOrCallback : configuror;\n    const friendlyName = typeof nameConfigOrCallback === \"string\" ? nameConfigOrCallback : nameConfigOrCallback && \"friendlyName\" in nameConfigOrCallback ? nameConfigOrCallback.friendlyName || defaultFriendlyName : defaultFriendlyName;\n    const respectConnection = typeof nameConfigOrCallback === \"string\" ? false : nameConfigOrCallback && \"respectConnection\" in nameConfigOrCallback ? nameConfigOrCallback.respectConnection || false : false;\n    const Interface = function (target, property, index) {\n      if (target == null || new.target !== undefined) {\n        throw new Error(`No registration for interface: '${Interface.friendlyName}'`);\n      }\n      if (property) {\n        DI.defineProperty(target, property, Interface, respectConnection);\n      } else {\n        const annotationParamtypes = DI.getOrCreateAnnotationParamTypes(target);\n        annotationParamtypes[index] = Interface;\n      }\n    };\n    Interface.$isInterface = true;\n    Interface.friendlyName = friendlyName == null ? \"(anonymous)\" : friendlyName;\n    if (configure != null) {\n      Interface.register = function (container, key) {\n        return configure(new ResolverBuilder(container, key !== null && key !== void 0 ? key : Interface));\n      };\n    }\n    Interface.toString = function toString() {\n      return `InterfaceSymbol<${Interface.friendlyName}>`;\n    };\n    return Interface;\n  },\n  /**\n   * A decorator that specifies what to inject into its target.\n   * @param dependencies - The dependencies to inject.\n   * @returns The decorator to be applied to the target class.\n   * @remarks\n   * The decorator can be used to decorate a class, listing all of the classes dependencies.\n   * Or it can be used to decorate a constructor paramter, indicating what to inject for that\n   * parameter.\n   * Or it can be used for a web component property, indicating what that property should resolve to.\n   */\n  inject(...dependencies) {\n    return function (target, key, descriptor) {\n      if (typeof descriptor === \"number\") {\n        // It's a parameter decorator.\n        const annotationParamtypes = DI.getOrCreateAnnotationParamTypes(target);\n        const dep = dependencies[0];\n        if (dep !== void 0) {\n          annotationParamtypes[descriptor] = dep;\n        }\n      } else if (key) {\n        DI.defineProperty(target, key, dependencies[0]);\n      } else {\n        const annotationParamtypes = descriptor ? DI.getOrCreateAnnotationParamTypes(descriptor.value) : DI.getOrCreateAnnotationParamTypes(target);\n        let dep;\n        for (let i = 0; i < dependencies.length; ++i) {\n          dep = dependencies[i];\n          if (dep !== void 0) {\n            annotationParamtypes[i] = dep;\n          }\n        }\n      }\n    };\n  },\n  /**\n   * Registers the `target` class as a transient dependency; each time the dependency is resolved\n   * a new instance will be created.\n   *\n   * @param target - The class / constructor function to register as transient.\n   * @returns The same class, with a static `register` method that takes a container and returns the appropriate resolver.\n   *\n   * @example\n   * On an existing class\n   * ```ts\n   * class Foo { }\n   * DI.transient(Foo);\n   * ```\n   *\n   * @example\n   * Inline declaration\n   *\n   * ```ts\n   * const Foo = DI.transient(class { });\n   * // Foo is now strongly typed with register\n   * Foo.register(container);\n   * ```\n   *\n   * @public\n   */\n  transient(target) {\n    target.register = function register(container) {\n      const registration = Registration.transient(target, target);\n      return registration.register(container);\n    };\n    target.registerInRequestor = false;\n    return target;\n  },\n  /**\n   * Registers the `target` class as a singleton dependency; the class will only be created once. Each\n   * consecutive time the dependency is resolved, the same instance will be returned.\n   *\n   * @param target - The class / constructor function to register as a singleton.\n   * @returns The same class, with a static `register` method that takes a container and returns the appropriate resolver.\n   * @example\n   * On an existing class\n   * ```ts\n   * class Foo { }\n   * DI.singleton(Foo);\n   * ```\n   *\n   * @example\n   * Inline declaration\n   * ```ts\n   * const Foo = DI.singleton(class { });\n   * // Foo is now strongly typed with register\n   * Foo.register(container);\n   * ```\n   *\n   * @public\n   */\n  singleton(target, options = defaultSingletonOptions) {\n    target.register = function register(container) {\n      const registration = Registration.singleton(target, target);\n      return registration.register(container);\n    };\n    target.registerInRequestor = options.scoped;\n    return target;\n  }\n});\n/**\n * The interface key that resolves the dependency injection container itself.\n * @public\n */\nconst Container = DI.createInterface(\"Container\");\n/**\n * A decorator that specifies what to inject into its target.\n * @param dependencies - The dependencies to inject.\n * @returns The decorator to be applied to the target class.\n * @remarks\n * The decorator can be used to decorate a class, listing all of the classes dependencies.\n * Or it can be used to decorate a constructor paramter, indicating what to inject for that\n * parameter.\n * Or it can be used for a web component property, indicating what that property should resolve to.\n *\n * @public\n */\nDI.inject;\nconst defaultSingletonOptions = {\n  scoped: false\n};\n/** @internal */\nclass ResolverImpl {\n  constructor(key, strategy, state) {\n    this.key = key;\n    this.strategy = strategy;\n    this.state = state;\n    this.resolving = false;\n  }\n  get $isResolver() {\n    return true;\n  }\n  register(container) {\n    return container.registerResolver(this.key, this);\n  }\n  resolve(handler, requestor) {\n    switch (this.strategy) {\n      case 0 /* instance */:\n        return this.state;\n      case 1 /* singleton */:\n        {\n          if (this.resolving) {\n            throw new Error(`Cyclic dependency found: ${this.state.name}`);\n          }\n          this.resolving = true;\n          this.state = handler.getFactory(this.state).construct(requestor);\n          this.strategy = 0 /* instance */;\n          this.resolving = false;\n          return this.state;\n        }\n      case 2 /* transient */:\n        {\n          // Always create transients from the requesting container\n          const factory = handler.getFactory(this.state);\n          if (factory === null) {\n            throw new Error(`Resolver for ${String(this.key)} returned a null factory`);\n          }\n          return factory.construct(requestor);\n        }\n      case 3 /* callback */:\n        return this.state(handler, requestor, this);\n      case 4 /* array */:\n        return this.state[0].resolve(handler, requestor);\n      case 5 /* alias */:\n        return requestor.get(this.state);\n      default:\n        throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`);\n    }\n  }\n  getFactory(container) {\n    var _a, _b, _c;\n    switch (this.strategy) {\n      case 1 /* singleton */:\n      case 2 /* transient */:\n        return container.getFactory(this.state);\n      case 5 /* alias */:\n        return (_c = (_b = (_a = container.getResolver(this.state)) === null || _a === void 0 ? void 0 : _a.getFactory) === null || _b === void 0 ? void 0 : _b.call(_a, container)) !== null && _c !== void 0 ? _c : null;\n      default:\n        return null;\n    }\n  }\n}\nfunction containerGetKey(d) {\n  return this.get(d);\n}\nfunction transformInstance(inst, transform) {\n  return transform(inst);\n}\n/** @internal */\nclass FactoryImpl {\n  constructor(Type, dependencies) {\n    this.Type = Type;\n    this.dependencies = dependencies;\n    this.transformers = null;\n  }\n  construct(container, dynamicDependencies) {\n    let instance;\n    if (dynamicDependencies === void 0) {\n      instance = new this.Type(...this.dependencies.map(containerGetKey, container));\n    } else {\n      instance = new this.Type(...this.dependencies.map(containerGetKey, container), ...dynamicDependencies);\n    }\n    if (this.transformers == null) {\n      return instance;\n    }\n    return this.transformers.reduce(transformInstance, instance);\n  }\n  registerTransformer(transformer) {\n    (this.transformers || (this.transformers = [])).push(transformer);\n  }\n}\nconst containerResolver = {\n  $isResolver: true,\n  resolve(handler, requestor) {\n    return requestor;\n  }\n};\nfunction isRegistry(obj) {\n  return typeof obj.register === \"function\";\n}\nfunction isSelfRegistry(obj) {\n  return isRegistry(obj) && typeof obj.registerInRequestor === \"boolean\";\n}\nfunction isRegisterInRequester(obj) {\n  return isSelfRegistry(obj) && obj.registerInRequestor;\n}\nfunction isClass(obj) {\n  return obj.prototype !== void 0;\n}\nconst InstrinsicTypeNames = new Set([\"Array\", \"ArrayBuffer\", \"Boolean\", \"DataView\", \"Date\", \"Error\", \"EvalError\", \"Float32Array\", \"Float64Array\", \"Function\", \"Int8Array\", \"Int16Array\", \"Int32Array\", \"Map\", \"Number\", \"Object\", \"Promise\", \"RangeError\", \"ReferenceError\", \"RegExp\", \"Set\", \"SharedArrayBuffer\", \"String\", \"SyntaxError\", \"TypeError\", \"Uint8Array\", \"Uint8ClampedArray\", \"Uint16Array\", \"Uint32Array\", \"URIError\", \"WeakMap\", \"WeakSet\"]);\nconst DILocateParentEventType = \"__DI_LOCATE_PARENT__\";\nconst factories = new Map();\n/**\n * @internal\n */\nclass ContainerImpl {\n  constructor(owner, config) {\n    this.owner = owner;\n    this.config = config;\n    this._parent = void 0;\n    this.registerDepth = 0;\n    this.context = null;\n    if (owner !== null) {\n      owner.$$container$$ = this;\n    }\n    this.resolvers = new Map();\n    this.resolvers.set(Container, containerResolver);\n    if (owner instanceof Node) {\n      owner.addEventListener(DILocateParentEventType, e => {\n        if (e.composedPath()[0] !== this.owner) {\n          e.detail.container = this;\n          e.stopImmediatePropagation();\n        }\n      });\n    }\n  }\n  get parent() {\n    if (this._parent === void 0) {\n      this._parent = this.config.parentLocator(this.owner);\n    }\n    return this._parent;\n  }\n  get depth() {\n    return this.parent === null ? 0 : this.parent.depth + 1;\n  }\n  get responsibleForOwnerRequests() {\n    return this.config.responsibleForOwnerRequests;\n  }\n  registerWithContext(context, ...params) {\n    this.context = context;\n    this.register(...params);\n    this.context = null;\n    return this;\n  }\n  register(...params) {\n    if (++this.registerDepth === 100) {\n      throw new Error(\"Unable to autoregister dependency\");\n      // Most likely cause is trying to register a plain object that does not have a\n      // register method and is not a class constructor\n    }\n    let current;\n    let keys;\n    let value;\n    let j;\n    let jj;\n    const context = this.context;\n    for (let i = 0, ii = params.length; i < ii; ++i) {\n      current = params[i];\n      if (!isObject(current)) {\n        continue;\n      }\n      if (isRegistry(current)) {\n        current.register(this, context);\n      } else if (isClass(current)) {\n        Registration.singleton(current, current).register(this);\n      } else {\n        keys = Object.keys(current);\n        j = 0;\n        jj = keys.length;\n        for (; j < jj; ++j) {\n          value = current[keys[j]];\n          if (!isObject(value)) {\n            continue;\n          }\n          // note: we could remove this if-branch and call this.register directly\n          // - the extra check is just a perf tweak to create fewer unnecessary arrays by the spread operator\n          if (isRegistry(value)) {\n            value.register(this, context);\n          } else {\n            this.register(value);\n          }\n        }\n      }\n    }\n    --this.registerDepth;\n    return this;\n  }\n  registerResolver(key, resolver) {\n    validateKey(key);\n    const resolvers = this.resolvers;\n    const result = resolvers.get(key);\n    if (result == null) {\n      resolvers.set(key, resolver);\n    } else if (result instanceof ResolverImpl && result.strategy === 4 /* array */) {\n      result.state.push(resolver);\n    } else {\n      resolvers.set(key, new ResolverImpl(key, 4 /* array */, [result, resolver]));\n    }\n    return resolver;\n  }\n  registerTransformer(key, transformer) {\n    const resolver = this.getResolver(key);\n    if (resolver == null) {\n      return false;\n    }\n    if (resolver.getFactory) {\n      const factory = resolver.getFactory(this);\n      if (factory == null) {\n        return false;\n      }\n      // This type cast is a bit of a hacky one, necessary due to the duplicity of IResolverLike.\n      // Problem is that that interface's type arg can be of type Key, but the getFactory method only works on\n      // type Constructable. So the return type of that optional method has this additional constraint, which\n      // seems to confuse the type checker.\n      factory.registerTransformer(transformer);\n      return true;\n    }\n    return false;\n  }\n  getResolver(key, autoRegister = true) {\n    validateKey(key);\n    if (key.resolve !== void 0) {\n      return key;\n    }\n    /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n    let current = this;\n    let resolver;\n    while (current != null) {\n      resolver = current.resolvers.get(key);\n      if (resolver == null) {\n        if (current.parent == null) {\n          const handler = isRegisterInRequester(key) ? this : current;\n          return autoRegister ? this.jitRegister(key, handler) : null;\n        }\n        current = current.parent;\n      } else {\n        return resolver;\n      }\n    }\n    return null;\n  }\n  has(key, searchAncestors = false) {\n    return this.resolvers.has(key) ? true : searchAncestors && this.parent != null ? this.parent.has(key, true) : false;\n  }\n  get(key) {\n    validateKey(key);\n    if (key.$isResolver) {\n      return key.resolve(this, this);\n    }\n    /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n    let current = this;\n    let resolver;\n    while (current != null) {\n      resolver = current.resolvers.get(key);\n      if (resolver == null) {\n        if (current.parent == null) {\n          const handler = isRegisterInRequester(key) ? this : current;\n          resolver = this.jitRegister(key, handler);\n          return resolver.resolve(current, this);\n        }\n        current = current.parent;\n      } else {\n        return resolver.resolve(current, this);\n      }\n    }\n    throw new Error(`Unable to resolve key: ${String(key)}`);\n  }\n  getAll(key, searchAncestors = false) {\n    validateKey(key);\n    /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n    const requestor = this;\n    let current = requestor;\n    let resolver;\n    if (searchAncestors) {\n      let resolutions = emptyArray;\n      while (current != null) {\n        resolver = current.resolvers.get(key);\n        if (resolver != null) {\n          resolutions = resolutions.concat( /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n          buildAllResponse(resolver, current, requestor));\n        }\n        current = current.parent;\n      }\n      return resolutions;\n    } else {\n      while (current != null) {\n        resolver = current.resolvers.get(key);\n        if (resolver == null) {\n          current = current.parent;\n          if (current == null) {\n            return emptyArray;\n          }\n        } else {\n          return buildAllResponse(resolver, current, requestor);\n        }\n      }\n    }\n    return emptyArray;\n  }\n  getFactory(Type) {\n    let factory = factories.get(Type);\n    if (factory === void 0) {\n      if (isNativeFunction(Type)) {\n        throw new Error(`${Type.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);\n      }\n      factories.set(Type, factory = new FactoryImpl(Type, DI.getDependencies(Type)));\n    }\n    return factory;\n  }\n  registerFactory(key, factory) {\n    factories.set(key, factory);\n  }\n  createChild(config) {\n    return new ContainerImpl(null, Object.assign({}, this.config, config, {\n      parentLocator: () => this\n    }));\n  }\n  jitRegister(keyAsValue, handler) {\n    if (typeof keyAsValue !== \"function\") {\n      throw new Error(`Attempted to jitRegister something that is not a constructor: '${keyAsValue}'. Did you forget to register this dependency?`);\n    }\n    if (InstrinsicTypeNames.has(keyAsValue.name)) {\n      throw new Error(`Attempted to jitRegister an intrinsic type: ${keyAsValue.name}. Did you forget to add @inject(Key)`);\n    }\n    if (isRegistry(keyAsValue)) {\n      const registrationResolver = keyAsValue.register(handler);\n      if (!(registrationResolver instanceof Object) || registrationResolver.resolve == null) {\n        const newResolver = handler.resolvers.get(keyAsValue);\n        if (newResolver != void 0) {\n          return newResolver;\n        }\n        throw new Error(\"A valid resolver was not returned from the static register method\");\n      }\n      return registrationResolver;\n    } else if (keyAsValue.$isInterface) {\n      throw new Error(`Attempted to jitRegister an interface: ${keyAsValue.friendlyName}`);\n    } else {\n      const resolver = this.config.defaultResolver(keyAsValue, handler);\n      handler.resolvers.set(keyAsValue, resolver);\n      return resolver;\n    }\n  }\n}\nconst cache = new WeakMap();\nfunction cacheCallbackResult(fun) {\n  return function (handler, requestor, resolver) {\n    if (cache.has(resolver)) {\n      return cache.get(resolver);\n    }\n    const t = fun(handler, requestor, resolver);\n    cache.set(resolver, t);\n    return t;\n  };\n}\n/**\n * You can use the resulting Registration of any of the factory methods\n * to register with the container.\n *\n * @example\n * ```\n * class Foo {}\n * const container = DI.createContainer();\n * container.register(Registration.instance(Foo, new Foo()));\n * container.get(Foo);\n * ```\n *\n * @public\n */\nconst Registration = Object.freeze({\n  /**\n   * Allows you to pass an instance.\n   * Every time you request this {@link Key} you will get this instance back.\n   *\n   * @example\n   * ```\n   * Registration.instance(Foo, new Foo()));\n   * ```\n   *\n   * @param key - The key to register the instance under.\n   * @param value - The instance to return when the key is requested.\n   */\n  instance(key, value) {\n    return new ResolverImpl(key, 0 /* instance */, value);\n  },\n  /**\n   * Creates an instance from the class.\n   * Every time you request this {@link Key} you will get the same one back.\n   *\n   * @example\n   * ```\n   * Registration.singleton(Foo, Foo);\n   * ```\n   *\n   * @param key - The key to register the singleton under.\n   * @param value - The class to instantiate as a singleton when first requested.\n   */\n  singleton(key, value) {\n    return new ResolverImpl(key, 1 /* singleton */, value);\n  },\n  /**\n   * Creates an instance from a class.\n   * Every time you request this {@link Key} you will get a new instance.\n   *\n   * @example\n   * ```\n   * Registration.instance(Foo, Foo);\n   * ```\n   *\n   * @param key - The key to register the instance type under.\n   * @param value - The class to instantiate each time the key is requested.\n   */\n  transient(key, value) {\n    return new ResolverImpl(key, 2 /* transient */, value);\n  },\n  /**\n   * Delegates to a callback function to provide the dependency.\n   * Every time you request this {@link Key} the callback will be invoked to provide\n   * the dependency.\n   *\n   * @example\n   * ```\n   * Registration.callback(Foo, () => new Foo());\n   * Registration.callback(Bar, (c: Container) => new Bar(c.get(Foo)));\n   * ```\n   *\n   * @param key - The key to register the callback for.\n   * @param callback - The function that is expected to return the dependency.\n   */\n  callback(key, callback) {\n    return new ResolverImpl(key, 3 /* callback */, callback);\n  },\n  /**\n   * Delegates to a callback function to provide the dependency and then caches the\n   * dependency for future requests.\n   *\n   * @example\n   * ```\n   * Registration.cachedCallback(Foo, () => new Foo());\n   * Registration.cachedCallback(Bar, (c: Container) => new Bar(c.get(Foo)));\n   * ```\n   *\n   * @param key - The key to register the callback for.\n   * @param callback - The function that is expected to return the dependency.\n   * @remarks\n   * If you pass the same Registration to another container, the same cached value will be used.\n   * Should all references to the resolver returned be removed, the cache will expire.\n   */\n  cachedCallback(key, callback) {\n    return new ResolverImpl(key, 3 /* callback */, cacheCallbackResult(callback));\n  },\n  /**\n   * Creates an alternate {@link Key} to retrieve an instance by.\n   *\n   * @example\n   * ```\n   * Register.singleton(Foo, Foo)\n   * Register.aliasTo(Foo, MyFoos);\n   *\n   * container.getAll(MyFoos) // contains an instance of Foo\n   * ```\n   *\n   * @param originalKey - The original key that has been registered.\n   * @param aliasKey - The alias to the original key.\n   */\n  aliasTo(originalKey, aliasKey) {\n    return new ResolverImpl(aliasKey, 5 /* alias */, originalKey);\n  }\n});\n/** @internal */\nfunction validateKey(key) {\n  if (key === null || key === void 0) {\n    throw new Error(\"key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?\");\n  }\n}\nfunction buildAllResponse(resolver, handler, requestor) {\n  if (resolver instanceof ResolverImpl && resolver.strategy === 4 /* array */) {\n    const state = resolver.state;\n    let i = state.length;\n    const results = new Array(i);\n    while (i--) {\n      results[i] = state[i].resolve(handler, requestor);\n    }\n    return results;\n  }\n  return [resolver.resolve(handler, requestor)];\n}\nconst defaultFriendlyName = \"(anonymous)\";\nfunction isObject(value) {\n  return typeof value === \"object\" && value !== null || typeof value === \"function\";\n}\n/**\n * Determine whether the value is a native function.\n *\n * @param fn - The function to check.\n * @returns `true` is the function is a native function, otherwise `false`\n */\nconst isNativeFunction = function () {\n  const lookup = new WeakMap();\n  let isNative = false;\n  let sourceText = \"\";\n  let i = 0;\n  return function (fn) {\n    isNative = lookup.get(fn);\n    if (isNative === void 0) {\n      sourceText = fn.toString();\n      i = sourceText.length;\n      // http://www.ecma-international.org/ecma-262/#prod-NativeFunction\n      isNative =\n      // 29 is the length of 'function () { [native code] }' which is the smallest length of a native function string\n      i >= 29 &&\n      // 100 seems to be a safe upper bound of the max length of a native function. In Chrome and FF it's 56, in Edge it's 61.\n      i <= 100 &&\n      // This whole heuristic *could* be tricked by a comment. Do we need to care about that?\n      sourceText.charCodeAt(i - 1) === 0x7d &&\n      // }\n      // TODO: the spec is a little vague about the precise constraints, so we do need to test this across various browsers to make sure just one whitespace is a safe assumption.\n      sourceText.charCodeAt(i - 2) <= 0x20 &&\n      // whitespace\n      sourceText.charCodeAt(i - 3) === 0x5d &&\n      // ]\n      sourceText.charCodeAt(i - 4) === 0x65 &&\n      // e\n      sourceText.charCodeAt(i - 5) === 0x64 &&\n      // d\n      sourceText.charCodeAt(i - 6) === 0x6f &&\n      // o\n      sourceText.charCodeAt(i - 7) === 0x63 &&\n      // c\n      sourceText.charCodeAt(i - 8) === 0x20 &&\n      //\n      sourceText.charCodeAt(i - 9) === 0x65 &&\n      // e\n      sourceText.charCodeAt(i - 10) === 0x76 &&\n      // v\n      sourceText.charCodeAt(i - 11) === 0x69 &&\n      // i\n      sourceText.charCodeAt(i - 12) === 0x74 &&\n      // t\n      sourceText.charCodeAt(i - 13) === 0x61 &&\n      // a\n      sourceText.charCodeAt(i - 14) === 0x6e &&\n      // n\n      sourceText.charCodeAt(i - 15) === 0x58; // [\n      lookup.set(fn, isNative);\n    }\n    return isNative;\n  };\n}();\nconst isNumericLookup = {};\nfunction isArrayIndex(value) {\n  switch (typeof value) {\n    case \"number\":\n      return value >= 0 && (value | 0) === value;\n    case \"string\":\n      {\n        const result = isNumericLookup[value];\n        if (result !== void 0) {\n          return result;\n        }\n        const length = value.length;\n        if (length === 0) {\n          return isNumericLookup[value] = false;\n        }\n        let ch = 0;\n        for (let i = 0; i < length; ++i) {\n          ch = value.charCodeAt(i);\n          if (i === 0 && ch === 0x30 && length > 1 /* must not start with 0 */ || ch < 0x30 /* 0 */ || ch > 0x39 /* 9 */) {\n            return isNumericLookup[value] = false;\n          }\n        }\n        return isNumericLookup[value] = true;\n      }\n    default:\n      return false;\n  }\n}\n\nfunction presentationKeyFromTag(tagName) {\n  return `${tagName.toLowerCase()}:presentation`;\n}\nconst presentationRegistry = new Map();\n/**\n * An API gateway to component presentation features.\n * @public\n */\nconst ComponentPresentation = Object.freeze({\n  /**\n   * Defines a component presentation for an element.\n   * @param tagName - The element name to define the presentation for.\n   * @param presentation - The presentation that will be applied to matching elements.\n   * @param container - The dependency injection container to register the configuration in.\n   * @public\n   */\n  define(tagName, presentation, container) {\n    const key = presentationKeyFromTag(tagName);\n    const existing = presentationRegistry.get(key);\n    if (existing === void 0) {\n      presentationRegistry.set(key, presentation);\n    } else {\n      // false indicates that we have more than one presentation\n      // registered for a tagName and we must resolve through DI\n      presentationRegistry.set(key, false);\n    }\n    container.register(Registration.instance(key, presentation));\n  },\n  /**\n   * Finds a component presentation for the specified element name,\n   * searching the DOM hierarchy starting from the provided element.\n   * @param tagName - The name of the element to locate the presentation for.\n   * @param element - The element to begin the search from.\n   * @returns The component presentation or null if none is found.\n   * @public\n   */\n  forTag(tagName, element) {\n    const key = presentationKeyFromTag(tagName);\n    const existing = presentationRegistry.get(key);\n    if (existing === false) {\n      const container = DI.findResponsibleContainer(element);\n      return container.get(key);\n    }\n    return existing || null;\n  }\n});\n/**\n * The default implementation of ComponentPresentation, used by FoundationElement.\n * @public\n */\nclass DefaultComponentPresentation {\n  /**\n   * Creates an instance of DefaultComponentPresentation.\n   * @param template - The template to apply to the element.\n   * @param styles - The styles to apply to the element.\n   * @public\n   */\n  constructor(template, styles) {\n    this.template = template || null;\n    this.styles = styles === void 0 ? null : Array.isArray(styles) ? ElementStyles.create(styles) : styles instanceof ElementStyles ? styles : ElementStyles.create([styles]);\n  }\n  /**\n   * Applies the presentation details to the specified element.\n   * @param element - The element to apply the presentation details to.\n   * @public\n   */\n  applyTo(element) {\n    const controller = element.$fastController;\n    if (controller.template === null) {\n      controller.template = this.template;\n    }\n    if (controller.styles === null) {\n      controller.styles = this.styles;\n    }\n  }\n}\n\n/**\n * Defines a foundation element class that:\n * 1. Connects the element to its ComponentPresentation\n * 2. Allows resolving the element template from the instance or ComponentPresentation\n * 3. Allows resolving the element styles from the instance or ComponentPresentation\n *\n * @public\n */\nclass FoundationElement extends FASTElement {\n  constructor() {\n    super(...arguments);\n    this._presentation = void 0;\n  }\n  /**\n   * A property which resolves the ComponentPresentation instance\n   * for the current component.\n   * @public\n   */\n  get $presentation() {\n    if (this._presentation === void 0) {\n      this._presentation = ComponentPresentation.forTag(this.tagName, this);\n    }\n    return this._presentation;\n  }\n  templateChanged() {\n    if (this.template !== undefined) {\n      this.$fastController.template = this.template;\n    }\n  }\n  stylesChanged() {\n    if (this.styles !== undefined) {\n      this.$fastController.styles = this.styles;\n    }\n  }\n  /**\n   * The connected callback for this FASTElement.\n   * @remarks\n   * This method is invoked by the platform whenever this FoundationElement\n   * becomes connected to the document.\n   * @public\n   */\n  connectedCallback() {\n    if (this.$presentation !== null) {\n      this.$presentation.applyTo(this);\n    }\n    super.connectedCallback();\n  }\n  /**\n   * Defines an element registry function with a set of element definition defaults.\n   * @param elementDefinition - The definition of the element to create the registry\n   * function for.\n   * @public\n   */\n  static compose(elementDefinition) {\n    return (overrideDefinition = {}) => new FoundationElementRegistry(this === FoundationElement ? class extends FoundationElement {} : this, elementDefinition, overrideDefinition);\n  }\n}\n__decorate$1([observable], FoundationElement.prototype, \"template\", void 0);\n__decorate$1([observable], FoundationElement.prototype, \"styles\", void 0);\nfunction resolveOption(option, context, definition) {\n  if (typeof option === \"function\") {\n    return option(context, definition);\n  }\n  return option;\n}\n/**\n * Registry capable of defining presentation properties for a DOM Container hierarchy.\n *\n * @internal\n */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nclass FoundationElementRegistry {\n  constructor(type, elementDefinition, overrideDefinition) {\n    this.type = type;\n    this.elementDefinition = elementDefinition;\n    this.overrideDefinition = overrideDefinition;\n    this.definition = Object.assign(Object.assign({}, this.elementDefinition), this.overrideDefinition);\n  }\n  register(container, context) {\n    const definition = this.definition;\n    const overrideDefinition = this.overrideDefinition;\n    const prefix = definition.prefix || context.elementPrefix;\n    const name = `${prefix}-${definition.baseName}`;\n    context.tryDefineElement({\n      name,\n      type: this.type,\n      baseClass: this.elementDefinition.baseClass,\n      callback: x => {\n        const presentation = new DefaultComponentPresentation(resolveOption(definition.template, x, definition), resolveOption(definition.styles, x, definition));\n        x.definePresentation(presentation);\n        let shadowOptions = resolveOption(definition.shadowOptions, x, definition);\n        if (x.shadowRootMode) {\n          // If the design system has overridden the shadow root mode, we need special handling.\n          if (shadowOptions) {\n            // If there are shadow options present in the definition, then\n            // either the component itself has specified an option or the\n            // registry function has overridden it.\n            if (!overrideDefinition.shadowOptions) {\n              // There were shadow options provided by the component and not overridden by\n              // the registry.\n              shadowOptions.mode = x.shadowRootMode;\n            }\n          } else if (shadowOptions !== null) {\n            // If the component author did not provide shadow options,\n            // and did not null them out (light dom opt-in) then they\n            // were relying on the FASTElement default. So, if the\n            // design system provides a mode, we need to create the options\n            // to override the default.\n            shadowOptions = {\n              mode: x.shadowRootMode\n            };\n          }\n        }\n        x.defineElement({\n          elementOptions: resolveOption(definition.elementOptions, x, definition),\n          shadowOptions,\n          attributes: resolveOption(definition.attributes, x, definition)\n        });\n      }\n    });\n  }\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\n/**\n * Apply mixins to a constructor.\n * Sourced from {@link https://www.typescriptlang.org/docs/handbook/mixins.html | TypeScript Documentation }.\n * @public\n */\nfunction applyMixins(derivedCtor, ...baseCtors) {\n  const derivedAttributes = AttributeConfiguration.locate(derivedCtor);\n  baseCtors.forEach(baseCtor => {\n    Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {\n      if (name !== \"constructor\") {\n        Object.defineProperty(derivedCtor.prototype, name, /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n        Object.getOwnPropertyDescriptor(baseCtor.prototype, name));\n      }\n    });\n    const baseAttributes = AttributeConfiguration.locate(baseCtor);\n    baseAttributes.forEach(x => derivedAttributes.push(x));\n  });\n}\n\n/**\n * An individual item in an {@link @microsoft/fast-foundation#(Accordion:class) }.\n *\n * @slot start - Content which can be provided between the heading and the icon\n * @slot end - Content which can be provided between the start slot and icon\n * @slot heading - Content which serves as the accordion item heading and text of the expand button\n * @slot - The default slot for accordion item content\n * @slot expanded-icon - The expanded icon\n * @slot collapsed-icon - The collapsed icon\n * @fires change - Fires a custom 'change' event when the button is invoked\n * @csspart heading - Wraps the button\n * @csspart button - The button which serves to invoke the item\n * @csspart heading-content - Wraps the slot for the heading content within the button\n * @csspart icon - The icon container\n * @csspart expanded-icon - The expanded icon slot\n * @csspart collapsed-icon - The collapsed icon\n * @csspart region - The wrapper for the accordion item content\n *\n * @public\n */\nclass AccordionItem extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * Configures the {@link https://www.w3.org/TR/wai-aria-1.1/#aria-level | level} of the\n     * heading element.\n     *\n     * @defaultValue 2\n     * @public\n     * @remarks\n     * HTML attribute: heading-level\n     */\n    this.headinglevel = 2;\n    /**\n     * Expands or collapses the item.\n     *\n     * @public\n     * @remarks\n     * HTML attribute: expanded\n     */\n    this.expanded = false;\n    /**\n     * @internal\n     */\n    this.clickHandler = e => {\n      this.expanded = !this.expanded;\n      this.change();\n    };\n    this.change = () => {\n      this.$emit(\"change\");\n    };\n  }\n}\n__decorate$1([attr({\n  attribute: \"heading-level\",\n  mode: \"fromView\",\n  converter: nullableNumberConverter\n})], AccordionItem.prototype, \"headinglevel\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], AccordionItem.prototype, \"expanded\", void 0);\n__decorate$1([attr], AccordionItem.prototype, \"id\", void 0);\napplyMixins(AccordionItem, StartEnd);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#Accordion} component.\n * @public\n */\nconst accordionTemplate = (context, definition) => /* TODO: deprecate slot name `item` to only support default slot https://github.com/microsoft/fast/issues/5515 */html`<template><slot ${slotted({\n  property: \"accordionItems\",\n  filter: elements()\n})}></slot><slot name=\"item\" part=\"item\" ${slotted(\"accordionItems\")}></slot></template>`;\n\n/**\n * Standard orientation values\n */\nconst Orientation = {\n  horizontal: \"horizontal\",\n  vertical: \"vertical\"\n};\n\n/**\n * Returns the index of the last element in the array where predicate is true, and -1 otherwise.\n *\n * @param array - the array to test\n * @param predicate - find calls predicate once for each element of the array, in descending order, until it finds one where predicate returns true. If such an element is found, findLastIndex immediately returns that element index. Otherwise, findIndex returns -1.\n */\nfunction findLastIndex(array, predicate) {\n  let k = array.length;\n  while (k--) {\n    if (predicate(array[k], k, array)) {\n      return k;\n    }\n  }\n  return -1;\n}\n\n/**\n * Checks if the DOM is available to access and use\n */\nfunction canUseDOM() {\n  return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n}\n\n/**\n * A test that ensures that all arguments are HTML Elements\n */\nfunction isHTMLElement(...args) {\n  return args.every(arg => arg instanceof HTMLElement);\n}\n/**\n * Returns all displayed elements inside of a root node that match a provided selector\n */\nfunction getDisplayedNodes(rootNode, selector) {\n  if (!rootNode || !selector || !isHTMLElement(rootNode)) {\n    return;\n  }\n  const nodes = Array.from(rootNode.querySelectorAll(selector));\n  // offsetParent will be null if the element isn't currently displayed,\n  // so this will allow us to operate only on visible nodes\n  return nodes.filter(node => node.offsetParent !== null);\n}\n/**\n * Returns the nonce used in the page, if any.\n *\n * Based on https://github.com/cssinjs/jss/blob/master/packages/jss/src/DomRenderer.js\n */\nfunction getNonce() {\n  const node = document.querySelector('meta[property=\"csp-nonce\"]');\n  if (node) {\n    return node.getAttribute(\"content\");\n  } else {\n    return null;\n  }\n}\n/**\n * Test if the document supports :focus-visible\n */\nlet _canUseFocusVisible;\nfunction canUseFocusVisible() {\n  if (typeof _canUseFocusVisible === \"boolean\") {\n    return _canUseFocusVisible;\n  }\n  if (!canUseDOM()) {\n    _canUseFocusVisible = false;\n    return _canUseFocusVisible;\n  }\n  // Check to see if the document supports the focus-visible element\n  const styleElement = document.createElement(\"style\");\n  // If nonces are present on the page, use it when creating the style element\n  // to test focus-visible support.\n  const styleNonce = getNonce();\n  if (styleNonce !== null) {\n    styleElement.setAttribute(\"nonce\", styleNonce);\n  }\n  document.head.appendChild(styleElement);\n  try {\n    styleElement.sheet.insertRule(\"foo:focus-visible {color:inherit}\", 0);\n    _canUseFocusVisible = true;\n  } catch (e) {\n    _canUseFocusVisible = false;\n  } finally {\n    document.head.removeChild(styleElement);\n  }\n  return _canUseFocusVisible;\n}\n\n/**\n * This set of exported strings reference https://developer.mozilla.org/en-US/docs/Web/Events\n * and should include all non-deprecated and non-experimental Standard events\n */\nconst eventFocus = \"focus\";\nconst eventFocusIn = \"focusin\";\nconst eventFocusOut = \"focusout\";\nconst eventKeyDown = \"keydown\";\nconst eventResize = \"resize\";\nconst eventScroll = \"scroll\";\n\n/**\n * Key Code values\n * @deprecated - KeyCodes are deprecated, use individual string key exports\n */\nvar KeyCodes;\n(function (KeyCodes) {\n  KeyCodes[KeyCodes[\"alt\"] = 18] = \"alt\";\n  KeyCodes[KeyCodes[\"arrowDown\"] = 40] = \"arrowDown\";\n  KeyCodes[KeyCodes[\"arrowLeft\"] = 37] = \"arrowLeft\";\n  KeyCodes[KeyCodes[\"arrowRight\"] = 39] = \"arrowRight\";\n  KeyCodes[KeyCodes[\"arrowUp\"] = 38] = \"arrowUp\";\n  KeyCodes[KeyCodes[\"back\"] = 8] = \"back\";\n  KeyCodes[KeyCodes[\"backSlash\"] = 220] = \"backSlash\";\n  KeyCodes[KeyCodes[\"break\"] = 19] = \"break\";\n  KeyCodes[KeyCodes[\"capsLock\"] = 20] = \"capsLock\";\n  KeyCodes[KeyCodes[\"closeBracket\"] = 221] = \"closeBracket\";\n  KeyCodes[KeyCodes[\"colon\"] = 186] = \"colon\";\n  KeyCodes[KeyCodes[\"colon2\"] = 59] = \"colon2\";\n  KeyCodes[KeyCodes[\"comma\"] = 188] = \"comma\";\n  KeyCodes[KeyCodes[\"ctrl\"] = 17] = \"ctrl\";\n  KeyCodes[KeyCodes[\"delete\"] = 46] = \"delete\";\n  KeyCodes[KeyCodes[\"end\"] = 35] = \"end\";\n  KeyCodes[KeyCodes[\"enter\"] = 13] = \"enter\";\n  KeyCodes[KeyCodes[\"equals\"] = 187] = \"equals\";\n  KeyCodes[KeyCodes[\"equals2\"] = 61] = \"equals2\";\n  KeyCodes[KeyCodes[\"equals3\"] = 107] = \"equals3\";\n  KeyCodes[KeyCodes[\"escape\"] = 27] = \"escape\";\n  KeyCodes[KeyCodes[\"forwardSlash\"] = 191] = \"forwardSlash\";\n  KeyCodes[KeyCodes[\"function1\"] = 112] = \"function1\";\n  KeyCodes[KeyCodes[\"function10\"] = 121] = \"function10\";\n  KeyCodes[KeyCodes[\"function11\"] = 122] = \"function11\";\n  KeyCodes[KeyCodes[\"function12\"] = 123] = \"function12\";\n  KeyCodes[KeyCodes[\"function2\"] = 113] = \"function2\";\n  KeyCodes[KeyCodes[\"function3\"] = 114] = \"function3\";\n  KeyCodes[KeyCodes[\"function4\"] = 115] = \"function4\";\n  KeyCodes[KeyCodes[\"function5\"] = 116] = \"function5\";\n  KeyCodes[KeyCodes[\"function6\"] = 117] = \"function6\";\n  KeyCodes[KeyCodes[\"function7\"] = 118] = \"function7\";\n  KeyCodes[KeyCodes[\"function8\"] = 119] = \"function8\";\n  KeyCodes[KeyCodes[\"function9\"] = 120] = \"function9\";\n  KeyCodes[KeyCodes[\"home\"] = 36] = \"home\";\n  KeyCodes[KeyCodes[\"insert\"] = 45] = \"insert\";\n  KeyCodes[KeyCodes[\"menu\"] = 93] = \"menu\";\n  KeyCodes[KeyCodes[\"minus\"] = 189] = \"minus\";\n  KeyCodes[KeyCodes[\"minus2\"] = 109] = \"minus2\";\n  KeyCodes[KeyCodes[\"numLock\"] = 144] = \"numLock\";\n  KeyCodes[KeyCodes[\"numPad0\"] = 96] = \"numPad0\";\n  KeyCodes[KeyCodes[\"numPad1\"] = 97] = \"numPad1\";\n  KeyCodes[KeyCodes[\"numPad2\"] = 98] = \"numPad2\";\n  KeyCodes[KeyCodes[\"numPad3\"] = 99] = \"numPad3\";\n  KeyCodes[KeyCodes[\"numPad4\"] = 100] = \"numPad4\";\n  KeyCodes[KeyCodes[\"numPad5\"] = 101] = \"numPad5\";\n  KeyCodes[KeyCodes[\"numPad6\"] = 102] = \"numPad6\";\n  KeyCodes[KeyCodes[\"numPad7\"] = 103] = \"numPad7\";\n  KeyCodes[KeyCodes[\"numPad8\"] = 104] = \"numPad8\";\n  KeyCodes[KeyCodes[\"numPad9\"] = 105] = \"numPad9\";\n  KeyCodes[KeyCodes[\"numPadDivide\"] = 111] = \"numPadDivide\";\n  KeyCodes[KeyCodes[\"numPadDot\"] = 110] = \"numPadDot\";\n  KeyCodes[KeyCodes[\"numPadMinus\"] = 109] = \"numPadMinus\";\n  KeyCodes[KeyCodes[\"numPadMultiply\"] = 106] = \"numPadMultiply\";\n  KeyCodes[KeyCodes[\"numPadPlus\"] = 107] = \"numPadPlus\";\n  KeyCodes[KeyCodes[\"openBracket\"] = 219] = \"openBracket\";\n  KeyCodes[KeyCodes[\"pageDown\"] = 34] = \"pageDown\";\n  KeyCodes[KeyCodes[\"pageUp\"] = 33] = \"pageUp\";\n  KeyCodes[KeyCodes[\"period\"] = 190] = \"period\";\n  KeyCodes[KeyCodes[\"print\"] = 44] = \"print\";\n  KeyCodes[KeyCodes[\"quote\"] = 222] = \"quote\";\n  KeyCodes[KeyCodes[\"scrollLock\"] = 145] = \"scrollLock\";\n  KeyCodes[KeyCodes[\"shift\"] = 16] = \"shift\";\n  KeyCodes[KeyCodes[\"space\"] = 32] = \"space\";\n  KeyCodes[KeyCodes[\"tab\"] = 9] = \"tab\";\n  KeyCodes[KeyCodes[\"tilde\"] = 192] = \"tilde\";\n  KeyCodes[KeyCodes[\"windowsLeft\"] = 91] = \"windowsLeft\";\n  KeyCodes[KeyCodes[\"windowsOpera\"] = 219] = \"windowsOpera\";\n  KeyCodes[KeyCodes[\"windowsRight\"] = 92] = \"windowsRight\";\n})(KeyCodes || (KeyCodes = {}));\n/**\n * String values for use with KeyboardEvent.key\n */\nconst keyArrowDown = \"ArrowDown\";\nconst keyArrowLeft = \"ArrowLeft\";\nconst keyArrowRight = \"ArrowRight\";\nconst keyArrowUp = \"ArrowUp\";\nconst keyEnter = \"Enter\";\nconst keyEscape = \"Escape\";\nconst keyHome = \"Home\";\nconst keyEnd = \"End\";\nconst keyFunction2 = \"F2\";\nconst keyPageDown = \"PageDown\";\nconst keyPageUp = \"PageUp\";\nconst keySpace = \" \";\nconst keyTab = \"Tab\";\nconst ArrowKeys = {\n  ArrowDown: keyArrowDown,\n  ArrowLeft: keyArrowLeft,\n  ArrowRight: keyArrowRight,\n  ArrowUp: keyArrowUp\n};\n\n/**\n * Expose ltr and rtl strings\n */\nvar Direction;\n(function (Direction) {\n  Direction[\"ltr\"] = \"ltr\";\n  Direction[\"rtl\"] = \"rtl\";\n})(Direction || (Direction = {}));\n\n/**\n * This method keeps a given value within the bounds of a min and max value. If the value\n * is larger than the max, the minimum value will be returned. If the value is smaller than the minimum,\n * the maximum will be returned. Otherwise, the value is returned un-changed.\n */\nfunction wrapInBounds(min, max, value) {\n  if (value < min) {\n    return max;\n  } else if (value > max) {\n    return min;\n  }\n  return value;\n}\n/**\n * Ensures that a value is between a min and max value. If value is lower than min, min will be returned.\n * If value is greater than max, max will be returned.\n */\nfunction limit(min, max, value) {\n  return Math.min(Math.max(value, min), max);\n}\n/**\n * Determines if a number value is within a specified range.\n *\n * @param value - the value to check\n * @param min - the range start\n * @param max - the range end\n */\nfunction inRange(value, min, max = 0) {\n  [min, max] = [min, max].sort((a, b) => a - b);\n  return min <= value && value < max;\n}\n\nlet uniqueIdCounter = 0;\n/**\n * Generates a unique ID based on incrementing a counter.\n */\nfunction uniqueId(prefix = \"\") {\n  return `${prefix}${uniqueIdCounter++}`;\n}\n\n/**\n * Define system colors for use in CSS stylesheets.\n *\n * https://drafts.csswg.org/css-color/#css-system-colors\n */\nvar SystemColors;\n(function (SystemColors) {\n  SystemColors[\"Canvas\"] = \"Canvas\";\n  SystemColors[\"CanvasText\"] = \"CanvasText\";\n  SystemColors[\"LinkText\"] = \"LinkText\";\n  SystemColors[\"VisitedText\"] = \"VisitedText\";\n  SystemColors[\"ActiveText\"] = \"ActiveText\";\n  SystemColors[\"ButtonFace\"] = \"ButtonFace\";\n  SystemColors[\"ButtonText\"] = \"ButtonText\";\n  SystemColors[\"Field\"] = \"Field\";\n  SystemColors[\"FieldText\"] = \"FieldText\";\n  SystemColors[\"Highlight\"] = \"Highlight\";\n  SystemColors[\"HighlightText\"] = \"HighlightText\";\n  SystemColors[\"GrayText\"] = \"GrayText\";\n})(SystemColors || (SystemColors = {}));\n\n/**\n * Expand mode for {@link Accordion}\n * @public\n */\nconst AccordionExpandMode = {\n  /**\n   * Designates only a single {@link @microsoft/fast-foundation#(AccordionItem:class) } can be open a time.\n   */\n  single: \"single\",\n  /**\n   * Designates multiple {@link @microsoft/fast-foundation#(AccordionItem:class) | AccordionItems} can be open simultaneously.\n   */\n  multi: \"multi\"\n};\n/**\n * An Accordion Custom HTML Element\n * Implements {@link https://www.w3.org/TR/wai-aria-practices-1.1/#accordion | ARIA Accordion}.\n *\n * @fires change - Fires a custom 'change' event when the active item changes\n * @csspart item - The slot for the accordion items\n * @public\n *\n * @remarks\n * Designed to be used with {@link @microsoft/fast-foundation#accordionTemplate} and {@link @microsoft/fast-foundation#(AccordionItem:class)}.\n */\nclass Accordion extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * Controls the expand mode of the Accordion, either allowing\n     * single or multiple item expansion.\n     * @public\n     *\n     * @remarks\n     * HTML attribute: expand-mode\n     */\n    this.expandmode = AccordionExpandMode.multi;\n    this.activeItemIndex = 0;\n    this.change = () => {\n      this.$emit(\"change\", this.activeid);\n    };\n    this.setItems = () => {\n      var _a;\n      if (this.accordionItems.length === 0) {\n        return;\n      }\n      this.accordionIds = this.getItemIds();\n      this.accordionItems.forEach((item, index) => {\n        if (item instanceof AccordionItem) {\n          item.addEventListener(\"change\", this.activeItemChange);\n          if (this.isSingleExpandMode()) {\n            this.activeItemIndex !== index ? item.expanded = false : item.expanded = true;\n          }\n        }\n        const itemId = this.accordionIds[index];\n        item.setAttribute(\"id\", typeof itemId !== \"string\" ? `accordion-${index + 1}` : itemId);\n        this.activeid = this.accordionIds[this.activeItemIndex];\n        item.addEventListener(\"keydown\", this.handleItemKeyDown);\n        item.addEventListener(\"focus\", this.handleItemFocus);\n      });\n      if (this.isSingleExpandMode()) {\n        const expandedItem = (_a = this.findExpandedItem()) !== null && _a !== void 0 ? _a : this.accordionItems[0];\n        expandedItem.setAttribute(\"aria-disabled\", \"true\");\n      }\n    };\n    this.removeItemListeners = oldValue => {\n      oldValue.forEach((item, index) => {\n        item.removeEventListener(\"change\", this.activeItemChange);\n        item.removeEventListener(\"keydown\", this.handleItemKeyDown);\n        item.removeEventListener(\"focus\", this.handleItemFocus);\n      });\n    };\n    this.activeItemChange = event => {\n      if (event.defaultPrevented || event.target !== event.currentTarget) {\n        return;\n      }\n      event.preventDefault();\n      const selectedItem = event.target;\n      this.activeid = selectedItem.getAttribute(\"id\");\n      if (this.isSingleExpandMode()) {\n        this.resetItems();\n        selectedItem.expanded = true;\n        selectedItem.setAttribute(\"aria-disabled\", \"true\");\n        this.accordionItems.forEach(item => {\n          if (!item.hasAttribute(\"disabled\") && item.id !== this.activeid) {\n            item.removeAttribute(\"aria-disabled\");\n          }\n        });\n      }\n      this.activeItemIndex = Array.from(this.accordionItems).indexOf(selectedItem);\n      this.change();\n    };\n    this.handleItemKeyDown = event => {\n      // only handle the keydown if the event target is the accordion item\n      // prevents arrow keys from moving focus to accordion headers when focus is on accordion item panel content\n      if (event.target !== event.currentTarget) {\n        return;\n      }\n      this.accordionIds = this.getItemIds();\n      switch (event.key) {\n        case keyArrowUp:\n          event.preventDefault();\n          this.adjust(-1);\n          break;\n        case keyArrowDown:\n          event.preventDefault();\n          this.adjust(1);\n          break;\n        case keyHome:\n          this.activeItemIndex = 0;\n          this.focusItem();\n          break;\n        case keyEnd:\n          this.activeItemIndex = this.accordionItems.length - 1;\n          this.focusItem();\n          break;\n      }\n    };\n    this.handleItemFocus = event => {\n      // update the active item index if the focus moves to an accordion item via a different method other than the up and down arrow key actions\n      // only do so if the focus is actually on the accordion item and not on any of its children\n      if (event.target === event.currentTarget) {\n        const focusedItem = event.target;\n        const focusedIndex = this.activeItemIndex = Array.from(this.accordionItems).indexOf(focusedItem);\n        if (this.activeItemIndex !== focusedIndex && focusedIndex !== -1) {\n          this.activeItemIndex = focusedIndex;\n          this.activeid = this.accordionIds[this.activeItemIndex];\n        }\n      }\n    };\n  }\n  /**\n   * @internal\n   */\n  accordionItemsChanged(oldValue, newValue) {\n    if (this.$fastController.isConnected) {\n      this.removeItemListeners(oldValue);\n      this.setItems();\n    }\n  }\n  findExpandedItem() {\n    for (let item = 0; item < this.accordionItems.length; item++) {\n      if (this.accordionItems[item].getAttribute(\"expanded\") === \"true\") {\n        return this.accordionItems[item];\n      }\n    }\n    return null;\n  }\n  resetItems() {\n    this.accordionItems.forEach((item, index) => {\n      item.expanded = false;\n    });\n  }\n  getItemIds() {\n    return this.accordionItems.map(accordionItem => {\n      return accordionItem.getAttribute(\"id\");\n    });\n  }\n  isSingleExpandMode() {\n    return this.expandmode === AccordionExpandMode.single;\n  }\n  adjust(adjustment) {\n    this.activeItemIndex = wrapInBounds(0, this.accordionItems.length - 1, this.activeItemIndex + adjustment);\n    this.focusItem();\n  }\n  focusItem() {\n    const element = this.accordionItems[this.activeItemIndex];\n    if (element instanceof AccordionItem) {\n      element.expandbutton.focus();\n    }\n  }\n}\n__decorate$1([attr({\n  attribute: \"expand-mode\"\n})], Accordion.prototype, \"expandmode\", void 0);\n__decorate$1([observable], Accordion.prototype, \"accordionItems\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(Anchor:class)} component.\n * @public\n */\nconst anchorTemplate = (context, definition) => html`<a class=\"control\" part=\"control\" download=\"${x => x.download}\" href=\"${x => x.href}\" hreflang=\"${x => x.hreflang}\" ping=\"${x => x.ping}\" referrerpolicy=\"${x => x.referrerpolicy}\" rel=\"${x => x.rel}\" target=\"${x => x.target}\" type=\"${x => x.type}\" aria-atomic=\"${x => x.ariaAtomic}\" aria-busy=\"${x => x.ariaBusy}\" aria-controls=\"${x => x.ariaControls}\" aria-current=\"${x => x.ariaCurrent}\" aria-describedby=\"${x => x.ariaDescribedby}\" aria-details=\"${x => x.ariaDetails}\" aria-disabled=\"${x => x.ariaDisabled}\" aria-errormessage=\"${x => x.ariaErrormessage}\" aria-expanded=\"${x => x.ariaExpanded}\" aria-flowto=\"${x => x.ariaFlowto}\" aria-haspopup=\"${x => x.ariaHaspopup}\" aria-hidden=\"${x => x.ariaHidden}\" aria-invalid=\"${x => x.ariaInvalid}\" aria-keyshortcuts=\"${x => x.ariaKeyshortcuts}\" aria-label=\"${x => x.ariaLabel}\" aria-labelledby=\"${x => x.ariaLabelledby}\" aria-live=\"${x => x.ariaLive}\" aria-owns=\"${x => x.ariaOwns}\" aria-relevant=\"${x => x.ariaRelevant}\" aria-roledescription=\"${x => x.ariaRoledescription}\" ${ref(\"control\")}>${startSlotTemplate(context, definition)}<span class=\"content\" part=\"content\"><slot ${slotted(\"defaultSlottedContent\")}></slot></span>${endSlotTemplate(context, definition)}</a>`;\n\n/**\n * Some states and properties are applicable to all host language elements regardless of whether a role is applied.\n * The following global states and properties are supported by all roles and by all base markup elements.\n * {@link https://www.w3.org/TR/wai-aria-1.1/#global_states}\n *\n * This is intended to be used as a mixin. Be sure you extend FASTElement.\n *\n * @public\n */\nclass ARIAGlobalStatesAndProperties {}\n__decorate$1([attr({\n  attribute: \"aria-atomic\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaAtomic\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-busy\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaBusy\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-controls\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaControls\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-current\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaCurrent\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-describedby\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaDescribedby\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-details\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaDetails\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-disabled\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaDisabled\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-errormessage\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaErrormessage\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-flowto\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaFlowto\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-haspopup\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaHaspopup\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-hidden\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaHidden\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-invalid\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaInvalid\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-keyshortcuts\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaKeyshortcuts\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-label\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaLabel\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-labelledby\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaLabelledby\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-live\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaLive\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-owns\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaOwns\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-relevant\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaRelevant\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-roledescription\"\n})], ARIAGlobalStatesAndProperties.prototype, \"ariaRoledescription\", void 0);\n\n/**\n * An Anchor Custom HTML Element.\n * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.\n *\n * @slot start - Content which can be provided before the anchor content\n * @slot end - Content which can be provided after the anchor content\n * @slot - The default slot for anchor content\n * @csspart control - The anchor element\n * @csspart content - The element wrapping anchor content\n *\n * @public\n */\nclass Anchor$1 extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * Overrides the focus call for where delegatesFocus is unsupported.\n     * This check works for Chrome, Edge Chromium, FireFox, and Safari\n     * Relevant PR on the Firefox browser: https://phabricator.services.mozilla.com/D123858\n     */\n    this.handleUnsupportedDelegatesFocus = () => {\n      var _a;\n      // Check to see if delegatesFocus is supported\n      if (window.ShadowRoot && !window.ShadowRoot.prototype.hasOwnProperty(\"delegatesFocus\") && ((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {\n        this.focus = () => {\n          var _a;\n          (_a = this.control) === null || _a === void 0 ? void 0 : _a.focus();\n        };\n      }\n    };\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    this.handleUnsupportedDelegatesFocus();\n  }\n}\n__decorate$1([attr], Anchor$1.prototype, \"download\", void 0);\n__decorate$1([attr], Anchor$1.prototype, \"href\", void 0);\n__decorate$1([attr], Anchor$1.prototype, \"hreflang\", void 0);\n__decorate$1([attr], Anchor$1.prototype, \"ping\", void 0);\n__decorate$1([attr], Anchor$1.prototype, \"referrerpolicy\", void 0);\n__decorate$1([attr], Anchor$1.prototype, \"rel\", void 0);\n__decorate$1([attr], Anchor$1.prototype, \"target\", void 0);\n__decorate$1([attr], Anchor$1.prototype, \"type\", void 0);\n__decorate$1([observable], Anchor$1.prototype, \"defaultSlottedContent\", void 0);\n/**\n * Includes ARIA states and properties relating to the ARIA link role\n *\n * @public\n */\nclass DelegatesARIALink {}\n__decorate$1([attr({\n  attribute: \"aria-expanded\"\n})], DelegatesARIALink.prototype, \"ariaExpanded\", void 0);\napplyMixins(DelegatesARIALink, ARIAGlobalStatesAndProperties);\napplyMixins(Anchor$1, StartEnd, DelegatesARIALink);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(AnchoredRegion:class)} component.\n * @public\n */\nconst anchoredRegionTemplate = (context, definition) => html`<template class=\"${x => x.initialLayoutComplete ? \"loaded\" : \"\"}\">${when(x => x.initialLayoutComplete, html`<slot></slot>`)}</template>`;\n\n/**\n * a method to determine the current localization direction of the view\n * @param rootNode - the HTMLElement to begin the query from, usually \"this\" when used in a component controller\n * @public\n */\nconst getDirection = rootNode => {\n  const dirNode = rootNode.closest(\"[dir]\");\n  return dirNode !== null && dirNode.dir === \"rtl\" ? Direction.rtl : Direction.ltr;\n};\n\n/**\n *  A service to batch intersection event callbacks so multiple elements can share a single observer\n *\n * @public\n */\nclass IntersectionService {\n  constructor() {\n    this.intersectionDetector = null;\n    this.observedElements = new Map();\n    /**\n     * Request the position of a target element\n     *\n     * @internal\n     */\n    this.requestPosition = (target, callback) => {\n      var _a;\n      if (this.intersectionDetector === null) {\n        return;\n      }\n      if (this.observedElements.has(target)) {\n        (_a = this.observedElements.get(target)) === null || _a === void 0 ? void 0 : _a.push(callback);\n        return;\n      }\n      this.observedElements.set(target, [callback]);\n      this.intersectionDetector.observe(target);\n    };\n    /**\n     * Cancel a position request\n     *\n     * @internal\n     */\n    this.cancelRequestPosition = (target, callback) => {\n      const callbacks = this.observedElements.get(target);\n      if (callbacks !== undefined) {\n        const callBackIndex = callbacks.indexOf(callback);\n        if (callBackIndex !== -1) {\n          callbacks.splice(callBackIndex, 1);\n        }\n      }\n    };\n    /**\n     * initialize intersection detector\n     */\n    this.initializeIntersectionDetector = () => {\n      if (!$global.IntersectionObserver) {\n        //intersection observer not supported\n        return;\n      }\n      this.intersectionDetector = new IntersectionObserver(this.handleIntersection, {\n        root: null,\n        rootMargin: \"0px\",\n        threshold: [0, 1]\n      });\n    };\n    /**\n     *  Handle intersections\n     */\n    this.handleIntersection = entries => {\n      if (this.intersectionDetector === null) {\n        return;\n      }\n      const pendingCallbacks = [];\n      const pendingCallbackParams = [];\n      // go through the entries to build a list of callbacks and params for each\n      entries.forEach(entry => {\n        var _a;\n        // stop watching this element until we get new update requests for it\n        (_a = this.intersectionDetector) === null || _a === void 0 ? void 0 : _a.unobserve(entry.target);\n        const thisElementCallbacks = this.observedElements.get(entry.target);\n        if (thisElementCallbacks !== undefined) {\n          thisElementCallbacks.forEach(callback => {\n            let targetCallbackIndex = pendingCallbacks.indexOf(callback);\n            if (targetCallbackIndex === -1) {\n              targetCallbackIndex = pendingCallbacks.length;\n              pendingCallbacks.push(callback);\n              pendingCallbackParams.push([]);\n            }\n            pendingCallbackParams[targetCallbackIndex].push(entry);\n          });\n          this.observedElements.delete(entry.target);\n        }\n      });\n      // execute callbacks\n      pendingCallbacks.forEach((callback, index) => {\n        callback(pendingCallbackParams[index]);\n      });\n    };\n    this.initializeIntersectionDetector();\n  }\n}\n\n/**\n * An anchored region Custom HTML Element.\n *\n * @slot - The default slot for the content\n * @fires loaded - Fires a custom 'loaded' event when the region is loaded and visible\n * @fires positionchange - Fires a custom 'positionchange' event when the position has changed\n *\n * @public\n */\nclass AnchoredRegion extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * The HTML ID of the anchor element this region is positioned relative to\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: anchor\n     */\n    this.anchor = \"\";\n    /**\n     * The HTML ID of the viewport element this region is positioned relative to\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: anchor\n     */\n    this.viewport = \"\";\n    /**\n     * Sets what logic the component uses to determine horizontal placement.\n     * 'locktodefault' forces the default position\n     * 'dynamic' decides placement based on available space\n     * 'uncontrolled' does not control placement on the horizontal axis\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: horizontal-positioning-mode\n     */\n    this.horizontalPositioningMode = \"uncontrolled\";\n    /**\n     * The default horizontal position of the region relative to the anchor element\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: horizontal-default-position\n     */\n    this.horizontalDefaultPosition = \"unset\";\n    /**\n     * Whether the region remains in the viewport (ie. detaches from the anchor) on the horizontal axis\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: horizontal-viewport-lock\n     */\n    this.horizontalViewportLock = false;\n    /**\n     * Whether the region overlaps the anchor on the horizontal axis\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: horizontal-inset\n     */\n    this.horizontalInset = false;\n    /**\n     * Defines how the width of the region is calculated\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: horizontal-scaling\n     */\n    this.horizontalScaling = \"content\";\n    /**\n     * Sets what logic the component uses to determine vertical placement.\n     * 'locktodefault' forces the default position\n     * 'dynamic' decides placement based on available space\n     * 'uncontrolled' does not control placement on the vertical axis\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: vertical-positioning-mode\n     */\n    this.verticalPositioningMode = \"uncontrolled\";\n    /**\n     * The default vertical position of the region relative to the anchor element\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: vertical-default-position\n     */\n    this.verticalDefaultPosition = \"unset\";\n    /**\n     * Whether the region remains in the viewport (ie. detaches from the anchor) on the vertical axis\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: vertical-viewport-lock\n     */\n    this.verticalViewportLock = false;\n    /**\n     * Whether the region overlaps the anchor on the vertical axis\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: vertical-inset\n     */\n    this.verticalInset = false;\n    /**\n     * Defines how the height of the region is calculated\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: vertical-scaling\n     */\n    this.verticalScaling = \"content\";\n    /**\n     * Whether the region is positioned using css \"position: fixed\".\n     * Otherwise the region uses \"position: absolute\".\n     * Fixed placement allows the region to break out of parent containers,\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: fixed-placement\n     */\n    this.fixedPlacement = false;\n    /**\n     * Defines what triggers the anchored region to revaluate positioning\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: auto-update-mode\n     */\n    this.autoUpdateMode = \"anchor\";\n    /**\n     * The HTML element being used as the anchor\n     *\n     * @public\n     */\n    this.anchorElement = null;\n    /**\n     * The HTML element being used as the viewport\n     *\n     * @public\n     */\n    this.viewportElement = null;\n    /**\n     * indicates that an initial positioning pass on layout has completed\n     *\n     * @internal\n     */\n    this.initialLayoutComplete = false;\n    this.resizeDetector = null;\n    /**\n     * base offsets between the positioner's base position and the anchor's\n     */\n    this.baseHorizontalOffset = 0;\n    this.baseVerticalOffset = 0;\n    this.pendingPositioningUpdate = false;\n    this.pendingReset = false;\n    this.currentDirection = Direction.ltr;\n    this.regionVisible = false;\n    // indicates that a layout update should occur even if geometry has not changed\n    // used to ensure some attribute changes are applied\n    this.forceUpdate = false;\n    // defines how big a difference in pixels there must be between states to\n    // justify a layout update that affects the dom (prevents repeated sub-pixel corrections)\n    this.updateThreshold = 0.5;\n    /**\n     * update position\n     */\n    this.update = () => {\n      if (!this.pendingPositioningUpdate) {\n        this.requestPositionUpdates();\n      }\n    };\n    /**\n     * starts observers\n     */\n    this.startObservers = () => {\n      this.stopObservers();\n      if (this.anchorElement === null) {\n        return;\n      }\n      this.requestPositionUpdates();\n      if (this.resizeDetector !== null) {\n        this.resizeDetector.observe(this.anchorElement);\n        this.resizeDetector.observe(this);\n      }\n    };\n    /**\n     * get position updates\n     */\n    this.requestPositionUpdates = () => {\n      if (this.anchorElement === null || this.pendingPositioningUpdate) {\n        return;\n      }\n      AnchoredRegion.intersectionService.requestPosition(this, this.handleIntersection);\n      AnchoredRegion.intersectionService.requestPosition(this.anchorElement, this.handleIntersection);\n      if (this.viewportElement !== null) {\n        AnchoredRegion.intersectionService.requestPosition(this.viewportElement, this.handleIntersection);\n      }\n      this.pendingPositioningUpdate = true;\n    };\n    /**\n     * stops observers\n     */\n    this.stopObservers = () => {\n      if (this.pendingPositioningUpdate) {\n        this.pendingPositioningUpdate = false;\n        AnchoredRegion.intersectionService.cancelRequestPosition(this, this.handleIntersection);\n        if (this.anchorElement !== null) {\n          AnchoredRegion.intersectionService.cancelRequestPosition(this.anchorElement, this.handleIntersection);\n        }\n        if (this.viewportElement !== null) {\n          AnchoredRegion.intersectionService.cancelRequestPosition(this.viewportElement, this.handleIntersection);\n        }\n      }\n      if (this.resizeDetector !== null) {\n        this.resizeDetector.disconnect();\n      }\n    };\n    /**\n     * Gets the viewport element by id, or defaults to document root\n     */\n    this.getViewport = () => {\n      if (typeof this.viewport !== \"string\" || this.viewport === \"\") {\n        return document.documentElement;\n      }\n      return document.getElementById(this.viewport);\n    };\n    /**\n     *  Gets the anchor element by id\n     */\n    this.getAnchor = () => {\n      return document.getElementById(this.anchor);\n    };\n    /**\n     *  Handle intersections\n     */\n    this.handleIntersection = entries => {\n      if (!this.pendingPositioningUpdate) {\n        return;\n      }\n      this.pendingPositioningUpdate = false;\n      if (!this.applyIntersectionEntries(entries)) {\n        return;\n      }\n      this.updateLayout();\n    };\n    /**\n     *  iterate through intersection entries and apply data\n     */\n    this.applyIntersectionEntries = entries => {\n      const regionEntry = entries.find(x => x.target === this);\n      const anchorEntry = entries.find(x => x.target === this.anchorElement);\n      const viewportEntry = entries.find(x => x.target === this.viewportElement);\n      if (regionEntry === undefined || viewportEntry === undefined || anchorEntry === undefined) {\n        return false;\n      }\n      // don't update the dom unless there is a significant difference in rect positions\n      if (!this.regionVisible || this.forceUpdate || this.regionRect === undefined || this.anchorRect === undefined || this.viewportRect === undefined || this.isRectDifferent(this.anchorRect, anchorEntry.boundingClientRect) || this.isRectDifferent(this.viewportRect, viewportEntry.boundingClientRect) || this.isRectDifferent(this.regionRect, regionEntry.boundingClientRect)) {\n        this.regionRect = regionEntry.boundingClientRect;\n        this.anchorRect = anchorEntry.boundingClientRect;\n        if (this.viewportElement === document.documentElement) {\n          this.viewportRect = new DOMRectReadOnly(viewportEntry.boundingClientRect.x + document.documentElement.scrollLeft, viewportEntry.boundingClientRect.y + document.documentElement.scrollTop, viewportEntry.boundingClientRect.width, viewportEntry.boundingClientRect.height);\n        } else {\n          this.viewportRect = viewportEntry.boundingClientRect;\n        }\n        this.updateRegionOffset();\n        this.forceUpdate = false;\n        return true;\n      }\n      return false;\n    };\n    /**\n     *  Update the offset values\n     */\n    this.updateRegionOffset = () => {\n      if (this.anchorRect && this.regionRect) {\n        this.baseHorizontalOffset = this.baseHorizontalOffset + (this.anchorRect.left - this.regionRect.left) + (this.translateX - this.baseHorizontalOffset);\n        this.baseVerticalOffset = this.baseVerticalOffset + (this.anchorRect.top - this.regionRect.top) + (this.translateY - this.baseVerticalOffset);\n      }\n    };\n    /**\n     *  compare rects to see if there is enough change to justify a DOM update\n     */\n    this.isRectDifferent = (rectA, rectB) => {\n      if (Math.abs(rectA.top - rectB.top) > this.updateThreshold || Math.abs(rectA.right - rectB.right) > this.updateThreshold || Math.abs(rectA.bottom - rectB.bottom) > this.updateThreshold || Math.abs(rectA.left - rectB.left) > this.updateThreshold) {\n        return true;\n      }\n      return false;\n    };\n    /**\n     *  Handle resize events\n     */\n    this.handleResize = entries => {\n      this.update();\n    };\n    /**\n     * resets the component\n     */\n    this.reset = () => {\n      if (!this.pendingReset) {\n        return;\n      }\n      this.pendingReset = false;\n      if (this.anchorElement === null) {\n        this.anchorElement = this.getAnchor();\n      }\n      if (this.viewportElement === null) {\n        this.viewportElement = this.getViewport();\n      }\n      this.currentDirection = getDirection(this);\n      this.startObservers();\n    };\n    /**\n     *  Recalculate layout related state values\n     */\n    this.updateLayout = () => {\n      let desiredVerticalPosition = undefined;\n      let desiredHorizontalPosition = undefined;\n      if (this.horizontalPositioningMode !== \"uncontrolled\") {\n        const horizontalOptions = this.getPositioningOptions(this.horizontalInset);\n        if (this.horizontalDefaultPosition === \"center\") {\n          desiredHorizontalPosition = \"center\";\n        } else if (this.horizontalDefaultPosition !== \"unset\") {\n          let dirCorrectedHorizontalDefaultPosition = this.horizontalDefaultPosition;\n          if (dirCorrectedHorizontalDefaultPosition === \"start\" || dirCorrectedHorizontalDefaultPosition === \"end\") {\n            // if direction changes we reset the layout\n            const newDirection = getDirection(this);\n            if (newDirection !== this.currentDirection) {\n              this.currentDirection = newDirection;\n              this.initialize();\n              return;\n            }\n            if (this.currentDirection === Direction.ltr) {\n              dirCorrectedHorizontalDefaultPosition = dirCorrectedHorizontalDefaultPosition === \"start\" ? \"left\" : \"right\";\n            } else {\n              dirCorrectedHorizontalDefaultPosition = dirCorrectedHorizontalDefaultPosition === \"start\" ? \"right\" : \"left\";\n            }\n          }\n          switch (dirCorrectedHorizontalDefaultPosition) {\n            case \"left\":\n              desiredHorizontalPosition = this.horizontalInset ? \"insetStart\" : \"start\";\n              break;\n            case \"right\":\n              desiredHorizontalPosition = this.horizontalInset ? \"insetEnd\" : \"end\";\n              break;\n          }\n        }\n        const horizontalThreshold = this.horizontalThreshold !== undefined ? this.horizontalThreshold : this.regionRect !== undefined ? this.regionRect.width : 0;\n        const anchorLeft = this.anchorRect !== undefined ? this.anchorRect.left : 0;\n        const anchorRight = this.anchorRect !== undefined ? this.anchorRect.right : 0;\n        const anchorWidth = this.anchorRect !== undefined ? this.anchorRect.width : 0;\n        const viewportLeft = this.viewportRect !== undefined ? this.viewportRect.left : 0;\n        const viewportRight = this.viewportRect !== undefined ? this.viewportRect.right : 0;\n        if (desiredHorizontalPosition === undefined || !(this.horizontalPositioningMode === \"locktodefault\") && this.getAvailableSpace(desiredHorizontalPosition, anchorLeft, anchorRight, anchorWidth, viewportLeft, viewportRight) < horizontalThreshold) {\n          desiredHorizontalPosition = this.getAvailableSpace(horizontalOptions[0], anchorLeft, anchorRight, anchorWidth, viewportLeft, viewportRight) > this.getAvailableSpace(horizontalOptions[1], anchorLeft, anchorRight, anchorWidth, viewportLeft, viewportRight) ? horizontalOptions[0] : horizontalOptions[1];\n        }\n      }\n      if (this.verticalPositioningMode !== \"uncontrolled\") {\n        const verticalOptions = this.getPositioningOptions(this.verticalInset);\n        if (this.verticalDefaultPosition === \"center\") {\n          desiredVerticalPosition = \"center\";\n        } else if (this.verticalDefaultPosition !== \"unset\") {\n          switch (this.verticalDefaultPosition) {\n            case \"top\":\n              desiredVerticalPosition = this.verticalInset ? \"insetStart\" : \"start\";\n              break;\n            case \"bottom\":\n              desiredVerticalPosition = this.verticalInset ? \"insetEnd\" : \"end\";\n              break;\n          }\n        }\n        const verticalThreshold = this.verticalThreshold !== undefined ? this.verticalThreshold : this.regionRect !== undefined ? this.regionRect.height : 0;\n        const anchorTop = this.anchorRect !== undefined ? this.anchorRect.top : 0;\n        const anchorBottom = this.anchorRect !== undefined ? this.anchorRect.bottom : 0;\n        const anchorHeight = this.anchorRect !== undefined ? this.anchorRect.height : 0;\n        const viewportTop = this.viewportRect !== undefined ? this.viewportRect.top : 0;\n        const viewportBottom = this.viewportRect !== undefined ? this.viewportRect.bottom : 0;\n        if (desiredVerticalPosition === undefined || !(this.verticalPositioningMode === \"locktodefault\") && this.getAvailableSpace(desiredVerticalPosition, anchorTop, anchorBottom, anchorHeight, viewportTop, viewportBottom) < verticalThreshold) {\n          desiredVerticalPosition = this.getAvailableSpace(verticalOptions[0], anchorTop, anchorBottom, anchorHeight, viewportTop, viewportBottom) > this.getAvailableSpace(verticalOptions[1], anchorTop, anchorBottom, anchorHeight, viewportTop, viewportBottom) ? verticalOptions[0] : verticalOptions[1];\n        }\n      }\n      const nextPositionerDimension = this.getNextRegionDimension(desiredHorizontalPosition, desiredVerticalPosition);\n      const positionChanged = this.horizontalPosition !== desiredHorizontalPosition || this.verticalPosition !== desiredVerticalPosition;\n      this.setHorizontalPosition(desiredHorizontalPosition, nextPositionerDimension);\n      this.setVerticalPosition(desiredVerticalPosition, nextPositionerDimension);\n      this.updateRegionStyle();\n      if (!this.initialLayoutComplete) {\n        this.initialLayoutComplete = true;\n        this.requestPositionUpdates();\n        return;\n      }\n      if (!this.regionVisible) {\n        this.regionVisible = true;\n        this.style.removeProperty(\"pointer-events\");\n        this.style.removeProperty(\"opacity\");\n        this.classList.toggle(\"loaded\", true);\n        this.$emit(\"loaded\", this, {\n          bubbles: false\n        });\n      }\n      this.updatePositionClasses();\n      if (positionChanged) {\n        // emit change event\n        this.$emit(\"positionchange\", this, {\n          bubbles: false\n        });\n      }\n    };\n    /**\n     *  Updates the style string applied to the region element as well as the css classes attached\n     *  to the root element\n     */\n    this.updateRegionStyle = () => {\n      this.style.width = this.regionWidth;\n      this.style.height = this.regionHeight;\n      this.style.transform = `translate(${this.translateX}px, ${this.translateY}px)`;\n    };\n    /**\n     *  Updates the css classes that reflect the current position of the element\n     */\n    this.updatePositionClasses = () => {\n      this.classList.toggle(\"top\", this.verticalPosition === \"start\");\n      this.classList.toggle(\"bottom\", this.verticalPosition === \"end\");\n      this.classList.toggle(\"inset-top\", this.verticalPosition === \"insetStart\");\n      this.classList.toggle(\"inset-bottom\", this.verticalPosition === \"insetEnd\");\n      this.classList.toggle(\"vertical-center\", this.verticalPosition === \"center\");\n      this.classList.toggle(\"left\", this.horizontalPosition === \"start\");\n      this.classList.toggle(\"right\", this.horizontalPosition === \"end\");\n      this.classList.toggle(\"inset-left\", this.horizontalPosition === \"insetStart\");\n      this.classList.toggle(\"inset-right\", this.horizontalPosition === \"insetEnd\");\n      this.classList.toggle(\"horizontal-center\", this.horizontalPosition === \"center\");\n    };\n    /**\n     * Get horizontal positioning state based on desired position\n     */\n    this.setHorizontalPosition = (desiredHorizontalPosition, nextPositionerDimension) => {\n      if (desiredHorizontalPosition === undefined || this.regionRect === undefined || this.anchorRect === undefined || this.viewportRect === undefined) {\n        return;\n      }\n      let nextRegionWidth = 0;\n      switch (this.horizontalScaling) {\n        case \"anchor\":\n        case \"fill\":\n          nextRegionWidth = this.horizontalViewportLock ? this.viewportRect.width : nextPositionerDimension.width;\n          this.regionWidth = `${nextRegionWidth}px`;\n          break;\n        case \"content\":\n          nextRegionWidth = this.regionRect.width;\n          this.regionWidth = \"unset\";\n          break;\n      }\n      let sizeDelta = 0;\n      switch (desiredHorizontalPosition) {\n        case \"start\":\n          this.translateX = this.baseHorizontalOffset - nextRegionWidth;\n          if (this.horizontalViewportLock && this.anchorRect.left > this.viewportRect.right) {\n            this.translateX = this.translateX - (this.anchorRect.left - this.viewportRect.right);\n          }\n          break;\n        case \"insetStart\":\n          this.translateX = this.baseHorizontalOffset - nextRegionWidth + this.anchorRect.width;\n          if (this.horizontalViewportLock && this.anchorRect.right > this.viewportRect.right) {\n            this.translateX = this.translateX - (this.anchorRect.right - this.viewportRect.right);\n          }\n          break;\n        case \"insetEnd\":\n          this.translateX = this.baseHorizontalOffset;\n          if (this.horizontalViewportLock && this.anchorRect.left < this.viewportRect.left) {\n            this.translateX = this.translateX - (this.anchorRect.left - this.viewportRect.left);\n          }\n          break;\n        case \"end\":\n          this.translateX = this.baseHorizontalOffset + this.anchorRect.width;\n          if (this.horizontalViewportLock && this.anchorRect.right < this.viewportRect.left) {\n            this.translateX = this.translateX - (this.anchorRect.right - this.viewportRect.left);\n          }\n          break;\n        case \"center\":\n          sizeDelta = (this.anchorRect.width - nextRegionWidth) / 2;\n          this.translateX = this.baseHorizontalOffset + sizeDelta;\n          if (this.horizontalViewportLock) {\n            const regionLeft = this.anchorRect.left + sizeDelta;\n            const regionRight = this.anchorRect.right - sizeDelta;\n            if (regionLeft < this.viewportRect.left && !(regionRight > this.viewportRect.right)) {\n              this.translateX = this.translateX - (regionLeft - this.viewportRect.left);\n            } else if (regionRight > this.viewportRect.right && !(regionLeft < this.viewportRect.left)) {\n              this.translateX = this.translateX - (regionRight - this.viewportRect.right);\n            }\n          }\n          break;\n      }\n      this.horizontalPosition = desiredHorizontalPosition;\n    };\n    /**\n     * Set vertical positioning state based on desired position\n     */\n    this.setVerticalPosition = (desiredVerticalPosition, nextPositionerDimension) => {\n      if (desiredVerticalPosition === undefined || this.regionRect === undefined || this.anchorRect === undefined || this.viewportRect === undefined) {\n        return;\n      }\n      let nextRegionHeight = 0;\n      switch (this.verticalScaling) {\n        case \"anchor\":\n        case \"fill\":\n          nextRegionHeight = this.verticalViewportLock ? this.viewportRect.height : nextPositionerDimension.height;\n          this.regionHeight = `${nextRegionHeight}px`;\n          break;\n        case \"content\":\n          nextRegionHeight = this.regionRect.height;\n          this.regionHeight = \"unset\";\n          break;\n      }\n      let sizeDelta = 0;\n      switch (desiredVerticalPosition) {\n        case \"start\":\n          this.translateY = this.baseVerticalOffset - nextRegionHeight;\n          if (this.verticalViewportLock && this.anchorRect.top > this.viewportRect.bottom) {\n            this.translateY = this.translateY - (this.anchorRect.top - this.viewportRect.bottom);\n          }\n          break;\n        case \"insetStart\":\n          this.translateY = this.baseVerticalOffset - nextRegionHeight + this.anchorRect.height;\n          if (this.verticalViewportLock && this.anchorRect.bottom > this.viewportRect.bottom) {\n            this.translateY = this.translateY - (this.anchorRect.bottom - this.viewportRect.bottom);\n          }\n          break;\n        case \"insetEnd\":\n          this.translateY = this.baseVerticalOffset;\n          if (this.verticalViewportLock && this.anchorRect.top < this.viewportRect.top) {\n            this.translateY = this.translateY - (this.anchorRect.top - this.viewportRect.top);\n          }\n          break;\n        case \"end\":\n          this.translateY = this.baseVerticalOffset + this.anchorRect.height;\n          if (this.verticalViewportLock && this.anchorRect.bottom < this.viewportRect.top) {\n            this.translateY = this.translateY - (this.anchorRect.bottom - this.viewportRect.top);\n          }\n          break;\n        case \"center\":\n          sizeDelta = (this.anchorRect.height - nextRegionHeight) / 2;\n          this.translateY = this.baseVerticalOffset + sizeDelta;\n          if (this.verticalViewportLock) {\n            const regionTop = this.anchorRect.top + sizeDelta;\n            const regionBottom = this.anchorRect.bottom - sizeDelta;\n            if (regionTop < this.viewportRect.top && !(regionBottom > this.viewportRect.bottom)) {\n              this.translateY = this.translateY - (regionTop - this.viewportRect.top);\n            } else if (regionBottom > this.viewportRect.bottom && !(regionTop < this.viewportRect.top)) {\n              this.translateY = this.translateY - (regionBottom - this.viewportRect.bottom);\n            }\n          }\n      }\n      this.verticalPosition = desiredVerticalPosition;\n    };\n    /**\n     *  Get available positions based on positioning mode\n     */\n    this.getPositioningOptions = inset => {\n      if (inset) {\n        return [\"insetStart\", \"insetEnd\"];\n      }\n      return [\"start\", \"end\"];\n    };\n    /**\n     *  Get the space available for a particular relative position\n     */\n    this.getAvailableSpace = (positionOption, anchorStart, anchorEnd, anchorSpan, viewportStart, viewportEnd) => {\n      const spaceStart = anchorStart - viewportStart;\n      const spaceEnd = viewportEnd - (anchorStart + anchorSpan);\n      switch (positionOption) {\n        case \"start\":\n          return spaceStart;\n        case \"insetStart\":\n          return spaceStart + anchorSpan;\n        case \"insetEnd\":\n          return spaceEnd + anchorSpan;\n        case \"end\":\n          return spaceEnd;\n        case \"center\":\n          return Math.min(spaceStart, spaceEnd) * 2 + anchorSpan;\n      }\n    };\n    /**\n     * Get region dimensions\n     */\n    this.getNextRegionDimension = (desiredHorizontalPosition, desiredVerticalPosition) => {\n      const newRegionDimension = {\n        height: this.regionRect !== undefined ? this.regionRect.height : 0,\n        width: this.regionRect !== undefined ? this.regionRect.width : 0\n      };\n      if (desiredHorizontalPosition !== undefined && this.horizontalScaling === \"fill\") {\n        newRegionDimension.width = this.getAvailableSpace(desiredHorizontalPosition, this.anchorRect !== undefined ? this.anchorRect.left : 0, this.anchorRect !== undefined ? this.anchorRect.right : 0, this.anchorRect !== undefined ? this.anchorRect.width : 0, this.viewportRect !== undefined ? this.viewportRect.left : 0, this.viewportRect !== undefined ? this.viewportRect.right : 0);\n      } else if (this.horizontalScaling === \"anchor\") {\n        newRegionDimension.width = this.anchorRect !== undefined ? this.anchorRect.width : 0;\n      }\n      if (desiredVerticalPosition !== undefined && this.verticalScaling === \"fill\") {\n        newRegionDimension.height = this.getAvailableSpace(desiredVerticalPosition, this.anchorRect !== undefined ? this.anchorRect.top : 0, this.anchorRect !== undefined ? this.anchorRect.bottom : 0, this.anchorRect !== undefined ? this.anchorRect.height : 0, this.viewportRect !== undefined ? this.viewportRect.top : 0, this.viewportRect !== undefined ? this.viewportRect.bottom : 0);\n      } else if (this.verticalScaling === \"anchor\") {\n        newRegionDimension.height = this.anchorRect !== undefined ? this.anchorRect.height : 0;\n      }\n      return newRegionDimension;\n    };\n    /**\n     * starts event listeners that can trigger auto updating\n     */\n    this.startAutoUpdateEventListeners = () => {\n      window.addEventListener(eventResize, this.update, {\n        passive: true\n      });\n      window.addEventListener(eventScroll, this.update, {\n        passive: true,\n        capture: true\n      });\n      if (this.resizeDetector !== null && this.viewportElement !== null) {\n        this.resizeDetector.observe(this.viewportElement);\n      }\n    };\n    /**\n     * stops event listeners that can trigger auto updating\n     */\n    this.stopAutoUpdateEventListeners = () => {\n      window.removeEventListener(eventResize, this.update);\n      window.removeEventListener(eventScroll, this.update);\n      if (this.resizeDetector !== null && this.viewportElement !== null) {\n        this.resizeDetector.unobserve(this.viewportElement);\n      }\n    };\n  }\n  anchorChanged() {\n    if (this.initialLayoutComplete) {\n      this.anchorElement = this.getAnchor();\n    }\n  }\n  viewportChanged() {\n    if (this.initialLayoutComplete) {\n      this.viewportElement = this.getViewport();\n    }\n  }\n  horizontalPositioningModeChanged() {\n    this.requestReset();\n  }\n  horizontalDefaultPositionChanged() {\n    this.updateForAttributeChange();\n  }\n  horizontalViewportLockChanged() {\n    this.updateForAttributeChange();\n  }\n  horizontalInsetChanged() {\n    this.updateForAttributeChange();\n  }\n  horizontalThresholdChanged() {\n    this.updateForAttributeChange();\n  }\n  horizontalScalingChanged() {\n    this.updateForAttributeChange();\n  }\n  verticalPositioningModeChanged() {\n    this.requestReset();\n  }\n  verticalDefaultPositionChanged() {\n    this.updateForAttributeChange();\n  }\n  verticalViewportLockChanged() {\n    this.updateForAttributeChange();\n  }\n  verticalInsetChanged() {\n    this.updateForAttributeChange();\n  }\n  verticalThresholdChanged() {\n    this.updateForAttributeChange();\n  }\n  verticalScalingChanged() {\n    this.updateForAttributeChange();\n  }\n  fixedPlacementChanged() {\n    if (this.$fastController.isConnected && this.initialLayoutComplete) {\n      this.initialize();\n    }\n  }\n  autoUpdateModeChanged(prevMode, newMode) {\n    if (this.$fastController.isConnected && this.initialLayoutComplete) {\n      if (prevMode === \"auto\") {\n        this.stopAutoUpdateEventListeners();\n      }\n      if (newMode === \"auto\") {\n        this.startAutoUpdateEventListeners();\n      }\n    }\n  }\n  anchorElementChanged() {\n    this.requestReset();\n  }\n  viewportElementChanged() {\n    if (this.$fastController.isConnected && this.initialLayoutComplete) {\n      this.initialize();\n    }\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    if (this.autoUpdateMode === \"auto\") {\n      this.startAutoUpdateEventListeners();\n    }\n    this.initialize();\n  }\n  /**\n   * @internal\n   */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    if (this.autoUpdateMode === \"auto\") {\n      this.stopAutoUpdateEventListeners();\n    }\n    this.stopObservers();\n    this.disconnectResizeDetector();\n  }\n  /**\n   * @internal\n   */\n  adoptedCallback() {\n    this.initialize();\n  }\n  /**\n   * destroys the instance's resize observer\n   */\n  disconnectResizeDetector() {\n    if (this.resizeDetector !== null) {\n      this.resizeDetector.disconnect();\n      this.resizeDetector = null;\n    }\n  }\n  /**\n   * initializes the instance's resize observer\n   */\n  initializeResizeDetector() {\n    this.disconnectResizeDetector();\n    this.resizeDetector = new window.ResizeObserver(this.handleResize);\n  }\n  /**\n   * react to attribute changes that don't require a reset\n   */\n  updateForAttributeChange() {\n    if (this.$fastController.isConnected && this.initialLayoutComplete) {\n      this.forceUpdate = true;\n      this.update();\n    }\n  }\n  /**\n   * fully initializes the component\n   */\n  initialize() {\n    this.initializeResizeDetector();\n    if (this.anchorElement === null) {\n      this.anchorElement = this.getAnchor();\n    }\n    this.requestReset();\n  }\n  /**\n   * Request a reset if there are currently no open requests\n   */\n  requestReset() {\n    if (this.$fastController.isConnected && this.pendingReset === false) {\n      this.setInitialState();\n      DOM.queueUpdate(() => this.reset());\n      this.pendingReset = true;\n    }\n  }\n  /**\n   * sets the starting configuration for component internal values\n   */\n  setInitialState() {\n    this.initialLayoutComplete = false;\n    this.regionVisible = false;\n    this.translateX = 0;\n    this.translateY = 0;\n    this.baseHorizontalOffset = 0;\n    this.baseVerticalOffset = 0;\n    this.viewportRect = undefined;\n    this.regionRect = undefined;\n    this.anchorRect = undefined;\n    this.verticalPosition = undefined;\n    this.horizontalPosition = undefined;\n    this.style.opacity = \"0\";\n    this.style.pointerEvents = \"none\";\n    this.forceUpdate = false;\n    this.style.position = this.fixedPlacement ? \"fixed\" : \"absolute\";\n    this.updatePositionClasses();\n    this.updateRegionStyle();\n  }\n}\nAnchoredRegion.intersectionService = new IntersectionService();\n__decorate$1([attr], AnchoredRegion.prototype, \"anchor\", void 0);\n__decorate$1([attr], AnchoredRegion.prototype, \"viewport\", void 0);\n__decorate$1([attr({\n  attribute: \"horizontal-positioning-mode\"\n})], AnchoredRegion.prototype, \"horizontalPositioningMode\", void 0);\n__decorate$1([attr({\n  attribute: \"horizontal-default-position\"\n})], AnchoredRegion.prototype, \"horizontalDefaultPosition\", void 0);\n__decorate$1([attr({\n  attribute: \"horizontal-viewport-lock\",\n  mode: \"boolean\"\n})], AnchoredRegion.prototype, \"horizontalViewportLock\", void 0);\n__decorate$1([attr({\n  attribute: \"horizontal-inset\",\n  mode: \"boolean\"\n})], AnchoredRegion.prototype, \"horizontalInset\", void 0);\n__decorate$1([attr({\n  attribute: \"horizontal-threshold\"\n})], AnchoredRegion.prototype, \"horizontalThreshold\", void 0);\n__decorate$1([attr({\n  attribute: \"horizontal-scaling\"\n})], AnchoredRegion.prototype, \"horizontalScaling\", void 0);\n__decorate$1([attr({\n  attribute: \"vertical-positioning-mode\"\n})], AnchoredRegion.prototype, \"verticalPositioningMode\", void 0);\n__decorate$1([attr({\n  attribute: \"vertical-default-position\"\n})], AnchoredRegion.prototype, \"verticalDefaultPosition\", void 0);\n__decorate$1([attr({\n  attribute: \"vertical-viewport-lock\",\n  mode: \"boolean\"\n})], AnchoredRegion.prototype, \"verticalViewportLock\", void 0);\n__decorate$1([attr({\n  attribute: \"vertical-inset\",\n  mode: \"boolean\"\n})], AnchoredRegion.prototype, \"verticalInset\", void 0);\n__decorate$1([attr({\n  attribute: \"vertical-threshold\"\n})], AnchoredRegion.prototype, \"verticalThreshold\", void 0);\n__decorate$1([attr({\n  attribute: \"vertical-scaling\"\n})], AnchoredRegion.prototype, \"verticalScaling\", void 0);\n__decorate$1([attr({\n  attribute: \"fixed-placement\",\n  mode: \"boolean\"\n})], AnchoredRegion.prototype, \"fixedPlacement\", void 0);\n__decorate$1([attr({\n  attribute: \"auto-update-mode\"\n})], AnchoredRegion.prototype, \"autoUpdateMode\", void 0);\n__decorate$1([observable], AnchoredRegion.prototype, \"anchorElement\", void 0);\n__decorate$1([observable], AnchoredRegion.prototype, \"viewportElement\", void 0);\n__decorate$1([observable], AnchoredRegion.prototype, \"initialLayoutComplete\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#Badge} component.\n * @public\n */\nconst badgeTemplate = (context, definition) => html`<template class=\"${x => x.circular ? \"circular\" : \"\"}\"><div class=\"control\" part=\"control\" style=\"${x => x.generateBadgeStyle()}\"><slot></slot></div></template>`;\n\n/**\n * A Badge Custom HTML Element.\n * @slot - The default slot for the badge\n * @csspart control - The element representing the badge, which wraps the default slot\n *\n * @public\n */\nclass Badge$1 extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    this.generateBadgeStyle = () => {\n      if (!this.fill && !this.color) {\n        return;\n      }\n      const fill = `background-color: var(--badge-fill-${this.fill});`;\n      const color = `color: var(--badge-color-${this.color});`;\n      if (this.fill && !this.color) {\n        return fill;\n      } else if (this.color && !this.fill) {\n        return color;\n      } else {\n        return `${color} ${fill}`;\n      }\n    };\n  }\n}\n__decorate$1([attr({\n  attribute: \"fill\"\n})], Badge$1.prototype, \"fill\", void 0);\n__decorate$1([attr({\n  attribute: \"color\"\n})], Badge$1.prototype, \"color\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Badge$1.prototype, \"circular\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(BreadcrumbItem:class)} component.\n * @public\n */\nconst breadcrumbItemTemplate = (context, definition) => html`<div role=\"listitem\" class=\"listitem\" part=\"listitem\">${when(x => x.href && x.href.length > 0, html` ${anchorTemplate(context, definition)} `)} ${when(x => !x.href, html` ${startSlotTemplate(context, definition)}<slot></slot>${endSlotTemplate(context, definition)} `)} ${when(x => x.separator, html`<span class=\"separator\" part=\"separator\" aria-hidden=\"true\"><slot name=\"separator\">${definition.separator || \"\"}</slot></span>`)}</div>`;\n\n/**\n * A Breadcrumb Item Custom HTML Element.\n *\n * @public\n */\nclass BreadcrumbItem extends Anchor$1 {\n  constructor() {\n    super(...arguments);\n    /**\n     * @internal\n     */\n    this.separator = true;\n  }\n}\n__decorate$1([observable], BreadcrumbItem.prototype, \"separator\", void 0);\napplyMixins(BreadcrumbItem, StartEnd, DelegatesARIALink);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#Breadcrumb} component.\n * @public\n */\nconst breadcrumbTemplate = (context, definition) => html`<template role=\"navigation\"><div role=\"list\" class=\"list\" part=\"list\"><slot ${slotted({\n  property: \"slottedBreadcrumbItems\",\n  filter: elements()\n})}></slot></div></template>`;\n\n/**\n * A Breadcrumb Custom HTML Element.\n * @slot - The default slot for the breadcrumb items\n * @csspart list - The element wrapping the slotted items\n *\n * @public\n */\nclass Breadcrumb extends FoundationElement {\n  slottedBreadcrumbItemsChanged() {\n    if (this.$fastController.isConnected) {\n      if (this.slottedBreadcrumbItems === undefined || this.slottedBreadcrumbItems.length === 0) {\n        return;\n      }\n      const lastNode = this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length - 1];\n      this.slottedBreadcrumbItems.forEach(item => {\n        const itemIsLastNode = item === lastNode;\n        this.setItemSeparator(item, itemIsLastNode);\n        this.setAriaCurrent(item, itemIsLastNode);\n      });\n    }\n  }\n  setItemSeparator(item, isLastNode) {\n    if (item instanceof BreadcrumbItem) {\n      item.separator = !isLastNode;\n    }\n  }\n  /**\n   * Finds href on childnodes in the light DOM or shadow DOM.\n   * We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.\n   */\n  findChildWithHref(node) {\n    var _a, _b;\n    if (node.childElementCount > 0) {\n      return node.querySelector(\"a[href]\");\n    } else if ((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childElementCount) {\n      return (_b = node.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(\"a[href]\");\n    } else return null;\n  }\n  /**\n   *  Sets ARIA Current for the current node\n   * If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,\n   * otherwise apply aria-current to the host element, with an href\n   */\n  setAriaCurrent(item, isLastNode) {\n    const childNodeWithHref = this.findChildWithHref(item);\n    if (childNodeWithHref === null && item.hasAttribute(\"href\") && item instanceof BreadcrumbItem) {\n      isLastNode ? item.setAttribute(\"aria-current\", \"page\") : item.removeAttribute(\"aria-current\");\n    } else if (childNodeWithHref !== null) {\n      isLastNode ? childNodeWithHref.setAttribute(\"aria-current\", \"page\") : childNodeWithHref.removeAttribute(\"aria-current\");\n    }\n  }\n}\n__decorate$1([observable], Breadcrumb.prototype, \"slottedBreadcrumbItems\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(Button:class)} component.\n * @public\n */\nconst buttonTemplate = (context, definition) => html`<button class=\"control\" part=\"control\" ?autofocus=\"${x => x.autofocus}\" ?disabled=\"${x => x.disabled}\" form=\"${x => x.formId}\" formaction=\"${x => x.formaction}\" formenctype=\"${x => x.formenctype}\" formmethod=\"${x => x.formmethod}\" formnovalidate=\"${x => x.formnovalidate}\" formtarget=\"${x => x.formtarget}\" name=\"${x => x.name}\" type=\"${x => x.type}\" value=\"${x => x.value}\" aria-atomic=\"${x => x.ariaAtomic}\" aria-busy=\"${x => x.ariaBusy}\" aria-controls=\"${x => x.ariaControls}\" aria-current=\"${x => x.ariaCurrent}\" aria-describedby=\"${x => x.ariaDescribedby}\" aria-details=\"${x => x.ariaDetails}\" aria-disabled=\"${x => x.ariaDisabled}\" aria-errormessage=\"${x => x.ariaErrormessage}\" aria-expanded=\"${x => x.ariaExpanded}\" aria-flowto=\"${x => x.ariaFlowto}\" aria-haspopup=\"${x => x.ariaHaspopup}\" aria-hidden=\"${x => x.ariaHidden}\" aria-invalid=\"${x => x.ariaInvalid}\" aria-keyshortcuts=\"${x => x.ariaKeyshortcuts}\" aria-label=\"${x => x.ariaLabel}\" aria-labelledby=\"${x => x.ariaLabelledby}\" aria-live=\"${x => x.ariaLive}\" aria-owns=\"${x => x.ariaOwns}\" aria-pressed=\"${x => x.ariaPressed}\" aria-relevant=\"${x => x.ariaRelevant}\" aria-roledescription=\"${x => x.ariaRoledescription}\" ${ref(\"control\")}>${startSlotTemplate(context, definition)}<span class=\"content\" part=\"content\"><slot ${slotted(\"defaultSlottedContent\")}></slot></span>${endSlotTemplate(context, definition)}</button>`;\n\nconst proxySlotName = \"form-associated-proxy\";\nconst ElementInternalsKey = \"ElementInternals\";\n/**\n * @alpha\n */\nconst supportsElementInternals = ElementInternalsKey in window && \"setFormValue\" in window[ElementInternalsKey].prototype;\nconst InternalsMap = new WeakMap();\n/**\n * Base function for providing Custom Element Form Association.\n *\n * @alpha\n */\nfunction FormAssociated(BaseCtor) {\n  const C = class extends BaseCtor {\n    constructor(...args) {\n      super(...args);\n      /**\n       * Track whether the value has been changed from the initial value\n       */\n      this.dirtyValue = false;\n      /**\n       * Sets the element's disabled state. A disabled element will not be included during form submission.\n       *\n       * @remarks\n       * HTML Attribute: disabled\n       */\n      this.disabled = false;\n      /**\n       * These are events that are still fired by the proxy\n       * element based on user / programmatic interaction.\n       *\n       * The proxy implementation should be transparent to\n       * the app author, so block these events from emitting.\n       */\n      this.proxyEventsToBlock = [\"change\", \"click\"];\n      this.proxyInitialized = false;\n      this.required = false;\n      this.initialValue = this.initialValue || \"\";\n      if (!this.elementInternals) {\n        // When elementInternals is not supported, formResetCallback is\n        // bound to an event listener, so ensure the handler's `this`\n        // context is correct.\n        this.formResetCallback = this.formResetCallback.bind(this);\n      }\n    }\n    /**\n     * Must evaluate to true to enable elementInternals.\n     * Feature detects API support and resolve respectively\n     *\n     * @internal\n     */\n    static get formAssociated() {\n      return supportsElementInternals;\n    }\n    /**\n     * Returns the validity state of the element\n     *\n     * @alpha\n     */\n    get validity() {\n      return this.elementInternals ? this.elementInternals.validity : this.proxy.validity;\n    }\n    /**\n     * Retrieve a reference to the associated form.\n     * Returns null if not associated to any form.\n     *\n     * @alpha\n     */\n    get form() {\n      return this.elementInternals ? this.elementInternals.form : this.proxy.form;\n    }\n    /**\n     * Retrieve the localized validation message,\n     * or custom validation message if set.\n     *\n     * @alpha\n     */\n    get validationMessage() {\n      return this.elementInternals ? this.elementInternals.validationMessage : this.proxy.validationMessage;\n    }\n    /**\n     * Whether the element will be validated when the\n     * form is submitted\n     */\n    get willValidate() {\n      return this.elementInternals ? this.elementInternals.willValidate : this.proxy.willValidate;\n    }\n    /**\n     * A reference to all associated label elements\n     */\n    get labels() {\n      if (this.elementInternals) {\n        return Object.freeze(Array.from(this.elementInternals.labels));\n      } else if (this.proxy instanceof HTMLElement && this.proxy.ownerDocument && this.id) {\n        // Labels associated by wrapping the element: <label><custom-element></custom-element></label>\n        const parentLabels = this.proxy.labels;\n        // Labels associated using the `for` attribute\n        const forLabels = Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`));\n        const labels = parentLabels ? forLabels.concat(Array.from(parentLabels)) : forLabels;\n        return Object.freeze(labels);\n      } else {\n        return emptyArray;\n      }\n    }\n    /**\n     * Invoked when the `value` property changes\n     * @param previous - the previous value\n     * @param next - the new value\n     *\n     * @remarks\n     * If elements extending `FormAssociated` implement a `valueChanged` method\n     * They must be sure to invoke `super.valueChanged(previous, next)` to ensure\n     * proper functioning of `FormAssociated`\n     */\n    valueChanged(previous, next) {\n      this.dirtyValue = true;\n      if (this.proxy instanceof HTMLElement) {\n        this.proxy.value = this.value;\n      }\n      this.currentValue = this.value;\n      this.setFormValue(this.value);\n      this.validate();\n    }\n    currentValueChanged() {\n      this.value = this.currentValue;\n    }\n    /**\n     * Invoked when the `initialValue` property changes\n     *\n     * @param previous - the previous value\n     * @param next - the new value\n     *\n     * @remarks\n     * If elements extending `FormAssociated` implement a `initialValueChanged` method\n     * They must be sure to invoke `super.initialValueChanged(previous, next)` to ensure\n     * proper functioning of `FormAssociated`\n     */\n    initialValueChanged(previous, next) {\n      // If the value is clean and the component is connected to the DOM\n      // then set value equal to the attribute value.\n      if (!this.dirtyValue) {\n        this.value = this.initialValue;\n        this.dirtyValue = false;\n      }\n    }\n    /**\n     * Invoked when the `disabled` property changes\n     *\n     * @param previous - the previous value\n     * @param next - the new value\n     *\n     * @remarks\n     * If elements extending `FormAssociated` implement a `disabledChanged` method\n     * They must be sure to invoke `super.disabledChanged(previous, next)` to ensure\n     * proper functioning of `FormAssociated`\n     */\n    disabledChanged(previous, next) {\n      if (this.proxy instanceof HTMLElement) {\n        this.proxy.disabled = this.disabled;\n      }\n      DOM.queueUpdate(() => this.classList.toggle(\"disabled\", this.disabled));\n    }\n    /**\n     * Invoked when the `name` property changes\n     *\n     * @param previous - the previous value\n     * @param next - the new value\n     *\n     * @remarks\n     * If elements extending `FormAssociated` implement a `nameChanged` method\n     * They must be sure to invoke `super.nameChanged(previous, next)` to ensure\n     * proper functioning of `FormAssociated`\n     */\n    nameChanged(previous, next) {\n      if (this.proxy instanceof HTMLElement) {\n        this.proxy.name = this.name;\n      }\n    }\n    /**\n     * Invoked when the `required` property changes\n     *\n     * @param previous - the previous value\n     * @param next - the new value\n     *\n     * @remarks\n     * If elements extending `FormAssociated` implement a `requiredChanged` method\n     * They must be sure to invoke `super.requiredChanged(previous, next)` to ensure\n     * proper functioning of `FormAssociated`\n     */\n    requiredChanged(prev, next) {\n      if (this.proxy instanceof HTMLElement) {\n        this.proxy.required = this.required;\n      }\n      DOM.queueUpdate(() => this.classList.toggle(\"required\", this.required));\n      this.validate();\n    }\n    /**\n     * The element internals object. Will only exist\n     * in browsers supporting the attachInternals API\n     */\n    get elementInternals() {\n      if (!supportsElementInternals) {\n        return null;\n      }\n      let internals = InternalsMap.get(this);\n      if (!internals) {\n        internals = this.attachInternals();\n        InternalsMap.set(this, internals);\n      }\n      return internals;\n    }\n    /**\n     * @internal\n     */\n    connectedCallback() {\n      super.connectedCallback();\n      this.addEventListener(\"keypress\", this._keypressHandler);\n      if (!this.value) {\n        this.value = this.initialValue;\n        this.dirtyValue = false;\n      }\n      if (!this.elementInternals) {\n        this.attachProxy();\n        if (this.form) {\n          this.form.addEventListener(\"reset\", this.formResetCallback);\n        }\n      }\n    }\n    /**\n     * @internal\n     */\n    disconnectedCallback() {\n      super.disconnectedCallback();\n      this.proxyEventsToBlock.forEach(name => this.proxy.removeEventListener(name, this.stopPropagation));\n      if (!this.elementInternals && this.form) {\n        this.form.removeEventListener(\"reset\", this.formResetCallback);\n      }\n    }\n    /**\n     * Return the current validity of the element.\n     */\n    checkValidity() {\n      return this.elementInternals ? this.elementInternals.checkValidity() : this.proxy.checkValidity();\n    }\n    /**\n     * Return the current validity of the element.\n     * If false, fires an invalid event at the element.\n     */\n    reportValidity() {\n      return this.elementInternals ? this.elementInternals.reportValidity() : this.proxy.reportValidity();\n    }\n    /**\n     * Set the validity of the control. In cases when the elementInternals object is not\n     * available (and the proxy element is used to report validity), this function will\n     * do nothing unless a message is provided, at which point the setCustomValidity method\n     * of the proxy element will be invoked with the provided message.\n     * @param flags - Validity flags\n     * @param message - Optional message to supply\n     * @param anchor - Optional element used by UA to display an interactive validation UI\n     */\n    setValidity(flags, message, anchor) {\n      if (this.elementInternals) {\n        this.elementInternals.setValidity(flags, message, anchor);\n      } else if (typeof message === \"string\") {\n        this.proxy.setCustomValidity(message);\n      }\n    }\n    /**\n     * Invoked when a connected component's form or fieldset has its disabled\n     * state changed.\n     * @param disabled - the disabled value of the form / fieldset\n     */\n    formDisabledCallback(disabled) {\n      this.disabled = disabled;\n    }\n    formResetCallback() {\n      this.value = this.initialValue;\n      this.dirtyValue = false;\n    }\n    /**\n     * Attach the proxy element to the DOM\n     */\n    attachProxy() {\n      var _a;\n      if (!this.proxyInitialized) {\n        this.proxyInitialized = true;\n        this.proxy.style.display = \"none\";\n        this.proxyEventsToBlock.forEach(name => this.proxy.addEventListener(name, this.stopPropagation));\n        // These are typically mapped to the proxy during\n        // property change callbacks, but during initialization\n        // on the initial call of the callback, the proxy is\n        // still undefined. We should find a better way to address this.\n        this.proxy.disabled = this.disabled;\n        this.proxy.required = this.required;\n        if (typeof this.name === \"string\") {\n          this.proxy.name = this.name;\n        }\n        if (typeof this.value === \"string\") {\n          this.proxy.value = this.value;\n        }\n        this.proxy.setAttribute(\"slot\", proxySlotName);\n        this.proxySlot = document.createElement(\"slot\");\n        this.proxySlot.setAttribute(\"name\", proxySlotName);\n      }\n      (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.appendChild(this.proxySlot);\n      this.appendChild(this.proxy);\n    }\n    /**\n     * Detach the proxy element from the DOM\n     */\n    detachProxy() {\n      var _a;\n      this.removeChild(this.proxy);\n      (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeChild(this.proxySlot);\n    }\n    /** {@inheritDoc (FormAssociated:interface).validate} */\n    validate(anchor) {\n      if (this.proxy instanceof HTMLElement) {\n        this.setValidity(this.proxy.validity, this.proxy.validationMessage, anchor);\n      }\n    }\n    /**\n     * Associates the provided value (and optional state) with the parent form.\n     * @param value - The value to set\n     * @param state - The state object provided to during session restores and when autofilling.\n     */\n    setFormValue(value, state) {\n      if (this.elementInternals) {\n        this.elementInternals.setFormValue(value, state || value);\n      }\n    }\n    _keypressHandler(e) {\n      switch (e.key) {\n        case keyEnter:\n          if (this.form instanceof HTMLFormElement) {\n            // Implicit submission\n            const defaultButton = this.form.querySelector(\"[type=submit]\");\n            defaultButton === null || defaultButton === void 0 ? void 0 : defaultButton.click();\n          }\n          break;\n      }\n    }\n    /**\n     * Used to stop propagation of proxy element events\n     * @param e - Event object\n     */\n    stopPropagation(e) {\n      e.stopPropagation();\n    }\n  };\n  attr({\n    mode: \"boolean\"\n  })(C.prototype, \"disabled\");\n  attr({\n    mode: \"fromView\",\n    attribute: \"value\"\n  })(C.prototype, \"initialValue\");\n  attr({\n    attribute: \"current-value\"\n  })(C.prototype, \"currentValue\");\n  attr(C.prototype, \"name\");\n  attr({\n    mode: \"boolean\"\n  })(C.prototype, \"required\");\n  observable(C.prototype, \"value\");\n  return C;\n}\n/**\n * @alpha\n */\nfunction CheckableFormAssociated(BaseCtor) {\n  class C extends FormAssociated(BaseCtor) {}\n  class D extends C {\n    constructor(...args) {\n      super(args);\n      /**\n       * Tracks whether the \"checked\" property has been changed.\n       * This is necessary to provide consistent behavior with\n       * normal input checkboxes\n       */\n      this.dirtyChecked = false;\n      /**\n       * Provides the default checkedness of the input element\n       * Passed down to proxy\n       *\n       * @public\n       * @remarks\n       * HTML Attribute: checked\n       */\n      this.checkedAttribute = false;\n      /**\n       * The checked state of the control.\n       *\n       * @public\n       */\n      this.checked = false;\n      // Re-initialize dirtyChecked because initialization of other values\n      // causes it to become true\n      this.dirtyChecked = false;\n    }\n    checkedAttributeChanged() {\n      this.defaultChecked = this.checkedAttribute;\n    }\n    /**\n     * @internal\n     */\n    defaultCheckedChanged() {\n      if (!this.dirtyChecked) {\n        // Setting this.checked will cause us to enter a dirty state,\n        // but if we are clean when defaultChecked is changed, we want to stay\n        // in a clean state, so reset this.dirtyChecked\n        this.checked = this.defaultChecked;\n        this.dirtyChecked = false;\n      }\n    }\n    checkedChanged(prev, next) {\n      if (!this.dirtyChecked) {\n        this.dirtyChecked = true;\n      }\n      this.currentChecked = this.checked;\n      this.updateForm();\n      if (this.proxy instanceof HTMLInputElement) {\n        this.proxy.checked = this.checked;\n      }\n      if (prev !== undefined) {\n        this.$emit(\"change\");\n      }\n      this.validate();\n    }\n    currentCheckedChanged(prev, next) {\n      this.checked = this.currentChecked;\n    }\n    updateForm() {\n      const value = this.checked ? this.value : null;\n      this.setFormValue(value, value);\n    }\n    connectedCallback() {\n      super.connectedCallback();\n      this.updateForm();\n    }\n    formResetCallback() {\n      super.formResetCallback();\n      this.checked = !!this.checkedAttribute;\n      this.dirtyChecked = false;\n    }\n  }\n  attr({\n    attribute: \"checked\",\n    mode: \"boolean\"\n  })(D.prototype, \"checkedAttribute\");\n  attr({\n    attribute: \"current-checked\",\n    converter: booleanConverter\n  })(D.prototype, \"currentChecked\");\n  observable(D.prototype, \"defaultChecked\");\n  observable(D.prototype, \"checked\");\n  return D;\n}\n\nclass _Button extends FoundationElement {}\n/**\n * A form-associated base class for the {@link @microsoft/fast-foundation#(Button:class)} component.\n *\n * @internal\n */\nclass FormAssociatedButton extends FormAssociated(_Button) {\n  constructor() {\n    super(...arguments);\n    this.proxy = document.createElement(\"input\");\n  }\n}\n\n/**\n * A Button Custom HTML Element.\n * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | <button> element }.\n *\n * @slot start - Content which can be provided before the button content\n * @slot end - Content which can be provided after the button content\n * @slot - The default slot for button content\n * @csspart control - The button element\n * @csspart content - The element wrapping button content\n *\n * @public\n */\nclass Button$1 extends FormAssociatedButton {\n  constructor() {\n    super(...arguments);\n    /**\n     * Prevent events to propagate if disabled and has no slotted content wrapped in HTML elements\n     * @internal\n     */\n    this.handleClick = e => {\n      var _a;\n      if (this.disabled && ((_a = this.defaultSlottedContent) === null || _a === void 0 ? void 0 : _a.length) <= 1) {\n        e.stopPropagation();\n      }\n    };\n    /**\n     * Submits the parent form\n     */\n    this.handleSubmission = () => {\n      if (!this.form) {\n        return;\n      }\n      const attached = this.proxy.isConnected;\n      if (!attached) {\n        this.attachProxy();\n      }\n      // Browser support for requestSubmit is not comprehensive\n      // so click the proxy if it isn't supported\n      typeof this.form.requestSubmit === \"function\" ? this.form.requestSubmit(this.proxy) : this.proxy.click();\n      if (!attached) {\n        this.detachProxy();\n      }\n    };\n    /**\n     * Resets the parent form\n     */\n    this.handleFormReset = () => {\n      var _a;\n      (_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();\n    };\n    /**\n     * Overrides the focus call for where delegatesFocus is unsupported.\n     * This check works for Chrome, Edge Chromium, FireFox, and Safari\n     * Relevant PR on the Firefox browser: https://phabricator.services.mozilla.com/D123858\n     */\n    this.handleUnsupportedDelegatesFocus = () => {\n      var _a;\n      // Check to see if delegatesFocus is supported\n      if (window.ShadowRoot && !window.ShadowRoot.prototype.hasOwnProperty(\"delegatesFocus\") && ((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {\n        this.focus = () => {\n          this.control.focus();\n        };\n      }\n    };\n  }\n  formactionChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.formAction = this.formaction;\n    }\n  }\n  formenctypeChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.formEnctype = this.formenctype;\n    }\n  }\n  formmethodChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.formMethod = this.formmethod;\n    }\n  }\n  formnovalidateChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.formNoValidate = this.formnovalidate;\n    }\n  }\n  formtargetChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.formTarget = this.formtarget;\n    }\n  }\n  typeChanged(previous, next) {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.type = this.type;\n    }\n    next === \"submit\" && this.addEventListener(\"click\", this.handleSubmission);\n    previous === \"submit\" && this.removeEventListener(\"click\", this.handleSubmission);\n    next === \"reset\" && this.addEventListener(\"click\", this.handleFormReset);\n    previous === \"reset\" && this.removeEventListener(\"click\", this.handleFormReset);\n  }\n  /** {@inheritDoc (FormAssociated:interface).validate} */\n  validate() {\n    super.validate(this.control);\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    var _a;\n    super.connectedCallback();\n    this.proxy.setAttribute(\"type\", this.type);\n    this.handleUnsupportedDelegatesFocus();\n    const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);\n    if (elements) {\n      elements.forEach(span => {\n        span.addEventListener(\"click\", this.handleClick);\n      });\n    }\n  }\n  /**\n   * @internal\n   */\n  disconnectedCallback() {\n    var _a;\n    super.disconnectedCallback();\n    const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);\n    if (elements) {\n      elements.forEach(span => {\n        span.removeEventListener(\"click\", this.handleClick);\n      });\n    }\n  }\n}\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Button$1.prototype, \"autofocus\", void 0);\n__decorate$1([attr({\n  attribute: \"form\"\n})], Button$1.prototype, \"formId\", void 0);\n__decorate$1([attr], Button$1.prototype, \"formaction\", void 0);\n__decorate$1([attr], Button$1.prototype, \"formenctype\", void 0);\n__decorate$1([attr], Button$1.prototype, \"formmethod\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Button$1.prototype, \"formnovalidate\", void 0);\n__decorate$1([attr], Button$1.prototype, \"formtarget\", void 0);\n__decorate$1([attr], Button$1.prototype, \"type\", void 0);\n__decorate$1([observable], Button$1.prototype, \"defaultSlottedContent\", void 0);\n/**\n * Includes ARIA states and properties relating to the ARIA button role\n *\n * @public\n */\nclass DelegatesARIAButton {}\n__decorate$1([attr({\n  attribute: \"aria-expanded\"\n})], DelegatesARIAButton.prototype, \"ariaExpanded\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-pressed\"\n})], DelegatesARIAButton.prototype, \"ariaPressed\", void 0);\napplyMixins(DelegatesARIAButton, ARIAGlobalStatesAndProperties);\napplyMixins(Button$1, StartEnd, DelegatesARIAButton);\n\n/**\n * Date formatting utility\n * @public\n */\nclass DateFormatter {\n  constructor(config) {\n    /**\n     * Formatting for the day\n     * @public\n     */\n    this.dayFormat = \"numeric\";\n    /**\n     * Formatting for the weekday labels\n     * @public\n     */\n    this.weekdayFormat = \"long\";\n    /**\n     * Formatting for the month\n     * @public\n     */\n    this.monthFormat = \"long\";\n    /**\n     * Formatting for the year\n     * @public\n     */\n    this.yearFormat = \"numeric\";\n    /**\n     * Date used for formatting\n     */\n    this.date = new Date();\n    /**\n     * Add properties on construction\n     */\n    if (config) {\n      for (const key in config) {\n        const value = config[key];\n        if (key === \"date\") {\n          this.date = this.getDateObject(value);\n        } else {\n          this[key] = value;\n        }\n      }\n    }\n  }\n  /**\n   * Helper function to make sure that the DateFormatter is working with an instance of Date\n   * @param date - The date as an object, string or Date insance\n   * @returns - A Date instance\n   * @public\n   */\n  getDateObject(date) {\n    if (typeof date === \"string\") {\n      const dates = date.split(/[/-]/);\n      if (dates.length < 3) {\n        return new Date();\n      }\n      return new Date(parseInt(dates[2], 10), parseInt(dates[0], 10) - 1, parseInt(dates[1], 10));\n    } else if (\"day\" in date && \"month\" in date && \"year\" in date) {\n      const {\n        day,\n        month,\n        year\n      } = date;\n      return new Date(year, month - 1, day);\n    }\n    return date;\n  }\n  /**\n   *\n   * @param date - a valide date as either a Date, string, objec or a DateFormatter\n   * @param format - The formatting for the string\n   * @param locale - locale data used for formatting\n   * @returns A localized string of the date provided\n   * @public\n   */\n  getDate(date = this.date, format = {\n    weekday: this.weekdayFormat,\n    month: this.monthFormat,\n    day: this.dayFormat,\n    year: this.yearFormat\n  }, locale = this.locale) {\n    const dateObj = this.getDateObject(date);\n    if (!dateObj.getTime()) {\n      return \"\";\n    }\n    const optionsWithTimeZone = Object.assign({\n      timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone\n    }, format);\n    return new Intl.DateTimeFormat(locale, optionsWithTimeZone).format(dateObj);\n  }\n  /**\n   *\n   * @param day - Day to localize\n   * @param format - The formatting for the day\n   * @param locale - The locale data used for formatting\n   * @returns - A localized number for the day\n   * @public\n   */\n  getDay(day = this.date.getDate(), format = this.dayFormat, locale = this.locale) {\n    return this.getDate({\n      month: 1,\n      day,\n      year: 2020\n    }, {\n      day: format\n    }, locale);\n  }\n  /**\n   *\n   * @param month - The month to localize\n   * @param format - The formatting for the month\n   * @param locale - The locale data used for formatting\n   * @returns - A localized name of the month\n   * @public\n   */\n  getMonth(month = this.date.getMonth() + 1, format = this.monthFormat, locale = this.locale) {\n    return this.getDate({\n      month,\n      day: 2,\n      year: 2020\n    }, {\n      month: format\n    }, locale);\n  }\n  /**\n   *\n   * @param year - The year to localize\n   * @param format - The formatting for the year\n   * @param locale - The locale data used for formatting\n   * @returns - A localized string for the year\n   * @public\n   */\n  getYear(year = this.date.getFullYear(), format = this.yearFormat, locale = this.locale) {\n    return this.getDate({\n      month: 2,\n      day: 2,\n      year\n    }, {\n      year: format\n    }, locale);\n  }\n  /**\n   *\n   * @param weekday - The number of the weekday, defaults to Sunday\n   * @param format - The formatting for the weekday label\n   * @param locale - The locale data used for formatting\n   * @returns - A formatted weekday label\n   * @public\n   */\n  getWeekday(weekday = 0, format = this.weekdayFormat, locale = this.locale) {\n    const date = `1-${weekday + 1}-2017`;\n    return this.getDate(date, {\n      weekday: format\n    }, locale);\n  }\n  /**\n   *\n   * @param format - The formatting for the weekdays\n   * @param locale - The locale data used for formatting\n   * @returns - An array of the weekday labels\n   * @public\n   */\n  getWeekdays(format = this.weekdayFormat, locale = this.locale) {\n    return Array(7).fill(null).map((_, day) => this.getWeekday(day, format, locale));\n  }\n}\n\n/**\n * Calendar component\n *\n * @slot - The default slot for calendar content\n * @fires dateselected - Fires a custom 'dateselected' event when Enter is invoked via keyboard on a date\n *\n * @public\n */\nclass Calendar$1 extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * date formatter utitlity for getting localized strings\n     * @public\n     */\n    this.dateFormatter = new DateFormatter();\n    /**\n     * Readonly attribute for turning off data-grid\n     * @public\n     */\n    this.readonly = false;\n    /**\n     * String repesentation of the full locale including market, calendar type and numbering system\n     * @public\n     */\n    this.locale = \"en-US\";\n    /**\n     * Month to display\n     * @public\n     */\n    this.month = new Date().getMonth() + 1;\n    /**\n     * Year of the month to display\n     * @public\n     */\n    this.year = new Date().getFullYear();\n    /**\n     * Format style for the day\n     * @public\n     */\n    this.dayFormat = \"numeric\";\n    /**\n     * Format style for the week day labels\n     * @public\n     */\n    this.weekdayFormat = \"short\";\n    /**\n     * Format style for the month label\n     * @public\n     */\n    this.monthFormat = \"long\";\n    /**\n     * Format style for the year used in the title\n     * @public\n     */\n    this.yearFormat = \"numeric\";\n    /**\n     * Minimum number of weeks to show for the month\n     * This can be used to normalize the calendar view\n     *  when changing or across multiple calendars\n     * @public\n     */\n    this.minWeeks = 0;\n    /**\n     * A list of dates that should be shown as disabled\n     * @public\n     */\n    this.disabledDates = \"\";\n    /**\n     * A list of dates that should be shown as highlighted\n     * @public\n     */\n    this.selectedDates = \"\";\n    /**\n     * The number of miliseconds in a day\n     * @internal\n     */\n    this.oneDayInMs = 86400000;\n  }\n  localeChanged() {\n    this.dateFormatter.locale = this.locale;\n  }\n  dayFormatChanged() {\n    this.dateFormatter.dayFormat = this.dayFormat;\n  }\n  weekdayFormatChanged() {\n    this.dateFormatter.weekdayFormat = this.weekdayFormat;\n  }\n  monthFormatChanged() {\n    this.dateFormatter.monthFormat = this.monthFormat;\n  }\n  yearFormatChanged() {\n    this.dateFormatter.yearFormat = this.yearFormat;\n  }\n  /**\n   * Gets data needed to render about a calendar month as well as the previous and next months\n   * @param year - year of the calendar\n   * @param month - month of the calendar\n   * @returns - an object with data about the current and 2 surrounding months\n   * @public\n   */\n  getMonthInfo(month = this.month, year = this.year) {\n    const getFirstDay = date => new Date(date.getFullYear(), date.getMonth(), 1).getDay();\n    const getLength = date => {\n      const nextMonth = new Date(date.getFullYear(), date.getMonth() + 1, 1);\n      return new Date(nextMonth.getTime() - this.oneDayInMs).getDate();\n    };\n    const thisMonth = new Date(year, month - 1);\n    const nextMonth = new Date(year, month);\n    const previousMonth = new Date(year, month - 2);\n    return {\n      length: getLength(thisMonth),\n      month,\n      start: getFirstDay(thisMonth),\n      year,\n      previous: {\n        length: getLength(previousMonth),\n        month: previousMonth.getMonth() + 1,\n        start: getFirstDay(previousMonth),\n        year: previousMonth.getFullYear()\n      },\n      next: {\n        length: getLength(nextMonth),\n        month: nextMonth.getMonth() + 1,\n        start: getFirstDay(nextMonth),\n        year: nextMonth.getFullYear()\n      }\n    };\n  }\n  /**\n   * A list of calendar days\n   * @param info - an object containing the information needed to render a calendar month\n   * @param minWeeks - minimum number of weeks to show\n   * @returns a list of days in a calendar month\n   * @public\n   */\n  getDays(info = this.getMonthInfo(), minWeeks = this.minWeeks) {\n    minWeeks = minWeeks > 10 ? 10 : minWeeks;\n    const {\n      start,\n      length,\n      previous,\n      next\n    } = info;\n    const days = [];\n    let dayCount = 1 - start;\n    while (dayCount < length + 1 || days.length < minWeeks || days[days.length - 1].length % 7 !== 0) {\n      const {\n        month,\n        year\n      } = dayCount < 1 ? previous : dayCount > length ? next : info;\n      const day = dayCount < 1 ? previous.length + dayCount : dayCount > length ? dayCount - length : dayCount;\n      const dateString = `${month}-${day}-${year}`;\n      const disabled = this.dateInString(dateString, this.disabledDates);\n      const selected = this.dateInString(dateString, this.selectedDates);\n      const date = {\n        day,\n        month,\n        year,\n        disabled,\n        selected\n      };\n      const target = days[days.length - 1];\n      if (days.length === 0 || target.length % 7 === 0) {\n        days.push([date]);\n      } else {\n        target.push(date);\n      }\n      dayCount++;\n    }\n    return days;\n  }\n  /**\n   * A helper function that checks if a date exists in a list of dates\n   * @param date - A date objec that includes the day, month and year\n   * @param datesString - a comma separated list of dates\n   * @returns - Returns true if it found the date in the list of dates\n   * @public\n   */\n  dateInString(date, datesString) {\n    const dates = datesString.split(\",\").map(str => str.trim());\n    date = typeof date === \"string\" ? date : `${date.getMonth() + 1}-${date.getDate()}-${date.getFullYear()}`;\n    return dates.some(d => d === date);\n  }\n  /**\n   * Creates a class string for the day container\n   * @param date - date of the calendar cell\n   * @returns - string of class names\n   * @public\n   */\n  getDayClassNames(date, todayString) {\n    const {\n      day,\n      month,\n      year,\n      disabled,\n      selected\n    } = date;\n    const today = todayString === `${month}-${day}-${year}`;\n    const inactive = this.month !== month;\n    return [\"day\", today && \"today\", inactive && \"inactive\", disabled && \"disabled\", selected && \"selected\"].filter(Boolean).join(\" \");\n  }\n  /**\n   * Returns a list of weekday labels\n   * @returns An array of weekday text and full text if abbreviated\n   * @public\n   */\n  getWeekdayText() {\n    const weekdayText = this.dateFormatter.getWeekdays().map(text => ({\n      text\n    }));\n    if (this.weekdayFormat !== \"long\") {\n      const longText = this.dateFormatter.getWeekdays(\"long\");\n      weekdayText.forEach((weekday, index) => {\n        weekday.abbr = longText[index];\n      });\n    }\n    return weekdayText;\n  }\n  /**\n   * Emits the \"date-select\" event with the day, month and year.\n   * @param date - Date cell\n   * @public\n   */\n  handleDateSelect(event, day) {\n    event.preventDefault;\n    this.$emit(\"dateselected\", day);\n  }\n  /**\n   * Handles keyboard events on a cell\n   * @param event - Keyboard event\n   * @param date - Date of the cell selected\n   */\n  handleKeydown(event, date) {\n    if (event.key === keyEnter) {\n      this.handleDateSelect(event, date);\n    }\n    return true;\n  }\n}\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Calendar$1.prototype, \"readonly\", void 0);\n__decorate$1([attr], Calendar$1.prototype, \"locale\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], Calendar$1.prototype, \"month\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], Calendar$1.prototype, \"year\", void 0);\n__decorate$1([attr({\n  attribute: \"day-format\",\n  mode: \"fromView\"\n})], Calendar$1.prototype, \"dayFormat\", void 0);\n__decorate$1([attr({\n  attribute: \"weekday-format\",\n  mode: \"fromView\"\n})], Calendar$1.prototype, \"weekdayFormat\", void 0);\n__decorate$1([attr({\n  attribute: \"month-format\",\n  mode: \"fromView\"\n})], Calendar$1.prototype, \"monthFormat\", void 0);\n__decorate$1([attr({\n  attribute: \"year-format\",\n  mode: \"fromView\"\n})], Calendar$1.prototype, \"yearFormat\", void 0);\n__decorate$1([attr({\n  attribute: \"min-weeks\",\n  converter: nullableNumberConverter\n})], Calendar$1.prototype, \"minWeeks\", void 0);\n__decorate$1([attr({\n  attribute: \"disabled-dates\"\n})], Calendar$1.prototype, \"disabledDates\", void 0);\n__decorate$1([attr({\n  attribute: \"selected-dates\"\n})], Calendar$1.prototype, \"selectedDates\", void 0);\n\n/**\n * Enumerates the data grid auto generated header options\n * default option generates a non-sticky header row\n *\n * @public\n */\nconst GenerateHeaderOptions = {\n  none: \"none\",\n  default: \"default\",\n  sticky: \"sticky\"\n};\n/**\n * Enumerates possible data grid cell types.\n *\n * @public\n */\nconst DataGridCellTypes = {\n  default: \"default\",\n  columnHeader: \"columnheader\",\n  rowHeader: \"rowheader\"\n};\n/**\n * Enumerates possible data grid row types\n *\n * @public\n */\nconst DataGridRowTypes = {\n  default: \"default\",\n  header: \"header\",\n  stickyHeader: \"sticky-header\"\n};\n\n/**\n * A Data Grid Row Custom HTML Element.\n *\n * @fires row-focused - Fires a custom 'row-focused' event when focus is on an element (usually a cell or its contents) in the row\n * @slot - The default slot for custom cell elements\n * @public\n */\nclass DataGridRow extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * The type of row\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: row-type\n     */\n    this.rowType = DataGridRowTypes.default;\n    /**\n     * The base data for this row\n     *\n     * @public\n     */\n    this.rowData = null;\n    /**\n     * The column definitions of the row\n     *\n     * @public\n     */\n    this.columnDefinitions = null;\n    /**\n     * Whether focus is on/in a cell within this row.\n     *\n     * @internal\n     */\n    this.isActiveRow = false;\n    this.cellsRepeatBehavior = null;\n    this.cellsPlaceholder = null;\n    /**\n     * @internal\n     */\n    this.focusColumnIndex = 0;\n    this.refocusOnLoad = false;\n    this.updateRowStyle = () => {\n      this.style.gridTemplateColumns = this.gridTemplateColumns;\n    };\n  }\n  gridTemplateColumnsChanged() {\n    if (this.$fastController.isConnected) {\n      this.updateRowStyle();\n    }\n  }\n  rowTypeChanged() {\n    if (this.$fastController.isConnected) {\n      this.updateItemTemplate();\n    }\n  }\n  rowDataChanged() {\n    if (this.rowData !== null && this.isActiveRow) {\n      this.refocusOnLoad = true;\n      return;\n    }\n  }\n  cellItemTemplateChanged() {\n    this.updateItemTemplate();\n  }\n  headerCellItemTemplateChanged() {\n    this.updateItemTemplate();\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    // note that row elements can be reused with a different data object\n    // as the parent grid's repeat behavior reacts to changes in the data set.\n    if (this.cellsRepeatBehavior === null) {\n      this.cellsPlaceholder = document.createComment(\"\");\n      this.appendChild(this.cellsPlaceholder);\n      this.updateItemTemplate();\n      this.cellsRepeatBehavior = new RepeatDirective(x => x.columnDefinitions, x => x.activeCellItemTemplate, {\n        positioning: true\n      }).createBehavior(this.cellsPlaceholder);\n      /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n      this.$fastController.addBehaviors([this.cellsRepeatBehavior]);\n    }\n    this.addEventListener(\"cell-focused\", this.handleCellFocus);\n    this.addEventListener(eventFocusOut, this.handleFocusout);\n    this.addEventListener(eventKeyDown, this.handleKeydown);\n    this.updateRowStyle();\n    if (this.refocusOnLoad) {\n      // if focus was on the row when data changed try to refocus on same cell\n      this.refocusOnLoad = false;\n      if (this.cellElements.length > this.focusColumnIndex) {\n        this.cellElements[this.focusColumnIndex].focus();\n      }\n    }\n  }\n  /**\n   * @internal\n   */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    this.removeEventListener(\"cell-focused\", this.handleCellFocus);\n    this.removeEventListener(eventFocusOut, this.handleFocusout);\n    this.removeEventListener(eventKeyDown, this.handleKeydown);\n  }\n  handleFocusout(e) {\n    if (!this.contains(e.target)) {\n      this.isActiveRow = false;\n      this.focusColumnIndex = 0;\n    }\n  }\n  handleCellFocus(e) {\n    this.isActiveRow = true;\n    this.focusColumnIndex = this.cellElements.indexOf(e.target);\n    this.$emit(\"row-focused\", this);\n  }\n  handleKeydown(e) {\n    if (e.defaultPrevented) {\n      return;\n    }\n    let newFocusColumnIndex = 0;\n    switch (e.key) {\n      case keyArrowLeft:\n        // focus left one cell\n        newFocusColumnIndex = Math.max(0, this.focusColumnIndex - 1);\n        this.cellElements[newFocusColumnIndex].focus();\n        e.preventDefault();\n        break;\n      case keyArrowRight:\n        // focus right one cell\n        newFocusColumnIndex = Math.min(this.cellElements.length - 1, this.focusColumnIndex + 1);\n        this.cellElements[newFocusColumnIndex].focus();\n        e.preventDefault();\n        break;\n      case keyHome:\n        if (!e.ctrlKey) {\n          this.cellElements[0].focus();\n          e.preventDefault();\n        }\n        break;\n      case keyEnd:\n        if (!e.ctrlKey) {\n          // focus last cell of the row\n          this.cellElements[this.cellElements.length - 1].focus();\n          e.preventDefault();\n        }\n        break;\n    }\n  }\n  updateItemTemplate() {\n    this.activeCellItemTemplate = this.rowType === DataGridRowTypes.default && this.cellItemTemplate !== undefined ? this.cellItemTemplate : this.rowType === DataGridRowTypes.default && this.cellItemTemplate === undefined ? this.defaultCellItemTemplate : this.headerCellItemTemplate !== undefined ? this.headerCellItemTemplate : this.defaultHeaderCellItemTemplate;\n  }\n}\n__decorate$1([attr({\n  attribute: \"grid-template-columns\"\n})], DataGridRow.prototype, \"gridTemplateColumns\", void 0);\n__decorate$1([attr({\n  attribute: \"row-type\"\n})], DataGridRow.prototype, \"rowType\", void 0);\n__decorate$1([observable], DataGridRow.prototype, \"rowData\", void 0);\n__decorate$1([observable], DataGridRow.prototype, \"columnDefinitions\", void 0);\n__decorate$1([observable], DataGridRow.prototype, \"cellItemTemplate\", void 0);\n__decorate$1([observable], DataGridRow.prototype, \"headerCellItemTemplate\", void 0);\n__decorate$1([observable], DataGridRow.prototype, \"rowIndex\", void 0);\n__decorate$1([observable], DataGridRow.prototype, \"isActiveRow\", void 0);\n__decorate$1([observable], DataGridRow.prototype, \"activeCellItemTemplate\", void 0);\n__decorate$1([observable], DataGridRow.prototype, \"defaultCellItemTemplate\", void 0);\n__decorate$1([observable], DataGridRow.prototype, \"defaultHeaderCellItemTemplate\", void 0);\n__decorate$1([observable], DataGridRow.prototype, \"cellElements\", void 0);\n\nfunction createRowItemTemplate(context) {\n  const rowTag = context.tagFor(DataGridRow);\n  return html`<${rowTag} :rowData=\"${x => x}\" :cellItemTemplate=\"${(x, c) => c.parent.cellItemTemplate}\" :headerCellItemTemplate=\"${(x, c) => c.parent.headerCellItemTemplate}\"></${rowTag}>`;\n}\n/**\n * Generates a template for the {@link @microsoft/fast-foundation#DataGrid} component using\n * the provided prefix.\n *\n * @public\n */\nconst dataGridTemplate = (context, definition) => {\n  const rowItemTemplate = createRowItemTemplate(context);\n  const rowTag = context.tagFor(DataGridRow);\n  return html`<template role=\"grid\" tabindex=\"0\" :rowElementTag=\"${() => rowTag}\" :defaultRowItemTemplate=\"${rowItemTemplate}\" ${children({\n    property: \"rowElements\",\n    filter: elements(\"[role=row]\")\n  })}><slot></slot></template>`;\n};\n\n/**\n * A Data Grid Custom HTML Element.\n *\n * @slot - The default slot for custom row elements\n * @public\n */\nclass DataGrid extends FoundationElement {\n  constructor() {\n    super();\n    /**\n     * When true the component will not add itself to the tab queue.\n     * Default is false.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: no-tabbing\n     */\n    this.noTabbing = false;\n    /**\n     *  Whether the grid should automatically generate a header row and its type\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: generate-header\n     */\n    this.generateHeader = GenerateHeaderOptions.default;\n    /**\n     * The data being displayed in the grid\n     *\n     * @public\n     */\n    this.rowsData = [];\n    /**\n     * The column definitions of the grid\n     *\n     * @public\n     */\n    this.columnDefinitions = null;\n    /**\n     * The index of the row that will receive focus the next time the\n     * grid is focused. This value changes as focus moves to different\n     * rows within the grid.  Changing this value when focus is already\n     * within the grid moves focus to the specified row.\n     *\n     * @public\n     */\n    this.focusRowIndex = 0;\n    /**\n     * The index of the column that will receive focus the next time the\n     * grid is focused. This value changes as focus moves to different rows\n     * within the grid.  Changing this value when focus is already within\n     * the grid moves focus to the specified column.\n     *\n     * @public\n     */\n    this.focusColumnIndex = 0;\n    this.rowsPlaceholder = null;\n    this.generatedHeader = null;\n    this.isUpdatingFocus = false;\n    this.pendingFocusUpdate = false;\n    this.rowindexUpdateQueued = false;\n    this.columnDefinitionsStale = true;\n    this.generatedGridTemplateColumns = \"\";\n    this.focusOnCell = (rowIndex, columnIndex, scrollIntoView) => {\n      if (this.rowElements.length === 0) {\n        this.focusRowIndex = 0;\n        this.focusColumnIndex = 0;\n        return;\n      }\n      const focusRowIndex = Math.max(0, Math.min(this.rowElements.length - 1, rowIndex));\n      const focusRow = this.rowElements[focusRowIndex];\n      const cells = focusRow.querySelectorAll('[role=\"cell\"], [role=\"gridcell\"], [role=\"columnheader\"], [role=\"rowheader\"]');\n      const focusColumnIndex = Math.max(0, Math.min(cells.length - 1, columnIndex));\n      const focusTarget = cells[focusColumnIndex];\n      if (scrollIntoView && this.scrollHeight !== this.clientHeight && (focusRowIndex < this.focusRowIndex && this.scrollTop > 0 || focusRowIndex > this.focusRowIndex && this.scrollTop < this.scrollHeight - this.clientHeight)) {\n        focusTarget.scrollIntoView({\n          block: \"center\",\n          inline: \"center\"\n        });\n      }\n      focusTarget.focus();\n    };\n    this.onChildListChange = (mutations, /* eslint-disable-next-line @typescript-eslint/no-unused-vars */\n    observer) => {\n      if (mutations && mutations.length) {\n        mutations.forEach(mutation => {\n          mutation.addedNodes.forEach(newNode => {\n            if (newNode.nodeType === 1 && newNode.getAttribute(\"role\") === \"row\") {\n              newNode.columnDefinitions = this.columnDefinitions;\n            }\n          });\n        });\n        this.queueRowIndexUpdate();\n      }\n    };\n    this.queueRowIndexUpdate = () => {\n      if (!this.rowindexUpdateQueued) {\n        this.rowindexUpdateQueued = true;\n        DOM.queueUpdate(this.updateRowIndexes);\n      }\n    };\n    this.updateRowIndexes = () => {\n      let newGridTemplateColumns = this.gridTemplateColumns;\n      if (newGridTemplateColumns === undefined) {\n        // try to generate columns based on manual rows\n        if (this.generatedGridTemplateColumns === \"\" && this.rowElements.length > 0) {\n          const firstRow = this.rowElements[0];\n          this.generatedGridTemplateColumns = new Array(firstRow.cellElements.length).fill(\"1fr\").join(\" \");\n        }\n        newGridTemplateColumns = this.generatedGridTemplateColumns;\n      }\n      this.rowElements.forEach((element, index) => {\n        const thisRow = element;\n        thisRow.rowIndex = index;\n        thisRow.gridTemplateColumns = newGridTemplateColumns;\n        if (this.columnDefinitionsStale) {\n          thisRow.columnDefinitions = this.columnDefinitions;\n        }\n      });\n      this.rowindexUpdateQueued = false;\n      this.columnDefinitionsStale = false;\n    };\n  }\n  /**\n   *  generates a gridTemplateColumns based on columndata array\n   */\n  static generateTemplateColumns(columnDefinitions) {\n    let templateColumns = \"\";\n    columnDefinitions.forEach(column => {\n      templateColumns = `${templateColumns}${templateColumns === \"\" ? \"\" : \" \"}${\"1fr\"}`;\n    });\n    return templateColumns;\n  }\n  noTabbingChanged() {\n    if (this.$fastController.isConnected) {\n      if (this.noTabbing) {\n        this.setAttribute(\"tabIndex\", \"-1\");\n      } else {\n        this.setAttribute(\"tabIndex\", this.contains(document.activeElement) || this === document.activeElement ? \"-1\" : \"0\");\n      }\n    }\n  }\n  generateHeaderChanged() {\n    if (this.$fastController.isConnected) {\n      this.toggleGeneratedHeader();\n    }\n  }\n  gridTemplateColumnsChanged() {\n    if (this.$fastController.isConnected) {\n      this.updateRowIndexes();\n    }\n  }\n  rowsDataChanged() {\n    if (this.columnDefinitions === null && this.rowsData.length > 0) {\n      this.columnDefinitions = DataGrid.generateColumns(this.rowsData[0]);\n    }\n    if (this.$fastController.isConnected) {\n      this.toggleGeneratedHeader();\n    }\n  }\n  columnDefinitionsChanged() {\n    if (this.columnDefinitions === null) {\n      this.generatedGridTemplateColumns = \"\";\n      return;\n    }\n    this.generatedGridTemplateColumns = DataGrid.generateTemplateColumns(this.columnDefinitions);\n    if (this.$fastController.isConnected) {\n      this.columnDefinitionsStale = true;\n      this.queueRowIndexUpdate();\n    }\n  }\n  headerCellItemTemplateChanged() {\n    if (this.$fastController.isConnected) {\n      if (this.generatedHeader !== null) {\n        this.generatedHeader.headerCellItemTemplate = this.headerCellItemTemplate;\n      }\n    }\n  }\n  focusRowIndexChanged() {\n    if (this.$fastController.isConnected) {\n      this.queueFocusUpdate();\n    }\n  }\n  focusColumnIndexChanged() {\n    if (this.$fastController.isConnected) {\n      this.queueFocusUpdate();\n    }\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    if (this.rowItemTemplate === undefined) {\n      this.rowItemTemplate = this.defaultRowItemTemplate;\n    }\n    this.rowsPlaceholder = document.createComment(\"\");\n    this.appendChild(this.rowsPlaceholder);\n    this.toggleGeneratedHeader();\n    this.rowsRepeatBehavior = new RepeatDirective(x => x.rowsData, x => x.rowItemTemplate, {\n      positioning: true\n    }).createBehavior(this.rowsPlaceholder);\n    /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n    this.$fastController.addBehaviors([this.rowsRepeatBehavior]);\n    this.addEventListener(\"row-focused\", this.handleRowFocus);\n    this.addEventListener(eventFocus, this.handleFocus);\n    this.addEventListener(eventKeyDown, this.handleKeydown);\n    this.addEventListener(eventFocusOut, this.handleFocusOut);\n    this.observer = new MutationObserver(this.onChildListChange);\n    // only observe if nodes are added or removed\n    this.observer.observe(this, {\n      childList: true\n    });\n    if (this.noTabbing) {\n      this.setAttribute(\"tabindex\", \"-1\");\n    }\n    DOM.queueUpdate(this.queueRowIndexUpdate);\n  }\n  /**\n   * @internal\n   */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    this.removeEventListener(\"row-focused\", this.handleRowFocus);\n    this.removeEventListener(eventFocus, this.handleFocus);\n    this.removeEventListener(eventKeyDown, this.handleKeydown);\n    this.removeEventListener(eventFocusOut, this.handleFocusOut);\n    // disconnect observer\n    this.observer.disconnect();\n    this.rowsPlaceholder = null;\n    this.generatedHeader = null;\n  }\n  /**\n   * @internal\n   */\n  handleRowFocus(e) {\n    this.isUpdatingFocus = true;\n    const focusRow = e.target;\n    this.focusRowIndex = this.rowElements.indexOf(focusRow);\n    this.focusColumnIndex = focusRow.focusColumnIndex;\n    this.setAttribute(\"tabIndex\", \"-1\");\n    this.isUpdatingFocus = false;\n  }\n  /**\n   * @internal\n   */\n  handleFocus(e) {\n    this.focusOnCell(this.focusRowIndex, this.focusColumnIndex, true);\n  }\n  /**\n   * @internal\n   */\n  handleFocusOut(e) {\n    if (e.relatedTarget === null || !this.contains(e.relatedTarget)) {\n      this.setAttribute(\"tabIndex\", this.noTabbing ? \"-1\" : \"0\");\n    }\n  }\n  /**\n   * @internal\n   */\n  handleKeydown(e) {\n    if (e.defaultPrevented) {\n      return;\n    }\n    let newFocusRowIndex;\n    const maxIndex = this.rowElements.length - 1;\n    const currentGridBottom = this.offsetHeight + this.scrollTop;\n    const lastRow = this.rowElements[maxIndex];\n    switch (e.key) {\n      case keyArrowUp:\n        e.preventDefault();\n        // focus up one row\n        this.focusOnCell(this.focusRowIndex - 1, this.focusColumnIndex, true);\n        break;\n      case keyArrowDown:\n        e.preventDefault();\n        // focus down one row\n        this.focusOnCell(this.focusRowIndex + 1, this.focusColumnIndex, true);\n        break;\n      case keyPageUp:\n        e.preventDefault();\n        if (this.rowElements.length === 0) {\n          this.focusOnCell(0, 0, false);\n          break;\n        }\n        if (this.focusRowIndex === 0) {\n          this.focusOnCell(0, this.focusColumnIndex, false);\n          return;\n        }\n        newFocusRowIndex = this.focusRowIndex - 1;\n        for (newFocusRowIndex; newFocusRowIndex >= 0; newFocusRowIndex--) {\n          const thisRow = this.rowElements[newFocusRowIndex];\n          if (thisRow.offsetTop < this.scrollTop) {\n            this.scrollTop = thisRow.offsetTop + thisRow.clientHeight - this.clientHeight;\n            break;\n          }\n        }\n        this.focusOnCell(newFocusRowIndex, this.focusColumnIndex, false);\n        break;\n      case keyPageDown:\n        e.preventDefault();\n        if (this.rowElements.length === 0) {\n          this.focusOnCell(0, 0, false);\n          break;\n        }\n        // focus down one \"page\"\n        if (this.focusRowIndex >= maxIndex || lastRow.offsetTop + lastRow.offsetHeight <= currentGridBottom) {\n          this.focusOnCell(maxIndex, this.focusColumnIndex, false);\n          return;\n        }\n        newFocusRowIndex = this.focusRowIndex + 1;\n        for (newFocusRowIndex; newFocusRowIndex <= maxIndex; newFocusRowIndex++) {\n          const thisRow = this.rowElements[newFocusRowIndex];\n          if (thisRow.offsetTop + thisRow.offsetHeight > currentGridBottom) {\n            let stickyHeaderOffset = 0;\n            if (this.generateHeader === GenerateHeaderOptions.sticky && this.generatedHeader !== null) {\n              stickyHeaderOffset = this.generatedHeader.clientHeight;\n            }\n            this.scrollTop = thisRow.offsetTop - stickyHeaderOffset;\n            break;\n          }\n        }\n        this.focusOnCell(newFocusRowIndex, this.focusColumnIndex, false);\n        break;\n      case keyHome:\n        if (e.ctrlKey) {\n          e.preventDefault();\n          // focus first cell of first row\n          this.focusOnCell(0, 0, true);\n        }\n        break;\n      case keyEnd:\n        if (e.ctrlKey && this.columnDefinitions !== null) {\n          e.preventDefault();\n          // focus last cell of last row\n          this.focusOnCell(this.rowElements.length - 1, this.columnDefinitions.length - 1, true);\n        }\n        break;\n    }\n  }\n  queueFocusUpdate() {\n    if (this.isUpdatingFocus && (this.contains(document.activeElement) || this === document.activeElement)) {\n      return;\n    }\n    if (this.pendingFocusUpdate === false) {\n      this.pendingFocusUpdate = true;\n      DOM.queueUpdate(() => this.updateFocus());\n    }\n  }\n  updateFocus() {\n    this.pendingFocusUpdate = false;\n    this.focusOnCell(this.focusRowIndex, this.focusColumnIndex, true);\n  }\n  toggleGeneratedHeader() {\n    if (this.generatedHeader !== null) {\n      this.removeChild(this.generatedHeader);\n      this.generatedHeader = null;\n    }\n    if (this.generateHeader !== GenerateHeaderOptions.none && this.rowsData.length > 0) {\n      const generatedHeaderElement = document.createElement(this.rowElementTag);\n      this.generatedHeader = generatedHeaderElement;\n      this.generatedHeader.columnDefinitions = this.columnDefinitions;\n      this.generatedHeader.gridTemplateColumns = this.gridTemplateColumns;\n      this.generatedHeader.rowType = this.generateHeader === GenerateHeaderOptions.sticky ? DataGridRowTypes.stickyHeader : DataGridRowTypes.header;\n      if (this.firstChild !== null || this.rowsPlaceholder !== null) {\n        this.insertBefore(generatedHeaderElement, this.firstChild !== null ? this.firstChild : this.rowsPlaceholder);\n      }\n      return;\n    }\n  }\n}\n/**\n *  generates a basic column definition by examining sample row data\n */\nDataGrid.generateColumns = row => {\n  return Object.getOwnPropertyNames(row).map((property, index) => {\n    return {\n      columnDataKey: property,\n      gridColumn: `${index}`\n    };\n  });\n};\n__decorate$1([attr({\n  attribute: \"no-tabbing\",\n  mode: \"boolean\"\n})], DataGrid.prototype, \"noTabbing\", void 0);\n__decorate$1([attr({\n  attribute: \"generate-header\"\n})], DataGrid.prototype, \"generateHeader\", void 0);\n__decorate$1([attr({\n  attribute: \"grid-template-columns\"\n})], DataGrid.prototype, \"gridTemplateColumns\", void 0);\n__decorate$1([observable], DataGrid.prototype, \"rowsData\", void 0);\n__decorate$1([observable], DataGrid.prototype, \"columnDefinitions\", void 0);\n__decorate$1([observable], DataGrid.prototype, \"rowItemTemplate\", void 0);\n__decorate$1([observable], DataGrid.prototype, \"cellItemTemplate\", void 0);\n__decorate$1([observable], DataGrid.prototype, \"headerCellItemTemplate\", void 0);\n__decorate$1([observable], DataGrid.prototype, \"focusRowIndex\", void 0);\n__decorate$1([observable], DataGrid.prototype, \"focusColumnIndex\", void 0);\n__decorate$1([observable], DataGrid.prototype, \"defaultRowItemTemplate\", void 0);\n__decorate$1([observable], DataGrid.prototype, \"rowElementTag\", void 0);\n__decorate$1([observable], DataGrid.prototype, \"rowElements\", void 0);\n\nconst defaultCellContentsTemplate = html`<template>${x => x.rowData === null || x.columnDefinition === null || x.columnDefinition.columnDataKey === null ? null : x.rowData[x.columnDefinition.columnDataKey]}</template>`;\nconst defaultHeaderCellContentsTemplate = html`<template>${x => x.columnDefinition === null ? null : x.columnDefinition.title === undefined ? x.columnDefinition.columnDataKey : x.columnDefinition.title}</template>`;\n/**\n * A Data Grid Cell Custom HTML Element.\n *\n * @fires cell-focused - Fires a custom 'cell-focused' event when focus is on the cell or its contents\n * @slot - The default slot for cell contents.  The \"cell contents template\" renders here.\n * @public\n */\nclass DataGridCell extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * The type of cell\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: cell-type\n     */\n    this.cellType = DataGridCellTypes.default;\n    /**\n     * The base data for the parent row\n     *\n     * @public\n     */\n    this.rowData = null;\n    /**\n     * The base data for the column\n     *\n     * @public\n     */\n    this.columnDefinition = null;\n    this.isActiveCell = false;\n    this.customCellView = null;\n    this.updateCellStyle = () => {\n      this.style.gridColumn = this.gridColumn;\n    };\n  }\n  cellTypeChanged() {\n    if (this.$fastController.isConnected) {\n      this.updateCellView();\n    }\n  }\n  gridColumnChanged() {\n    if (this.$fastController.isConnected) {\n      this.updateCellStyle();\n    }\n  }\n  columnDefinitionChanged(oldValue, newValue) {\n    if (this.$fastController.isConnected) {\n      this.updateCellView();\n    }\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    var _a;\n    super.connectedCallback();\n    this.addEventListener(eventFocusIn, this.handleFocusin);\n    this.addEventListener(eventFocusOut, this.handleFocusout);\n    this.addEventListener(eventKeyDown, this.handleKeydown);\n    this.style.gridColumn = `${((_a = this.columnDefinition) === null || _a === void 0 ? void 0 : _a.gridColumn) === undefined ? 0 : this.columnDefinition.gridColumn}`;\n    this.updateCellView();\n    this.updateCellStyle();\n  }\n  /**\n   * @internal\n   */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    this.removeEventListener(eventFocusIn, this.handleFocusin);\n    this.removeEventListener(eventFocusOut, this.handleFocusout);\n    this.removeEventListener(eventKeyDown, this.handleKeydown);\n    this.disconnectCellView();\n  }\n  handleFocusin(e) {\n    if (this.isActiveCell) {\n      return;\n    }\n    this.isActiveCell = true;\n    switch (this.cellType) {\n      case DataGridCellTypes.columnHeader:\n        if (this.columnDefinition !== null && this.columnDefinition.headerCellInternalFocusQueue !== true && typeof this.columnDefinition.headerCellFocusTargetCallback === \"function\") {\n          // move focus to the focus target\n          const focusTarget = this.columnDefinition.headerCellFocusTargetCallback(this);\n          if (focusTarget !== null) {\n            focusTarget.focus();\n          }\n        }\n        break;\n      default:\n        if (this.columnDefinition !== null && this.columnDefinition.cellInternalFocusQueue !== true && typeof this.columnDefinition.cellFocusTargetCallback === \"function\") {\n          // move focus to the focus target\n          const focusTarget = this.columnDefinition.cellFocusTargetCallback(this);\n          if (focusTarget !== null) {\n            focusTarget.focus();\n          }\n        }\n        break;\n    }\n    this.$emit(\"cell-focused\", this);\n  }\n  handleFocusout(e) {\n    if (this !== document.activeElement && !this.contains(document.activeElement)) {\n      this.isActiveCell = false;\n    }\n  }\n  handleKeydown(e) {\n    if (e.defaultPrevented || this.columnDefinition === null || this.cellType === DataGridCellTypes.default && this.columnDefinition.cellInternalFocusQueue !== true || this.cellType === DataGridCellTypes.columnHeader && this.columnDefinition.headerCellInternalFocusQueue !== true) {\n      return;\n    }\n    switch (e.key) {\n      case keyEnter:\n      case keyFunction2:\n        if (this.contains(document.activeElement) && document.activeElement !== this) {\n          return;\n        }\n        switch (this.cellType) {\n          case DataGridCellTypes.columnHeader:\n            if (this.columnDefinition.headerCellFocusTargetCallback !== undefined) {\n              const focusTarget = this.columnDefinition.headerCellFocusTargetCallback(this);\n              if (focusTarget !== null) {\n                focusTarget.focus();\n              }\n              e.preventDefault();\n            }\n            break;\n          default:\n            if (this.columnDefinition.cellFocusTargetCallback !== undefined) {\n              const focusTarget = this.columnDefinition.cellFocusTargetCallback(this);\n              if (focusTarget !== null) {\n                focusTarget.focus();\n              }\n              e.preventDefault();\n            }\n            break;\n        }\n        break;\n      case keyEscape:\n        if (this.contains(document.activeElement) && document.activeElement !== this) {\n          this.focus();\n          e.preventDefault();\n        }\n        break;\n    }\n  }\n  updateCellView() {\n    this.disconnectCellView();\n    if (this.columnDefinition === null) {\n      return;\n    }\n    switch (this.cellType) {\n      case DataGridCellTypes.columnHeader:\n        if (this.columnDefinition.headerCellTemplate !== undefined) {\n          this.customCellView = this.columnDefinition.headerCellTemplate.render(this, this);\n        } else {\n          this.customCellView = defaultHeaderCellContentsTemplate.render(this, this);\n        }\n        break;\n      case undefined:\n      case DataGridCellTypes.rowHeader:\n      case DataGridCellTypes.default:\n        if (this.columnDefinition.cellTemplate !== undefined) {\n          this.customCellView = this.columnDefinition.cellTemplate.render(this, this);\n        } else {\n          this.customCellView = defaultCellContentsTemplate.render(this, this);\n        }\n        break;\n    }\n  }\n  disconnectCellView() {\n    if (this.customCellView !== null) {\n      this.customCellView.dispose();\n      this.customCellView = null;\n    }\n  }\n}\n__decorate$1([attr({\n  attribute: \"cell-type\"\n})], DataGridCell.prototype, \"cellType\", void 0);\n__decorate$1([attr({\n  attribute: \"grid-column\"\n})], DataGridCell.prototype, \"gridColumn\", void 0);\n__decorate$1([observable], DataGridCell.prototype, \"rowData\", void 0);\n__decorate$1([observable], DataGridCell.prototype, \"columnDefinition\", void 0);\n\nfunction createCellItemTemplate(context) {\n  const cellTag = context.tagFor(DataGridCell);\n  return html`<${cellTag} cell-type=\"${x => x.isRowHeader ? \"rowheader\" : undefined}\" grid-column=\"${(x, c) => c.index + 1}\" :rowData=\"${(x, c) => c.parent.rowData}\" :columnDefinition=\"${x => x}\"></${cellTag}>`;\n}\nfunction createHeaderCellItemTemplate(context) {\n  const cellTag = context.tagFor(DataGridCell);\n  return html`<${cellTag} cell-type=\"columnheader\" grid-column=\"${(x, c) => c.index + 1}\" :columnDefinition=\"${x => x}\"></${cellTag}>`;\n}\n/**\n * Generates a template for the {@link @microsoft/fast-foundation#DataGridRow} component using\n * the provided prefix.\n *\n * @public\n */\nconst dataGridRowTemplate = (context, definition) => {\n  const cellItemTemplate = createCellItemTemplate(context);\n  const headerCellItemTemplate = createHeaderCellItemTemplate(context);\n  return html`<template role=\"row\" class=\"${x => x.rowType !== \"default\" ? x.rowType : \"\"}\" :defaultCellItemTemplate=\"${cellItemTemplate}\" :defaultHeaderCellItemTemplate=\"${headerCellItemTemplate}\" ${children({\n    property: \"cellElements\",\n    filter: elements('[role=\"cell\"],[role=\"gridcell\"],[role=\"columnheader\"],[role=\"rowheader\"]')\n  })}><slot ${slotted(\"slottedCellElements\")}></slot></template>`;\n};\n\n/**\n * Generates a template for the {@link @microsoft/fast-foundation#DataGridCell} component using\n * the provided prefix.\n * @public\n */\nconst dataGridCellTemplate = (context, definition) => {\n  return html`<template tabindex=\"-1\" role=\"${x => !x.cellType || x.cellType === \"default\" ? \"gridcell\" : x.cellType}\" class=\" ${x => x.cellType === \"columnheader\" ? \"column-header\" : x.cellType === \"rowheader\" ? \"row-header\" : \"\"} \"><slot></slot></template>`;\n};\n\n/**\n * A basic Calendar title template that includes the month and year\n * @returns - A calendar title template\n * @public\n */\nconst CalendarTitleTemplate = html`<div class=\"title\" part=\"title\" aria-label=\"${x => x.dateFormatter.getDate(`${x.month}-2-${x.year}`, {\n  month: \"long\",\n  year: \"numeric\"\n})}\"><span part=\"month\">${x => x.dateFormatter.getMonth(x.month)}</span><span part=\"year\">${x => x.dateFormatter.getYear(x.year)}</span></div>`;\n/**\n * Calendar weekday label template\n * @returns - The weekday labels template\n * @public\n */\nconst calendarWeekdayTemplate = context => {\n  const cellTag = context.tagFor(DataGridCell);\n  return html`<${cellTag} class=\"week-day\" part=\"week-day\" tabindex=\"-1\" grid-column=\"${(x, c) => c.index + 1}\" abbr=\"${x => x.abbr}\">${x => x.text}</${cellTag}>`;\n};\n/**\n * A calendar day template\n * @param context - Element definition context for getting the cell tag for calendar-cell\n * @param todayString - A string representation for todays date\n * @returns - A calendar cell template for a given date\n * @public\n */\nconst calendarCellTemplate = (context, todayString) => {\n  const cellTag = context.tagFor(DataGridCell);\n  return html`<${cellTag} class=\"${(x, c) => c.parentContext.parent.getDayClassNames(x, todayString)}\" part=\"day\" tabindex=\"-1\" role=\"gridcell\" grid-column=\"${(x, c) => c.index + 1}\" @click=\"${(x, c) => c.parentContext.parent.handleDateSelect(c.event, x)}\" @keydown=\"${(x, c) => c.parentContext.parent.handleKeydown(c.event, x)}\" aria-label=\"${(x, c) => c.parentContext.parent.dateFormatter.getDate(`${x.month}-${x.day}-${x.year}`, {\n    month: \"long\",\n    day: \"numeric\"\n  })}\"><div class=\"date\" part=\"${x => todayString === `${x.month}-${x.day}-${x.year}` ? \"today\" : \"date\"}\">${(x, c) => c.parentContext.parent.dateFormatter.getDay(x.day)}</div><slot name=\"${x => x.month}-${x => x.day}-${x => x.year}\"></slot></${cellTag}>`;\n};\n/**\n *\n * @param context - Element definition context for getting the cell tag for calendar-cell\n * @param todayString - A string representation for todays date\n * @returns - A template for a week of days\n * @public\n */\nconst calendarRowTemplate = (context, todayString) => {\n  const rowTag = context.tagFor(DataGridRow);\n  return html`<${rowTag} class=\"week\" part=\"week\" role=\"row\" role-type=\"default\" grid-template-columns=\"1fr 1fr 1fr 1fr 1fr 1fr 1fr\">${repeat(x => x, calendarCellTemplate(context, todayString), {\n    positioning: true\n  })}</${rowTag}>`;\n};\n/**\n * Interactive template using DataGrid\n * @param context - The templates context\n * @param todayString - string representation of todays date\n * @returns - interactive calendar template\n *\n * @internal\n */\nconst interactiveCalendarGridTemplate = (context, todayString) => {\n  const gridTag = context.tagFor(DataGrid);\n  const rowTag = context.tagFor(DataGridRow);\n  return html`<${gridTag} class=\"days interact\" part=\"days\" generate-header=\"none\"><${rowTag} class=\"week-days\" part=\"week-days\" role=\"row\" row-type=\"header\" grid-template-columns=\"1fr 1fr 1fr 1fr 1fr 1fr 1fr\">${repeat(x => x.getWeekdayText(), calendarWeekdayTemplate(context), {\n    positioning: true\n  })}</${rowTag}>${repeat(x => x.getDays(), calendarRowTemplate(context, todayString))}</${gridTag}>`;\n};\n/**\n * Non-interactive calendar template used for a readonly calendar\n * @param todayString - string representation of todays date\n * @returns - non-interactive calendar template\n *\n * @internal\n */\nconst noninteractiveCalendarTemplate = todayString => {\n  return html`<div class=\"days\" part=\"days\"><div class=\"week-days\" part=\"week-days\">${repeat(x => x.getWeekdayText(), html`<div class=\"week-day\" part=\"week-day\" abbr=\"${x => x.abbr}\">${x => x.text}</div>`)}</div>${repeat(x => x.getDays(), html`<div class=\"week\">${repeat(x => x, html`<div class=\"${(x, c) => c.parentContext.parent.getDayClassNames(x, todayString)}\" part=\"day\" aria-label=\"${(x, c) => c.parentContext.parent.dateFormatter.getDate(`${x.month}-${x.day}-${x.year}`, {\n    month: \"long\",\n    day: \"numeric\"\n  })}\"><div class=\"date\" part=\"${x => todayString === `${x.month}-${x.day}-${x.year}` ? \"today\" : \"date\"}\">${(x, c) => c.parentContext.parent.dateFormatter.getDay(x.day)}</div><slot name=\"${x => x.month}-${x => x.day}-${x => x.year}\"></slot></div>`)}</div>`)}</div>`;\n};\n/**\n * The template for the {@link @microsoft/fast-foundation#(Calendar:class)} component.\n *\n * @param context - Element definition context for getting the cell tag for calendar-cell\n * @param definition - Foundation element definition\n * @returns - a template for a calendar month\n * @public\n */\nconst calendarTemplate = (context, definition) => {\n  var _a;\n  const today = new Date();\n  const todayString = `${today.getMonth() + 1}-${today.getDate()}-${today.getFullYear()}`;\n  return html`<template>${startTemplate} ${definition.title instanceof Function ? definition.title(context, definition) : (_a = definition.title) !== null && _a !== void 0 ? _a : \"\"}<slot></slot>${when(x => x.readonly, noninteractiveCalendarTemplate(todayString), interactiveCalendarGridTemplate(context, todayString))} ${endTemplate}</template>`;\n};\n\n/**\n * The template for the {@link @microsoft/fast-foundation#Card} component.\n * @public\n */\nconst cardTemplate = (context, definition) => html`<slot></slot>`;\n\n/**\n * An Card Custom HTML Element.\n *\n * @slot - The default slot for the card content\n *\n * @public\n */\nclass Card$1 extends FoundationElement {}\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(Checkbox:class)} component.\n * @public\n */\nconst checkboxTemplate = (context, definition) => html`<template role=\"checkbox\" aria-checked=\"${x => x.checked}\" aria-required=\"${x => x.required}\" aria-disabled=\"${x => x.disabled}\" aria-readonly=\"${x => x.readOnly}\" tabindex=\"${x => x.disabled ? null : 0}\" @keypress=\"${(x, c) => x.keypressHandler(c.event)}\" @click=\"${(x, c) => x.clickHandler(c.event)}\" class=\"${x => x.readOnly ? \"readonly\" : \"\"} ${x => x.checked ? \"checked\" : \"\"} ${x => x.indeterminate ? \"indeterminate\" : \"\"}\"><div part=\"control\" class=\"control\"><slot name=\"checked-indicator\">${definition.checkedIndicator || \"\"}</slot><slot name=\"indeterminate-indicator\">${definition.indeterminateIndicator || \"\"}</slot></div><label part=\"label\" class=\"${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length ? \"label\" : \"label label__hidden\"}\"><slot ${slotted(\"defaultSlottedNodes\")}></slot></label></template>`;\n\nclass _Checkbox extends FoundationElement {}\n/**\n * A form-associated base class for the {@link @microsoft/fast-foundation#(Checkbox:class)} component.\n *\n * @internal\n */\nclass FormAssociatedCheckbox extends CheckableFormAssociated(_Checkbox) {\n  constructor() {\n    super(...arguments);\n    this.proxy = document.createElement(\"input\");\n  }\n}\n\n/**\n * A Checkbox Custom HTML Element.\n * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#checkbox | ARIA checkbox }.\n *\n * @slot checked-indicator - The checked indicator\n * @slot indeterminate-indicator - The indeterminate indicator\n * @slot - The default slot for the label\n * @csspart control - The element representing the visual checkbox control\n * @csspart label - The label\n * @fires change - Emits a custom change event when the checked state changes\n *\n * @public\n */\nclass Checkbox extends FormAssociatedCheckbox {\n  constructor() {\n    super();\n    /**\n     * The element's value to be included in form submission when checked.\n     * Default to \"on\" to reach parity with input[type=\"checkbox\"]\n     *\n     * @internal\n     */\n    this.initialValue = \"on\";\n    /**\n     * The indeterminate state of the control\n     */\n    this.indeterminate = false;\n    /**\n     * @internal\n     */\n    this.keypressHandler = e => {\n      if (this.readOnly) {\n        return;\n      }\n      switch (e.key) {\n        case keySpace:\n          if (this.indeterminate) {\n            this.indeterminate = false;\n          }\n          this.checked = !this.checked;\n          break;\n      }\n    };\n    /**\n     * @internal\n     */\n    this.clickHandler = e => {\n      if (!this.disabled && !this.readOnly) {\n        if (this.indeterminate) {\n          this.indeterminate = false;\n        }\n        this.checked = !this.checked;\n      }\n    };\n    this.proxy.setAttribute(\"type\", \"checkbox\");\n  }\n  readOnlyChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.readOnly = this.readOnly;\n    }\n  }\n}\n__decorate$1([attr({\n  attribute: \"readonly\",\n  mode: \"boolean\"\n})], Checkbox.prototype, \"readOnly\", void 0);\n__decorate$1([observable], Checkbox.prototype, \"defaultSlottedNodes\", void 0);\n__decorate$1([observable], Checkbox.prototype, \"indeterminate\", void 0);\n\n/**\n * Determines if the element is a {@link (ListboxOption:class)}\n *\n * @param element - the element to test.\n * @public\n */\nfunction isListboxOption(el) {\n  return isHTMLElement(el) && (el.getAttribute(\"role\") === \"option\" || el instanceof HTMLOptionElement);\n}\n/**\n * An Option Custom HTML Element.\n * Implements {@link https://www.w3.org/TR/wai-aria-1.1/#option | ARIA option }.\n *\n * @slot start - Content which can be provided before the listbox option content\n * @slot end - Content which can be provided after the listbox option content\n * @slot - The default slot for listbox option content\n * @csspart content - Wraps the listbox option content\n *\n * @public\n */\nclass ListboxOption extends FoundationElement {\n  constructor(text, value, defaultSelected, selected) {\n    super();\n    /**\n     * The defaultSelected state of the option.\n     * @public\n     */\n    this.defaultSelected = false;\n    /**\n     * Tracks whether the \"selected\" property has been changed.\n     * @internal\n     */\n    this.dirtySelected = false;\n    /**\n     * The checked state of the control.\n     *\n     * @public\n     */\n    this.selected = this.defaultSelected;\n    /**\n     * Track whether the value has been changed from the initial value\n     */\n    this.dirtyValue = false;\n    if (text) {\n      this.textContent = text;\n    }\n    if (value) {\n      this.initialValue = value;\n    }\n    if (defaultSelected) {\n      this.defaultSelected = defaultSelected;\n    }\n    if (selected) {\n      this.selected = selected;\n    }\n    this.proxy = new Option(`${this.textContent}`, this.initialValue, this.defaultSelected, this.selected);\n    this.proxy.disabled = this.disabled;\n  }\n  /**\n   * Updates the ariaChecked property when the checked property changes.\n   *\n   * @param prev - the previous checked value\n   * @param next - the current checked value\n   *\n   * @public\n   */\n  checkedChanged(prev, next) {\n    if (typeof next === \"boolean\") {\n      this.ariaChecked = next ? \"true\" : \"false\";\n      return;\n    }\n    this.ariaChecked = null;\n  }\n  /**\n   * Updates the proxy's text content when the default slot changes.\n   * @param prev - the previous content value\n   * @param next - the current content value\n   *\n   * @internal\n   */\n  contentChanged(prev, next) {\n    if (this.proxy instanceof HTMLOptionElement) {\n      this.proxy.textContent = this.textContent;\n    }\n    this.$emit(\"contentchange\", null, {\n      bubbles: true\n    });\n  }\n  defaultSelectedChanged() {\n    if (!this.dirtySelected) {\n      this.selected = this.defaultSelected;\n      if (this.proxy instanceof HTMLOptionElement) {\n        this.proxy.selected = this.defaultSelected;\n      }\n    }\n  }\n  disabledChanged(prev, next) {\n    this.ariaDisabled = this.disabled ? \"true\" : \"false\";\n    if (this.proxy instanceof HTMLOptionElement) {\n      this.proxy.disabled = this.disabled;\n    }\n  }\n  selectedAttributeChanged() {\n    this.defaultSelected = this.selectedAttribute;\n    if (this.proxy instanceof HTMLOptionElement) {\n      this.proxy.defaultSelected = this.defaultSelected;\n    }\n  }\n  selectedChanged() {\n    this.ariaSelected = this.selected ? \"true\" : \"false\";\n    if (!this.dirtySelected) {\n      this.dirtySelected = true;\n    }\n    if (this.proxy instanceof HTMLOptionElement) {\n      this.proxy.selected = this.selected;\n    }\n  }\n  initialValueChanged(previous, next) {\n    // If the value is clean and the component is connected to the DOM\n    // then set value equal to the attribute value.\n    if (!this.dirtyValue) {\n      this.value = this.initialValue;\n      this.dirtyValue = false;\n    }\n  }\n  get label() {\n    var _a;\n    return (_a = this.value) !== null && _a !== void 0 ? _a : this.text;\n  }\n  get text() {\n    var _a, _b;\n    return (_b = (_a = this.textContent) === null || _a === void 0 ? void 0 : _a.replace(/\\s+/g, \" \").trim()) !== null && _b !== void 0 ? _b : \"\";\n  }\n  set value(next) {\n    const newValue = `${next !== null && next !== void 0 ? next : \"\"}`;\n    this._value = newValue;\n    this.dirtyValue = true;\n    if (this.proxy instanceof HTMLOptionElement) {\n      this.proxy.value = newValue;\n    }\n    Observable.notify(this, \"value\");\n  }\n  get value() {\n    var _a;\n    Observable.track(this, \"value\");\n    return (_a = this._value) !== null && _a !== void 0 ? _a : this.text;\n  }\n  get form() {\n    return this.proxy ? this.proxy.form : null;\n  }\n}\n__decorate$1([observable], ListboxOption.prototype, \"checked\", void 0);\n__decorate$1([observable], ListboxOption.prototype, \"content\", void 0);\n__decorate$1([observable], ListboxOption.prototype, \"defaultSelected\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], ListboxOption.prototype, \"disabled\", void 0);\n__decorate$1([attr({\n  attribute: \"selected\",\n  mode: \"boolean\"\n})], ListboxOption.prototype, \"selectedAttribute\", void 0);\n__decorate$1([observable], ListboxOption.prototype, \"selected\", void 0);\n__decorate$1([attr({\n  attribute: \"value\",\n  mode: \"fromView\"\n})], ListboxOption.prototype, \"initialValue\", void 0);\n/**\n * States and properties relating to the ARIA `option` role.\n *\n * @public\n */\nclass DelegatesARIAListboxOption {}\n__decorate$1([observable], DelegatesARIAListboxOption.prototype, \"ariaChecked\", void 0);\n__decorate$1([observable], DelegatesARIAListboxOption.prototype, \"ariaPosInSet\", void 0);\n__decorate$1([observable], DelegatesARIAListboxOption.prototype, \"ariaSelected\", void 0);\n__decorate$1([observable], DelegatesARIAListboxOption.prototype, \"ariaSetSize\", void 0);\napplyMixins(DelegatesARIAListboxOption, ARIAGlobalStatesAndProperties);\napplyMixins(ListboxOption, StartEnd, DelegatesARIAListboxOption);\n\n/**\n * A Listbox Custom HTML Element.\n * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#listbox | ARIA listbox }.\n *\n * @slot - The default slot for the listbox options\n *\n * @public\n */\nclass Listbox$1 extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * The internal unfiltered list of selectable options.\n     *\n     * @internal\n     */\n    this._options = [];\n    /**\n     * The index of the selected option.\n     *\n     * @public\n     */\n    this.selectedIndex = -1;\n    /**\n     * A collection of the selected options.\n     *\n     * @public\n     */\n    this.selectedOptions = [];\n    /**\n     * A standard `click` event creates a `focus` event before firing, so a\n     * `mousedown` event is used to skip that initial focus.\n     *\n     * @internal\n     */\n    this.shouldSkipFocus = false;\n    /**\n     * The current typeahead buffer string.\n     *\n     * @internal\n     */\n    this.typeaheadBuffer = \"\";\n    /**\n     * Flag for the typeahead timeout expiration.\n     *\n     * @internal\n     */\n    this.typeaheadExpired = true;\n    /**\n     * The timeout ID for the typeahead handler.\n     *\n     * @internal\n     */\n    this.typeaheadTimeout = -1;\n  }\n  /**\n   * The first selected option.\n   *\n   * @internal\n   */\n  get firstSelectedOption() {\n    var _a;\n    return (_a = this.selectedOptions[0]) !== null && _a !== void 0 ? _a : null;\n  }\n  /**\n   * Returns true if there is one or more selectable option.\n   *\n   * @internal\n   */\n  get hasSelectableOptions() {\n    return this.options.length > 0 && !this.options.every(o => o.disabled);\n  }\n  /**\n   * The number of options.\n   *\n   * @public\n   */\n  get length() {\n    var _a, _b;\n    return (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n  }\n  /**\n   * The list of options.\n   *\n   * @public\n   */\n  get options() {\n    Observable.track(this, \"options\");\n    return this._options;\n  }\n  set options(value) {\n    this._options = value;\n    Observable.notify(this, \"options\");\n  }\n  /**\n   * Flag for the typeahead timeout expiration.\n   *\n   * @deprecated use `Listbox.typeaheadExpired`\n   * @internal\n   */\n  get typeAheadExpired() {\n    return this.typeaheadExpired;\n  }\n  set typeAheadExpired(value) {\n    this.typeaheadExpired = value;\n  }\n  /**\n   * Handle click events for listbox options.\n   *\n   * @internal\n   */\n  clickHandler(e) {\n    const captured = e.target.closest(`option,[role=option]`);\n    if (captured && !captured.disabled) {\n      this.selectedIndex = this.options.indexOf(captured);\n      return true;\n    }\n  }\n  /**\n   * Ensures that the provided option is focused and scrolled into view.\n   *\n   * @param optionToFocus - The option to focus\n   * @internal\n   */\n  focusAndScrollOptionIntoView(optionToFocus = this.firstSelectedOption) {\n    // To ensure that the browser handles both `focus()` and `scrollIntoView()`, the\n    // timing here needs to guarantee that they happen on different frames. Since this\n    // function is typically called from the `openChanged` observer, `DOM.queueUpdate`\n    // causes the calls to be grouped into the same frame. To prevent this,\n    // `requestAnimationFrame` is used instead of `DOM.queueUpdate`.\n    if (this.contains(document.activeElement) && optionToFocus !== null) {\n      optionToFocus.focus();\n      requestAnimationFrame(() => {\n        optionToFocus.scrollIntoView({\n          block: \"nearest\"\n        });\n      });\n    }\n  }\n  /**\n   * Handles `focusin` actions for the component. When the component receives focus,\n   * the list of selected options is refreshed and the first selected option is scrolled\n   * into view.\n   *\n   * @internal\n   */\n  focusinHandler(e) {\n    if (!this.shouldSkipFocus && e.target === e.currentTarget) {\n      this.setSelectedOptions();\n      this.focusAndScrollOptionIntoView();\n    }\n    this.shouldSkipFocus = false;\n  }\n  /**\n   * Returns the options which match the current typeahead buffer.\n   *\n   * @internal\n   */\n  getTypeaheadMatches() {\n    const pattern = this.typeaheadBuffer.replace(/[.*+\\-?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n    const re = new RegExp(`^${pattern}`, \"gi\");\n    return this.options.filter(o => o.text.trim().match(re));\n  }\n  /**\n   * Determines the index of the next option which is selectable, if any.\n   *\n   * @param prev - the previous selected index\n   * @param next - the next index to select\n   *\n   * @internal\n   */\n  getSelectableIndex(prev = this.selectedIndex, next) {\n    const direction = prev > next ? -1 : prev < next ? 1 : 0;\n    const potentialDirection = prev + direction;\n    let nextSelectableOption = null;\n    switch (direction) {\n      case -1:\n        {\n          nextSelectableOption = this.options.reduceRight((nextSelectableOption, thisOption, index) => !nextSelectableOption && !thisOption.disabled && index < potentialDirection ? thisOption : nextSelectableOption, nextSelectableOption);\n          break;\n        }\n      case 1:\n        {\n          nextSelectableOption = this.options.reduce((nextSelectableOption, thisOption, index) => !nextSelectableOption && !thisOption.disabled && index > potentialDirection ? thisOption : nextSelectableOption, nextSelectableOption);\n          break;\n        }\n    }\n    return this.options.indexOf(nextSelectableOption);\n  }\n  /**\n   * Handles external changes to child options.\n   *\n   * @param source - the source object\n   * @param propertyName - the property\n   *\n   * @internal\n   */\n  handleChange(source, propertyName) {\n    switch (propertyName) {\n      case \"selected\":\n        {\n          if (Listbox$1.slottedOptionFilter(source)) {\n            this.selectedIndex = this.options.indexOf(source);\n          }\n          this.setSelectedOptions();\n          break;\n        }\n    }\n  }\n  /**\n   * Moves focus to an option whose label matches characters typed by the user.\n   * Consecutive keystrokes are batched into a buffer of search text used\n   * to match against the set of options.  If `TYPE_AHEAD_TIMEOUT_MS` passes\n   * between consecutive keystrokes, the search restarts.\n   *\n   * @param key - the key to be evaluated\n   *\n   * @internal\n   */\n  handleTypeAhead(key) {\n    if (this.typeaheadTimeout) {\n      window.clearTimeout(this.typeaheadTimeout);\n    }\n    this.typeaheadTimeout = window.setTimeout(() => this.typeaheadExpired = true, Listbox$1.TYPE_AHEAD_TIMEOUT_MS);\n    if (key.length > 1) {\n      return;\n    }\n    this.typeaheadBuffer = `${this.typeaheadExpired ? \"\" : this.typeaheadBuffer}${key}`;\n  }\n  /**\n   * Handles `keydown` actions for listbox navigation and typeahead.\n   *\n   * @internal\n   */\n  keydownHandler(e) {\n    if (this.disabled) {\n      return true;\n    }\n    this.shouldSkipFocus = false;\n    const key = e.key;\n    switch (key) {\n      // Select the first available option\n      case keyHome:\n        {\n          if (!e.shiftKey) {\n            e.preventDefault();\n            this.selectFirstOption();\n          }\n          break;\n        }\n      // Select the next selectable option\n      case keyArrowDown:\n        {\n          if (!e.shiftKey) {\n            e.preventDefault();\n            this.selectNextOption();\n          }\n          break;\n        }\n      // Select the previous selectable option\n      case keyArrowUp:\n        {\n          if (!e.shiftKey) {\n            e.preventDefault();\n            this.selectPreviousOption();\n          }\n          break;\n        }\n      // Select the last available option\n      case keyEnd:\n        {\n          e.preventDefault();\n          this.selectLastOption();\n          break;\n        }\n      case keyTab:\n        {\n          this.focusAndScrollOptionIntoView();\n          return true;\n        }\n      case keyEnter:\n      case keyEscape:\n        {\n          return true;\n        }\n      case keySpace:\n        {\n          if (this.typeaheadExpired) {\n            return true;\n          }\n        }\n      // Send key to Typeahead handler\n      default:\n        {\n          if (key.length === 1) {\n            this.handleTypeAhead(`${key}`);\n          }\n          return true;\n        }\n    }\n  }\n  /**\n   * Prevents `focusin` events from firing before `click` events when the\n   * element is unfocused.\n   *\n   * @internal\n   */\n  mousedownHandler(e) {\n    this.shouldSkipFocus = !this.contains(document.activeElement);\n    return true;\n  }\n  /**\n   * Switches between single-selection and multi-selection mode.\n   *\n   * @param prev - the previous value of the `multiple` attribute\n   * @param next - the next value of the `multiple` attribute\n   *\n   * @internal\n   */\n  multipleChanged(prev, next) {\n    this.ariaMultiSelectable = next ? \"true\" : null;\n  }\n  /**\n   * Updates the list of selected options when the `selectedIndex` changes.\n   *\n   * @param prev - the previous selected index value\n   * @param next - the current selected index value\n   *\n   * @internal\n   */\n  selectedIndexChanged(prev, next) {\n    var _a;\n    if (!this.hasSelectableOptions) {\n      this.selectedIndex = -1;\n      return;\n    }\n    if (((_a = this.options[this.selectedIndex]) === null || _a === void 0 ? void 0 : _a.disabled) && typeof prev === \"number\") {\n      const selectableIndex = this.getSelectableIndex(prev, next);\n      const newNext = selectableIndex > -1 ? selectableIndex : prev;\n      this.selectedIndex = newNext;\n      if (next === newNext) {\n        this.selectedIndexChanged(next, newNext);\n      }\n      return;\n    }\n    this.setSelectedOptions();\n  }\n  /**\n   * Updates the selectedness of each option when the list of selected options changes.\n   *\n   * @param prev - the previous list of selected options\n   * @param next - the current list of selected options\n   *\n   * @internal\n   */\n  selectedOptionsChanged(prev, next) {\n    var _a;\n    const filteredNext = next.filter(Listbox$1.slottedOptionFilter);\n    (_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach(o => {\n      const notifier = Observable.getNotifier(o);\n      notifier.unsubscribe(this, \"selected\");\n      o.selected = filteredNext.includes(o);\n      notifier.subscribe(this, \"selected\");\n    });\n  }\n  /**\n   * Moves focus to the first selectable option.\n   *\n   * @public\n   */\n  selectFirstOption() {\n    var _a, _b;\n    if (!this.disabled) {\n      this.selectedIndex = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.findIndex(o => !o.disabled)) !== null && _b !== void 0 ? _b : -1;\n    }\n  }\n  /**\n   * Moves focus to the last selectable option.\n   *\n   * @internal\n   */\n  selectLastOption() {\n    if (!this.disabled) {\n      this.selectedIndex = findLastIndex(this.options, o => !o.disabled);\n    }\n  }\n  /**\n   * Moves focus to the next selectable option.\n   *\n   * @internal\n   */\n  selectNextOption() {\n    if (!this.disabled && this.selectedIndex < this.options.length - 1) {\n      this.selectedIndex += 1;\n    }\n  }\n  /**\n   * Moves focus to the previous selectable option.\n   *\n   * @internal\n   */\n  selectPreviousOption() {\n    if (!this.disabled && this.selectedIndex > 0) {\n      this.selectedIndex = this.selectedIndex - 1;\n    }\n  }\n  /**\n   * Updates the selected index to match the first selected option.\n   *\n   * @internal\n   */\n  setDefaultSelectedOption() {\n    var _a, _b;\n    this.selectedIndex = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.findIndex(el => el.defaultSelected)) !== null && _b !== void 0 ? _b : -1;\n  }\n  /**\n   * Sets an option as selected and gives it focus.\n   *\n   * @public\n   */\n  setSelectedOptions() {\n    var _a, _b, _c;\n    if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) {\n      this.selectedOptions = [this.options[this.selectedIndex]];\n      this.ariaActiveDescendant = (_c = (_b = this.firstSelectedOption) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : \"\";\n      this.focusAndScrollOptionIntoView();\n    }\n  }\n  /**\n   * Updates the list of options and resets the selected option when the slotted option content changes.\n   *\n   * @param prev - the previous list of slotted options\n   * @param next - the current list of slotted options\n   *\n   * @internal\n   */\n  slottedOptionsChanged(prev, next) {\n    this.options = next.reduce((options, item) => {\n      if (isListboxOption(item)) {\n        options.push(item);\n      }\n      return options;\n    }, []);\n    const setSize = `${this.options.length}`;\n    this.options.forEach((option, index) => {\n      if (!option.id) {\n        option.id = uniqueId(\"option-\");\n      }\n      option.ariaPosInSet = `${index + 1}`;\n      option.ariaSetSize = setSize;\n    });\n    if (this.$fastController.isConnected) {\n      this.setSelectedOptions();\n      this.setDefaultSelectedOption();\n    }\n  }\n  /**\n   * Updates the filtered list of options when the typeahead buffer changes.\n   *\n   * @param prev - the previous typeahead buffer value\n   * @param next - the current typeahead buffer value\n   *\n   * @internal\n   */\n  typeaheadBufferChanged(prev, next) {\n    if (this.$fastController.isConnected) {\n      const typeaheadMatches = this.getTypeaheadMatches();\n      if (typeaheadMatches.length) {\n        const selectedIndex = this.options.indexOf(typeaheadMatches[0]);\n        if (selectedIndex > -1) {\n          this.selectedIndex = selectedIndex;\n        }\n      }\n      this.typeaheadExpired = false;\n    }\n  }\n}\n/**\n * A static filter to include only selectable options.\n *\n * @param n - element to filter\n * @public\n */\nListbox$1.slottedOptionFilter = n => isListboxOption(n) && !n.hidden;\n/**\n * Typeahead timeout in milliseconds.\n *\n * @internal\n */\nListbox$1.TYPE_AHEAD_TIMEOUT_MS = 1000;\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Listbox$1.prototype, \"disabled\", void 0);\n__decorate$1([observable], Listbox$1.prototype, \"selectedIndex\", void 0);\n__decorate$1([observable], Listbox$1.prototype, \"selectedOptions\", void 0);\n__decorate$1([observable], Listbox$1.prototype, \"slottedOptions\", void 0);\n__decorate$1([observable], Listbox$1.prototype, \"typeaheadBuffer\", void 0);\n/**\n * Includes ARIA states and properties relating to the ARIA listbox role\n *\n * @public\n */\nclass DelegatesARIAListbox {}\n__decorate$1([observable], DelegatesARIAListbox.prototype, \"ariaActiveDescendant\", void 0);\n__decorate$1([observable], DelegatesARIAListbox.prototype, \"ariaDisabled\", void 0);\n__decorate$1([observable], DelegatesARIAListbox.prototype, \"ariaExpanded\", void 0);\n__decorate$1([observable], DelegatesARIAListbox.prototype, \"ariaMultiSelectable\", void 0);\napplyMixins(DelegatesARIAListbox, ARIAGlobalStatesAndProperties);\napplyMixins(Listbox$1, DelegatesARIAListbox);\n\n/**\n * Positioning directions for the listbox when a select is open.\n * @public\n */\nconst SelectPosition = {\n  above: \"above\",\n  below: \"below\"\n};\n\nclass _Combobox extends Listbox$1 {}\n/**\n * A form-associated base class for the {@link (Combobox:class)} component.\n *\n * @internal\n */\nclass FormAssociatedCombobox extends FormAssociated(_Combobox) {\n  constructor() {\n    super(...arguments);\n    this.proxy = document.createElement(\"input\");\n  }\n}\n\n/**\n * Autocomplete values for combobox.\n * @public\n */\nconst ComboboxAutocomplete = {\n  inline: \"inline\",\n  list: \"list\",\n  both: \"both\",\n  none: \"none\"\n};\n\n/**\n * A Combobox Custom HTML Element.\n * Implements the {@link https://w3c.github.io/aria-practices/#combobox | ARIA combobox }.\n *\n * @slot start - Content which can be provided before the input\n * @slot end - Content which can be provided after the input\n * @slot control - Used to replace the input element representing the combobox\n * @slot indicator - The visual indicator representing the expanded state\n * @slot - The default slot for the options\n * @csspart control - The wrapper element containing the input area, including start and end\n * @csspart selected-value - The input element representing the selected value\n * @csspart indicator - The element wrapping the indicator slot\n * @csspart listbox - The wrapper for the listbox slotted options\n * @fires change - Fires a custom 'change' event when the value updates\n *\n * @public\n */\nclass Combobox$1 extends FormAssociatedCombobox {\n  constructor() {\n    super(...arguments);\n    /**\n     * The internal value property.\n     *\n     * @internal\n     */\n    this._value = \"\";\n    /**\n     * The collection of currently filtered options.\n     *\n     * @public\n     */\n    this.filteredOptions = [];\n    /**\n     * The current filter value.\n     *\n     * @internal\n     */\n    this.filter = \"\";\n    /**\n     * The initial state of the position attribute.\n     *\n     * @internal\n     */\n    this.forcedPosition = false;\n    /**\n     * The unique id for the internal listbox element.\n     *\n     * @internal\n     */\n    this.listboxId = uniqueId(\"listbox-\");\n    /**\n     * The max height for the listbox when opened.\n     *\n     * @internal\n     */\n    this.maxHeight = 0;\n    /**\n     * The open attribute.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: open\n     */\n    this.open = false;\n  }\n  /**\n   * Reset the element to its first selectable option when its parent form is reset.\n   *\n   * @internal\n   */\n  formResetCallback() {\n    super.formResetCallback();\n    this.setDefaultSelectedOption();\n    this.updateValue();\n  }\n  /** {@inheritDoc (FormAssociated:interface).validate} */\n  validate() {\n    super.validate(this.control);\n  }\n  get isAutocompleteInline() {\n    return this.autocomplete === ComboboxAutocomplete.inline || this.isAutocompleteBoth;\n  }\n  get isAutocompleteList() {\n    return this.autocomplete === ComboboxAutocomplete.list || this.isAutocompleteBoth;\n  }\n  get isAutocompleteBoth() {\n    return this.autocomplete === ComboboxAutocomplete.both;\n  }\n  /**\n   * Sets focus and synchronize ARIA attributes when the open property changes.\n   *\n   * @param prev - the previous open value\n   * @param next - the current open value\n   *\n   * @internal\n   */\n  openChanged() {\n    if (this.open) {\n      this.ariaControls = this.listboxId;\n      this.ariaExpanded = \"true\";\n      this.setPositioning();\n      this.focusAndScrollOptionIntoView();\n      // focus is directed to the element when `open` is changed programmatically\n      DOM.queueUpdate(() => this.focus());\n      return;\n    }\n    this.ariaControls = \"\";\n    this.ariaExpanded = \"false\";\n  }\n  /**\n   * The list of options.\n   *\n   * @public\n   * @remarks\n   * Overrides `Listbox.options`.\n   */\n  get options() {\n    Observable.track(this, \"options\");\n    return this.filteredOptions.length ? this.filteredOptions : this._options;\n  }\n  set options(value) {\n    this._options = value;\n    Observable.notify(this, \"options\");\n  }\n  /**\n   * Updates the placeholder on the proxy element.\n   * @internal\n   */\n  placeholderChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.placeholder = this.placeholder;\n    }\n  }\n  positionChanged(prev, next) {\n    this.positionAttribute = next;\n    this.setPositioning();\n  }\n  /**\n   * The value property.\n   *\n   * @public\n   */\n  get value() {\n    Observable.track(this, \"value\");\n    return this._value;\n  }\n  set value(next) {\n    var _a, _b, _c;\n    const prev = `${this._value}`;\n    if (this.$fastController.isConnected && this.options) {\n      const selectedIndex = this.options.findIndex(el => el.text.toLowerCase() === next.toLowerCase());\n      const prevSelectedValue = (_a = this.options[this.selectedIndex]) === null || _a === void 0 ? void 0 : _a.text;\n      const nextSelectedValue = (_b = this.options[selectedIndex]) === null || _b === void 0 ? void 0 : _b.text;\n      this.selectedIndex = prevSelectedValue !== nextSelectedValue ? selectedIndex : this.selectedIndex;\n      next = ((_c = this.firstSelectedOption) === null || _c === void 0 ? void 0 : _c.text) || next;\n    }\n    if (prev !== next) {\n      this._value = next;\n      super.valueChanged(prev, next);\n      Observable.notify(this, \"value\");\n    }\n  }\n  /**\n   * Handle opening and closing the listbox when the combobox is clicked.\n   *\n   * @param e - the mouse event\n   * @internal\n   */\n  clickHandler(e) {\n    if (this.disabled) {\n      return;\n    }\n    if (this.open) {\n      const captured = e.target.closest(`option,[role=option]`);\n      if (!captured || captured.disabled) {\n        return;\n      }\n      this.selectedOptions = [captured];\n      this.control.value = captured.text;\n      this.clearSelectionRange();\n      this.updateValue(true);\n    }\n    this.open = !this.open;\n    if (this.open) {\n      this.control.focus();\n    }\n    return true;\n  }\n  connectedCallback() {\n    super.connectedCallback();\n    this.forcedPosition = !!this.positionAttribute;\n    if (this.value) {\n      this.initialValue = this.value;\n    }\n  }\n  /**\n   * Synchronize the `aria-disabled` property when the `disabled` property changes.\n   *\n   * @param prev - The previous disabled value\n   * @param next - The next disabled value\n   *\n   * @internal\n   */\n  disabledChanged(prev, next) {\n    if (super.disabledChanged) {\n      super.disabledChanged(prev, next);\n    }\n    this.ariaDisabled = this.disabled ? \"true\" : \"false\";\n  }\n  /**\n   * Filter available options by text value.\n   *\n   * @public\n   */\n  filterOptions() {\n    if (!this.autocomplete || this.autocomplete === ComboboxAutocomplete.none) {\n      this.filter = \"\";\n    }\n    const filter = this.filter.toLowerCase();\n    this.filteredOptions = this._options.filter(o => o.text.toLowerCase().startsWith(this.filter.toLowerCase()));\n    if (this.isAutocompleteList) {\n      if (!this.filteredOptions.length && !filter) {\n        this.filteredOptions = this._options;\n      }\n      this._options.forEach(o => {\n        o.hidden = !this.filteredOptions.includes(o);\n      });\n    }\n  }\n  /**\n   * Focus the control and scroll the first selected option into view.\n   *\n   * @internal\n   * @remarks\n   * Overrides: `Listbox.focusAndScrollOptionIntoView`\n   */\n  focusAndScrollOptionIntoView() {\n    if (this.contains(document.activeElement)) {\n      this.control.focus();\n      if (this.firstSelectedOption) {\n        requestAnimationFrame(() => {\n          var _a;\n          (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.scrollIntoView({\n            block: \"nearest\"\n          });\n        });\n      }\n    }\n  }\n  /**\n   * Handle focus state when the element or its children lose focus.\n   *\n   * @param e - The focus event\n   * @internal\n   */\n  focusoutHandler(e) {\n    this.syncValue();\n    if (!this.open) {\n      return true;\n    }\n    const focusTarget = e.relatedTarget;\n    if (this.isSameNode(focusTarget)) {\n      this.focus();\n      return;\n    }\n    if (!this.options || !this.options.includes(focusTarget)) {\n      this.open = false;\n    }\n  }\n  /**\n   * Handle content changes on the control input.\n   *\n   * @param e - the input event\n   * @internal\n   */\n  inputHandler(e) {\n    this.filter = this.control.value;\n    this.filterOptions();\n    if (!this.isAutocompleteInline) {\n      this.selectedIndex = this.options.map(option => option.text).indexOf(this.control.value);\n    }\n    if (e.inputType.includes(\"deleteContent\") || !this.filter.length) {\n      return true;\n    }\n    if (this.isAutocompleteList && !this.open) {\n      this.open = true;\n    }\n    if (this.isAutocompleteInline) {\n      if (this.filteredOptions.length) {\n        this.selectedOptions = [this.filteredOptions[0]];\n        this.selectedIndex = this.options.indexOf(this.firstSelectedOption);\n        this.setInlineSelection();\n      } else {\n        this.selectedIndex = -1;\n      }\n    }\n    return;\n  }\n  /**\n   * Handle keydown actions for listbox navigation.\n   *\n   * @param e - the keyboard event\n   * @internal\n   */\n  keydownHandler(e) {\n    const key = e.key;\n    if (e.ctrlKey || e.shiftKey) {\n      return true;\n    }\n    switch (key) {\n      case \"Enter\":\n        {\n          this.syncValue();\n          if (this.isAutocompleteInline) {\n            this.filter = this.value;\n          }\n          this.open = false;\n          this.clearSelectionRange();\n          break;\n        }\n      case \"Escape\":\n        {\n          if (!this.isAutocompleteInline) {\n            this.selectedIndex = -1;\n          }\n          if (this.open) {\n            this.open = false;\n            break;\n          }\n          this.value = \"\";\n          this.control.value = \"\";\n          this.filter = \"\";\n          this.filterOptions();\n          break;\n        }\n      case \"Tab\":\n        {\n          this.setInputToSelection();\n          if (!this.open) {\n            return true;\n          }\n          e.preventDefault();\n          this.open = false;\n          break;\n        }\n      case \"ArrowUp\":\n      case \"ArrowDown\":\n        {\n          this.filterOptions();\n          if (!this.open) {\n            this.open = true;\n            break;\n          }\n          if (this.filteredOptions.length > 0) {\n            super.keydownHandler(e);\n          }\n          if (this.isAutocompleteInline) {\n            this.setInlineSelection();\n          }\n          break;\n        }\n      default:\n        {\n          return true;\n        }\n    }\n  }\n  /**\n   * Handle keyup actions for value input and text field manipulations.\n   *\n   * @param e - the keyboard event\n   * @internal\n   */\n  keyupHandler(e) {\n    const key = e.key;\n    switch (key) {\n      case \"ArrowLeft\":\n      case \"ArrowRight\":\n      case \"Backspace\":\n      case \"Delete\":\n      case \"Home\":\n      case \"End\":\n        {\n          this.filter = this.control.value;\n          this.selectedIndex = -1;\n          this.filterOptions();\n          break;\n        }\n    }\n  }\n  /**\n   * Ensure that the selectedIndex is within the current allowable filtered range.\n   *\n   * @param prev - the previous selected index value\n   * @param next - the current selected index value\n   *\n   * @internal\n   */\n  selectedIndexChanged(prev, next) {\n    if (this.$fastController.isConnected) {\n      next = limit(-1, this.options.length - 1, next);\n      // we only want to call the super method when the selectedIndex is in range\n      if (next !== this.selectedIndex) {\n        this.selectedIndex = next;\n        return;\n      }\n      super.selectedIndexChanged(prev, next);\n    }\n  }\n  /**\n   * Move focus to the previous selectable option.\n   *\n   * @internal\n   * @remarks\n   * Overrides `Listbox.selectPreviousOption`\n   */\n  selectPreviousOption() {\n    if (!this.disabled && this.selectedIndex >= 0) {\n      this.selectedIndex = this.selectedIndex - 1;\n    }\n  }\n  /**\n   * Set the default selected options at initialization or reset.\n   *\n   * @internal\n   * @remarks\n   * Overrides `Listbox.setDefaultSelectedOption`\n   */\n  setDefaultSelectedOption() {\n    if (this.$fastController.isConnected && this.options) {\n      const selectedIndex = this.options.findIndex(el => el.getAttribute(\"selected\") !== null || el.selected);\n      this.selectedIndex = selectedIndex;\n      if (!this.dirtyValue && this.firstSelectedOption) {\n        this.value = this.firstSelectedOption.text;\n      }\n      this.setSelectedOptions();\n    }\n  }\n  /**\n   * Focus and set the content of the control based on the first selected option.\n   *\n   * @internal\n   */\n  setInputToSelection() {\n    if (this.firstSelectedOption) {\n      this.control.value = this.firstSelectedOption.text;\n      this.control.focus();\n    }\n  }\n  /**\n   * Focus, set and select the content of the control based on the first selected option.\n   *\n   * @internal\n   */\n  setInlineSelection() {\n    if (this.firstSelectedOption) {\n      this.setInputToSelection();\n      this.control.setSelectionRange(this.filter.length, this.control.value.length, \"backward\");\n    }\n  }\n  /**\n   * Determines if a value update should involve emitting a change event, then updates the value.\n   *\n   * @internal\n   */\n  syncValue() {\n    var _a;\n    const newValue = this.selectedIndex > -1 ? (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.text : this.control.value;\n    this.updateValue(this.value !== newValue);\n  }\n  /**\n   * Calculate and apply listbox positioning based on available viewport space.\n   *\n   * @param force - direction to force the listbox to display\n   * @public\n   */\n  setPositioning() {\n    const currentBox = this.getBoundingClientRect();\n    const viewportHeight = window.innerHeight;\n    const availableBottom = viewportHeight - currentBox.bottom;\n    this.position = this.forcedPosition ? this.positionAttribute : currentBox.top > availableBottom ? SelectPosition.above : SelectPosition.below;\n    this.positionAttribute = this.forcedPosition ? this.positionAttribute : this.position;\n    this.maxHeight = this.position === SelectPosition.above ? ~~currentBox.top : ~~availableBottom;\n  }\n  /**\n   * Ensure that the entire list of options is used when setting the selected property.\n   *\n   * @param prev - the previous list of selected options\n   * @param next - the current list of selected options\n   *\n   * @internal\n   * @remarks\n   * Overrides: `Listbox.selectedOptionsChanged`\n   */\n  selectedOptionsChanged(prev, next) {\n    if (this.$fastController.isConnected) {\n      this._options.forEach(o => {\n        o.selected = next.includes(o);\n      });\n    }\n  }\n  /**\n   * Synchronize the form-associated proxy and update the value property of the element.\n   *\n   * @param prev - the previous collection of slotted option elements\n   * @param next - the next collection of slotted option elements\n   *\n   * @internal\n   */\n  slottedOptionsChanged(prev, next) {\n    super.slottedOptionsChanged(prev, next);\n    this.updateValue();\n  }\n  /**\n   * Sets the value and to match the first selected option.\n   *\n   * @param shouldEmit - if true, the change event will be emitted\n   *\n   * @internal\n   */\n  updateValue(shouldEmit) {\n    var _a;\n    if (this.$fastController.isConnected) {\n      this.value = ((_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.text) || this.control.value;\n      this.control.value = this.value;\n    }\n    if (shouldEmit) {\n      this.$emit(\"change\");\n    }\n  }\n  /**\n   * @internal\n   */\n  clearSelectionRange() {\n    const controlValueLength = this.control.value.length;\n    this.control.setSelectionRange(controlValueLength, controlValueLength);\n  }\n}\n__decorate$1([attr({\n  attribute: \"autocomplete\",\n  mode: \"fromView\"\n})], Combobox$1.prototype, \"autocomplete\", void 0);\n__decorate$1([observable], Combobox$1.prototype, \"maxHeight\", void 0);\n__decorate$1([attr({\n  attribute: \"open\",\n  mode: \"boolean\"\n})], Combobox$1.prototype, \"open\", void 0);\n__decorate$1([attr], Combobox$1.prototype, \"placeholder\", void 0);\n__decorate$1([attr({\n  attribute: \"position\"\n})], Combobox$1.prototype, \"positionAttribute\", void 0);\n__decorate$1([observable], Combobox$1.prototype, \"position\", void 0);\n/**\n * Includes ARIA states and properties relating to the ARIA combobox role.\n *\n * @public\n */\nclass DelegatesARIACombobox {}\n__decorate$1([observable], DelegatesARIACombobox.prototype, \"ariaAutoComplete\", void 0);\n__decorate$1([observable], DelegatesARIACombobox.prototype, \"ariaControls\", void 0);\napplyMixins(DelegatesARIACombobox, DelegatesARIAListbox);\napplyMixins(Combobox$1, StartEnd, DelegatesARIACombobox);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(Combobox:class)} component.\n * @public\n */\nconst comboboxTemplate = (context, definition) => html`<template aria-disabled=\"${x => x.ariaDisabled}\" autocomplete=\"${x => x.autocomplete}\" class=\"${x => x.open ? \"open\" : \"\"} ${x => x.disabled ? \"disabled\" : \"\"} ${x => x.position}\" ?open=\"${x => x.open}\" tabindex=\"${x => !x.disabled ? \"0\" : null}\" @click=\"${(x, c) => x.clickHandler(c.event)}\" @focusout=\"${(x, c) => x.focusoutHandler(c.event)}\" @keydown=\"${(x, c) => x.keydownHandler(c.event)}\"><div class=\"control\" part=\"control\">${startSlotTemplate(context, definition)}<slot name=\"control\"><input aria-activedescendant=\"${x => x.open ? x.ariaActiveDescendant : null}\" aria-autocomplete=\"${x => x.ariaAutoComplete}\" aria-controls=\"${x => x.ariaControls}\" aria-disabled=\"${x => x.ariaDisabled}\" aria-expanded=\"${x => x.ariaExpanded}\" aria-haspopup=\"listbox\" class=\"selected-value\" part=\"selected-value\" placeholder=\"${x => x.placeholder}\" role=\"combobox\" type=\"text\" ?disabled=\"${x => x.disabled}\" :value=\"${x => x.value}\" @input=\"${(x, c) => x.inputHandler(c.event)}\" @keyup=\"${(x, c) => x.keyupHandler(c.event)}\" ${ref(\"control\")} /><div class=\"indicator\" part=\"indicator\" aria-hidden=\"true\"><slot name=\"indicator\">${definition.indicator || \"\"}</slot></div></slot>${endSlotTemplate(context, definition)}</div><div class=\"listbox\" id=\"${x => x.listboxId}\" part=\"listbox\" role=\"listbox\" ?disabled=\"${x => x.disabled}\" ?hidden=\"${x => !x.open}\" ${ref(\"listbox\")}><slot ${slotted({\n  filter: Listbox$1.slottedOptionFilter,\n  flatten: true,\n  property: \"slottedOptions\"\n})}></slot></div></template>`;\n\n/**\n * Retrieves the \"composed parent\" element of a node, ignoring DOM tree boundaries.\n * When the parent of a node is a shadow-root, it will return the host\n * element of the shadow root. Otherwise it will return the parent node or null if\n * no parent node exists.\n * @param element - The element for which to retrieve the composed parent\n *\n * @public\n */\nfunction composedParent(element) {\n  const parentNode = element.parentElement;\n  if (parentNode) {\n    return parentNode;\n  } else {\n    const rootNode = element.getRootNode();\n    if (rootNode.host instanceof HTMLElement) {\n      // this is shadow-root\n      return rootNode.host;\n    }\n  }\n  return null;\n}\n\n/**\n * Determines if the reference element contains the test element in a \"composed\" DOM tree that\n * ignores shadow DOM boundaries.\n *\n * Returns true of the test element is a descendent of the reference, or exist in\n * a shadow DOM that is a logical descendent of the reference. Otherwise returns false.\n * @param reference - The element to test for containment against.\n * @param test - The element being tested for containment.\n *\n * @public\n */\nfunction composedContains(reference, test) {\n  let current = test;\n  while (current !== null) {\n    if (current === reference) {\n      return true;\n    }\n    current = composedParent(current);\n  }\n  return false;\n}\n\nconst defaultElement = document.createElement(\"div\");\nfunction isFastElement(element) {\n  return element instanceof FASTElement;\n}\nclass QueuedStyleSheetTarget {\n  setProperty(name, value) {\n    DOM.queueUpdate(() => this.target.setProperty(name, value));\n  }\n  removeProperty(name) {\n    DOM.queueUpdate(() => this.target.removeProperty(name));\n  }\n}\n/**\n * Handles setting properties for a FASTElement using Constructable Stylesheets\n */\nclass ConstructableStyleSheetTarget extends QueuedStyleSheetTarget {\n  constructor(source) {\n    super();\n    const sheet = new CSSStyleSheet();\n    sheet[prependToAdoptedStyleSheetsSymbol] = true;\n    this.target = sheet.cssRules[sheet.insertRule(\":host{}\")].style;\n    source.$fastController.addStyles(ElementStyles.create([sheet]));\n  }\n}\nclass DocumentStyleSheetTarget extends QueuedStyleSheetTarget {\n  constructor() {\n    super();\n    const sheet = new CSSStyleSheet();\n    this.target = sheet.cssRules[sheet.insertRule(\":root{}\")].style;\n    document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];\n  }\n}\nclass HeadStyleElementStyleSheetTarget extends QueuedStyleSheetTarget {\n  constructor() {\n    super();\n    this.style = document.createElement(\"style\");\n    document.head.appendChild(this.style);\n    const {\n      sheet\n    } = this.style;\n    // Because the HTMLStyleElement has been appended,\n    // there shouldn't exist a case where `sheet` is null,\n    // but if-check it just in case.\n    if (sheet) {\n      // https://github.com/jsdom/jsdom uses https://github.com/NV/CSSOM for it's CSSOM implementation,\n      // which implements the DOM Level 2 spec for CSSStyleSheet where insertRule() requires an index argument.\n      const index = sheet.insertRule(\":root{}\", sheet.cssRules.length);\n      this.target = sheet.cssRules[index].style;\n    }\n  }\n}\n/**\n * Handles setting properties for a FASTElement using an HTMLStyleElement\n */\nclass StyleElementStyleSheetTarget {\n  constructor(target) {\n    this.store = new Map();\n    this.target = null;\n    const controller = target.$fastController;\n    this.style = document.createElement(\"style\");\n    controller.addStyles(this.style);\n    Observable.getNotifier(controller).subscribe(this, \"isConnected\");\n    this.handleChange(controller, \"isConnected\");\n  }\n  targetChanged() {\n    if (this.target !== null) {\n      for (const [key, value] of this.store.entries()) {\n        this.target.setProperty(key, value);\n      }\n    }\n  }\n  setProperty(name, value) {\n    this.store.set(name, value);\n    DOM.queueUpdate(() => {\n      if (this.target !== null) {\n        this.target.setProperty(name, value);\n      }\n    });\n  }\n  removeProperty(name) {\n    this.store.delete(name);\n    DOM.queueUpdate(() => {\n      if (this.target !== null) {\n        this.target.removeProperty(name);\n      }\n    });\n  }\n  handleChange(source, key) {\n    // HTMLStyleElement.sheet is null if the element isn't connected to the DOM,\n    // so this method reacts to changes in DOM connection for the element hosting\n    // the HTMLStyleElement.\n    //\n    // All rules applied via the CSSOM also get cleared when the element disconnects,\n    // so we need to add a new rule each time and populate it with the stored properties\n    const {\n      sheet\n    } = this.style;\n    if (sheet) {\n      // Safari will throw if we try to use the return result of insertRule()\n      // to index the rule inline, so store as a const prior to indexing.\n      // https://github.com/jsdom/jsdom uses https://github.com/NV/CSSOM for it's CSSOM implementation,\n      // which implements the DOM Level 2 spec for CSSStyleSheet where insertRule() requires an index argument.\n      const index = sheet.insertRule(\":host{}\", sheet.cssRules.length);\n      this.target = sheet.cssRules[index].style;\n    } else {\n      this.target = null;\n    }\n  }\n}\n__decorate$1([observable], StyleElementStyleSheetTarget.prototype, \"target\", void 0);\n/**\n * Handles setting properties for a normal HTMLElement\n */\nclass ElementStyleSheetTarget {\n  constructor(source) {\n    this.target = source.style;\n  }\n  setProperty(name, value) {\n    DOM.queueUpdate(() => this.target.setProperty(name, value));\n  }\n  removeProperty(name) {\n    DOM.queueUpdate(() => this.target.removeProperty(name));\n  }\n}\n/**\n * Controls emission for default values. This control is capable\n * of emitting to multiple {@link PropertyTarget | PropertyTargets},\n * and only emits if it has at least one root.\n *\n * @internal\n */\nclass RootStyleSheetTarget {\n  setProperty(name, value) {\n    RootStyleSheetTarget.properties[name] = value;\n    for (const target of RootStyleSheetTarget.roots.values()) {\n      PropertyTargetManager.getOrCreate(RootStyleSheetTarget.normalizeRoot(target)).setProperty(name, value);\n    }\n  }\n  removeProperty(name) {\n    delete RootStyleSheetTarget.properties[name];\n    for (const target of RootStyleSheetTarget.roots.values()) {\n      PropertyTargetManager.getOrCreate(RootStyleSheetTarget.normalizeRoot(target)).removeProperty(name);\n    }\n  }\n  static registerRoot(root) {\n    const {\n      roots\n    } = RootStyleSheetTarget;\n    if (!roots.has(root)) {\n      roots.add(root);\n      const target = PropertyTargetManager.getOrCreate(this.normalizeRoot(root));\n      for (const key in RootStyleSheetTarget.properties) {\n        target.setProperty(key, RootStyleSheetTarget.properties[key]);\n      }\n    }\n  }\n  static unregisterRoot(root) {\n    const {\n      roots\n    } = RootStyleSheetTarget;\n    if (roots.has(root)) {\n      roots.delete(root);\n      const target = PropertyTargetManager.getOrCreate(RootStyleSheetTarget.normalizeRoot(root));\n      for (const key in RootStyleSheetTarget.properties) {\n        target.removeProperty(key);\n      }\n    }\n  }\n  /**\n   * Returns the document when provided the default element,\n   * otherwise is a no-op\n   * @param root - the root to normalize\n   */\n  static normalizeRoot(root) {\n    return root === defaultElement ? document : root;\n  }\n}\nRootStyleSheetTarget.roots = new Set();\nRootStyleSheetTarget.properties = {};\n// Caches PropertyTarget instances\nconst propertyTargetCache = new WeakMap();\n// Use Constructable StyleSheets for FAST elements when supported, otherwise use\n// HTMLStyleElement instances\nconst propertyTargetCtor = DOM.supportsAdoptedStyleSheets ? ConstructableStyleSheetTarget : StyleElementStyleSheetTarget;\n/**\n * Manages creation and caching of PropertyTarget instances.\n *\n * @internal\n */\nconst PropertyTargetManager = Object.freeze({\n  getOrCreate(source) {\n    if (propertyTargetCache.has(source)) {\n      /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n      return propertyTargetCache.get(source);\n    }\n    let target;\n    if (source === defaultElement) {\n      target = new RootStyleSheetTarget();\n    } else if (source instanceof Document) {\n      target = DOM.supportsAdoptedStyleSheets ? new DocumentStyleSheetTarget() : new HeadStyleElementStyleSheetTarget();\n    } else if (isFastElement(source)) {\n      target = new propertyTargetCtor(source);\n    } else {\n      target = new ElementStyleSheetTarget(source);\n    }\n    propertyTargetCache.set(source, target);\n    return target;\n  }\n});\n\n/**\n * Implementation of {@link (DesignToken:interface)}\n */\nclass DesignTokenImpl extends CSSDirective {\n  constructor(configuration) {\n    super();\n    this.subscribers = new WeakMap();\n    this._appliedTo = new Set();\n    this.name = configuration.name;\n    if (configuration.cssCustomPropertyName !== null) {\n      this.cssCustomProperty = `--${configuration.cssCustomPropertyName}`;\n      this.cssVar = `var(${this.cssCustomProperty})`;\n    }\n    this.id = DesignTokenImpl.uniqueId();\n    DesignTokenImpl.tokensById.set(this.id, this);\n  }\n  get appliedTo() {\n    return [...this._appliedTo];\n  }\n  static from(nameOrConfig) {\n    return new DesignTokenImpl({\n      name: typeof nameOrConfig === \"string\" ? nameOrConfig : nameOrConfig.name,\n      cssCustomPropertyName: typeof nameOrConfig === \"string\" ? nameOrConfig : nameOrConfig.cssCustomPropertyName === void 0 ? nameOrConfig.name : nameOrConfig.cssCustomPropertyName\n    });\n  }\n  static isCSSDesignToken(token) {\n    return typeof token.cssCustomProperty === \"string\";\n  }\n  static isDerivedDesignTokenValue(value) {\n    return typeof value === \"function\";\n  }\n  /**\n   * Gets a token by ID. Returns undefined if the token was not found.\n   * @param id - The ID of the token\n   * @returns\n   */\n  static getTokenById(id) {\n    return DesignTokenImpl.tokensById.get(id);\n  }\n  getOrCreateSubscriberSet(target = this) {\n    return this.subscribers.get(target) || this.subscribers.set(target, new Set()) && this.subscribers.get(target);\n  }\n  createCSS() {\n    return this.cssVar || \"\";\n  }\n  getValueFor(element) {\n    const value = DesignTokenNode.getOrCreate(element).get(this);\n    if (value !== undefined) {\n      return value;\n    }\n    throw new Error(`Value could not be retrieved for token named \"${this.name}\". Ensure the value is set for ${element} or an ancestor of ${element}.`);\n  }\n  setValueFor(element, value) {\n    this._appliedTo.add(element);\n    if (value instanceof DesignTokenImpl) {\n      value = this.alias(value);\n    }\n    DesignTokenNode.getOrCreate(element).set(this, value);\n    return this;\n  }\n  deleteValueFor(element) {\n    this._appliedTo.delete(element);\n    if (DesignTokenNode.existsFor(element)) {\n      DesignTokenNode.getOrCreate(element).delete(this);\n    }\n    return this;\n  }\n  withDefault(value) {\n    this.setValueFor(defaultElement, value);\n    return this;\n  }\n  subscribe(subscriber, target) {\n    const subscriberSet = this.getOrCreateSubscriberSet(target);\n    if (target && !DesignTokenNode.existsFor(target)) {\n      DesignTokenNode.getOrCreate(target);\n    }\n    if (!subscriberSet.has(subscriber)) {\n      subscriberSet.add(subscriber);\n    }\n  }\n  unsubscribe(subscriber, target) {\n    const list = this.subscribers.get(target || this);\n    if (list && list.has(subscriber)) {\n      list.delete(subscriber);\n    }\n  }\n  /**\n   * Notifies subscribers that the value for an element has changed.\n   * @param element - The element to emit a notification for\n   */\n  notify(element) {\n    const record = Object.freeze({\n      token: this,\n      target: element\n    });\n    if (this.subscribers.has(this)) {\n      this.subscribers.get(this).forEach(sub => sub.handleChange(record));\n    }\n    if (this.subscribers.has(element)) {\n      this.subscribers.get(element).forEach(sub => sub.handleChange(record));\n    }\n  }\n  /**\n   * Alias the token to the provided token.\n   * @param token - the token to alias to\n   */\n  alias(token) {\n    return target => token.getValueFor(target);\n  }\n}\nDesignTokenImpl.uniqueId = (() => {\n  let id = 0;\n  return () => {\n    id++;\n    return id.toString(16);\n  };\n})();\n/**\n * Token storage by token ID\n */\nDesignTokenImpl.tokensById = new Map();\nclass CustomPropertyReflector {\n  startReflection(token, target) {\n    token.subscribe(this, target);\n    this.handleChange({\n      token,\n      target\n    });\n  }\n  stopReflection(token, target) {\n    token.unsubscribe(this, target);\n    this.remove(token, target);\n  }\n  handleChange(record) {\n    const {\n      token,\n      target\n    } = record;\n    this.add(token, target);\n  }\n  add(token, target) {\n    PropertyTargetManager.getOrCreate(target).setProperty(token.cssCustomProperty, this.resolveCSSValue(DesignTokenNode.getOrCreate(target).get(token)));\n  }\n  remove(token, target) {\n    PropertyTargetManager.getOrCreate(target).removeProperty(token.cssCustomProperty);\n  }\n  resolveCSSValue(value) {\n    return value && typeof value.createCSS === \"function\" ? value.createCSS() : value;\n  }\n}\n/**\n * A light wrapper around BindingObserver to handle value caching and\n * token notification\n */\nclass DesignTokenBindingObserver {\n  constructor(source, token, node) {\n    this.source = source;\n    this.token = token;\n    this.node = node;\n    this.dependencies = new Set();\n    this.observer = Observable.binding(source, this, false);\n    // This is a little bit hacky because it's using internal APIs of BindingObserverImpl.\n    // BindingObserverImpl queues updates to batch it's notifications which doesn't work for this\n    // scenario because the DesignToken.getValueFor API is not async. Without this, using DesignToken.getValueFor()\n    // after DesignToken.setValueFor() when setting a dependency of the value being retrieved can return a stale\n    // value. Assigning .handleChange to .call forces immediate invocation of this classes handleChange() method,\n    // allowing resolution of values synchronously.\n    // TODO: https://github.com/microsoft/fast/issues/5110\n    this.observer.handleChange = this.observer.call;\n    this.handleChange();\n  }\n  disconnect() {\n    this.observer.disconnect();\n  }\n  /**\n   * @internal\n   */\n  handleChange() {\n    this.node.store.set(this.token, this.observer.observe(this.node.target, defaultExecutionContext));\n  }\n}\n/**\n * Stores resolved token/value pairs and notifies on changes\n */\nclass Store {\n  constructor() {\n    this.values = new Map();\n  }\n  set(token, value) {\n    if (this.values.get(token) !== value) {\n      this.values.set(token, value);\n      Observable.getNotifier(this).notify(token.id);\n    }\n  }\n  get(token) {\n    Observable.track(this, token.id);\n    return this.values.get(token);\n  }\n  delete(token) {\n    this.values.delete(token);\n  }\n  all() {\n    return this.values.entries();\n  }\n}\nconst nodeCache = new WeakMap();\nconst childToParent = new WeakMap();\n/**\n * A node responsible for setting and getting token values,\n * emitting values to CSS custom properties, and maintaining\n * inheritance structures.\n */\nclass DesignTokenNode {\n  constructor(target) {\n    this.target = target;\n    /**\n     * Stores all resolved token values for a node\n     */\n    this.store = new Store();\n    /**\n     * All children assigned to the node\n     */\n    this.children = [];\n    /**\n     * All values explicitly assigned to the node in their raw form\n     */\n    this.assignedValues = new Map();\n    /**\n     * Tokens currently being reflected to CSS custom properties\n     */\n    this.reflecting = new Set();\n    /**\n     * Binding observers for assigned and inherited derived values.\n     */\n    this.bindingObservers = new Map();\n    /**\n     * Emits notifications to token when token values\n     * change the DesignTokenNode\n     */\n    this.tokenValueChangeHandler = {\n      handleChange: (source, arg) => {\n        const token = DesignTokenImpl.getTokenById(arg);\n        if (token) {\n          // Notify any token subscribers\n          token.notify(this.target);\n          this.updateCSSTokenReflection(source, token);\n        }\n      }\n    };\n    nodeCache.set(target, this);\n    // Map store change notifications to token change notifications\n    Observable.getNotifier(this.store).subscribe(this.tokenValueChangeHandler);\n    if (target instanceof FASTElement) {\n      target.$fastController.addBehaviors([this]);\n    } else if (target.isConnected) {\n      this.bind();\n    }\n  }\n  /**\n   * Returns a DesignTokenNode for an element.\n   * Creates a new instance if one does not already exist for a node,\n   * otherwise returns the cached instance\n   *\n   * @param target - The HTML element to retrieve a DesignTokenNode for\n   */\n  static getOrCreate(target) {\n    return nodeCache.get(target) || new DesignTokenNode(target);\n  }\n  /**\n   * Determines if a DesignTokenNode has been created for a target\n   * @param target - The element to test\n   */\n  static existsFor(target) {\n    return nodeCache.has(target);\n  }\n  /**\n   * Searches for and return the nearest parent DesignTokenNode.\n   * Null is returned if no node is found or the node provided is for a default element.\n   */\n  static findParent(node) {\n    if (!(defaultElement === node.target)) {\n      let parent = composedParent(node.target);\n      while (parent !== null) {\n        if (nodeCache.has(parent)) {\n          return nodeCache.get(parent);\n        }\n        parent = composedParent(parent);\n      }\n      return DesignTokenNode.getOrCreate(defaultElement);\n    }\n    return null;\n  }\n  /**\n   * Finds the closest node with a value explicitly assigned for a token, otherwise null.\n   * @param token - The token to look for\n   * @param start - The node to start looking for value assignment\n   * @returns\n   */\n  static findClosestAssignedNode(token, start) {\n    let current = start;\n    do {\n      if (current.has(token)) {\n        return current;\n      }\n      current = current.parent ? current.parent : current.target !== defaultElement ? DesignTokenNode.getOrCreate(defaultElement) : null;\n    } while (current !== null);\n    return null;\n  }\n  /**\n   * The parent DesignTokenNode, or null.\n   */\n  get parent() {\n    return childToParent.get(this) || null;\n  }\n  updateCSSTokenReflection(source, token) {\n    if (DesignTokenImpl.isCSSDesignToken(token)) {\n      const parent = this.parent;\n      const reflecting = this.isReflecting(token);\n      if (parent) {\n        const parentValue = parent.get(token);\n        const sourceValue = source.get(token);\n        if (parentValue !== sourceValue && !reflecting) {\n          this.reflectToCSS(token);\n        } else if (parentValue === sourceValue && reflecting) {\n          this.stopReflectToCSS(token);\n        }\n      } else if (!reflecting) {\n        this.reflectToCSS(token);\n      }\n    }\n  }\n  /**\n   * Checks if a token has been assigned an explicit value the node.\n   * @param token - the token to check.\n   */\n  has(token) {\n    return this.assignedValues.has(token);\n  }\n  /**\n   * Gets the value of a token for a node\n   * @param token - The token to retrieve the value for\n   * @returns\n   */\n  get(token) {\n    const value = this.store.get(token);\n    if (value !== undefined) {\n      return value;\n    }\n    const raw = this.getRaw(token);\n    if (raw !== undefined) {\n      this.hydrate(token, raw);\n      return this.get(token);\n    }\n  }\n  /**\n   * Retrieves the raw assigned value of a token from the nearest assigned node.\n   * @param token - The token to retrieve a raw value for\n   * @returns\n   */\n  getRaw(token) {\n    var _a;\n    if (this.assignedValues.has(token)) {\n      return this.assignedValues.get(token);\n    }\n    return (_a = DesignTokenNode.findClosestAssignedNode(token, this)) === null || _a === void 0 ? void 0 : _a.getRaw(token);\n  }\n  /**\n   * Sets a token to a value for a node\n   * @param token - The token to set\n   * @param value - The value to set the token to\n   */\n  set(token, value) {\n    if (DesignTokenImpl.isDerivedDesignTokenValue(this.assignedValues.get(token))) {\n      this.tearDownBindingObserver(token);\n    }\n    this.assignedValues.set(token, value);\n    if (DesignTokenImpl.isDerivedDesignTokenValue(value)) {\n      this.setupBindingObserver(token, value);\n    } else {\n      this.store.set(token, value);\n    }\n  }\n  /**\n   * Deletes a token value for the node.\n   * @param token - The token to delete the value for\n   */\n  delete(token) {\n    this.assignedValues.delete(token);\n    this.tearDownBindingObserver(token);\n    const upstream = this.getRaw(token);\n    if (upstream) {\n      this.hydrate(token, upstream);\n    } else {\n      this.store.delete(token);\n    }\n  }\n  /**\n   * Invoked when the DesignTokenNode.target is attached to the document\n   */\n  bind() {\n    const parent = DesignTokenNode.findParent(this);\n    if (parent) {\n      parent.appendChild(this);\n    }\n    for (const key of this.assignedValues.keys()) {\n      key.notify(this.target);\n    }\n  }\n  /**\n   * Invoked when the DesignTokenNode.target is detached from the document\n   */\n  unbind() {\n    if (this.parent) {\n      const parent = childToParent.get(this);\n      parent.removeChild(this);\n    }\n  }\n  /**\n   * Appends a child to a parent DesignTokenNode.\n   * @param child - The child to append to the node\n   */\n  appendChild(child) {\n    if (child.parent) {\n      childToParent.get(child).removeChild(child);\n    }\n    const reParent = this.children.filter(x => child.contains(x));\n    childToParent.set(child, this);\n    this.children.push(child);\n    reParent.forEach(x => child.appendChild(x));\n    Observable.getNotifier(this.store).subscribe(child);\n    // How can we not notify *every* subscriber?\n    for (const [token, value] of this.store.all()) {\n      child.hydrate(token, this.bindingObservers.has(token) ? this.getRaw(token) : value);\n    }\n  }\n  /**\n   * Removes a child from a node.\n   * @param child - The child to remove.\n   */\n  removeChild(child) {\n    const childIndex = this.children.indexOf(child);\n    if (childIndex !== -1) {\n      this.children.splice(childIndex, 1);\n    }\n    Observable.getNotifier(this.store).unsubscribe(child);\n    return child.parent === this ? childToParent.delete(child) : false;\n  }\n  /**\n   * Tests whether a provided node is contained by\n   * the calling node.\n   * @param test - The node to test\n   */\n  contains(test) {\n    return composedContains(this.target, test.target);\n  }\n  /**\n   * Instructs the node to reflect a design token for the provided token.\n   * @param token - The design token to reflect\n   */\n  reflectToCSS(token) {\n    if (!this.isReflecting(token)) {\n      this.reflecting.add(token);\n      DesignTokenNode.cssCustomPropertyReflector.startReflection(token, this.target);\n    }\n  }\n  /**\n   * Stops reflecting a DesignToken to CSS\n   * @param token - The design token to stop reflecting\n   */\n  stopReflectToCSS(token) {\n    if (this.isReflecting(token)) {\n      this.reflecting.delete(token);\n      DesignTokenNode.cssCustomPropertyReflector.stopReflection(token, this.target);\n    }\n  }\n  /**\n   * Determines if a token is being reflected to CSS for a node.\n   * @param token - The token to check for reflection\n   * @returns\n   */\n  isReflecting(token) {\n    return this.reflecting.has(token);\n  }\n  /**\n   * Handle changes to upstream tokens\n   * @param source - The parent DesignTokenNode\n   * @param property - The token ID that changed\n   */\n  handleChange(source, property) {\n    const token = DesignTokenImpl.getTokenById(property);\n    if (!token) {\n      return;\n    }\n    this.hydrate(token, this.getRaw(token));\n    this.updateCSSTokenReflection(this.store, token);\n  }\n  /**\n   * Hydrates a token with a DesignTokenValue, making retrieval available.\n   * @param token - The token to hydrate\n   * @param value - The value to hydrate\n   */\n  hydrate(token, value) {\n    if (!this.has(token)) {\n      const observer = this.bindingObservers.get(token);\n      if (DesignTokenImpl.isDerivedDesignTokenValue(value)) {\n        if (observer) {\n          // If the binding source doesn't match, we need\n          // to update the binding\n          if (observer.source !== value) {\n            this.tearDownBindingObserver(token);\n            this.setupBindingObserver(token, value);\n          }\n        } else {\n          this.setupBindingObserver(token, value);\n        }\n      } else {\n        if (observer) {\n          this.tearDownBindingObserver(token);\n        }\n        this.store.set(token, value);\n      }\n    }\n  }\n  /**\n   * Sets up a binding observer for a derived token value that notifies token\n   * subscribers on change.\n   *\n   * @param token - The token to notify when the binding updates\n   * @param source - The binding source\n   */\n  setupBindingObserver(token, source) {\n    const binding = new DesignTokenBindingObserver(source, token, this);\n    this.bindingObservers.set(token, binding);\n    return binding;\n  }\n  /**\n   * Tear down a binding observer for a token.\n   */\n  tearDownBindingObserver(token) {\n    if (this.bindingObservers.has(token)) {\n      this.bindingObservers.get(token).disconnect();\n      this.bindingObservers.delete(token);\n      return true;\n    }\n    return false;\n  }\n}\n/**\n * Responsible for reflecting tokens to CSS custom properties\n */\nDesignTokenNode.cssCustomPropertyReflector = new CustomPropertyReflector();\n__decorate$1([observable], DesignTokenNode.prototype, \"children\", void 0);\nfunction create$2(nameOrConfig) {\n  return DesignTokenImpl.from(nameOrConfig);\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n/**\n * Factory object for creating {@link (DesignToken:interface)} instances.\n * @public\n */\nconst DesignToken = Object.freeze({\n  create: create$2,\n  /**\n   * Informs DesignToken that an HTMLElement for which tokens have\n   * been set has been connected to the document.\n   *\n   * The browser does not provide a reliable mechanism to observe an HTMLElement's connectedness\n   * in all scenarios, so invoking this method manually is necessary when:\n   *\n   * 1. Token values are set for an HTMLElement.\n   * 2. The HTMLElement does not inherit from FASTElement.\n   * 3. The HTMLElement is not connected to the document when token values are set.\n   *\n   * @param element - The element to notify\n   * @returns - true if notification was successful, otherwise false.\n   */\n  notifyConnection(element) {\n    if (!element.isConnected || !DesignTokenNode.existsFor(element)) {\n      return false;\n    }\n    DesignTokenNode.getOrCreate(element).bind();\n    return true;\n  },\n  /**\n   * Informs DesignToken that an HTMLElement for which tokens have\n   * been set has been disconnected to the document.\n   *\n   * The browser does not provide a reliable mechanism to observe an HTMLElement's connectedness\n   * in all scenarios, so invoking this method manually is necessary when:\n   *\n   * 1. Token values are set for an HTMLElement.\n   * 2. The HTMLElement does not inherit from FASTElement.\n   *\n   * @param element - The element to notify\n   * @returns - true if notification was successful, otherwise false.\n   */\n  notifyDisconnection(element) {\n    if (element.isConnected || !DesignTokenNode.existsFor(element)) {\n      return false;\n    }\n    DesignTokenNode.getOrCreate(element).unbind();\n    return true;\n  },\n  /**\n   * Registers and element or document as a DesignToken root.\n   * {@link CSSDesignToken | CSSDesignTokens} with default values assigned via\n   * {@link (DesignToken:interface).withDefault} will emit CSS custom properties to all\n   * registered roots.\n   * @param target - The root to register\n   */\n  registerRoot(target = defaultElement) {\n    RootStyleSheetTarget.registerRoot(target);\n  },\n  /**\n   * Unregister an element or document as a DesignToken root.\n   * @param target - The root to deregister\n   */\n  unregisterRoot(target = defaultElement) {\n    RootStyleSheetTarget.unregisterRoot(target);\n  }\n});\n/* eslint-enable @typescript-eslint/no-non-null-assertion */\n\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/**\n * Indicates what to do with an ambiguous (duplicate) element.\n * @public\n */\nconst ElementDisambiguation = Object.freeze({\n  /**\n   * Skip defining the element but still call the provided callback passed\n   * to DesignSystemRegistrationContext.tryDefineElement\n   */\n  definitionCallbackOnly: null,\n  /**\n   * Ignore the duplicate element entirely.\n   */\n  ignoreDuplicate: Symbol()\n});\nconst elementTypesByTag = new Map();\nconst elementTagsByType = new Map();\nlet rootDesignSystem = null;\nconst designSystemKey = DI.createInterface(x => x.cachedCallback(handler => {\n  if (rootDesignSystem === null) {\n    rootDesignSystem = new DefaultDesignSystem(null, handler);\n  }\n  return rootDesignSystem;\n}));\n/**\n * An API gateway to design system features.\n * @public\n */\nconst DesignSystem = Object.freeze({\n  /**\n   * Returns the HTML element name that the type is defined as.\n   * @param type - The type to lookup.\n   * @public\n   */\n  tagFor(type) {\n    return elementTagsByType.get(type);\n  },\n  /**\n   * Searches the DOM hierarchy for the design system that is responsible\n   * for the provided element.\n   * @param element - The element to locate the design system for.\n   * @returns The located design system.\n   * @public\n   */\n  responsibleFor(element) {\n    const owned = element.$$designSystem$$;\n    if (owned) {\n      return owned;\n    }\n    const container = DI.findResponsibleContainer(element);\n    return container.get(designSystemKey);\n  },\n  /**\n   * Gets the DesignSystem if one is explicitly defined on the provided element;\n   * otherwise creates a design system defined directly on the element.\n   * @param element - The element to get or create a design system for.\n   * @returns The design system.\n   * @public\n   */\n  getOrCreate(node) {\n    if (!node) {\n      if (rootDesignSystem === null) {\n        rootDesignSystem = DI.getOrCreateDOMContainer().get(designSystemKey);\n      }\n      return rootDesignSystem;\n    }\n    const owned = node.$$designSystem$$;\n    if (owned) {\n      return owned;\n    }\n    const container = DI.getOrCreateDOMContainer(node);\n    if (container.has(designSystemKey, false)) {\n      return container.get(designSystemKey);\n    } else {\n      const system = new DefaultDesignSystem(node, container);\n      container.register(Registration.instance(designSystemKey, system));\n      return system;\n    }\n  }\n});\nfunction extractTryDefineElementParams(params, elementDefinitionType, elementDefinitionCallback) {\n  if (typeof params === \"string\") {\n    return {\n      name: params,\n      type: elementDefinitionType,\n      callback: elementDefinitionCallback\n    };\n  } else {\n    return params;\n  }\n}\nclass DefaultDesignSystem {\n  constructor(owner, container) {\n    this.owner = owner;\n    this.container = container;\n    this.designTokensInitialized = false;\n    this.prefix = \"fast\";\n    this.shadowRootMode = undefined;\n    this.disambiguate = () => ElementDisambiguation.definitionCallbackOnly;\n    if (owner !== null) {\n      owner.$$designSystem$$ = this;\n    }\n  }\n  withPrefix(prefix) {\n    this.prefix = prefix;\n    return this;\n  }\n  withShadowRootMode(mode) {\n    this.shadowRootMode = mode;\n    return this;\n  }\n  withElementDisambiguation(callback) {\n    this.disambiguate = callback;\n    return this;\n  }\n  withDesignTokenRoot(root) {\n    this.designTokenRoot = root;\n    return this;\n  }\n  register(...registrations) {\n    const container = this.container;\n    const elementDefinitionEntries = [];\n    const disambiguate = this.disambiguate;\n    const shadowRootMode = this.shadowRootMode;\n    const context = {\n      elementPrefix: this.prefix,\n      tryDefineElement(params, elementDefinitionType, elementDefinitionCallback) {\n        const extractedParams = extractTryDefineElementParams(params, elementDefinitionType, elementDefinitionCallback);\n        const {\n          name,\n          callback,\n          baseClass\n        } = extractedParams;\n        let {\n          type\n        } = extractedParams;\n        let elementName = name;\n        let typeFoundByName = elementTypesByTag.get(elementName);\n        let needsDefine = true;\n        while (typeFoundByName) {\n          const result = disambiguate(elementName, type, typeFoundByName);\n          switch (result) {\n            case ElementDisambiguation.ignoreDuplicate:\n              return;\n            case ElementDisambiguation.definitionCallbackOnly:\n              needsDefine = false;\n              typeFoundByName = void 0;\n              break;\n            default:\n              elementName = result;\n              typeFoundByName = elementTypesByTag.get(elementName);\n              break;\n          }\n        }\n        if (needsDefine) {\n          if (elementTagsByType.has(type) || type === FoundationElement) {\n            type = class extends type {};\n          }\n          elementTypesByTag.set(elementName, type);\n          elementTagsByType.set(type, elementName);\n          if (baseClass) {\n            elementTagsByType.set(baseClass, elementName);\n          }\n        }\n        elementDefinitionEntries.push(new ElementDefinitionEntry(container, elementName, type, shadowRootMode, callback, needsDefine));\n      }\n    };\n    if (!this.designTokensInitialized) {\n      this.designTokensInitialized = true;\n      if (this.designTokenRoot !== null) {\n        DesignToken.registerRoot(this.designTokenRoot);\n      }\n    }\n    container.registerWithContext(context, ...registrations);\n    for (const entry of elementDefinitionEntries) {\n      entry.callback(entry);\n      if (entry.willDefine && entry.definition !== null) {\n        entry.definition.define();\n      }\n    }\n    return this;\n  }\n}\nclass ElementDefinitionEntry {\n  constructor(container, name, type, shadowRootMode, callback, willDefine) {\n    this.container = container;\n    this.name = name;\n    this.type = type;\n    this.shadowRootMode = shadowRootMode;\n    this.callback = callback;\n    this.willDefine = willDefine;\n    this.definition = null;\n  }\n  definePresentation(presentation) {\n    ComponentPresentation.define(this.name, presentation, this.container);\n  }\n  defineElement(definition) {\n    this.definition = new FASTElementDefinition(this.type, Object.assign(Object.assign({}, definition), {\n      name: this.name\n    }));\n  }\n  tagFor(type) {\n    return DesignSystem.tagFor(type);\n  }\n}\n/* eslint-enable @typescript-eslint/no-non-null-assertion */\n\n/**\n * The template for the {@link @microsoft/fast-foundation#Dialog} component.\n * @public\n */\nconst dialogTemplate = (context, definition) => html`<div class=\"positioning-region\" part=\"positioning-region\">${when(x => x.modal, html`<div class=\"overlay\" part=\"overlay\" role=\"presentation\" @click=\"${x => x.dismiss()}\"></div>`)}<div role=\"dialog\" tabindex=\"-1\" class=\"control\" part=\"control\" aria-modal=\"${x => x.modal}\" aria-describedby=\"${x => x.ariaDescribedby}\" aria-labelledby=\"${x => x.ariaLabelledby}\" aria-label=\"${x => x.ariaLabel}\" ${ref(\"dialog\")}><slot></slot></div></div>`;\n\n/*!\n* tabbable 5.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\nvar candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])', 'details>summary:first-of-type', 'details'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar matches = typeof Element === 'undefined' ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar isContentEditable = function isContentEditable(node) {\n  return node.contentEditable === 'true';\n};\nvar getTabindex = function getTabindex(node) {\n  var tabindexAttr = parseInt(node.getAttribute('tabindex'), 10);\n  if (!isNaN(tabindexAttr)) {\n    return tabindexAttr;\n  } // 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\n  if (isContentEditable(node)) {\n    return 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\n  if ((node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {\n    return 0;\n  }\n  return node.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 || node.ownerDocument;\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};\nvar isHidden = function isHidden(node, displayCheck) {\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') {\n    while (node) {\n      if (getComputedStyle(node).display === 'none') {\n        return true;\n      }\n      node = node.parentElement;\n    }\n  } else if (displayCheck === 'non-zero-area') {\n    var _node$getBoundingClie = node.getBoundingClientRect(),\n      width = _node$getBoundingClie.width,\n      height = _node$getBoundingClie.height;\n    return width === 0 && height === 0;\n  }\n  return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n  if (node.disabled || isHiddenInput(node) || isHidden(node, options.displayCheck) || /* For a details element with a summary, the summary element gets the focused  */\n  isDetailsWithSummary(node)) {\n    return false;\n  }\n  return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n  if (!isNodeMatchingSelectorFocusable(options, node) || isNonTabbableRadio(node) || getTabindex(node) < 0) {\n    return false;\n  }\n  return true;\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\n/**\n * A Switch Custom HTML Element.\n * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#dialog | ARIA dialog }.\n *\n * @slot - The default slot for the dialog content\n * @csspart positioning-region - A wrapping element used to center the dialog and position the modal overlay\n * @csspart overlay - The modal dialog overlay\n * @csspart control - The dialog element\n * @fires cancel - Fires a custom 'cancel' event when the modal overlay is clicked\n * @fires close - Fires a custom 'close' event when the dialog is hidden\n *\n * @public\n */\nclass Dialog extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * Indicates the element is modal. When modal, user mouse interaction will be limited to the contents of the element by a modal\n     * overlay.  Clicks on the overlay will cause the dialog to emit a \"dismiss\" event.\n     * @public\n     * @defaultValue - true\n     * @remarks\n     * HTML Attribute: modal\n     */\n    this.modal = true;\n    /**\n     * The hidden state of the element.\n     *\n     * @public\n     * @defaultValue - false\n     * @remarks\n     * HTML Attribute: hidden\n     */\n    this.hidden = false;\n    /**\n     * Indicates that the dialog should trap focus.\n     *\n     * @public\n     * @defaultValue - true\n     * @remarks\n     * HTML Attribute: trap-focus\n     */\n    this.trapFocus = true;\n    this.trapFocusChanged = () => {\n      if (this.$fastController.isConnected) {\n        this.updateTrapFocus();\n      }\n    };\n    /**\n     * @internal\n     */\n    this.isTrappingFocus = false;\n    this.handleDocumentKeydown = e => {\n      if (!e.defaultPrevented && !this.hidden) {\n        switch (e.key) {\n          case keyEscape:\n            this.dismiss();\n            e.preventDefault();\n            break;\n          case keyTab:\n            this.handleTabKeyDown(e);\n            break;\n        }\n      }\n    };\n    this.handleDocumentFocus = e => {\n      if (!e.defaultPrevented && this.shouldForceFocus(e.target)) {\n        this.focusFirstElement();\n        e.preventDefault();\n      }\n    };\n    this.handleTabKeyDown = e => {\n      if (!this.trapFocus || this.hidden) {\n        return;\n      }\n      const bounds = this.getTabQueueBounds();\n      if (bounds.length === 0) {\n        return;\n      }\n      if (bounds.length === 1) {\n        // keep focus on single element\n        bounds[0].focus();\n        e.preventDefault();\n        return;\n      }\n      if (e.shiftKey && e.target === bounds[0]) {\n        bounds[bounds.length - 1].focus();\n        e.preventDefault();\n      } else if (!e.shiftKey && e.target === bounds[bounds.length - 1]) {\n        bounds[0].focus();\n        e.preventDefault();\n      }\n      return;\n    };\n    this.getTabQueueBounds = () => {\n      const bounds = [];\n      return Dialog.reduceTabbableItems(bounds, this);\n    };\n    /**\n     * focus on first element of tab queue\n     */\n    this.focusFirstElement = () => {\n      const bounds = this.getTabQueueBounds();\n      if (bounds.length > 0) {\n        bounds[0].focus();\n      } else {\n        if (this.dialog instanceof HTMLElement) {\n          this.dialog.focus();\n        }\n      }\n    };\n    /**\n     * we should only focus if focus has not already been brought to the dialog\n     */\n    this.shouldForceFocus = currentFocusElement => {\n      return this.isTrappingFocus && !this.contains(currentFocusElement);\n    };\n    /**\n     * we should we be active trapping focus\n     */\n    this.shouldTrapFocus = () => {\n      return this.trapFocus && !this.hidden;\n    };\n    /**\n     *\n     *\n     * @internal\n     */\n    this.updateTrapFocus = shouldTrapFocusOverride => {\n      const shouldTrapFocus = shouldTrapFocusOverride === undefined ? this.shouldTrapFocus() : shouldTrapFocusOverride;\n      if (shouldTrapFocus && !this.isTrappingFocus) {\n        this.isTrappingFocus = true;\n        // Add an event listener for focusin events if we are trapping focus\n        document.addEventListener(\"focusin\", this.handleDocumentFocus);\n        DOM.queueUpdate(() => {\n          if (this.shouldForceFocus(document.activeElement)) {\n            this.focusFirstElement();\n          }\n        });\n      } else if (!shouldTrapFocus && this.isTrappingFocus) {\n        this.isTrappingFocus = false;\n        // remove event listener if we are not trapping focus\n        document.removeEventListener(\"focusin\", this.handleDocumentFocus);\n      }\n    };\n  }\n  /**\n   * @internal\n   */\n  dismiss() {\n    this.$emit(\"dismiss\");\n    // implement `<dialog>` interface\n    this.$emit(\"cancel\");\n  }\n  /**\n   * The method to show the dialog.\n   *\n   * @public\n   */\n  show() {\n    this.hidden = false;\n  }\n  /**\n   * The method to hide the dialog.\n   *\n   * @public\n   */\n  hide() {\n    this.hidden = true;\n    // implement `<dialog>` interface\n    this.$emit(\"close\");\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    document.addEventListener(\"keydown\", this.handleDocumentKeydown);\n    this.notifier = Observable.getNotifier(this);\n    this.notifier.subscribe(this, \"hidden\");\n    this.updateTrapFocus();\n  }\n  /**\n   * @internal\n   */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    // remove keydown event listener\n    document.removeEventListener(\"keydown\", this.handleDocumentKeydown);\n    // if we are trapping focus remove the focusin listener\n    this.updateTrapFocus(false);\n    this.notifier.unsubscribe(this, \"hidden\");\n  }\n  /**\n   * @internal\n   */\n  handleChange(source, propertyName) {\n    switch (propertyName) {\n      case \"hidden\":\n        this.updateTrapFocus();\n        break;\n    }\n  }\n  /**\n   * Reduce a collection to only its focusable elements.\n   *\n   * @param elements - Collection of elements to reduce\n   * @param element - The current element\n   *\n   * @internal\n   */\n  static reduceTabbableItems(elements, element) {\n    if (element.getAttribute(\"tabindex\") === \"-1\") {\n      return elements;\n    }\n    if (isTabbable(element) || Dialog.isFocusableFastElement(element) && Dialog.hasTabbableShadow(element)) {\n      elements.push(element);\n      return elements;\n    }\n    if (element.childElementCount) {\n      return elements.concat(Array.from(element.children).reduce(Dialog.reduceTabbableItems, []));\n    }\n    return elements;\n  }\n  /**\n   * Test if element is focusable fast element\n   *\n   * @param element - The element to check\n   *\n   * @internal\n   */\n  static isFocusableFastElement(element) {\n    var _a, _b;\n    return !!((_b = (_a = element.$fastController) === null || _a === void 0 ? void 0 : _a.definition.shadowOptions) === null || _b === void 0 ? void 0 : _b.delegatesFocus);\n  }\n  /**\n   * Test if the element has a focusable shadow\n   *\n   * @param element - The element to check\n   *\n   * @internal\n   */\n  static hasTabbableShadow(element) {\n    var _a, _b;\n    return Array.from((_b = (_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(\"*\")) !== null && _b !== void 0 ? _b : []).some(x => {\n      return isTabbable(x);\n    });\n  }\n}\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Dialog.prototype, \"modal\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Dialog.prototype, \"hidden\", void 0);\n__decorate$1([attr({\n  attribute: \"trap-focus\",\n  mode: \"boolean\"\n})], Dialog.prototype, \"trapFocus\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-describedby\"\n})], Dialog.prototype, \"ariaDescribedby\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-labelledby\"\n})], Dialog.prototype, \"ariaLabelledby\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-label\"\n})], Dialog.prototype, \"ariaLabel\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#Divider} component.\n * @public\n */\nconst dividerTemplate = (context, definition) => html`<template role=\"${x => x.role}\" aria-orientation=\"${x => x.orientation}\"></template>`;\n\n/**\n * Divider roles\n * @public\n */\nconst DividerRole = {\n  /**\n   * The divider semantically separates content\n   */\n  separator: \"separator\",\n  /**\n   * The divider has no semantic value and is for visual presentation only.\n   */\n  presentation: \"presentation\"\n};\n\n/**\n * A Divider Custom HTML Element.\n * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#separator | ARIA separator } or {@link https://www.w3.org/TR/wai-aria-1.1/#presentation | ARIA presentation}.\n *\n * @public\n */\nclass Divider extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * The role of the element.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: role\n     */\n    this.role = DividerRole.separator;\n    /**\n     * The orientation of the divider.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: orientation\n     */\n    this.orientation = Orientation.horizontal;\n  }\n}\n__decorate$1([attr], Divider.prototype, \"role\", void 0);\n__decorate$1([attr], Divider.prototype, \"orientation\", void 0);\n\n/**\n * The direction options for flipper.\n * @public\n */\nconst FlipperDirection = {\n  next: \"next\",\n  previous: \"previous\"\n};\n\n/**\n * The template for the {@link @microsoft/fast-foundation#Flipper} component.\n * @public\n */\nconst flipperTemplate = (context, definition) => html`<template role=\"button\" aria-disabled=\"${x => x.disabled ? true : void 0}\" tabindex=\"${x => x.hiddenFromAT ? -1 : 0}\" class=\"${x => x.direction} ${x => x.disabled ? \"disabled\" : \"\"}\" @keyup=\"${(x, c) => x.keyupHandler(c.event)}\">${when(x => x.direction === FlipperDirection.next, html`<span part=\"next\" class=\"next\"><slot name=\"next\">${definition.next || \"\"}</slot></span>`)} ${when(x => x.direction === FlipperDirection.previous, html`<span part=\"previous\" class=\"previous\"><slot name=\"previous\">${definition.previous || \"\"}</slot></span>`)}</template>`;\n\n/**\n * A Flipper Custom HTML Element.\n * Flippers are a form of button that implies directional content navigation, such as in a carousel.\n *\n * @slot next - The next flipper content\n * @slot previous - The previous flipper content\n * @csspart next - Wraps the next flipper content\n * @csspart previous - Wraps the previous flipper content\n * @fires click - Fires a custom 'click' event when Enter or Space is invoked via keyboard and the flipper is exposed to assistive technologies.\n *\n * @public\n */\nclass Flipper extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * Indicates the flipper should be hidden from assistive technology. Because flippers are often supplementary navigation, they are often hidden from assistive technology.\n     *\n     * @public\n     * @defaultValue - true\n     * @remarks\n     * HTML Attribute: aria-hidden\n     */\n    this.hiddenFromAT = true;\n    /**\n     * The direction that the flipper implies navigating.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: direction\n     */\n    this.direction = FlipperDirection.next;\n  }\n  /**\n   * Simulate a click event when the flipper has focus and the user hits enter or space keys\n   * Blur focus if the user hits escape key\n   * @param e - Keyboard event\n   * @public\n   */\n  keyupHandler(e) {\n    if (!this.hiddenFromAT) {\n      const key = e.key;\n      if (key === \"Enter\" || key === \"Space\") {\n        this.$emit(\"click\", e);\n      }\n      if (key === \"Escape\") {\n        this.blur();\n      }\n    }\n  }\n}\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Flipper.prototype, \"disabled\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-hidden\",\n  converter: booleanConverter\n})], Flipper.prototype, \"hiddenFromAT\", void 0);\n__decorate$1([attr], Flipper.prototype, \"direction\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(ListboxOption:class)} component.\n * @public\n */\nconst listboxOptionTemplate = (context, definition) => html`<template aria-checked=\"${x => x.ariaChecked}\" aria-disabled=\"${x => x.ariaDisabled}\" aria-posinset=\"${x => x.ariaPosInSet}\" aria-selected=\"${x => x.ariaSelected}\" aria-setsize=\"${x => x.ariaSetSize}\" class=\"${x => [x.checked && \"checked\", x.selected && \"selected\", x.disabled && \"disabled\"].filter(Boolean).join(\" \")}\" role=\"option\">${startSlotTemplate(context, definition)}<span class=\"content\" part=\"content\"><slot ${slotted(\"content\")}></slot></span>${endSlotTemplate(context, definition)}</template>`;\n\n/**\n * A Listbox Custom HTML Element.\n * Implements the {@link https://w3c.github.io/aria/#listbox | ARIA listbox }.\n *\n * @public\n */\nclass ListboxElement extends Listbox$1 {\n  constructor() {\n    super(...arguments);\n    /**\n     * The index of the most recently checked option.\n     *\n     * @internal\n     * @remarks\n     * Multiple-selection mode only.\n     */\n    this.activeIndex = -1;\n    /**\n     * The start index when checking a range of options.\n     *\n     * @internal\n     */\n    this.rangeStartIndex = -1;\n  }\n  /**\n   * Returns the last checked option.\n   *\n   * @internal\n   */\n  get activeOption() {\n    return this.options[this.activeIndex];\n  }\n  /**\n   * Returns the list of checked options.\n   *\n   * @internal\n   */\n  get checkedOptions() {\n    var _a;\n    return (_a = this.options) === null || _a === void 0 ? void 0 : _a.filter(o => o.checked);\n  }\n  /**\n   * Returns the index of the first selected option.\n   *\n   * @internal\n   */\n  get firstSelectedOptionIndex() {\n    return this.options.indexOf(this.firstSelectedOption);\n  }\n  /**\n   * Updates the `ariaActiveDescendant` property when the active index changes.\n   *\n   * @param prev - the previous active index\n   * @param next - the next active index\n   *\n   * @internal\n   */\n  activeIndexChanged(prev, next) {\n    var _a, _b;\n    this.ariaActiveDescendant = (_b = (_a = this.options[next]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : \"\";\n    this.focusAndScrollOptionIntoView();\n  }\n  /**\n   * Toggles the checked state for the currently active option.\n   *\n   * @remarks\n   * Multiple-selection mode only.\n   *\n   * @internal\n   */\n  checkActiveIndex() {\n    if (!this.multiple) {\n      return;\n    }\n    const activeItem = this.activeOption;\n    if (activeItem) {\n      activeItem.checked = true;\n    }\n  }\n  /**\n   * Sets the active index to the first option and marks it as checked.\n   *\n   * @remarks\n   * Multi-selection mode only.\n   *\n   * @param preserveChecked - mark all options unchecked before changing the active index\n   *\n   * @internal\n   */\n  checkFirstOption(preserveChecked = false) {\n    if (preserveChecked) {\n      if (this.rangeStartIndex === -1) {\n        this.rangeStartIndex = this.activeIndex + 1;\n      }\n      this.options.forEach((o, i) => {\n        o.checked = inRange(i, this.rangeStartIndex);\n      });\n    } else {\n      this.uncheckAllOptions();\n    }\n    this.activeIndex = 0;\n    this.checkActiveIndex();\n  }\n  /**\n   * Decrements the active index and sets the matching option as checked.\n   *\n   * @remarks\n   * Multi-selection mode only.\n   *\n   * @param preserveChecked - mark all options unchecked before changing the active index\n   *\n   * @internal\n   */\n  checkLastOption(preserveChecked = false) {\n    if (preserveChecked) {\n      if (this.rangeStartIndex === -1) {\n        this.rangeStartIndex = this.activeIndex;\n      }\n      this.options.forEach((o, i) => {\n        o.checked = inRange(i, this.rangeStartIndex, this.options.length);\n      });\n    } else {\n      this.uncheckAllOptions();\n    }\n    this.activeIndex = this.options.length - 1;\n    this.checkActiveIndex();\n  }\n  /**\n   * @override\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    this.addEventListener(\"focusout\", this.focusoutHandler);\n  }\n  /**\n   * @override\n   * @internal\n   */\n  disconnectedCallback() {\n    this.removeEventListener(\"focusout\", this.focusoutHandler);\n    super.disconnectedCallback();\n  }\n  /**\n   * Increments the active index and marks the matching option as checked.\n   *\n   * @remarks\n   * Multiple-selection mode only.\n   *\n   * @param preserveChecked - mark all options unchecked before changing the active index\n   *\n   * @internal\n   */\n  checkNextOption(preserveChecked = false) {\n    if (preserveChecked) {\n      if (this.rangeStartIndex === -1) {\n        this.rangeStartIndex = this.activeIndex;\n      }\n      this.options.forEach((o, i) => {\n        o.checked = inRange(i, this.rangeStartIndex, this.activeIndex + 1);\n      });\n    } else {\n      this.uncheckAllOptions();\n    }\n    this.activeIndex += this.activeIndex < this.options.length - 1 ? 1 : 0;\n    this.checkActiveIndex();\n  }\n  /**\n   * Decrements the active index and marks the matching option as checked.\n   *\n   * @remarks\n   * Multiple-selection mode only.\n   *\n   * @param preserveChecked - mark all options unchecked before changing the active index\n   *\n   * @internal\n   */\n  checkPreviousOption(preserveChecked = false) {\n    if (preserveChecked) {\n      if (this.rangeStartIndex === -1) {\n        this.rangeStartIndex = this.activeIndex;\n      }\n      if (this.checkedOptions.length === 1) {\n        this.rangeStartIndex += 1;\n      }\n      this.options.forEach((o, i) => {\n        o.checked = inRange(i, this.activeIndex, this.rangeStartIndex);\n      });\n    } else {\n      this.uncheckAllOptions();\n    }\n    this.activeIndex -= this.activeIndex > 0 ? 1 : 0;\n    this.checkActiveIndex();\n  }\n  /**\n   * Handles click events for listbox options.\n   *\n   * @param e - the event object\n   *\n   * @override\n   * @internal\n   */\n  clickHandler(e) {\n    var _a;\n    if (!this.multiple) {\n      return super.clickHandler(e);\n    }\n    const captured = (_a = e.target) === null || _a === void 0 ? void 0 : _a.closest(`[role=option]`);\n    if (!captured || captured.disabled) {\n      return;\n    }\n    this.uncheckAllOptions();\n    this.activeIndex = this.options.indexOf(captured);\n    this.checkActiveIndex();\n    this.toggleSelectedForAllCheckedOptions();\n    return true;\n  }\n  /**\n   * @override\n   * @internal\n   */\n  focusAndScrollOptionIntoView() {\n    super.focusAndScrollOptionIntoView(this.activeOption);\n  }\n  /**\n   * In multiple-selection mode:\n   * If any options are selected, the first selected option is checked when\n   * the listbox receives focus. If no options are selected, the first\n   * selectable option is checked.\n   *\n   * @override\n   * @internal\n   */\n  focusinHandler(e) {\n    if (!this.multiple) {\n      return super.focusinHandler(e);\n    }\n    if (!this.shouldSkipFocus && e.target === e.currentTarget) {\n      this.uncheckAllOptions();\n      if (this.activeIndex === -1) {\n        this.activeIndex = this.firstSelectedOptionIndex !== -1 ? this.firstSelectedOptionIndex : 0;\n      }\n      this.checkActiveIndex();\n      this.setSelectedOptions();\n      this.focusAndScrollOptionIntoView();\n    }\n    this.shouldSkipFocus = false;\n  }\n  /**\n   * Unchecks all options when the listbox loses focus.\n   *\n   * @internal\n   */\n  focusoutHandler(e) {\n    if (this.multiple) {\n      this.uncheckAllOptions();\n    }\n  }\n  /**\n   * Handles keydown actions for listbox navigation and typeahead\n   *\n   * @override\n   * @internal\n   */\n  keydownHandler(e) {\n    if (!this.multiple) {\n      return super.keydownHandler(e);\n    }\n    if (this.disabled) {\n      return true;\n    }\n    const {\n      key,\n      shiftKey\n    } = e;\n    this.shouldSkipFocus = false;\n    switch (key) {\n      // Select the first available option\n      case keyHome:\n        {\n          this.checkFirstOption(shiftKey);\n          return;\n        }\n      // Select the next selectable option\n      case keyArrowDown:\n        {\n          this.checkNextOption(shiftKey);\n          return;\n        }\n      // Select the previous selectable option\n      case keyArrowUp:\n        {\n          this.checkPreviousOption(shiftKey);\n          return;\n        }\n      // Select the last available option\n      case keyEnd:\n        {\n          this.checkLastOption(shiftKey);\n          return;\n        }\n      case keyTab:\n        {\n          this.focusAndScrollOptionIntoView();\n          return true;\n        }\n      case keyEscape:\n        {\n          this.uncheckAllOptions();\n          this.checkActiveIndex();\n          return true;\n        }\n      case keySpace:\n        {\n          e.preventDefault();\n          if (this.typeAheadExpired) {\n            this.toggleSelectedForAllCheckedOptions();\n            return;\n          }\n        }\n      // Send key to Typeahead handler\n      default:\n        {\n          if (key.length === 1) {\n            this.handleTypeAhead(`${key}`);\n          }\n          return true;\n        }\n    }\n  }\n  /**\n   * Prevents `focusin` events from firing before `click` events when the\n   * element is unfocused.\n   *\n   * @override\n   * @internal\n   */\n  mousedownHandler(e) {\n    if (e.offsetX >= 0 && e.offsetX <= this.scrollWidth) {\n      return super.mousedownHandler(e);\n    }\n  }\n  /**\n   * Switches between single-selection and multi-selection mode.\n   *\n   * @internal\n   */\n  multipleChanged(prev, next) {\n    var _a;\n    this.ariaMultiSelectable = next ? \"true\" : null;\n    (_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach(o => {\n      o.checked = next ? false : undefined;\n    });\n    this.setSelectedOptions();\n  }\n  /**\n   * Sets an option as selected and gives it focus.\n   *\n   * @override\n   * @public\n   */\n  setSelectedOptions() {\n    if (!this.multiple) {\n      super.setSelectedOptions();\n      return;\n    }\n    if (this.$fastController.isConnected && this.options) {\n      this.selectedOptions = this.options.filter(o => o.selected);\n      this.focusAndScrollOptionIntoView();\n    }\n  }\n  /**\n   * Ensures the size is a positive integer when the property is updated.\n   *\n   * @param prev - the previous size value\n   * @param next - the current size value\n   *\n   * @internal\n   */\n  sizeChanged(prev, next) {\n    var _a;\n    const size = Math.max(0, parseInt((_a = next === null || next === void 0 ? void 0 : next.toFixed()) !== null && _a !== void 0 ? _a : \"\", 10));\n    if (size !== next) {\n      DOM.queueUpdate(() => {\n        this.size = size;\n      });\n    }\n  }\n  /**\n   * Toggles the selected state of the provided options. If any provided items\n   * are in an unselected state, all items are set to selected. If every\n   * provided item is selected, they are all unselected.\n   *\n   * @internal\n   */\n  toggleSelectedForAllCheckedOptions() {\n    const enabledCheckedOptions = this.checkedOptions.filter(o => !o.disabled);\n    const force = !enabledCheckedOptions.every(o => o.selected);\n    enabledCheckedOptions.forEach(o => o.selected = force);\n    this.selectedIndex = this.options.indexOf(enabledCheckedOptions[enabledCheckedOptions.length - 1]);\n    this.setSelectedOptions();\n  }\n  /**\n   * @override\n   * @internal\n   */\n  typeaheadBufferChanged(prev, next) {\n    if (!this.multiple) {\n      super.typeaheadBufferChanged(prev, next);\n      return;\n    }\n    if (this.$fastController.isConnected) {\n      const typeaheadMatches = this.getTypeaheadMatches();\n      const activeIndex = this.options.indexOf(typeaheadMatches[0]);\n      if (activeIndex > -1) {\n        this.activeIndex = activeIndex;\n        this.uncheckAllOptions();\n        this.checkActiveIndex();\n      }\n      this.typeAheadExpired = false;\n    }\n  }\n  /**\n   * Unchecks all options.\n   *\n   * @remarks\n   * Multiple-selection mode only.\n   *\n   * @param preserveChecked - reset the rangeStartIndex\n   *\n   * @internal\n   */\n  uncheckAllOptions(preserveChecked = false) {\n    this.options.forEach(o => o.checked = this.multiple ? false : undefined);\n    if (!preserveChecked) {\n      this.rangeStartIndex = -1;\n    }\n  }\n}\n__decorate$1([observable], ListboxElement.prototype, \"activeIndex\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], ListboxElement.prototype, \"multiple\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], ListboxElement.prototype, \"size\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(Listbox:class)} component.\n * @public\n */\nconst listboxTemplate = (context, definition) => html`<template aria-activedescendant=\"${x => x.ariaActiveDescendant}\" aria-multiselectable=\"${x => x.ariaMultiSelectable}\" class=\"listbox\" role=\"listbox\" tabindex=\"${x => !x.disabled ? \"0\" : null}\" @click=\"${(x, c) => x.clickHandler(c.event)}\" @focusin=\"${(x, c) => x.focusinHandler(c.event)}\" @keydown=\"${(x, c) => x.keydownHandler(c.event)}\" @mousedown=\"${(x, c) => x.mousedownHandler(c.event)}\"><slot ${slotted({\n  filter: ListboxElement.slottedOptionFilter,\n  flatten: true,\n  property: \"slottedOptions\"\n})}></slot></template>`;\n\n/**\n * Menu items roles.\n * @public\n */\nconst MenuItemRole = {\n  /**\n   * The menu item has a \"menuitem\" role\n   */\n  menuitem: \"menuitem\",\n  /**\n   * The menu item has a \"menuitemcheckbox\" role\n   */\n  menuitemcheckbox: \"menuitemcheckbox\",\n  /**\n   * The menu item has a \"menuitemradio\" role\n   */\n  menuitemradio: \"menuitemradio\"\n};\n/**\n * @internal\n */\nconst roleForMenuItem = {\n  [MenuItemRole.menuitem]: \"menuitem\",\n  [MenuItemRole.menuitemcheckbox]: \"menuitemcheckbox\",\n  [MenuItemRole.menuitemradio]: \"menuitemradio\"\n};\n\n/**\n * A Switch Custom HTML Element.\n * Implements {@link https://www.w3.org/TR/wai-aria-1.1/#menuitem | ARIA menuitem }, {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemcheckbox | ARIA menuitemcheckbox}, or {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemradio | ARIA menuitemradio }.\n *\n * @slot checked-indicator - The checked indicator\n * @slot radio-indicator - The radio indicator\n * @slot start - Content which can be provided before the menu item content\n * @slot end - Content which can be provided after the menu item content\n * @slot - The default slot for menu item content\n * @slot expand-collapse-indicator - The expand/collapse indicator\n * @slot submenu - Used to nest menu's within menu items\n * @csspart input-container - The element representing the visual checked or radio indicator\n * @csspart checkbox - The element wrapping the `menuitemcheckbox` indicator\n * @csspart radio - The element wrapping the `menuitemradio` indicator\n * @csspart content - The element wrapping the menu item content\n * @csspart expand-collapse-glyph-container - The element wrapping the expand collapse element\n * @csspart expand-collapse - The expand/collapse element\n * @csspart submenu-region - The container for the submenu, used for positioning\n * @fires expanded-change - Fires a custom 'expanded-change' event when the expanded state changes\n * @fires change - Fires a custom 'change' event when a non-submenu item with a role of `menuitemcheckbox`, `menuitemradio`, or `menuitem` is invoked\n *\n * @public\n */\nclass MenuItem extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * The role of the element.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: role\n     */\n    this.role = MenuItemRole.menuitem;\n    /**\n     * @internal\n     */\n    this.hasSubmenu = false;\n    /**\n     * Track current direction to pass to the anchored region\n     *\n     * @internal\n     */\n    this.currentDirection = Direction.ltr;\n    this.focusSubmenuOnLoad = false;\n    /**\n     * @internal\n     */\n    this.handleMenuItemKeyDown = e => {\n      if (e.defaultPrevented) {\n        return false;\n      }\n      switch (e.key) {\n        case keyEnter:\n        case keySpace:\n          this.invoke();\n          return false;\n        case keyArrowRight:\n          //open/focus on submenu\n          this.expandAndFocus();\n          return false;\n        case keyArrowLeft:\n          //close submenu\n          if (this.expanded) {\n            this.expanded = false;\n            this.focus();\n            return false;\n          }\n      }\n      return true;\n    };\n    /**\n     * @internal\n     */\n    this.handleMenuItemClick = e => {\n      if (e.defaultPrevented || this.disabled) {\n        return false;\n      }\n      this.invoke();\n      return false;\n    };\n    /**\n     * @internal\n     */\n    this.submenuLoaded = () => {\n      if (!this.focusSubmenuOnLoad) {\n        return;\n      }\n      this.focusSubmenuOnLoad = false;\n      if (this.hasSubmenu) {\n        this.submenu.focus();\n        this.setAttribute(\"tabindex\", \"-1\");\n      }\n    };\n    /**\n     * @internal\n     */\n    this.handleMouseOver = e => {\n      if (this.disabled || !this.hasSubmenu || this.expanded) {\n        return false;\n      }\n      this.expanded = true;\n      return false;\n    };\n    /**\n     * @internal\n     */\n    this.handleMouseOut = e => {\n      if (!this.expanded || this.contains(document.activeElement)) {\n        return false;\n      }\n      this.expanded = false;\n      return false;\n    };\n    /**\n     * @internal\n     */\n    this.expandAndFocus = () => {\n      if (!this.hasSubmenu) {\n        return;\n      }\n      this.focusSubmenuOnLoad = true;\n      this.expanded = true;\n    };\n    /**\n     * @internal\n     */\n    this.invoke = () => {\n      if (this.disabled) {\n        return;\n      }\n      switch (this.role) {\n        case MenuItemRole.menuitemcheckbox:\n          this.checked = !this.checked;\n          break;\n        case MenuItemRole.menuitem:\n          // update submenu\n          this.updateSubmenu();\n          if (this.hasSubmenu) {\n            this.expandAndFocus();\n          } else {\n            this.$emit(\"change\");\n          }\n          break;\n        case MenuItemRole.menuitemradio:\n          if (!this.checked) {\n            this.checked = true;\n          }\n          break;\n      }\n    };\n    /**\n     * Gets the submenu element if any\n     *\n     * @internal\n     */\n    this.updateSubmenu = () => {\n      this.submenu = this.domChildren().find(element => {\n        return element.getAttribute(\"role\") === \"menu\";\n      });\n      this.hasSubmenu = this.submenu === undefined ? false : true;\n    };\n  }\n  expandedChanged(oldValue) {\n    if (this.$fastController.isConnected) {\n      if (this.submenu === undefined) {\n        return;\n      }\n      if (this.expanded === false) {\n        this.submenu.collapseExpandedItem();\n      } else {\n        this.currentDirection = getDirection(this);\n      }\n      this.$emit(\"expanded-change\", this, {\n        bubbles: false\n      });\n    }\n  }\n  checkedChanged(oldValue, newValue) {\n    if (this.$fastController.isConnected) {\n      this.$emit(\"change\");\n    }\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    DOM.queueUpdate(() => {\n      this.updateSubmenu();\n    });\n    if (!this.startColumnCount) {\n      this.startColumnCount = 1;\n    }\n    this.observer = new MutationObserver(this.updateSubmenu);\n  }\n  /**\n   * @internal\n   */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    this.submenu = undefined;\n    if (this.observer !== undefined) {\n      this.observer.disconnect();\n      this.observer = undefined;\n    }\n  }\n  /**\n   * get an array of valid DOM children\n   */\n  domChildren() {\n    return Array.from(this.children).filter(child => !child.hasAttribute(\"hidden\"));\n  }\n}\n__decorate$1([attr({\n  mode: \"boolean\"\n})], MenuItem.prototype, \"disabled\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], MenuItem.prototype, \"expanded\", void 0);\n__decorate$1([observable], MenuItem.prototype, \"startColumnCount\", void 0);\n__decorate$1([attr], MenuItem.prototype, \"role\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], MenuItem.prototype, \"checked\", void 0);\n__decorate$1([observable], MenuItem.prototype, \"submenuRegion\", void 0);\n__decorate$1([observable], MenuItem.prototype, \"hasSubmenu\", void 0);\n__decorate$1([observable], MenuItem.prototype, \"currentDirection\", void 0);\n__decorate$1([observable], MenuItem.prototype, \"submenu\", void 0);\napplyMixins(MenuItem, StartEnd);\n\n/**\n * Generates a template for the {@link @microsoft/fast-foundation#(MenuItem:class)} component using\n * the provided prefix.\n *\n * @public\n */\nconst menuItemTemplate = (context, definition) => html`<template role=\"${x => x.role}\" aria-haspopup=\"${x => x.hasSubmenu ? \"menu\" : void 0}\" aria-checked=\"${x => x.role !== MenuItemRole.menuitem ? x.checked : void 0}\" aria-disabled=\"${x => x.disabled}\" aria-expanded=\"${x => x.expanded}\" @keydown=\"${(x, c) => x.handleMenuItemKeyDown(c.event)}\" @click=\"${(x, c) => x.handleMenuItemClick(c.event)}\" @mouseover=\"${(x, c) => x.handleMouseOver(c.event)}\" @mouseout=\"${(x, c) => x.handleMouseOut(c.event)}\" class=\"${x => x.disabled ? \"disabled\" : \"\"} ${x => x.expanded ? \"expanded\" : \"\"} ${x => `indent-${x.startColumnCount}`}\">${when(x => x.role === MenuItemRole.menuitemcheckbox, html`<div part=\"input-container\" class=\"input-container\"><span part=\"checkbox\" class=\"checkbox\"><slot name=\"checkbox-indicator\">${definition.checkboxIndicator || \"\"}</slot></span></div>`)} ${when(x => x.role === MenuItemRole.menuitemradio, html`<div part=\"input-container\" class=\"input-container\"><span part=\"radio\" class=\"radio\"><slot name=\"radio-indicator\">${definition.radioIndicator || \"\"}</slot></span></div>`)}</div>${startSlotTemplate(context, definition)}<span class=\"content\" part=\"content\"><slot></slot></span>${endSlotTemplate(context, definition)} ${when(x => x.hasSubmenu, html`<div part=\"expand-collapse-glyph-container\" class=\"expand-collapse-glyph-container\"><span part=\"expand-collapse\" class=\"expand-collapse\"><slot name=\"expand-collapse-indicator\">${definition.expandCollapseGlyph || \"\"}</slot></span></div>`)} ${when(x => x.expanded, html`<${context.tagFor(AnchoredRegion)} :anchorElement=\"${x => x}\" vertical-positioning-mode=\"dynamic\" vertical-default-position=\"bottom\" vertical-inset=\"true\" horizontal-positioning-mode=\"dynamic\" horizontal-default-position=\"end\" class=\"submenu-region\" dir=\"${x => x.currentDirection}\" @loaded=\"${x => x.submenuLoaded()}\" ${ref(\"submenuRegion\")} part=\"submenu-region\"><slot name=\"submenu\"></slot></${context.tagFor(AnchoredRegion)}>`)}</template>`;\n\n/**\n * The template for the {@link @microsoft/fast-foundation#Menu} component.\n * @public\n */\nconst menuTemplate = (context, definition) => html`<template slot=\"${x => x.slot ? x.slot : x.isNestedMenu() ? \"submenu\" : void 0}\" role=\"menu\" @keydown=\"${(x, c) => x.handleMenuKeyDown(c.event)}\" @focusout=\"${(x, c) => x.handleFocusOut(c.event)}\"><slot ${slotted(\"items\")}></slot></template>`;\n\n/**\n * A Menu Custom HTML Element.\n * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#menu | ARIA menu }.\n *\n * @slot - The default slot for the menu items\n *\n * @public\n */\nclass Menu$1 extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    this.expandedItem = null;\n    /**\n     * The index of the focusable element in the items array\n     * defaults to -1\n     */\n    this.focusIndex = -1;\n    /**\n     * @internal\n     */\n    this.isNestedMenu = () => {\n      return this.parentElement !== null && isHTMLElement(this.parentElement) && this.parentElement.getAttribute(\"role\") === \"menuitem\";\n    };\n    /**\n     * if focus is moving out of the menu, reset to a stable initial state\n     * @internal\n     */\n    this.handleFocusOut = e => {\n      if (!this.contains(e.relatedTarget) && this.menuItems !== undefined) {\n        this.collapseExpandedItem();\n        // find our first focusable element\n        const focusIndex = this.menuItems.findIndex(this.isFocusableElement);\n        // set the current focus index's tabindex to -1\n        this.menuItems[this.focusIndex].setAttribute(\"tabindex\", \"-1\");\n        // set the first focusable element tabindex to 0\n        this.menuItems[focusIndex].setAttribute(\"tabindex\", \"0\");\n        // set the focus index\n        this.focusIndex = focusIndex;\n      }\n    };\n    this.handleItemFocus = e => {\n      const targetItem = e.target;\n      if (this.menuItems !== undefined && targetItem !== this.menuItems[this.focusIndex]) {\n        this.menuItems[this.focusIndex].setAttribute(\"tabindex\", \"-1\");\n        this.focusIndex = this.menuItems.indexOf(targetItem);\n        targetItem.setAttribute(\"tabindex\", \"0\");\n      }\n    };\n    this.handleExpandedChanged = e => {\n      if (e.defaultPrevented || e.target === null || this.menuItems === undefined || this.menuItems.indexOf(e.target) < 0) {\n        return;\n      }\n      e.preventDefault();\n      const changedItem = e.target;\n      // closing an expanded item without opening another\n      if (this.expandedItem !== null && changedItem === this.expandedItem && changedItem.expanded === false) {\n        this.expandedItem = null;\n        return;\n      }\n      if (changedItem.expanded) {\n        if (this.expandedItem !== null && this.expandedItem !== changedItem) {\n          this.expandedItem.expanded = false;\n        }\n        this.menuItems[this.focusIndex].setAttribute(\"tabindex\", \"-1\");\n        this.expandedItem = changedItem;\n        this.focusIndex = this.menuItems.indexOf(changedItem);\n        changedItem.setAttribute(\"tabindex\", \"0\");\n      }\n    };\n    this.removeItemListeners = () => {\n      if (this.menuItems !== undefined) {\n        this.menuItems.forEach(item => {\n          item.removeEventListener(\"expanded-change\", this.handleExpandedChanged);\n          item.removeEventListener(\"focus\", this.handleItemFocus);\n        });\n      }\n    };\n    this.setItems = () => {\n      const newItems = this.domChildren();\n      this.removeItemListeners();\n      this.menuItems = newItems;\n      const menuItems = this.menuItems.filter(this.isMenuItemElement);\n      // if our focus index is not -1 we have items\n      if (menuItems.length) {\n        this.focusIndex = 0;\n      }\n      function elementIndent(el) {\n        const role = el.getAttribute(\"role\");\n        const startSlot = el.querySelector(\"[slot=start]\");\n        if (role !== MenuItemRole.menuitem && startSlot === null) {\n          return 1;\n        } else if (role === MenuItemRole.menuitem && startSlot !== null) {\n          return 1;\n        } else if (role !== MenuItemRole.menuitem && startSlot !== null) {\n          return 2;\n        } else {\n          return 0;\n        }\n      }\n      const indent = menuItems.reduce((accum, current) => {\n        const elementValue = elementIndent(current);\n        return accum > elementValue ? accum : elementValue;\n      }, 0);\n      menuItems.forEach((item, index) => {\n        item.setAttribute(\"tabindex\", index === 0 ? \"0\" : \"-1\");\n        item.addEventListener(\"expanded-change\", this.handleExpandedChanged);\n        item.addEventListener(\"focus\", this.handleItemFocus);\n        if (item instanceof MenuItem || \"startColumnCount\" in item) {\n          item.startColumnCount = indent;\n        }\n      });\n    };\n    /**\n     * handle change from child element\n     */\n    this.changeHandler = e => {\n      if (this.menuItems === undefined) {\n        return;\n      }\n      const changedMenuItem = e.target;\n      const changeItemIndex = this.menuItems.indexOf(changedMenuItem);\n      if (changeItemIndex === -1) {\n        return;\n      }\n      if (changedMenuItem.role === \"menuitemradio\" && changedMenuItem.checked === true) {\n        for (let i = changeItemIndex - 1; i >= 0; --i) {\n          const item = this.menuItems[i];\n          const role = item.getAttribute(\"role\");\n          if (role === MenuItemRole.menuitemradio) {\n            item.checked = false;\n          }\n          if (role === \"separator\") {\n            break;\n          }\n        }\n        const maxIndex = this.menuItems.length - 1;\n        for (let i = changeItemIndex + 1; i <= maxIndex; ++i) {\n          const item = this.menuItems[i];\n          const role = item.getAttribute(\"role\");\n          if (role === MenuItemRole.menuitemradio) {\n            item.checked = false;\n          }\n          if (role === \"separator\") {\n            break;\n          }\n        }\n      }\n    };\n    /**\n     * check if the item is a menu item\n     */\n    this.isMenuItemElement = el => {\n      return isHTMLElement(el) && Menu$1.focusableElementRoles.hasOwnProperty(el.getAttribute(\"role\"));\n    };\n    /**\n     * check if the item is focusable\n     */\n    this.isFocusableElement = el => {\n      return this.isMenuItemElement(el);\n    };\n  }\n  itemsChanged(oldValue, newValue) {\n    // only update children after the component is connected and\n    // the setItems has run on connectedCallback\n    // (menuItems is undefined until then)\n    if (this.$fastController.isConnected && this.menuItems !== undefined) {\n      this.setItems();\n    }\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    DOM.queueUpdate(() => {\n      // wait until children have had a chance to\n      // connect before setting/checking their props/attributes\n      this.setItems();\n    });\n    this.addEventListener(\"change\", this.changeHandler);\n  }\n  /**\n   * @internal\n   */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    this.removeItemListeners();\n    this.menuItems = undefined;\n    this.removeEventListener(\"change\", this.changeHandler);\n  }\n  /**\n   * Focuses the first item in the menu.\n   *\n   * @public\n   */\n  focus() {\n    this.setFocus(0, 1);\n  }\n  /**\n   * Collapses any expanded menu items.\n   *\n   * @public\n   */\n  collapseExpandedItem() {\n    if (this.expandedItem !== null) {\n      this.expandedItem.expanded = false;\n      this.expandedItem = null;\n    }\n  }\n  /**\n   * @internal\n   */\n  handleMenuKeyDown(e) {\n    if (e.defaultPrevented || this.menuItems === undefined) {\n      return;\n    }\n    switch (e.key) {\n      case keyArrowDown:\n        // go forward one index\n        this.setFocus(this.focusIndex + 1, 1);\n        return;\n      case keyArrowUp:\n        // go back one index\n        this.setFocus(this.focusIndex - 1, -1);\n        return;\n      case keyEnd:\n        // set focus on last item\n        this.setFocus(this.menuItems.length - 1, -1);\n        return;\n      case keyHome:\n        // set focus on first item\n        this.setFocus(0, 1);\n        return;\n      default:\n        // if we are not handling the event, do not prevent default\n        return true;\n    }\n  }\n  /**\n   * get an array of valid DOM children\n   */\n  domChildren() {\n    return Array.from(this.children).filter(child => !child.hasAttribute(\"hidden\"));\n  }\n  setFocus(focusIndex, adjustment) {\n    if (this.menuItems === undefined) {\n      return;\n    }\n    while (focusIndex >= 0 && focusIndex < this.menuItems.length) {\n      const child = this.menuItems[focusIndex];\n      if (this.isFocusableElement(child)) {\n        // change the previous index to -1\n        if (this.focusIndex > -1 && this.menuItems.length >= this.focusIndex - 1) {\n          this.menuItems[this.focusIndex].setAttribute(\"tabindex\", \"-1\");\n        }\n        // update the focus index\n        this.focusIndex = focusIndex;\n        // update the tabindex of next focusable element\n        child.setAttribute(\"tabindex\", \"0\");\n        // focus the element\n        child.focus();\n        break;\n      }\n      focusIndex += adjustment;\n    }\n  }\n}\nMenu$1.focusableElementRoles = roleForMenuItem;\n__decorate$1([observable], Menu$1.prototype, \"items\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(NumberField:class)} component.\n * @public\n */\nconst numberFieldTemplate = (context, definition) => html`<template class=\"${x => x.readOnly ? \"readonly\" : \"\"}\"><label part=\"label\" for=\"control\" class=\"${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length ? \"label\" : \"label label__hidden\"}\"><slot ${slotted(\"defaultSlottedNodes\")}></slot></label><div class=\"root\" part=\"root\">${startSlotTemplate(context, definition)}<input class=\"control\" part=\"control\" id=\"control\" @input=\"${x => x.handleTextInput()}\" @change=\"${x => x.handleChange()}\" @keydown=\"${(x, c) => x.handleKeyDown(c.event)}\" @blur=\"${(x, c) => x.handleBlur()}\" ?autofocus=\"${x => x.autofocus}\" ?disabled=\"${x => x.disabled}\" list=\"${x => x.list}\" maxlength=\"${x => x.maxlength}\" minlength=\"${x => x.minlength}\" placeholder=\"${x => x.placeholder}\" ?readonly=\"${x => x.readOnly}\" ?required=\"${x => x.required}\" size=\"${x => x.size}\" type=\"text\" inputmode=\"numeric\" min=\"${x => x.min}\" max=\"${x => x.max}\" step=\"${x => x.step}\" aria-atomic=\"${x => x.ariaAtomic}\" aria-busy=\"${x => x.ariaBusy}\" aria-controls=\"${x => x.ariaControls}\" aria-current=\"${x => x.ariaCurrent}\" aria-describedby=\"${x => x.ariaDescribedby}\" aria-details=\"${x => x.ariaDetails}\" aria-disabled=\"${x => x.ariaDisabled}\" aria-errormessage=\"${x => x.ariaErrormessage}\" aria-flowto=\"${x => x.ariaFlowto}\" aria-haspopup=\"${x => x.ariaHaspopup}\" aria-hidden=\"${x => x.ariaHidden}\" aria-invalid=\"${x => x.ariaInvalid}\" aria-keyshortcuts=\"${x => x.ariaKeyshortcuts}\" aria-label=\"${x => x.ariaLabel}\" aria-labelledby=\"${x => x.ariaLabelledby}\" aria-live=\"${x => x.ariaLive}\" aria-owns=\"${x => x.ariaOwns}\" aria-relevant=\"${x => x.ariaRelevant}\" aria-roledescription=\"${x => x.ariaRoledescription}\" ${ref(\"control\")} />${when(x => !x.hideStep && !x.readOnly && !x.disabled, html`<div class=\"controls\" part=\"controls\"><div class=\"step-up\" part=\"step-up\" @click=\"${x => x.stepUp()}\"><slot name=\"step-up-glyph\">${definition.stepUpGlyph || \"\"}</slot></div><div class=\"step-down\" part=\"step-down\" @click=\"${x => x.stepDown()}\"><slot name=\"step-down-glyph\">${definition.stepDownGlyph || \"\"}</slot></div></div>`)} ${endSlotTemplate(context, definition)}</div></template>`;\n\nclass _TextField extends FoundationElement {}\n/**\n * A form-associated base class for the {@link @microsoft/fast-foundation#(TextField:class)} component.\n *\n * @internal\n */\nclass FormAssociatedTextField extends FormAssociated(_TextField) {\n  constructor() {\n    super(...arguments);\n    this.proxy = document.createElement(\"input\");\n  }\n}\n\n/**\n * Text field sub-types\n * @public\n */\nconst TextFieldType = {\n  /**\n   * An email TextField\n   */\n  email: \"email\",\n  /**\n   * A password TextField\n   */\n  password: \"password\",\n  /**\n   * A telephone TextField\n   */\n  tel: \"tel\",\n  /**\n   * A text TextField\n   */\n  text: \"text\",\n  /**\n   * A URL TextField\n   */\n  url: \"url\"\n};\n\n/**\n * A Text Field Custom HTML Element.\n * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text | <input type=\"text\" /> element }.\n *\n * @slot start - Content which can be provided before the number field input\n * @slot end - Content which can be provided after the number field input\n * @slot - The default slot for the label\n * @csspart label - The label\n * @csspart root - The element wrapping the control, including start and end slots\n * @csspart control - The text field element\n * @fires change - Fires a custom 'change' event when the value has changed\n *\n * @public\n */\nclass TextField$1 extends FormAssociatedTextField {\n  constructor() {\n    super(...arguments);\n    /**\n     * Allows setting a type or mode of text.\n     * @public\n     * @remarks\n     * HTML Attribute: type\n     */\n    this.type = TextFieldType.text;\n  }\n  readOnlyChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.readOnly = this.readOnly;\n      this.validate();\n    }\n  }\n  autofocusChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.autofocus = this.autofocus;\n      this.validate();\n    }\n  }\n  placeholderChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.placeholder = this.placeholder;\n    }\n  }\n  typeChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.type = this.type;\n      this.validate();\n    }\n  }\n  listChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.setAttribute(\"list\", this.list);\n      this.validate();\n    }\n  }\n  maxlengthChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.maxLength = this.maxlength;\n      this.validate();\n    }\n  }\n  minlengthChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.minLength = this.minlength;\n      this.validate();\n    }\n  }\n  patternChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.pattern = this.pattern;\n      this.validate();\n    }\n  }\n  sizeChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.size = this.size;\n    }\n  }\n  spellcheckChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.spellcheck = this.spellcheck;\n    }\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    this.proxy.setAttribute(\"type\", this.type);\n    this.validate();\n    if (this.autofocus) {\n      DOM.queueUpdate(() => {\n        this.focus();\n      });\n    }\n  }\n  /**\n   * Selects all the text in the text field\n   *\n   * @public\n   */\n  select() {\n    this.control.select();\n    /**\n     * The select event does not permeate the shadow DOM boundary.\n     * This fn effectively proxies the select event,\n     * emitting a `select` event whenever the internal\n     * control emits a `select` event\n     */\n    this.$emit(\"select\");\n  }\n  /**\n   * Handles the internal control's `input` event\n   * @internal\n   */\n  handleTextInput() {\n    this.value = this.control.value;\n  }\n  /**\n   * Change event handler for inner control.\n   * @remarks\n   * \"Change\" events are not `composable` so they will not\n   * permeate the shadow DOM boundary. This fn effectively proxies\n   * the change event, emitting a `change` event whenever the internal\n   * control emits a `change` event\n   * @internal\n   */\n  handleChange() {\n    this.$emit(\"change\");\n  }\n  /** {@inheritDoc (FormAssociated:interface).validate} */\n  validate() {\n    super.validate(this.control);\n  }\n}\n__decorate$1([attr({\n  attribute: \"readonly\",\n  mode: \"boolean\"\n})], TextField$1.prototype, \"readOnly\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], TextField$1.prototype, \"autofocus\", void 0);\n__decorate$1([attr], TextField$1.prototype, \"placeholder\", void 0);\n__decorate$1([attr], TextField$1.prototype, \"type\", void 0);\n__decorate$1([attr], TextField$1.prototype, \"list\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], TextField$1.prototype, \"maxlength\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], TextField$1.prototype, \"minlength\", void 0);\n__decorate$1([attr], TextField$1.prototype, \"pattern\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], TextField$1.prototype, \"size\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], TextField$1.prototype, \"spellcheck\", void 0);\n__decorate$1([observable], TextField$1.prototype, \"defaultSlottedNodes\", void 0);\n/**\n * Includes ARIA states and properties relating to the ARIA textbox role\n *\n * @public\n */\nclass DelegatesARIATextbox {}\napplyMixins(DelegatesARIATextbox, ARIAGlobalStatesAndProperties);\napplyMixins(TextField$1, StartEnd, DelegatesARIATextbox);\n\nclass _NumberField extends FoundationElement {}\n/**\n * A form-associated base class for the {@link @microsoft/fast-foundation#(NumberField:class)} component.\n *\n * @internal\n */\nclass FormAssociatedNumberField extends FormAssociated(_NumberField) {\n  constructor() {\n    super(...arguments);\n    this.proxy = document.createElement(\"input\");\n  }\n}\n\n/**\n * A Number Field Custom HTML Element.\n * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number | <input type=\"number\" /> element }.\n *\n * @slot start - Content which can be provided before the number field input\n * @slot end - Content which can be provided after the number field input\n * @slot - The default slot for the label\n * @slot step-up-glyph - The glyph for the step up control\n * @slot step-down-glyph - The glyph for the step down control\n * @csspart label - The label\n * @csspart root - The element wrapping the control, including start and end slots\n * @csspart control - The element representing the input\n * @csspart controls - The step up and step down controls\n * @csspart step-up - The step up control\n * @csspart step-down - The step down control\n * @fires input - Fires a custom 'input' event when the value has changed\n * @fires change - Fires a custom 'change' event when the value has changed\n *\n * @public\n */\nclass NumberField$1 extends FormAssociatedNumberField {\n  constructor() {\n    super(...arguments);\n    /**\n     * When true, spin buttons will not be rendered\n     * @public\n     * @remarks\n     * HTML Attribute: autofocus\n     */\n    this.hideStep = false;\n    /**\n     * Amount to increment or decrement the value by\n     * @public\n     * @remarks\n     * HTMLAttribute: step\n     */\n    this.step = 1;\n    /**\n     * Flag to indicate that the value change is from the user input\n     * @internal\n     */\n    this.isUserInput = false;\n  }\n  /**\n   * Ensures that the max is greater than the min and that the value\n   *  is less than the max\n   * @param previous - the previous max value\n   * @param next - updated max value\n   *\n   * @internal\n   */\n  maxChanged(previous, next) {\n    var _a;\n    this.max = Math.max(next, (_a = this.min) !== null && _a !== void 0 ? _a : next);\n    const min = Math.min(this.min, this.max);\n    if (this.min !== undefined && this.min !== min) {\n      this.min = min;\n    }\n    this.value = this.getValidValue(this.value);\n  }\n  /**\n   * Ensures that the min is less than the max and that the value\n   *  is greater than the min\n   * @param previous - previous min value\n   * @param next - updated min value\n   *\n   * @internal\n   */\n  minChanged(previous, next) {\n    var _a;\n    this.min = Math.min(next, (_a = this.max) !== null && _a !== void 0 ? _a : next);\n    const max = Math.max(this.min, this.max);\n    if (this.max !== undefined && this.max !== max) {\n      this.max = max;\n    }\n    this.value = this.getValidValue(this.value);\n  }\n  /**\n   * The value property, typed as a number.\n   *\n   * @public\n   */\n  get valueAsNumber() {\n    return parseFloat(super.value);\n  }\n  set valueAsNumber(next) {\n    this.value = next.toString();\n  }\n  /**\n   * Validates that the value is a number between the min and max\n   * @param previous - previous stored value\n   * @param next - value being updated\n   * @param updateControl - should the text field be updated with value, defaults to true\n   * @internal\n   */\n  valueChanged(previous, next) {\n    this.value = this.getValidValue(next);\n    if (next !== this.value) {\n      return;\n    }\n    if (this.control && !this.isUserInput) {\n      this.control.value = this.value;\n    }\n    super.valueChanged(previous, this.value);\n    if (previous !== undefined && !this.isUserInput) {\n      this.$emit(\"input\");\n      this.$emit(\"change\");\n    }\n    this.isUserInput = false;\n  }\n  /** {@inheritDoc (FormAssociated:interface).validate} */\n  validate() {\n    super.validate(this.control);\n  }\n  /**\n   * Sets the internal value to a valid number between the min and max properties\n   * @param value - user input\n   *\n   * @internal\n   */\n  getValidValue(value) {\n    var _a, _b;\n    let validValue = parseFloat(parseFloat(value).toPrecision(12));\n    if (isNaN(validValue)) {\n      validValue = \"\";\n    } else {\n      validValue = Math.min(validValue, (_a = this.max) !== null && _a !== void 0 ? _a : validValue);\n      validValue = Math.max(validValue, (_b = this.min) !== null && _b !== void 0 ? _b : validValue).toString();\n    }\n    return validValue;\n  }\n  /**\n   * Increments the value using the step value\n   *\n   * @public\n   */\n  stepUp() {\n    const value = parseFloat(this.value);\n    const stepUpValue = !isNaN(value) ? value + this.step : this.min > 0 ? this.min : this.max < 0 ? this.max : !this.min ? this.step : 0;\n    this.value = stepUpValue.toString();\n  }\n  /**\n   * Decrements the value using the step value\n   *\n   * @public\n   */\n  stepDown() {\n    const value = parseFloat(this.value);\n    const stepDownValue = !isNaN(value) ? value - this.step : this.min > 0 ? this.min : this.max < 0 ? this.max : !this.min ? 0 - this.step : 0;\n    this.value = stepDownValue.toString();\n  }\n  /**\n   * Sets up the initial state of the number field\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    this.proxy.setAttribute(\"type\", \"number\");\n    this.validate();\n    this.control.value = this.value;\n    if (this.autofocus) {\n      DOM.queueUpdate(() => {\n        this.focus();\n      });\n    }\n  }\n  /**\n   * Selects all the text in the number field\n   *\n   * @public\n   */\n  select() {\n    this.control.select();\n    /**\n     * The select event does not permeate the shadow DOM boundary.\n     * This fn effectively proxies the select event,\n     * emitting a `select` event whenever the internal\n     * control emits a `select` event\n     */\n    this.$emit(\"select\");\n  }\n  /**\n   * Handles the internal control's `input` event\n   * @internal\n   */\n  handleTextInput() {\n    this.control.value = this.control.value.replace(/[^0-9\\-+e.]/g, \"\");\n    this.isUserInput = true;\n    this.value = this.control.value;\n  }\n  /**\n   * Change event handler for inner control.\n   * @remarks\n   * \"Change\" events are not `composable` so they will not\n   * permeate the shadow DOM boundary. This fn effectively proxies\n   * the change event, emitting a `change` event whenever the internal\n   * control emits a `change` event\n   * @internal\n   */\n  handleChange() {\n    this.$emit(\"change\");\n  }\n  /**\n   * Handles the internal control's `keydown` event\n   * @internal\n   */\n  handleKeyDown(e) {\n    const key = e.key;\n    switch (key) {\n      case keyArrowUp:\n        this.stepUp();\n        return false;\n      case keyArrowDown:\n        this.stepDown();\n        return false;\n    }\n    return true;\n  }\n  /**\n   * Handles populating the input field with a validated value when\n   *  leaving the input field.\n   * @internal\n   */\n  handleBlur() {\n    this.control.value = this.value;\n  }\n}\n__decorate$1([attr({\n  attribute: \"readonly\",\n  mode: \"boolean\"\n})], NumberField$1.prototype, \"readOnly\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], NumberField$1.prototype, \"autofocus\", void 0);\n__decorate$1([attr({\n  attribute: \"hide-step\",\n  mode: \"boolean\"\n})], NumberField$1.prototype, \"hideStep\", void 0);\n__decorate$1([attr], NumberField$1.prototype, \"placeholder\", void 0);\n__decorate$1([attr], NumberField$1.prototype, \"list\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], NumberField$1.prototype, \"maxlength\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], NumberField$1.prototype, \"minlength\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], NumberField$1.prototype, \"size\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], NumberField$1.prototype, \"step\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], NumberField$1.prototype, \"max\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], NumberField$1.prototype, \"min\", void 0);\n__decorate$1([observable], NumberField$1.prototype, \"defaultSlottedNodes\", void 0);\napplyMixins(NumberField$1, StartEnd, DelegatesARIATextbox);\n\nconst progressSegments = 44;\n/**\n * The template for the {@link @microsoft/fast-foundation#BaseProgress} component.\n * @public\n */\nconst progressRingTemplate = (context, definition) => html`<template role=\"progressbar\" aria-valuenow=\"${x => x.value}\" aria-valuemin=\"${x => x.min}\" aria-valuemax=\"${x => x.max}\" class=\"${x => x.paused ? \"paused\" : \"\"}\">${when(x => typeof x.value === \"number\", html`<svg class=\"progress\" part=\"progress\" viewBox=\"0 0 16 16\" slot=\"determinate\"><circle class=\"background\" part=\"background\" cx=\"8px\" cy=\"8px\" r=\"7px\"></circle><circle class=\"determinate\" part=\"determinate\" style=\"stroke-dasharray: ${x => progressSegments * x.percentComplete / 100}px ${progressSegments}px\" cx=\"8px\" cy=\"8px\" r=\"7px\"></circle></svg>`, html`<slot name=\"indeterminate\" slot=\"indeterminate\">${definition.indeterminateIndicator || \"\"}</slot>`)}</template>`;\n\n/**\n * An Progress HTML Element.\n * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#progressbar | ARIA progressbar }.\n *\n * @slot indeterminate - The slot for a custom indeterminate indicator\n * @csspart progress - Represents the progress element\n * @csspart determinate - The determinate indicator\n * @csspart indeterminate - The indeterminate indicator\n *\n * @public\n */\nclass BaseProgress extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * Indicates progress in %\n     * @internal\n     */\n    this.percentComplete = 0;\n  }\n  valueChanged() {\n    if (this.$fastController.isConnected) {\n      this.updatePercentComplete();\n    }\n  }\n  minChanged() {\n    if (this.$fastController.isConnected) {\n      this.updatePercentComplete();\n    }\n  }\n  maxChanged() {\n    if (this.$fastController.isConnected) {\n      this.updatePercentComplete();\n    }\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    this.updatePercentComplete();\n  }\n  updatePercentComplete() {\n    const min = typeof this.min === \"number\" ? this.min : 0;\n    const max = typeof this.max === \"number\" ? this.max : 100;\n    const value = typeof this.value === \"number\" ? this.value : 0;\n    const range = max - min;\n    this.percentComplete = range === 0 ? 0 : Math.fround((value - min) / range * 100);\n  }\n}\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], BaseProgress.prototype, \"value\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], BaseProgress.prototype, \"min\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], BaseProgress.prototype, \"max\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], BaseProgress.prototype, \"paused\", void 0);\n__decorate$1([observable], BaseProgress.prototype, \"percentComplete\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#BaseProgress} component.\n * @public\n */\nconst progressTemplate = (context, defintion) => html`<template role=\"progressbar\" aria-valuenow=\"${x => x.value}\" aria-valuemin=\"${x => x.min}\" aria-valuemax=\"${x => x.max}\" class=\"${x => x.paused ? \"paused\" : \"\"}\">${when(x => typeof x.value === \"number\", html`<div class=\"progress\" part=\"progress\" slot=\"determinate\"><div class=\"determinate\" part=\"determinate\" style=\"width: ${x => x.percentComplete}%\"></div></div>`, html`<div class=\"progress\" part=\"progress\" slot=\"indeterminate\"><slot class=\"indeterminate\" name=\"indeterminate\">${defintion.indeterminateIndicator1 || \"\"} ${defintion.indeterminateIndicator2 || \"\"}</slot></div>`)}</template>`;\n\n/**\n * The template for the {@link @microsoft/fast-foundation#RadioGroup} component.\n * @public\n */\nconst radioGroupTemplate = (context, definition) => html`<template role=\"radiogroup\" aria-disabled=\"${x => x.disabled}\" aria-readonly=\"${x => x.readOnly}\" @click=\"${(x, c) => x.clickHandler(c.event)}\" @keydown=\"${(x, c) => x.keydownHandler(c.event)}\" @focusout=\"${(x, c) => x.focusOutHandler(c.event)}\"><slot name=\"label\"></slot><div class=\"positioning-region ${x => x.orientation === Orientation.horizontal ? \"horizontal\" : \"vertical\"}\" part=\"positioning-region\"><slot ${slotted({\n  property: \"slottedRadioButtons\",\n  filter: elements(\"[role=radio]\")\n})}></slot></div></template>`;\n\n/**\n * An Radio Group Custom HTML Element.\n * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#radiogroup | ARIA radiogroup }.\n *\n * @slot label - The slot for the label\n * @slot - The default slot for radio buttons\n * @csspart positioning-region - The positioning region for laying out the radios\n * @fires change - Fires a custom 'change' event when the value changes\n *\n * @public\n */\nclass RadioGroup extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * The orientation of the group\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: orientation\n     */\n    this.orientation = Orientation.horizontal;\n    this.radioChangeHandler = e => {\n      const changedRadio = e.target;\n      if (changedRadio.checked) {\n        this.slottedRadioButtons.forEach(radio => {\n          if (radio !== changedRadio) {\n            radio.checked = false;\n            if (!this.isInsideFoundationToolbar) {\n              radio.setAttribute(\"tabindex\", \"-1\");\n            }\n          }\n        });\n        this.selectedRadio = changedRadio;\n        this.value = changedRadio.value;\n        changedRadio.setAttribute(\"tabindex\", \"0\");\n        this.focusedRadio = changedRadio;\n      }\n      e.stopPropagation();\n    };\n    this.moveToRadioByIndex = (group, index) => {\n      const radio = group[index];\n      if (!this.isInsideToolbar) {\n        radio.setAttribute(\"tabindex\", \"0\");\n        if (radio.readOnly) {\n          this.slottedRadioButtons.forEach(nextRadio => {\n            if (nextRadio !== radio) {\n              nextRadio.setAttribute(\"tabindex\", \"-1\");\n            }\n          });\n        } else {\n          radio.checked = true;\n          this.selectedRadio = radio;\n        }\n      }\n      this.focusedRadio = radio;\n      radio.focus();\n    };\n    this.moveRightOffGroup = () => {\n      var _a;\n      (_a = this.nextElementSibling) === null || _a === void 0 ? void 0 : _a.focus();\n    };\n    this.moveLeftOffGroup = () => {\n      var _a;\n      (_a = this.previousElementSibling) === null || _a === void 0 ? void 0 : _a.focus();\n    };\n    /**\n     * @internal\n     */\n    this.focusOutHandler = e => {\n      const group = this.slottedRadioButtons;\n      const radio = e.target;\n      const index = radio !== null ? group.indexOf(radio) : 0;\n      const focusedIndex = this.focusedRadio ? group.indexOf(this.focusedRadio) : -1;\n      if (focusedIndex === 0 && index === focusedIndex || focusedIndex === group.length - 1 && focusedIndex === index) {\n        if (!this.selectedRadio) {\n          this.focusedRadio = group[0];\n          this.focusedRadio.setAttribute(\"tabindex\", \"0\");\n          group.forEach(nextRadio => {\n            if (nextRadio !== this.focusedRadio) {\n              nextRadio.setAttribute(\"tabindex\", \"-1\");\n            }\n          });\n        } else {\n          this.focusedRadio = this.selectedRadio;\n          if (!this.isInsideFoundationToolbar) {\n            this.selectedRadio.setAttribute(\"tabindex\", \"0\");\n            group.forEach(nextRadio => {\n              if (nextRadio !== this.selectedRadio) {\n                nextRadio.setAttribute(\"tabindex\", \"-1\");\n              }\n            });\n          }\n        }\n      }\n      return true;\n    };\n    /**\n     * @internal\n     */\n    this.clickHandler = e => {\n      const radio = e.target;\n      if (radio) {\n        const group = this.slottedRadioButtons;\n        if (radio.checked || group.indexOf(radio) === 0) {\n          radio.setAttribute(\"tabindex\", \"0\");\n          this.selectedRadio = radio;\n        } else {\n          radio.setAttribute(\"tabindex\", \"-1\");\n          this.selectedRadio = null;\n        }\n        this.focusedRadio = radio;\n      }\n      e.preventDefault();\n    };\n    this.shouldMoveOffGroupToTheRight = (index, group, key) => {\n      return index === group.length && this.isInsideToolbar && key === keyArrowRight;\n    };\n    this.shouldMoveOffGroupToTheLeft = (group, key) => {\n      const index = this.focusedRadio ? group.indexOf(this.focusedRadio) - 1 : 0;\n      return index < 0 && this.isInsideToolbar && key === keyArrowLeft;\n    };\n    this.checkFocusedRadio = () => {\n      if (this.focusedRadio !== null && !this.focusedRadio.readOnly && !this.focusedRadio.checked) {\n        this.focusedRadio.checked = true;\n        this.focusedRadio.setAttribute(\"tabindex\", \"0\");\n        this.focusedRadio.focus();\n        this.selectedRadio = this.focusedRadio;\n      }\n    };\n    this.moveRight = e => {\n      const group = this.slottedRadioButtons;\n      let index = 0;\n      index = this.focusedRadio ? group.indexOf(this.focusedRadio) + 1 : 1;\n      if (this.shouldMoveOffGroupToTheRight(index, group, e.key)) {\n        this.moveRightOffGroup();\n        return;\n      } else if (index === group.length) {\n        index = 0;\n      }\n      /* looping to get to next radio that is not disabled */\n      /* matching native radio/radiogroup which does not select an item if there is only 1 in the group */\n      while (index < group.length && group.length > 1) {\n        if (!group[index].disabled) {\n          this.moveToRadioByIndex(group, index);\n          break;\n        } else if (this.focusedRadio && index === group.indexOf(this.focusedRadio)) {\n          break;\n        } else if (index + 1 >= group.length) {\n          if (this.isInsideToolbar) {\n            break;\n          } else {\n            index = 0;\n          }\n        } else {\n          index += 1;\n        }\n      }\n    };\n    this.moveLeft = e => {\n      const group = this.slottedRadioButtons;\n      let index = 0;\n      index = this.focusedRadio ? group.indexOf(this.focusedRadio) - 1 : 0;\n      index = index < 0 ? group.length - 1 : index;\n      if (this.shouldMoveOffGroupToTheLeft(group, e.key)) {\n        this.moveLeftOffGroup();\n        return;\n      }\n      /* looping to get to next radio that is not disabled */\n      while (index >= 0 && group.length > 1) {\n        if (!group[index].disabled) {\n          this.moveToRadioByIndex(group, index);\n          break;\n        } else if (this.focusedRadio && index === group.indexOf(this.focusedRadio)) {\n          break;\n        } else if (index - 1 < 0) {\n          index = group.length - 1;\n        } else {\n          index -= 1;\n        }\n      }\n    };\n    /**\n     * keyboard handling per https://w3c.github.io/aria-practices/#for-radio-groups-not-contained-in-a-toolbar\n     * navigation is different when there is an ancestor with role='toolbar'\n     *\n     * @internal\n     */\n    this.keydownHandler = e => {\n      const key = e.key;\n      if (key in ArrowKeys && this.isInsideFoundationToolbar) {\n        return true;\n      }\n      switch (key) {\n        case keyEnter:\n          {\n            this.checkFocusedRadio();\n            break;\n          }\n        case keyArrowRight:\n        case keyArrowDown:\n          {\n            if (this.direction === Direction.ltr) {\n              this.moveRight(e);\n            } else {\n              this.moveLeft(e);\n            }\n            break;\n          }\n        case keyArrowLeft:\n        case keyArrowUp:\n          {\n            if (this.direction === Direction.ltr) {\n              this.moveLeft(e);\n            } else {\n              this.moveRight(e);\n            }\n            break;\n          }\n        default:\n          {\n            return true;\n          }\n      }\n    };\n  }\n  readOnlyChanged() {\n    if (this.slottedRadioButtons !== undefined) {\n      this.slottedRadioButtons.forEach(radio => {\n        if (this.readOnly) {\n          radio.readOnly = true;\n        } else {\n          radio.readOnly = false;\n        }\n      });\n    }\n  }\n  disabledChanged() {\n    if (this.slottedRadioButtons !== undefined) {\n      this.slottedRadioButtons.forEach(radio => {\n        if (this.disabled) {\n          radio.disabled = true;\n        } else {\n          radio.disabled = false;\n        }\n      });\n    }\n  }\n  nameChanged() {\n    if (this.slottedRadioButtons) {\n      this.slottedRadioButtons.forEach(radio => {\n        radio.setAttribute(\"name\", this.name);\n      });\n    }\n  }\n  valueChanged() {\n    if (this.slottedRadioButtons) {\n      this.slottedRadioButtons.forEach(radio => {\n        if (radio.value === this.value) {\n          radio.checked = true;\n          this.selectedRadio = radio;\n        }\n      });\n    }\n    this.$emit(\"change\");\n  }\n  slottedRadioButtonsChanged(oldValue, newValue) {\n    if (this.slottedRadioButtons && this.slottedRadioButtons.length > 0) {\n      this.setupRadioButtons();\n    }\n  }\n  get parentToolbar() {\n    return this.closest('[role=\"toolbar\"]');\n  }\n  get isInsideToolbar() {\n    var _a;\n    return (_a = this.parentToolbar) !== null && _a !== void 0 ? _a : false;\n  }\n  get isInsideFoundationToolbar() {\n    var _a;\n    return !!((_a = this.parentToolbar) === null || _a === void 0 ? void 0 : _a[\"$fastController\"]);\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    this.direction = getDirection(this);\n    this.setupRadioButtons();\n  }\n  disconnectedCallback() {\n    this.slottedRadioButtons.forEach(radio => {\n      radio.removeEventListener(\"change\", this.radioChangeHandler);\n    });\n  }\n  setupRadioButtons() {\n    const checkedRadios = this.slottedRadioButtons.filter(radio => {\n      return radio.hasAttribute(\"checked\");\n    });\n    const numberOfCheckedRadios = checkedRadios ? checkedRadios.length : 0;\n    if (numberOfCheckedRadios > 1) {\n      const lastCheckedRadio = checkedRadios[numberOfCheckedRadios - 1];\n      lastCheckedRadio.checked = true;\n    }\n    let foundMatchingVal = false;\n    this.slottedRadioButtons.forEach(radio => {\n      if (this.name !== undefined) {\n        radio.setAttribute(\"name\", this.name);\n      }\n      if (this.disabled) {\n        radio.disabled = true;\n      }\n      if (this.readOnly) {\n        radio.readOnly = true;\n      }\n      if (this.value && this.value === radio.value) {\n        this.selectedRadio = radio;\n        this.focusedRadio = radio;\n        radio.checked = true;\n        radio.setAttribute(\"tabindex\", \"0\");\n        foundMatchingVal = true;\n      } else {\n        if (!this.isInsideFoundationToolbar) {\n          radio.setAttribute(\"tabindex\", \"-1\");\n        }\n        radio.checked = false;\n      }\n      radio.addEventListener(\"change\", this.radioChangeHandler);\n    });\n    if (this.value === undefined && this.slottedRadioButtons.length > 0) {\n      const checkedRadios = this.slottedRadioButtons.filter(radio => {\n        return radio.hasAttribute(\"checked\");\n      });\n      const numberOfCheckedRadios = checkedRadios !== null ? checkedRadios.length : 0;\n      if (numberOfCheckedRadios > 0 && !foundMatchingVal) {\n        const lastCheckedRadio = checkedRadios[numberOfCheckedRadios - 1];\n        lastCheckedRadio.checked = true;\n        this.focusedRadio = lastCheckedRadio;\n        lastCheckedRadio.setAttribute(\"tabindex\", \"0\");\n      } else {\n        this.slottedRadioButtons[0].setAttribute(\"tabindex\", \"0\");\n        this.focusedRadio = this.slottedRadioButtons[0];\n      }\n    }\n  }\n}\n__decorate$1([attr({\n  attribute: \"readonly\",\n  mode: \"boolean\"\n})], RadioGroup.prototype, \"readOnly\", void 0);\n__decorate$1([attr({\n  attribute: \"disabled\",\n  mode: \"boolean\"\n})], RadioGroup.prototype, \"disabled\", void 0);\n__decorate$1([attr], RadioGroup.prototype, \"name\", void 0);\n__decorate$1([attr], RadioGroup.prototype, \"value\", void 0);\n__decorate$1([attr], RadioGroup.prototype, \"orientation\", void 0);\n__decorate$1([observable], RadioGroup.prototype, \"childItems\", void 0);\n__decorate$1([observable], RadioGroup.prototype, \"slottedRadioButtons\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(Radio:class)} component.\n * @public\n */\nconst radioTemplate = (context, definition) => html`<template role=\"radio\" class=\"${x => x.checked ? \"checked\" : \"\"} ${x => x.readOnly ? \"readonly\" : \"\"}\" aria-checked=\"${x => x.checked}\" aria-required=\"${x => x.required}\" aria-disabled=\"${x => x.disabled}\" aria-readonly=\"${x => x.readOnly}\" @keypress=\"${(x, c) => x.keypressHandler(c.event)}\" @click=\"${(x, c) => x.clickHandler(c.event)}\"><div part=\"control\" class=\"control\"><slot name=\"checked-indicator\">${definition.checkedIndicator || \"\"}</slot></div><label part=\"label\" class=\"${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length ? \"label\" : \"label label__hidden\"}\"><slot ${slotted(\"defaultSlottedNodes\")}></slot></label></template>`;\n\nclass _Radio extends FoundationElement {}\n/**\n * A form-associated base class for the {@link @microsoft/fast-foundation#(Radio:class)} component.\n *\n * @internal\n */\nclass FormAssociatedRadio extends CheckableFormAssociated(_Radio) {\n  constructor() {\n    super(...arguments);\n    this.proxy = document.createElement(\"input\");\n  }\n}\n\n/**\n * A Radio Custom HTML Element.\n * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#radio | ARIA radio }.\n *\n * @slot checked-indicator - The checked indicator\n * @slot - The default slot for the label\n * @csspart control - The element representing the visual radio control\n * @csspart label - The label\n * @fires change - Emits a custom change event when the checked state changes\n *\n * @public\n */\nclass Radio extends FormAssociatedRadio {\n  constructor() {\n    super();\n    /**\n     * The element's value to be included in form submission when checked.\n     * Default to \"on\" to reach parity with input[type=\"radio\"]\n     *\n     * @internal\n     */\n    this.initialValue = \"on\";\n    /**\n     * @internal\n     */\n    this.keypressHandler = e => {\n      switch (e.key) {\n        case keySpace:\n          if (!this.checked && !this.readOnly) {\n            this.checked = true;\n          }\n          return;\n      }\n      return true;\n    };\n    this.proxy.setAttribute(\"type\", \"radio\");\n  }\n  readOnlyChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.readOnly = this.readOnly;\n    }\n  }\n  /**\n   * @internal\n   */\n  defaultCheckedChanged() {\n    var _a;\n    if (this.$fastController.isConnected && !this.dirtyChecked) {\n      // Setting this.checked will cause us to enter a dirty state,\n      // but if we are clean when defaultChecked is changed, we want to stay\n      // in a clean state, so reset this.dirtyChecked\n      if (!this.isInsideRadioGroup()) {\n        this.checked = (_a = this.defaultChecked) !== null && _a !== void 0 ? _a : false;\n        this.dirtyChecked = false;\n      }\n    }\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    var _a, _b;\n    super.connectedCallback();\n    this.validate();\n    if (((_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.getAttribute(\"role\")) !== \"radiogroup\" && this.getAttribute(\"tabindex\") === null) {\n      if (!this.disabled) {\n        this.setAttribute(\"tabindex\", \"0\");\n      }\n    }\n    if (this.checkedAttribute) {\n      if (!this.dirtyChecked) {\n        // Setting this.checked will cause us to enter a dirty state,\n        // but if we are clean when defaultChecked is changed, we want to stay\n        // in a clean state, so reset this.dirtyChecked\n        if (!this.isInsideRadioGroup()) {\n          this.checked = (_b = this.defaultChecked) !== null && _b !== void 0 ? _b : false;\n          this.dirtyChecked = false;\n        }\n      }\n    }\n  }\n  isInsideRadioGroup() {\n    const parent = this.closest(\"[role=radiogroup]\");\n    return parent !== null;\n  }\n  /**\n   * @internal\n   */\n  clickHandler(e) {\n    if (!this.disabled && !this.readOnly && !this.checked) {\n      this.checked = true;\n    }\n  }\n}\n__decorate$1([attr({\n  attribute: \"readonly\",\n  mode: \"boolean\"\n})], Radio.prototype, \"readOnly\", void 0);\n__decorate$1([observable], Radio.prototype, \"name\", void 0);\n__decorate$1([observable], Radio.prototype, \"defaultSlottedNodes\", void 0);\n\n/**\n * A HorizontalScroll Custom HTML Element\n *\n * @slot start - Content which can be provided before the scroll area\n * @slot end - Content which can be provided after the scroll area\n * @csspart scroll-area - Wraps the entire scrollable region\n * @csspart scroll-view - The visible scroll area\n * @csspart content-container - The container for the content\n * @csspart scroll-prev - The previous flipper container\n * @csspart scroll-action-previous - The element wrapping the previous flipper\n * @csspart scroll-next - The next flipper container\n * @csspart scroll-action-next - The element wrapping the next flipper\n * @fires scrollstart - Fires a custom 'scrollstart' event when scrolling\n * @fires scrollend - Fires a custom 'scrollend' event when scrolling stops\n *\n * @public\n */\nclass HorizontalScroll$1 extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * @internal\n     */\n    this.framesPerSecond = 60;\n    /**\n     * Flag indicating that the items are being updated\n     *\n     * @internal\n     */\n    this.updatingItems = false;\n    /**\n     * Speed of scroll in pixels per second\n     * @public\n     */\n    this.speed = 600;\n    /**\n     * Attribute used for easing, defaults to ease-in-out\n     * @public\n     */\n    this.easing = \"ease-in-out\";\n    /**\n     * Attribute to hide flippers from assistive technology\n     * @public\n     */\n    this.flippersHiddenFromAT = false;\n    /**\n     * Scrolling state\n     * @internal\n     */\n    this.scrolling = false;\n    /**\n     * Detects if the component has been resized\n     * @internal\n     */\n    this.resizeDetector = null;\n  }\n  /**\n   * The calculated duration for a frame.\n   *\n   * @internal\n   */\n  get frameTime() {\n    return 1000 / this.framesPerSecond;\n  }\n  /**\n   * Firing scrollstart and scrollend events\n   * @internal\n   */\n  scrollingChanged(prev, next) {\n    if (this.scrollContainer) {\n      const event = this.scrolling == true ? \"scrollstart\" : \"scrollend\";\n      this.$emit(event, this.scrollContainer.scrollLeft);\n    }\n  }\n  /**\n   * In RTL mode\n   * @internal\n   */\n  get isRtl() {\n    return this.scrollItems.length > 1 && this.scrollItems[0].offsetLeft > this.scrollItems[1].offsetLeft;\n  }\n  connectedCallback() {\n    super.connectedCallback();\n    this.initializeResizeDetector();\n  }\n  disconnectedCallback() {\n    this.disconnectResizeDetector();\n    super.disconnectedCallback();\n  }\n  /**\n   * Updates scroll stops and flippers when scroll items change\n   * @param previous - current scroll items\n   * @param next - new updated scroll items\n   * @public\n   */\n  scrollItemsChanged(previous, next) {\n    if (next && !this.updatingItems) {\n      DOM.queueUpdate(() => this.setStops());\n    }\n  }\n  /**\n   * destroys the instance's resize observer\n   * @internal\n   */\n  disconnectResizeDetector() {\n    if (this.resizeDetector) {\n      this.resizeDetector.disconnect();\n      this.resizeDetector = null;\n    }\n  }\n  /**\n   * initializes the instance's resize observer\n   * @internal\n   */\n  initializeResizeDetector() {\n    this.disconnectResizeDetector();\n    this.resizeDetector = new window.ResizeObserver(this.resized.bind(this));\n    this.resizeDetector.observe(this);\n  }\n  /**\n   * Looks for slots and uses child nodes instead\n   * @internal\n   */\n  updateScrollStops() {\n    this.updatingItems = true;\n    const updatedItems = this.scrollItems.reduce((scrollItems, scrollItem) => {\n      if (scrollItem instanceof HTMLSlotElement) {\n        return scrollItems.concat(scrollItem.assignedElements());\n      }\n      scrollItems.push(scrollItem);\n      return scrollItems;\n    }, []);\n    this.scrollItems = updatedItems;\n    this.updatingItems = false;\n  }\n  /**\n   * Finds all of the scroll stops between elements\n   * @internal\n   */\n  setStops() {\n    this.updateScrollStops();\n    const {\n      scrollContainer: container\n    } = this;\n    const {\n      scrollLeft\n    } = container;\n    const {\n      width: containerWidth,\n      left: containerLeft\n    } = container.getBoundingClientRect();\n    this.width = containerWidth;\n    let lastStop = 0;\n    let stops = this.scrollItems.map((item, index) => {\n      const {\n        left,\n        width\n      } = item.getBoundingClientRect();\n      const leftPosition = Math.round(left + scrollLeft - containerLeft);\n      const right = Math.round(leftPosition + width);\n      if (this.isRtl) {\n        return -right;\n      }\n      lastStop = right;\n      return index === 0 ? 0 : leftPosition;\n    }).concat(lastStop);\n    /* Fixes a FireFox bug where it doesn't scroll to the start */\n    stops = this.fixScrollMisalign(stops);\n    /* Sort to zero */\n    stops.sort((a, b) => Math.abs(a) - Math.abs(b));\n    this.scrollStops = stops;\n    this.setFlippers();\n  }\n  /**\n   * Checks to see if the stops are returning values\n   *  otherwise it will try to reinitialize them\n   *\n   * @returns boolean indicating that current scrollStops are valid non-zero values\n   * @internal\n   */\n  validateStops(reinit = true) {\n    const hasStops = () => !!this.scrollStops.find(stop => stop > 0);\n    if (!hasStops() && reinit) {\n      this.setStops();\n    }\n    return hasStops();\n  }\n  /**\n   *\n   */\n  fixScrollMisalign(stops) {\n    if (this.isRtl && stops.some(stop => stop > 0)) {\n      stops.sort((a, b) => b - a);\n      const offset = stops[0];\n      stops = stops.map(stop => stop - offset);\n    }\n    return stops;\n  }\n  /**\n   * Sets the controls view if enabled\n   * @internal\n   */\n  setFlippers() {\n    var _a, _b;\n    const position = this.scrollContainer.scrollLeft;\n    (_a = this.previousFlipperContainer) === null || _a === void 0 ? void 0 : _a.classList.toggle(\"disabled\", position === 0);\n    if (this.scrollStops) {\n      const lastStop = Math.abs(this.scrollStops[this.scrollStops.length - 1]);\n      (_b = this.nextFlipperContainer) === null || _b === void 0 ? void 0 : _b.classList.toggle(\"disabled\", this.validateStops(false) && Math.abs(position) + this.width >= lastStop);\n    }\n  }\n  /**\n   * Function that can scroll an item into view.\n   * @param item - An item index, a scroll item or a child of one of the scroll items\n   * @param padding - Padding of the viewport where the active item shouldn't be\n   * @param rightPadding - Optional right padding. Uses the padding if not defined\n   *\n   * @public\n   */\n  scrollInView(item, padding = 0, rightPadding) {\n    var _a;\n    if (typeof item !== \"number\" && item) {\n      item = this.scrollItems.findIndex(scrollItem => scrollItem === item || scrollItem.contains(item));\n    }\n    if (item !== undefined) {\n      rightPadding = rightPadding !== null && rightPadding !== void 0 ? rightPadding : padding;\n      const {\n        scrollContainer: container,\n        scrollStops,\n        scrollItems: items\n      } = this;\n      const {\n        scrollLeft\n      } = this.scrollContainer;\n      const {\n        width: containerWidth\n      } = container.getBoundingClientRect();\n      const itemStart = scrollStops[item];\n      const {\n        width\n      } = items[item].getBoundingClientRect();\n      const itemEnd = itemStart + width;\n      const isBefore = scrollLeft + padding > itemStart;\n      if (isBefore || scrollLeft + containerWidth - rightPadding < itemEnd) {\n        const stops = [...scrollStops].sort((a, b) => isBefore ? b - a : a - b);\n        const scrollTo = (_a = stops.find(position => isBefore ? position + padding < itemStart : position + containerWidth - (rightPadding !== null && rightPadding !== void 0 ? rightPadding : 0) > itemEnd)) !== null && _a !== void 0 ? _a : 0;\n        this.scrollToPosition(scrollTo);\n      }\n    }\n  }\n  /**\n   * Lets the user arrow left and right through the horizontal scroll\n   * @param e - Keyboard event\n   * @public\n   */\n  keyupHandler(e) {\n    const key = e.key;\n    switch (key) {\n      case \"ArrowLeft\":\n        this.scrollToPrevious();\n        break;\n      case \"ArrowRight\":\n        this.scrollToNext();\n        break;\n    }\n  }\n  /**\n   * Scrolls items to the left\n   * @public\n   */\n  scrollToPrevious() {\n    this.validateStops();\n    const scrollPosition = this.scrollContainer.scrollLeft;\n    const current = this.scrollStops.findIndex((stop, index) => stop >= scrollPosition && (this.isRtl || index === this.scrollStops.length - 1 || this.scrollStops[index + 1] > scrollPosition));\n    const right = Math.abs(this.scrollStops[current + 1]);\n    let nextIndex = this.scrollStops.findIndex(stop => Math.abs(stop) + this.width > right);\n    if (nextIndex >= current || nextIndex === -1) {\n      nextIndex = current > 0 ? current - 1 : 0;\n    }\n    this.scrollToPosition(this.scrollStops[nextIndex], scrollPosition);\n  }\n  /**\n   * Scrolls items to the right\n   * @public\n   */\n  scrollToNext() {\n    this.validateStops();\n    const scrollPosition = this.scrollContainer.scrollLeft;\n    const current = this.scrollStops.findIndex(stop => Math.abs(stop) >= Math.abs(scrollPosition));\n    const outOfView = this.scrollStops.findIndex(stop => Math.abs(scrollPosition) + this.width <= Math.abs(stop));\n    let nextIndex = current;\n    if (outOfView > current + 2) {\n      nextIndex = outOfView - 2;\n    } else if (current < this.scrollStops.length - 2) {\n      nextIndex = current + 1;\n    }\n    this.scrollToPosition(this.scrollStops[nextIndex], scrollPosition);\n  }\n  /**\n   * Handles scrolling with easing\n   * @param position - starting position\n   * @param newPosition - position to scroll to\n   * @public\n   */\n  scrollToPosition(newPosition, position = this.scrollContainer.scrollLeft) {\n    var _a;\n    if (this.scrolling) {\n      return;\n    }\n    this.scrolling = true;\n    const seconds = (_a = this.duration) !== null && _a !== void 0 ? _a : `${Math.abs(newPosition - position) / this.speed}s`;\n    this.content.style.setProperty(\"transition-duration\", seconds);\n    const computedDuration = parseFloat(getComputedStyle(this.content).getPropertyValue(\"transition-duration\"));\n    const transitionendHandler = e => {\n      if (e && e.target !== e.currentTarget) {\n        return;\n      }\n      this.content.style.setProperty(\"transition-duration\", \"0s\");\n      this.content.style.removeProperty(\"transform\");\n      this.scrollContainer.style.setProperty(\"scroll-behavior\", \"auto\");\n      this.scrollContainer.scrollLeft = newPosition;\n      this.setFlippers();\n      this.content.removeEventListener(\"transitionend\", transitionendHandler);\n      this.scrolling = false;\n    };\n    if (computedDuration === 0) {\n      transitionendHandler();\n      return;\n    }\n    this.content.addEventListener(\"transitionend\", transitionendHandler);\n    const maxScrollValue = this.scrollContainer.scrollWidth - this.scrollContainer.clientWidth;\n    let transitionStop = this.scrollContainer.scrollLeft - Math.min(newPosition, maxScrollValue);\n    if (this.isRtl) {\n      transitionStop = this.scrollContainer.scrollLeft + Math.min(Math.abs(newPosition), maxScrollValue);\n    }\n    this.content.style.setProperty(\"transition-property\", \"transform\");\n    this.content.style.setProperty(\"transition-timing-function\", this.easing);\n    this.content.style.setProperty(\"transform\", `translateX(${transitionStop}px)`);\n  }\n  /**\n   * Monitors resize event on the horizontal-scroll element\n   * @public\n   */\n  resized() {\n    if (this.resizeTimeout) {\n      this.resizeTimeout = clearTimeout(this.resizeTimeout);\n    }\n    this.resizeTimeout = setTimeout(() => {\n      this.width = this.scrollContainer.offsetWidth;\n      this.setFlippers();\n    }, this.frameTime);\n  }\n  /**\n   * Monitors scrolled event on the content container\n   * @public\n   */\n  scrolled() {\n    if (this.scrollTimeout) {\n      this.scrollTimeout = clearTimeout(this.scrollTimeout);\n    }\n    this.scrollTimeout = setTimeout(() => {\n      this.setFlippers();\n    }, this.frameTime);\n  }\n}\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], HorizontalScroll$1.prototype, \"speed\", void 0);\n__decorate$1([attr], HorizontalScroll$1.prototype, \"duration\", void 0);\n__decorate$1([attr], HorizontalScroll$1.prototype, \"easing\", void 0);\n__decorate$1([attr({\n  attribute: \"flippers-hidden-from-at\",\n  converter: booleanConverter\n})], HorizontalScroll$1.prototype, \"flippersHiddenFromAT\", void 0);\n__decorate$1([observable], HorizontalScroll$1.prototype, \"scrolling\", void 0);\n__decorate$1([observable], HorizontalScroll$1.prototype, \"scrollItems\", void 0);\n__decorate$1([attr({\n  attribute: \"view\"\n})], HorizontalScroll$1.prototype, \"view\", void 0);\n\n/**\n * @public\n */\nconst horizontalScrollTemplate = (context, definition) => {\n  var _a, _b;\n  return html`<template class=\"horizontal-scroll\" @keyup=\"${(x, c) => x.keyupHandler(c.event)}\">${startSlotTemplate(context, definition)}<div class=\"scroll-area\" part=\"scroll-area\"><div class=\"scroll-view\" part=\"scroll-view\" @scroll=\"${x => x.scrolled()}\" ${ref(\"scrollContainer\")}><div class=\"content-container\" part=\"content-container\" ${ref(\"content\")}><slot ${slotted({\n    property: \"scrollItems\",\n    filter: elements()\n  })}></slot></div></div>${when(x => x.view !== \"mobile\", html`<div class=\"scroll scroll-prev\" part=\"scroll-prev\" ${ref(\"previousFlipperContainer\")}><div class=\"scroll-action\" part=\"scroll-action-previous\"><slot name=\"previous-flipper\">${definition.previousFlipper instanceof Function ? definition.previousFlipper(context, definition) : (_a = definition.previousFlipper) !== null && _a !== void 0 ? _a : \"\"}</slot></div></div><div class=\"scroll scroll-next\" part=\"scroll-next\" ${ref(\"nextFlipperContainer\")}><div class=\"scroll-action\" part=\"scroll-action-next\"><slot name=\"next-flipper\">${definition.nextFlipper instanceof Function ? definition.nextFlipper(context, definition) : (_b = definition.nextFlipper) !== null && _b !== void 0 ? _b : \"\"}</slot></div></div>`)}</div>${endSlotTemplate(context, definition)}</template>`;\n};\n\n/**\n * a method to filter out any whitespace _only_ nodes, to be used inside a template\n * @param value - The Node that is being inspected\n * @param index - The index of the node within the array\n * @param array - The Node array that is being filtered\n *\n * @public\n */\nfunction whitespaceFilter(value, index, array) {\n  return value.nodeType !== Node.TEXT_NODE ? true : typeof value.nodeValue === \"string\" && !!value.nodeValue.trim().length;\n}\n\nclass _Search extends FoundationElement {}\n/**\n * A form-associated base class for the {@link @microsoft/fast-foundation#(Search:class)} component.\n *\n * @internal\n */\nclass FormAssociatedSearch extends FormAssociated(_Search) {\n  constructor() {\n    super(...arguments);\n    this.proxy = document.createElement(\"input\");\n  }\n}\n\n/**\n * A Search Custom HTML Element.\n * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search | <input type=\"search\" /> element }.\n *\n * @slot start - Content which can be provided before the search input\n * @slot end - Content which can be provided after the search clear button\n * @slot - The default slot for the label\n * @slot close-button - The clear button\n * @slot close-glyph - The clear glyph\n * @csspart label - The label\n * @csspart root - The element wrapping the control, including start and end slots\n * @csspart control - The element representing the input\n * @csspart clear-button - The button to clear the input\n *\n * @public\n */\nclass Search$1 extends FormAssociatedSearch {\n  readOnlyChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.readOnly = this.readOnly;\n      this.validate();\n    }\n  }\n  autofocusChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.autofocus = this.autofocus;\n      this.validate();\n    }\n  }\n  placeholderChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.placeholder = this.placeholder;\n    }\n  }\n  listChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.setAttribute(\"list\", this.list);\n      this.validate();\n    }\n  }\n  maxlengthChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.maxLength = this.maxlength;\n      this.validate();\n    }\n  }\n  minlengthChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.minLength = this.minlength;\n      this.validate();\n    }\n  }\n  patternChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.pattern = this.pattern;\n      this.validate();\n    }\n  }\n  sizeChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.size = this.size;\n    }\n  }\n  spellcheckChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.spellcheck = this.spellcheck;\n    }\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    this.validate();\n    if (this.autofocus) {\n      DOM.queueUpdate(() => {\n        this.focus();\n      });\n    }\n  }\n  /** {@inheritDoc (FormAssociated:interface).validate} */\n  validate() {\n    super.validate(this.control);\n  }\n  /**\n   * Handles the internal control's `input` event\n   * @internal\n   */\n  handleTextInput() {\n    this.value = this.control.value;\n  }\n  /**\n   * Handles the control's clear value event\n   * @public\n   */\n  handleClearInput() {\n    this.value = \"\";\n    this.control.focus();\n    this.handleChange();\n  }\n  /**\n   * Change event handler for inner control.\n   * @remarks\n   * \"Change\" events are not `composable` so they will not\n   * permeate the shadow DOM boundary. This fn effectively proxies\n   * the change event, emitting a `change` event whenever the internal\n   * control emits a `change` event\n   * @internal\n   */\n  handleChange() {\n    this.$emit(\"change\");\n  }\n}\n__decorate$1([attr({\n  attribute: \"readonly\",\n  mode: \"boolean\"\n})], Search$1.prototype, \"readOnly\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Search$1.prototype, \"autofocus\", void 0);\n__decorate$1([attr], Search$1.prototype, \"placeholder\", void 0);\n__decorate$1([attr], Search$1.prototype, \"list\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], Search$1.prototype, \"maxlength\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], Search$1.prototype, \"minlength\", void 0);\n__decorate$1([attr], Search$1.prototype, \"pattern\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], Search$1.prototype, \"size\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Search$1.prototype, \"spellcheck\", void 0);\n__decorate$1([observable], Search$1.prototype, \"defaultSlottedNodes\", void 0);\n/**\n * Includes ARIA states and properties relating to the ARIA textbox role\n *\n * @public\n */\nclass DelegatesARIASearch {}\napplyMixins(DelegatesARIASearch, ARIAGlobalStatesAndProperties);\napplyMixins(Search$1, StartEnd, DelegatesARIASearch);\n\nclass _Select extends ListboxElement {}\n/**\n * A form-associated base class for the {@link @microsoft/fast-foundation#(Select:class)} component.\n *\n * @internal\n */\nclass FormAssociatedSelect extends FormAssociated(_Select) {\n  constructor() {\n    super(...arguments);\n    this.proxy = document.createElement(\"select\");\n  }\n}\n\n/**\n * A Select Custom HTML Element.\n * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#select | ARIA select }.\n *\n * @slot start - Content which can be provided before the button content\n * @slot end - Content which can be provided after the button content\n * @slot button-container - The element representing the select button\n * @slot selected-value - The selected value\n * @slot indicator - The visual indicator for the expand/collapse state of the button\n * @slot - The default slot for slotted options\n * @csspart control - The element representing the select invoking element\n * @csspart selected-value - The element wrapping the selected value\n * @csspart indicator - The element wrapping the visual indicator\n * @csspart listbox - The listbox element\n * @fires input - Fires a custom 'input' event when the value updates\n * @fires change - Fires a custom 'change' event when the value updates\n *\n * @public\n */\nclass Select$1 extends FormAssociatedSelect {\n  constructor() {\n    super(...arguments);\n    /**\n     * The open attribute.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: open\n     */\n    this.open = false;\n    /**\n     * Indicates the initial state of the position attribute.\n     *\n     * @internal\n     */\n    this.forcedPosition = false;\n    /**\n     * The unique id for the internal listbox element.\n     *\n     * @internal\n     */\n    this.listboxId = uniqueId(\"listbox-\");\n    /**\n     * The max height for the listbox when opened.\n     *\n     * @internal\n     */\n    this.maxHeight = 0;\n  }\n  /**\n   * Sets focus and synchronizes ARIA attributes when the open property changes.\n   *\n   * @param prev - the previous open value\n   * @param next - the current open value\n   *\n   * @internal\n   */\n  openChanged(prev, next) {\n    if (!this.collapsible) {\n      return;\n    }\n    if (this.open) {\n      this.ariaControls = this.listboxId;\n      this.ariaExpanded = \"true\";\n      this.setPositioning();\n      this.focusAndScrollOptionIntoView();\n      this.indexWhenOpened = this.selectedIndex;\n      // focus is directed to the element when `open` is changed programmatically\n      DOM.queueUpdate(() => this.focus());\n      return;\n    }\n    this.ariaControls = \"\";\n    this.ariaExpanded = \"false\";\n  }\n  /**\n   * The component is collapsible when in single-selection mode with no size attribute.\n   *\n   * @internal\n   */\n  get collapsible() {\n    return !(this.multiple || typeof this.size === \"number\");\n  }\n  /**\n   * The value property.\n   *\n   * @public\n   */\n  get value() {\n    Observable.track(this, \"value\");\n    return this._value;\n  }\n  set value(next) {\n    var _a, _b, _c, _d, _e, _f, _g;\n    const prev = `${this._value}`;\n    if ((_a = this._options) === null || _a === void 0 ? void 0 : _a.length) {\n      const selectedIndex = this._options.findIndex(el => el.value === next);\n      const prevSelectedValue = (_c = (_b = this._options[this.selectedIndex]) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : null;\n      const nextSelectedValue = (_e = (_d = this._options[selectedIndex]) === null || _d === void 0 ? void 0 : _d.value) !== null && _e !== void 0 ? _e : null;\n      if (selectedIndex === -1 || prevSelectedValue !== nextSelectedValue) {\n        next = \"\";\n        this.selectedIndex = selectedIndex;\n      }\n      next = (_g = (_f = this.firstSelectedOption) === null || _f === void 0 ? void 0 : _f.value) !== null && _g !== void 0 ? _g : next;\n    }\n    if (prev !== next) {\n      this._value = next;\n      super.valueChanged(prev, next);\n      Observable.notify(this, \"value\");\n      this.updateDisplayValue();\n    }\n  }\n  /**\n   * Sets the value and display value to match the first selected option.\n   *\n   * @param shouldEmit - if true, the input and change events will be emitted\n   *\n   * @internal\n   */\n  updateValue(shouldEmit) {\n    var _a, _b;\n    if (this.$fastController.isConnected) {\n      this.value = (_b = (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : \"\";\n    }\n    if (shouldEmit) {\n      this.$emit(\"input\");\n      this.$emit(\"change\", this, {\n        bubbles: true,\n        composed: undefined\n      });\n    }\n  }\n  /**\n   * Updates the proxy value when the selected index changes.\n   *\n   * @param prev - the previous selected index\n   * @param next - the next selected index\n   *\n   * @internal\n   */\n  selectedIndexChanged(prev, next) {\n    super.selectedIndexChanged(prev, next);\n    this.updateValue();\n  }\n  positionChanged(prev, next) {\n    this.positionAttribute = next;\n    this.setPositioning();\n  }\n  /**\n   * Calculate and apply listbox positioning based on available viewport space.\n   *\n   * @public\n   */\n  setPositioning() {\n    const currentBox = this.getBoundingClientRect();\n    const viewportHeight = window.innerHeight;\n    const availableBottom = viewportHeight - currentBox.bottom;\n    this.position = this.forcedPosition ? this.positionAttribute : currentBox.top > availableBottom ? SelectPosition.above : SelectPosition.below;\n    this.positionAttribute = this.forcedPosition ? this.positionAttribute : this.position;\n    this.maxHeight = this.position === SelectPosition.above ? ~~currentBox.top : ~~availableBottom;\n  }\n  /**\n   * The value displayed on the button.\n   *\n   * @public\n   */\n  get displayValue() {\n    var _a, _b;\n    Observable.track(this, \"displayValue\");\n    return (_b = (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : \"\";\n  }\n  /**\n   * Synchronize the `aria-disabled` property when the `disabled` property changes.\n   *\n   * @param prev - The previous disabled value\n   * @param next - The next disabled value\n   *\n   * @internal\n   */\n  disabledChanged(prev, next) {\n    if (super.disabledChanged) {\n      super.disabledChanged(prev, next);\n    }\n    this.ariaDisabled = this.disabled ? \"true\" : \"false\";\n  }\n  /**\n   * Reset the element to its first selectable option when its parent form is reset.\n   *\n   * @internal\n   */\n  formResetCallback() {\n    this.setProxyOptions();\n    // Call the base class's implementation setDefaultSelectedOption instead of the select's\n    // override, in order to reset the selectedIndex without using the value property.\n    super.setDefaultSelectedOption();\n    if (this.selectedIndex === -1) {\n      this.selectedIndex = 0;\n    }\n  }\n  /**\n   * Handle opening and closing the listbox when the select is clicked.\n   *\n   * @param e - the mouse event\n   * @internal\n   */\n  clickHandler(e) {\n    // do nothing if the select is disabled\n    if (this.disabled) {\n      return;\n    }\n    if (this.open) {\n      const captured = e.target.closest(`option,[role=option]`);\n      if (captured && captured.disabled) {\n        return;\n      }\n    }\n    super.clickHandler(e);\n    this.open = this.collapsible && !this.open;\n    if (!this.open && this.indexWhenOpened !== this.selectedIndex) {\n      this.updateValue(true);\n    }\n    return true;\n  }\n  /**\n   * Handles focus state when the element or its children lose focus.\n   *\n   * @param e - The focus event\n   * @internal\n   */\n  focusoutHandler(e) {\n    var _a;\n    super.focusoutHandler(e);\n    if (!this.open) {\n      return true;\n    }\n    const focusTarget = e.relatedTarget;\n    if (this.isSameNode(focusTarget)) {\n      this.focus();\n      return;\n    }\n    if (!((_a = this.options) === null || _a === void 0 ? void 0 : _a.includes(focusTarget))) {\n      this.open = false;\n      if (this.indexWhenOpened !== this.selectedIndex) {\n        this.updateValue(true);\n      }\n    }\n  }\n  /**\n   * Updates the value when an option's value changes.\n   *\n   * @param source - the source object\n   * @param propertyName - the property to evaluate\n   *\n   * @internal\n   * @override\n   */\n  handleChange(source, propertyName) {\n    super.handleChange(source, propertyName);\n    if (propertyName === \"value\") {\n      this.updateValue();\n    }\n  }\n  /**\n   * Synchronize the form-associated proxy and updates the value property of the element.\n   *\n   * @param prev - the previous collection of slotted option elements\n   * @param next - the next collection of slotted option elements\n   *\n   * @internal\n   */\n  slottedOptionsChanged(prev, next) {\n    this.options.forEach(o => {\n      const notifier = Observable.getNotifier(o);\n      notifier.unsubscribe(this, \"value\");\n    });\n    super.slottedOptionsChanged(prev, next);\n    this.options.forEach(o => {\n      const notifier = Observable.getNotifier(o);\n      notifier.subscribe(this, \"value\");\n    });\n    this.setProxyOptions();\n    this.updateValue();\n  }\n  /**\n   * Prevents focus when size is set and a scrollbar is clicked.\n   *\n   * @param e - the mouse event object\n   *\n   * @override\n   * @internal\n   */\n  mousedownHandler(e) {\n    var _a;\n    if (e.offsetX >= 0 && e.offsetX <= ((_a = this.listbox) === null || _a === void 0 ? void 0 : _a.scrollWidth)) {\n      return super.mousedownHandler(e);\n    }\n    return this.collapsible;\n  }\n  /**\n   * Sets the multiple property on the proxy element.\n   *\n   * @param prev - the previous multiple value\n   * @param next - the current multiple value\n   */\n  multipleChanged(prev, next) {\n    super.multipleChanged(prev, next);\n    if (this.proxy) {\n      this.proxy.multiple = next;\n    }\n  }\n  /**\n   * Updates the selectedness of each option when the list of selected options changes.\n   *\n   * @param prev - the previous list of selected options\n   * @param next - the current list of selected options\n   *\n   * @override\n   * @internal\n   */\n  selectedOptionsChanged(prev, next) {\n    var _a;\n    super.selectedOptionsChanged(prev, next);\n    (_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach((o, i) => {\n      var _a;\n      const proxyOption = (_a = this.proxy) === null || _a === void 0 ? void 0 : _a.options.item(i);\n      if (proxyOption) {\n        proxyOption.selected = o.selected;\n      }\n    });\n  }\n  /**\n   * Sets the selected index to match the first option with the selected attribute, or\n   * the first selectable option.\n   *\n   * @override\n   * @internal\n   */\n  setDefaultSelectedOption() {\n    var _a;\n    const options = (_a = this.options) !== null && _a !== void 0 ? _a : Array.from(this.children).filter(Listbox$1.slottedOptionFilter);\n    const selectedIndex = options === null || options === void 0 ? void 0 : options.findIndex(el => el.hasAttribute(\"selected\") || el.selected || el.value === this.value);\n    if (selectedIndex !== -1) {\n      this.selectedIndex = selectedIndex;\n      return;\n    }\n    this.selectedIndex = 0;\n  }\n  /**\n   * Resets and fills the proxy to match the component's options.\n   *\n   * @internal\n   */\n  setProxyOptions() {\n    if (this.proxy instanceof HTMLSelectElement && this.options) {\n      this.proxy.options.length = 0;\n      this.options.forEach(option => {\n        const proxyOption = option.proxy || (option instanceof HTMLOptionElement ? option.cloneNode() : null);\n        if (proxyOption) {\n          this.proxy.options.add(proxyOption);\n        }\n      });\n    }\n  }\n  /**\n   * Handle keyboard interaction for the select.\n   *\n   * @param e - the keyboard event\n   * @internal\n   */\n  keydownHandler(e) {\n    super.keydownHandler(e);\n    const key = e.key || e.key.charCodeAt(0);\n    switch (key) {\n      case keySpace:\n        {\n          e.preventDefault();\n          if (this.collapsible && this.typeAheadExpired) {\n            this.open = !this.open;\n          }\n          break;\n        }\n      case keyHome:\n      case keyEnd:\n        {\n          e.preventDefault();\n          break;\n        }\n      case keyEnter:\n        {\n          e.preventDefault();\n          this.open = !this.open;\n          break;\n        }\n      case keyEscape:\n        {\n          if (this.collapsible && this.open) {\n            e.preventDefault();\n            this.open = false;\n          }\n          break;\n        }\n      case keyTab:\n        {\n          if (this.collapsible && this.open) {\n            e.preventDefault();\n            this.open = false;\n          }\n          return true;\n        }\n    }\n    if (!this.open && this.indexWhenOpened !== this.selectedIndex) {\n      this.updateValue(true);\n      this.indexWhenOpened = this.selectedIndex;\n    }\n    return !(key === keyArrowDown || key === keyArrowUp);\n  }\n  connectedCallback() {\n    super.connectedCallback();\n    this.forcedPosition = !!this.positionAttribute;\n    this.addEventListener(\"contentchange\", this.updateDisplayValue);\n  }\n  disconnectedCallback() {\n    this.removeEventListener(\"contentchange\", this.updateDisplayValue);\n    super.disconnectedCallback();\n  }\n  /**\n   * Updates the proxy's size property when the size attribute changes.\n   *\n   * @param prev - the previous size\n   * @param next - the current size\n   *\n   * @override\n   * @internal\n   */\n  sizeChanged(prev, next) {\n    super.sizeChanged(prev, next);\n    if (this.proxy) {\n      this.proxy.size = next;\n    }\n  }\n  /**\n   *\n   * @internal\n   */\n  updateDisplayValue() {\n    if (this.collapsible) {\n      Observable.notify(this, \"displayValue\");\n    }\n  }\n}\n__decorate$1([attr({\n  attribute: \"open\",\n  mode: \"boolean\"\n})], Select$1.prototype, \"open\", void 0);\n__decorate$1([volatile], Select$1.prototype, \"collapsible\", null);\n__decorate$1([observable], Select$1.prototype, \"control\", void 0);\n__decorate$1([attr({\n  attribute: \"position\"\n})], Select$1.prototype, \"positionAttribute\", void 0);\n__decorate$1([observable], Select$1.prototype, \"position\", void 0);\n__decorate$1([observable], Select$1.prototype, \"maxHeight\", void 0);\n/**\n * Includes ARIA states and properties relating to the ARIA select role.\n *\n * @public\n */\nclass DelegatesARIASelect {}\n__decorate$1([observable], DelegatesARIASelect.prototype, \"ariaControls\", void 0);\napplyMixins(DelegatesARIASelect, DelegatesARIAListbox);\napplyMixins(Select$1, StartEnd, DelegatesARIASelect);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(Select:class)} component.\n * @public\n */\nconst selectTemplate = (context, definition) => html`<template class=\"${x => [x.collapsible && \"collapsible\", x.collapsible && x.open && \"open\", x.disabled && \"disabled\", x.collapsible && x.position].filter(Boolean).join(\" \")}\" aria-activedescendant=\"${x => x.ariaActiveDescendant}\" aria-controls=\"${x => x.ariaControls}\" aria-disabled=\"${x => x.ariaDisabled}\" aria-expanded=\"${x => x.ariaExpanded}\" aria-haspopup=\"${x => x.collapsible ? \"listbox\" : null}\" aria-multiselectable=\"${x => x.ariaMultiSelectable}\" ?open=\"${x => x.open}\" role=\"combobox\" tabindex=\"${x => !x.disabled ? \"0\" : null}\" @click=\"${(x, c) => x.clickHandler(c.event)}\" @focusin=\"${(x, c) => x.focusinHandler(c.event)}\" @focusout=\"${(x, c) => x.focusoutHandler(c.event)}\" @keydown=\"${(x, c) => x.keydownHandler(c.event)}\" @mousedown=\"${(x, c) => x.mousedownHandler(c.event)}\">${when(x => x.collapsible, html`<div class=\"control\" part=\"control\" ?disabled=\"${x => x.disabled}\" ${ref(\"control\")}>${startSlotTemplate(context, definition)}<slot name=\"button-container\"><div class=\"selected-value\" part=\"selected-value\"><slot name=\"selected-value\">${x => x.displayValue}</slot></div><div aria-hidden=\"true\" class=\"indicator\" part=\"indicator\"><slot name=\"indicator\">${definition.indicator || \"\"}</slot></div></slot>${endSlotTemplate(context, definition)}</div>`)}<div class=\"listbox\" id=\"${x => x.listboxId}\" part=\"listbox\" role=\"listbox\" ?disabled=\"${x => x.disabled}\" ?hidden=\"${x => x.collapsible ? !x.open : false}\" ${ref(\"listbox\")}><slot ${slotted({\n  filter: Listbox$1.slottedOptionFilter,\n  flatten: true,\n  property: \"slottedOptions\"\n})}></slot></div></template>`;\n\n/**\n * The template for the fast-skeleton component\n * @public\n */\nconst skeletonTemplate = (context, definition) => html`<template class=\"${x => x.shape === \"circle\" ? \"circle\" : \"rect\"}\" pattern=\"${x => x.pattern}\" ?shimmer=\"${x => x.shimmer}\">${when(x => x.shimmer === true, html`<span class=\"shimmer\"></span>`)}<object type=\"image/svg+xml\" data=\"${x => x.pattern}\" role=\"presentation\"><img class=\"pattern\" src=\"${x => x.pattern}\" /></object><slot></slot></template>`;\n\n/**\n * A Skeleton Custom HTML Element.\n *\n * @slot - The default slot\n *\n * @public\n */\nclass Skeleton extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * Indicates what the shape of the Skeleton should be.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: shape\n     */\n    this.shape = \"rect\";\n  }\n}\n__decorate$1([attr], Skeleton.prototype, \"fill\", void 0);\n__decorate$1([attr], Skeleton.prototype, \"shape\", void 0);\n__decorate$1([attr], Skeleton.prototype, \"pattern\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Skeleton.prototype, \"shimmer\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(SliderLabel:class)} component.\n * @public\n */\nconst sliderLabelTemplate = (context, definition) => html`<template aria-disabled=\"${x => x.disabled}\" class=\"${x => x.sliderOrientation || Orientation.horizontal} ${x => x.disabled ? \"disabled\" : \"\"}\"><div ${ref(\"root\")} part=\"root\" class=\"root\" style=\"${x => x.positionStyle}\"><div class=\"container\">${when(x => !x.hideMark, html`<div class=\"mark\"></div>`)}<div class=\"label\"><slot></slot></div></div></div></template>`;\n\n/**\n * Converts a pixel coordinate on the track to a percent of the track's range\n */\nfunction convertPixelToPercent(pixelPos, minPosition, maxPosition, direction) {\n  let pct = limit(0, 1, (pixelPos - minPosition) / (maxPosition - minPosition));\n  if (direction === Direction.rtl) {\n    pct = 1 - pct;\n  }\n  return pct;\n}\n\nconst defaultConfig = {\n  min: 0,\n  max: 0,\n  direction: Direction.ltr,\n  orientation: Orientation.horizontal,\n  disabled: false\n};\n/**\n * A label element intended to be used with the {@link @microsoft/fast-foundation#(Slider:class)} component.\n *\n * @slot - The default slot for the label content\n * @csspart root - The element wrapping the label mark and text\n *\n * @public\n */\nclass SliderLabel extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * Hides the tick mark.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: hide-mark\n     */\n    this.hideMark = false;\n    /**\n     * @internal\n     */\n    this.sliderDirection = Direction.ltr;\n    this.getSliderConfiguration = () => {\n      if (!this.isSliderConfig(this.parentNode)) {\n        this.sliderDirection = defaultConfig.direction || Direction.ltr;\n        this.sliderOrientation = defaultConfig.orientation ;\n        this.sliderMaxPosition = defaultConfig.max;\n        this.sliderMinPosition = defaultConfig.min;\n      } else {\n        const parentSlider = this.parentNode;\n        const {\n          min,\n          max,\n          direction,\n          orientation,\n          disabled\n        } = parentSlider;\n        if (disabled !== undefined) {\n          this.disabled = disabled;\n        }\n        this.sliderDirection = direction || Direction.ltr;\n        this.sliderOrientation = orientation || Orientation.horizontal;\n        this.sliderMaxPosition = max;\n        this.sliderMinPosition = min;\n      }\n    };\n    this.positionAsStyle = () => {\n      const direction = this.sliderDirection ? this.sliderDirection : Direction.ltr;\n      const pct = convertPixelToPercent(Number(this.position), Number(this.sliderMinPosition), Number(this.sliderMaxPosition));\n      let rightNum = Math.round((1 - pct) * 100);\n      let leftNum = Math.round(pct * 100);\n      if (Number.isNaN(leftNum) && Number.isNaN(rightNum)) {\n        rightNum = 50;\n        leftNum = 50;\n      }\n      if (this.sliderOrientation === Orientation.horizontal) {\n        return direction === Direction.rtl ? `right: ${leftNum}%; left: ${rightNum}%;` : `left: ${leftNum}%; right: ${rightNum}%;`;\n      } else {\n        return `top: ${leftNum}%; bottom: ${rightNum}%;`;\n      }\n    };\n  }\n  positionChanged() {\n    this.positionStyle = this.positionAsStyle();\n  }\n  /**\n   * @internal\n   */\n  sliderOrientationChanged() {\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    this.getSliderConfiguration();\n    this.positionStyle = this.positionAsStyle();\n    this.notifier = Observable.getNotifier(this.parentNode);\n    this.notifier.subscribe(this, \"orientation\");\n    this.notifier.subscribe(this, \"direction\");\n    this.notifier.subscribe(this, \"max\");\n    this.notifier.subscribe(this, \"min\");\n  }\n  /**\n   * @internal\n   */\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    this.notifier.unsubscribe(this, \"orientation\");\n    this.notifier.unsubscribe(this, \"direction\");\n    this.notifier.unsubscribe(this, \"max\");\n    this.notifier.unsubscribe(this, \"min\");\n  }\n  /**\n   * @internal\n   */\n  handleChange(source, propertyName) {\n    switch (propertyName) {\n      case \"direction\":\n        this.sliderDirection = source.direction;\n        break;\n      case \"orientation\":\n        this.sliderOrientation = source.orientation;\n        break;\n      case \"max\":\n        this.sliderMaxPosition = source.max;\n        break;\n      case \"min\":\n        this.sliderMinPosition = source.min;\n        break;\n    }\n    this.positionStyle = this.positionAsStyle();\n  }\n  isSliderConfig(node) {\n    return node.max !== undefined && node.min !== undefined;\n  }\n}\n__decorate$1([observable], SliderLabel.prototype, \"positionStyle\", void 0);\n__decorate$1([attr], SliderLabel.prototype, \"position\", void 0);\n__decorate$1([attr({\n  attribute: \"hide-mark\",\n  mode: \"boolean\"\n})], SliderLabel.prototype, \"hideMark\", void 0);\n__decorate$1([attr({\n  attribute: \"disabled\",\n  mode: \"boolean\"\n})], SliderLabel.prototype, \"disabled\", void 0);\n__decorate$1([observable], SliderLabel.prototype, \"sliderOrientation\", void 0);\n__decorate$1([observable], SliderLabel.prototype, \"sliderMinPosition\", void 0);\n__decorate$1([observable], SliderLabel.prototype, \"sliderMaxPosition\", void 0);\n__decorate$1([observable], SliderLabel.prototype, \"sliderDirection\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(Slider:class)} component.\n * @public\n */\nconst sliderTemplate = (context, definition) => html`<template role=\"slider\" class=\"${x => x.readOnly ? \"readonly\" : \"\"} ${x => x.orientation || Orientation.horizontal}\" tabindex=\"${x => x.disabled ? null : 0}\" aria-valuetext=\"${x => x.valueTextFormatter(x.value)}\" aria-valuenow=\"${x => x.value}\" aria-valuemin=\"${x => x.min}\" aria-valuemax=\"${x => x.max}\" aria-disabled=\"${x => x.disabled ? true : void 0}\" aria-readonly=\"${x => x.readOnly ? true : void 0}\" aria-orientation=\"${x => x.orientation}\" class=\"${x => x.orientation}\"><div part=\"positioning-region\" class=\"positioning-region\"><div ${ref(\"track\")} part=\"track-container\" class=\"track\"><slot name=\"track\"></slot><div part=\"track-start\" class=\"track-start\" style=\"${x => x.position}\"><slot name=\"track-start\"></slot></div></div><slot></slot><div ${ref(\"thumb\")} part=\"thumb-container\" class=\"thumb-container\" style=\"${x => x.position}\"><slot name=\"thumb\">${definition.thumb || \"\"}</slot></div></div></template>`;\n\nclass _Slider extends FoundationElement {}\n/**\n * A form-associated base class for the {@link @microsoft/fast-foundation#(Slider:class)} component.\n *\n * @internal\n */\nclass FormAssociatedSlider extends FormAssociated(_Slider) {\n  constructor() {\n    super(...arguments);\n    this.proxy = document.createElement(\"input\");\n  }\n}\n\n/**\n * The selection modes of a {@link @microsoft/fast-foundation#(Slider:class)}.\n * @public\n */\nconst SliderMode = {\n  singleValue: \"single-value\"\n};\n/**\n * A Slider Custom HTML Element.\n * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#slider | ARIA slider }.\n *\n * @slot track - The track of the slider\n * @slot track-start - The track-start visual indicator\n * @slot thumb - The slider thumb\n * @slot - The default slot for labels\n * @csspart positioning-region - The region used to position the elements of the slider\n * @csspart track-container - The region containing the track elements\n * @csspart track-start - The element wrapping the track start slot\n * @csspart thumb-container - The thumb container element which is programatically positioned\n * @fires change - Fires a custom 'change' event when the slider value changes\n *\n * @public\n */\nclass Slider extends FormAssociatedSlider {\n  constructor() {\n    super(...arguments);\n    /**\n     * @internal\n     */\n    this.direction = Direction.ltr;\n    /**\n     * @internal\n     */\n    this.isDragging = false;\n    /**\n     * @internal\n     */\n    this.trackWidth = 0;\n    /**\n     * @internal\n     */\n    this.trackMinWidth = 0;\n    /**\n     * @internal\n     */\n    this.trackHeight = 0;\n    /**\n     * @internal\n     */\n    this.trackLeft = 0;\n    /**\n     * @internal\n     */\n    this.trackMinHeight = 0;\n    /**\n     * Custom function that generates a string for the component's \"aria-valuetext\" attribute based on the current value.\n     *\n     * @public\n     */\n    this.valueTextFormatter = () => null;\n    /**\n     * The minimum allowed value.\n     *\n     * @defaultValue - 0\n     * @public\n     * @remarks\n     * HTML Attribute: min\n     */\n    this.min = 0; // Map to proxy element.\n    /**\n     * The maximum allowed value.\n     *\n     * @defaultValue - 10\n     * @public\n     * @remarks\n     * HTML Attribute: max\n     */\n    this.max = 10; // Map to proxy element.\n    /**\n     * Value to increment or decrement via arrow keys, mouse click or drag.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: step\n     */\n    this.step = 1; // Map to proxy element.\n    /**\n     * The orientation of the slider.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: orientation\n     */\n    this.orientation = Orientation.horizontal;\n    /**\n     * The selection mode.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: mode\n     */\n    this.mode = SliderMode.singleValue;\n    this.keypressHandler = e => {\n      if (this.readOnly) {\n        return;\n      }\n      if (e.key === keyHome) {\n        e.preventDefault();\n        this.value = `${this.min}`;\n      } else if (e.key === keyEnd) {\n        e.preventDefault();\n        this.value = `${this.max}`;\n      } else if (!e.shiftKey) {\n        switch (e.key) {\n          case keyArrowRight:\n          case keyArrowUp:\n            e.preventDefault();\n            this.increment();\n            break;\n          case keyArrowLeft:\n          case keyArrowDown:\n            e.preventDefault();\n            this.decrement();\n            break;\n        }\n      }\n    };\n    this.setupTrackConstraints = () => {\n      const clientRect = this.track.getBoundingClientRect();\n      this.trackWidth = this.track.clientWidth;\n      this.trackMinWidth = this.track.clientLeft;\n      this.trackHeight = clientRect.bottom;\n      this.trackMinHeight = clientRect.top;\n      this.trackLeft = this.getBoundingClientRect().left;\n      if (this.trackWidth === 0) {\n        this.trackWidth = 1;\n      }\n    };\n    this.setupListeners = (remove = false) => {\n      const eventAction = `${remove ? \"remove\" : \"add\"}EventListener`;\n      this[eventAction](\"keydown\", this.keypressHandler);\n      this[eventAction](\"mousedown\", this.handleMouseDown);\n      this.thumb[eventAction](\"mousedown\", this.handleThumbMouseDown, {\n        passive: true\n      });\n      this.thumb[eventAction](\"touchstart\", this.handleThumbMouseDown, {\n        passive: true\n      });\n      // removes handlers attached by mousedown handlers\n      if (remove) {\n        this.handleMouseDown(null);\n        this.handleThumbMouseDown(null);\n      }\n    };\n    /**\n     * @internal\n     */\n    this.initialValue = \"\";\n    /**\n     *  Handle mouse moves during a thumb drag operation\n     *  If the event handler is null it removes the events\n     */\n    this.handleThumbMouseDown = event => {\n      if (event) {\n        if (this.readOnly || this.disabled || event.defaultPrevented) {\n          return;\n        }\n        event.target.focus();\n      }\n      const eventAction = `${event !== null ? \"add\" : \"remove\"}EventListener`;\n      window[eventAction](\"mouseup\", this.handleWindowMouseUp);\n      window[eventAction](\"mousemove\", this.handleMouseMove, {\n        passive: true\n      });\n      window[eventAction](\"touchmove\", this.handleMouseMove, {\n        passive: true\n      });\n      window[eventAction](\"touchend\", this.handleWindowMouseUp);\n      this.isDragging = event !== null;\n    };\n    /**\n     *  Handle mouse moves during a thumb drag operation\n     */\n    this.handleMouseMove = e => {\n      if (this.readOnly || this.disabled || e.defaultPrevented) {\n        return;\n      }\n      // update the value based on current position\n      const sourceEvent = window.TouchEvent && e instanceof TouchEvent ? e.touches[0] : e;\n      const eventValue = this.orientation === Orientation.horizontal ? sourceEvent.pageX - document.documentElement.scrollLeft - this.trackLeft : sourceEvent.pageY - document.documentElement.scrollTop;\n      this.value = `${this.calculateNewValue(eventValue)}`;\n    };\n    this.calculateNewValue = rawValue => {\n      // update the value based on current position\n      const newPosition = convertPixelToPercent(rawValue, this.orientation === Orientation.horizontal ? this.trackMinWidth : this.trackMinHeight, this.orientation === Orientation.horizontal ? this.trackWidth : this.trackHeight, this.direction);\n      const newValue = (this.max - this.min) * newPosition + this.min;\n      return this.convertToConstrainedValue(newValue);\n    };\n    /**\n     * Handle a window mouse up during a drag operation\n     */\n    this.handleWindowMouseUp = event => {\n      this.stopDragging();\n    };\n    this.stopDragging = () => {\n      this.isDragging = false;\n      this.handleMouseDown(null);\n      this.handleThumbMouseDown(null);\n    };\n    /**\n     *\n     * @param e - MouseEvent or null. If there is no event handler it will remove the events\n     */\n    this.handleMouseDown = e => {\n      const eventAction = `${e !== null ? \"add\" : \"remove\"}EventListener`;\n      if (e === null || !this.disabled && !this.readOnly) {\n        window[eventAction](\"mouseup\", this.handleWindowMouseUp);\n        window.document[eventAction](\"mouseleave\", this.handleWindowMouseUp);\n        window[eventAction](\"mousemove\", this.handleMouseMove);\n        if (e) {\n          e.preventDefault();\n          this.setupTrackConstraints();\n          e.target.focus();\n          const controlValue = this.orientation === Orientation.horizontal ? e.pageX - document.documentElement.scrollLeft - this.trackLeft : e.pageY - document.documentElement.scrollTop;\n          this.value = `${this.calculateNewValue(controlValue)}`;\n        }\n      }\n    };\n    this.convertToConstrainedValue = value => {\n      if (isNaN(value)) {\n        value = this.min;\n      }\n      /**\n       * The following logic intends to overcome the issue with math in JavaScript with regards to floating point numbers.\n       * This is needed as the `step` may be an integer but could also be a float. To accomplish this the step  is assumed to be a float\n       * and is converted to an integer by determining the number of decimal places it represent, multiplying it until it is an\n       * integer and then dividing it to get back to the correct number.\n       */\n      let constrainedValue = value - this.min;\n      const roundedConstrainedValue = Math.round(constrainedValue / this.step);\n      const remainderValue = constrainedValue - roundedConstrainedValue * (this.stepMultiplier * this.step) / this.stepMultiplier;\n      constrainedValue = remainderValue >= Number(this.step) / 2 ? constrainedValue - remainderValue + Number(this.step) : constrainedValue - remainderValue;\n      return constrainedValue + this.min;\n    };\n  }\n  readOnlyChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.readOnly = this.readOnly;\n    }\n  }\n  /**\n   * The value property, typed as a number.\n   *\n   * @public\n   */\n  get valueAsNumber() {\n    return parseFloat(super.value);\n  }\n  set valueAsNumber(next) {\n    this.value = next.toString();\n  }\n  /**\n   * @internal\n   */\n  valueChanged(previous, next) {\n    super.valueChanged(previous, next);\n    if (this.$fastController.isConnected) {\n      this.setThumbPositionForOrientation(this.direction);\n    }\n    this.$emit(\"change\");\n  }\n  minChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.min = `${this.min}`;\n    }\n    this.validate();\n  }\n  maxChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.max = `${this.max}`;\n    }\n    this.validate();\n  }\n  stepChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.step = `${this.step}`;\n    }\n    this.updateStepMultiplier();\n    this.validate();\n  }\n  orientationChanged() {\n    if (this.$fastController.isConnected) {\n      this.setThumbPositionForOrientation(this.direction);\n    }\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    this.proxy.setAttribute(\"type\", \"range\");\n    this.direction = getDirection(this);\n    this.updateStepMultiplier();\n    this.setupTrackConstraints();\n    this.setupListeners();\n    this.setupDefaultValue();\n    this.setThumbPositionForOrientation(this.direction);\n  }\n  /**\n   * @internal\n   */\n  disconnectedCallback() {\n    this.setupListeners(true);\n  }\n  /**\n   * Increment the value by the step\n   *\n   * @public\n   */\n  increment() {\n    const newVal = this.direction !== Direction.rtl && this.orientation !== Orientation.vertical ? Number(this.value) + Number(this.step) : Number(this.value) - Number(this.step);\n    const incrementedVal = this.convertToConstrainedValue(newVal);\n    const incrementedValString = incrementedVal < Number(this.max) ? `${incrementedVal}` : `${this.max}`;\n    this.value = incrementedValString;\n  }\n  /**\n   * Decrement the value by the step\n   *\n   * @public\n   */\n  decrement() {\n    const newVal = this.direction !== Direction.rtl && this.orientation !== Orientation.vertical ? Number(this.value) - Number(this.step) : Number(this.value) + Number(this.step);\n    const decrementedVal = this.convertToConstrainedValue(newVal);\n    const decrementedValString = decrementedVal > Number(this.min) ? `${decrementedVal}` : `${this.min}`;\n    this.value = decrementedValString;\n  }\n  /**\n   * Places the thumb based on the current value\n   *\n   * @public\n   * @param direction - writing mode\n   */\n  setThumbPositionForOrientation(direction) {\n    const newPct = convertPixelToPercent(Number(this.value), Number(this.min), Number(this.max), direction);\n    const percentage = (1 - newPct) * 100;\n    if (this.orientation === Orientation.horizontal) {\n      this.position = this.isDragging ? `right: ${percentage}%; transition: none;` : `right: ${percentage}%; transition: all 0.2s ease;`;\n    } else {\n      this.position = this.isDragging ? `bottom: ${percentage}%; transition: none;` : `bottom: ${percentage}%; transition: all 0.2s ease;`;\n    }\n  }\n  /**\n   * Update the step multiplier used to ensure rounding errors from steps that\n   * are not whole numbers\n   */\n  updateStepMultiplier() {\n    const stepString = this.step + \"\";\n    const decimalPlacesOfStep = !!(this.step % 1) ? stepString.length - stepString.indexOf(\".\") - 1 : 0;\n    this.stepMultiplier = Math.pow(10, decimalPlacesOfStep);\n  }\n  get midpoint() {\n    return `${this.convertToConstrainedValue((this.max + this.min) / 2)}`;\n  }\n  setupDefaultValue() {\n    if (typeof this.value === \"string\") {\n      if (this.value.length === 0) {\n        this.initialValue = this.midpoint;\n      } else {\n        const value = parseFloat(this.value);\n        if (!Number.isNaN(value) && (value < this.min || value > this.max)) {\n          this.value = this.midpoint;\n        }\n      }\n    }\n  }\n}\n__decorate$1([attr({\n  attribute: \"readonly\",\n  mode: \"boolean\"\n})], Slider.prototype, \"readOnly\", void 0);\n__decorate$1([observable], Slider.prototype, \"direction\", void 0);\n__decorate$1([observable], Slider.prototype, \"isDragging\", void 0);\n__decorate$1([observable], Slider.prototype, \"position\", void 0);\n__decorate$1([observable], Slider.prototype, \"trackWidth\", void 0);\n__decorate$1([observable], Slider.prototype, \"trackMinWidth\", void 0);\n__decorate$1([observable], Slider.prototype, \"trackHeight\", void 0);\n__decorate$1([observable], Slider.prototype, \"trackLeft\", void 0);\n__decorate$1([observable], Slider.prototype, \"trackMinHeight\", void 0);\n__decorate$1([observable], Slider.prototype, \"valueTextFormatter\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], Slider.prototype, \"min\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], Slider.prototype, \"max\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], Slider.prototype, \"step\", void 0);\n__decorate$1([attr], Slider.prototype, \"orientation\", void 0);\n__decorate$1([attr], Slider.prototype, \"mode\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(Switch:class)} component.\n * @public\n */\nconst switchTemplate = (context, definition) => html`<template role=\"switch\" aria-checked=\"${x => x.checked}\" aria-disabled=\"${x => x.disabled}\" aria-readonly=\"${x => x.readOnly}\" tabindex=\"${x => x.disabled ? null : 0}\" @keypress=\"${(x, c) => x.keypressHandler(c.event)}\" @click=\"${(x, c) => x.clickHandler(c.event)}\" class=\"${x => x.checked ? \"checked\" : \"\"}\"><label part=\"label\" class=\"${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length ? \"label\" : \"label label__hidden\"}\"><slot ${slotted(\"defaultSlottedNodes\")}></slot></label><div part=\"switch\" class=\"switch\"><slot name=\"switch\">${definition.switch || \"\"}</slot></div><span class=\"status-message\" part=\"status-message\"><span class=\"checked-message\" part=\"checked-message\"><slot name=\"checked-message\"></slot></span><span class=\"unchecked-message\" part=\"unchecked-message\"><slot name=\"unchecked-message\"></slot></span></span></template>`;\n\nclass _Switch extends FoundationElement {}\n/**\n * A form-associated base class for the {@link @microsoft/fast-foundation#(Switch:class)} component.\n *\n * @internal\n */\nclass FormAssociatedSwitch extends CheckableFormAssociated(_Switch) {\n  constructor() {\n    super(...arguments);\n    this.proxy = document.createElement(\"input\");\n  }\n}\n\n/**\n * A Switch Custom HTML Element.\n * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#switch | ARIA switch }.\n *\n * @slot - The deafult slot for the label\n * @slot checked-message - The message when in a checked state\n * @slot unchecked-message - The message when in an unchecked state\n * @csspart label - The label\n * @csspart switch - The element representing the switch, which wraps the indicator\n * @csspart status-message - The wrapper for the status messages\n * @csspart checked-message - The checked message\n * @csspart unchecked-message - The unchecked message\n * @fires change - Emits a custom change event when the checked state changes\n *\n * @public\n */\nclass Switch extends FormAssociatedSwitch {\n  constructor() {\n    super();\n    /**\n     * The element's value to be included in form submission when checked.\n     * Default to \"on\" to reach parity with input[type=\"checkbox\"]\n     *\n     * @internal\n     */\n    this.initialValue = \"on\";\n    /**\n     * @internal\n     */\n    this.keypressHandler = e => {\n      if (this.readOnly) {\n        return;\n      }\n      switch (e.key) {\n        case keyEnter:\n        case keySpace:\n          this.checked = !this.checked;\n          break;\n      }\n    };\n    /**\n     * @internal\n     */\n    this.clickHandler = e => {\n      if (!this.disabled && !this.readOnly) {\n        this.checked = !this.checked;\n      }\n    };\n    this.proxy.setAttribute(\"type\", \"checkbox\");\n  }\n  readOnlyChanged() {\n    if (this.proxy instanceof HTMLInputElement) {\n      this.proxy.readOnly = this.readOnly;\n    }\n    this.readOnly ? this.classList.add(\"readonly\") : this.classList.remove(\"readonly\");\n  }\n  /**\n   * @internal\n   */\n  checkedChanged(prev, next) {\n    super.checkedChanged(prev, next);\n    /**\n     * @deprecated - this behavior already exists in the template and should not exist in the class.\n     */\n    this.checked ? this.classList.add(\"checked\") : this.classList.remove(\"checked\");\n  }\n}\n__decorate$1([attr({\n  attribute: \"readonly\",\n  mode: \"boolean\"\n})], Switch.prototype, \"readOnly\", void 0);\n__decorate$1([observable], Switch.prototype, \"defaultSlottedNodes\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#TabPanel} component.\n * @public\n */\nconst tabPanelTemplate = (context, definition) => html`<template slot=\"tabpanel\" role=\"tabpanel\"><slot></slot></template>`;\n\n/**\n * A TabPanel Component to be used with {@link @microsoft/fast-foundation#(Tabs:class)}\n *\n * @slot - The default slot for the tabpanel content\n *\n * @public\n */\nclass TabPanel extends FoundationElement {}\n\n/**\n * The template for the {@link @microsoft/fast-foundation#Tab} component.\n * @public\n */\nconst tabTemplate = (context, definition) => html`<template slot=\"tab\" role=\"tab\" aria-disabled=\"${x => x.disabled}\"><slot></slot></template>`;\n\n/**\n * A Tab Component to be used with {@link @microsoft/fast-foundation#(Tabs:class)}\n *\n * @slot - The default slot for the tab content\n *\n * @public\n */\nclass Tab extends FoundationElement {}\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Tab.prototype, \"disabled\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(Tabs:class)} component.\n * @public\n */\nconst tabsTemplate = (context, definition) => html`<template class=\"${x => x.orientation}\">${startSlotTemplate(context, definition)}<div class=\"tablist\" part=\"tablist\" role=\"tablist\"><slot class=\"tab\" name=\"tab\" part=\"tab\" ${slotted(\"tabs\")}></slot>${when(x => x.showActiveIndicator, html`<div ${ref(\"activeIndicatorRef\")} class=\"activeIndicator\" part=\"activeIndicator\"></div>`)}</div>${endSlotTemplate(context, definition)}<div class=\"tabpanel\" part=\"tabpanel\"><slot name=\"tabpanel\" ${slotted(\"tabpanels\")}></slot></div></template>`;\n\n/**\n * The orientation of the {@link @microsoft/fast-foundation#(Tabs:class)} component\n * @public\n */\nconst TabsOrientation = {\n  vertical: \"vertical\",\n  horizontal: \"horizontal\"\n};\n/**\n * A Tabs Custom HTML Element.\n * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#tablist | ARIA tablist }.\n *\n * @slot start - Content which can be provided before the tablist element\n * @slot end - Content which can be provided after the tablist element\n * @slot tab - The slot for tabs\n * @slot tabpanel - The slot for tabpanels\n * @csspart tablist - The element wrapping for the tabs\n * @csspart tab - The tab slot\n * @csspart activeIndicator - The visual indicator\n * @csspart tabpanel - The tabpanel slot\n * @fires change - Fires a custom 'change' event when a tab is clicked or during keyboard navigation\n *\n * @public\n */\nclass Tabs extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * The orientation\n     * @public\n     * @remarks\n     * HTML Attribute: orientation\n     */\n    this.orientation = TabsOrientation.horizontal;\n    /**\n     * Whether or not to show the active indicator\n     * @public\n     * @remarks\n     * HTML Attribute: activeindicator\n     */\n    this.activeindicator = true;\n    /**\n     * @internal\n     */\n    this.showActiveIndicator = true;\n    this.prevActiveTabIndex = 0;\n    this.activeTabIndex = 0;\n    this.ticking = false;\n    this.change = () => {\n      this.$emit(\"change\", this.activetab);\n    };\n    this.isDisabledElement = el => {\n      return el.getAttribute(\"aria-disabled\") === \"true\";\n    };\n    this.isHiddenElement = el => {\n      return el.hasAttribute(\"hidden\");\n    };\n    this.isFocusableElement = el => {\n      return !this.isDisabledElement(el) && !this.isHiddenElement(el);\n    };\n    this.setTabs = () => {\n      const gridHorizontalProperty = \"gridColumn\";\n      const gridVerticalProperty = \"gridRow\";\n      const gridProperty = this.isHorizontal() ? gridHorizontalProperty : gridVerticalProperty;\n      this.activeTabIndex = this.getActiveIndex();\n      this.showActiveIndicator = false;\n      this.tabs.forEach((tab, index) => {\n        if (tab.slot === \"tab\") {\n          const isActiveTab = this.activeTabIndex === index && this.isFocusableElement(tab);\n          if (this.activeindicator && this.isFocusableElement(tab)) {\n            this.showActiveIndicator = true;\n          }\n          const tabId = this.tabIds[index];\n          const tabpanelId = this.tabpanelIds[index];\n          tab.setAttribute(\"id\", tabId);\n          tab.setAttribute(\"aria-selected\", isActiveTab ? \"true\" : \"false\");\n          tab.setAttribute(\"aria-controls\", tabpanelId);\n          tab.addEventListener(\"click\", this.handleTabClick);\n          tab.addEventListener(\"keydown\", this.handleTabKeyDown);\n          tab.setAttribute(\"tabindex\", isActiveTab ? \"0\" : \"-1\");\n          if (isActiveTab) {\n            this.activetab = tab;\n            this.activeid = tabId;\n          }\n        }\n        // If the original property isn't emptied out,\n        // the next set will morph into a grid-area style setting that is not what we want\n        tab.style[gridHorizontalProperty] = \"\";\n        tab.style[gridVerticalProperty] = \"\";\n        tab.style[gridProperty] = `${index + 1}`;\n        !this.isHorizontal() ? tab.classList.add(\"vertical\") : tab.classList.remove(\"vertical\");\n      });\n    };\n    this.setTabPanels = () => {\n      this.tabpanels.forEach((tabpanel, index) => {\n        const tabId = this.tabIds[index];\n        const tabpanelId = this.tabpanelIds[index];\n        tabpanel.setAttribute(\"id\", tabpanelId);\n        tabpanel.setAttribute(\"aria-labelledby\", tabId);\n        this.activeTabIndex !== index ? tabpanel.setAttribute(\"hidden\", \"\") : tabpanel.removeAttribute(\"hidden\");\n      });\n    };\n    this.handleTabClick = event => {\n      const selectedTab = event.currentTarget;\n      if (selectedTab.nodeType === 1 && this.isFocusableElement(selectedTab)) {\n        this.prevActiveTabIndex = this.activeTabIndex;\n        this.activeTabIndex = this.tabs.indexOf(selectedTab);\n        this.setComponent();\n      }\n    };\n    this.handleTabKeyDown = event => {\n      if (this.isHorizontal()) {\n        switch (event.key) {\n          case keyArrowLeft:\n            event.preventDefault();\n            this.adjustBackward(event);\n            break;\n          case keyArrowRight:\n            event.preventDefault();\n            this.adjustForward(event);\n            break;\n        }\n      } else {\n        switch (event.key) {\n          case keyArrowUp:\n            event.preventDefault();\n            this.adjustBackward(event);\n            break;\n          case keyArrowDown:\n            event.preventDefault();\n            this.adjustForward(event);\n            break;\n        }\n      }\n      switch (event.key) {\n        case keyHome:\n          event.preventDefault();\n          this.adjust(-this.activeTabIndex);\n          break;\n        case keyEnd:\n          event.preventDefault();\n          this.adjust(this.tabs.length - this.activeTabIndex - 1);\n          break;\n      }\n    };\n    this.adjustForward = e => {\n      const group = this.tabs;\n      let index = 0;\n      index = this.activetab ? group.indexOf(this.activetab) + 1 : 1;\n      if (index === group.length) {\n        index = 0;\n      }\n      while (index < group.length && group.length > 1) {\n        if (this.isFocusableElement(group[index])) {\n          this.moveToTabByIndex(group, index);\n          break;\n        } else if (this.activetab && index === group.indexOf(this.activetab)) {\n          break;\n        } else if (index + 1 >= group.length) {\n          index = 0;\n        } else {\n          index += 1;\n        }\n      }\n    };\n    this.adjustBackward = e => {\n      const group = this.tabs;\n      let index = 0;\n      index = this.activetab ? group.indexOf(this.activetab) - 1 : 0;\n      index = index < 0 ? group.length - 1 : index;\n      while (index >= 0 && group.length > 1) {\n        if (this.isFocusableElement(group[index])) {\n          this.moveToTabByIndex(group, index);\n          break;\n        } else if (index - 1 < 0) {\n          index = group.length - 1;\n        } else {\n          index -= 1;\n        }\n      }\n    };\n    this.moveToTabByIndex = (group, index) => {\n      const tab = group[index];\n      this.activetab = tab;\n      this.prevActiveTabIndex = this.activeTabIndex;\n      this.activeTabIndex = index;\n      tab.focus();\n      this.setComponent();\n    };\n  }\n  /**\n   * @internal\n   */\n  orientationChanged() {\n    if (this.$fastController.isConnected) {\n      this.setTabs();\n      this.setTabPanels();\n      this.handleActiveIndicatorPosition();\n    }\n  }\n  /**\n   * @internal\n   */\n  activeidChanged(oldValue, newValue) {\n    if (this.$fastController.isConnected && this.tabs.length <= this.tabpanels.length) {\n      this.prevActiveTabIndex = this.tabs.findIndex(item => item.id === oldValue);\n      this.setTabs();\n      this.setTabPanels();\n      this.handleActiveIndicatorPosition();\n    }\n  }\n  /**\n   * @internal\n   */\n  tabsChanged() {\n    if (this.$fastController.isConnected && this.tabs.length <= this.tabpanels.length) {\n      this.tabIds = this.getTabIds();\n      this.tabpanelIds = this.getTabPanelIds();\n      this.setTabs();\n      this.setTabPanels();\n      this.handleActiveIndicatorPosition();\n    }\n  }\n  /**\n   * @internal\n   */\n  tabpanelsChanged() {\n    if (this.$fastController.isConnected && this.tabpanels.length <= this.tabs.length) {\n      this.tabIds = this.getTabIds();\n      this.tabpanelIds = this.getTabPanelIds();\n      this.setTabs();\n      this.setTabPanels();\n      this.handleActiveIndicatorPosition();\n    }\n  }\n  getActiveIndex() {\n    const id = this.activeid;\n    if (id !== undefined) {\n      return this.tabIds.indexOf(this.activeid) === -1 ? 0 : this.tabIds.indexOf(this.activeid);\n    } else {\n      return 0;\n    }\n  }\n  getTabIds() {\n    return this.tabs.map(tab => {\n      var _a;\n      return (_a = tab.getAttribute(\"id\")) !== null && _a !== void 0 ? _a : `tab-${uniqueId()}`;\n    });\n  }\n  getTabPanelIds() {\n    return this.tabpanels.map(tabPanel => {\n      var _a;\n      return (_a = tabPanel.getAttribute(\"id\")) !== null && _a !== void 0 ? _a : `panel-${uniqueId()}`;\n    });\n  }\n  setComponent() {\n    if (this.activeTabIndex !== this.prevActiveTabIndex) {\n      this.activeid = this.tabIds[this.activeTabIndex];\n      this.focusTab();\n      this.change();\n    }\n  }\n  isHorizontal() {\n    return this.orientation === TabsOrientation.horizontal;\n  }\n  handleActiveIndicatorPosition() {\n    // Ignore if we click twice on the same tab\n    if (this.showActiveIndicator && this.activeindicator && this.activeTabIndex !== this.prevActiveTabIndex) {\n      if (this.ticking) {\n        this.ticking = false;\n      } else {\n        this.ticking = true;\n        this.animateActiveIndicator();\n      }\n    }\n  }\n  animateActiveIndicator() {\n    this.ticking = true;\n    const gridProperty = this.isHorizontal() ? \"gridColumn\" : \"gridRow\";\n    const translateProperty = this.isHorizontal() ? \"translateX\" : \"translateY\";\n    const offsetProperty = this.isHorizontal() ? \"offsetLeft\" : \"offsetTop\";\n    const prev = this.activeIndicatorRef[offsetProperty];\n    this.activeIndicatorRef.style[gridProperty] = `${this.activeTabIndex + 1}`;\n    const next = this.activeIndicatorRef[offsetProperty];\n    this.activeIndicatorRef.style[gridProperty] = `${this.prevActiveTabIndex + 1}`;\n    const dif = next - prev;\n    this.activeIndicatorRef.style.transform = `${translateProperty}(${dif}px)`;\n    this.activeIndicatorRef.classList.add(\"activeIndicatorTransition\");\n    this.activeIndicatorRef.addEventListener(\"transitionend\", () => {\n      this.ticking = false;\n      this.activeIndicatorRef.style[gridProperty] = `${this.activeTabIndex + 1}`;\n      this.activeIndicatorRef.style.transform = `${translateProperty}(0px)`;\n      this.activeIndicatorRef.classList.remove(\"activeIndicatorTransition\");\n    });\n  }\n  /**\n   * The adjust method for FASTTabs\n   * @public\n   * @remarks\n   * This method allows the active index to be adjusted by numerical increments\n   */\n  adjust(adjustment) {\n    const focusableTabs = this.tabs.filter(t => this.isFocusableElement(t));\n    const currentActiveTabIndex = focusableTabs.indexOf(this.activetab);\n    const nextTabIndex = limit(0, focusableTabs.length - 1, currentActiveTabIndex + adjustment);\n    // the index of the next focusable tab within the context of all available tabs\n    const nextIndex = this.tabs.indexOf(focusableTabs[nextTabIndex]);\n    if (nextIndex > -1) {\n      this.moveToTabByIndex(this.tabs, nextIndex);\n    }\n  }\n  focusTab() {\n    this.tabs[this.activeTabIndex].focus();\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    this.tabIds = this.getTabIds();\n    this.tabpanelIds = this.getTabPanelIds();\n    this.activeTabIndex = this.getActiveIndex();\n  }\n}\n__decorate$1([attr], Tabs.prototype, \"orientation\", void 0);\n__decorate$1([attr], Tabs.prototype, \"activeid\", void 0);\n__decorate$1([observable], Tabs.prototype, \"tabs\", void 0);\n__decorate$1([observable], Tabs.prototype, \"tabpanels\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Tabs.prototype, \"activeindicator\", void 0);\n__decorate$1([observable], Tabs.prototype, \"activeIndicatorRef\", void 0);\n__decorate$1([observable], Tabs.prototype, \"showActiveIndicator\", void 0);\napplyMixins(Tabs, StartEnd);\n\nclass _TextArea extends FoundationElement {}\n/**\n * A form-associated base class for the {@link @microsoft/fast-foundation#(TextArea:class)} component.\n *\n * @internal\n */\nclass FormAssociatedTextArea extends FormAssociated(_TextArea) {\n  constructor() {\n    super(...arguments);\n    this.proxy = document.createElement(\"textarea\");\n  }\n}\n\n/**\n * Resize mode for a TextArea\n * @public\n */\nconst TextAreaResize = {\n  /**\n   * No resize.\n   */\n  none: \"none\",\n  /**\n   * Resize vertically and horizontally.\n   */\n  both: \"both\",\n  /**\n   * Resize horizontally.\n   */\n  horizontal: \"horizontal\",\n  /**\n   * Resize vertically.\n   */\n  vertical: \"vertical\"\n};\n\n/**\n * A Text Area Custom HTML Element.\n * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea | <textarea> element }.\n *\n * @slot - The default slot for the label\n * @csspart label - The label\n * @csspart root - The element wrapping the control\n * @csspart control - The textarea element\n * @fires change - Emits a custom 'change' event when the textarea emits a change event\n *\n * @public\n */\nclass TextArea$1 extends FormAssociatedTextArea {\n  constructor() {\n    super(...arguments);\n    /**\n     * The resize mode of the element.\n     * @public\n     * @remarks\n     * HTML Attribute: resize\n     */\n    this.resize = TextAreaResize.none;\n    /**\n     * Sizes the element horizontally by a number of character columns.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: cols\n     */\n    this.cols = 20;\n    /**\n     * @internal\n     */\n    this.handleTextInput = () => {\n      this.value = this.control.value;\n    };\n  }\n  readOnlyChanged() {\n    if (this.proxy instanceof HTMLTextAreaElement) {\n      this.proxy.readOnly = this.readOnly;\n    }\n  }\n  autofocusChanged() {\n    if (this.proxy instanceof HTMLTextAreaElement) {\n      this.proxy.autofocus = this.autofocus;\n    }\n  }\n  listChanged() {\n    if (this.proxy instanceof HTMLTextAreaElement) {\n      this.proxy.setAttribute(\"list\", this.list);\n    }\n  }\n  maxlengthChanged() {\n    if (this.proxy instanceof HTMLTextAreaElement) {\n      this.proxy.maxLength = this.maxlength;\n    }\n  }\n  minlengthChanged() {\n    if (this.proxy instanceof HTMLTextAreaElement) {\n      this.proxy.minLength = this.minlength;\n    }\n  }\n  spellcheckChanged() {\n    if (this.proxy instanceof HTMLTextAreaElement) {\n      this.proxy.spellcheck = this.spellcheck;\n    }\n  }\n  /**\n   * Selects all the text in the text area\n   *\n   * @public\n   */\n  select() {\n    this.control.select();\n    /**\n     * The select event does not permeate the shadow DOM boundary.\n     * This fn effectively proxies the select event,\n     * emitting a `select` event whenever the internal\n     * control emits a `select` event\n     */\n    this.$emit(\"select\");\n  }\n  /**\n   * Change event handler for inner control.\n   * @remarks\n   * \"Change\" events are not `composable` so they will not\n   * permeate the shadow DOM boundary. This fn effectively proxies\n   * the change event, emitting a `change` event whenever the internal\n   * control emits a `change` event\n   * @internal\n   */\n  handleChange() {\n    this.$emit(\"change\");\n  }\n  /** {@inheritDoc (FormAssociated:interface).validate} */\n  validate() {\n    super.validate(this.control);\n  }\n}\n__decorate$1([attr({\n  mode: \"boolean\"\n})], TextArea$1.prototype, \"readOnly\", void 0);\n__decorate$1([attr], TextArea$1.prototype, \"resize\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], TextArea$1.prototype, \"autofocus\", void 0);\n__decorate$1([attr({\n  attribute: \"form\"\n})], TextArea$1.prototype, \"formId\", void 0);\n__decorate$1([attr], TextArea$1.prototype, \"list\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], TextArea$1.prototype, \"maxlength\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter\n})], TextArea$1.prototype, \"minlength\", void 0);\n__decorate$1([attr], TextArea$1.prototype, \"name\", void 0);\n__decorate$1([attr], TextArea$1.prototype, \"placeholder\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter,\n  mode: \"fromView\"\n})], TextArea$1.prototype, \"cols\", void 0);\n__decorate$1([attr({\n  converter: nullableNumberConverter,\n  mode: \"fromView\"\n})], TextArea$1.prototype, \"rows\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], TextArea$1.prototype, \"spellcheck\", void 0);\n__decorate$1([observable], TextArea$1.prototype, \"defaultSlottedNodes\", void 0);\napplyMixins(TextArea$1, DelegatesARIATextbox);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(TextArea:class)} component.\n * @public\n */\nconst textAreaTemplate = (context, definition) => html`<template class=\" ${x => x.readOnly ? \"readonly\" : \"\"} ${x => x.resize !== TextAreaResize.none ? `resize-${x.resize}` : \"\"}\"><label part=\"label\" for=\"control\" class=\"${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length ? \"label\" : \"label label__hidden\"}\"><slot ${slotted(\"defaultSlottedNodes\")}></slot></label><textarea part=\"control\" class=\"control\" id=\"control\" ?autofocus=\"${x => x.autofocus}\" cols=\"${x => x.cols}\" ?disabled=\"${x => x.disabled}\" form=\"${x => x.form}\" list=\"${x => x.list}\" maxlength=\"${x => x.maxlength}\" minlength=\"${x => x.minlength}\" name=\"${x => x.name}\" placeholder=\"${x => x.placeholder}\" ?readonly=\"${x => x.readOnly}\" ?required=\"${x => x.required}\" rows=\"${x => x.rows}\" ?spellcheck=\"${x => x.spellcheck}\" :value=\"${x => x.value}\" aria-atomic=\"${x => x.ariaAtomic}\" aria-busy=\"${x => x.ariaBusy}\" aria-controls=\"${x => x.ariaControls}\" aria-current=\"${x => x.ariaCurrent}\" aria-describedby=\"${x => x.ariaDescribedby}\" aria-details=\"${x => x.ariaDetails}\" aria-disabled=\"${x => x.ariaDisabled}\" aria-errormessage=\"${x => x.ariaErrormessage}\" aria-flowto=\"${x => x.ariaFlowto}\" aria-haspopup=\"${x => x.ariaHaspopup}\" aria-hidden=\"${x => x.ariaHidden}\" aria-invalid=\"${x => x.ariaInvalid}\" aria-keyshortcuts=\"${x => x.ariaKeyshortcuts}\" aria-label=\"${x => x.ariaLabel}\" aria-labelledby=\"${x => x.ariaLabelledby}\" aria-live=\"${x => x.ariaLive}\" aria-owns=\"${x => x.ariaOwns}\" aria-relevant=\"${x => x.ariaRelevant}\" aria-roledescription=\"${x => x.ariaRoledescription}\" @input=\"${(x, c) => x.handleTextInput()}\" @change=\"${x => x.handleChange()}\" ${ref(\"control\")}></textarea></template>`;\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(TextField:class)} component.\n * @public\n */\nconst textFieldTemplate = (context, definition) => html`<template class=\" ${x => x.readOnly ? \"readonly\" : \"\"} \"><label part=\"label\" for=\"control\" class=\"${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length ? \"label\" : \"label label__hidden\"}\"><slot ${slotted({\n  property: \"defaultSlottedNodes\",\n  filter: whitespaceFilter\n})}></slot></label><div class=\"root\" part=\"root\">${startSlotTemplate(context, definition)}<input class=\"control\" part=\"control\" id=\"control\" @input=\"${x => x.handleTextInput()}\" @change=\"${x => x.handleChange()}\" ?autofocus=\"${x => x.autofocus}\" ?disabled=\"${x => x.disabled}\" list=\"${x => x.list}\" maxlength=\"${x => x.maxlength}\" minlength=\"${x => x.minlength}\" pattern=\"${x => x.pattern}\" placeholder=\"${x => x.placeholder}\" ?readonly=\"${x => x.readOnly}\" ?required=\"${x => x.required}\" size=\"${x => x.size}\" ?spellcheck=\"${x => x.spellcheck}\" :value=\"${x => x.value}\" type=\"${x => x.type}\" aria-atomic=\"${x => x.ariaAtomic}\" aria-busy=\"${x => x.ariaBusy}\" aria-controls=\"${x => x.ariaControls}\" aria-current=\"${x => x.ariaCurrent}\" aria-describedby=\"${x => x.ariaDescribedby}\" aria-details=\"${x => x.ariaDetails}\" aria-disabled=\"${x => x.ariaDisabled}\" aria-errormessage=\"${x => x.ariaErrormessage}\" aria-flowto=\"${x => x.ariaFlowto}\" aria-haspopup=\"${x => x.ariaHaspopup}\" aria-hidden=\"${x => x.ariaHidden}\" aria-invalid=\"${x => x.ariaInvalid}\" aria-keyshortcuts=\"${x => x.ariaKeyshortcuts}\" aria-label=\"${x => x.ariaLabel}\" aria-labelledby=\"${x => x.ariaLabelledby}\" aria-live=\"${x => x.ariaLive}\" aria-owns=\"${x => x.ariaOwns}\" aria-relevant=\"${x => x.ariaRelevant}\" aria-roledescription=\"${x => x.ariaRoledescription}\" ${ref(\"control\")} />${endSlotTemplate(context, definition)}</div></template>`;\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(Toolbar:class)} component.\n *\n * @public\n */\nconst toolbarTemplate = (context, definition) => html`<template aria-label=\"${x => x.ariaLabel}\" aria-labelledby=\"${x => x.ariaLabelledby}\" aria-orientation=\"${x => x.orientation}\" orientation=\"${x => x.orientation}\" role=\"toolbar\" @mousedown=\"${(x, c) => x.mouseDownHandler(c.event)}\" @focusin=\"${(x, c) => x.focusinHandler(c.event)}\" @keydown=\"${(x, c) => x.keydownHandler(c.event)}\" ${children({\n  property: \"childItems\",\n  attributeFilter: [\"disabled\", \"hidden\"],\n  filter: elements(),\n  subtree: true\n})}><slot name=\"label\"></slot><div class=\"positioning-region\" part=\"positioning-region\">${startSlotTemplate(context, definition)}<slot ${slotted({\n  filter: elements(),\n  property: \"slottedItems\"\n})}></slot>${endSlotTemplate(context, definition)}</div></template>`;\n\n// returns the active element in the shadow context of the element in question.\nfunction getRootActiveElement(element) {\n  const rootNode = element.getRootNode();\n  if (rootNode instanceof ShadowRoot) {\n    return rootNode.activeElement;\n  }\n  return document.activeElement;\n}\n\n/**\n * A map for directionality derived from keyboard input strings,\n * visual orientation, and text direction.\n *\n * @internal\n */\nconst ToolbarArrowKeyMap = Object.freeze({\n  [ArrowKeys.ArrowUp]: {\n    [Orientation.vertical]: -1\n  },\n  [ArrowKeys.ArrowDown]: {\n    [Orientation.vertical]: 1\n  },\n  [ArrowKeys.ArrowLeft]: {\n    [Orientation.horizontal]: {\n      [Direction.ltr]: -1,\n      [Direction.rtl]: 1\n    }\n  },\n  [ArrowKeys.ArrowRight]: {\n    [Orientation.horizontal]: {\n      [Direction.ltr]: 1,\n      [Direction.rtl]: -1\n    }\n  }\n});\n/**\n * A Toolbar Custom HTML Element.\n * Implements the {@link https://w3c.github.io/aria-practices/#Toolbar|ARIA Toolbar}.\n *\n * @slot start - Content which can be provided before the slotted items\n * @slot end - Content which can be provided after the slotted items\n * @slot - The default slot for slotted items\n * @slot label - The toolbar label\n * @csspart positioning-region - The element containing the items, start and end slots\n *\n * @public\n */\nclass Toolbar$1 extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * The internal index of the currently focused element.\n     *\n     * @internal\n     */\n    this._activeIndex = 0;\n    /**\n     * The text direction of the toolbar.\n     *\n     * @internal\n     */\n    this.direction = Direction.ltr;\n    /**\n     * The orientation of the toolbar.\n     *\n     * @public\n     * @remarks\n     * HTML Attribute: `orientation`\n     */\n    this.orientation = Orientation.horizontal;\n  }\n  /**\n   * The index of the currently focused element, clamped between 0 and the last element.\n   *\n   * @internal\n   */\n  get activeIndex() {\n    Observable.track(this, \"activeIndex\");\n    return this._activeIndex;\n  }\n  set activeIndex(value) {\n    if (this.$fastController.isConnected) {\n      this._activeIndex = limit(0, this.focusableElements.length - 1, value);\n      Observable.notify(this, \"activeIndex\");\n    }\n  }\n  slottedItemsChanged() {\n    if (this.$fastController.isConnected) {\n      this.reduceFocusableElements();\n    }\n  }\n  /**\n   * Set the activeIndex when a focusable element in the toolbar is clicked.\n   *\n   * @internal\n   */\n  mouseDownHandler(e) {\n    var _a;\n    const activeIndex = (_a = this.focusableElements) === null || _a === void 0 ? void 0 : _a.findIndex(x => x.contains(e.target));\n    if (activeIndex > -1 && this.activeIndex !== activeIndex) {\n      this.setFocusedElement(activeIndex);\n    }\n    return true;\n  }\n  childItemsChanged(prev, next) {\n    if (this.$fastController.isConnected) {\n      this.reduceFocusableElements();\n    }\n  }\n  /**\n   * @internal\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    this.direction = getDirection(this);\n  }\n  /**\n   * When the toolbar receives focus, set the currently active element as focused.\n   *\n   * @internal\n   */\n  focusinHandler(e) {\n    const relatedTarget = e.relatedTarget;\n    if (!relatedTarget || this.contains(relatedTarget)) {\n      return;\n    }\n    this.setFocusedElement();\n  }\n  /**\n   * Determines a value that can be used to iterate a list with the arrow keys.\n   *\n   * @param this - An element with an orientation and direction\n   * @param key - The event key value\n   * @internal\n   */\n  getDirectionalIncrementer(key) {\n    var _a, _b, _c, _d, _e;\n    return (_e = (_c = (_b = (_a = ToolbarArrowKeyMap[key]) === null || _a === void 0 ? void 0 : _a[this.orientation]) === null || _b === void 0 ? void 0 : _b[this.direction]) !== null && _c !== void 0 ? _c : (_d = ToolbarArrowKeyMap[key]) === null || _d === void 0 ? void 0 : _d[this.orientation]) !== null && _e !== void 0 ? _e : 0;\n  }\n  /**\n   * Handle keyboard events for the toolbar.\n   *\n   * @internal\n   */\n  keydownHandler(e) {\n    const key = e.key;\n    if (!(key in ArrowKeys) || e.defaultPrevented || e.shiftKey) {\n      return true;\n    }\n    const incrementer = this.getDirectionalIncrementer(key);\n    if (!incrementer) {\n      return !e.target.closest(\"[role=radiogroup]\");\n    }\n    const nextIndex = this.activeIndex + incrementer;\n    if (this.focusableElements[nextIndex]) {\n      e.preventDefault();\n    }\n    this.setFocusedElement(nextIndex);\n    return true;\n  }\n  /**\n   * get all the slotted elements\n   * @internal\n   */\n  get allSlottedItems() {\n    return [...this.start.assignedElements(), ...this.slottedItems, ...this.end.assignedElements()];\n  }\n  /**\n   * Prepare the slotted elements which can be focusable.\n   *\n   * @internal\n   */\n  reduceFocusableElements() {\n    var _a;\n    const previousFocusedElement = (_a = this.focusableElements) === null || _a === void 0 ? void 0 : _a[this.activeIndex];\n    this.focusableElements = this.allSlottedItems.reduce(Toolbar$1.reduceFocusableItems, []);\n    // If the previously active item is still focusable, adjust the active index to the\n    // index of that item.\n    const adjustedActiveIndex = this.focusableElements.indexOf(previousFocusedElement);\n    this.activeIndex = Math.max(0, adjustedActiveIndex);\n    this.setFocusableElements();\n  }\n  /**\n   * Set the activeIndex and focus the corresponding control.\n   *\n   * @param activeIndex - The new index to set\n   * @internal\n   */\n  setFocusedElement(activeIndex = this.activeIndex) {\n    this.activeIndex = activeIndex;\n    this.setFocusableElements();\n    if (this.focusableElements[this.activeIndex] &&\n    // Don't focus the toolbar element if some event handlers moved\n    // the focus on another element in the page.\n    this.contains(getRootActiveElement(this))) {\n      this.focusableElements[this.activeIndex].focus();\n    }\n  }\n  /**\n   * Reduce a collection to only its focusable elements.\n   *\n   * @param elements - Collection of elements to reduce\n   * @param element - The current element\n   *\n   * @internal\n   */\n  static reduceFocusableItems(elements, element) {\n    var _a, _b, _c, _d;\n    const isRoleRadio = element.getAttribute(\"role\") === \"radio\";\n    const isFocusableFastElement = (_b = (_a = element.$fastController) === null || _a === void 0 ? void 0 : _a.definition.shadowOptions) === null || _b === void 0 ? void 0 : _b.delegatesFocus;\n    const hasFocusableShadow = Array.from((_d = (_c = element.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelectorAll(\"*\")) !== null && _d !== void 0 ? _d : []).some(x => isFocusable(x));\n    if (!element.hasAttribute(\"disabled\") && !element.hasAttribute(\"hidden\") && (isFocusable(element) || isRoleRadio || isFocusableFastElement || hasFocusableShadow)) {\n      elements.push(element);\n      return elements;\n    }\n    if (element.childElementCount) {\n      return elements.concat(Array.from(element.children).reduce(Toolbar$1.reduceFocusableItems, []));\n    }\n    return elements;\n  }\n  /**\n   * @internal\n   */\n  setFocusableElements() {\n    if (this.$fastController.isConnected && this.focusableElements.length > 0) {\n      this.focusableElements.forEach((element, index) => {\n        element.tabIndex = this.activeIndex === index ? 0 : -1;\n      });\n    }\n  }\n}\n__decorate$1([observable], Toolbar$1.prototype, \"direction\", void 0);\n__decorate$1([attr], Toolbar$1.prototype, \"orientation\", void 0);\n__decorate$1([observable], Toolbar$1.prototype, \"slottedItems\", void 0);\n__decorate$1([observable], Toolbar$1.prototype, \"slottedLabel\", void 0);\n__decorate$1([observable], Toolbar$1.prototype, \"childItems\", void 0);\n/**\n * Includes ARIA states and properties relating to the ARIA toolbar role\n *\n * @public\n */\nclass DelegatesARIAToolbar {}\n__decorate$1([attr({\n  attribute: \"aria-labelledby\"\n})], DelegatesARIAToolbar.prototype, \"ariaLabelledby\", void 0);\n__decorate$1([attr({\n  attribute: \"aria-label\"\n})], DelegatesARIAToolbar.prototype, \"ariaLabel\", void 0);\napplyMixins(DelegatesARIAToolbar, ARIAGlobalStatesAndProperties);\napplyMixins(Toolbar$1, StartEnd, DelegatesARIAToolbar);\n\n/**\n * Creates a template for the {@link @microsoft/fast-foundation#(Tooltip:class)} component using the provided prefix.\n * @public\n */\nconst tooltipTemplate = (context, definition) => {\n  return html` ${when(x => x.tooltipVisible, html`<${context.tagFor(AnchoredRegion)} fixed-placement=\"true\" auto-update-mode=\"${x => x.autoUpdateMode}\" vertical-positioning-mode=\"${x => x.verticalPositioningMode}\" vertical-default-position=\"${x => x.verticalDefaultPosition}\" vertical-inset=\"${x => x.verticalInset}\" vertical-scaling=\"${x => x.verticalScaling}\" horizontal-positioning-mode=\"${x => x.horizontalPositioningMode}\" horizontal-default-position=\"${x => x.horizontalDefaultPosition}\" horizontal-scaling=\"${x => x.horizontalScaling}\" horizontal-inset=\"${x => x.horizontalInset}\" vertical-viewport-lock=\"${x => x.horizontalViewportLock}\" horizontal-viewport-lock=\"${x => x.verticalViewportLock}\" dir=\"${x => x.currentDirection}\" ${ref(\"region\")}><div class=\"tooltip\" part=\"tooltip\" role=\"tooltip\"><slot></slot></div></${context.tagFor(AnchoredRegion)}>`)} `;\n};\n\n/**\n * Enumerates possible tooltip positions\n *\n * @public\n */\nconst TooltipPosition = {\n  /**\n   * The tooltip is positioned above the element\n   */\n  top: \"top\",\n  /**\n   * The tooltip is positioned to the right of the element\n   */\n  right: \"right\",\n  /**\n   * The tooltip is positioned below the element\n   */\n  bottom: \"bottom\",\n  /**\n   * The tooltip is positioned to the left of the element\n   */\n  left: \"left\",\n  /**\n   * The tooltip is positioned before the element\n   */\n  start: \"start\",\n  /**\n   * The tooltip is positioned after the element\n   */\n  end: \"end\",\n  /**\n   * The tooltip is positioned above the element and to the left\n   */\n  topLeft: \"top-left\",\n  /**\n   * The tooltip is positioned above the element and to the right\n   */\n  topRight: \"top-right\",\n  /**\n   * The tooltip is positioned below the element and to the left\n   */\n  bottomLeft: \"bottom-left\",\n  /**\n   * The tooltip is positioned below the element and to the right\n   */\n  bottomRight: \"bottom-right\",\n  /**\n   * The tooltip is positioned above the element and to the left\n   */\n  topStart: \"top-start\",\n  /**\n   * The tooltip is positioned above the element and to the right\n   */\n  topEnd: \"top-end\",\n  /**\n   * The tooltip is positioned below the element and to the left\n   */\n  bottomStart: \"bottom-start\",\n  /**\n   * The tooltip is positioned below the element and to the right\n   */\n  bottomEnd: \"bottom-end\"\n};\n\n/**\n * An Tooltip Custom HTML Element.\n *\n * @slot - The default slot for the tooltip content\n * @csspart tooltip - The tooltip element\n * @fires dismiss - Fires a custom 'dismiss' event when the tooltip is visible and escape key is pressed\n *\n * @public\n */\nclass Tooltip$1 extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * The id of the element the tooltip is anchored to\n     *\n     * @defaultValue - undefined\n     * @public\n     * HTML Attribute: anchor\n     */\n    this.anchor = \"\";\n    /**\n     * The delay in milliseconds before a tooltip is shown after a hover event\n     *\n     * @defaultValue - 300\n     * @public\n     * HTML Attribute: delay\n     */\n    this.delay = 300;\n    /**\n     * Controls when the tooltip updates its position, default is 'anchor' which only updates when\n     * the anchor is resized.  'auto' will update on scroll/resize events.\n     * Corresponds to anchored-region auto-update-mode.\n     * @public\n     * @remarks\n     * HTML Attribute: auto-update-mode\n     */\n    this.autoUpdateMode = \"anchor\";\n    /**\n     * the html element currently being used as anchor.\n     * Setting this directly overrides the anchor attribute.\n     *\n     * @public\n     */\n    this.anchorElement = null;\n    /**\n     * The current viewport element instance\n     *\n     * @internal\n     */\n    this.viewportElement = null;\n    /**\n     * @internal\n     * @defaultValue \"dynamic\"\n     */\n    this.verticalPositioningMode = \"dynamic\";\n    /**\n     * @internal\n     * @defaultValue \"dynamic\"\n     */\n    this.horizontalPositioningMode = \"dynamic\";\n    /**\n     * @internal\n     */\n    this.horizontalInset = \"false\";\n    /**\n     * @internal\n     */\n    this.verticalInset = \"false\";\n    /**\n     * @internal\n     */\n    this.horizontalScaling = \"content\";\n    /**\n     * @internal\n     */\n    this.verticalScaling = \"content\";\n    /**\n     * @internal\n     */\n    this.verticalDefaultPosition = undefined;\n    /**\n     * @internal\n     */\n    this.horizontalDefaultPosition = undefined;\n    /**\n     * @internal\n     */\n    this.tooltipVisible = false;\n    /**\n     * Track current direction to pass to the anchored region\n     * updated when tooltip is shown\n     *\n     * @internal\n     */\n    this.currentDirection = Direction.ltr;\n    /**\n     * The timer that tracks delay time before the tooltip is shown on hover\n     */\n    this.showDelayTimer = null;\n    /**\n     * The timer that tracks delay time before the tooltip is hidden\n     */\n    this.hideDelayTimer = null;\n    /**\n     * Indicates whether the anchor is currently being hovered or has focus\n     */\n    this.isAnchorHoveredFocused = false;\n    /**\n     * Indicates whether the region is currently being hovered\n     */\n    this.isRegionHovered = false;\n    /**\n     * invoked when the anchored region's position relative to the anchor changes\n     *\n     * @internal\n     */\n    this.handlePositionChange = ev => {\n      this.classList.toggle(\"top\", this.region.verticalPosition === \"start\");\n      this.classList.toggle(\"bottom\", this.region.verticalPosition === \"end\");\n      this.classList.toggle(\"inset-top\", this.region.verticalPosition === \"insetStart\");\n      this.classList.toggle(\"inset-bottom\", this.region.verticalPosition === \"insetEnd\");\n      this.classList.toggle(\"center-vertical\", this.region.verticalPosition === \"center\");\n      this.classList.toggle(\"left\", this.region.horizontalPosition === \"start\");\n      this.classList.toggle(\"right\", this.region.horizontalPosition === \"end\");\n      this.classList.toggle(\"inset-left\", this.region.horizontalPosition === \"insetStart\");\n      this.classList.toggle(\"inset-right\", this.region.horizontalPosition === \"insetEnd\");\n      this.classList.toggle(\"center-horizontal\", this.region.horizontalPosition === \"center\");\n    };\n    /**\n     * mouse enters region\n     */\n    this.handleRegionMouseOver = ev => {\n      this.isRegionHovered = true;\n    };\n    /**\n     * mouse leaves region\n     */\n    this.handleRegionMouseOut = ev => {\n      this.isRegionHovered = false;\n      this.startHideDelayTimer();\n    };\n    /**\n     * mouse enters anchor\n     */\n    this.handleAnchorMouseOver = ev => {\n      if (this.tooltipVisible) {\n        // tooltip is already visible, just set the anchor hover flag\n        this.isAnchorHoveredFocused = true;\n        return;\n      }\n      this.startShowDelayTimer();\n    };\n    /**\n     * mouse leaves anchor\n     */\n    this.handleAnchorMouseOut = ev => {\n      this.isAnchorHoveredFocused = false;\n      this.clearShowDelayTimer();\n      this.startHideDelayTimer();\n    };\n    /**\n     * anchor gets focus\n     */\n    this.handleAnchorFocusIn = ev => {\n      this.startShowDelayTimer();\n    };\n    /**\n     * anchor loses focus\n     */\n    this.handleAnchorFocusOut = ev => {\n      this.isAnchorHoveredFocused = false;\n      this.clearShowDelayTimer();\n      this.startHideDelayTimer();\n    };\n    /**\n     * starts the hide timer\n     */\n    this.startHideDelayTimer = () => {\n      this.clearHideDelayTimer();\n      if (!this.tooltipVisible) {\n        return;\n      }\n      // allow 60 ms for account for pointer to move between anchor/tooltip\n      // without hiding tooltip\n      this.hideDelayTimer = window.setTimeout(() => {\n        this.updateTooltipVisibility();\n      }, 60);\n    };\n    /**\n     * clears the hide delay\n     */\n    this.clearHideDelayTimer = () => {\n      if (this.hideDelayTimer !== null) {\n        clearTimeout(this.hideDelayTimer);\n        this.hideDelayTimer = null;\n      }\n    };\n    /**\n     * starts the show timer if not currently running\n     */\n    this.startShowDelayTimer = () => {\n      if (this.isAnchorHoveredFocused) {\n        return;\n      }\n      if (this.delay > 1) {\n        if (this.showDelayTimer === null) this.showDelayTimer = window.setTimeout(() => {\n          this.startHover();\n        }, this.delay);\n        return;\n      }\n      this.startHover();\n    };\n    /**\n     * start hover\n     */\n    this.startHover = () => {\n      this.isAnchorHoveredFocused = true;\n      this.updateTooltipVisibility();\n    };\n    /**\n     * clears the show delay\n     */\n    this.clearShowDelayTimer = () => {\n      if (this.showDelayTimer !== null) {\n        clearTimeout(this.showDelayTimer);\n        this.showDelayTimer = null;\n      }\n    };\n    /**\n     *  Gets the anchor element by id\n     */\n    this.getAnchor = () => {\n      const rootNode = this.getRootNode();\n      if (rootNode instanceof ShadowRoot) {\n        return rootNode.getElementById(this.anchor);\n      }\n      return document.getElementById(this.anchor);\n    };\n    /**\n     * handles key down events to check for dismiss\n     */\n    this.handleDocumentKeydown = e => {\n      if (!e.defaultPrevented && this.tooltipVisible) {\n        switch (e.key) {\n          case keyEscape:\n            this.isAnchorHoveredFocused = false;\n            this.updateTooltipVisibility();\n            this.$emit(\"dismiss\");\n            break;\n        }\n      }\n    };\n    /**\n     * determines whether to show or hide the tooltip based on current state\n     */\n    this.updateTooltipVisibility = () => {\n      if (this.visible === false) {\n        this.hideTooltip();\n      } else if (this.visible === true) {\n        this.showTooltip();\n        return;\n      } else {\n        if (this.isAnchorHoveredFocused || this.isRegionHovered) {\n          this.showTooltip();\n          return;\n        }\n        this.hideTooltip();\n      }\n    };\n    /**\n     * shows the tooltip\n     */\n    this.showTooltip = () => {\n      if (this.tooltipVisible) {\n        return;\n      }\n      this.currentDirection = getDirection(this);\n      this.tooltipVisible = true;\n      document.addEventListener(\"keydown\", this.handleDocumentKeydown);\n      DOM.queueUpdate(this.setRegionProps);\n    };\n    /**\n     * hides the tooltip\n     */\n    this.hideTooltip = () => {\n      if (!this.tooltipVisible) {\n        return;\n      }\n      this.clearHideDelayTimer();\n      if (this.region !== null && this.region !== undefined) {\n        this.region.removeEventListener(\"positionchange\", this.handlePositionChange);\n        this.region.viewportElement = null;\n        this.region.anchorElement = null;\n        this.region.removeEventListener(\"mouseover\", this.handleRegionMouseOver);\n        this.region.removeEventListener(\"mouseout\", this.handleRegionMouseOut);\n      }\n      document.removeEventListener(\"keydown\", this.handleDocumentKeydown);\n      this.tooltipVisible = false;\n    };\n    /**\n     * updates the tooltip anchored region props after it has been\n     * added to the DOM\n     */\n    this.setRegionProps = () => {\n      if (!this.tooltipVisible) {\n        return;\n      }\n      this.region.viewportElement = this.viewportElement;\n      this.region.anchorElement = this.anchorElement;\n      this.region.addEventListener(\"positionchange\", this.handlePositionChange);\n      this.region.addEventListener(\"mouseover\", this.handleRegionMouseOver, {\n        passive: true\n      });\n      this.region.addEventListener(\"mouseout\", this.handleRegionMouseOut, {\n        passive: true\n      });\n    };\n  }\n  visibleChanged() {\n    if (this.$fastController.isConnected) {\n      this.updateTooltipVisibility();\n      this.updateLayout();\n    }\n  }\n  anchorChanged() {\n    if (this.$fastController.isConnected) {\n      this.anchorElement = this.getAnchor();\n    }\n  }\n  positionChanged() {\n    if (this.$fastController.isConnected) {\n      this.updateLayout();\n    }\n  }\n  anchorElementChanged(oldValue) {\n    if (this.$fastController.isConnected) {\n      if (oldValue !== null && oldValue !== undefined) {\n        oldValue.removeEventListener(\"mouseover\", this.handleAnchorMouseOver);\n        oldValue.removeEventListener(\"mouseout\", this.handleAnchorMouseOut);\n        oldValue.removeEventListener(\"focusin\", this.handleAnchorFocusIn);\n        oldValue.removeEventListener(\"focusout\", this.handleAnchorFocusOut);\n      }\n      if (this.anchorElement !== null && this.anchorElement !== undefined) {\n        this.anchorElement.addEventListener(\"mouseover\", this.handleAnchorMouseOver, {\n          passive: true\n        });\n        this.anchorElement.addEventListener(\"mouseout\", this.handleAnchorMouseOut, {\n          passive: true\n        });\n        this.anchorElement.addEventListener(\"focusin\", this.handleAnchorFocusIn, {\n          passive: true\n        });\n        this.anchorElement.addEventListener(\"focusout\", this.handleAnchorFocusOut, {\n          passive: true\n        });\n        const anchorId = this.anchorElement.id;\n        if (this.anchorElement.parentElement !== null) {\n          this.anchorElement.parentElement.querySelectorAll(\":hover\").forEach(element => {\n            if (element.id === anchorId) {\n              this.startShowDelayTimer();\n            }\n          });\n        }\n      }\n      if (this.region !== null && this.region !== undefined && this.tooltipVisible) {\n        this.region.anchorElement = this.anchorElement;\n      }\n      this.updateLayout();\n    }\n  }\n  viewportElementChanged() {\n    if (this.region !== null && this.region !== undefined) {\n      this.region.viewportElement = this.viewportElement;\n    }\n    this.updateLayout();\n  }\n  connectedCallback() {\n    super.connectedCallback();\n    this.anchorElement = this.getAnchor();\n    this.updateTooltipVisibility();\n  }\n  disconnectedCallback() {\n    this.hideTooltip();\n    this.clearShowDelayTimer();\n    this.clearHideDelayTimer();\n    super.disconnectedCallback();\n  }\n  /**\n   * updated the properties being passed to the anchored region\n   */\n  updateLayout() {\n    this.verticalPositioningMode = \"locktodefault\";\n    this.horizontalPositioningMode = \"locktodefault\";\n    switch (this.position) {\n      case TooltipPosition.top:\n      case TooltipPosition.bottom:\n        this.verticalDefaultPosition = this.position;\n        this.horizontalDefaultPosition = \"center\";\n        break;\n      case TooltipPosition.right:\n      case TooltipPosition.left:\n      case TooltipPosition.start:\n      case TooltipPosition.end:\n        this.verticalDefaultPosition = \"center\";\n        this.horizontalDefaultPosition = this.position;\n        break;\n      case TooltipPosition.topLeft:\n        this.verticalDefaultPosition = \"top\";\n        this.horizontalDefaultPosition = \"left\";\n        break;\n      case TooltipPosition.topRight:\n        this.verticalDefaultPosition = \"top\";\n        this.horizontalDefaultPosition = \"right\";\n        break;\n      case TooltipPosition.bottomLeft:\n        this.verticalDefaultPosition = \"bottom\";\n        this.horizontalDefaultPosition = \"left\";\n        break;\n      case TooltipPosition.bottomRight:\n        this.verticalDefaultPosition = \"bottom\";\n        this.horizontalDefaultPosition = \"right\";\n        break;\n      case TooltipPosition.topStart:\n        this.verticalDefaultPosition = \"top\";\n        this.horizontalDefaultPosition = \"start\";\n        break;\n      case TooltipPosition.topEnd:\n        this.verticalDefaultPosition = \"top\";\n        this.horizontalDefaultPosition = \"end\";\n        break;\n      case TooltipPosition.bottomStart:\n        this.verticalDefaultPosition = \"bottom\";\n        this.horizontalDefaultPosition = \"start\";\n        break;\n      case TooltipPosition.bottomEnd:\n        this.verticalDefaultPosition = \"bottom\";\n        this.horizontalDefaultPosition = \"end\";\n        break;\n      default:\n        this.verticalPositioningMode = \"dynamic\";\n        this.horizontalPositioningMode = \"dynamic\";\n        this.verticalDefaultPosition = void 0;\n        this.horizontalDefaultPosition = \"center\";\n        break;\n    }\n  }\n}\n__decorate$1([attr({\n  mode: \"boolean\"\n})], Tooltip$1.prototype, \"visible\", void 0);\n__decorate$1([attr], Tooltip$1.prototype, \"anchor\", void 0);\n__decorate$1([attr], Tooltip$1.prototype, \"delay\", void 0);\n__decorate$1([attr], Tooltip$1.prototype, \"position\", void 0);\n__decorate$1([attr({\n  attribute: \"auto-update-mode\"\n})], Tooltip$1.prototype, \"autoUpdateMode\", void 0);\n__decorate$1([attr({\n  attribute: \"horizontal-viewport-lock\"\n})], Tooltip$1.prototype, \"horizontalViewportLock\", void 0);\n__decorate$1([attr({\n  attribute: \"vertical-viewport-lock\"\n})], Tooltip$1.prototype, \"verticalViewportLock\", void 0);\n__decorate$1([observable], Tooltip$1.prototype, \"anchorElement\", void 0);\n__decorate$1([observable], Tooltip$1.prototype, \"viewportElement\", void 0);\n__decorate$1([observable], Tooltip$1.prototype, \"verticalPositioningMode\", void 0);\n__decorate$1([observable], Tooltip$1.prototype, \"horizontalPositioningMode\", void 0);\n__decorate$1([observable], Tooltip$1.prototype, \"horizontalInset\", void 0);\n__decorate$1([observable], Tooltip$1.prototype, \"verticalInset\", void 0);\n__decorate$1([observable], Tooltip$1.prototype, \"horizontalScaling\", void 0);\n__decorate$1([observable], Tooltip$1.prototype, \"verticalScaling\", void 0);\n__decorate$1([observable], Tooltip$1.prototype, \"verticalDefaultPosition\", void 0);\n__decorate$1([observable], Tooltip$1.prototype, \"horizontalDefaultPosition\", void 0);\n__decorate$1([observable], Tooltip$1.prototype, \"tooltipVisible\", void 0);\n__decorate$1([observable], Tooltip$1.prototype, \"currentDirection\", void 0);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#(TreeItem:class)} component.\n * @public\n */\nconst treeItemTemplate = (context, definition) => html`<template role=\"treeitem\" slot=\"${x => x.isNestedItem() ? \"item\" : void 0}\" tabindex=\"-1\" class=\"${x => x.expanded ? \"expanded\" : \"\"} ${x => x.selected ? \"selected\" : \"\"} ${x => x.nested ? \"nested\" : \"\"} ${x => x.disabled ? \"disabled\" : \"\"}\" aria-expanded=\"${x => x.childItems && x.childItemLength() > 0 ? x.expanded : void 0}\" aria-selected=\"${x => x.selected}\" aria-disabled=\"${x => x.disabled}\" @focusin=\"${(x, c) => x.handleFocus(c.event)}\" @focusout=\"${(x, c) => x.handleBlur(c.event)}\" ${children({\n  property: \"childItems\",\n  filter: elements()\n})}><div class=\"positioning-region\" part=\"positioning-region\"><div class=\"content-region\" part=\"content-region\">${when(x => x.childItems && x.childItemLength() > 0, html`<div aria-hidden=\"true\" class=\"expand-collapse-button\" part=\"expand-collapse-button\" @click=\"${(x, c) => x.handleExpandCollapseButtonClick(c.event)}\" ${ref(\"expandCollapseButton\")}><slot name=\"expand-collapse-glyph\">${definition.expandCollapseGlyph || \"\"}</slot></div>`)} ${startSlotTemplate(context, definition)}<slot></slot>${endSlotTemplate(context, definition)}</div></div>${when(x => x.childItems && x.childItemLength() > 0 && (x.expanded || x.renderCollapsedChildren), html`<div role=\"group\" class=\"items\" part=\"items\"><slot name=\"item\" ${slotted(\"items\")}></slot></div>`)}</template>`;\n\n/**\n * check if the item is a tree item\n * @public\n * @remarks\n * determines if element is an HTMLElement and if it has the role treeitem\n */\nfunction isTreeItemElement(el) {\n  return isHTMLElement(el) && el.getAttribute(\"role\") === \"treeitem\";\n}\n/**\n * A Tree item Custom HTML Element.\n *\n * @slot start - Content which can be provided before the tree item content\n * @slot end - Content which can be provided after the tree item content\n * @slot - The default slot for tree item text content\n * @slot item - The slot for tree items (fast tree items manage this assignment themselves)\n * @slot expand-collapse-button - The expand/collapse button\n * @csspart positioning-region - The element used to position the tree item content with exception of any child nodes\n * @csspart content-region - The element containing the expand/collapse, start, and end slots\n * @csspart items - The element wrapping any child items\n * @csspart expand-collapse-button - The expand/collapse button\n * @fires expanded-change - Fires a custom 'expanded-change' event when the expanded state changes\n * @fires selected-change - Fires a custom 'selected-change' event when the selected state changes\n *\n * @public\n */\nclass TreeItem extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * When true, the control will be appear expanded by user interaction.\n     * @public\n     * @remarks\n     * HTML Attribute: expanded\n     */\n    this.expanded = false;\n    /**\n     * Whether the item is focusable\n     *\n     * @internal\n     */\n    this.focusable = false;\n    /**\n     * Whether the tree is nested\n     *\n     * @public\n     */\n    this.isNestedItem = () => {\n      return isTreeItemElement(this.parentElement);\n    };\n    /**\n     * Handle expand button click\n     *\n     * @internal\n     */\n    this.handleExpandCollapseButtonClick = e => {\n      if (!this.disabled && !e.defaultPrevented) {\n        this.expanded = !this.expanded;\n      }\n    };\n    /**\n     * Handle focus events\n     *\n     * @internal\n     */\n    this.handleFocus = e => {\n      this.setAttribute(\"tabindex\", \"0\");\n    };\n    /**\n     * Handle blur events\n     *\n     * @internal\n     */\n    this.handleBlur = e => {\n      this.setAttribute(\"tabindex\", \"-1\");\n    };\n  }\n  expandedChanged() {\n    if (this.$fastController.isConnected) {\n      this.$emit(\"expanded-change\", this);\n    }\n  }\n  selectedChanged() {\n    if (this.$fastController.isConnected) {\n      this.$emit(\"selected-change\", this);\n    }\n  }\n  itemsChanged(oldValue, newValue) {\n    if (this.$fastController.isConnected) {\n      this.items.forEach(node => {\n        if (isTreeItemElement(node)) {\n          // TODO: maybe not require it to be a TreeItem?\n          node.nested = true;\n        }\n      });\n    }\n  }\n  /**\n   * Places document focus on a tree item\n   *\n   * @public\n   * @param el - the element to focus\n   */\n  static focusItem(el) {\n    el.focusable = true;\n    el.focus();\n  }\n  /**\n   * Gets number of children\n   *\n   * @internal\n   */\n  childItemLength() {\n    const treeChildren = this.childItems.filter(item => {\n      return isTreeItemElement(item);\n    });\n    return treeChildren ? treeChildren.length : 0;\n  }\n}\n__decorate$1([attr({\n  mode: \"boolean\"\n})], TreeItem.prototype, \"expanded\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], TreeItem.prototype, \"selected\", void 0);\n__decorate$1([attr({\n  mode: \"boolean\"\n})], TreeItem.prototype, \"disabled\", void 0);\n__decorate$1([observable], TreeItem.prototype, \"focusable\", void 0);\n__decorate$1([observable], TreeItem.prototype, \"childItems\", void 0);\n__decorate$1([observable], TreeItem.prototype, \"items\", void 0);\n__decorate$1([observable], TreeItem.prototype, \"nested\", void 0);\n__decorate$1([observable], TreeItem.prototype, \"renderCollapsedChildren\", void 0);\napplyMixins(TreeItem, StartEnd);\n\n/**\n * The template for the {@link @microsoft/fast-foundation#TreeView} component.\n * @public\n */\nconst treeViewTemplate = (context, definition) => html`<template role=\"tree\" ${ref(\"treeView\")} @keydown=\"${(x, c) => x.handleKeyDown(c.event)}\" @focusin=\"${(x, c) => x.handleFocus(c.event)}\" @focusout=\"${(x, c) => x.handleBlur(c.event)}\" @click=\"${(x, c) => x.handleClick(c.event)}\" @selected-change=\"${(x, c) => x.handleSelectedChange(c.event)}\"><slot ${slotted(\"slottedTreeItems\")}></slot></template>`;\n\n/**\n * A Tree view Custom HTML Element.\n * Implements the {@link https://w3c.github.io/aria-practices/#TreeView | ARIA TreeView }.\n *\n * @slot - The default slot for tree items\n *\n * @public\n */\nclass TreeView extends FoundationElement {\n  constructor() {\n    super(...arguments);\n    /**\n     * The tree item that is designated to be in the tab queue.\n     *\n     * @internal\n     */\n    this.currentFocused = null;\n    /**\n     * Handle focus events\n     *\n     * @internal\n     */\n    this.handleFocus = e => {\n      if (this.slottedTreeItems.length < 1) {\n        // no child items, nothing to do\n        return;\n      }\n      if (e.target === this) {\n        if (this.currentFocused === null) {\n          this.currentFocused = this.getValidFocusableItem();\n        }\n        if (this.currentFocused !== null) {\n          TreeItem.focusItem(this.currentFocused);\n        }\n        return;\n      }\n      if (this.contains(e.target)) {\n        this.setAttribute(\"tabindex\", \"-1\");\n        this.currentFocused = e.target;\n      }\n    };\n    /**\n     * Handle blur events\n     *\n     * @internal\n     */\n    this.handleBlur = e => {\n      if (e.target instanceof HTMLElement && (e.relatedTarget === null || !this.contains(e.relatedTarget))) {\n        this.setAttribute(\"tabindex\", \"0\");\n      }\n    };\n    /**\n     * KeyDown handler\n     *\n     *  @internal\n     */\n    this.handleKeyDown = e => {\n      if (e.defaultPrevented) {\n        return;\n      }\n      if (this.slottedTreeItems.length < 1) {\n        return true;\n      }\n      const treeItems = this.getVisibleNodes();\n      switch (e.key) {\n        case keyHome:\n          if (treeItems.length) {\n            TreeItem.focusItem(treeItems[0]);\n          }\n          return;\n        case keyEnd:\n          if (treeItems.length) {\n            TreeItem.focusItem(treeItems[treeItems.length - 1]);\n          }\n          return;\n        case keyArrowLeft:\n          if (e.target && this.isFocusableElement(e.target)) {\n            const item = e.target;\n            if (item instanceof TreeItem && item.childItemLength() > 0 && item.expanded) {\n              item.expanded = false;\n            } else if (item instanceof TreeItem && item.parentElement instanceof TreeItem) {\n              TreeItem.focusItem(item.parentElement);\n            }\n          }\n          return false;\n        case keyArrowRight:\n          if (e.target && this.isFocusableElement(e.target)) {\n            const item = e.target;\n            if (item instanceof TreeItem && item.childItemLength() > 0 && !item.expanded) {\n              item.expanded = true;\n            } else if (item instanceof TreeItem && item.childItemLength() > 0) {\n              this.focusNextNode(1, e.target);\n            }\n          }\n          return;\n        case keyArrowDown:\n          if (e.target && this.isFocusableElement(e.target)) {\n            this.focusNextNode(1, e.target);\n          }\n          return;\n        case keyArrowUp:\n          if (e.target && this.isFocusableElement(e.target)) {\n            this.focusNextNode(-1, e.target);\n          }\n          return;\n        case keyEnter:\n          // In single-select trees where selection does not follow focus (see note below),\n          // the default action is typically to select the focused node.\n          this.handleClick(e);\n          return;\n      }\n      // don't prevent default if we took no action\n      return true;\n    };\n    /**\n     * Handles the selected-changed events bubbling up\n     * from child tree items\n     *\n     *  @internal\n     */\n    this.handleSelectedChange = e => {\n      if (e.defaultPrevented) {\n        return;\n      }\n      if (!(e.target instanceof Element) || !isTreeItemElement(e.target)) {\n        return true;\n      }\n      const item = e.target;\n      if (item.selected) {\n        if (this.currentSelected && this.currentSelected !== item) {\n          this.currentSelected.selected = false;\n        }\n        // new selected item\n        this.currentSelected = item;\n      } else if (!item.selected && this.currentSelected === item) {\n        // selected item deselected\n        this.currentSelected = null;\n      }\n      return;\n    };\n    /**\n     * Updates the tree view when slottedTreeItems changes\n     */\n    this.setItems = () => {\n      // force single selection\n      // defaults to first one found\n      const selectedItem = this.treeView.querySelector(\"[aria-selected='true']\");\n      this.currentSelected = selectedItem;\n      // invalidate the current focused item if it is no longer valid\n      if (this.currentFocused === null || !this.contains(this.currentFocused)) {\n        this.currentFocused = this.getValidFocusableItem();\n      }\n      // toggle properties on child elements\n      this.nested = this.checkForNestedItems();\n      const treeItems = this.getVisibleNodes();\n      treeItems.forEach(node => {\n        if (isTreeItemElement(node)) {\n          node.nested = this.nested;\n        }\n      });\n    };\n    /**\n     * check if the item is focusable\n     */\n    this.isFocusableElement = el => {\n      return isTreeItemElement(el);\n    };\n    this.isSelectedElement = el => {\n      return el.selected;\n    };\n  }\n  slottedTreeItemsChanged() {\n    if (this.$fastController.isConnected) {\n      // update for slotted children change\n      this.setItems();\n    }\n  }\n  connectedCallback() {\n    super.connectedCallback();\n    this.setAttribute(\"tabindex\", \"0\");\n    DOM.queueUpdate(() => {\n      this.setItems();\n    });\n  }\n  /**\n   * Handles click events bubbling up\n   *\n   *  @internal\n   */\n  handleClick(e) {\n    if (e.defaultPrevented) {\n      // handled, do nothing\n      return;\n    }\n    if (!(e.target instanceof Element) || !isTreeItemElement(e.target)) {\n      // not a tree item, ignore\n      return true;\n    }\n    const item = e.target;\n    if (!item.disabled) {\n      item.selected = !item.selected;\n    }\n    return;\n  }\n  /**\n   * Move focus to a tree item based on its offset from the provided item\n   */\n  focusNextNode(delta, item) {\n    const visibleNodes = this.getVisibleNodes();\n    if (!visibleNodes) {\n      return;\n    }\n    const focusItem = visibleNodes[visibleNodes.indexOf(item) + delta];\n    if (isHTMLElement(focusItem)) {\n      TreeItem.focusItem(focusItem);\n    }\n  }\n  /**\n   * checks if there are any nested tree items\n   */\n  getValidFocusableItem() {\n    const treeItems = this.getVisibleNodes();\n    // default to selected element if there is one\n    let focusIndex = treeItems.findIndex(this.isSelectedElement);\n    if (focusIndex === -1) {\n      // otherwise first focusable tree item\n      focusIndex = treeItems.findIndex(this.isFocusableElement);\n    }\n    if (focusIndex !== -1) {\n      return treeItems[focusIndex];\n    }\n    return null;\n  }\n  /**\n   * checks if there are any nested tree items\n   */\n  checkForNestedItems() {\n    return this.slottedTreeItems.some(node => {\n      return isTreeItemElement(node) && node.querySelector(\"[role='treeitem']\");\n    });\n  }\n  getVisibleNodes() {\n    return getDisplayedNodes(this, \"[role='treeitem']\") || [];\n  }\n}\n__decorate$1([attr({\n  attribute: \"render-collapsed-nodes\"\n})], TreeView.prototype, \"renderCollapsedNodes\", void 0);\n__decorate$1([observable], TreeView.prototype, \"currentSelected\", void 0);\n__decorate$1([observable], TreeView.prototype, \"slottedTreeItems\", void 0);\n\n/**\n * An abstract behavior to react to media queries. Implementations should implement\n * the `constructListener` method to perform some action based on media query changes.\n *\n * @public\n */\nclass MatchMediaBehavior {\n  /**\n   *\n   * @param query - The media query to operate from.\n   */\n  constructor(query) {\n    /**\n     * The behavior needs to operate on element instances but elements might share a behavior instance.\n     * To ensure proper attachment / detachment per instance, we construct a listener for\n     * each bind invocation and cache the listeners by element reference.\n     */\n    this.listenerCache = new WeakMap();\n    this.query = query;\n  }\n  /**\n   * Binds the behavior to the element.\n   * @param source - The element for which the behavior is bound.\n   */\n  bind(source) {\n    const {\n      query\n    } = this;\n    const listener = this.constructListener(source);\n    // Invoke immediately to add if the query currently matches\n    listener.bind(query)();\n    query.addListener(listener);\n    this.listenerCache.set(source, listener);\n  }\n  /**\n   * Unbinds the behavior from the element.\n   * @param source - The element for which the behavior is unbinding.\n   */\n  unbind(source) {\n    const listener = this.listenerCache.get(source);\n    if (listener) {\n      this.query.removeListener(listener);\n      this.listenerCache.delete(source);\n    }\n  }\n}\n/**\n * A behavior to add or remove a stylesheet from an element based on a media query. The behavior ensures that\n * styles are applied while the a query matches the environment and that styles are not applied if the query does\n * not match the environment.\n *\n * @public\n */\nclass MatchMediaStyleSheetBehavior extends MatchMediaBehavior {\n  /**\n   * Constructs a {@link MatchMediaStyleSheetBehavior} instance.\n   * @param query - The media query to operate from.\n   * @param styles - The styles to coordinate with the query.\n   */\n  constructor(query, styles) {\n    super(query);\n    this.styles = styles;\n  }\n  /**\n   * Defines a function to construct {@link MatchMediaStyleSheetBehavior | MatchMediaStyleSheetBehaviors} for\n   * a provided query.\n   * @param query - The media query to operate from.\n   *\n   * @public\n   * @example\n   *\n   * ```ts\n   * import { css } from \"@microsoft/fast-element\";\n   * import { MatchMediaStyleSheetBehavior } from \"@microsoft/fast-foundation\";\n   *\n   * const landscapeBehavior = MatchMediaStyleSheetBehavior.with(\n   *   window.matchMedia(\"(orientation: landscape)\")\n   * );\n   * const styles = css`\n   *   :host {\n   *     width: 200px;\n   *     height: 400px;\n   *   }\n   * `\n   * .withBehaviors(landscapeBehavior(css`\n   *   :host {\n   *     width: 400px;\n   *     height: 200px;\n   *   }\n   * `))\n   * ```\n   */\n  static with(query) {\n    return styles => {\n      return new MatchMediaStyleSheetBehavior(query, styles);\n    };\n  }\n  /**\n   * Constructs a match-media listener for a provided element.\n   * @param source - the element for which to attach or detach styles.\n   * @internal\n   */\n  constructListener(source) {\n    let attached = false;\n    const styles = this.styles;\n    return function listener() {\n      const {\n        matches\n      } = this;\n      if (matches && !attached) {\n        source.$fastController.addStyles(styles);\n        attached = matches;\n      } else if (!matches && attached) {\n        source.$fastController.removeStyles(styles);\n        attached = matches;\n      }\n    };\n  }\n  /**\n   * Unbinds the behavior from the element.\n   * @param source - The element for which the behavior is unbinding.\n   * @internal\n   */\n  unbind(source) {\n    super.unbind(source);\n    source.$fastController.removeStyles(this.styles);\n  }\n}\n/**\n * This can be used to construct a behavior to apply a forced-colors only stylesheet.\n * @public\n */\nconst forcedColorsStylesheetBehavior = MatchMediaStyleSheetBehavior.with(window.matchMedia(\"(forced-colors)\"));\n/**\n * This can be used to construct a behavior to apply a prefers color scheme: dark only stylesheet.\n * @public\n */\nMatchMediaStyleSheetBehavior.with(window.matchMedia(\"(prefers-color-scheme: dark)\"));\n/**\n * This can be used to construct a behavior to apply a prefers color scheme: light only stylesheet.\n * @public\n */\nMatchMediaStyleSheetBehavior.with(window.matchMedia(\"(prefers-color-scheme: light)\"));\n\n/**\n * A behavior to add or remove a stylesheet from an element based on a property. The behavior ensures that\n * styles are applied while the property matches and that styles are not applied if the property does\n * not match.\n *\n * @public\n */\nclass PropertyStyleSheetBehavior {\n  /**\n   * Constructs a {@link PropertyStyleSheetBehavior} instance.\n   * @param propertyName - The property name to operate from.\n   * @param value - The property value to operate from.\n   * @param styles - The styles to coordinate with the property.\n   */\n  constructor(propertyName, value, styles) {\n    this.propertyName = propertyName;\n    this.value = value;\n    this.styles = styles;\n  }\n  /**\n   * Binds the behavior to the element.\n   * @param elementInstance - The element for which the property is applied.\n   */\n  bind(elementInstance) {\n    Observable.getNotifier(elementInstance).subscribe(this, this.propertyName);\n    this.handleChange(elementInstance, this.propertyName);\n  }\n  /**\n   * Unbinds the behavior from the element.\n   * @param source - The element for which the behavior is unbinding.\n   * @internal\n   */\n  unbind(source) {\n    Observable.getNotifier(source).unsubscribe(this, this.propertyName);\n    source.$fastController.removeStyles(this.styles);\n  }\n  /**\n   * Change event for the provided element.\n   * @param source - the element for which to attach or detach styles.\n   * @param key - the key to lookup to know if the element already has the styles\n   * @internal\n   */\n  handleChange(source, key) {\n    if (source[key] === this.value) {\n      source.$fastController.addStyles(this.styles);\n    } else {\n      source.$fastController.removeStyles(this.styles);\n    }\n  }\n}\n\n/**\n * The CSS value for disabled cursors.\n * @public\n */\nconst disabledCursor = \"not-allowed\";\n\n/**\n * A CSS fragment to set `display: none;` when the host is hidden using the [hidden] attribute.\n * @public\n */\nconst hidden = `:host([hidden]){display:none}`;\n/**\n * Applies a CSS display property.\n * Also adds CSS rules to not display the element when the [hidden] attribute is applied to the element.\n * @param display - The CSS display property value\n * @public\n */\nfunction display(displayValue) {\n  return `${hidden}:host{display:${displayValue}}`;\n}\n\n/**\n * The string representing the focus selector to be used. Value\n * will be \"focus-visible\" when https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo\n * is supported and \"focus\" when it is not.\n *\n * @public\n */\nconst focusVisible = canUseFocusVisible() ? \"focus-visible\" : \"focus\";\n\n/**\n * Ensures that an input number does not exceed a max value and is not less than a min value.\n * @param i - the number to clamp\n * @param min - the maximum (inclusive) value\n * @param max - the minimum (inclusive) value\n * @public\n */\nfunction clamp(i, min, max) {\n  if (isNaN(i) || i <= min) {\n    return min;\n  } else if (i >= max) {\n    return max;\n  }\n  return i;\n}\n/**\n * Scales an input to a number between 0 and 1\n * @param i - a number between min and max\n * @param min - the max value\n * @param max - the min value\n * @public\n */\nfunction normalize(i, min, max) {\n  if (isNaN(i) || i <= min) {\n    return 0.0;\n  } else if (i >= max) {\n    return 1.0;\n  }\n  return i / (max - min);\n}\n/**\n * Scales a number between 0 and 1\n * @param i - the number to denormalize\n * @param min - the min value\n * @param max - the max value\n * @public\n */\nfunction denormalize(i, min, max) {\n  if (isNaN(i)) {\n    return min;\n  }\n  return min + i * (max - min);\n}\n/**\n * Converts a number between 0 and 255 to a hex string.\n * @param i - the number to convert to a hex string\n * @public\n */\nfunction getHexStringForByte(i) {\n  const s = Math.round(clamp(i, 0.0, 255.0)).toString(16);\n  if (s.length === 1) {\n    return \"0\" + s;\n  }\n  return s;\n}\n/**\n * Linearly interpolate\n * @public\n */\nfunction lerp(i, min, max) {\n  if (isNaN(i) || i <= 0.0) {\n    return min;\n  } else if (i >= 1.0) {\n    return max;\n  }\n  return min + i * (max - min);\n}\n/**\n *\n * Will return infinity if i*10^(precision) overflows number\n * note that floating point rounding rules come into play here\n * so values that end up rounding on a .5 round to the nearest\n * even not always up so 2.5 rounds to 2\n * @param i - the number to round\n * @param precision - the precision to round to\n *\n * @public\n */\nfunction roundToPrecisionSmall(i, precision) {\n  const factor = Math.pow(10, precision);\n  return Math.round(i * factor) / factor;\n}\n\n/**\n * This uses Hue values in \"degree\" format. So expect a range of [0,360]. Some other implementations instead uses radians or a normalized Hue with range [0,1]. Be aware of this when checking values or using other libraries.\n *\n * @public\n */\nclass ColorHSL {\n  constructor(hue, sat, lum) {\n    this.h = hue;\n    this.s = sat;\n    this.l = lum;\n  }\n  /**\n   * Construct a {@link ColorHSL} from a config object.\n   */\n  static fromObject(data) {\n    if (data && !isNaN(data.h) && !isNaN(data.s) && !isNaN(data.l)) {\n      return new ColorHSL(data.h, data.s, data.l);\n    }\n    return null;\n  }\n  /**\n   * Determines if a color is equal to another\n   * @param rhs - the value to compare\n   */\n  equalValue(rhs) {\n    return this.h === rhs.h && this.s === rhs.s && this.l === rhs.l;\n  }\n  /**\n   * Returns a new {@link ColorHSL} rounded to the provided precision\n   * @param precision - the precision to round to\n   */\n  roundToPrecision(precision) {\n    return new ColorHSL(roundToPrecisionSmall(this.h, precision), roundToPrecisionSmall(this.s, precision), roundToPrecisionSmall(this.l, precision));\n  }\n  /**\n   * Returns the {@link ColorHSL} formatted as an object.\n   */\n  toObject() {\n    return {\n      h: this.h,\n      s: this.s,\n      l: this.l\n    };\n  }\n}\n\n/**\n * {@link https://en.wikipedia.org/wiki/CIELAB_color_space | CIELAB color space}\n * This implementation uses the D65 constants for 2 degrees. That determines the constants used for the pure white point of the XYZ space of 0.95047, 1.0, 1.08883.\n * {@link https://en.wikipedia.org/wiki/Illuminant_D65}\n * These constants determine how the XYZ, LCH and LAB colors convert to/from RGB.\n *\n * @public\n */\nclass ColorLAB {\n  constructor(l, a, b) {\n    this.l = l;\n    this.a = a;\n    this.b = b;\n  }\n  /**\n   * Construct a {@link ColorLAB} from a config object.\n   */\n  static fromObject(data) {\n    if (data && !isNaN(data.l) && !isNaN(data.a) && !isNaN(data.b)) {\n      return new ColorLAB(data.l, data.a, data.b);\n    }\n    return null;\n  }\n  /**\n   * Determines if a color is equal to another\n   * @param rhs - the value to compare\n   */\n  equalValue(rhs) {\n    return this.l === rhs.l && this.a === rhs.a && this.b === rhs.b;\n  }\n  /**\n   * Returns a new {@link ColorLAB} rounded to the provided precision\n   * @param precision - the precision to round to\n   */\n  roundToPrecision(precision) {\n    return new ColorLAB(roundToPrecisionSmall(this.l, precision), roundToPrecisionSmall(this.a, precision), roundToPrecisionSmall(this.b, precision));\n  }\n  /**\n   * Returns the {@link ColorLAB} formatted as an object.\n   */\n  toObject() {\n    return {\n      l: this.l,\n      a: this.a,\n      b: this.b\n    };\n  }\n}\nColorLAB.epsilon = 216 / 24389;\nColorLAB.kappa = 24389 / 27;\n\n/**\n * A RGBA color with 64 bit channels.\n *\n * @example\n * ```ts\n * new ColorRGBA64(1, 0, 0, 1) // red\n * ```\n * @public\n */\nclass ColorRGBA64 {\n  /**\n   *\n   * @param red - the red value\n   * @param green - the green value\n   * @param blue - the blue value\n   * @param alpha - the alpha value\n   */\n  constructor(red, green, blue, alpha) {\n    this.r = red;\n    this.g = green;\n    this.b = blue;\n    this.a = typeof alpha === \"number\" && !isNaN(alpha) ? alpha : 1;\n  }\n  /**\n   * Construct a {@link ColorRGBA64} from a {@link ColorRGBA64Config}\n   * @param data - the config object\n   */\n  static fromObject(data) {\n    return data && !isNaN(data.r) && !isNaN(data.g) && !isNaN(data.b) ? new ColorRGBA64(data.r, data.g, data.b, data.a) : null;\n  }\n  /**\n   * Determines if one color is equal to another.\n   * @param rhs - the color to compare\n   */\n  equalValue(rhs) {\n    return this.r === rhs.r && this.g === rhs.g && this.b === rhs.b && this.a === rhs.a;\n  }\n  /**\n   * Returns the color formatted as a string; #RRGGBB\n   */\n  toStringHexRGB() {\n    return \"#\" + [this.r, this.g, this.b].map(this.formatHexValue).join(\"\");\n  }\n  /**\n   * Returns the color formatted as a string; #RRGGBBAA\n   */\n  toStringHexRGBA() {\n    return this.toStringHexRGB() + this.formatHexValue(this.a);\n  }\n  /**\n   * Returns the color formatted as a string; #AARRGGBB\n   */\n  toStringHexARGB() {\n    return \"#\" + [this.a, this.r, this.g, this.b].map(this.formatHexValue).join(\"\");\n  }\n  /**\n   * Returns the color formatted as a string; \"rgb(0xRR, 0xGG, 0xBB)\"\n   */\n  toStringWebRGB() {\n    return `rgb(${Math.round(denormalize(this.r, 0.0, 255.0))},${Math.round(denormalize(this.g, 0.0, 255.0))},${Math.round(denormalize(this.b, 0.0, 255.0))})`;\n  }\n  /**\n   * Returns the color formatted as a string; \"rgba(0xRR, 0xGG, 0xBB, a)\"\n   * @remarks\n   * Note that this follows the convention of putting alpha in the range [0.0,1.0] while the other three channels are [0,255]\n   */\n  toStringWebRGBA() {\n    return `rgba(${Math.round(denormalize(this.r, 0.0, 255.0))},${Math.round(denormalize(this.g, 0.0, 255.0))},${Math.round(denormalize(this.b, 0.0, 255.0))},${clamp(this.a, 0, 1)})`;\n  }\n  /**\n   * Returns a new {@link ColorRGBA64} rounded to the provided precision\n   * @param precision - the precision to round to\n   */\n  roundToPrecision(precision) {\n    return new ColorRGBA64(roundToPrecisionSmall(this.r, precision), roundToPrecisionSmall(this.g, precision), roundToPrecisionSmall(this.b, precision), roundToPrecisionSmall(this.a, precision));\n  }\n  /**\n   * Returns a new {@link ColorRGBA64} with channel values clamped between 0 and 1.\n   */\n  clamp() {\n    return new ColorRGBA64(clamp(this.r, 0, 1), clamp(this.g, 0, 1), clamp(this.b, 0, 1), clamp(this.a, 0, 1));\n  }\n  /**\n   * Converts the {@link ColorRGBA64} to a {@link ColorRGBA64Config}.\n   */\n  toObject() {\n    return {\n      r: this.r,\n      g: this.g,\n      b: this.b,\n      a: this.a\n    };\n  }\n  formatHexValue(value) {\n    return getHexStringForByte(denormalize(value, 0.0, 255.0));\n  }\n}\n\n/**\n * {@link https://en.wikipedia.org/wiki/CIE_1931_color_space | XYZ color space}\n *\n * This implementation uses the D65 constants for 2 degrees. That determines the constants used for the pure white point of the XYZ space of 0.95047, 1.0, 1.08883.\n * {@link https://en.wikipedia.org/wiki/Illuminant_D65}\n * These constants determine how the XYZ, LCH and LAB colors convert to/from RGB.\n *\n * @public\n */\nclass ColorXYZ {\n  constructor(x, y, z) {\n    this.x = x;\n    this.y = y;\n    this.z = z;\n  }\n  /**\n   * Construct a {@link ColorXYZ} from a config object.\n   */\n  static fromObject(data) {\n    if (data && !isNaN(data.x) && !isNaN(data.y) && !isNaN(data.z)) {\n      return new ColorXYZ(data.x, data.y, data.z);\n    }\n    return null;\n  }\n  /**\n   * Determines if a color is equal to another\n   * @param rhs - the value to compare\n   */\n  equalValue(rhs) {\n    return this.x === rhs.x && this.y === rhs.y && this.z === rhs.z;\n  }\n  /**\n   * Returns a new {@link ColorXYZ} rounded to the provided precision\n   * @param precision - the precision to round to\n   */\n  roundToPrecision(precision) {\n    return new ColorXYZ(roundToPrecisionSmall(this.x, precision), roundToPrecisionSmall(this.y, precision), roundToPrecisionSmall(this.z, precision));\n  }\n  /**\n   * Returns the {@link ColorXYZ} formatted as an object.\n   */\n  toObject() {\n    return {\n      x: this.x,\n      y: this.y,\n      z: this.z\n    };\n  }\n}\n/**\n * D65 2 degree white point\n */\nColorXYZ.whitePoint = new ColorXYZ(0.95047, 1.0, 1.08883);\n\n// All hue values are in degrees rather than radians or normalized\n// All conversions use the D65 2 degree white point for XYZ\n// Info on conversions and constants used can be found in the following:\n// https://en.wikipedia.org/wiki/CIELAB_color_space\n// https://en.wikipedia.org/wiki/Illuminant_D65\n// https://ninedegreesbelow.com/photography/xyz-rgb.html\n// http://user.engineering.uiowa.edu/~aip/Misc/ColorFAQ.html\n// https://web.stanford.edu/~sujason/ColorBalancing/adaptation.html\n// http://brucelindbloom.com/index.html\n/**\n * Get the luminance of a color in the linear RGB space.\n * This is not the same as the relative luminance in the sRGB space for WCAG contrast calculations. Use rgbToRelativeLuminance instead.\n * @param rgb - The input color\n *\n * @public\n */\nfunction rgbToLinearLuminance(rgb) {\n  return rgb.r * 0.2126 + rgb.g * 0.7152 + rgb.b * 0.0722;\n}\n/**\n * Get the relative luminance of a color.\n * Adjusts the color to sRGB space, which is necessary for the WCAG contrast spec.\n * The alpha channel of the input is ignored.\n * @param rgb - The input color\n *\n * @public\n */\nfunction rgbToRelativeLuminance(rgb) {\n  function luminanceHelper(i) {\n    if (i <= 0.03928) {\n      return i / 12.92;\n    }\n    return Math.pow((i + 0.055) / 1.055, 2.4);\n  }\n  return rgbToLinearLuminance(new ColorRGBA64(luminanceHelper(rgb.r), luminanceHelper(rgb.g), luminanceHelper(rgb.b), 1));\n}\nfunction calcChannelOverlay(match, background, overlay) {\n  if (overlay - background === 0) {\n    return 0;\n  } else {\n    return (match - background) / (overlay - background);\n  }\n}\nfunction calcRgbOverlay(rgbMatch, rgbBackground, rgbOverlay) {\n  const rChannel = calcChannelOverlay(rgbMatch.r, rgbBackground.r, rgbOverlay.r);\n  const gChannel = calcChannelOverlay(rgbMatch.g, rgbBackground.g, rgbOverlay.g);\n  const bChannel = calcChannelOverlay(rgbMatch.b, rgbBackground.b, rgbOverlay.b);\n  return (rChannel + gChannel + bChannel) / 3;\n}\n/**\n * Calculate an overlay color that uses rgba (rgb + alpha) that matches the appearance of a given solid color when placed on the same background\n * @param rgbMatch - The solid color the overlay should match in appearance when placed over the rgbBackground\n * @param rgbBackground - The background on which the overlay rests\n * @param rgbOverlay - The rgb color of the overlay. Typically this is either pure white or pure black and when not provided will be determined automatically. This color will be used in the returned output\n * @returns The rgba (rgb + alpha) color of the overlay\n *\n * @public\n */\nfunction calculateOverlayColor(rgbMatch, rgbBackground, rgbOverlay = null) {\n  let alpha = 0;\n  let overlay = rgbOverlay;\n  if (overlay !== null) {\n    alpha = calcRgbOverlay(rgbMatch, rgbBackground, overlay);\n  } else {\n    overlay = new ColorRGBA64(0, 0, 0, 1);\n    alpha = calcRgbOverlay(rgbMatch, rgbBackground, overlay);\n    if (alpha <= 0) {\n      overlay = new ColorRGBA64(1, 1, 1, 1);\n      alpha = calcRgbOverlay(rgbMatch, rgbBackground, overlay);\n    }\n  }\n  alpha = Math.round(alpha * 1000) / 1000;\n  return new ColorRGBA64(overlay.r, overlay.g, overlay.b, alpha);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorHSL}\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nfunction rgbToHSL(rgb) {\n  const max = Math.max(rgb.r, rgb.g, rgb.b);\n  const min = Math.min(rgb.r, rgb.g, rgb.b);\n  const delta = max - min;\n  let hue = 0;\n  if (delta !== 0) {\n    if (max === rgb.r) {\n      hue = 60 * ((rgb.g - rgb.b) / delta % 6);\n    } else if (max === rgb.g) {\n      hue = 60 * ((rgb.b - rgb.r) / delta + 2);\n    } else {\n      hue = 60 * ((rgb.r - rgb.g) / delta + 4);\n    }\n  }\n  if (hue < 0) {\n    hue += 360;\n  }\n  const lum = (max + min) / 2;\n  let sat = 0;\n  if (delta !== 0) {\n    sat = delta / (1 - Math.abs(2 * lum - 1));\n  }\n  return new ColorHSL(hue, sat, lum);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorHSL} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param hsl - the hsl color to convert\n * @param alpha - the alpha value\n *\n * @public\n */\nfunction hslToRGB(hsl, alpha = 1) {\n  const c = (1 - Math.abs(2 * hsl.l - 1)) * hsl.s;\n  const x = c * (1 - Math.abs(hsl.h / 60 % 2 - 1));\n  const m = hsl.l - c / 2;\n  let r = 0;\n  let g = 0;\n  let b = 0;\n  if (hsl.h < 60) {\n    r = c;\n    g = x;\n    b = 0;\n  } else if (hsl.h < 120) {\n    r = x;\n    g = c;\n    b = 0;\n  } else if (hsl.h < 180) {\n    r = 0;\n    g = c;\n    b = x;\n  } else if (hsl.h < 240) {\n    r = 0;\n    g = x;\n    b = c;\n  } else if (hsl.h < 300) {\n    r = x;\n    g = 0;\n    b = c;\n  } else if (hsl.h < 360) {\n    r = c;\n    g = 0;\n    b = x;\n  }\n  return new ColorRGBA64(r + m, g + m, b + m, alpha);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorLAB} to a {@link @microsoft/fast-colors#ColorXYZ}\n * @param lab - the lab color to convert\n *\n * @public\n */\nfunction labToXYZ(lab) {\n  const fy = (lab.l + 16) / 116;\n  const fx = fy + lab.a / 500;\n  const fz = fy - lab.b / 200;\n  const xcubed = Math.pow(fx, 3);\n  const ycubed = Math.pow(fy, 3);\n  const zcubed = Math.pow(fz, 3);\n  let x = 0;\n  if (xcubed > ColorLAB.epsilon) {\n    x = xcubed;\n  } else {\n    x = (116 * fx - 16) / ColorLAB.kappa;\n  }\n  let y = 0;\n  if (lab.l > ColorLAB.epsilon * ColorLAB.kappa) {\n    y = ycubed;\n  } else {\n    y = lab.l / ColorLAB.kappa;\n  }\n  let z = 0;\n  if (zcubed > ColorLAB.epsilon) {\n    z = zcubed;\n  } else {\n    z = (116 * fz - 16) / ColorLAB.kappa;\n  }\n  x = ColorXYZ.whitePoint.x * x;\n  y = ColorXYZ.whitePoint.y * y;\n  z = ColorXYZ.whitePoint.z * z;\n  return new ColorXYZ(x, y, z);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorXYZ} to a {@link @microsoft/fast-colors#ColorLAB}\n * @param xyz - the xyz color to convert\n *\n * @public\n */\nfunction xyzToLAB(xyz) {\n  function xyzToLABHelper(i) {\n    if (i > ColorLAB.epsilon) {\n      return Math.pow(i, 1 / 3);\n    }\n    return (ColorLAB.kappa * i + 16) / 116;\n  }\n  const x = xyzToLABHelper(xyz.x / ColorXYZ.whitePoint.x);\n  const y = xyzToLABHelper(xyz.y / ColorXYZ.whitePoint.y);\n  const z = xyzToLABHelper(xyz.z / ColorXYZ.whitePoint.z);\n  const l = 116 * y - 16;\n  const a = 500 * (x - y);\n  const b = 200 * (y - z);\n  return new ColorLAB(l, a, b);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorXYZ}\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n * @public\n */\nfunction rgbToXYZ(rgb) {\n  function rgbToXYZHelper(i) {\n    if (i <= 0.04045) {\n      return i / 12.92;\n    }\n    return Math.pow((i + 0.055) / 1.055, 2.4);\n  }\n  const r = rgbToXYZHelper(rgb.r);\n  const g = rgbToXYZHelper(rgb.g);\n  const b = rgbToXYZHelper(rgb.b);\n  const x = r * 0.4124564 + g * 0.3575761 + b * 0.1804375;\n  const y = r * 0.2126729 + g * 0.7151522 + b * 0.072175;\n  const z = r * 0.0193339 + g * 0.119192 + b * 0.9503041;\n  return new ColorXYZ(x, y, z);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorXYZ} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param xyz - the xyz color to convert\n * @param alpha - the alpha value\n *\n * @remarks\n * Note that the xyz color space is significantly larger than sRGB. As such, this can return colors rgb values greater than 1 or less than 0\n * @public\n */\nfunction xyzToRGB(xyz, alpha = 1) {\n  function xyzToRGBHelper(i) {\n    if (i <= 0.0031308) {\n      return i * 12.92;\n    }\n    return 1.055 * Math.pow(i, 1 / 2.4) - 0.055;\n  }\n  const r = xyzToRGBHelper(xyz.x * 3.2404542 - xyz.y * 1.5371385 - xyz.z * 0.4985314);\n  const g = xyzToRGBHelper(xyz.x * -0.969266 + xyz.y * 1.8760108 + xyz.z * 0.041556);\n  const b = xyzToRGBHelper(xyz.x * 0.0556434 - xyz.y * 0.2040259 + xyz.z * 1.0572252);\n  return new ColorRGBA64(r, g, b, alpha);\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorRGBA64} to a {@link @microsoft/fast-colors#ColorLAB}\n * @param rgb - the rgb color to convert\n *\n * @remarks\n * The alpha channel of the input is ignored\n *\n * @public\n */\nfunction rgbToLAB(rgb) {\n  return xyzToLAB(rgbToXYZ(rgb));\n}\n/**\n * Converts a {@link @microsoft/fast-colors#ColorLAB} to a {@link @microsoft/fast-colors#ColorRGBA64}\n * @param lab - the LAB color to convert\n * @param alpha - the alpha value\n *\n * @remarks\n * Note that the xyz color space (which the conversion from LAB uses) is significantly larger than sRGB. As such, this can return colors rgb values greater than 1 or less than 0\n *\n * @public\n */\nfunction labToRGB(lab, alpha = 1) {\n  return xyzToRGB(labToXYZ(lab), alpha);\n}\n\n/**\n * Color blend modes.\n * @public\n */\nvar ColorBlendMode;\n(function (ColorBlendMode) {\n  ColorBlendMode[ColorBlendMode[\"Burn\"] = 0] = \"Burn\";\n  ColorBlendMode[ColorBlendMode[\"Color\"] = 1] = \"Color\";\n  ColorBlendMode[ColorBlendMode[\"Darken\"] = 2] = \"Darken\";\n  ColorBlendMode[ColorBlendMode[\"Dodge\"] = 3] = \"Dodge\";\n  ColorBlendMode[ColorBlendMode[\"Lighten\"] = 4] = \"Lighten\";\n  ColorBlendMode[ColorBlendMode[\"Multiply\"] = 5] = \"Multiply\";\n  ColorBlendMode[ColorBlendMode[\"Overlay\"] = 6] = \"Overlay\";\n  ColorBlendMode[ColorBlendMode[\"Screen\"] = 7] = \"Screen\";\n})(ColorBlendMode || (ColorBlendMode = {}));\n/**\n * Alpha channel of bottom is ignored\n * The returned color always has an alpha channel of 1\n * Different programs (eg: paint.net, photoshop) will give different answers than this occasionally but within +/- 1/255 in each channel. Just depends on the details of how they round off decimals\n *\n * @public\n */\nfunction computeAlphaBlend(bottom, top) {\n  if (top.a >= 1) {\n    return top;\n  } else if (top.a <= 0) {\n    return new ColorRGBA64(bottom.r, bottom.g, bottom.b, 1);\n  }\n  const r = top.a * top.r + (1 - top.a) * bottom.r;\n  const g = top.a * top.g + (1 - top.a) * bottom.g;\n  const b = top.a * top.b + (1 - top.a) * bottom.b;\n  return new ColorRGBA64(r, g, b, 1);\n}\n\n/**\n * Interpolate by RGB color space\n *\n * @public\n */\nfunction interpolateRGB(position, left, right) {\n  if (isNaN(position) || position <= 0) {\n    return left;\n  } else if (position >= 1) {\n    return right;\n  }\n  return new ColorRGBA64(lerp(position, left.r, right.r), lerp(position, left.g, right.g), lerp(position, left.b, right.b), lerp(position, left.a, right.a));\n}\n/**\n * Color interpolation spaces\n *\n * @public\n */\nvar ColorInterpolationSpace;\n(function (ColorInterpolationSpace) {\n  ColorInterpolationSpace[ColorInterpolationSpace[\"RGB\"] = 0] = \"RGB\";\n  ColorInterpolationSpace[ColorInterpolationSpace[\"HSL\"] = 1] = \"HSL\";\n  ColorInterpolationSpace[ColorInterpolationSpace[\"HSV\"] = 2] = \"HSV\";\n  ColorInterpolationSpace[ColorInterpolationSpace[\"XYZ\"] = 3] = \"XYZ\";\n  ColorInterpolationSpace[ColorInterpolationSpace[\"LAB\"] = 4] = \"LAB\";\n  ColorInterpolationSpace[ColorInterpolationSpace[\"LCH\"] = 5] = \"LCH\";\n})(ColorInterpolationSpace || (ColorInterpolationSpace = {}));\n\n// Matches #RGB and #RRGGBB, where R, G, and B are [0-9] or [A-F]\nconst hexRGBRegex = /^#((?:[0-9a-f]{6}|[0-9a-f]{3}))$/i;\n/**\n * Converts a hexadecimal color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string in the form of \"#RRGGBB\" or \"#RGB\"\n * @example\n * ```ts\n * parseColorHexRGBA(\"#FF0000\");\n * parseColorHexRGBA(\"#F00\");\n * ```\n * @public\n */\nfunction parseColorHexRGB(raw) {\n  const result = hexRGBRegex.exec(raw);\n  if (result === null) {\n    return null;\n  }\n  let digits = result[1];\n  if (digits.length === 3) {\n    const r = digits.charAt(0);\n    const g = digits.charAt(1);\n    const b = digits.charAt(2);\n    digits = r.concat(r, g, g, b, b);\n  }\n  const rawInt = parseInt(digits, 16);\n  if (isNaN(rawInt)) {\n    return null;\n  }\n  // Note the use of >>> rather than >> as we want JS to manipulate these as unsigned numbers\n  return new ColorRGBA64(normalize((rawInt & 0xff0000) >>> 16, 0, 255), normalize((rawInt & 0x00ff00) >>> 8, 0, 255), normalize(rawInt & 0x0000ff, 0, 255), 1);\n}\n\n/**\r\n * @internal\r\n */\nfunction contrast(a, b) {\n  const L1 = a.relativeLuminance > b.relativeLuminance ? a : b;\n  const L2 = a.relativeLuminance > b.relativeLuminance ? b : a;\n  return (L1.relativeLuminance + 0.05) / (L2.relativeLuminance + 0.05);\n}\n\n/** @public */\nconst SwatchRGB = Object.freeze({\n  create(r, g, b) {\n    return new SwatchRGBImpl(r, g, b);\n  },\n  from(obj) {\n    return new SwatchRGBImpl(obj.r, obj.g, obj.b);\n  }\n});\n/**\r\n * Runtime test for an objects conformance with the SwatchRGB interface.\r\n * @internal\r\n */\nfunction isSwatchRGB(value) {\n  const test = {\n    r: 0,\n    g: 0,\n    b: 0,\n    toColorString: () => '',\n    contrast: () => 0,\n    relativeLuminance: 0\n  };\n  for (const key in test) {\n    if (typeof test[key] !== typeof value[key]) {\n      return false;\n    }\n  }\n  return true;\n}\n/**\r\n * An RGB implementation of {@link Swatch}\r\n * @internal\r\n */\nclass SwatchRGBImpl extends ColorRGBA64 {\n  /**\r\n   *\r\n   * @param red - Red channel expressed as a number between 0 and 1\r\n   * @param green - Green channel expressed as a number between 0 and 1\r\n   * @param blue - Blue channel expressed as a number between 0 and 1\r\n   */\n  constructor(red, green, blue) {\n    super(red, green, blue, 1);\n    this.toColorString = this.toStringHexRGB;\n    this.contrast = contrast.bind(null, this);\n    this.createCSS = this.toColorString;\n    this.relativeLuminance = rgbToRelativeLuminance(this);\n  }\n  static fromObject(obj) {\n    return new SwatchRGBImpl(obj.r, obj.g, obj.b);\n  }\n}\n\n/**\r\n * @internal\r\n */\nfunction binarySearch(valuesToSearch, searchCondition, startIndex = 0, endIndex = valuesToSearch.length - 1) {\n  if (endIndex === startIndex) {\n    return valuesToSearch[startIndex];\n  }\n  const middleIndex = Math.floor((endIndex - startIndex) / 2) + startIndex;\n  // Check to see if this passes on the item in the center of the array\n  // if it does check the previous values\n  return searchCondition(valuesToSearch[middleIndex]) ? binarySearch(valuesToSearch, searchCondition, startIndex, middleIndex) : binarySearch(valuesToSearch, searchCondition, middleIndex + 1,\n  // exclude this index because it failed the search condition\n  endIndex);\n}\n\n/*\r\n * A color is in \"dark\" if there is more contrast between #000000 and a reference\r\n * color than #FFFFFF and the reference color. That threshold can be expressed as a relative luminance\r\n * using the contrast formula as (1 + 0.5) / (R + 0.05) === (R + 0.05) / (0 + 0.05),\r\n * which reduces to the following, where 'R' is the relative luminance of the reference color\r\n */\nconst target = (-0.1 + Math.sqrt(0.21)) / 2;\n/**\r\n * Determines if a color should be considered Dark Mode\r\n * @param color - The color to check to mode of\r\n * @returns boolean\r\n *\r\n * @internal\r\n */\nfunction isDark(color) {\n  return color.relativeLuminance <= target;\n}\n\n/**\r\n * @internal\r\n */\nfunction directionByIsDark(color) {\n  return isDark(color) ? -1 : 1;\n}\n\nconst defaultPaletteRGBOptions = {\n  stepContrast: 1.03,\n  stepContrastRamp: 0.03,\n  preserveSource: false\n};\nfunction create$1(rOrSource, g, b) {\n  if (typeof rOrSource === 'number') {\n    return PaletteRGB.from(SwatchRGB.create(rOrSource, g, b));\n  } else {\n    return PaletteRGB.from(rOrSource);\n  }\n}\nfunction from(source, options) {\n  return isSwatchRGB(source) ? PaletteRGBImpl.from(source, options) : PaletteRGBImpl.from(SwatchRGB.create(source.r, source.g, source.b), options);\n}\n/** @public */\nconst PaletteRGB = Object.freeze({\n  create: create$1,\n  from\n});\n/**\r\n * A {@link Palette} representing RGB swatch values.\r\n * @public\r\n */\nclass PaletteRGBImpl {\n  /**\r\n   *\r\n   * @param source - The source color for the palette\r\n   * @param swatches - All swatches in the palette\r\n   */\n  constructor(source, swatches) {\n    this.closestIndexCache = new Map();\n    this.source = source;\n    this.swatches = swatches;\n    this.reversedSwatches = Object.freeze([...this.swatches].reverse());\n    this.lastIndex = this.swatches.length - 1;\n  }\n  /**\r\n   * {@inheritdoc Palette.colorContrast}\r\n   */\n  colorContrast(reference, contrastTarget, initialSearchIndex, direction) {\n    if (initialSearchIndex === undefined) {\n      initialSearchIndex = this.closestIndexOf(reference);\n    }\n    let source = this.swatches;\n    const endSearchIndex = this.lastIndex;\n    let startSearchIndex = initialSearchIndex;\n    if (direction === undefined) {\n      direction = directionByIsDark(reference);\n    }\n    const condition = value => contrast(reference, value) >= contrastTarget;\n    if (direction === -1) {\n      source = this.reversedSwatches;\n      startSearchIndex = endSearchIndex - startSearchIndex;\n    }\n    return binarySearch(source, condition, startSearchIndex, endSearchIndex);\n  }\n  /**\r\n   * {@inheritdoc Palette.get}\r\n   */\n  get(index) {\n    return this.swatches[index] || this.swatches[clamp(index, 0, this.lastIndex)];\n  }\n  /**\r\n   * {@inheritdoc Palette.closestIndexOf}\r\n   */\n  closestIndexOf(reference) {\n    if (this.closestIndexCache.has(reference.relativeLuminance)) {\n      return this.closestIndexCache.get(reference.relativeLuminance);\n    }\n    let index = this.swatches.indexOf(reference);\n    if (index !== -1) {\n      this.closestIndexCache.set(reference.relativeLuminance, index);\n      return index;\n    }\n    const closest = this.swatches.reduce((previous, next) => Math.abs(next.relativeLuminance - reference.relativeLuminance) < Math.abs(previous.relativeLuminance - reference.relativeLuminance) ? next : previous);\n    index = this.swatches.indexOf(closest);\n    this.closestIndexCache.set(reference.relativeLuminance, index);\n    return index;\n  }\n  /**\r\n   * Bump the saturation if it falls below the reference color saturation.\r\n   * @param reference Color with target saturation\r\n   * @param color Color to check and bump if below target saturation\r\n   * @returns Original or adjusted color\r\n   */\n  static saturationBump(reference, color) {\n    const hslReference = rgbToHSL(reference);\n    const saturationTarget = hslReference.s;\n    const hslColor = rgbToHSL(color);\n    if (hslColor.s < saturationTarget) {\n      const hslNew = new ColorHSL(hslColor.h, saturationTarget, hslColor.l);\n      return hslToRGB(hslNew);\n    }\n    return color;\n  }\n  /**\r\n   * Scales input from 0 to 100 to 0 to 0.5.\r\n   * @param l Input number, 0 to 100\r\n   * @returns Output number, 0 to 0.5\r\n   */\n  static ramp(l) {\n    const inputval = l / 100;\n    if (inputval > 0.5) return (inputval - 0.5) / 0.5; //from 0.500001in = 0.00000001out to 1.0in = 1.0out\n    return 2 * inputval; //from 0in = 0out to 0.5in = 1.0out\n  }\n  /**\r\n   * Create a palette following the desired curve and many steps to build a smaller palette from.\r\n   * @param source The source swatch to create a palette from\r\n   * @returns The palette\r\n   */\n  static createHighResolutionPalette(source) {\n    const swatches = [];\n    const labSource = rgbToLAB(ColorRGBA64.fromObject(source).roundToPrecision(4));\n    const lab0 = labToRGB(new ColorLAB(0, labSource.a, labSource.b)).clamp().roundToPrecision(4);\n    const lab50 = labToRGB(new ColorLAB(50, labSource.a, labSource.b)).clamp().roundToPrecision(4);\n    const lab100 = labToRGB(new ColorLAB(100, labSource.a, labSource.b)).clamp().roundToPrecision(4);\n    const rgbMin = new ColorRGBA64(0, 0, 0);\n    const rgbMax = new ColorRGBA64(1, 1, 1);\n    const lAbove = lab100.equalValue(rgbMax) ? 0 : 14;\n    const lBelow = lab0.equalValue(rgbMin) ? 0 : 14;\n    // 257 levels max, depending on whether lab0 or lab100 are black or white respectively.\n    for (let l = 100 + lAbove; l >= 0 - lBelow; l -= 0.5) {\n      let rgb;\n      if (l < 0) {\n        // For L less than 0, scale from black to L=0\n        const percentFromRgbMinToLab0 = l / lBelow + 1;\n        rgb = interpolateRGB(percentFromRgbMinToLab0, rgbMin, lab0);\n      } else if (l <= 50) {\n        // For L less than 50, we scale from L=0 to the base color\n        rgb = interpolateRGB(PaletteRGBImpl.ramp(l), lab0, lab50);\n      } else if (l <= 100) {\n        // For L less than 100, scale from the base color to L=100\n        rgb = interpolateRGB(PaletteRGBImpl.ramp(l), lab50, lab100);\n      } else {\n        // For L greater than 100, scale from L=100 to white\n        const percentFromLab100ToRgbMax = (l - 100.0) / lAbove;\n        rgb = interpolateRGB(percentFromLab100ToRgbMax, lab100, rgbMax);\n      }\n      rgb = PaletteRGBImpl.saturationBump(lab50, rgb).roundToPrecision(4);\n      swatches.push(SwatchRGB.from(rgb));\n    }\n    return new PaletteRGBImpl(source, swatches);\n  }\n  /**\r\n   * Adjust one end of the contrast-based palette so it doesn't abruptly fall to black (or white).\r\n   * @param swatchContrast Function to get the target contrast for the next swatch\r\n   * @param referencePalette The high resolution palette\r\n   * @param targetPalette The contrast-based palette to adjust\r\n   * @param direction The end to adjust\r\n   */\n  static adjustEnd(swatchContrast, referencePalette, targetPalette, direction) {\n    // Careful with the use of referencePalette as only the refSwatches is reversed.\n    const refSwatches = direction === -1 ? referencePalette.swatches : referencePalette.reversedSwatches;\n    const refIndex = swatch => {\n      const index = referencePalette.closestIndexOf(swatch);\n      return direction === 1 ? referencePalette.lastIndex - index : index;\n    };\n    // Only operates on the 'end' end of the array, so flip if we're adjusting the 'beginning'\n    if (direction === 1) {\n      targetPalette.reverse();\n    }\n    const targetContrast = swatchContrast(targetPalette[targetPalette.length - 2]);\n    const actualContrast = roundToPrecisionSmall(contrast(targetPalette[targetPalette.length - 1], targetPalette[targetPalette.length - 2]), 2);\n    if (actualContrast < targetContrast) {\n      // Remove last swatch if not sufficient contrast\n      targetPalette.pop();\n      // Distribute to the last swatch\n      const safeSecondSwatch = referencePalette.colorContrast(refSwatches[referencePalette.lastIndex], targetContrast, undefined, direction);\n      const safeSecondRefIndex = refIndex(safeSecondSwatch);\n      const targetSwatchCurrentRefIndex = refIndex(targetPalette[targetPalette.length - 2]);\n      const swatchesToSpace = safeSecondRefIndex - targetSwatchCurrentRefIndex;\n      let space = 1;\n      for (let i = targetPalette.length - swatchesToSpace - 1; i < targetPalette.length; i++) {\n        const currentRefIndex = refIndex(targetPalette[i]);\n        const nextRefIndex = i === targetPalette.length - 1 ? referencePalette.lastIndex : currentRefIndex + space;\n        targetPalette[i] = refSwatches[nextRefIndex];\n        space++;\n      }\n    }\n    if (direction === 1) {\n      targetPalette.reverse();\n    }\n  }\n  /**\r\n   * Generate a palette with consistent minimum contrast between swatches.\r\n   * @param source The source color\r\n   * @param options Palette generation options\r\n   * @returns A palette meeting the requested contrast between swatches.\r\n   */\n  static createColorPaletteByContrast(source, options) {\n    const referencePalette = PaletteRGBImpl.createHighResolutionPalette(source);\n    // Ramp function to increase contrast as the swatches get darker\n    const nextContrast = swatch => {\n      const c = options.stepContrast + options.stepContrast * (1 - swatch.relativeLuminance) * options.stepContrastRamp;\n      return roundToPrecisionSmall(c, 2);\n    };\n    const swatches = [];\n    // Start with the source color or the light end color\n    let ref = options.preserveSource ? source : referencePalette.swatches[0];\n    swatches.push(ref);\n    // Add swatches with contrast toward dark\n    do {\n      const targetContrast = nextContrast(ref);\n      ref = referencePalette.colorContrast(ref, targetContrast, undefined, 1);\n      swatches.push(ref);\n    } while (ref.relativeLuminance > 0);\n    // Add swatches with contrast toward light\n    if (options.preserveSource) {\n      ref = source;\n      do {\n        // This is off from the dark direction because `ref` here is the darker swatch, probably subtle\n        const targetContrast = nextContrast(ref);\n        ref = referencePalette.colorContrast(ref, targetContrast, undefined, -1);\n        swatches.unshift(ref);\n      } while (ref.relativeLuminance < 1);\n    }\n    // Validate dark end\n    this.adjustEnd(nextContrast, referencePalette, swatches, -1);\n    // Validate light end\n    if (options.preserveSource) {\n      this.adjustEnd(nextContrast, referencePalette, swatches, 1);\n    }\n    return swatches;\n  }\n  /**\r\n   * Create a color palette from a provided swatch\r\n   * @param source - The source swatch to create a palette from\r\n   * @returns\r\n   */\n  static from(source, options) {\n    const opts = options === void 0 || null ? defaultPaletteRGBOptions : Object.assign(Object.assign({}, defaultPaletteRGBOptions), options);\n    return new PaletteRGBImpl(source, Object.freeze(PaletteRGBImpl.createColorPaletteByContrast(source, opts)));\n  }\n}\n\n/**\r\n * @internal\r\n */\nconst white$1 = SwatchRGB.create(1, 1, 1);\n/**\r\n * @internal\r\n */\nconst black$1 = SwatchRGB.create(0, 0, 0);\n/**\r\n * @internal\r\n */\nconst middleGrey = SwatchRGB.create(0.5, 0.5, 0.5);\n/**\r\n * @internal\r\n */\nconst base = parseColorHexRGB('#0078D4');\nconst accentBase = SwatchRGB.create(base.r, base.g, base.b);\n\nfunction foregroundOnAccentSet(restFill, hoverFill, activeFill, focusFill, contrastTarget) {\n  const defaultRule = fill => fill.contrast(white$1) >= contrastTarget ? white$1 : black$1;\n  const restForeground = defaultRule(restFill);\n  const hoverForeground = defaultRule(hoverFill);\n  // Active doe not have contrast requirements, so if rest and hover use the same color, use that for active even if it would not have passed the contrast check.\n  const activeForeground = restForeground.relativeLuminance === hoverForeground.relativeLuminance ? restForeground : defaultRule(activeFill);\n  const focusForeground = defaultRule(focusFill);\n  return {\n    rest: restForeground,\n    hover: hoverForeground,\n    active: activeForeground,\n    focus: focusForeground\n  };\n}\n\n/**\r\n * An implementation of {@link Swatch} that produces a gradient.\r\n * This assumes a subtle gradient such that `relativeLuminance` is still meaningful,\r\n * either with consistent luminance across the steps or a small edge of larger change.\r\n * @internal\r\n */\nclass GradientSwatchRGB {\n  /**\r\n   *\r\n   * @param red Red channel expressed as a number between 0 and 1\r\n   * @param green Green channel expressed as a number between 0 and 1\r\n   * @param blue Blue channel expressed as a number between 0 and 1\r\n   */\n  constructor(red, green, blue, cssGradient) {\n    this.toColorString = () => this.cssGradient;\n    this.contrast = contrast.bind(null, this);\n    this.createCSS = this.toColorString;\n    this.color = new ColorRGBA64(red, green, blue);\n    this.cssGradient = cssGradient;\n    this.relativeLuminance = rgbToRelativeLuminance(this.color);\n    this.r = red;\n    this.g = green;\n    this.b = blue;\n  }\n  /**\r\n   * Creates a GradientSwatch from a base color and gradient definition\r\n   * @param obj The base color object, used for relative luminance\r\n   * @param cssGradient The actual gradient to be rendered\r\n   * @returns New GradientSwatch object\r\n   */\n  static fromObject(obj, cssGradient) {\n    return new GradientSwatchRGB(obj.r, obj.g, obj.b, cssGradient);\n  }\n}\n\nconst black = new ColorRGBA64(0, 0, 0);\nconst white = new ColorRGBA64(1, 1, 1);\n/**\r\n * @internal\r\n */\nfunction gradientShadowStroke(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta, shadowDelta, direction, shadowPercentage = 10, blendWithReference = false) {\n  const referenceIndex = palette.closestIndexOf(reference);\n  if (direction === void 0) {\n    direction = directionByIsDark(reference);\n  }\n  function overlayHelper(color) {\n    if (blendWithReference) {\n      const refIndex = palette.closestIndexOf(reference);\n      const refSwatch = palette.get(refIndex);\n      const overlaySolid = color.relativeLuminance < reference.relativeLuminance ? black : white;\n      const overlayColor = calculateOverlayColor(parseColorHexRGB(color.toColorString()), parseColorHexRGB(refSwatch.toColorString()), overlaySolid).roundToPrecision(2);\n      const blend = computeAlphaBlend(parseColorHexRGB(reference.toColorString()), overlayColor);\n      return SwatchRGB.from(blend);\n    } else {\n      return color;\n    }\n  }\n  const restIndex = referenceIndex + direction * restDelta;\n  const hoverIndex = restIndex + direction * (hoverDelta - restDelta);\n  const activeIndex = restIndex + direction * (activeDelta - restDelta);\n  const focusIndex = restIndex + direction * (focusDelta - restDelta);\n  const startPosition = direction === -1 ? 0 : 100 - shadowPercentage;\n  const endPosition = direction === -1 ? shadowPercentage : 100;\n  function gradientHelper(index, applyShadow) {\n    const color = palette.get(index);\n    if (applyShadow) {\n      // Shadow is actually \"highlight\" on top in dark mode.\n      const shadowColor = palette.get(index + direction * shadowDelta);\n      const startColor = direction === -1 ? shadowColor : color;\n      const endColor = direction === -1 ? color : shadowColor;\n      const g = `linear-gradient(${overlayHelper(startColor).toColorString()} ${startPosition}%, ${overlayHelper(endColor).toColorString()} ${endPosition}%)`;\n      return GradientSwatchRGB.fromObject(startColor, g);\n    } else {\n      return overlayHelper(color);\n    }\n  }\n  return {\n    rest: gradientHelper(restIndex, true),\n    hover: gradientHelper(hoverIndex, true),\n    active: gradientHelper(activeIndex, false),\n    focus: gradientHelper(focusIndex, true)\n  };\n}\n\n/**\r\n * @internal\r\n */\nfunction underlineStroke(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta, shadowDelta, width) {\n  const referenceIndex = palette.closestIndexOf(reference);\n  const direction = directionByIsDark(reference);\n  const restIndex = referenceIndex + direction * restDelta;\n  const hoverIndex = restIndex + direction * (hoverDelta - restDelta);\n  const activeIndex = restIndex + direction * (activeDelta - restDelta);\n  const focusIndex = restIndex + direction * (focusDelta - restDelta);\n  const midPosition = `calc(100% - ${width})`;\n  function gradientHelper(index, applyShadow) {\n    const color = palette.get(index);\n    if (applyShadow) {\n      const underlineColor = palette.get(index + direction * shadowDelta);\n      const g = `linear-gradient(${color.toColorString()} ${midPosition}, ${underlineColor.toColorString()} ${midPosition}, ${underlineColor.toColorString()})`;\n      return GradientSwatchRGB.fromObject(color, g);\n    } else {\n      return color;\n    }\n  }\n  return {\n    rest: gradientHelper(restIndex, true),\n    hover: gradientHelper(hoverIndex, true),\n    active: gradientHelper(activeIndex, false),\n    focus: gradientHelper(focusIndex, true)\n  };\n}\n\n/**\r\n * Color algorithm using contrast from the reference color.\r\n *\r\n * @param palette - The palette to operate on\r\n * @param reference - The reference color\r\n * @param contrast - The desired minimum contrast\r\n *\r\n * @internal\r\n */\nfunction contrastSwatch(palette, reference, contrast) {\n  return palette.colorContrast(reference, contrast);\n}\n\n/**\r\n * @internal\r\n */\nfunction contrastAndDeltaSwatchSet(palette, reference, baseContrast, restDelta, hoverDelta, activeDelta, focusDelta, direction) {\n  if (direction === null || direction === void 0) {\n    direction = directionByIsDark(reference);\n  }\n  const baseIndex = palette.closestIndexOf(palette.colorContrast(reference, baseContrast));\n  return {\n    rest: palette.get(baseIndex + direction * restDelta),\n    hover: palette.get(baseIndex + direction * hoverDelta),\n    active: palette.get(baseIndex + direction * activeDelta),\n    focus: palette.get(baseIndex + direction * focusDelta)\n  };\n}\n/**\r\n * @internal\r\n */\nfunction contrastAndDeltaSwatchSetByLuminance(palette, reference, lightBaseContrast, lightRestDelta, lightHoverDelta, lightActiveDelta, lightFocusDelta, lightDirection = undefined, darkBaseContrast, darkRestDelta, darkHoverDelta, darkActiveDelta, darkFocusDelta, darkDirection = undefined) {\n  if (isDark(reference)) {\n    return contrastAndDeltaSwatchSet(palette, reference, darkBaseContrast, darkRestDelta, darkHoverDelta, darkActiveDelta, darkFocusDelta, darkDirection);\n  } else {\n    return contrastAndDeltaSwatchSet(palette, reference, lightBaseContrast, lightRestDelta, lightHoverDelta, lightActiveDelta, lightFocusDelta, lightDirection);\n  }\n}\n\n/**\r\n * Color algorithm using a delta from the reference color.\r\n *\r\n * @param palette - The palette to operate on\r\n * @param reference - The reference color\r\n * @param delta - The offset from the reference\r\n *\r\n * @internal\r\n */\nfunction deltaSwatch(palette, reference, delta) {\n  return palette.get(palette.closestIndexOf(reference) + directionByIsDark(reference) * delta);\n}\n\n/**\r\n * Color algorithm using deltas from the reference color for states.\r\n *\r\n * @param palette The palette to operate on\r\n * @param reference The reference color to calculate a color for\r\n * @param restDelta The rest state offset from reference\r\n * @param hoverDelta The hover state offset from reference\r\n * @param activeDelta The active state offset from reference\r\n * @param focusDelta The focus state offset from reference\r\n * @param direction The direction the deltas move on the ramp, default goes darker for light references and lighter for dark references\r\n *\r\n * @internal\r\n */\nfunction deltaSwatchSet(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta, direction) {\n  const referenceIndex = palette.closestIndexOf(reference);\n  if (direction === null || direction === void 0) {\n    direction = directionByIsDark(reference);\n  }\n  return {\n    rest: palette.get(referenceIndex + direction * restDelta),\n    hover: palette.get(referenceIndex + direction * hoverDelta),\n    active: palette.get(referenceIndex + direction * activeDelta),\n    focus: palette.get(referenceIndex + direction * focusDelta)\n  };\n}\n/**\r\n * Color algorithm using deltas from the reference color for states, allowing different deltas based on a light or dark reference color.\r\n *\r\n * @param palette The palette to operate on\r\n * @param reference The reference color to calculate a color for\r\n * @param lightRestDelta The rest offset for a light reference\r\n * @param lightHoverDelta The hover offset for a light reference\r\n * @param lightActiveDelta The rest offset for a light reference\r\n * @param lightFocusDelta The hover offset for a light reference\r\n * @param lightDirection The direction the deltas move on the ramp, default goes darker for light references\r\n * @param darkRestDelta The rest offset for a dark reference\r\n * @param darkHoverDelta The hover offset for a dark reference\r\n * @param darkActiveDelta The rest offset for a dark reference\r\n * @param darkFocusDelta The hover offset for a dark reference\r\n * @param darkDirection The direction the deltas move on the ramp, default goes lighter for dark references\r\n *\r\n * @internal\r\n */\nfunction deltaSwatchSetByLuminance(palette, reference, lightRestDelta, lightHoverDelta, lightActiveDelta, lightFocusDelta, lightDirection = undefined, darkRestDelta, darkHoverDelta, darkActiveDelta, darkFocusDelta, darkDirection = undefined) {\n  if (isDark(reference)) {\n    return deltaSwatchSet(palette, reference, darkRestDelta, darkHoverDelta, darkActiveDelta, darkFocusDelta, darkDirection);\n  } else {\n    return deltaSwatchSet(palette, reference, lightRestDelta, lightHoverDelta, lightActiveDelta, lightFocusDelta, lightDirection);\n  }\n}\n\n/**\r\n * @internal\r\n */\nfunction focusStrokeOuter$1(palette, reference) {\n  return isDark(reference) ? white$1 : black$1;\n}\n/**\r\n * @internal\r\n */\nfunction focusStrokeInner$1(palette, reference, focusColor) {\n  return isDark(reference) ? black$1 : white$1;\n}\n\nfunction baseLayerLuminanceSwatch(luminance) {\n  return SwatchRGB.create(luminance, luminance, luminance);\n}\n/**\r\n * Recommended values for light and dark mode for {@link @fluentui/web-components#baseLayerLuminance}.\r\n *\r\n * @public\r\n */\nvar StandardLuminance;\n(function (StandardLuminance) {\n  StandardLuminance[StandardLuminance[\"LightMode\"] = 0.98] = \"LightMode\";\n  StandardLuminance[StandardLuminance[\"DarkMode\"] = 0.15] = \"DarkMode\";\n})(StandardLuminance || (StandardLuminance = {}));\n\n/**\r\n * @internal\r\n */\nfunction neutralLayer1Index(palette, baseLayerLuminance) {\n  return palette.closestIndexOf(baseLayerLuminanceSwatch(baseLayerLuminance));\n}\n/**\r\n * @internal\r\n */\nfunction neutralLayer1$1(palette, baseLayerLuminance) {\n  return palette.get(neutralLayer1Index(palette, baseLayerLuminance));\n}\n\n/**\r\n * @internal\r\n */\nfunction neutralLayerFloating$1(palette, baseLayerLuminance, layerDelta) {\n  return palette.get(neutralLayer1Index(palette, baseLayerLuminance) + layerDelta);\n}\n\n/**\r\n * @internal\r\n */\nfunction neutralLayer2$1(palette, baseLayerLuminance, layerDelta) {\n  return palette.get(neutralLayer1Index(palette, baseLayerLuminance) + layerDelta * -1);\n}\n\n/**\r\n * @internal\r\n */\nfunction neutralLayer3$1(palette, baseLayerLuminance, layerDelta) {\n  return palette.get(neutralLayer1Index(palette, baseLayerLuminance) + layerDelta * -1 * 2);\n}\n\n/**\r\n * @internal\r\n */\nfunction neutralLayer4$1(palette, baseLayerLuminance, layerDelta) {\n  return palette.get(neutralLayer1Index(palette, baseLayerLuminance) + layerDelta * -1 * 3);\n}\n\n/** @public */\nconst StandardFontWeight = {\n  Thin: 100,\n  ExtraLight: 200,\n  Light: 300,\n  Normal: 400,\n  Medium: 500,\n  SemiBold: 600,\n  Bold: 700,\n  ExtraBold: 800,\n  Black: 900\n};\n\nconst {\n  create\n} = DesignToken;\nfunction createNonCss(name) {\n  return DesignToken.create({\n    name,\n    cssCustomPropertyName: null\n  });\n}\n// General tokens\n/** @public */\nconst direction = create('direction').withDefault(Direction.ltr);\n/** @public */\nconst disabledOpacity = create('disabled-opacity').withDefault(0.3);\n// Density tokens\n/** @public */\nconst baseHeightMultiplier = create('base-height-multiplier').withDefault(8);\n/** @public */\nconst baseHorizontalSpacingMultiplier = create('base-horizontal-spacing-multiplier').withDefault(3);\n/** @public */\nconst density = create('density').withDefault(0);\n/** @public */\nconst designUnit = create('design-unit').withDefault(4);\n// Appearance tokens\n/** @public */\nconst controlCornerRadius = create('control-corner-radius').withDefault(4);\n/** @public */\nconst layerCornerRadius = create('layer-corner-radius').withDefault(8);\n/** @public */\nconst strokeWidth = create('stroke-width').withDefault(1);\n/** @public */\nconst focusStrokeWidth = create('focus-stroke-width').withDefault(2);\n// Typography values\n/** @public */\nconst bodyFont = create('body-font').withDefault('\"Segoe UI Variable\", \"Segoe UI\", sans-serif');\n/** @public */\nconst fontWeight = create('font-weight').withDefault(StandardFontWeight.Normal);\nfunction fontVariations(sizeToken) {\n  return element => {\n    const size = sizeToken.getValueFor(element);\n    const weight = fontWeight.getValueFor(element);\n    if (size.endsWith('px')) {\n      const px = Number.parseFloat(size.replace('px', ''));\n      if (px <= 12) {\n        return `\"wght\" ${weight}, \"opsz\" 8`;\n      } else if (px > 24) {\n        return `\"wght\" ${weight}, \"opsz\" 36`;\n      }\n    }\n    return `\"wght\" ${weight}, \"opsz\" 10.5`;\n  };\n}\n/** @public */\nconst typeRampBaseFontSize = create('type-ramp-base-font-size').withDefault('14px');\n/** @public */\nconst typeRampBaseLineHeight = create('type-ramp-base-line-height').withDefault('20px');\n/** @public */\nconst typeRampBaseFontVariations = create('type-ramp-base-font-variations').withDefault(fontVariations(typeRampBaseFontSize));\n/** @public */\nconst typeRampMinus1FontSize = create('type-ramp-minus-1-font-size').withDefault('12px');\n/** @public */\nconst typeRampMinus1LineHeight = create('type-ramp-minus-1-line-height').withDefault('16px');\n/** @public */\nconst typeRampMinus1FontVariations = create('type-ramp-minus-1-font-variations').withDefault(fontVariations(typeRampMinus1FontSize));\n/** @public */\nconst typeRampMinus2FontSize = create('type-ramp-minus-2-font-size').withDefault('10px');\n/** @public */\nconst typeRampMinus2LineHeight = create('type-ramp-minus-2-line-height').withDefault('14px');\n/** @public */\nconst typeRampMinus2FontVariations = create('type-ramp-minus-2-font-variations').withDefault(fontVariations(typeRampMinus2FontSize));\n/** @public */\nconst typeRampPlus1FontSize = create('type-ramp-plus-1-font-size').withDefault('16px');\n/** @public */\nconst typeRampPlus1LineHeight = create('type-ramp-plus-1-line-height').withDefault('22px');\n/** @public */\nconst typeRampPlus1FontVariations = create('type-ramp-plus-1-font-variations').withDefault(fontVariations(typeRampPlus1FontSize));\n/** @public */\nconst typeRampPlus2FontSize = create('type-ramp-plus-2-font-size').withDefault('20px');\n/** @public */\nconst typeRampPlus2LineHeight = create('type-ramp-plus-2-line-height').withDefault('26px');\n/** @public */\nconst typeRampPlus2FontVariations = create('type-ramp-plus-2-font-variations').withDefault(fontVariations(typeRampPlus2FontSize));\n/** @public */\nconst typeRampPlus3FontSize = create('type-ramp-plus-3-font-size').withDefault('24px');\n/** @public */\nconst typeRampPlus3LineHeight = create('type-ramp-plus-3-line-height').withDefault('32px');\n/** @public */\nconst typeRampPlus3FontVariations = create('type-ramp-plus-3-font-variations').withDefault(fontVariations(typeRampPlus3FontSize));\n/** @public */\nconst typeRampPlus4FontSize = create('type-ramp-plus-4-font-size').withDefault('28px');\n/** @public */\nconst typeRampPlus4LineHeight = create('type-ramp-plus-4-line-height').withDefault('36px');\n/** @public */\nconst typeRampPlus4FontVariations = create('type-ramp-plus-4-font-variations').withDefault(fontVariations(typeRampPlus4FontSize));\n/** @public */\nconst typeRampPlus5FontSize = create('type-ramp-plus-5-font-size').withDefault('32px');\n/** @public */\nconst typeRampPlus5LineHeight = create('type-ramp-plus-5-line-height').withDefault('40px');\n/** @public */\nconst typeRampPlus5FontVariations = create('type-ramp-plus-5-font-variations').withDefault(fontVariations(typeRampPlus5FontSize));\n/** @public */\nconst typeRampPlus6FontSize = create('type-ramp-plus-6-font-size').withDefault('40px');\n/** @public */\nconst typeRampPlus6LineHeight = create('type-ramp-plus-6-line-height').withDefault('52px');\n/** @public */\nconst typeRampPlus6FontVariations = create('type-ramp-plus-6-font-variations').withDefault(fontVariations(typeRampPlus6FontSize));\n// Color recipe values\n/** @public */\nconst baseLayerLuminance = create('base-layer-luminance').withDefault(StandardLuminance.LightMode);\n/** @public */\nconst accentFillRestDelta = createNonCss('accent-fill-rest-delta').withDefault(0);\n/** @public */\nconst accentFillHoverDelta = createNonCss('accent-fill-hover-delta').withDefault(-2);\n/** @public */\nconst accentFillActiveDelta = createNonCss('accent-fill-active-delta').withDefault(-5);\n/** @public */\nconst accentFillFocusDelta = createNonCss('accent-fill-focus-delta').withDefault(0);\n/** @public */\nconst accentForegroundRestDelta = createNonCss('accent-foreground-rest-delta').withDefault(0);\n/** @public */\nconst accentForegroundHoverDelta = createNonCss('accent-foreground-hover-delta').withDefault(3);\n/** @public */\nconst accentForegroundActiveDelta = createNonCss('accent-foreground-active-delta').withDefault(-8);\n/** @public */\nconst accentForegroundFocusDelta = createNonCss('accent-foreground-focus-delta').withDefault(0);\n/** @public */\nconst neutralFillRestDelta = createNonCss('neutral-fill-rest-delta').withDefault(-1);\n/** @public */\nconst neutralFillHoverDelta = createNonCss('neutral-fill-hover-delta').withDefault(1);\n/** @public */\nconst neutralFillActiveDelta = createNonCss('neutral-fill-active-delta').withDefault(0);\n/** @public */\nconst neutralFillFocusDelta = createNonCss('neutral-fill-focus-delta').withDefault(0);\n/** @public */\nconst neutralFillInputRestDelta = createNonCss('neutral-fill-input-rest-delta').withDefault(-1);\n/** @public */\nconst neutralFillInputHoverDelta = createNonCss('neutral-fill-input-hover-delta').withDefault(1);\n/** @public */\nconst neutralFillInputActiveDelta = createNonCss('neutral-fill-input-active-delta').withDefault(0);\n/** @public */\nconst neutralFillInputFocusDelta = createNonCss('neutral-fill-input-focus-delta').withDefault(-2);\n/** @public */\nconst neutralFillInputAltRestDelta = createNonCss('neutral-fill-input-alt-rest-delta').withDefault(2);\n/** @public */\nconst neutralFillInputAltHoverDelta = createNonCss('neutral-fill-input-alt-hover-delta').withDefault(4);\n/** @public */\nconst neutralFillInputAltActiveDelta = createNonCss('neutral-fill-input-alt-active-delta').withDefault(6);\n/** @public */\nconst neutralFillInputAltFocusDelta = createNonCss('neutral-fill-input-alt-focus-delta').withDefault(2);\n/** @public */\nconst neutralFillLayerRestDelta = createNonCss('neutral-fill-layer-rest-delta').withDefault(-2);\n/** @public */\nconst neutralFillLayerHoverDelta = createNonCss('neutral-fill-layer-hover-delta').withDefault(-3);\n/** @public */\nconst neutralFillLayerActiveDelta = createNonCss('neutral-fill-layer-active-delta').withDefault(-3);\n/** @public */\nconst neutralFillLayerAltRestDelta = createNonCss('neutral-fill-layer-alt-rest-delta').withDefault(-1);\n/** @public */\nconst neutralFillSecondaryRestDelta = createNonCss('neutral-fill-secondary-rest-delta').withDefault(3);\n/** @public */\nconst neutralFillSecondaryHoverDelta = createNonCss('neutral-fill-secondary-hover-delta').withDefault(2);\n/** @public */\nconst neutralFillSecondaryActiveDelta = createNonCss('neutral-fill-secondary-active-delta').withDefault(1);\n/** @public */\nconst neutralFillSecondaryFocusDelta = createNonCss('neutral-fill-secondary-focus-delta').withDefault(3);\n/** @public */\nconst neutralFillStealthRestDelta = createNonCss('neutral-fill-stealth-rest-delta').withDefault(0);\n/** @public */\nconst neutralFillStealthHoverDelta = createNonCss('neutral-fill-stealth-hover-delta').withDefault(3);\n/** @public */\nconst neutralFillStealthActiveDelta = createNonCss('neutral-fill-stealth-active-delta').withDefault(2);\n/** @public */\nconst neutralFillStealthFocusDelta = createNonCss('neutral-fill-stealth-focus-delta').withDefault(0);\n/** @public */\nconst neutralFillStrongRestDelta = createNonCss('neutral-fill-strong-rest-delta').withDefault(0);\n/** @public */\nconst neutralFillStrongHoverDelta = createNonCss('neutral-fill-strong-hover-delta').withDefault(8);\n/** @public */\nconst neutralFillStrongActiveDelta = createNonCss('neutral-fill-strong-active-delta').withDefault(-5);\n/** @public */\nconst neutralFillStrongFocusDelta = createNonCss('neutral-fill-strong-focus-delta').withDefault(0);\n/** @public */\nconst neutralStrokeRestDelta = createNonCss('neutral-stroke-rest-delta').withDefault(8);\n/** @public */\nconst neutralStrokeHoverDelta = createNonCss('neutral-stroke-hover-delta').withDefault(12);\n/** @public */\nconst neutralStrokeActiveDelta = createNonCss('neutral-stroke-active-delta').withDefault(6);\n/** @public */\nconst neutralStrokeFocusDelta = createNonCss('neutral-stroke-focus-delta').withDefault(8);\n/** @public */\nconst neutralStrokeControlRestDelta = createNonCss('neutral-stroke-control-rest-delta').withDefault(3);\n/** @public */\nconst neutralStrokeControlHoverDelta = createNonCss('neutral-stroke-control-hover-delta').withDefault(5);\n/** @public */\nconst neutralStrokeControlActiveDelta = createNonCss('neutral-stroke-control-active-delta').withDefault(5);\n/** @public */\nconst neutralStrokeControlFocusDelta = createNonCss('neutral-stroke-control-focus-delta').withDefault(5);\n/** @public */\nconst neutralStrokeDividerRestDelta = createNonCss('neutral-stroke-divider-rest-delta').withDefault(4);\n/** @public */\nconst neutralStrokeLayerRestDelta = createNonCss('neutral-stroke-layer-rest-delta').withDefault(3);\n/** @public */\nconst neutralStrokeLayerHoverDelta = createNonCss('neutral-stroke-layer-hover-delta').withDefault(3);\n/** @public */\nconst neutralStrokeLayerActiveDelta = createNonCss('neutral-stroke-layer-active-delta').withDefault(3);\n/** @public */\nconst neutralStrokeStrongHoverDelta = createNonCss('neutral-stroke-strong-hover-delta').withDefault(0);\n/** @public */\nconst neutralStrokeStrongActiveDelta = createNonCss('neutral-stroke-strong-active-delta').withDefault(0);\n/** @public */\nconst neutralStrokeStrongFocusDelta = createNonCss('neutral-stroke-strong-focus-delta').withDefault(0);\n// Color recipes\n/** @public */\nconst neutralBaseColor = create('neutral-base-color').withDefault(middleGrey);\n/** @public */\nconst neutralPalette = createNonCss('neutral-palette').withDefault(element => PaletteRGB.from(neutralBaseColor.getValueFor(element)));\n/** @public */\nconst accentBaseColor = create('accent-base-color').withDefault(accentBase);\n/** @public */\nconst accentPalette = createNonCss('accent-palette').withDefault(element => PaletteRGB.from(accentBaseColor.getValueFor(element)));\n// Neutral Layer Card Container\n/** @public */\nconst neutralLayerCardContainerRecipe = createNonCss('neutral-layer-card-container-recipe').withDefault({\n  evaluate: element => neutralLayer2$1(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element))\n});\n/** @public */\nconst neutralLayerCardContainer = create('neutral-layer-card-container').withDefault(element => neutralLayerCardContainerRecipe.getValueFor(element).evaluate(element));\n// Neutral Layer Floating\n/** @public */\nconst neutralLayerFloatingRecipe = createNonCss('neutral-layer-floating-recipe').withDefault({\n  evaluate: element => neutralLayerFloating$1(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element))\n});\n/** @public */\nconst neutralLayerFloating = create('neutral-layer-floating').withDefault(element => neutralLayerFloatingRecipe.getValueFor(element).evaluate(element));\n// Neutral Layer 1\n/** @public */\nconst neutralLayer1Recipe = createNonCss('neutral-layer-1-recipe').withDefault({\n  evaluate: element => neutralLayer1$1(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element))\n});\n/** @public */\nconst neutralLayer1 = create('neutral-layer-1').withDefault(element => neutralLayer1Recipe.getValueFor(element).evaluate(element));\n// Neutral Layer 2\n/** @public */\nconst neutralLayer2Recipe = createNonCss('neutral-layer-2-recipe').withDefault({\n  evaluate: element => neutralLayer2$1(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element))\n});\n/** @public */\nconst neutralLayer2 = create('neutral-layer-2').withDefault(element => neutralLayer2Recipe.getValueFor(element).evaluate(element));\n// Neutral Layer 3\n/** @public */\nconst neutralLayer3Recipe = createNonCss('neutral-layer-3-recipe').withDefault({\n  evaluate: element => neutralLayer3$1(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element))\n});\n/** @public */\nconst neutralLayer3 = create('neutral-layer-3').withDefault(element => neutralLayer3Recipe.getValueFor(element).evaluate(element));\n// Neutral Layer 4\n/** @public */\nconst neutralLayer4Recipe = createNonCss('neutral-layer-4-recipe').withDefault({\n  evaluate: element => neutralLayer4$1(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element))\n});\n/** @public */\nconst neutralLayer4 = create('neutral-layer-4').withDefault(element => neutralLayer4Recipe.getValueFor(element).evaluate(element));\n/** @public */\nconst fillColor = create('fill-color').withDefault(element => neutralLayer1.getValueFor(element));\nvar ContrastTarget;\n(function (ContrastTarget) {\n  ContrastTarget[ContrastTarget[\"normal\"] = 4.5] = \"normal\";\n  ContrastTarget[ContrastTarget[\"large\"] = 3] = \"large\";\n})(ContrastTarget || (ContrastTarget = {}));\n// Accent Fill\n/** @public */\nconst accentFillRecipe = createNonCss('accent-fill-recipe').withDefault({\n  evaluate: (element, reference) => contrastAndDeltaSwatchSetByLuminance(accentPalette.getValueFor(element), reference || fillColor.getValueFor(element), 5, accentFillRestDelta.getValueFor(element), accentFillHoverDelta.getValueFor(element), accentFillActiveDelta.getValueFor(element), accentFillFocusDelta.getValueFor(element), undefined, 8, accentFillRestDelta.getValueFor(element), accentFillHoverDelta.getValueFor(element), accentFillActiveDelta.getValueFor(element), accentFillFocusDelta.getValueFor(element), undefined)\n});\n/** @public */\nconst accentFillRest = create('accent-fill-rest').withDefault(element => {\n  return accentFillRecipe.getValueFor(element).evaluate(element).rest;\n});\n/** @public */\nconst accentFillHover = create('accent-fill-hover').withDefault(element => {\n  return accentFillRecipe.getValueFor(element).evaluate(element).hover;\n});\n/** @public */\nconst accentFillActive = create('accent-fill-active').withDefault(element => {\n  return accentFillRecipe.getValueFor(element).evaluate(element).active;\n});\n/** @public */\nconst accentFillFocus = create('accent-fill-focus').withDefault(element => {\n  return accentFillRecipe.getValueFor(element).evaluate(element).focus;\n});\n// Foreground On Accent\n/** @public */\nconst foregroundOnAccentRecipe = createNonCss('foreground-on-accent-recipe').withDefault({\n  evaluate: element => foregroundOnAccentSet(accentFillRest.getValueFor(element), accentFillHover.getValueFor(element), accentFillActive.getValueFor(element), accentFillFocus.getValueFor(element), ContrastTarget.normal)\n});\n/** @public */\nconst foregroundOnAccentRest = create('foreground-on-accent-rest').withDefault(element => foregroundOnAccentRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst foregroundOnAccentHover = create('foreground-on-accent-hover').withDefault(element => foregroundOnAccentRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst foregroundOnAccentActive = create('foreground-on-accent-active').withDefault(element => foregroundOnAccentRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst foregroundOnAccentFocus = create('foreground-on-accent-focus').withDefault(element => foregroundOnAccentRecipe.getValueFor(element).evaluate(element).focus);\n// Accent Foreground\n/** @public */\nconst accentForegroundRecipe = createNonCss('accent-foreground-recipe').withDefault({\n  evaluate: (element, reference) => contrastAndDeltaSwatchSet(accentPalette.getValueFor(element), reference || fillColor.getValueFor(element), 9.5, accentForegroundRestDelta.getValueFor(element), accentForegroundHoverDelta.getValueFor(element), accentForegroundActiveDelta.getValueFor(element), accentForegroundFocusDelta.getValueFor(element))\n});\n/** @public */\nconst accentForegroundRest = create('accent-foreground-rest').withDefault(element => accentForegroundRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst accentForegroundHover = create('accent-foreground-hover').withDefault(element => accentForegroundRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst accentForegroundActive = create('accent-foreground-active').withDefault(element => accentForegroundRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst accentForegroundFocus = create('accent-foreground-focus').withDefault(element => accentForegroundRecipe.getValueFor(element).evaluate(element).focus);\n// Accent Stroke Control\n/** @public */\nconst accentStrokeControlRecipe = createNonCss('accent-stroke-control-recipe').withDefault({\n  evaluate: (element, reference) => {\n    return gradientShadowStroke(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), -3, -3, -3, -3, 10, 1, undefined, true);\n  }\n});\n/** @public */\nconst accentStrokeControlRest = create('accent-stroke-control-rest').withDefault(element => accentStrokeControlRecipe.getValueFor(element).evaluate(element, accentFillRest.getValueFor(element)).rest);\n/** @public */\nconst accentStrokeControlHover = create('accent-stroke-control-hover').withDefault(element => accentStrokeControlRecipe.getValueFor(element).evaluate(element, accentFillHover.getValueFor(element)).hover);\n/** @public */\nconst accentStrokeControlActive = create('accent-stroke-control-active').withDefault(element => accentStrokeControlRecipe.getValueFor(element).evaluate(element, accentFillActive.getValueFor(element)).active);\n/** @public */\nconst accentStrokeControlFocus = create('accent-stroke-control-focus').withDefault(element => accentStrokeControlRecipe.getValueFor(element).evaluate(element, accentFillFocus.getValueFor(element)).focus);\n// Neutral Fill\n/** @public */\nconst neutralFillRecipe = createNonCss('neutral-fill-recipe').withDefault({\n  evaluate: (element, reference) => deltaSwatchSetByLuminance(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element), neutralFillFocusDelta.getValueFor(element), undefined, 2, 3, 1, 2, undefined)\n});\n/** @public */\nconst neutralFillRest = create('neutral-fill-rest').withDefault(element => neutralFillRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralFillHover = create('neutral-fill-hover').withDefault(element => neutralFillRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralFillActive = create('neutral-fill-active').withDefault(element => neutralFillRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst neutralFillFocus = create('neutral-fill-focus').withDefault(element => neutralFillRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Input\n/** @public */\nconst neutralFillInputRecipe = createNonCss('neutral-fill-input-recipe').withDefault({\n  evaluate: (element, reference) => deltaSwatchSetByLuminance(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillInputRestDelta.getValueFor(element), neutralFillInputHoverDelta.getValueFor(element), neutralFillInputActiveDelta.getValueFor(element), neutralFillInputFocusDelta.getValueFor(element), undefined, 2, 3, 1, 0, undefined)\n});\n/** @public */\nconst neutralFillInputRest = create('neutral-fill-input-rest').withDefault(element => neutralFillInputRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralFillInputHover = create('neutral-fill-input-hover').withDefault(element => neutralFillInputRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralFillInputActive = create('neutral-fill-input-active').withDefault(element => neutralFillInputRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst neutralFillInputFocus = create('neutral-fill-input-focus').withDefault(element => neutralFillInputRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Input Alt\n/** @public */\nconst neutralFillInputAltRecipe = createNonCss('neutral-fill-input-alt-recipe').withDefault({\n  evaluate: (element, reference) => deltaSwatchSetByLuminance(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillInputAltRestDelta.getValueFor(element), neutralFillInputAltHoverDelta.getValueFor(element), neutralFillInputAltActiveDelta.getValueFor(element), neutralFillInputAltFocusDelta.getValueFor(element), 1, neutralFillInputAltRestDelta.getValueFor(element), neutralFillInputAltRestDelta.getValueFor(element) - neutralFillInputAltHoverDelta.getValueFor(element), neutralFillInputAltRestDelta.getValueFor(element) - neutralFillInputAltActiveDelta.getValueFor(element), neutralFillInputAltFocusDelta.getValueFor(element), 1)\n});\n/** @public */\nconst neutralFillInputAltRest = create('neutral-fill-input-alt-rest').withDefault(element => neutralFillInputAltRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralFillInputAltHover = create('neutral-fill-input-alt-hover').withDefault(element => neutralFillInputAltRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralFillInputAltActive = create('neutral-fill-input-alt-active').withDefault(element => neutralFillInputAltRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst neutralFillInputAltFocus = create('neutral-fill-input-alt-focus').withDefault(element => neutralFillInputAltRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Layer\n/** @public */\nconst neutralFillLayerRecipe = createNonCss('neutral-fill-layer-recipe').withDefault({\n  evaluate: (element, reference) => deltaSwatchSet(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element), neutralFillLayerHoverDelta.getValueFor(element), neutralFillLayerActiveDelta.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element), 1)\n});\n/** @public */\nconst neutralFillLayerRest = create('neutral-fill-layer-rest').withDefault(element => neutralFillLayerRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralFillLayerHover = create('neutral-fill-layer-hover').withDefault(element => neutralFillLayerRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralFillLayerActive = create('neutral-fill-layer-active').withDefault(element => neutralFillLayerRecipe.getValueFor(element).evaluate(element).active);\n// Neutral Fill Layer Alt\n/** @public */\nconst neutralFillLayerAltRecipe = createNonCss('neutral-fill-layer-alt-recipe').withDefault({\n  evaluate: (element, reference) => deltaSwatchSet(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillLayerAltRestDelta.getValueFor(element), neutralFillLayerAltRestDelta.getValueFor(element), neutralFillLayerAltRestDelta.getValueFor(element), neutralFillLayerAltRestDelta.getValueFor(element))\n});\n/** @public */\nconst neutralFillLayerAltRest = create('neutral-fill-layer-alt-rest').withDefault(element => neutralFillLayerAltRecipe.getValueFor(element).evaluate(element).rest);\n// Neutral Fill Secondary\n/** @public */\nconst neutralFillSecondaryRecipe = createNonCss('neutral-fill-secondary-recipe').withDefault({\n  evaluate: (element, reference) => deltaSwatchSet(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillSecondaryRestDelta.getValueFor(element), neutralFillSecondaryHoverDelta.getValueFor(element), neutralFillSecondaryActiveDelta.getValueFor(element), neutralFillSecondaryFocusDelta.getValueFor(element))\n});\n/** @public */\nconst neutralFillSecondaryRest = create('neutral-fill-secondary-rest').withDefault(element => neutralFillSecondaryRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralFillSecondaryHover = create('neutral-fill-secondary-hover').withDefault(element => neutralFillSecondaryRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralFillSecondaryActive = create('neutral-fill-secondary-active').withDefault(element => neutralFillSecondaryRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst neutralFillSecondaryFocus = create('neutral-fill-secondary-focus').withDefault(element => neutralFillSecondaryRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Stealth\n/** @public */\nconst neutralFillStealthRecipe = createNonCss('neutral-fill-stealth-recipe').withDefault({\n  evaluate: (element, reference) => deltaSwatchSet(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillStealthRestDelta.getValueFor(element), neutralFillStealthHoverDelta.getValueFor(element), neutralFillStealthActiveDelta.getValueFor(element), neutralFillStealthFocusDelta.getValueFor(element))\n});\n/** @public */\nconst neutralFillStealthRest = create('neutral-fill-stealth-rest').withDefault(element => neutralFillStealthRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralFillStealthHover = create('neutral-fill-stealth-hover').withDefault(element => neutralFillStealthRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralFillStealthActive = create('neutral-fill-stealth-active').withDefault(element => neutralFillStealthRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst neutralFillStealthFocus = create('neutral-fill-stealth-focus').withDefault(element => neutralFillStealthRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Strong\n/** @public */\nconst neutralFillStrongRecipe = createNonCss('neutral-fill-strong-recipe').withDefault({\n  evaluate: (element, reference) => contrastAndDeltaSwatchSet(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), 4.5, neutralFillStrongRestDelta.getValueFor(element), neutralFillStrongHoverDelta.getValueFor(element), neutralFillStrongActiveDelta.getValueFor(element), neutralFillStrongFocusDelta.getValueFor(element))\n});\n/** @public */\nconst neutralFillStrongRest = create('neutral-fill-strong-rest').withDefault(element => neutralFillStrongRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralFillStrongHover = create('neutral-fill-strong-hover').withDefault(element => neutralFillStrongRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralFillStrongActive = create('neutral-fill-strong-active').withDefault(element => neutralFillStrongRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst neutralFillStrongFocus = create('neutral-fill-strong-focus').withDefault(element => neutralFillStrongRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Foreground\n/** @public */\nconst neutralForegroundRecipe = createNonCss('neutral-foreground-recipe').withDefault({\n  evaluate: (element, reference) => contrastAndDeltaSwatchSet(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), 16, 0, -19, -30, 0)\n});\n/** @public */\nconst neutralForegroundRest = create('neutral-foreground-rest').withDefault(element => neutralForegroundRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralForegroundHover = create('neutral-foreground-hover').withDefault(element => neutralForegroundRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralForegroundActive = create('neutral-foreground-active').withDefault(element => neutralForegroundRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst neutralForegroundFocus = create('neutral-foreground-focus').withDefault(element => neutralForegroundRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Foreground Hint\n/** @public */\nconst neutralForegroundHintRecipe = createNonCss('neutral-foreground-hint-recipe').withDefault({\n  evaluate: (element, reference) => contrastSwatch(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), 4.5)\n});\n/** @public */\nconst neutralForegroundHint = create('neutral-foreground-hint').withDefault(element => neutralForegroundHintRecipe.getValueFor(element).evaluate(element));\n// Neutral Stroke\n/** @public */\nconst neutralStrokeRecipe = createNonCss('neutral-stroke-recipe').withDefault({\n  evaluate: (element, reference) => {\n    return deltaSwatchSet(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralStrokeRestDelta.getValueFor(element), neutralStrokeHoverDelta.getValueFor(element), neutralStrokeActiveDelta.getValueFor(element), neutralStrokeFocusDelta.getValueFor(element));\n  }\n});\n/** @public */\nconst neutralStrokeRest = create('neutral-stroke-rest').withDefault(element => neutralStrokeRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralStrokeHover = create('neutral-stroke-hover').withDefault(element => neutralStrokeRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralStrokeActive = create('neutral-stroke-active').withDefault(element => neutralStrokeRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst neutralStrokeFocus = create('neutral-stroke-focus').withDefault(element => neutralStrokeRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Stroke Control\n/** @public */\nconst neutralStrokeControlRecipe = createNonCss('neutral-stroke-control-recipe').withDefault({\n  evaluate: (element, reference) => {\n    return gradientShadowStroke(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralStrokeControlRestDelta.getValueFor(element), neutralStrokeControlHoverDelta.getValueFor(element), neutralStrokeControlActiveDelta.getValueFor(element), neutralStrokeControlFocusDelta.getValueFor(element), 5);\n  }\n});\n/** @public */\nconst neutralStrokeControlRest = create('neutral-stroke-control-rest').withDefault(element => neutralStrokeControlRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralStrokeControlHover = create('neutral-stroke-control-hover').withDefault(element => neutralStrokeControlRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralStrokeControlActive = create('neutral-stroke-control-active').withDefault(element => neutralStrokeControlRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst neutralStrokeControlFocus = create('neutral-stroke-control-focus').withDefault(element => neutralStrokeControlRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Stroke Divider\n/** @public */\nconst neutralStrokeDividerRecipe = createNonCss('neutral-stroke-divider-recipe').withDefault({\n  evaluate: (element, reference) => deltaSwatch(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralStrokeDividerRestDelta.getValueFor(element))\n});\n/** @public */\nconst neutralStrokeDividerRest = create('neutral-stroke-divider-rest').withDefault(element => neutralStrokeDividerRecipe.getValueFor(element).evaluate(element));\n// Neutral Stroke Input\n/** @public */\nconst neutralStrokeInputRecipe = createNonCss('neutral-stroke-input-recipe').withDefault({\n  evaluate: (element, reference) => {\n    return underlineStroke(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralStrokeControlRestDelta.getValueFor(element), neutralStrokeControlHoverDelta.getValueFor(element), neutralStrokeControlActiveDelta.getValueFor(element), neutralStrokeControlFocusDelta.getValueFor(element), 20, strokeWidth.getValueFor(element) + 'px');\n  }\n});\n/** @public */\nconst neutralStrokeInputRest = create('neutral-stroke-input-rest').withDefault(element => neutralStrokeInputRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralStrokeInputHover = create('neutral-stroke-input-hover').withDefault(element => neutralStrokeInputRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralStrokeInputActive = create('neutral-stroke-input-active').withDefault(element => neutralStrokeInputRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst neutralStrokeInputFocus = create('neutral-stroke-input-focus').withDefault(element => neutralStrokeInputRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Stroke Layer\n/** @public */\nconst neutralStrokeLayerRecipe = createNonCss('neutral-stroke-layer-recipe').withDefault({\n  evaluate: (element, reference) => {\n    return deltaSwatchSet(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralStrokeLayerRestDelta.getValueFor(element), neutralStrokeLayerHoverDelta.getValueFor(element), neutralStrokeLayerActiveDelta.getValueFor(element), neutralStrokeLayerRestDelta.getValueFor(element));\n  }\n});\n/** @public */\nconst neutralStrokeLayerRest = create('neutral-stroke-layer-rest').withDefault(element => neutralStrokeLayerRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralStrokeLayerHover = create('neutral-stroke-layer-hover').withDefault(element => neutralStrokeLayerRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralStrokeLayerActive = create('neutral-stroke-layer-active').withDefault(element => neutralStrokeLayerRecipe.getValueFor(element).evaluate(element).active);\n// Neutral Stroke Strong\n/** @public */\nconst neutralStrokeStrongRecipe = createNonCss('neutral-stroke-strong-recipe').withDefault({\n  evaluate: (element, reference) => contrastAndDeltaSwatchSet(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), 5.5, 0, neutralStrokeStrongHoverDelta.getValueFor(element), neutralStrokeStrongActiveDelta.getValueFor(element), neutralStrokeStrongFocusDelta.getValueFor(element))\n});\n/** @public */\nconst neutralStrokeStrongRest = create('neutral-stroke-strong-rest').withDefault(element => neutralStrokeStrongRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nconst neutralStrokeStrongHover = create('neutral-stroke-strong-hover').withDefault(element => neutralStrokeStrongRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nconst neutralStrokeStrongActive = create('neutral-stroke-strong-active').withDefault(element => neutralStrokeStrongRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nconst neutralStrokeStrongFocus = create('neutral-stroke-strong-focus').withDefault(element => neutralStrokeStrongRecipe.getValueFor(element).evaluate(element).focus);\n// Focus Stroke Outer\n/** @public */\nconst focusStrokeOuterRecipe = createNonCss('focus-stroke-outer-recipe').withDefault({\n  evaluate: element => focusStrokeOuter$1(neutralPalette.getValueFor(element), fillColor.getValueFor(element))\n});\n/** @public */\nconst focusStrokeOuter = create('focus-stroke-outer').withDefault(element => focusStrokeOuterRecipe.getValueFor(element).evaluate(element));\n// Focus Stroke Inner\n/** @public */\nconst focusStrokeInnerRecipe = createNonCss('focus-stroke-inner-recipe').withDefault({\n  evaluate: element => focusStrokeInner$1(accentPalette.getValueFor(element), fillColor.getValueFor(element), focusStrokeOuter.getValueFor(element))\n});\n/** @public */\nconst focusStrokeInner = create('focus-stroke-inner').withDefault(element => focusStrokeInnerRecipe.getValueFor(element).evaluate(element));\n// Deprecated tokens\n// Foreground On Accent\n/** @public @deprecated Not used */\nconst foregroundOnAccentLargeRecipe = createNonCss('foreground-on-accent-large-recipe').withDefault({\n  evaluate: element => foregroundOnAccentSet(accentFillRest.getValueFor(element), accentFillHover.getValueFor(element), accentFillActive.getValueFor(element), accentFillFocus.getValueFor(element), ContrastTarget.large)\n});\n/** @public @deprecated Not used */\nconst foregroundOnAccentRestLarge = create('foreground-on-accent-rest-large').withDefault(element => foregroundOnAccentLargeRecipe.getValueFor(element).evaluate(element).rest);\n/** @public @deprecated Not used */\nconst foregroundOnAccentHoverLarge = create('foreground-on-accent-hover-large').withDefault(element => foregroundOnAccentLargeRecipe.getValueFor(element).evaluate(element, accentFillHover.getValueFor(element)).hover);\n/** @public @deprecated Not used */\nconst foregroundOnAccentActiveLarge = create('foreground-on-accent-active-large').withDefault(element => foregroundOnAccentLargeRecipe.getValueFor(element).evaluate(element, accentFillActive.getValueFor(element)).active);\n/** @public @deprecated Not used */\nconst foregroundOnAccentFocusLarge = create('foreground-on-accent-focus-large').withDefault(element => foregroundOnAccentLargeRecipe.getValueFor(element).evaluate(element, accentFillFocus.getValueFor(element)).focus);\n// Neutral Fill Inverse\n/** @public @deprecated Not used */\nconst neutralFillInverseRestDelta = create('neutral-fill-inverse-rest-delta').withDefault(0);\n/** @public @deprecated Not used */\nconst neutralFillInverseHoverDelta = create('neutral-fill-inverse-hover-delta').withDefault(-3);\n/** @public @deprecated Not used */\nconst neutralFillInverseActiveDelta = create('neutral-fill-inverse-active-delta').withDefault(7);\n/** @public @deprecated Not used */\nconst neutralFillInverseFocusDelta = create('neutral-fill-inverse-focus-delta').withDefault(0);\n/** @deprecated Not used */\nfunction neutralFillInverse(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n  const direction = directionByIsDark(reference);\n  const accessibleIndex = palette.closestIndexOf(palette.colorContrast(reference, 14));\n  const accessibleIndex2 = accessibleIndex + direction * Math.abs(restDelta - hoverDelta);\n  const indexOneIsRest = direction === 1 ? restDelta < hoverDelta : direction * restDelta > direction * hoverDelta;\n  let restIndex;\n  let hoverIndex;\n  if (indexOneIsRest) {\n    restIndex = accessibleIndex;\n    hoverIndex = accessibleIndex2;\n  } else {\n    restIndex = accessibleIndex2;\n    hoverIndex = accessibleIndex;\n  }\n  return {\n    rest: palette.get(restIndex),\n    hover: palette.get(hoverIndex),\n    active: palette.get(restIndex + direction * activeDelta),\n    focus: palette.get(restIndex + direction * focusDelta)\n  };\n}\n/** @public @deprecated Not used */\nconst neutralFillInverseRecipe = createNonCss('neutral-fill-inverse-recipe').withDefault({\n  evaluate: (element, reference) => neutralFillInverse(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillInverseRestDelta.getValueFor(element), neutralFillInverseHoverDelta.getValueFor(element), neutralFillInverseActiveDelta.getValueFor(element), neutralFillInverseFocusDelta.getValueFor(element))\n});\n/** @public @deprecated Not used */\nconst neutralFillInverseRest = create('neutral-fill-inverse-rest').withDefault(element => neutralFillInverseRecipe.getValueFor(element).evaluate(element).rest);\n/** @public @deprecated Not used */\nconst neutralFillInverseHover = create('neutral-fill-inverse-hover').withDefault(element => neutralFillInverseRecipe.getValueFor(element).evaluate(element).hover);\n/** @public @deprecated Not used */\nconst neutralFillInverseActive = create('neutral-fill-inverse-active').withDefault(element => neutralFillInverseRecipe.getValueFor(element).evaluate(element).active);\n/** @public @deprecated Not used */\nconst neutralFillInverseFocus = create('neutral-fill-inverse-focus').withDefault(element => neutralFillInverseRecipe.getValueFor(element).evaluate(element).focus);\n/** @public @deprecated Use controlCornerRadius */\nconst cornerRadius = controlCornerRadius;\n/** @public @deprecated Use layerCornerRadius */\nconst elevatedCornerRadius = layerCornerRadius;\n/** @public @deprecated Use strokeWidth */\nconst outlineWidth = strokeWidth;\n/** @public @deprecated Use focusStrokeWidth */\nconst focusOutlineWidth = focusStrokeWidth;\n/** @public @deprecated Use neutralFillInverseRestDelta */\nconst neutralContrastFillRestDelta = neutralFillInverseRestDelta;\n/** @public @deprecated Use neutralFillInverseHoverDelta */\nconst neutralContrastFillHoverDelta = neutralFillInverseHoverDelta;\n/** @public @deprecated Use neutralFillInverseActiveDelta */\nconst neutralContrastFillActiveDelta = neutralFillInverseActiveDelta;\n/** @public @deprecated Use neutralFillInverseFocusDelta */\nconst neutralContrastFillFocusDelta = neutralFillInverseFocusDelta;\n/** @public @deprecated Use neutralFillLayerRestDelta */\nconst neutralFillCardDelta = neutralFillLayerRestDelta;\n/** @public @deprecated Use neutralFillStrongRestDelta */\nconst neutralFillToggleRestDelta = neutralFillStrongRestDelta;\n/** @public @deprecated Use neutralFillStrongHoverDelta */\nconst neutralFillToggleHoverDelta = neutralFillStrongHoverDelta;\n/** @public @deprecated Use neutralFillStrongActiveDelta */\nconst neutralFillToggleActiveDelta = neutralFillStrongActiveDelta;\n/** @public @deprecated Use neutralFillStrongFocusDelta */\nconst neutralFillToggleFocusDelta = neutralFillStrongFocusDelta;\n/** @public @deprecated Use neutralStrokeDividerRestDelta */\nconst neutralDividerRestDelta = neutralStrokeDividerRestDelta;\n/** @public @deprecated Use neutralLayer1 */\nconst neutralLayerL1 = neutralLayer1;\n/** @public @deprecated Use neutralLayer2 */\nconst neutralLayerL2 = neutralLayer2;\n/** @public @deprecated Use neutralLayer3 */\nconst neutralLayerL3 = neutralLayer3;\n/** @public @deprecated Use neutralLayer4 */\nconst neutralLayerL4 = neutralLayer4;\n/** @public @deprecated Use foregroundOnAccentRest */\nconst accentForegroundCut = foregroundOnAccentRest;\n/** @public @deprecated Use foregroundOnAccentRestLarge */\nconst accentForegroundCutLarge = foregroundOnAccentRestLarge;\n/** @public @deprecated Use neutralStrokeDividerRest */\nconst neutralDivider = neutralStrokeDividerRest;\n/** @public @deprecated Use neutralFillLayerRest */\nconst neutralFillCard = neutralFillLayerRest;\n/** @public @deprecated Use neutralFillInverseRest */\nconst neutralContrastFillRest = neutralFillInverseRest;\n/** @public @deprecated Use neutralFillInverseHover */\nconst neutralContrastFillHover = neutralFillInverseHover;\n/** @public @deprecated Use neutralFillInverseActive */\nconst neutralContrastFillActive = neutralFillInverseActive;\n/** @public @deprecated Use neutralFillInverseFocus */\nconst neutralContrastFillFocus = neutralFillInverseFocus;\n/** @public @deprecated Use neutralFillStrongRest */\nconst neutralFillToggleRest = neutralFillStrongRest;\n/** @public @deprecated Use neutralFillStrongHover */\nconst neutralFillToggleHover = neutralFillStrongHover;\n/** @public @deprecated Use neutralFillStrongActive */\nconst neutralFillToggleActive = neutralFillStrongActive;\n/** @public @deprecated Use neutralFillStrongFocus */\nconst neutralFillToggleFocus = neutralFillStrongFocus;\n/** @public @deprecated Use focusStrokeOuter */\nconst neutralFocus = focusStrokeOuter;\n/** @public @deprecated Use focusStrokeInner */\nconst neutralFocusInnerAccent = focusStrokeInner;\n/** @public @deprecated Use neutralStrokeRest */\nconst neutralOutlineRest = neutralStrokeRest;\n/** @public @deprecated Use neutralStrokeHover */\nconst neutralOutlineHover = neutralStrokeHover;\n/** @public @deprecated Use neutralStrokeActive */\nconst neutralOutlineActive = neutralStrokeActive;\n/** @public @deprecated Use neutralStrokeFocus */\nconst neutralOutlineFocus = neutralStrokeFocus;\n\n/** @public */\nconst typeRampBase = cssPartial`\n  font-family: ${bodyFont};\n  font-size: ${typeRampBaseFontSize};\n  line-height: ${typeRampBaseLineHeight};\n  font-weight: initial;\n  font-variation-settings: ${typeRampBaseFontVariations};\n`;\n/** @public */\nconst typeRampMinus1 = cssPartial`\n  font-family: ${bodyFont};\n  font-size: ${typeRampMinus1FontSize};\n  line-height: ${typeRampMinus1LineHeight};\n  font-weight: initial;\n  font-variation-settings: ${typeRampMinus1FontVariations};\n`;\n/** @public */\nconst typeRampMinus2 = cssPartial`\n  font-family: ${bodyFont};\n  font-size: ${typeRampMinus2FontSize};\n  line-height: ${typeRampMinus2LineHeight};\n  font-weight: initial;\n  font-variation-settings: ${typeRampMinus2FontVariations};\n`;\n/** @public */\nconst typeRampPlus1 = cssPartial`\n  font-family: ${bodyFont};\n  font-size: ${typeRampPlus1FontSize};\n  line-height: ${typeRampPlus1LineHeight};\n  font-weight: initial;\n  font-variation-settings: ${typeRampPlus1FontVariations};\n`;\n/** @public */\nconst typeRampPlus2 = cssPartial`\n  font-family: ${bodyFont};\n  font-size: ${typeRampPlus2FontSize};\n  line-height: ${typeRampPlus2LineHeight};\n  font-weight: initial;\n  font-variation-settings: ${typeRampPlus2FontVariations};\n`;\n/** @public */\nconst typeRampPlus3 = cssPartial`\n  font-family: ${bodyFont};\n  font-size: ${typeRampPlus3FontSize};\n  line-height: ${typeRampPlus3LineHeight};\n  font-weight: initial;\n  font-variation-settings: ${typeRampPlus3FontVariations};\n`;\n/** @public */\nconst typeRampPlus4 = cssPartial`\n  font-family: ${bodyFont};\n  font-size: ${typeRampPlus4FontSize};\n  line-height: ${typeRampPlus4LineHeight};\n  font-weight: initial;\n  font-variation-settings: ${typeRampPlus4FontVariations};\n`;\n/** @public */\nconst typeRampPlus5 = cssPartial`\n  font-family: ${bodyFont};\n  font-size: ${typeRampPlus5FontSize};\n  line-height: ${typeRampPlus5LineHeight};\n  font-weight: initial;\n  font-variation-settings: ${typeRampPlus5FontVariations};\n`;\n/** @public */\nconst typeRampPlus6 = cssPartial`\n  font-family: ${bodyFont};\n  font-size: ${typeRampPlus6FontSize};\n  line-height: ${typeRampPlus6LineHeight};\n  font-weight: initial;\n  font-variation-settings: ${typeRampPlus6FontVariations};\n`;\n\nconst accordionStyles$1 = (context, definition) => css`\n    ${display('flex')} :host{box-sizing:border-box;flex-direction:column;${typeRampBase}\n      color:${neutralForegroundRest};gap:calc(${designUnit} * 1px)}`;\n\n/**\r\n * Partial CSS for the focus treatment for most typical sized components like Button, Menu Item, etc.\r\n *\r\n * @public\r\n */\nconst focusTreatmentBase = cssPartial`\n  outline: calc(${focusStrokeWidth} * 1px) solid ${focusStrokeOuter};\n  outline-offset: calc(${focusStrokeWidth} * -1px);\n`;\n/**\r\n * Partial CSS for the focus treatment for tighter components with spacing constraints, like Checkbox\r\n * and Radio, or plain text like Hypertext appearance Anchor or Breadcrumb Item.\r\n *\r\n * @public\r\n */\nconst focusTreatmentTight = cssPartial`\n  outline: calc(${focusStrokeWidth} * 1px) solid ${focusStrokeOuter};\n  outline-offset: calc(${strokeWidth} * 1px);\n`;\n\n/**\r\n * A formula to retrieve the control height.\r\n * Use this as the value of any CSS property that\r\n * accepts a pixel size.\r\n * @public\r\n */\nconst heightNumber = cssPartial`(${baseHeightMultiplier} + ${density}) * ${designUnit}`;\n\nconst neutralFillStealthRestOnNeutralFillLayerRest = DesignToken.create('neutral-fill-stealth-rest-on-neutral-fill-layer-rest').withDefault(target => {\n  const baseRecipe = neutralFillLayerRecipe.getValueFor(target);\n  const buttonRecipe = neutralFillStealthRecipe.getValueFor(target);\n  return buttonRecipe.evaluate(target, baseRecipe.evaluate(target).rest).rest;\n});\nconst neutralFillStealthHoverOnNeutralFillLayerRest = DesignToken.create('neutral-fill-stealth-hover-on-neutral-fill-layer-rest').withDefault(target => {\n  const baseRecipe = neutralFillLayerRecipe.getValueFor(target);\n  const buttonRecipe = neutralFillStealthRecipe.getValueFor(target);\n  return buttonRecipe.evaluate(target, baseRecipe.evaluate(target).rest).hover;\n});\nconst neutralFillStealthActiveOnNeutralFillLayerRest = DesignToken.create('neutral-fill-stealth-active-on-neutral-fill-layer-rest').withDefault(target => {\n  const baseRecipe = neutralFillLayerRecipe.getValueFor(target);\n  const buttonRecipe = neutralFillStealthRecipe.getValueFor(target);\n  return buttonRecipe.evaluate(target, baseRecipe.evaluate(target).rest).active;\n});\nconst accordionItemStyles$1 = (context, definition) => css`\n    ${display('flex')} :host{box-sizing:border-box;${typeRampBase};flex-direction:column;background:${neutralFillLayerRest};color:${neutralForegroundRest};border:calc(${strokeWidth} * 1px) solid ${neutralStrokeLayerRest};border-radius:calc(${layerCornerRadius} * 1px)}.region{display:none;padding:calc(${designUnit} * 2 * 1px);background:${neutralFillLayerAltRest}}.heading{display:grid;position:relative;grid-template-columns:auto 1fr auto auto;align-items:center}.button{appearance:none;border:none;background:none;grid-column:2;grid-row:1;outline:none;margin:calc(${designUnit} * 3 * 1px) 0;padding:0 calc(${designUnit} * 2 * 1px);text-align:left;color:inherit;cursor:pointer;font:inherit}.button::before{content:'';position:absolute;top:calc(${strokeWidth} * -1px);left:calc(${strokeWidth} * -1px);right:calc(${strokeWidth} * -1px);bottom:calc(${strokeWidth} * -1px);cursor:pointer}.button:${focusVisible}::before{${focusTreatmentBase}\n      border-radius:calc(${layerCornerRadius} * 1px)}:host(.expanded) .button:${focusVisible}::before{border-bottom-left-radius:0;border-bottom-right-radius:0}:host(.expanded) .region{display:block;border-top:calc(${strokeWidth} * 1px) solid ${neutralStrokeLayerRest};border-bottom-left-radius:calc((${layerCornerRadius} - ${strokeWidth}) * 1px);border-bottom-right-radius:calc((${layerCornerRadius} - ${strokeWidth}) * 1px)}.icon{display:flex;align-items:center;justify-content:center;grid-column:4;pointer-events:none;background:${neutralFillStealthRestOnNeutralFillLayerRest};border-radius:calc(${controlCornerRadius} * 1px);fill:currentcolor;width:calc(${heightNumber} * 1px);height:calc(${heightNumber} * 1px);margin:calc(${designUnit} * 2 * 1px)}.heading:hover .icon{background:${neutralFillStealthHoverOnNeutralFillLayerRest}}.heading:active .icon{background:${neutralFillStealthActiveOnNeutralFillLayerRest}}slot[name='collapsed-icon']{display:flex}:host(.expanded) slot[name='collapsed-icon']{display:none}slot[name='expanded-icon']{display:none}:host(.expanded) slot[name='expanded-icon']{display:flex}.start{display:flex;align-items:center;padding-inline-start:calc(${designUnit} * 2 * 1px);justify-content:center;grid-column:1}.end{display:flex;align-items:center;justify-content:center;grid-column:3}.icon,.start,.end{position:relative}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        .button:${focusVisible}::before{outline-color:${SystemColors.Highlight}}.icon{fill:${SystemColors.ButtonText}}`));\n\n/**\r\n * The Fluent Accordion Item Element. Implements {@link @microsoft/fast-foundation#AccordionItem},\r\n * {@link @microsoft/fast-foundation#accordionItemTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-accordion-item\\>\r\n */\nconst fluentAccordionItem = AccordionItem.compose({\n  baseName: 'accordion-item',\n  template: accordionItemTemplate,\n  styles: accordionItemStyles$1,\n  collapsedIcon: `\n    <svg width=\"12\" height=\"12\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M2.15 4.65c.2-.2.5-.2.7 0L6 7.79l3.15-3.14a.5.5 0 11.7.7l-3.5 3.5a.5.5 0 01-.7 0l-3.5-3.5a.5.5 0 010-.7z\"/>\n    </svg>\n  `,\n  expandedIcon: `\n    <svg width=\"12\" height=\"12\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M2.15 7.35c.2.2.5.2.7 0L6 4.21l3.15 3.14a.5.5 0 10.7-.7l-3.5-3.5a.5.5 0 00-.7 0l-3.5 3.5a.5.5 0 000 .7z\"/>\n    </svg>\n  `\n});\n/**\r\n * Styles for AccordionItem\r\n * @public\r\n */\nconst accordionItemStyles = accordionItemStyles$1;\n\n/**\r\n * The Fluent Accordion Element. Implements {@link @microsoft/fast-foundation#Accordion},\r\n * {@link @microsoft/fast-foundation#accordionTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-accordion\\>\r\n */\nconst fluentAccordion = Accordion.compose({\n  baseName: 'accordion',\n  template: accordionTemplate,\n  styles: accordionStyles$1\n});\n/**\r\n * Styles for Accordion\r\n * @public\r\n */\nconst accordionStyles = accordionStyles$1;\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\nfunction __decorate(decorators, target, key, desc) {\n  var c = arguments.length,\n    r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n    d;\n  if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n  return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\n/**\r\n * Behavior to conditionally apply LTR and RTL stylesheets. To determine which to apply,\r\n * the behavior will use the nearest DesignSystemProvider's 'direction' design system value.\r\n *\r\n * @public\r\n * @example\r\n * ```ts\r\n * import { css } from \"@microsoft/fast-element\";\r\n * import { DirectionalStyleSheetBehavior } from \"@microsoft/fast-foundation\";\r\n *\r\n * css`\r\n *  // ...\r\n * `.withBehaviors(new DirectionalStyleSheetBehavior(\r\n *   css`:host { content: \"ltr\"}`),\r\n *   css`:host { content: \"rtl\"}`),\r\n * )\r\n * ```\r\n */\nclass DirectionalStyleSheetBehavior {\n  constructor(ltr, rtl) {\n    this.cache = new WeakMap();\n    this.ltr = ltr;\n    this.rtl = rtl;\n  }\n  /**\r\n   * @internal\r\n   */\n  bind(source) {\n    this.attach(source);\n  }\n  /**\r\n   * @internal\r\n   */\n  unbind(source) {\n    const cache = this.cache.get(source);\n    if (cache) {\n      direction.unsubscribe(cache);\n    }\n  }\n  attach(source) {\n    const subscriber = this.cache.get(source) || new DirectionalStyleSheetBehaviorSubscription(this.ltr, this.rtl, source);\n    const value = direction.getValueFor(source);\n    direction.subscribe(subscriber);\n    subscriber.attach(value);\n    this.cache.set(source, subscriber);\n  }\n}\n/**\r\n * Subscription for {@link DirectionalStyleSheetBehavior}\r\n */\nclass DirectionalStyleSheetBehaviorSubscription {\n  constructor(ltr, rtl, source) {\n    this.ltr = ltr;\n    this.rtl = rtl;\n    this.source = source;\n    this.attached = null;\n  }\n  handleChange({\n    target,\n    token\n  }) {\n    this.attach(token.getValueFor(this.source));\n  }\n  attach(direction) {\n    if (this.attached !== this[direction]) {\n      if (this.attached !== null) {\n        this.source.$fastController.removeStyles(this.attached);\n      }\n      this.attached = this[direction];\n      if (this.attached !== null) {\n        this.source.$fastController.addStyles(this.attached);\n      }\n    }\n  }\n}\n\n/**\r\n * Define shadow algorithms.\r\n *\r\n * TODO: The --background-luminance will need to be derived from JavaScript. For now\r\n * this is hard-coded to a 1, the relative luminance of pure white.\r\n * https://github.com/microsoft/fast/issues/2778\r\n * opacity was `calc(.11 * (2 - var(--background-luminance, 1)))`\r\n *\r\n * @internal\r\n * @deprecated Use elevationShadow design token\r\n */\nconst ambientShadow = '0 0 2px rgba(0, 0, 0, 0.14)';\n/**\r\n * @internal\r\n * @deprecated Use elevationShadow design token\r\n */\nconst directionalShadow = '0 calc(var(--elevation) * 0.5px) calc((var(--elevation) * 1px)) rgba(0, 0, 0, 0.2)';\n/**\r\n * Applies the box-shadow CSS rule set to the elevation formula.\r\n * Control this formula with the --elevation CSS Custom Property\r\n * by setting --elevation to a number.\r\n *\r\n * @public\r\n * @deprecated Use elevationShadow design token\r\n */\nconst elevation = `box-shadow: ${ambientShadow}, ${directionalShadow};`;\n/**\r\n * @public\r\n */\nconst elevationShadowRecipe = DesignToken.create({\n  name: 'elevation-shadow',\n  cssCustomPropertyName: null\n}).withDefault({\n  evaluate: (element, size, reference) => {\n    let ambientOpacity = 0.12;\n    let directionalOpacity = 0.14;\n    if (size > 16) {\n      ambientOpacity = 0.2;\n      directionalOpacity = 0.24;\n    }\n    const ambient = `0 0 2px rgba(0, 0, 0, ${ambientOpacity})`;\n    const directional = `0 calc(${size} * 0.5px) calc((${size} * 1px)) rgba(0, 0, 0, ${directionalOpacity})`;\n    return `${ambient}, ${directional}`;\n  }\n});\n/** @public */\nconst elevationShadowCardRestSize = DesignToken.create('elevation-shadow-card-rest-size').withDefault(4);\n/** @public */\nconst elevationShadowCardHoverSize = DesignToken.create('elevation-shadow-card-hover-size').withDefault(8);\n/** @public */\nconst elevationShadowCardActiveSize = DesignToken.create('elevation-shadow-card-active-size').withDefault(0);\n/** @public */\nconst elevationShadowCardFocusSize = DesignToken.create('elevation-shadow-card-focus-size').withDefault(8);\n/** @public */\nconst elevationShadowCardRest = DesignToken.create('elevation-shadow-card-rest').withDefault(element => elevationShadowRecipe.getValueFor(element).evaluate(element, elevationShadowCardRestSize.getValueFor(element)));\n/** @public */\nconst elevationShadowCardHover = DesignToken.create('elevation-shadow-card-hover').withDefault(element => elevationShadowRecipe.getValueFor(element).evaluate(element, elevationShadowCardHoverSize.getValueFor(element)));\n/** @public */\nconst elevationShadowCardActive = DesignToken.create('elevation-shadow-card-active').withDefault(element => elevationShadowRecipe.getValueFor(element).evaluate(element, elevationShadowCardActiveSize.getValueFor(element)));\n/** @public */\nconst elevationShadowCardFocus = DesignToken.create('elevation-shadow-card-focus').withDefault(element => elevationShadowRecipe.getValueFor(element).evaluate(element, elevationShadowCardFocusSize.getValueFor(element)));\n/** @public */\nconst elevationShadowTooltipSize = DesignToken.create('elevation-shadow-tooltip-size').withDefault(16);\n/** @public */\nconst elevationShadowTooltip = DesignToken.create('elevation-shadow-tooltip').withDefault(element => elevationShadowRecipe.getValueFor(element).evaluate(element, elevationShadowTooltipSize.getValueFor(element)));\n/** @public */\nconst elevationShadowFlyoutSize = DesignToken.create('elevation-shadow-flyout-size').withDefault(32);\n/** @public */\nconst elevationShadowFlyout = DesignToken.create('elevation-shadow-flyout').withDefault(element => elevationShadowRecipe.getValueFor(element).evaluate(element, elevationShadowFlyoutSize.getValueFor(element)));\n/** @public */\nconst elevationShadowDialogSize = DesignToken.create('elevation-shadow-dialog-size').withDefault(128);\n/** @public */\nconst elevationShadowDialog = DesignToken.create('elevation-shadow-dialog').withDefault(element => elevationShadowRecipe.getValueFor(element).evaluate(element, elevationShadowDialogSize.getValueFor(element)));\n\n/**\r\n * The base styles for button controls, without `appearance` visual differences.\r\n *\r\n * @internal\r\n */\nconst baseButtonStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css`\n    ${display('inline-flex')}\n    \n    :host{position:relative;box-sizing:border-box;${typeRampBase}\n      height:calc(${heightNumber} * 1px);min-width:calc(${heightNumber} * 1px);color:${neutralForegroundRest};border-radius:calc(${controlCornerRadius} * 1px);fill:currentcolor}.control{border:calc(${strokeWidth} * 1px) solid transparent;flex-grow:1;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;padding:0 calc((10 + (${designUnit} * 2 * ${density})) * 1px);white-space:nowrap;outline:none;text-decoration:none;color:inherit;border-radius:inherit;fill:inherit;font-family:inherit}.control,.end,.start{font:inherit}.control.icon-only{padding:0;line-height:0}.control:${focusVisible}{${focusTreatmentBase}}.control::-moz-focus-inner{border:0}.content{pointer-events:none}.start,.end{display:flex;pointer-events:none}.start{margin-inline-end:11px}.end{margin-inline-start:11px}`;\n/**\r\n * @internal\r\n */\nconst NeutralButtonStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css`\n    .control{background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlRest}}:host(${interactivitySelector}:hover) .control{background:padding-box linear-gradient(${neutralFillHover},${neutralFillHover}),border-box ${neutralStrokeControlHover}}:host(${interactivitySelector}:active) .control{background:padding-box linear-gradient(${neutralFillActive},${neutralFillActive}),border-box ${neutralStrokeControlActive}}:host(${nonInteractivitySelector}) .control{background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeRest}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        .control{background:${SystemColors.ButtonFace};border-color:${SystemColors.ButtonText};color:${SystemColors.ButtonText}}:host(${interactivitySelector}:hover) .control,:host(${interactivitySelector}:active) .control{forced-color-adjust:none;background:${SystemColors.HighlightText};border-color:${SystemColors.Highlight};color:${SystemColors.Highlight}}:host(${nonInteractivitySelector}) .control{background:transparent;border-color:${SystemColors.GrayText};color:${SystemColors.GrayText}}.control:${focusVisible}{outline-color:${SystemColors.CanvasText}}:host([href]) .control{background:transparent;border-color:${SystemColors.LinkText};color:${SystemColors.LinkText}}:host([href]:hover) .control,:host([href]:active) .control{background:transparent;border-color:${SystemColors.CanvasText};color:${SystemColors.CanvasText}}`));\n/**\r\n * @internal\r\n */\nconst AccentButtonStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css`\n    .control{background:padding-box linear-gradient(${accentFillRest},${accentFillRest}),border-box ${accentStrokeControlRest};color:${foregroundOnAccentRest}}:host(${interactivitySelector}:hover) .control{background:padding-box linear-gradient(${accentFillHover},${accentFillHover}),border-box ${accentStrokeControlHover};color:${foregroundOnAccentHover}}:host(${interactivitySelector}:active) .control{background:padding-box linear-gradient(${accentFillActive},${accentFillActive}),border-box ${accentStrokeControlActive};color:${foregroundOnAccentActive}}:host(${nonInteractivitySelector}) .control{background:${accentFillRest}}.control:${focusVisible}{box-shadow:0 0 0 calc(${focusStrokeWidth} * 1px) ${focusStrokeInner} inset !important}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        .control{forced-color-adjust:none;background:${SystemColors.Highlight};color:${SystemColors.HighlightText}}:host(${interactivitySelector}:hover) .control,:host(${interactivitySelector}:active) .control{background:${SystemColors.HighlightText};border-color:${SystemColors.Highlight};color:${SystemColors.Highlight}}:host(${nonInteractivitySelector}) .control{background:transparent;border-color:${SystemColors.GrayText};color:${SystemColors.GrayText}}.control:${focusVisible}{outline-color:${SystemColors.CanvasText};box-shadow:0 0 0 calc(${focusStrokeWidth} * 1px) ${SystemColors.HighlightText} inset !important}:host([href]) .control{background:${SystemColors.LinkText};color:${SystemColors.HighlightText}}:host([href]:hover) .control,:host([href]:active) .control{background:${SystemColors.ButtonFace};border-color:${SystemColors.LinkText};color:${SystemColors.LinkText}}`));\n/**\r\n * @internal\r\n */\nconst HypertextStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css`\n    :host{height:auto;font-family:inherit;font-size:inherit;line-height:inherit;min-width:0}.control{display:inline;padding:0;border:none;box-shadow:none;line-height:1}:host(${interactivitySelector}) .control{color:${accentForegroundRest};text-decoration:underline 1px}:host(${interactivitySelector}:hover) .control{color:${accentForegroundHover};text-decoration:none}:host(${interactivitySelector}:active) .control{color:${accentForegroundActive};text-decoration:none}.control:${focusVisible}{${focusTreatmentTight}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        :host(${interactivitySelector}) .control{color:${SystemColors.LinkText}}:host(${interactivitySelector}:hover) .control,:host(${interactivitySelector}:active) .control{color:${SystemColors.CanvasText}}.control:${focusVisible}{outline-color:${SystemColors.CanvasText}}`));\n/**\r\n * @internal\r\n */\nconst LightweightButtonStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css`\n    :host{color:${accentForegroundRest}}.control{background:${neutralFillStealthRest}}:host(${interactivitySelector}:hover) .control{background:${neutralFillStealthHover};color:${accentForegroundHover}}:host(${interactivitySelector}:active) .control{background:${neutralFillStealthActive};color:${accentForegroundActive}}:host(${nonInteractivitySelector}) .control{background:${neutralFillStealthRest}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        :host{color:${SystemColors.ButtonText}}.control{forced-color-adjust:none;background:transparent}:host(${interactivitySelector}:hover) .control,:host(${interactivitySelector}:active) .control{background:transparent;border-color:${SystemColors.ButtonText};color:${SystemColors.ButtonText}}:host(${nonInteractivitySelector}) .control{background:transparent;color:${SystemColors.GrayText}}.control:${focusVisible}{outline-color:${SystemColors.CanvasText}}:host([href]) .control{color:${SystemColors.LinkText}}:host([href]:hover) .control,:host([href]:active) .control{border-color:${SystemColors.LinkText};color:${SystemColors.LinkText}}`));\n/**\r\n * @internal\r\n */\nconst OutlineButtonStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css`\n    .control{background:transparent !important;border-color:${neutralStrokeRest}}:host(${interactivitySelector}:hover) .control{border-color:${neutralStrokeHover}}:host(${interactivitySelector}:active) .control{border-color:${neutralStrokeActive}}:host(${nonInteractivitySelector}) .control{background:transparent !important;border-color:${neutralStrokeRest}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        .control{border-color:${SystemColors.ButtonText};color:${SystemColors.ButtonText}}:host(${interactivitySelector}:hover) .control,:host(${interactivitySelector}:active) .control{background:${SystemColors.HighlightText};border-color:${SystemColors.Highlight};color:${SystemColors.Highlight}}:host(${nonInteractivitySelector}) .control{border-color:${SystemColors.GrayText};color:${SystemColors.GrayText}}.control:${focusVisible}{outline-color:${SystemColors.CanvasText}}:host([href]) .control{border-color:${SystemColors.LinkText};color:${SystemColors.LinkText}}:host([href]:hover) .control,:host([href]:active) .control{border-color:${SystemColors.CanvasText};color:${SystemColors.CanvasText}}`));\n/**\r\n * @internal\r\n */\nconst StealthButtonStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css`\n    .control{background:${neutralFillStealthRest}}:host(${interactivitySelector}:hover) .control{background:${neutralFillStealthHover}}:host(${interactivitySelector}:active) .control{background:${neutralFillStealthActive}}:host(${nonInteractivitySelector}) .control{background:${neutralFillStealthRest}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        .control{forced-color-adjust:none;background:transparent;color:${SystemColors.ButtonText}}:host(${interactivitySelector}:hover) .control,:host(${interactivitySelector}:active) .control{background:transparent;border-color:${SystemColors.ButtonText};color:${SystemColors.ButtonText}}:host(${nonInteractivitySelector}) .control{background:transparent;color:${SystemColors.GrayText}}.control:${focusVisible}{outline-color:${SystemColors.CanvasText}}:host([href]) .control{color:${SystemColors.LinkText}}:host([href]:hover) .control,:host([href]:active) .control{background:transparent;border-color:${SystemColors.LinkText};color:${SystemColors.LinkText}}`));\n\nconst placeholderRest = DesignToken.create('input-placeholder-rest').withDefault(target => {\n  const baseRecipe = neutralFillInputRecipe.getValueFor(target);\n  const hintRecipe = neutralForegroundHintRecipe.getValueFor(target);\n  return hintRecipe.evaluate(target, baseRecipe.evaluate(target).rest);\n});\nconst placeholderHover = DesignToken.create('input-placeholder-hover').withDefault(target => {\n  const baseRecipe = neutralFillInputRecipe.getValueFor(target);\n  const hintRecipe = neutralForegroundHintRecipe.getValueFor(target);\n  return hintRecipe.evaluate(target, baseRecipe.evaluate(target).hover);\n});\nconst filledPlaceholderRest = DesignToken.create('input-filled-placeholder-rest').withDefault(target => {\n  const baseRecipe = neutralFillSecondaryRecipe.getValueFor(target);\n  const hintRecipe = neutralForegroundHintRecipe.getValueFor(target);\n  return hintRecipe.evaluate(target, baseRecipe.evaluate(target).rest);\n});\nconst filledPlaceholderHover = DesignToken.create('input-filled-placeholder-hover').withDefault(target => {\n  const baseRecipe = neutralFillSecondaryRecipe.getValueFor(target);\n  const hintRecipe = neutralForegroundHintRecipe.getValueFor(target);\n  return hintRecipe.evaluate(target, baseRecipe.evaluate(target).hover);\n});\n/**\r\n * The base styles for input controls, without `appearance` visual differences.\r\n *\r\n * @internal\r\n */\nconst baseInputStyles = (context, definition, logicalControlSelector) => css`\n  :host{${typeRampBase}\n    color:${neutralForegroundRest};fill:currentcolor;user-select:none;position:relative}${logicalControlSelector}{box-sizing:border-box;position:relative;color:inherit;border:calc(${strokeWidth} * 1px) solid transparent;border-radius:calc(${controlCornerRadius} * 1px);height:calc(${heightNumber} * 1px);font-family:inherit;font-size:inherit;line-height:inherit}.control{width:100%;outline:none}.label{display:block;color:${neutralForegroundRest};cursor:pointer;${typeRampBase}\n    margin-bottom:4px}.label__hidden{display:none;visibility:hidden}:host([disabled]) ${logicalControlSelector},:host([readonly]) ${logicalControlSelector},:host([disabled]) .label,:host([readonly]) .label,:host([disabled]) .control,:host([readonly]) .control{cursor:${disabledCursor}}:host([disabled]){opacity:${disabledOpacity}}`;\n/**\r\n * The styles for active and focus interactions for input controls.\r\n *\r\n * @internal\r\n */\nconst inputStateStyles = (context, definition, logicalControlSelector) => css`\n  @media (forced-colors:none){:host(:not([disabled]):active)::after{left:50%;width:40%;transform:translateX(-50%);border-bottom-left-radius:0;border-bottom-right-radius:0}:host(:not([disabled]):focus-within)::after{left:0;width:100%;transform:none}:host(:not([disabled]):active)::after,:host(:not([disabled]):focus-within:not(:active))::after{content:'';position:absolute;height:calc(${focusStrokeWidth} * 1px);bottom:0;border-bottom:calc(${focusStrokeWidth} * 1px) solid ${accentFillRest};border-bottom-left-radius:calc(${controlCornerRadius} * 1px);border-bottom-right-radius:calc(${controlCornerRadius} * 1px);z-index:2;transition:all 300ms cubic-bezier(0.1,0.9,0.2,1)}}`;\n/**\r\n * The visual styles for inputs with `appearance='outline'`.\r\n *\r\n * @internal\r\n */\nconst inputOutlineStyles = (context, definition, logicalControlSelector, interactivitySelector = ':not([disabled]):not(:focus-within)') => css`\n  ${logicalControlSelector}{background:padding-box linear-gradient(${neutralFillInputRest},${neutralFillInputRest}),border-box ${neutralStrokeInputRest}}:host(${interactivitySelector}:hover) ${logicalControlSelector}{background:padding-box linear-gradient(${neutralFillInputHover},${neutralFillInputHover}),border-box ${neutralStrokeInputHover}}:host(:not([disabled]):focus-within) ${logicalControlSelector}{background:padding-box linear-gradient(${neutralFillInputFocus},${neutralFillInputFocus}),border-box ${neutralStrokeInputRest}}:host([disabled]) ${logicalControlSelector}{background:padding-box linear-gradient(${neutralFillInputRest},${neutralFillInputRest}),border-box ${neutralStrokeRest}}.control::placeholder{color:${placeholderRest}}:host(${interactivitySelector}:hover) .control::placeholder{color:${placeholderHover}}`;\n/**\r\n * The visual styles for inputs with `appearance='filled'`.\r\n *\r\n * @internal\r\n */\nconst inputFilledStyles = (context, definition, logicalControlSelector, interactivitySelector = ':not([disabled]):not(:focus-within)') => css`\n  ${logicalControlSelector}{background:${neutralFillSecondaryRest}}:host(${interactivitySelector}:hover) ${logicalControlSelector}{background:${neutralFillSecondaryHover}}:host(:not([disabled]):focus-within) ${logicalControlSelector}{background:${neutralFillSecondaryFocus}}:host([disabled]) ${logicalControlSelector}{background:${neutralFillSecondaryRest}}.control::placeholder{color:${filledPlaceholderRest}}:host(${interactivitySelector}:hover) .control::placeholder{color:${filledPlaceholderHover}}`;\n/**\r\n * @internal\r\n */\nconst inputForcedColorStyles = (context, definition, logicalControlSelector, interactivitySelector = ':not([disabled]):not(:focus-within)') => css`\n  :host{color:${SystemColors.ButtonText}}${logicalControlSelector}{background:${SystemColors.ButtonFace};border-color:${SystemColors.ButtonText}}:host(${interactivitySelector}:hover) ${logicalControlSelector},:host(:not([disabled]):focus-within) ${logicalControlSelector}{border-color:${SystemColors.Highlight}}:host([disabled]) ${logicalControlSelector}{opacity:1;background:${SystemColors.ButtonFace};border-color:${SystemColors.GrayText}}.control::placeholder,:host(${interactivitySelector}:hover) .control::placeholder{color:${SystemColors.CanvasText}}:host(:not([disabled]):focus) ${logicalControlSelector}{${focusTreatmentBase}\n    outline-color:${SystemColors.Highlight}}:host([disabled]){opacity:1;color:${SystemColors.GrayText}}:host([disabled]) ::placeholder,:host([disabled]) ::-webkit-input-placeholder{color:${SystemColors.GrayText}}`;\n\n/**\r\n * Behavior that will conditionally apply a stylesheet based on the elements\r\n * appearance property\r\n *\r\n * @param value - The value of the appearance property\r\n * @param styles - The styles to be applied when condition matches\r\n *\r\n * @public\r\n */\nfunction appearanceBehavior(value, styles) {\n  return new PropertyStyleSheetBehavior('appearance', value, styles);\n}\n\nconst interactivitySelector$3 = '[href]';\nconst anchorStyles$1 = (context, definition) => baseButtonStyles().withBehaviors(appearanceBehavior('neutral', NeutralButtonStyles(context, definition, interactivitySelector$3)), appearanceBehavior('accent', AccentButtonStyles(context, definition, interactivitySelector$3)), appearanceBehavior('hypertext', HypertextStyles(context, definition, interactivitySelector$3)), appearanceBehavior('lightweight', LightweightButtonStyles(context, definition, interactivitySelector$3)), appearanceBehavior('outline', OutlineButtonStyles(context, definition, interactivitySelector$3)), appearanceBehavior('stealth', StealthButtonStyles(context, definition, interactivitySelector$3)));\n\n/**\r\n * The Fluent version of Anchor\r\n * @internal\r\n */\nclass Anchor extends Anchor$1 {\n  appearanceChanged(oldValue, newValue) {\n    if (oldValue !== newValue) {\n      this.classList.add(newValue);\n      this.classList.remove(oldValue);\n    }\n  }\n  /**\r\n   * @internal\r\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    if (!this.appearance) {\n      this.appearance = 'neutral';\n    }\n  }\n  /**\r\n   * Applies 'icon-only' class when there is only an SVG in the default slot\r\n   *\r\n   * @internal\r\n   */\n  defaultSlottedContentChanged() {\n    var _a, _b;\n    const slottedElements = this.defaultSlottedContent.filter(x => x.nodeType === Node.ELEMENT_NODE);\n    if (slottedElements.length === 1 && slottedElements[0] instanceof SVGElement) {\n      (_a = this.control) === null || _a === void 0 ? void 0 : _a.classList.add('icon-only');\n    } else {\n      (_b = this.control) === null || _b === void 0 ? void 0 : _b.classList.remove('icon-only');\n    }\n  }\n}\n__decorate([attr], Anchor.prototype, \"appearance\", void 0);\n/**\r\n * Styles for Anchor\r\n * @public\r\n */\nconst anchorStyles = anchorStyles$1;\n/**\r\n * The Fluent Anchor Element. Implements {@link @microsoft/fast-foundation#Anchor},\r\n * {@link @microsoft/fast-foundation#anchorTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-anchor\\>\r\n *\r\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}\r\n */\nconst fluentAnchor = Anchor.compose({\n  baseName: 'anchor',\n  baseClass: Anchor$1,\n  template: anchorTemplate,\n  styles: anchorStyles$1,\n  shadowOptions: {\n    delegatesFocus: true\n  }\n});\n\nconst anchoredRegionStyles$1 = (context, definition) => css`\n  :host{contain:layout;display:block}`;\n\n/**\r\n * The Fluent AnchoredRegion Element. Implements {@link @microsoft/fast-foundation#AnchoredRegion},\r\n * {@link @microsoft/fast-foundation#anchoredRegionTemplate}\r\n *\r\n *\r\n * @beta\r\n * @remarks\r\n * HTML Element: \\<fluent-anchored-region\\>\r\n */\nconst fluentAnchoredRegion = AnchoredRegion.compose({\n  baseName: 'anchored-region',\n  template: anchoredRegionTemplate,\n  styles: anchoredRegionStyles$1\n});\n/**\r\n * Styles for AnchoredRegion\r\n * @public\r\n */\nconst anchoredRegionStyles = anchoredRegionStyles$1;\n\nconst badgeStyles$1 = (context, definition) => css`\n    ${display('inline-block')} :host{box-sizing:border-box;${typeRampMinus1}}.control{border-radius:calc(${controlCornerRadius} * 1px);padding:calc(((${designUnit} * 0.5) - ${strokeWidth}) * 1px) calc((${designUnit} - ${strokeWidth}) * 1px);border:calc(${strokeWidth} * 1px) solid transparent}:host(.lightweight) .control{background:transparent;color:${neutralForegroundRest};font-weight:600}:host(.accent) .control{background:${accentFillRest};color:${foregroundOnAccentRest}}:host(.neutral) .control{background:${neutralFillSecondaryRest};color:${neutralForegroundRest}}:host([circular]) .control{border-radius:100px;min-width:calc(${typeRampMinus1LineHeight} - calc(${designUnit} * 1px));display:flex;align-items:center;justify-content:center}`;\n\n/**\r\n * The Fluent Badge class\r\n * @internal\r\n */\nclass Badge extends Badge$1 {\n  constructor() {\n    super(...arguments);\n    this.appearance = 'lightweight';\n  }\n  appearanceChanged(oldValue, newValue) {\n    if (oldValue !== newValue) {\n      DOM.queueUpdate(() => {\n        this.classList.add(newValue);\n        this.classList.remove(oldValue);\n      });\n    }\n  }\n}\n__decorate([attr({\n  mode: 'fromView'\n})], Badge.prototype, \"appearance\", void 0);\n/**\r\n * The Fluent Badge Element. Implements {@link @microsoft/fast-foundation#Badge},\r\n * {@link @microsoft/fast-foundation#badgeTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-badge\\>\r\n */\nconst fluentBadge = Badge.compose({\n  baseName: 'badge',\n  baseClass: Badge$1,\n  template: badgeTemplate,\n  styles: badgeStyles$1\n});\n/**\r\n * Styles for Badge\r\n * @public\r\n */\nconst badgeStyles = badgeStyles$1;\n\nconst breadcrumbStyles$1 = (context, definition) => css`\n  ${display('inline-block')} :host{box-sizing:border-box;${typeRampBase}}.list{display:flex}`;\n\n/**\r\n * The Fluent Breadcrumb Element. Implements {@link @microsoft/fast-foundation#Breadcrumb},\r\n * {@link @microsoft/fast-foundation#breadcrumbTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-breadcrumb\\>\r\n */\nconst fluentBreadcrumb = Breadcrumb.compose({\n  baseName: 'breadcrumb',\n  template: breadcrumbTemplate,\n  styles: breadcrumbStyles$1\n});\n/**\r\n * Styles for Breadcrumb\r\n * @public\r\n */\nconst breadcrumbStyles = breadcrumbStyles$1;\n\nconst breadcrumbItemStyles$1 = (context, definition) => css`\n    ${display('inline-flex')} :host{background:transparent;color:${neutralForegroundRest};fill:currentcolor;box-sizing:border-box;${typeRampBase};min-width:calc(${heightNumber} * 1px);border-radius:calc(${controlCornerRadius} * 1px)}.listitem{display:flex;align-items:center;border-radius:inherit}.control{position:relative;align-items:center;box-sizing:border-box;color:inherit;fill:inherit;cursor:pointer;display:flex;outline:none;text-decoration:none;white-space:nowrap;border-radius:inherit}.control:hover{color:${neutralForegroundHover}}.control:active{color:${neutralForegroundActive}}.control:${focusVisible}{${focusTreatmentTight}}:host(:not([href])),:host([aria-current]) .control{color:${neutralForegroundRest};fill:currentcolor;cursor:default}.start{display:flex;margin-inline-end:6px}.end{display:flex;margin-inline-start:6px}.separator{display:flex}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        :host(:not([href])),.start,.end,.separator{background:${SystemColors.ButtonFace};color:${SystemColors.ButtonText};fill:currentcolor}.separator{fill:${SystemColors.ButtonText}}:host([href]){forced-color-adjust:none;background:${SystemColors.ButtonFace};color:${SystemColors.LinkText}}:host([href]) .control:hover{background:${SystemColors.LinkText};color:${SystemColors.HighlightText};fill:currentcolor}.control:${focusVisible}{outline-color:${SystemColors.LinkText}}`));\n\n/**\r\n * The Fluent BreadcrumbItem Element. Implements {@link @microsoft/fast-foundation#BreadcrumbItem},\r\n * {@link @microsoft/fast-foundation#breadcrumbItemTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-breadcrumb-item\\>\r\n */\nconst fluentBreadcrumbItem = BreadcrumbItem.compose({\n  baseName: 'breadcrumb-item',\n  template: breadcrumbItemTemplate,\n  styles: breadcrumbItemStyles$1,\n  shadowOptions: {\n    delegatesFocus: true\n  },\n  separator: `\n    <svg width=\"12\" height=\"12\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M4.65 2.15a.5.5 0 000 .7L7.79 6 4.65 9.15a.5.5 0 10.7.7l3.5-3.5a.5.5 0 000-.7l-3.5-3.5a.5.5 0 00-.7 0z\"/>\n    </svg>\n  `\n});\n/**\r\n * Styles for BreadcrumbItem\r\n * @public\r\n */\nconst breadcrumbItemStyles = breadcrumbItemStyles$1;\n\nconst interactivitySelector$2 = ':not([disabled])';\nconst nonInteractivitySelector$1 = '[disabled]';\nconst buttonStyles$1 = (context, definition) => css`\n    :host(${interactivitySelector$2}) .control{cursor:pointer}:host(${nonInteractivitySelector$1}) .control{cursor:${disabledCursor}}@media (forced-colors:none){:host(${nonInteractivitySelector$1}) .control{opacity:${disabledOpacity}}}${baseButtonStyles(context, definition, interactivitySelector$2, nonInteractivitySelector$1)}\n  `.withBehaviors(appearanceBehavior('neutral', NeutralButtonStyles(context, definition, interactivitySelector$2, nonInteractivitySelector$1)), appearanceBehavior('accent', AccentButtonStyles(context, definition, interactivitySelector$2, nonInteractivitySelector$1)), appearanceBehavior('lightweight', LightweightButtonStyles(context, definition, interactivitySelector$2, nonInteractivitySelector$1)), appearanceBehavior('outline', OutlineButtonStyles(context, definition, interactivitySelector$2, nonInteractivitySelector$1)), appearanceBehavior('stealth', StealthButtonStyles(context, definition, interactivitySelector$2, nonInteractivitySelector$1)));\n\n/**\r\n * The Fluent button class\r\n * @internal\r\n */\nclass Button extends Button$1 {\n  appearanceChanged(oldValue, newValue) {\n    if (oldValue !== newValue) {\n      this.classList.add(newValue);\n      this.classList.remove(oldValue);\n    }\n  }\n  /**\r\n   * @internal\r\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    if (!this.appearance) {\n      this.appearance = 'neutral';\n    }\n  }\n  /**\r\n   * Applies 'icon-only' class when there is only an SVG in the default slot\r\n   *\r\n   * @internal\r\n   */\n  defaultSlottedContentChanged() {\n    const slottedElements = this.defaultSlottedContent.filter(x => x.nodeType === Node.ELEMENT_NODE);\n    if (slottedElements.length === 1 && slottedElements[0] instanceof SVGElement) {\n      this.control.classList.add('icon-only');\n    } else {\n      this.control.classList.remove('icon-only');\n    }\n  }\n}\n__decorate([attr], Button.prototype, \"appearance\", void 0);\n/**\r\n * The Fluent Button Element. Implements {@link @microsoft/fast-foundation#Button},\r\n * {@link @microsoft/fast-foundation#buttonTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-button\\>\r\n *\r\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}\r\n */\nconst fluentButton = Button.compose({\n  baseName: 'button',\n  baseClass: Button$1,\n  template: buttonTemplate,\n  styles: buttonStyles$1,\n  shadowOptions: {\n    delegatesFocus: true\n  }\n});\n/**\r\n * Styles for Button\r\n * @public\r\n */\nconst buttonStyles = buttonStyles$1;\n\n/**\r\n * LTR styles for calendar\r\n * @internal\r\n */\nconst ltrStyles = css`\n.day.disabled::before{transform:translate(-50%,0) rotate(45deg)}`;\n/**\r\n * RTL styles for calendar\r\n * @internal\r\n */\nconst rtlStyles = css`\n.day.disabled::before{transform:translate(50%,0) rotate(-45deg)}`;\n/**\r\n * Styles for calendar\r\n * @public\r\n */\nconst calendarStyles = (context, definition) => css`\n${display(\"inline-block\")} :host{--calendar-cell-size:calc((${baseHeightMultiplier} + 2 + ${density}) * ${designUnit} * 1px);--calendar-gap:2px;${typeRampBase}\n  color:${neutralForegroundRest}}.title{padding:calc(${designUnit} * 2px);font-weight:600}.days{text-align:center}.week-days,.week{display:grid;grid-template-columns:repeat(7,1fr);grid-gap:var(--calendar-gap);border:0;padding:0}.day,.week-day{border:0;width:var(--calendar-cell-size);height:var(--calendar-cell-size);line-height:var(--calendar-cell-size);padding:0;box-sizing:initial}.week-day{font-weight:600}.day{border:calc(${strokeWidth} * 1px) solid transparent;border-radius:calc(${controlCornerRadius} * 1px)}.interact .day{cursor:pointer}.date{height:100%}.inactive .date,.inactive.disabled::before{color:${neutralForegroundHint}}.disabled::before{content:'';display:inline-block;width:calc(var(--calendar-cell-size) * .8);height:calc(${strokeWidth} * 1px);background:currentColor;position:absolute;margin-top:calc(var(--calendar-cell-size) / 2);transform-origin:center;z-index:1}.selected{color:${accentFillRest};border:1px solid ${accentFillRest};background:${fillColor}}.selected + .selected{border-start-start-radius:0;border-end-start-radius:0;border-inline-start-width:0;padding-inline-start:calc(var(--calendar-gap) + (${strokeWidth} + ${controlCornerRadius}) * 1px);margin-inline-start:calc((${controlCornerRadius} * -1px) - var(--calendar-gap))}.today.disabled::before{color:${foregroundOnAccentRest}}.today .date{color:${foregroundOnAccentRest};background:${accentFillRest};border-radius:50%;position:relative}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n          .day.selected{color:${SystemColors.Highlight}}.today .date{background:${SystemColors.Highlight};color:${SystemColors.HighlightText}}`), new DirectionalStyleSheetBehavior(ltrStyles, rtlStyles));\n\n/**\r\n * Updated Calendar class that is readonly by default\r\n */\nclass Calendar extends Calendar$1 {\n  constructor() {\n    super(...arguments);\n    this.readonly = true;\n  }\n}\n__decorate([attr({\n  converter: booleanConverter\n})], Calendar.prototype, \"readonly\", void 0);\n/**\r\n * The Fluent Calendar Element. Implements {@link @microsoft/fast-foundation#Calendar},\r\n * {@link @microsoft/fast-foundation#calendarTemplate}\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element \\<fluent-calendar\\>\r\n */\nconst fluentCalendar = Calendar.compose({\n  baseName: 'calendar',\n  template: calendarTemplate,\n  styles: calendarStyles,\n  title: CalendarTitleTemplate\n});\n\nconst cardStyles$1 = (context, definition) => css`\n    ${display('block')} :host{display:block;contain:content;height:var(--card-height,100%);width:var(--card-width,100%);box-sizing:border-box;background:${fillColor};color:${neutralForegroundRest};border:calc(${strokeWidth} * 1px) solid ${neutralStrokeLayerRest};border-radius:calc(${layerCornerRadius} * 1px);box-shadow:${elevationShadowCardRest}}:host{content-visibility:auto}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        :host{background:${SystemColors.Canvas};color:${SystemColors.CanvasText}}`));\n\n/**\r\n * @public\r\n */\nclass Card extends Card$1 {\n  cardFillColorChanged(prev, next) {\n    if (next) {\n      const parsedColor = parseColorHexRGB(next);\n      if (parsedColor !== null) {\n        this.neutralPaletteSource = next;\n        fillColor.setValueFor(this, SwatchRGB.create(parsedColor.r, parsedColor.g, parsedColor.b));\n      }\n    }\n  }\n  neutralPaletteSourceChanged(prev, next) {\n    if (next) {\n      const color = parseColorHexRGB(next);\n      const swatch = SwatchRGB.create(color.r, color.g, color.b);\n      neutralPalette.setValueFor(this, PaletteRGB.create(swatch));\n    }\n  }\n  /**\r\n   * @internal\r\n   */\n  handleChange(source, propertyName) {\n    if (!this.cardFillColor) {\n      fillColor.setValueFor(this, target => neutralFillLayerRecipe.getValueFor(target).evaluate(target, fillColor.getValueFor(source)).rest);\n    }\n  }\n  connectedCallback() {\n    super.connectedCallback();\n    const parent = composedParent(this);\n    if (parent) {\n      const parentNotifier = Observable.getNotifier(parent);\n      parentNotifier.subscribe(this, 'fillColor');\n      parentNotifier.subscribe(this, 'neutralPalette');\n      this.handleChange(parent, 'fillColor');\n    }\n  }\n}\n__decorate([attr({\n  attribute: 'card-fill-color',\n  mode: 'fromView'\n})], Card.prototype, \"cardFillColor\", void 0);\n__decorate([attr({\n  attribute: 'neutral-palette-source',\n  mode: 'fromView'\n})], Card.prototype, \"neutralPaletteSource\", void 0);\n/**\r\n * The Fluent Card Element. Implements {@link @microsoft/fast-foundation#Card},\r\n * {@link @microsoft/fast-foundation#CardTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-card\\>\r\n */\nconst fluentCard = Card.compose({\n  baseName: 'card',\n  baseClass: Card$1,\n  template: cardTemplate,\n  styles: cardStyles$1\n});\n/**\r\n * Styles for Card\r\n * @public\r\n */\nconst cardStyles = cardStyles$1;\n\nconst checkboxStyles$1 = (context, definition) => css`\n    ${display('inline-flex')} :host{align-items:center;outline:none;${\n/*\r\n * Chromium likes to select label text or the default slot when\r\n * the checkbox is clicked. Maybe there is a better solution here?\r\n */''} user-select:none}.control{position:relative;width:calc((${heightNumber} / 2 + ${designUnit}) * 1px);height:calc((${heightNumber} / 2 + ${designUnit}) * 1px);box-sizing:border-box;border-radius:calc(${controlCornerRadius} * 1px);border:calc(${strokeWidth} * 1px) solid ${neutralStrokeStrongRest};background:${neutralFillInputAltRest};cursor:pointer}.label__hidden{display:none;visibility:hidden}.label{${typeRampBase}\n      color:${neutralForegroundRest};${\n/* Need to discuss with Brian how HorizontalSpacingNumber can work. https://github.com/microsoft/fast/issues/2766 */''} padding-inline-start:calc(${designUnit} * 2px + 2px);margin-inline-end:calc(${designUnit} * 2px + 2px);cursor:pointer}slot[name='checked-indicator'],slot[name='indeterminate-indicator']{display:flex;align-items:center;justify-content:center;width:100%;height:100%;fill:${neutralForegroundRest};opacity:0;pointer-events:none}slot[name='indeterminate-indicator']{position:absolute;top:0}:host(.checked) slot[name='checked-indicator'],:host(.checked) slot[name='indeterminate-indicator']{fill:${foregroundOnAccentRest}}:host(:not(.disabled):hover) .control{background:${neutralFillInputAltHover};border-color:${neutralStrokeStrongHover}}:host(:not(.disabled):active) .control{background:${neutralFillInputAltActive};border-color:${neutralStrokeStrongActive}}:host(:${focusVisible}) .control{background:${neutralFillInputAltFocus};${focusTreatmentTight}}:host(.checked) .control{background:${accentFillRest};border-color:transparent}:host(.checked:not(.disabled):hover) .control{background:${accentFillHover};border-color:transparent}:host(.checked:not(.disabled):active) .control{background:${accentFillActive};border-color:transparent}:host(.disabled) .label,:host(.readonly) .label,:host(.readonly) .control,:host(.disabled) .control{cursor:${disabledCursor}}:host(.checked:not(.indeterminate)) slot[name='checked-indicator'],:host(.indeterminate) slot[name='indeterminate-indicator']{opacity:1}:host(.disabled){opacity:${disabledOpacity}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        .control{border-color:${SystemColors.FieldText};background:${SystemColors.Field}}:host(:not(.disabled):hover) .control,:host(:not(.disabled):active) .control{border-color:${SystemColors.Highlight};background:${SystemColors.Field}}slot[name='checked-indicator'],slot[name='indeterminate-indicator']{fill:${SystemColors.FieldText}}:host(:${focusVisible}) .control{forced-color-adjust:none;outline-color:${SystemColors.FieldText};background:${SystemColors.Field};border-color:${SystemColors.Highlight}}:host(.checked) .control{background:${SystemColors.Highlight};border-color:${SystemColors.Highlight}}:host(.checked:not(.disabled):hover) .control,:host(.checked:not(.disabled):active) .control{background:${SystemColors.HighlightText};border-color:${SystemColors.Highlight}}:host(.checked) slot[name='checked-indicator'],:host(.checked) slot[name='indeterminate-indicator']{fill:${SystemColors.HighlightText}}:host(.checked:hover ) .control slot[name='checked-indicator'],:host(.checked:hover ) .control slot[name='indeterminate-indicator']{fill:${SystemColors.Highlight}}:host(.disabled){opacity:1}:host(.disabled) .control{border-color:${SystemColors.GrayText};background:${SystemColors.Field}}:host(.disabled) slot[name='checked-indicator'],:host(.checked.disabled:hover) .control slot[name='checked-indicator'],:host(.disabled) slot[name='indeterminate-indicator'],:host(.checked.disabled:hover) .control slot[name='indeterminate-indicator']{fill:${SystemColors.GrayText}}`));\n\n/**\r\n * The Fluent Checkbox Element. Implements {@link @microsoft/fast-foundation#Checkbox},\r\n * {@link @microsoft/fast-foundation#checkboxTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-checkbox\\>\r\n */\nconst fluentCheckbox = Checkbox.compose({\n  baseName: 'checkbox',\n  template: checkboxTemplate,\n  styles: checkboxStyles$1,\n  checkedIndicator: `\n    <svg width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M13.86 3.66a.5.5 0 01-.02.7l-7.93 7.48a.6.6 0 01-.84-.02L2.4 9.1a.5.5 0 01.72-.7l2.4 2.44 7.65-7.2a.5.5 0 01.7.02z\"/>\n    </svg>\n  `,\n  indeterminateIndicator: `\n    <svg width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M3 8c0-.28.22-.5.5-.5h9a.5.5 0 010 1h-9A.5.5 0 013 8z\"/>\n    </svg>\n  `\n});\n/**\r\n * Styles for Checkbox\r\n * @public\r\n */\nconst checkboxStyles = checkboxStyles$1;\n\nconst logicalControlSelector$5 = '.control';\nconst interactivitySelector$1 = ':not([disabled]):not([open])';\nconst nonInteractivitySelector = '[disabled]';\n/**\r\n * The base styles for a select and combobox, without `appearance` visual differences.\r\n *\r\n * @internal\r\n */\nconst baseSelectStyles = (context, definition) => css`\n    ${display('inline-flex')}\n    \n    :host{border-radius:calc(${controlCornerRadius} * 1px);box-sizing:border-box;color:${neutralForegroundRest};fill:currentcolor;font-family:${bodyFont};position:relative;user-select:none;min-width:250px;vertical-align:top}.listbox{box-shadow:${elevationShadowFlyout};background:${fillColor};border-radius:calc(${layerCornerRadius} * 1px);box-sizing:border-box;display:inline-flex;flex-direction:column;left:0;max-height:calc(var(--max-height) - (${heightNumber} * 1px));padding:calc((${designUnit} - ${strokeWidth} ) * 1px);overflow-y:auto;position:absolute;width:100%;z-index:1;margin:1px 0;border:calc(${strokeWidth} * 1px) solid transparent}.listbox[hidden]{display:none}.control{border:calc(${strokeWidth} * 1px) solid transparent;border-radius:calc(${controlCornerRadius} * 1px);height:calc(${heightNumber} * 1px);align-items:center;box-sizing:border-box;cursor:pointer;display:flex;${typeRampBase}\n      min-height:100%;padding:0 calc(${designUnit} * 2.25px);width:100%}:host(:${focusVisible}){${focusTreatmentBase}}:host([disabled]) .control{cursor:${disabledCursor};opacity:${disabledOpacity};user-select:none}:host([open][position='above']) .listbox{bottom:calc((${heightNumber} + ${designUnit} * 2) * 1px)}:host([open][position='below']) .listbox{top:calc((${heightNumber} + ${designUnit} * 2) * 1px)}.selected-value{font-family:inherit;flex:1 1 auto;text-align:start}.indicator{flex:0 0 auto;margin-inline-start:1em}slot[name='listbox']{display:none;width:100%}:host([open]) slot[name='listbox']{display:flex;position:absolute}.start{margin-inline-end:11px}.end{margin-inline-start:11px}.start,.end,.indicator,::slotted(svg){display:flex}::slotted([role='option']){flex:0 0 auto}`;\n/**\r\n * @internal\r\n */\nconst baseSelectForcedColorStyles = (context, definition) => css`\n    :host([open]) .listbox{background:${SystemColors.ButtonFace};border-color:${SystemColors.CanvasText}}`;\nconst selectStyles$1 = (context, definition) => baseSelectStyles().withBehaviors(appearanceBehavior('outline', NeutralButtonStyles(context, definition, interactivitySelector$1, nonInteractivitySelector)), appearanceBehavior('filled', inputFilledStyles(context, definition, logicalControlSelector$5, interactivitySelector$1).withBehaviors(forcedColorsStylesheetBehavior(inputForcedColorStyles(context, definition, logicalControlSelector$5, interactivitySelector$1)))), appearanceBehavior('stealth', StealthButtonStyles(context, definition, interactivitySelector$1, nonInteractivitySelector)), forcedColorsStylesheetBehavior(baseSelectForcedColorStyles()));\n\nconst logicalControlSelector$4 = '.control';\nconst interactivitySelector = ':not([disabled]):not([open])';\nconst comboboxStyles$1 = (context, definition) => css`\n    ${baseSelectStyles()}\n\n    ${inputStateStyles()}\n\n    :host(:empty) .listbox{display:none}:host([disabled]) *,:host([disabled]){cursor:${disabledCursor};user-select:none}:host(:active) .selected-value{user-select:none}.selected-value{-webkit-appearance:none;background:transparent;border:none;color:inherit;${typeRampBase}\n      height:calc(100% - ${strokeWidth} * 1px));margin:auto 0;width:100%;outline:none}`.withBehaviors(appearanceBehavior('outline', inputOutlineStyles(context, definition, logicalControlSelector$4, interactivitySelector)), appearanceBehavior('filled', inputFilledStyles(context, definition, logicalControlSelector$4, interactivitySelector)), forcedColorsStylesheetBehavior(inputForcedColorStyles(context, definition, logicalControlSelector$4, interactivitySelector)));\n\n/**\r\n * The Fluent combobox class\r\n * @internal\r\n */\nclass Combobox extends Combobox$1 {\n  /**\r\n   * @internal\r\n   */\n  appearanceChanged(oldValue, newValue) {\n    if (oldValue !== newValue) {\n      this.classList.add(newValue);\n      this.classList.remove(oldValue);\n    }\n  }\n  /**\r\n   * @internal\r\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    if (!this.appearance) {\n      this.appearance = 'outline';\n    }\n    if (this.listbox) {\n      fillColor.setValueFor(this.listbox, neutralLayerFloating);\n    }\n  }\n}\n__decorate([attr({\n  mode: 'fromView'\n})], Combobox.prototype, \"appearance\", void 0);\n/**\r\n * The Fluent Combobox Custom Element. Implements {@link @microsoft/fast-foundation#Combobox},\r\n * {@link @microsoft/fast-foundation#comboboxTemplate}\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-combobox\\>\r\n *\r\n */\nconst fluentCombobox = Combobox.compose({\n  baseName: 'combobox',\n  baseClass: Combobox$1,\n  shadowOptions: {\n    delegatesFocus: true\n  },\n  template: comboboxTemplate,\n  styles: comboboxStyles$1,\n  indicator: `\n    <svg width=\"12\" height=\"12\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M2.15 4.65c.2-.2.5-.2.7 0L6 7.79l3.15-3.14a.5.5 0 11.7.7l-3.5 3.5a.5.5 0 01-.7 0l-3.5-3.5a.5.5 0 010-.7z\"/>\n    </svg>\n  `\n});\n/**\r\n * Styles for combobox\r\n * @public\r\n */\nconst comboboxStyles = comboboxStyles$1;\n\nconst dataGridStyles$1 = (context, definition) => css`\n  :host{display:flex;position:relative;flex-direction:column}`;\n\nconst dataGridRowStyles$1 = (context, definition) => css`\n    :host{display:grid;padding:1px 0;box-sizing:border-box;width:100%;border-bottom:calc(${strokeWidth} * 1px) solid ${neutralStrokeDividerRest}}:host(.header){}:host(.sticky-header){background:${fillColor};position:sticky;top:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        :host{}`));\n\nconst dataGridCellStyles$1 = (context, definition) => css`\n    :host{padding:calc((${designUnit} + ${focusStrokeWidth} - ${strokeWidth}) * 1px) calc(((${designUnit} * 3) + ${focusStrokeWidth} - ${strokeWidth}) * 1px);color:${neutralForegroundRest};box-sizing:border-box;${typeRampBase}\n      border:transparent calc(${strokeWidth} * 1px) solid;overflow:hidden;white-space:nowrap;border-radius:calc(${controlCornerRadius} * 1px)}:host(.column-header){font-weight:600}:host(:${focusVisible}){${focusTreatmentBase}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        :host{forced-color-adjust:none;background:${SystemColors.Field};color:${SystemColors.FieldText}}:host(:${focusVisible}){outline-color:${SystemColors.FieldText}}`));\n\n/**\r\n * The Fluent Data Grid Cell Element.\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-data-grid-cell\\>\r\n */\nconst fluentDataGridCell = DataGridCell.compose({\n  baseName: 'data-grid-cell',\n  template: dataGridCellTemplate,\n  styles: dataGridCellStyles$1\n});\n/**\r\n * Styles for DataGrid cell\r\n * @public\r\n */\nconst dataGridCellStyles = dataGridCellStyles$1;\n/**\r\n * The Fluent Data Grid Row Element.\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-data-grid-row\\>\r\n */\nconst fluentDataGridRow = DataGridRow.compose({\n  baseName: 'data-grid-row',\n  template: dataGridRowTemplate,\n  styles: dataGridRowStyles$1\n});\n/**\r\n * Styles for DataGrid row\r\n * @public\r\n */\nconst dataGridRowStyles = dataGridRowStyles$1;\n/**\r\n * The Fluent Data Grid Element.\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-data-grid\\>\r\n */\nconst fluentDataGrid = DataGrid.compose({\n  baseName: 'data-grid',\n  template: dataGridTemplate,\n  styles: dataGridStyles$1\n});\n/**\r\n * Styles for DataGrid\r\n * @public\r\n */\nconst dataGridStyles = dataGridStyles$1;\n\n/**\r\n * A {@link ValueConverter} that converts to and from `Swatch` values.\r\n * @remarks\r\n * This converter allows for colors represented as string hex values, returning `null` if the\r\n * input was `null` or `undefined`.\r\n * @internal\r\n */\nconst swatchConverter = {\n  toView(value) {\n    if (value === null || value === undefined) {\n      return null;\n    }\n    return value === null || value === void 0 ? void 0 : value.toColorString();\n  },\n  fromView(value) {\n    if (value === null || value === undefined) {\n      return null;\n    }\n    const color = parseColorHexRGB(value);\n    return color ? SwatchRGB.create(color.r, color.g, color.b) : null;\n  }\n};\nconst backgroundStyles = css`\n  :host{background-color:${fillColor};color:${neutralForegroundRest}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n      :host{background-color:${SystemColors.Canvas};box-shadow:0 0 0 1px ${SystemColors.CanvasText};color:${SystemColors.CanvasText}}`));\nfunction designToken(token) {\n  return (source, key) => {\n    source[key + 'Changed'] = function (prev, next) {\n      if (next !== undefined && next !== null) {\n        token.setValueFor(this, next);\n      } else {\n        token.deleteValueFor(this);\n      }\n    };\n  };\n}\n/**\r\n * The Fluent DesignSystemProvider Element.\r\n * @public\r\n */\nclass DesignSystemProvider extends FoundationElement {\n  constructor() {\n    super();\n    /**\r\n     * Used to instruct the FluentDesignSystemProvider\r\n     * that it should not set the CSS\r\n     * background-color and color properties\r\n     *\r\n     * @remarks\r\n     * HTML boolean attribute: no-paint\r\n     */\n    this.noPaint = false;\n    // If fillColor or baseLayerLuminance change, we need to\n    // re-evaluate whether we should have paint styles applied\n    const subscriber = {\n      handleChange: this.noPaintChanged.bind(this)\n    };\n    Observable.getNotifier(this).subscribe(subscriber, 'fillColor');\n    Observable.getNotifier(this).subscribe(subscriber, 'baseLayerLuminance');\n  }\n  connectedCallback() {\n    super.connectedCallback();\n    this.noPaintChanged();\n  }\n  noPaintChanged() {\n    if (!this.noPaint && (this.fillColor !== void 0 || this.baseLayerLuminance)) {\n      this.$fastController.addStyles(backgroundStyles);\n    } else {\n      this.$fastController.removeStyles(backgroundStyles);\n    }\n  }\n}\n__decorate([attr({\n  attribute: 'no-paint',\n  mode: 'boolean'\n})], DesignSystemProvider.prototype, \"noPaint\", void 0);\n__decorate([attr({\n  attribute: 'fill-color',\n  converter: swatchConverter,\n  mode: 'fromView'\n}), designToken(fillColor)], DesignSystemProvider.prototype, \"fillColor\", void 0);\n__decorate([attr({\n  attribute: 'accent-base-color',\n  converter: swatchConverter,\n  mode: 'fromView'\n}), designToken(accentBaseColor)], DesignSystemProvider.prototype, \"accentBaseColor\", void 0);\n__decorate([attr({\n  attribute: 'neutral-base-color',\n  converter: swatchConverter,\n  mode: 'fromView'\n}), designToken(neutralBaseColor)], DesignSystemProvider.prototype, \"neutralBaseColor\", void 0);\n__decorate([attr({\n  converter: nullableNumberConverter\n}), designToken(density)], DesignSystemProvider.prototype, \"density\", void 0);\n__decorate([attr({\n  attribute: 'design-unit',\n  converter: nullableNumberConverter\n}), designToken(designUnit)], DesignSystemProvider.prototype, \"designUnit\", void 0);\n__decorate([attr({\n  attribute: 'direction'\n}), designToken(direction)], DesignSystemProvider.prototype, \"direction\", void 0);\n__decorate([attr({\n  attribute: 'base-height-multiplier',\n  converter: nullableNumberConverter\n}), designToken(baseHeightMultiplier)], DesignSystemProvider.prototype, \"baseHeightMultiplier\", void 0);\n__decorate([attr({\n  attribute: 'base-horizontal-spacing-multiplier',\n  converter: nullableNumberConverter\n}), designToken(baseHorizontalSpacingMultiplier)], DesignSystemProvider.prototype, \"baseHorizontalSpacingMultiplier\", void 0);\n__decorate([attr({\n  attribute: 'control-corner-radius',\n  converter: nullableNumberConverter\n}), designToken(controlCornerRadius)], DesignSystemProvider.prototype, \"controlCornerRadius\", void 0);\n__decorate([attr({\n  attribute: 'layer-corner-radius',\n  converter: nullableNumberConverter\n}), designToken(layerCornerRadius)], DesignSystemProvider.prototype, \"layerCornerRadius\", void 0);\n__decorate([attr({\n  attribute: 'stroke-width',\n  converter: nullableNumberConverter\n}), designToken(strokeWidth)], DesignSystemProvider.prototype, \"strokeWidth\", void 0);\n__decorate([attr({\n  attribute: 'focus-stroke-width',\n  converter: nullableNumberConverter\n}), designToken(focusStrokeWidth)], DesignSystemProvider.prototype, \"focusStrokeWidth\", void 0);\n__decorate([attr({\n  attribute: 'disabled-opacity',\n  converter: nullableNumberConverter\n}), designToken(disabledOpacity)], DesignSystemProvider.prototype, \"disabledOpacity\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-minus-2-font-size'\n}), designToken(typeRampMinus2FontSize)], DesignSystemProvider.prototype, \"typeRampMinus2FontSize\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-minus-2-line-height'\n}), designToken(typeRampMinus2LineHeight)], DesignSystemProvider.prototype, \"typeRampMinus2LineHeight\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-minus-1-font-size'\n}), designToken(typeRampMinus1FontSize)], DesignSystemProvider.prototype, \"typeRampMinus1FontSize\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-minus-1-line-height'\n}), designToken(typeRampMinus1LineHeight)], DesignSystemProvider.prototype, \"typeRampMinus1LineHeight\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-base-font-size'\n}), designToken(typeRampBaseFontSize)], DesignSystemProvider.prototype, \"typeRampBaseFontSize\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-base-line-height'\n}), designToken(typeRampBaseLineHeight)], DesignSystemProvider.prototype, \"typeRampBaseLineHeight\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-plus-1-font-size'\n}), designToken(typeRampPlus1FontSize)], DesignSystemProvider.prototype, \"typeRampPlus1FontSize\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-plus-1-line-height'\n}), designToken(typeRampPlus1LineHeight)], DesignSystemProvider.prototype, \"typeRampPlus1LineHeight\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-plus-2-font-size'\n}), designToken(typeRampPlus2FontSize)], DesignSystemProvider.prototype, \"typeRampPlus2FontSize\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-plus-2-line-height'\n}), designToken(typeRampPlus2LineHeight)], DesignSystemProvider.prototype, \"typeRampPlus2LineHeight\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-plus-3-font-size'\n}), designToken(typeRampPlus3FontSize)], DesignSystemProvider.prototype, \"typeRampPlus3FontSize\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-plus-3-line-height'\n}), designToken(typeRampPlus3LineHeight)], DesignSystemProvider.prototype, \"typeRampPlus3LineHeight\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-plus-4-font-size'\n}), designToken(typeRampPlus4FontSize)], DesignSystemProvider.prototype, \"typeRampPlus4FontSize\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-plus-4-line-height'\n}), designToken(typeRampPlus4LineHeight)], DesignSystemProvider.prototype, \"typeRampPlus4LineHeight\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-plus-5-font-size'\n}), designToken(typeRampPlus5FontSize)], DesignSystemProvider.prototype, \"typeRampPlus5FontSize\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-plus-5-line-height'\n}), designToken(typeRampPlus5LineHeight)], DesignSystemProvider.prototype, \"typeRampPlus5LineHeight\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-plus-6-font-size'\n}), designToken(typeRampPlus6FontSize)], DesignSystemProvider.prototype, \"typeRampPlus6FontSize\", void 0);\n__decorate([attr({\n  attribute: 'type-ramp-plus-6-line-height'\n}), designToken(typeRampPlus6LineHeight)], DesignSystemProvider.prototype, \"typeRampPlus6LineHeight\", void 0);\n__decorate([attr({\n  attribute: 'accent-fill-rest-delta',\n  converter: nullableNumberConverter\n}), designToken(accentFillRestDelta)], DesignSystemProvider.prototype, \"accentFillRestDelta\", void 0);\n__decorate([attr({\n  attribute: 'accent-fill-hover-delta',\n  converter: nullableNumberConverter\n}), designToken(accentFillHoverDelta)], DesignSystemProvider.prototype, \"accentFillHoverDelta\", void 0);\n__decorate([attr({\n  attribute: 'accent-fill-active-delta',\n  converter: nullableNumberConverter\n}), designToken(accentFillActiveDelta)], DesignSystemProvider.prototype, \"accentFillActiveDelta\", void 0);\n__decorate([attr({\n  attribute: 'accent-fill-focus-delta',\n  converter: nullableNumberConverter\n}), designToken(accentFillFocusDelta)], DesignSystemProvider.prototype, \"accentFillFocusDelta\", void 0);\n__decorate([attr({\n  attribute: 'accent-foreground-rest-delta',\n  converter: nullableNumberConverter\n}), designToken(accentForegroundRestDelta)], DesignSystemProvider.prototype, \"accentForegroundRestDelta\", void 0);\n__decorate([attr({\n  attribute: 'accent-foreground-hover-delta',\n  converter: nullableNumberConverter\n}), designToken(accentForegroundHoverDelta)], DesignSystemProvider.prototype, \"accentForegroundHoverDelta\", void 0);\n__decorate([attr({\n  attribute: 'accent-foreground-active-delta',\n  converter: nullableNumberConverter\n}), designToken(accentForegroundActiveDelta)], DesignSystemProvider.prototype, \"accentForegroundActiveDelta\", void 0);\n__decorate([attr({\n  attribute: 'accent-foreground-focus-delta',\n  converter: nullableNumberConverter\n}), designToken(accentForegroundFocusDelta)], DesignSystemProvider.prototype, \"accentForegroundFocusDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-rest-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillRestDelta)], DesignSystemProvider.prototype, \"neutralFillRestDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-hover-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillHoverDelta)], DesignSystemProvider.prototype, \"neutralFillHoverDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-active-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillActiveDelta)], DesignSystemProvider.prototype, \"neutralFillActiveDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-focus-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillFocusDelta)], DesignSystemProvider.prototype, \"neutralFillFocusDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-input-rest-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillInputRestDelta)], DesignSystemProvider.prototype, \"neutralFillInputRestDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-input-hover-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillInputHoverDelta)], DesignSystemProvider.prototype, \"neutralFillInputHoverDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-input-active-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillInputActiveDelta)], DesignSystemProvider.prototype, \"neutralFillInputActiveDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-input-focus-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillInputFocusDelta)], DesignSystemProvider.prototype, \"neutralFillInputFocusDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-layer-rest-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillLayerRestDelta)], DesignSystemProvider.prototype, \"neutralFillLayerRestDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-stealth-rest-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillStealthRestDelta)], DesignSystemProvider.prototype, \"neutralFillStealthRestDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-stealth-hover-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillStealthHoverDelta)], DesignSystemProvider.prototype, \"neutralFillStealthHoverDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-stealth-active-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillStealthActiveDelta)], DesignSystemProvider.prototype, \"neutralFillStealthActiveDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-stealth-focus-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillStealthFocusDelta)], DesignSystemProvider.prototype, \"neutralFillStealthFocusDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-strong-hover-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillStrongHoverDelta)], DesignSystemProvider.prototype, \"neutralFillStrongHoverDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-strong-active-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillStrongActiveDelta)], DesignSystemProvider.prototype, \"neutralFillStrongActiveDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-fill-strong-focus-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralFillStrongFocusDelta)], DesignSystemProvider.prototype, \"neutralFillStrongFocusDelta\", void 0);\n__decorate([attr({\n  attribute: 'base-layer-luminance',\n  converter: nullableNumberConverter\n}), designToken(baseLayerLuminance)], DesignSystemProvider.prototype, \"baseLayerLuminance\", void 0);\n__decorate([attr({\n  attribute: 'neutral-stroke-divider-rest-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralStrokeDividerRestDelta)], DesignSystemProvider.prototype, \"neutralStrokeDividerRestDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-stroke-rest-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralStrokeRestDelta)], DesignSystemProvider.prototype, \"neutralStrokeRestDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-stroke-hover-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralStrokeHoverDelta)], DesignSystemProvider.prototype, \"neutralStrokeHoverDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-stroke-active-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralStrokeActiveDelta)], DesignSystemProvider.prototype, \"neutralStrokeActiveDelta\", void 0);\n__decorate([attr({\n  attribute: 'neutral-stroke-focus-delta',\n  converter: nullableNumberConverter\n}), designToken(neutralStrokeFocusDelta)], DesignSystemProvider.prototype, \"neutralStrokeFocusDelta\", void 0);\n/**\r\n * The Fluent Design System Provider Element.\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-design-system-provider\\>\r\n */\nconst fluentDesignSystemProvider = DesignSystemProvider.compose({\n  baseName: 'design-system-provider',\n  template: html`<slot></slot>`,\n  styles: css`\n    ${display('block')}\n  `\n});\n\nconst dialogStyles$1 = (context, definition) => css`\n  :host([hidden]){display:none}:host{--dialog-height:480px;--dialog-width:640px;display:block}.overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.3);touch-action:none}.positioning-region{display:flex;justify-content:center;position:fixed;top:0;bottom:0;left:0;right:0;overflow:auto}.control{box-shadow:${elevationShadowDialog};margin-top:auto;margin-bottom:auto;border-radius:calc(${layerCornerRadius} * 1px);width:var(--dialog-width);height:var(--dialog-height);background:${fillColor};z-index:1;border:calc(${strokeWidth} * 1px) solid transparent}`;\n\n/**\r\n * The Fluent Dialog Element. Implements {@link @microsoft/fast-foundation#Dialog},\r\n * {@link @microsoft/fast-foundation#dialogTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-dialog\\>\r\n */\nconst fluentDialog = Dialog.compose({\n  baseName: 'dialog',\n  template: dialogTemplate,\n  styles: dialogStyles$1\n});\n/**\r\n * Styles for Dialog\r\n * @public\r\n */\nconst dialogStyles = dialogStyles$1;\n\nconst dividerStyles$1 = (context, definition) => css`\n    ${display('block')} :host{box-sizing:content-box;height:0;border:none;border-top:calc(${strokeWidth} * 1px) solid ${neutralStrokeDividerRest}}:host([orientation=\"vertical\"]){border:none;height:100%;margin:0 calc(${designUnit} * 1px);border-left:calc(${strokeWidth} * 1px) solid ${neutralStrokeDividerRest}}`;\n\n/**\r\n * The Fluent Divider Element. Implements {@link @microsoft/fast-foundation#Divider},\r\n * {@link @microsoft/fast-foundation#dividerTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-divider\\>\r\n */\nconst fluentDivider = Divider.compose({\n  baseName: 'divider',\n  template: dividerTemplate,\n  styles: dividerStyles$1\n});\n/**\r\n * Styles for Divider\r\n * @public\r\n */\nconst dividerStyles = dividerStyles$1;\n\nconst flipperStyles$1 = (context, definition) => css`\n    ${display('inline-flex')} :host{height:calc((${heightNumber} + ${designUnit}) * 1px);justify-content:center;align-items:center;fill:currentcolor;color:${neutralFillStrongRest};background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlRest};box-sizing:border-box;border:calc(${strokeWidth} * 1px) solid transparent;border-radius:calc(${controlCornerRadius} * 1px);padding:0}:host(.disabled){opacity:${disabledOpacity};cursor:${disabledCursor};pointer-events:none}.next,.previous{display:flex}:host(:not(.disabled):hover){cursor:pointer}:host(:not(.disabled):hover){color:${neutralFillStrongHover}}:host(:not(.disabled):active){color:${neutralFillStrongActive}}:host(:${focusVisible}){${focusTreatmentBase}}:host::-moz-focus-inner{border:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        :host{background:${SystemColors.ButtonFace};border-color:${SystemColors.ButtonText}}:host .next,:host .previous{color:${SystemColors.ButtonText};fill:currentcolor}:host(:not(.disabled):hover){background:${SystemColors.Highlight}}:host(:not(.disabled):hover) .next,:host(:not(.disabled):hover) .previous{color:${SystemColors.HighlightText};fill:currentcolor}:host(.disabled){opacity:1}:host(.disabled),:host(.disabled) .next,:host(.disabled) .previous{border-color:${SystemColors.GrayText};color:${SystemColors.GrayText};fill:currentcolor}:host(:${focusVisible}){forced-color-adjust:none;outline-color:${SystemColors.Highlight}}`));\n\n/**\r\n * The Fluent Flipper Element. Implements {@link @microsoft/fast-foundation#Flipper},\r\n * {@link @microsoft/fast-foundation#flipperTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-flipper\\>\r\n */\nconst fluentFlipper = Flipper.compose({\n  baseName: 'flipper',\n  template: flipperTemplate,\n  styles: flipperStyles$1,\n  next: `\n    <svg width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M7.57 11.84A1 1 0 016 11.02V4.98a1 1 0 011.57-.82l3.79 2.62c.85.59.85 1.85 0 2.44l-3.79 2.62z\"/>\n    </svg>\n  `,\n  previous: `\n    <svg width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M9.43 11.84a1 1 0 001.57-.82V4.98a1 1 0 00-1.57-.82L5.64 6.78c-.85.59-.85 1.85 0 2.44l3.79 2.62z\"/>\n    </svg>\n  `\n});\n/**\r\n * Styles for Flipper\r\n * @public\r\n */\nconst flipperStyles = flipperStyles$1;\n\nconst ltrActionsStyles = css`\n  .scroll-prev{right:auto;left:0}.scroll.scroll-next::before,.scroll-next .scroll-action{left:auto;right:0}.scroll.scroll-next::before{background:linear-gradient(to right,transparent,var(--scroll-fade-next))}.scroll-next .scroll-action{transform:translate(50%,-50%)}`;\nconst rtlActionsStyles = css`\n  .scroll.scroll-next{right:auto;left:0}.scroll.scroll-next::before{background:linear-gradient(to right,var(--scroll-fade-next),transparent);left:auto;right:0}.scroll.scroll-prev::before{background:linear-gradient(to right,transparent,var(--scroll-fade-previous))}.scroll-prev .scroll-action{left:auto;right:0;transform:translate(50%,-50%)}`;\n/**\r\n * Styles used for the flipper container and gradient fade\r\n * @public\r\n */\nconst ActionsStyles = css`\n  .scroll-area{position:relative}div.scroll-view{overflow-x:hidden}.scroll{bottom:0;pointer-events:none;position:absolute;right:0;top:0;user-select:none;width:100px}.scroll.disabled{display:none}.scroll::before,.scroll-action{left:0;position:absolute}.scroll::before{background:linear-gradient(to right,var(--scroll-fade-previous),transparent);content:'';display:block;height:100%;width:100%}.scroll-action{pointer-events:auto;right:auto;top:50%;transform:translate(-50%,-50%)}::slotted(fluent-flipper){opacity:0;transition:opacity 0.2s ease-in-out}.scroll-area:hover ::slotted(fluent-flipper){opacity:1}`.withBehaviors(new DirectionalStyleSheetBehavior(ltrActionsStyles, rtlActionsStyles));\n/**\r\n * Styles handling the scroll container and content\r\n * @public\r\n */\nconst horizontalScrollStyles$1 = (context, definition) => css`\n  ${display('block')} :host{--scroll-align:center;--scroll-item-spacing:4px;contain:layout;position:relative}.scroll-view{overflow-x:auto;scrollbar-width:none}::-webkit-scrollbar{display:none}.content-container{align-items:var(--scroll-align);display:inline-flex;flex-wrap:nowrap;position:relative}.content-container ::slotted(*){margin-right:var(--scroll-item-spacing)}.content-container ::slotted(*:last-child){margin-right:0}`;\n\n/**\r\n * @internal\r\n */\nclass HorizontalScroll extends HorizontalScroll$1 {\n  /**\r\n   * @public\r\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    if (this.view !== 'mobile') {\n      this.$fastController.addStyles(ActionsStyles);\n    }\n  }\n}\n/**\r\n * The Fluent HorizontalScroll Element. Implements {@link @microsoft/fast-foundation#HorizontalScroll},\r\n * {@link @microsoft/fast-foundation#horizontalScrollTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-horizontal-scroll\\>\r\n */\nconst fluentHorizontalScroll = HorizontalScroll.compose({\n  baseName: 'horizontal-scroll',\n  baseClass: HorizontalScroll$1,\n  template: horizontalScrollTemplate,\n  styles: horizontalScrollStyles$1,\n  nextFlipper: html`<fluent-flipper @click=\"${x => x.scrollToNext()}\" aria-hidden=\"${x => x.flippersHiddenFromAT}\"></fluent-flipper>`,\n  previousFlipper: html`<fluent-flipper @click=\"${x => x.scrollToPrevious()}\" direction=\"previous\" aria-hidden=\"${x => x.flippersHiddenFromAT}\"></fluent-flipper>`\n});\n/**\r\n * Styles for horizontal scroll\r\n * @public\r\n */\nconst horizontalScrollStyles = horizontalScrollStyles$1;\n\nconst listboxStyles$1 = (context, definition) => css`\n    ${display('inline-flex')} :host{border:calc(${strokeWidth} * 1px) solid ${neutralStrokeRest};border-radius:calc(${controlCornerRadius} * 1px);box-sizing:border-box;flex-direction:column;padding:calc(${designUnit} * 1px) 0}::slotted(${context.tagFor(ListboxOption)}){margin:0 calc(${designUnit} * 1px)}:host(:focus-within:not([disabled])){${focusTreatmentBase}}`;\n\nclass Listbox extends Listbox$1 {}\n/**\r\n * The Fluent listbox Custom Element. Implements, {@link @microsoft/fast-foundation#Listbox}\r\n * {@link @microsoft/fast-foundation#listboxTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-listbox\\>\r\n *\r\n */\nconst fluentListbox = Listbox.compose({\n  baseName: 'listbox',\n  template: listboxTemplate,\n  styles: listboxStyles$1\n});\n/**\r\n * Styles for Listbox\r\n * @public\r\n */\nconst listboxStyles = listboxStyles$1;\n\nconst optionStyles = (context, definition) => css`\n    ${display('inline-flex')} :host{position:relative;${typeRampBase}\n      background:${neutralFillStealthRest};border-radius:calc(${controlCornerRadius} * 1px);border:calc(${strokeWidth} * 1px) solid transparent;box-sizing:border-box;color:${neutralForegroundRest};cursor:pointer;fill:currentcolor;height:calc(${heightNumber} * 1px);overflow:hidden;align-items:center;padding:0 calc(((${designUnit} * 3) - ${strokeWidth} - 1) * 1px);user-select:none;white-space:nowrap}:host::before{content:'';display:block;position:absolute;left:calc((${focusStrokeWidth} - ${strokeWidth}) * 1px);top:calc((${heightNumber} / 4) - ${focusStrokeWidth} * 1px);width:3px;height:calc((${heightNumber} / 2) * 1px);background:transparent;border-radius:calc(${controlCornerRadius} * 1px)}:host(:not([disabled]):hover){background:${neutralFillStealthHover}}:host(:not([disabled]):active){background:${neutralFillStealthActive}}:host(:not([disabled]):active)::before{background:${accentFillRest};height:calc(((${heightNumber} / 2) - 6) * 1px)}:host([aria-selected='true'])::before{background:${accentFillRest}}:host(:${focusVisible}){${focusTreatmentBase}\n      background:${neutralFillStealthFocus}}:host([aria-selected='true']){background:${neutralFillSecondaryRest}}:host(:not([disabled])[aria-selected='true']:hover){background:${neutralFillSecondaryHover}}:host(:not([disabled])[aria-selected='true']:active){background:${neutralFillSecondaryActive}}:host(:not([disabled]):not([aria-selected='true']):hover){background:${neutralFillStealthHover}}:host(:not([disabled]):not([aria-selected='true']):active){background:${neutralFillStealthActive}}:host([disabled]){cursor:${disabledCursor};opacity:${disabledOpacity}}.content{grid-column-start:2;justify-self:start;overflow:hidden;text-overflow:ellipsis}.start,.end,::slotted(svg){display:flex}::slotted([slot='end']){margin-inline-start:1ch}::slotted([slot='start']){margin-inline-end:1ch}`.withBehaviors(new DirectionalStyleSheetBehavior(null, css`\n      :host::before{right:calc((${focusStrokeWidth} - ${strokeWidth}) * 1px)}`), forcedColorsStylesheetBehavior(css`\n        :host{background:${SystemColors.ButtonFace};border-color:${SystemColors.ButtonFace};color:${SystemColors.ButtonText}}:host(:not([disabled]):not([aria-selected=\"true\"]):hover),:host(:not([disabled])[aria-selected=\"true\"]:hover),:host([aria-selected=\"true\"]){forced-color-adjust:none;background:${SystemColors.Highlight};color:${SystemColors.HighlightText}}:host(:not([disabled]):active)::before,:host([aria-selected='true'])::before{background:${SystemColors.HighlightText}}:host([disabled]),:host([disabled]:not([aria-selected='true']):hover){background:${SystemColors.Canvas};color:${SystemColors.GrayText};fill:currentcolor;opacity:1}:host(:${focusVisible}){outline-color:${SystemColors.CanvasText}}`));\n\n/**\r\n * The Fluent option Custom Element. Implements {@link @microsoft/fast-foundation#ListboxOption}\r\n * {@link @microsoft/fast-foundation#listboxOptionTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-option\\>\r\n *\r\n */\nconst fluentOption = ListboxOption.compose({\n  baseName: 'option',\n  template: listboxOptionTemplate,\n  styles: optionStyles\n});\n/**\r\n * Styles for Option\r\n * @public\r\n */\nconst OptionStyles = optionStyles;\n\nconst menuStyles$1 = (context, definition) => css`\n    ${display('block')} :host{background:${neutralLayerFloating};border:calc(${strokeWidth} * 1px) solid transparent;border-radius:calc(${layerCornerRadius} * 1px);box-shadow:${elevationShadowFlyout};padding:calc((${designUnit} - ${strokeWidth}) * 1px) 0;max-width:368px;min-width:64px}:host([slot='submenu']){width:max-content;margin:0 calc(${designUnit} * 2px)}::slotted(${context.tagFor(MenuItem)}){margin:0 calc(${designUnit} * 1px)}::slotted(${context.tagFor(Divider)}){margin:calc(${designUnit} * 1px) 0}::slotted(hr){box-sizing:content-box;height:0;margin:calc(${designUnit} * 1px) 0;border:none;border-top:calc(${strokeWidth} * 1px) solid ${neutralStrokeDividerRest}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        :host([slot='submenu']){background:${SystemColors.Canvas};border-color:${SystemColors.CanvasText}}`));\n\n/**\r\n * The Fluent menu class\r\n * @public\r\n */\nclass Menu extends Menu$1 {\n  /**\r\n   * @internal\r\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    fillColor.setValueFor(this, neutralLayerFloating);\n  }\n}\n/**\r\n * The Fluent Menu Element. Implements {@link @microsoft/fast-foundation#Menu},\r\n * {@link @microsoft/fast-foundation#menuTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-menu\\>\r\n */\nconst fluentMenu = Menu.compose({\n  baseName: 'menu',\n  baseClass: Menu$1,\n  template: menuTemplate,\n  styles: menuStyles$1\n});\n/**\r\n * Styles for Menu\r\n * @public\r\n */\nconst menuStyles = menuStyles$1;\n\nconst menuItemStyles$1 = (context, definition) => css`\n    ${display('grid')} :host{contain:layout;overflow:visible;${typeRampBase}\n      box-sizing:border-box;height:calc(${heightNumber} * 1px);grid-template-columns:minmax(32px,auto) 1fr minmax(32px,auto);grid-template-rows:auto;justify-items:center;align-items:center;padding:0;white-space:nowrap;color:${neutralForegroundRest};fill:currentcolor;cursor:pointer;border-radius:calc(${controlCornerRadius} * 1px);border:calc(${strokeWidth} * 1px) solid transparent;position:relative}:host(.indent-0){grid-template-columns:auto 1fr minmax(32px,auto)}:host(.indent-0) .content{grid-column:1;grid-row:1;margin-inline-start:10px}:host(.indent-0) .expand-collapse-glyph-container{grid-column:5;grid-row:1}:host(.indent-2){grid-template-columns:minmax(32px,auto) minmax(32px,auto) 1fr minmax(32px,auto) minmax(32px,auto)}:host(.indent-2) .content{grid-column:3;grid-row:1;margin-inline-start:10px}:host(.indent-2) .expand-collapse-glyph-container{grid-column:5;grid-row:1}:host(.indent-2) .start{grid-column:2}:host(.indent-2) .end{grid-column:4}:host(:${focusVisible}){${focusTreatmentBase}}:host(:not([disabled]):hover){background:${neutralFillStealthHover}}:host(:not([disabled]):active),:host(.expanded){background:${neutralFillStealthActive};color:${neutralForegroundRest};z-index:2}:host([disabled]){cursor:${disabledCursor};opacity:${disabledOpacity}}.content{grid-column-start:2;justify-self:start;overflow:hidden;text-overflow:ellipsis}.start,.end{display:flex;justify-content:center}:host(.indent-0[aria-haspopup='menu']){display:grid;grid-template-columns:minmax(32px,auto) auto 1fr minmax(32px,auto) minmax(32px,auto);align-items:center;min-height:32px}:host(.indent-1[aria-haspopup='menu']),:host(.indent-1[role='menuitemcheckbox']),:host(.indent-1[role='menuitemradio']){display:grid;grid-template-columns:minmax(32px,auto) auto 1fr minmax(32px,auto) minmax(32px,auto);align-items:center;min-height:32px}:host(.indent-2:not([aria-haspopup='menu'])) .end{grid-column:5}:host .input-container,:host .expand-collapse-glyph-container{display:none}:host([aria-haspopup='menu']) .expand-collapse-glyph-container,:host([role='menuitemcheckbox']) .input-container,:host([role='menuitemradio']) .input-container{display:grid}:host([aria-haspopup='menu']) .content,:host([role='menuitemcheckbox']) .content,:host([role='menuitemradio']) .content{grid-column-start:3}:host([aria-haspopup='menu'].indent-0) .content{grid-column-start:1}:host([aria-haspopup='menu']) .end,:host([role='menuitemcheckbox']) .end,:host([role='menuitemradio']) .end{grid-column-start:4}:host .expand-collapse,:host .checkbox,:host .radio{display:flex;align-items:center;justify-content:center;position:relative;box-sizing:border-box}:host .checkbox-indicator,:host .radio-indicator,slot[name='checkbox-indicator'],slot[name='radio-indicator']{display:none}::slotted([slot='end']:not(svg)){margin-inline-end:10px;color:${neutralForegroundHint}}:host([aria-checked='true']) .checkbox-indicator,:host([aria-checked='true']) slot[name='checkbox-indicator'],:host([aria-checked='true']) .radio-indicator,:host([aria-checked='true']) slot[name='radio-indicator']{display:flex}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        :host,::slotted([slot='end']:not(svg)){forced-color-adjust:none;color:${SystemColors.ButtonText};fill:currentcolor}:host(:not([disabled]):hover){background:${SystemColors.Highlight};color:${SystemColors.HighlightText};fill:currentcolor}:host(:hover) .start,:host(:hover) .end,:host(:hover)::slotted(svg),:host(:active) .start,:host(:active) .end,:host(:active)::slotted(svg),:host(:hover) ::slotted([slot='end']:not(svg)),:host(:${focusVisible}) ::slotted([slot='end']:not(svg)){color:${SystemColors.HighlightText};fill:currentcolor}:host(.expanded){background:${SystemColors.Highlight};color:${SystemColors.HighlightText}}:host(:${focusVisible}){background:${SystemColors.Highlight};outline-color:${SystemColors.ButtonText};color:${SystemColors.HighlightText};fill:currentcolor}:host([disabled]),:host([disabled]:hover),:host([disabled]:hover) .start,:host([disabled]:hover) .end,:host([disabled]:hover)::slotted(svg),:host([disabled]:${focusVisible}){background:${SystemColors.ButtonFace};color:${SystemColors.GrayText};fill:currentcolor;opacity:1}:host([disabled]:${focusVisible}){outline-color:${SystemColors.GrayText}}:host .expanded-toggle,:host .checkbox,:host .radio{border-color:${SystemColors.ButtonText};background:${SystemColors.HighlightText}}:host([checked]) .checkbox,:host([checked]) .radio{background:${SystemColors.HighlightText};border-color:${SystemColors.HighlightText}}:host(:hover) .expanded-toggle,:host(:hover) .checkbox,:host(:hover) .radio,:host(:${focusVisible}) .expanded-toggle,:host(:${focusVisible}) .checkbox,:host(:${focusVisible}) .radio,:host([checked]:hover) .checkbox,:host([checked]:hover) .radio,:host([checked]:${focusVisible}) .checkbox,:host([checked]:${focusVisible}) .radio{border-color:${SystemColors.HighlightText}}:host([aria-checked='true']){background:${SystemColors.Highlight};color:${SystemColors.HighlightText}}:host([aria-checked='true']) .checkbox-indicator,:host([aria-checked='true']) ::slotted([slot='checkbox-indicator']),:host([aria-checked='true']) ::slotted([slot='radio-indicator']){fill:${SystemColors.Highlight}}:host([aria-checked='true']) .radio-indicator{background:${SystemColors.Highlight}}`), new DirectionalStyleSheetBehavior(css`\n        .expand-collapse-glyph-container{transform:rotate(0deg)}`, css`\n        .expand-collapse-glyph-container{transform:rotate(180deg)}`));\n\n/**\r\n * The Fluent Menu Item Element. Implements {@link @microsoft/fast-foundation#MenuItem},\r\n * {@link @microsoft/fast-foundation#menuItemTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-menu-item\\>\r\n */\nconst fluentMenuItem = MenuItem.compose({\n  baseName: 'menu-item',\n  template: menuItemTemplate,\n  styles: menuItemStyles$1,\n  checkboxIndicator: `\n    <svg width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M13.86 3.66a.5.5 0 01-.02.7l-7.93 7.48a.6.6 0 01-.84-.02L2.4 9.1a.5.5 0 01.72-.7l2.4 2.44 7.65-7.2a.5.5 0 01.7.02z\"/>\n    </svg>\n  `,\n  expandCollapseGlyph: `\n    <svg width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M5.65 3.15a.5.5 0 000 .7L9.79 8l-4.14 4.15a.5.5 0 00.7.7l4.5-4.5a.5.5 0 000-.7l-4.5-4.5a.5.5 0 00-.7 0z\"/>\n    </svg>\n  `,\n  radioIndicator: `\n    <svg width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\n      <circle cx=\"8\" cy=\"8\" r=\"2\"/>\n    </svg>\n  `\n});\n/**\r\n * Styles for MenuItem\r\n * @public\r\n */\nconst menuItemStyles = menuItemStyles$1;\n\nconst logicalControlSelector$3 = '.root';\nconst numberFieldStyles$1 = (context, definition) => css`\n    ${display('inline-block')}\n\n    ${baseInputStyles(context, definition, logicalControlSelector$3)}\n\n    ${inputStateStyles()}\n\n    .root{display:flex;flex-direction:row}.control{-webkit-appearance:none;color:inherit;background:transparent;border:0;height:calc(100% - 4px);margin-top:auto;margin-bottom:auto;padding:0 calc(${designUnit} * 2px + 1px);font-family:inherit;font-size:inherit;line-height:inherit}.start,.end{margin:auto;fill:currentcolor}.start{display:flex;margin-inline-start:11px}.end{display:flex;margin-inline-end:11px}.controls{opacity:0;position:relative;top:-1px;z-index:3}:host(:hover:not([disabled])) .controls,:host(:focus-within:not([disabled])) .controls{opacity:1}.step-up,.step-down{display:flex;padding:0 8px;cursor:pointer}.step-up{padding-top:3px}`.withBehaviors(appearanceBehavior('outline', inputOutlineStyles(context, definition, logicalControlSelector$3)), appearanceBehavior('filled', inputFilledStyles(context, definition, logicalControlSelector$3)), forcedColorsStylesheetBehavior(inputForcedColorStyles(context, definition, logicalControlSelector$3)));\n\n/**\r\n * The Fluent number field class\r\n * @internal\r\n */\nclass NumberField extends NumberField$1 {\n  /**\r\n   * @internal\r\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    if (!this.appearance) {\n      this.appearance = 'outline';\n    }\n  }\n}\n__decorate([attr], NumberField.prototype, \"appearance\", void 0);\n/**\r\n * Styles for NumberField\r\n * @public\r\n */\nconst numberFieldStyles = numberFieldStyles$1;\n/**\r\n * The Fluent Number Field Custom Element. Implements {@link @microsoft/fast-foundation#NumberField},\r\n * {@link @microsoft/fast-foundation#numberFieldTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-number-field\\>\r\n *\r\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}\r\n */\nconst fluentNumberField = NumberField.compose({\n  baseName: 'number-field',\n  baseClass: NumberField$1,\n  styles: numberFieldStyles$1,\n  template: numberFieldTemplate,\n  shadowOptions: {\n    delegatesFocus: true\n  },\n  stepDownGlyph: `\n    <svg width=\"12\" height=\"12\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M2.15 4.65c.2-.2.5-.2.7 0L6 7.79l3.15-3.14a.5.5 0 11.7.7l-3.5 3.5a.5.5 0 01-.7 0l-3.5-3.5a.5.5 0 010-.7z\"/>\n    </svg>\n  `,\n  stepUpGlyph: `\n    <svg width=\"12\" height=\"12\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M2.15 7.35c.2.2.5.2.7 0L6 4.21l3.15 3.14a.5.5 0 10.7-.7l-3.5-3.5a.5.5 0 00-.7 0l-3.5 3.5a.5.5 0 000 .7z\"/>\n    </svg>\n`\n});\n\nconst progressStyles$1 = (context, definition) => css`\n    ${display('flex')} :host{align-items:center;height:calc((${strokeWidth} * 3) * 1px)}.progress{background-color:${neutralStrokeStrongRest};border-radius:calc(${designUnit} * 1px);width:100%;height:calc(${strokeWidth} * 1px);display:flex;align-items:center;position:relative}.determinate{background-color:${accentFillRest};border-radius:calc(${designUnit} * 1px);height:calc((${strokeWidth} * 3) * 1px);transition:all 0.2s ease-in-out;display:flex}.indeterminate{height:calc((${strokeWidth} * 3) * 1px);border-radius:calc(${designUnit} * 1px);display:flex;width:100%;position:relative;overflow:hidden}.indeterminate-indicator-1{position:absolute;opacity:0;height:100%;background-color:${accentFillRest};border-radius:calc(${designUnit} * 1px);animation-timing-function:cubic-bezier(0.4,0,0.6,1);width:40%;animation:indeterminate-1 2s infinite}.indeterminate-indicator-2{position:absolute;opacity:0;height:100%;background-color:${accentFillRest};border-radius:calc(${designUnit} * 1px);animation-timing-function:cubic-bezier(0.4,0,0.6,1);width:60%;animation:indeterminate-2 2s infinite}:host(.paused) .indeterminate-indicator-1,:host(.paused) .indeterminate-indicator-2{animation:none;background-color:${neutralForegroundHint};width:100%;opacity:1}:host(.paused) .determinate{background-color:${neutralForegroundHint}}@keyframes indeterminate-1{0%{opacity:1;transform:translateX(-100%)}70%{opacity:1;transform:translateX(300%)}70.01%{opacity:0}100%{opacity:0;transform:translateX(300%)}}@keyframes indeterminate-2{0%{opacity:0;transform:translateX(-150%)}29.99%{opacity:0}30%{opacity:1;transform:translateX(-150%)}100%{transform:translateX(166.66%);opacity:1}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        .indeterminate-indicator-1,.indeterminate-indicator-2,.determinate,.progress{background-color:${SystemColors.ButtonText}}:host(.paused) .indeterminate-indicator-1,:host(.paused) .indeterminate-indicator-2,:host(.paused) .determinate{background-color:${SystemColors.GrayText}}`));\n\n/**\r\n * Progress base class\r\n * @public\r\n */\nclass Progress extends BaseProgress {}\n/**\r\n * The Fluent Progress Element. Implements {@link @microsoft/fast-foundation#BaseProgress},\r\n * {@link @microsoft/fast-foundation#progressTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-progress\\>\r\n */\nconst fluentProgress = Progress.compose({\n  baseName: 'progress',\n  template: progressTemplate,\n  styles: progressStyles$1,\n  indeterminateIndicator1: `\n    <span class=\"indeterminate-indicator-1\" part=\"indeterminate-indicator-1\"></span>\n  `,\n  indeterminateIndicator2: `\n    <span class=\"indeterminate-indicator-2\" part=\"indeterminate-indicator-2\"></span>\n  `\n});\n/**\r\n * Styles for Progress\r\n * @public\r\n */\nconst progressStyles = progressStyles$1;\n\nconst progressRingStyles$1 = (context, definition) => css`\n    ${display('flex')} :host{align-items:center;height:calc(${heightNumber} * 1px);width:calc(${heightNumber} * 1px)}.progress{height:100%;width:100%}.background{fill:none;stroke-width:2px}.determinate{stroke:${accentFillRest};fill:none;stroke-width:2px;stroke-linecap:round;transform-origin:50% 50%;transform:rotate(-90deg);transition:all 0.2s ease-in-out}.indeterminate-indicator-1{stroke:${accentFillRest};fill:none;stroke-width:2px;stroke-linecap:round;transform-origin:50% 50%;transform:rotate(-90deg);transition:all 0.2s ease-in-out;animation:spin-infinite 2s linear infinite}:host(.paused) .indeterminate-indicator-1{animation:none;stroke:${neutralForegroundHint}}:host(.paused) .determinate{stroke:${neutralForegroundHint}}@keyframes spin-infinite{0%{stroke-dasharray:0.01px 43.97px;transform:rotate(0deg)}50%{stroke-dasharray:21.99px 21.99px;transform:rotate(450deg)}100%{stroke-dasharray:0.01px 43.97px;transform:rotate(1080deg)}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        .background{stroke:${SystemColors.Field}}.determinate,.indeterminate-indicator-1{stroke:${SystemColors.ButtonText}}:host(.paused) .determinate,:host(.paused) .indeterminate-indicator-1{stroke:${SystemColors.GrayText}}`));\n\n/**\r\n * Progress Ring base class\r\n * @public\r\n */\nclass ProgressRing extends BaseProgress {}\n/**\r\n * The Fluent Progress Ring Element. Implements {@link @microsoft/fast-foundation#BaseProgress},\r\n * {@link @microsoft/fast-foundation#progressRingTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-progress-ring\\>\r\n */\nconst fluentProgressRing = ProgressRing.compose({\n  baseName: 'progress-ring',\n  template: progressRingTemplate,\n  styles: progressRingStyles$1,\n  indeterminateIndicator: `\n    <svg class=\"progress\" part=\"progress\" viewBox=\"0 0 16 16\">\n        <circle\n            class=\"background\"\n            part=\"background\"\n            cx=\"8px\"\n            cy=\"8px\"\n            r=\"7px\"\n        ></circle>\n        <circle\n            class=\"indeterminate-indicator-1\"\n            part=\"indeterminate-indicator-1\"\n            cx=\"8px\"\n            cy=\"8px\"\n            r=\"7px\"\n        ></circle>\n    </svg>\n  `\n});\n/**\r\n * Styles for ProgressRing\r\n * @public\r\n */\nconst progressRingStyles = progressRingStyles$1;\n\nconst radioStyles = (context, definition) => css`\n    ${display('inline-flex')} :host{--input-size:calc((${heightNumber} / 2) + ${designUnit});align-items:center;outline:none;${\n/*\r\n * Chromium likes to select label text or the default slot when\r\n * the radio button is clicked. Maybe there is a better solution here?\r\n */''} user-select:none;position:relative;flex-direction:row;transition:all 0.2s ease-in-out}.control{position:relative;width:calc(var(--input-size) * 1px);height:calc(var(--input-size) * 1px);box-sizing:border-box;border-radius:50%;border:calc(${strokeWidth} * 1px) solid ${neutralStrokeStrongRest};background:${neutralFillInputAltRest};cursor:pointer}.label__hidden{display:none;visibility:hidden}.label{${typeRampBase}\n      color:${neutralForegroundRest};${\n/* Need to discuss with Brian how HorizontalSpacingNumber can work. https://github.com/microsoft/fast/issues/2766 */''} padding-inline-start:calc(${designUnit} * 2px + 2px);margin-inline-end:calc(${designUnit} * 2px + 2px);cursor:pointer}.control,slot[name='checked-indicator']{flex-shrink:0}slot[name='checked-indicator']{display:flex;align-items:center;justify-content:center;width:100%;height:100%;fill:${foregroundOnAccentRest};opacity:0;pointer-events:none}:host(:not(.disabled):hover) .control{background:${neutralFillInputAltHover};border-color:${neutralStrokeStrongHover}}:host(:not(.disabled):active) .control{background:${neutralFillInputAltActive};border-color:${neutralStrokeStrongActive}}:host(:not(.disabled):active) slot[name='checked-indicator']{opacity:1}:host(:${focusVisible}) .control{${focusTreatmentTight}\n      background:${neutralFillInputAltFocus}}:host(.checked) .control{background:${accentFillRest};border-color:transparent}:host(.checked:not(.disabled):hover) .control{background:${accentFillHover};border-color:transparent}:host(.checked:not(.disabled):active) .control{background:${accentFillActive};border-color:transparent}:host(.disabled) .label,:host(.readonly) .label,:host(.readonly) .control,:host(.disabled) .control{cursor:${disabledCursor}}:host(.checked) slot[name='checked-indicator']{opacity:1}:host(.disabled){opacity:${disabledOpacity}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        .control{background:${SystemColors.Field};border-color:${SystemColors.FieldText}}:host(:not(.disabled):hover) .control,:host(:not(.disabled):active) .control{border-color:${SystemColors.Highlight}}:host(:${focusVisible}) .control{forced-color-adjust:none;background:${SystemColors.Field};outline-color:${SystemColors.FieldText}}:host(.checked:not(.disabled):hover) .control,:host(.checked:not(.disabled):active) .control{border-color:${SystemColors.Highlight};background:${SystemColors.Highlight}}:host(.checked) slot[name='checked-indicator']{fill:${SystemColors.Highlight}}:host(.checked:hover) .control slot[name='checked-indicator']{fill:${SystemColors.HighlightText}}:host(.disabled){opacity:1}:host(.disabled) .label{color:${SystemColors.GrayText}}:host(.disabled) .control,:host(.checked.disabled) .control{background:${SystemColors.Field};border-color:${SystemColors.GrayText}}:host(.disabled) slot[name='checked-indicator'],:host(.checked.disabled) slot[name='checked-indicator']{fill:${SystemColors.GrayText}}`));\n\n/**\r\n * The Fluent Radio Element. Implements {@link @microsoft/fast-foundation#Radio},\r\n * {@link @microsoft/fast-foundation#radioTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-radio\\>\r\n */\nconst fluentRadio = Radio.compose({\n  baseName: 'radio',\n  template: radioTemplate,\n  styles: radioStyles,\n  checkedIndicator: `\n    <svg width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\n      <circle cx=\"8\" cy=\"8\" r=\"4\"/>\n    </svg>\n  `\n});\n/**\r\n * Styles for Radio\r\n * @public\r\n */\nconst RadioStyles = radioStyles;\n\nconst radioGroupStyles$1 = (context, definition) => css`\n  ${display('flex')} :host{align-items:flex-start;flex-direction:column}.positioning-region{display:flex;flex-wrap:wrap}:host([orientation='vertical']) .positioning-region{flex-direction:column}:host([orientation='horizontal']) .positioning-region{flex-direction:row}`;\n\n/**\r\n * The Fluent Radio Group Element. Implements {@link @microsoft/fast-foundation#RadioGroup},\r\n * {@link @microsoft/fast-foundation#radioGroupTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-radio-group\\>\r\n */\nconst fluentRadioGroup = RadioGroup.compose({\n  baseName: 'radio-group',\n  template: radioGroupTemplate,\n  styles: radioGroupStyles$1\n});\n/**\r\n * Styles for RadioGroup\r\n * @public\r\n */\nconst radioGroupStyles = radioGroupStyles$1;\n\n/**\r\n * @public\r\n */\nconst searchTemplate = (context, definition) => html`<template class=\" ${x => x.readOnly ? 'readonly' : ''} \"><label part=\"label\" for=\"control\" class=\"${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length ? 'label' : 'label label__hidden'}\"><slot ${slotted({\n  property: 'defaultSlottedNodes',\n  filter: whitespaceFilter\n})}></slot></label><div class=\"root\" part=\"root\" ${ref('root')}>${startSlotTemplate(context, definition)}<div class=\"input-wrapper\" part=\"input-wrapper\"><input class=\"control\" part=\"control\" id=\"control\" @input=\"${x => x.handleTextInput()}\" @change=\"${x => x.handleChange()}\" ?autofocus=\"${x => x.autofocus}\" ?disabled=\"${x => x.disabled}\" list=\"${x => x.list}\" maxlength=\"${x => x.maxlength}\" minlength=\"${x => x.minlength}\" pattern=\"${x => x.pattern}\" placeholder=\"${x => x.placeholder}\" ?readonly=\"${x => x.readOnly}\" ?required=\"${x => x.required}\" size=\"${x => x.size}\" ?spellcheck=\"${x => x.spellcheck}\" :value=\"${x => x.value}\" type=\"search\" aria-atomic=\"${x => x.ariaAtomic}\" aria-busy=\"${x => x.ariaBusy}\" aria-controls=\"${x => x.ariaControls}\" aria-current=\"${x => x.ariaCurrent}\" aria-describedby=\"${x => x.ariaDescribedby}\" aria-details=\"${x => x.ariaDetails}\" aria-disabled=\"${x => x.ariaDisabled}\" aria-errormessage=\"${x => x.ariaErrormessage}\" aria-flowto=\"${x => x.ariaFlowto}\" aria-haspopup=\"${x => x.ariaHaspopup}\" aria-hidden=\"${x => x.ariaHidden}\" aria-invalid=\"${x => x.ariaInvalid}\" aria-keyshortcuts=\"${x => x.ariaKeyshortcuts}\" aria-label=\"${x => x.ariaLabel}\" aria-labelledby=\"${x => x.ariaLabelledby}\" aria-live=\"${x => x.ariaLive}\" aria-owns=\"${x => x.ariaOwns}\" aria-relevant=\"${x => x.ariaRelevant}\" aria-roledescription=\"${x => x.ariaRoledescription}\" ${ref('control')} /><slot name=\"clear-button\"><button class=\"clear-button ${x => x.value ? '' : 'clear-button__hidden'}\" part=\"clear-button\" tabindex=\"-1\" @click=${x => x.handleClearInput()}><slot name=\"clear-glyph\"><svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m2.09 2.22.06-.07a.5.5 0 0 1 .63-.06l.07.06L6 5.29l3.15-3.14a.5.5 0 1 1 .7.7L6.71 6l3.14 3.15c.18.17.2.44.06.63l-.06.07a.5.5 0 0 1-.63.06l-.07-.06L6 6.71 2.85 9.85a.5.5 0 0 1-.7-.7L5.29 6 2.15 2.85a.5.5 0 0 1-.06-.63l.06-.07-.06.07Z\" /></svg></slot></button></slot></div>${endSlotTemplate(context, definition)}</div></template>`;\n\nconst logicalControlSelector$2 = '.root';\nconst clearButtonHover = DesignToken.create(\"clear-button-hover\").withDefault(target => {\n  const buttonRecipe = neutralFillStealthRecipe.getValueFor(target);\n  const inputRecipe = neutralFillInputRecipe.getValueFor(target);\n  return buttonRecipe.evaluate(target, inputRecipe.evaluate(target).focus).hover;\n});\nconst clearButtonActive = DesignToken.create(\"clear-button-active\").withDefault(target => {\n  const buttonRecipe = neutralFillStealthRecipe.getValueFor(target);\n  const inputRecipe = neutralFillInputRecipe.getValueFor(target);\n  return buttonRecipe.evaluate(target, inputRecipe.evaluate(target).focus).active;\n});\nconst searchStyles$1 = (context, definition) => css`\n    ${display('inline-block')}\n\n    ${baseInputStyles(context, definition, logicalControlSelector$2)}\n\n    ${inputStateStyles()}\n\n    .root{display:flex;flex-direction:row}.control{-webkit-appearance:none;color:inherit;background:transparent;border:0;height:calc(100% - 4px);margin-top:auto;margin-bottom:auto;padding:0 calc(${designUnit} * 2px + 1px);font-family:inherit;font-size:inherit;line-height:inherit}.clear-button{display:inline-flex;align-items:center;margin:1px;height:calc(100% - 2px);opacity:0;background:transparent;color:${neutralForegroundRest};fill:currentcolor;border:none;border-radius:calc(${controlCornerRadius} * 1px);min-width:calc(${heightNumber} * 1px);${typeRampBase}\n      outline:none;padding:0 calc((10 + (${designUnit} * 2 * ${density})) * 1px)}.clear-button:hover{background:${clearButtonHover}}.clear-button:active{background:${clearButtonActive}}:host(:hover:not([disabled],[readOnly])) .clear-button,:host(:active:not([disabled],[readOnly])) .clear-button,:host(:focus-within:not([disabled],[readOnly])) .clear-button{opacity:1}:host(:hover:not([disabled],[readOnly])) .clear-button__hidden,:host(:active:not([disabled],[readOnly])) .clear-button__hidden,:host(:focus-within:not([disabled],[readOnly])) .clear-button__hidden{opacity:0}.control::-webkit-search-cancel-button{-webkit-appearance:none}.input-wrapper{display:flex;position:relative;width:100%}.start,.end{display:flex;margin:1px;align-items:center}.start{display:flex;margin-inline-start:11px}::slotted([slot=\"end\"]){height:100%}.clear-button__hidden{opacity:0}.end{margin-inline-end:11px}::slotted(${context.tagFor(Button$1)}){margin-inline-end:1px}`.withBehaviors(appearanceBehavior('outline', inputOutlineStyles(context, definition, logicalControlSelector$2)), appearanceBehavior('filled', inputFilledStyles(context, definition, logicalControlSelector$2)), forcedColorsStylesheetBehavior(inputForcedColorStyles(context, definition, logicalControlSelector$2)));\n\n/**\r\n * The Fluent search class\r\n * @internal\r\n */\nclass Search extends Search$1 {\n  constructor() {\n    super(...arguments);\n    /**\r\n     * The appearance of the element.\r\n     *\r\n     * @public\r\n     * @remarks\r\n     * HTML Attribute: appearance\r\n     */\n    this.appearance = 'outline';\n  }\n}\n__decorate([attr], Search.prototype, \"appearance\", void 0);\n/**\r\n * The Fluent Search Custom Element. Implements {@link @microsoft/fast-foundation#Search},\r\n * {@link @microsoft/fast-foundation#searchTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-search\\>\r\n *\r\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}\r\n */\nconst fluentSearch = Search.compose({\n  baseName: 'search',\n  baseClass: Search$1,\n  template: searchTemplate,\n  styles: searchStyles$1,\n  start: `<svg width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg%22%3E\"><path d=\"M8.5 3a5.5 5.5 0 0 1 4.23 9.02l4.12 4.13a.5.5 0 0 1-.63.76l-.07-.06-4.13-4.12A5.5 5.5 0 1 1 8.5 3Zm0 1a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z\"/></svg>`,\n  shadowOptions: {\n    delegatesFocus: true\n  }\n});\n/**\r\n * Styles for Search\r\n * @public\r\n */\nconst searchStyles = searchStyles$1;\n\n/**\r\n * The Fluent select class\r\n * @internal\r\n */\nclass Select extends Select$1 {\n  /**\r\n   * @internal\r\n   */\n  appearanceChanged(oldValue, newValue) {\n    if (oldValue !== newValue) {\n      this.classList.add(newValue);\n      this.classList.remove(oldValue);\n    }\n  }\n  /**\r\n   * @internal\r\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    if (!this.appearance) {\n      this.appearance = 'outline';\n    }\n    if (this.listbox) {\n      fillColor.setValueFor(this.listbox, neutralLayerFloating);\n    }\n  }\n}\n__decorate([attr({\n  mode: 'fromView'\n})], Select.prototype, \"appearance\", void 0);\n/**\r\n * The Fluent select Custom Element. Implements, {@link @microsoft/fast-foundation#Select}\r\n * {@link @microsoft/fast-foundation#selectTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-select\\>\r\n *\r\n */\nconst fluentSelect = Select.compose({\n  baseName: 'select',\n  baseClass: Select$1,\n  template: selectTemplate,\n  styles: selectStyles$1,\n  indicator: `\n    <svg width=\"12\" height=\"12\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M2.15 4.65c.2-.2.5-.2.7 0L6 7.79l3.15-3.14a.5.5 0 11.7.7l-3.5 3.5a.5.5 0 01-.7 0l-3.5-3.5a.5.5 0 010-.7z\"/>\n    </svg>\n  `\n});\n/**\r\n * Styles for Select\r\n * @public\r\n */\nconst selectStyles = selectStyles$1;\n\nconst skeletonStyles$1 = (context, definition) => css`\n    ${display('block')} :host{--skeleton-fill-default:${neutralFillSecondaryRest};overflow:hidden;width:100%;position:relative;background-color:var(--skeleton-fill,var(--skeleton-fill-default));--skeleton-animation-gradient-default:linear-gradient(\n        270deg,var(--skeleton-fill,var(--skeleton-fill-default)) 0%,${neutralFillSecondaryHover} 51%,var(--skeleton-fill,var(--skeleton-fill-default)) 100%\n      );--skeleton-animation-timing-default:ease-in-out}:host(.rect){border-radius:calc(${controlCornerRadius} * 1px)}:host(.circle){border-radius:100%;overflow:hidden}object{position:absolute;width:100%;height:auto;z-index:2}object img{width:100%;height:auto}${display('block')} span.shimmer{position:absolute;width:100%;height:100%;background-image:var(--skeleton-animation-gradient,var(--skeleton-animation-gradient-default));background-size:0px 0px / 90% 100%;background-repeat:no-repeat;background-color:var(--skeleton-animation-fill,${neutralFillSecondaryRest});animation:shimmer 2s infinite;animation-timing-function:var(--skeleton-animation-timing,var(--skeleton-timing-default));animation-direction:normal;z-index:1}::slotted(svg){z-index:2}::slotted(.pattern){width:100%;height:100%}@keyframes shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        :host{background-color:${SystemColors.CanvasText}}`));\n\n/**\r\n * The Fluent Skeleton Element. Implements {@link @microsoft/fast-foundation#Skeleton},\r\n * {@link @microsoft/fast-foundation#skeletonTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-skeleton\\>\r\n */\nconst fluentSkeleton = Skeleton.compose({\n  baseName: 'skeleton',\n  template: skeletonTemplate,\n  styles: skeletonStyles$1\n});\n/**\r\n * Styles for Skeleton\r\n * @public\r\n */\nconst skeletonStyles = skeletonStyles$1;\n\nconst sliderStyles$1 = (context, definition) => css`\n    ${display('inline-grid')} :host{--thumb-size:calc((${heightNumber} / 2) + ${designUnit} + (${strokeWidth} * 2));--thumb-translate:calc(var(--thumb-size) * -0.5 + var(--track-width) / 2);--track-overhang:calc((${designUnit} / 2) * -1);--track-width:${designUnit};align-items:center;width:100%;user-select:none;box-sizing:border-box;border-radius:calc(${controlCornerRadius} * 1px);outline:none;cursor:pointer}:host(.horizontal) .positioning-region{position:relative;margin:0 8px;display:grid;grid-template-rows:calc(var(--thumb-size) * 1px) 1fr}:host(.vertical) .positioning-region{position:relative;margin:0 8px;display:grid;height:100%;grid-template-columns:calc(var(--thumb-size) * 1px) 1fr}:host(:${focusVisible}) .thumb-cursor{box-shadow:0 0 0 2px ${fillColor},0 0 0 4px ${focusStrokeOuter}}.thumb-container{position:absolute;height:calc(var(--thumb-size) * 1px);width:calc(var(--thumb-size) * 1px);transition:all 0.2s ease}.thumb-cursor{display:flex;position:relative;border:none;width:calc(var(--thumb-size) * 1px);height:calc(var(--thumb-size) * 1px);background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlRest};border:calc(${strokeWidth} * 1px) solid transparent;border-radius:50%;box-sizing:border-box}.thumb-cursor::after{content:'';display:block;border-radius:50%;width:100%;margin:4px;background:${accentFillRest}}:host(:not(.disabled)) .thumb-cursor:hover::after{background:${accentFillHover};margin:3px}:host(:not(.disabled)) .thumb-cursor:active::after{background:${accentFillActive};margin:5px}:host(:not(.disabled)) .thumb-cursor:hover{background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlHover}}:host(:not(.disabled)) .thumb-cursor:active{background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlActive}}.track-start{background:${accentFillRest};position:absolute;height:100%;left:0;border-radius:calc(${controlCornerRadius} * 1px)}:host(.horizontal) .thumb-container{transform:translateX(calc(var(--thumb-size) * 0.5px)) translateY(calc(var(--thumb-translate) * 1px))}:host(.vertical) .thumb-container{transform:translateX(calc(var(--thumb-translate) * 1px)) translateY(calc(var(--thumb-size) * 0.5px))}:host(.horizontal){min-width:calc(var(--thumb-size) * 1px)}:host(.horizontal) .track{right:calc(var(--track-overhang) * 1px);left:calc(var(--track-overhang) * 1px);align-self:start;height:calc(var(--track-width) * 1px)}:host(.vertical) .track{top:calc(var(--track-overhang) * 1px);bottom:calc(var(--track-overhang) * 1px);width:calc(var(--track-width) * 1px);height:100%}.track{background:${neutralFillStrongRest};border:1px solid ${neutralStrokeStrongRest};border-radius:2px;box-sizing:border-box;position:absolute}:host(.vertical){height:100%;min-height:calc(${designUnit} * 60px);min-width:calc(${designUnit} * 20px)}:host(.vertical) .track-start{height:auto;width:100%;top:0}:host(.disabled),:host(.readonly){cursor:${disabledCursor}}:host(.disabled){opacity:${disabledOpacity}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        .thumb-cursor{forced-color-adjust:none;border-color:${SystemColors.FieldText};background:${SystemColors.FieldText}}:host(:not(.disabled)) .thumb-cursor:hover,:host(:not(.disabled)) .thumb-cursor:active{background:${SystemColors.Highlight}}.track{forced-color-adjust:none;background:${SystemColors.FieldText}}.thumb-cursor::after,:host(:not(.disabled)) .thumb-cursor:hover::after,:host(:not(.disabled)) .thumb-cursor:active::after{background:${SystemColors.Field}}:host(:${focusVisible}) .thumb-cursor{background:${SystemColors.Highlight};border-color:${SystemColors.Highlight};box-shadow:0 0 0 1px ${SystemColors.Field},0 0 0 3px ${SystemColors.FieldText}}:host(.disabled){opacity:1}:host(.disabled) .track,:host(.disabled) .thumb-cursor{forced-color-adjust:none;background:${SystemColors.GrayText}}`));\n\n/**\r\n * The Fluent Slider Custom Element. Implements {@link @microsoft/fast-foundation#(Slider:class)},\r\n * {@link @microsoft/fast-foundation#sliderTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-slider\\>\r\n */\nconst fluentSlider = Slider.compose({\n  baseName: 'slider',\n  template: sliderTemplate,\n  styles: sliderStyles$1,\n  thumb: `\n    <div class=\"thumb-cursor\"></div>\n  `\n});\n/**\r\n * Styles for Slider\r\n * @public\r\n */\nconst sliderStyles = sliderStyles$1;\n\nconst sliderLabelStyles$1 = (context, definition) => css`\n    ${display('block')} :host{${typeRampMinus1}}.root{position:absolute;display:grid}:host(.horizontal){align-self:start;grid-row:2;margin-top:-4px}:host(.vertical){justify-self:start;grid-column:2;margin-left:2px}.container{display:grid;justify-self:center}:host(.horizontal) .container{grid-template-rows:auto auto;grid-template-columns:0}:host(.vertical) .container{grid-template-columns:auto auto;grid-template-rows:0;min-width:calc(var(--thumb-size) * 1px);height:calc(var(--thumb-size) * 1px)}.label{justify-self:center;align-self:center;white-space:nowrap;max-width:30px;margin:2px 0}.mark{width:calc(${strokeWidth} * 1px);height:calc(${designUnit} * 1px);background:${neutralStrokeStrongRest};justify-self:center}:host(.vertical) .mark{transform:rotate(90deg);align-self:center}:host(.vertical) .label{margin-left:calc((${designUnit} / 2) * 2px);align-self:center}:host(.disabled){opacity:${disabledOpacity}}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        .mark{forced-color-adjust:none;background:${SystemColors.FieldText}}:host(.disabled){forced-color-adjust:none;opacity:1}:host(.disabled) .label{color:${SystemColors.GrayText}}:host(.disabled) .mark{background:${SystemColors.GrayText}}`));\n\n/**\r\n * The Fluent Slider Label Custom Element. Implements {@link @microsoft/fast-foundation#SliderLabel},\r\n * {@link @microsoft/fast-foundation#sliderLabelTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-slider-label\\>\r\n */\nconst fluentSliderLabel = SliderLabel.compose({\n  baseName: 'slider-label',\n  template: sliderLabelTemplate,\n  styles: sliderLabelStyles$1\n});\n/**\r\n * Styles for SliderLabel\r\n * @public\r\n */\nconst sliderLabelStyles = sliderLabelStyles$1;\n\nconst switchStyles$1 = (context, definition) => css`\n    :host([hidden]){display:none}${display('inline-flex')} :host{align-items:center;outline:none;font-family:${bodyFont};${\n/*\r\n * Chromium likes to select label text or the default slot when\r\n * the checkbox is clicked. Maybe there is a better solution here?\r\n */''} user-select:none}:host(.disabled){opacity:${disabledOpacity}}:host(.disabled) .label,:host(.readonly) .label,:host(.disabled) .switch,:host(.readonly) .switch,:host(.disabled) .status-message,:host(.readonly) .status-message{cursor:${disabledCursor}}.switch{position:relative;box-sizing:border-box;width:calc(((${heightNumber} / 2) + ${designUnit}) * 2px);height:calc(((${heightNumber} / 2) + ${designUnit}) * 1px);background:${neutralFillInputAltRest};border-radius:calc(${heightNumber} * 1px);border:calc(${strokeWidth} * 1px) solid ${neutralStrokeStrongRest};cursor:pointer}:host(:not(.disabled):hover) .switch{background:${neutralFillInputAltHover};border-color:${neutralStrokeStrongHover}}:host(:not(.disabled):active) .switch{background:${neutralFillInputAltActive};border-color:${neutralStrokeStrongActive}}:host(:${focusVisible}) .switch{${focusTreatmentTight}\n      background:${neutralFillInputAltFocus}}:host(.checked) .switch{background:${accentFillRest};border-color:transparent}:host(.checked:not(.disabled):hover) .switch{background:${accentFillHover};border-color:transparent}:host(.checked:not(.disabled):active) .switch{background:${accentFillActive};border-color:transparent}slot[name='switch']{position:absolute;display:flex;border:1px solid transparent;fill:${neutralForegroundRest};transition:all 0.2s ease-in-out}.status-message{color:${neutralForegroundRest};cursor:pointer;${typeRampBase}}.label__hidden{display:none;visibility:hidden}.label{color:${neutralForegroundRest};${typeRampBase}\n      margin-inline-end:calc(${designUnit} * 2px + 2px);cursor:pointer}::slotted([slot=\"checked-message\"]),::slotted([slot=\"unchecked-message\"]){margin-inline-start:calc(${designUnit} * 2px + 2px)}:host(.checked) .switch{background:${accentFillRest}}:host(.checked) .switch slot[name='switch']{fill:${foregroundOnAccentRest};filter:drop-shadow(0px 1px 1px rgba(0,0,0,0.15))}:host(.checked:not(.disabled)) .switch:hover{background:${accentFillHover}}:host(.checked:not(.disabled)) .switch:hover slot[name='switch']{fill:${foregroundOnAccentHover}}:host(.checked:not(.disabled)) .switch:active{background:${accentFillActive}}:host(.checked:not(.disabled)) .switch:active slot[name='switch']{fill:${foregroundOnAccentActive}}.unchecked-message{display:block}.checked-message{display:none}:host(.checked) .unchecked-message{display:none}:host(.checked) .checked-message{display:block}`.withBehaviors(new DirectionalStyleSheetBehavior(css`\n        slot[name='switch']{left:0}:host(.checked) slot[name='switch']{left:100%;transform:translateX(-100%)}`, css`\n        slot[name='switch']{right:0}:host(.checked) slot[name='switch']{right:100%;transform:translateX(100%)}`), forcedColorsStylesheetBehavior(css`\n        :host(:not(.disabled)) .switch slot[name='switch']{forced-color-adjust:none;fill:${SystemColors.FieldText}}.switch{background:${SystemColors.Field};border-color:${SystemColors.FieldText}}:host(.checked) .switch{background:${SystemColors.Highlight};border-color:${SystemColors.Highlight}}:host(:not(.disabled):hover) .switch,:host(:not(.disabled):active) .switch,:host(.checked:not(.disabled):hover) .switch{background:${SystemColors.HighlightText};border-color:${SystemColors.Highlight}}:host(.checked:not(.disabled)) .switch slot[name=\"switch\"]{fill:${SystemColors.HighlightText}}:host(.checked:not(.disabled):hover) .switch slot[name='switch']{fill:${SystemColors.Highlight}}:host(:${focusVisible}) .switch{forced-color-adjust:none;background:${SystemColors.Field};border-color:${SystemColors.Highlight};outline-color:${SystemColors.FieldText}}:host(.disabled){opacity:1}:host(.disabled) slot[name='switch']{forced-color-adjust:none;fill:${SystemColors.GrayText}}:host(.disabled) .switch{background:${SystemColors.Field};border-color:${SystemColors.GrayText}}.status-message,.label{color:${SystemColors.FieldText}}`));\n\n/**\r\n * The Fluent Switch Custom Element. Implements {@link @microsoft/fast-foundation#Switch},\r\n * {@link @microsoft/fast-foundation#SwitchTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-switch\\>\r\n */\nconst fluentSwitch = Switch.compose({\n  baseName: 'switch',\n  template: switchTemplate,\n  styles: switchStyles$1,\n  switch: `\n    <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\">\n      <rect x=\"2\" y=\"2\" width=\"12\" height=\"12\" rx=\"6\"/>\n    </svg>\n  `\n});\n/**\r\n * Styles for Switch\r\n * @public\r\n */\nconst switchStyles = switchStyles$1;\n\nconst tabsStyles$1 = (context, definition) => css`\n      ${display('grid')} :host{box-sizing:border-box;${typeRampBase}\n        color:${neutralForegroundRest};grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr}.tablist{display:grid;grid-template-rows:calc(${heightNumber} * 1px);auto;grid-template-columns:auto;position:relative;width:max-content;align-self:end}.start,.end{align-self:center}.activeIndicator{grid-row:2;grid-column:1;width:20px;height:3px;border-radius:calc(${controlCornerRadius} * 1px);justify-self:center;background:${accentFillRest}}.activeIndicatorTransition{transition:transform 0.2s ease-in-out}.tabpanel{grid-row:2;grid-column-start:1;grid-column-end:4;position:relative}:host(.vertical){grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}:host(.vertical) .tablist{grid-row-start:2;grid-row-end:2;display:grid;grid-template-rows:auto;grid-template-columns:auto 1fr;position:relative;width:max-content;justify-self:end;align-self:flex-start;width:100%}:host(.vertical) .tabpanel{grid-column:2;grid-row-start:1;grid-row-end:4}:host(.vertical) .end{grid-row:3}:host(.vertical) .activeIndicator{grid-column:1;grid-row:1;width:3px;height:20px;margin-inline-start:calc(${focusStrokeWidth} * 1px);border-radius:calc(${controlCornerRadius} * 1px);align-self:center;background:${accentFillRest}}:host(.vertical) .activeIndicatorTransition{transition:transform 0.2s linear}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        .activeIndicator,:host(.vertical) .activeIndicator{background:${SystemColors.Highlight}}`));\n\nconst tabStyles$1 = (context, definition) => css`\n      ${display('inline-flex')} :host{box-sizing:border-box;${typeRampBase}\n        height:calc((${heightNumber} + (${designUnit} * 2)) * 1px);padding:0 calc((6 + (${designUnit} * 2 * ${density})) * 1px);color:${neutralForegroundRest};border-radius:calc(${controlCornerRadius} * 1px);border:calc(${strokeWidth} * 1px) solid transparent;align-items:center;justify-content:center;grid-row:1 / 3;cursor:pointer}:host([aria-selected='true']){z-index:2}:host(:hover),:host(:active){color:${neutralForegroundRest}}:host(:${focusVisible}){${focusTreatmentBase}}:host(.vertical){justify-content:start;grid-column:1 / 3}:host(.vertical[aria-selected='true']){z-index:2}:host(.vertical:hover),:host(.vertical:active){color:${neutralForegroundRest}}:host(.vertical:hover[aria-selected='true']){}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n          :host{forced-color-adjust:none;border-color:transparent;color:${SystemColors.ButtonText};fill:currentcolor}:host(:hover),:host(.vertical:hover),:host([aria-selected='true']:hover){background:transparent;color:${SystemColors.Highlight};fill:currentcolor}:host([aria-selected='true']){background:transparent;color:${SystemColors.Highlight};fill:currentcolor}:host(:${focusVisible}){background:transparent;outline-color:${SystemColors.ButtonText}}`));\n\n/**\r\n * The Fluent Tab Custom Element. Implements {@link @microsoft/fast-foundation#Tab},\r\n * {@link @microsoft/fast-foundation#tabTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-tab\\>\r\n */\nconst fluentTab = Tab.compose({\n  baseName: 'tab',\n  template: tabTemplate,\n  styles: tabStyles$1\n});\n/**\r\n * Styles for Tab\r\n * @public\r\n */\nconst tabStyles = tabStyles$1;\n\nconst tabPanelStyles$1 = (context, definition) => css`\n  ${display('block')} :host{box-sizing:border-box;${typeRampBase}\n    padding:0 calc((6 + (${designUnit} * 2 * ${density})) * 1px)}`;\n\n/**\r\n * The Fluent Tab Panel Custom Element. Implements {@link @microsoft/fast-foundation#TabPanel},\r\n * {@link @microsoft/fast-foundation#tabPanelTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-tab-panel\\>\r\n */\nconst fluentTabPanel = TabPanel.compose({\n  baseName: 'tab-panel',\n  template: tabPanelTemplate,\n  styles: tabPanelStyles$1\n});\n/**\r\n * Styles for TabPanel\r\n * @public\r\n */\nconst tabPanelStyles = tabPanelStyles$1;\n\n/**\r\n * The Fluent Tabs Custom Element. Implements {@link @microsoft/fast-foundation#Tabs},\r\n * {@link @microsoft/fast-foundation#tabsTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-tabs\\>\r\n */\nconst fluentTabs = Tabs.compose({\n  baseName: 'tabs',\n  template: tabsTemplate,\n  styles: tabsStyles$1\n});\n/**\r\n * Styles for Tabs\r\n * @public\r\n */\nconst tabsStyles = tabsStyles$1;\n\nconst logicalControlSelector$1 = '.control';\nconst textAreaStyles$1 = (context, definition) => css`\n    ${display('inline-flex')}\n\n    ${baseInputStyles(context, definition, logicalControlSelector$1)}\n\n    ${inputStateStyles()}\n\n    :host{flex-direction:column;vertical-align:bottom}.control{height:calc((${heightNumber} * 2) * 1px);padding:calc(${designUnit} * 1.5px) calc(${designUnit} * 2px + 1px)}:host .control{resize:none}:host(.resize-both) .control{resize:both}:host(.resize-horizontal) .control{resize:horizontal}:host(.resize-vertical) .control{resize:vertical}:host([cols]){width:initial}:host([rows]) .control{height:initial}`.withBehaviors(appearanceBehavior('outline', inputOutlineStyles(context, definition, logicalControlSelector$1)), appearanceBehavior('filled', inputFilledStyles(context, definition, logicalControlSelector$1)), forcedColorsStylesheetBehavior(inputForcedColorStyles(context, definition, logicalControlSelector$1)));\n\n/**\r\n * The Fluent TextArea class\r\n * @internal\r\n */\nclass TextArea extends TextArea$1 {\n  /**\r\n   * @internal\r\n   */\n  appearanceChanged(oldValue, newValue) {\n    if (oldValue !== newValue) {\n      this.classList.add(newValue);\n      this.classList.remove(oldValue);\n    }\n  }\n  /**\r\n   * @internal\r\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    if (!this.appearance) {\n      this.appearance = 'outline';\n    }\n  }\n}\n__decorate([attr], TextArea.prototype, \"appearance\", void 0);\n/**\r\n * The Fluent Text Area Custom Element. Implements {@link @microsoft/fast-foundation#TextArea},\r\n * {@link @microsoft/fast-foundation#textAreaTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-text-area\\>\r\n *\r\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}\r\n */\nconst fluentTextArea = TextArea.compose({\n  baseName: 'text-area',\n  baseClass: TextArea$1,\n  template: textAreaTemplate,\n  styles: textAreaStyles$1,\n  shadowOptions: {\n    delegatesFocus: true\n  }\n});\n/**\r\n * Styles for TextArea\r\n * @public\r\n */\nconst textAreaStyles = textAreaStyles$1;\n\nconst logicalControlSelector = '.root';\nconst textFieldStyles$1 = (context, definition) => css`\n    ${display('inline-block')}\n\n    ${baseInputStyles(context, definition, logicalControlSelector)}\n\n    ${inputStateStyles()}\n\n    .root{display:flex;flex-direction:row}.control{-webkit-appearance:none;color:inherit;background:transparent;border:0;height:calc(100% - 4px);margin-top:auto;margin-bottom:auto;padding:0 calc(${designUnit} * 2px + 1px);font-family:inherit;font-size:inherit;line-height:inherit}.start,.end{display:flex;margin:auto}.start{display:flex;margin-inline-start:11px}.end{display:flex;margin-inline-end:11px}`.withBehaviors(appearanceBehavior('outline', inputOutlineStyles(context, definition, logicalControlSelector)), appearanceBehavior('filled', inputFilledStyles(context, definition, logicalControlSelector)), forcedColorsStylesheetBehavior(inputForcedColorStyles(context, definition, logicalControlSelector)));\n\n/**\r\n * The Fluent text field class\r\n * @internal\r\n */\nclass TextField extends TextField$1 {\n  /**\r\n   * @internal\r\n   */\n  appearanceChanged(oldValue, newValue) {\n    if (oldValue !== newValue) {\n      this.classList.add(newValue);\n      this.classList.remove(oldValue);\n    }\n  }\n  /**\r\n   * @internal\r\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    if (!this.appearance) {\n      this.appearance = 'outline';\n    }\n  }\n}\n__decorate([attr], TextField.prototype, \"appearance\", void 0);\n/**\r\n * The Fluent Text Field Custom Element. Implements {@link @microsoft/fast-foundation#TextField},\r\n * {@link @microsoft/fast-foundation#textFieldTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-text-field\\>\r\n *\r\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}\r\n */\nconst fluentTextField = TextField.compose({\n  baseName: 'text-field',\n  baseClass: TextField$1,\n  template: textFieldTemplate,\n  styles: textFieldStyles$1,\n  shadowOptions: {\n    delegatesFocus: true\n  }\n});\n/**\r\n * Styles for TextField\r\n * @public\r\n */\nconst textFieldStyles = textFieldStyles$1;\n\nconst toolbarStyles = (context, definition) => css`\n    ${display('inline-flex')} :host{--toolbar-item-gap:calc(${designUnit} * 1px);background:${fillColor};fill:currentcolor;padding:var(--toolbar-item-gap);box-sizing:border-box;align-items:center}:host(${focusVisible}){${focusTreatmentBase}}.positioning-region{align-items:center;display:inline-flex;flex-flow:row wrap;justify-content:flex-start;flex-grow:1}:host([orientation='vertical']) .positioning-region{flex-direction:column;align-items:start}::slotted(:not([slot])){flex:0 0 auto;margin:0 var(--toolbar-item-gap)}:host([orientation='vertical']) ::slotted(:not([slot])){margin:var(--toolbar-item-gap) 0}:host([orientation='vertical']){display:inline-flex;flex-direction:column}.start,.end{display:flex;align-items:center}.end{margin-inline-start:auto}.start__hidden,.end__hidden{display:none}::slotted(svg){${/* Glyph size is temporary - replace when adaptive typography is figured out */''}\n      width:16px;height:16px}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        :host(:${focusVisible}){outline-color:${SystemColors.Highlight};color:${SystemColors.ButtonText};forced-color-adjust:none}`));\n\n/**\r\n * The Fluent toolbar class\r\n * @internal\r\n */\nclass Toolbar extends Toolbar$1 {}\n/**\r\n * The Fluent Toolbar Custom Element. Implements {@link @microsoft/fast-foundation#Toolbar},\r\n * {@link @microsoft/fast-foundation#toolbarTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-toolbar\\>\r\n */\nconst fluentToolbar = Toolbar.compose({\n  baseName: 'toolbar',\n  baseClass: Toolbar$1,\n  template: toolbarTemplate,\n  styles: toolbarStyles\n});\n\nconst tooltipStyles = (context, definition) => css`\n    :host{position:relative;contain:layout;overflow:visible;height:0;width:0;z-index:10000}.tooltip{box-sizing:border-box;border-radius:calc(${controlCornerRadius} * 1px);border:calc(${strokeWidth} * 1px) solid ${neutralStrokeLayerRest};background:${fillColor};color:${neutralForegroundRest};padding:4px 12px;height:fit-content;width:fit-content;${typeRampBase}\n      white-space:nowrap;box-shadow:${elevationShadowTooltip}}${context.tagFor(AnchoredRegion)}{display:flex;justify-content:center;align-items:center;overflow:visible;flex-direction:row}${context.tagFor(AnchoredRegion)}.right,${context.tagFor(AnchoredRegion)}.left{flex-direction:column}${context.tagFor(AnchoredRegion)}.top .tooltip::after,${context.tagFor(AnchoredRegion)}.bottom .tooltip::after,${context.tagFor(AnchoredRegion)}.left .tooltip::after,${context.tagFor(AnchoredRegion)}.right .tooltip::after{content:'';width:12px;height:12px;background:${fillColor};border-top:calc(${strokeWidth} * 1px) solid ${neutralStrokeLayerRest};border-left:calc(${strokeWidth} * 1px) solid ${neutralStrokeLayerRest};position:absolute}${context.tagFor(AnchoredRegion)}.top .tooltip::after{transform:translateX(-50%) rotate(225deg);bottom:5px;left:50%}${context.tagFor(AnchoredRegion)}.top .tooltip{margin-bottom:12px}${context.tagFor(AnchoredRegion)}.bottom .tooltip::after{transform:translateX(-50%) rotate(45deg);top:5px;left:50%}${context.tagFor(AnchoredRegion)}.bottom .tooltip{margin-top:12px}${context.tagFor(AnchoredRegion)}.left .tooltip::after{transform:translateY(-50%) rotate(135deg);top:50%;right:5px}${context.tagFor(AnchoredRegion)}.left .tooltip{margin-right:12px}${context.tagFor(AnchoredRegion)}.right .tooltip::after{transform:translateY(-50%) rotate(-45deg);top:50%;left:5px}${context.tagFor(AnchoredRegion)}.right .tooltip{margin-left:12px}`.withBehaviors(forcedColorsStylesheetBehavior(css`\n        :host([disabled]){opacity:1}${context.tagFor(AnchoredRegion)}.top .tooltip::after,${context.tagFor(AnchoredRegion)}.bottom .tooltip::after,${context.tagFor(AnchoredRegion)}.left .tooltip::after,${context.tagFor(AnchoredRegion)}.right .tooltip::after{content:'';width:unset;height:unset}`));\n\n/**\r\n * The Fluent tooltip class\r\n * @internal\r\n */\nclass Tooltip extends Tooltip$1 {\n  /**\r\n   * @internal\r\n   */\n  connectedCallback() {\n    super.connectedCallback();\n    fillColor.setValueFor(this, neutralLayerFloating);\n  }\n}\n/**\r\n * The Fluent Tooltip Custom Element. Implements {@link @microsoft/fast-foundation#Tooltip},\r\n * {@link @microsoft/fast-foundation#tooltipTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-tooltip\\>\r\n */\nconst fluentTooltip = Tooltip.compose({\n  baseName: 'tooltip',\n  baseClass: Tooltip$1,\n  template: tooltipTemplate,\n  styles: tooltipStyles\n});\n\nconst treeViewStyles$1 = (context, definition) => css`\n  :host([hidden]){display:none}${display('flex')} :host{flex-direction:column;align-items:stretch;min-width:fit-content;font-size:0}`;\n\n/**\r\n * The Fluent tree view Custom Element. Implements, {@link @microsoft/fast-foundation#TreeView}\r\n * {@link @microsoft/fast-foundation#treeViewTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-tree-view\\>\r\n *\r\n */\nconst fluentTreeView = TreeView.compose({\n  baseName: 'tree-view',\n  template: treeViewTemplate,\n  styles: treeViewStyles$1\n});\n/**\r\n * Styles for TreeView\r\n * @public\r\n */\nconst treeViewStyles = treeViewStyles$1;\n\nconst ltr = css`\n  .expand-collapse-button svg{transform:rotate(0deg)}:host(.nested) .expand-collapse-button{left:var(--expand-collapse-button-nested-width,calc(${heightNumber} * -1px))}:host([selected])::after{left:calc(${focusStrokeWidth} * 1px)}:host([expanded]) > .positioning-region .expand-collapse-button svg{transform:rotate(90deg)}`;\nconst rtl = css`\n  .expand-collapse-button svg{transform:rotate(180deg)}:host(.nested) .expand-collapse-button{right:var(--expand-collapse-button-nested-width,calc(${heightNumber} * -1px))}:host([selected])::after{right:calc(${focusStrokeWidth} * 1px)}:host([expanded]) > .positioning-region .expand-collapse-button svg{transform:rotate(90deg)}`;\nconst expandCollapseButtonSize = cssPartial`((${baseHeightMultiplier} / 2) * ${designUnit}) + ((${designUnit} * ${density}) / 2)`;\nconst expandCollapseHover = DesignToken.create('tree-item-expand-collapse-hover').withDefault(target => {\n  const recipe = neutralFillStealthRecipe.getValueFor(target);\n  return recipe.evaluate(target, recipe.evaluate(target).hover).hover;\n});\nconst selectedExpandCollapseHover = DesignToken.create('tree-item-expand-collapse-selected-hover').withDefault(target => {\n  const baseRecipe = neutralFillSecondaryRecipe.getValueFor(target);\n  const buttonRecipe = neutralFillStealthRecipe.getValueFor(target);\n  return buttonRecipe.evaluate(target, baseRecipe.evaluate(target).rest).hover;\n});\nconst treeItemStyles$1 = (context, definition) => css`\n    ${display('block')} :host{contain:content;position:relative;outline:none;color:${neutralForegroundRest};fill:currentcolor;cursor:pointer;font-family:${bodyFont};--expand-collapse-button-size:calc(${heightNumber} * 1px);--tree-item-nested-width:0}.positioning-region{display:flex;position:relative;box-sizing:border-box;background:${neutralFillStealthRest};border:calc(${strokeWidth} * 1px) solid transparent;border-radius:calc(${controlCornerRadius} * 1px);height:calc((${heightNumber} + 1) * 1px)}:host(:${focusVisible}) .positioning-region{${focusTreatmentBase}}.positioning-region::before{content:'';display:block;width:var(--tree-item-nested-width);flex-shrink:0}:host(:not([disabled])) .positioning-region:hover{background:${neutralFillStealthHover}}:host(:not([disabled])) .positioning-region:active{background:${neutralFillStealthActive}}.content-region{display:inline-flex;align-items:center;white-space:nowrap;width:100%;height:calc(${heightNumber} * 1px);margin-inline-start:calc(${designUnit} * 2px + 8px);${typeRampBase}}.items{display:none;${\n/* Font size should be based off calc(1em + (design-unit + glyph-size-number) * 1px) -\r\n    update when density story is figured out */''} font-size:calc(1em + (${designUnit} + 16) * 1px)}.expand-collapse-button{background:none;border:none;border-radius:calc(${controlCornerRadius} * 1px);${\n/* Width and Height should be based off calc(glyph-size-number + (design-unit * 4) * 1px) -\r\n    update when density story is figured out */''} width:calc((${expandCollapseButtonSize} + (${designUnit} * 2)) * 1px);height:calc((${expandCollapseButtonSize} + (${designUnit} * 2)) * 1px);padding:0;display:flex;justify-content:center;align-items:center;cursor:pointer;margin:0 6px}.expand-collapse-button svg{transition:transform 0.1s linear;pointer-events:none}.start,.end{display:flex}.start{${\n/* need to swap out once we understand how horizontalSpacing will work */''} margin-inline-end:calc(${designUnit} * 2px + 2px)}.end{${\n/* need to swap out once we understand how horizontalSpacing will work */''} margin-inline-start:calc(${designUnit} * 2px + 2px)}:host(.expanded) > .items{display:block}:host([disabled]){opacity:${disabledOpacity};cursor:${disabledCursor}}:host(.nested) .content-region{position:relative;margin-inline-start:var(--expand-collapse-button-size)}:host(.nested) .expand-collapse-button{position:absolute}:host(.nested) .expand-collapse-button:hover{background:${expandCollapseHover}}:host(:not([disabled])[selected]) .positioning-region{background:${neutralFillSecondaryRest}}:host(:not([disabled])[selected]) .expand-collapse-button:hover{background:${selectedExpandCollapseHover}}:host([selected])::after{content:'';display:block;position:absolute;top:calc((${heightNumber} / 4) * 1px);width:3px;height:calc((${heightNumber} / 2) * 1px);${\n/* The french fry background needs to be calculated based on the selected background state for this control.\r\n    We currently have no way of changing that, so setting to accent-foreground-rest for the time being */''} background:${accentFillRest};border-radius:calc(${controlCornerRadius} * 1px)}::slotted(fluent-tree-item){--tree-item-nested-width:1em;--expand-collapse-button-nested-width:calc(${heightNumber} * -1px)}`.withBehaviors(new DirectionalStyleSheetBehavior(ltr, rtl), forcedColorsStylesheetBehavior(css`\n        :host{color:${SystemColors.ButtonText}}.positioning-region{border-color:${SystemColors.ButtonFace};background:${SystemColors.ButtonFace}}:host(:not([disabled])) .positioning-region:hover,:host(:not([disabled])) .positioning-region:active,:host(:not([disabled])[selected]) .positioning-region{background:${SystemColors.Highlight}}:host .positioning-region:hover .content-region,:host([selected]) .positioning-region .content-region{forced-color-adjust:none;color:${SystemColors.HighlightText}}:host([disabled][selected]) .positioning-region .content-region{color:${SystemColors.GrayText}}:host([selected])::after{background:${SystemColors.HighlightText}}:host(:${focusVisible}) .positioning-region{forced-color-adjust:none;outline-color:${SystemColors.ButtonFace}}:host([disabled]),:host([disabled]) .content-region,:host([disabled]) .positioning-region:hover .content-region{opacity:1;color:${SystemColors.GrayText}}:host(.nested) .expand-collapse-button:hover,:host(:not([disabled])[selected]) .expand-collapse-button:hover{background:${SystemColors.ButtonFace};fill:${SystemColors.ButtonText}}`));\n\n/**\r\n * The Fluent tree item Custom Element. Implements, {@link @microsoft/fast-foundation#TreeItem}\r\n * {@link @microsoft/fast-foundation#treeItemTemplate}\r\n *\r\n *\r\n * @public\r\n * @remarks\r\n * HTML Element: \\<fluent-tree-item\\>\r\n *\r\n */\nconst fluentTreeItem = TreeItem.compose({\n  baseName: 'tree-item',\n  template: treeItemTemplate,\n  styles: treeItemStyles$1,\n  expandCollapseGlyph: `\n    <svg width=\"12\" height=\"12\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path d=\"M4.65 2.15a.5.5 0 000 .7L7.79 6 4.65 9.15a.5.5 0 10.7.7l3.5-3.5a.5.5 0 000-.7l-3.5-3.5a.5.5 0 00-.7 0z\"/>\n    </svg>\n  `\n});\n/**\r\n * Styles for TreeItem\r\n * @public\r\n */\nconst treeItemStyles = treeItemStyles$1;\n\n/**\r\n * All Fluent UI Web Components\r\n * @public\r\n */\nconst allComponents = {\n  fluentAccordion,\n  fluentAccordionItem,\n  fluentAnchor,\n  fluentAnchoredRegion,\n  fluentBadge,\n  fluentBreadcrumb,\n  fluentBreadcrumbItem,\n  fluentButton,\n  fluentCalendar,\n  fluentCard,\n  fluentCheckbox,\n  fluentCombobox,\n  fluentDataGrid,\n  fluentDataGridCell,\n  fluentDataGridRow,\n  fluentDesignSystemProvider,\n  fluentDialog,\n  fluentDivider,\n  fluentFlipper,\n  fluentHorizontalScroll,\n  fluentListbox,\n  fluentOption,\n  fluentMenu,\n  fluentMenuItem,\n  fluentNumberField,\n  fluentProgress,\n  fluentProgressRing,\n  fluentRadio,\n  fluentRadioGroup,\n  fluentSearch,\n  fluentSelect,\n  fluentSkeleton,\n  fluentSlider,\n  fluentSliderLabel,\n  fluentSwitch,\n  fluentTabs,\n  fluentTab,\n  fluentTabPanel,\n  fluentTextArea,\n  fluentTextField,\n  fluentToolbar,\n  fluentTooltip,\n  fluentTreeView,\n  fluentTreeItem,\n  register(container, ...rest) {\n    if (!container) {\n      // preserve backward compatibility with code that loops through\n      // the values of this object and calls them as funcs with no args\n      return;\n    }\n    for (const key in this) {\n      if (key === 'register') {\n        continue;\n      }\n      this[key]().register(container, ...rest);\n    }\n  }\n};\n\n/**\r\n * Provides a design system for the specified element either by returning one that was\r\n * already created for that element or creating one.\r\n * @param element - The element to root the design system at. By default, this is the body.\r\n * @returns A Fluent Design System\r\n * @public\r\n */\nfunction provideFluentDesignSystem(element) {\n  return DesignSystem.getOrCreate(element).withPrefix('fluent');\n}\n\n// TODO: Is exporting Foundation still necessary with the updated API's?\n/**\r\n * The global Fluent Design System.\r\n * @remarks\r\n * Only available if the components are added through a script tag\r\n * rather than a module/build system.\r\n */\nconst FluentDesignSystem = provideFluentDesignSystem().register(allComponents);\n\nexport { AccentButtonStyles, Accordion, AccordionItem, Anchor, AnchoredRegion, Badge, Breadcrumb, BreadcrumbItem, Button, Card, Combobox, DataGrid, DataGridCell, DataGridRow, DesignSystemProvider, DesignToken, Dialog, DirectionalStyleSheetBehavior, Divider, Flipper, FluentDesignSystem, HorizontalScroll, HypertextStyles, LightweightButtonStyles, Listbox, Menu, MenuItem, NeutralButtonStyles, NumberField, OptionStyles, OutlineButtonStyles, PaletteRGB, Progress, ProgressRing, Radio, RadioGroup, RadioStyles, Search, Select, Skeleton, Slider, SliderLabel, StandardLuminance, StealthButtonStyles, SwatchRGB, Switch, Tab, TabPanel, Tabs, TextArea, TextField, Toolbar, Tooltip, TreeItem, TreeView, accentBaseColor, accentFillActive, accentFillActiveDelta, accentFillFocus, accentFillFocusDelta, accentFillHover, accentFillHoverDelta, accentFillRecipe, accentFillRest, accentFillRestDelta, accentForegroundActive, accentForegroundActiveDelta, accentForegroundCut, accentForegroundCutLarge, accentForegroundFocus, accentForegroundFocusDelta, accentForegroundHover, accentForegroundHoverDelta, accentForegroundRecipe, accentForegroundRest, accentForegroundRestDelta, accentPalette, accentStrokeControlActive, accentStrokeControlFocus, accentStrokeControlHover, accentStrokeControlRecipe, accentStrokeControlRest, accordionItemStyles, accordionStyles, allComponents, ambientShadow, anchorStyles, anchoredRegionStyles, badgeStyles, baseButtonStyles, baseHeightMultiplier, baseHorizontalSpacingMultiplier, baseInputStyles, baseLayerLuminance, bodyFont, breadcrumbItemStyles, breadcrumbStyles, buttonStyles, cardStyles, checkboxStyles, comboboxStyles, controlCornerRadius, cornerRadius, dataGridCellStyles, dataGridRowStyles, dataGridStyles, density, designUnit, dialogStyles, direction, directionalShadow, disabledOpacity, dividerStyles, elevatedCornerRadius, elevation, elevationShadowCardActive, elevationShadowCardActiveSize, elevationShadowCardFocus, elevationShadowCardFocusSize, elevationShadowCardHover, elevationShadowCardHoverSize, elevationShadowCardRest, elevationShadowCardRestSize, elevationShadowDialog, elevationShadowDialogSize, elevationShadowFlyout, elevationShadowFlyoutSize, elevationShadowRecipe, elevationShadowTooltip, elevationShadowTooltipSize, fillColor, flipperStyles, fluentAccordion, fluentAccordionItem, fluentAnchor, fluentAnchoredRegion, fluentBadge, fluentBreadcrumb, fluentBreadcrumbItem, fluentButton, fluentCalendar, fluentCard, fluentCheckbox, fluentCombobox, fluentDataGrid, fluentDataGridCell, fluentDataGridRow, fluentDesignSystemProvider, fluentDialog, fluentDivider, fluentFlipper, fluentHorizontalScroll, fluentListbox, fluentMenu, fluentMenuItem, fluentNumberField, fluentOption, fluentProgress, fluentProgressRing, fluentRadio, fluentRadioGroup, fluentSearch, fluentSelect, fluentSkeleton, fluentSlider, fluentSliderLabel, fluentSwitch, fluentTab, fluentTabPanel, fluentTabs, fluentTextArea, fluentTextField, fluentToolbar, fluentTooltip, fluentTreeItem, fluentTreeView, focusOutlineWidth, focusStrokeInner, focusStrokeInnerRecipe, focusStrokeOuter, focusStrokeOuterRecipe, focusStrokeWidth, focusTreatmentBase, focusTreatmentTight, fontWeight, foregroundOnAccentActive, foregroundOnAccentActiveLarge, foregroundOnAccentFocus, foregroundOnAccentFocusLarge, foregroundOnAccentHover, foregroundOnAccentHoverLarge, foregroundOnAccentLargeRecipe, foregroundOnAccentRecipe, foregroundOnAccentRest, foregroundOnAccentRestLarge, heightNumber, horizontalScrollStyles, inputFilledStyles, inputForcedColorStyles, inputOutlineStyles, inputStateStyles, isDark, layerCornerRadius, listboxStyles, menuItemStyles, menuStyles, neutralBaseColor, neutralContrastFillActive, neutralContrastFillActiveDelta, neutralContrastFillFocus, neutralContrastFillFocusDelta, neutralContrastFillHover, neutralContrastFillHoverDelta, neutralContrastFillRest, neutralContrastFillRestDelta, neutralDivider, neutralDividerRestDelta, neutralFillActive, neutralFillActiveDelta, neutralFillCard, neutralFillCardDelta, neutralFillFocus, neutralFillFocusDelta, neutralFillHover, neutralFillHoverDelta, neutralFillInputActive, neutralFillInputActiveDelta, neutralFillInputAltActive, neutralFillInputAltActiveDelta, neutralFillInputAltFocus, neutralFillInputAltFocusDelta, neutralFillInputAltHover, neutralFillInputAltHoverDelta, neutralFillInputAltRecipe, neutralFillInputAltRest, neutralFillInputAltRestDelta, neutralFillInputFocus, neutralFillInputFocusDelta, neutralFillInputHover, neutralFillInputHoverDelta, neutralFillInputRecipe, neutralFillInputRest, neutralFillInputRestDelta, neutralFillInverseActive, neutralFillInverseActiveDelta, neutralFillInverseFocus, neutralFillInverseFocusDelta, neutralFillInverseHover, neutralFillInverseHoverDelta, neutralFillInverseRecipe, neutralFillInverseRest, neutralFillInverseRestDelta, neutralFillLayerActive, neutralFillLayerActiveDelta, neutralFillLayerAltRecipe, neutralFillLayerAltRest, neutralFillLayerAltRestDelta, neutralFillLayerHover, neutralFillLayerHoverDelta, neutralFillLayerRecipe, neutralFillLayerRest, neutralFillLayerRestDelta, neutralFillRecipe, neutralFillRest, neutralFillRestDelta, neutralFillSecondaryActive, neutralFillSecondaryActiveDelta, neutralFillSecondaryFocus, neutralFillSecondaryFocusDelta, neutralFillSecondaryHover, neutralFillSecondaryHoverDelta, neutralFillSecondaryRecipe, neutralFillSecondaryRest, neutralFillSecondaryRestDelta, neutralFillStealthActive, neutralFillStealthActiveDelta, neutralFillStealthFocus, neutralFillStealthFocusDelta, neutralFillStealthHover, neutralFillStealthHoverDelta, neutralFillStealthRecipe, neutralFillStealthRest, neutralFillStealthRestDelta, neutralFillStrongActive, neutralFillStrongActiveDelta, neutralFillStrongFocus, neutralFillStrongFocusDelta, neutralFillStrongHover, neutralFillStrongHoverDelta, neutralFillStrongRecipe, neutralFillStrongRest, neutralFillStrongRestDelta, neutralFillToggleActive, neutralFillToggleActiveDelta, neutralFillToggleFocus, neutralFillToggleFocusDelta, neutralFillToggleHover, neutralFillToggleHoverDelta, neutralFillToggleRest, neutralFillToggleRestDelta, neutralFocus, neutralFocusInnerAccent, neutralForegroundActive, neutralForegroundFocus, neutralForegroundHint, neutralForegroundHintRecipe, neutralForegroundHover, neutralForegroundRecipe, neutralForegroundRest, neutralLayer1, neutralLayer1Recipe, neutralLayer2, neutralLayer2Recipe, neutralLayer3, neutralLayer3Recipe, neutralLayer4, neutralLayer4Recipe, neutralLayerCardContainer, neutralLayerCardContainerRecipe, neutralLayerFloating, neutralLayerFloatingRecipe, neutralLayerL1, neutralLayerL2, neutralLayerL3, neutralLayerL4, neutralOutlineActive, neutralOutlineFocus, neutralOutlineHover, neutralOutlineRest, neutralPalette, neutralStrokeActive, neutralStrokeActiveDelta, neutralStrokeControlActive, neutralStrokeControlActiveDelta, neutralStrokeControlFocus, neutralStrokeControlFocusDelta, neutralStrokeControlHover, neutralStrokeControlHoverDelta, neutralStrokeControlRecipe, neutralStrokeControlRest, neutralStrokeControlRestDelta, neutralStrokeDividerRecipe, neutralStrokeDividerRest, neutralStrokeDividerRestDelta, neutralStrokeFocus, neutralStrokeFocusDelta, neutralStrokeHover, neutralStrokeHoverDelta, neutralStrokeInputActive, neutralStrokeInputFocus, neutralStrokeInputHover, neutralStrokeInputRecipe, neutralStrokeInputRest, neutralStrokeLayerActive, neutralStrokeLayerActiveDelta, neutralStrokeLayerHover, neutralStrokeLayerHoverDelta, neutralStrokeLayerRecipe, neutralStrokeLayerRest, neutralStrokeLayerRestDelta, neutralStrokeRecipe, neutralStrokeRest, neutralStrokeRestDelta, neutralStrokeStrongActive, neutralStrokeStrongActiveDelta, neutralStrokeStrongFocus, neutralStrokeStrongFocusDelta, neutralStrokeStrongHover, neutralStrokeStrongHoverDelta, neutralStrokeStrongRecipe, neutralStrokeStrongRest, numberFieldStyles, outlineWidth, progressRingStyles, progressStyles, provideFluentDesignSystem, radioGroupStyles, searchStyles, searchTemplate, selectStyles, skeletonStyles, sliderLabelStyles, sliderStyles, strokeWidth, switchStyles, tabPanelStyles, tabStyles, tabsStyles, textAreaStyles, textFieldStyles, treeItemStyles, treeViewStyles, typeRampBase, typeRampBaseFontSize, typeRampBaseFontVariations, typeRampBaseLineHeight, typeRampMinus1, typeRampMinus1FontSize, typeRampMinus1FontVariations, typeRampMinus1LineHeight, typeRampMinus2, typeRampMinus2FontSize, typeRampMinus2FontVariations, typeRampMinus2LineHeight, typeRampPlus1, typeRampPlus1FontSize, typeRampPlus1FontVariations, typeRampPlus1LineHeight, typeRampPlus2, typeRampPlus2FontSize, typeRampPlus2FontVariations, typeRampPlus2LineHeight, typeRampPlus3, typeRampPlus3FontSize, typeRampPlus3FontVariations, typeRampPlus3LineHeight, typeRampPlus4, typeRampPlus4FontSize, typeRampPlus4FontVariations, typeRampPlus4LineHeight, typeRampPlus5, typeRampPlus5FontSize, typeRampPlus5FontVariations, typeRampPlus5LineHeight, typeRampPlus6, typeRampPlus6FontSize, typeRampPlus6FontVariations, typeRampPlus6LineHeight };\n", "/**\n * Ensures that an input number does not exceed a max value and is not less than a min value.\n * @param i - the number to clamp\n * @param min - the maximum (inclusive) value\n * @param max - the minimum (inclusive) value\n * @public\n */\nexport function clamp(i, min, max) {\n    if (isNaN(i) || i <= min) {\n        return min;\n    }\n    else if (i >= max) {\n        return max;\n    }\n    return i;\n}\n/**\n * Scales an input to a number between 0 and 1\n * @param i - a number between min and max\n * @param min - the max value\n * @param max - the min value\n * @public\n */\nexport function normalize(i, min, max) {\n    if (isNaN(i) || i <= min) {\n        return 0.0;\n    }\n    else if (i >= max) {\n        return 1.0;\n    }\n    return i / (max - min);\n}\n/**\n * Scales a number between 0 and 1\n * @param i - the number to denormalize\n * @param min - the min value\n * @param max - the max value\n * @public\n */\nexport function denormalize(i, min, max) {\n    if (isNaN(i)) {\n        return min;\n    }\n    return min + i * (max - min);\n}\n/**\n * Converts degrees to radians.\n * @param i - degrees\n * @public\n */\nexport function degreesToRadians(i) {\n    return i * (Math.PI / 180.0);\n}\n/**\n * Converts radians to degrees.\n * @param i - radians\n * @public\n */\nexport function radiansToDegrees(i) {\n    return i * (180.0 / Math.PI);\n}\n/**\n * Converts a number between 0 and 255 to a hex string.\n * @param i - the number to convert to a hex string\n * @public\n */\nexport function getHexStringForByte(i) {\n    const s = Math.round(clamp(i, 0.0, 255.0)).toString(16);\n    if (s.length === 1) {\n        return \"0\" + s;\n    }\n    return s;\n}\n/**\n * Linearly interpolate\n * @public\n */\nexport function lerp(i, min, max) {\n    if (isNaN(i) || i <= 0.0) {\n        return min;\n    }\n    else if (i >= 1.0) {\n        return max;\n    }\n    return min + i * (max - min);\n}\n/**\n * Linearly interpolate angles in degrees\n * @public\n */\nexport function lerpAnglesInDegrees(i, min, max) {\n    if (i <= 0.0) {\n        return min % 360.0;\n    }\n    else if (i >= 1.0) {\n        return max % 360.0;\n    }\n    const a = (min - max + 360.0) % 360.0;\n    const b = (max - min + 360.0) % 360.0;\n    if (a <= b) {\n        return (min - a * i + 360.0) % 360.0;\n    }\n    return (min + a * i + 360.0) % 360.0;\n}\nconst TwoPI = Math.PI * 2;\n/**\n * Linearly interpolate angles in radians\n * @public\n */\nexport function lerpAnglesInRadians(i, min, max) {\n    if (isNaN(i) || i <= 0.0) {\n        return min % TwoPI;\n    }\n    else if (i >= 1.0) {\n        return max % TwoPI;\n    }\n    const a = (min - max + TwoPI) % TwoPI;\n    const b = (max - min + TwoPI) % TwoPI;\n    if (a <= b) {\n        return (min - a * i + TwoPI) % TwoPI;\n    }\n    return (min + a * i + TwoPI) % TwoPI;\n}\n/**\n *\n * Will return infinity if i*10^(precision) overflows number\n * note that floating point rounding rules come into play here\n * so values that end up rounding on a .5 round to the nearest\n * even not always up so 2.5 rounds to 2\n * @param i - the number to round\n * @param precision - the precision to round to\n *\n * @public\n */\nexport function roundToPrecisionSmall(i, precision) {\n    const factor = Math.pow(10, precision);\n    return Math.round(i * factor) / factor;\n}\n", "import { clamp, denormalize, getHexStringForByte, roundToPrecisionSmall, } from \"./math-utilities.js\";\n/**\n * A RGBA color with 64 bit channels.\n *\n * @example\n * ```ts\n * new ColorRGBA64(1, 0, 0, 1) // red\n * ```\n * @public\n */\nexport class ColorRGBA64 {\n    /**\n     *\n     * @param red - the red value\n     * @param green - the green value\n     * @param blue - the blue value\n     * @param alpha - the alpha value\n     */\n    constructor(red, green, blue, alpha) {\n        this.r = red;\n        this.g = green;\n        this.b = blue;\n        this.a = typeof alpha === \"number\" && !isNaN(alpha) ? alpha : 1;\n    }\n    /**\n     * Construct a {@link ColorRGBA64} from a {@link ColorRGBA64Config}\n     * @param data - the config object\n     */\n    static fromObject(data) {\n        return data && !isNaN(data.r) && !isNaN(data.g) && !isNaN(data.b)\n            ? new ColorRGBA64(data.r, data.g, data.b, data.a)\n            : null;\n    }\n    /**\n     * Determines if one color is equal to another.\n     * @param rhs - the color to compare\n     */\n    equalValue(rhs) {\n        return (this.r === rhs.r && this.g === rhs.g && this.b === rhs.b && this.a === rhs.a);\n    }\n    /**\n     * Returns the color formatted as a string; #RRGGBB\n     */\n    toStringHexRGB() {\n        return \"#\" + [this.r, this.g, this.b].map(this.formatHexValue).join(\"\");\n    }\n    /**\n     * Returns the color formatted as a string; #RRGGBBAA\n     */\n    toStringHexRGBA() {\n        return this.toStringHexRGB() + this.formatHexValue(this.a);\n    }\n    /**\n     * Returns the color formatted as a string; #AARRGGBB\n     */\n    toStringHexARGB() {\n        return \"#\" + [this.a, this.r, this.g, this.b].map(this.formatHexValue).join(\"\");\n    }\n    /**\n     * Returns the color formatted as a string; \"rgb(0xRR, 0xGG, 0xBB)\"\n     */\n    toStringWebRGB() {\n        return `rgb(${Math.round(denormalize(this.r, 0.0, 255.0))},${Math.round(denormalize(this.g, 0.0, 255.0))},${Math.round(denormalize(this.b, 0.0, 255.0))})`;\n    }\n    /**\n     * Returns the color formatted as a string; \"rgba(0xRR, 0xGG, 0xBB, a)\"\n     * @remarks\n     * Note that this follows the convention of putting alpha in the range [0.0,1.0] while the other three channels are [0,255]\n     */\n    toStringWebRGBA() {\n        return `rgba(${Math.round(denormalize(this.r, 0.0, 255.0))},${Math.round(denormalize(this.g, 0.0, 255.0))},${Math.round(denormalize(this.b, 0.0, 255.0))},${clamp(this.a, 0, 1)})`;\n    }\n    /**\n     * Returns a new {@link ColorRGBA64} rounded to the provided precision\n     * @param precision - the precision to round to\n     */\n    roundToPrecision(precision) {\n        return new ColorRGBA64(roundToPrecisionSmall(this.r, precision), roundToPrecisionSmall(this.g, precision), roundToPrecisionSmall(this.b, precision), roundToPrecisionSmall(this.a, precision));\n    }\n    /**\n     * Returns a new {@link ColorRGBA64} with channel values clamped between 0 and 1.\n     */\n    clamp() {\n        return new ColorRGBA64(clamp(this.r, 0, 1), clamp(this.g, 0, 1), clamp(this.b, 0, 1), clamp(this.a, 0, 1));\n    }\n    /**\n     * Converts the {@link ColorRGBA64} to a {@link ColorRGBA64Config}.\n     */\n    toObject() {\n        return { r: this.r, g: this.g, b: this.b, a: this.a };\n    }\n    formatHexValue(value) {\n        return getHexStringForByte(denormalize(value, 0.0, 255.0));\n    }\n}\n", "import { ColorRGBA64 } from \"./color-rgba-64.js\";\nimport { normalize } from \"./math-utilities.js\";\nimport { namedColorsConfigs } from \"./named-colors.js\";\n// Matches rgb(R, G, B) where R, G, and B are integers [0 - 255]\nconst webRGBRegex = /^rgb\\(\\s*((?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|\\d{1,2})\\s*,\\s*){2}(?:25[0-5]|2[0-4]\\d|1\\d\\d|\\d{1,2})\\s*)\\)$/i;\n// Matches rgb(R, G, B, A) where R, G, and B are integers [0 - 255] and A is [0-1] floating\nconst webRGBARegex = /^rgba\\(\\s*((?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|\\d{1,2})\\s*,\\s*){3}(?:0|1|0?\\.\\d*)\\s*)\\)$/i;\n// Matches #RGB and #RRGGBB, where R, G, and B are [0-9] or [A-F]\nconst hexRGBRegex = /^#((?:[0-9a-f]{6}|[0-9a-f]{3}))$/i;\n// Matches #RGB and #RRGGBBAA, where R, G, B, and A are [0-9] or [A-F]\nconst hexRGBARegex = /^#((?:[0-9a-f]{8}|[0-9a-f]{4}))$/i;\n/**\n * Test if a color matches #RRGGBB or #RGB\n * @public\n */\nexport function isColorStringHexRGB(raw) {\n    return hexRGBRegex.test(raw);\n}\n/**\n * Test if a color matches #AARRGGBB or #ARGB\n * @public\n */\nexport function isColorStringHexARGB(raw) {\n    return hexRGBARegex.test(raw);\n}\n/**\n * Test if a color matches #RRGGBBAA or #RGBA\n * @public\n */\nexport function isColorStringHexRGBA(raw) {\n    return isColorStringHexARGB(raw); // No way to differentiate these two formats, so just use the same test\n}\n/**\n * Test if a color matches rgb(rr, gg, bb)\n * @public\n */\nexport function isColorStringWebRGB(raw) {\n    return webRGBRegex.test(raw);\n}\n/**\n * Test if a color matches rgba(rr, gg, bb, aa)\n *\n * @public\n */\nexport function isColorStringWebRGBA(raw) {\n    return webRGBARegex.test(raw);\n}\n/**\n * Tests whether a color is in {@link @microsoft/fast-colors#NamedColors}.\n * @param raw - the color name to test\n * @public\n */\nexport function isColorNamed(raw) {\n    return namedColorsConfigs.hasOwnProperty(raw);\n}\n/**\n * Converts a hexadecimal color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string in the form of \"#RRGGBB\" or \"#RGB\"\n * @example\n * ```ts\n * parseColorHexRGBA(\"#FF0000\");\n * parseColorHexRGBA(\"#F00\");\n * ```\n * @public\n */\nexport function parseColorHexRGB(raw) {\n    const result = hexRGBRegex.exec(raw);\n    if (result === null) {\n        return null;\n    }\n    let digits = result[1];\n    if (digits.length === 3) {\n        const r = digits.charAt(0);\n        const g = digits.charAt(1);\n        const b = digits.charAt(2);\n        digits = r.concat(r, g, g, b, b);\n    }\n    const rawInt = parseInt(digits, 16);\n    if (isNaN(rawInt)) {\n        return null;\n    }\n    // Note the use of >>> rather than >> as we want JS to manipulate these as unsigned numbers\n    return new ColorRGBA64(normalize((rawInt & 0xff0000) >>> 16, 0, 255), normalize((rawInt & 0x00ff00) >>> 8, 0, 255), normalize(rawInt & 0x0000ff, 0, 255), 1);\n}\n/**\n * Converts a hexadecimal color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string in the form of \"#AARRGGBB\" or \"#ARGB\"\n * @example\n * ```ts\n * parseColorHexRGBA(\"#AAFF0000\");\n * parseColorHexRGBA(\"#AF00\");\n * ```\n * @public\n */\nexport function parseColorHexARGB(raw) {\n    const result = hexRGBARegex.exec(raw);\n    if (result === null) {\n        return null;\n    }\n    let digits = result[1];\n    if (digits.length === 4) {\n        const a = digits.charAt(0);\n        const r = digits.charAt(1);\n        const g = digits.charAt(2);\n        const b = digits.charAt(3);\n        digits = a.concat(a, r, r, g, g, b, b);\n    }\n    const rawInt = parseInt(digits, 16);\n    if (isNaN(rawInt)) {\n        return null;\n    }\n    // Note the use of >>> rather than >> as we want JS to manipulate these as unsigned numbers\n    return new ColorRGBA64(normalize((rawInt & 0x00ff0000) >>> 16, 0, 255), normalize((rawInt & 0x0000ff00) >>> 8, 0, 255), normalize(rawInt & 0x000000ff, 0, 255), normalize((rawInt & 0xff000000) >>> 24, 0, 255));\n}\n/**\n * Converts a hexadecimal color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string in the form of \"#RRGGBBAA\" or \"#RGBA\"\n * @example\n * ```ts\n * parseColorHexRGBA(\"#FF0000AA\");\n * parseColorHexRGBA(\"#F00A\");\n * ```\n * @public\n */\nexport function parseColorHexRGBA(raw) {\n    const result = hexRGBARegex.exec(raw);\n    if (result === null) {\n        return null;\n    }\n    let digits = result[1];\n    if (digits.length === 4) {\n        const r = digits.charAt(0);\n        const g = digits.charAt(1);\n        const b = digits.charAt(2);\n        const a = digits.charAt(3);\n        digits = r.concat(r, g, g, b, b, a, a);\n    }\n    const rawInt = parseInt(digits, 16);\n    if (isNaN(rawInt)) {\n        return null;\n    }\n    // Note the use of >>> rather than >> as we want JS to manipulate these as unsigned numbers\n    return new ColorRGBA64(normalize((rawInt & 0xff000000) >>> 24, 0, 255), normalize((rawInt & 0x00ff0000) >>> 16, 0, 255), normalize((rawInt & 0x0000ff00) >>> 8, 0, 255), normalize(rawInt & 0x000000ff, 0, 255));\n}\n/**\n * Converts a rgb color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string format \"rgba(RR,GG,BB)\" where RR,GG,BB are [0,255]\n * @example\n * ```ts\n * parseColorWebRGB(\"rgba(255, 0, 0\");\n * ```\n * @public\n */\nexport function parseColorWebRGB(raw) {\n    const result = webRGBRegex.exec(raw);\n    if (result === null) {\n        return null;\n    }\n    const split = result[1].split(\",\");\n    return new ColorRGBA64(normalize(Number(split[0]), 0, 255), normalize(Number(split[1]), 0, 255), normalize(Number(split[2]), 0, 255), 1);\n}\n/**\n * Converts a rgba color string to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a color string format \"rgba(RR,GG,BB,a)\" where RR,GG,BB are [0,255] and a is [0,1]\n * @example\n * ```ts\n * parseColorWebRGBA(\"rgba(255, 0, 0, 1\");\n * ```\n * @public\n */\nexport function parseColorWebRGBA(raw) {\n    const result = webRGBARegex.exec(raw);\n    if (result === null) {\n        return null;\n    }\n    const split = result[1].split(\",\");\n    if (split.length === 4) {\n        return new ColorRGBA64(normalize(Number(split[0]), 0, 255), normalize(Number(split[1]), 0, 255), normalize(Number(split[2]), 0, 255), Number(split[3]));\n    }\n    return null;\n}\n/**\n * Converts a named color to a {@link @microsoft/fast-colors#ColorRGBA64}.\n * @param raw - a {@link https://www.w3schools.com/colors/colors_names.asp | CSS color name}.\n * @example\n * ```ts\n * parseColorNamed(\"red\");\n * ```\n * @public\n */\nexport function parseColorNamed(raw) {\n    // const rawLower: typeof raw =  raw.toLowerCase() : raw.toString();\n    const config = namedColorsConfigs[raw.toLowerCase()];\n    return config\n        ? new ColorRGBA64(config.r, config.g, config.b, config.hasOwnProperty(\"a\") ? config.a : void 0)\n        : null;\n}\n/**\n *\n  Expects any of the following and attempts to determine which is being used\n * #RRGGBB, #AARRGGBB, rgb(RR,GG,BB) rgba(RR,GG,BB,a),\n * or any of the {@link https://www.w3schools.com/colors/colors_names.asp | CSS color names}.\n * @param raw - the color string to parse\n * @public\n */\nexport function parseColor(raw) {\n    const rawLower = raw.toLowerCase();\n    return isColorStringHexRGB(rawLower)\n        ? parseColorHexRGB(rawLower)\n        : isColorStringHexRGBA(rawLower)\n            ? parseColorHexARGB(rawLower)\n            : isColorStringWebRGB(rawLower)\n                ? parseColorWebRGB(rawLower)\n                : isColorStringWebRGBA(rawLower)\n                    ? parseColorWebRGBA(rawLower)\n                    : isColorNamed(rawLower)\n                        ? parseColorNamed(rawLower)\n                        : null;\n}\n", "\uFEFFfunction fireEvent(element: HTMLElement, eventName: string, detail: any) {\r\n  const event = new CustomEvent(eventName, { detail, bubbles: true, cancelable: true })\r\n  return element.dispatchEvent(event);\r\n}\r\n\r\nconst styleString = `\r\n    :host{ display: grid; }\r\n    :host([resizing]){ user-select: none; }\r\n    :host([resizing][direction=row]){ cursor: col-resize; }\r\n    :host([direction=row]) { grid-template-columns: var(--first-size, 1fr) max-content var(--second-size, 1fr); }\r\n    :host([direction=row]) #median { grid-column: 2 / 3; }\r\n    :host([direction=row]) #median:hover { cursor: col-resize; }\r\n    :host([direction=row]) #median span[part=\"handle\"] { height: 16px; margin: 2px 0; }\r\n    :host([direction=row]) #slot1 { grid-column: 1 / 2; grid-row: 1 / 1; }\r\n    :host([direction=row]) #slot2 { grid-column: 3 / 4; grid-row: 1 / 1; }\r\n\r\n    :host([resizing][direction=col]){ cursor: row-resize; }\r\n    :host([direction=column]) { grid-template-rows: var(--first-size, 1fr) max-content var(--second-size, 1fr); }\r\n    :host([direction=column]) #median { grid-row: 2 / 3; }\r\n    :host([direction=column]) #median:hover { cursor: row-resize; }\r\n    :host([direction=column]) #median span[part=\"handle\"] { width: 16px; margin: 0 2px; }\r\n    :host([direction=column]) #slot1 { grid-row: 1 / 2; grid-column: 1 / 1; }\r\n    :host([direction=column]) #slot2 { grid-row: 3 / 4; grid-column: 1 / 1; }\r\n\r\n    #median { background: var(--neutral-stroke-rest); display: inline-flex; align-items:center; justify-content: center; }\r\n    #median:hover { background: var(--neutral-stroke-hover); }\r\n    #median:active { background: var(--neutral-stroke-active); }\r\n    #median:focus { background: var(--neutral-stroke-focus); }\r\n\r\n    #median span[part=\"handle\"] {  border: 1px solid var(--neutral-stroke-strong-rest); border-radius: 1px; }\r\n\r\n    ::slotted(*) { overflow: auto; }\r\n\r\n    :host([collapsed]) { grid-template-columns: 1fr !important; grid-template-rows: none !important; }\r\n    :host([collapsed]) #median { display: none; }\r\n    :host([collapsed]) #slot2 { display: none; }\r\n\r\n    :host([no-barhandle]) #median span[part=\"handle\"] { display: none; }\r\n`;\r\n\r\nconst template = `\r\n    <slot id=\"slot1\" name=\"1\"></slot>\r\n    <div id=\"median\" part=\"median\">\r\n        <span part=\"handle\"></span>\r\n    </div>\r\n    <slot id=\"slot2\" name=\"2\"></slot>\r\n`;\r\n\r\nclass SplitPanels extends HTMLElement {\r\n  static observedAttributes = [\"direction\", \"collapsed\", \"barsize\", \"no-barhandle\", \"slot1minsize\", \"slot2minsize\"];\r\n  #direction = \"row\";\r\n  #isResizing = false;\r\n  #collapsed = false;\r\n  #barsize: number = 8;\r\n  #barhandle = true;\r\n  #slot1size: number = 0;\r\n  #slot2size: number = 0;\r\n  #slot1minsize: number = 0;\r\n  #slot2minsize: number = 0;\r\n  #totalsize: number = 0;\r\n  left: number = 0;\r\n  right: number = 0;\r\n  top: number = 0;\r\n  dom: any;\r\n\r\n  constructor() {\r\n    super();\r\n    this.bind(this);\r\n  }\r\n  /* TODO: Proper type for element */\r\n  bind(element: any) {\r\n    element.attachEvents = element.attachEvents.bind(element);\r\n    element.render = element.render.bind(element);\r\n    element.cacheDom = element.cacheDom.bind(element);\r\n    element.pointerdown = element.pointerdown.bind(element);\r\n    element.resizeDrag = element.resizeDrag.bind(element);\r\n  }\r\n  render() {\r\n    if (document.adoptedStyleSheets) {\r\n      const shadow = this.attachShadow({ mode: \"open\" });\r\n      const styleSheet = new CSSStyleSheet();\r\n      styleSheet.replaceSync(styleString);\r\n      shadow.adoptedStyleSheets = [...shadow.adoptedStyleSheets, styleSheet];\r\n      shadow.innerHTML = template;\r\n    }\r\n    else {\r\n      var style = document.createElement('style');\r\n      style.type = 'text/css';\r\n      style.innerHTML = styleString;\r\n      document.getElementsByTagName('head')[0].appendChild(style);\r\n    }\r\n\r\n    this.updateBarSizeStyle();\r\n  }\r\n  connectedCallback() {\r\n    this.render();\r\n    this.cacheDom();\r\n    this.attachEvents();\r\n  }\r\n  cacheDom() {\r\n    this.dom = {\r\n      median: this.shadowRoot!.querySelector(\"#median\")\r\n    };\r\n  }\r\n  attachEvents() {\r\n    this.dom!.median!.addEventListener(\"pointerdown\", this.pointerdown);\r\n  }\r\n  pointerdown(e: PointerEvent) {\r\n    this.isResizing = true;\r\n    const clientRect = this.getBoundingClientRect();\r\n    this.left = clientRect.x;\r\n    this.right = clientRect.right;\r\n    this.top = clientRect.y;\r\n    this.#totalsize = this.direction === \"row\" ? clientRect.width : clientRect.height;\r\n\r\n    this.addEventListener(\"pointermove\", this.resizeDrag);\r\n    this.addEventListener(\"pointerup\", this.pointerup);\r\n  }\r\n  pointerup() {\r\n    this.isResizing = false;\r\n    fireEvent(this, \"splitterresized\", { panel1size: this.#slot1size, panel2size: this.#slot2size });\r\n    this.removeEventListener(\"pointermove\", this.resizeDrag);\r\n    this.removeEventListener(\"pointerup\", this.pointerup);\r\n  }\r\n  resizeDrag(e: PointerEvent) {\r\n    if (this.direction === \"row\") {\r\n      const newMedianStart = (document.body.dir === '' || document.body.dir === 'ltr') ? (e.clientX - this.left) : (this.right - e.clientX);\r\n      const median = this.barsize;\r\n\r\n      this.#slot1size = Math.floor(newMedianStart - (median / 2));\r\n      this.#slot2size = Math.floor(this.clientWidth - this.#slot1size - (median / 2));\r\n\r\n      let min1size = this.ensurevalue(this.slot1minsize);\r\n      if (this.#slot1size < min1size) {\r\n        this.#slot1size = Math.floor(min1size);\r\n        this.#slot2size = Math.floor(this.clientWidth - this.#slot1size - (median / 2));\r\n      }\r\n      let min2size = this.ensurevalue(this.slot2minsize);\r\n      if (this.#slot2size < min2size) {\r\n        this.#slot2size = Math.floor(min2size);\r\n        this.#slot1size = Math.floor(this.clientWidth - this.#slot2size - (median / 2));\r\n      }\r\n\r\n      const totalSize = this.#slot1size + this.#slot2size - median;\r\n      let slot1fraction = (this.#slot1size / totalSize).toFixed(2);\r\n      let slot2fraction = (this.#slot2size / totalSize).toFixed(2);\r\n      this.style.gridTemplateColumns = `${slot1fraction}fr ${median}px ${slot2fraction}fr`;\r\n    }\r\n    if (this.direction === \"column\") {\r\n      const newMedianTop = e.clientY - this.top;\r\n      const median = this.barsize;\r\n\r\n      this.#slot1size = Math.floor(newMedianTop - (median / 2));\r\n      this.#slot2size = Math.floor(this.clientHeight - this.#slot1size - (median / 2));\r\n\r\n      let min1size = this.ensurevalue(this.slot1minsize);\r\n      if (this.#slot1size < min1size) {\r\n        this.#slot1size = Math.floor(min1size);\r\n        this.#slot2size = Math.floor(this.clientHeight - this.#slot1size - (median / 2));\r\n      }\r\n      let min2size = this.ensurevalue(this.slot2minsize);\r\n      if (this.#slot2size < min2size) {\r\n        this.#slot2size = Math.floor(min2size);\r\n        this.#slot1size = Math.floor(this.clientHeight - this.#slot2size - (median / 2));\r\n      }\r\n\r\n      const totalSize = this.#slot1size + this.#slot2size - median;\r\n      let slot1fraction = (this.#slot1size / totalSize).toFixed(2);\r\n      let slot2fraction = (this.#slot2size / totalSize).toFixed(2);\r\n\r\n      this.style.gridTemplateRows = `${slot1fraction}fr ${median}px ${slot2fraction}fr`;\r\n    }\r\n  }\r\n  updateBarSizeStyle() {\r\n    let median: HTMLElement | null | undefined = this.shadowRoot?.querySelector('#median');\r\n\r\n    if (median && median.style) {\r\n      if (this.direction === \"row\") {\r\n        median.style.inlineSize = this.barsize + 'px';\r\n        median.style.blockSize = \"\";\r\n      }\r\n      else {\r\n        median.style.blockSize = this.barsize + 'px';\r\n        median.style.inlineSize = \"\";\r\n      }\r\n    }\r\n  }\r\n  attributeChangedCallback(name: string, oldValue: any, newValue: any) {\r\n    if (newValue != oldValue) {\r\n      (this as any as DOMStringMap)[name] = newValue;\r\n    }\r\n  }\r\n  ensurevalue(value: string | number | any) {\r\n    if (!value)\r\n      return 0;\r\n\r\n    value = value.trim().toLowerCase();\r\n\r\n    if (value.endsWith(\"%\"))\r\n      return this.#totalsize * parseFloat(value) / 100;\r\n\r\n    if (value.endsWith(\"px\"))\r\n      return parseFloat(value);\r\n\r\n    if (value.endsWith(\"fr\"))\r\n      return this.#totalsize * parseFloat(value)\r\n\r\n    return 0;\r\n  }\r\n\r\n  set isResizing(value) {\r\n    this.#isResizing = value;\r\n    if (value) {\r\n      this.setAttribute(\"resizing\", \"\");\r\n    } else {\r\n      this.style.userSelect = \"\";\r\n      this.style.cursor = \"\";\r\n      this.removeAttribute(\"resizing\");\r\n    }\r\n  }\r\n  get isResizing() {\r\n    return this.#isResizing;\r\n  }\r\n  set direction(value) {\r\n    this.#direction = value;\r\n    this.setAttribute(\"direction\", value);\r\n    this.style.gridTemplateRows = \"\";\r\n    this.style.gridTemplateColumns = \"\";\r\n    this.updateBarSizeStyle();\r\n  }\r\n  get direction() {\r\n    return this.#direction;\r\n  }\r\n  set collapsed(value) {\r\n    const realValue = value !== null && value !== undefined && value !== false;\r\n    if (this.#collapsed !== realValue) {\r\n      this.#collapsed = realValue;\r\n      if (this.#collapsed) {\r\n        this.setAttribute(\"collapsed\", \"\");\r\n      } else {\r\n        this.removeAttribute(\"collapsed\");\r\n      }\r\n      fireEvent(this, \"splittercollapsed\", { collapsed: this.#collapsed });\r\n    }\r\n  }\r\n  get collapsed() {\r\n    return this.#collapsed;\r\n  }\r\n\r\n  set slot1minsize(value) {\r\n    this.#slot1minsize = value ?? 0;\r\n  }\r\n  get slot1minsize() {\r\n    return this.#slot1minsize;\r\n  }\r\n\r\n  set slot2minsize(value) {\r\n    this.#slot2minsize = value ?? 0;\r\n  }\r\n  get slot2minsize() {\r\n    return this.#slot2minsize;\r\n  }\r\n  set barsize(value) {\r\n    this.#barsize = value;\r\n    this.updateBarSizeStyle();\r\n  }\r\n  get barsize() {\r\n    return this.#barsize;\r\n  }\r\n\r\n  set barhandle(value) {\r\n    const realValue = value !== null && value !== undefined && value !== false;\r\n    if (this.#barhandle !== realValue) {\r\n      this.#barhandle = realValue;\r\n      if (this.#barhandle) {\r\n        this.removeAttribute(\"no-barhandle\");\r\n      } else {\r\n        this.setAttribute(\"no-barhandle\", \"\");\r\n\r\n      }\r\n    }\r\n  }\r\n  get barhandle() {\r\n    return this.#barhandle;\r\n  }\r\n\r\n}\r\n\r\nexport { SplitPanels };\r\n", "class ColorsUtils {\r\n\r\n  public static isSystemDark(): boolean {\r\n    return (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches);\r\n  }\r\n\r\n  /**\r\n   * See https://github.com/microsoft/fast -> packages/utilities/fast-colors/src/parse-color.ts\r\n   */\r\n  public static parseColorHexRGB(raw: string | null): ColorRGB | null {\r\n    // Matches #RGB and #RRGGBB, where R, G, and B are [0-9] or [A-F]\r\n    const hexRGBRegex: RegExp = /^#((?:[0-9a-f]{6}|[0-9a-f]{3}))$/i;\r\n    const result: string[] | null = hexRGBRegex.exec(raw ?? ColorsUtils.DEFAULT_COLOR);\r\n\r\n    if (result === null) {\r\n      return null;\r\n    }\r\n\r\n    let digits: string = result[1];\r\n\r\n    if (digits.length === 3) {\r\n      const r: string = digits.charAt(0);\r\n      const g: string = digits.charAt(1);\r\n      const b: string = digits.charAt(2);\r\n\r\n      digits = r.concat(r, g, g, b, b);\r\n    }\r\n\r\n    const rawInt: number = parseInt(digits, 16);\r\n\r\n    if (isNaN(rawInt)) {\r\n      return null;\r\n    }\r\n\r\n    return new ColorRGB(\r\n      this.normalized((rawInt & 0xff0000) >>> 16, 0, 255),\r\n      this.normalized((rawInt & 0x00ff00) >>> 8, 0, 255),\r\n      this.normalized(rawInt & 0x0000ff, 0, 255),\r\n    );\r\n  }\r\n\r\n  /**\r\n   * Scales an input to a number between 0 and 1\r\n   */\r\n  public static normalized(i: number, min: number, max: number): number {\r\n    if (isNaN(i) || i <= min) {\r\n      return 0.0;\r\n    } else if (i >= max) {\r\n      return 1.0;\r\n    }\r\n    return i / (max - min);\r\n  }\r\n\r\n  /**\r\n   * Convert to named color to an equivalent Hex color\r\n   * @param name Office color name\r\n   * @returns Hexadecimal color\r\n   */\r\n  public static getHexColor(name: string | null): string {\r\n    return this.NAMED_COLORS.find(item => item.App.toLowerCase() === name?.toLowerCase())?.Color ?? ColorsUtils.DEFAULT_COLOR;\r\n  }\r\n\r\n  static DEFAULT_COLOR = \"#0078D4\";\r\n\r\n  /**\r\n   * List of Office colors\r\n  */\r\n  static NAMED_COLORS = [\r\n    { App: \"Access\", Color: \"#a4373a\" },\r\n    { App: \"Booking\", Color: \"#00a99d\" },\r\n    { App: \"Exchange\", Color: \"#0078d4\" },\r\n    { App: \"Excel\", Color: \"#217346\" },\r\n    { App: \"GroupMe\", Color: \"#00bcf2\" },\r\n    { App: \"Office\", Color: \"#d83b01\" },\r\n    { App: \"OneDrive\", Color: \"#0078d4\" },\r\n    { App: \"OneNote\", Color: \"#7719aa\" },\r\n    { App: \"Outlook\", Color: \"#0f6cbd\" },\r\n    { App: \"Planner\", Color: \"#31752f\" },\r\n    { App: \"PowerApps\", Color: \"#742774\" },\r\n    { App: \"PowerBI\", Color: \"#f2c811\" },\r\n    { App: \"PowerPoint\", Color: \"#b7472a\" },\r\n    { App: \"Project\", Color: \"#31752f\" },\r\n    { App: \"Publisher\", Color: \"#077568\" },\r\n    { App: \"SharePoint\", Color: \"#0078d4\" },\r\n    { App: \"Skype\", Color: \"#0078d4\" },\r\n    { App: \"Stream\", Color: \"#bc1948\" },\r\n    { App: \"Sway\", Color: \"#008272\" },\r\n    { App: \"Teams\", Color: \"#6264a7\" },\r\n    { App: \"Visio\", Color: \"#3955a3\" },\r\n    { App: \"Windows\", Color: \"#0078d4\" },\r\n    { App: \"Word\", Color: \"#2b579a\" },\r\n    { App: \"Yamme\", Color: \"#106ebe\" },\r\n    { App: \"Word\", Color: \"\" },\r\n  ];\r\n}\r\n\r\nclass ColorRGB {\r\n  constructor(red: number, green: number, blue: number) {\r\n    this.r = red;\r\n    this.g = green;\r\n    this.b = blue;\r\n  }\r\n\r\n  public readonly r: number;\r\n  public readonly g: number;\r\n  public readonly b: number;\r\n}\r\n\r\nexport { ColorsUtils };\r\n", "import { DesignTheme } from \"../DesignTheme\";\r\n\r\nclass ThemeStorage {\r\n\r\n  private _designTheme: DesignTheme\r\n\r\n  /**\r\n   * Initializes a new instance of ThemeStorage\r\n   * @param designTheme DesignTheme component\r\n   */\r\n  constructor(designTheme: DesignTheme) {\r\n    this._designTheme = designTheme;\r\n  }\r\n\r\n  /**\r\n   * Gets the value of the DesignTheme storageName attribute.\r\n   */\r\n  get storageName(): string | null {\r\n    return this._designTheme.storageName;\r\n  }\r\n\r\n\r\n  public updateLocalStorage(mode: string | null, primaryColor: string | null): void {\r\n\r\n    // If LocalStorage is not available, do nothing.\r\n    if (localStorage == null) {\r\n      return;\r\n    }\r\n\r\n    // Wait the component to be initialized\r\n    if (!this._designTheme._isInitialized) {\r\n      return;\r\n    }\r\n\r\n    // Check if storageName attribute is defined\r\n    if (this.storageName == null) {\r\n      return;\r\n    }\r\n\r\n    // Save to the localstorage\r\n    localStorage.setItem(this.storageName, JSON.stringify({\r\n      mode: ThemeStorage.getValueOrNull(mode),\r\n      primaryColor: ThemeStorage.getValueOrNull(primaryColor),\r\n    }));\r\n  }\r\n\r\n  public readLocalStorage(): { mode: string | null, primaryColor: string | null } | null {\r\n\r\n    // If LocalStorage is not available, do nothing.\r\n    if (localStorage == null) {\r\n      return null;\r\n    }\r\n\r\n    // Check if storageName attribute is defined\r\n    if (this.storageName == null) {\r\n      return null;\r\n    }\r\n\r\n    // Check if localstorage exists\r\n    const storageJson = localStorage.getItem(this.storageName);\r\n\r\n    if (storageJson == null) {\r\n      return null;\r\n    }\r\n\r\n    // Read the localstorage\r\n    const storageItems = JSON.parse(storageJson);\r\n\r\n    return {\r\n      mode: ThemeStorage.getValueOrNull(storageItems?.mode),\r\n      primaryColor: ThemeStorage.getValueOrNull(storageItems?.primaryColor),\r\n    }\r\n  }\r\n\r\n  public clearLocalStorage(): void {\r\n    // If LocalStorage is not available, do nothing.\r\n      if (localStorage == null) {\r\n        return;\r\n      }\r\n  \r\n      // Check if storageName attribute is defined\r\n      if (this.storageName == null) {\r\n        return;\r\n      }\r\n  \r\n      // Clear the localstorage\r\n      localStorage.removeItem(this.storageName);\r\n  }\r\n\r\n  /**\r\n * Return null or the specified value\r\n * @param value\r\n * @returns\r\n */\r\n  public static getValueOrNull(value: any) {\r\n    return value == null || value == undefined || value == \"null\" || value == \"undefined\" ? null : value;\r\n  }\r\n}\r\n\r\nexport { ThemeStorage };\r\n", "import { DesignTheme } from \"../DesignTheme\";\r\n\r\nclass Synchronization {\r\n\r\n  private _designTheme: DesignTheme\r\n\r\n  /**\r\n   * Initializes a new instance of Synchronization\r\n   * @param designTheme DesignTheme component\r\n   */\r\n  constructor(designTheme: DesignTheme) {\r\n    this._designTheme = designTheme;\r\n  }\r\n\r\n  /**\r\n   * Synchronize the attribute value with an external value (from another component).\r\n   * @param id\r\n   * @param name\r\n   * @param value\r\n   */\r\n  public synchronizeAttribute = (id: string, name: string, value: string | null): void => {\r\n\r\n    if (this._designTheme.id === id) {\r\n      return;\r\n    }\r\n\r\n    this._designTheme.dispatchAttributeChanged(name, this._designTheme.getAttribute(name), value);\r\n    this._designTheme.updateAttribute(name, value);\r\n  }\r\n\r\n  /**\r\n   * Start the attribute synchronization with other components.\r\n   * @param name\r\n   * @param value\r\n   */\r\n  public synchronizeOtherComponents(name: string, value: string | null) {\r\n\r\n    if (!this._designTheme._isInitialized) {\r\n      return;\r\n    }\r\n\r\n    const components = document.querySelectorAll(`fluent-design-theme:not([id=\"${this._designTheme.id}\"])`);\r\n    for (let i = 0; i < components.length; i++) {\r\n      const component = components[i] as DesignTheme;\r\n      if (component.synchronization.synchronizeAttribute instanceof Function) {\r\n        setTimeout(component.synchronization.synchronizeAttribute, 0, this._designTheme.id, name, value);\r\n        //component.synchronization.synchronizeAttribute(this._designTheme.id, name, value);\r\n      }\r\n    }\r\n  }\r\n\r\n}\r\n\r\nexport { Synchronization };\r\n", "\uFEFF// ********************\r\n// https://learn.microsoft.com/en-us/fluent-ui/web-components/getting-started/styling\r\n// ********************\r\n\r\nimport { ColorsUtils } from \"./Design/ColorsUtils\";\r\nimport {\r\n  baseLayerLuminance,\r\n  StandardLuminance,\r\n  neutralBaseColor,\r\n  accentBaseColor,\r\n  SwatchRGB\r\n} from \"@fluentui/web-components/dist/web-components\";\r\nimport { ThemeStorage } from \"./Design/ThemeStorage\";\r\nimport { Synchronization } from \"./Design/Synchronization\";\r\n\r\nclass DesignTheme extends HTMLElement {\r\n\r\n  public _isInitialized: boolean = false;\r\n  private _themeStorage: ThemeStorage;\r\n  private _synchronization: Synchronization;\r\n\r\n  _isInternalChange = false;\r\n\r\n  constructor() {\r\n    super();\r\n    this._themeStorage = new ThemeStorage(this);\r\n    this._synchronization = new Synchronization(this);\r\n  }\r\n\r\n  /**\r\n   * Gets the ThemeStorage\r\n   */\r\n  get themeStorage(): ThemeStorage {\r\n    return this._themeStorage;\r\n  }\r\n\r\n  /**\r\n   * Gets the current mode (dark/light) attribute value.\r\n   */\r\n  get mode(): string | null {\r\n    return this.getAttribute(\"mode\");\r\n  }\r\n\r\n  /**\r\n   * Sets the current mode (dark/light) attribute value.\r\n   */\r\n  set mode(value: string | null) {\r\n    this.updateAttribute(\"mode\", value);\r\n\r\n    // console.log(` ** Set \"mode\" = \"${value}\"`)\r\n\r\n    switch (value?.toLowerCase()) {\r\n      // Dark mode - Luminance = 0.15\r\n      case \"dark\":\r\n        baseLayerLuminance.withDefault(StandardLuminance.DarkMode);\r\n        break;\r\n\r\n      // Light mode - Luminance = 0.98\r\n      case \"light\":\r\n        baseLayerLuminance.withDefault(StandardLuminance.LightMode);\r\n        break;\r\n\r\n      // System mode\r\n      default:\r\n        const isDark = window.matchMedia && window.matchMedia(\"(prefers-color-scheme: dark)\").matches;\r\n        if (isDark) {\r\n          baseLayerLuminance.withDefault(StandardLuminance.DarkMode);\r\n        }\r\n        else {\r\n          baseLayerLuminance.withDefault(StandardLuminance.LightMode);\r\n        }\r\n        break;\r\n    }\r\n\r\n    this._synchronization.synchronizeOtherComponents(\"mode\", value);\r\n  }\r\n\r\n  /**\r\n  * Gets the current color or office name attribute value.\r\n  * Access, Booking, Exchange, Excel, GroupMe, Office, OneDrive, OneNote, Outlook, \r\n  * Planner, PowerApps, PowerBI, PowerPoint, Project, Publisher, SharePoint, Skype, \r\n  * Stream, Sway, Teams, Visio, Windows, Word, Yammer\r\n  */\r\n  get primaryColor(): string | null {\r\n    return this.getAttribute(\"primary-color\");\r\n  }\r\n\r\n  /**\r\n   * Sets the current color or office name attribute value.\r\n   */\r\n  set primaryColor(value: string | null) {\r\n    this.updateAttribute(\"primary-color\", value);\r\n\r\n    // Convert the OfficeColor to an HEX color\r\n    const color = value == null || !value.startsWith(\"#\")\r\n      ? ColorsUtils.getHexColor(value)\r\n      : value;\r\n\r\n    // Apply the color\r\n    const rgb = ColorsUtils.parseColorHexRGB(color);\r\n    if (rgb != null) {\r\n      const swatch = SwatchRGB.from(rgb);\r\n      accentBaseColor.withDefault(swatch);\r\n    }\r\n\r\n    // Synchronization\r\n    this._synchronization.synchronizeOtherComponents(\"primary-color\", value);\r\n  }\r\n\r\n  /**\r\n  * Gets the current storage-name key, to persist the theme/color between sessions.\r\n  */\r\n  get storageName(): string | null {\r\n    return this.getAttribute(\"storage-name\");\r\n  }\r\n\r\n  /**\r\n   * Sets the current storage-name key, to persist the theme/color between sessions.\r\n   */\r\n  set storageName(value: string | null) {\r\n    this.updateAttribute(\"storage-name\", value);\r\n  }\r\n\r\n  /**\r\n  * Gets a reference to the Synchronization methods.\r\n  */\r\n  get synchronization(): Synchronization {\r\n    return this._synchronization;\r\n  }\r\n\r\n  // Custom element added to page.\r\n  connectedCallback() {\r\n\r\n    // console.log(` > Initialization ${this.id}`);\r\n\r\n    // Detect system theme changing\r\n    window.matchMedia(\"(prefers-color-scheme: dark)\")\r\n      .addEventListener(\"change\", this.colorSchemeListener);\r\n\r\n    // Default attribute values for existing components (if existing)\r\n    const existingComponent = document.querySelector(`fluent-design-theme:not([id=\"${this.id}\"])`);\r\n    if (existingComponent != null) {\r\n      const mode = ThemeStorage.getValueOrNull(existingComponent.getAttribute(\"mode\"));\r\n      const color = ThemeStorage.getValueOrNull(existingComponent.getAttribute(\"primary-color\"))\r\n\r\n      // Mode can be null in other components\r\n      this.attributeChangedCallback(\"mode\", this.mode, mode);\r\n\r\n      // Color cannot be null in other components\r\n      if (color != null) {\r\n        this.attributeChangedCallback(\"primary-color\", this.primaryColor, color);\r\n      }\r\n    }\r\n\r\n    // Load from LocalStorage\r\n    else if (this.storageName != null) {\r\n      const theme = this._themeStorage.readLocalStorage();\r\n\r\n      if (theme != null) {\r\n        this.attributeChangedCallback(\"mode\", this.mode, theme.mode);\r\n        this.attributeChangedCallback(\"primary-color\", this.primaryColor, theme.primaryColor);\r\n      }\r\n    }\r\n\r\n    this._isInitialized = true;\r\n\r\n    // Default System mode\r\n    if (this.mode == null) {\r\n      // Check the localstorage\r\n      const defaultMode = this._themeStorage.readLocalStorage()?.mode;\r\n\r\n      // ... not found => use the browser theme\r\n      if (defaultMode == null) {\r\n        this.colorSchemeListener(new MediaQueryListEvent(\"change\", { matches: ColorsUtils.isSystemDark() }));\r\n      }\r\n\r\n      // ... found => use this theme\r\n      else {\r\n        this.colorSchemeListener(new MediaQueryListEvent(\"change\", { matches: (defaultMode == \"dark\") }));\r\n      }\r\n    }\r\n\r\n    // console.log(` > Synchronization ${this.id}`);\r\n  }\r\n\r\n  // Custom element removed from page.\r\n  disconnectedCallback() {\r\n    this._isInitialized = false;\r\n\r\n    window.matchMedia(\"(prefers-color-scheme: dark)\")\r\n      .removeEventListener(\"change\", this.colorSchemeListener);\r\n  }\r\n\r\n  // Custom element moved to new page.\r\n  adoptedCallback() {\r\n  }\r\n\r\n  // Attributes to observe\r\n  static get observedAttributes() {\r\n    return [\"mode\", \"primary-color\", \"storage-name\"];\r\n  }\r\n\r\n  // Attributes has changed.\r\n  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\r\n\r\n    if (this._isInternalChange) {\r\n      return;\r\n    }\r\n\r\n    oldValue = ThemeStorage.getValueOrNull(oldValue);\r\n    newValue = ThemeStorage.getValueOrNull(newValue);\r\n\r\n    if (newValue == null) {\r\n      this.removeAttribute(name);\r\n    }\r\n\r\n    if (oldValue === newValue) {\r\n      return;\r\n    }\r\n\r\n    switch (name) {\r\n      case \"mode\":\r\n        this.dispatchAttributeChanged(name, oldValue, newValue);\r\n        this.mode = newValue;\r\n        break;\r\n\r\n      case \"primary-color\":\r\n        this.dispatchAttributeChanged(name, oldValue, newValue);\r\n        this.primaryColor = newValue;\r\n        break;\r\n\r\n      case \"storage-name\":\r\n        this.storageName = newValue;\r\n        break;\r\n    }\r\n  }\r\n\r\n  private colorSchemeListener = (e: MediaQueryListEvent) => {\r\n    if (!this._isInitialized) {\r\n      return;\r\n    }\r\n\r\n    const currentMode = this.getAttribute(\"mode\");\r\n\r\n    // Only if the DesignTheme.Mode = 'System' (null)\r\n    // If not, the dev already \"forced\" the mode to \"dark\" or \"light\"\r\n    if (currentMode == null) {\r\n\r\n      // console.log(` ** colorSchemeListener = \"${currentMode}\"`) \r\n\r\n      // Dark\r\n      if (e.matches) {\r\n        this.dispatchAttributeChanged(\"mode\", currentMode, \"system-dark\");\r\n        baseLayerLuminance.withDefault(StandardLuminance.DarkMode);\r\n      }\r\n\r\n      // Light\r\n      else {\r\n        this.dispatchAttributeChanged(\"mode\", currentMode, \"system-light\");\r\n        baseLayerLuminance.withDefault(StandardLuminance.LightMode);\r\n      }\r\n    }\r\n  }\r\n\r\n  public dispatchAttributeChanged(name: string, oldValue: string | null, newValue: string | null): void {\r\n    if (oldValue !== newValue) {\r\n\r\n      if (name === \"mode\") {\r\n        newValue = newValue ?? (ColorsUtils.isSystemDark() ? \"system-dark\" : \"system-light\");\r\n      }\r\n\r\n      this.dispatchEvent(\r\n        new CustomEvent(\"onchange\", {\r\n          bubbles: false,\r\n          detail: {\r\n            name: name,\r\n            oldValue: oldValue,\r\n            newValue: newValue,\r\n          },\r\n        }),\r\n      );\r\n    }\r\n  }\r\n\r\n  public updateAttribute(name: string, value: string | null): void {\r\n    this._isInternalChange = true;\r\n\r\n    if (this.getAttribute(name) != value) {\r\n      if (value) {\r\n        this.setAttribute(name, value);\r\n      } else {\r\n        this.removeAttribute(name);\r\n      }\r\n    }\r\n    if (this.storageName != null) {\r\n      this._themeStorage.updateLocalStorage(this.mode, this.primaryColor);\r\n    }\r\n\r\n    this._isInternalChange = false;\r\n  }\r\n}\r\n\r\nexport { DesignTheme };\r\n", "const pageScriptInfoBySrc = new Map();\r\nclass FluentPageScript extends HTMLElement {\r\n  static observedAttributes = ['src'];\r\n  src: string | null = null;\r\n\r\n  attributeChangedCallback(name: string | null, oldValue: string | null, newValue: string | null) {\r\n    if (name !== 'src') {\r\n      return;\r\n    }\r\n\r\n    this.src = newValue;\r\n    this.unregisterPageScriptElement(oldValue);\r\n    this.registerPageScriptElement(newValue);\r\n  }\r\n\r\n  disconnectedCallback() {\r\n    this.unregisterPageScriptElement(this.src);\r\n  }\r\n\r\n  registerPageScriptElement(src: string | null) {\r\n    if (!src) {\r\n      throw new Error('Must provide a non-empty value for the \"src\" attribute.');\r\n    }\r\n   \r\n    let pageScriptInfo = pageScriptInfoBySrc.get(src);\r\n\r\n    if (pageScriptInfo) {\r\n      pageScriptInfo.referenceCount++;\r\n    } else {\r\n      pageScriptInfo = { referenceCount: 1, module: null };\r\n      pageScriptInfoBySrc.set(src, pageScriptInfo);\r\n      this.initializePageScriptModule(src, pageScriptInfo);\r\n    }\r\n  }\r\n\r\n  unregisterPageScriptElement(src: string | null) {\r\n    if (!src) {\r\n      return;\r\n    }\r\n\r\n    const pageScriptInfo = pageScriptInfoBySrc.get(src);\r\n    if (!pageScriptInfo) {\r\n      return;\r\n    }\r\n\r\n    pageScriptInfo.referenceCount--;\r\n  }\r\n\r\n  async initializePageScriptModule(src: string, pageScriptInfo: any) {\r\n    if (src.startsWith(\"./\")) {\r\n      src = new URL(src.substring(2), document.baseURI).toString();\r\n    }\r\n\r\n    const module = await import(src);\r\n\r\n    if (pageScriptInfo.referenceCount <= 0) {\r\n      return;\r\n    }\r\n\r\n    pageScriptInfo.module = module;\r\n    module.onLoad?.();\r\n    module.onUpdate?.();\r\n  }\r\n}\r\n\r\nexport function onEnhancedLoad() {\r\n  for (const [src, { module, referenceCount }] of pageScriptInfoBySrc) {\r\n    if (referenceCount <= 0) {\r\n      module?.onDispose?.();\r\n      pageScriptInfoBySrc.delete(src);\r\n    }\r\n  }\r\n\r\n  for (const { module } of pageScriptInfoBySrc.values()) {\r\n    module?.onUpdate?.();\r\n  }\r\n}\r\n\r\nexport { FluentPageScript };\r\n", "export * from '@fluentui/web-components/dist/web-components'\r\nexport { parseColorHexRGB } from '@microsoft/fast-colors'\r\nimport { SplitPanels } from './SplitPanels'\r\nimport { DesignTheme } from './DesignTheme'\r\nimport { FluentPageScript, onEnhancedLoad } from './FluentPageScript'\r\n\r\ninterface Blazor {\r\n  registerCustomEventType: (\r\n    name: string,\r\n    options: CustomEventTypeOptions) => void;\r\n\r\n  theme: {\r\n    isSystemDark(): boolean,\r\n    isDarkMode(): boolean\r\n  }\r\n  addEventListener: (name: string, callback: (event: any) => void) => void;\r\n}\r\n\r\ninterface CustomEventTypeOptions {\r\n  browserEventName: string;\r\n  createEventArgs: (event: FluentUIEventType) => any;\r\n}\r\n\r\ninterface FluentUIEventType {\r\n  target: any;\r\n  detail: any;\r\n  _readOnly: any;\r\n  type: string;\r\n}\r\n\r\n\r\nvar styleSheet = new CSSStyleSheet();\r\n\r\nconst styles = `\r\nbody:has(.prevent-scroll) {\r\n    overflow: hidden;\r\n}\r\n:root {\r\n    --font-monospace: Consolas, \"Courier New\", \"Liberation Mono\", SFMono-Regular, Menlo, Monaco, monospace;\r\n    --success: #0E700E;\r\n    --warning: #E9835E;\r\n    --error: #BC2F32;\r\n    --info: #616161;\r\n    --presence-available: #13a10e;\r\n    --presence-away: #eaa300;\r\n    --presence-busy: #d13438;\r\n    --presence-dnd: #d13438;\r\n    --presence-offline: #adadad;\r\n    --presence-oof: #c239b3;\r\n    --presence-unknown: #d13438;\r\n    --highlight-bg: #fff3cd;\r\n}\r\n\r\nfluent-number-field.invalid,\r\n[role='checkbox'].invalid::part(control),\r\n[role='combobox'].invalid::part(control),\r\nfluent-combobox.invalid::part(control),\r\nfluent-text-area.invalid::part(control),\r\nfluent-text-field.invalid::part(root)\r\n{\r\n    outline: calc(var(--stroke-width) * 1px)  solid var(--error);\r\n}\r\n\r\n`;\r\n\r\nstyleSheet.replaceSync(styles);\r\n// document.adoptedStyleSheets.push(styleSheet);\r\ndocument.adoptedStyleSheets = [...document.adoptedStyleSheets, styleSheet];\r\n\r\nvar beforeStartCalled = false;\r\nvar afterStartedCalled = false;\r\n\r\n\r\nexport function afterWebStarted(blazor: any) {\r\n  if (!afterStartedCalled) {\r\n    afterStarted(blazor, 'web');\r\n  }\r\n}\r\n\r\nexport function beforeWebStart(options: any) {\r\n  if (!beforeStartCalled) {\r\n    beforeStart(options);\r\n  }\r\n}\r\n\r\nexport function beforeWebAssemblyStart(options: any) {\r\n  if (!beforeStartCalled) {\r\n    beforeStart(options);\r\n  }\r\n}\r\n\r\nexport function afterWebAssemblyStarted(blazor: any) {\r\n  if (!afterStartedCalled) {\r\n    afterStarted(blazor, 'wasm');\r\n  }\r\n}\r\n\r\nexport function beforeServerStart(options: any) {\r\n  if (!beforeStartCalled) {\r\n    beforeStart(options);\r\n  }\r\n}\r\n\r\nexport function afterServerStarted(blazor: any) {\r\n  if (!afterStartedCalled) {\r\n    afterStarted(blazor, 'server');\r\n  }\r\n}\r\n\r\nexport function afterStarted(blazor: Blazor, mode: string) {\r\n\r\n  blazor.registerCustomEventType('checkedchange', {\r\n    browserEventName: 'change',\r\n    createEventArgs: event => {\r\n\r\n      // Hacking of a fake update\r\n      if (event.target!.isUpdating) {\r\n        return {\r\n          checked: null,\r\n          indeterminate: null\r\n        }\r\n      }\r\n\r\n      return {\r\n        checked: event.target!.currentChecked,\r\n        indeterminate: event.target!.indeterminate\r\n      };\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('switchcheckedchange', {\r\n    browserEventName: 'change',\r\n    createEventArgs: event => {\r\n      return {\r\n        checked: event.target!.checked\r\n      };\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('sliderchange', {\r\n    browserEventName: 'change',\r\n    createEventArgs: event => {\r\n      return {\r\n        value: event.target!.currentValue\r\n      };\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('accordionchange', {\r\n    browserEventName: 'change',\r\n    createEventArgs: event => {\r\n      if (event.target!.localName == 'fluent-accordion-item') {\r\n        return {\r\n          activeId: event.target!.id,\r\n          expanded: event.target!._expanded\r\n        }\r\n      };\r\n      return null;\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('tabchange', {\r\n    browserEventName: 'change',\r\n    createEventArgs: event => {\r\n      if (event.target!.localName == 'fluent-tabs') {\r\n        return {\r\n          activeId: event.detail.id,\r\n        }\r\n      };\r\n      return null;\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('radiogroupchange', {\r\n    browserEventName: 'change',\r\n    createEventArgs: event => {\r\n      if (event.target!.localName == 'fluent-radio-group') {\r\n        return {\r\n          value: event.target.value,\r\n        }\r\n      };\r\n      return null;\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('selectedchange', {\r\n    browserEventName: 'selected-change',\r\n    createEventArgs: event => {\r\n      if (event.target!.localName == 'fluent-tree-item') {\r\n        return {\r\n          affectedId: event.detail.attributes['id'].value,\r\n          selected: event.detail._selected,\r\n          expanded: event.detail._expanded\r\n        }\r\n      };\r\n      return null;\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('expandedchange', {\r\n    browserEventName: 'expanded-change',\r\n    createEventArgs: event => {\r\n      return {\r\n        affectedId: event.detail.attributes['id'].value,\r\n        selected: event.detail._selected,\r\n        expanded: event.detail._expanded\r\n      };\r\n    }\r\n  });\r\n  blazor.registerCustomEventType('dateselected', {\r\n    browserEventName: 'dateselected',\r\n    createEventArgs: event => {\r\n      return {\r\n        calendarDateInfo: event.detail\r\n      };\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('tooltipdismiss', {\r\n    browserEventName: 'dismiss',\r\n    createEventArgs: event => {\r\n      if (event.target!.localName == 'fluent-tooltip') {\r\n        return {\r\n          reason: event.type\r\n        };\r\n      };\r\n      return null;\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('dialogdismiss', {\r\n    browserEventName: 'dismiss',\r\n    createEventArgs: event => {\r\n      if (event.target!.localName == 'fluent-dialog') {\r\n        return {\r\n          id: event.target!.id,\r\n          reason: event.type\r\n        };\r\n      };\r\n      return null;\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('menuchange', {\r\n    browserEventName: 'change',\r\n    createEventArgs: event => {\r\n      return {\r\n        id: event.target!.id,\r\n        value: event.target!.innerText\r\n      };\r\n    }\r\n  });\r\n  blazor.registerCustomEventType('scrollstart', {\r\n    browserEventName: 'scrollstart',\r\n    createEventArgs: event => {\r\n      return {\r\n        scroll: event.detail\r\n      };\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('scrollend', {\r\n    browserEventName: 'scrollend',\r\n    createEventArgs: event => {\r\n      return {\r\n        scroll: event.detail\r\n      };\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('splitterresized', {\r\n    browserEventName: 'splitterresized',\r\n    createEventArgs: event => {\r\n      return {\r\n        panel1size: event.detail.panel1size,\r\n        panel2size: event.detail.panel2size\r\n      }\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('splittercollapsed', {\r\n    browserEventName: 'splittercollapsed',\r\n    createEventArgs: event => {\r\n      return {\r\n        collapsed: event.detail.collapsed\r\n      }\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('controlinput', {\r\n    browserEventName: 'input',\r\n    createEventArgs: event => {\r\n      return {\r\n        value: event.target.control.value\r\n      }\r\n    }\r\n  });\r\n\r\n  blazor.registerCustomEventType('comboboxchange', {\r\n    browserEventName: 'change',\r\n    createEventArgs: event => {\r\n      return {\r\n        value: event.target._selectedOptions[0] ? event.target._selectedOptions[0].value : event.target.value \r\n      }\r\n    }\r\n  });\r\n\r\n  blazor.theme = {\r\n    isSystemDark: () => {\r\n      return window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;\r\n    },\r\n\r\n    isDarkMode: () => {\r\n      const luminance: string = getComputedStyle(document.documentElement).getPropertyValue('--base-layer-luminance');\r\n      return parseFloat(luminance) < 0.5;\r\n    }\r\n  }\r\n\r\n  if (typeof blazor.addEventListener === 'function' && mode === 'web') {\r\n    customElements.define('fluent-page-script', FluentPageScript);\r\n    blazor.addEventListener('enhancedload', onEnhancedLoad);\r\n  }\r\n\r\n  afterStartedCalled = true;\r\n}\r\n\r\nexport function beforeStart(options: any) {\r\n  customElements.define(\"fluent-design-theme\", DesignTheme);\r\n  customElements.define(\"split-panels\", SplitPanels);\r\n\r\n  beforeStartCalled = true;\r\n}\r\n"],
  "mappings": "AAKA,IAAMA,GAAU,UAAY,CAC1B,GAAI,OAAO,WAAe,IAExB,OAAO,WAET,GAAI,OAAO,OAAW,IAEpB,OAAO,OAET,GAAI,OAAO,KAAS,IAElB,OAAO,KAET,GAAI,OAAO,OAAW,IAEpB,OAAO,OAET,GAAI,CAIF,OAAO,IAAI,SAAS,aAAa,EAAE,CACrC,MAAa,CAGX,MAAO,CAAC,CACV,CACF,EAAE,EAEEA,GAAQ,eAAiB,SAC3BA,GAAQ,aAAe,CACrB,aAAc,CAACC,EAAGC,IAAMA,CAC1B,GAEF,IAAMC,GAAa,CACjB,aAAc,GACd,WAAY,GACZ,SAAU,EACZ,EACIH,GAAQ,OAAS,QACnB,QAAQ,eAAeA,GAAS,OAAQ,OAAO,OAAO,CACpD,MAAO,OAAO,OAAO,IAAI,CAC3B,EAAGG,EAAU,CAAC,EAMhB,IAAMC,GAAOJ,GAAQ,KACrB,GAAII,GAAK,UAAY,OAAQ,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EACjC,CACF,EAEI,OAAOX,EAAO,kBAAqB,YAAcS,IAAS,QAC5D,eAAe,OAAO,qBAAsBG,EAAgB,EAC5DZ,EAAO,iBAAiB,eAAgBa,EAAc,GAGxDf,GAAqB,EACvB,CAEO,SAASM,GAAYD,EAAc,CACxC,eAAe,OAAO,sBAAuBW,EAAW,EACxD,eAAe,OAAO,eAAgBC,EAAW,EAEjDlB,GAAoB,EACtB",
  "names": ["$global", "n", "r", "propConfig", "FAST", "storage", "id", "initialize", "found", "emptyArray", "createMetadataLocator", "metadataLookup", "target", "metadata", "currentTarget", "updateQueue", "tasks", "pendingErrors", "throwFirstError", "tryRunTask", "task", "error", "process", "index", "scan", "newLength", "enqueue", "callable", "fastHTMLPolicy", "html", "htmlPolicy", "marker", "_interpolationStart", "_interpolationEnd", "DOM", "policy", "node", "attributeName", "element", "value", "parent", "child", "fragment", "SubscriberSet", "source", "initialSubscriber", "subscriber", "spillover", "args", "sub1", "sub2", "i", "ii", "PropertyChangeNotifier", "propertyName", "_a", "subscribers", "propertyToWatch", "propertyToUnwatch", "Observable", "volatileRegex", "notifierLookup", "queueUpdate", "watcher", "createArrayObserver", "array", "getNotifier", "getAccessors", "DefaultObservableAccessor", "name", "newValue", "field", "oldValue", "callback", "BindingObserverImplementation", "binding", "isVolatileBinding", "context", "previousWatcher", "result", "current", "propertySource", "prev", "notifier", "prevValue", "next", "factory", "nameOrAccessor", "observable", "volatile", "descriptor", "contextEvent", "event", "ExecutionContext", "defaultExecutionContext", "HTMLDirective", "TargetedHTMLDirective", "AttachedBehaviorHTMLDirective", "behavior", "options", "normalBind", "triggerBind", "normalUnbind", "contentUnbind", "view", "triggerUnbind", "updateAttributeTarget", "updateBooleanAttributeTarget", "updateContentTarget", "updatePropertyTarget", "updateClassTarget", "classVersions", "version", "names", "currentName", "HTMLBindingDirective", "s", "c", "BindingBehavior", "isBindingVolatile", "bind", "unbind", "updateTarget", "targetName", "sharedContext", "CompilationContext", "_CompilationContext", "directive", "directives", "shareable", "createAggregateBinding", "parts", "partCount", "finalParts", "x", "scope", "output", "interpolationEndLength", "parseContent", "valueParts", "bindingParts", "literal", "directiveIndex", "compileAttributes", "includeBasicValues", "attributes", "attr", "attrValue", "parseResult", "compileContent", "walker", "lastNode", "currentPart", "currentNode", "compileTemplate", "template", "hostBehaviorFactories", "targetOffset", "viewBehaviorFactories", "range", "HTMLView", "behaviors", "end", "parentNode", "oldSource", "views", "j", "jj", "ViewTemplate", "hostBindingTarget", "fec", "viewFactories", "behaviorIndex", "targetIndex", "factoryIndex", "hostFactories", "host", "lastAttributeNameRegex", "strings", "values", "currentString", "match", "ElementStyles", "styleSheetCache", "styles", "AdoptedStyleSheetsStyles", "StyleElementStyles", "reduceStyles", "curr", "reduceBehaviors", "prependToAdoptedStyleSheetsSymbol", "separateSheetsToPrepend", "sheets", "prepend", "append", "addAdoptedStyleSheets", "removeAdoptedStyleSheets", "sheet", "styleClassId", "getNextStyleClass", "styleSheets", "styleClass", "AttributeConfiguration", "booleanConverter", "nullableNumberConverter", "number", "AttributeDefinition", "_AttributeDefinition", "Owner", "attribute", "mode", "converter", "guards", "latestValue", "attributeLists", "list", "config", "configOrTarget", "prop", "decorator", "$target", "$prop", "defaultShadowOptions", "defaultElementOptions", "fastRegistry", "typeToDefinition", "definition", "key", "FASTElementDefinition", "type", "nameOrConfig", "observedAttributes", "propertyLookup", "attributeLookup", "registry", "proto", "shadowRoots", "defaultEventOptions", "getShadowRoot", "Controller", "_Controller", "shadowOptions", "shadowRoot", "accessors", "boundObservables", "sourceBehaviors", "targetBehaviors", "length", "behaviorsToBind", "force", "behaviorsToUnbind", "count", "attrDef", "detail", "propertyNames", "controller", "createFASTElement", "BaseType", "FASTElement", "nameOrDef", "CSSDirective", "collectStyles", "cssString", "css", "elementStyles", "CSSPartial", "stylesheets", "accumulated", "el", "cssPartial", "newSplice", "removed", "addedCount", "EDIT_LEAVE", "EDIT_UPDATE", "EDIT_ADD", "EDIT_DELETE", "calcEditDistances", "currentStart", "currentEnd", "old", "oldStart", "oldEnd", "rowCount", "columnCount", "distances", "north", "west", "spliceOperationsFromEditDistances", "edits", "northWest", "min", "sharedPrefix", "searchLength", "sharedSuffix", "index1", "index2", "intersect", "start1", "end1", "start2", "end2", "calcSplices", "prefixCount", "suffixCount", "minLength", "splice", "ops", "splices", "oldIndex", "$push", "mergeSplice", "inserted", "insertionOffset", "intersectCount", "deleteCount", "currentRemoved", "offset", "createInitialSplices", "changeRecords", "record", "projectArraySplices", "initialSplices", "arrayObservationEnabled", "adjustIndex", "changeRecord", "arrayLength", "ArrayObserver", "oldCollection", "finalSplices", "enableArrayObservation", "collection", "pop", "push", "reverse", "shift", "sort", "unshift", "notEmpty", "methodCallResult", "o", "oldArray", "RefBehavior", "ref", "isFunction", "object", "noTemplate", "normalizeBinding", "when", "templateOrTemplateBinding", "elseTemplateOrTemplateBinding", "dataBinding", "templateBinding", "elseBinding", "defaultRepeatOptions", "bindWithoutPositioning", "items", "bindWithPositioning", "childContext", "RepeatBehavior", "location", "itemsBinding", "isItemsBindingVolatile", "isTemplateBindingVolatile", "oldObserver", "newObserver", "hasNewObserver", "bindView", "recycle", "leftoverViews", "leftoverIndex", "availableViews", "removeIndex", "addIndex", "removedViews", "totalAvailableViews", "neighbor", "currentContext", "templateChanged", "itemsLength", "viewsLength", "RepeatDirective", "repeat", "elements", "selector", "NodeObservationBehavior", "nodes", "SlottedBehavior", "slotted", "propertyOrOptions", "ChildrenBehavior", "children", "StartEnd", "endSlotTemplate", "startSlotTemplate", "endTemplate", "startTemplate", "accordionItemTemplate", "__decorate$1", "decorators", "desc", "d", "metadataByTarget", "ResolverBuilder", "container", "cacheCallbackResult", "destinationKey", "strategy", "state", "ResolverImpl", "cloneArrayWithPossibleProps", "clone", "keys", "len", "isArrayIndex", "DefaultResolver", "ContainerConfiguration", "dependencyLookup", "getParamTypes", "Type", "rootDOMContainer", "DI", "ContainerImpl", "owned", "DILocateParentEventType", "annotationParamtypes", "dependencies", "inject", "designParamtypes", "Proto", "auAnnotationParamtype", "respectConnection", "diPropertyKey", "handleChange", "nameConfigOrCallback", "configuror", "configure", "friendlyName", "defaultFriendlyName", "Interface", "property", "dep", "Registration", "defaultSingletonOptions", "Container", "handler", "requestor", "_b", "_c", "containerGetKey", "transformInstance", "inst", "transform", "FactoryImpl", "dynamicDependencies", "instance", "transformer", "containerResolver", "isRegistry", "obj", "isSelfRegistry", "isRegisterInRequester", "isClass", "InstrinsicTypeNames", "factories", "_ContainerImpl", "owner", "e", "params", "isObject", "resolver", "validateKey", "resolvers", "autoRegister", "searchAncestors", "resolutions", "buildAllResponse", "isNativeFunction", "keyAsValue", "registrationResolver", "newResolver", "cache", "fun", "t", "originalKey", "aliasKey", "results", "lookup", "isNative", "sourceText", "fn", "isNumericLookup", "ch", "presentationKeyFromTag", "tagName", "presentationRegistry", "ComponentPresentation", "presentation", "existing", "DefaultComponentPresentation", "FoundationElement", "_FoundationElement", "elementDefinition", "overrideDefinition", "FoundationElementRegistry", "resolveOption", "option", "applyMixins", "derivedCtor", "baseCtors", "derivedAttributes", "baseCtor", "AccordionItem", "accordionTemplate", "Orientation", "findLastIndex", "predicate", "k", "canUseDOM", "isHTMLElement", "arg", "getDisplayedNodes", "rootNode", "getNonce", "_canUseFocusVisible", "canUseFocusVisible", "styleElement", "styleNonce", "eventFocus", "eventFocusIn", "eventFocusOut", "eventKeyDown", "eventResize", "eventScroll", "KeyCodes", "keyArrowDown", "keyArrowLeft", "keyArrowRight", "keyArrowUp", "keyEnter", "keyEscape", "keyHome", "keyEnd", "keyFunction2", "keyPageDown", "keyPageUp", "keySpace", "keyTab", "ArrowKeys", "Direction", "wrapInBounds", "max", "limit", "inRange", "a", "b", "uniqueIdCounter", "uniqueId", "prefix", "SystemColors", "AccordionExpandMode", "Accordion", "item", "itemId", "selectedItem", "focusedItem", "focusedIndex", "accordionItem", "adjustment", "anchorTemplate", "ARIAGlobalStatesAndProperties", "Anchor$1", "DelegatesARIALink", "anchoredRegionTemplate", "getDirection", "dirNode", "IntersectionService", "callbacks", "callBackIndex", "entries", "pendingCallbacks", "pendingCallbackParams", "entry", "thisElementCallbacks", "targetCallbackIndex", "AnchoredRegion", "_AnchoredRegion", "regionEntry", "anchorEntry", "viewportEntry", "rectA", "rectB", "desiredVerticalPosition", "desiredHorizontalPosition", "horizontalOptions", "dirCorrectedHorizontalDefaultPosition", "newDirection", "horizontalThreshold", "anchorLeft", "anchorRight", "anchorWidth", "viewportLeft", "viewportRight", "verticalOptions", "verticalThreshold", "anchorTop", "anchorBottom", "anchorHeight", "viewportTop", "viewportBottom", "nextPositionerDimension", "positionChanged", "nextRegionWidth", "sizeDelta", "regionLeft", "regionRight", "nextRegionHeight", "regionTop", "regionBottom", "inset", "positionOption", "anchorStart", "anchorEnd", "anchorSpan", "viewportStart", "viewportEnd", "spaceStart", "spaceEnd", "newRegionDimension", "prevMode", "newMode", "badgeTemplate", "Badge$1", "fill", "color", "breadcrumbItemTemplate", "BreadcrumbItem", "breadcrumbTemplate", "Breadcrumb", "itemIsLastNode", "isLastNode", "childNodeWithHref", "buttonTemplate", "proxySlotName", "ElementInternalsKey", "supportsElementInternals", "InternalsMap", "FormAssociated", "BaseCtor", "C", "parentLabels", "forLabels", "labels", "previous", "internals", "flags", "message", "anchor", "disabled", "defaultButton", "CheckableFormAssociated", "D", "_Button", "FormAssociatedButton", "Button$1", "attached", "span", "DelegatesARIAButton", "DateFormatter", "date", "dates", "day", "month", "year", "format", "locale", "dateObj", "optionsWithTimeZone", "weekday", "_", "Calendar$1", "getFirstDay", "getLength", "nextMonth", "thisMonth", "previousMonth", "info", "minWeeks", "start", "days", "dayCount", "dateString", "selected", "datesString", "str", "todayString", "today", "inactive", "weekdayText", "text", "longText", "GenerateHeaderOptions", "DataGridCellTypes", "DataGridRowTypes", "DataGridRow", "newFocusColumnIndex", "createRowItemTemplate", "rowTag", "dataGridTemplate", "rowItemTemplate", "DataGrid", "_DataGrid", "rowIndex", "columnIndex", "scrollIntoView", "focusRowIndex", "cells", "focusColumnIndex", "focusTarget", "mutations", "observer", "mutation", "newNode", "newGridTemplateColumns", "firstRow", "thisRow", "columnDefinitions", "templateColumns", "column", "focusRow", "newFocusRowIndex", "maxIndex", "currentGridBottom", "lastRow", "stickyHeaderOffset", "generatedHeaderElement", "row", "defaultCellContentsTemplate", "defaultHeaderCellContentsTemplate", "DataGridCell", "createCellItemTemplate", "cellTag", "createHeaderCellItemTemplate", "dataGridRowTemplate", "cellItemTemplate", "headerCellItemTemplate", "dataGridCellTemplate", "CalendarTitleTemplate", "calendarWeekdayTemplate", "calendarCellTemplate", "calendarRowTemplate", "interactiveCalendarGridTemplate", "gridTag", "noninteractiveCalendarTemplate", "calendarTemplate", "cardTemplate", "Card$1", "checkboxTemplate", "_Checkbox", "FormAssociatedCheckbox", "Checkbox", "isListboxOption", "ListboxOption", "defaultSelected", "DelegatesARIAListboxOption", "Listbox$1", "_Listbox$1", "captured", "optionToFocus", "pattern", "re", "direction", "potentialDirection", "nextSelectableOption", "thisOption", "selectableIndex", "newNext", "filteredNext", "setSize", "typeaheadMatches", "selectedIndex", "DelegatesARIAListbox", "SelectPosition", "_Combobox", "FormAssociatedCombobox", "ComboboxAutocomplete", "Combobox$1", "prevSelectedValue", "nextSelectedValue", "filter", "currentBox", "availableBottom", "shouldEmit", "controlValueLength", "DelegatesARIACombobox", "comboboxTemplate", "composedParent", "composedContains", "reference", "test", "defaultElement", "isFastElement", "QueuedStyleSheetTarget", "ConstructableStyleSheetTarget", "DocumentStyleSheetTarget", "HeadStyleElementStyleSheetTarget", "StyleElementStyleSheetTarget", "ElementStyleSheetTarget", "RootStyleSheetTarget", "_RootStyleSheetTarget", "PropertyTargetManager", "root", "roots", "propertyTargetCache", "propertyTargetCtor", "DesignTokenImpl", "_DesignTokenImpl", "configuration", "token", "DesignTokenNode", "subscriberSet", "sub", "CustomPropertyReflector", "DesignTokenBindingObserver", "Store", "nodeCache", "childToParent", "_DesignTokenNode", "reflecting", "parentValue", "sourceValue", "raw", "upstream", "reParent", "childIndex", "create$2", "DesignToken", "ElementDisambiguation", "elementTypesByTag", "elementTagsByType", "rootDesignSystem", "designSystemKey", "DefaultDesignSystem", "DesignSystem", "system", "extractTryDefineElementParams", "elementDefinitionType", "elementDefinitionCallback", "registrations", "elementDefinitionEntries", "disambiguate", "shadowRootMode", "extractedParams", "baseClass", "elementName", "typeFoundByName", "needsDefine", "ElementDefinitionEntry", "willDefine", "dialogTemplate", "candidateSelectors", "candidateSelector", "matches", "isContentEditable", "getTabindex", "tabindexAttr", "isInput", "isHiddenInput", "isDetailsWithSummary", "getCheckedRadio", "form", "isTabbableRadio", "radioScope", "queryRadios", "radioSet", "err", "checked", "isRadio", "isNonTabbableRadio", "isHidden", "displayCheck", "isDirectSummary", "nodeUnderDetails", "_node$getBoundingClie", "width", "height", "isNodeMatchingSelectorFocusable", "isNodeMatchingSelectorTabbable", "isTabbable", "focusableCandidateSelector", "isFocusable", "Dialog", "_Dialog", "bounds", "currentFocusElement", "shouldTrapFocusOverride", "shouldTrapFocus", "dividerTemplate", "DividerRole", "Divider", "FlipperDirection", "flipperTemplate", "Flipper", "listboxOptionTemplate", "ListboxElement", "activeItem", "preserveChecked", "shiftKey", "size", "enabledCheckedOptions", "activeIndex", "listboxTemplate", "MenuItemRole", "roleForMenuItem", "MenuItem", "menuItemTemplate", "menuTemplate", "Menu$1", "_Menu$1", "focusIndex", "targetItem", "changedItem", "newItems", "menuItems", "elementIndent", "role", "startSlot", "indent", "accum", "elementValue", "changedMenuItem", "changeItemIndex", "numberFieldTemplate", "_TextField", "FormAssociatedTextField", "TextFieldType", "TextField$1", "DelegatesARIATextbox", "_NumberField", "FormAssociatedNumberField", "NumberField$1", "validValue", "stepUpValue", "stepDownValue", "progressSegments", "progressRingTemplate", "BaseProgress", "progressTemplate", "defintion", "radioGroupTemplate", "RadioGroup", "changedRadio", "radio", "group", "nextRadio", "checkedRadios", "numberOfCheckedRadios", "lastCheckedRadio", "foundMatchingVal", "radioTemplate", "_Radio", "FormAssociatedRadio", "Radio", "HorizontalScroll$1", "updatedItems", "scrollItems", "scrollItem", "scrollLeft", "containerWidth", "containerLeft", "lastStop", "stops", "left", "leftPosition", "right", "reinit", "hasStops", "stop", "position", "padding", "rightPadding", "scrollStops", "itemStart", "itemEnd", "isBefore", "scrollTo", "scrollPosition", "nextIndex", "outOfView", "newPosition", "seconds", "computedDuration", "transitionendHandler", "maxScrollValue", "transitionStop", "horizontalScrollTemplate", "whitespaceFilter", "_Search", "FormAssociatedSearch", "Search$1", "DelegatesARIASearch", "_Select", "FormAssociatedSelect", "Select$1", "_d", "_e", "_f", "_g", "proxyOption", "DelegatesARIASelect", "selectTemplate", "skeletonTemplate", "Skeleton", "sliderLabelTemplate", "convertPixelToPercent", "pixelPos", "minPosition", "maxPosition", "pct", "defaultConfig", "SliderLabel", "parentSlider", "orientation", "rightNum", "leftNum", "sliderTemplate", "_Slider", "FormAssociatedSlider", "SliderMode", "Slider", "clientRect", "remove", "eventAction", "sourceEvent", "eventValue", "rawValue", "controlValue", "constrainedValue", "roundedConstrainedValue", "remainderValue", "newVal", "incrementedVal", "incrementedValString", "decrementedVal", "decrementedValString", "percentage", "stepString", "decimalPlacesOfStep", "switchTemplate", "_Switch", "FormAssociatedSwitch", "Switch", "tabPanelTemplate", "TabPanel", "tabTemplate", "Tab", "tabsTemplate", "TabsOrientation", "Tabs", "gridHorizontalProperty", "gridVerticalProperty", "gridProperty", "tab", "isActiveTab", "tabId", "tabpanelId", "tabpanel", "selectedTab", "tabPanel", "translateProperty", "offsetProperty", "dif", "focusableTabs", "currentActiveTabIndex", "nextTabIndex", "_TextArea", "FormAssociatedTextArea", "TextAreaResize", "TextArea$1", "textAreaTemplate", "textFieldTemplate", "toolbarTemplate", "getRootActiveElement", "ToolbarArrowKeyMap", "Toolbar$1", "_Toolbar$1", "relatedTarget", "incrementer", "previousFocusedElement", "adjustedActiveIndex", "isRoleRadio", "isFocusableFastElement", "hasFocusableShadow", "DelegatesARIAToolbar", "tooltipTemplate", "TooltipPosition", "Tooltip$1", "ev", "anchorId", "treeItemTemplate", "isTreeItemElement", "TreeItem", "treeChildren", "treeViewTemplate", "TreeView", "treeItems", "delta", "visibleNodes", "focusItem", "MatchMediaBehavior", "query", "listener", "MatchMediaStyleSheetBehavior", "_MatchMediaStyleSheetBehavior", "forcedColorsStylesheetBehavior", "PropertyStyleSheetBehavior", "elementInstance", "disabledCursor", "hidden", "display", "displayValue", "focusVisible", "clamp", "normalize", "denormalize", "getHexStringForByte", "lerp", "roundToPrecisionSmall", "precision", "factor", "ColorHSL", "_ColorHSL", "hue", "sat", "lum", "data", "rhs", "ColorLAB", "_ColorLAB", "l", "ColorRGBA64", "_ColorRGBA64", "red", "green", "blue", "alpha", "ColorXYZ", "_ColorXYZ", "y", "z", "rgbToLinearLuminance", "rgb", "rgbToRelativeLuminance", "luminanceHelper", "calcChannelOverlay", "background", "overlay", "calcRgbOverlay", "rgbMatch", "rgbBackground", "rgbOverlay", "rChannel", "gChannel", "bChannel", "calculateOverlayColor", "rgbToHSL", "hslToRGB", "hsl", "m", "g", "labToXYZ", "lab", "fy", "fx", "fz", "xcubed", "ycubed", "zcubed", "xyzToLAB", "xyz", "xyzToLABHelper", "rgbToXYZ", "rgbToXYZHelper", "xyzToRGB", "xyzToRGBHelper", "rgbToLAB", "labToRGB", "ColorBlendMode", "computeAlphaBlend", "bottom", "top", "interpolateRGB", "ColorInterpolationSpace", "hexRGBRegex", "parseColorHexRGB", "digits", "rawInt", "contrast", "L1", "L2", "SwatchRGB", "SwatchRGBImpl", "isSwatchRGB", "_SwatchRGBImpl", "binarySearch", "valuesToSearch", "searchCondition", "startIndex", "endIndex", "middleIndex", "isDark", "directionByIsDark", "defaultPaletteRGBOptions", "create$1", "rOrSource", "PaletteRGB", "from", "PaletteRGBImpl", "_PaletteRGBImpl", "swatches", "contrastTarget", "initialSearchIndex", "endSearchIndex", "startSearchIndex", "condition", "closest", "saturationTarget", "hslColor", "hslNew", "inputval", "labSource", "lab0", "lab50", "lab100", "rgbMin", "rgbMax", "lAbove", "lBelow", "percentFromRgbMinToLab0", "percentFromLab100ToRgbMax", "swatchContrast", "referencePalette", "targetPalette", "refSwatches", "refIndex", "swatch", "targetContrast", "safeSecondSwatch", "safeSecondRefIndex", "targetSwatchCurrentRefIndex", "swatchesToSpace", "space", "currentRefIndex", "nextRefIndex", "nextContrast", "opts", "white$1", "black$1", "middleGrey", "base", "accentBase", "foregroundOnAccentSet", "restFill", "hoverFill", "activeFill", "focusFill", "defaultRule", "restForeground", "hoverForeground", "activeForeground", "focusForeground", "GradientSwatchRGB", "_GradientSwatchRGB", "cssGradient", "black", "white", "gradientShadowStroke", "palette", "restDelta", "hoverDelta", "activeDelta", "focusDelta", "shadowDelta", "shadowPercentage", "blendWithReference", "referenceIndex", "overlayHelper", "refSwatch", "overlaySolid", "overlayColor", "blend", "restIndex", "hoverIndex", "startPosition", "endPosition", "gradientHelper", "applyShadow", "shadowColor", "startColor", "endColor", "underlineStroke", "midPosition", "underlineColor", "contrastSwatch", "contrastAndDeltaSwatchSet", "baseContrast", "baseIndex", "contrastAndDeltaSwatchSetByLuminance", "lightBaseContrast", "lightRestDelta", "lightHoverDelta", "lightActiveDelta", "lightFocusDelta", "lightDirection", "darkBaseContrast", "darkRestDelta", "darkHoverDelta", "darkActiveDelta", "darkFocusDelta", "darkDirection", "deltaSwatch", "deltaSwatchSet", "deltaSwatchSetByLuminance", "focusStrokeOuter$1", "focusStrokeInner$1", "focusColor", "baseLayerLuminanceSwatch", "luminance", "StandardLuminance", "neutralLayer1Index", "baseLayerLuminance", "neutralLayer1$1", "neutralLayerFloating$1", "layerDelta", "neutralLayer2$1", "neutralLayer3$1", "neutralLayer4$1", "StandardFontWeight", "create", "createNonCss", "disabledOpacity", "baseHeightMultiplier", "baseHorizontalSpacingMultiplier", "density", "designUnit", "controlCornerRadius", "layerCornerRadius", "strokeWidth", "focusStrokeWidth", "bodyFont", "fontWeight", "fontVariations", "sizeToken", "weight", "px", "typeRampBaseFontSize", "typeRampBaseLineHeight", "typeRampBaseFontVariations", "typeRampMinus1FontSize", "typeRampMinus1LineHeight", "typeRampMinus1FontVariations", "typeRampMinus2FontSize", "typeRampMinus2LineHeight", "typeRampMinus2FontVariations", "typeRampPlus1FontSize", "typeRampPlus1LineHeight", "typeRampPlus1FontVariations", "typeRampPlus2FontSize", "typeRampPlus2LineHeight", "typeRampPlus2FontVariations", "typeRampPlus3FontSize", "typeRampPlus3LineHeight", "typeRampPlus3FontVariations", "typeRampPlus4FontSize", "typeRampPlus4LineHeight", "typeRampPlus4FontVariations", "typeRampPlus5FontSize", "typeRampPlus5LineHeight", "typeRampPlus5FontVariations", "typeRampPlus6FontSize", "typeRampPlus6LineHeight", "typeRampPlus6FontVariations", "accentFillRestDelta", "accentFillHoverDelta", "accentFillActiveDelta", "accentFillFocusDelta", "accentForegroundRestDelta", "accentForegroundHoverDelta", "accentForegroundActiveDelta", "accentForegroundFocusDelta", "neutralFillRestDelta", "neutralFillHoverDelta", "neutralFillActiveDelta", "neutralFillFocusDelta", "neutralFillInputRestDelta", "neutralFillInputHoverDelta", "neutralFillInputActiveDelta", "neutralFillInputFocusDelta", "neutralFillInputAltRestDelta", "neutralFillInputAltHoverDelta", "neutralFillInputAltActiveDelta", "neutralFillInputAltFocusDelta", "neutralFillLayerRestDelta", "neutralFillLayerHoverDelta", "neutralFillLayerActiveDelta", "neutralFillLayerAltRestDelta", "neutralFillSecondaryRestDelta", "neutralFillSecondaryHoverDelta", "neutralFillSecondaryActiveDelta", "neutralFillSecondaryFocusDelta", "neutralFillStealthRestDelta", "neutralFillStealthHoverDelta", "neutralFillStealthActiveDelta", "neutralFillStealthFocusDelta", "neutralFillStrongRestDelta", "neutralFillStrongHoverDelta", "neutralFillStrongActiveDelta", "neutralFillStrongFocusDelta", "neutralStrokeRestDelta", "neutralStrokeHoverDelta", "neutralStrokeActiveDelta", "neutralStrokeFocusDelta", "neutralStrokeControlRestDelta", "neutralStrokeControlHoverDelta", "neutralStrokeControlActiveDelta", "neutralStrokeControlFocusDelta", "neutralStrokeDividerRestDelta", "neutralStrokeLayerRestDelta", "neutralStrokeLayerHoverDelta", "neutralStrokeLayerActiveDelta", "neutralStrokeStrongHoverDelta", "neutralStrokeStrongActiveDelta", "neutralStrokeStrongFocusDelta", "neutralBaseColor", "neutralPalette", "accentBaseColor", "accentPalette", "neutralLayerCardContainerRecipe", "neutralLayerCardContainer", "neutralLayerFloatingRecipe", "neutralLayerFloating", "neutralLayer1Recipe", "neutralLayer1", "neutralLayer2Recipe", "neutralLayer2", "neutralLayer3Recipe", "neutralLayer3", "neutralLayer4Recipe", "neutralLayer4", "fillColor", "ContrastTarget", "accentFillRecipe", "accentFillRest", "accentFillHover", "accentFillActive", "accentFillFocus", "foregroundOnAccentRecipe", "foregroundOnAccentRest", "foregroundOnAccentHover", "foregroundOnAccentActive", "foregroundOnAccentFocus", "accentForegroundRecipe", "accentForegroundRest", "accentForegroundHover", "accentForegroundActive", "accentForegroundFocus", "accentStrokeControlRecipe", "accentStrokeControlRest", "accentStrokeControlHover", "accentStrokeControlActive", "accentStrokeControlFocus", "neutralFillRecipe", "neutralFillRest", "neutralFillHover", "neutralFillActive", "neutralFillFocus", "neutralFillInputRecipe", "neutralFillInputRest", "neutralFillInputHover", "neutralFillInputActive", "neutralFillInputFocus", "neutralFillInputAltRecipe", "neutralFillInputAltRest", "neutralFillInputAltHover", "neutralFillInputAltActive", "neutralFillInputAltFocus", "neutralFillLayerRecipe", "neutralFillLayerRest", "neutralFillLayerHover", "neutralFillLayerActive", "neutralFillLayerAltRecipe", "neutralFillLayerAltRest", "neutralFillSecondaryRecipe", "neutralFillSecondaryRest", "neutralFillSecondaryHover", "neutralFillSecondaryActive", "neutralFillSecondaryFocus", "neutralFillStealthRecipe", "neutralFillStealthRest", "neutralFillStealthHover", "neutralFillStealthActive", "neutralFillStealthFocus", "neutralFillStrongRecipe", "neutralFillStrongRest", "neutralFillStrongHover", "neutralFillStrongActive", "neutralFillStrongFocus", "neutralForegroundRecipe", "neutralForegroundRest", "neutralForegroundHover", "neutralForegroundActive", "neutralForegroundFocus", "neutralForegroundHintRecipe", "neutralForegroundHint", "neutralStrokeRecipe", "neutralStrokeRest", "neutralStrokeHover", "neutralStrokeActive", "neutralStrokeFocus", "neutralStrokeControlRecipe", "neutralStrokeControlRest", "neutralStrokeControlHover", "neutralStrokeControlActive", "neutralStrokeControlFocus", "neutralStrokeDividerRecipe", "neutralStrokeDividerRest", "neutralStrokeInputRecipe", "neutralStrokeInputRest", "neutralStrokeInputHover", "neutralStrokeInputActive", "neutralStrokeInputFocus", "neutralStrokeLayerRecipe", "neutralStrokeLayerRest", "neutralStrokeLayerHover", "neutralStrokeLayerActive", "neutralStrokeStrongRecipe", "neutralStrokeStrongRest", "neutralStrokeStrongHover", "neutralStrokeStrongActive", "neutralStrokeStrongFocus", "focusStrokeOuterRecipe", "focusStrokeOuter", "focusStrokeInnerRecipe", "focusStrokeInner", "foregroundOnAccentLargeRecipe", "foregroundOnAccentRestLarge", "foregroundOnAccentHoverLarge", "foregroundOnAccentActiveLarge", "foregroundOnAccentFocusLarge", "neutralFillInverseRestDelta", "neutralFillInverseHoverDelta", "neutralFillInverseActiveDelta", "neutralFillInverseFocusDelta", "neutralFillInverse", "accessibleIndex", "accessibleIndex2", "indexOneIsRest", "neutralFillInverseRecipe", "neutralFillInverseRest", "neutralFillInverseHover", "neutralFillInverseActive", "neutralFillInverseFocus", "cornerRadius", "elevatedCornerRadius", "outlineWidth", "focusOutlineWidth", "neutralContrastFillRestDelta", "neutralContrastFillHoverDelta", "neutralContrastFillActiveDelta", "neutralContrastFillFocusDelta", "neutralFillCardDelta", "neutralFillToggleRestDelta", "neutralFillToggleHoverDelta", "neutralFillToggleActiveDelta", "neutralFillToggleFocusDelta", "neutralDividerRestDelta", "neutralLayerL1", "neutralLayerL2", "neutralLayerL3", "neutralLayerL4", "accentForegroundCut", "accentForegroundCutLarge", "neutralDivider", "neutralFillCard", "neutralContrastFillRest", "neutralContrastFillHover", "neutralContrastFillActive", "neutralContrastFillFocus", "neutralFillToggleRest", "neutralFillToggleHover", "neutralFillToggleActive", "neutralFillToggleFocus", "neutralFocus", "neutralFocusInnerAccent", "neutralOutlineRest", "neutralOutlineHover", "neutralOutlineActive", "neutralOutlineFocus", "typeRampBase", "typeRampMinus1", "typeRampMinus2", "typeRampPlus1", "typeRampPlus2", "typeRampPlus3", "typeRampPlus4", "typeRampPlus5", "typeRampPlus6", "accordionStyles$1", "focusTreatmentBase", "focusTreatmentTight", "heightNumber", "neutralFillStealthRestOnNeutralFillLayerRest", "baseRecipe", "neutralFillStealthHoverOnNeutralFillLayerRest", "neutralFillStealthActiveOnNeutralFillLayerRest", "accordionItemStyles$1", "fluentAccordionItem", "accordionItemStyles", "fluentAccordion", "accordionStyles", "__decorate", "DirectionalStyleSheetBehavior", "ltr", "rtl", "DirectionalStyleSheetBehaviorSubscription", "ambientShadow", "directionalShadow", "elevation", "elevationShadowRecipe", "ambientOpacity", "directionalOpacity", "ambient", "directional", "elevationShadowCardRestSize", "elevationShadowCardHoverSize", "elevationShadowCardActiveSize", "elevationShadowCardFocusSize", "elevationShadowCardRest", "elevationShadowCardHover", "elevationShadowCardActive", "elevationShadowCardFocus", "elevationShadowTooltipSize", "elevationShadowTooltip", "elevationShadowFlyoutSize", "elevationShadowFlyout", "elevationShadowDialogSize", "elevationShadowDialog", "baseButtonStyles", "interactivitySelector", "nonInteractivitySelector", "NeutralButtonStyles", "AccentButtonStyles", "HypertextStyles", "LightweightButtonStyles", "OutlineButtonStyles", "StealthButtonStyles", "placeholderRest", "placeholderHover", "filledPlaceholderRest", "filledPlaceholderHover", "baseInputStyles", "logicalControlSelector", "inputStateStyles", "inputOutlineStyles", "inputFilledStyles", "inputForcedColorStyles", "appearanceBehavior", "interactivitySelector$3", "anchorStyles$1", "Anchor", "slottedElements", "anchorStyles", "fluentAnchor", "anchoredRegionStyles$1", "fluentAnchoredRegion", "anchoredRegionStyles", "badgeStyles$1", "Badge", "fluentBadge", "badgeStyles", "breadcrumbStyles$1", "fluentBreadcrumb", "breadcrumbStyles", "breadcrumbItemStyles$1", "fluentBreadcrumbItem", "breadcrumbItemStyles", "interactivitySelector$2", "nonInteractivitySelector$1", "buttonStyles$1", "Button", "fluentButton", "buttonStyles", "ltrStyles", "rtlStyles", "calendarStyles", "Calendar", "fluentCalendar", "cardStyles$1", "Card", "parsedColor", "parentNotifier", "fluentCard", "cardStyles", "checkboxStyles$1", "fluentCheckbox", "checkboxStyles", "logicalControlSelector$5", "interactivitySelector$1", "baseSelectStyles", "baseSelectForcedColorStyles", "selectStyles$1", "logicalControlSelector$4", "comboboxStyles$1", "Combobox", "fluentCombobox", "comboboxStyles", "dataGridStyles$1", "dataGridRowStyles$1", "dataGridCellStyles$1", "fluentDataGridCell", "dataGridCellStyles", "fluentDataGridRow", "dataGridRowStyles", "fluentDataGrid", "dataGridStyles", "swatchConverter", "backgroundStyles", "designToken", "DesignSystemProvider", "fluentDesignSystemProvider", "dialogStyles$1", "fluentDialog", "dialogStyles", "dividerStyles$1", "fluentDivider", "dividerStyles", "flipperStyles$1", "fluentFlipper", "flipperStyles", "ltrActionsStyles", "rtlActionsStyles", "ActionsStyles", "horizontalScrollStyles$1", "HorizontalScroll", "fluentHorizontalScroll", "horizontalScrollStyles", "listboxStyles$1", "Listbox", "fluentListbox", "listboxStyles", "optionStyles", "fluentOption", "OptionStyles", "menuStyles$1", "Menu", "fluentMenu", "menuStyles", "menuItemStyles$1", "fluentMenuItem", "menuItemStyles", "logicalControlSelector$3", "numberFieldStyles$1", "NumberField", "numberFieldStyles", "fluentNumberField", "progressStyles$1", "Progress", "fluentProgress", "progressStyles", "progressRingStyles$1", "ProgressRing", "fluentProgressRing", "progressRingStyles", "radioStyles", "fluentRadio", "RadioStyles", "radioGroupStyles$1", "fluentRadioGroup", "radioGroupStyles", "searchTemplate", "logicalControlSelector$2", "clearButtonHover", "buttonRecipe", "inputRecipe", "clearButtonActive", "searchStyles$1", "Search", "fluentSearch", "searchStyles", "Select", "fluentSelect", "selectStyles", "skeletonStyles$1", "fluentSkeleton", "skeletonStyles", "sliderStyles$1", "fluentSlider", "sliderStyles", "sliderLabelStyles$1", "fluentSliderLabel", "sliderLabelStyles", "switchStyles$1", "fluentSwitch", "switchStyles", "tabsStyles$1", "tabStyles$1", "fluentTab", "tabStyles", "tabPanelStyles$1", "fluentTabPanel", "tabPanelStyles", "fluentTabs", "tabsStyles", "logicalControlSelector$1", "textAreaStyles$1", "TextArea", "fluentTextArea", "textAreaStyles", "textFieldStyles$1", "TextField", "fluentTextField", "textFieldStyles", "toolbarStyles", "Toolbar", "fluentToolbar", "tooltipStyles", "Tooltip", "fluentTooltip", "treeViewStyles$1", "fluentTreeView", "treeViewStyles", "expandCollapseButtonSize", "expandCollapseHover", "recipe", "selectedExpandCollapseHover", "treeItemStyles$1", "fluentTreeItem", "treeItemStyles", "allComponents", "rest", "provideFluentDesignSystem", "FluentDesignSystem", "clamp", "min", "max", "normalize", "denormalize", "getHexStringForByte", "s", "clamp", "TwoPI", "roundToPrecisionSmall", "precision", "factor", "ColorRGBA64", "_ColorRGBA64", "red", "green", "blue", "alpha", "data", "rhs", "denormalize", "clamp", "precision", "roundToPrecisionSmall", "value", "getHexStringForByte", "hexRGBRegex", "parseColorHexRGB", "raw", "result", "hexRGBRegex", "digits", "r", "g", "b", "rawInt", "ColorRGBA64", "normalize", "fireEvent", "element", "eventName", "detail", "event", "styleString", "template", "SplitPanels", "#direction", "#isResizing", "#collapsed", "#barsize", "#barhandle", "#slot1size", "#slot2size", "#slot1minsize", "#slot2minsize", "#totalsize", "shadow", "styleSheet", "style", "e", "clientRect", "newMedianStart", "median", "min1size", "min2size", "totalSize", "slot1fraction", "slot2fraction", "newMedianTop", "name", "oldValue", "newValue", "value", "realValue", "ColorsUtils", "_ColorsUtils", "raw", "result", "digits", "g", "b", "rawInt", "ColorRGB", "i", "min", "max", "name", "item", "red", "green", "blue", "ThemeStorage", "_ThemeStorage", "designTheme", "mode", "primaryColor", "storageJson", "storageItems", "value", "Synchronization", "designTheme", "id", "name", "value", "components", "i", "component", "DesignTheme", "ThemeStorage", "Synchronization", "value", "baseLayerLuminance", "StandardLuminance", "color", "ColorsUtils", "rgb", "swatch", "SwatchRGB", "accentBaseColor", "existingComponent", "mode", "theme", "defaultMode", "name", "oldValue", "newValue", "e", "currentMode", "pageScriptInfoBySrc", "FluentPageScript", "name", "oldValue", "newValue", "src", "pageScriptInfo", "module", "onEnhancedLoad", "referenceCount", "styleSheet", "styles", "beforeStartCalled", "afterStartedCalled", "afterWebStarted", "blazor", "afterStarted", "beforeWebStart", "options", "beforeStart", "beforeWebAssemblyStart", "afterWebAssemblyStarted", "beforeServerStart", "afterServerStarted", "mode", "event", "luminance", "FluentPageScript", "onEnhancedLoad", "DesignTheme", "SplitPanels"]
}