{
  "version": 3,
  "sources": ["../../../node_modules/.aspect_rules_js/lit-html@3.2.0/node_modules/lit-html/src/lit-html.ts", "../../../node_modules/.aspect_rules_js/lit@3.2.0/node_modules/lit/html.js", "../../../node_modules/.aspect_rules_js/lit-html@3.2.0/node_modules/lit-html/src/directives/choose.ts", "../../../node_modules/.aspect_rules_js/lit@3.2.0/node_modules/lit/directives/choose.js", "../../../elements-sk/modules/define.ts", "../../../elements-sk/modules/upgradeProperty.ts", "../../../infra-sk/modules/ElementSk/ElementSk.ts", "../../../infra-sk/modules/ElementSk/index.ts", "../../../elements-sk/modules/toast-sk/toast-sk.ts", "../../../elements-sk/modules/toast-sk/index.ts", "../../../elements-sk/modules/error-toast-sk/error-toast-sk.ts", "../../../elements-sk/modules/error-toast-sk/index.ts", "../../../elements-sk/modules/icons/add-alert-icon-sk/add-alert-icon-sk.ts", "../../../elements-sk/modules/icons/add-alert-icon-sk/index.ts", "../../../elements-sk/modules/icons/build-icon-sk/build-icon-sk.ts", "../../../elements-sk/modules/icons/build-icon-sk/index.ts", "../../../elements-sk/modules/icons/bug-report-icon-sk/bug-report-icon-sk.ts", "../../../elements-sk/modules/icons/bug-report-icon-sk/index.ts", "../../../elements-sk/modules/icons/event-icon-sk/event-icon-sk.ts", "../../../elements-sk/modules/icons/event-icon-sk/index.ts", "../../../elements-sk/modules/icons/favorite-icon-sk/favorite-icon-sk.ts", "../../../elements-sk/modules/icons/favorite-icon-sk/index.ts", "../../../elements-sk/modules/icons/folder-icon-sk/folder-icon-sk.ts", "../../../elements-sk/modules/icons/folder-icon-sk/index.ts", "../../../elements-sk/modules/icons/help-icon-sk/help-icon-sk.ts", "../../../elements-sk/modules/icons/help-icon-sk/index.ts", "../../../elements-sk/modules/icons/home-icon-sk/home-icon-sk.ts", "../../../elements-sk/modules/icons/home-icon-sk/index.ts", "../../../elements-sk/modules/icons/multiline-chart-icon-sk/multiline-chart-icon-sk.ts", "../../../elements-sk/modules/icons/multiline-chart-icon-sk/index.ts", "../../../elements-sk/modules/icons/sort-icon-sk/sort-icon-sk.ts", "../../../elements-sk/modules/icons/sort-icon-sk/index.ts", "../../../elements-sk/modules/icons/trending-up-icon-sk/trending-up-icon-sk.ts", "../../../elements-sk/modules/icons/trending-up-icon-sk/index.ts", "../../../elements-sk/modules/errorMessage.ts", "../../../infra-sk/modules/url/index.ts", "../../../infra-sk/modules/alogin-sk/alogin-sk.ts", "../../../infra-sk/modules/alogin-sk/index.ts", "../../../elements-sk/modules/icons/invert-colors-icon-sk/invert-colors-icon-sk.ts", "../../../elements-sk/modules/icons/invert-colors-icon-sk/index.ts", "../../../infra-sk/modules/theme-chooser-sk/theme-chooser-sk.ts", "../../../infra-sk/modules/theme-chooser-sk/index.ts", "../../../elements-sk/modules/icons/menu-icon-sk/menu-icon-sk.ts", "../../../elements-sk/modules/icons/menu-icon-sk/index.ts", "../../../infra-sk/modules/app-sk/app-sk.ts", "../../../infra-sk/modules/app-sk/index.ts", "../../modules/window/window.ts", "../../modules/perf-scaffold-sk/perf-scaffold-sk.ts", "../../modules/perf-scaffold-sk/index.ts", "../../../infra-sk/modules/query.ts", "../../../infra-sk/modules/object.ts", "../../../infra-sk/modules/jsonOrThrow.ts", "../../../infra-sk/modules/dom.ts", "../../../infra-sk/modules/stateReflector.ts", "../../modules/errorMessage/index.ts", "../../../elements-sk/modules/spinner-sk/spinner-sk.ts", "../../../elements-sk/modules/spinner-sk/index.ts", "../../../elements-sk/modules/collapse-sk/collapse-sk.ts", "../../../elements-sk/modules/collapse-sk/index.ts", "../../../infra-sk/modules/human.ts", "../../modules/json/index.ts", "../../../node_modules/.aspect_rules_js/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs", "../../../node_modules/.aspect_rules_js/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/src/decorators/custom-element.ts", "../../../node_modules/.aspect_rules_js/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/src/css-tag.ts", "../../../node_modules/.aspect_rules_js/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/src/reactive-element.ts", "../../../node_modules/.aspect_rules_js/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/src/decorators/property.ts", "../../../node_modules/.aspect_rules_js/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/src/decorators/state.ts", "../../../node_modules/.aspect_rules_js/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/src/decorators/base.ts", "../../../node_modules/.aspect_rules_js/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/src/decorators/query.ts", "../../../node_modules/.aspect_rules_js/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/src/decorators/query-assigned-elements.ts", "../../../node_modules/.aspect_rules_js/lit@3.2.0/node_modules/lit/decorators.js", "../../../node_modules/.aspect_rules_js/lit-element@4.1.0/node_modules/lit-element/src/lit-element.ts", "../../../node_modules/.aspect_rules_js/lit@3.2.0/node_modules/lit/index.js", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/internal/controller/attachable-controller.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/focus/internal/focus-ring.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/focus/internal/focus-ring-styles.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/focus/md-focus-ring.ts", "../../../node_modules/.aspect_rules_js/lit-html@3.2.0/node_modules/lit-html/src/directive.ts", "../../../node_modules/.aspect_rules_js/lit-html@3.2.0/node_modules/lit-html/src/directives/class-map.ts", "../../../node_modules/.aspect_rules_js/lit@3.2.0/node_modules/lit/directives/class-map.js", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/internal/motion/animation.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/ripple/internal/ripple.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/ripple/internal/ripple-styles.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/ripple/ripple.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/internal/aria/aria.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/internal/aria/delegate.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/labs/behaviors/element-internals.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/internal/controller/form-submitter.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/internal/events/form-label-activation.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/button/internal/button.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/button/internal/outlined-button.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/button/internal/outlined-styles.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/button/internal/shared-styles.ts", "../../../node_modules/.aspect_rules_js/@material+web@2.1.0/node_modules/@material/web/button/outlined-button.ts", "../../modules/commit-detail-sk/commit-detail-sk.ts", "../../modules/commit-detail-sk/index.ts", "../../modules/commit-detail-panel-sk/commit-detail-panel-sk.ts", "../../modules/commit-detail-panel-sk/index.ts", "../../../node_modules/.aspect_rules_js/d3-array@2.12.1/node_modules/d3-array/dist/d3-array.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/init.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/ordinal.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/band.js", "../../../node_modules/.aspect_rules_js/d3-color@3.1.0/node_modules/d3-color/src/define.js", "../../../node_modules/.aspect_rules_js/d3-color@3.1.0/node_modules/d3-color/src/color.js", "../../../node_modules/.aspect_rules_js/d3-color@3.1.0/node_modules/d3-color/src/index.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/basis.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/basisClosed.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/constant.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/color.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/rgb.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/numberArray.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/array.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/date.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/number.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/object.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/string.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/value.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/round.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/piecewise.js", "../../../node_modules/.aspect_rules_js/d3-interpolate@3.0.0/node_modules/d3-interpolate/src/index.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/constant.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/number.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/continuous.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/formatDecimal.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/exponent.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/formatGroup.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/formatNumerals.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/formatSpecifier.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/formatTrim.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/formatPrefixAuto.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/formatRounded.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/formatTypes.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/identity.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/locale.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/defaultLocale.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/precisionFixed.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/precisionPrefix.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/precisionRound.js", "../../../node_modules/.aspect_rules_js/d3-format@2.0.0/node_modules/d3-format/src/index.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/tickFormat.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/linear.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/identity.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/nice.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/log.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/symlog.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/pow.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/radial.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/quantile.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/quantize.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/threshold.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/interval.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/millisecond.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/second.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/minute.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/hour.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/day.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/week.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/month.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/year.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/utcMinute.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/utcHour.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/utcDay.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/utcWeek.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/utcMonth.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/utcYear.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/ticks.js", "../../../node_modules/.aspect_rules_js/d3-time@2.1.1/node_modules/d3-time/src/index.js", "../../../node_modules/.aspect_rules_js/d3-time-format@3.0.0/node_modules/d3-time-format/src/locale.js", "../../../node_modules/.aspect_rules_js/d3-time-format@3.0.0/node_modules/d3-time-format/src/defaultLocale.js", "../../../node_modules/.aspect_rules_js/d3-time-format@3.0.0/node_modules/d3-time-format/src/index.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/time.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/utcTime.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/sequential.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/sequentialQuantile.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/diverging.js", "../../../node_modules/.aspect_rules_js/d3-scale@4.0.2/node_modules/d3-scale/src/index.js", "../../modules/plot-simple-sk/kd.ts", "../../modules/const/const.ts", "../../modules/common/plot-builder.ts", "../../modules/plot-simple-sk/plot-simple-sk.ts", "../../modules/plot-simple-sk/index.ts", "../../../elements-sk/modules/icons/check-circle-icon-sk/check-circle-icon-sk.ts", "../../../elements-sk/modules/icons/check-circle-icon-sk/index.ts", "../../../elements-sk/modules/icons/cancel-icon-sk/cancel-icon-sk.ts", "../../../elements-sk/modules/icons/cancel-icon-sk/index.ts", "../../modules/triage2-sk/triage2-sk.ts", "../../modules/triage2-sk/index.ts", "../../modules/word-cloud-sk/word-cloud-sk.ts", "../../modules/word-cloud-sk/index.ts", "../../modules/cid/cid.ts", "../../modules/commit-range-sk/commit-range-sk.ts", "../../modules/commit-range-sk/index.ts", "../../modules/plot-simple-sk/ticks.ts", "../../modules/cluster-summary2-sk/cluster-summary2-sk.ts", "../../modules/cluster-summary2-sk/index.ts", "../../../elements-sk/modules/icons/date-range-icon-sk/date-range-icon-sk.ts", "../../../elements-sk/modules/icons/date-range-icon-sk/index.ts", "../../../elements-sk/modules/icons/navigate-before-icon-sk/navigate-before-icon-sk.ts", "../../../elements-sk/modules/icons/navigate-before-icon-sk/index.ts", "../../../elements-sk/modules/icons/navigate-next-icon-sk/navigate-next-icon-sk.ts", "../../../elements-sk/modules/icons/navigate-next-icon-sk/index.ts", "../../modules/calendar-sk/calendar-sk.ts", "../../modules/calendar-sk/index.ts", "../../modules/calendar-input-sk/calendar-input-sk.ts", "../../modules/calendar-input-sk/index.ts", "../../modules/day-range-sk/day-range-sk.ts", "../../modules/day-range-sk/index.ts", "../../modules/tricon2-sk/tricon2-sk.ts", "../../modules/tricon2-sk/index.ts", "../../modules/triage-status-sk/triage-status-sk.ts", "../../modules/triage-status-sk/index.ts", "../../modules/triage-page-sk/triage-page-sk.ts", "../../modules/triage-page-sk/index.ts", "../triage.ts"],
  "sourcesContent": ["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n// IMPORTANT: these imports must be type-only\nimport type {Directive, DirectiveResult, PartInfo} from './directive.js';\nimport type {TrustedHTML, TrustedTypesWindow} from 'trusted-types/lib';\n\nconst DEV_MODE = true;\nconst ENABLE_EXTRA_SECURITY_HOOKS = true;\nconst ENABLE_SHADYDOM_NOPATCH = true;\nconst NODE_MODE = false;\n\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace LitUnstable {\n  /**\n   * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n   * we will emit 'lit-debug' events to window, with live details about the update and render\n   * lifecycle. These can be useful for writing debug tooling and visualizations.\n   *\n   * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n   * making certain operations that are normally very cheap (like a no-op render) much slower,\n   * because we must copy data and dispatch events.\n   */\n  // eslint-disable-next-line @typescript-eslint/no-namespace\n  export namespace DebugLog {\n    export type Entry =\n      | TemplatePrep\n      | TemplateInstantiated\n      | TemplateInstantiatedAndUpdated\n      | TemplateUpdating\n      | BeginRender\n      | EndRender\n      | CommitPartEntry\n      | SetPartValue;\n    export interface TemplatePrep {\n      kind: 'template prep';\n      template: Template;\n      strings: TemplateStringsArray;\n      clonableTemplate: HTMLTemplateElement;\n      parts: TemplatePart[];\n    }\n    export interface BeginRender {\n      kind: 'begin render';\n      id: number;\n      value: unknown;\n      container: HTMLElement | DocumentFragment;\n      options: RenderOptions | undefined;\n      part: ChildPart | undefined;\n    }\n    export interface EndRender {\n      kind: 'end render';\n      id: number;\n      value: unknown;\n      container: HTMLElement | DocumentFragment;\n      options: RenderOptions | undefined;\n      part: ChildPart;\n    }\n    export interface TemplateInstantiated {\n      kind: 'template instantiated';\n      template: Template | CompiledTemplate;\n      instance: TemplateInstance;\n      options: RenderOptions | undefined;\n      fragment: Node;\n      parts: Array<Part | undefined>;\n      values: unknown[];\n    }\n    export interface TemplateInstantiatedAndUpdated {\n      kind: 'template instantiated and updated';\n      template: Template | CompiledTemplate;\n      instance: TemplateInstance;\n      options: RenderOptions | undefined;\n      fragment: Node;\n      parts: Array<Part | undefined>;\n      values: unknown[];\n    }\n    export interface TemplateUpdating {\n      kind: 'template updating';\n      template: Template | CompiledTemplate;\n      instance: TemplateInstance;\n      options: RenderOptions | undefined;\n      parts: Array<Part | undefined>;\n      values: unknown[];\n    }\n    export interface SetPartValue {\n      kind: 'set part';\n      part: Part;\n      value: unknown;\n      valueIndex: number;\n      values: unknown[];\n      templateInstance: TemplateInstance;\n    }\n\n    export type CommitPartEntry =\n      | CommitNothingToChildEntry\n      | CommitText\n      | CommitNode\n      | CommitAttribute\n      | CommitProperty\n      | CommitBooleanAttribute\n      | CommitEventListener\n      | CommitToElementBinding;\n\n    export interface CommitNothingToChildEntry {\n      kind: 'commit nothing to child';\n      start: ChildNode;\n      end: ChildNode | null;\n      parent: Disconnectable | undefined;\n      options: RenderOptions | undefined;\n    }\n\n    export interface CommitText {\n      kind: 'commit text';\n      node: Text;\n      value: unknown;\n      options: RenderOptions | undefined;\n    }\n\n    export interface CommitNode {\n      kind: 'commit node';\n      start: Node;\n      parent: Disconnectable | undefined;\n      value: Node;\n      options: RenderOptions | undefined;\n    }\n\n    export interface CommitAttribute {\n      kind: 'commit attribute';\n      element: Element;\n      name: string;\n      value: unknown;\n      options: RenderOptions | undefined;\n    }\n\n    export interface CommitProperty {\n      kind: 'commit property';\n      element: Element;\n      name: string;\n      value: unknown;\n      options: RenderOptions | undefined;\n    }\n\n    export interface CommitBooleanAttribute {\n      kind: 'commit boolean attribute';\n      element: Element;\n      name: string;\n      value: boolean;\n      options: RenderOptions | undefined;\n    }\n\n    export interface CommitEventListener {\n      kind: 'commit event listener';\n      element: Element;\n      name: string;\n      value: unknown;\n      oldListener: unknown;\n      options: RenderOptions | undefined;\n      // True if we're removing the old event listener (e.g. because settings changed, or value is nothing)\n      removeListener: boolean;\n      // True if we're adding a new event listener (e.g. because first render, or settings changed)\n      addListener: boolean;\n    }\n\n    export interface CommitToElementBinding {\n      kind: 'commit to element binding';\n      element: Element;\n      value: unknown;\n      options: RenderOptions | undefined;\n    }\n  }\n}\n\ninterface DebugLoggingWindow {\n  // Even in dev mode, we generally don't want to emit these events, as that's\n  // another level of cost, so only emit them when DEV_MODE is true _and_ when\n  // window.emitLitDebugEvents is true.\n  emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n  ? (event: LitUnstable.DebugLog.Entry) => {\n      const shouldEmit = (global as unknown as DebugLoggingWindow)\n        .emitLitDebugLogEvents;\n      if (!shouldEmit) {\n        return;\n      }\n      global.dispatchEvent(\n        new CustomEvent<LitUnstable.DebugLog.Entry>('lit-debug', {\n          detail: event,\n        }),\n      );\n    }\n  : undefined;\n// Used for connecting beginRender and endRender events when there are nested\n// renders when errors are thrown preventing an endRender event from being\n// called.\nlet debugLogRenderId = 0;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n  global.litIssuedWarnings ??= new Set();\n\n  // Issue a warning, if we haven't already.\n  issueWarning = (code: string, warning: string) => {\n    warning += code\n      ? ` See https://lit.dev/msg/${code} for more information.`\n      : '';\n    if (!global.litIssuedWarnings!.has(warning)) {\n      console.warn(warning);\n      global.litIssuedWarnings!.add(warning);\n    }\n  };\n\n  issueWarning(\n    'dev-mode',\n    `Lit is in dev mode. Not recommended for production!`,\n  );\n}\n\nconst wrap =\n  ENABLE_SHADYDOM_NOPATCH &&\n  global.ShadyDOM?.inUse &&\n  global.ShadyDOM?.noPatch === true\n    ? (global.ShadyDOM!.wrap as <T extends Node>(node: T) => T)\n    : <T extends Node>(node: T) => node;\n\nconst trustedTypes = (global as unknown as TrustedTypesWindow).trustedTypes;\n\n/**\n * Our TrustedTypePolicy for HTML which is declared using the html template\n * tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n */\nconst policy = trustedTypes\n  ? trustedTypes.createPolicy('lit-html', {\n      createHTML: (s) => s,\n    })\n  : undefined;\n\n/**\n * Used to sanitize any value before it is written into the DOM. This can be\n * used to implement a security policy of allowed and disallowed values in\n * order to prevent XSS attacks.\n *\n * One way of using this callback would be to check attributes and properties\n * against a list of high risk fields, and require that values written to such\n * fields be instances of a class which is safe by construction. Closure's Safe\n * HTML Types is one implementation of this technique (\n * https://github.com/google/safe-html-types/blob/master/doc/safehtml-types.md).\n * The TrustedTypes polyfill in API-only mode could also be used as a basis\n * for this technique (https://github.com/WICG/trusted-types).\n *\n * @param node The HTML node (usually either a #text node or an Element) that\n *     is being written to. Note that this is just an exemplar node, the write\n *     may take place against another instance of the same class of node.\n * @param name The name of an attribute or property (for example, 'href').\n * @param type Indicates whether the write that's about to be performed will\n *     be to a property or a node.\n * @return A function that will sanitize this class of writes.\n */\nexport type SanitizerFactory = (\n  node: Node,\n  name: string,\n  type: 'property' | 'attribute',\n) => ValueSanitizer;\n\n/**\n * A function which can sanitize values that will be written to a specific kind\n * of DOM sink.\n *\n * See SanitizerFactory.\n *\n * @param value The value to sanitize. Will be the actual value passed into\n *     the lit-html template literal, so this could be of any type.\n * @return The value to write to the DOM. Usually the same as the input value,\n *     unless sanitization is needed.\n */\nexport type ValueSanitizer = (value: unknown) => unknown;\n\nconst identityFunction: ValueSanitizer = (value: unknown) => value;\nconst noopSanitizer: SanitizerFactory = (\n  _node: Node,\n  _name: string,\n  _type: 'property' | 'attribute',\n) => identityFunction;\n\n/** Sets the global sanitizer factory. */\nconst setSanitizer = (newSanitizer: SanitizerFactory) => {\n  if (!ENABLE_EXTRA_SECURITY_HOOKS) {\n    return;\n  }\n  if (sanitizerFactoryInternal !== noopSanitizer) {\n    throw new Error(\n      `Attempted to overwrite existing lit-html security policy.` +\n        ` setSanitizeDOMValueFactory should be called at most once.`,\n    );\n  }\n  sanitizerFactoryInternal = newSanitizer;\n};\n\n/**\n * Only used in internal tests, not a part of the public API.\n */\nconst _testOnlyClearSanitizerFactoryDoNotCallOrElse = () => {\n  sanitizerFactoryInternal = noopSanitizer;\n};\n\nconst createSanitizer: SanitizerFactory = (node, name, type) => {\n  return sanitizerFactoryInternal(node, name, type);\n};\n\n// Added to an attribute name to mark the attribute as bound so we can find\n// it easily.\nconst boundAttributeSuffix = '$lit$';\n\n// This marker is used in many syntactic positions in HTML, so it must be\n// a valid element name and attribute name. We don't support dynamic names (yet)\n// but this at least ensures that the parse tree is closer to the template\n// intention.\nconst marker = `lit$${Math.random().toFixed(9).slice(2)}$`;\n\n// String used to tell if a comment is a marker comment\nconst markerMatch = '?' + marker;\n\n// Text used to insert a comment marker node. We use processing instruction\n// syntax because it's slightly smaller, but parses as a comment node.\nconst nodeMarker = `<${markerMatch}>`;\n\nconst d =\n  NODE_MODE && global.document === undefined\n    ? ({\n        createTreeWalker() {\n          return {};\n        },\n      } as unknown as Document)\n    : document;\n\n// Creates a dynamic marker. We never have to search for these in the DOM.\nconst createMarker = () => d.createComment('');\n\n// https://tc39.github.io/ecma262/#sec-typeof-operator\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\nconst isPrimitive = (value: unknown): value is Primitive =>\n  value === null || (typeof value != 'object' && typeof value != 'function');\nconst isArray = Array.isArray;\nconst isIterable = (value: unknown): value is Iterable<unknown> =>\n  isArray(value) ||\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  typeof (value as any)?.[Symbol.iterator] === 'function';\n\nconst SPACE_CHAR = `[ \\t\\n\\f\\r]`;\nconst ATTR_VALUE_CHAR = `[^ \\t\\n\\f\\r\"'\\`<>=]`;\nconst NAME_CHAR = `[^\\\\s\"'>=/]`;\n\n// These regexes represent the five parsing states that we care about in the\n// Template's HTML scanner. They match the *end* of the state they're named\n// after.\n// Depending on the match, we transition to a new state. If there's no match,\n// we stay in the same state.\n// Note that the regexes are stateful. We utilize lastIndex and sync it\n// across the multiple regexes used. In addition to the five regexes below\n// we also dynamically create a regex to find the matching end tags for raw\n// text elements.\n\n/**\n * End of text is: `<` followed by:\n *   (comment start) or (tag) or (dynamic tag binding)\n */\nconst textEndRegex = /<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g;\nconst COMMENT_START = 1;\nconst TAG_NAME = 2;\nconst DYNAMIC_TAG_NAME = 3;\n\nconst commentEndRegex = /-->/g;\n/**\n * Comments not started with <!--, like </{, can be ended by a single `>`\n */\nconst comment2EndRegex = />/g;\n\n/**\n * The tagEnd regex matches the end of the \"inside an opening\" tag syntax\n * position. It either matches a `>`, an attribute-like sequence, or the end\n * of the string after a space (attribute-name position ending).\n *\n * See attributes in the HTML spec:\n * https://www.w3.org/TR/html5/syntax.html#elements-attributes\n *\n * \" \\t\\n\\f\\r\" are HTML space characters:\n * https://infra.spec.whatwg.org/#ascii-whitespace\n *\n * So an attribute is:\n *  * The name: any character except a whitespace character, (\"), ('), \">\",\n *    \"=\", or \"/\". Note: this is different from the HTML spec which also excludes control characters.\n *  * Followed by zero or more space characters\n *  * Followed by \"=\"\n *  * Followed by zero or more space characters\n *  * Followed by:\n *    * Any character except space, ('), (\"), \"<\", \">\", \"=\", (`), or\n *    * (\") then any non-(\"), or\n *    * (') then any non-(')\n */\nconst tagEndRegex = new RegExp(\n  `>|${SPACE_CHAR}(?:(${NAME_CHAR}+)(${SPACE_CHAR}*=${SPACE_CHAR}*(?:${ATTR_VALUE_CHAR}|(\"|')|))|$)`,\n  'g',\n);\nconst ENTIRE_MATCH = 0;\nconst ATTRIBUTE_NAME = 1;\nconst SPACES_AND_EQUALS = 2;\nconst QUOTE_CHAR = 3;\n\nconst singleQuoteAttrEndRegex = /'/g;\nconst doubleQuoteAttrEndRegex = /\"/g;\n/**\n * Matches the raw text elements.\n *\n * Comments are not parsed within raw text elements, so we need to search their\n * text content for marker strings.\n */\nconst rawTextElement = /^(?:script|style|textarea|title)$/i;\n\n/** TemplateResult types */\nconst HTML_RESULT = 1;\nconst SVG_RESULT = 2;\nconst MATHML_RESULT = 3;\n\ntype ResultType = typeof HTML_RESULT | typeof SVG_RESULT | typeof MATHML_RESULT;\n\n// TemplatePart types\n// IMPORTANT: these must match the values in PartType\nconst ATTRIBUTE_PART = 1;\nconst CHILD_PART = 2;\nconst PROPERTY_PART = 3;\nconst BOOLEAN_ATTRIBUTE_PART = 4;\nconst EVENT_PART = 5;\nconst ELEMENT_PART = 6;\nconst COMMENT_PART = 7;\n\n/**\n * The return type of the template tag functions, {@linkcode html} and\n * {@linkcode svg} when it hasn't been compiled by @lit-labs/compiler.\n *\n * A `TemplateResult` object holds all the information about a template\n * expression required to render it: the template strings, expression values,\n * and type of template (html or svg).\n *\n * `TemplateResult` objects do not create any DOM on their own. To create or\n * update DOM you need to render the `TemplateResult`. See\n * [Rendering](https://lit.dev/docs/components/rendering) for more information.\n *\n */\nexport type UncompiledTemplateResult<T extends ResultType = ResultType> = {\n  // This property needs to remain unminified.\n  ['_$litType$']: T;\n  strings: TemplateStringsArray;\n  values: unknown[];\n};\n\n/**\n * This is a template result that may be either uncompiled or compiled.\n *\n * In the future, TemplateResult will be this type. If you want to explicitly\n * note that a template result is potentially compiled, you can reference this\n * type and it will continue to behave the same through the next major version\n * of Lit. This can be useful for code that wants to prepare for the next\n * major version of Lit.\n */\nexport type MaybeCompiledTemplateResult<T extends ResultType = ResultType> =\n  | UncompiledTemplateResult<T>\n  | CompiledTemplateResult;\n\n/**\n * The return type of the template tag functions, {@linkcode html} and\n * {@linkcode svg}.\n *\n * A `TemplateResult` object holds all the information about a template\n * expression required to render it: the template strings, expression values,\n * and type of template (html or svg).\n *\n * `TemplateResult` objects do not create any DOM on their own. To create or\n * update DOM you need to render the `TemplateResult`. See\n * [Rendering](https://lit.dev/docs/components/rendering) for more information.\n *\n * In Lit 4, this type will be an alias of\n * MaybeCompiledTemplateResult, so that code will get type errors if it assumes\n * that Lit templates are not compiled. When deliberately working with only\n * one, use either {@linkcode CompiledTemplateResult} or\n * {@linkcode UncompiledTemplateResult} explicitly.\n */\nexport type TemplateResult<T extends ResultType = ResultType> =\n  UncompiledTemplateResult<T>;\n\nexport type HTMLTemplateResult = TemplateResult<typeof HTML_RESULT>;\n\nexport type SVGTemplateResult = TemplateResult<typeof SVG_RESULT>;\n\nexport type MathMLTemplateResult = TemplateResult<typeof MATHML_RESULT>;\n\n/**\n * A TemplateResult that has been compiled by @lit-labs/compiler, skipping the\n * prepare step.\n */\nexport interface CompiledTemplateResult {\n  // This is a factory in order to make template initialization lazy\n  // and allow ShadyRenderOptions scope to be passed in.\n  // This property needs to remain unminified.\n  ['_$litType$']: CompiledTemplate;\n  values: unknown[];\n}\n\nexport interface CompiledTemplate extends Omit<Template, 'el'> {\n  // el is overridden to be optional. We initialize it on first render\n  el?: HTMLTemplateElement;\n\n  // The prepared HTML string to create a template element from.\n  // The type is a TemplateStringsArray to guarantee that the value came from\n  // source code, preventing a JSON injection attack.\n  h: TemplateStringsArray;\n}\n\n/**\n * Generates a template literal tag function that returns a TemplateResult with\n * the given result type.\n */\nconst tag =\n  <T extends ResultType>(type: T) =>\n  (strings: TemplateStringsArray, ...values: unknown[]): TemplateResult<T> => {\n    // Warn against templates octal escape sequences\n    // We do this here rather than in render so that the warning is closer to the\n    // template definition.\n    if (DEV_MODE && strings.some((s) => s === undefined)) {\n      console.warn(\n        'Some template strings are undefined.\\n' +\n          'This is probably caused by illegal octal escape sequences.',\n      );\n    }\n    if (DEV_MODE) {\n      // Import static-html.js results in a circular dependency which g3 doesn't\n      // handle. Instead we know that static values must have the field\n      // `_$litStatic$`.\n      if (\n        values.some((val) => (val as {_$litStatic$: unknown})?.['_$litStatic$'])\n      ) {\n        issueWarning(\n          '',\n          `Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\\n` +\n            `Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`,\n        );\n      }\n    }\n    return {\n      // This property needs to remain unminified.\n      ['_$litType$']: type,\n      strings,\n      values,\n    };\n  };\n\n/**\n * Interprets a template literal as an HTML template that can efficiently\n * render to and update a container.\n *\n * ```ts\n * const header = (title: string) => html`<h1>${title}</h1>`;\n * ```\n *\n * The `html` tag returns a description of the DOM to render as a value. It is\n * lazy, meaning no work is done until the template is rendered. When rendering,\n * if a template comes from the same expression as a previously rendered result,\n * it's efficiently updated instead of replaced.\n */\nexport const html = tag(HTML_RESULT);\n\n/**\n * Interprets a template literal as an SVG fragment that can efficiently render\n * to and update a container.\n *\n * ```ts\n * const rect = svg`<rect width=\"10\" height=\"10\"></rect>`;\n *\n * const myImage = html`\n *   <svg viewBox=\"0 0 10 10\" xmlns=\"http://www.w3.org/2000/svg\">\n *     ${rect}\n *   </svg>`;\n * ```\n *\n * The `svg` *tag function* should only be used for SVG fragments, or elements\n * that would be contained **inside** an `<svg>` HTML element. A common error is\n * placing an `<svg>` *element* in a template tagged with the `svg` tag\n * function. The `<svg>` element is an HTML element and should be used within a\n * template tagged with the {@linkcode html} tag function.\n *\n * In LitElement usage, it's invalid to return an SVG fragment from the\n * `render()` method, as the SVG fragment will be contained within the element's\n * shadow root and thus not be properly contained within an `<svg>` HTML\n * element.\n */\nexport const svg = tag(SVG_RESULT);\n\n/**\n * Interprets a template literal as MathML fragment that can efficiently render\n * to and update a container.\n *\n * ```ts\n * const num = mathml`<mn>1</mn>`;\n *\n * const eq = html`\n *   <math>\n *     ${num}\n *   </math>`;\n * ```\n *\n * The `mathml` *tag function* should only be used for MathML fragments, or\n * elements that would be contained **inside** a `<math>` HTML element. A common\n * error is placing a `<math>` *element* in a template tagged with the `mathml`\n * tag function. The `<math>` element is an HTML element and should be used\n * within a template tagged with the {@linkcode html} tag function.\n *\n * In LitElement usage, it's invalid to return an MathML fragment from the\n * `render()` method, as the MathML fragment will be contained within the\n * element's shadow root and thus not be properly contained within a `<math>`\n * HTML element.\n */\nexport const mathml = tag(MATHML_RESULT);\n\n/**\n * A sentinel value that signals that a value was handled by a directive and\n * should not be written to the DOM.\n */\nexport const noChange = Symbol.for('lit-noChange');\n\n/**\n * A sentinel value that signals a ChildPart to fully clear its content.\n *\n * ```ts\n * const button = html`${\n *  user.isAdmin\n *    ? html`<button>DELETE</button>`\n *    : nothing\n * }`;\n * ```\n *\n * Prefer using `nothing` over other falsy values as it provides a consistent\n * behavior between various expression binding contexts.\n *\n * In child expressions, `undefined`, `null`, `''`, and `nothing` all behave the\n * same and render no nodes. In attribute expressions, `nothing` _removes_ the\n * attribute, while `undefined` and `null` will render an empty string. In\n * property expressions `nothing` becomes `undefined`.\n */\nexport const nothing = Symbol.for('lit-nothing');\n\n/**\n * The cache of prepared templates, keyed by the tagged TemplateStringsArray\n * and _not_ accounting for the specific template tag used. This means that\n * template tags cannot be dynamic - they must statically be one of html, svg,\n * or attr. This restriction simplifies the cache lookup, which is on the hot\n * path for rendering.\n */\nconst templateCache = new WeakMap<TemplateStringsArray, Template>();\n\n/**\n * Object specifying options for controlling lit-html rendering. Note that\n * while `render` may be called multiple times on the same `container` (and\n * `renderBefore` reference node) to efficiently update the rendered content,\n * only the options passed in during the first render are respected during\n * the lifetime of renders to that unique `container` + `renderBefore`\n * combination.\n */\nexport interface RenderOptions {\n  /**\n   * An object to use as the `this` value for event listeners. It's often\n   * useful to set this to the host component rendering a template.\n   */\n  host?: object;\n  /**\n   * A DOM node before which to render content in the container.\n   */\n  renderBefore?: ChildNode | null;\n  /**\n   * Node used for cloning the template (`importNode` will be called on this\n   * node). This controls the `ownerDocument` of the rendered DOM, along with\n   * any inherited context. Defaults to the global `document`.\n   */\n  creationScope?: {importNode(node: Node, deep?: boolean): Node};\n  /**\n   * The initial connected state for the top-level part being rendered. If no\n   * `isConnected` option is set, `AsyncDirective`s will be connected by\n   * default. Set to `false` if the initial render occurs in a disconnected tree\n   * and `AsyncDirective`s should see `isConnected === false` for their initial\n   * render. The `part.setConnected()` method must be used subsequent to initial\n   * render to change the connected state of the part.\n   */\n  isConnected?: boolean;\n}\n\nconst walker = d.createTreeWalker(\n  d,\n  129 /* NodeFilter.SHOW_{ELEMENT|COMMENT} */,\n);\n\nlet sanitizerFactoryInternal: SanitizerFactory = noopSanitizer;\n\n//\n// Classes only below here, const variable declarations only above here...\n//\n// Keeping variable declarations and classes together improves minification.\n// Interfaces and type aliases can be interleaved freely.\n//\n\n// Type for classes that have a `_directive` or `_directives[]` field, used by\n// `resolveDirective`\nexport interface DirectiveParent {\n  _$parent?: DirectiveParent;\n  _$isConnected: boolean;\n  __directive?: Directive;\n  __directives?: Array<Directive | undefined>;\n}\n\nfunction trustFromTemplateString(\n  tsa: TemplateStringsArray,\n  stringFromTSA: string,\n): TrustedHTML {\n  // A security check to prevent spoofing of Lit template results.\n  // In the future, we may be able to replace this with Array.isTemplateObject,\n  // though we might need to make that check inside of the html and svg\n  // functions, because precompiled templates don't come in as\n  // TemplateStringArray objects.\n  if (!isArray(tsa) || !tsa.hasOwnProperty('raw')) {\n    let message = 'invalid template strings array';\n    if (DEV_MODE) {\n      message = `\n          Internal Error: expected template strings to be an array\n          with a 'raw' field. Faking a template strings array by\n          calling html or svg like an ordinary function is effectively\n          the same as calling unsafeHtml and can lead to major security\n          issues, e.g. opening your code up to XSS attacks.\n          If you're using the html or svg tagged template functions normally\n          and still seeing this error, please file a bug at\n          https://github.com/lit/lit/issues/new?template=bug_report.md\n          and include information about your build tooling, if any.\n        `\n        .trim()\n        .replace(/\\n */g, '\\n');\n    }\n    throw new Error(message);\n  }\n  return policy !== undefined\n    ? policy.createHTML(stringFromTSA)\n    : (stringFromTSA as unknown as TrustedHTML);\n}\n\n/**\n * Returns an HTML string for the given TemplateStringsArray and result type\n * (HTML or SVG), along with the case-sensitive bound attribute names in\n * template order. The HTML contains comment markers denoting the `ChildPart`s\n * and suffixes on bound attributes denoting the `AttributeParts`.\n *\n * @param strings template strings array\n * @param type HTML or SVG\n * @return Array containing `[html, attrNames]` (array returned for terseness,\n *     to avoid object fields since this code is shared with non-minified SSR\n *     code)\n */\nconst getTemplateHtml = (\n  strings: TemplateStringsArray,\n  type: ResultType,\n): [TrustedHTML, Array<string>] => {\n  // Insert makers into the template HTML to represent the position of\n  // bindings. The following code scans the template strings to determine the\n  // syntactic position of the bindings. They can be in text position, where\n  // we insert an HTML comment, attribute value position, where we insert a\n  // sentinel string and re-write the attribute name, or inside a tag where\n  // we insert the sentinel string.\n  const l = strings.length - 1;\n  // Stores the case-sensitive bound attribute names in the order of their\n  // parts. ElementParts are also reflected in this array as undefined\n  // rather than a string, to disambiguate from attribute bindings.\n  const attrNames: Array<string> = [];\n  let html =\n    type === SVG_RESULT ? '<svg>' : type === MATHML_RESULT ? '<math>' : '';\n\n  // When we're inside a raw text tag (not it's text content), the regex\n  // will still be tagRegex so we can find attributes, but will switch to\n  // this regex when the tag ends.\n  let rawTextEndRegex: RegExp | undefined;\n\n  // The current parsing state, represented as a reference to one of the\n  // regexes\n  let regex = textEndRegex;\n\n  for (let i = 0; i < l; i++) {\n    const s = strings[i];\n    // The index of the end of the last attribute name. When this is\n    // positive at end of a string, it means we're in an attribute value\n    // position and need to rewrite the attribute name.\n    // We also use a special value of -2 to indicate that we encountered\n    // the end of a string in attribute name position.\n    let attrNameEndIndex = -1;\n    let attrName: string | undefined;\n    let lastIndex = 0;\n    let match!: RegExpExecArray | null;\n\n    // The conditions in this loop handle the current parse state, and the\n    // assignments to the `regex` variable are the state transitions.\n    while (lastIndex < s.length) {\n      // Make sure we start searching from where we previously left off\n      regex.lastIndex = lastIndex;\n      match = regex.exec(s);\n      if (match === null) {\n        break;\n      }\n      lastIndex = regex.lastIndex;\n      if (regex === textEndRegex) {\n        if (match[COMMENT_START] === '!--') {\n          regex = commentEndRegex;\n        } else if (match[COMMENT_START] !== undefined) {\n          // We started a weird comment, like </{\n          regex = comment2EndRegex;\n        } else if (match[TAG_NAME] !== undefined) {\n          if (rawTextElement.test(match[TAG_NAME])) {\n            // Record if we encounter a raw-text element. We'll switch to\n            // this regex at the end of the tag.\n            rawTextEndRegex = new RegExp(`</${match[TAG_NAME]}`, 'g');\n          }\n          regex = tagEndRegex;\n        } else if (match[DYNAMIC_TAG_NAME] !== undefined) {\n          if (DEV_MODE) {\n            throw new Error(\n              'Bindings in tag names are not supported. Please use static templates instead. ' +\n                'See https://lit.dev/docs/templates/expressions/#static-expressions',\n            );\n          }\n          regex = tagEndRegex;\n        }\n      } else if (regex === tagEndRegex) {\n        if (match[ENTIRE_MATCH] === '>') {\n          // End of a tag. If we had started a raw-text element, use that\n          // regex\n          regex = rawTextEndRegex ?? textEndRegex;\n          // We may be ending an unquoted attribute value, so make sure we\n          // clear any pending attrNameEndIndex\n          attrNameEndIndex = -1;\n        } else if (match[ATTRIBUTE_NAME] === undefined) {\n          // Attribute name position\n          attrNameEndIndex = -2;\n        } else {\n          attrNameEndIndex = regex.lastIndex - match[SPACES_AND_EQUALS].length;\n          attrName = match[ATTRIBUTE_NAME];\n          regex =\n            match[QUOTE_CHAR] === undefined\n              ? tagEndRegex\n              : match[QUOTE_CHAR] === '\"'\n                ? doubleQuoteAttrEndRegex\n                : singleQuoteAttrEndRegex;\n        }\n      } else if (\n        regex === doubleQuoteAttrEndRegex ||\n        regex === singleQuoteAttrEndRegex\n      ) {\n        regex = tagEndRegex;\n      } else if (regex === commentEndRegex || regex === comment2EndRegex) {\n        regex = textEndRegex;\n      } else {\n        // Not one of the five state regexes, so it must be the dynamically\n        // created raw text regex and we're at the close of that element.\n        regex = tagEndRegex;\n        rawTextEndRegex = undefined;\n      }\n    }\n\n    if (DEV_MODE) {\n      // If we have a attrNameEndIndex, which indicates that we should\n      // rewrite the attribute name, assert that we're in a valid attribute\n      // position - either in a tag, or a quoted attribute value.\n      console.assert(\n        attrNameEndIndex === -1 ||\n          regex === tagEndRegex ||\n          regex === singleQuoteAttrEndRegex ||\n          regex === doubleQuoteAttrEndRegex,\n        'unexpected parse state B',\n      );\n    }\n\n    // We have four cases:\n    //  1. We're in text position, and not in a raw text element\n    //     (regex === textEndRegex): insert a comment marker.\n    //  2. We have a non-negative attrNameEndIndex which means we need to\n    //     rewrite the attribute name to add a bound attribute suffix.\n    //  3. We're at the non-first binding in a multi-binding attribute, use a\n    //     plain marker.\n    //  4. We're somewhere else inside the tag. If we're in attribute name\n    //     position (attrNameEndIndex === -2), add a sequential suffix to\n    //     generate a unique attribute name.\n\n    // Detect a binding next to self-closing tag end and insert a space to\n    // separate the marker from the tag end:\n    const end =\n      regex === tagEndRegex && strings[i + 1].startsWith('/>') ? ' ' : '';\n    html +=\n      regex === textEndRegex\n        ? s + nodeMarker\n        : attrNameEndIndex >= 0\n          ? (attrNames.push(attrName!),\n            s.slice(0, attrNameEndIndex) +\n              boundAttributeSuffix +\n              s.slice(attrNameEndIndex)) +\n            marker +\n            end\n          : s + marker + (attrNameEndIndex === -2 ? i : end);\n  }\n\n  const htmlResult: string | TrustedHTML =\n    html +\n    (strings[l] || '<?>') +\n    (type === SVG_RESULT ? '</svg>' : type === MATHML_RESULT ? '</math>' : '');\n\n  // Returned as an array for terseness\n  return [trustFromTemplateString(strings, htmlResult), attrNames];\n};\n\n/** @internal */\nexport type {Template};\nclass Template {\n  /** @internal */\n  el!: HTMLTemplateElement;\n\n  parts: Array<TemplatePart> = [];\n\n  constructor(\n    // This property needs to remain unminified.\n    {strings, ['_$litType$']: type}: UncompiledTemplateResult,\n    options?: RenderOptions,\n  ) {\n    let node: Node | null;\n    let nodeIndex = 0;\n    let attrNameIndex = 0;\n    const partCount = strings.length - 1;\n    const parts = this.parts;\n\n    // Create template element\n    const [html, attrNames] = getTemplateHtml(strings, type);\n    this.el = Template.createElement(html, options);\n    walker.currentNode = this.el.content;\n\n    // Re-parent SVG or MathML nodes into template root\n    if (type === SVG_RESULT || type === MATHML_RESULT) {\n      const wrapper = this.el.content.firstChild!;\n      wrapper.replaceWith(...wrapper.childNodes);\n    }\n\n    // Walk the template to find binding markers and create TemplateParts\n    while ((node = walker.nextNode()) !== null && parts.length < partCount) {\n      if (node.nodeType === 1) {\n        if (DEV_MODE) {\n          const tag = (node as Element).localName;\n          // Warn if `textarea` includes an expression and throw if `template`\n          // does since these are not supported. We do this by checking\n          // innerHTML for anything that looks like a marker. This catches\n          // cases like bindings in textarea there markers turn into text nodes.\n          if (\n            /^(?:textarea|template)$/i!.test(tag) &&\n            (node as Element).innerHTML.includes(marker)\n          ) {\n            const m =\n              `Expressions are not supported inside \\`${tag}\\` ` +\n              `elements. See https://lit.dev/msg/expression-in-${tag} for more ` +\n              `information.`;\n            if (tag === 'template') {\n              throw new Error(m);\n            } else issueWarning('', m);\n          }\n        }\n        // TODO (justinfagnani): for attempted dynamic tag names, we don't\n        // increment the bindingIndex, and it'll be off by 1 in the element\n        // and off by two after it.\n        if ((node as Element).hasAttributes()) {\n          for (const name of (node as Element).getAttributeNames()) {\n            if (name.endsWith(boundAttributeSuffix)) {\n              const realName = attrNames[attrNameIndex++];\n              const value = (node as Element).getAttribute(name)!;\n              const statics = value.split(marker);\n              const m = /([.?@])?(.*)/.exec(realName)!;\n              parts.push({\n                type: ATTRIBUTE_PART,\n                index: nodeIndex,\n                name: m[2],\n                strings: statics,\n                ctor:\n                  m[1] === '.'\n                    ? PropertyPart\n                    : m[1] === '?'\n                      ? BooleanAttributePart\n                      : m[1] === '@'\n                        ? EventPart\n                        : AttributePart,\n              });\n              (node as Element).removeAttribute(name);\n            } else if (name.startsWith(marker)) {\n              parts.push({\n                type: ELEMENT_PART,\n                index: nodeIndex,\n              });\n              (node as Element).removeAttribute(name);\n            }\n          }\n        }\n        // TODO (justinfagnani): benchmark the regex against testing for each\n        // of the 3 raw text element names.\n        if (rawTextElement.test((node as Element).tagName)) {\n          // For raw text elements we need to split the text content on\n          // markers, create a Text node for each segment, and create\n          // a TemplatePart for each marker.\n          const strings = (node as Element).textContent!.split(marker);\n          const lastIndex = strings.length - 1;\n          if (lastIndex > 0) {\n            (node as Element).textContent = trustedTypes\n              ? (trustedTypes.emptyScript as unknown as '')\n              : '';\n            // Generate a new text node for each literal section\n            // These nodes are also used as the markers for node parts\n            // We can't use empty text nodes as markers because they're\n            // normalized when cloning in IE (could simplify when\n            // IE is no longer supported)\n            for (let i = 0; i < lastIndex; i++) {\n              (node as Element).append(strings[i], createMarker());\n              // Walk past the marker node we just added\n              walker.nextNode();\n              parts.push({type: CHILD_PART, index: ++nodeIndex});\n            }\n            // Note because this marker is added after the walker's current\n            // node, it will be walked to in the outer loop (and ignored), so\n            // we don't need to adjust nodeIndex here\n            (node as Element).append(strings[lastIndex], createMarker());\n          }\n        }\n      } else if (node.nodeType === 8) {\n        const data = (node as Comment).data;\n        if (data === markerMatch) {\n          parts.push({type: CHILD_PART, index: nodeIndex});\n        } else {\n          let i = -1;\n          while ((i = (node as Comment).data.indexOf(marker, i + 1)) !== -1) {\n            // Comment node has a binding marker inside, make an inactive part\n            // The binding won't work, but subsequent bindings will\n            parts.push({type: COMMENT_PART, index: nodeIndex});\n            // Move to the end of the match\n            i += marker.length - 1;\n          }\n        }\n      }\n      nodeIndex++;\n    }\n\n    if (DEV_MODE) {\n      // If there was a duplicate attribute on a tag, then when the tag is\n      // parsed into an element the attribute gets de-duplicated. We can detect\n      // this mismatch if we haven't precisely consumed every attribute name\n      // when preparing the template. This works because `attrNames` is built\n      // from the template string and `attrNameIndex` comes from processing the\n      // resulting DOM.\n      if (attrNames.length !== attrNameIndex) {\n        throw new Error(\n          `Detected duplicate attribute bindings. This occurs if your template ` +\n            `has duplicate attributes on an element tag. For example ` +\n            `\"<input ?disabled=\\${true} ?disabled=\\${false}>\" contains a ` +\n            `duplicate \"disabled\" attribute. The error was detected in ` +\n            `the following template: \\n` +\n            '`' +\n            strings.join('${...}') +\n            '`',\n        );\n      }\n    }\n\n    // We could set walker.currentNode to another node here to prevent a memory\n    // leak, but every time we prepare a template, we immediately render it\n    // and re-use the walker in new TemplateInstance._clone().\n    debugLogEvent &&\n      debugLogEvent({\n        kind: 'template prep',\n        template: this,\n        clonableTemplate: this.el,\n        parts: this.parts,\n        strings,\n      });\n  }\n\n  // Overridden via `litHtmlPolyfillSupport` to provide platform support.\n  /** @nocollapse */\n  static createElement(html: TrustedHTML, _options?: RenderOptions) {\n    const el = d.createElement('template');\n    el.innerHTML = html as unknown as string;\n    return el;\n  }\n}\n\nexport interface Disconnectable {\n  _$parent?: Disconnectable;\n  _$disconnectableChildren?: Set<Disconnectable>;\n  // Rather than hold connection state on instances, Disconnectables recursively\n  // fetch the connection state from the RootPart they are connected in via\n  // getters up the Disconnectable tree via _$parent references. This pushes the\n  // cost of tracking the isConnected state to `AsyncDirectives`, and avoids\n  // needing to pass all Disconnectables (parts, template instances, and\n  // directives) their connection state each time it changes, which would be\n  // costly for trees that have no AsyncDirectives.\n  _$isConnected: boolean;\n}\n\nfunction resolveDirective(\n  part: ChildPart | AttributePart | ElementPart,\n  value: unknown,\n  parent: DirectiveParent = part,\n  attributeIndex?: number,\n): unknown {\n  // Bail early if the value is explicitly noChange. Note, this means any\n  // nested directive is still attached and is not run.\n  if (value === noChange) {\n    return value;\n  }\n  let currentDirective =\n    attributeIndex !== undefined\n      ? (parent as AttributePart).__directives?.[attributeIndex]\n      : (parent as ChildPart | ElementPart | Directive).__directive;\n  const nextDirectiveConstructor = isPrimitive(value)\n    ? undefined\n    : // This property needs to remain unminified.\n      (value as DirectiveResult)['_$litDirective$'];\n  if (currentDirective?.constructor !== nextDirectiveConstructor) {\n    // This property needs to remain unminified.\n    currentDirective?.['_$notifyDirectiveConnectionChanged']?.(false);\n    if (nextDirectiveConstructor === undefined) {\n      currentDirective = undefined;\n    } else {\n      currentDirective = new nextDirectiveConstructor(part as PartInfo);\n      currentDirective._$initialize(part, parent, attributeIndex);\n    }\n    if (attributeIndex !== undefined) {\n      ((parent as AttributePart).__directives ??= [])[attributeIndex] =\n        currentDirective;\n    } else {\n      (parent as ChildPart | Directive).__directive = currentDirective;\n    }\n  }\n  if (currentDirective !== undefined) {\n    value = resolveDirective(\n      part,\n      currentDirective._$resolve(part, (value as DirectiveResult).values),\n      currentDirective,\n      attributeIndex,\n    );\n  }\n  return value;\n}\n\nexport type {TemplateInstance};\n/**\n * An updateable instance of a Template. Holds references to the Parts used to\n * update the template instance.\n */\nclass TemplateInstance implements Disconnectable {\n  _$template: Template;\n  _$parts: Array<Part | undefined> = [];\n\n  /** @internal */\n  _$parent: ChildPart;\n  /** @internal */\n  _$disconnectableChildren?: Set<Disconnectable> = undefined;\n\n  constructor(template: Template, parent: ChildPart) {\n    this._$template = template;\n    this._$parent = parent;\n  }\n\n  // Called by ChildPart parentNode getter\n  get parentNode() {\n    return this._$parent.parentNode;\n  }\n\n  // See comment in Disconnectable interface for why this is a getter\n  get _$isConnected() {\n    return this._$parent._$isConnected;\n  }\n\n  // This method is separate from the constructor because we need to return a\n  // DocumentFragment and we don't want to hold onto it with an instance field.\n  _clone(options: RenderOptions | undefined) {\n    const {\n      el: {content},\n      parts: parts,\n    } = this._$template;\n    const fragment = (options?.creationScope ?? d).importNode(content, true);\n    walker.currentNode = fragment;\n\n    let node = walker.nextNode()!;\n    let nodeIndex = 0;\n    let partIndex = 0;\n    let templatePart = parts[0];\n\n    while (templatePart !== undefined) {\n      if (nodeIndex === templatePart.index) {\n        let part: Part | undefined;\n        if (templatePart.type === CHILD_PART) {\n          part = new ChildPart(\n            node as HTMLElement,\n            node.nextSibling,\n            this,\n            options,\n          );\n        } else if (templatePart.type === ATTRIBUTE_PART) {\n          part = new templatePart.ctor(\n            node as HTMLElement,\n            templatePart.name,\n            templatePart.strings,\n            this,\n            options,\n          );\n        } else if (templatePart.type === ELEMENT_PART) {\n          part = new ElementPart(node as HTMLElement, this, options);\n        }\n        this._$parts.push(part);\n        templatePart = parts[++partIndex];\n      }\n      if (nodeIndex !== templatePart?.index) {\n        node = walker.nextNode()!;\n        nodeIndex++;\n      }\n    }\n    // We need to set the currentNode away from the cloned tree so that we\n    // don't hold onto the tree even if the tree is detached and should be\n    // freed.\n    walker.currentNode = d;\n    return fragment;\n  }\n\n  _update(values: Array<unknown>) {\n    let i = 0;\n    for (const part of this._$parts) {\n      if (part !== undefined) {\n        debugLogEvent &&\n          debugLogEvent({\n            kind: 'set part',\n            part,\n            value: values[i],\n            valueIndex: i,\n            values,\n            templateInstance: this,\n          });\n        if ((part as AttributePart).strings !== undefined) {\n          (part as AttributePart)._$setValue(values, part as AttributePart, i);\n          // The number of values the part consumes is part.strings.length - 1\n          // since values are in between template spans. We increment i by 1\n          // later in the loop, so increment it by part.strings.length - 2 here\n          i += (part as AttributePart).strings!.length - 2;\n        } else {\n          part._$setValue(values[i]);\n        }\n      }\n      i++;\n    }\n  }\n}\n\n/*\n * Parts\n */\ntype AttributeTemplatePart = {\n  readonly type: typeof ATTRIBUTE_PART;\n  readonly index: number;\n  readonly name: string;\n  readonly ctor: typeof AttributePart;\n  readonly strings: ReadonlyArray<string>;\n};\ntype ChildTemplatePart = {\n  readonly type: typeof CHILD_PART;\n  readonly index: number;\n};\ntype ElementTemplatePart = {\n  readonly type: typeof ELEMENT_PART;\n  readonly index: number;\n};\ntype CommentTemplatePart = {\n  readonly type: typeof COMMENT_PART;\n  readonly index: number;\n};\n\n/**\n * A TemplatePart represents a dynamic part in a template, before the template\n * is instantiated. When a template is instantiated Parts are created from\n * TemplateParts.\n */\ntype TemplatePart =\n  | ChildTemplatePart\n  | AttributeTemplatePart\n  | ElementTemplatePart\n  | CommentTemplatePart;\n\nexport type Part =\n  | ChildPart\n  | AttributePart\n  | PropertyPart\n  | BooleanAttributePart\n  | ElementPart\n  | EventPart;\n\nexport type {ChildPart};\nclass ChildPart implements Disconnectable {\n  readonly type = CHILD_PART;\n  readonly options: RenderOptions | undefined;\n  _$committedValue: unknown = nothing;\n  /** @internal */\n  __directive?: Directive;\n  /** @internal */\n  _$startNode: ChildNode;\n  /** @internal */\n  _$endNode: ChildNode | null;\n  private _textSanitizer: ValueSanitizer | undefined;\n  /** @internal */\n  _$parent: Disconnectable | undefined;\n  /**\n   * Connection state for RootParts only (i.e. ChildPart without _$parent\n   * returned from top-level `render`). This field is unused otherwise. The\n   * intention would be clearer if we made `RootPart` a subclass of `ChildPart`\n   * with this field (and a different _$isConnected getter), but the subclass\n   * caused a perf regression, possibly due to making call sites polymorphic.\n   * @internal\n   */\n  __isConnected: boolean;\n\n  // See comment in Disconnectable interface for why this is a getter\n  get _$isConnected() {\n    // ChildParts that are not at the root should always be created with a\n    // parent; only RootChildNode's won't, so they return the local isConnected\n    // state\n    return this._$parent?._$isConnected ?? this.__isConnected;\n  }\n\n  // The following fields will be patched onto ChildParts when required by\n  // AsyncDirective\n  /** @internal */\n  _$disconnectableChildren?: Set<Disconnectable> = undefined;\n  /** @internal */\n  _$notifyConnectionChanged?(\n    isConnected: boolean,\n    removeFromParent?: boolean,\n    from?: number,\n  ): void;\n  /** @internal */\n  _$reparentDisconnectables?(parent: Disconnectable): void;\n\n  constructor(\n    startNode: ChildNode,\n    endNode: ChildNode | null,\n    parent: TemplateInstance | ChildPart | undefined,\n    options: RenderOptions | undefined,\n  ) {\n    this._$startNode = startNode;\n    this._$endNode = endNode;\n    this._$parent = parent;\n    this.options = options;\n    // Note __isConnected is only ever accessed on RootParts (i.e. when there is\n    // no _$parent); the value on a non-root-part is \"don't care\", but checking\n    // for parent would be more code\n    this.__isConnected = options?.isConnected ?? true;\n    if (ENABLE_EXTRA_SECURITY_HOOKS) {\n      // Explicitly initialize for consistent class shape.\n      this._textSanitizer = undefined;\n    }\n  }\n\n  /**\n   * The parent node into which the part renders its content.\n   *\n   * A ChildPart's content consists of a range of adjacent child nodes of\n   * `.parentNode`, possibly bordered by 'marker nodes' (`.startNode` and\n   * `.endNode`).\n   *\n   * - If both `.startNode` and `.endNode` are non-null, then the part's content\n   * consists of all siblings between `.startNode` and `.endNode`, exclusively.\n   *\n   * - If `.startNode` is non-null but `.endNode` is null, then the part's\n   * content consists of all siblings following `.startNode`, up to and\n   * including the last child of `.parentNode`. If `.endNode` is non-null, then\n   * `.startNode` will always be non-null.\n   *\n   * - If both `.endNode` and `.startNode` are null, then the part's content\n   * consists of all child nodes of `.parentNode`.\n   */\n  get parentNode(): Node {\n    let parentNode: Node = wrap(this._$startNode).parentNode!;\n    const parent = this._$parent;\n    if (\n      parent !== undefined &&\n      parentNode?.nodeType === 11 /* Node.DOCUMENT_FRAGMENT */\n    ) {\n      // If the parentNode is a DocumentFragment, it may be because the DOM is\n      // still in the cloned fragment during initial render; if so, get the real\n      // parentNode the part will be committed into by asking the parent.\n      parentNode = (parent as ChildPart | TemplateInstance).parentNode;\n    }\n    return parentNode;\n  }\n\n  /**\n   * The part's leading marker node, if any. See `.parentNode` for more\n   * information.\n   */\n  get startNode(): Node | null {\n    return this._$startNode;\n  }\n\n  /**\n   * The part's trailing marker node, if any. See `.parentNode` for more\n   * information.\n   */\n  get endNode(): Node | null {\n    return this._$endNode;\n  }\n\n  _$setValue(value: unknown, directiveParent: DirectiveParent = this): void {\n    if (DEV_MODE && this.parentNode === null) {\n      throw new Error(\n        `This \\`ChildPart\\` has no \\`parentNode\\` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's \\`innerHTML\\` or \\`textContent\\` can do this.`,\n      );\n    }\n    value = resolveDirective(this, value, directiveParent);\n    if (isPrimitive(value)) {\n      // Non-rendering child values. It's important that these do not render\n      // empty text nodes to avoid issues with preventing default <slot>\n      // fallback content.\n      if (value === nothing || value == null || value === '') {\n        if (this._$committedValue !== nothing) {\n          debugLogEvent &&\n            debugLogEvent({\n              kind: 'commit nothing to child',\n              start: this._$startNode,\n              end: this._$endNode,\n              parent: this._$parent,\n              options: this.options,\n            });\n          this._$clear();\n        }\n        this._$committedValue = nothing;\n      } else if (value !== this._$committedValue && value !== noChange) {\n        this._commitText(value);\n      }\n      // This property needs to remain unminified.\n    } else if ((value as TemplateResult)['_$litType$'] !== undefined) {\n      this._commitTemplateResult(value as TemplateResult);\n    } else if ((value as Node).nodeType !== undefined) {\n      if (DEV_MODE && this.options?.host === value) {\n        this._commitText(\n          `[probable mistake: rendered a template's host in itself ` +\n            `(commonly caused by writing \\${this} in a template]`,\n        );\n        console.warn(\n          `Attempted to render the template host`,\n          value,\n          `inside itself. This is almost always a mistake, and in dev mode `,\n          `we render some warning text. In production however, we'll `,\n          `render it, which will usually result in an error, and sometimes `,\n          `in the element disappearing from the DOM.`,\n        );\n        return;\n      }\n      this._commitNode(value as Node);\n    } else if (isIterable(value)) {\n      this._commitIterable(value);\n    } else {\n      // Fallback, will render the string representation\n      this._commitText(value);\n    }\n  }\n\n  private _insert<T extends Node>(node: T) {\n    return wrap(wrap(this._$startNode).parentNode!).insertBefore(\n      node,\n      this._$endNode,\n    );\n  }\n\n  private _commitNode(value: Node): void {\n    if (this._$committedValue !== value) {\n      this._$clear();\n      if (\n        ENABLE_EXTRA_SECURITY_HOOKS &&\n        sanitizerFactoryInternal !== noopSanitizer\n      ) {\n        const parentNodeName = this._$startNode.parentNode?.nodeName;\n        if (parentNodeName === 'STYLE' || parentNodeName === 'SCRIPT') {\n          let message = 'Forbidden';\n          if (DEV_MODE) {\n            if (parentNodeName === 'STYLE') {\n              message =\n                `Lit does not support binding inside style nodes. ` +\n                `This is a security risk, as style injection attacks can ` +\n                `exfiltrate data and spoof UIs. ` +\n                `Consider instead using css\\`...\\` literals ` +\n                `to compose styles, and do dynamic styling with ` +\n                `css custom properties, ::parts, <slot>s, ` +\n                `and by mutating the DOM rather than stylesheets.`;\n            } else {\n              message =\n                `Lit does not support binding inside script nodes. ` +\n                `This is a security risk, as it could allow arbitrary ` +\n                `code execution.`;\n            }\n          }\n          throw new Error(message);\n        }\n      }\n      debugLogEvent &&\n        debugLogEvent({\n          kind: 'commit node',\n          start: this._$startNode,\n          parent: this._$parent,\n          value: value,\n          options: this.options,\n        });\n      this._$committedValue = this._insert(value);\n    }\n  }\n\n  private _commitText(value: unknown): void {\n    // If the committed value is a primitive it means we called _commitText on\n    // the previous render, and we know that this._$startNode.nextSibling is a\n    // Text node. We can now just replace the text content (.data) of the node.\n    if (\n      this._$committedValue !== nothing &&\n      isPrimitive(this._$committedValue)\n    ) {\n      const node = wrap(this._$startNode).nextSibling as Text;\n      if (ENABLE_EXTRA_SECURITY_HOOKS) {\n        if (this._textSanitizer === undefined) {\n          this._textSanitizer = createSanitizer(node, 'data', 'property');\n        }\n        value = this._textSanitizer(value);\n      }\n      debugLogEvent &&\n        debugLogEvent({\n          kind: 'commit text',\n          node,\n          value,\n          options: this.options,\n        });\n      (node as Text).data = value as string;\n    } else {\n      if (ENABLE_EXTRA_SECURITY_HOOKS) {\n        const textNode = d.createTextNode('');\n        this._commitNode(textNode);\n        // When setting text content, for security purposes it matters a lot\n        // what the parent is. For example, <style> and <script> need to be\n        // handled with care, while <span> does not. So first we need to put a\n        // text node into the document, then we can sanitize its content.\n        if (this._textSanitizer === undefined) {\n          this._textSanitizer = createSanitizer(textNode, 'data', 'property');\n        }\n        value = this._textSanitizer(value);\n        debugLogEvent &&\n          debugLogEvent({\n            kind: 'commit text',\n            node: textNode,\n            value,\n            options: this.options,\n          });\n        textNode.data = value as string;\n      } else {\n        this._commitNode(d.createTextNode(value as string));\n        debugLogEvent &&\n          debugLogEvent({\n            kind: 'commit text',\n            node: wrap(this._$startNode).nextSibling as Text,\n            value,\n            options: this.options,\n          });\n      }\n    }\n    this._$committedValue = value;\n  }\n\n  private _commitTemplateResult(\n    result: TemplateResult | CompiledTemplateResult,\n  ): void {\n    // This property needs to remain unminified.\n    const {values, ['_$litType$']: type} = result;\n    // If $litType$ is a number, result is a plain TemplateResult and we get\n    // the template from the template cache. If not, result is a\n    // CompiledTemplateResult and _$litType$ is a CompiledTemplate and we need\n    // to create the <template> element the first time we see it.\n    const template: Template | CompiledTemplate =\n      typeof type === 'number'\n        ? this._$getTemplate(result as UncompiledTemplateResult)\n        : (type.el === undefined &&\n            (type.el = Template.createElement(\n              trustFromTemplateString(type.h, type.h[0]),\n              this.options,\n            )),\n          type);\n\n    if ((this._$committedValue as TemplateInstance)?._$template === template) {\n      debugLogEvent &&\n        debugLogEvent({\n          kind: 'template updating',\n          template,\n          instance: this._$committedValue as TemplateInstance,\n          parts: (this._$committedValue as TemplateInstance)._$parts,\n          options: this.options,\n          values,\n        });\n      (this._$committedValue as TemplateInstance)._update(values);\n    } else {\n      const instance = new TemplateInstance(template as Template, this);\n      const fragment = instance._clone(this.options);\n      debugLogEvent &&\n        debugLogEvent({\n          kind: 'template instantiated',\n          template,\n          instance,\n          parts: instance._$parts,\n          options: this.options,\n          fragment,\n          values,\n        });\n      instance._update(values);\n      debugLogEvent &&\n        debugLogEvent({\n          kind: 'template instantiated and updated',\n          template,\n          instance,\n          parts: instance._$parts,\n          options: this.options,\n          fragment,\n          values,\n        });\n      this._commitNode(fragment);\n      this._$committedValue = instance;\n    }\n  }\n\n  // Overridden via `litHtmlPolyfillSupport` to provide platform support.\n  /** @internal */\n  _$getTemplate(result: UncompiledTemplateResult) {\n    let template = templateCache.get(result.strings);\n    if (template === undefined) {\n      templateCache.set(result.strings, (template = new Template(result)));\n    }\n    return template;\n  }\n\n  private _commitIterable(value: Iterable<unknown>): void {\n    // For an Iterable, we create a new InstancePart per item, then set its\n    // value to the item. This is a little bit of overhead for every item in\n    // an Iterable, but it lets us recurse easily and efficiently update Arrays\n    // of TemplateResults that will be commonly returned from expressions like:\n    // array.map((i) => html`${i}`), by reusing existing TemplateInstances.\n\n    // If value is an array, then the previous render was of an\n    // iterable and value will contain the ChildParts from the previous\n    // render. If value is not an array, clear this part and make a new\n    // array for ChildParts.\n    if (!isArray(this._$committedValue)) {\n      this._$committedValue = [];\n      this._$clear();\n    }\n\n    // Lets us keep track of how many items we stamped so we can clear leftover\n    // items from a previous render\n    const itemParts = this._$committedValue as ChildPart[];\n    let partIndex = 0;\n    let itemPart: ChildPart | undefined;\n\n    for (const item of value) {\n      if (partIndex === itemParts.length) {\n        // If no existing part, create a new one\n        // TODO (justinfagnani): test perf impact of always creating two parts\n        // instead of sharing parts between nodes\n        // https://github.com/lit/lit/issues/1266\n        itemParts.push(\n          (itemPart = new ChildPart(\n            this._insert(createMarker()),\n            this._insert(createMarker()),\n            this,\n            this.options,\n          )),\n        );\n      } else {\n        // Reuse an existing part\n        itemPart = itemParts[partIndex];\n      }\n      itemPart._$setValue(item);\n      partIndex++;\n    }\n\n    if (partIndex < itemParts.length) {\n      // itemParts always have end nodes\n      this._$clear(\n        itemPart && wrap(itemPart._$endNode!).nextSibling,\n        partIndex,\n      );\n      // Truncate the parts array so _value reflects the current state\n      itemParts.length = partIndex;\n    }\n  }\n\n  /**\n   * Removes the nodes contained within this Part from the DOM.\n   *\n   * @param start Start node to clear from, for clearing a subset of the part's\n   *     DOM (used when truncating iterables)\n   * @param from  When `start` is specified, the index within the iterable from\n   *     which ChildParts are being removed, used for disconnecting directives in\n   *     those Parts.\n   *\n   * @internal\n   */\n  _$clear(\n    start: ChildNode | null = wrap(this._$startNode).nextSibling,\n    from?: number,\n  ) {\n    this._$notifyConnectionChanged?.(false, true, from);\n    while (start && start !== this._$endNode) {\n      const n = wrap(start!).nextSibling;\n      (wrap(start!) as Element).remove();\n      start = n;\n    }\n  }\n  /**\n   * Implementation of RootPart's `isConnected`. Note that this method\n   * should only be called on `RootPart`s (the `ChildPart` returned from a\n   * top-level `render()` call). It has no effect on non-root ChildParts.\n   * @param isConnected Whether to set\n   * @internal\n   */\n  setConnected(isConnected: boolean) {\n    if (this._$parent === undefined) {\n      this.__isConnected = isConnected;\n      this._$notifyConnectionChanged?.(isConnected);\n    } else if (DEV_MODE) {\n      throw new Error(\n        'part.setConnected() may only be called on a ' +\n          'RootPart returned from render().',\n      );\n    }\n  }\n}\n\n/**\n * A top-level `ChildPart` returned from `render` that manages the connected\n * state of `AsyncDirective`s created throughout the tree below it.\n */\nexport interface RootPart extends ChildPart {\n  /**\n   * Sets the connection state for `AsyncDirective`s contained within this root\n   * ChildPart.\n   *\n   * lit-html does not automatically monitor the connectedness of DOM rendered;\n   * as such, it is the responsibility of the caller to `render` to ensure that\n   * `part.setConnected(false)` is called before the part object is potentially\n   * discarded, to ensure that `AsyncDirective`s have a chance to dispose of\n   * any resources being held. If a `RootPart` that was previously\n   * disconnected is subsequently re-connected (and its `AsyncDirective`s should\n   * re-connect), `setConnected(true)` should be called.\n   *\n   * @param isConnected Whether directives within this tree should be connected\n   * or not\n   */\n  setConnected(isConnected: boolean): void;\n}\n\nexport type {AttributePart};\nclass AttributePart implements Disconnectable {\n  readonly type:\n    | typeof ATTRIBUTE_PART\n    | typeof PROPERTY_PART\n    | typeof BOOLEAN_ATTRIBUTE_PART\n    | typeof EVENT_PART = ATTRIBUTE_PART;\n  readonly element: HTMLElement;\n  readonly name: string;\n  readonly options: RenderOptions | undefined;\n\n  /**\n   * If this attribute part represents an interpolation, this contains the\n   * static strings of the interpolation. For single-value, complete bindings,\n   * this is undefined.\n   */\n  readonly strings?: ReadonlyArray<string>;\n  /** @internal */\n  _$committedValue: unknown | Array<unknown> = nothing;\n  /** @internal */\n  __directives?: Array<Directive | undefined>;\n  /** @internal */\n  _$parent: Disconnectable;\n  /** @internal */\n  _$disconnectableChildren?: Set<Disconnectable> = undefined;\n\n  protected _sanitizer: ValueSanitizer | undefined;\n\n  get tagName() {\n    return this.element.tagName;\n  }\n\n  // See comment in Disconnectable interface for why this is a getter\n  get _$isConnected() {\n    return this._$parent._$isConnected;\n  }\n\n  constructor(\n    element: HTMLElement,\n    name: string,\n    strings: ReadonlyArray<string>,\n    parent: Disconnectable,\n    options: RenderOptions | undefined,\n  ) {\n    this.element = element;\n    this.name = name;\n    this._$parent = parent;\n    this.options = options;\n    if (strings.length > 2 || strings[0] !== '' || strings[1] !== '') {\n      this._$committedValue = new Array(strings.length - 1).fill(new String());\n      this.strings = strings;\n    } else {\n      this._$committedValue = nothing;\n    }\n    if (ENABLE_EXTRA_SECURITY_HOOKS) {\n      this._sanitizer = undefined;\n    }\n  }\n\n  /**\n   * Sets the value of this part by resolving the value from possibly multiple\n   * values and static strings and committing it to the DOM.\n   * If this part is single-valued, `this._strings` will be undefined, and the\n   * method will be called with a single value argument. If this part is\n   * multi-value, `this._strings` will be defined, and the method is called\n   * with the value array of the part's owning TemplateInstance, and an offset\n   * into the value array from which the values should be read.\n   * This method is overloaded this way to eliminate short-lived array slices\n   * of the template instance values, and allow a fast-path for single-valued\n   * parts.\n   *\n   * @param value The part value, or an array of values for multi-valued parts\n   * @param valueIndex the index to start reading values from. `undefined` for\n   *   single-valued parts\n   * @param noCommit causes the part to not commit its value to the DOM. Used\n   *   in hydration to prime attribute parts with their first-rendered value,\n   *   but not set the attribute, and in SSR to no-op the DOM operation and\n   *   capture the value for serialization.\n   *\n   * @internal\n   */\n  _$setValue(\n    value: unknown | Array<unknown>,\n    directiveParent: DirectiveParent = this,\n    valueIndex?: number,\n    noCommit?: boolean,\n  ) {\n    const strings = this.strings;\n\n    // Whether any of the values has changed, for dirty-checking\n    let change = false;\n\n    if (strings === undefined) {\n      // Single-value binding case\n      value = resolveDirective(this, value, directiveParent, 0);\n      change =\n        !isPrimitive(value) ||\n        (value !== this._$committedValue && value !== noChange);\n      if (change) {\n        this._$committedValue = value;\n      }\n    } else {\n      // Interpolation case\n      const values = value as Array<unknown>;\n      value = strings[0];\n\n      let i, v;\n      for (i = 0; i < strings.length - 1; i++) {\n        v = resolveDirective(this, values[valueIndex! + i], directiveParent, i);\n\n        if (v === noChange) {\n          // If the user-provided value is `noChange`, use the previous value\n          v = (this._$committedValue as Array<unknown>)[i];\n        }\n        change ||=\n          !isPrimitive(v) || v !== (this._$committedValue as Array<unknown>)[i];\n        if (v === nothing) {\n          value = nothing;\n        } else if (value !== nothing) {\n          value += (v ?? '') + strings[i + 1];\n        }\n        // We always record each value, even if one is `nothing`, for future\n        // change detection.\n        (this._$committedValue as Array<unknown>)[i] = v;\n      }\n    }\n    if (change && !noCommit) {\n      this._commitValue(value);\n    }\n  }\n\n  /** @internal */\n  _commitValue(value: unknown) {\n    if (value === nothing) {\n      (wrap(this.element) as Element).removeAttribute(this.name);\n    } else {\n      if (ENABLE_EXTRA_SECURITY_HOOKS) {\n        if (this._sanitizer === undefined) {\n          this._sanitizer = sanitizerFactoryInternal(\n            this.element,\n            this.name,\n            'attribute',\n          );\n        }\n        value = this._sanitizer(value ?? '');\n      }\n      debugLogEvent &&\n        debugLogEvent({\n          kind: 'commit attribute',\n          element: this.element,\n          name: this.name,\n          value,\n          options: this.options,\n        });\n      (wrap(this.element) as Element).setAttribute(\n        this.name,\n        (value ?? '') as string,\n      );\n    }\n  }\n}\n\nexport type {PropertyPart};\nclass PropertyPart extends AttributePart {\n  override readonly type = PROPERTY_PART;\n\n  /** @internal */\n  override _commitValue(value: unknown) {\n    if (ENABLE_EXTRA_SECURITY_HOOKS) {\n      if (this._sanitizer === undefined) {\n        this._sanitizer = sanitizerFactoryInternal(\n          this.element,\n          this.name,\n          'property',\n        );\n      }\n      value = this._sanitizer(value);\n    }\n    debugLogEvent &&\n      debugLogEvent({\n        kind: 'commit property',\n        element: this.element,\n        name: this.name,\n        value,\n        options: this.options,\n      });\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    (this.element as any)[this.name] = value === nothing ? undefined : value;\n  }\n}\n\nexport type {BooleanAttributePart};\nclass BooleanAttributePart extends AttributePart {\n  override readonly type = BOOLEAN_ATTRIBUTE_PART;\n\n  /** @internal */\n  override _commitValue(value: unknown) {\n    debugLogEvent &&\n      debugLogEvent({\n        kind: 'commit boolean attribute',\n        element: this.element,\n        name: this.name,\n        value: !!(value && value !== nothing),\n        options: this.options,\n      });\n    (wrap(this.element) as Element).toggleAttribute(\n      this.name,\n      !!value && value !== nothing,\n    );\n  }\n}\n\ntype EventListenerWithOptions = EventListenerOrEventListenerObject &\n  Partial<AddEventListenerOptions>;\n\n/**\n * An AttributePart that manages an event listener via add/removeEventListener.\n *\n * This part works by adding itself as the event listener on an element, then\n * delegating to the value passed to it. This reduces the number of calls to\n * add/removeEventListener if the listener changes frequently, such as when an\n * inline function is used as a listener.\n *\n * Because event options are passed when adding listeners, we must take case\n * to add and remove the part as a listener when the event options change.\n */\nexport type {EventPart};\nclass EventPart extends AttributePart {\n  override readonly type = EVENT_PART;\n\n  constructor(\n    element: HTMLElement,\n    name: string,\n    strings: ReadonlyArray<string>,\n    parent: Disconnectable,\n    options: RenderOptions | undefined,\n  ) {\n    super(element, name, strings, parent, options);\n\n    if (DEV_MODE && this.strings !== undefined) {\n      throw new Error(\n        `A \\`<${element.localName}>\\` has a \\`@${name}=...\\` listener with ` +\n          'invalid content. Event listeners in templates must have exactly ' +\n          'one expression and no surrounding text.',\n      );\n    }\n  }\n\n  // EventPart does not use the base _$setValue/_resolveValue implementation\n  // since the dirty checking is more complex\n  /** @internal */\n  override _$setValue(\n    newListener: unknown,\n    directiveParent: DirectiveParent = this,\n  ) {\n    newListener =\n      resolveDirective(this, newListener, directiveParent, 0) ?? nothing;\n    if (newListener === noChange) {\n      return;\n    }\n    const oldListener = this._$committedValue;\n\n    // If the new value is nothing or any options change we have to remove the\n    // part as a listener.\n    const shouldRemoveListener =\n      (newListener === nothing && oldListener !== nothing) ||\n      (newListener as EventListenerWithOptions).capture !==\n        (oldListener as EventListenerWithOptions).capture ||\n      (newListener as EventListenerWithOptions).once !==\n        (oldListener as EventListenerWithOptions).once ||\n      (newListener as EventListenerWithOptions).passive !==\n        (oldListener as EventListenerWithOptions).passive;\n\n    // If the new value is not nothing and we removed the listener, we have\n    // to add the part as a listener.\n    const shouldAddListener =\n      newListener !== nothing &&\n      (oldListener === nothing || shouldRemoveListener);\n\n    debugLogEvent &&\n      debugLogEvent({\n        kind: 'commit event listener',\n        element: this.element,\n        name: this.name,\n        value: newListener,\n        options: this.options,\n        removeListener: shouldRemoveListener,\n        addListener: shouldAddListener,\n        oldListener,\n      });\n    if (shouldRemoveListener) {\n      this.element.removeEventListener(\n        this.name,\n        this,\n        oldListener as EventListenerWithOptions,\n      );\n    }\n    if (shouldAddListener) {\n      // Beware: IE11 and Chrome 41 don't like using the listener as the\n      // options object. Figure out how to deal w/ this in IE11 - maybe\n      // patch addEventListener?\n      this.element.addEventListener(\n        this.name,\n        this,\n        newListener as EventListenerWithOptions,\n      );\n    }\n    this._$committedValue = newListener;\n  }\n\n  handleEvent(event: Event) {\n    if (typeof this._$committedValue === 'function') {\n      this._$committedValue.call(this.options?.host ?? this.element, event);\n    } else {\n      (this._$committedValue as EventListenerObject).handleEvent(event);\n    }\n  }\n}\n\nexport type {ElementPart};\nclass ElementPart implements Disconnectable {\n  readonly type = ELEMENT_PART;\n\n  /** @internal */\n  __directive?: Directive;\n\n  // This is to ensure that every Part has a _$committedValue\n  _$committedValue: undefined;\n\n  /** @internal */\n  _$parent!: Disconnectable;\n\n  /** @internal */\n  _$disconnectableChildren?: Set<Disconnectable> = undefined;\n\n  options: RenderOptions | undefined;\n\n  constructor(\n    public element: Element,\n    parent: Disconnectable,\n    options: RenderOptions | undefined,\n  ) {\n    this._$parent = parent;\n    this.options = options;\n  }\n\n  // See comment in Disconnectable interface for why this is a getter\n  get _$isConnected() {\n    return this._$parent._$isConnected;\n  }\n\n  _$setValue(value: unknown): void {\n    debugLogEvent &&\n      debugLogEvent({\n        kind: 'commit to element binding',\n        element: this.element,\n        value,\n        options: this.options,\n      });\n    resolveDirective(this, value);\n  }\n}\n\n/**\n * END USERS SHOULD NOT RELY ON THIS OBJECT.\n *\n * Private exports for use by other Lit packages, not intended for use by\n * external users.\n *\n * We currently do not make a mangled rollup build of the lit-ssr code. In order\n * to keep a number of (otherwise private) top-level exports mangled in the\n * client side code, we export a _$LH object containing those members (or\n * helper methods for accessing private fields of those members), and then\n * re-export them for use in lit-ssr. This keeps lit-ssr agnostic to whether the\n * client-side code is being used in `dev` mode or `prod` mode.\n *\n * This has a unique name, to disambiguate it from private exports in\n * lit-element, which re-exports all of lit-html.\n *\n * @private\n */\nexport const _$LH = {\n  // Used in lit-ssr\n  _boundAttributeSuffix: boundAttributeSuffix,\n  _marker: marker,\n  _markerMatch: markerMatch,\n  _HTML_RESULT: HTML_RESULT,\n  _getTemplateHtml: getTemplateHtml,\n  // Used in tests and private-ssr-support\n  _TemplateInstance: TemplateInstance,\n  _isIterable: isIterable,\n  _resolveDirective: resolveDirective,\n  _ChildPart: ChildPart,\n  _AttributePart: AttributePart,\n  _BooleanAttributePart: BooleanAttributePart,\n  _EventPart: EventPart,\n  _PropertyPart: PropertyPart,\n  _ElementPart: ElementPart,\n};\n\n// Apply polyfills if available\nconst polyfillSupport = DEV_MODE\n  ? global.litHtmlPolyfillSupportDevMode\n  : global.litHtmlPolyfillSupport;\npolyfillSupport?.(Template, ChildPart);\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for lit-html usage.\n(global.litHtmlVersions ??= []).push('3.2.0');\nif (DEV_MODE && global.litHtmlVersions.length > 1) {\n  issueWarning!(\n    'multiple-versions',\n    `Multiple versions of Lit loaded. ` +\n      `Loading multiple versions is not recommended.`,\n  );\n}\n\n/**\n * Renders a value, usually a lit-html TemplateResult, to the container.\n *\n * This example renders the text \"Hello, Zoe!\" inside a paragraph tag, appending\n * it to the container `document.body`.\n *\n * ```js\n * import {html, render} from 'lit';\n *\n * const name = \"Zoe\";\n * render(html`<p>Hello, ${name}!</p>`, document.body);\n * ```\n *\n * @param value Any [renderable\n *   value](https://lit.dev/docs/templates/expressions/#child-expressions),\n *   typically a {@linkcode TemplateResult} created by evaluating a template tag\n *   like {@linkcode html} or {@linkcode svg}.\n * @param container A DOM container to render to. The first render will append\n *   the rendered value to the container, and subsequent renders will\n *   efficiently update the rendered value if the same result type was\n *   previously rendered there.\n * @param options See {@linkcode RenderOptions} for options documentation.\n * @see\n * {@link https://lit.dev/docs/libraries/standalone-templates/#rendering-lit-html-templates| Rendering Lit HTML Templates}\n */\nexport const render = (\n  value: unknown,\n  container: HTMLElement | DocumentFragment,\n  options?: RenderOptions,\n): RootPart => {\n  if (DEV_MODE && container == null) {\n    // Give a clearer error message than\n    //     Uncaught TypeError: Cannot read properties of null (reading\n    //     '_$litPart$')\n    // which reads like an internal Lit error.\n    throw new TypeError(`The container to render into may not be ${container}`);\n  }\n  const renderId = DEV_MODE ? debugLogRenderId++ : 0;\n  const partOwnerNode = options?.renderBefore ?? container;\n  // This property needs to remain unminified.\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  let part: ChildPart = (partOwnerNode as any)['_$litPart$'];\n  debugLogEvent &&\n    debugLogEvent({\n      kind: 'begin render',\n      id: renderId,\n      value,\n      container,\n      options,\n      part,\n    });\n  if (part === undefined) {\n    const endNode = options?.renderBefore ?? null;\n    // This property needs to remain unminified.\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    (partOwnerNode as any)['_$litPart$'] = part = new ChildPart(\n      container.insertBefore(createMarker(), endNode),\n      endNode,\n      undefined,\n      options ?? {},\n    );\n  }\n  part._$setValue(value);\n  debugLogEvent &&\n    debugLogEvent({\n      kind: 'end render',\n      id: renderId,\n      value,\n      container,\n      options,\n      part,\n    });\n  return part as RootPart;\n};\n\nif (ENABLE_EXTRA_SECURITY_HOOKS) {\n  render.setSanitizer = setSanitizer;\n  render.createSanitizer = createSanitizer;\n  if (DEV_MODE) {\n    render._testOnlyClearSanitizerFactoryDoNotCallOrElse =\n      _testOnlyClearSanitizerFactoryDoNotCallOrElse;\n  }\n}\n", "export*from\"lit-html\";\n//# sourceMappingURL=html.js.map\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Chooses and evaluates a template function from a list based on matching\n * the given `value` to a case.\n *\n * Cases are structured as `[caseValue, func]`. `value` is matched to\n * `caseValue` by strict equality. The first match is selected. Case values\n * can be of any type including primitives, objects, and symbols.\n *\n * This is similar to a switch statement, but as an expression and without\n * fallthrough.\n *\n * @example\n *\n * ```ts\n * render() {\n *   return html`\n *     ${choose(this.section, [\n *       ['home', () => html`<h1>Home</h1>`],\n *       ['about', () => html`<h1>About</h1>`]\n *     ],\n *     () => html`<h1>Error</h1>`)}\n *   `;\n * }\n * ```\n */\nexport const choose = <T, V, K extends T = T>(\n  value: T,\n  cases: Array<[K, () => V]>,\n  defaultCase?: () => V,\n) => {\n  for (const c of cases) {\n    const caseValue = c[0];\n    if (caseValue === value) {\n      const fn = c[1];\n      return fn();\n    }\n  }\n  return defaultCase?.();\n};\n", "export*from\"lit-html/directives/choose.js\";\n//# sourceMappingURL=choose.js.map\n", "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/** @module elements-sk/define */\n\n/**\n * Define a custom element definition. It will only define a tag name once\n * and will log an error if there's an attempt to define a tag name a second\n * time. This is useful for tests since you can't undefine a custom element.\n *\n * See also https://github.com/karma-runner/karma/issues/412\n *\n * @param tagName - The name of the tag.\n * @param cl - The class for the given tag.\n *\n * @example\n *\n * Instead of:\n *\n *     window.customElements.define('my-element', class extends HTMLElement {...});\n *\n * Use:\n *\n *     import { define } from 'elements-sk/define'\n *     define('my-element', class extends HTMLElement {...});\n *\n */\nexport function define(tagName: string, cl: CustomElementConstructor): void {\n  if (window.customElements.get(tagName) === undefined) {\n    window.customElements.define(tagName, cl);\n  } else {\n    console.log(\n      `Multiple registration attempts for ${tagName}. ` +\n        'This should only happen during testing, ' +\n        \"it's probably an error outside of testing.\"\n    );\n  }\n}\n", "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/** @module elements-sk/upgradeProperty */\n\n/**\n * Capture the value from the unupgraded instance and delete the property so\n * it does not shadow the custom element's own property setter.\n *\n * See this\n * [Google Developers article]{@link https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties}\n * for more details.\n *\n * @param ele -The element.\n * @param prop - The name of the property to upgrade.\n *\n * @example\n *\n * // Upgrade the 'duration' property if it was already set.\n * window.customElements.define('my-element', class extends HTMLElement {\n *   connectedCallback() {\n *     upgradeProperty(this, 'duration');\n *   }\n *\n *   get duration() { return +this.getAttribute('duration'); }\n *   set duration(val) { this.setAttribute('duration', val); }\n * });\n *\n */\nexport function upgradeProperty(ele: Element, prop: string): void {\n  // eslint-disable-next-line no-prototype-builtins\n  if (ele.hasOwnProperty(prop)) {\n    const value = (ele as any)[prop];\n    delete (ele as any)[prop];\n    (ele as any)[prop] = value;\n  }\n}\n", "/**\n * @module infra-sk/modules/ElementSk\n * @description <h2><code>ElementSk</code></h2>\n *\n */\nimport { render } from 'lit/html.js';\nimport { upgradeProperty } from '../../../elements-sk/modules/upgradeProperty';\n\n/**\n * A base class that records the connected status of the element in this._connected and provides a\n * _render() function that doesn't do anything if this this._connected is false.\n *\n * @example\n *\n * class MyElement extends ElementSk {\n *   greeting = \"Hello\";\n *\n *   constructor() {\n *     super((ele: MyElement) => html`<p>${ele.greeting} World!</p>`);\n *   }\n *\n *   connectedCallback() {\n *     super.connectedCallback();\n *     this._render();\n *   }\n * }\n */\nexport class ElementSk extends HTMLElement {\n  protected _template: ((el: any) => unknown) | null = null;\n\n  protected _connected: boolean = false;\n\n  /**\n   * @param templateFn A function that, when applied to this component, will returns the component's\n   *     lit-html template.\n   */\n  constructor(templateFn?: (el: any) => unknown) {\n    super();\n    this._template = templateFn || null;\n  }\n\n  connectedCallback() {\n    this._connected = true;\n  }\n\n  disconnectedCallback() {\n    this._connected = false;\n  }\n\n  /**\n   * Capture the value from the unupgraded instance and delete the property so\n   * it does not shadow the custom element's own property setter.\n   *\n   * See this [Google Developers article]{@link\n   *    https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties\n   *    } for more details.\n   *\n   * @param name Property name.\n   */\n  protected _upgradeProperty(name: string) {\n    upgradeProperty(this, name);\n  }\n\n  /**\n   * Renders the lit-html template found at this._template if not-null, but only if\n   * connectedCallback has been called.\n   */\n  protected _render() {\n    if (this._connected && !!this._template) {\n      render(this._template(this), this, { host: this });\n    }\n  }\n}\n", "export * from './ElementSk';\n", "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @module elements-sk/toast-sk\n * @description <h2><code>toast-sk</code></h2>\n *\n * <p>\n *   Notification toast that pops up from the bottom of the screen when shown.\n *   Note that toast-sk doesn't add anyting inside the toast, it just presents\n *   the existing child elements.\n * </p>\n *\n * @attr duration - The duration, in ms, to display the notification. Defaults\n *               to 5000. A value of 0 means to display forever.\n */\nimport { define } from '../define';\nimport { upgradeProperty } from '../upgradeProperty';\n\nexport class ToastSk extends HTMLElement {\n  private _timer: number | null;\n\n  constructor() {\n    super();\n    this._timer = null;\n  }\n\n  connectedCallback(): void {\n    if (!this.hasAttribute('duration')) {\n      this.duration = 5000;\n    }\n    upgradeProperty(this, 'duration');\n  }\n\n  /** Mirrors the duration attribute. */\n  get duration(): number {\n    return +(this.getAttribute('duration') || '');\n  }\n\n  set duration(val: number) {\n    this.setAttribute('duration', val.toString());\n  }\n\n  /** Displays the contents of the toast. */\n  show(): void {\n    this.setAttribute('shown', '');\n    if (this.duration > 0 && !this._timer) {\n      this._timer = window.setTimeout(() => {\n        this._timer = null;\n        this.hide();\n      }, this.duration);\n    }\n  }\n\n  /** Hides the contents of the toast. */\n  hide(): void {\n    this.removeAttribute('shown');\n    if (this._timer) {\n      window.clearTimeout(this._timer);\n      this._timer = null;\n    }\n  }\n}\n\ndefine('toast-sk', ToastSk);\n", "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport './toast-sk';\n", "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @module elements-sk/error-toast-sk\n * @description <h2><code>error-toast-sk</code></h2>\n *\n * <p>\n *   Listens for 'error-sk' events that bubble up to the document and displays them.\n *   These are normally generated by errorMessage.\n * </p>\n *\n * <p>\n *   The 'error-sk' event should have 'detail' of the form:\n * </p>\n *\n * <pre>\n *    {\n *      message: \"The error message to display goes here.\",\n *      duration: Integer, the number of ms to display or 0 for indefinitely.\n *                Defaults to 10000 (10s)\n *    }\n * </pre>\n *\n * @example\n *\n * <footer>\n *   <error-toast-sk></error-toast-sk>\n * </footer>\n */\nimport { define } from '../define';\nimport { ToastSk } from '../toast-sk/toast-sk';\nimport '../toast-sk';\nimport { ErrorSkEventDetail } from '../errorMessage';\n\nexport class ErrorToastSk extends HTMLElement {\n  private toast: ToastSk | null = null;\n\n  private span: HTMLSpanElement | null = null;\n\n  connectedCallback(): void {\n    this.innerHTML = '<toast-sk><span></span><button title=\"Close\">✗</button></toast-sk>';\n    this.toast = this.firstElementChild as ToastSk;\n    this.span = this.toast!.firstElementChild as HTMLSpanElement;\n\n    document.addEventListener('error-sk', this);\n    this.querySelector('button')!.addEventListener('click', (e) => this.clickHandler());\n  }\n\n  disconnectedCallback(): void {\n    document.removeEventListener('error-sk', this);\n  }\n\n  clickHandler() {\n    this.toast!.hide();\n  }\n\n  handleEvent(e: CustomEvent<ErrorSkEventDetail>) {\n    this.toast!.duration = e.detail.duration;\n    this.span!.textContent = e.detail.message;\n    this.toast!.show();\n  }\n}\n\ndefine('error-toast-sk', ErrorToastSk);\n", "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport './error-toast-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99h-3.98zm8.87-4.19V11c0-3.25-2.25-5.97-5.29-6.69v-.72C13.59 2.71 12.88 2 12 2s-1.59.71-1.59 1.59v.72C7.37 5.03 5.12 7.75 5.12 11v5.82L3 18.94V20h18v-1.06l-2.12-2.12zM16 13.01h-3v3h-2v-3H8V11h3V8h2v3h3v2.01z\"/></svg>';\n\ndefine('add-alert-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './add-alert-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z\"/></svg>';\n\ndefine('build-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './build-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z\"/></svg>';\n\ndefine('bug-report-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './bug-report-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z\"/></svg>';\n\ndefine('event-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './event-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z\"/></svg>';\n\ndefine('favorite-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './favorite-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z\"/></svg>';\n\ndefine('folder-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './folder-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z\"/></svg>';\n\ndefine('help-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './help-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z\"/></svg>';\n\ndefine('home-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './home-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M22 6.92l-1.41-1.41-2.85 3.21C15.68 6.4 12.83 5 9.61 5 6.72 5 4.07 6.16 2 8l1.42 1.42C5.12 7.93 7.27 7 9.61 7c2.74 0 5.09 1.26 6.77 3.24l-2.88 3.24-4-4L2 16.99l1.5 1.5 6-6.01 4 4 4.05-4.55c.75 1.35 1.25 2.9 1.44 4.55H21c-.22-2.3-.95-4.39-2.04-6.14L22 6.92z\"/></svg>';\n\ndefine('multiline-chart-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './multiline-chart-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z\"/></svg>';\n\ndefine('sort-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './sort-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z\"/></svg>';\n\ndefine('trending-up-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './trending-up-icon-sk';\n", "/** errorMessage dispatches an event with the error message in it.\n * <p>\n *   Use this function in conjunction with the\n *   {@linkcode module:elements-sk/error-toast-sk} element.\n * </p>\n *\n * @evt error-sk The event has a detail of the form:\n *\n * <pre>\n * {\n *   message: \"some string\",\n *   duration: (duration in milliseconds),\n * }\n * </pre>\n *\n * @param message The value of 'message' is expected to be a string,\n *   an Object with a field 'message', an Object with a field 'resp'\n *   that is an instance of window.Response, or an Object.\n * @param duration The number of milliseconds the message should be\n * displayed.\n *\n */\nexport async function errorMessage(\n  message: string | { message: string } | { resp: Response } | object,\n  duration: number = 10000\n) {\n  if ((message as { resp: Response }).resp instanceof window.Response) {\n    message = await (message as { resp: Response }).resp.text();\n  } else if (typeof message === 'object') {\n    message =\n      // for handling Errors {name:String, message:String}\n      (message as { message: string }).message ||\n      // for everything else\n      JSON.stringify(message);\n  }\n  const detail: ErrorSkEventDetail = {\n    message: message,\n    duration: duration,\n  };\n  document.dispatchEvent(\n    new CustomEvent<ErrorSkEventDetail>('error-sk', {\n      detail: detail,\n      bubbles: true,\n    })\n  );\n}\n\n/** Defines the structure of the \"error-sk\" custom event's detail field. */\nexport interface ErrorSkEventDetail {\n  readonly message: string;\n  readonly duration: number;\n}\n", "/**\n * Function that returns the root domain of a sub-domain.\n *\n * I.e. it will return \"skia.org\" if the current location is \"perf.skia.org\".\n *\n * In addition it will fallback to \"skia.org\" is case we are on corp.goog.\n */\nexport function rootDomain(): string {\n  let ret = window.location.host.split('.').slice(-2).join('.');\n  if (ret === 'corp.goog') {\n    ret = 'skia.org';\n  }\n  return ret;\n}\n", "/**\n * @module modules/alogin-sk\n * @description <h2><code>alogin-sk</code></h2>\n *\n * Handles logging into applications that use alogin.Login.\n *\n * @attr {boolean} testing_offline - If we should really fetch Login status or\n *  use mock data.\n *\n * @attr {string} url - The url that returns the JSON serialized alogin.Status response.\n */\nimport { html } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { errorMessage } from '../../../elements-sk/modules/errorMessage';\nimport { ElementSk } from '../ElementSk';\nimport { Status } from '../json';\nimport { rootDomain } from '../url';\n\nexport const defaultStatusURL = '/_/login/status';\n\n/**\n * Returns a Promise that resolves when we have received the login status, and\n * rejects if there was an error retrieving the login status.\n */\nexport const LoggedIn = async (url: string = defaultStatusURL): Promise<Status> => {\n  const resp = await fetch(url);\n  if (!resp.ok) {\n    await errorMessage(`Failed to load login status: ${resp.statusText}`);\n    return defaultStatus;\n  }\n  return resp.json();\n};\n\nconst defaultStatus: Status = {\n  email: '',\n  roles: [],\n};\n\nconst fakeStatus: Status = {\n  email: 'test@example.com',\n  roles: ['viewer'],\n};\n\nexport class AloginSk extends ElementSk {\n  /**\n   * A promise that resolves to the users logged in status.\n   *\n   * The value of this may be altered by the 'testing_offline' attribute.\n   */\n  statusPromise: Promise<Status> = Promise.resolve(defaultStatus);\n\n  private login: string = '';\n\n  private logout: string = '';\n\n  private status: Status = defaultStatus;\n\n  constructor() {\n    super(AloginSk.template);\n  }\n\n  private static template = (ele: AloginSk) => html`\n    <span class=\"email\"> ${ele.status.email} </span>\n    <a class=\"logInOut\" href=\"${ele.status.email ? ele.logout : ele.login}\">\n      ${ele.status.email ? 'Logout' : 'Login'}\n    </a>\n  `;\n\n  async connectedCallback(): Promise<void> {\n    super.connectedCallback();\n\n    const domain = rootDomain();\n\n    this.login = `https://${domain}/login/`;\n    this.logout = `https://${domain}/logout/`;\n\n    if (this.hasAttribute('testing_offline')) {\n      this.statusPromise = Promise.resolve(fakeStatus);\n      this.status = fakeStatus;\n    } else {\n      this.statusPromise = LoggedIn(this.getAttribute('url') || undefined);\n      this.status = await this.statusPromise;\n    }\n\n    this._render();\n  }\n}\n\ndefine('alogin-sk', AloginSk);\n", "import './alogin-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M17.66 7.93L12 2.27 6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58c2.05 0 4.1-.78 5.66-2.34 3.12-3.12 3.12-8.19 0-11.31zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59s.62-3.11 1.76-4.24L12 5.1v14.49z\"/></svg>';\n\ndefine('invert-colors-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './invert-colors-icon-sk';\n", "/**\n * @module infra-sk/modules/theme-chooser-sk\n * @description <h2><code>theme-chooser-sk</code></h2>\n *\n * <p>\n * The <theme-chooser-sk> custom element. Imports a default and darkmode color\n * palette and provides a toggle to swap between them.  To use the themes,\n * elements in the page should set colors via the variable provided in\n * infra-sk/modules/theme-chooser-sk/theme-chooser-sk.scss Such as --primary,\n * --on-primary, --background, --on-background, etc.  Some additional classes\n * are provided for convenience (primary-container-theme-sk,\n * secondary-container-theme-sk, surface, etc)\n * </p>\n *\n * <p>\n * To change the color themes override the css variables in a ':root' selector.\n * </p>\n *\n * @evt theme-chooser-toggle Sent when the theme has changed. The detail\n *   contains the darkmode value:\n *\n *   <pre>\n *     detail {\n *       darkmode: true,\n *     }\n *   </pre>\n *\n */\nimport { html } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { ElementSk } from '../ElementSk';\nimport '../../../elements-sk/modules/icons/invert-colors-icon-sk';\n\n/** Class applied to <body> to enable darkmode. */\nexport const DARKMODE_CLASS = 'darkmode';\n\n/** The key in localstorage to persist the choice of dark/light mode. */\nexport const DARKMODE_LOCALSTORAGE_KEY = 'theme-chooser-sk-darkmode';\n\n/** Describes the \"theme-chooser-toggle\" event detail. */\nexport interface ThemeChooserSkEventDetail {\n  readonly darkmode: boolean;\n}\n\n// TODO(weston): Add logic to optionally automatically compute the --on-* colors to white or black\n//               based on color brightness for accessibility.\nexport class ThemeChooserSk extends ElementSk {\n  constructor() {\n    super(ThemeChooserSk.template);\n  }\n\n  private static template = () => html`<invert-colors-icon-sk></invert-colors-icon-sk>`;\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    this._render();\n    this.addEventListener('click', this._toggleTheme);\n\n    // Set the class correctly based on window.localStorage.\n    this.darkmode = this.darkmode; // eslint-disable-line no-self-assign\n  }\n\n  private _toggleTheme() {\n    this.darkmode = !this.darkmode;\n  }\n\n  get darkmode(): boolean {\n    if (window.localStorage.getItem(DARKMODE_LOCALSTORAGE_KEY) === null) {\n      return true; // Defaults to darkmode.\n    }\n    return window.localStorage.getItem(DARKMODE_LOCALSTORAGE_KEY) === 'true';\n  }\n\n  set darkmode(val: boolean) {\n    // Force to be a bool.\n    val = !!val;\n    window.localStorage.setItem(DARKMODE_LOCALSTORAGE_KEY, val.toString());\n    document.body.classList.toggle(DARKMODE_CLASS, this.darkmode);\n    this.dispatchEvent(\n      new CustomEvent<ThemeChooserSkEventDetail>('theme-chooser-toggle', {\n        detail: { darkmode: val },\n        bubbles: true,\n      })\n    );\n  }\n}\n\n// isDarkMode returns true if the application is currently set to darkmode.\n//\n// Note that this function is only valid after the theme-chooser-sk element has\n// finished connectedCallback().\nexport const isDarkMode = (): boolean =>\n  window.localStorage.getItem(DARKMODE_LOCALSTORAGE_KEY) === 'true';\n\ndefine('theme-chooser-sk', ThemeChooserSk);\n", "import './theme-chooser-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z\"/></svg>';\n\ndefine('menu-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './menu-icon-sk';\n", "/**\n * @module infra-sk/modules/app-sk\n * @description <h2><code>app-sk</code></h2>\n *\n * <p>\n *   A general application layout which includes a responsive\n *   side panel. This element is largely CSS, with a smattering of\n *   JS to toggle the side panel on/off when in small screen mode.\n *   This CSS has some variables which can be customized (see\n *   app-sk.scss and app-sk-demo.css for an example of this).\n * </p>\n * <p>\n *   In general, create an app with a header, aside, main, and footer\n *   and app-sk will apply the appropriate CSS to make an app with a\n *   header bar, a collapsible (on small screens) side-bar, the main content,\n *   and a footer.\n * </p>\n *\n * @example\n *  <app-sk>\n *    <header>\n *      <h1>Hello App</h1>\n *      <div class=spacer></div>\n *      <alogin-sk></alogin-sk>\n *    </header>\n *    <aside>\n *      <h2>This is the side bar</h2>\n *      <h2>Hopefully the side bar handles really wide text well.</h2>\n *    </aside>\n *\n *    <main>\n *      <h1>The main content!</h1>\n *    </main>\n *\n *    <footer><error-toast-sk></error-toast-sk></footer>\n *  </app-sk>\n *\n */\nimport { define } from '../../../elements-sk/modules/define';\nimport '../../../elements-sk/modules/icons/menu-icon-sk';\n\nconst buttonTemplate = document.createElement('template');\nbuttonTemplate.innerHTML = `\n  <button class=toggle-button>\n    <menu-icon-sk>\n    </menu-icon-sk>\n  </button>\n`;\n\nexport class AppSk extends HTMLElement {\n  connectedCallback() {\n    const header = this.querySelector('header');\n    const sidebar = this.querySelector('aside');\n    if (!header || !sidebar) {\n      return;\n    }\n    // Add the collapse button to the header as the first item.\n    let btn = buttonTemplate.content.cloneNode(true) as HTMLButtonElement;\n    // btn is a document-fragment, so we need to insert it into the\n    // DOM to make it \"expand\" into a real button.\n    header.insertBefore(btn, header.firstElementChild);\n    btn = header.firstElementChild as HTMLButtonElement;\n    btn.addEventListener('click', () => {\n      const sidebar = this.querySelector('aside')!;\n      sidebar.classList.toggle('shown');\n    });\n  }\n}\n\ndefine('app-sk', AppSk);\n", "import './app-sk';\n", "// Declaration for the window.sk global variable.\nimport { SkPerfConfig } from '../json';\n\nexport function getBuildTag(tag: string = window.perf?.image_tag ?? ''): {\n  tag: string | null;\n  type: 'invalid' | 'git' | 'louhi' | 'tag';\n} {\n  const ats = tag.split('@');\n  if (ats.length < 2) {\n    return { type: 'invalid', tag: null };\n  }\n\n  const rawTag = ats[1];\n  // Not a tag, return empty.\n  if (!ats[1].startsWith('tag:')) {\n    return { type: 'invalid', tag: null };\n  }\n\n  const gitTag = 'tag:git-';\n  if (rawTag.startsWith(gitTag)) {\n    // The git hash tag: tag:git-hash, return the first 7 encodings.\n    return { type: 'git', tag: rawTag.substring(gitTag.length, gitTag.length + 7) };\n  } else if (rawTag.length >= 38 && rawTag.substring(25, 30) === 'louhi') {\n    // The louhi build: tag:TIMESTAMP-louhi-XXXXXXX-clean\n    return { type: 'louhi', tag: rawTag.substring(31, 38) };\n  } else {\n    // Regular tag (tag:), return the remaining segment.\n    return { type: 'tag', tag: rawTag.substring(4) };\n  }\n}\n\ndeclare global {\n  interface Window {\n    perf: SkPerfConfig;\n  }\n}\n", "/**\n * @module module/perf-scaffold-sk\n * @description <h2><code>perf-scaffold-sk</code></h2>\n *\n * Contains the title bar and error-toast for all the Perf pages. The rest of\n * every Perf page should be a child of this element.\n *\n */\nimport { html } from 'lit/html.js';\nimport { choose } from 'lit/directives/choose.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport '../../../elements-sk/modules/error-toast-sk';\nimport '../../../elements-sk/modules/icons/add-alert-icon-sk';\nimport '../../../elements-sk/modules/icons/build-icon-sk';\nimport '../../../elements-sk/modules/icons/bug-report-icon-sk';\nimport '../../../elements-sk/modules/icons/event-icon-sk';\nimport '../../../elements-sk/modules/icons/favorite-icon-sk';\nimport '../../../elements-sk/modules/icons/folder-icon-sk';\nimport '../../../elements-sk/modules/icons/help-icon-sk';\nimport '../../../elements-sk/modules/icons/home-icon-sk';\nimport '../../../elements-sk/modules/icons/multiline-chart-icon-sk';\nimport '../../../elements-sk/modules/icons/sort-icon-sk';\nimport '../../../elements-sk/modules/icons/trending-up-icon-sk';\nimport '../../../infra-sk/modules/alogin-sk';\nimport '../../../infra-sk/modules/theme-chooser-sk';\nimport '../../../infra-sk/modules/app-sk';\nimport { getBuildTag } from '../window/window';\n\n// The ID of a top level element under perf-scaffold-sk that will be moved under\n// the right hand side nav bar.\nconst SIDEBAR_HELP_ID = 'sidebar_help';\n\nconst BUILDBOT_GIT = 'https://skia.googlesource.com/buildbot.git/+log/';\n\n/**\n * Moves the elements from a list to be the children of the target element.\n *\n * @param from - The list of elements we are moving.\n * @param to - The new parent.\n */\nfunction move(from: HTMLCollection | NodeList, to: HTMLElement) {\n  Array.prototype.slice.call(from).forEach((ele) => to.appendChild(ele));\n}\n\nexport class PerfScaffoldSk extends ElementSk {\n  private _main: HTMLElement | null = null;\n\n  private _help: HTMLElement | null = null;\n\n  private _chat: HTMLElement | null = null;\n\n  private _helpUrl: string = 'http://go/perf-user-doc';\n\n  private _reportBugUrl: string =\n    'https://issuetracker.google.com/issues/new?component=1547614&template=1970127';\n\n  constructor() {\n    super(PerfScaffoldSk.template);\n  }\n\n  private static template = (ele: PerfScaffoldSk) => html`\n  <app-sk>\n    <header id=topbar>\n      <h1 class=name>Perf</h1>\n      <div class=spacer></div>\n      <alogin-sk url=/_/login/status></alogin-sk>\n      <theme-chooser-sk></theme-chooser-sk>\n    </header>\n    <aside id=sidebar>\n      <div id=links>\n        <a href=\"/e/\" tab-index=0 ><home-icon-sk></home-icon-sk><span>Home</span></a>\n        <a href=\"/f/\" tab-index=0 ><favorite-icon-sk></favorite-icon-sk><span>Favorites</span></a>\n        <a href=\"/m/\" tab-index=0 >\n          <multiline-chart-icon-sk></multiline-chart-icon-sk><span>MultiGraph</span>\n        </a>\n        <a href=\"/t/\" tab-index=0 ><trending-up-icon-sk></trending-up-icon-sk><span>Triage</span></a>\n        <a href=\"/a/\" tab-index=0 ><add-alert-icon-sk></add-alert-icon-sk><span>Alerts</span></a>\n        <a href=\"/d/\" tab-index=0 ><build-icon-sk></build-icon-sk><span>Dry Run</span></a>\n        <a href=\"/c/\" tab-index=0 ><sort-icon-sk></sort-icon-sk><span>Clustering</span></a>\n        ${this.revisionLinkTemplate()}\n        <a href=\"${ele._helpUrl}\" target=\"_blank\" tab-index=0 >\n          <help-icon-sk></help-icon-sk><span>Help</span>\n        </a>\n        <a href=\"${ele._reportBugUrl}\" target=\"_blank\" tab-index=0 >\n          <bug-report-icon-sk></bug-report-icon-sk><span>Report Bug</span>\n        </a>\n        ${ele.buildTagTemplate()}\n      </div>\n      <div id=help>\n      </div>\n      <div id=chat>\n      </div>\n    </aside>\n    <main>\n    </main>\n    <footer class=\"glue-footer\">\n      <error-toast-sk></error-toast-sk>\n    </footer>\n  </app-sk>\n`;\n\n  private static revisionLinkTemplate = () => {\n    if (window.perf.fetch_chrome_perf_anomalies) {\n      return html`<a href=\"/v/\" tab-index=\"0\"\n        ><trending-up-icon-sk></trending-up-icon-sk><span>Revision Info</span></a\n      >`;\n    }\n\n    return html``;\n  };\n\n  private buildTagLinkTemplate(tag: string) {\n    return html`<a href=\"${BUILDBOT_GIT}${tag}\" target=\"_blank\">Build: ${tag}</a>`;\n  }\n\n  private buildTagTemplate() {\n    const buildTag = getBuildTag();\n    return html`${choose(\n      buildTag.type,\n      [\n        ['git', () => this.buildTagLinkTemplate(buildTag.tag!)],\n        ['louhi', () => this.buildTagLinkTemplate(buildTag.tag!)],\n        ['tag', () => html`<a>Build: ${buildTag.tag}</a>`],\n      ],\n      () => html`<a>Build: No Tag</a>`\n    )}`;\n  }\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    // Don't call more than once.\n    if (this._main) {\n      return;\n    }\n    // We aren't using shadow dom so we need to manually move the children of\n    // perf-scaffold-sk to be children of 'main'. We have to do this for the\n    // existing elements and for all future mutations.\n\n    // Create a temporary holding spot for elements we're moving.\n    const div = document.createElement('div');\n    move(this.children, div);\n\n    // Override the help url if specified in the instance config\n    if (window.perf.help_url_override && window.perf.help_url_override !== '') {\n      this._helpUrl = window.perf.help_url_override;\n    }\n\n    // Override the feedback / report bug url if specified in the instance config\n    if (window.perf.feedback_url && window.perf.feedback_url !== '') {\n      this._reportBugUrl = window.perf.feedback_url;\n    }\n\n    // Now that we've moved all the old children out of the way we can render\n    // the template.\n    this._render();\n\n    this._main = this.querySelector('main');\n    this._help = this.querySelector('#help');\n    this._chat = this.querySelector('#chat');\n\n    if (this._chat !== null) {\n      this.addUrlToElement(this._chat, 'Ask the team', window.perf.chat_url);\n    }\n\n    // Move the old children back.\n    this.redistributeAddedNodes(div.childNodes);\n\n    // Move all future children also.\n    const observer = new MutationObserver((mutList) => {\n      mutList.forEach((mut) => {\n        this.redistributeAddedNodes(mut.addedNodes);\n      });\n    });\n    observer.observe(this, { childList: true });\n  }\n\n  // addUrlToElement adds the provided url data inside the given html element.\n  private addUrlToElement(element: HTMLElement, urlText: string, urlHref: string) {\n    element.hidden = true;\n    if (urlHref && urlHref !== '') {\n      element.innerHTML = `<a target=\"_blank\" href=\"${urlHref}\"\n        tab-index=0><h4>${urlText}</h4></a>`;\n      element.hidden = false;\n    }\n  }\n\n  // Place these newly added nodes in the right place under the perf-scaffold-sk\n  // element.\n  private redistributeAddedNodes(from: NodeList) {\n    Array.prototype.slice.call(from).forEach((node: Node) => {\n      if ((node as Element).id === SIDEBAR_HELP_ID) {\n        this._help!.appendChild(node);\n      } else {\n        this._main!.appendChild(node);\n      }\n    });\n  }\n}\n\ndefine('perf-scaffold-sk', PerfScaffoldSk);\n", "import './perf-scaffold-sk';\n", "/* eslint-disable no-prototype-builtins */\n// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/** @module common-sk/modules/query\n *  @descripiton Utilities for working with URL query strings.\n */\n\nimport { HintableObject } from './hintable';\n\n/** ParamSet mirrors //infra/go/paramtools ParamSet. */\nexport type ParamSet = { [key: string]: string[] };\n\n/** fromParamSet encodes an object of the form:\n * <pre>\n * {\n *   a:[\"2\", \"4\"],\n *   b:[\"3\"]\n * }\n * </pre>\n *\n * to a query string like:\n *\n * <pre>\n * \"a=2&a=4&b=3\"\n * </pre>\n *\n * This function handles URI encoding of both keys and values.\n *\n * @param {Object} o The object to encode.\n * @returns {string}\n */\nexport function fromParamSet(o: ParamSet): string {\n  if (!o) {\n    return '';\n  }\n  const ret: string[] = [];\n  const keys = Object.keys(o).sort();\n  keys.forEach((key) => {\n    o[key].forEach((value) => {\n      ret.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);\n    });\n  });\n  return ret.join('&');\n}\n\n/** toParamSet parses a query string into an object with\n *  arrays of values for the values. I.e.\n *\n * <pre>\n *   \"a=2&b=3&a=4\"\n * </pre>\n *\n * decodes to\n *\n * <pre>\n *   {\n *     a:[\"2\", \"4\"],\n *     b:[\"3\"],\n *   }\n * </pre>\n *\n * This function handles URI decoding of both keys and values.\n *\n * @param {string} s The query string to decode.\n * @returns {ParamSet}\n */\nexport function toParamSet(s: string): ParamSet {\n  s = s || '';\n  const ret: ParamSet = {};\n  const vars = s.split('&');\n  for (const v of vars) {\n    const pair = v.split('=', 2);\n    if (pair.length === 2) {\n      const key = decodeURIComponent(pair[0]);\n      const value = decodeURIComponent(pair[1]);\n      if (ret.hasOwnProperty(key)) {\n        ret[key].push(value);\n      } else {\n        ret[key] = [value];\n      }\n    }\n  }\n  return ret;\n}\n\n/** fromObject takes an object and encodes it into a query string.\n *\n * The reverse of this function is toObject.\n *\n * @param o - The object to encode.\n */\nexport function fromObject(o: HintableObject): string {\n  const ret: string[] = [];\n  Object.keys(o)\n    .sort()\n    .forEach((key) => {\n      const value = o[key];\n      if (Array.isArray(value)) {\n        value.forEach((v: string) => {\n          ret.push(`${encodeURIComponent(key)}=${encodeURIComponent(v)}`);\n        });\n      } else if (typeof value === 'object') {\n        ret.push(`${encodeURIComponent(key)}=${encodeURIComponent(fromObject(value))}`);\n      } else {\n        ret.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);\n      }\n    });\n  return ret.join('&');\n}\n\n/** toObject decodes a query string into an object.\n *\n * Uses the 'target' as a source for hinting on the types of the values.\n * For example:\n *\n * <pre>\n *   \"a=2&b=true\"\n * </pre>\n *\n * decodes to:\n *\n * <pre>\n *   {\n *     a: 2,\n *     b: true,\n *   }\n * </pre>\n *\n * When given a target of:\n *\n * <pre>\n *   {\n *     a: 1.0,\n *     b: false,\n *   }\n * </pre>\n *\n * Note that a target of {} would decode\n * the same query string into:\n *\n * <pre>\n *   {\n *     a: \"2\",\n *     b: \"true\",\n *   }\n * </pre>\n *\n * Only Number, String, Boolean, Object, and Array of String hints are supported.\n *\n * @param s - The query string.\n * @param target - The object that contains the type hints.\n */\nexport function toObject(s: string, target: HintableObject): HintableObject {\n  target = target || {};\n  const ret: { [key: string]: any } = {};\n  const vars = s.split('&');\n  for (const v of vars) {\n    const pair = v.split('=', 2);\n    if (pair.length === 2) {\n      const key = decodeURIComponent(pair[0]);\n      const value = decodeURIComponent(pair[1]);\n      if (target.hasOwnProperty(key)) {\n        const targetValue = target[key];\n        switch (typeof targetValue) {\n          case 'boolean':\n            ret[key] = value === 'true';\n            break;\n          case 'number':\n            ret[key] = Number(value);\n            break;\n          case 'object': // Arrays report as 'object' to typeof.\n            if (Array.isArray(targetValue)) {\n              const r = ret[key] || [];\n              r.push(value);\n              ret[key] = r;\n            } else {\n              ret[key] = toObject(value, targetValue);\n            }\n            break;\n          case 'string':\n            ret[key] = value;\n            break;\n          default:\n            ret[key] = value;\n        }\n      } else {\n        ret[key] = value;\n      }\n    }\n  }\n  return ret;\n}\n\n/** splitAmp returns the given query string as a newline\n *   separated list of key value pairs. If sepator is not\n *   provided newline will be used.\n *\n *   @param [queryStr=''] A query string.\n *   @param [separator='\\n'] The separator to use when joining.\n */\nexport function splitAmp(queryStr = '', separator = '\\n') {\n  return queryStr.split('&').join(separator);\n}\n", "// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/** @module common-sk/modules/object\n *  @description Utility functions for dealing with Objects.\n */\nimport { fromObject } from './query';\nimport { Hintable, HintableObject } from './hintable';\n\n/** @method deepCopy\n *  @param object - The object to make a copy of.\n */\nexport function deepCopy<T>(o: T): T {\n  return JSON.parse(JSON.stringify(o));\n}\n\n/** Returns true if a and b are equal, covers Boolean, Number, String and Arrays and Objects.\n *\n * @param a The Hintable type object to compare.\n * @param b The Hintable type object to compare.\n */\nexport function equals(a: Hintable, b: Hintable): boolean {\n  if (typeof a !== typeof b) {\n    return false;\n  }\n  const ta = typeof a;\n  if (ta === 'string' || ta === 'boolean' || ta === 'number') {\n    return a === b;\n  }\n  if (ta === 'object') {\n    if (Array.isArray(a)) {\n      return JSON.stringify(a) === JSON.stringify(b);\n    }\n    return fromObject(a as HintableObject) === fromObject(b as HintableObject);\n  }\n  return false;\n}\n\n/** Returns an object with only values that are in o that are different from d.\n *\n * Only works shallowly, i.e. only diffs on the attributes of\n * o and d, and only for the types that equals() supports.\n *\n * @example\n * // Returns {a:2}\n * getDelta({a:2, b:\"foo\"}, {a:1, b:\"foo\", c:3.14})\n *\n * @param {Object} o\n * @param {Object} d\n * @returns {Object}\n *\n */\nexport function getDelta(o: HintableObject, d: HintableObject): HintableObject {\n  const ret: HintableObject = {};\n  Object.keys(o).forEach((key) => {\n    if (!equals(o[key], d[key])) {\n      ret[key] = o[key];\n    }\n  });\n  return ret;\n}\n\n/** Returns a copy of object o with values from delta if they exist.\n *\n * @param {Object} delta - A delta object as returned from 'getDelta'.\n * @param {Object} o\n * @returns {Object}\n *\n */\nexport function applyDelta(delta: HintableObject, o: HintableObject): HintableObject {\n  const ret: HintableObject = {};\n  Object.keys(o).forEach((key) => {\n    // eslint-disable-next-line no-prototype-builtins\n    if (delta.hasOwnProperty(key)) {\n      ret[key] = deepCopy(delta[key]);\n    } else {\n      ret[key] = deepCopy(o[key]);\n    }\n  });\n  return ret;\n}\n", "// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/** @module common-sk/modules/jsonOrThrow */\n\n// ** The type of Error thrown by jsonOrThrow. */\nexport class JsonOrThrowError extends Error {\n  message: string;\n\n  resp: Response;\n\n  status: number;\n\n  constructor(resp: Response) {\n    super();\n    this.message = `Bad network response: ${resp.statusText}`;\n    this.resp = resp;\n    this.status = resp.status;\n  }\n}\n\n/** Helper function when making fetch() requests.\n *\n * Checks if the response is ok and converts it to JSON, otherwise it throws.\n *\n * @example\n *\n *    fetch('/_/list').then(jsonOrThrow).then((json) => {\n *      // Do something with the parsed json here.\n *    }).catch((r) => {\n *      if (r.status === 403) {\n *        // Handle HTTP response 403 - not authorized here.\n *      } else {\n *        console.err(r.message);\n *      }\n *    });\n *\n * @throws A JsonOrThrowErrr. See the\n *   [Response docs]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response}\n *   for more detail on reading resp (e.g. resp.text()).\n */\nexport function jsonOrThrow(resp: Response) {\n  if (resp.ok) {\n    return resp.json();\n  }\n  throw new JsonOrThrowError(resp);\n}\n", "// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/** @module common-sk/modules/dom */\n/**\n * A Promise that resolves when DOMContentLoaded has fired.\n */\nexport const DomReady = new Promise((resolve) => {\n  if (document.readyState !== 'loading') {\n    // If readyState is already past loading then\n    // DOMContentLoaded has already fired, so just resolve.\n    resolve(undefined);\n  } else {\n    document.addEventListener('DOMContentLoaded', resolve);\n  }\n});\n\n/** @function $\n *\n * @description Returns a real JS array of DOM elements that match the CSS selector.\n *\n * @param query CSS selector string.\n * @param ele The Element to start the search from.\n * @returns Array of DOM Elements that match the CSS selector.\n *\n */\nexport function $<E extends Element = Element>(\n  query: string,\n  ele: Element | Document = document\n): E[] {\n  return Array.from(ele.querySelectorAll<E>(query));\n}\n\n/** @function $$\n *\n * @description Returns the first DOM element that matches the CSS query selector.\n *\n * @param query CSS selector string.\n * @param ele The Element to start the search from.\n * @returns The first Element in DOM order that matches the CSS selector.\n */\nexport function $$<E extends Element = Element>(\n  query: string,\n  ele: Element | Document = document\n): E | null {\n  return ele.querySelector(query);\n}\n\n/**\n * Find the first parent of 'ele' with the given 'nodeName'.\n *\n * @param ele - The element to start searching a.\n * @param nodeName - The node name we are looking for.\n * @returns Either 'ele' or the first parent of 'ele' that has the nodeName of 'nodeName'. Returns\n *   null if none are found.\n *\n * @example\n *\n *   findParent(ele, 'DIV')\n *\n */\nexport function findParent(ele: HTMLElement | null, nodeName: string): HTMLElement | null {\n  while (ele !== null) {\n    if (ele.nodeName === nodeName) {\n      return ele;\n    }\n    ele = ele.parentElement;\n  }\n  return null;\n}\n\n/**\n * Find the first parent of 'ele' with the given 'nodeName'. Just like findParent, but TypeScript\n * typesafe.\n *\n * @param ele - The element to start searching a.\n * @param nodeName - The lower-case node name we are looking for, e.g. 'div'.\n * @returns Either 'ele' or the first parent of 'ele' that has the nodeName of 'nodeName'. Returns\n *   null if none are found.\n *\n * @example\n *\n *   findParentSafe(ele, 'div')\n *\n */\nexport function findParentSafe<K extends keyof HTMLElementTagNameMap>(\n  ele: HTMLElement | null,\n  nodeName: K\n): HTMLElementTagNameMap[K] | null {\n  while (ele !== null) {\n    if (ele.nodeName.toLowerCase() === nodeName) {\n      return ele as HTMLElementTagNameMap[K];\n    }\n    ele = ele.parentElement;\n  }\n  return null;\n}\n", "// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/** @module common-sk/modules/stateReflector */\nimport * as query from './query';\nimport * as object from './object';\nimport { DomReady } from './dom';\nimport { HintableObject } from './hintable';\n\n/** Track the state of an object and reflect it to and from the URL.\n *\n * @example\n *\n * // If an element has a private variable _state:\n * this._state = {\"foo\": \"bar\", \"count\": 7}\n *\n * // then in the connectedCallback() call:\n * this._stateHasChanged = stateReflector(\n *   () => this._state,\n *   (state) => {\n *     this._state = state;\n *     this._render();\n *   }\n * );\n *\n * // And then any time the app changes the value of _state:\n * this._stateHasChanged();\n *\n * @param getState - Function that returns an object representing the state\n *     we want reflected to the URL.\n *\n * @param setState(o) - Function to call when the URL has changed and the state\n *     object needs to be updated. The object 'o' doesn't need to be copied\n *     as it is a fresh object.\n *\n * @returns A function to call when state has changed and needs to be reflected\n *   to the URL.\n */\nexport function stateReflector(\n  getState: () => HintableObject,\n  setState: (o: HintableObject) => void\n): () => void {\n  // The default state of the stateHolder. Used to calculate diffs to state.\n  const defaultState = object.deepCopy(getState());\n\n  // Have we done an initial read from the the existing query params.\n  let loaded = false;\n\n  // stateFromURL should be called when the URL has changed, it updates\n  // the state via setState() and triggers the callback.\n  const stateFromURL = () => {\n    loaded = true;\n    const delta = query.toObject(window.location.search.slice(1), defaultState);\n    setState(object.applyDelta(delta, defaultState));\n  };\n\n  // When we are loaded we should update the state from the URL.\n  DomReady.then(stateFromURL);\n\n  // Every popstate event should also update the state.\n  window.addEventListener('popstate', stateFromURL);\n\n  // Return a function to call when the state has changed to force reflection into the URL.\n  return () => {\n    // Don't overwrite the query params until we have done the initial load from them.\n    if (!loaded) {\n      return;\n    }\n\n    const new_state = object.getDelta(getState(), defaultState);\n    const old_state = query.toObject(window.location.search.slice(1), defaultState);\n\n    const new_delta = object.getDelta(new_state, old_state);\n    const old_delta = object.getDelta(old_state, new_state);\n\n    // Don't push to state if the current URL and the URL to be pushed are equivalent.\n    if (Object.keys(new_delta).length > 0 || Object.keys(old_delta).length > 0) {\n      const q = query.fromObject(new_state);\n      window.history.pushState(\n        null,\n        '',\n        `${window.location.origin + window.location.pathname}?${q}`\n      );\n    }\n  };\n}\n", "import { errorMessage as elementsErrorMessage } from '../../../elements-sk/modules/errorMessage';\n\n/**\n * This is the same function as element-sk errorMessage, but defaults to a 0s\n * delay, which means the toast doesn't close automatically.\n */\nexport const errorMessage = (\n  message: string | { message: string } | { resp: Response } | object,\n  duration: number = 0\n): void => {\n  elementsErrorMessage(message, duration);\n};\n", "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @module elements-sk/spinner-sk\n * @decription <h2><code>spinner-sk</code></h2>\n *\n * <p>\n *   An activity spinner.\n * </p>\n *\n * @attr active - Boolean attribute, if present, spinner is active.\n *\n */\nimport { define } from '../define';\nimport { upgradeProperty } from '../upgradeProperty';\n\nexport class SpinnerSk extends HTMLElement {\n  // TODO(jcgregorio) What is ARIA for a spinner?\n  connectedCallback(): void {\n    upgradeProperty(this, 'active');\n  }\n\n  /** Mirrors the attribute 'active'. */\n  get active(): boolean {\n    return this.hasAttribute('active');\n  }\n\n  set active(val: boolean) {\n    if (val) {\n      this.setAttribute('active', '');\n    } else {\n      this.removeAttribute('active');\n    }\n  }\n}\n\ndefine('spinner-sk', SpinnerSk);\n", "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Import for all parts of the spinner for use via Webpack.\nimport './spinner-sk';\n", "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @module elements-sk/collapse-sk\n * @description <h2><code>collapse-sk</code></h2>\n *\n * <p>\n *   Is a collapsable element, upon collapse the element and its children\n *   are no longer displayed.\n * </p>\n *\n *  @attr closed - A boolean attribute that, if present, causes the element to\n *     collapse, i.e., transition to display: none.\n *\n */\nimport { define } from '../define';\nimport { upgradeProperty } from '../upgradeProperty';\n\nexport class CollapseSk extends HTMLElement {\n  connectedCallback(): void {\n    upgradeProperty(this, 'closed');\n  }\n\n  /** Mirrors the closed attribute. */\n  get closed(): boolean {\n    return this.hasAttribute('closed');\n  }\n\n  set closed(val: boolean) {\n    if (val) {\n      this.setAttribute('closed', '');\n    } else {\n      this.removeAttribute('closed');\n    }\n  }\n}\n\ndefine('collapse-sk', CollapseSk);\n", "// Copyright 2018 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport './collapse-sk';\n", "// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/** @module common-sk/modules/human\n *  @description Utitities for working with human friendly I/O.\n */\n\ninterface Delta {\n  readonly units: string;\n  readonly delta: number;\n}\n\nconst TIME_DELTAS: Delta[] = [\n  { units: 'w', delta: 7 * 24 * 60 * 60 },\n  { units: 'd', delta: 24 * 60 * 60 },\n  { units: 'h', delta: 60 * 60 },\n  { units: 'm', delta: 60 },\n  { units: 's', delta: 1 },\n];\n\n/** @constant {number} */\nexport const KB = 1024;\n/** @constant {number} */\nexport const MB = KB * 1024;\n/** @constant {number} */\nexport const GB = MB * 1024;\n/** @constant {number} */\nexport const TB = GB * 1024;\n/** @constant {number} */\nexport const PB = TB * 1024;\n\nconst BYTES_DELTAS: Delta[] = [\n  { units: ' PB', delta: PB },\n  { units: ' TB', delta: TB },\n  { units: ' GB', delta: GB },\n  { units: ' MB', delta: MB },\n  { units: ' KB', delta: KB },\n  { units: ' B', delta: 1 },\n];\n\n/** Left pad a number with 0s.\n *\n * @param num - The number to pad.\n * @param size - The number of digits to pad out to.\n */\nexport function pad(num: number, size: number): string {\n  let str = `${num}`;\n  while (str.length < size) {\n    str = `0${str}`;\n  }\n  return str;\n}\n\n/**\n * Returns a human-readable format of the given duration in seconds.\n * For example, 'strDuration(123)' would return \"2m 3s\".\n * Negative seconds is treated the same as positive seconds.\n *\n * @param seconds - The duration.\n */\nexport function strDuration(seconds: number): string {\n  if (seconds < 0) {\n    seconds = -seconds;\n  }\n  if (seconds === 0) {\n    return '  0s';\n  }\n  let rv = '';\n  for (const td of TIME_DELTAS) {\n    if (td.delta <= seconds) {\n      let s = Math.floor(seconds / td.delta) + td.units;\n      while (s.length < 4) {\n        s = ` ${s}`;\n      }\n      rv += s;\n      seconds %= td.delta;\n    }\n  }\n  return rv;\n}\n\n/**\n * Returns the difference between the current time and 's' as a string in a\n * human friendly format. If 's' is a number it is assumed to contain the time\n * in milliseconds otherwise it is assumed to contain a time string parsable\n * by Date.parse().\n *\n * For example, a difference of 123 seconds between 's' and the current time\n * would return \"2m\".\n *\n * @param milliseconds - The time in milliseconds or a time string.\n * @param now - The time to diff against, if not supplied then the diff\n * is done against Date.now().\n */\nexport function diffDate(s: number | string, now?: number): string {\n  if (now === undefined) {\n    now = Date.now();\n  }\n  const ms = typeof s === 'number' ? s : Date.parse(s);\n  let diff = (ms - now) / 1000;\n  if (diff < 0) {\n    // eslint-disable-next-line operator-assignment\n    diff = -1.0 * diff;\n  }\n  return humanize(diff, TIME_DELTAS);\n}\n\n/**\n * Formats the amount of bytes in a human friendly format.\n * unit may be supplied to indicate b is not in bytes, but in something\n * like kilobytes (KB) or megabytes (MB)\n *\n * @example\n * // returns \"1 KB\"\n * bytes(1234)\n * @example\n * // returns \"5 GB\"\n * bytes(5321, MB)\n *\n * @param b - The number of bytes in units 'unit'.\n * @param unit - The number of bytes per unit.\n */\nexport function bytes(b: number, unit: number = 1): string {\n  return humanize(b * unit, BYTES_DELTAS);\n}\n\n/** localeTime formats the provided Date object in locale time and appends the timezone to the end.\n *\n * @param date The date to format.\n */\nexport function localeTime(date: Date): string {\n  // caching timezone could be buggy, especially if times from a wide range\n  // of dates are used. The main concern would be crossing over Daylight\n  // Savings time and having some times be erroneously in EST instead of\n  // EDT, for example\n  const str = date.toString();\n  const timezone = str.substring(str.indexOf('('));\n  return `${date.toLocaleString()} ${timezone}`;\n}\n\nfunction humanize(n: number, deltas: Delta[]) {\n  for (let i = 0; i < deltas.length - 1; i++) {\n    // If n would round to '60s', return '1m' instead.\n    const nextDeltaRounded = Math.round(n / deltas[i + 1].delta) * deltas[i + 1].delta;\n    if (nextDeltaRounded / deltas[i].delta >= 1) {\n      return Math.round(n / deltas[i].delta) + deltas[i].units;\n    }\n  }\n  const index = deltas.length - 1;\n  return Math.round(n / deltas[index].delta) + deltas[index].units;\n}\n", "// DO NOT EDIT. This file is automatically generated.\n\nexport namespace pivot {\n\texport interface Request {\n\t\tgroup_by: string[] | null;\n\t\toperation: pivot.Operation;\n\t\tsummary: pivot.Operation[] | null;\n\t}\n}\n\nexport interface Go2TS {\n\tGenerateNominalTypes: boolean;\n}\n\nexport interface Alert {\n\tid_as_string: string;\n\tdisplay_name: string;\n\tquery: string;\n\talert: string;\n\tissue_tracker_component: SerializesToString;\n\tinteresting: number;\n\tbug_uri_template: string;\n\talgo: ClusterAlgo;\n\tstep: StepDetection;\n\tstate: ConfigState;\n\towner: string;\n\tstep_up_only: boolean;\n\tdirection: Direction;\n\tradius: number;\n\tk: number;\n\tgroup_by: string;\n\tsparse: boolean;\n\tminimum_num: number;\n\tcategory: string;\n\taction?: AlertAction;\n\tsub_name?: string;\n\tsub_revision?: string;\n}\n\nexport interface AlertsStatus {\n\talerts: number;\n}\n\nexport interface RevisionInfo {\n\tmaster: string;\n\tbot: string;\n\tbenchmark: string;\n\tstart_revision: number;\n\tend_revision: number;\n\tstart_time: number;\n\tend_time: number;\n\ttest: string;\n\tis_improvement: boolean;\n\tbug_id: string;\n\texplore_url: string;\n\tquery: string;\n\tanomaly_ids: string[] | null;\n}\n\nexport interface ValuePercent {\n\tvalue: string;\n\tpercent: number;\n}\n\nexport interface StepFit {\n\tleast_squares: number;\n\tturning_point: number;\n\tstep_size: number;\n\tregression: number;\n\tstatus: StepFitStatus;\n}\n\nexport interface ColumnHeader {\n\toffset: CommitNumber;\n\ttimestamp: TimestampSeconds;\n}\n\nexport interface ClusterSummary {\n\tcentroid: number[] | null;\n\tshortcut: string;\n\tparam_summaries2: ValuePercent[] | null;\n\tstep_fit: StepFit | null;\n\tstep_point: ColumnHeader | null;\n\tnum: number;\n\tts: string;\n\tnotification_id?: string;\n}\n\nexport interface FavoritesSectionLinkConfig {\n\tid?: string;\n\ttext: string;\n\thref: string;\n\tdescription: string;\n}\n\nexport interface FavoritesSectionConfig {\n\tname: string;\n\tlinks: FavoritesSectionLinkConfig[] | null;\n}\n\nexport interface Favorites {\n\tsections: FavoritesSectionConfig[] | null;\n}\n\nexport interface QueryCacheConfig {\n\ttype: CacheType;\n\tlevel1_cache_key?: string;\n\tlevel1_cache_values?: string[] | null;\n\tlevel2_cache_key?: string;\n\tlevel2_cache_values?: string[] | null;\n\tenabled?: boolean;\n}\n\nexport interface RedisConfig {\n\tproject?: string;\n\tzone?: string;\n\tinstance?: string;\n\tcache_expiration_minutes?: number;\n}\n\nexport interface QueryConfig {\n\tinclude_params?: string[] | null;\n\tdefault_param_selections?: { [key: string]: string[] | null } | null;\n\tdefault_url_values?: { [key: string]: string } | null;\n\tcache_config?: QueryCacheConfig;\n\tredis_config?: RedisConfig;\n\tquery_commit_chunk_size?: number;\n\tmax_empty_tiles?: number;\n}\n\nexport interface Commit {\n\toffset: CommitNumber;\n\thash: string;\n\tts: number;\n\tauthor: string;\n\tmessage: string;\n\turl: string;\n\tbody: string;\n}\n\nexport interface DataFrame {\n\ttraceset: TraceSet;\n\theader: (ColumnHeader | null)[] | null;\n\tparamset: ReadOnlyParamSet;\n\tskip: number;\n}\n\nexport interface Anomaly {\n\tid: number;\n\ttest_path: string;\n\tbug_id: number;\n\tstart_revision: number;\n\tend_revision: number;\n\tstart_revision_hash?: string;\n\tend_revision_hash?: string;\n\tis_improvement: boolean;\n\trecovered: boolean;\n\tstate: string;\n\tstatistic: string;\n\tunits: string;\n\tdegrees_of_freedom: number;\n\tmedian_before_anomaly: number;\n\tmedian_after_anomaly: number;\n\tp_value: number;\n\tsegment_size_after: number;\n\tsegment_size_before: number;\n\tstd_dev_before_anomaly: number;\n\tt_statistic: number;\n\tsubscription_name: string;\n\tbug_component: string;\n\tbug_labels: string[] | null;\n\tbug_cc_emails: string[] | null;\n\tbisect_ids: string[] | null;\n}\n\nexport interface FrameResponse {\n\tdataframe: DataFrame | null;\n\tskps: number[] | null;\n\tmsg: string;\n\tdisplay_mode: FrameResponseDisplayMode;\n\tanomalymap: AnomalyMap;\n}\n\nexport interface TriageStatus {\n\tstatus: Status;\n\tmessage: string;\n}\n\nexport interface Regression {\n\tlow: ClusterSummary | null;\n\thigh: ClusterSummary | null;\n\tframe: FrameResponse | null;\n\tlow_status: TriageStatus;\n\thigh_status: TriageStatus;\n\tid: string;\n\tcommit_number: CommitNumber;\n\tprev_commit_number: CommitNumber;\n\talert_id: number;\n\tcreation_time: string;\n\tmedian_before: number;\n\tmedian_after: number;\n\tis_improvement: boolean;\n\tcluster_type: string;\n}\n\nexport interface RegressionAtCommit {\n\tcid: Commit;\n\tregression: Regression | null;\n}\n\nexport interface FrameRequest {\n\tbegin: number;\n\tend: number;\n\tformulas?: string[] | null;\n\tqueries?: string[] | null;\n\tkeys?: string;\n\ttz: string;\n\tnum_commits?: number;\n\trequest_type?: RequestType;\n\tdisable_filter_parent_traces?: boolean;\n\tpivot?: pivot.Request | null;\n}\n\nexport interface AlertUpdateResponse {\n\tIDAsString: string;\n}\n\nexport interface CIDHandlerResponse {\n\tcommitSlice: Commit[] | null;\n\tlogEntry: string;\n}\n\nexport interface ClusterStartResponse {\n\tid: string;\n}\n\nexport interface CommitDetailsRequest {\n\tcid: CommitNumber;\n\ttraceid: string;\n}\n\nexport interface CountHandlerRequest {\n\tq: string;\n\tbegin: number;\n\tend: number;\n}\n\nexport interface CountHandlerResponse {\n\tcount: number;\n\tparamset: ReadOnlyParamSet;\n}\n\nexport interface Subscription {\n\tname?: string;\n\trevision?: string;\n\tbug_labels?: string[] | null;\n\thotlists?: string[] | null;\n\tbug_component?: string;\n\tbug_priority?: number;\n\tbug_severity?: number;\n\tbug_cc_emails?: string[] | null;\n\tcontact_email?: string;\n}\n\nexport interface GetAnomaliesResponse {\n\tsubscription: Subscription | null;\n\talerts: Alert[] | null;\n\tanomaly_list: Anomaly[] | null;\n\tanomaly_cursor: string;\n\terror: string;\n}\n\nexport interface Timerange {\n\tbegin: number;\n\tend: number;\n}\n\nexport interface GetGroupReportResponse {\n\tanomaly_list: Anomaly[] | null;\n\tsid: string;\n\tselected_keys: string[] | null;\n\terror: string;\n\ttimerange_map: { [key: number]: Timerange } | null;\n}\n\nexport interface GetGraphsShortcutRequest {\n\tid: string;\n}\n\nexport interface GetSheriffListResponse {\n\tsheriff_list: string[] | null;\n\terror: string;\n}\n\nexport interface NextParamListHandlerRequest {\n\tq: string;\n}\n\nexport interface NextParamListHandlerResponse {\n\tcount: number;\n\tparamset: ReadOnlyParamSet;\n}\n\nexport interface RangeRequest {\n\toffset: CommitNumber;\n\tbegin: number;\n\tend: number;\n}\n\nexport interface RegressionRangeRequest {\n\tbegin: number;\n\tend: number;\n\tsubset: Subset;\n\talert_filter: string;\n}\n\nexport interface RegressionRow {\n\tcid: Commit;\n\tcolumns: (Regression | null)[] | null;\n}\n\nexport interface RegressionRangeResponse {\n\theader: (Alert | null)[] | null;\n\ttable: (RegressionRow | null)[] | null;\n\tcategories: string[] | null;\n}\n\nexport interface ShiftRequest {\n\tbegin: CommitNumber;\n\tend: CommitNumber;\n}\n\nexport interface ShiftResponse {\n\tbegin: number;\n\tend: number;\n}\n\nexport interface SkPerfConfig {\n\tradius: number;\n\tkey_order: string[] | null;\n\tnum_shift: number;\n\tinteresting: number;\n\tstep_up_only: boolean;\n\tcommit_range_url: string;\n\tdemo: boolean;\n\tdisplay_group_by: boolean;\n\thide_list_of_commits_on_explore: boolean;\n\tnotifications: NotifierTypes;\n\tfetch_chrome_perf_anomalies: boolean;\n\tfeedback_url: string;\n\tchat_url: string;\n\thelp_url_override: string;\n\ttrace_format: TraceFormat;\n\tneed_alert_action: boolean;\n\tbug_host_url: string;\n\tgit_repo_url: string;\n\tkeys_for_commit_range: string[] | null;\n\tkeys_for_useful_links: string[] | null;\n\tskip_commit_detail_display: boolean;\n\timage_tag: string;\n}\n\nexport interface TriageRequest {\n\tcid: CommitNumber;\n\talert: Alert;\n\ttriage: TriageStatus;\n\tcluster_type: string;\n}\n\nexport interface TriageResponse {\n\tbug: string;\n}\n\nexport interface TryBugRequest {\n\tbug_uri_template: string;\n}\n\nexport interface TryBugResponse {\n\turl: string;\n}\n\nexport interface SourceIssues {\n\tsourceIssueIds?: Int64s;\n}\n\nexport interface AttachmentDataRef {\n\tresourceName?: string;\n}\n\nexport interface Attachment {\n\tattachmentDataRef?: AttachmentDataRef | null;\n\tattachmentId?: string;\n\tcontentType?: string;\n\tetag?: string;\n\tfilename?: string;\n\tlength?: string;\n}\n\nexport interface Date {\n\tday?: number;\n\tmonth?: number;\n\tyear?: number;\n}\n\nexport interface RepeatedDate {\n\tvalues?: (Date | null)[] | null;\n}\n\nexport interface RepeatedString {\n\tvalues?: string[] | null;\n}\n\nexport interface RepeatedDouble {\n\tvalues?: number[] | null;\n}\n\nexport interface CustomFieldValue {\n\tcustomFieldId?: string;\n\tdateValue?: Date | null;\n\tdisplayString?: string;\n\tenumValue?: string;\n\tnumericValue?: number;\n\trepeatedDateValue?: RepeatedDate | null;\n\trepeatedEnumValue?: RepeatedString | null;\n\trepeatedNumericValue?: RepeatedDouble | null;\n\trepeatedTextValue?: RepeatedString | null;\n\ttextValue?: string;\n}\n\nexport interface CustomField {\n\tcomponentId?: string;\n\tcustomFieldId?: string;\n\tdescription?: string;\n\tenumValues?: string[] | null;\n\tname?: string;\n\trequired?: boolean;\n\tshared?: boolean;\n\ttype?: string;\n\ttypedDefaultValue?: CustomFieldValue | null;\n}\n\nexport interface User {\n\temailAddress?: string;\n\tobfuscatedEmailAddress?: string;\n}\n\nexport interface IssueComment {\n\tcomment?: string;\n\tcommentNumber?: number;\n\tformattingMode?: string;\n\tissueId?: string;\n\tlastEditor?: User | null;\n\tmodifiedTime?: string;\n\tversion?: number;\n\tHTTPStatusCode: number;\n\tHeader: Header;\n}\n\nexport interface IssueAccessLimit {\n\taccessLevel?: string;\n}\n\nexport interface IssueState {\n\taccessLimit?: IssueAccessLimit | null;\n\tassignee?: User | null;\n\tblockedByIssueIds?: Int64s;\n\tblockingIssueIds?: Int64s;\n\tcanonicalIssueId?: string;\n\tccs?: (User | null)[] | null;\n\tcomponentId?: string;\n\tcustomFields?: (CustomFieldValue | null)[] | null;\n\tduplicateIssueIds?: Int64s;\n\tfoundInVersions?: string[] | null;\n\thotlistIds?: Int64s;\n\tinProd?: boolean;\n\tisArchived?: boolean;\n\tpriority?: string;\n\treporter?: User | null;\n\tseverity?: string;\n\tstatus?: string;\n\ttargetedToVersions?: string[] | null;\n\ttitle?: string;\n\ttype?: string;\n\tverifiedInVersions?: string[] | null;\n\tverifier?: User | null;\n}\n\nexport interface Hyperlink {\n\thref?: string;\n}\n\nexport interface IssueReference {\n\tcommentNumber?: number;\n\tissueId?: string;\n}\n\nexport interface RelatedLink {\n\thyperlink?: Hyperlink | null;\n\tissueReference?: IssueReference | null;\n\tsourceCommentNumber?: number;\n}\n\nexport interface StatusUpdate {\n\tformattingMode?: string;\n\tissueId?: string;\n\tupdateText?: string;\n}\n\nexport interface IssueUserData {\n\teditableCommentNumbers?: number[] | null;\n\thasStarred?: boolean;\n\thasUpvoted?: boolean;\n}\n\nexport interface FieldId {\n\tcustomFieldId?: string;\n\tstandardField?: string;\n}\n\nexport interface Issue {\n\tancestors?: { [key: string]: SourceIssues } | null;\n\tattachments?: (Attachment | null)[] | null;\n\tchildIssueCount?: number;\n\tcreatedTime?: string;\n\tcustomFields?: (CustomField | null)[] | null;\n\tdescription?: IssueComment | null;\n\tetag?: string;\n\tisArchived?: boolean;\n\tissueComment?: IssueComment | null;\n\tissueId?: string;\n\tissueState?: IssueState | null;\n\tlastModifier?: User | null;\n\tmajorModifiedTime?: string;\n\tminorModifiedTime?: string;\n\tmodifiedTime?: string;\n\tparentIssueIds?: Int64s;\n\trelatedLinks?: (RelatedLink | null)[] | null;\n\tresolvedTime?: string;\n\tstatusUpdate?: StatusUpdate | null;\n\ttrackerId?: string;\n\tuserData?: IssueUserData | null;\n\tverifiedTime?: string;\n\tversion?: number;\n\tvisibleFields?: (FieldId | null)[] | null;\n\tvoteCount?: string;\n\tHTTPStatusCode: number;\n\tHeader: Header;\n}\n\nexport interface ListIssuesResponse {\n\tissues?: (Issue | null)[] | null;\n}\n\nexport interface GraphConfig {\n\tqueries: string[] | null;\n\tformulas: string[] | null;\n\tkeys: string;\n}\n\nexport interface GraphsShortcut {\n\tgraphs: GraphConfig[] | null;\n}\n\nexport interface CreateBisectRequest {\n\tcomparison_mode: string;\n\tstart_git_hash: string;\n\tend_git_hash: string;\n\tconfiguration: string;\n\tbenchmark: string;\n\tstory: string;\n\tchart: string;\n\tstatistic: string;\n\tcomparison_magnitude: string;\n\tpin: string;\n\tproject: string;\n\tbug_id: string;\n\tuser: string;\n\talert_ids: string;\n}\n\nexport interface CreateLegacyTryRequest {\n\tname: string;\n\tbase_git_hash: string;\n\tend_git_hash: string;\n\tbase_patch: string;\n\texperiment_patch: string;\n\tconfiguration: string;\n\tbenchmark: string;\n\tstory: string;\n\textra_test_args: string;\n\trepository: string;\n\tbug_id: string;\n\tuser: string;\n}\n\nexport interface CreatePinpointResponse {\n\tjobId: string;\n\tjobUrl: string;\n}\n\nexport interface FullSummary {\n\tsummary: ClusterSummary;\n\ttriage: TriageStatus;\n\tframe: FrameResponse;\n}\n\nexport interface Domain {\n\tn: number;\n\tend: string;\n\toffset: number;\n}\n\nexport interface RegressionDetectionRequest {\n\talert: Alert | null;\n\tdomain: Domain;\n\tstep: number;\n\ttotal_queries: number;\n}\n\nexport interface ClusterSummaries {\n\tClusters: (ClusterSummary | null)[] | null;\n\tStdDevThreshold: number;\n\tK: number;\n}\n\nexport interface RegressionDetectionResponse {\n\tsummary: ClusterSummaries | null;\n\tframe: FrameResponse | null;\n}\n\nexport interface TryBotRequest {\n\tkind: TryBotRequestKind;\n\tcl: CL;\n\tpatch_number: number;\n\tcommit_number: CommitNumber;\n\tquery: string;\n}\n\nexport interface TryBotResult {\n\tparams: Params;\n\tmedian: number;\n\tlower: number;\n\tupper: number;\n\tstddevRatio: number;\n\tvalues: number[] | null;\n}\n\nexport interface TryBotResponse {\n\theader: (ColumnHeader | null)[] | null;\n\tresults: TryBotResult[] | null;\n\tparamset: ReadOnlyParamSet;\n}\n\nexport namespace progress {\n\texport interface Message {\n\t\tkey: string;\n\t\tvalue: string;\n\t}\n}\n\nexport namespace progress {\n\texport interface SerializedProgress {\n\t\tstatus: progress.Status;\n\t\tmessages: progress.Message[];\n\t\tresults?: any;\n\t\turl: string;\n\t}\n}\n\nexport namespace ingest {\n\texport interface SingleMeasurement {\n\t\tvalue: string;\n\t\tmeasurement: number;\n\t\tlinks?: { [key: string]: string } | null;\n\t}\n}\n\nexport namespace ingest {\n\texport interface Result {\n\t\tkey: { [key: string]: string } | null;\n\t\tmeasurement?: number;\n\t\tmeasurements?: { [key: string]: ingest.SingleMeasurement[] | null } | null;\n\t}\n}\n\nexport namespace ingest {\n\texport interface Format {\n\t\tversion: number;\n\t\tgit_hash: string;\n\t\tissue?: CL;\n\t\tpatchset?: string;\n\t\tkey?: { [key: string]: string } | null;\n\t\tresults: ingest.Result[] | null;\n\t\tlinks?: { [key: string]: string } | null;\n\t}\n}\n\nexport type Params = { [key: string]: string } & {\n\t/**\n\t* WARNING: Do not reference this field from application code.\n\t*\n\t* This field exists solely to provide nominal typing. For reference, see\n\t* https://www.typescriptlang.org/play#example/nominal-typing.\n\t*/\n\t_paramsBrand: 'type alias for { [key: string]: string }'\n};\n\nexport function Params(v: { [key: string]: string }): Params {\n\treturn v as Params;\n};\n\nexport type ParamSet = { [key: string]: string[] } & {\n\t/**\n\t* WARNING: Do not reference this field from application code.\n\t*\n\t* This field exists solely to provide nominal typing. For reference, see\n\t* https://www.typescriptlang.org/play#example/nominal-typing.\n\t*/\n\t_paramSetBrand: 'type alias for { [key: string]: string[] }'\n};\n\nexport function ParamSet(v: { [key: string]: string[] }): ParamSet {\n\treturn v as ParamSet;\n};\n\nexport type ReadOnlyParamSet = { [key: string]: string[] } & {\n\t/**\n\t* WARNING: Do not reference this field from application code.\n\t*\n\t* This field exists solely to provide nominal typing. For reference, see\n\t* https://www.typescriptlang.org/play#example/nominal-typing.\n\t*/\n\t_readOnlyParamSetBrand: 'type alias for { [key: string]: string[] }'\n};\n\nexport function ReadOnlyParamSet(v: { [key: string]: string[] }): ReadOnlyParamSet {\n\treturn v as ReadOnlyParamSet;\n};\n\nexport type Trace = number[] & {\n\t/**\n\t* WARNING: Do not reference this field from application code.\n\t*\n\t* This field exists solely to provide nominal typing. For reference, see\n\t* https://www.typescriptlang.org/play#example/nominal-typing.\n\t*/\n\t_traceBrand: 'type alias for number[]'\n};\n\nexport function Trace(v: number[]): Trace {\n\treturn v as Trace;\n};\n\nexport type TraceSet = { [key: string]: Trace } & {\n\t/**\n\t* WARNING: Do not reference this field from application code.\n\t*\n\t* This field exists solely to provide nominal typing. For reference, see\n\t* https://www.typescriptlang.org/play#example/nominal-typing.\n\t*/\n\t_traceSetBrand: 'type alias for { [key: string]: Trace }'\n};\n\nexport function TraceSet(v: { [key: string]: Trace }): TraceSet {\n\treturn v as TraceSet;\n};\n\nexport namespace pivot { export type Operation = 'sum' | 'avg' | 'geo' | 'std' | 'count' | 'min' | 'max'; }\n\nexport type SerializesToString = string & {\n\t/**\n\t* WARNING: Do not reference this field from application code.\n\t*\n\t* This field exists solely to provide nominal typing. For reference, see\n\t* https://www.typescriptlang.org/play#example/nominal-typing.\n\t*/\n\t_serializesToStringBrand: 'type alias for string'\n};\n\nexport function SerializesToString(v: string): SerializesToString {\n\treturn v as SerializesToString;\n};\n\nexport type ClusterAlgo = 'kmeans' | 'stepfit';\n\nexport type StepDetection = '' | 'absolute' | 'const' | 'percent' | 'cohen' | 'mannwhitneyu';\n\nexport type ConfigState = 'ACTIVE' | 'DELETED';\n\nexport type Direction = 'UP' | 'DOWN' | 'BOTH';\n\nexport type AlertAction = 'noaction' | 'report' | 'bisect';\n\nexport type StepFitStatus = 'Low' | 'High' | 'Uninteresting';\n\nexport type CommitNumber = number & {\n\t/**\n\t* WARNING: Do not reference this field from application code.\n\t*\n\t* This field exists solely to provide nominal typing. For reference, see\n\t* https://www.typescriptlang.org/play#example/nominal-typing.\n\t*/\n\t_commitNumberBrand: 'type alias for number'\n};\n\nexport function CommitNumber(v: number): CommitNumber {\n\treturn v as CommitNumber;\n};\n\nexport type TimestampSeconds = number & {\n\t/**\n\t* WARNING: Do not reference this field from application code.\n\t*\n\t* This field exists solely to provide nominal typing. For reference, see\n\t* https://www.typescriptlang.org/play#example/nominal-typing.\n\t*/\n\t_timestampSecondsBrand: 'type alias for number'\n};\n\nexport function TimestampSeconds(v: number): TimestampSeconds {\n\treturn v as TimestampSeconds;\n};\n\nexport type CacheType = string & {\n\t/**\n\t* WARNING: Do not reference this field from application code.\n\t*\n\t* This field exists solely to provide nominal typing. For reference, see\n\t* https://www.typescriptlang.org/play#example/nominal-typing.\n\t*/\n\t_cacheTypeBrand: 'type alias for string'\n};\n\nexport function CacheType(v: string): CacheType {\n\treturn v as CacheType;\n};\n\nexport type FrameResponseDisplayMode = 'display_query_only' | 'display_plot' | 'display_pivot_table' | 'display_pivot_plot' | 'display_spinner';\n\nexport type CommitNumberAnomalyMap = { [key: number]: Anomaly } | null;\n\nexport type AnomalyMap = { [key: string]: CommitNumberAnomalyMap } | null;\n\nexport type Status = '' | 'positive' | 'negative' | 'untriaged';\n\nexport type RequestType = 0 | 1;\n\nexport type Subset = 'all' | 'regressions' | 'untriaged';\n\nexport type NotifierTypes = 'html_email' | 'markdown_issuetracker' | 'none';\n\nexport type TraceFormat = 'chrome' | '';\n\nexport type Int64s = number[] | null;\n\nexport type Header = { [key: string]: string[] | null } | null;\n\nexport type TryBotRequestKind = 'trybot' | 'commit';\n\nexport type CL = string & {\n\t/**\n\t* WARNING: Do not reference this field from application code.\n\t*\n\t* This field exists solely to provide nominal typing. For reference, see\n\t* https://www.typescriptlang.org/play#example/nominal-typing.\n\t*/\n\t_cLBrand: 'type alias for string'\n};\n\nexport function CL(v: string): CL {\n\treturn v as CL;\n};\n\nexport type ProcessState = 'Running' | 'Success' | 'Error';\n\nexport type ProjectId = 'chromium';\n\nexport namespace progress { export type Status = 'Running' | 'Finished' | 'Error'; }\n", "/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n  extendStatics = Object.setPrototypeOf ||\n      ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n      function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n  return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n  if (typeof b !== \"function\" && b !== null)\n      throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n  extendStatics(d, b);\n  function __() { this.constructor = d; }\n  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n  __assign = Object.assign || function __assign(t) {\n      for (var s, i = 1, n = arguments.length; i < n; i++) {\n          s = arguments[i];\n          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n      }\n      return t;\n  }\n  return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n      t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n      for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n              t[p[i]] = s[p[i]];\n      }\n  return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n  if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n  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\nexport function __param(paramIndex, decorator) {\n  return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n  function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n  var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n  var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n  var _, done = false;\n  for (var i = decorators.length - 1; i >= 0; i--) {\n      var context = {};\n      for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n      for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n      context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n      var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n      if (kind === \"accessor\") {\n          if (result === void 0) continue;\n          if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n          if (_ = accept(result.get)) descriptor.get = _;\n          if (_ = accept(result.set)) descriptor.set = _;\n          if (_ = accept(result.init)) initializers.unshift(_);\n      }\n      else if (_ = accept(result)) {\n          if (kind === \"field\") initializers.unshift(_);\n          else descriptor[key] = _;\n      }\n  }\n  if (target) Object.defineProperty(target, contextIn.name, descriptor);\n  done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n  var useValue = arguments.length > 2;\n  for (var i = 0; i < initializers.length; i++) {\n      value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n  }\n  return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n  return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n  if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n  return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n  if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n  return new (P || (P = Promise))(function (resolve, reject) {\n      function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n      function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n      function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n      step((generator = generator.apply(thisArg, _arguments || [])).next());\n  });\n}\n\nexport function __generator(thisArg, body) {\n  var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n  return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n  function verb(n) { return function (v) { return step([n, v]); }; }\n  function step(op) {\n      if (f) throw new TypeError(\"Generator is already executing.\");\n      while (g && (g = 0, op[0] && (_ = 0)), _) try {\n          if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n          if (y = 0, t) op = [op[0] & 2, t.value];\n          switch (op[0]) {\n              case 0: case 1: t = op; break;\n              case 4: _.label++; return { value: op[1], done: false };\n              case 5: _.label++; y = op[1]; op = [0]; continue;\n              case 7: op = _.ops.pop(); _.trys.pop(); continue;\n              default:\n                  if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                  if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                  if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                  if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                  if (t[2]) _.ops.pop();\n                  _.trys.pop(); continue;\n          }\n          op = body.call(thisArg, _);\n      } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n      if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n  }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n  if (k2 === undefined) k2 = k;\n  var desc = Object.getOwnPropertyDescriptor(m, k);\n  if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n  }\n  Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n  if (k2 === undefined) k2 = k;\n  o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n  for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n  var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n  if (m) return m.call(o);\n  if (o && typeof o.length === \"number\") return {\n      next: function () {\n          if (o && i >= o.length) o = void 0;\n          return { value: o && o[i++], done: !o };\n      }\n  };\n  throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n  var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n  if (!m) return o;\n  var i = m.call(o), r, ar = [], e;\n  try {\n      while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n  }\n  catch (error) { e = { error: error }; }\n  finally {\n      try {\n          if (r && !r.done && (m = i[\"return\"])) m.call(i);\n      }\n      finally { if (e) throw e.error; }\n  }\n  return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n  for (var ar = [], i = 0; i < arguments.length; i++)\n      ar = ar.concat(__read(arguments[i]));\n  return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n  for (var r = Array(s), k = 0, i = 0; i < il; i++)\n      for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n          r[k] = a[j];\n  return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n      if (ar || !(i in from)) {\n          if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n          ar[i] = from[i];\n      }\n  }\n  return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n  return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n  if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n  var g = generator.apply(thisArg, _arguments || []), i, q = [];\n  return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n  function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n  function fulfill(value) { resume(\"next\", value); }\n  function reject(value) { resume(\"throw\", value); }\n  function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n  var i, p;\n  return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n  function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n  if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n  var m = o[Symbol.asyncIterator], i;\n  return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n  function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n  function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n  if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n  return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n  Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n  o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n  if (mod && mod.__esModule) return mod;\n  var result = {};\n  if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n  __setModuleDefault(result, mod);\n  return result;\n}\n\nexport function __importDefault(mod) {\n  return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n  if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n  if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n  return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n  if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n  if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n  if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n  return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n  if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n  return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n  if (value !== null && value !== void 0) {\n    if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n    var dispose;\n    if (async) {\n        if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n        dispose = value[Symbol.asyncDispose];\n    }\n    if (dispose === void 0) {\n        if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n        dispose = value[Symbol.dispose];\n    }\n    if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n    env.stack.push({ value: value, dispose: dispose, async: async });\n  }\n  else if (async) {\n    env.stack.push({ async: true });\n  }\n  return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n  var e = new Error(message);\n  return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n  function fail(e) {\n    env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n    env.hasError = true;\n  }\n  function next() {\n    while (env.stack.length) {\n      var rec = env.stack.pop();\n      try {\n        var result = rec.dispose && rec.dispose.call(rec.value);\n        if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n      }\n      catch (e) {\n          fail(e);\n      }\n    }\n    if (env.hasError) throw env.error;\n  }\n  return next();\n}\n\nexport default {\n  __extends,\n  __assign,\n  __rest,\n  __decorate,\n  __param,\n  __metadata,\n  __awaiter,\n  __generator,\n  __createBinding,\n  __exportStar,\n  __values,\n  __read,\n  __spread,\n  __spreadArrays,\n  __spreadArray,\n  __await,\n  __asyncGenerator,\n  __asyncDelegator,\n  __asyncValues,\n  __makeTemplateObject,\n  __importStar,\n  __importDefault,\n  __classPrivateFieldGet,\n  __classPrivateFieldSet,\n  __classPrivateFieldIn,\n  __addDisposableResource,\n  __disposeResources,\n};\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport type {Constructor} from './base.js';\n\n/**\n * Allow for custom element classes with private constructors\n */\ntype CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nexport type CustomElementDecorator = {\n  // legacy\n  (cls: CustomElementClass): void;\n\n  // standard\n  (\n    target: CustomElementClass,\n    context: ClassDecoratorContext<Constructor<HTMLElement>>\n  ): void;\n};\n\n/**\n * Class decorator factory that defines the decorated class as a custom element.\n *\n * ```js\n * @customElement('my-element')\n * class MyElement extends LitElement {\n *   render() {\n *     return html``;\n *   }\n * }\n * ```\n * @category Decorator\n * @param tagName The tag name of the custom element to define.\n */\nexport const customElement =\n  (tagName: string): CustomElementDecorator =>\n  (\n    classOrTarget: CustomElementClass | Constructor<HTMLElement>,\n    context?: ClassDecoratorContext<Constructor<HTMLElement>>\n  ) => {\n    if (context !== undefined) {\n      context.addInitializer(() => {\n        customElements.define(\n          tagName,\n          classOrTarget as CustomElementConstructor\n        );\n      });\n    } else {\n      customElements.define(tagName, classOrTarget as CustomElementConstructor);\n    }\n  };\n", "/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nconst NODE_MODE = false;\n\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n\n/**\n * Whether the current browser supports `adoptedStyleSheets`.\n */\nexport const supportsAdoptingStyleSheets: boolean =\n  global.ShadowRoot &&\n  (global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) &&\n  'adoptedStyleSheets' in Document.prototype &&\n  'replace' in CSSStyleSheet.prototype;\n\n/**\n * A CSSResult or native CSSStyleSheet.\n *\n * In browsers that support constructible CSS style sheets, CSSStyleSheet\n * object can be used for styling along side CSSResult from the `css`\n * template tag.\n */\nexport type CSSResultOrNative = CSSResult | CSSStyleSheet;\n\nexport type CSSResultArray = Array<CSSResultOrNative | CSSResultArray>;\n\n/**\n * A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.\n */\nexport type CSSResultGroup = CSSResultOrNative | CSSResultArray;\n\nconst constructionToken = Symbol();\n\nconst cssTagCache = new WeakMap<TemplateStringsArray, CSSStyleSheet>();\n\n/**\n * A container for a string of CSS text, that may be used to create a CSSStyleSheet.\n *\n * CSSResult is the return value of `css`-tagged template literals and\n * `unsafeCSS()`. In order to ensure that CSSResults are only created via the\n * `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.\n */\nexport class CSSResult {\n  // This property needs to remain unminified.\n  ['_$cssResult$'] = true;\n  readonly cssText: string;\n  private _styleSheet?: CSSStyleSheet;\n  private _strings: TemplateStringsArray | undefined;\n\n  private constructor(\n    cssText: string,\n    strings: TemplateStringsArray | undefined,\n    safeToken: symbol\n  ) {\n    if (safeToken !== constructionToken) {\n      throw new Error(\n        'CSSResult is not constructable. Use `unsafeCSS` or `css` instead.'\n      );\n    }\n    this.cssText = cssText;\n    this._strings = strings;\n  }\n\n  // This is a getter so that it's lazy. In practice, this means stylesheets\n  // are not created until the first element instance is made.\n  get styleSheet(): CSSStyleSheet | undefined {\n    // If `supportsAdoptingStyleSheets` is true then we assume CSSStyleSheet is\n    // constructable.\n    let styleSheet = this._styleSheet;\n    const strings = this._strings;\n    if (supportsAdoptingStyleSheets && styleSheet === undefined) {\n      const cacheable = strings !== undefined && strings.length === 1;\n      if (cacheable) {\n        styleSheet = cssTagCache.get(strings);\n      }\n      if (styleSheet === undefined) {\n        (this._styleSheet = styleSheet = new CSSStyleSheet()).replaceSync(\n          this.cssText\n        );\n        if (cacheable) {\n          cssTagCache.set(strings, styleSheet);\n        }\n      }\n    }\n    return styleSheet;\n  }\n\n  toString(): string {\n    return this.cssText;\n  }\n}\n\ntype ConstructableCSSResult = CSSResult & {\n  new (\n    cssText: string,\n    strings: TemplateStringsArray | undefined,\n    safeToken: symbol\n  ): CSSResult;\n};\n\nconst textFromCSSResult = (value: CSSResultGroup | number) => {\n  // This property needs to remain unminified.\n  if ((value as CSSResult)['_$cssResult$'] === true) {\n    return (value as CSSResult).cssText;\n  } else if (typeof value === 'number') {\n    return value;\n  } else {\n    throw new Error(\n      `Value passed to 'css' function must be a 'css' function result: ` +\n        `${value}. Use 'unsafeCSS' to pass non-literal values, but take care ` +\n        `to ensure page security.`\n    );\n  }\n};\n\n/**\n * Wrap a value for interpolation in a {@linkcode css} tagged template literal.\n *\n * This is unsafe because untrusted CSS text can be used to phone home\n * or exfiltrate data to an attacker controlled site. Take care to only use\n * this with trusted input.\n */\nexport const unsafeCSS = (value: unknown) =>\n  new (CSSResult as ConstructableCSSResult)(\n    typeof value === 'string' ? value : String(value),\n    undefined,\n    constructionToken\n  );\n\n/**\n * A template literal tag which can be used with LitElement's\n * {@linkcode LitElement.styles} property to set element styles.\n *\n * For security reasons, only literal string values and number may be used in\n * embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}\n * may be used inside an expression.\n */\nexport const css = (\n  strings: TemplateStringsArray,\n  ...values: (CSSResultGroup | number)[]\n): CSSResult => {\n  const cssText =\n    strings.length === 1\n      ? strings[0]\n      : values.reduce(\n          (acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1],\n          strings[0]\n        );\n  return new (CSSResult as ConstructableCSSResult)(\n    cssText,\n    strings,\n    constructionToken\n  );\n};\n\n/**\n * Applies the given styles to a `shadowRoot`. When Shadow DOM is\n * available but `adoptedStyleSheets` is not, styles are appended to the\n * `shadowRoot` to [mimic spec behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).\n * Note, when shimming is used, any styles that are subsequently placed into\n * the shadowRoot should be placed *before* any shimmed adopted styles. This\n * will match spec behavior that gives adopted sheets precedence over styles in\n * shadowRoot.\n */\nexport const adoptStyles = (\n  renderRoot: ShadowRoot,\n  styles: Array<CSSResultOrNative>\n) => {\n  if (supportsAdoptingStyleSheets) {\n    (renderRoot as ShadowRoot).adoptedStyleSheets = styles.map((s) =>\n      s instanceof CSSStyleSheet ? s : s.styleSheet!\n    );\n  } else {\n    for (const s of styles) {\n      const style = document.createElement('style');\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      const nonce = (global as any)['litNonce'];\n      if (nonce !== undefined) {\n        style.setAttribute('nonce', nonce);\n      }\n      style.textContent = (s as CSSResult).cssText;\n      renderRoot.appendChild(style);\n    }\n  }\n};\n\nconst cssResultFromStyleSheet = (sheet: CSSStyleSheet) => {\n  let cssText = '';\n  for (const rule of sheet.cssRules) {\n    cssText += rule.cssText;\n  }\n  return unsafeCSS(cssText);\n};\n\nexport const getCompatibleStyle =\n  supportsAdoptingStyleSheets ||\n  (NODE_MODE && global.CSSStyleSheet === undefined)\n    ? (s: CSSResultOrNative) => s\n    : (s: CSSResultOrNative) =>\n        s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Use this module if you want to create your own base class extending\n * {@link ReactiveElement}.\n * @packageDocumentation\n */\n\nimport {\n  getCompatibleStyle,\n  adoptStyles,\n  CSSResultGroup,\n  CSSResultOrNative,\n} from './css-tag.js';\nimport type {\n  ReactiveController,\n  ReactiveControllerHost,\n} from './reactive-controller.js';\n\n// In the Node build, this import will be injected by Rollup:\n// import {HTMLElement, customElements} from '@lit-labs/ssr-dom-shim';\n\nexport * from './css-tag.js';\nexport type {\n  ReactiveController,\n  ReactiveControllerHost,\n} from './reactive-controller.js';\n\n/**\n * Removes the `readonly` modifier from properties in the union K.\n *\n * This is a safer way to cast a value to a type with a mutable version of a\n * readonly field, than casting to an interface with the field re-declared\n * because it preserves the type of all the fields and warns on typos.\n */\ntype Mutable<T, K extends keyof T> = Omit<T, K> & {\n  -readonly [P in keyof Pick<T, K>]: P extends K ? T[P] : never;\n};\n\n// TODO (justinfagnani): Add `hasOwn` here when we ship ES2022\nconst {\n  is,\n  defineProperty,\n  getOwnPropertyDescriptor,\n  getOwnPropertyNames,\n  getOwnPropertySymbols,\n  getPrototypeOf,\n} = Object;\n\nconst NODE_MODE = false;\n\n// Lets a minifier replace globalThis references with a minified name\nconst global = globalThis;\n\nif (NODE_MODE) {\n  global.customElements ??= customElements;\n}\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nconst trustedTypes = (global as unknown as {trustedTypes?: {emptyScript: ''}})\n  .trustedTypes;\n\n// Temporary workaround for https://crbug.com/993268\n// Currently, any attribute starting with \"on\" is considered to be a\n// TrustedScript source. Such boolean attributes must be set to the equivalent\n// trusted emptyScript value.\nconst emptyStringForBooleanAttribute = trustedTypes\n  ? (trustedTypes.emptyScript as unknown as '')\n  : '';\n\nconst polyfillSupport = DEV_MODE\n  ? global.reactiveElementPolyfillSupportDevMode\n  : global.reactiveElementPolyfillSupport;\n\nif (DEV_MODE) {\n  // Ensure warnings are issued only 1x, even if multiple versions of Lit\n  // are loaded.\n  const issuedWarnings: Set<string | undefined> = (global.litIssuedWarnings ??=\n    new Set());\n\n  // Issue a warning, if we haven't already.\n  issueWarning = (code: string, warning: string) => {\n    warning += ` See https://lit.dev/msg/${code} for more information.`;\n    if (!issuedWarnings.has(warning)) {\n      console.warn(warning);\n      issuedWarnings.add(warning);\n    }\n  };\n\n  issueWarning(\n    'dev-mode',\n    `Lit is in dev mode. Not recommended for production!`\n  );\n\n  // Issue polyfill support warning.\n  if (global.ShadyDOM?.inUse && polyfillSupport === undefined) {\n    issueWarning(\n      'polyfill-support-missing',\n      `Shadow DOM is being polyfilled via \\`ShadyDOM\\` but ` +\n        `the \\`polyfill-support\\` module has not been loaded.`\n    );\n  }\n}\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace ReactiveUnstable {\n  /**\n   * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n   * we will emit 'lit-debug' events to window, with live details about the update and render\n   * lifecycle. These can be useful for writing debug tooling and visualizations.\n   *\n   * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n   * making certain operations that are normally very cheap (like a no-op render) much slower,\n   * because we must copy data and dispatch events.\n   */\n  // eslint-disable-next-line @typescript-eslint/no-namespace\n  export namespace DebugLog {\n    export type Entry = Update;\n    export interface Update {\n      kind: 'update';\n    }\n  }\n}\n\ninterface DebugLoggingWindow {\n  // Even in dev mode, we generally don't want to emit these events, as that's\n  // another level of cost, so only emit them when DEV_MODE is true _and_ when\n  // window.emitLitDebugEvents is true.\n  emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n  ? (event: ReactiveUnstable.DebugLog.Entry) => {\n      const shouldEmit = (global as unknown as DebugLoggingWindow)\n        .emitLitDebugLogEvents;\n      if (!shouldEmit) {\n        return;\n      }\n      global.dispatchEvent(\n        new CustomEvent<ReactiveUnstable.DebugLog.Entry>('lit-debug', {\n          detail: event,\n        })\n      );\n    }\n  : undefined;\n\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty = <P extends PropertyKey>(\n  prop: P,\n  _obj: unknown\n): P => prop;\n\n/**\n * Converts property values to and from attribute values.\n */\nexport interface ComplexAttributeConverter<Type = unknown, TypeHint = unknown> {\n  /**\n   * Called to convert an attribute value to a property\n   * value.\n   */\n  fromAttribute?(value: string | null, type?: TypeHint): Type;\n\n  /**\n   * Called to convert a property value to an attribute\n   * value.\n   *\n   * It returns unknown instead of string, to be compatible with\n   * https://github.com/WICG/trusted-types (and similar efforts).\n   */\n  toAttribute?(value: Type, type?: TypeHint): unknown;\n}\n\ntype AttributeConverter<Type = unknown, TypeHint = unknown> =\n  | ComplexAttributeConverter<Type>\n  | ((value: string | null, type?: TypeHint) => Type);\n\n/**\n * Defines options for a property accessor.\n */\nexport interface PropertyDeclaration<Type = unknown, TypeHint = unknown> {\n  /**\n   * When set to `true`, indicates the property is internal private state. The\n   * property should not be set by users. When using TypeScript, this property\n   * should be marked as `private` or `protected`, and it is also a common\n   * practice to use a leading `_` in the name. The property is not added to\n   * `observedAttributes`.\n   */\n  readonly state?: boolean;\n\n  /**\n   * Indicates how and whether the property becomes an observed attribute.\n   * If the value is `false`, the property is not added to `observedAttributes`.\n   * If true or absent, the lowercased property name is observed (e.g. `fooBar`\n   * becomes `foobar`). If a string, the string value is observed (e.g\n   * `attribute: 'foo-bar'`).\n   */\n  readonly attribute?: boolean | string;\n\n  /**\n   * Indicates the type of the property. This is used only as a hint for the\n   * `converter` to determine how to convert the attribute\n   * to/from a property.\n   */\n  readonly type?: TypeHint;\n\n  /**\n   * Indicates how to convert the attribute to/from a property. If this value\n   * is a function, it is used to convert the attribute value a the property\n   * value. If it's an object, it can have keys for `fromAttribute` and\n   * `toAttribute`. If no `toAttribute` function is provided and\n   * `reflect` is set to `true`, the property value is set directly to the\n   * attribute. A default `converter` is used if none is provided; it supports\n   * `Boolean`, `String`, `Number`, `Object`, and `Array`. Note,\n   * when a property changes and the converter is used to update the attribute,\n   * the property is never updated again as a result of the attribute changing,\n   * and vice versa.\n   */\n  readonly converter?: AttributeConverter<Type, TypeHint>;\n\n  /**\n   * Indicates if the property should reflect to an attribute.\n   * If `true`, when the property is set, the attribute is set using the\n   * attribute name determined according to the rules for the `attribute`\n   * property option and the value of the property converted using the rules\n   * from the `converter` property option.\n   */\n  readonly reflect?: boolean;\n\n  /**\n   * A function that indicates if a property should be considered changed when\n   * it is set. The function should take the `newValue` and `oldValue` and\n   * return `true` if an update should be requested.\n   */\n  hasChanged?(value: Type, oldValue: Type): boolean;\n\n  /**\n   * Indicates whether an accessor will be created for this property. By\n   * default, an accessor will be generated for this property that requests an\n   * update when set. If this flag is `true`, no accessor will be created, and\n   * it will be the user's responsibility to call\n   * `this.requestUpdate(propertyName, oldValue)` to request an update when\n   * the property changes.\n   */\n  readonly noAccessor?: boolean;\n\n  /**\n   * Whether this property is wrapping accessors. This is set by `@property`\n   * to control the initial value change and reflection logic.\n   *\n   * @internal\n   */\n  wrapped?: boolean;\n}\n\n/**\n * Map of properties to PropertyDeclaration options. For each property an\n * accessor is made, and the property is processed according to the\n * PropertyDeclaration options.\n */\nexport interface PropertyDeclarations {\n  readonly [key: string]: PropertyDeclaration;\n}\n\ntype PropertyDeclarationMap = Map<PropertyKey, PropertyDeclaration>;\n\ntype AttributeMap = Map<string, PropertyKey>;\n\n/**\n * A Map of property keys to values.\n *\n * Takes an optional type parameter T, which when specified as a non-any,\n * non-unknown type, will make the Map more strongly-typed, associating the map\n * keys with their corresponding value type on T.\n *\n * Use `PropertyValues<this>` when overriding ReactiveElement.update() and\n * other lifecycle methods in order to get stronger type-checking on keys\n * and values.\n */\n// This type is conditional so that if the parameter T is not specified, or\n// is `any`, the type will include `Map<PropertyKey, unknown>`. Since T is not\n// given in the uses of PropertyValues in this file, all uses here fallback to\n// meaning `Map<PropertyKey, unknown>`, but if a developer uses\n// `PropertyValues<this>` (or any other value for T) they will get a\n// strongly-typed Map type.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type PropertyValues<T = any> = T extends object\n  ? PropertyValueMap<T>\n  : Map<PropertyKey, unknown>;\n\n/**\n * Do not use, instead prefer {@linkcode PropertyValues}.\n */\n// This type must be exported such that JavaScript generated by the Google\n// Closure Compiler can import a type reference.\nexport interface PropertyValueMap<T> extends Map<PropertyKey, unknown> {\n  get<K extends keyof T>(k: K): T[K] | undefined;\n  set<K extends keyof T>(key: K, value: T[K]): this;\n  has<K extends keyof T>(k: K): boolean;\n  delete<K extends keyof T>(k: K): boolean;\n}\n\nexport const defaultConverter: ComplexAttributeConverter = {\n  toAttribute(value: unknown, type?: unknown): unknown {\n    switch (type) {\n      case Boolean:\n        value = value ? emptyStringForBooleanAttribute : null;\n        break;\n      case Object:\n      case Array:\n        // if the value is `null` or `undefined` pass this through\n        // to allow removing/no change behavior.\n        value = value == null ? value : JSON.stringify(value);\n        break;\n    }\n    return value;\n  },\n\n  fromAttribute(value: string | null, type?: unknown) {\n    let fromValue: unknown = value;\n    switch (type) {\n      case Boolean:\n        fromValue = value !== null;\n        break;\n      case Number:\n        fromValue = value === null ? null : Number(value);\n        break;\n      case Object:\n      case Array:\n        // Do *not* generate exception when invalid JSON is set as elements\n        // don't normally complain on being mis-configured.\n        // TODO(sorvell): Do generate exception in *dev mode*.\n        try {\n          // Assert to adhere to Bazel's \"must type assert JSON parse\" rule.\n          fromValue = JSON.parse(value!) as unknown;\n        } catch (e) {\n          fromValue = null;\n        }\n        break;\n    }\n    return fromValue;\n  },\n};\n\nexport interface HasChanged {\n  (value: unknown, old: unknown): boolean;\n}\n\n/**\n * Change function that returns true if `value` is different from `oldValue`.\n * This method is used as the default for a property's `hasChanged` function.\n */\nexport const notEqual: HasChanged = (value: unknown, old: unknown): boolean =>\n  !is(value, old);\n\nconst defaultPropertyDeclaration: PropertyDeclaration = {\n  attribute: true,\n  type: String,\n  converter: defaultConverter,\n  reflect: false,\n  hasChanged: notEqual,\n};\n\n/**\n * A string representing one of the supported dev mode warning categories.\n */\nexport type WarningKind =\n  | 'change-in-update'\n  | 'migration'\n  | 'async-perform-update';\n\nexport type Initializer = (element: ReactiveElement) => void;\n\n// Temporary, until google3 is on TypeScript 5.2\ndeclare global {\n  interface SymbolConstructor {\n    readonly metadata: unique symbol;\n  }\n}\n\n// Ensure metadata is enabled. TypeScript does not polyfill\n// Symbol.metadata, so we must ensure that it exists.\n(Symbol as {metadata: symbol}).metadata ??= Symbol('metadata');\n\ndeclare global {\n  // This is public global API, do not change!\n  // eslint-disable-next-line no-var\n  var litPropertyMetadata: WeakMap<\n    object,\n    Map<PropertyKey, PropertyDeclaration>\n  >;\n}\n\n// Map from a class's metadata object to property options\n// Note that we must use nullish-coalescing assignment so that we only use one\n// map even if we load multiple version of this module.\nglobal.litPropertyMetadata ??= new WeakMap<\n  object,\n  Map<PropertyKey, PropertyDeclaration>\n>();\n\n/**\n * Base element class which manages element properties and attributes. When\n * properties change, the `update` method is asynchronously called. This method\n * should be supplied by subclasses to render updates as desired.\n * @noInheritDoc\n */\nexport abstract class ReactiveElement\n  // In the Node build, this `extends` clause will be substituted with\n  // `(globalThis.HTMLElement ?? HTMLElement)`.\n  //\n  // This way, we will first prefer any global `HTMLElement` polyfill that the\n  // user has assigned, and then fall back to the `HTMLElement` shim which has\n  // been imported (see note at the top of this file about how this import is\n  // generated by Rollup). Note that the `HTMLElement` variable has been\n  // shadowed by this import, so it no longer refers to the global.\n  extends HTMLElement\n  implements ReactiveControllerHost\n{\n  // Note: these are patched in only in DEV_MODE.\n  /**\n   * Read or set all the enabled warning categories for this class.\n   *\n   * This property is only used in development builds.\n   *\n   * @nocollapse\n   * @category dev-mode\n   */\n  static enabledWarnings?: WarningKind[];\n\n  /**\n   * Enable the given warning category for this class.\n   *\n   * This method only exists in development builds, so it should be accessed\n   * with a guard like:\n   *\n   * ```ts\n   * // Enable for all ReactiveElement subclasses\n   * ReactiveElement.enableWarning?.('migration');\n   *\n   * // Enable for only MyElement and subclasses\n   * MyElement.enableWarning?.('migration');\n   * ```\n   *\n   * @nocollapse\n   * @category dev-mode\n   */\n  static enableWarning?: (warningKind: WarningKind) => void;\n\n  /**\n   * Disable the given warning category for this class.\n   *\n   * This method only exists in development builds, so it should be accessed\n   * with a guard like:\n   *\n   * ```ts\n   * // Disable for all ReactiveElement subclasses\n   * ReactiveElement.disableWarning?.('migration');\n   *\n   * // Disable for only MyElement and subclasses\n   * MyElement.disableWarning?.('migration');\n   * ```\n   *\n   * @nocollapse\n   * @category dev-mode\n   */\n  static disableWarning?: (warningKind: WarningKind) => void;\n\n  /**\n   * Adds an initializer function to the class that is called during instance\n   * construction.\n   *\n   * This is useful for code that runs against a `ReactiveElement`\n   * subclass, such as a decorator, that needs to do work for each\n   * instance, such as setting up a `ReactiveController`.\n   *\n   * ```ts\n   * const myDecorator = (target: typeof ReactiveElement, key: string) => {\n   *   target.addInitializer((instance: ReactiveElement) => {\n   *     // This is run during construction of the element\n   *     new MyController(instance);\n   *   });\n   * }\n   * ```\n   *\n   * Decorating a field will then cause each instance to run an initializer\n   * that adds a controller:\n   *\n   * ```ts\n   * class MyElement extends LitElement {\n   *   @myDecorator foo;\n   * }\n   * ```\n   *\n   * Initializers are stored per-constructor. Adding an initializer to a\n   * subclass does not add it to a superclass. Since initializers are run in\n   * constructors, initializers will run in order of the class hierarchy,\n   * starting with superclasses and progressing to the instance's class.\n   *\n   * @nocollapse\n   */\n  static addInitializer(initializer: Initializer) {\n    this.__prepare();\n    (this._initializers ??= []).push(initializer);\n  }\n\n  static _initializers?: Initializer[];\n\n  /*\n   * Due to closure compiler ES6 compilation bugs, @nocollapse is required on\n   * all static methods and properties with initializers.  Reference:\n   * - https://github.com/google/closure-compiler/issues/1776\n   */\n\n  /**\n   * Maps attribute names to properties; for example `foobar` attribute to\n   * `fooBar` property. Created lazily on user subclasses when finalizing the\n   * class.\n   * @nocollapse\n   */\n  private static __attributeToPropertyMap: AttributeMap;\n\n  /**\n   * Marks class as having been finalized, which includes creating properties\n   * from `static properties`, but does *not* include all properties created\n   * from decorators.\n   * @nocollapse\n   */\n  protected static finalized: true | undefined;\n\n  /**\n   * Memoized list of all element properties, including any superclass\n   * properties. Created lazily on user subclasses when finalizing the class.\n   *\n   * @nocollapse\n   * @category properties\n   */\n  static elementProperties: PropertyDeclarationMap;\n\n  /**\n   * User-supplied object that maps property names to `PropertyDeclaration`\n   * objects containing options for configuring reactive properties. When\n   * a reactive property is set the element will update and render.\n   *\n   * By default properties are public fields, and as such, they should be\n   * considered as primarily settable by element users, either via attribute or\n   * the property itself.\n   *\n   * Generally, properties that are changed by the element should be private or\n   * protected fields and should use the `state: true` option. Properties\n   * marked as `state` do not reflect from the corresponding attribute\n   *\n   * However, sometimes element code does need to set a public property. This\n   * should typically only be done in response to user interaction, and an event\n   * should be fired informing the user; for example, a checkbox sets its\n   * `checked` property when clicked and fires a `changed` event. Mutating\n   * public properties should typically not be done for non-primitive (object or\n   * array) properties. In other cases when an element needs to manage state, a\n   * private property set with the `state: true` option should be used. When\n   * needed, state properties can be initialized via public properties to\n   * facilitate complex interactions.\n   * @nocollapse\n   * @category properties\n   */\n  static properties: PropertyDeclarations;\n\n  /**\n   * Memoized list of all element styles.\n   * Created lazily on user subclasses when finalizing the class.\n   * @nocollapse\n   * @category styles\n   */\n  static elementStyles: Array<CSSResultOrNative> = [];\n\n  /**\n   * Array of styles to apply to the element. The styles should be defined\n   * using the {@linkcode css} tag function, via constructible stylesheets, or\n   * imported from native CSS module scripts.\n   *\n   * Note on Content Security Policy:\n   *\n   * Element styles are implemented with `<style>` tags when the browser doesn't\n   * support adopted StyleSheets. To use such `<style>` tags with the style-src\n   * CSP directive, the style-src value must either include 'unsafe-inline' or\n   * `nonce-<base64-value>` with `<base64-value>` replaced be a server-generated\n   * nonce.\n   *\n   * To provide a nonce to use on generated `<style>` elements, set\n   * `window.litNonce` to a server-generated nonce in your page's HTML, before\n   * loading application code:\n   *\n   * ```html\n   * <script>\n   *   // Generated and unique per request:\n   *   window.litNonce = 'a1b2c3d4';\n   * </script>\n   * ```\n   * @nocollapse\n   * @category styles\n   */\n  static styles?: CSSResultGroup;\n\n  /**\n   * Returns a list of attributes corresponding to the registered properties.\n   * @nocollapse\n   * @category attributes\n   */\n  static get observedAttributes() {\n    // Ensure we've created all properties\n    this.finalize();\n    // this.__attributeToPropertyMap is only undefined after finalize() in\n    // ReactiveElement itself. ReactiveElement.observedAttributes is only\n    // accessed with ReactiveElement as the receiver when a subclass or mixin\n    // calls super.observedAttributes\n    return (\n      this.__attributeToPropertyMap && [...this.__attributeToPropertyMap.keys()]\n    );\n  }\n\n  private __instanceProperties?: PropertyValues = undefined;\n\n  /**\n   * Creates a property accessor on the element prototype if one does not exist\n   * and stores a {@linkcode PropertyDeclaration} for the property with the\n   * given options. The property setter calls the property's `hasChanged`\n   * property option or uses a strict identity check to determine whether or not\n   * to request an update.\n   *\n   * This method may be overridden to customize properties; however,\n   * when doing so, it's important to call `super.createProperty` to ensure\n   * the property is setup correctly. This method calls\n   * `getPropertyDescriptor` internally to get a descriptor to install.\n   * To customize what properties do when they are get or set, override\n   * `getPropertyDescriptor`. To customize the options for a property,\n   * implement `createProperty` like this:\n   *\n   * ```ts\n   * static createProperty(name, options) {\n   *   options = Object.assign(options, {myOption: true});\n   *   super.createProperty(name, options);\n   * }\n   * ```\n   *\n   * @nocollapse\n   * @category properties\n   */\n  static createProperty(\n    name: PropertyKey,\n    options: PropertyDeclaration = defaultPropertyDeclaration\n  ) {\n    // If this is a state property, force the attribute to false.\n    if (options.state) {\n      (options as Mutable<PropertyDeclaration, 'attribute'>).attribute = false;\n    }\n    this.__prepare();\n    this.elementProperties.set(name, options);\n    if (!options.noAccessor) {\n      const key = DEV_MODE\n        ? // Use Symbol.for in dev mode to make it easier to maintain state\n          // when doing HMR.\n          Symbol.for(`${String(name)} (@property() cache)`)\n        : Symbol();\n      const descriptor = this.getPropertyDescriptor(name, key, options);\n      if (descriptor !== undefined) {\n        defineProperty(this.prototype, name, descriptor);\n      }\n    }\n  }\n\n  /**\n   * Returns a property descriptor to be defined on the given named property.\n   * If no descriptor is returned, the property will not become an accessor.\n   * For example,\n   *\n   * ```ts\n   * class MyElement extends LitElement {\n   *   static getPropertyDescriptor(name, key, options) {\n   *     const defaultDescriptor =\n   *         super.getPropertyDescriptor(name, key, options);\n   *     const setter = defaultDescriptor.set;\n   *     return {\n   *       get: defaultDescriptor.get,\n   *       set(value) {\n   *         setter.call(this, value);\n   *         // custom action.\n   *       },\n   *       configurable: true,\n   *       enumerable: true\n   *     }\n   *   }\n   * }\n   * ```\n   *\n   * @nocollapse\n   * @category properties\n   */\n  protected static getPropertyDescriptor(\n    name: PropertyKey,\n    key: string | symbol,\n    options: PropertyDeclaration\n  ): PropertyDescriptor | undefined {\n    const {get, set} = getOwnPropertyDescriptor(this.prototype, name) ?? {\n      get(this: ReactiveElement) {\n        return this[key as keyof typeof this];\n      },\n      set(this: ReactiveElement, v: unknown) {\n        (this as unknown as Record<string | symbol, unknown>)[key] = v;\n      },\n    };\n    if (DEV_MODE && get == null) {\n      if ('value' in (getOwnPropertyDescriptor(this.prototype, name) ?? {})) {\n        throw new Error(\n          `Field ${JSON.stringify(String(name))} on ` +\n            `${this.name} was declared as a reactive property ` +\n            `but it's actually declared as a value on the prototype. ` +\n            `Usually this is due to using @property or @state on a method.`\n        );\n      }\n      issueWarning(\n        'reactive-property-without-getter',\n        `Field ${JSON.stringify(String(name))} on ` +\n          `${this.name} was declared as a reactive property ` +\n          `but it does not have a getter. This will be an error in a ` +\n          `future version of Lit.`\n      );\n    }\n    return {\n      get(this: ReactiveElement) {\n        return get?.call(this);\n      },\n      set(this: ReactiveElement, value: unknown) {\n        const oldValue = get?.call(this);\n        set!.call(this, value);\n        this.requestUpdate(name, oldValue, options);\n      },\n      configurable: true,\n      enumerable: true,\n    };\n  }\n\n  /**\n   * Returns the property options associated with the given property.\n   * These options are defined with a `PropertyDeclaration` via the `properties`\n   * object or the `@property` decorator and are registered in\n   * `createProperty(...)`.\n   *\n   * Note, this method should be considered \"final\" and not overridden. To\n   * customize the options for a given property, override\n   * {@linkcode createProperty}.\n   *\n   * @nocollapse\n   * @final\n   * @category properties\n   */\n  static getPropertyOptions(name: PropertyKey) {\n    return this.elementProperties.get(name) ?? defaultPropertyDeclaration;\n  }\n\n  // Temporary, until google3 is on TypeScript 5.2\n  declare static [Symbol.metadata]: object & Record<PropertyKey, unknown>;\n\n  /**\n   * Initializes static own properties of the class used in bookkeeping\n   * for element properties, initializers, etc.\n   *\n   * Can be called multiple times by code that needs to ensure these\n   * properties exist before using them.\n   *\n   * This method ensures the superclass is finalized so that inherited\n   * property metadata can be copied down.\n   * @nocollapse\n   */\n  private static __prepare() {\n    if (\n      this.hasOwnProperty(JSCompiler_renameProperty('elementProperties', this))\n    ) {\n      // Already prepared\n      return;\n    }\n    // Finalize any superclasses\n    const superCtor = getPrototypeOf(this) as typeof ReactiveElement;\n    superCtor.finalize();\n\n    // Create own set of initializers for this class if any exist on the\n    // superclass and copy them down. Note, for a small perf boost, avoid\n    // creating initializers unless needed.\n    if (superCtor._initializers !== undefined) {\n      this._initializers = [...superCtor._initializers];\n    }\n    // Initialize elementProperties from the superclass\n    this.elementProperties = new Map(superCtor.elementProperties);\n  }\n\n  /**\n   * Finishes setting up the class so that it's ready to be registered\n   * as a custom element and instantiated.\n   *\n   * This method is called by the ReactiveElement.observedAttributes getter.\n   * If you override the observedAttributes getter, you must either call\n   * super.observedAttributes to trigger finalization, or call finalize()\n   * yourself.\n   *\n   * @nocollapse\n   */\n  protected static finalize() {\n    if (this.hasOwnProperty(JSCompiler_renameProperty('finalized', this))) {\n      return;\n    }\n    this.finalized = true;\n    this.__prepare();\n\n    // Create properties from the static properties block:\n    if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) {\n      const props = this.properties;\n      const propKeys = [\n        ...getOwnPropertyNames(props),\n        ...getOwnPropertySymbols(props),\n      ] as Array<keyof typeof props>;\n      for (const p of propKeys) {\n        this.createProperty(p, props[p]);\n      }\n    }\n\n    // Create properties from standard decorator metadata:\n    const metadata = this[Symbol.metadata];\n    if (metadata !== null) {\n      const properties = litPropertyMetadata.get(metadata);\n      if (properties !== undefined) {\n        for (const [p, options] of properties) {\n          this.elementProperties.set(p, options);\n        }\n      }\n    }\n\n    // Create the attribute-to-property map\n    this.__attributeToPropertyMap = new Map();\n    for (const [p, options] of this.elementProperties) {\n      const attr = this.__attributeNameForProperty(p, options);\n      if (attr !== undefined) {\n        this.__attributeToPropertyMap.set(attr, p);\n      }\n    }\n\n    this.elementStyles = this.finalizeStyles(this.styles);\n\n    if (DEV_MODE) {\n      if (this.hasOwnProperty('createProperty')) {\n        issueWarning(\n          'no-override-create-property',\n          'Overriding ReactiveElement.createProperty() is deprecated. ' +\n            'The override will not be called with standard decorators'\n        );\n      }\n      if (this.hasOwnProperty('getPropertyDescriptor')) {\n        issueWarning(\n          'no-override-get-property-descriptor',\n          'Overriding ReactiveElement.getPropertyDescriptor() is deprecated. ' +\n            'The override will not be called with standard decorators'\n        );\n      }\n    }\n  }\n\n  /**\n   * Options used when calling `attachShadow`. Set this property to customize\n   * the options for the shadowRoot; for example, to create a closed\n   * shadowRoot: `{mode: 'closed'}`.\n   *\n   * Note, these options are used in `createRenderRoot`. If this method\n   * is customized, options should be respected if possible.\n   * @nocollapse\n   * @category rendering\n   */\n  static shadowRootOptions: ShadowRootInit = {mode: 'open'};\n\n  /**\n   * Takes the styles the user supplied via the `static styles` property and\n   * returns the array of styles to apply to the element.\n   * Override this method to integrate into a style management system.\n   *\n   * Styles are deduplicated preserving the _last_ instance in the list. This\n   * is a performance optimization to avoid duplicated styles that can occur\n   * especially when composing via subclassing. The last item is kept to try\n   * to preserve the cascade order with the assumption that it's most important\n   * that last added styles override previous styles.\n   *\n   * @nocollapse\n   * @category styles\n   */\n  protected static finalizeStyles(\n    styles?: CSSResultGroup\n  ): Array<CSSResultOrNative> {\n    const elementStyles = [];\n    if (Array.isArray(styles)) {\n      // Dedupe the flattened array in reverse order to preserve the last items.\n      // Casting to Array<unknown> works around TS error that\n      // appears to come from trying to flatten a type CSSResultArray.\n      const set = new Set((styles as Array<unknown>).flat(Infinity).reverse());\n      // Then preserve original order by adding the set items in reverse order.\n      for (const s of set) {\n        elementStyles.unshift(getCompatibleStyle(s as CSSResultOrNative));\n      }\n    } else if (styles !== undefined) {\n      elementStyles.push(getCompatibleStyle(styles));\n    }\n    return elementStyles;\n  }\n\n  /**\n   * Node or ShadowRoot into which element DOM should be rendered. Defaults\n   * to an open shadowRoot.\n   * @category rendering\n   */\n  readonly renderRoot!: HTMLElement | DocumentFragment;\n\n  /**\n   * Returns the property name for the given attribute `name`.\n   * @nocollapse\n   */\n  private static __attributeNameForProperty(\n    name: PropertyKey,\n    options: PropertyDeclaration\n  ) {\n    const attribute = options.attribute;\n    return attribute === false\n      ? undefined\n      : typeof attribute === 'string'\n      ? attribute\n      : typeof name === 'string'\n      ? name.toLowerCase()\n      : undefined;\n  }\n\n  // Initialize to an unresolved Promise so we can make sure the element has\n  // connected before first update.\n  private __updatePromise!: Promise<boolean>;\n\n  /**\n   * True if there is a pending update as a result of calling `requestUpdate()`.\n   * Should only be read.\n   * @category updates\n   */\n  isUpdatePending = false;\n\n  /**\n   * Is set to `true` after the first update. The element code cannot assume\n   * that `renderRoot` exists before the element `hasUpdated`.\n   * @category updates\n   */\n  hasUpdated = false;\n\n  /**\n   * Map with keys for any properties that have changed since the last\n   * update cycle with previous values.\n   *\n   * @internal\n   */\n  _$changedProperties!: PropertyValues;\n\n  /**\n   * Properties that should be reflected when updated.\n   */\n  private __reflectingProperties?: Set<PropertyKey>;\n\n  /**\n   * Name of currently reflecting property\n   */\n  private __reflectingProperty: PropertyKey | null = null;\n\n  /**\n   * Set of controllers.\n   */\n  private __controllers?: Set<ReactiveController>;\n\n  constructor() {\n    super();\n    this.__initialize();\n  }\n\n  /**\n   * Internal only override point for customizing work done when elements\n   * are constructed.\n   */\n  private __initialize() {\n    this.__updatePromise = new Promise<boolean>(\n      (res) => (this.enableUpdating = res)\n    );\n    this._$changedProperties = new Map();\n    // This enqueues a microtask that ust run before the first update, so it\n    // must be called before requestUpdate()\n    this.__saveInstanceProperties();\n    // ensures first update will be caught by an early access of\n    // `updateComplete`\n    this.requestUpdate();\n    (this.constructor as typeof ReactiveElement)._initializers?.forEach((i) =>\n      i(this)\n    );\n  }\n\n  /**\n   * Registers a `ReactiveController` to participate in the element's reactive\n   * update cycle. The element automatically calls into any registered\n   * controllers during its lifecycle callbacks.\n   *\n   * If the element is connected when `addController()` is called, the\n   * controller's `hostConnected()` callback will be immediately called.\n   * @category controllers\n   */\n  addController(controller: ReactiveController) {\n    (this.__controllers ??= new Set()).add(controller);\n    // If a controller is added after the element has been connected,\n    // call hostConnected. Note, re-using existence of `renderRoot` here\n    // (which is set in connectedCallback) to avoid the need to track a\n    // first connected state.\n    if (this.renderRoot !== undefined && this.isConnected) {\n      controller.hostConnected?.();\n    }\n  }\n\n  /**\n   * Removes a `ReactiveController` from the element.\n   * @category controllers\n   */\n  removeController(controller: ReactiveController) {\n    this.__controllers?.delete(controller);\n  }\n\n  /**\n   * Fixes any properties set on the instance before upgrade time.\n   * Otherwise these would shadow the accessor and break these properties.\n   * The properties are stored in a Map which is played back after the\n   * constructor runs. Note, on very old versions of Safari (<=9) or Chrome\n   * (<=41), properties created for native platform properties like (`id` or\n   * `name`) may not have default values set in the element constructor. On\n   * these browsers native properties appear on instances and therefore their\n   * default value will overwrite any element default (e.g. if the element sets\n   * this.id = 'id' in the constructor, the 'id' will become '' since this is\n   * the native platform default).\n   */\n  private __saveInstanceProperties() {\n    const instanceProperties = new Map<PropertyKey, unknown>();\n    const elementProperties = (this.constructor as typeof ReactiveElement)\n      .elementProperties;\n    for (const p of elementProperties.keys() as IterableIterator<keyof this>) {\n      if (this.hasOwnProperty(p)) {\n        instanceProperties.set(p, this[p]);\n        delete this[p];\n      }\n    }\n    if (instanceProperties.size > 0) {\n      this.__instanceProperties = instanceProperties;\n    }\n  }\n\n  /**\n   * Returns the node into which the element should render and by default\n   * creates and returns an open shadowRoot. Implement to customize where the\n   * element's DOM is rendered. For example, to render into the element's\n   * childNodes, return `this`.\n   *\n   * @return Returns a node into which to render.\n   * @category rendering\n   */\n  protected createRenderRoot(): HTMLElement | DocumentFragment {\n    const renderRoot =\n      this.shadowRoot ??\n      this.attachShadow(\n        (this.constructor as typeof ReactiveElement).shadowRootOptions\n      );\n    adoptStyles(\n      renderRoot,\n      (this.constructor as typeof ReactiveElement).elementStyles\n    );\n    return renderRoot;\n  }\n\n  /**\n   * On first connection, creates the element's renderRoot, sets up\n   * element styling, and enables updating.\n   * @category lifecycle\n   */\n  connectedCallback() {\n    // Create renderRoot before controllers `hostConnected`\n    (this as Mutable<typeof this, 'renderRoot'>).renderRoot ??=\n      this.createRenderRoot();\n    this.enableUpdating(true);\n    this.__controllers?.forEach((c) => c.hostConnected?.());\n  }\n\n  /**\n   * Note, this method should be considered final and not overridden. It is\n   * overridden on the element instance with a function that triggers the first\n   * update.\n   * @category updates\n   */\n  protected enableUpdating(_requestedUpdate: boolean) {}\n\n  /**\n   * Allows for `super.disconnectedCallback()` in extensions while\n   * reserving the possibility of making non-breaking feature additions\n   * when disconnecting at some point in the future.\n   * @category lifecycle\n   */\n  disconnectedCallback() {\n    this.__controllers?.forEach((c) => c.hostDisconnected?.());\n  }\n\n  /**\n   * Synchronizes property values when attributes change.\n   *\n   * Specifically, when an attribute is set, the corresponding property is set.\n   * You should rarely need to implement this callback. If this method is\n   * overridden, `super.attributeChangedCallback(name, _old, value)` must be\n   * called.\n   *\n   * See [using the lifecycle callbacks](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks)\n   * on MDN for more information about the `attributeChangedCallback`.\n   * @category attributes\n   */\n  attributeChangedCallback(\n    name: string,\n    _old: string | null,\n    value: string | null\n  ) {\n    this._$attributeToProperty(name, value);\n  }\n\n  private __propertyToAttribute(name: PropertyKey, value: unknown) {\n    const elemProperties: PropertyDeclarationMap = (\n      this.constructor as typeof ReactiveElement\n    ).elementProperties;\n    const options = elemProperties.get(name)!;\n    const attr = (\n      this.constructor as typeof ReactiveElement\n    ).__attributeNameForProperty(name, options);\n    if (attr !== undefined && options.reflect === true) {\n      const converter =\n        (options.converter as ComplexAttributeConverter)?.toAttribute !==\n        undefined\n          ? (options.converter as ComplexAttributeConverter)\n          : defaultConverter;\n      const attrValue = converter.toAttribute!(value, options.type);\n      if (\n        DEV_MODE &&\n        (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n          'migration'\n        ) &&\n        attrValue === undefined\n      ) {\n        issueWarning(\n          'undefined-attribute-value',\n          `The attribute value for the ${name as string} property is ` +\n            `undefined on element ${this.localName}. The attribute will be ` +\n            `removed, but in the previous version of \\`ReactiveElement\\`, ` +\n            `the attribute would not have changed.`\n        );\n      }\n      // Track if the property is being reflected to avoid\n      // setting the property again via `attributeChangedCallback`. Note:\n      // 1. this takes advantage of the fact that the callback is synchronous.\n      // 2. will behave incorrectly if multiple attributes are in the reaction\n      // stack at time of calling. However, since we process attributes\n      // in `update` this should not be possible (or an extreme corner case\n      // that we'd like to discover).\n      // mark state reflecting\n      this.__reflectingProperty = name;\n      if (attrValue == null) {\n        this.removeAttribute(attr);\n      } else {\n        this.setAttribute(attr, attrValue as string);\n      }\n      // mark state not reflecting\n      this.__reflectingProperty = null;\n    }\n  }\n\n  /** @internal */\n  _$attributeToProperty(name: string, value: string | null) {\n    const ctor = this.constructor as typeof ReactiveElement;\n    // Note, hint this as an `AttributeMap` so closure clearly understands\n    // the type; it has issues with tracking types through statics\n    const propName = (ctor.__attributeToPropertyMap as AttributeMap).get(name);\n    // Use tracking info to avoid reflecting a property value to an attribute\n    // if it was just set because the attribute changed.\n    if (propName !== undefined && this.__reflectingProperty !== propName) {\n      const options = ctor.getPropertyOptions(propName);\n      const converter =\n        typeof options.converter === 'function'\n          ? {fromAttribute: options.converter}\n          : options.converter?.fromAttribute !== undefined\n          ? options.converter\n          : defaultConverter;\n      // mark state reflecting\n      this.__reflectingProperty = propName;\n      this[propName as keyof this] = converter.fromAttribute!(\n        value,\n        options.type\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      ) as any;\n      // mark state not reflecting\n      this.__reflectingProperty = null;\n    }\n  }\n\n  /**\n   * Requests an update which is processed asynchronously. This should be called\n   * when an element should update based on some state not triggered by setting\n   * a reactive property. In this case, pass no arguments. It should also be\n   * called when manually implementing a property setter. In this case, pass the\n   * property `name` and `oldValue` to ensure that any configured property\n   * options are honored.\n   *\n   * @param name name of requesting property\n   * @param oldValue old value of requesting property\n   * @param options property options to use instead of the previously\n   *     configured options\n   * @category updates\n   */\n  requestUpdate(\n    name?: PropertyKey,\n    oldValue?: unknown,\n    options?: PropertyDeclaration\n  ): void {\n    // If we have a property key, perform property update steps.\n    if (name !== undefined) {\n      if (DEV_MODE && (name as unknown) instanceof Event) {\n        issueWarning(\n          ``,\n          `The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()`\n        );\n      }\n      options ??= (\n        this.constructor as typeof ReactiveElement\n      ).getPropertyOptions(name);\n      const hasChanged = options.hasChanged ?? notEqual;\n      const newValue = this[name as keyof this];\n      if (hasChanged(newValue, oldValue)) {\n        this._$changeProperty(name, oldValue, options);\n      } else {\n        // Abort the request if the property should not be considered changed.\n        return;\n      }\n    }\n    if (this.isUpdatePending === false) {\n      this.__updatePromise = this.__enqueueUpdate();\n    }\n  }\n\n  /**\n   * @internal\n   */\n  _$changeProperty(\n    name: PropertyKey,\n    oldValue: unknown,\n    options: PropertyDeclaration\n  ) {\n    // TODO (justinfagnani): Create a benchmark of Map.has() + Map.set(\n    // vs just Map.set()\n    if (!this._$changedProperties.has(name)) {\n      this._$changedProperties.set(name, oldValue);\n    }\n    // Add to reflecting properties set.\n    // Note, it's important that every change has a chance to add the\n    // property to `__reflectingProperties`. This ensures setting\n    // attribute + property reflects correctly.\n    if (options.reflect === true && this.__reflectingProperty !== name) {\n      (this.__reflectingProperties ??= new Set<PropertyKey>()).add(name);\n    }\n  }\n\n  /**\n   * Sets up the element to asynchronously update.\n   */\n  private async __enqueueUpdate() {\n    this.isUpdatePending = true;\n    try {\n      // Ensure any previous update has resolved before updating.\n      // This `await` also ensures that property changes are batched.\n      await this.__updatePromise;\n    } catch (e) {\n      // Refire any previous errors async so they do not disrupt the update\n      // cycle. Errors are refired so developers have a chance to observe\n      // them, and this can be done by implementing\n      // `window.onunhandledrejection`.\n      Promise.reject(e);\n    }\n    const result = this.scheduleUpdate();\n    // If `scheduleUpdate` returns a Promise, we await it. This is done to\n    // enable coordinating updates with a scheduler. Note, the result is\n    // checked to avoid delaying an additional microtask unless we need to.\n    if (result != null) {\n      await result;\n    }\n    return !this.isUpdatePending;\n  }\n\n  /**\n   * Schedules an element update. You can override this method to change the\n   * timing of updates by returning a Promise. The update will await the\n   * returned Promise, and you should resolve the Promise to allow the update\n   * to proceed. If this method is overridden, `super.scheduleUpdate()`\n   * must be called.\n   *\n   * For instance, to schedule updates to occur just before the next frame:\n   *\n   * ```ts\n   * override protected async scheduleUpdate(): Promise<unknown> {\n   *   await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n   *   super.scheduleUpdate();\n   * }\n   * ```\n   * @category updates\n   */\n  protected scheduleUpdate(): void | Promise<unknown> {\n    const result = this.performUpdate();\n    if (\n      DEV_MODE &&\n      (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n        'async-perform-update'\n      ) &&\n      typeof (result as unknown as Promise<unknown> | undefined)?.then ===\n        'function'\n    ) {\n      issueWarning(\n        'async-perform-update',\n        `Element ${this.localName} returned a Promise from performUpdate(). ` +\n          `This behavior is deprecated and will be removed in a future ` +\n          `version of ReactiveElement.`\n      );\n    }\n    return result;\n  }\n\n  /**\n   * Performs an element update. Note, if an exception is thrown during the\n   * update, `firstUpdated` and `updated` will not be called.\n   *\n   * Call `performUpdate()` to immediately process a pending update. This should\n   * generally not be needed, but it can be done in rare cases when you need to\n   * update synchronously.\n   *\n   * @category updates\n   */\n  protected performUpdate(): void {\n    // Abort any update if one is not pending when this is called.\n    // This can happen if `performUpdate` is called early to \"flush\"\n    // the update.\n    if (!this.isUpdatePending) {\n      return;\n    }\n    debugLogEvent?.({kind: 'update'});\n    if (!this.hasUpdated) {\n      // Create renderRoot before first update. This occurs in `connectedCallback`\n      // but is done here to support out of tree calls to `enableUpdating`/`performUpdate`.\n      (this as Mutable<typeof this, 'renderRoot'>).renderRoot ??=\n        this.createRenderRoot();\n      if (DEV_MODE) {\n        // Produce warning if any reactive properties on the prototype are\n        // shadowed by class fields. Instance fields set before upgrade are\n        // deleted by this point, so any own property is caused by class field\n        // initialization in the constructor.\n        const ctor = this.constructor as typeof ReactiveElement;\n        const shadowedProperties = [...ctor.elementProperties.keys()].filter(\n          (p) => this.hasOwnProperty(p) && p in getPrototypeOf(this)\n        );\n        if (shadowedProperties.length) {\n          throw new Error(\n            `The following properties on element ${this.localName} will not ` +\n              `trigger updates as expected because they are set using class ` +\n              `fields: ${shadowedProperties.join(', ')}. ` +\n              `Native class fields and some compiled output will overwrite ` +\n              `accessors used for detecting changes. See ` +\n              `https://lit.dev/msg/class-field-shadowing ` +\n              `for more information.`\n          );\n        }\n      }\n      // Mixin instance properties once, if they exist.\n      if (this.__instanceProperties) {\n        // TODO (justinfagnani): should we use the stored value? Could a new value\n        // have been set since we stored the own property value?\n        for (const [p, value] of this.__instanceProperties) {\n          this[p as keyof this] = value as this[keyof this];\n        }\n        this.__instanceProperties = undefined;\n      }\n      // Trigger initial value reflection and populate the initial\n      // changedProperties map, but only for the case of experimental\n      // decorators on accessors, which will not have already populated the\n      // changedProperties map. We can't know if these accessors had\n      // initializers, so we just set them anyway - a difference from\n      // experimental decorators on fields and standard decorators on\n      // auto-accessors.\n      // For context why experimentalDecorators with auto accessors are handled\n      // specifically also see:\n      // https://github.com/lit/lit/pull/4183#issuecomment-1711959635\n      const elementProperties = (this.constructor as typeof ReactiveElement)\n        .elementProperties;\n      if (elementProperties.size > 0) {\n        for (const [p, options] of elementProperties) {\n          if (\n            options.wrapped === true &&\n            !this._$changedProperties.has(p) &&\n            this[p as keyof this] !== undefined\n          ) {\n            this._$changeProperty(p, this[p as keyof this], options);\n          }\n        }\n      }\n    }\n    let shouldUpdate = false;\n    const changedProperties = this._$changedProperties;\n    try {\n      shouldUpdate = this.shouldUpdate(changedProperties);\n      if (shouldUpdate) {\n        this.willUpdate(changedProperties);\n        this.__controllers?.forEach((c) => c.hostUpdate?.());\n        this.update(changedProperties);\n      } else {\n        this.__markUpdated();\n      }\n    } catch (e) {\n      // Prevent `firstUpdated` and `updated` from running when there's an\n      // update exception.\n      shouldUpdate = false;\n      // Ensure element can accept additional updates after an exception.\n      this.__markUpdated();\n      throw e;\n    }\n    // The update is no longer considered pending and further updates are now allowed.\n    if (shouldUpdate) {\n      this._$didUpdate(changedProperties);\n    }\n  }\n\n  /**\n   * Invoked before `update()` to compute values needed during the update.\n   *\n   * Implement `willUpdate` to compute property values that depend on other\n   * properties and are used in the rest of the update process.\n   *\n   * ```ts\n   * willUpdate(changedProperties) {\n   *   // only need to check changed properties for an expensive computation.\n   *   if (changedProperties.has('firstName') || changedProperties.has('lastName')) {\n   *     this.sha = computeSHA(`${this.firstName} ${this.lastName}`);\n   *   }\n   * }\n   *\n   * render() {\n   *   return html`SHA: ${this.sha}`;\n   * }\n   * ```\n   *\n   * @category updates\n   */\n  protected willUpdate(_changedProperties: PropertyValues): void {}\n\n  // Note, this is an override point for polyfill-support.\n  // @internal\n  _$didUpdate(changedProperties: PropertyValues) {\n    this.__controllers?.forEach((c) => c.hostUpdated?.());\n    if (!this.hasUpdated) {\n      this.hasUpdated = true;\n      this.firstUpdated(changedProperties);\n    }\n    this.updated(changedProperties);\n    if (\n      DEV_MODE &&\n      this.isUpdatePending &&\n      (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n        'change-in-update'\n      )\n    ) {\n      issueWarning(\n        'change-in-update',\n        `Element ${this.localName} scheduled an update ` +\n          `(generally because a property was set) ` +\n          `after an update completed, causing a new update to be scheduled. ` +\n          `This is inefficient and should be avoided unless the next update ` +\n          `can only be scheduled as a side effect of the previous update.`\n      );\n    }\n  }\n\n  private __markUpdated() {\n    this._$changedProperties = new Map();\n    this.isUpdatePending = false;\n  }\n\n  /**\n   * Returns a Promise that resolves when the element has completed updating.\n   * The Promise value is a boolean that is `true` if the element completed the\n   * update without triggering another update. The Promise result is `false` if\n   * a property was set inside `updated()`. If the Promise is rejected, an\n   * exception was thrown during the update.\n   *\n   * To await additional asynchronous work, override the `getUpdateComplete`\n   * method. For example, it is sometimes useful to await a rendered element\n   * before fulfilling this Promise. To do this, first await\n   * `super.getUpdateComplete()`, then any subsequent state.\n   *\n   * @return A promise of a boolean that resolves to true if the update completed\n   *     without triggering another update.\n   * @category updates\n   */\n  get updateComplete(): Promise<boolean> {\n    return this.getUpdateComplete();\n  }\n\n  /**\n   * Override point for the `updateComplete` promise.\n   *\n   * It is not safe to override the `updateComplete` getter directly due to a\n   * limitation in TypeScript which means it is not possible to call a\n   * superclass getter (e.g. `super.updateComplete.then(...)`) when the target\n   * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).\n   * This method should be overridden instead. For example:\n   *\n   * ```ts\n   * class MyElement extends LitElement {\n   *   override async getUpdateComplete() {\n   *     const result = await super.getUpdateComplete();\n   *     await this._myChild.updateComplete;\n   *     return result;\n   *   }\n   * }\n   * ```\n   *\n   * @return A promise of a boolean that resolves to true if the update completed\n   *     without triggering another update.\n   * @category updates\n   */\n  protected getUpdateComplete(): Promise<boolean> {\n    return this.__updatePromise;\n  }\n\n  /**\n   * Controls whether or not `update()` should be called when the element requests\n   * an update. By default, this method always returns `true`, but this can be\n   * customized to control when to update.\n   *\n   * @param _changedProperties Map of changed properties with old values\n   * @category updates\n   */\n  protected shouldUpdate(_changedProperties: PropertyValues): boolean {\n    return true;\n  }\n\n  /**\n   * Updates the element. This method reflects property values to attributes.\n   * It can be overridden to render and keep updated element DOM.\n   * Setting properties inside this method will *not* trigger\n   * another update.\n   *\n   * @param _changedProperties Map of changed properties with old values\n   * @category updates\n   */\n  protected update(_changedProperties: PropertyValues) {\n    // The forEach() expression will only run when when __reflectingProperties is\n    // defined, and it returns undefined, setting __reflectingProperties to\n    // undefined\n    this.__reflectingProperties &&= this.__reflectingProperties.forEach((p) =>\n      this.__propertyToAttribute(p, this[p as keyof this])\n    ) as undefined;\n    this.__markUpdated();\n  }\n\n  /**\n   * Invoked whenever the element is updated. Implement to perform\n   * post-updating tasks via DOM APIs, for example, focusing an element.\n   *\n   * Setting properties inside this method will trigger the element to update\n   * again after this update cycle completes.\n   *\n   * @param _changedProperties Map of changed properties with old values\n   * @category updates\n   */\n  protected updated(_changedProperties: PropertyValues) {}\n\n  /**\n   * Invoked when the element is first updated. Implement to perform one time\n   * work on the element after update.\n   *\n   * ```ts\n   * firstUpdated() {\n   *   this.renderRoot.getElementById('my-text-area').focus();\n   * }\n   * ```\n   *\n   * Setting properties inside this method will trigger the element to update\n   * again after this update cycle completes.\n   *\n   * @param _changedProperties Map of changed properties with old values\n   * @category updates\n   */\n  protected firstUpdated(_changedProperties: PropertyValues) {}\n}\n// Assigned here to work around a jscompiler bug with static fields\n// when compiling to ES5.\n// https://github.com/google/closure-compiler/issues/3177\n(ReactiveElement as unknown as Record<string, unknown>)[\n  JSCompiler_renameProperty('elementProperties', ReactiveElement)\n] = new Map();\n(ReactiveElement as unknown as Record<string, unknown>)[\n  JSCompiler_renameProperty('finalized', ReactiveElement)\n] = new Map();\n\n// Apply polyfills if available\npolyfillSupport?.({ReactiveElement});\n\n// Dev mode warnings...\nif (DEV_MODE) {\n  // Default warning set.\n  ReactiveElement.enabledWarnings = [\n    'change-in-update',\n    'async-perform-update',\n  ];\n  const ensureOwnWarnings = function (ctor: typeof ReactiveElement) {\n    if (\n      !ctor.hasOwnProperty(JSCompiler_renameProperty('enabledWarnings', ctor))\n    ) {\n      ctor.enabledWarnings = ctor.enabledWarnings!.slice();\n    }\n  };\n  ReactiveElement.enableWarning = function (\n    this: typeof ReactiveElement,\n    warning: WarningKind\n  ) {\n    ensureOwnWarnings(this);\n    if (!this.enabledWarnings!.includes(warning)) {\n      this.enabledWarnings!.push(warning);\n    }\n  };\n  ReactiveElement.disableWarning = function (\n    this: typeof ReactiveElement,\n    warning: WarningKind\n  ) {\n    ensureOwnWarnings(this);\n    const i = this.enabledWarnings!.indexOf(warning);\n    if (i >= 0) {\n      this.enabledWarnings!.splice(i, 1);\n    }\n  };\n}\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for ReactiveElement usage.\n(global.reactiveElementVersions ??= []).push('2.0.4');\nif (DEV_MODE && global.reactiveElementVersions.length > 1) {\n  issueWarning!(\n    'multiple-versions',\n    `Multiple versions of Lit loaded. Loading multiple versions ` +\n      `is not recommended.`\n  );\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {\n  type PropertyDeclaration,\n  type ReactiveElement,\n  defaultConverter,\n  notEqual,\n} from '../reactive-element.js';\nimport type {Interface} from './base.js';\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n  // Ensure warnings are issued only 1x, even if multiple versions of Lit\n  // are loaded.\n  const issuedWarnings: Set<string | undefined> =\n    (globalThis.litIssuedWarnings ??= new Set());\n\n  // Issue a warning, if we haven't already.\n  issueWarning = (code: string, warning: string) => {\n    warning += ` See https://lit.dev/msg/${code} for more information.`;\n    if (!issuedWarnings.has(warning)) {\n      console.warn(warning);\n      issuedWarnings.add(warning);\n    }\n  };\n}\n\n// Overloads for property decorator so that TypeScript can infer the correct\n// return type when a decorator is used as an accessor decorator or a setter\n// decorator.\nexport type PropertyDecorator = {\n  // accessor decorator signature\n  <C extends Interface<ReactiveElement>, V>(\n    target: ClassAccessorDecoratorTarget<C, V>,\n    context: ClassAccessorDecoratorContext<C, V>\n  ): ClassAccessorDecoratorResult<C, V>;\n\n  // setter decorator signature\n  <C extends Interface<ReactiveElement>, V>(\n    target: (value: V) => void,\n    context: ClassSetterDecoratorContext<C, V>\n  ): (this: C, value: V) => void;\n\n  // legacy decorator signature\n  (\n    protoOrDescriptor: Object,\n    name: PropertyKey,\n    descriptor?: PropertyDescriptor\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  ): any;\n};\n\nconst legacyProperty = (\n  options: PropertyDeclaration | undefined,\n  proto: Object,\n  name: PropertyKey\n) => {\n  const hasOwnProperty = proto.hasOwnProperty(name);\n  (proto.constructor as typeof ReactiveElement).createProperty(\n    name,\n    hasOwnProperty ? {...options, wrapped: true} : options\n  );\n  // For accessors (which have a descriptor on the prototype) we need to\n  // return a descriptor, otherwise TypeScript overwrites the descriptor we\n  // define in createProperty() with the original descriptor. We don't do this\n  // for fields, which don't have a descriptor, because this could overwrite\n  // descriptor defined by other decorators.\n  return hasOwnProperty\n    ? Object.getOwnPropertyDescriptor(proto, name)\n    : undefined;\n};\n\n// This is duplicated from a similar variable in reactive-element.ts, but\n// actually makes sense to have this default defined with the decorator, so\n// that different decorators could have different defaults.\nconst defaultPropertyDeclaration: PropertyDeclaration = {\n  attribute: true,\n  type: String,\n  converter: defaultConverter,\n  reflect: false,\n  hasChanged: notEqual,\n};\n\n// Temporary type, until google3 is on TypeScript 5.2\ntype StandardPropertyContext<C, V> = (\n  | ClassAccessorDecoratorContext<C, V>\n  | ClassSetterDecoratorContext<C, V>\n) & {metadata: object};\n\n/**\n * Wraps a class accessor or setter so that `requestUpdate()` is called with the\n * property name and old value when the accessor is set.\n */\nexport const standardProperty = <C extends Interface<ReactiveElement>, V>(\n  options: PropertyDeclaration = defaultPropertyDeclaration,\n  target: ClassAccessorDecoratorTarget<C, V> | ((value: V) => void),\n  context: StandardPropertyContext<C, V>\n): ClassAccessorDecoratorResult<C, V> | ((this: C, value: V) => void) => {\n  const {kind, metadata} = context;\n\n  if (DEV_MODE && metadata == null) {\n    issueWarning(\n      'missing-class-metadata',\n      `The class ${target} is missing decorator metadata. This ` +\n        `could mean that you're using a compiler that supports decorators ` +\n        `but doesn't support decorator metadata, such as TypeScript 5.1. ` +\n        `Please update your compiler.`\n    );\n  }\n\n  // Store the property options\n  let properties = globalThis.litPropertyMetadata.get(metadata);\n  if (properties === undefined) {\n    globalThis.litPropertyMetadata.set(metadata, (properties = new Map()));\n  }\n  properties.set(context.name, options);\n\n  if (kind === 'accessor') {\n    // Standard decorators cannot dynamically modify the class, so we can't\n    // replace a field with accessors. The user must use the new `accessor`\n    // keyword instead.\n    const {name} = context;\n    return {\n      set(this: ReactiveElement, v: V) {\n        const oldValue = (\n          target as ClassAccessorDecoratorTarget<C, V>\n        ).get.call(this as unknown as C);\n        (target as ClassAccessorDecoratorTarget<C, V>).set.call(\n          this as unknown as C,\n          v\n        );\n        this.requestUpdate(name, oldValue, options);\n      },\n      init(this: ReactiveElement, v: V): V {\n        if (v !== undefined) {\n          this._$changeProperty(name, undefined, options);\n        }\n        return v;\n      },\n    } as unknown as ClassAccessorDecoratorResult<C, V>;\n  } else if (kind === 'setter') {\n    const {name} = context;\n    return function (this: ReactiveElement, value: V) {\n      const oldValue = this[name as keyof ReactiveElement];\n      (target as (value: V) => void).call(this, value);\n      this.requestUpdate(name, oldValue, options);\n    } as unknown as (this: C, value: V) => void;\n  }\n  throw new Error(`Unsupported decorator location: ${kind}`);\n};\n\n/**\n * A class field or accessor decorator which creates a reactive property that\n * reflects a corresponding attribute value. When a decorated property is set\n * the element will update and render. A {@linkcode PropertyDeclaration} may\n * optionally be supplied to configure property features.\n *\n * This decorator should only be used for public fields. As public fields,\n * properties should be considered as primarily settable by element users,\n * either via attribute or the property itself.\n *\n * Generally, properties that are changed by the element should be private or\n * protected fields and should use the {@linkcode state} decorator.\n *\n * However, sometimes element code does need to set a public property. This\n * should typically only be done in response to user interaction, and an event\n * should be fired informing the user; for example, a checkbox sets its\n * `checked` property when clicked and fires a `changed` event. Mutating public\n * properties should typically not be done for non-primitive (object or array)\n * properties. In other cases when an element needs to manage state, a private\n * property decorated via the {@linkcode state} decorator should be used. When\n * needed, state properties can be initialized via public properties to\n * facilitate complex interactions.\n *\n * ```ts\n * class MyElement {\n *   @property({ type: Boolean })\n *   clicked = false;\n * }\n * ```\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function property(options?: PropertyDeclaration): PropertyDecorator {\n  return <C extends Interface<ReactiveElement>, V>(\n    protoOrTarget:\n      | object\n      | ClassAccessorDecoratorTarget<C, V>\n      | ((value: V) => void),\n    nameOrContext:\n      | PropertyKey\n      | ClassAccessorDecoratorContext<C, V>\n      | ClassSetterDecoratorContext<C, V>\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  ): any => {\n    return (\n      typeof nameOrContext === 'object'\n        ? standardProperty<C, V>(\n            options,\n            protoOrTarget as\n              | ClassAccessorDecoratorTarget<C, V>\n              | ((value: V) => void),\n            nameOrContext as StandardPropertyContext<C, V>\n          )\n        : legacyProperty(\n            options,\n            protoOrTarget as Object,\n            nameOrContext as PropertyKey\n          )\n    ) as PropertyDecorator;\n  };\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {property} from './property.js';\n\nexport interface StateDeclaration<Type = unknown> {\n  /**\n   * A function that indicates if a property should be considered changed when\n   * it is set. The function should take the `newValue` and `oldValue` and\n   * return `true` if an update should be requested.\n   */\n  hasChanged?(value: Type, oldValue: Type): boolean;\n}\n\n/**\n * @deprecated use StateDeclaration\n */\nexport type InternalPropertyDeclaration<Type = unknown> =\n  StateDeclaration<Type>;\n\n/**\n * Declares a private or protected reactive property that still triggers\n * updates to the element when it changes. It does not reflect from the\n * corresponding attribute.\n *\n * Properties declared this way must not be used from HTML or HTML templating\n * systems, they're solely for properties internal to the element. These\n * properties may be renamed by optimization tools like closure compiler.\n * @category Decorator\n */\nexport function state(options?: StateDeclaration) {\n  return property({\n    ...options,\n    // Add both `state` and `attribute` because we found a third party\n    // controller that is keying off of PropertyOptions.state to determine\n    // whether a field is a private internal property or not.\n    state: true,\n    attribute: false,\n  });\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Generates a public interface type that removes private and protected fields.\n * This allows accepting otherwise incompatible versions of the type (e.g. from\n * multiple copies of the same package in `node_modules`).\n */\nexport type Interface<T> = {\n  [K in keyof T]: T[K];\n};\n\nexport type Constructor<T> = {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  new (...args: any[]): T;\n};\n\n/**\n * Wraps up a few best practices when returning a property descriptor from a\n * decorator.\n *\n * Marks the defined property as configurable, and enumerable, and handles\n * the case where we have a busted Reflect.decorate zombiefill (e.g. in Angular\n * apps).\n *\n * @internal\n */\nexport const desc = (\n  obj: object,\n  name: PropertyKey | ClassAccessorDecoratorContext<unknown, unknown>,\n  descriptor: PropertyDescriptor\n) => {\n  // For backwards compatibility, we keep them configurable and enumerable.\n  descriptor.configurable = true;\n  descriptor.enumerable = true;\n  if (\n    // We check for Reflect.decorate each time, in case the zombiefill\n    // is applied via lazy loading some Angular code.\n    (Reflect as typeof Reflect & {decorate?: unknown}).decorate &&\n    typeof name !== 'object'\n  ) {\n    // If we're called as a legacy decorator, and Reflect.decorate is present\n    // then we have no guarantees that the returned descriptor will be\n    // defined on the class, so we must apply it directly ourselves.\n\n    Object.defineProperty(obj, name, descriptor);\n  }\n  return descriptor;\n};\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport type {ReactiveElement} from '../reactive-element.js';\nimport {desc, type Interface} from './base.js';\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n  // Ensure warnings are issued only 1x, even if multiple versions of Lit\n  // are loaded.\n  const issuedWarnings: Set<string | undefined> =\n    (globalThis.litIssuedWarnings ??= new Set());\n\n  // Issue a warning, if we haven't already.\n  issueWarning = (code: string, warning: string) => {\n    warning += code\n      ? ` See https://lit.dev/msg/${code} for more information.`\n      : '';\n    if (!issuedWarnings.has(warning)) {\n      console.warn(warning);\n      issuedWarnings.add(warning);\n    }\n  };\n}\n\nexport type QueryDecorator = {\n  // legacy\n  (\n    proto: Interface<ReactiveElement>,\n    name: PropertyKey,\n    descriptor?: PropertyDescriptor\n    // Note TypeScript requires the return type to be `void|any`\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  ): void | any;\n\n  // standard\n  <C extends Interface<ReactiveElement>, V extends Element | null>(\n    value: ClassAccessorDecoratorTarget<C, V>,\n    context: ClassAccessorDecoratorContext<C, V>\n  ): ClassAccessorDecoratorResult<C, V>;\n};\n\n/**\n * A property decorator that converts a class property into a getter that\n * executes a querySelector on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n * @param cache An optional boolean which when true performs the DOM query only\n *     once and caches the result.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * ```ts\n * class MyElement {\n *   @query('#first')\n *   first: HTMLDivElement;\n *\n *   render() {\n *     return html`\n *       <div id=\"first\"></div>\n *       <div id=\"second\"></div>\n *     `;\n *   }\n * }\n * ```\n * @category Decorator\n */\nexport function query(selector: string, cache?: boolean): QueryDecorator {\n  return (<C extends Interface<ReactiveElement>, V extends Element | null>(\n    protoOrTarget: ClassAccessorDecoratorTarget<C, V>,\n    nameOrContext: PropertyKey | ClassAccessorDecoratorContext<C, V>,\n    descriptor?: PropertyDescriptor\n  ) => {\n    const doQuery = (el: Interface<ReactiveElement>): V => {\n      const result = (el.renderRoot?.querySelector(selector) ?? null) as V;\n      if (DEV_MODE && result === null && cache && !el.hasUpdated) {\n        const name =\n          typeof nameOrContext === 'object'\n            ? nameOrContext.name\n            : nameOrContext;\n        issueWarning(\n          '',\n          `@query'd field ${JSON.stringify(String(name))} with the 'cache' ` +\n            `flag set for selector '${selector}' has been accessed before ` +\n            `the first update and returned null. This is expected if the ` +\n            `renderRoot tree has not been provided beforehand (e.g. via ` +\n            `Declarative Shadow DOM). Therefore the value hasn't been cached.`\n        );\n      }\n      // TODO: if we want to allow users to assert that the query will never\n      // return null, we need a new option and to throw here if the result\n      // is null.\n      return result;\n    };\n    if (cache) {\n      // Accessors to wrap from either:\n      //   1. The decorator target, in the case of standard decorators\n      //   2. The property descriptor, in the case of experimental decorators\n      //      on auto-accessors.\n      //   3. Functions that access our own cache-key property on the instance,\n      //      in the case of experimental decorators on fields.\n      const {get, set} =\n        typeof nameOrContext === 'object'\n          ? protoOrTarget\n          : descriptor ??\n            (() => {\n              const key = DEV_MODE\n                ? Symbol(`${String(nameOrContext)} (@query() cache)`)\n                : Symbol();\n              type WithCache = ReactiveElement & {\n                [key: symbol]: Element | null;\n              };\n              return {\n                get() {\n                  return (this as WithCache)[key];\n                },\n                set(v) {\n                  (this as WithCache)[key] = v;\n                },\n              };\n            })();\n      return desc(protoOrTarget, nameOrContext, {\n        get(this: ReactiveElement): V {\n          let result: V = get!.call(this);\n          if (result === undefined) {\n            result = doQuery(this);\n            if (result !== null || this.hasUpdated) {\n              set!.call(this, result);\n            }\n          }\n          return result;\n        },\n      });\n    } else {\n      // This object works as the return type for both standard and\n      // experimental decorators.\n      return desc(protoOrTarget, nameOrContext, {\n        get(this: ReactiveElement) {\n          return doQuery(this);\n        },\n      });\n    }\n  }) as QueryDecorator;\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport type {ReactiveElement} from '../reactive-element.js';\nimport type {QueryAssignedNodesOptions} from './query-assigned-nodes.js';\nimport {desc, type Interface} from './base.js';\n\nexport type QueryAssignedElementsDecorator = {\n  // legacy\n  (\n    proto: Interface<ReactiveElement>,\n    name: PropertyKey,\n    descriptor?: PropertyDescriptor\n    // Note TypeScript requires the return type to be `void|any`\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  ): void | any;\n\n  // standard\n  <C extends Interface<ReactiveElement>, V extends Array<Element>>(\n    value: ClassAccessorDecoratorTarget<C, V>,\n    context: ClassAccessorDecoratorContext<C, V>\n  ): ClassAccessorDecoratorResult<C, V>;\n};\n\n/**\n * Options for the {@linkcode queryAssignedElements} decorator. Extends the\n * options that can be passed into\n * [HTMLSlotElement.assignedElements](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n */\nexport interface QueryAssignedElementsOptions\n  extends QueryAssignedNodesOptions {\n  /**\n   * CSS selector used to filter the elements returned. For example, a selector\n   * of `\".item\"` will only include elements with the `item` class.\n   */\n  selector?: string;\n}\n\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedElements` of the given `slot`. Provides a declarative\n * way to use\n * [`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n *\n * Can be passed an optional {@linkcode QueryAssignedElementsOptions} object.\n *\n * Example usage:\n * ```ts\n * class MyElement {\n *   @queryAssignedElements({ slot: 'list' })\n *   listItems!: Array<HTMLElement>;\n *   @queryAssignedElements()\n *   unnamedSlotEls!: Array<HTMLElement>;\n *\n *   render() {\n *     return html`\n *       <slot name=\"list\"></slot>\n *       <slot></slot>\n *     `;\n *   }\n * }\n * ```\n *\n * Note, the type of this property should be annotated as `Array<HTMLElement>`.\n *\n * @category Decorator\n */\nexport function queryAssignedElements(\n  options?: QueryAssignedElementsOptions\n): QueryAssignedElementsDecorator {\n  return (<V extends Array<Element>>(\n    obj: object,\n    name: PropertyKey | ClassAccessorDecoratorContext<unknown, unknown>\n  ) => {\n    const {slot, selector} = options ?? {};\n    const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;\n    return desc(obj, name, {\n      get(this: ReactiveElement): V {\n        const slotEl =\n          this.renderRoot?.querySelector<HTMLSlotElement>(slotSelector);\n        const elements = slotEl?.assignedElements(options) ?? [];\n        return (\n          selector === undefined\n            ? elements\n            : elements.filter((node) => node.matches(selector))\n        ) as V;\n      },\n    });\n  }) as QueryAssignedElementsDecorator;\n}\n", "export*from\"@lit/reactive-element/decorators/custom-element.js\";export*from\"@lit/reactive-element/decorators/property.js\";export*from\"@lit/reactive-element/decorators/state.js\";export*from\"@lit/reactive-element/decorators/event-options.js\";export*from\"@lit/reactive-element/decorators/query.js\";export*from\"@lit/reactive-element/decorators/query-all.js\";export*from\"@lit/reactive-element/decorators/query-async.js\";export*from\"@lit/reactive-element/decorators/query-assigned-elements.js\";export*from\"@lit/reactive-element/decorators/query-assigned-nodes.js\";\n//# sourceMappingURL=decorators.js.map\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * The main LitElement module, which defines the {@linkcode LitElement} base\n * class and related APIs.\n *\n * LitElement components can define a template and a set of observed\n * properties. Changing an observed property triggers a re-render of the\n * element.\n *\n * Import {@linkcode LitElement} and {@linkcode html} from this module to\n * create a component:\n *\n *  ```js\n * import {LitElement, html} from 'lit-element';\n *\n * class MyElement extends LitElement {\n *\n *   // Declare observed properties\n *   static get properties() {\n *     return {\n *       adjective: {}\n *     }\n *   }\n *\n *   constructor() {\n *     this.adjective = 'awesome';\n *   }\n *\n *   // Define the element's template\n *   render() {\n *     return html`<p>your ${adjective} template here</p>`;\n *   }\n * }\n *\n * customElements.define('my-element', MyElement);\n * ```\n *\n * `LitElement` extends {@linkcode ReactiveElement} and adds lit-html\n * templating. The `ReactiveElement` class is provided for users that want to\n * build their own custom element base classes that don't use lit-html.\n *\n * @packageDocumentation\n */\nimport {PropertyValues, ReactiveElement} from '@lit/reactive-element';\nimport {render, RenderOptions, noChange, RootPart} from 'lit-html';\nexport * from '@lit/reactive-element';\nexport * from 'lit-html';\n\nimport {LitUnstable} from 'lit-html';\nimport {ReactiveUnstable} from '@lit/reactive-element';\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Unstable {\n  /**\n   * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n   * we will emit 'lit-debug' events to window, with live details about the update and render\n   * lifecycle. These can be useful for writing debug tooling and visualizations.\n   *\n   * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n   * making certain operations that are normally very cheap (like a no-op render) much slower,\n   * because we must copy data and dispatch events.\n   */\n  // eslint-disable-next-line @typescript-eslint/no-namespace\n  export namespace DebugLog {\n    export type Entry =\n      | LitUnstable.DebugLog.Entry\n      | ReactiveUnstable.DebugLog.Entry;\n  }\n}\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty = <P extends PropertyKey>(\n  prop: P,\n  _obj: unknown\n): P => prop;\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n  // Ensure warnings are issued only 1x, even if multiple versions of Lit\n  // are loaded.\n  const issuedWarnings: Set<string | undefined> =\n    (globalThis.litIssuedWarnings ??= new Set());\n\n  // Issue a warning, if we haven't already.\n  issueWarning = (code: string, warning: string) => {\n    warning += ` See https://lit.dev/msg/${code} for more information.`;\n    if (!issuedWarnings.has(warning)) {\n      console.warn(warning);\n      issuedWarnings.add(warning);\n    }\n  };\n}\n\n/**\n * Base element class that manages element properties and attributes, and\n * renders a lit-html template.\n *\n * To define a component, subclass `LitElement` and implement a\n * `render` method to provide the component's template. Define properties\n * using the {@linkcode LitElement.properties properties} property or the\n * {@linkcode property} decorator.\n */\nexport class LitElement extends ReactiveElement {\n  // This property needs to remain unminified.\n  static ['_$litElement$'] = true;\n\n  /**\n   * @category rendering\n   */\n  readonly renderOptions: RenderOptions = {host: this};\n\n  private __childPart: RootPart | undefined = undefined;\n\n  /**\n   * @category rendering\n   */\n  protected override createRenderRoot() {\n    const renderRoot = super.createRenderRoot();\n    // When adoptedStyleSheets are shimmed, they are inserted into the\n    // shadowRoot by createRenderRoot. Adjust the renderBefore node so that\n    // any styles in Lit content render before adoptedStyleSheets. This is\n    // important so that adoptedStyleSheets have precedence over styles in\n    // the shadowRoot.\n    this.renderOptions.renderBefore ??= renderRoot!.firstChild as ChildNode;\n    return renderRoot;\n  }\n\n  /**\n   * Updates the element. This method reflects property values to attributes\n   * and calls `render` to render DOM via lit-html. Setting properties inside\n   * this method will *not* trigger another update.\n   * @param changedProperties Map of changed properties with old values\n   * @category updates\n   */\n  protected override update(changedProperties: PropertyValues) {\n    // Setting properties in `render` should not trigger an update. Since\n    // updates are allowed after super.update, it's important to call `render`\n    // before that.\n    const value = this.render();\n    if (!this.hasUpdated) {\n      this.renderOptions.isConnected = this.isConnected;\n    }\n    super.update(changedProperties);\n    this.__childPart = render(value, this.renderRoot, this.renderOptions);\n  }\n\n  /**\n   * Invoked when the component is added to the document's DOM.\n   *\n   * In `connectedCallback()` you should setup tasks that should only occur when\n   * the element is connected to the document. The most common of these is\n   * adding event listeners to nodes external to the element, like a keydown\n   * event handler added to the window.\n   *\n   * ```ts\n   * connectedCallback() {\n   *   super.connectedCallback();\n   *   addEventListener('keydown', this._handleKeydown);\n   * }\n   * ```\n   *\n   * Typically, anything done in `connectedCallback()` should be undone when the\n   * element is disconnected, in `disconnectedCallback()`.\n   *\n   * @category lifecycle\n   */\n  override connectedCallback() {\n    super.connectedCallback();\n    this.__childPart?.setConnected(true);\n  }\n\n  /**\n   * Invoked when the component is removed from the document's DOM.\n   *\n   * This callback is the main signal to the element that it may no longer be\n   * used. `disconnectedCallback()` should ensure that nothing is holding a\n   * reference to the element (such as event listeners added to nodes external\n   * to the element), so that it is free to be garbage collected.\n   *\n   * ```ts\n   * disconnectedCallback() {\n   *   super.disconnectedCallback();\n   *   window.removeEventListener('keydown', this._handleKeydown);\n   * }\n   * ```\n   *\n   * An element may be re-connected after being disconnected.\n   *\n   * @category lifecycle\n   */\n  override disconnectedCallback() {\n    super.disconnectedCallback();\n    this.__childPart?.setConnected(false);\n  }\n\n  /**\n   * Invoked on each update to perform rendering tasks. This method may return\n   * any value renderable by lit-html's `ChildPart` - typically a\n   * `TemplateResult`. Setting properties inside this method will *not* trigger\n   * the element to update.\n   * @category rendering\n   */\n  protected render(): unknown {\n    return noChange;\n  }\n}\n\n/**\n * Ensure this class is marked as `finalized` as an optimization ensuring\n * it will not needlessly try to `finalize`.\n *\n * Note this property name is a string to prevent breaking Closure JS Compiler\n * optimizations. See @lit/reactive-element for more information.\n */\n(LitElement as unknown as Record<string, unknown>)[\n  JSCompiler_renameProperty('finalized', LitElement)\n] = true;\n\n// Install hydration if available\nglobalThis.litElementHydrateSupport?.({LitElement});\n\n// Apply polyfills if available\nconst polyfillSupport = DEV_MODE\n  ? globalThis.litElementPolyfillSupportDevMode\n  : globalThis.litElementPolyfillSupport;\npolyfillSupport?.({LitElement});\n\n/**\n * END USERS SHOULD NOT RELY ON THIS OBJECT.\n *\n * Private exports for use by other Lit packages, not intended for use by\n * external users.\n *\n * We currently do not make a mangled rollup build of the lit-ssr code. In order\n * to keep a number of (otherwise private) top-level exports  mangled in the\n * client side code, we export a _$LE object containing those members (or\n * helper methods for accessing private fields of those members), and then\n * re-export them for use in lit-ssr. This keeps lit-ssr agnostic to whether the\n * client-side code is being used in `dev` mode or `prod` mode.\n *\n * This has a unique name, to disambiguate it from private exports in\n * lit-html, since this module re-exports all of lit-html.\n *\n * @private\n */\nexport const _$LE = {\n  _$attributeToProperty: (\n    el: LitElement,\n    name: string,\n    value: string | null\n  ) => {\n    // eslint-disable-next-line\n    (el as any)._$attributeToProperty(name, value);\n  },\n  // eslint-disable-next-line\n  _$changedProperties: (el: LitElement) => (el as any)._$changedProperties,\n};\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for LitElement usage.\n(globalThis.litElementVersions ??= []).push('4.1.0');\nif (DEV_MODE && globalThis.litElementVersions.length > 1) {\n  issueWarning!(\n    'multiple-versions',\n    `Multiple versions of Lit loaded. Loading multiple versions ` +\n      `is not recommended.`\n  );\n}\n", "import\"@lit/reactive-element\";import\"lit-html\";export*from\"lit-element/lit-element.js\";export*from\"lit-html/is-server.js\";\n//# sourceMappingURL=index.js.map\n", "/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {isServer, ReactiveController, ReactiveControllerHost} from 'lit';\n\n/**\n * An element that can be attached to an associated controlling element.\n */\nexport interface Attachable {\n  /**\n   * Reflects the value of the `for` attribute, which is the ID of the element's\n   * associated control.\n   *\n   * Use this when the elements's associated control is not its parent.\n   *\n   * To manually control an element, set its `for` attribute to `\"\"`.\n   *\n   * @example\n   * ```html\n   * <div class=\"container\">\n   *   <md-attachable for=\"interactive\"></md-attachable>\n   *   <button id=\"interactive\">Action</button>\n   * </div>\n   * ```\n   *\n   * @example\n   * ```html\n   * <button class=\"manually-controlled\">\n   *   <md-attachable for=\"\"></md-attachable>\n   * </button>\n   * ```\n   */\n  htmlFor: string | null;\n\n  /**\n   * Gets or sets the element that controls the visibility of the attachable\n   * element. It is one of:\n   *\n   * - The control referenced by the `for` attribute.\n   * - The control provided to `element.attach(control)`\n   * - The element's parent.\n   * - `null` if the element is not controlled.\n   */\n  control: HTMLElement | null;\n\n  /**\n   * Attaches the element to an interactive control.\n   *\n   * @param control The element that controls the attachable element.\n   */\n  attach(control: HTMLElement): void;\n\n  /**\n   * Detaches the element from its current control.\n   */\n  detach(): void;\n}\n\n/**\n * A key to retrieve an `Attachable` element's `AttachableController` from a\n * global `MutationObserver`.\n */\nconst ATTACHABLE_CONTROLLER = Symbol('attachableController');\n\n/**\n * The host of an `AttachableController`. The controller will add itself to\n * the host so it can be retrieved in a global `MutationObserver`.\n */\ninterface AttachableControllerHost extends ReactiveControllerHost, HTMLElement {\n  [ATTACHABLE_CONTROLLER]?: AttachableController;\n}\n\nlet FOR_ATTRIBUTE_OBSERVER: MutationObserver | undefined;\n\nif (!isServer) {\n  /**\n   * A global `MutationObserver` that reacts to `for` attribute changes on\n   * `Attachable` elements. If the `for` attribute changes, the controller will\n   * re-attach to the new referenced element.\n   */\n  FOR_ATTRIBUTE_OBSERVER = new MutationObserver((records) => {\n    for (const record of records) {\n      // When a control's `for` attribute changes, inform its\n      // `AttachableController` to update to a new control.\n      (record.target as AttachableControllerHost)[\n        ATTACHABLE_CONTROLLER\n      ]?.hostConnected();\n    }\n  });\n}\n\n/**\n * A controller that provides an implementation for `Attachable` elements.\n *\n * @example\n * ```ts\n * class MyElement extends LitElement implements Attachable {\n *   get control() { return this.attachableController.control; }\n *\n *   private readonly attachableController = new AttachableController(\n *     this,\n *     (previousControl, newControl) => {\n *       previousControl?.removeEventListener('click', this.handleClick);\n *       newControl?.addEventListener('click', this.handleClick);\n *     }\n *   );\n *\n *   // Implement remaining `Attachable` properties/methods that call the\n *   // controller's properties/methods.\n * }\n * ```\n */\nexport class AttachableController implements ReactiveController, Attachable {\n  get htmlFor() {\n    return this.host.getAttribute('for');\n  }\n\n  set htmlFor(htmlFor: string | null) {\n    if (htmlFor === null) {\n      this.host.removeAttribute('for');\n    } else {\n      this.host.setAttribute('for', htmlFor);\n    }\n  }\n\n  get control() {\n    if (this.host.hasAttribute('for')) {\n      if (!this.htmlFor || !this.host.isConnected) {\n        return null;\n      }\n\n      return (\n        this.host.getRootNode() as Document | ShadowRoot\n      ).querySelector<HTMLElement>(`#${this.htmlFor}`);\n    }\n\n    return this.currentControl || this.host.parentElement;\n  }\n  set control(control: HTMLElement | null) {\n    if (control) {\n      this.attach(control);\n    } else {\n      this.detach();\n    }\n  }\n\n  private currentControl: HTMLElement | null = null;\n\n  /**\n   * Creates a new controller for an `Attachable` element.\n   *\n   * @param host The `Attachable` element.\n   * @param onControlChange A callback with two parameters for the previous and\n   *     next control. An `Attachable` element may perform setup or teardown\n   *     logic whenever the control changes.\n   */\n  constructor(\n    private readonly host: AttachableControllerHost,\n    private readonly onControlChange: (\n      prev: HTMLElement | null,\n      next: HTMLElement | null,\n    ) => void,\n  ) {\n    host.addController(this);\n    host[ATTACHABLE_CONTROLLER] = this;\n    FOR_ATTRIBUTE_OBSERVER?.observe(host, {attributeFilter: ['for']});\n  }\n\n  attach(control: HTMLElement) {\n    if (control === this.currentControl) {\n      return;\n    }\n\n    this.setCurrentControl(control);\n    // When imperatively attaching, remove the `for` attribute so\n    // that the attached control is used instead of a referenced one.\n    this.host.removeAttribute('for');\n  }\n\n  detach() {\n    this.setCurrentControl(null);\n    // When imperatively detaching, add an empty `for=\"\"` attribute. This will\n    // ensure the control is `null` rather than the `parentElement`.\n    this.host.setAttribute('for', '');\n  }\n\n  /** @private */\n  hostConnected() {\n    this.setCurrentControl(this.control);\n  }\n\n  /** @private */\n  hostDisconnected() {\n    this.setCurrentControl(null);\n  }\n\n  private setCurrentControl(control: HTMLElement | null) {\n    this.onControlChange(this.currentControl, control);\n    this.currentControl = control;\n  }\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {isServer, LitElement, PropertyValues} from 'lit';\nimport {property} from 'lit/decorators.js';\n\nimport {\n  Attachable,\n  AttachableController,\n} from '../../internal/controller/attachable-controller.js';\n\n/**\n * Events that the focus ring listens to.\n */\nconst EVENTS = ['focusin', 'focusout', 'pointerdown'];\n\n/**\n * A focus ring component.\n *\n * @fires visibility-changed {Event} Fired whenever `visible` changes.\n */\nexport class FocusRing extends LitElement implements Attachable {\n  /**\n   * Makes the focus ring visible.\n   */\n  @property({type: Boolean, reflect: true}) visible = false;\n\n  /**\n   * Makes the focus ring animate inwards instead of outwards.\n   */\n  @property({type: Boolean, reflect: true}) inward = false;\n\n  get htmlFor() {\n    return this.attachableController.htmlFor;\n  }\n\n  set htmlFor(htmlFor: string | null) {\n    this.attachableController.htmlFor = htmlFor;\n  }\n\n  get control() {\n    return this.attachableController.control;\n  }\n  set control(control: HTMLElement | null) {\n    this.attachableController.control = control;\n  }\n\n  private readonly attachableController = new AttachableController(\n    this,\n    this.onControlChange.bind(this),\n  );\n\n  attach(control: HTMLElement) {\n    this.attachableController.attach(control);\n  }\n\n  detach() {\n    this.attachableController.detach();\n  }\n\n  override connectedCallback() {\n    super.connectedCallback();\n    // Needed for VoiceOver, which will create a \"group\" if the element is a\n    // sibling to other content.\n    this.setAttribute('aria-hidden', 'true');\n  }\n\n  /** @private */\n  handleEvent(event: FocusRingEvent) {\n    if (event[HANDLED_BY_FOCUS_RING]) {\n      // This ensures the focus ring does not activate when multiple focus rings\n      // are used within a single component.\n      return;\n    }\n\n    switch (event.type) {\n      default:\n        return;\n      case 'focusin':\n        this.visible = this.control?.matches(':focus-visible') ?? false;\n        break;\n      case 'focusout':\n      case 'pointerdown':\n        this.visible = false;\n        break;\n    }\n\n    event[HANDLED_BY_FOCUS_RING] = true;\n  }\n\n  private onControlChange(prev: HTMLElement | null, next: HTMLElement | null) {\n    if (isServer) return;\n\n    for (const event of EVENTS) {\n      prev?.removeEventListener(event, this);\n      next?.addEventListener(event, this);\n    }\n  }\n\n  override update(changed: PropertyValues<FocusRing>) {\n    if (changed.has('visible')) {\n      // This logic can be removed once the `:has` selector has been introduced\n      // to Firefox. This is necessary to allow correct submenu styles.\n      this.dispatchEvent(new Event('visibility-changed'));\n    }\n    super.update(changed);\n  }\n}\n\nconst HANDLED_BY_FOCUS_RING = Symbol('handledByFocusRing');\n\ninterface FocusRingEvent extends Event {\n  [HANDLED_BY_FOCUS_RING]: true;\n}\n", "/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./focus/internal/focus-ring-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}\n`;\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {CSSResultOrNative} from 'lit';\nimport {customElement} from 'lit/decorators.js';\n\nimport {FocusRing} from './internal/focus-ring.js';\nimport {styles} from './internal/focus-ring-styles.js';\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'md-focus-ring': MdFocusRing;\n  }\n}\n\n/**\n * TODO(b/267336424): add docs\n *\n * @final\n * @suppress {visibility}\n */\n@customElement('md-focus-ring')\nexport class MdFocusRing extends FocusRing {\n  static override styles: CSSResultOrNative[] = [styles];\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {Disconnectable, Part} from './lit-html.js';\n\nexport {\n  AttributePart,\n  BooleanAttributePart,\n  ChildPart,\n  ElementPart,\n  EventPart,\n  Part,\n  PropertyPart,\n} from './lit-html.js';\n\nexport interface DirectiveClass {\n  new (part: PartInfo): Directive;\n}\n\n/**\n * This utility type extracts the signature of a directive class's render()\n * method so we can use it for the type of the generated directive function.\n */\nexport type DirectiveParameters<C extends Directive> = Parameters<C['render']>;\n\n/**\n * A generated directive function doesn't evaluate the directive, but just\n * returns a DirectiveResult object that captures the arguments.\n */\nexport interface DirectiveResult<C extends DirectiveClass = DirectiveClass> {\n  /**\n   * This property needs to remain unminified.\n   * @internal\n   */\n  ['_$litDirective$']: C;\n  /** @internal */\n  values: DirectiveParameters<InstanceType<C>>;\n}\n\nexport const PartType = {\n  ATTRIBUTE: 1,\n  CHILD: 2,\n  PROPERTY: 3,\n  BOOLEAN_ATTRIBUTE: 4,\n  EVENT: 5,\n  ELEMENT: 6,\n} as const;\n\nexport type PartType = (typeof PartType)[keyof typeof PartType];\n\nexport interface ChildPartInfo {\n  readonly type: typeof PartType.CHILD;\n}\n\nexport interface AttributePartInfo {\n  readonly type:\n    | typeof PartType.ATTRIBUTE\n    | typeof PartType.PROPERTY\n    | typeof PartType.BOOLEAN_ATTRIBUTE\n    | typeof PartType.EVENT;\n  readonly strings?: ReadonlyArray<string>;\n  readonly name: string;\n  readonly tagName: string;\n}\n\nexport interface ElementPartInfo {\n  readonly type: typeof PartType.ELEMENT;\n}\n\n/**\n * Information about the part a directive is bound to.\n *\n * This is useful for checking that a directive is attached to a valid part,\n * such as with directive that can only be used on attribute bindings.\n */\nexport type PartInfo = ChildPartInfo | AttributePartInfo | ElementPartInfo;\n\n/**\n * Creates a user-facing directive function from a Directive class. This\n * function has the same parameters as the directive's render() method.\n */\nexport const directive =\n  <C extends DirectiveClass>(c: C) =>\n  (...values: DirectiveParameters<InstanceType<C>>): DirectiveResult<C> => ({\n    // This property needs to remain unminified.\n    ['_$litDirective$']: c,\n    values,\n  });\n\n/**\n * Base class for creating custom directives. Users should extend this class,\n * implement `render` and/or `update`, and then pass their subclass to\n * `directive`.\n */\nexport abstract class Directive implements Disconnectable {\n  //@internal\n  __part!: Part;\n  //@internal\n  __attributeIndex: number | undefined;\n  //@internal\n  __directive?: Directive;\n\n  //@internal\n  _$parent!: Disconnectable;\n\n  // These will only exist on the AsyncDirective subclass\n  //@internal\n  _$disconnectableChildren?: Set<Disconnectable>;\n  // This property needs to remain unminified.\n  //@internal\n  ['_$notifyDirectiveConnectionChanged']?(isConnected: boolean): void;\n\n  constructor(_partInfo: PartInfo) {}\n\n  // See comment in Disconnectable interface for why this is a getter\n  get _$isConnected() {\n    return this._$parent._$isConnected;\n  }\n\n  /** @internal */\n  _$initialize(\n    part: Part,\n    parent: Disconnectable,\n    attributeIndex: number | undefined,\n  ) {\n    this.__part = part;\n    this._$parent = parent;\n    this.__attributeIndex = attributeIndex;\n  }\n  /** @internal */\n  _$resolve(part: Part, props: Array<unknown>): unknown {\n    return this.update(part, props);\n  }\n\n  abstract render(...props: Array<unknown>): unknown;\n\n  update(_part: Part, props: Array<unknown>): unknown {\n    return this.render(...props);\n  }\n}\n", "/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange} from '../lit-html.js';\nimport {\n  directive,\n  Directive,\n  DirectiveParameters,\n  PartInfo,\n  PartType,\n} from '../directive.js';\n\n/**\n * A key-value set of class names to truthy values.\n */\nexport interface ClassInfo {\n  readonly [name: string]: string | boolean | number;\n}\n\nclass ClassMapDirective extends Directive {\n  /**\n   * Stores the ClassInfo object applied to a given AttributePart.\n   * Used to unset existing values when a new ClassInfo object is applied.\n   */\n  private _previousClasses?: Set<string>;\n  private _staticClasses?: Set<string>;\n\n  constructor(partInfo: PartInfo) {\n    super(partInfo);\n    if (\n      partInfo.type !== PartType.ATTRIBUTE ||\n      partInfo.name !== 'class' ||\n      (partInfo.strings?.length as number) > 2\n    ) {\n      throw new Error(\n        '`classMap()` can only be used in the `class` attribute ' +\n          'and must be the only part in the attribute.',\n      );\n    }\n  }\n\n  render(classInfo: ClassInfo) {\n    // Add spaces to ensure separation from static classes\n    return (\n      ' ' +\n      Object.keys(classInfo)\n        .filter((key) => classInfo[key])\n        .join(' ') +\n      ' '\n    );\n  }\n\n  override update(part: AttributePart, [classInfo]: DirectiveParameters<this>) {\n    // Remember dynamic classes on the first render\n    if (this._previousClasses === undefined) {\n      this._previousClasses = new Set();\n      if (part.strings !== undefined) {\n        this._staticClasses = new Set(\n          part.strings\n            .join(' ')\n            .split(/\\s/)\n            .filter((s) => s !== ''),\n        );\n      }\n      for (const name in classInfo) {\n        if (classInfo[name] && !this._staticClasses?.has(name)) {\n          this._previousClasses.add(name);\n        }\n      }\n      return this.render(classInfo);\n    }\n\n    const classList = part.element.classList;\n\n    // Remove old classes that no longer apply\n    for (const name of this._previousClasses) {\n      if (!(name in classInfo)) {\n        classList.remove(name);\n        this._previousClasses!.delete(name);\n      }\n    }\n\n    // Add or remove classes based on their classMap value\n    for (const name in classInfo) {\n      // We explicitly want a loose truthy check of `value` because it seems\n      // more convenient that '' and 0 are skipped.\n      const value = !!classInfo[name];\n      if (\n        value !== this._previousClasses.has(name) &&\n        !this._staticClasses?.has(name)\n      ) {\n        if (value) {\n          classList.add(name);\n          this._previousClasses.add(name);\n        } else {\n          classList.remove(name);\n          this._previousClasses.delete(name);\n        }\n      }\n    }\n    return noChange;\n  }\n}\n\n/**\n * A directive that applies dynamic CSS classes.\n *\n * This must be used in the `class` attribute and must be the only part used in\n * the attribute. It takes each property in the `classInfo` argument and adds\n * the property name to the element's `classList` if the property value is\n * truthy; if the property value is falsy, the property name is removed from\n * the element's `class`.\n *\n * For example `{foo: bar}` applies the class `foo` if the value of `bar` is\n * truthy.\n *\n * @param classInfo\n */\nexport const classMap = directive(ClassMapDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {ClassMapDirective};\n", "export*from\"lit-html/directives/class-map.js\";\n//# sourceMappingURL=class-map.js.map\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Easing functions to use for web animations.\n *\n * **NOTE:** `EASING.EMPHASIZED` is approximated with unknown accuracy.\n *\n * TODO(b/241113345): replace with tokens\n */\nexport const EASING = {\n  STANDARD: 'cubic-bezier(0.2, 0, 0, 1)',\n  STANDARD_ACCELERATE: 'cubic-bezier(.3,0,1,1)',\n  STANDARD_DECELERATE: 'cubic-bezier(0,0,0,1)',\n  EMPHASIZED: 'cubic-bezier(.3,0,0,1)',\n  EMPHASIZED_ACCELERATE: 'cubic-bezier(.3,0,.8,.15)',\n  EMPHASIZED_DECELERATE: 'cubic-bezier(.05,.7,.1,1)',\n} as const;\n\n/**\n * A signal that is used for abortable tasks.\n */\nexport interface AnimationSignal {\n  /**\n   * Starts the abortable task. Any previous tasks started with this instance\n   * will be aborted.\n   *\n   * @return An `AbortSignal` for the current task.\n   */\n  start(): AbortSignal;\n  /**\n   * Complete the current task.\n   */\n  finish(): void;\n}\n\n/**\n * Creates an `AnimationSignal` that can be used to cancel a previous task.\n *\n * @example\n * class MyClass {\n *   private labelAnimationSignal = createAnimationSignal();\n *\n *   private async animateLabel() {\n *     // Start of the task. Previous tasks will be canceled.\n *     const signal = this.labelAnimationSignal.start();\n *\n *     // Do async work...\n *     if (signal.aborted) {\n *       // Use AbortSignal to check if a request was made to abort after some\n *       // asynchronous work.\n *       return;\n *     }\n *\n *     const animation = this.animate(...);\n *     // Add event listeners to be notified when the task should be canceled.\n *     signal.addEventListener('abort', () => {\n *       animation.cancel();\n *     });\n *\n *     animation.addEventListener('finish', () => {\n *       // Tell the signal that the current task is finished.\n *       this.labelAnimationSignal.finish();\n *     });\n *   }\n * }\n *\n * @return An `AnimationSignal`.\n */\nexport function createAnimationSignal(): AnimationSignal {\n  // The current animation's AbortController\n  let animationAbortController: AbortController | null = null;\n\n  return {\n    start() {\n      // Tell the previous animation to cancel.\n      animationAbortController?.abort();\n      // Set up a new AbortController for the current animation.\n      animationAbortController = new AbortController();\n      // Provide the AbortSignal so that the caller can check aborted status\n      // and add listeners.\n      return animationAbortController.signal;\n    },\n    finish() {\n      animationAbortController = null;\n    },\n  };\n}\n\n/**\n * Returns a function which can be used to throttle function calls\n * mapped to a key via a given function that should produce a promise that\n * determines the throttle amount (defaults to requestAnimationFrame).\n */\nexport function createThrottle() {\n  const stack = new Set();\n  return async (\n    key = '',\n    cb: (...args: unknown[]) => unknown,\n    timeout = async () => {\n      await new Promise(requestAnimationFrame);\n    },\n  ) => {\n    if (!stack.has(key)) {\n      stack.add(key);\n      await timeout();\n      if (stack.has(key)) {\n        stack.delete(key);\n        cb();\n      }\n    }\n  };\n}\n\n/**\n * Parses an number in milliseconds from a css time value\n */\nexport function msFromTimeCSSValue(value: string) {\n  const match = value.trim().match(/([\\d.]+)(\\s*s$)?/);\n  const time = match?.[1];\n  const seconds = match?.[2];\n  return Number(time ?? 0) * (seconds ? 1000 : 1);\n}\n", "/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, isServer, LitElement, PropertyValues} from 'lit';\nimport {property, query, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nimport {\n  Attachable,\n  AttachableController,\n} from '../../internal/controller/attachable-controller.js';\nimport {EASING} from '../../internal/motion/animation.js';\n\nconst PRESS_GROW_MS = 450;\nconst MINIMUM_PRESS_MS = 225;\nconst INITIAL_ORIGIN_SCALE = 0.2;\nconst PADDING = 10;\nconst SOFT_EDGE_MINIMUM_SIZE = 75;\nconst SOFT_EDGE_CONTAINER_RATIO = 0.35;\nconst PRESS_PSEUDO = '::after';\nconst ANIMATION_FILL = 'forwards';\n\n/**\n * Interaction states for the ripple.\n *\n * On Touch:\n *  - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`\n *  - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`\n *\n * On Mouse or Pen:\n *   - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`\n */\nenum State {\n  /**\n   * Initial state of the control, no touch in progress.\n   *\n   * Transitions:\n   *   - on touch down: transition to `TOUCH_DELAY`.\n   *   - on mouse down: transition to `WAITING_FOR_CLICK`.\n   */\n  INACTIVE,\n  /**\n   * Touch down has been received, waiting to determine if it's a swipe or\n   * scroll.\n   *\n   * Transitions:\n   *   - on touch up: begin press; transition to `WAITING_FOR_CLICK`.\n   *   - on cancel: transition to `INACTIVE`.\n   *   - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`.\n   */\n  TOUCH_DELAY,\n  /**\n   * A touch has been deemed to be a press\n   *\n   * Transitions:\n   *  - on up: transition to `WAITING_FOR_CLICK`.\n   */\n  HOLDING,\n  /**\n   * The user touch has finished, transition into rest state.\n   *\n   * Transitions:\n   *   - on click end press; transition to `INACTIVE`.\n   */\n  WAITING_FOR_CLICK,\n}\n\n/**\n * Events that the ripple listens to.\n */\nconst EVENTS = [\n  'click',\n  'contextmenu',\n  'pointercancel',\n  'pointerdown',\n  'pointerenter',\n  'pointerleave',\n  'pointerup',\n];\n\n/**\n * Delay reacting to touch so that we do not show the ripple for a swipe or\n * scroll interaction.\n */\nconst TOUCH_DELAY_MS = 150;\n\n/**\n * Used to detect if HCM is active. Events do not process during HCM when the\n * ripple is not displayed.\n */\nconst FORCED_COLORS = isServer\n  ? null\n  : window.matchMedia('(forced-colors: active)');\n\n/**\n * A ripple component.\n */\nexport class Ripple extends LitElement implements Attachable {\n  /**\n   * Disables the ripple.\n   */\n  @property({type: Boolean, reflect: true}) disabled = false;\n\n  get htmlFor() {\n    return this.attachableController.htmlFor;\n  }\n\n  set htmlFor(htmlFor: string | null) {\n    this.attachableController.htmlFor = htmlFor;\n  }\n\n  get control() {\n    return this.attachableController.control;\n  }\n  set control(control: HTMLElement | null) {\n    this.attachableController.control = control;\n  }\n\n  @state() private hovered = false;\n  @state() private pressed = false;\n\n  @query('.surface') private readonly mdRoot!: HTMLElement | null;\n  private rippleSize = '';\n  private rippleScale = '';\n  private initialSize = 0;\n  private growAnimation?: Animation;\n  private state = State.INACTIVE;\n  private rippleStartEvent?: PointerEvent;\n  private checkBoundsAfterContextMenu = false;\n  private readonly attachableController = new AttachableController(\n    this,\n    this.onControlChange.bind(this),\n  );\n\n  attach(control: HTMLElement) {\n    this.attachableController.attach(control);\n  }\n\n  detach() {\n    this.attachableController.detach();\n  }\n\n  override connectedCallback() {\n    super.connectedCallback();\n    // Needed for VoiceOver, which will create a \"group\" if the element is a\n    // sibling to other content.\n    this.setAttribute('aria-hidden', 'true');\n  }\n\n  protected override render() {\n    const classes = {\n      'hovered': this.hovered,\n      'pressed': this.pressed,\n    };\n\n    return html`<div class=\"surface ${classMap(classes)}\"></div>`;\n  }\n\n  protected override update(changedProps: PropertyValues<Ripple>) {\n    if (changedProps.has('disabled') && this.disabled) {\n      this.hovered = false;\n      this.pressed = false;\n    }\n    super.update(changedProps);\n  }\n\n  /**\n   * TODO(b/269799771): make private\n   * @private only public for slider\n   */\n  handlePointerenter(event: PointerEvent) {\n    if (!this.shouldReactToEvent(event)) {\n      return;\n    }\n\n    this.hovered = true;\n  }\n\n  /**\n   * TODO(b/269799771): make private\n   * @private only public for slider\n   */\n  handlePointerleave(event: PointerEvent) {\n    if (!this.shouldReactToEvent(event)) {\n      return;\n    }\n\n    this.hovered = false;\n\n    // release a held mouse or pen press that moves outside the element\n    if (this.state !== State.INACTIVE) {\n      this.endPressAnimation();\n    }\n  }\n\n  private handlePointerup(event: PointerEvent) {\n    if (!this.shouldReactToEvent(event)) {\n      return;\n    }\n\n    if (this.state === State.HOLDING) {\n      this.state = State.WAITING_FOR_CLICK;\n      return;\n    }\n\n    if (this.state === State.TOUCH_DELAY) {\n      this.state = State.WAITING_FOR_CLICK;\n      this.startPressAnimation(this.rippleStartEvent);\n      return;\n    }\n  }\n\n  private async handlePointerdown(event: PointerEvent) {\n    if (!this.shouldReactToEvent(event)) {\n      return;\n    }\n\n    this.rippleStartEvent = event;\n    if (!this.isTouch(event)) {\n      this.state = State.WAITING_FOR_CLICK;\n      this.startPressAnimation(event);\n      return;\n    }\n\n    // after a longpress contextmenu event, an extra `pointerdown` can be\n    // dispatched to the pressed element. Check that the down is within\n    // bounds of the element in this case.\n    if (this.checkBoundsAfterContextMenu && !this.inBounds(event)) {\n      return;\n    }\n\n    this.checkBoundsAfterContextMenu = false;\n\n    // Wait for a hold after touch delay\n    this.state = State.TOUCH_DELAY;\n    await new Promise((resolve) => {\n      setTimeout(resolve, TOUCH_DELAY_MS);\n    });\n\n    if (this.state !== State.TOUCH_DELAY) {\n      return;\n    }\n\n    this.state = State.HOLDING;\n    this.startPressAnimation(event);\n  }\n\n  private handleClick() {\n    // Click is a MouseEvent in Firefox and Safari, so we cannot use\n    // `shouldReactToEvent`\n    if (this.disabled) {\n      return;\n    }\n\n    if (this.state === State.WAITING_FOR_CLICK) {\n      this.endPressAnimation();\n      return;\n    }\n\n    if (this.state === State.INACTIVE) {\n      // keyboard synthesized click event\n      this.startPressAnimation();\n      this.endPressAnimation();\n    }\n  }\n\n  private handlePointercancel(event: PointerEvent) {\n    if (!this.shouldReactToEvent(event)) {\n      return;\n    }\n\n    this.endPressAnimation();\n  }\n\n  private handleContextmenu() {\n    if (this.disabled) {\n      return;\n    }\n\n    this.checkBoundsAfterContextMenu = true;\n    this.endPressAnimation();\n  }\n\n  private determineRippleSize() {\n    const {height, width} = this.getBoundingClientRect();\n    const maxDim = Math.max(height, width);\n    const softEdgeSize = Math.max(\n      SOFT_EDGE_CONTAINER_RATIO * maxDim,\n      SOFT_EDGE_MINIMUM_SIZE,\n    );\n\n    const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);\n    const hypotenuse = Math.sqrt(width ** 2 + height ** 2);\n    const maxRadius = hypotenuse + PADDING;\n\n    this.initialSize = initialSize;\n    this.rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`;\n    this.rippleSize = `${initialSize}px`;\n  }\n\n  private getNormalizedPointerEventCoords(pointerEvent: PointerEvent): {\n    x: number;\n    y: number;\n  } {\n    const {scrollX, scrollY} = window;\n    const {left, top} = this.getBoundingClientRect();\n    const documentX = scrollX + left;\n    const documentY = scrollY + top;\n    const {pageX, pageY} = pointerEvent;\n    return {x: pageX - documentX, y: pageY - documentY};\n  }\n\n  private getTranslationCoordinates(positionEvent?: Event) {\n    const {height, width} = this.getBoundingClientRect();\n    // end in the center\n    const endPoint = {\n      x: (width - this.initialSize) / 2,\n      y: (height - this.initialSize) / 2,\n    };\n\n    let startPoint;\n    if (positionEvent instanceof PointerEvent) {\n      startPoint = this.getNormalizedPointerEventCoords(positionEvent);\n    } else {\n      startPoint = {\n        x: width / 2,\n        y: height / 2,\n      };\n    }\n\n    // center around start point\n    startPoint = {\n      x: startPoint.x - this.initialSize / 2,\n      y: startPoint.y - this.initialSize / 2,\n    };\n\n    return {startPoint, endPoint};\n  }\n\n  private startPressAnimation(positionEvent?: Event) {\n    if (!this.mdRoot) {\n      return;\n    }\n\n    this.pressed = true;\n    this.growAnimation?.cancel();\n    this.determineRippleSize();\n    const {startPoint, endPoint} =\n      this.getTranslationCoordinates(positionEvent);\n    const translateStart = `${startPoint.x}px, ${startPoint.y}px`;\n    const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;\n\n    this.growAnimation = this.mdRoot.animate(\n      {\n        top: [0, 0],\n        left: [0, 0],\n        height: [this.rippleSize, this.rippleSize],\n        width: [this.rippleSize, this.rippleSize],\n        transform: [\n          `translate(${translateStart}) scale(1)`,\n          `translate(${translateEnd}) scale(${this.rippleScale})`,\n        ],\n      },\n      {\n        pseudoElement: PRESS_PSEUDO,\n        duration: PRESS_GROW_MS,\n        easing: EASING.STANDARD,\n        fill: ANIMATION_FILL,\n      },\n    );\n  }\n\n  private async endPressAnimation() {\n    this.rippleStartEvent = undefined;\n    this.state = State.INACTIVE;\n    const animation = this.growAnimation;\n    let pressAnimationPlayState = Infinity;\n    if (typeof animation?.currentTime === 'number') {\n      pressAnimationPlayState = animation.currentTime;\n    } else if (animation?.currentTime) {\n      pressAnimationPlayState = animation.currentTime.to('ms').value;\n    }\n\n    if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {\n      this.pressed = false;\n      return;\n    }\n\n    await new Promise((resolve) => {\n      setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState);\n    });\n\n    if (this.growAnimation !== animation) {\n      // A new press animation was started. The old animation was canceled and\n      // should not finish the pressed state.\n      return;\n    }\n\n    this.pressed = false;\n  }\n\n  /**\n   * Returns `true` if\n   *  - the ripple element is enabled\n   *  - the pointer is primary for the input type\n   *  - the pointer is the pointer that started the interaction, or will start\n   * the interaction\n   *  - the pointer is a touch, or the pointer state has the primary button\n   * held, or the pointer is hovering\n   */\n  private shouldReactToEvent(event: PointerEvent) {\n    if (this.disabled || !event.isPrimary) {\n      return false;\n    }\n\n    if (\n      this.rippleStartEvent &&\n      this.rippleStartEvent.pointerId !== event.pointerId\n    ) {\n      return false;\n    }\n\n    if (event.type === 'pointerenter' || event.type === 'pointerleave') {\n      return !this.isTouch(event);\n    }\n\n    const isPrimaryButton = event.buttons === 1;\n    return this.isTouch(event) || isPrimaryButton;\n  }\n\n  /**\n   * Check if the event is within the bounds of the element.\n   *\n   * This is only needed for the \"stuck\" contextmenu longpress on Chrome.\n   */\n  private inBounds({x, y}: PointerEvent) {\n    const {top, left, bottom, right} = this.getBoundingClientRect();\n    return x >= left && x <= right && y >= top && y <= bottom;\n  }\n\n  private isTouch({pointerType}: PointerEvent) {\n    return pointerType === 'touch';\n  }\n\n  /** @private */\n  async handleEvent(event: Event) {\n    if (FORCED_COLORS?.matches) {\n      // Skip event logic since the ripple is `display: none`.\n      return;\n    }\n\n    switch (event.type) {\n      case 'click':\n        this.handleClick();\n        break;\n      case 'contextmenu':\n        this.handleContextmenu();\n        break;\n      case 'pointercancel':\n        this.handlePointercancel(event as PointerEvent);\n        break;\n      case 'pointerdown':\n        await this.handlePointerdown(event as PointerEvent);\n        break;\n      case 'pointerenter':\n        this.handlePointerenter(event as PointerEvent);\n        break;\n      case 'pointerleave':\n        this.handlePointerleave(event as PointerEvent);\n        break;\n      case 'pointerup':\n        this.handlePointerup(event as PointerEvent);\n        break;\n      default:\n        break;\n    }\n  }\n\n  private onControlChange(prev: HTMLElement | null, next: HTMLElement | null) {\n    if (isServer) return;\n\n    for (const event of EVENTS) {\n      prev?.removeEventListener(event, this);\n      next?.addEventListener(event, this);\n    }\n  }\n}\n", "/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./ripple/internal/ripple-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:\"\";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}\n`;\n", "/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {CSSResultOrNative} from 'lit';\nimport {customElement} from 'lit/decorators.js';\n\nimport {Ripple} from './internal/ripple.js';\nimport {styles} from './internal/ripple-styles.js';\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'md-ripple': MdRipple;\n  }\n}\n\n/**\n * @summary Ripples, also known as state layers, are visual indicators used to\n * communicate the status of a component or interactive element.\n *\n * @description A state layer is a semi-transparent covering on an element that\n * indicates its state. State layers provide a systematic approach to\n * visualizing states by using opacity. A layer can be applied to an entire\n * element or in a circular shape and only one state layer can be applied at a\n * given time.\n *\n * @final\n * @suppress {visibility}\n */\n@customElement('md-ripple')\nexport class MdRipple extends Ripple {\n  static override styles: CSSResultOrNative[] = [styles];\n}\n", "/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Accessibility Object Model reflective aria property name types.\n */\nexport type ARIAProperty = keyof ARIAMixin;\n\n/**\n * Accessibility Object Model reflective aria properties.\n */\nexport const ARIA_PROPERTIES: ARIAProperty[] = [\n  'role',\n  'ariaAtomic',\n  'ariaAutoComplete',\n  'ariaBusy',\n  'ariaChecked',\n  'ariaColCount',\n  'ariaColIndex',\n  'ariaColSpan',\n  'ariaCurrent',\n  'ariaDisabled',\n  'ariaExpanded',\n  'ariaHasPopup',\n  'ariaHidden',\n  'ariaInvalid',\n  'ariaKeyShortcuts',\n  'ariaLabel',\n  'ariaLevel',\n  'ariaLive',\n  'ariaModal',\n  'ariaMultiLine',\n  'ariaMultiSelectable',\n  'ariaOrientation',\n  'ariaPlaceholder',\n  'ariaPosInSet',\n  'ariaPressed',\n  'ariaReadOnly',\n  'ariaRequired',\n  'ariaRoleDescription',\n  'ariaRowCount',\n  'ariaRowIndex',\n  'ariaRowSpan',\n  'ariaSelected',\n  'ariaSetSize',\n  'ariaSort',\n  'ariaValueMax',\n  'ariaValueMin',\n  'ariaValueNow',\n  'ariaValueText',\n];\n\n/**\n * Accessibility Object Model aria attribute name types.\n */\nexport type ARIAAttribute = ARIAPropertyToAttribute<ARIAProperty>;\n\n/**\n * Accessibility Object Model aria attributes.\n */\nexport const ARIA_ATTRIBUTES = ARIA_PROPERTIES.map(ariaPropertyToAttribute);\n\n/**\n * Checks if an attribute is one of the AOM aria attributes.\n *\n * @example\n * isAriaAttribute('aria-label'); // true\n *\n * @param attribute The attribute to check.\n * @return True if the attribute is an aria attribute, or false if not.\n */\nexport function isAriaAttribute(attribute: string): attribute is ARIAAttribute {\n  return ARIA_ATTRIBUTES.includes(attribute as ARIAAttribute);\n}\n\n/**\n * Converts an AOM aria property into its corresponding attribute.\n *\n * @example\n * ariaPropertyToAttribute('ariaLabel'); // 'aria-label'\n *\n * @param property The aria property.\n * @return The aria attribute.\n */\nexport function ariaPropertyToAttribute<K extends ARIAProperty>(property: K) {\n  return (\n    property\n      .replace('aria', 'aria-')\n      // IDREF attributes also include an \"Element\" or \"Elements\" suffix\n      .replace(/Elements?/g, '')\n      .toLowerCase() as ARIAPropertyToAttribute<K>\n  );\n}\n\n// Converts an `ariaFoo` string type to an `aria-foo` string type.\ntype ARIAPropertyToAttribute<K extends string> =\n  K extends `aria${infer Suffix}Element${infer OptS}`\n    ? `aria-${Lowercase<Suffix>}`\n    : K extends `aria${infer Suffix}`\n      ? `aria-${Lowercase<Suffix>}`\n      : K;\n\n/**\n * An extension of `ARIAMixin` that enforces strict value types for aria\n * properties.\n *\n * This is needed for correct typing in render functions with lit analyzer.\n *\n * @example\n * render() {\n *   const {ariaLabel} = this as ARIAMixinStrict;\n *   return html`\n *     <button aria-label=${ariaLabel || nothing}>\n *       <slot></slot>\n *     </button>\n *   `;\n * }\n */\nexport interface ARIAMixinStrict extends ARIAMixin {\n  ariaAtomic: 'true' | 'false' | null;\n  ariaAutoComplete: 'none' | 'inline' | 'list' | 'both' | null;\n  ariaBusy: 'true' | 'false' | null;\n  ariaChecked: 'true' | 'false' | null;\n  ariaColCount: `${number}` | null;\n  ariaColIndex: `${number}` | null;\n  ariaColSpan: `${number}` | null;\n  ariaCurrent:\n    | 'page'\n    | 'step'\n    | 'location'\n    | 'date'\n    | 'time'\n    | 'true'\n    | 'false'\n    | null;\n  ariaDisabled: 'true' | 'false' | null;\n  ariaExpanded: 'true' | 'false' | null;\n  ariaHasPopup:\n    | 'false'\n    | 'true'\n    | 'menu'\n    | 'listbox'\n    | 'tree'\n    | 'grid'\n    | 'dialog'\n    | null;\n  ariaHidden: 'true' | 'false' | null;\n  ariaInvalid: 'true' | 'false' | null;\n  ariaKeyShortcuts: string | null;\n  ariaLabel: string | null;\n  ariaLevel: `${number}` | null;\n  ariaLive: 'assertive' | 'off' | 'polite' | null;\n  ariaModal: 'true' | 'false' | null;\n  ariaMultiLine: 'true' | 'false' | null;\n  ariaMultiSelectable: 'true' | 'false' | null;\n  ariaOrientation: 'horizontal' | 'vertical' | 'undefined' | null;\n  ariaPlaceholder: string | null;\n  ariaPosInSet: `${number}` | null;\n  ariaPressed: 'true' | 'false' | null;\n  ariaReadOnly: 'true' | 'false' | null;\n  ariaRequired: 'true' | 'false' | null;\n  ariaRoleDescription: string | null;\n  ariaRowCount: `${number}` | null;\n  ariaRowIndex: `${number}` | null;\n  ariaRowSpan: `${number}` | null;\n  ariaSelected: 'true' | 'false' | null;\n  ariaSetSize: `${number}` | null;\n  ariaSort: 'ascending' | 'descending' | 'none' | 'other' | null;\n  ariaValueMax: `${number}` | null;\n  ariaValueMin: `${number}` | null;\n  ariaValueNow: `${number}` | null;\n  ariaValueText: string | null;\n  role: ARIARole | null;\n}\n\n/**\n * Valid values for `role`.\n */\nexport type ARIARole =\n  | 'alert'\n  | 'alertdialog'\n  | 'button'\n  | 'checkbox'\n  | 'dialog'\n  | 'gridcell'\n  | 'link'\n  | 'log'\n  | 'marquee'\n  | 'menuitem'\n  | 'menuitemcheckbox'\n  | 'menuitemradio'\n  | 'option'\n  | 'progressbar'\n  | 'radio'\n  | 'scrollbar'\n  | 'searchbox'\n  | 'slider'\n  | 'spinbutton'\n  | 'status'\n  | 'switch'\n  | 'tab'\n  | 'tabpanel'\n  | 'textbox'\n  | 'timer'\n  | 'tooltip'\n  | 'treeitem'\n  | 'combobox'\n  | 'grid'\n  | 'listbox'\n  | 'menu'\n  | 'menubar'\n  | 'radiogroup'\n  | 'tablist'\n  | 'tree'\n  | 'treegrid'\n  | 'application'\n  | 'article'\n  | 'cell'\n  | 'columnheader'\n  | 'definition'\n  | 'directory'\n  | 'document'\n  | 'feed'\n  | 'figure'\n  | 'group'\n  | 'heading'\n  | 'img'\n  | 'list'\n  | 'listitem'\n  | 'math'\n  | 'none'\n  | 'note'\n  | 'presentation'\n  | 'region'\n  | 'row'\n  | 'rowgroup'\n  | 'rowheader'\n  | 'separator'\n  | 'table'\n  | 'term'\n  | 'text'\n  | 'toolbar'\n  | 'banner'\n  | 'complementary'\n  | 'contentinfo'\n  | 'form'\n  | 'main'\n  | 'navigation'\n  | 'region'\n  | 'search'\n  | 'doc-abstract'\n  | 'doc-acknowledgments'\n  | 'doc-afterword'\n  | 'doc-appendix'\n  | 'doc-backlink'\n  | 'doc-biblioentry'\n  | 'doc-bibliography'\n  | 'doc-biblioref'\n  | 'doc-chapter'\n  | 'doc-colophon'\n  | 'doc-conclusion'\n  | 'doc-cover'\n  | 'doc-credit'\n  | 'doc-credits'\n  | 'doc-dedication'\n  | 'doc-endnote'\n  | 'doc-endnotes'\n  | 'doc-epigraph'\n  | 'doc-epilogue'\n  | 'doc-errata'\n  | 'doc-example'\n  | 'doc-footnote'\n  | 'doc-foreword'\n  | 'doc-glossary'\n  | 'doc-glossref'\n  | 'doc-index'\n  | 'doc-introduction'\n  | 'doc-noteref'\n  | 'doc-notice'\n  | 'doc-pagebreak'\n  | 'doc-pagelist'\n  | 'doc-part'\n  | 'doc-preface'\n  | 'doc-prologue'\n  | 'doc-pullquote'\n  | 'doc-qna'\n  | 'doc-subtitle'\n  | 'doc-tip'\n  | 'doc-toc';\n", "/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {LitElement, ReactiveElement, isServer} from 'lit';\n\nimport {MixinBase, MixinReturn} from '../../labs/behaviors/mixin.js';\nimport {\n  ARIA_PROPERTIES,\n  ariaPropertyToAttribute,\n  isAriaAttribute,\n} from './aria.js';\n\n// Private symbols\nconst privateIgnoreAttributeChangesFor = Symbol(\n  'privateIgnoreAttributeChangesFor',\n);\n\n/**\n * Mixes in aria delegation for elements that delegate focus and aria to inner\n * shadow root elements.\n *\n * This mixin fixes invalid aria announcements with shadow roots, caused by\n * duplicate aria attributes on both the host and the inner shadow root element.\n *\n * Note: this mixin **does not yet support** ID reference attributes, such as\n * `aria-labelledby` or `aria-controls`.\n *\n * @example\n * ```ts\n * class MyButton extends mixinDelegatesAria(LitElement) {\n *   static shadowRootOptions = {mode: 'open', delegatesFocus: true};\n *\n *   render() {\n *     return html`\n *       <button aria-label=${this.ariaLabel || nothing}>\n *         <slot></slot>\n *       </button>\n *     `;\n *   }\n * }\n * ```\n * ```html\n * <my-button aria-label=\"Plus one\">+1</my-button>\n * ```\n *\n * Use `ARIAMixinStrict` for lit analyzer strict types, such as the \"role\"\n * attribute.\n *\n * @example\n * ```ts\n * return html`\n *   <button role=${(this as ARIAMixinStrict).role || nothing}>\n *     <slot></slot>\n *   </button>\n * `;\n * ```\n *\n * In the future, updates to the Accessibility Object Model (AOM) will provide\n * built-in aria delegation features that will replace this mixin.\n *\n * @param base The class to mix functionality into.\n * @return The provided class with aria delegation mixed in.\n */\nexport function mixinDelegatesAria<T extends MixinBase<LitElement>>(\n  base: T,\n): MixinReturn<T> {\n  if (isServer) {\n    // Don't shift attributes when running with lit-ssr. The SSR renderer\n    // implements a subset of DOM APIs, including the methods this mixin\n    // overrides, causing errors. We don't need to shift on the server anyway\n    // since elements will shift attributes immediately once they hydrate.\n    return base;\n  }\n\n  abstract class WithDelegatesAriaElement extends base {\n    [privateIgnoreAttributeChangesFor] = new Set();\n\n    override attributeChangedCallback(\n      name: string,\n      oldValue: string | null,\n      newValue: string | null,\n    ) {\n      if (!isAriaAttribute(name)) {\n        super.attributeChangedCallback(name, oldValue, newValue);\n        return;\n      }\n\n      if (this[privateIgnoreAttributeChangesFor].has(name)) {\n        return;\n      }\n\n      // Don't trigger another `attributeChangedCallback` once we remove the\n      // aria attribute from the host. We check the explicit name of the\n      // attribute to ignore since `attributeChangedCallback` can be called\n      // multiple times out of an expected order when hydrating an element with\n      // multiple attributes.\n      this[privateIgnoreAttributeChangesFor].add(name);\n      this.removeAttribute(name);\n      this[privateIgnoreAttributeChangesFor].delete(name);\n      const dataProperty = ariaAttributeToDataProperty(name);\n      if (newValue === null) {\n        delete this.dataset[dataProperty];\n      } else {\n        this.dataset[dataProperty] = newValue;\n      }\n\n      this.requestUpdate(ariaAttributeToDataProperty(name), oldValue);\n    }\n\n    override getAttribute(name: string) {\n      if (isAriaAttribute(name)) {\n        return super.getAttribute(ariaAttributeToDataAttribute(name));\n      }\n\n      return super.getAttribute(name);\n    }\n\n    override removeAttribute(name: string) {\n      super.removeAttribute(name);\n      if (isAriaAttribute(name)) {\n        super.removeAttribute(ariaAttributeToDataAttribute(name));\n        // Since `aria-*` attributes are already removed`, we need to request\n        // an update because `attributeChangedCallback` will not be called.\n        this.requestUpdate();\n      }\n    }\n  }\n\n  setupDelegatesAriaProperties(\n    WithDelegatesAriaElement as unknown as typeof ReactiveElement,\n  );\n\n  return WithDelegatesAriaElement;\n}\n\n/**\n * Overrides the constructor's native `ARIAMixin` properties to ensure that\n * aria properties reflect the values that were shifted to a data attribute.\n *\n * @param ctor The `ReactiveElement` constructor to patch.\n */\nfunction setupDelegatesAriaProperties(ctor: typeof ReactiveElement) {\n  for (const ariaProperty of ARIA_PROPERTIES) {\n    // The casing between ariaProperty and the dataProperty may be different.\n    // ex: aria-haspopup -> ariaHasPopup\n    const ariaAttribute = ariaPropertyToAttribute(ariaProperty);\n    // ex: aria-haspopup -> data-aria-haspopup\n    const dataAttribute = ariaAttributeToDataAttribute(ariaAttribute);\n    // ex: aria-haspopup -> dataset.ariaHaspopup\n    const dataProperty = ariaAttributeToDataProperty(ariaAttribute);\n\n    // Call `ReactiveElement.createProperty()` so that the `aria-*` and `data-*`\n    // attributes are added to the `static observedAttributes` array. This\n    // triggers `attributeChangedCallback` for the delegates aria mixin to\n    // handle.\n    ctor.createProperty(ariaProperty, {\n      attribute: ariaAttribute,\n      noAccessor: true,\n    });\n    ctor.createProperty(Symbol(dataAttribute), {\n      attribute: dataAttribute,\n      noAccessor: true,\n    });\n\n    // Re-define the `ARIAMixin` properties to handle data attribute shifting.\n    // It is safe to use `Object.defineProperty` here because the properties\n    // are native and not renamed.\n    // tslint:disable-next-line:ban-unsafe-reflection\n    Object.defineProperty(ctor.prototype, ariaProperty, {\n      configurable: true,\n      enumerable: true,\n      get(this: ReactiveElement): string | null {\n        return this.dataset[dataProperty] ?? null;\n      },\n      set(this: ReactiveElement, value: string | null): void {\n        const prevValue = this.dataset[dataProperty] ?? null;\n        if (value === prevValue) {\n          return;\n        }\n\n        if (value === null) {\n          delete this.dataset[dataProperty];\n        } else {\n          this.dataset[dataProperty] = value;\n        }\n\n        this.requestUpdate(ariaProperty, prevValue);\n      },\n    });\n  }\n}\n\nfunction ariaAttributeToDataAttribute(ariaAttribute: string) {\n  // aria-haspopup -> data-aria-haspopup\n  return `data-${ariaAttribute}`;\n}\n\nfunction ariaAttributeToDataProperty(ariaAttribute: string) {\n  // aria-haspopup -> dataset.ariaHaspopup\n  return ariaAttribute.replace(/-\\w/, (dashLetter) =>\n    dashLetter[1].toUpperCase(),\n  );\n}\n", "/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {LitElement} from 'lit';\n\nimport {MixinBase, MixinReturn} from './mixin.js';\n\n/**\n * A unique symbol used for protected access to an instance's\n * `ElementInternals`.\n *\n * @example\n * ```ts\n * class MyElement extends mixinElementInternals(LitElement) {\n *   constructor() {\n *     super();\n *     this[internals].role = 'button';\n *   }\n * }\n * ```\n */\nexport const internals = Symbol('internals');\n\n/**\n * An instance with an `internals` symbol property for the component's\n * `ElementInternals`.\n *\n * Use this when protected access is needed for an instance's `ElementInternals`\n * from other files. A unique symbol is used to access the internals.\n */\nexport interface WithElementInternals {\n  /**\n   * An instance's `ElementInternals`.\n   */\n  [internals]: ElementInternals;\n}\n\n// Private symbols\nconst privateInternals = Symbol('privateInternals');\n\n/**\n * Mixes in an attached `ElementInternals` instance.\n *\n * This mixin is only needed when other shared code needs access to a\n * component's `ElementInternals`, such as form-associated mixins.\n *\n * @param base The class to mix functionality into.\n * @return The provided class with `WithElementInternals` mixed in.\n */\nexport function mixinElementInternals<T extends MixinBase<LitElement>>(\n  base: T,\n): MixinReturn<T, WithElementInternals> {\n  abstract class WithElementInternalsElement\n    extends base\n    implements WithElementInternals\n  {\n    get [internals]() {\n      // Create internals in getter so that it can be used in methods called on\n      // construction in `ReactiveElement`, such as `requestUpdate()`.\n      if (!this[privateInternals]) {\n        // Cast needed for closure\n        this[privateInternals] = (this as HTMLElement).attachInternals();\n      }\n\n      return this[privateInternals];\n    }\n\n    [privateInternals]?: ElementInternals;\n  }\n\n  return WithElementInternalsElement;\n}\n", "/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {isServer, ReactiveElement} from 'lit';\n\nimport {\n  internals,\n  WithElementInternals,\n} from '../../labs/behaviors/element-internals.js';\n\n/**\n * A string indicating the form submission behavior of the element.\n *\n * - submit: The element submits the form. This is the default value if the\n * attribute is not specified, or if it is dynamically changed to an empty or\n * invalid value.\n * - reset: The element resets the form.\n * - button: The element does nothing.\n */\nexport type FormSubmitterType = 'button' | 'submit' | 'reset';\n\n/**\n * An element that can submit or reset a `<form>`, similar to\n * `<button type=\"submit\">`.\n */\nexport interface FormSubmitter extends ReactiveElement, WithElementInternals {\n  /**\n   * A string indicating the form submission behavior of the element.\n   *\n   * - submit: The element submits the form. This is the default value if the\n   * attribute is not specified, or if it is dynamically changed to an empty or\n   * invalid value.\n   * - reset: The element resets the form.\n   * - button: The element does nothing.\n   */\n  type: FormSubmitterType;\n\n  /**\n   * The HTML name to use in form submission. When combined with a `value`, the\n   * submitting button's name/value will be added to the form.\n   *\n   * Names must reflect to a `name` attribute for form integration.\n   */\n  name: string;\n\n  /**\n   * The value of the button. When combined with a `name`, the submitting\n   * button's name/value will be added to the form.\n   */\n  value: string;\n}\n\ntype FormSubmitterConstructor =\n  | (new () => FormSubmitter)\n  | (abstract new () => FormSubmitter);\n\n/**\n * Sets up an element's constructor to enable form submission. The element\n * instance should be form associated and have a `type` property.\n *\n * A click listener is added to each element instance. If the click is not\n * default prevented, it will submit the element's form, if any.\n *\n * @example\n * ```ts\n * class MyElement extends mixinElementInternals(LitElement) {\n *   static {\n *     setupFormSubmitter(MyElement);\n *   }\n *\n *   static formAssociated = true;\n *\n *   type: FormSubmitterType = 'submit';\n * }\n * ```\n *\n * @param ctor The form submitter element's constructor.\n */\nexport function setupFormSubmitter(ctor: FormSubmitterConstructor) {\n  if (isServer) {\n    return;\n  }\n\n  (ctor as unknown as typeof ReactiveElement).addInitializer((instance) => {\n    const submitter = instance as FormSubmitter;\n    submitter.addEventListener('click', async (event) => {\n      const {type, [internals]: elementInternals} = submitter;\n      const {form} = elementInternals;\n      if (!form || type === 'button') {\n        return;\n      }\n\n      // Wait a full task for event bubbling to complete.\n      await new Promise<void>((resolve) => {\n        setTimeout(resolve);\n      });\n\n      if (event.defaultPrevented) {\n        return;\n      }\n\n      if (type === 'reset') {\n        form.reset();\n        return;\n      }\n\n      // form.requestSubmit(submitter) does not work with form associated custom\n      // elements. This patches the dispatched submit event to add the correct\n      // `submitter`.\n      // See https://github.com/WICG/webcomponents/issues/814\n      form.addEventListener(\n        'submit',\n        (submitEvent) => {\n          Object.defineProperty(submitEvent, 'submitter', {\n            configurable: true,\n            enumerable: true,\n            get: () => submitter,\n          });\n        },\n        {capture: true, once: true},\n      );\n\n      elementInternals.setFormValue(submitter.value);\n      form.requestSubmit();\n    });\n  });\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Dispatches a click event to the given element that triggers a native action,\n * but is not composed and therefore is not seen outside the element.\n *\n * This is useful for responding to an external click event on the host element\n * that should trigger an internal action like a button click.\n *\n * Note, a helper is provided because setting this up correctly is a bit tricky.\n * In particular, calling `click` on an element creates a composed event, which\n * is not desirable, and a manually dispatched event must specifically be a\n * `MouseEvent` to trigger a native action.\n *\n * @example\n * hostClickListener = (event: MouseEvent) {\n *   if (isActivationClick(event)) {\n *     this.dispatchActivationClick(this.buttonElement);\n *   }\n * }\n *\n */\nexport function dispatchActivationClick(element: HTMLElement) {\n  const event = new MouseEvent('click', {bubbles: true});\n  element.dispatchEvent(event);\n  return event;\n}\n\n/**\n * Returns true if the click event should trigger an activation behavior. The\n * behavior is defined by the element and is whatever it should do when\n * clicked.\n *\n * Typically when an element needs to handle a click, the click is generated\n * from within the element and an event listener within the element implements\n * the needed behavior; however, it's possible to fire a click directly\n * at the element that the element should handle. This method helps\n * distinguish these \"external\" clicks.\n *\n * An \"external\" click can be triggered in a number of ways: via a click\n * on an associated label for a form  associated element, calling\n * `element.click()`, or calling\n * `element.dispatchEvent(new MouseEvent('click', ...))`.\n *\n * Also works around Firefox issue\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1804576 by squelching\n * events for a microtask after called.\n *\n * @example\n * hostClickListener = (event: MouseEvent) {\n *   if (isActivationClick(event)) {\n *     this.dispatchActivationClick(this.buttonElement);\n *   }\n * }\n *\n */\nexport function isActivationClick(event: Event) {\n  // Event must start at the event target.\n  if (event.currentTarget !== event.target) {\n    return false;\n  }\n  // Event must not be retargeted from shadowRoot.\n  if (event.composedPath()[0] !== event.target) {\n    return false;\n  }\n  // Target must not be disabled; this should only occur for a synthetically\n  // dispatched click.\n  if ((event.target as EventTarget & {disabled: boolean}).disabled) {\n    return false;\n  }\n  // This is an activation if the event should not be squelched.\n  return !squelchEvent(event);\n}\n\n// TODO(https://bugzilla.mozilla.org/show_bug.cgi?id=1804576)\n//  Remove when Firefox bug is addressed.\nfunction squelchEvent(event: Event) {\n  const squelched = isSquelchingEvents;\n  if (squelched) {\n    event.preventDefault();\n    event.stopImmediatePropagation();\n  }\n  squelchEventsForMicrotask();\n  return squelched;\n}\n\n// Ignore events for one microtask only.\nlet isSquelchingEvents = false;\nasync function squelchEventsForMicrotask() {\n  isSquelchingEvents = true;\n  // Need to pause for just one microtask.\n  // tslint:disable-next-line\n  await null;\n  isSquelchingEvents = false;\n}\n", "/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../focus/md-focus-ring.js';\nimport '../../ripple/ripple.js';\n\nimport {html, isServer, LitElement, nothing} from 'lit';\nimport {property, query, queryAssignedElements} from 'lit/decorators.js';\n\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\nimport {mixinDelegatesAria} from '../../internal/aria/delegate.js';\nimport {\n  FormSubmitter,\n  setupFormSubmitter,\n  type FormSubmitterType,\n} from '../../internal/controller/form-submitter.js';\nimport {\n  dispatchActivationClick,\n  isActivationClick,\n} from '../../internal/events/form-label-activation.js';\nimport {\n  internals,\n  mixinElementInternals,\n} from '../../labs/behaviors/element-internals.js';\n\n// Separate variable needed for closure.\nconst buttonBaseClass = mixinDelegatesAria(mixinElementInternals(LitElement));\n\n/**\n * A button component.\n */\nexport abstract class Button extends buttonBaseClass implements FormSubmitter {\n  static {\n    setupFormSubmitter(Button);\n  }\n\n  /** @nocollapse */\n  static readonly formAssociated = true;\n\n  /** @nocollapse */\n  static override shadowRootOptions: ShadowRootInit = {\n    mode: 'open',\n    delegatesFocus: true,\n  };\n\n  /**\n   * Whether or not the button is disabled.\n   */\n  @property({type: Boolean, reflect: true}) disabled = false;\n\n  /**\n   * Whether or not the button is \"soft-disabled\" (disabled but still\n   * focusable).\n   *\n   * Use this when a button needs increased visibility when disabled. See\n   * https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls\n   * for more guidance on when this is needed.\n   */\n  @property({type: Boolean, attribute: 'soft-disabled', reflect: true})\n  softDisabled = false;\n\n  /**\n   * The URL that the link button points to.\n   */\n  @property() href = '';\n\n  /**\n   * Where to display the linked `href` URL for a link button. Common options\n   * include `_blank` to open in a new tab.\n   */\n  @property() target: '_blank' | '_parent' | '_self' | '_top' | '' = '';\n\n  /**\n   * Whether to render the icon at the inline end of the label rather than the\n   * inline start.\n   *\n   * _Note:_ Link buttons cannot have trailing icons.\n   */\n  @property({type: Boolean, attribute: 'trailing-icon', reflect: true})\n  trailingIcon = false;\n\n  /**\n   * Whether to display the icon or not.\n   */\n  @property({type: Boolean, attribute: 'has-icon', reflect: true}) hasIcon =\n    false;\n\n  /**\n   * The default behavior of the button. May be \"button\", \"reset\", or \"submit\"\n   * (default).\n   */\n  @property() type: FormSubmitterType = 'submit';\n\n  /**\n   * The value added to a form with the button's name when the button submits a\n   * form.\n   */\n  @property({reflect: true}) value = '';\n\n  get name() {\n    return this.getAttribute('name') ?? '';\n  }\n  set name(name: string) {\n    this.setAttribute('name', name);\n  }\n\n  /**\n   * The associated form element with which this element's value will submit.\n   */\n  get form() {\n    return this[internals].form;\n  }\n\n  @query('.button') private readonly buttonElement!: HTMLElement | null;\n\n  @queryAssignedElements({slot: 'icon', flatten: true})\n  private readonly assignedIcons!: HTMLElement[];\n\n  constructor() {\n    super();\n    if (!isServer) {\n      this.addEventListener('click', this.handleClick.bind(this));\n    }\n  }\n\n  override focus() {\n    this.buttonElement?.focus();\n  }\n\n  override blur() {\n    this.buttonElement?.blur();\n  }\n\n  protected override render() {\n    // Link buttons may not be disabled\n    const isRippleDisabled = !this.href && (this.disabled || this.softDisabled);\n    const buttonOrLink = this.href ? this.renderLink() : this.renderButton();\n    // TODO(b/310046938): due to a limitation in focus ring/ripple, we can't use\n    // the same ID for different elements, so we change the ID instead.\n    const buttonId = this.href ? 'link' : 'button';\n    return html`\n      ${this.renderElevationOrOutline?.()}\n      <div class=\"background\"></div>\n      <md-focus-ring part=\"focus-ring\" for=${buttonId}></md-focus-ring>\n      <md-ripple\n        part=\"ripple\"\n        for=${buttonId}\n        ?disabled=\"${isRippleDisabled}\"></md-ripple>\n      ${buttonOrLink}\n    `;\n  }\n\n  // Buttons can override this to add elevation or an outline. Use this and\n  // return `<md-elevation>` (for elevated, filled, and tonal buttons)\n  // or `<div class=\"outline\">` (for outlined buttons).\n  // Text buttons that have neither do not need to implement this.\n  protected renderElevationOrOutline?(): unknown;\n\n  private renderButton() {\n    // Needed for closure conformance\n    const {ariaLabel, ariaHasPopup, ariaExpanded} = this as ARIAMixinStrict;\n    return html`<button\n      id=\"button\"\n      class=\"button\"\n      ?disabled=${this.disabled}\n      aria-disabled=${this.softDisabled || nothing}\n      aria-label=\"${ariaLabel || nothing}\"\n      aria-haspopup=\"${ariaHasPopup || nothing}\"\n      aria-expanded=\"${ariaExpanded || nothing}\">\n      ${this.renderContent()}\n    </button>`;\n  }\n\n  private renderLink() {\n    // Needed for closure conformance\n    const {ariaLabel, ariaHasPopup, ariaExpanded} = this as ARIAMixinStrict;\n    return html`<a\n      id=\"link\"\n      class=\"button\"\n      aria-label=\"${ariaLabel || nothing}\"\n      aria-haspopup=\"${ariaHasPopup || nothing}\"\n      aria-expanded=\"${ariaExpanded || nothing}\"\n      href=${this.href}\n      target=${this.target || nothing}\n      >${this.renderContent()}\n    </a>`;\n  }\n\n  private renderContent() {\n    const icon = html`<slot\n      name=\"icon\"\n      @slotchange=\"${this.handleSlotChange}\"></slot>`;\n\n    return html`\n      <span class=\"touch\"></span>\n      ${this.trailingIcon ? nothing : icon}\n      <span class=\"label\"><slot></slot></span>\n      ${this.trailingIcon ? icon : nothing}\n    `;\n  }\n\n  private handleClick(event: MouseEvent) {\n    // If the button is soft-disabled, we need to explicitly prevent the click\n    // from propagating to other event listeners as well as prevent the default\n    // action.\n    if (!this.href && this.softDisabled) {\n      event.stopImmediatePropagation();\n      event.preventDefault();\n      return;\n    }\n\n    if (!isActivationClick(event) || !this.buttonElement) {\n      return;\n    }\n    this.focus();\n    dispatchActivationClick(this.buttonElement);\n  }\n\n  private handleSlotChange() {\n    this.hasIcon = this.assignedIcons.length > 0;\n  }\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html} from 'lit';\n\nimport {Button} from './button.js';\n\n/**\n * An outlined button component.\n */\nexport class OutlinedButton extends Button {\n  protected override renderElevationOrOutline() {\n    return html`<div class=\"outline\"></div>`;\n  }\n}\n", "/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./button/internal/outlined-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host(:is([disabled],[soft-disabled])) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])) .background{border-color:GrayText}:host(:is([disabled],[soft-disabled])) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)}\n`;\n", "/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./button/internal/shared-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none}\n`;\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {CSSResultOrNative} from 'lit';\nimport {customElement} from 'lit/decorators.js';\n\nimport {OutlinedButton} from './internal/outlined-button.js';\nimport {styles as outlinedStyles} from './internal/outlined-styles.js';\nimport {styles as sharedStyles} from './internal/shared-styles.js';\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'md-outlined-button': MdOutlinedButton;\n  }\n}\n\n/**\n * @summary Buttons help people take action, such as sending an email, sharing a\n * document, or liking a comment.\n *\n * @description\n * __Emphasis:__ Medium emphasis – For important actions that don’t distract\n * from other onscreen elements.\n *\n * __Rationale:__ Use an outlined button for actions that need attention but\n * aren’t the primary action, such as “See all” or “Add to cart.” This is also\n * the button to use for giving someone the opportunity to change their mind or\n * escape a flow.\n *\n * __Example usages:__\n * - Reply\n * - View all\n * - Add to cart\n * - Take out of trash\n *\n * @final\n * @suppress {visibility}\n */\n@customElement('md-outlined-button')\nexport class MdOutlinedButton extends OutlinedButton {\n  static override styles: CSSResultOrNative[] = [sharedStyles, outlinedStyles];\n}\n", "/**\n * @module modules/commit-detail-sk\n * @description <h2><code>commit-detail-sk</code></h2>\n *\n * An element to display information around a single commit.\n *\n */\nimport { html } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { upgradeProperty } from '../../../elements-sk/modules/upgradeProperty';\nimport { diffDate } from '../../../infra-sk/modules/human';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport { Commit, CommitNumber } from '../json';\n\nimport '@material/web/button/outlined-button.js';\n\nexport class CommitDetailSk extends ElementSk {\n  private _cid: Commit;\n\n  constructor() {\n    super(CommitDetailSk.template);\n    this._cid = {\n      author: '',\n      message: '',\n      url: '',\n      ts: 0,\n      hash: '',\n      offset: CommitNumber(0),\n      body: '',\n    };\n  }\n\n  private static template = (ele: CommitDetailSk) => html`\n    <div class=\"linkish\">\n      <pre>\n${ele.cid.hash.slice(0, 8)} - ${ele.cid.author} - ${diffDate(ele.cid.ts * 1000)} - ${ele.cid\n          .message}</pre\n      >\n      <div class=\"tip\">\n        <md-outlined-button @click=${() => ele.openLink(`/g/e/${ele.cid.hash}`)}>\n          Explore\n        </md-outlined-button>\n        <md-outlined-button @click=${() => ele.openLink(`/g/c/${ele.cid.hash}`)}>\n          Cluster\n        </md-outlined-button>\n        <md-outlined-button @click=${() => ele.openLink(`/g/t/${ele.cid.hash}`)}>\n          Triage\n        </md-outlined-button>\n        <md-outlined-button @click=${() => ele.openLink(ele.cid.url)}> Commit </md-outlined-button>\n      </div>\n    </div>\n  `;\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    upgradeProperty(this, 'cid');\n    this._render();\n  }\n\n  private openLink(link: string): void {\n    window.open(link);\n  }\n\n  /** The details about a commit. */\n  get cid(): Commit {\n    return this._cid;\n  }\n\n  set cid(val: Commit) {\n    this._cid = val;\n    this._render();\n  }\n}\n\ndefine('commit-detail-sk', CommitDetailSk);\n", "import './commit-detail-sk';\n", "/**\n * @module modules/commit-detail-panel-sk\n * @description <h2><code>commit-detail-panel-sk</code></h2>\n *\n * @evt commit-selected - Event produced when a commit is selected. The\n *     the event detail contains the serialized cid.CommitDetail and\n *     a simplified description of the commit:\n *\n *     <pre>\n *     {\n *       selected: 2,\n *       description: \"foo (foo@example.org) 62W Commit from foo.\",\n *       commit: {\n *         author: \"foo (foo@example.org)\",\n *         url: \"skia.googlesource.com/bar\",\n *         message: \"Commit from foo.\",\n *         ts: 1439649751,\n *       },\n *     }\n *     </pre>\n *\n * @attr {Boolean} selectable - A boolean attribute that if true means\n *     that the commits are selectable, and when selected\n *     the 'commit-selected' event is generated.\n *\n * @attr {Number} selected - The index of the selected commit.\n */\nimport { html, TemplateResult } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { findParent } from '../../../infra-sk/modules/dom';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport '../commit-detail-sk';\nimport { Commit } from '../json';\n\nexport interface CommitDetailPanelSkCommitSelectedDetails {\n  selected: number;\n  description: string;\n  commit: Commit;\n}\n\nexport class CommitDetailPanelSk extends ElementSk {\n  private _details: Commit[] = [];\n\n  private _hide: boolean = false;\n\n  constructor() {\n    super(CommitDetailPanelSk.template);\n  }\n\n  private static rows = (ele: CommitDetailPanelSk): TemplateResult[] => {\n    if (ele.hide) {\n      return [html``];\n    }\n    return ele._details.map(\n      (item, index) => html`\n        <tr data-id=\"${index}\" ?selected=\"${ele._isSelected(index)}\">\n          <td>\n            <commit-detail-sk .cid=${item}></commit-detail-sk>\n          </td>\n        </tr>\n      `\n    );\n  };\n\n  private static template = (ele: CommitDetailPanelSk) => html`\n    <table @click=${ele._click}>\n      ${CommitDetailPanelSk.rows(ele)}\n    </table>\n  `;\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    this._upgradeProperty('details');\n    this._upgradeProperty('selected');\n    this._upgradeProperty('selectable');\n    this._upgradeProperty('hide');\n    this._render();\n  }\n\n  attributeChangedCallback(_: string, oldValue: string, newValue: string): void {\n    if (oldValue !== newValue) {\n      this._render();\n    }\n  }\n\n  /** An array of serialized cid.CommitDetail. */\n  get details(): Commit[] {\n    return this._details;\n  }\n\n  set details(val: Commit[]) {\n    this._details = val;\n    this._render();\n  }\n\n  private _isSelected(index: number) {\n    return this.selectable && index === this.selected;\n  }\n\n  private _click(e: MouseEvent) {\n    const ele = findParent(e.target as HTMLElement, 'TR');\n    if (!ele) {\n      return;\n    }\n    this.selected = +(ele.dataset.id || '0');\n    if (this.selected > this._details.length - 1) {\n      return;\n    }\n    const commit = this._details[this.selected];\n    const detail = {\n      selected: this.selected,\n      description: `${commit.author} -  ${commit.message}`,\n      commit,\n    };\n    this.dispatchEvent(\n      new CustomEvent<CommitDetailPanelSkCommitSelectedDetails>('commit-selected', {\n        detail,\n        bubbles: true,\n      })\n    );\n  }\n\n  static get observedAttributes(): string[] {\n    return ['selectable', 'selected'];\n  }\n\n  /** Mirrors the selectable attribute. */\n  get selectable(): boolean {\n    return this.hasAttribute('selectable');\n  }\n\n  set selectable(val: boolean) {\n    if (val) {\n      this.setAttribute('selectable', '');\n    } else {\n      this.removeAttribute('selectable');\n    }\n  }\n\n  /** Mirrors the selected attribute. */\n  get selected(): number {\n    if (this.hasAttribute('selected')) {\n      return +this.getAttribute('selected')!;\n    }\n    return -1;\n  }\n\n  set selected(val: number) {\n    this.setAttribute('selected', `${val}`);\n  }\n\n  /** @prop hide - Do not display the commit list if true.  */\n  get hide(): boolean {\n    return this._hide;\n  }\n\n  set hide(val: boolean) {\n    this._hide = val;\n    this._render();\n  }\n}\n\ndefine('commit-detail-panel-sk', CommitDetailPanelSk);\n", "import './commit-detail-panel-sk';\n", "// https://d3js.org/d3-array/ v2.12.1 Copyright 2021 Mike Bostock\n(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\ntypeof define === 'function' && define.amd ? define(['exports'], factory) :\n(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.d3 = global.d3 || {}));\n}(this, (function (exports) { 'use strict';\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n\nfunction bisector(f) {\n  let delta = f;\n  let compare = f;\n\n  if (f.length === 1) {\n    delta = (d, x) => f(d) - x;\n    compare = ascendingComparator(f);\n  }\n\n  function left(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    while (lo < hi) {\n      const mid = (lo + hi) >>> 1;\n      if (compare(a[mid], x) < 0) lo = mid + 1;\n      else hi = mid;\n    }\n    return lo;\n  }\n\n  function right(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    while (lo < hi) {\n      const mid = (lo + hi) >>> 1;\n      if (compare(a[mid], x) > 0) hi = mid;\n      else lo = mid + 1;\n    }\n    return lo;\n  }\n\n  function center(a, x, lo, hi) {\n    if (lo == null) lo = 0;\n    if (hi == null) hi = a.length;\n    const i = left(a, x, lo, hi - 1);\n    return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n  }\n\n  return {left, center, right};\n}\n\nfunction ascendingComparator(f) {\n  return (d, x) => ascending(f(d), x);\n}\n\nfunction number(x) {\n  return x === null ? NaN : +x;\n}\n\nfunction* numbers(values, valueof) {\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  }\n}\n\nconst ascendingBisect = bisector(ascending);\nconst bisectRight = ascendingBisect.right;\nconst bisectLeft = ascendingBisect.left;\nconst bisectCenter = bisector(number).center;\n\nfunction count(values, valueof) {\n  let count = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  }\n  return count;\n}\n\nfunction length$1(array) {\n  return array.length | 0;\n}\n\nfunction empty(length) {\n  return !(length > 0);\n}\n\nfunction arrayify(values) {\n  return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n  return values => reduce(...values);\n}\n\nfunction cross(...values) {\n  const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n  values = values.map(arrayify);\n  const lengths = values.map(length$1);\n  const j = values.length - 1;\n  const index = new Array(j + 1).fill(0);\n  const product = [];\n  if (j < 0 || lengths.some(empty)) return product;\n  while (true) {\n    product.push(index.map((j, i) => values[i][j]));\n    let i = j;\n    while (++index[i] === lengths[i]) {\n      if (i === 0) return reduce ? product.map(reduce) : product;\n      index[i--] = 0;\n    }\n  }\n}\n\nfunction cumsum(values, valueof) {\n  var sum = 0, index = 0;\n  return Float64Array.from(values, valueof === undefined\n    ? v => (sum += +v || 0)\n    : v => (sum += +valueof(v, index++, values) || 0));\n}\n\nfunction descending(a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n\nfunction variance(values, valueof) {\n  let count = 0;\n  let delta;\n  let mean = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n  if (count > 1) return sum / (count - 1);\n}\n\nfunction deviation(values, valueof) {\n  const v = variance(values, valueof);\n  return v ? Math.sqrt(v) : v;\n}\n\nfunction extent(values, valueof) {\n  let min;\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  }\n  return [min, max];\n}\n\n// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nclass Adder {\n  constructor() {\n    this._partials = new Float64Array(32);\n    this._n = 0;\n  }\n  add(x) {\n    const p = this._partials;\n    let i = 0;\n    for (let j = 0; j < this._n && j < 32; j++) {\n      const y = p[j],\n        hi = x + y,\n        lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n      if (lo) p[i++] = lo;\n      x = hi;\n    }\n    p[i] = x;\n    this._n = i + 1;\n    return this;\n  }\n  valueOf() {\n    const p = this._partials;\n    let n = this._n, x, y, lo, hi = 0;\n    if (n > 0) {\n      hi = p[--n];\n      while (n > 0) {\n        x = hi;\n        y = p[--n];\n        hi = x + y;\n        lo = y - (hi - x);\n        if (lo) break;\n      }\n      if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n        y = lo * 2;\n        x = hi + y;\n        if (y == x - hi) hi = x;\n      }\n    }\n    return hi;\n  }\n}\n\nfunction fsum(values, valueof) {\n  const adder = new Adder();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        adder.add(value);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        adder.add(value);\n      }\n    }\n  }\n  return +adder;\n}\n\nfunction fcumsum(values, valueof) {\n  const adder = new Adder();\n  let index = -1;\n  return Float64Array.from(values, valueof === undefined\n      ? v => adder.add(+v || 0)\n      : v => adder.add(+valueof(v, ++index, values) || 0)\n  );\n}\n\nclass InternMap extends Map {\n  constructor(entries, key = keyof) {\n    super();\n    Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n    if (entries != null) for (const [key, value] of entries) this.set(key, value);\n  }\n  get(key) {\n    return super.get(intern_get(this, key));\n  }\n  has(key) {\n    return super.has(intern_get(this, key));\n  }\n  set(key, value) {\n    return super.set(intern_set(this, key), value);\n  }\n  delete(key) {\n    return super.delete(intern_delete(this, key));\n  }\n}\n\nclass InternSet extends Set {\n  constructor(values, key = keyof) {\n    super();\n    Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n    if (values != null) for (const value of values) this.add(value);\n  }\n  has(value) {\n    return super.has(intern_get(this, value));\n  }\n  add(value) {\n    return super.add(intern_set(this, value));\n  }\n  delete(value) {\n    return super.delete(intern_delete(this, value));\n  }\n}\n\nfunction intern_get({_intern, _key}, value) {\n  const key = _key(value);\n  return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n  const key = _key(value);\n  if (_intern.has(key)) return _intern.get(key);\n  _intern.set(key, value);\n  return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n  const key = _key(value);\n  if (_intern.has(key)) {\n    value = _intern.get(value);\n    _intern.delete(key);\n  }\n  return value;\n}\n\nfunction keyof(value) {\n  return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n\nfunction identity(x) {\n  return x;\n}\n\nfunction group(values, ...keys) {\n  return nest(values, identity, identity, keys);\n}\n\nfunction groups(values, ...keys) {\n  return nest(values, Array.from, identity, keys);\n}\n\nfunction rollup(values, reduce, ...keys) {\n  return nest(values, identity, reduce, keys);\n}\n\nfunction rollups(values, reduce, ...keys) {\n  return nest(values, Array.from, reduce, keys);\n}\n\nfunction index(values, ...keys) {\n  return nest(values, identity, unique, keys);\n}\n\nfunction indexes(values, ...keys) {\n  return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n  if (values.length !== 1) throw new Error(\"duplicate key\");\n  return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n  return (function regroup(values, i) {\n    if (i >= keys.length) return reduce(values);\n    const groups = new InternMap();\n    const keyof = keys[i++];\n    let index = -1;\n    for (const value of values) {\n      const key = keyof(value, ++index, values);\n      const group = groups.get(key);\n      if (group) group.push(value);\n      else groups.set(key, [value]);\n    }\n    for (const [key, values] of groups) {\n      groups.set(key, regroup(values, i));\n    }\n    return map(groups);\n  })(values, 0);\n}\n\nfunction permute(source, keys) {\n  return Array.from(keys, key => source[key]);\n}\n\nfunction sort(values, ...F) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  values = Array.from(values);\n  let [f = ascending] = F;\n  if (f.length === 1 || F.length > 1) {\n    const index = Uint32Array.from(values, (d, i) => i);\n    if (F.length > 1) {\n      F = F.map(f => values.map(f));\n      index.sort((i, j) => {\n        for (const f of F) {\n          const c = ascending(f[i], f[j]);\n          if (c) return c;\n        }\n      });\n    } else {\n      f = values.map(f);\n      index.sort((i, j) => ascending(f[i], f[j]));\n    }\n    return permute(values, index);\n  }\n  return values.sort(f);\n}\n\nfunction groupSort(values, reduce, key) {\n  return (reduce.length === 1\n    ? sort(rollup(values, reduce, key), (([ak, av], [bk, bv]) => ascending(av, bv) || ascending(ak, bk)))\n    : sort(group(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || ascending(ak, bk))))\n    .map(([key]) => key);\n}\n\nvar array = Array.prototype;\n\nvar slice = array.slice;\n\nfunction constant(x) {\n  return function() {\n    return x;\n  };\n}\n\nvar e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\nfunction ticks(start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n    if (r0 * step < start) ++r0;\n    if (r1 * step > stop) --r1;\n    ticks = new Array(n = r1 - r0 + 1);\n    while (++i < n) ticks[i] = (r0 + i) * step;\n  } else {\n    step = -step;\n    let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n    if (r0 / step < start) ++r0;\n    if (r1 / step > stop) --r1;\n    ticks = new Array(n = r1 - r0 + 1);\n    while (++i < n) ticks[i] = (r0 + i) / step;\n  }\n\n  if (reverse) ticks.reverse();\n\n  return ticks;\n}\n\nfunction tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0\n      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nfunction tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;\n  else if (error >= e5) step1 *= 5;\n  else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}\n\nfunction nice(start, stop, count) {\n  let prestep;\n  while (true) {\n    const step = tickIncrement(start, stop, count);\n    if (step === prestep || step === 0 || !isFinite(step)) {\n      return [start, stop];\n    } else if (step > 0) {\n      start = Math.floor(start / step) * step;\n      stop = Math.ceil(stop / step) * step;\n    } else if (step < 0) {\n      start = Math.ceil(start * step) / step;\n      stop = Math.floor(stop * step) / step;\n    }\n    prestep = step;\n  }\n}\n\nfunction sturges(values) {\n  return Math.ceil(Math.log(count(values)) / Math.LN2) + 1;\n}\n\nfunction bin() {\n  var value = identity,\n      domain = extent,\n      threshold = sturges;\n\n  function histogram(data) {\n    if (!Array.isArray(data)) data = Array.from(data);\n\n    var i,\n        n = data.length,\n        x,\n        values = new Array(n);\n\n    for (i = 0; i < n; ++i) {\n      values[i] = value(data[i], i, data);\n    }\n\n    var xz = domain(values),\n        x0 = xz[0],\n        x1 = xz[1],\n        tz = threshold(values, x0, x1);\n\n    // Convert number of thresholds into uniform thresholds, and nice the\n    // default domain accordingly.\n    if (!Array.isArray(tz)) {\n      const max = x1, tn = +tz;\n      if (domain === extent) [x0, x1] = nice(x0, x1, tn);\n      tz = ticks(x0, x1, tn);\n\n      // If the last threshold is coincident with the domain\u2019s upper bound, the\n      // last bin will be zero-width. If the default domain is used, and this\n      // last threshold is coincident with the maximum input value, we can\n      // extend the niced upper bound by one tick to ensure uniform bin widths;\n      // otherwise, we simply remove the last threshold. Note that we don\u2019t\n      // coerce values or the domain to numbers, and thus must be careful to\n      // compare order (>=) rather than strict equality (===)!\n      if (tz[tz.length - 1] >= x1) {\n        if (max >= x1 && domain === extent) {\n          const step = tickIncrement(x0, x1, tn);\n          if (isFinite(step)) {\n            if (step > 0) {\n              x1 = (Math.floor(x1 / step) + 1) * step;\n            } else if (step < 0) {\n              x1 = (Math.ceil(x1 * -step) + 1) / -step;\n            }\n          }\n        } else {\n          tz.pop();\n        }\n      }\n    }\n\n    // Remove any thresholds outside the domain.\n    var m = tz.length;\n    while (tz[0] <= x0) tz.shift(), --m;\n    while (tz[m - 1] > x1) tz.pop(), --m;\n\n    var bins = new Array(m + 1),\n        bin;\n\n    // Initialize bins.\n    for (i = 0; i <= m; ++i) {\n      bin = bins[i] = [];\n      bin.x0 = i > 0 ? tz[i - 1] : x0;\n      bin.x1 = i < m ? tz[i] : x1;\n    }\n\n    // Assign data to bins by value, ignoring any outside the domain.\n    for (i = 0; i < n; ++i) {\n      x = values[i];\n      if (x0 <= x && x <= x1) {\n        bins[bisectRight(tz, x, 0, m)].push(data[i]);\n      }\n    }\n\n    return bins;\n  }\n\n  histogram.value = function(_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(_), histogram) : value;\n  };\n\n  histogram.domain = function(_) {\n    return arguments.length ? (domain = typeof _ === \"function\" ? _ : constant([_[0], _[1]]), histogram) : domain;\n  };\n\n  histogram.thresholds = function(_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold;\n  };\n\n  return histogram;\n}\n\nfunction max(values, valueof) {\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  }\n  return max;\n}\n\nfunction min(values, valueof) {\n  let min;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  }\n  return min;\n}\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nfunction quickselect(array, k, left = 0, right = array.length - 1, compare = ascending) {\n  while (right > left) {\n    if (right - left > 600) {\n      const n = right - left + 1;\n      const m = k - left + 1;\n      const z = Math.log(n);\n      const s = 0.5 * Math.exp(2 * z / 3);\n      const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n      const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n      const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n      quickselect(array, k, newLeft, newRight, compare);\n    }\n\n    const t = array[k];\n    let i = left;\n    let j = right;\n\n    swap(array, left, k);\n    if (compare(array[right], t) > 0) swap(array, left, right);\n\n    while (i < j) {\n      swap(array, i, j), ++i, --j;\n      while (compare(array[i], t) < 0) ++i;\n      while (compare(array[j], t) > 0) --j;\n    }\n\n    if (compare(array[left], t) === 0) swap(array, left, j);\n    else ++j, swap(array, j, right);\n\n    if (j <= k) left = j + 1;\n    if (k <= j) right = j - 1;\n  }\n  return array;\n}\n\nfunction swap(array, i, j) {\n  const t = array[i];\n  array[i] = array[j];\n  array[j] = t;\n}\n\nfunction quantile(values, p, valueof) {\n  values = Float64Array.from(numbers(values, valueof));\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return min(values);\n  if (p >= 1) return max(values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n      value1 = min(values.subarray(i0 + 1));\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nfunction quantileSorted(values, p, valueof = number) {\n  if (!(n = values.length)) return;\n  if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nfunction freedmanDiaconis(values, min, max) {\n  return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(count(values), -1 / 3)));\n}\n\nfunction scott(values, min, max) {\n  return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(count(values), -1 / 3)));\n}\n\nfunction maxIndex(values, valueof) {\n  let max;\n  let maxIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  }\n  return maxIndex;\n}\n\nfunction mean(values, valueof) {\n  let count = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  }\n  if (count) return sum / count;\n}\n\nfunction median(values, valueof) {\n  return quantile(values, 0.5, valueof);\n}\n\nfunction* flatten(arrays) {\n  for (const array of arrays) {\n    yield* array;\n  }\n}\n\nfunction merge(arrays) {\n  return Array.from(flatten(arrays));\n}\n\nfunction minIndex(values, valueof) {\n  let min;\n  let minIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  }\n  return minIndex;\n}\n\nfunction pairs(values, pairof = pair) {\n  const pairs = [];\n  let previous;\n  let first = false;\n  for (const value of values) {\n    if (first) pairs.push(pairof(previous, value));\n    previous = value;\n    first = true;\n  }\n  return pairs;\n}\n\nfunction pair(a, b) {\n  return [a, b];\n}\n\nfunction range(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n}\n\nfunction least(values, compare = ascending) {\n  let min;\n  let defined = false;\n  if (compare.length === 1) {\n    let minValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? ascending(value, minValue) < 0\n          : ascending(value, value) === 0) {\n        min = element;\n        minValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, min) < 0\n          : compare(value, value) === 0) {\n        min = value;\n        defined = true;\n      }\n    }\n  }\n  return min;\n}\n\nfunction leastIndex(values, compare = ascending) {\n  if (compare.length === 1) return minIndex(values, compare);\n  let minValue;\n  let min = -1;\n  let index = -1;\n  for (const value of values) {\n    ++index;\n    if (min < 0\n        ? compare(value, value) === 0\n        : compare(value, minValue) < 0) {\n      minValue = value;\n      min = index;\n    }\n  }\n  return min;\n}\n\nfunction greatest(values, compare = ascending) {\n  let max;\n  let defined = false;\n  if (compare.length === 1) {\n    let maxValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? ascending(value, maxValue) > 0\n          : ascending(value, value) === 0) {\n        max = element;\n        maxValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, max) > 0\n          : compare(value, value) === 0) {\n        max = value;\n        defined = true;\n      }\n    }\n  }\n  return max;\n}\n\nfunction greatestIndex(values, compare = ascending) {\n  if (compare.length === 1) return maxIndex(values, compare);\n  let maxValue;\n  let max = -1;\n  let index = -1;\n  for (const value of values) {\n    ++index;\n    if (max < 0\n        ? compare(value, value) === 0\n        : compare(value, maxValue) > 0) {\n      maxValue = value;\n      max = index;\n    }\n  }\n  return max;\n}\n\nfunction scan(values, compare) {\n  const index = leastIndex(values, compare);\n  return index < 0 ? undefined : index;\n}\n\nvar shuffle = shuffler(Math.random);\n\nfunction shuffler(random) {\n  return function shuffle(array, i0 = 0, i1 = array.length) {\n    let m = i1 - (i0 = +i0);\n    while (m) {\n      const i = random() * m-- | 0, t = array[m + i0];\n      array[m + i0] = array[i + i0];\n      array[i + i0] = t;\n    }\n    return array;\n  };\n}\n\nfunction sum(values, valueof) {\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        sum += value;\n      }\n    }\n  }\n  return sum;\n}\n\nfunction transpose(matrix) {\n  if (!(n = matrix.length)) return [];\n  for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) {\n    for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n      row[j] = matrix[j][i];\n    }\n  }\n  return transpose;\n}\n\nfunction length(d) {\n  return d.length;\n}\n\nfunction zip() {\n  return transpose(arguments);\n}\n\nfunction every(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  let index = -1;\n  for (const value of values) {\n    if (!test(value, ++index, values)) {\n      return false;\n    }\n  }\n  return true;\n}\n\nfunction some(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  let index = -1;\n  for (const value of values) {\n    if (test(value, ++index, values)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nfunction filter(values, test) {\n  if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n  const array = [];\n  let index = -1;\n  for (const value of values) {\n    if (test(value, ++index, values)) {\n      array.push(value);\n    }\n  }\n  return array;\n}\n\nfunction map(values, mapper) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  if (typeof mapper !== \"function\") throw new TypeError(\"mapper is not a function\");\n  return Array.from(values, (value, index) => mapper(value, index, values));\n}\n\nfunction reduce(values, reducer, value) {\n  if (typeof reducer !== \"function\") throw new TypeError(\"reducer is not a function\");\n  const iterator = values[Symbol.iterator]();\n  let done, next, index = -1;\n  if (arguments.length < 3) {\n    ({done, value} = iterator.next());\n    if (done) return;\n    ++index;\n  }\n  while (({done, value: next} = iterator.next()), !done) {\n    value = reducer(value, next, ++index, values);\n  }\n  return value;\n}\n\nfunction reverse(values) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  return Array.from(values).reverse();\n}\n\nfunction difference(values, ...others) {\n  values = new Set(values);\n  for (const other of others) {\n    for (const value of other) {\n      values.delete(value);\n    }\n  }\n  return values;\n}\n\nfunction disjoint(values, other) {\n  const iterator = other[Symbol.iterator](), set = new Set();\n  for (const v of values) {\n    if (set.has(v)) return false;\n    let value, done;\n    while (({value, done} = iterator.next())) {\n      if (done) break;\n      if (Object.is(v, value)) return false;\n      set.add(value);\n    }\n  }\n  return true;\n}\n\nfunction set(values) {\n  return values instanceof Set ? values : new Set(values);\n}\n\nfunction intersection(values, ...others) {\n  values = new Set(values);\n  others = others.map(set);\n  out: for (const value of values) {\n    for (const other of others) {\n      if (!other.has(value)) {\n        values.delete(value);\n        continue out;\n      }\n    }\n  }\n  return values;\n}\n\nfunction superset(values, other) {\n  const iterator = values[Symbol.iterator](), set = new Set();\n  for (const o of other) {\n    if (set.has(o)) continue;\n    let value, done;\n    while (({value, done} = iterator.next())) {\n      if (done) return false;\n      set.add(value);\n      if (Object.is(o, value)) break;\n    }\n  }\n  return true;\n}\n\nfunction subset(values, other) {\n  return superset(other, values);\n}\n\nfunction union(...others) {\n  const set = new Set();\n  for (const other of others) {\n    for (const o of other) {\n      set.add(o);\n    }\n  }\n  return set;\n}\n\nexports.Adder = Adder;\nexports.InternMap = InternMap;\nexports.InternSet = InternSet;\nexports.ascending = ascending;\nexports.bin = bin;\nexports.bisect = bisectRight;\nexports.bisectCenter = bisectCenter;\nexports.bisectLeft = bisectLeft;\nexports.bisectRight = bisectRight;\nexports.bisector = bisector;\nexports.count = count;\nexports.cross = cross;\nexports.cumsum = cumsum;\nexports.descending = descending;\nexports.deviation = deviation;\nexports.difference = difference;\nexports.disjoint = disjoint;\nexports.every = every;\nexports.extent = extent;\nexports.fcumsum = fcumsum;\nexports.filter = filter;\nexports.fsum = fsum;\nexports.greatest = greatest;\nexports.greatestIndex = greatestIndex;\nexports.group = group;\nexports.groupSort = groupSort;\nexports.groups = groups;\nexports.histogram = bin;\nexports.index = index;\nexports.indexes = indexes;\nexports.intersection = intersection;\nexports.least = least;\nexports.leastIndex = leastIndex;\nexports.map = map;\nexports.max = max;\nexports.maxIndex = maxIndex;\nexports.mean = mean;\nexports.median = median;\nexports.merge = merge;\nexports.min = min;\nexports.minIndex = minIndex;\nexports.nice = nice;\nexports.pairs = pairs;\nexports.permute = permute;\nexports.quantile = quantile;\nexports.quantileSorted = quantileSorted;\nexports.quickselect = quickselect;\nexports.range = range;\nexports.reduce = reduce;\nexports.reverse = reverse;\nexports.rollup = rollup;\nexports.rollups = rollups;\nexports.scan = scan;\nexports.shuffle = shuffle;\nexports.shuffler = shuffler;\nexports.some = some;\nexports.sort = sort;\nexports.subset = subset;\nexports.sum = sum;\nexports.superset = superset;\nexports.thresholdFreedmanDiaconis = freedmanDiaconis;\nexports.thresholdScott = scott;\nexports.thresholdSturges = sturges;\nexports.tickIncrement = tickIncrement;\nexports.tickStep = tickStep;\nexports.ticks = ticks;\nexports.transpose = transpose;\nexports.union = union;\nexports.variance = variance;\nexports.zip = zip;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n", "export function initRange(domain, range) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: this.range(domain); break;\n    default: this.range(range).domain(domain); break;\n  }\n  return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: {\n      if (typeof domain === \"function\") this.interpolator(domain);\n      else this.range(domain);\n      break;\n    }\n    default: {\n      this.domain(domain);\n      if (typeof interpolator === \"function\") this.interpolator(interpolator);\n      else this.range(interpolator);\n      break;\n    }\n  }\n  return this;\n}\n", "import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n  var index = new InternMap(),\n      domain = [],\n      range = [],\n      unknown = implicit;\n\n  function scale(d) {\n    let i = index.get(d);\n    if (i === undefined) {\n      if (unknown !== implicit) return unknown;\n      index.set(d, i = domain.push(d) - 1);\n    }\n    return range[i % range.length];\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [], index = new InternMap();\n    for (const value of _) {\n      if (index.has(value)) continue;\n      index.set(value, domain.push(value) - 1);\n    }\n    return scale;\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), scale) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return ordinal(domain, range).unknown(unknown);\n  };\n\n  initRange.apply(scale, arguments);\n\n  return scale;\n}\n", "import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\n\nexport default function band() {\n  var scale = ordinal().unknown(undefined),\n      domain = scale.domain,\n      ordinalRange = scale.range,\n      r0 = 0,\n      r1 = 1,\n      step,\n      bandwidth,\n      round = false,\n      paddingInner = 0,\n      paddingOuter = 0,\n      align = 0.5;\n\n  delete scale.unknown;\n\n  function rescale() {\n    var n = domain().length,\n        reverse = r1 < r0,\n        start = reverse ? r1 : r0,\n        stop = reverse ? r0 : r1;\n    step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n    if (round) step = Math.floor(step);\n    start += (stop - start - step * (n - paddingInner)) * align;\n    bandwidth = step * (1 - paddingInner);\n    if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n    var values = sequence(n).map(function(i) { return start + step * i; });\n    return ordinalRange(reverse ? values.reverse() : values);\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n  };\n\n  scale.rangeRound = function(_) {\n    return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n  };\n\n  scale.bandwidth = function() {\n    return bandwidth;\n  };\n\n  scale.step = function() {\n    return step;\n  };\n\n  scale.round = function(_) {\n    return arguments.length ? (round = !!_, rescale()) : round;\n  };\n\n  scale.padding = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n  };\n\n  scale.paddingInner = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n  };\n\n  scale.paddingOuter = function(_) {\n    return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n  };\n\n  scale.align = function(_) {\n    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n  };\n\n  scale.copy = function() {\n    return band(domain(), [r0, r1])\n        .round(round)\n        .paddingInner(paddingInner)\n        .paddingOuter(paddingOuter)\n        .align(align);\n  };\n\n  return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n  var copy = scale.copy;\n\n  scale.padding = scale.paddingOuter;\n  delete scale.paddingInner;\n  delete scale.paddingOuter;\n\n  scale.copy = function() {\n    return pointish(copy());\n  };\n\n  return scale;\n}\n\nexport function point() {\n  return pointish(band.apply(null, arguments).paddingInner(1));\n}\n", "export default function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n", "import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n    reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n    reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n    reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n    reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n    reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n  copy(channels) {\n    return Object.assign(new this.constructor, this, channels);\n  },\n  displayable() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHex8: color_formatHex8,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n  return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n      : null) // invalid hex\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb() {\n    return this;\n  },\n  clamp() {\n    return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n  },\n  displayable() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatHex8: rgb_formatHex8,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n  return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n  const a = clampa(this.opacity);\n  return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n  return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n  return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n  value = clampi(value);\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  clamp() {\n    return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n  },\n  displayable() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  formatHsl() {\n    const a = clampa(this.opacity);\n    return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n  }\n}));\n\nfunction clamph(value) {\n  value = (value || 0) % 360;\n  return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n  return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n", "export {default as color, rgb, hsl} from \"./color.js\";\nexport {default as lab, hcl, lch, gray} from \"./lab.js\";\nexport {default as cubehelix} from \"./cubehelix.js\";\n", "export function basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\nexport default function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n", "import {basis} from \"./basis.js\";\n\nexport default function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n", "export default x => () => x;\n", "import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nexport function hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n  };\n}\n\nexport default function nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n", "import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n  var color = gamma(y);\n\n  function rgb(start, end) {\n    var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = nogamma(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = colorRgb(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n", "export default function(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n}\n\nexport function isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n", "import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n  return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n", "export default function(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n}\n", "export default function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n}\n", "import value from \"./value.js\";\n\nexport default function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = value(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n}\n", "import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\nexport default function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: number(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n}\n", "import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? constant(b)\n      : (t === \"number\" ? number\n      : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n      : b instanceof color ? rgb\n      : b instanceof Date ? date\n      : isNumberArray(b) ? numberArray\n      : Array.isArray(b) ? genericArray\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n      : number)(a, b);\n}\n", "export default function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n}\n", "import {default as value} from \"./value.js\";\n\nexport default function piecewise(interpolate, values) {\n  if (values === undefined) values = interpolate, interpolate = value;\n  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n  while (i < n) I[i] = interpolate(v, v = values[++i]);\n  return function(t) {\n    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n    return I[i](t - i);\n  };\n}\n", "export {default as interpolate} from \"./value.js\";\nexport {default as interpolateArray} from \"./array.js\";\nexport {default as interpolateBasis} from \"./basis.js\";\nexport {default as interpolateBasisClosed} from \"./basisClosed.js\";\nexport {default as interpolateDate} from \"./date.js\";\nexport {default as interpolateDiscrete} from \"./discrete.js\";\nexport {default as interpolateHue} from \"./hue.js\";\nexport {default as interpolateNumber} from \"./number.js\";\nexport {default as interpolateNumberArray} from \"./numberArray.js\";\nexport {default as interpolateObject} from \"./object.js\";\nexport {default as interpolateRound} from \"./round.js\";\nexport {default as interpolateString} from \"./string.js\";\nexport {interpolateTransformCss, interpolateTransformSvg} from \"./transform/index.js\";\nexport {default as interpolateZoom} from \"./zoom.js\";\nexport {default as interpolateRgb, rgbBasis as interpolateRgbBasis, rgbBasisClosed as interpolateRgbBasisClosed} from \"./rgb.js\";\nexport {default as interpolateHsl, hslLong as interpolateHslLong} from \"./hsl.js\";\nexport {default as interpolateLab} from \"./lab.js\";\nexport {default as interpolateHcl, hclLong as interpolateHclLong} from \"./hcl.js\";\nexport {default as interpolateCubehelix, cubehelixLong as interpolateCubehelixLong} from \"./cubehelix.js\";\nexport {default as piecewise} from \"./piecewise.js\";\nexport {default as quantize} from \"./quantize.js\";\n", "export default function constants(x) {\n  return function() {\n    return x;\n  };\n}\n", "export default function number(x) {\n  return +x;\n}\n", "import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n  return x;\n}\n\nfunction normalize(a, b) {\n  return (b -= (a = +a))\n      ? function(x) { return (x - a) / b; }\n      : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n  var t;\n  if (a > b) t = a, a = b, b = t;\n  return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n  if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n  else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n  return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1;\n\n  // Reverse descending domains.\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = normalize(domain[i], domain[i + 1]);\n    r[i] = interpolate(range[i], range[i + 1]);\n  }\n\n  return function(x) {\n    var i = bisect(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .range(source.range())\n      .interpolate(source.interpolate())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nexport function transformer() {\n  var domain = unit,\n      range = unit,\n      interpolate = interpolateValue,\n      transform,\n      untransform,\n      unknown,\n      clamp = identity,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    var n = Math.min(domain.length, range.length);\n    if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n    piecewise = n > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n  }\n\n  scale.invert = function(y) {\n    return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = Array.from(_), interpolate = interpolateRound, rescale();\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n  };\n\n  scale.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, rescale()) : interpolate;\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t, u) {\n    transform = t, untransform = u;\n    return rescale();\n  };\n}\n\nexport default function continuous() {\n  return transformer()(identity, identity);\n}\n", "export default function(x) {\n  return Math.abs(x = Math.round(x)) >= 1e21\n      ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n      : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, \u00B1Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n  return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n", "export default function(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n}\n", "export default function(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n}\n", "// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n  var match;\n  return new FormatSpecifier({\n    fill: match[1],\n    align: match[2],\n    sign: match[3],\n    symbol: match[4],\n    zero: match[5],\n    width: match[6],\n    comma: match[7],\n    precision: match[8] && match[8].slice(1),\n    trim: match[9],\n    type: match[10]\n  });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n  this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n  this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n  this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n  this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n  this.zero = !!specifier.zero;\n  this.width = specifier.width === undefined ? undefined : +specifier.width;\n  this.comma = !!specifier.comma;\n  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n  this.trim = !!specifier.trim;\n  this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + (this.trim ? \"~\" : \"\")\n      + this.type;\n};\n", "// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (s[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n    }\n  }\n  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n  var d = formatDecimalParts(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n  var d = formatDecimalParts(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n", "import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n  \"%\": (x, p) => (x * 100).toFixed(p),\n  \"b\": (x) => Math.round(x).toString(2),\n  \"c\": (x) => x + \"\",\n  \"d\": formatDecimal,\n  \"e\": (x, p) => x.toExponential(p),\n  \"f\": (x, p) => x.toFixed(p),\n  \"g\": (x, p) => x.toPrecision(p),\n  \"o\": (x) => Math.round(x).toString(8),\n  \"p\": (x, p) => formatRounded(x * 100, p),\n  \"r\": formatRounded,\n  \"s\": formatPrefixAuto,\n  \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n  \"x\": (x) => Math.round(x).toString(16)\n};\n", "export default function(x) {\n  return x;\n}\n", "import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n    prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\u00B5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n  var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n      currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n      currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n      decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n      numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n      percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n      minus = locale.minus === undefined ? \"\u2212\" : locale.minus + \"\",\n      nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n  function newFormat(specifier) {\n    specifier = formatSpecifier(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        trim = specifier.trim,\n        type = specifier.type;\n\n    // The \"n\" type is an alias for \",g\".\n    if (type === \"n\") comma = true, type = \"g\";\n\n    // The \"\" type, and any invalid type, is an alias for \".12~g\".\n    else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n    // If zero fill is specified, padding goes after sign and before digits.\n    if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = formatTypes[type],\n        maybeSuffix = /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision === undefined ? 6\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n        var valueNegative = value < 0 || 1 / value < 0;\n\n        // Perform the initial formatting.\n        value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n        // Trim insignificant zeros.\n        if (trim) value = formatTrim(value);\n\n        // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n        if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer \u201Cvalue\u201D part that can be\n        // grouped, and fractional or exponential \u201Csuffix\u201D part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step) {\n  return Math.max(0, -exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n", "export {default as formatDefaultLocale, format, formatPrefix} from \"./defaultLocale.js\";\nexport {default as formatLocale} from \"./locale.js\";\nexport {default as formatSpecifier, FormatSpecifier} from \"./formatSpecifier.js\";\nexport {default as precisionFixed} from \"./precisionFixed.js\";\nexport {default as precisionPrefix} from \"./precisionPrefix.js\";\nexport {default as precisionRound} from \"./precisionRound.js\";\n", "import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n  var step = tickStep(start, stop, count),\n      precision;\n  specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n  switch (specifier.type) {\n    case \"s\": {\n      var value = Math.max(Math.abs(start), Math.abs(stop));\n      if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n      return formatPrefix(specifier, value);\n    }\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\": {\n      if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n      break;\n    }\n    case \"f\":\n    case \"%\": {\n      if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n      break;\n    }\n  }\n  return format(specifier);\n}\n", "import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function(count) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    var d = domain();\n    return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n  };\n\n  scale.nice = function(count) {\n    if (count == null) count = 10;\n\n    var d = domain();\n    var i0 = 0;\n    var i1 = d.length - 1;\n    var start = d[i0];\n    var stop = d[i1];\n    var prestep;\n    var step;\n    var maxIter = 10;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n    \n    while (maxIter-- > 0) {\n      step = tickIncrement(start, stop, count);\n      if (step === prestep) {\n        d[i0] = start\n        d[i1] = stop\n        return domain(d);\n      } else if (step > 0) {\n        start = Math.floor(start / step) * step;\n        stop = Math.ceil(stop / step) * step;\n      } else if (step < 0) {\n        start = Math.ceil(start * step) / step;\n        stop = Math.floor(stop * step) / step;\n      } else {\n        break;\n      }\n      prestep = step;\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\n\nexport default function linear() {\n  var scale = continuous();\n\n  scale.copy = function() {\n    return copy(scale, linear());\n  };\n\n  initRange.apply(scale, arguments);\n\n  return linearish(scale);\n}\n", "import {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nexport default function identity(domain) {\n  var unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : x;\n  }\n\n  scale.invert = scale;\n\n  scale.domain = scale.range = function(_) {\n    return arguments.length ? (domain = Array.from(_, number), scale) : domain.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return identity(domain).unknown(unknown);\n  };\n\n  domain = arguments.length ? Array.from(domain, number) : [0, 1];\n\n  return linearish(scale);\n}\n", "export default function nice(domain, interval) {\n  domain = domain.slice();\n\n  var i0 = 0,\n      i1 = domain.length - 1,\n      x0 = domain[i0],\n      x1 = domain[i1],\n      t;\n\n  if (x1 < x0) {\n    t = i0, i0 = i1, i1 = t;\n    t = x0, x0 = x1, x1 = t;\n  }\n\n  domain[i0] = interval.floor(x0);\n  domain[i1] = interval.ceil(x1);\n  return domain;\n}\n", "import {ticks} from \"d3-array\";\nimport {format, formatSpecifier} from \"d3-format\";\nimport nice from \"./nice.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformLog(x) {\n  return Math.log(x);\n}\n\nfunction transformExp(x) {\n  return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n  return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n  return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n  return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n  return base === 10 ? pow10\n      : base === Math.E ? Math.exp\n      : x => Math.pow(base, x);\n}\n\nfunction logp(base) {\n  return base === Math.E ? Math.log\n      : base === 10 && Math.log10\n      || base === 2 && Math.log2\n      || (base = Math.log(base), x => Math.log(x) / base);\n}\n\nfunction reflect(f) {\n  return (x, k) => -f(-x, k);\n}\n\nexport function loggish(transform) {\n  const scale = transform(transformLog, transformExp);\n  const domain = scale.domain;\n  let base = 10;\n  let logs;\n  let pows;\n\n  function rescale() {\n    logs = logp(base), pows = powp(base);\n    if (domain()[0] < 0) {\n      logs = reflect(logs), pows = reflect(pows);\n      transform(transformLogn, transformExpn);\n    } else {\n      transform(transformLog, transformExp);\n    }\n    return scale;\n  }\n\n  scale.base = function(_) {\n    return arguments.length ? (base = +_, rescale()) : base;\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.ticks = count => {\n    const d = domain();\n    let u = d[0];\n    let v = d[d.length - 1];\n    const r = v < u;\n\n    if (r) ([u, v] = [v, u]);\n\n    let i = logs(u);\n    let j = logs(v);\n    let k;\n    let t;\n    const n = count == null ? 10 : +count;\n    let z = [];\n\n    if (!(base % 1) && j - i < n) {\n      i = Math.floor(i), j = Math.ceil(j);\n      if (u > 0) for (; i <= j; ++i) {\n        for (k = 1; k < base; ++k) {\n          t = i < 0 ? k / pows(-i) : k * pows(i);\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      } else for (; i <= j; ++i) {\n        for (k = base - 1; k >= 1; --k) {\n          t = i > 0 ? k / pows(-i) : k * pows(i);\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      }\n      if (z.length * 2 < n) z = ticks(u, v, n);\n    } else {\n      z = ticks(i, j, Math.min(j - i, n)).map(pows);\n    }\n    return r ? z.reverse() : z;\n  };\n\n  scale.tickFormat = (count, specifier) => {\n    if (count == null) count = 10;\n    if (specifier == null) specifier = base === 10 ? \"s\" : \",\";\n    if (typeof specifier !== \"function\") {\n      if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;\n      specifier = format(specifier);\n    }\n    if (count === Infinity) return specifier;\n    const k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n    return d => {\n      let i = d / pows(Math.round(logs(d)));\n      if (i * base < base - 0.5) i *= base;\n      return i <= k ? specifier(d) : \"\";\n    };\n  };\n\n  scale.nice = () => {\n    return domain(nice(domain(), {\n      floor: x => pows(Math.floor(logs(x))),\n      ceil: x => pows(Math.ceil(logs(x)))\n    }));\n  };\n\n  return scale;\n}\n\nexport default function log() {\n  const scale = loggish(transformer()).domain([1, 10]);\n  scale.copy = () => copy(scale, log()).base(scale.base());\n  initRange.apply(scale, arguments);\n  return scale;\n}\n", "import {linearish} from \"./linear.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformSymlog(c) {\n  return function(x) {\n    return Math.sign(x) * Math.log1p(Math.abs(x / c));\n  };\n}\n\nfunction transformSymexp(c) {\n  return function(x) {\n    return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n  };\n}\n\nexport function symlogish(transform) {\n  var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n  scale.constant = function(_) {\n    return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n  };\n\n  return linearish(scale);\n}\n\nexport default function symlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, symlog()).constant(scale.constant());\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "import {linearish} from \"./linear.js\";\nimport {copy, identity, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformPow(exponent) {\n  return function(x) {\n    return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n  };\n}\n\nfunction transformSqrt(x) {\n  return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n  return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n  var scale = transform(identity, identity),\n      exponent = 1;\n\n  function rescale() {\n    return exponent === 1 ? transform(identity, identity)\n        : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n        : transform(transformPow(exponent), transformPow(1 / exponent));\n  }\n\n  scale.exponent = function(_) {\n    return arguments.length ? (exponent = +_, rescale()) : exponent;\n  };\n\n  return linearish(scale);\n}\n\nexport default function pow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, pow()).exponent(scale.exponent());\n  };\n\n  initRange.apply(scale, arguments);\n\n  return scale;\n}\n\nexport function sqrt() {\n  return pow.apply(null, arguments).exponent(0.5);\n}\n", "import continuous from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nfunction square(x) {\n  return Math.sign(x) * x * x;\n}\n\nfunction unsquare(x) {\n  return Math.sign(x) * Math.sqrt(Math.abs(x));\n}\n\nexport default function radial() {\n  var squared = continuous(),\n      range = [0, 1],\n      round = false,\n      unknown;\n\n  function scale(x) {\n    var y = unsquare(squared(x));\n    return isNaN(y) ? unknown : round ? Math.round(y) : y;\n  }\n\n  scale.invert = function(y) {\n    return squared.invert(square(y));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (squared.domain(_), scale) : squared.domain();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (squared.range((range = Array.from(_, number)).map(square)), scale) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return scale.range(_).round(true);\n  };\n\n  scale.round = function(_) {\n    return arguments.length ? (round = !!_, scale) : round;\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (squared.clamp(_), scale) : squared.clamp();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return radial(squared.domain(), range)\n        .round(round)\n        .clamp(squared.clamp())\n        .unknown(unknown);\n  };\n\n  initRange.apply(scale, arguments);\n\n  return linearish(scale);\n}\n", "import {ascending, bisect, quantileSorted as threshold} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantile() {\n  var domain = [],\n      range = [],\n      thresholds = [],\n      unknown;\n\n  function rescale() {\n    var i = 0, n = Math.max(1, range.length);\n    thresholds = new Array(n - 1);\n    while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n  }\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN] : [\n      i > 0 ? thresholds[i - 1] : domain[0],\n      i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n    ];\n  };\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [];\n    for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n    domain.sort(ascending);\n    return rescale();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.quantiles = function() {\n    return thresholds.slice();\n  };\n\n  scale.copy = function() {\n    return quantile()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "import {bisect} from \"d3-array\";\nimport {linearish} from \"./linear.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantize() {\n  var x0 = 0,\n      x1 = 1,\n      n = 1,\n      domain = [0.5],\n      range = [0, 1],\n      unknown;\n\n  function scale(x) {\n    return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n  }\n\n  function rescale() {\n    var i = -1;\n    domain = new Array(n);\n    while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);\n    return scale;\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1] = _, x0 = +x0, x1 = +x1, rescale()) : [x0, x1];\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (n = (range = Array.from(_)).length - 1, rescale()) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN]\n        : i < 1 ? [x0, domain[0]]\n        : i >= n ? [domain[n - 1], x1]\n        : [domain[i - 1], domain[i]];\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : scale;\n  };\n\n  scale.thresholds = function() {\n    return domain.slice();\n  };\n\n  scale.copy = function() {\n    return quantize()\n        .domain([x0, x1])\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return initRange.apply(linearish(scale), arguments);\n}\n", "import {bisect} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function threshold() {\n  var domain = [0.5],\n      range = [0, 1],\n      unknown,\n      n = 1;\n\n  function scale(x) {\n    return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return [domain[i - 1], domain[i]];\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return threshold()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "var t0 = new Date,\n    t1 = new Date;\n\nexport default function newInterval(floori, offseti, count, field) {\n\n  function interval(date) {\n    return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n  }\n\n  interval.floor = function(date) {\n    return floori(date = new Date(+date)), date;\n  };\n\n  interval.ceil = function(date) {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = function(date) {\n    var d0 = interval(date),\n        d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = function(date, step) {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = function(start, stop, step) {\n    var range = [], previous;\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    while (previous < start && start < stop);\n    return range;\n  };\n\n  interval.filter = function(test) {\n    return newInterval(function(date) {\n      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n    }, function(date, step) {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = function(start, end) {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = function(step) {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null\n          : !(step > 1) ? interval\n          : interval.filter(field\n              ? function(d) { return field(d) % step === 0; }\n              : function(d) { return interval.count(0, d) % step === 0; });\n    };\n  }\n\n  return interval;\n}\n", "import interval from \"./interval.js\";\n\nvar millisecond = interval(function() {\n  // noop\n}, function(date, step) {\n  date.setTime(+date + step);\n}, function(start, end) {\n  return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return interval(function(date) {\n    date.setTime(Math.floor(date / k) * k);\n  }, function(date, step) {\n    date.setTime(+date + step * k);\n  }, function(start, end) {\n    return (end - start) / k;\n  });\n};\n\nexport default millisecond;\nexport var milliseconds = millisecond.range;\n", "import interval from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nvar second = interval(function(date) {\n  date.setTime(date - date.getMilliseconds());\n}, function(date, step) {\n  date.setTime(+date + step * durationSecond);\n}, function(start, end) {\n  return (end - start) / durationSecond;\n}, function(date) {\n  return date.getUTCSeconds();\n});\n\nexport default second;\nexport var seconds = second.range;\n", "import interval from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nvar minute = interval(function(date) {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, function(date, step) {\n  date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n  return (end - start) / durationMinute;\n}, function(date) {\n  return date.getMinutes();\n});\n\nexport default minute;\nexport var minutes = minute.range;\n", "import interval from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nvar hour = interval(function(date) {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, function(date, step) {\n  date.setTime(+date + step * durationHour);\n}, function(start, end) {\n  return (end - start) / durationHour;\n}, function(date) {\n  return date.getHours();\n});\n\nexport default hour;\nexport var hours = hour.range;\n", "import interval from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nvar day = interval(\n  date => date.setHours(0, 0, 0, 0),\n  (date, step) => date.setDate(date.getDate() + step),\n  (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n  date => date.getDate() - 1\n);\n\nexport default day;\nexport var days = day.range;\n", "import interval from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction weekday(i) {\n  return interval(function(date) {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setDate(date.getDate() + step * 7);\n  }, function(start, end) {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n  });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\n\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;\n", "import interval from \"./interval.js\";\n\nvar month = interval(function(date) {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n  return date.getMonth();\n});\n\nexport default month;\nexport var months = month.range;\n", "import interval from \"./interval.js\";\n\nvar year = interval(function(date) {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n  return end.getFullYear() - start.getFullYear();\n}, function(date) {\n  return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\nexport default year;\nexport var years = year.range;\n", "import interval from \"./interval.js\";\nimport {durationMinute} from \"./duration.js\";\n\nvar utcMinute = interval(function(date) {\n  date.setUTCSeconds(0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n  return (end - start) / durationMinute;\n}, function(date) {\n  return date.getUTCMinutes();\n});\n\nexport default utcMinute;\nexport var utcMinutes = utcMinute.range;\n", "import interval from \"./interval.js\";\nimport {durationHour} from \"./duration.js\";\n\nvar utcHour = interval(function(date) {\n  date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n  date.setTime(+date + step * durationHour);\n}, function(start, end) {\n  return (end - start) / durationHour;\n}, function(date) {\n  return date.getUTCHours();\n});\n\nexport default utcHour;\nexport var utcHours = utcHour.range;\n", "import interval from \"./interval.js\";\nimport {durationDay} from \"./duration.js\";\n\nvar utcDay = interval(function(date) {\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n  return (end - start) / durationDay;\n}, function(date) {\n  return date.getUTCDate() - 1;\n});\n\nexport default utcDay;\nexport var utcDays = utcDay.range;\n", "import interval from \"./interval.js\";\nimport {durationWeek} from \"./duration.js\";\n\nfunction utcWeekday(i) {\n  return interval(function(date) {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, function(start, end) {\n    return (end - start) / durationWeek;\n  });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\n\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;\n", "import interval from \"./interval.js\";\n\nvar utcMonth = interval(function(date) {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n  return date.getUTCMonth();\n});\n\nexport default utcMonth;\nexport var utcMonths = utcMonth.range;\n", "import interval from \"./interval.js\";\n\nvar utcYear = interval(function(date) {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n  return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function(date, step) {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;\n", "import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport millisecond from \"./millisecond.js\";\nimport second from \"./second.js\";\nimport minute from \"./minute.js\";\nimport hour from \"./hour.js\";\nimport day from \"./day.js\";\nimport {sunday as week} from \"./week.js\";\nimport month from \"./month.js\";\nimport year from \"./year.js\";\nimport utcMinute from \"./utcMinute.js\";\nimport utcHour from \"./utcHour.js\";\nimport utcDay from \"./utcDay.js\";\nimport {utcSunday as utcWeek} from \"./utcWeek.js\";\nimport utcMonth from \"./utcMonth.js\";\nimport utcYear from \"./utcYear.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n  const tickIntervals = [\n    [second,  1,      durationSecond],\n    [second,  5,  5 * durationSecond],\n    [second, 15, 15 * durationSecond],\n    [second, 30, 30 * durationSecond],\n    [minute,  1,      durationMinute],\n    [minute,  5,  5 * durationMinute],\n    [minute, 15, 15 * durationMinute],\n    [minute, 30, 30 * durationMinute],\n    [  hour,  1,      durationHour  ],\n    [  hour,  3,  3 * durationHour  ],\n    [  hour,  6,  6 * durationHour  ],\n    [  hour, 12, 12 * durationHour  ],\n    [   day,  1,      durationDay   ],\n    [   day,  2,  2 * durationDay   ],\n    [  week,  1,      durationWeek  ],\n    [ month,  1,      durationMonth ],\n    [ month,  3,  3 * durationMonth ],\n    [  year,  1,      durationYear  ]\n  ];\n\n  function ticks(start, stop, count) {\n    const reverse = stop < start;\n    if (reverse) [start, stop] = [stop, start];\n    const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n    const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n    return reverse ? ticks.reverse() : ticks;\n  }\n\n  function tickInterval(start, stop, count) {\n    const target = Math.abs(stop - start) / count;\n    const i = bisector(([,, step]) => step).right(tickIntervals, target);\n    if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n    if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n    const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n    return t.every(step);\n  }\n\n  return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(year, month, week, day, hour, minute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n", "export {\n  default as timeInterval\n} from \"./interval.js\";\n\nexport {\n  default as timeMillisecond,\n  milliseconds as timeMilliseconds,\n  default as utcMillisecond,\n  milliseconds as utcMilliseconds\n} from \"./millisecond.js\";\n\nexport {\n  default as timeSecond,\n  seconds as timeSeconds,\n  default as utcSecond,\n  seconds as utcSeconds\n} from \"./second.js\";\n\nexport {\n  default as timeMinute,\n  minutes as timeMinutes\n} from \"./minute.js\";\n\nexport {\n  default as timeHour,\n  hours as timeHours\n} from \"./hour.js\";\n\nexport {\n  default as timeDay,\n  days as timeDays\n} from \"./day.js\";\n\nexport {\n  sunday as timeWeek,\n  sundays as timeWeeks,\n  sunday as timeSunday,\n  sundays as timeSundays,\n  monday as timeMonday,\n  mondays as timeMondays,\n  tuesday as timeTuesday,\n  tuesdays as timeTuesdays,\n  wednesday as timeWednesday,\n  wednesdays as timeWednesdays,\n  thursday as timeThursday,\n  thursdays as timeThursdays,\n  friday as timeFriday,\n  fridays as timeFridays,\n  saturday as timeSaturday,\n  saturdays as timeSaturdays\n} from \"./week.js\";\n\nexport {\n  default as timeMonth,\n  months as timeMonths\n} from \"./month.js\";\n\nexport {\n  default as timeYear,\n  years as timeYears\n} from \"./year.js\";\n\nexport {\n  default as utcMinute,\n  utcMinutes as utcMinutes\n} from \"./utcMinute.js\";\n\nexport {\n  default as utcHour,\n  utcHours as utcHours\n} from \"./utcHour.js\";\n\nexport {\n  default as utcDay,\n  utcDays as utcDays\n} from \"./utcDay.js\";\n\nexport {\n  utcSunday as utcWeek,\n  utcSundays as utcWeeks,\n  utcSunday as utcSunday,\n  utcSundays as utcSundays,\n  utcMonday as utcMonday,\n  utcMondays as utcMondays,\n  utcTuesday as utcTuesday,\n  utcTuesdays as utcTuesdays,\n  utcWednesday as utcWednesday,\n  utcWednesdays as utcWednesdays,\n  utcThursday as utcThursday,\n  utcThursdays as utcThursdays,\n  utcFriday as utcFriday,\n  utcFridays as utcFridays,\n  utcSaturday as utcSaturday,\n  utcSaturdays as utcSaturdays\n} from \"./utcWeek.js\";\n\nexport {\n  default as utcMonth,\n  utcMonths as utcMonths\n} from \"./utcMonth.js\";\n\nexport {\n  default as utcYear,\n  utcYears as utcYears\n} from \"./utcYear.js\";\n\nexport {\n  utcTicks,\n  utcTickInterval,\n  timeTicks,\n  timeTickInterval\n} from \"./ticks.js\";\n", "import {\n  timeDay,\n  timeSunday,\n  timeMonday,\n  timeThursday,\n  timeYear,\n  utcDay,\n  utcSunday,\n  utcMonday,\n  utcThursday,\n  utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n  return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"g\": formatYearISO,\n    \"G\": formatFullYearISO,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"q\": formatQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"g\": formatUTCYearISO,\n    \"G\": formatUTCFullYearISO,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"q\": formatUTCQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"g\": parseYear,\n    \"G\": parseFullYear,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"q\": parseQuarter,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  };\n\n  // These recursive directive definitions must be deferred.\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function(date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n          else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, Z) {\n    return function(string) {\n      var d = newDate(1900, undefined, 1),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week, day;\n      if (i != string.length) return null;\n\n      // If a UNIX timestamp is specified, return it.\n      if (\"Q\" in d) return new Date(d.Q);\n      if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n      // If this is utcParse, never use the local timezone.\n      if (Z && !(\"Z\" in d)) d.Z = 0;\n\n      // The am-pm flag is 0 for AM, and 1 for PM.\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n      // If the month was not specified, inherit from the quarter.\n      if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n      // Convert day-of-week and week-of-year to day-of-year.\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n        if (\"Z\" in d) {\n          week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n          week = utcDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n          week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n          week = timeDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      }\n\n      // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      }\n\n      // Otherwise, all fields are in local time.\n      return localDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatQuarter(d) {\n    return 1 + ~~(d.getMonth() / 3);\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  function formatUTCQuarter(d) {\n    return 1 + ~~(d.getUTCMonth() / 3);\n  }\n\n  return {\n    format: function(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    parse: function(specifier) {\n      var p = newParse(specifier += \"\", false);\n      p.toString = function() { return specifier; };\n      return p;\n    },\n    utcFormat: function(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    utcParse: function(specifier) {\n      var p = newParse(specifier += \"\", true);\n      p.toString = function() { return specifier; };\n      return p;\n    }\n  };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n    numberRe = /^\\s*\\d+/, // note: ignores next directive\n    percentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n  var day = d.getDay();\n  return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  d = dISO(d);\n  return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n  d = dISO(d);\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n  var day = d.getDay();\n  d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n      + pad(z / 60 | 0, \"0\", 2)\n      + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n  var day = d.getUTCDay();\n  return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  d = UTCdISO(d);\n  return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n  d = UTCdISO(d);\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n  var day = d.getUTCDay();\n  d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}\n", "export {default as timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse} from \"./defaultLocale.js\";\nexport {default as timeFormatLocale} from \"./locale.js\";\nexport {default as isoFormat} from \"./isoFormat.js\";\nexport {default as isoParse} from \"./isoParse.js\";\n", "import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n  return new Date(t);\n}\n\nfunction number(t) {\n  return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n  var scale = continuous(),\n      invert = scale.invert,\n      domain = scale.domain;\n\n  var formatMillisecond = format(\".%L\"),\n      formatSecond = format(\":%S\"),\n      formatMinute = format(\"%I:%M\"),\n      formatHour = format(\"%I %p\"),\n      formatDay = format(\"%a %d\"),\n      formatWeek = format(\"%b %d\"),\n      formatMonth = format(\"%B\"),\n      formatYear = format(\"%Y\");\n\n  function tickFormat(date) {\n    return (second(date) < date ? formatMillisecond\n        : minute(date) < date ? formatSecond\n        : hour(date) < date ? formatMinute\n        : day(date) < date ? formatHour\n        : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n        : year(date) < date ? formatMonth\n        : formatYear)(date);\n  }\n\n  scale.invert = function(y) {\n    return new Date(invert(y));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n  };\n\n  scale.ticks = function(interval) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return specifier == null ? tickFormat : format(specifier);\n  };\n\n  scale.nice = function(interval) {\n    var d = domain();\n    if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n    return interval ? domain(nice(d, interval)) : scale;\n  };\n\n  scale.copy = function() {\n    return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n  };\n\n  return scale;\n}\n\nexport default function time() {\n  return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n", "import {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcTicks, utcTickInterval} from \"d3-time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {calendar} from \"./time.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function utcTime() {\n  return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n", "import {interpolate, interpolateRound} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 1,\n      t0,\n      t1,\n      k10,\n      transform,\n      interpolator = identity,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1;\n      return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n    };\n  }\n\n  scale.range = range(interpolate);\n\n  scale.rangeRound = range(interpolateRound);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n    return scale;\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .interpolator(source.interpolator())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nexport default function sequential() {\n  var scale = linearish(transformer()(identity));\n\n  scale.copy = function() {\n    return copy(scale, sequential());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n  var scale = loggish(transformer()).domain([1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, sequentialLog()).base(scale.base());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialSymlog()).constant(scale.constant());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialPow()).exponent(scale.exponent());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n  return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n", "import {ascending, bisect, quantile} from \"d3-array\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\n\nexport default function sequentialQuantile() {\n  var domain = [],\n      interpolator = identity;\n\n  function scale(x) {\n    if (x != null && !isNaN(x = +x)) return interpolator((bisect(domain, x, 1) - 1) / (domain.length - 1));\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [];\n    for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n    domain.sort(ascending);\n    return scale;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  scale.range = function() {\n    return domain.map((d, i) => interpolator(i / (domain.length - 1)));\n  };\n\n  scale.quantiles = function(n) {\n    return Array.from({length: n + 1}, (_, i) => quantile(domain, i / n));\n  };\n\n  scale.copy = function() {\n    return sequentialQuantile(interpolator).domain(domain);\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n", "import {interpolate, interpolateRound, piecewise} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {copy} from \"./sequential.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 0.5,\n      x2 = 1,\n      s = 1,\n      t0,\n      t1,\n      t2,\n      k10,\n      k21,\n      interpolator = identity,\n      transform,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1, r2;\n      return arguments.length ? ([r0, r1, r2] = _, interpolator = piecewise(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)];\n    };\n  }\n\n  scale.range = range(interpolate);\n\n  scale.rangeRound = range(interpolateRound);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1;\n    return scale;\n  };\n}\n\nexport default function diverging() {\n  var scale = linearish(transformer()(identity));\n\n  scale.copy = function() {\n    return copy(scale, diverging());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingLog() {\n  var scale = loggish(transformer()).domain([0.1, 1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, divergingLog()).base(scale.base());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSymlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, divergingSymlog()).constant(scale.constant());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingPow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, divergingPow()).exponent(scale.exponent());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSqrt() {\n  return divergingPow.apply(null, arguments).exponent(0.5);\n}\n", "export {\n  default as scaleBand,\n  point as scalePoint\n} from \"./band.js\";\n\nexport {\n  default as scaleIdentity\n} from \"./identity.js\";\n\nexport {\n  default as scaleLinear\n} from \"./linear.js\";\n\nexport {\n  default as scaleLog\n} from \"./log.js\";\n\nexport {\n  default as scaleSymlog\n} from \"./symlog.js\";\n\nexport {\n  default as scaleOrdinal,\n  implicit as scaleImplicit\n} from \"./ordinal.js\";\n\nexport {\n  default as scalePow,\n  sqrt as scaleSqrt\n} from \"./pow.js\";\n\nexport {\n  default as scaleRadial\n} from \"./radial.js\";\n\nexport {\n  default as scaleQuantile\n} from \"./quantile.js\";\n\nexport {\n  default as scaleQuantize\n} from \"./quantize.js\";\n\nexport {\n  default as scaleThreshold\n} from \"./threshold.js\";\n\nexport {\n  default as scaleTime\n} from \"./time.js\";\n\nexport {\n  default as scaleUtc\n} from \"./utcTime.js\";\n\nexport {\n  default as scaleSequential,\n  sequentialLog as scaleSequentialLog,\n  sequentialPow as scaleSequentialPow,\n  sequentialSqrt as scaleSequentialSqrt,\n  sequentialSymlog as scaleSequentialSymlog\n} from \"./sequential.js\";\n\nexport {\n  default as scaleSequentialQuantile\n} from \"./sequentialQuantile.js\";\n\nexport {\n  default as scaleDiverging,\n  divergingLog as scaleDivergingLog,\n  divergingPow as scaleDivergingPow,\n  divergingSqrt as scaleDivergingSqrt,\n  divergingSymlog as scaleDivergingSymlog\n} from \"./diverging.js\";\n\nexport {\n  default as tickFormat\n} from \"./tickFormat.js\";\n", "/** @module kd\n * A k-d tree implementation, which is used to find the closest point in\n * something like a 2D scatter plot. See https://en.wikipedia.org/wiki/K-d_tree\n * for more details.\n *\n * Forked from https://github.com/Pandinosaurus/kd-tree-javascript and\n * then massively trimmed down to just find the single closest point, and also\n * ported to ES6 syntax, then ported to TypeScript.\n *\n * https://github.com/Pandinosaurus/kd-tree-javascript is a fork of\n * https://github.com/ubilabs/kd-tree-javascript\n *\n * @author Mircea Pricop <pricop@ubilabs.net>, 2012\n * @author Martin Kleppe <kleppe@ubilabs.net>, 2012\n * @author Ubilabs http://ubilabs.net, 2012\n * @license MIT License <http://www.opensource.org/licenses/mit-license.php>\n */\n\nexport interface KDPoint {\n  x: number;\n  y: number;\n}\n\n/** @class A single node in the k-d Tree. */\nclass Node<Point extends KDPoint> {\n  obj: Point;\n\n  left: Node<Point> | null = null;\n\n  right: Node<Point> | null = null;\n\n  parent: Node<Point> | null;\n\n  dimension: number;\n\n  constructor(obj: Point, dimension: number, parent: Node<Point> | null) {\n    this.obj = obj;\n    this.parent = parent;\n    this.dimension = dimension;\n  }\n}\n\ntype Dimensions = keyof KDPoint;\n\n/**\n * @class The k-d tree.\n */\nexport class KDTree<Point extends KDPoint> {\n  private dimensions: Dimensions[];\n\n  private root: Node<Point> | null;\n\n  private metric: (a: KDPoint, b: KDPoint) => number;\n\n  /**\n   * The constructor.\n   *\n   * @param {Array} points - An array of points, something with the shape\n   *     {x:x, y:y}.\n   * @param {function} metric - A function that calculates the distance\n   *     between two points.\n   * @param {Array} dimensions - The dimensions to use in our points, for\n   *     example ['x', 'y'].\n   */\n  constructor(\n    points: Point[],\n    metric: (a: KDPoint, b: KDPoint) => number,\n    dimensions: Dimensions[]\n  ) {\n    this.dimensions = dimensions;\n    this.metric = metric;\n    this.root = this._buildTree(points, 0, null);\n  }\n\n  /**\n   * Find the nearest Node to the given point.\n   *\n   * @param {Object} point - {x:x, y:y}\n   * @returns {Object} The closest point object passed into the constructor.\n   *     We pass back the original object since it might have extra info\n   *     beyond just the coordinates, such as trace id.\n   */\n  nearest(point: KDPoint): Point {\n    let bestNode = {\n      node: this.root,\n      distance: Number.MAX_VALUE,\n    };\n\n    const saveNode = (node: Node<Point>, distance: number) => {\n      bestNode = {\n        node: node,\n        distance: distance,\n      };\n    };\n\n    const nearestSearch = (node: Node<Point>) => {\n      const dimension = this.dimensions[node.dimension];\n      const ownDistance = this.metric(point, node.obj);\n\n      if (node.right === null && node.left === null) {\n        if (ownDistance < bestNode.distance) {\n          saveNode(node, ownDistance);\n        }\n        return;\n      }\n\n      let bestChild = null;\n      let otherChild = null;\n      // If we get here we know that at least one of .left and .right is\n      // non-null, so bestChild is guaranteed to be non-null.\n      if (node.right === null) {\n        bestChild = node.left;\n      } else if (node.left === null) {\n        bestChild = node.right;\n      } else if (point[dimension] < node.obj[dimension]) {\n        bestChild = node.left;\n        otherChild = node.right;\n      } else {\n        bestChild = node.right;\n        otherChild = node.left;\n      }\n\n      nearestSearch(bestChild!);\n\n      if (ownDistance < bestNode.distance) {\n        saveNode(node, ownDistance);\n      }\n\n      // Find distance to hyperplane.\n      const pointOnHyperplane = {\n        x: 0,\n        y: 0,\n      };\n      for (let i = 0; i < this.dimensions.length; i++) {\n        if (i === node.dimension) {\n          pointOnHyperplane[this.dimensions[i]] = point[this.dimensions[i]];\n        } else {\n          pointOnHyperplane[this.dimensions[i]] = node.obj[this.dimensions[i]];\n        }\n      }\n\n      // If the hyperplane is closer than the current best point then we\n      // need to search down the other side of the tree.\n      if (otherChild !== null && this.metric(pointOnHyperplane, node.obj) < bestNode.distance) {\n        nearestSearch(otherChild);\n      }\n    };\n\n    if (this.root) {\n      nearestSearch(this.root);\n    }\n\n    return bestNode.node!.obj;\n  }\n\n  /**\n   * Builds the from parent Node on down.\n   *\n   * @param {Array} points - An array of {x:x, y:y}.\n   * @param {Number} depth - The current depth from the root node.\n   * @param {Node} parent - The parent Node.\n   */\n  private _buildTree(\n    points: Point[],\n    depth: number,\n    parent: Node<Point> | null\n  ): Node<Point> | null {\n    // Every step deeper into the tree we switch to using another axis.\n    const dim = depth % this.dimensions.length;\n\n    if (points.length === 0) {\n      return null;\n    }\n    if (points.length === 1) {\n      return new Node(points[0], dim, parent);\n    }\n\n    points.sort((a, b) => a[this.dimensions[dim]] - b[this.dimensions[dim]]);\n\n    const median = Math.floor(points.length / 2);\n    const node = new Node(points[median], dim, parent);\n    node.left = this._buildTree(points.slice(0, median), depth + 1, node);\n    node.right = this._buildTree(points.slice(median + 1), depth + 1, node);\n\n    return node;\n  }\n}\n", "/** Constants used across the UI of Perf. */\n\n/** MISSING_DATA_SENTINEL is the value the backend uses to indicate that a\n *  sample is missing from a trace. This must be set to the same value as the\n *  const MissingDataSentinel in //go/vec32/vec.\n *\n *  JSON doesn't support NaN or +/- Inf, so we need a valid float32 to signal\n *  missing data that also has a compact JSON representation.\n */\nexport const MISSING_DATA_SENTINEL = 1e32;\n", "// Contains functions to create plot data.\n\nimport { MISSING_DATA_SENTINEL } from '../const/const';\nimport { Anomaly, ColumnHeader, TraceSet } from '../json';\n\n// Google chart's default color palette, two shades down\nexport const defaultColors = [\n  '#5b84d6', // rgb(91, 132, 214)\n  '#e36041', // rgb(227, 96, 65)\n  '#ffad32', // rgb(255, 173, 50)\n  '#3fab46', // rgb(63, 171, 70)\n  '#ad32ad', // rgb(173, 50, 173)\n  '#6264bc', // rgb(98, 100, 188)\n  '#32add1', // rgb(50, 173, 209)\n  '#e36992', // rgb(227, 105, 146)\n  '#84bb32', // rgb(132, 187, 50)\n  '#c65757', // rgb(184, 46, 46)\n  '#5a82aa', // rgb(90, 130, 170)\n  '#ad69ad', // rgb(173, 105, 173)\n  '#4ebbad', // rgb(78, 87, 173)\n  '#bbbb40', // rgb(187, 187, 64)\n  '#845bd6', // rgb(132, 91, 214)\n  '#eb8f32', // rgb(235, 143, 50)\n  '#a23838', // rgb(162, 56, 56)\n  '#5aa781', // rgb(90, 167, 129)\n  '#5574A6', // rgb(85, 116, 166)\n  '#3B3EAC', // rgb(59, 62, 172)\n];\n\nexport interface DataPoint {\n  x: number | Date;\n  y: number;\n  anomaly: Anomaly | null;\n}\n\nexport enum ChartAxisFormat {\n  Commit,\n  Date,\n}\n\nexport interface ChartData {\n  xLabel: string;\n  yLabel: string;\n  chartAxisFormat: ChartAxisFormat;\n  lines: { [key: string]: DataPoint[] };\n  start: number | Date;\n  end: number | Date;\n}\n\n// convertFromDataframe converts DataFrame to any[][]  that can be plugged into\n// GoogleChart.data.\n// This function effectively transposes the traceset so that the keys\n// (i.e. jetstream2/box2D/etc) become the columns and the individual data points\n// are the rows\nexport const convertFromDataframe = (\n  df: {\n    traceset: TraceSet;\n    header: (ColumnHeader | null)[] | null;\n  } | null,\n  domain: 'commit' | 'date' | 'both' = 'commit',\n  traceKey?: string\n) => {\n  if ((df?.header?.length || 0) === 0) {\n    return null;\n  }\n  if (traceKey && !(traceKey in df!.traceset)) {\n    return null;\n  }\n\n  const keys = traceKey ? [traceKey] : Object.keys(df!.traceset);\n\n  const firstRow: any[] = [];\n  if (domain === 'commit' || domain === 'both') {\n    firstRow.push({ type: 'number', role: 'domain', label: 'Commit Position' });\n  }\n  if (domain === 'date' || domain === 'both') {\n    firstRow.push({ type: 'date', role: 'domain', label: 'Date' });\n  }\n  keys.forEach((k) => firstRow.push(k));\n\n  const rows: any[][] = [firstRow];\n  df!.header?.forEach((column, idx) => {\n    const row: any[] = [];\n    if (domain === 'commit' || domain === 'both') {\n      row.push(column!.offset);\n    }\n    if (domain === 'date' || domain === 'both') {\n      row.push(new Date(column!.timestamp * 1000));\n    }\n    keys.forEach((k) => {\n      const val = df!.traceset[k][idx];\n      row.push(val === MISSING_DATA_SENTINEL ? null : val);\n    });\n    rows.push(row);\n  });\n  return rows;\n};\n\nexport function ConvertData(chartData: ChartData) {\n  /*\n    The data in the plot needs to be in the following format.\n    [\n      [x-axis_label, line1_label, line2_label, ...],\n      [x_value, line1_value, line2_value, ...], // first point\n      [x_value, line1_value, line2_value, ...], // second point\n      ...\n      ...\n    ]\n  */\n  const columns = [chartData.xLabel];\n  const lineKeys = Object.keys(chartData.lines);\n  lineKeys.forEach((key) => {\n    columns.push(key);\n  });\n  // The first row needs to be the column names\n  const rows: [any] = [columns];\n  const rowCount = chartData.lines[lineKeys[0]].length;\n  for (let i = 0; i < rowCount; i++) {\n    // Add the xValue which is the same for all lines\n    const row = [chartData.lines[lineKeys[0]][i].x];\n    lineKeys.forEach((key) => {\n      // For each line, add the y value for datapoint at index i.\n      row.push(chartData.lines[key][i].y);\n    });\n\n    rows[i + 1] = row;\n  }\n  return rows;\n}\n\nexport function mainChartOptions(\n  style: CSSStyleDeclaration,\n  domain: string,\n  yAxis: string | undefined\n): google.visualization.LineChartOptions {\n  // The X axis can support either commit, or dates. Change the format\n  // based on the current chart's format.\n  const format = domain === 'commit' ? '#' : 'MM/dd/yy';\n  return {\n    // interpolateNulls will continue a line from the last known point to the\n    // next available if there's nulls inbetween.\n    interpolateNulls: true,\n    // selectionMode multiple allows you to select multiple points on a plot.\n    // we are going to only allow single so that on selection over an area, we\n    // can estimate the delta range. note that the default is single.\n    selectionMode: 'single',\n    // https://developers.google.com/chart/interactive/docs/gallery/areachart\n    // Defines how multiple data selections are rolled into the tooltip.\n    // for selectionMode: single, this should be none, such that we only allow\n    // one tooltip per seelction\n    aggregationTarget: 'none',\n    tooltip: { trigger: 'none' },\n    pointSize: 3,\n    dataOpacity: 0.7,\n    titleTextStyle: { color: style.color },\n    hAxis: {\n      titleTextStyle: {\n        color: style.getPropertyValue('--plot-axes-title-color'),\n      },\n      textPosition: 'out',\n      textStyle: {\n        color: style.color,\n      },\n      gridlines: {\n        color: style.getPropertyValue('--md-sys-color-primary-container'),\n      },\n      format: format,\n    },\n    vAxis: {\n      title: yAxis,\n      titleTextStyle: {\n        color: style.getPropertyValue('--plot-axes-title-color'),\n      },\n      textPosition: 'out',\n      textStyle: { color: style.color },\n      gridlines: {\n        color: style.getPropertyValue('--md-sys-color-primary-container'),\n      },\n      viewWindowMode: 'maximized',\n    },\n    // define clearance to prevent axis labels and data from getting clipped\n    chartArea: {\n      left: 50,\n      right: 10,\n      top: 5,\n      bottom: 25,\n    },\n    colors: defaultColors,\n    legend: {\n      position: 'none',\n    },\n    backgroundColor: style.getPropertyValue('--plot-background-color-sk'),\n    series: {},\n    crosshair: {\n      trigger: 'both',\n      focused: {\n        opacity: 0.5,\n      },\n    },\n  };\n}\n\nexport function SummaryChartOptions(\n  style: CSSStyleDeclaration,\n  domain: 'commit' | 'date'\n): google.visualization.LineChartOptions {\n  const format = domain === 'commit' ? '#' : 'MMM dd, yy';\n  return {\n    interpolateNulls: true,\n    curveType: 'function',\n    hAxis: {\n      textPosition: 'out',\n      textStyle: {\n        color: style.color,\n        fontSize: 8,\n      },\n      gridlines: {\n        count: 10,\n      },\n      format: format,\n    },\n    vAxis: {\n      textPosition: 'out',\n      gridlines: {\n        color: 'transparent',\n      },\n      viewWindowMode: 'maximized',\n    },\n    tooltip: {\n      trigger: 'none',\n    },\n    chartArea: {\n      width: '100%',\n      bottom: 25, // prevents commit positions from being clipped\n      top: 0,\n      backgroundColor: {\n        stroke: 'black',\n        strokeWidth: 1,\n      },\n    },\n    // this value is inherited from plot-google-chart-sk\n    backgroundColor: style.getPropertyValue('--plot-background-color-sk'),\n    colors: [style.color],\n  };\n}\n", "/**\n * @module modules/plot-simple-sk\n * @description <h2><code>plot-simple-sk</code></h2>\n *\n *  A custom element for plotting x,y graphs.\n *\n *  The canvas is broken into two areas, the summary and the details. The\n *  summary is always SUMMARY_HEIGHT pixels high. Also note that we use\n *  window.devicePixelRatio to decide the actual number of pixels to use, and\n *  then use CSS transform to squash the canvas back down to the desired size.\n *\n *    +----------------------------------------------------+\n *    |                                                    |\n *    |                   MARGIN                           |\n *    |                                                    |\n *    |   +--------------------------------------------+   |\n *    |   |           Summary                          |   |\n *    |   |                                            |   |\n *    |   +--------------------------------------------+   |\n *    |                                                    |\n *    |                   MARGIN                           |\n *    |                                                    |\n *    |   +--------------------------------------------+   |\n *    |   |          Details                           |   |\n *    |   |                                            |   |\n *    |   |                                            |   |\n *    |   |                                            |   |\n *    |   |                                            |   |\n *    |   |                                            |   |\n *    |   |                                            |   |\n *    |   |                                            |   |\n *    |   +--------------------------------------------+   |\n *    |                                                    |\n *    |                   MARGIN                           |\n *    |                                                    |\n *    +----------------------------------------------------+\n *\n * To keep rendering quick the traces will be written into Path2D objects to be\n * used for quick rendering.\n *\n * We also use a k-d Tree for quick lookup for clicking and mouse movement over\n * the traces.\n *\n * There are actually two canvas's in play, the trace canvas is below the\n * overlay canvas. The trace canvas contains all the traces in the summary and\n * details along with their axes. The overlay canvas contains everything that\n * changes quickly, such as the crosshairs, the x-bar, etc.\n *\n * This element knows about elements-sk/themes and uses those CSS variables if\n * present.\n *\n * Listens for \"theme-chooser-toggle\" event on the document and redraws with\n * updated computed style colors.\n *\n * @evt trace_selected - Event produced when the user clicks on a line. The\n *     e.detail contains the id of the line and the index of the point in the\n *     line closest to the mouse, and the [x, y] value of the point in 'pt'.\n *\n *     <pre>\n *     {\n *        x: x,\n *        y: y,\n *        name: name,\n *      }\n *     </pre>\n *\n * @evt trace_focused - Event produced when the user moves the mouse close to a\n *     line. The e.detail contains the id of the line and the index of the point\n *     in the line closest to the mouse.\n *\n *     <pre>\n *     {\n *        x: x,\n *        y: y,\n *        name: name,\n *      }\n *     </pre>\n *\n * @evt zoom - Event produced when the user has zoomed into a region by\n *      dragging. The detail is of the form:\n *\n *      {\n *        xBegin: new Date(),\n *        xEnd: new Date(),\n *      }\n *\n * @attr width - The width of the element in px.\n *\n * @attr height - The height of the element in px.\n *\n * @attr summary {Boolean} - If present then display the summary bar.\n */\nimport { html } from 'lit/html.js';\nimport * as d3Scale from 'd3-scale';\nimport * as d3Array from 'd3-array';\nimport { Anomaly } from '../json';\nimport { define } from '../../../elements-sk/modules/define';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport { KDTree, KDPoint } from './kd';\nimport { tick } from './ticks';\nimport { MISSING_DATA_SENTINEL } from '../const/const';\nimport { defaultColors } from '../common/plot-builder';\nimport { IssueDetail, UserIssueMap } from '../dataframe/dataframe_context';\n\n//  Prefix for trace ids that are not real traces, such as special_zero. Special\n//  traces never receive focus and can't be clicked on.\nconst SPECIAL = 'special';\n\nconst NUM_Y_TICKS = 4;\n\nconst HOVER_COLOR = '#8887'; // Note the alpha value.\n\nconst ZOOM_RECT_COLOR = '#0007'; // Note the alpha value.\n\nconst SUMMARY_LINE_WIDTH = 1; // px\n\nconst DETAIL_LINE_WIDTH = 1; // px\n\nconst AXIS_LINE_WIDTH = 1; // px\n\nconst MIN_MOUSE_MOVE_FOR_ZOOM = 5; // px\n\n// Contains linear scales to convert from source coordinates into\n// device/destination coordinates.\nexport interface Range {\n  x: d3Scale.ScaleLinear<number, number>;\n  y: d3Scale.ScaleLinear<number, number>;\n}\n\n// A trace is drawn as a set of lines overdrawn with dots at each measurement.\ninterface TracePaths {\n  linePath: Path2D | null;\n  dotsPath: Path2D | null;\n}\n\n/** @class Builds the Path2D objects that describe the trace and the dots for a given\n *   set of scales.\n */\nclass PathBuilder {\n  // TODO(jcgregorio) Change to TracePaths.\n  private linePath: Path2D;\n\n  private dotsPath: Path2D;\n\n  // TODO(jcgregorio) Change to Range.\n  private xRange: d3Scale.ScaleLinear<number, number>;\n\n  private yRange: d3Scale.ScaleLinear<number, number>;\n\n  private radius: number;\n\n  constructor(\n    xRange: d3Scale.ScaleLinear<number, number>,\n    yRange: d3Scale.ScaleLinear<number, number>,\n    radius: number\n  ) {\n    this.xRange = xRange;\n    this.yRange = yRange;\n    this.radius = radius;\n    this.linePath = new Path2D();\n    this.dotsPath = new Path2D();\n  }\n\n  /**\n   * Add a point to plot to the path.\n   *\n   * @param {Number} x - X coordinate in source coordinates.\n   * @param {Number} y - Y coordinate in source coordinates.\n   */\n  add(x: number, y: number) {\n    // Convert source coord into canvas coords.\n    const cx = this.xRange(x);\n    const cy = this.yRange(y);\n\n    if (x === 0) {\n      this.linePath.moveTo(cx, cy);\n    } else {\n      this.linePath.lineTo(cx, cy);\n    }\n    this.dotsPath.moveTo(cx + this.radius, cy);\n    this.dotsPath.arc(cx, cy, this.radius, 0, 2 * Math.PI);\n  }\n\n  /**\n   * Returns the Arrays of Path2D objects that represent all the traces.\n   *\n   * @returns {Object}\n   */\n  paths(): TracePaths {\n    return {\n      linePath: this.linePath,\n      dotsPath: this.dotsPath,\n    };\n  }\n}\n\nexport interface Point {\n  x: number;\n  y: number;\n}\n\nconst invalidPoint: Point = {\n  x: Number.MIN_SAFE_INTEGER,\n  y: Number.MIN_SAFE_INTEGER,\n};\n\nconst pointIsValid = (p: Point): boolean => p.x !== invalidPoint.x;\n\nexport interface Rect extends Point {\n  width: number;\n  height: number;\n}\n\n/**\n * Convert rect in domain units into canvas coordinates using the given range.\n *\n * Presumes the rect was previously gotten from rectFromRangeInvert, so we don't\n * need to flip top and bottom.\n */\nexport const rectFromRange = (range: Range, rect: Rect): Rect => {\n  const cleft = range.x(rect.x);\n  const ctop = range.y(rect.y);\n  const cright = range.x(rect.x + rect.width);\n  const cbottom = range.y(rect.y + rect.height);\n  return {\n    x: cleft,\n    y: ctop,\n    width: cright - cleft,\n    height: cbottom - ctop,\n  };\n};\n\n/**\n * Convert rect in canvas units into domain units given the given range.\n *\n * Presumes this comes from a dragged out mouse region, which could be backwards\n * and/or upside down, so corrections are done to the corners.\n */\nexport const rectFromRangeInvert = (range: Range, rect: Rect): Rect => {\n  let left = rect.x;\n  let top = rect.y;\n  let right = rect.x + rect.width;\n  let bottom = rect.y + rect.height;\n  if (right < left) {\n    [left, right] = [right, left];\n  }\n  // We do this backwards since range.y then does a second direction reversal,\n  // i.e. Canvas y-axis is in the opposite direction of the y-axis we use in\n  // the data units.\n  if (top < bottom) {\n    [bottom, top] = [top, bottom];\n  }\n\n  return {\n    x: range.x.invert(left),\n    y: range.y.invert(top),\n    width: range.x.invert(right) - range.x.invert(left),\n    height: range.y.invert(bottom) - range.y.invert(top),\n  };\n};\n\nconst defaultRect: Rect = {\n  x: 0,\n  y: 0,\n  width: 0,\n  height: 0,\n};\n\ninterface SearchPoint extends Point {\n  // Source coordinates.\n  sx: number;\n  sy: number;\n  name: string;\n}\n\n/**\n * @class Builds a kdTree for searcing for nearest points to the mouse.\n */\nclass SearchBuilder {\n  // TODO(jcgregorio) Change to Range.\n  private xRange: d3Scale.ScaleLinear<number, number>;\n\n  private yRange: d3Scale.ScaleLinear<number, number>;\n\n  private points: SearchPoint[];\n\n  constructor(\n    xRange: d3Scale.ScaleLinear<number, number>,\n    yRange: d3Scale.ScaleLinear<number, number>\n  ) {\n    this.xRange = xRange;\n    this.yRange = yRange;\n    this.points = [];\n  }\n\n  /**\n   * Add a point to the kdTree.\n   *\n   * Note that add() stores the x and y coords as 'sx' and 'sy' in the KDTree nodes,\n   * and the canvas coords, which are computed from sx and sy are stored as 'x'\n   * and 'y' in the KDTree nodes.\n   *\n   * @param {Number} x - X coordinate in source coordinates.\n   * @param {Number} y - Y coordinate in source coordinates.\n   * @param {String} name - The trace name.\n   */\n  add(x: number, y: number, name: string) {\n    if (name.startsWith(SPECIAL)) {\n      return;\n    }\n\n    // Convert source coord into canvas coords.\n    const cx = this.xRange(x);\n    const cy = this.yRange(y);\n\n    this.points.push({\n      x: cx,\n      y: cy,\n      sx: x,\n      sy: y,\n      name,\n    });\n  }\n\n  /**\n   * Returns a kdTree that contains all the points being plotted.\n   *\n   * @returns {KDTree}\n   */\n  kdTree() {\n    const distance = (a: KDPoint, b: KDPoint) => {\n      const dx = a.x - b.x;\n      const dy = a.y - b.y;\n      return dx * dx + dy * dy;\n    };\n\n    return new KDTree(this.points, distance, ['x', 'y']);\n  }\n}\n\n// Returns true if pt is in rect.\nfunction inRect(pt: Point, rect: Rect): boolean {\n  return (\n    pt.x >= rect.x && pt.x < rect.x + rect.width && pt.y >= rect.y && pt.y < rect.y + rect.height\n  );\n}\n\n// Restricts pt to rect.\nfunction clampToRect(pt: Point, rect: Rect) {\n  if (pt.x < rect.x) {\n    pt.x = rect.x;\n  } else if (pt.x > rect.x + rect.width) {\n    pt.x = rect.x + rect.width;\n  }\n  if (pt.y < rect.y) {\n    pt.y = rect.y;\n  } else if (pt.y > rect.y + rect.height) {\n    pt.y = rect.y + rect.height;\n  }\n}\n\n// Clip the given Canvas2D context to the given rect.\nfunction clipToRect(ctx: CanvasRenderingContext2D, rect: Rect) {\n  ctx.beginPath();\n  ctx.rect(rect.x, rect.y, rect.width, rect.height);\n  ctx.clip();\n}\n\n// All the data for a single trace.\ninterface LineData {\n  name: string;\n  values: number[];\n  color: string;\n  detail: TracePaths;\n  summary: TracePaths;\n}\n\nexport interface AnomalyData {\n  x: number;\n  y: number;\n  anomaly: Anomaly;\n  highlight: boolean;\n}\n\nexport interface MousePosition {\n  clientX: number;\n  clientY: number;\n}\n\ninterface MouseMoveRaw extends MousePosition {\n  // Is the shift key being pressed as the mouse moves.\n  shiftKey: boolean;\n}\n\ninterface HoverPoint extends Point {\n  // The trace id.\n  name: string;\n}\n\ninterface Label extends Point {\n  // The text value of the label.\n  text: string;\n}\n\ninterface CrosshairPoint extends Point {\n  shift: boolean;\n}\n\n// Common information for both the Summary and Detail display areas.\nexport interface Area {\n  rect: Rect;\n  axis: {\n    path: Path2D;\n    labels: Label[];\n  };\n  range: Range;\n}\n\ntype SummaryArea = Area;\n\ninterface DetailArea extends Area {\n  yaxis: {\n    path: Path2D;\n    labels: Label[];\n  };\n}\n\n// Describes the zoom in terms of x-axis source values.\nexport type ZoomRange = [number, number] | null;\n\n// Used for both the trace_selected and trace_focused events.\nexport interface PlotSimpleSkTraceEventDetails {\n  x: number;\n  y: number;\n  // DOM position of x in Pixels\n  xPos?: number;\n  // DOM position of y in Pixels\n  yPos?: number;\n  // The trace id.\n  name: string;\n}\n\nexport interface PlotSimpleSkZoomEventDetails {\n  xBegin: tick;\n  xEnd: tick;\n}\n\n/**\n * The type of zoom being done, or 'no-zoom' if no zoom is currently being done.\n */\nexport type ZoomDragType = 'no-zoom' | 'details' | 'summary';\n\nexport class PlotSimpleSk extends ElementSk {\n  /** The location of the XBar. See the xbar property. */\n  private _xbar: number = -1;\n\n  /** If true then draw dots on the traces. */\n  private _dots: boolean = true;\n\n  /** The locations of the background bands. See bands property. */\n  private _bands: number[] = [];\n\n  private _anomalyDataMap: { [key: string]: AnomalyData[] } = {};\n\n  private _userIssueMap: { [key: string]: { [key: number]: IssueDetail } } = {};\n\n  private _showCrosshairLabel: boolean = true;\n\n  /** A map of trace names to 'true' of traces that are highlighted. */\n  private highlighted: { [key: string]: boolean } = {};\n\n  /**\n   *  The data we are plotting.\n   *  An array of objects of this form:\n   *\n   *   {\n   *     name: key,\n   *     values: [1.0, 1.1, 0.9, ...],\n   *     detail: {\n   *       linePath: Path2D,\n   *       dotsPath: Path2D,\n   *     },\n   *     summary: {\n   *       linePath: Path2D,\n   *       dotsPath: Path2D,\n   *     },\n   *   }\n   */\n  private lineData: LineData[] = [];\n\n  /** An array of tick objects the same length as the values in lineData. */\n  private labels: tick[] = [];\n\n  /**\n   * The current zoom, either null or an array of two values in source x\n   * coordinates, e.g. [1, 12].\n   */\n  private _zoom: ZoomRange = null;\n\n  /** The source coordinate where a zoom started. */\n  private zoomBegin: number = 0;\n\n  /** The zoom rectangle on the details region. Stored in destination units. */\n  private zoomRect: Rect = defaultRect;\n\n  /**\n   * detailsZoomRangesStack and inactiveZoomRangesStack work together to manage\n   * a stack of zoom levels. As new zoom ranges are dragged out they are pushed\n   * onto detailsZoomRangesStack, and as the mouse wheel is turned we push/pop\n   * zoom ranges between detailsZoomRangesStack and inactiveZoomRangesStack.\n   *\n   * When plotting we only look at the top of the active stack, i.e. the end of\n   * detailsZoomRangesStack.\n   *\n   * detailsZoomRangesStack is a stack of zoom ranges, each zoom range in the\n   * stack represents a smaller area than the zoom range below it on the stack.\n   * Zoom ranges are stored in domain units.\n   */\n  private detailsZoomRangesStack: Rect[] = [];\n\n  /**\n   * As we use the mouse wheel to move through zooms we store the ones we've\n   * popped off of detailsZoomRangesStack here.\n   *\n   * Zoom ranges are stored in domain units.\n   */\n  private inactiveDetailsZoomRangesStack: Rect[] = [];\n\n  /**\n   * True if we are currently drag zooming, i.e. the mouse is pressed and moving\n   * over the summary.\n   */\n  private inZoomDrag: ZoomDragType = 'no-zoom';\n\n  /** The Canvas 2D context of the traces canvas. */\n  private ctx: CanvasRenderingContext2D | null = null;\n\n  /** The Canvas 2D context of the overlay canvas. */\n  private overlayCtx: CanvasRenderingContext2D | null = null;\n\n  /** The window.devicePixelRatio. */\n  private scale: number = 1.0;\n\n  /**\n   * A copy of the clientX, clientY, and shiftKey values of mousemove events,\n   * or null if a mousemove event hasn't occurred since the last time it was\n   * processed.\n   */\n  private mouseMoveRaw: MouseMoveRaw | null = null;\n\n  /**\n   * A kdTree for all the points being displayed, in source coordinates. Is\n   * null if no traces are being displayed.\n   */\n  private pointSearch: KDTree<SearchPoint> | null = null;\n\n  /**\n   * The closest trace point to the mouse. May be {} if no traces are\n   * displayed or the mouse hasn't moved over the canvas yet. Has the form:\n   *   {\n   *     x: x,\n   *     y: y,\n   *     name: String, // name of trace\n   *   }\n   */\n  private hoverPt: HoverPoint = {\n    x: -1,\n    y: -1,\n    name: '',\n  };\n\n  /**\n   * The location of the crosshair in canvas coordinates. Of the form:\n   *   {\n   *     x: x,\n   *     y: y,\n   *     shift: Boolean,\n   *   }\n   *\n   * The value of shift is true of the shift key is being pressed while the\n   * mouse moves.\n   * }\n   */\n  private crosshair: CrosshairPoint = {\n    x: -1,\n    y: -1,\n    shift: false,\n  };\n\n  /** All the info we need about the summary area. */\n  private summaryArea: SummaryArea = {\n    rect: {\n      x: 0,\n      y: 0,\n      width: 0,\n      height: 0,\n    },\n    axis: {\n      path: new Path2D(), // Path2D.\n      labels: [], // The labels and locations to draw them. {x, y, text}.\n    },\n    range: {\n      x: d3Scale.scaleLinear(),\n      y: d3Scale.scaleLinear(),\n    },\n  };\n\n  /** All the info we need about the details area. */\n  private detailArea: DetailArea = {\n    rect: {\n      x: 0,\n      y: 0,\n      width: 0,\n      height: 0,\n    },\n    axis: {\n      path: new Path2D(), // Path2D.\n      labels: [], // The labels and locations to draw them. {x, y, text}.\n    },\n    yaxis: {\n      path: new Path2D(),\n      labels: [], // The labels and locations to draw them. {x, y, text}.\n    },\n    range: {\n      x: d3Scale.scaleLinear(),\n      y: d3Scale.scaleLinear(),\n    },\n  };\n\n  /**\n   * A task to rebuild the k-d search tree used for finding the closest point\n   * to the mouse. The actual value is a window.setTimer timerId or zero if no\n   * task is scheduled.\n   *\n   * See https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/\n   * for details on tasks vs microtasks.\n   */\n  private recalcSearchTask: number = 0;\n\n  /**\n   * A task to do the actual re-draw work of a zoom. The actual value is a\n   * window.setTimer timerId or zero if no task is scheduled.\n   *\n   * See https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/\n   * for details on tasks vs microtasks.\n   */\n  private zoomTask: number = 0;\n\n  /**\n   * A formatter that prints numbers nicely, such as adding commas. Used when\n   * display the hover text.\n   */\n  private numberFormatter: Intl.NumberFormat = new Intl.NumberFormat();\n\n  private SUMMARY_HEIGHT!: number; // px\n\n  private SUMMARY_BAR_WIDTH!: number; // px\n\n  private DETAIL_BAR_WIDTH!: number; // px\n\n  private SUMMARY_HIGHLIGHT_LINE_WIDTH!: number; // px\n\n  private DETAIL_RADIUS!: number; // px\n\n  private SUMMARY_RADIUS!: number; // The radius of points in the summary area. (px)\n\n  private MARGIN!: number; // The margin around the details and summary areas. (px)\n\n  private LEFT_MARGIN!: number; // px\n\n  private Y_AXIS_TICK_LENGTH!: number; // px\n\n  private ANOMALY_BACKGROUND!: string; // CSS color.\n\n  private ANOMALY_HIGHLIGHT_COLOR!: string; // CSS color.\n\n  private UNTRIAGED_COLOR!: string; // CSS color.\n\n  private REGRESSION_COLOR!: string; // CSS color.\n\n  private IMPROVEMENT_COLOR!: string; // CSS color.\n\n  private ANOMALY_RADIUS!: number; // px\n\n  private ANOMALY_FONT_SIZE!: number; // px\n\n  private ANOMALY_FONT!: string; // CSS font string.\n\n  private LABEL_FONT_SIZE!: number; // px\n\n  private LABEL_MARGIN!: number; // px\n\n  private LABEL_FONT!: string; // CSS font string.\n\n  private ZOOM_BAR_LINE_WIDTH!: number; // px\n\n  private HOVER_LINE_WIDTH!: number; // px\n\n  private LABEL_COLOR!: string; // CSS color.\n\n  private LABEL_BACKGROUND!: string; // CSS color.\n\n  private CROSSHAIR_COLOR!: string; // CSS color.\n\n  private BAND_COLOR!: string; // CSS color.\n\n  constructor() {\n    super(PlotSimpleSk.template);\n\n    this._upgradeProperty('width');\n    this._upgradeProperty('height');\n    this._upgradeProperty('bands');\n    this._upgradeProperty('xbar');\n    this._upgradeProperty('hightlight');\n    this._upgradeProperty('zoom');\n\n    this.updateScaledMeasurements();\n  }\n\n  // Note that in both of the canvas elements we are setting a CSS transform that\n  // takes into account window.devicePixelRatio, that is, we are drawing to a\n  // scale that matches the displays native resolution and then scaling that back\n  // to fit on the page. Also see updateScaledMeasurements for how the device\n  // pixel ratio affects all of our pixel calculations.\n  private static template = (ele: PlotSimpleSk) => html`\n    <canvas\n      class=\"traces\"\n      width=${ele.width * window.devicePixelRatio}\n      height=${ele.height * window.devicePixelRatio}\n      style=\"transform-origin: 0 0; transform: scale(${1 / window.devicePixelRatio});\"></canvas>\n    <canvas\n      class=\"overlay\"\n      width=${ele.width * window.devicePixelRatio}\n      height=${ele.height * window.devicePixelRatio}\n      style=\"transform-origin: 0 0; transform: scale(${1 / window.devicePixelRatio});\"></canvas>\n  `;\n\n  connectedCallback(): void {\n    super.connectedCallback();\n\n    this.render();\n\n    const resizeObserver = new ResizeObserver((entries: ResizeObserverEntry[]) => {\n      // We add this to avoid resizeObserver loop limit errors in unit tests\n      // https://stackoverflow.com/a/58701523\n      window.requestAnimationFrame(() => {\n        if (!Array.isArray(entries) || !entries.length) {\n          return;\n        }\n        // We need to dynamically resize the canvas elements since they don't do\n        // that themselves.\n        entries.forEach((entry) => {\n          this.width = entry.contentRect.width;\n          this.height = entry.contentRect.height;\n        });\n      });\n    });\n    resizeObserver.observe(this);\n\n    this.addEventListener('mousemove', (e: MouseEvent) => {\n      // Do as little as possible here. The raf() function will periodically\n      // check if the mouse has moved and trigger the appropriate redraws.\n      this.mouseMoveRaw = {\n        clientX: e.clientX,\n        clientY: e.clientY,\n        shiftKey: e.shiftKey,\n      };\n    });\n\n    this.addEventListener('mousedown', (e: MouseEvent) => {\n      e.preventDefault();\n      const pt = this.eventToCanvasPt(e);\n      // If you click in the summary area then begin zooming via drag.\n      if (inRect(pt, this.summaryArea.rect!)) {\n        const zx = this.summaryArea.range.x.invert(pt.x);\n        this.inZoomDrag = 'summary';\n        this.zoomBegin = zx;\n        this.zoom = [zx, zx + 0.01]; // Add a smidge to the second zx to avoid a degenerate detail plot.\n\n        // Zooming via the summary area clears all details area zooms.\n        this.detailsZoomRangesStack = [];\n        this.inactiveDetailsZoomRangesStack = [];\n      }\n      if (inRect(pt, this.detailArea.rect!)) {\n        this.inZoomDrag = 'details';\n        this.zoomRect = {\n          x: pt.x,\n          y: pt.y,\n          width: 0,\n          height: 0,\n        };\n      }\n    });\n\n    this.addEventListener('mouseup', (e: MouseEvent) => {\n      e.preventDefault();\n      if (this.inZoomDrag !== 'no-zoom') {\n        this.dispatchZoomEvent();\n      }\n      if (this.inZoomDrag === 'details') {\n        this.doDetailsZoom();\n      }\n      this.inZoomDrag = 'no-zoom';\n    });\n\n    this.addEventListener('mouseleave', (e: MouseEvent) => {\n      e.preventDefault();\n      if (this.inZoomDrag !== 'no-zoom') {\n        this.dispatchZoomEvent();\n      }\n      if (this.inZoomDrag === 'details') {\n        this.doDetailsZoom();\n      }\n      this.inZoomDrag = 'no-zoom';\n    });\n\n    this.addEventListener('click', (e) => {\n      const pt = this.eventToCanvasPt(e);\n      if (!inRect(pt, this.detailArea.rect)) {\n        return;\n      }\n      if (!this.pointSearch) {\n        return;\n      }\n      const closest = this.pointSearch.nearest(pt);\n      const detail = {\n        x: closest.sx,\n        y: closest.sy,\n        xPos: closest.x / this.scale,\n        yPos: closest.y / this.scale,\n        name: closest.name,\n      };\n      this.dispatchEvent(\n        new CustomEvent<PlotSimpleSkTraceEventDetails>('trace_selected', {\n          detail,\n          bubbles: true,\n        })\n      );\n    });\n\n    // If the user toggles the theme to/from darkmode then redraw.\n    document.addEventListener('theme-chooser-toggle', () => {\n      this.render();\n    });\n\n    window.requestAnimationFrame(this.raf.bind(this));\n  }\n\n  attributeChangedCallback(_: string, oldValue: string, newValue: string): void {\n    if (oldValue !== newValue) {\n      this.render();\n    }\n  }\n\n  // Call this when the width or height attrs have changed.\n  render(): void {\n    this._render();\n    const canvas = this.querySelector<HTMLCanvasElement>('canvas.traces')!;\n    const overlayCanvas = this.querySelector<HTMLCanvasElement>('canvas.overlay')!;\n    if (canvas) {\n      this.ctx = canvas.getContext('2d');\n      this.overlayCtx = overlayCanvas.getContext('2d');\n      this.scale = window.devicePixelRatio;\n      this.updateScaledMeasurements();\n      this.updateScaleRanges();\n      this.recalcDetailPaths();\n      this.recalcSummaryPaths();\n      this.drawTracesCanvas();\n    }\n  }\n\n  /**\n   * Adds lines to be displayed.\n   *\n   * Any line id that begins with 'special' will be treated specially,\n   * i.e. it will be presented as a dashed black line that doesn't\n   * generate events. This may be useful for adding a line at y=0,\n   * or a reference trace.\n   *\n   * @param {Object} lines - A map from trace id to arrays of y values.\n   * @param {Array} labels - An array of Date objects the same length as the values.\n   *\n   */\n  addLines(lines: { [key: string]: number[] | null }, labels: tick[]): void {\n    const keys = Object.keys(lines);\n    if (keys.length === 0) {\n      return;\n    }\n    const startedEmpty = this._zoom === null && this.lineData.length === 0;\n    if (labels.length > 0) {\n      this.labels = labels;\n    }\n\n    // Convert into the format we will eventually expect.\n    keys.forEach((key) => {\n      // You can't encode NaN in JSON, so convert sentinel values to NaN here so\n      // that dsArray functions will operate correctly. Make a copy so the NaN's\n      // don't migrate out of plot-simple.\n      const values = [...lines[key]!];\n      values.forEach((x, i) => {\n        if (x === MISSING_DATA_SENTINEL) {\n          values[i] = NaN;\n        }\n      });\n\n      this.lineData.push({\n        name: key,\n        values,\n        color: 'black',\n        detail: {\n          linePath: null,\n          dotsPath: null,\n        },\n        summary: {\n          linePath: null,\n          dotsPath: null,\n        },\n      });\n    });\n\n    // Set the zoom if we just added data for the first time.\n    if (startedEmpty && this.lineData.length > 0) {\n      this._zoom = [0, this.lineData[0].values.length - 1];\n    }\n\n    this.updateScaleDomains();\n    this.recalcSummaryPaths();\n    this.recalcDetailPaths();\n    this.drawTracesCanvas();\n  }\n\n  /**\n   * Delete all the lines whose ids are in 'ids' from being plotted.\n   *\n   * @param {Array<string>} ids - The trace ids to remove.\n   */\n  deleteLines(ids: string[]): void {\n    this.lineData = this.lineData.filter((line) => ids.indexOf(line.name) === -1);\n    if (this.anomalyDataMap !== null) {\n      ids.forEach((id) => {\n        if (id in this.anomalyDataMap) {\n          delete this.anomalyDataMap[id];\n        }\n      });\n    }\n    const onlySpecialLinesRemaining = this.lineData.every((line) => line.name.startsWith(SPECIAL));\n    if (onlySpecialLinesRemaining) {\n      this.removeAll();\n    } else {\n      this.updateScaleDomains();\n      this.recalcSummaryPaths();\n      this.recalcDetailPaths();\n      this.drawTracesCanvas();\n    }\n  }\n\n  /**\n   * Remove all lines from plot.\n   */\n  removeAll(): void {\n    this.lineData = [];\n    this.anomalyDataMap = {};\n    this.labels = [];\n    this.highlight = [];\n    this.hoverPt = {\n      x: -1,\n      y: -1,\n      name: '',\n    };\n    this.pointSearch = null;\n    this.crosshair = {\n      x: -1,\n      y: -1,\n      shift: false,\n    };\n    this.mouseMoveRaw = null;\n    this.highlighted = {};\n    this._xbar = -1;\n    this._zoom = null;\n    this.inZoomDrag = 'no-zoom';\n    this.detailsZoomRangesStack = [];\n    this.inactiveDetailsZoomRangesStack = [];\n    this.drawTracesCanvas();\n  }\n\n  /**\n   * Return the names of all the lines being plotted, not including SPECIAL\n   * names.\n   * */\n  getLineNames(): string[] {\n    const ret: string[] = [];\n    this.lineData.forEach((line) => {\n      if (line.name.startsWith(SPECIAL)) {\n        return;\n      }\n      ret.push(line.name);\n    });\n    return ret;\n  }\n\n  /**\n   * Update all the things that look like constants, but are really dependent on\n   * window.devicePixelRatio or the current CSS styling.\n   */\n  private updateScaledMeasurements() {\n    // The height of the summary area.\n    if (this.summary) {\n      this.SUMMARY_HEIGHT = 50 * this.scale; // px\n    } else {\n      this.SUMMARY_HEIGHT = 0;\n    }\n\n    this.SUMMARY_BAR_WIDTH = 2 * this.scale; // px\n\n    this.DETAIL_BAR_WIDTH = 3 * this.scale; // px\n\n    this.SUMMARY_HIGHLIGHT_LINE_WIDTH = 3 * this.scale;\n\n    // The radius of points in the details area.\n    this.DETAIL_RADIUS = 3 * this.scale; // px\n\n    // The radius of points in the summary area.\n    this.SUMMARY_RADIUS = 2 * this.scale; // px\n\n    // The margin around the details and summary areas.\n    this.MARGIN = 32 * this.scale; // px\n\n    this.LEFT_MARGIN = 2 * this.MARGIN; // px\n\n    this.Y_AXIS_TICK_LENGTH = this.MARGIN / 4; // px\n\n    this.ANOMALY_RADIUS = 12 * this.scale; // px\n\n    this.ANOMALY_FONT_SIZE = 26 * this.scale;\n\n    this.ANOMALY_FONT = `${this.ANOMALY_FONT_SIZE}px Material Icons`;\n\n    this.LABEL_FONT_SIZE = 14 * this.scale; // px\n\n    this.LABEL_MARGIN = 6 * this.scale; // px\n\n    this.LABEL_FONT = `${this.LABEL_FONT_SIZE}px Roboto,Helvetica,Arial,Bitstream Vera Sans,sans-serif`;\n\n    this.ZOOM_BAR_LINE_WIDTH = 3 * this.scale; // px\n\n    this.HOVER_LINE_WIDTH = 1 * this.scale; // px\n\n    this.CROSSHAIR_COLOR = '#f00';\n\n    this.BAND_COLOR = '#888';\n\n    // Pull out the computed colors.\n    const style = getComputedStyle(this);\n\n    // Start by using the computed colors.\n    this.LABEL_COLOR = style.color;\n    this.LABEL_BACKGROUND = style.backgroundColor;\n\n    this.ANOMALY_BACKGROUND = style.getPropertyValue('--on-surface');\n    this.UNTRIAGED_COLOR = style.getPropertyValue('--surface');\n    this.IMPROVEMENT_COLOR = style.getPropertyValue('--success');\n    this.REGRESSION_COLOR = style.getPropertyValue('--failure');\n    this.ANOMALY_HIGHLIGHT_COLOR = style.getPropertyValue('--warning');\n\n    // Now override with CSS variables if they are present.\n    const onBackground = style.getPropertyValue('--on-backgroud');\n    if (onBackground !== '') {\n      this.LABEL_COLOR = onBackground;\n    }\n\n    const background = style.getPropertyValue('--backgroud');\n    if (background !== '') {\n      this.LABEL_BACKGROUND = background;\n    }\n\n    const errorColor = style.getPropertyValue('--error');\n    if (errorColor !== '') {\n      this.CROSSHAIR_COLOR = errorColor;\n    }\n\n    const secondaryColor = style.getPropertyValue('--secondary');\n    if (secondaryColor !== '') {\n      this.BAND_COLOR = secondaryColor;\n    }\n  }\n\n  private dispatchZoomEvent() {\n    if (!this._zoom) {\n      return;\n    }\n    let beginIndex = Math.floor(this._zoom[0] - 0.1);\n    if (beginIndex < 0) {\n      beginIndex = 0;\n    }\n    let endIndex = Math.ceil(this._zoom[1] + 0.1);\n    if (endIndex > this.labels.length - 1) {\n      endIndex = this.labels.length - 1;\n    }\n    const detail = {\n      xBegin: this.labels[beginIndex],\n      xEnd: this.labels[endIndex],\n    };\n    this.dispatchEvent(\n      new CustomEvent<PlotSimpleSkZoomEventDetails>('zoom', {\n        detail,\n        bubbles: true,\n      })\n    );\n  }\n\n  /**\n   * Convert mouse event coordinates to a canvas point.\n   *\n   * @param {Object} e - A mouse event or an object that has the coords stored\n   * in clientX and clientY.\n   */\n  private eventToCanvasPt(e: MouseMoveRaw) {\n    const clientRect = this.ctx!.canvas.getBoundingClientRect();\n    return {\n      x: (e.clientX - clientRect.left) * this.scale,\n      y: (e.clientY - clientRect.top) * this.scale,\n    };\n  }\n\n  // Handles requestAnimationFrame callbacks.\n  private raf() {\n    // Always queue up our next raf first.\n    window.requestAnimationFrame(() => this.raf());\n\n    // Bail out early if the mouse hasn't moved.\n    if (this.mouseMoveRaw === null) {\n      return;\n    }\n    if (this.inZoomDrag === 'no-zoom') {\n      const pt = this.eventToCanvasPt(this.mouseMoveRaw);\n\n      // Update _hoverPt if needed.\n      if (this.pointSearch) {\n        const closest = this.pointSearch.nearest(pt);\n        const detail = {\n          x: closest.sx,\n          y: closest.sy,\n          xPos: closest.x / this.scale,\n          yPos: closest.y / this.scale,\n          name: closest.name,\n        };\n        if (detail.x !== this.hoverPt.x || detail.y !== this.hoverPt.y) {\n          this.hoverPt = detail;\n          this.dispatchEvent(\n            new CustomEvent<PlotSimpleSkTraceEventDetails>('trace_focused', {\n              detail,\n              bubbles: true,\n            })\n          );\n        }\n      }\n\n      // Update crosshair.\n      if (this.mouseMoveRaw.shiftKey && this.pointSearch) {\n        this.crosshair = {\n          x: pt.x,\n          y: pt.y,\n          shift: false,\n        };\n        clampToRect(this.crosshair, this.detailArea.rect);\n      } else {\n        this.crosshair = {\n          x: this.detailArea.range.x(this.hoverPt.x),\n          y: this.detailArea.range.y(this.hoverPt.y),\n          shift: true,\n        };\n      }\n      this.drawOverlayCanvas();\n    } else {\n      // We are zooming.\n      const pt = this.eventToCanvasPt(this.mouseMoveRaw);\n\n      if (this.inZoomDrag === 'summary') {\n        clampToRect(pt, this.summaryArea.rect);\n\n        // x in source coordinates.\n        const sx = this.summaryArea.range.x.invert(pt.x);\n\n        // Set zoom, always making sure we go from lowest to highest.\n        let zoom: ZoomRange = [this.zoomBegin, sx];\n        if (this.zoomBegin > sx) {\n          zoom = [sx, this.zoomBegin];\n        }\n        this.zoom = zoom;\n      } else if (this.inZoomDrag === 'details') {\n        clampToRect(pt, this.detailArea.rect);\n        this.zoomRect.width = pt.x - this.zoomRect.x;\n        this.zoomRect.height = pt.y - this.zoomRect.y;\n        this.drawOverlayCanvas();\n      }\n    }\n    this.mouseMoveRaw = null;\n  }\n\n  /**\n   * This is a super simple hash (h = h * 31 + x_i) currently used\n   * for things like assigning colors to graphs based on trace ids. It\n   * shouldn't be used for anything more serious than that.\n   *\n   * @param {String} s - A string to hash.\n   * @return {Number} A 32 bit hash for the given string.\n   */\n  private hashString(s: string) {\n    let hash = 0;\n    for (let i = s.length - 1; i >= 0; i--) {\n      // eslint-disable-next-line no-bitwise\n      hash = (hash << 5) - hash + s.charCodeAt(i);\n      // eslint-disable-next-line no-bitwise\n      hash |= 0;\n    }\n    return Math.abs(hash);\n  }\n\n  // Rebuilds our cache of Path2D objects we use for quick rendering.\n  private recalcSummaryPaths() {\n    this.lineData.forEach((line) => {\n      // Need to pass in the x and y ranges, and the dot radius.\n      if (line.name.startsWith(SPECIAL)) {\n        line.color = this.LABEL_COLOR;\n      } else {\n        line.color = defaultColors[(this.hashString(line.name) % (defaultColors.length - 1)) + 1];\n      }\n\n      const summaryBuilder = new PathBuilder(\n        this.summaryArea.range.x,\n        this.summaryArea.range.y,\n        this.SUMMARY_RADIUS\n      );\n\n      line.values.forEach((y, x) => {\n        if (Number.isNaN(y)) {\n          return;\n        }\n        summaryBuilder.add(x, y);\n      });\n      line.summary = summaryBuilder.paths();\n    });\n\n    // Build summary x-axis.\n    this.recalcXAxis(this.summaryArea, this.labels, 0);\n  }\n\n  // Rebuilds our cache of Path2D objects we use for quick rendering.\n  private recalcDetailPaths() {\n    const domain = this.detailArea.range.x.domain();\n    domain[0] = Math.floor(domain[0] - 0.1);\n    domain[1] = Math.ceil(domain[1] + 0.1);\n    this.lineData.forEach((line) => {\n      // Need to pass in the x and y ranges, and the dot radius.\n      if (line.name.startsWith(SPECIAL)) {\n        line.color = this.LABEL_COLOR;\n      } else {\n        line.color = defaultColors[(this.hashString(line.name) % (defaultColors.length - 1)) + 1];\n      }\n\n      const detailBuilder = new PathBuilder(\n        this.detailArea.range.x,\n        this.detailArea.range.y,\n        this.DETAIL_RADIUS\n      );\n\n      let previousPoint: Point = invalidPoint;\n      let addedPointFromBeforeTheDomain = false;\n      let addedPointFromAfterTheDomain = false;\n      line.values.forEach((y, x) => {\n        if (Number.isNaN(y)) {\n          return;\n        }\n        // Always add in one point after the domain so we draw all visible line\n        // segments.\n        if (x > domain[1] && !addedPointFromAfterTheDomain) {\n          detailBuilder.add(x, y);\n          addedPointFromAfterTheDomain = true;\n          return;\n        }\n        if (x < domain[0] || x > domain[1]) {\n          previousPoint = { x: x, y: y };\n          return;\n        }\n        // Always add in one point before the domain so we draw all visible line\n        // segments.\n        if (!addedPointFromBeforeTheDomain) {\n          if (pointIsValid(previousPoint)) {\n            detailBuilder.add(previousPoint.x, previousPoint.y);\n          }\n          addedPointFromBeforeTheDomain = true;\n        }\n        detailBuilder.add(x, y);\n      });\n      line.detail = detailBuilder.paths();\n    });\n\n    // Build detail x-axis.\n    const detailDomain = this.detailArea.range.x.domain();\n    const labelOffset = Math.ceil(detailDomain[0]);\n    const detailLabels = this.labels.slice(\n      Math.ceil(detailDomain[0]),\n      Math.floor(detailDomain[1] + 1)\n    );\n    this.recalcXAxis(this.detailArea, detailLabels, labelOffset);\n\n    // Build detail y-axis.\n    this.recalcYAxis(this.detailArea);\n    this.recalcSearch();\n  }\n\n  // Recalculates the y-axis info.\n  private recalcYAxis(area: DetailArea) {\n    const yAxisPath = new Path2D();\n    const thinX = Math.floor(this.detailArea.rect.x) + 0.5; // Make sure we get a thin line. https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Applying_styles_and_colors#A_lineWidth_example\n    yAxisPath.moveTo(thinX, this.detailArea.rect.y);\n    yAxisPath.lineTo(thinX, this.detailArea.rect.y + this.detailArea.rect.height);\n    area.yaxis.labels = [];\n    area.range.y.ticks(NUM_Y_TICKS).forEach((t) => {\n      const label = {\n        x: 0,\n        y: Math.floor(area.range.y(t)) + 0.5,\n        text: `${this.numberFormatter.format(t)}`,\n      };\n      area.yaxis.labels.push(label);\n      yAxisPath.moveTo(thinX, label.y);\n      yAxisPath.lineTo(thinX - this.Y_AXIS_TICK_LENGTH, label.y);\n    });\n    area.yaxis.path = yAxisPath;\n  }\n\n  // Recalculates the x-axis info.\n  private recalcXAxis(area: Area, labels: tick[], labelOffset: number) {\n    const xAxisPath = new Path2D();\n    const thinY = Math.floor(area.rect.y) + 0.5; // Make sure we get a thin line.\n    xAxisPath.moveTo(area.rect.x + 0.5, thinY);\n    xAxisPath.lineTo(area.rect.x + 0.5 + area.rect.width, thinY);\n    area.axis.labels = [];\n    labels.forEach((tick) => {\n      const label = {\n        x: Math.floor(area.range.x(tick.x + labelOffset)) + 0.5,\n        y: area.rect.y - this.MARGIN / 2,\n        text: tick.text,\n      };\n      area.axis.labels.push(label);\n      xAxisPath.moveTo(label.x, area.rect.y);\n      xAxisPath.lineTo(label.x, area.rect.y - this.MARGIN / 2);\n    });\n    area.axis.path = xAxisPath;\n  }\n\n  // Rebuilds the kdTree we use to look up closest points.\n  private recalcSearch() {\n    if (this.recalcSearchTask) {\n      return;\n    }\n    this.recalcSearchTask = window.setTimeout(() => this.recalcSearchImpl());\n  }\n\n  private recalcSearchImpl() {\n    if (this.zoomTask) {\n      // If there is a pending zoom task then let that complete first since zooming\n      // invalidates the search tree and it needs to be built again.\n      this.recalcSearchTask = window.setTimeout(() => this.recalcSearchImpl());\n      return;\n    }\n    const domain = this.detailArea.range.x.domain();\n    domain[0] = Math.floor(domain[0] - 0.1);\n    domain[1] = Math.ceil(domain[1] + 0.1);\n    const searchBuilder = new SearchBuilder(this.detailArea.range.x, this.detailArea.range.y);\n    this.lineData.forEach((line) => {\n      line.values.forEach((y, x) => {\n        if (Number.isNaN(y)) {\n          return;\n        }\n        if (x < domain[0] || x > domain[1]) {\n          return;\n        }\n        searchBuilder.add(x, y, line.name);\n      });\n    });\n    this.pointSearch = searchBuilder.kdTree();\n    this.recalcSearchTask = 0;\n  }\n\n  // Updates all of our d3Scale domains.\n  private updateScaleDomains() {\n    let domainEnd = 1;\n    if (this.lineData && this.lineData.length) {\n      domainEnd = this.lineData[0].values.length - 1;\n    }\n    if (this._zoom) {\n      this.detailArea.range.x = this.detailArea.range.x.domain(this._zoom);\n    } else {\n      this.detailArea.range.x = this.detailArea.range.x.domain([0, domainEnd]);\n    }\n\n    this.summaryArea.range.x = this.summaryArea.range.x.domain([0, domainEnd]);\n\n    const domain = [\n      d3Array.min(this.lineData, (line) => d3Array.min(line.values))!,\n      d3Array.max(this.lineData, (line) => d3Array.max(line.values))!,\n    ];\n\n    this.detailArea.range.y = this.detailArea.range.y.domain(domain).nice();\n\n    this.summaryArea.range.y = this.summaryArea.range.y.domain(domain);\n\n    // If detailsZoomRangeStacks is not empty then it overrides the detail\n    // range.\n    if (this.detailsZoomRangesStack.length > 0) {\n      const zoom = this.detailsZoomRangesStack[this.detailsZoomRangesStack.length - 1];\n      this.detailArea.range.x = this.detailArea.range.x.domain([zoom.x, zoom.x + zoom.width]);\n      this.detailArea.range.y = this.detailArea.range.y.domain([zoom.y, zoom.y + zoom.height]);\n    }\n  }\n\n  // Updates all of our d3Scale ranges. Also updates detail and summary rects.\n  private updateScaleRanges() {\n    const width = this.ctx!.canvas.width;\n    const height = this.ctx!.canvas.height;\n\n    this.summaryArea.range.x = this.summaryArea.range.x.range([\n      this.LEFT_MARGIN,\n      width - this.MARGIN,\n    ]);\n\n    this.summaryArea.range.y = this.summaryArea.range.y.range([\n      this.SUMMARY_HEIGHT + this.MARGIN,\n      this.MARGIN,\n    ]);\n\n    this.detailArea.range.x = this.detailArea.range.x.range([\n      this.LEFT_MARGIN,\n      width - this.MARGIN,\n    ]);\n\n    this.detailArea.range.y = this.detailArea.range.y.range([\n      height - this.MARGIN,\n      this.SUMMARY_HEIGHT + 2 * this.MARGIN,\n    ]);\n\n    this.summaryArea.rect = {\n      x: this.LEFT_MARGIN,\n      y: this.MARGIN,\n      width: width - this.MARGIN - this.LEFT_MARGIN,\n      height: this.SUMMARY_HEIGHT,\n    };\n\n    this.detailArea.rect = {\n      x: this.LEFT_MARGIN,\n      y: this.SUMMARY_HEIGHT + 2 * this.MARGIN,\n      width: width - this.MARGIN - this.LEFT_MARGIN,\n      height: height - this.SUMMARY_HEIGHT - 3 * this.MARGIN,\n    };\n  }\n\n  private doDetailsZoom() {\n    // Don't actually do the zoom if the box isn't big enough.\n    if (\n      Math.abs(this.zoomRect.width) < MIN_MOUSE_MOVE_FOR_ZOOM ||\n      Math.abs(this.zoomRect.height) < MIN_MOUSE_MOVE_FOR_ZOOM\n    ) {\n      return;\n    }\n    this.detailsZoomRangesStack.push(rectFromRangeInvert(this.detailArea.range, this.zoomRect));\n\n    // We added a new zoom range, which means all the inactive zoom ranges are\n    // no longer valid.\n    this.inactiveDetailsZoomRangesStack = [];\n    this.inZoomDrag = 'no-zoom';\n    this._zoomImpl();\n  }\n\n  // Draw the contents of the overlay canvas.\n  private drawOverlayCanvas() {\n    // Always start by clearing the overlay.\n    const width = this.overlayCtx!.canvas.width;\n    const height = this.overlayCtx!.canvas.height;\n    const ctx = this.overlayCtx!;\n\n    ctx.clearRect(0, 0, width, height);\n\n    if (this.summary) {\n      // First clip to the summary region.\n      ctx.save();\n      {\n        // Block to scope save/restore.\n        clipToRect(ctx, this.summaryArea.rect);\n\n        // Draw the xbar.\n        this.drawXBar(ctx, this.summaryArea, this.SUMMARY_BAR_WIDTH);\n\n        // Draw the bands.\n        this.drawBands(ctx, this.summaryArea, this.SUMMARY_BAR_WIDTH);\n\n        // If detailsZoomRangeStacks is not empty then draw a box to indicate\n        // the zoomed region.\n        if (this.detailsZoomRangesStack.length > 0) {\n          const zoom = this.detailsZoomRangesStack[this.detailsZoomRangesStack.length - 1];\n          this.drawZoomRect(ctx, rectFromRange(this.summaryArea.range, zoom));\n        }\n\n        // Draw the zoom on the summary.\n        if (this._zoom !== null) {\n          ctx.lineWidth = this.ZOOM_BAR_LINE_WIDTH;\n          ctx.strokeStyle = this.LABEL_COLOR;\n\n          // Draw left bar.\n          const leftx = this.summaryArea.range.x(this._zoom[0]);\n          ctx.beginPath();\n          ctx.moveTo(leftx, this.summaryArea.rect.y);\n          ctx.lineTo(leftx, this.summaryArea.rect.y + this.summaryArea.rect.height);\n\n          // Draw right bar.\n          const rightx = this.summaryArea.range.x(this._zoom[1]);\n          ctx.moveTo(rightx, this.summaryArea.rect.y);\n          ctx.lineTo(rightx, this.summaryArea.rect.y + this.summaryArea.rect.height);\n          ctx.stroke();\n\n          // Draw gray boxes.\n          ctx.fillStyle = ZOOM_RECT_COLOR;\n          ctx.rect(\n            this.summaryArea.rect.x,\n            this.summaryArea.rect.y,\n            leftx - this.summaryArea.rect.x,\n            this.summaryArea.rect.height\n          );\n          ctx.rect(\n            rightx,\n            this.summaryArea.rect.y,\n            this.summaryArea.rect.x + this.summaryArea.rect.width - rightx,\n            this.summaryArea.rect.height\n          );\n\n          ctx.fill();\n        }\n      }\n      ctx.restore();\n    }\n\n    // Now clip to the detail region.\n    ctx.save();\n    {\n      // Block to scope save/restore.\n      clipToRect(ctx, this.detailArea.rect);\n\n      // Draw the xbar.\n      this.drawXBar(ctx, this.detailArea, this.DETAIL_BAR_WIDTH);\n\n      // Draw the bands.\n      this.drawBands(ctx, this.detailArea, this.DETAIL_BAR_WIDTH);\n\n      // Draw highlighted lines.\n      this.lineData.forEach((highlightedLine) => {\n        if (!(highlightedLine.name in this.highlighted)) {\n          return;\n        }\n        ctx.strokeStyle = highlightedLine.color;\n        ctx.fillStyle = this.LABEL_BACKGROUND;\n        ctx.lineWidth = this.SUMMARY_HIGHLIGHT_LINE_WIDTH;\n\n        ctx.stroke(highlightedLine.detail.linePath!);\n        if (this.dots) {\n          ctx.fill(highlightedLine.detail.dotsPath!);\n          ctx.stroke(highlightedLine.detail.dotsPath!);\n        }\n      });\n\n      // Find the line currently hovered over.\n      let line = null;\n      for (let i = 0; i < this.lineData.length; i++) {\n        if (this.lineData[i].name === this.hoverPt.name) {\n          line = this.lineData[i];\n          break;\n        }\n      }\n      if (line !== null) {\n        // Draw the hovered line and dots in a different color.\n        ctx.strokeStyle = HOVER_COLOR;\n        ctx.fillStyle = HOVER_COLOR;\n        ctx.lineWidth = this.HOVER_LINE_WIDTH;\n\n        // Just draw the dots, not the line.\n        if (this.dots) {\n          ctx.fill(line.detail.dotsPath!);\n          ctx.stroke(line.detail.dotsPath!);\n        }\n      }\n\n      this.drawUserIssues(ctx, this.detailArea);\n\n      // Draw the anomalies.\n      this.drawAnomalies(ctx, this.detailArea);\n\n      if (this.inZoomDrag === 'details') {\n        this.drawZoomRect(ctx, this.zoomRect);\n      } else if (this.inZoomDrag === 'no-zoom') {\n        // Draw the crosshairs.\n        ctx.strokeStyle = this.CROSSHAIR_COLOR;\n        ctx.lineWidth = AXIS_LINE_WIDTH;\n        ctx.beginPath();\n        const thinX = Math.floor(this.crosshair.x) + 0.5; // Make sure we get a thin line.\n        const thinY = Math.floor(this.crosshair.y) + 0.5; // Make sure we get a thin line.\n        ctx.moveTo(this.detailArea.rect.x, thinY);\n        ctx.lineTo(this.detailArea.rect.x + this.detailArea.rect.width, thinY);\n        ctx.moveTo(thinX, this.detailArea.rect.y);\n        ctx.lineTo(thinX, this.detailArea.rect.y + this.detailArea.rect.height);\n        ctx.stroke();\n\n        // Y label at crosshair if shift is pressed.\n        if (this.showCrosshairLabel && this.crosshair.shift) {\n          // Draw the label offset from the crosshair.\n          ctx.font = this.LABEL_FONT;\n          ctx.textBaseline = 'bottom';\n          ctx.textAlign = 'start';\n          const label = this.numberFormatter.format(this.hoverPt.y);\n          let x = this.crosshair.x + this.MARGIN;\n          let y = this.crosshair.y - this.MARGIN;\n\n          // First draw a white backdrop.\n          ctx.fillStyle = this.LABEL_BACKGROUND;\n          const meas = ctx.measureText(label);\n          const labelHeight = this.LABEL_FONT_SIZE + 2 * this.LABEL_MARGIN;\n          const labelWidth = meas.width + this.LABEL_MARGIN * 2;\n\n          // Bump the text to different quadrants so it is always visible.\n          if (y < this.detailArea.rect.y + this.detailArea.rect.height / 2) {\n            y = this.crosshair.y + this.MARGIN;\n          }\n          if (x > this.detailArea.rect.x + this.detailArea.rect.width / 2) {\n            x = x - labelWidth - 2 * this.MARGIN;\n          }\n\n          ctx.beginPath();\n          ctx.rect(x - this.LABEL_MARGIN, y + this.LABEL_MARGIN, labelWidth, -labelHeight);\n          ctx.fill();\n          ctx.strokeStyle = this.LABEL_COLOR;\n          ctx.beginPath();\n          ctx.rect(x - this.LABEL_MARGIN, y + this.LABEL_MARGIN, labelWidth, -labelHeight);\n          ctx.stroke();\n\n          // Now draw text on top.\n          ctx.fillStyle = this.LABEL_COLOR;\n          ctx.fillText(label, x, y);\n        }\n      }\n    }\n    ctx.restore();\n  }\n\n  // Draw a dashed rectangle for the details zoom.\n  private drawZoomRect(ctx: CanvasRenderingContext2D, rect: Rect) {\n    ctx.strokeStyle = this.LABEL_COLOR;\n    ctx.lineWidth = 1;\n    ctx.setLineDash([2, 2]);\n    ctx.strokeRect(rect.x, rect.y, rect.width, rect.height);\n    ctx.setLineDash([]);\n  }\n\n  // Draw the xbar in the given area with the given width.\n  private drawXBar(ctx: CanvasRenderingContext2D, area: Area, width: number) {\n    if (this.xbar === -1) {\n      return;\n    }\n    ctx.lineWidth = width;\n    ctx.strokeStyle = this.CROSSHAIR_COLOR;\n    const bx = area.range.x(this._xbar);\n    ctx.beginPath();\n    ctx.moveTo(bx, area.rect.y);\n    ctx.lineTo(bx, area.rect.y + area.rect.height);\n    ctx.stroke();\n  }\n\n  // Draw the bands in the given area with the given width.\n  private drawBands(ctx: CanvasRenderingContext2D, area: Area, width: number) {\n    ctx.lineWidth = width;\n    ctx.strokeStyle = this.BAND_COLOR;\n    ctx.setLineDash([width, width]);\n    ctx.beginPath();\n    this._bands.forEach((band) => {\n      const bx = area.range.x(band);\n      ctx.moveTo(bx, area.rect.y);\n      ctx.lineTo(bx, area.rect.y + area.rect.height);\n    });\n    ctx.stroke();\n    ctx.setLineDash([]);\n  }\n\n  // Draw all anomalies in the given area.\n  private drawAnomalies(ctx: CanvasRenderingContext2D, area: Area) {\n    const keys = Object.keys(this._anomalyDataMap);\n    keys.forEach((key) => {\n      this._anomalyDataMap[key].forEach((anomalyData) => {\n        const anomaly = anomalyData.anomaly;\n\n        // Anomaly is Ignored or marked as Invalid.\n        if (anomaly.bug_id < 0 || anomaly.recovered) {\n          ctx.globalAlpha = 0.5;\n        } else {\n          ctx.globalAlpha = 1.0;\n        }\n\n        const cx = area.range.x(anomalyData.x);\n        const cy = area.range.y(anomalyData.y);\n        const anomalyPath = new Path2D();\n\n        // Draw white circle background of anomaly icon.\n        anomalyPath.moveTo(cx + this.ANOMALY_RADIUS, cy);\n        anomalyPath.arc(cx, cy, this.ANOMALY_RADIUS, 0, 2 * Math.PI);\n        ctx.fillStyle = this.ANOMALY_BACKGROUND;\n\n        ctx.fill(anomalyPath);\n\n        // If the anomaly is marked for highlighting, draw a circle around\n        // the icon with the highlight color.\n        if (anomalyData.highlight) {\n          const highlightPath = new Path2D();\n          const highlightRadius = this.ANOMALY_RADIUS + 2 * this.scale;\n          highlightPath.moveTo(cx + highlightRadius, cy);\n          highlightPath.arc(cx, cy, highlightRadius, 0, 2 * Math.PI);\n\n          ctx.fillStyle = this.ANOMALY_HIGHLIGHT_COLOR;\n          ctx.fill(highlightPath);\n        }\n\n        if (anomaly.bug_id <= 0) {\n          ctx.fillStyle = this.UNTRIAGED_COLOR;\n        } else {\n          ctx.fillStyle = anomaly.is_improvement ? this.IMPROVEMENT_COLOR : this.REGRESSION_COLOR;\n        }\n\n        const regression_symbol = String.fromCharCode(0xe000);\n        const improvement_symbol = String.fromCharCode(0xe86c);\n        const symbol = anomaly.is_improvement ? improvement_symbol : regression_symbol;\n\n        // Draw anomaly icon.\n        ctx.textAlign = 'center';\n        ctx.textBaseline = 'middle';\n        ctx.font = this.ANOMALY_FONT;\n        ctx.fillText(symbol, cx, cy);\n      });\n    });\n  }\n\n  // Draw all user issues in the given area.\n  private drawUserIssues(ctx: CanvasRenderingContext2D, area: Area) {\n    if (this.userIssueMap === null || this.userIssueMap === undefined) {\n      return;\n    }\n\n    const keys = Object.keys(this._userIssueMap);\n    keys.forEach((trace_key) => {\n      Object.keys(this._userIssueMap[trace_key]).forEach((commit_position: string) => {\n        const issue = this._userIssueMap[trace_key][parseInt(commit_position)];\n\n        if (issue.bugId === 0) return;\n\n        if (issue.x === -1 || issue.y === -1) {\n          return;\n        }\n\n        // If point is an anomaly ignore the user issue\n        // since the point is already highlighted\n        let isAnomaly = false;\n        const anomaliesOnTrace = this._anomalyDataMap[trace_key];\n        if (anomaliesOnTrace !== null && anomaliesOnTrace !== undefined) {\n          anomaliesOnTrace.forEach((a) => {\n            if (a.x === issue.x && a.y === issue.y) {\n              isAnomaly = true;\n              return;\n            }\n          });\n        }\n        if (isAnomaly) {\n          return;\n        }\n\n        ctx.globalAlpha = 0.5;\n        const cx = area.range.x(issue.x);\n        const cy = area.range.y(issue.y);\n        const path = new Path2D();\n\n        // Draw white circle background of anomaly icon.\n        path.moveTo(cx + this.ANOMALY_RADIUS, cy);\n        path.arc(cx, cy, this.ANOMALY_RADIUS, 0, 2 * Math.PI);\n        ctx.fillStyle = this.ANOMALY_BACKGROUND;\n\n        ctx.fill(path);\n        ctx.fillStyle = this.UNTRIAGED_COLOR;\n\n        const symbol = String.fromCharCode(0xe000);\n\n        // Draw user issue icon.\n        ctx.textAlign = 'center';\n        ctx.textBaseline = 'middle';\n        ctx.font = this.ANOMALY_FONT;\n        ctx.fillText(symbol, cx, cy);\n      });\n    });\n  }\n\n  // Draw everything on the trace canvas.\n  //\n  // Well, not quite everything, if we are drag zooming then we only redraw the\n  // details and not the summary.\n  private drawTracesCanvas() {\n    const width = this.ctx!.canvas.width;\n    const height = this.ctx!.canvas.height;\n    const ctx = this.ctx!;\n\n    if (this.inZoomDrag !== 'no-zoom') {\n      ctx.clearRect(\n        this.detailArea.rect.x - this.MARGIN,\n        this.detailArea.rect.y - this.MARGIN,\n        this.detailArea.rect.width + 2 * this.MARGIN,\n        this.detailArea.rect.height + 2 * this.MARGIN\n      );\n    } else {\n      ctx.clearRect(0, 0, width, height);\n    }\n    ctx.fillStyle = this.LABEL_BACKGROUND;\n\n    // Draw the detail.\n    ctx.save();\n    {\n      // Block to scope save/restore.\n      clipToRect(ctx, this.detailArea.rect);\n      this.drawXAxis(ctx, this.detailArea);\n      ctx.fillStyle = this.LABEL_BACKGROUND;\n\n      this.lineData.forEach((line) => {\n        ctx.strokeStyle = line.color;\n        ctx.lineWidth = DETAIL_LINE_WIDTH;\n        ctx.stroke(line.detail.linePath!);\n        if (this.dots) {\n          ctx.fill(line.detail.dotsPath!);\n          ctx.stroke(line.detail.dotsPath!);\n        }\n      });\n    }\n    ctx.restore();\n    this.drawXAxis(ctx, this.detailArea);\n\n    if (this.inZoomDrag === 'no-zoom' && this.summary) {\n      // Draw the summary.\n      ctx.save();\n      {\n        // Block to scope save/restore.\n        clipToRect(ctx, this.summaryArea.rect);\n        this.lineData.forEach((line) => {\n          ctx.fillStyle = this.LABEL_BACKGROUND;\n          ctx.strokeStyle = line.color;\n          ctx.lineWidth = SUMMARY_LINE_WIDTH;\n          ctx.stroke(line.summary.linePath!);\n          if (this.dots) {\n            ctx.fill(line.summary.dotsPath!);\n            ctx.stroke(line.summary.dotsPath!);\n          }\n        });\n      }\n      ctx.restore();\n      this.drawXAxis(ctx, this.summaryArea);\n    }\n    // Draw y-Axes.\n    this.drawYAxis(ctx, this.detailArea);\n\n    this.drawOverlayCanvas();\n  }\n\n  // Draw a y-axis using the given context in the given area.\n  private drawYAxis(ctx: CanvasRenderingContext2D, area: DetailArea) {\n    ctx.strokeStyle = this.LABEL_COLOR;\n    ctx.fillStyle = this.LABEL_COLOR;\n    ctx.font = this.LABEL_FONT;\n    ctx.textBaseline = 'middle';\n    ctx.lineWidth = AXIS_LINE_WIDTH;\n    ctx.textAlign = 'right';\n    ctx.stroke(area.yaxis.path);\n    const labelWidth = (3 * this.LEFT_MARGIN) / 4;\n    area.yaxis.labels.forEach((label) => {\n      ctx.fillText(label.text, label.x + labelWidth, label.y, labelWidth);\n    });\n  }\n\n  // Draw a x-axis using the given context in the given area.\n  private drawXAxis(ctx: CanvasRenderingContext2D, area: Area) {\n    ctx.strokeStyle = this.LABEL_COLOR;\n    ctx.fillStyle = this.LABEL_COLOR;\n    ctx.font = this.LABEL_FONT;\n    ctx.textBaseline = 'middle';\n    ctx.lineWidth = AXIS_LINE_WIDTH;\n    ctx.stroke(area.axis.path);\n    area.axis.labels.forEach((label) => {\n      ctx.fillText(label.text, label.x - 2, label.y);\n    });\n  }\n\n  /**\n   * Helper to trigger re-draw of overlay canvas from parent element.\n   */\n  redrawOverlayCanvas() {\n    this.drawOverlayCanvas();\n  }\n\n  /**\n   *  An array of trace ids to highlight. Set to [] to remove all highlighting.\n   */\n  get highlight(): string[] {\n    return Object.keys(this.highlighted);\n  }\n\n  set highlight(ids: string[]) {\n    this.highlighted = {};\n    ids.forEach((name) => {\n      this.highlighted[name] = true;\n    });\n    this.drawOverlayCanvas();\n  }\n\n  /**\n   * Location to put a vertical marking bar on the graph. Can be set to -1 to\n   * not display any bar.\n   */\n  get xbar(): number {\n    return this._xbar;\n  }\n\n  set xbar(value: number) {\n    this._xbar = value;\n    this.drawOverlayCanvas();\n  }\n\n  /**\n   * A list of x source offsets to place vertical markers. into labels. Can be\n   *   set to [] to remove all bands.\n   */\n  get bands(): number[] {\n    return this._bands;\n  }\n\n  set bands(bands: number[]) {\n    if (!bands) {\n      this._bands = [];\n    } else {\n      this._bands = bands;\n    }\n    this.drawOverlayCanvas();\n  }\n\n  get anomalyDataMap(): { [key: string]: AnomalyData[] } {\n    return this._anomalyDataMap;\n  }\n\n  set anomalyDataMap(anomalyDataMap: { [key: string]: AnomalyData[] }) {\n    this._anomalyDataMap = anomalyDataMap;\n    this.drawOverlayCanvas();\n  }\n\n  get userIssueMap(): UserIssueMap {\n    return this._userIssueMap;\n  }\n\n  set userIssueMap(userIssueMap: UserIssueMap) {\n    this._userIssueMap = userIssueMap || {};\n    this.drawOverlayCanvas();\n  }\n\n  get showCrosshairLabel(): boolean {\n    return this._showCrosshairLabel;\n  }\n\n  set showCrosshairLabel(show: boolean) {\n    this._showCrosshairLabel = show;\n  }\n\n  /** The zoom range, an array of two values in source x units. Can be set to\n   * null to have no zoom.\n   */\n  get zoom(): ZoomRange {\n    return this._zoom;\n  }\n\n  set zoom(range: ZoomRange) {\n    this._zoom = range;\n    if (this.zoomTask) {\n      return;\n    }\n    this.zoomTask = window.setTimeout(() => this._zoomImpl());\n  }\n\n  private _zoomImpl() {\n    this.updateScaleDomains();\n    this.recalcDetailPaths();\n    this.drawTracesCanvas();\n    this.zoomTask = 0;\n  }\n\n  static get observedAttributes(): string[] {\n    return ['width', 'height', 'summary'];\n  }\n\n  /** Mirrors the width attribute. */\n  get width(): number {\n    return +(this.getAttribute('width') || '0');\n  }\n\n  set width(val: number) {\n    this.setAttribute('width', val.toString());\n  }\n\n  /** Mirrors the height attribute. */\n  get height(): number {\n    return +(this.getAttribute('height') || '0');\n  }\n\n  set height(val: number) {\n    this.setAttribute('height', val.toString());\n  }\n\n  /** @prop summary {string} Mirrors the summary attribute. */\n  get summary(): boolean {\n    return this.hasAttribute('summary');\n  }\n\n  set summary(val: boolean) {\n    if (val) {\n      this.setAttribute('summary', val.toString());\n    } else {\n      this.removeAttribute('summary');\n    }\n  }\n\n  /** @prop nodots {boolean} Mirrors the nodots attribute.  */\n  get dots(): boolean {\n    return this._dots;\n  }\n\n  set dots(val: boolean) {\n    this._dots = val;\n    this.drawTracesCanvas();\n  }\n}\n\ndefine('plot-simple-sk', PlotSimpleSk);\n", "import './plot-simple-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"/></svg>';\n\ndefine('check-circle-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './check-circle-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"/></svg>';\n\ndefine('cancel-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './cancel-icon-sk';\n", "/**\n * @module modules/triage2-sk\n * @description <h2><code>triage2-sk</code></h2>\n *  A custom element that allows toggling between the three\n *  Status states of triage: positive, negative, and untriaged.\n *\n * @evt change - The value of e.detail is the new triage Status value,\n *    for example \"positive\", or \"negative\".\n *\n * @attr value - The state of triage, either \"positive\", \"negative\", or\n *    \"untriaged\".\n *\n * @example\n *   <triage2-sk value=positive></triage2-sk>\n */\nimport { html } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport '../../../elements-sk/modules/icons/check-circle-icon-sk';\nimport '../../../elements-sk/modules/icons/cancel-icon-sk';\nimport '../../../elements-sk/modules/icons/help-icon-sk';\nimport { Status } from '../json';\n\n// TODO(jcgregorio) Maybe go2ts could emit isFoo guard functions?\nfunction isStatus(value: string): value is Status {\n  const allowed = ['positive', 'negative', 'untriaged', ''];\n  return allowed.indexOf(value) !== -1;\n}\n\nexport class TriageSk extends ElementSk {\n  constructor() {\n    super(TriageSk.template);\n  }\n\n  private static _match = (a: Status, b: Status) => a === b;\n\n  private static template = (ele: TriageSk) => html`\n    <button\n      class=\"positive\"\n      @click=${() => (ele.value = 'positive')}\n      ?selected=${TriageSk._match(ele.value, 'positive')}>\n      <check-circle-icon-sk title=\"Positive\"></check-circle-icon-sk>\n    </button>\n    <button\n      class=\"negative\"\n      @click=${() => (ele.value = 'negative')}\n      ?selected=${TriageSk._match(ele.value, 'negative')}>\n      <cancel-icon-sk title=\"Negative\"></cancel-icon-sk>\n    </button>\n    <button\n      class=\"untriaged\"\n      @click=${() => (ele.value = 'untriaged')}\n      ?selected=${TriageSk._match(ele.value, 'untriaged')}>\n      <help-icon-sk title=\"Untriaged\"></help-icon-sk>\n    </button>\n  `;\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    this._upgradeProperty('value');\n    if (!this.value) {\n      this.value = 'untriaged';\n    }\n    this._render();\n  }\n\n  static get observedAttributes(): string[] {\n    return ['value'];\n  }\n\n  /** @prop value - The status, such as 'positive', 'negative', or 'untriaged'. */\n  get value(): Status {\n    const v = this.getAttribute('value') || '';\n    if (isStatus(v)) {\n      return v;\n    }\n    return 'untriaged';\n  }\n\n  set value(val: Status) {\n    this.setAttribute('value', val);\n  }\n\n  attributeChangedCallback(_name: string, oldValue: string, newValue: string): void {\n    if (oldValue !== newValue) {\n      this._render();\n      this.dispatchEvent(\n        new CustomEvent<Status>('change', {\n          detail: newValue as Status,\n          bubbles: true,\n        })\n      );\n    }\n  }\n}\n\ndefine('triage2-sk', TriageSk);\n", "import './triage2-sk';\n\nexport * from './triage2-sk';\n", "/**\n * @module modules/word-cloud-sk\n * @description <h2><code>word-cloud-sk</code></h2>\n *\n * Displays the key-value pairs found in a cluster, and also\n * shows the relative frequency of how often they appear.\n *\n * @example\n */\nimport { html } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport { ValuePercent } from '../json';\n\nexport class WordCloudSk extends ElementSk {\n  private _items: ValuePercent[];\n\n  constructor() {\n    super(WordCloudSk.template);\n    this._items = [];\n  }\n\n  private static rows = (ele: WordCloudSk) =>\n    ele._items.map(\n      (item) =>\n        html` <tr>\n          <td class=\"value\">${item.value}</td>\n          <td class=\"textpercent\">${item.percent}%</td>\n          <td class=\"percent\" title=\"${item.percent}%\">\n            <div style=\"width: ${item.percent}px\"></div>\n          </td>\n        </tr>`\n    );\n\n  private static template = (ele: WordCloudSk) => html`\n    <table>\n      ${WordCloudSk.rows(ele)}\n    </table>\n  `;\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    this._upgradeProperty('items');\n    this._render();\n  }\n\n  /** A serialized slice of ValuePercent.\n\n      For example:\n\n      [\n        {value:\"config=565\", percent: 60},\n        {value:\"config=8888\", percent: 40},\n        {value:\"cpu_or_gpu=cpu\", percent: 20},\n        {value:\"cpu_or_gpu=gpu\", percent: 10},\n      ]\n  */\n  get items(): ValuePercent[] {\n    return this._items;\n  }\n\n  set items(val: ValuePercent[]) {\n    if (!val) {\n      return;\n    }\n    this._items = val;\n    this._render();\n  }\n}\n\ndefine('word-cloud-sk', WordCloudSk);\n", "import './word-cloud-sk';\n", "/**\n * @module modules/cid\n *\n * Functions for working with CommitNumer's, aka Commit IDs.\n */\n\nimport { jsonOrThrow } from '../../../infra-sk/modules/jsonOrThrow';\nimport { CommitNumber, CIDHandlerResponse } from '../json';\n\n/**\n * Look up the commit ids for the given offsets and sources.\n *\n */\nexport const lookupCids = (cids: CommitNumber[]): Promise<CIDHandlerResponse> =>\n  fetch('/_/cid/', {\n    method: 'POST',\n    body: JSON.stringify(cids),\n    headers: {\n      'Content-Type': 'application/json',\n    },\n  }).then(jsonOrThrow);\n", "/**\n * @module modules/commit-range-sk\n * @description <h2><code>commit-range-sk</code></h2>\n *\n * Displays a link that describes a range of commits in a repo. This element\n * uses the global `window.perf.commit_range_url`, which can be set on Perf via\n * the command line.\n */\nimport { html } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport { lookupCids } from '../cid/cid';\nimport { MISSING_DATA_SENTINEL } from '../const/const';\nimport { ColumnHeader, CommitNumber } from '../json';\nimport '../window/window';\n\n// Converts CommitNumbers to Git hashes.\ntype commitNumberToHashes = (commitNumbers: CommitNumber[]) => Promise<string[]>;\n\n/** The default implementation for commitNumberToHashes run the commit numbers\n *  through cid lookup to get the hashes by making a request to the server.\n */\nconst defaultcommitNumberToHashes = async (cids: CommitNumber[]): Promise<string[]> => {\n  const json = await lookupCids(cids);\n  return [json.commitSlice![0].hash, json.commitSlice![1].hash];\n};\n\nexport class CommitRangeSk extends ElementSk {\n  private _trace: number[] = [];\n\n  private _commitIndex: number = -1;\n\n  private _header: (ColumnHeader | null)[] | null = null;\n\n  /** The calculated URL. */\n  private _url: string = '';\n\n  /** The link text to display. */\n  private _text: string = '';\n\n  private _htmlTemplate = html``;\n\n  private _commitIds: [CommitNumber, CommitNumber] | null = null;\n\n  /** Determines if text contains links. */\n  showLinks: boolean = false;\n\n  // commitNumberToHashes can be replaced to make testing easier.\n  private commitNumberToHashes: commitNumberToHashes = defaultcommitNumberToHashes;\n\n  constructor() {\n    super(CommitRangeSk.template);\n  }\n\n  private static template = (ele: CommitRangeSk) => html`${ele.htmlTemplate}`;\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    this._upgradeProperty('trace');\n    this._upgradeProperty('commitIndex');\n    this._upgradeProperty('header');\n    this._render();\n  }\n\n  reset(): void {\n    this._commitIndex = -1;\n    this._trace = [];\n    this._header = null;\n    this._htmlTemplate = html``;\n    this._url = '';\n    this._text = '';\n    this._commitIds = null;\n    this._render();\n  }\n\n  clear(): void {\n    this._url = '';\n    this._text = '';\n    this._render();\n  }\n\n  /** Check start and end commits and determines if delta is more than 1.\n   * If so, it is a range and returns true.\n   * If not, it is a single commit and returns false.\n   * Returns false if no commits are set.\n   * @returns boolean\n   */\n  isRange(): boolean {\n    if (!this._commitIds) {\n      return false;\n    }\n    if (this._commitIds[0] >= this._commitIds[1]) {\n      return false;\n    }\n\n    if (this._commitIds[0] + 1 === this._commitIds[1]) {\n      return false;\n    }\n    return true;\n  }\n\n  async recalcLink(): Promise<void> {\n    if (window.perf.commit_range_url === '' || this._commitIndex === -1) {\n      this.clear();\n      return;\n    }\n\n    this._commitIds = this.setCommitIds(this._commitIndex);\n    if (!this._commitIds || this._commitIds.length !== 2) {\n      this.clear();\n      return;\n    }\n\n    try {\n      this._text = `${this._commitIds[1]}`;\n      // Check if there are no points between start and end.\n      if (this.isRange()) {\n        // Add +1 to the previous commit to only show commits after previous.\n        this._text = `${this._commitIds[0] + 1} - ${this._commitIds[1]}`;\n      }\n      this._htmlTemplate = html`${this._text}`;\n      // Show only text of commit if hover, else show full text with links.\n      if (this.showLinks) {\n        let url = window.perf.commit_range_url;\n        // Run the commit numbers through cid lookup to get the hashes.\n        const hashes = await this.commitNumberToHashes(this._commitIds);\n        // Create the URL.\n        url = url.replace('{begin}', hashes[0]);\n        url = url.replace('{end}', hashes[1]);\n        // Now populate link, including text and url.\n        this._url = url;\n        this._htmlTemplate = html`<a href=\"${this._url}\" target=\"_blank\">${this._text}</a>`;\n      }\n      this._render();\n    } catch (error) {\n      console.log(error);\n      this.clear();\n    }\n  }\n\n  /** A single trace. */\n  get trace(): number[] {\n    return this._trace;\n  }\n\n  set trace(val: number[]) {\n    this._trace = val;\n    this.recalcLink();\n  }\n\n  /** An index into trace, the location of the commit being referenced. */\n  get commitIndex(): number {\n    return this._commitIndex;\n  }\n\n  set commitIndex(val: number) {\n    this._commitIndex = val;\n    this.recalcLink();\n  }\n\n  /** The ColumnHeader of the DataFrame that contains the trace. */\n  get header(): (ColumnHeader | null)[] | null {\n    return this._header;\n  }\n\n  set header(val: (ColumnHeader | null)[] | null) {\n    this._header = val;\n    this.recalcLink();\n  }\n\n  get url(): string {\n    return this._url;\n  }\n\n  get text(): string {\n    return this._text;\n  }\n\n  get htmlTemplate() {\n    return this._htmlTemplate;\n  }\n\n  setCommitIds(commitIndex: number): [CommitNumber, CommitNumber] | null {\n    if (this._trace.length === 0 || this._header === null) {\n      this.clear();\n      return null;\n    }\n    // First the previous commit that has data.\n    let prevCommit = commitIndex - 1;\n\n    while (prevCommit > 0 && this._trace[prevCommit] === MISSING_DATA_SENTINEL) {\n      prevCommit -= 1;\n    }\n\n    // If we don't find a second commit then we can't present the information.\n    if (prevCommit < 0) {\n      this.clear();\n      return null;\n    }\n\n    const startOffset = this._header[prevCommit]?.offset ?? null;\n    const endOffset = this._header[commitIndex]?.offset ?? null;\n    if (startOffset === null || endOffset === null) {\n      this.clear();\n      return null;\n    }\n    return [startOffset, endOffset];\n  }\n}\n\ndefine('commit-range-sk', CommitRangeSk);\n", "import './commit-range-sk';\n", "/**\n * @module ticks\n * @description Function for creating tick marks for a range of times.\n */\n\n/**\n * @constant {Number} Minimum number of ticks to return. We don't guarantee we\n * will meet this.\n */\nconst MIN_TICKS = 2;\n\n/**\n * @constant {Number} Maximum number of ticks to return. We will always meet\n * this limit.\n */\nconst MAX_TICKS = 10;\n\n/**\n * @constant {Array} - choices is the list of duration increments and associated\n * formatters for those times, sorted from largest to smallest duration.\n */\nconst choices = [\n  {\n    duration: 4 * 7 * 24 * 60 * 60 * 1000,\n    formatter: new Intl.DateTimeFormat('default', { month: 'short' }).format,\n  },\n  {\n    duration: 3 * 24 * 60 * 60 * 1000,\n    formatter: new Intl.DateTimeFormat('default', {\n      day: 'numeric',\n      month: 'short',\n    }).format,\n  },\n  {\n    duration: 24 * 60 * 60 * 1000,\n    formatter: new Intl.DateTimeFormat('default', {\n      weekday: 'short',\n      hour: 'numeric',\n    }).format,\n  },\n  {\n    duration: 2 * 60 * 60 * 1000,\n    formatter: new Intl.DateTimeFormat('default', { hour: 'numeric' }).format,\n  },\n  {\n    duration: 2 * 60 * 1000,\n    formatter: new Intl.DateTimeFormat('default', {\n      hour: 'numeric',\n      minute: 'numeric',\n    }).format,\n  },\n  {\n    duration: 2 * 1000,\n    formatter: new Intl.DateTimeFormat('default', {\n      hour: 'numeric',\n      minute: 'numeric',\n      second: 'numeric',\n    }).format,\n  },\n];\n\n/**\n *  formatterFromDuration takes a duration in milliseconds and from that returns\n *  a function that will produce good labels for tick marks in that time range.\n *  For example, if the time range is small enough then the ticks will be marked\n *  with the weekday, e.g.  \"Sun\", if the time range is much larger the ticks\n *  may be marked with the month, e.g. \"Jul\".\n *\n *  @param {Number} ms - A duration in milliseconds.\n */\nfunction formatterFromDuration(ms: number) {\n  // Move down the list of choices from the largest granularity to the finest.\n  // The first one that would generate more than MIN_TICKS for the given\n  // number of hours is chosen and that TimeOp is returned.\n  for (let i = 0; i < choices.length; i++) {\n    const c = choices[i];\n    if (ms / c.duration > MIN_TICKS) {\n      return c.formatter;\n    }\n  }\n  return choices[choices.length - 1].formatter;\n}\n\nexport interface tick {\n  x: number;\n  text: string;\n}\n\n/**\n * ticks takes a set of times that represent x-axis locations in time\n * and returns an array of points to use to for tick marks along with their\n * associated text.\n *\n * @param {Date[]} dates - An array of Dates, one for each x location.\n * @returns {Array} An array of objects of the form:\n *\n *     {\n *       x: 2,\n *       text: 'Mon, 8 AM',\n *     }\n */\nexport function ticks(dates: Date[]): tick[] {\n  if (dates.length === 0) {\n    return [];\n  }\n  const duration = dates[dates.length - 1].valueOf() - dates[0].valueOf();\n  const formatter = formatterFromDuration(duration);\n  let last = formatter(dates[0]);\n  const ret = [\n    {\n      x: 0,\n      text: last,\n    },\n  ];\n  for (let i = 0; i < dates.length; i++) {\n    const tickValue = formatter(dates[i]);\n    if (last !== tickValue) {\n      ret.push({\n        x: i,\n        text: tickValue,\n      });\n      last = tickValue;\n    }\n  }\n\n  return fixTicksLength(ret);\n}\n\n/**\n * fixTicksLength takes a set of ticks and ensures that the length of\n * the array is within the specified limits\n *\n * @param {tick[]} ticks - An array of ticks.\n * @returns {tick[]}} An array of ticks:\n */\nexport function fixTicksLength(ticks: tick[]): tick[] {\n  // Drop every other tick repeatedly until we get less than MAX_TICKS tick marks.\n  while (ticks.length > MAX_TICKS) {\n    ticks = ticks.filter((_t, i) => i % 2);\n  }\n\n  return ticks;\n}\n", "/**\n * @module modules/cluster-summary2-sk\n * @description <h2><code>cluster-summary2-sk</code></h2>\n *\n * @evt open-keys - An event that is fired when the user clicks the 'View on\n *     dashboard' button that contains the shortcut id, and the timestamp range of\n *     traces in the details that should be opened in the explorer, and the xbar\n *     location specified as a serialized cid.CommitID, for example:\n *\n *     {\n *       shortcut: 'X1129832198312',\n *       begin: 1476982874,\n *       end: 1476987166,\n *       xbar: {'offset':24750,'timestamp':1476985844},\n *     }\n *\n * @evt triaged - An event generated when the 'Update' button is pressed, which\n *     contains the new triage status. The detail contains the cid and triage\n *     status, for example:\n *\n *     {\n *       cid: {\n *         source: 'master',\n *         offset: 25004,\n *       },\n *       triage: {\n *         status: 'negative',\n *         messge: 'This is a regression in ...',\n *       },\n *     }\n *\n * @attr {Boolean} notriage - If true then don't display the triage controls.\n *\n * @example\n */\nimport { html } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport '../../../elements-sk/modules/collapse-sk';\nimport '../commit-detail-panel-sk';\nimport '../plot-simple-sk';\nimport '../triage2-sk';\nimport '../word-cloud-sk';\nimport '../commit-range-sk';\nimport { CollapseSk } from '../../../elements-sk/modules/collapse-sk/collapse-sk';\nimport { errorMessage } from '../errorMessage';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport { Status as LoginStatus } from '../../../infra-sk/modules/json';\nimport {\n  FullSummary,\n  FrameResponse,\n  ClusterSummary,\n  TriageStatus,\n  Status,\n  ColumnHeader,\n  Alert,\n  StepDetection,\n} from '../json';\nimport { PlotSimpleSkTraceEventDetails } from '../plot-simple-sk/plot-simple-sk';\nimport { PlotSimpleSk } from '../plot-simple-sk/plot-simple-sk';\nimport { CommitDetailPanelSk } from '../commit-detail-panel-sk/commit-detail-panel-sk';\nimport '../window/window';\nimport { lookupCids } from '../cid/cid';\nimport { LoggedIn } from '../../../infra-sk/modules/alogin-sk/alogin-sk';\nimport { ticks } from '../plot-simple-sk/ticks';\n\n/** Defines a func that takes a number and formats it as a string. */\ntype Formatter = (n: number) => string;\n\n/**\n * Each type of step detection gives different meaning to the regression,\n * stepSize, and least_squares values in the cluster summary, so we create a\n * mapping to describe each of their labels and how the values should be\n * formatted.\n */\ninterface LabelsAndFormatters {\n  regression: string;\n  stepSize: string;\n  lse: string;\n  regressionFormatter: Formatter;\n  stepSizeFormatter: Formatter;\n  lseFormatter: Formatter;\n}\n\n// Oddly this seems to be the only way to retrieve the Intl locale for the\n// browser.\nconst locale = Intl.NumberFormat().resolvedOptions().locale;\n\n// These are different number formatters used in labelsForStepDetection.\nconst percentFormatter = Intl.NumberFormat(locale, {\n  style: 'percent',\n  maximumSignificantDigits: 4,\n}).format;\nconst decimalFormatter = Intl.NumberFormat(locale, {\n  style: 'decimal',\n  maximumSignificantDigits: 4,\n}).format;\nconst emptyFormatter = () => '';\n\n/** Map each StepDetection to the labels and formatters used for that type. */\nconst labelsForStepDetection: Record<StepDetection, LabelsAndFormatters> = {\n  '': {\n    regression: 'Regression Factor:',\n    regressionFormatter: decimalFormatter,\n    stepSize: 'Step Size:',\n    stepSizeFormatter: decimalFormatter,\n    lse: 'Least Squares Error:',\n    lseFormatter: decimalFormatter,\n  },\n  absolute: {\n    regression: 'Absolute Change:',\n    regressionFormatter: decimalFormatter,\n    stepSize: '',\n    stepSizeFormatter: emptyFormatter,\n    lse: '',\n    lseFormatter: emptyFormatter,\n  },\n  const: {\n    regression: 'Constant Threshhold:',\n    regressionFormatter: decimalFormatter,\n    stepSize: '',\n    stepSizeFormatter: emptyFormatter,\n    lse: '',\n    lseFormatter: emptyFormatter,\n  },\n  percent: {\n    regression: 'Percentage Change:',\n    regressionFormatter: percentFormatter,\n    stepSize: '',\n    stepSizeFormatter: emptyFormatter,\n    lse: '',\n    lseFormatter: emptyFormatter,\n  },\n  cohen: {\n    regression: 'Standard Deviations:',\n    regressionFormatter: decimalFormatter,\n    stepSize: '',\n    stepSizeFormatter: emptyFormatter,\n    lse: '',\n    lseFormatter: emptyFormatter,\n  },\n  mannwhitneyu: {\n    regression: 'p:',\n    regressionFormatter: percentFormatter,\n    stepSize: '',\n    stepSizeFormatter: emptyFormatter,\n    lse: 'U:',\n    lseFormatter: decimalFormatter,\n  },\n};\n\nexport interface ClusterSummary2SkTriagedEventDetail {\n  columnHeader: ColumnHeader;\n  triage: TriageStatus;\n}\n\nexport interface ClusterSummary2SkOpenKeysEventDetail {\n  shortcut: string;\n  begin: number;\n  end: number;\n  xbar: ColumnHeader;\n}\n\nexport class ClusterSummary2Sk extends ElementSk {\n  private summary: ClusterSummary;\n\n  private triageStatus: TriageStatus;\n\n  private wordCloud: CollapseSk | null = null;\n\n  private status: HTMLDivElement | null = null;\n\n  private graph: PlotSimpleSk | null = null;\n\n  private commits: CommitDetailPanelSk | null = null;\n\n  private frame: FrameResponse | null = null;\n\n  private fullSummary: FullSummary | null = null;\n\n  private _alert: Alert | null = null;\n\n  private labels: LabelsAndFormatters = labelsForStepDetection[''];\n\n  constructor() {\n    super(ClusterSummary2Sk.template);\n    this.summary = {\n      centroid: null,\n      shortcut: '',\n      step_point: null,\n      notification_id: '',\n      num: 0,\n      step_fit: {\n        regression: 0,\n        least_squares: 0,\n        step_size: 0,\n        turning_point: 0,\n        status: 'Uninteresting',\n      },\n      param_summaries2: [],\n      ts: new Date().toISOString(),\n    };\n    this.triageStatus = {\n      status: '',\n      message: '',\n    };\n  }\n\n  /**\n   * Look up the commit ids for the given offsets and sources.\n   *\n   * @param An array of CommitNumbers.\n   * @returns A Promise that resolves the cids and returns an Array of serialized perfgit.Commit.\n   */\n  static lookupCids = lookupCids;\n\n  private static template = (ele: ClusterSummary2Sk) => html`\n    <div class=\"regression ${ele.statusClass()}\">\n      ${ele.labels.regression}\n      <span>${ele.labels.regressionFormatter(ele.summary!.step_fit!.regression)}</span>\n    </div>\n    <div class=\"stats\">\n      <div class=\"labelled\">\n        Cluster Size:\n        <span>${ele.summary.num}</span>\n      </div>\n      ${ClusterSummary2Sk.leastSquares(ele)}\n      <div class=\"labelled\">\n        ${ele.labels.stepSize}\n        <span>${ele.labels.stepSizeFormatter(ele.summary!.step_fit!.step_size)}</span>\n      </div>\n      ${ele.summary.notification_id\n        ? html` <div>\n            Bug:\n            <a href=\"http://b/${ele.summary.notification_id}\">b/${ele.summary.notification_id}</a>\n          </div>`\n        : html``}\n    </div>\n    <plot-simple-sk\n      class=\"plot\"\n      width=\"800\"\n      height=\"250\"\n      specialevents\n      @trace_selected=${ele.traceSelected}></plot-simple-sk>\n    <div id=\"status\" class=${ele.hiddenClass()}>\n      <p class=\"disabledMessage\">You must be logged in to change the status.</p>\n      <triage2-sk\n        value=${ele.triageStatus.status}\n        @change=${(e: CustomEvent<Status>) => {\n          ele.triageStatus.status = e.detail;\n        }}></triage2-sk>\n      <input\n        type=\"text\"\n        .value=${ele.triageStatus.message}\n        @change=${(e: InputEvent) => {\n          ele.triageStatus.message = (e.currentTarget! as HTMLInputElement).value;\n        }}\n        label=\"Message\" />\n      <button class=\"action\" @click=${ele.update}>Update</button>\n    </div>\n    <commit-detail-panel-sk id=\"commits\" selectable></commit-detail-panel-sk>\n    <div class=\"actions\">\n      <button id=\"shortcut\" @click=${ele.openShortcut}>View on dashboard</button>\n      <button @click=${ele.toggleWordCloud}>Word Cloud</button>\n      <a id=\"permalink\" class=${ele.hiddenClass()} href=${ele.permaLink()}> Permlink </a>\n      <commit-range-sk\n        .trace=${ele.summary.centroid}\n        .commitIndex=${ele.graph?.xbar || -1}\n        .header=${ele.frame?.dataframe?.header || null}></commit-range-sk>\n    </div>\n    <collapse-sk class=\"wordCloudCollapse\" closed>\n      <word-cloud-sk .items=${ele.summary.param_summaries2}></word-cloud-sk>\n    </collapse-sk>\n  `;\n\n  private static leastSquares = (ele: ClusterSummary2Sk) => html`\n    <div class=\"labelled\">\n      ${ele.labels.lse}\n      <span>${ele.labels.lseFormatter(ele.summary!.step_fit!.least_squares)}</span>\n    </div>\n  `;\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    this._upgradeProperty('full_summary');\n    this._upgradeProperty('triage');\n    this._upgradeProperty('alert');\n    this._render();\n    this.wordCloud = this.querySelector('.wordCloudCollapse');\n    this.status = this.querySelector('#status');\n    this.graph = this.querySelector('plot-simple-sk');\n    this.commits = this.querySelector('#commits');\n    LoggedIn()\n      .then((status: LoginStatus) => {\n        this.status!.classList.toggle('disabled', !(status.roles || []).includes('editor'));\n      })\n      .catch(errorMessage);\n\n    // eslint-disable-next-line no-self-assign\n    this.full_summary = this.full_summary;\n    // eslint-disable-next-line no-self-assign\n    this.triage = this.triage;\n  }\n\n  private update() {\n    const columnHeader = this.summary.step_point!;\n    const detail: ClusterSummary2SkTriagedEventDetail = {\n      columnHeader,\n      triage: this.triage,\n    };\n    this.dispatchEvent(\n      new CustomEvent<ClusterSummary2SkTriagedEventDetail>('triaged', {\n        detail,\n        bubbles: true,\n      })\n    );\n  }\n\n  private openShortcut() {\n    const detail: ClusterSummary2SkOpenKeysEventDetail = {\n      shortcut: this.summary.shortcut,\n      begin: this.frame!.dataframe!.header![0]!.timestamp,\n      end: this.frame!.dataframe!.header![this.frame!.dataframe!.header!.length - 1]!.timestamp + 1,\n      xbar: this.summary.step_point!,\n    };\n    this.dispatchEvent(\n      new CustomEvent<ClusterSummary2SkOpenKeysEventDetail>('open-keys', {\n        detail,\n        bubbles: true,\n      })\n    );\n  }\n\n  private traceSelected(e: CustomEvent<PlotSimpleSkTraceEventDetails>) {\n    const commitNumber = this.frame!.dataframe!.header![e.detail.x]?.offset;\n    ClusterSummary2Sk.lookupCids([commitNumber!])\n      .then((json) => {\n        this.commits!.details = json.commitSlice || [];\n      })\n      .catch(errorMessage);\n  }\n\n  private toggleWordCloud() {\n    this.wordCloud!.closed = !this.wordCloud!.closed;\n  }\n\n  private hiddenClass() {\n    return this.hasAttribute('notriage') ? 'hidden' : '';\n  }\n\n  private permaLink() {\n    // Bounce to the triage page, but with the time range narrowed to\n    // contain just the step_point commit.\n    if (!this.summary || !this.summary.step_point) {\n      return '';\n    }\n    const begin = this.summary.step_point.timestamp;\n    const end = begin + 1;\n    return `/t/?begin=${begin}&end=${end}&subset=all`;\n  }\n\n  private statusClass() {\n    if (!this.summary) {\n      return '';\n    }\n    const status = this.summary!.step_fit!.status || '';\n    return status.toLowerCase();\n  }\n\n  /** @prop full_summary {string} A serialized:\n   *\n   *  {\n   *    summary: cluster2.ClusterSummary,\n   *    frame: dataframe.FrameResponse,\n   *  }\n   *\n   */\n  get full_summary(): FullSummary | null {\n    return this.fullSummary;\n  }\n\n  set full_summary(val: FullSummary | null) {\n    if (!val) {\n      return;\n    }\n    if (!val.frame) {\n      return;\n    }\n    this.fullSummary = val;\n    this.summary = val.summary;\n    this.frame = val.frame;\n    if (!this.graph) {\n      return;\n    }\n\n    // Set the data- attributes used for sorting cluster summaries.\n    this.dataset.clustersize = this.summary.num.toString();\n    this.dataset.steplse = this.summary!.step_fit!.least_squares.toPrecision(2);\n    this.dataset.stepsize = this.summary!.step_fit!.step_size.toPrecision(2);\n    this.dataset.stepregression = this.summary!.step_fit!.regression.toPrecision(2);\n    // We take in a ClusterSummary, but need to transform all that data\n    // into a format that plot-sk can handle.\n    this.graph.removeAll();\n    const labels: Date[] = [];\n    this.full_summary!.frame!.dataframe!.header!.forEach((header) => {\n      labels.push(new Date(header!.timestamp * 1000));\n    });\n    this.graph.addLines({ centroid: this.summary.centroid! }, ticks(labels));\n    // Set the x-bar but only if status != uninteresting.\n    if (this.summary!.step_fit!.status !== 'Uninteresting') {\n      // Loop through the dataframe header to find the location we should\n      // place the x-bar at.\n      const step = this.summary.step_point;\n      let xbar = -1;\n      this.frame!.dataframe!.header!.forEach((h, i) => {\n        if (h!.offset === step!.offset) {\n          xbar = i;\n        }\n      });\n      if (xbar !== -1) {\n        this.graph.xbar = xbar;\n      }\n\n      // If step_point is set then display the commit\n      // details for the xbar location.\n      if (step && step.offset > 0) {\n        ClusterSummary2Sk.lookupCids([step.offset])\n          .then((json) => {\n            this.commits!.details = json.commitSlice || [];\n          })\n          .catch(errorMessage);\n      }\n    }\n\n    this._render();\n  }\n\n  /** @prop triage {string} The triage status of the cluster.\n   *     Something of the form:\n   *\n   *    {\n   *      status: 'untriaged',\n   *      message: 'This is a regression.',\n   *    }\n   *\n   */\n  get triage(): TriageStatus {\n    return this.triageStatus;\n  }\n\n  set triage(val: TriageStatus) {\n    if (!val) {\n      return;\n    }\n    this.triageStatus = val;\n    this._render();\n  }\n\n  /** The configured Alert that found this regression. */\n  get alert(): Alert | null {\n    return this._alert;\n  }\n\n  set alert(val: Alert | null) {\n    if (!val) {\n      return;\n    }\n    this._alert = val;\n    this.labels = labelsForStepDetection[val!.step];\n    this._render();\n  }\n}\n\ndefine('cluster-summary2-sk', ClusterSummary2Sk);\n", "import './cluster-summary2-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z\"/></svg>';\n\ndefine('date-range-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './date-range-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"/></svg>';\n\ndefine('navigate-before-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './navigate-before-icon-sk';\n", "// This is a generated file!\n\nimport { define } from '../../define';\n\nconst iconSkTemplate = document.createElement('template');\niconSkTemplate.innerHTML = '<svg class=\"icon-sk-svg\" xmlns=\"http://www.w3.org/2000/svg\" width=24 height=24 viewBox=\"0 0 24 24\"><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/></svg>';\n\ndefine('navigate-next-icon-sk', class extends HTMLElement {\n  connectedCallback() {\n    const icon = iconSkTemplate.content.cloneNode(true);\n    while (this.firstChild) {\n      this.removeChild(this.firstChild);\n    }\n    this.appendChild(icon);\n  }\n});\n", "// This is a generated file!\n\nimport './navigate-next-icon-sk';\n", "/**\n * @module modules/calendar-sk\n * @description <h2><code>calendar-sk</code></h2>\n *\n * Displays an accessible calendar, one month at a time, and allows selecting a\n * single day. Offers the ability to navigate by both month and year. Also is\n * themeable and offers keyboard navigation.\n *\n * Why not use input type=\"date\"? It doesn't work on Safari, and the pop-up\n * calendar isn't styleable.\n *\n * Why not use the Elix web component? It is not themeable (at least not\n * easily), and it is also inaccessible.\n *\n * Accessibility advice was derived from this page:\n *   https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html\n *\n * @evt change - A CustomEvent with the selected Date in the detail.\n *\n * This element provides a keyboardHandler callback that should be attached and\n * detached to/from the appropriate containing element when it is used, for\n * example, a containing 'dialog' element.\n */\nimport { html, TemplateResult } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport '../../../elements-sk/modules/icons/navigate-before-icon-sk';\nimport '../../../elements-sk/modules/icons/navigate-next-icon-sk';\n\n/*\n * Most of the Date[1] object's methods return zero-indexed values, with exceptions such as\n * Date.prototype.getDate() and Date.prototype.getYear().\n *\n * To make things easier to follow, we suffix zero-indexed values returned by a\n * Date object with \"Index\", e.g.:\n *\n *   const dayIndex = date.getDay();     // (0-6).\n *   const monthIndex = date.getMonth(); // (0-11).\n *\n * [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\n */\n\n/**\n * Jump forward one month, and back one day to get the last day of the month.\n * Since days are 1-indexed, a value of 0 represents the last day of the\n * previous month.\n */\nconst getNumberOfDaysInMonth = (year: number, monthIndex: number) =>\n  new Date(year, monthIndex + 1, 0).getDate();\n\n// Returns a day of the week [0-6]\nconst firstDayIndexOfMonth = (year: number, monthIndex: number): number =>\n  new Date(year, monthIndex).getDay();\n\n// Used in templates.\nconst sevenDaysInAWeek = [0, 1, 2, 3, 4, 5, 6];\n\n// To display a month we need to display up to 6 weeks. Used in templates.\nconst sixWeeks = [0, 1, 2, 3, 4, 5];\n\n// The dates that CalendarSk manipulates, always in local time.\nclass CalendarDate {\n  year: number;\n\n  monthIndex: number;\n\n  date: number;\n\n  constructor(d: Date) {\n    this.year = d.getFullYear();\n    this.monthIndex = d.getMonth();\n    this.date = d.getDate();\n  }\n\n  equal(d: CalendarDate) {\n    return this.year === d.year && this.monthIndex === d.monthIndex && this.date === d.date;\n  }\n}\n\nexport class CalendarSk extends ElementSk {\n  private _displayDate: Date = new Date();\n\n  private _weekDayHeader: TemplateResult = html``;\n\n  private _locale: string | string[] | undefined = undefined;\n\n  constructor() {\n    super(CalendarSk.template);\n  }\n\n  private static template = (ele: CalendarSk) => html`\n    <table class=\"calendar\">\n      <tr>\n        <th>\n          <button\n            @click=${ele.decYear}\n            aria-label=\"Previous year\"\n            title=\"Previous year\"\n            id=\"previous-year\">\n            <navigate-before-icon-sk></navigate-before-icon-sk>\n          </button>\n        </th>\n        <th colspan=\"5\">\n          <h2 aria-live=\"polite\" id=\"calendar-year\">\n            ${new Intl.DateTimeFormat(ele._locale, { year: 'numeric' }).format(ele._displayDate)}\n          </h2>\n        </th>\n        <th>\n          <button @click=${ele.incYear} aria-label=\"Next year\" title=\"Next year\" id=\"next-year\">\n            <navigate-next-icon-sk></navigate-next-icon-sk>\n          </button>\n        </th>\n      </tr>\n      <tr>\n        <th>\n          <button\n            @click=${ele.decMonth}\n            aria-label=\"Previous month\"\n            title=\"Previous month\"\n            id=\"previous-month\">\n            <navigate-before-icon-sk></navigate-before-icon-sk>\n          </button>\n        </th>\n        <th colspan=\"5\">\n          <h2 aria-live=\"polite\" id=\"calendar-month\">\n            ${new Intl.DateTimeFormat(ele._locale, { month: 'long' }).format(ele._displayDate)}\n          </h2>\n        </th>\n        <th>\n          <button @click=${ele.incMonth} aria-label=\"Next month\" title=\"Next month\" id=\"next-month\">\n            <navigate-next-icon-sk></navigate-next-icon-sk>\n          </button>\n        </th>\n      </tr>\n      ${ele._weekDayHeader} ${sixWeeks.map((i) => CalendarSk.rowTemplate(ele, i))}\n    </table>\n  `;\n\n  private static buttonForDateTemplate = (\n    ele: CalendarSk,\n    date: number,\n    daysInMonth: number,\n    selected: boolean\n  ) => {\n    if (date < 1 || date > daysInMonth) {\n      return html``;\n    }\n    return html`\n      <button\n        class=\"action\"\n        @click=${ele.dateClick}\n        data-date=${date}\n        tabindex=${selected ? 0 : -1}\n        aria-selected=${selected}>\n        ${date}\n      </button>\n    `;\n  };\n\n  private static rowTemplate = (ele: CalendarSk, weekIndex: number) => {\n    const year = ele.displayYear();\n    const monthIndex = ele.displayMonthIndex();\n    const today = new CalendarDate(new Date());\n\n    // If June starts on a Tuesday then IndexOfTheFirstDayOfTheMonth = 2,\n    // which means if we are filling in the first row we want to leave the first\n    // two days (Sunday and Monday) blank.\n    const firstDayOfTheMonthIndex = firstDayIndexOfMonth(year, monthIndex);\n    const daysInMonth = getNumberOfDaysInMonth(year, monthIndex);\n    const selectedDate = ele._displayDate.getDate();\n    const currentDate = new CalendarDate(ele._displayDate);\n    return html`\n      <tr>\n        ${sevenDaysInAWeek.map((i) => {\n          const date = 7 * weekIndex + i + 1 - firstDayOfTheMonthIndex;\n          currentDate.date = date;\n          const selected = selectedDate === date;\n          return html`\n            <td\n              class=\"\n            ${currentDate.equal(today) ? 'today' : ''}\n            ${selected ? 'selected' : ''}\n          \">\n              ${CalendarSk.buttonForDateTemplate(ele, date, daysInMonth, selected)}\n            </td>\n          `;\n        })}\n      </tr>\n    `;\n  };\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    this.buildWeekDayHeader();\n    this._render();\n  }\n\n  /**\n   * Attach this handler to the 'keydown' event on the appropriate elements\n   * parent, such as document or a 'dialog' element.\n   *\n   * Allows finer grained control of keyboard events on a page with more\n   * than one keyboard listener.\n   */\n  keyboardHandler(e: KeyboardEvent): void {\n    let keyHandled = true;\n    switch (e.code) {\n      case 'PageUp':\n        this.decMonth();\n        break;\n\n      case 'PageDown':\n        this.incMonth();\n        break;\n\n      case 'ArrowRight':\n        this.incDay();\n        break;\n\n      case 'ArrowLeft':\n        this.decDay();\n        break;\n\n      case 'ArrowUp':\n        this.decWeek();\n        break;\n\n      case 'ArrowDown':\n        this.incWeek();\n        break;\n\n      default:\n        keyHandled = false;\n        break;\n    }\n    if (keyHandled) {\n      e.stopPropagation();\n      e.preventDefault();\n      this.querySelector<HTMLButtonElement>('button[aria-selected=\"true\"]')!.focus();\n    }\n  }\n\n  private buildWeekDayHeader() {\n    // March 1, 2020 falls on a Sunday, use that to generate the week day headers.\n    const narrowFormatter = new Intl.DateTimeFormat(this._locale, {\n      weekday: 'narrow',\n    });\n    const longFormatter = new Intl.DateTimeFormat(this._locale, {\n      weekday: 'long',\n    });\n    this._weekDayHeader = html`\n      <tr class=\"weekdayHeader\">\n        ${sevenDaysInAWeek.map(\n          (i) => html`\n            <td>\n              <span abbr=\"${longFormatter.format(new Date(2020, 2, i + 1))}\">\n                ${narrowFormatter.format(new Date(2020, 2, i + 1))}\n              </span>\n            </td>\n          `\n        )}\n      </tr>\n    `;\n  }\n\n  private dateClick(e: MouseEvent) {\n    const d = new Date(this._displayDate);\n    d.setDate(+(e.target as HTMLButtonElement).dataset.date!);\n    this.dispatchEvent(\n      new CustomEvent<Date>('change', {\n        detail: d,\n        bubbles: true,\n      })\n    );\n    this._displayDate = d;\n    this._render();\n  }\n\n  private displayYear(): number {\n    return this._displayDate.getFullYear();\n  }\n\n  private displayMonthIndex(): number {\n    return this._displayDate.getMonth();\n  }\n\n  private incYear() {\n    const year = this.displayYear();\n    const monthIndex = this.displayMonthIndex();\n    let date = this._displayDate.getDate();\n    const daysInMonth = getNumberOfDaysInMonth(year + 1, monthIndex);\n    if (date > daysInMonth) {\n      date = daysInMonth;\n    }\n    this._displayDate = new Date(year + 1, monthIndex, date);\n    this._render();\n  }\n\n  private decYear() {\n    const year = this.displayYear();\n    const monthIndex = this.displayMonthIndex();\n    let date = this._displayDate.getDate();\n    const daysInMonth = getNumberOfDaysInMonth(year - 1, monthIndex);\n    if (date > daysInMonth) {\n      date = daysInMonth;\n    }\n    this._displayDate = new Date(year - 1, monthIndex, date);\n    this._render();\n  }\n\n  private incMonth() {\n    let year = this.displayYear();\n    let monthIndex = this.displayMonthIndex();\n    let date = this._displayDate.getDate();\n\n    monthIndex += 1;\n    if (monthIndex > 11) {\n      monthIndex = 0;\n      year += 1;\n    }\n\n    const daysInMonth = getNumberOfDaysInMonth(year, monthIndex);\n    if (date > daysInMonth) {\n      date = daysInMonth;\n    }\n\n    this._displayDate = new Date(year, monthIndex, date);\n    this._render();\n  }\n\n  private decMonth() {\n    let year = this.displayYear();\n    let monthIndex = this.displayMonthIndex();\n    let date = this._displayDate.getDate();\n\n    monthIndex -= 1;\n    if (monthIndex < 0) {\n      monthIndex = 11;\n      year -= 1;\n    }\n\n    const daysInMonth = getNumberOfDaysInMonth(year, monthIndex);\n    if (date > daysInMonth) {\n      date = daysInMonth;\n    }\n\n    this._displayDate = new Date(year, monthIndex, date);\n    this._render();\n  }\n\n  private incDay() {\n    const year = this.displayYear();\n    const monthIndex = this.displayMonthIndex();\n    const date = this._displayDate.getDate();\n    this._displayDate = new Date(year, monthIndex, date + 1);\n    this._render();\n  }\n\n  private decDay() {\n    const year = this.displayYear();\n    const monthIndex = this.displayMonthIndex();\n    const date = this._displayDate.getDate();\n    this._displayDate = new Date(year, monthIndex, date - 1);\n    this._render();\n  }\n\n  private incWeek() {\n    const year = this.displayYear();\n    const monthIndex = this.displayMonthIndex();\n    const date = this._displayDate.getDate();\n    this._displayDate = new Date(year, monthIndex, date + 7);\n    this._render();\n  }\n\n  private decWeek() {\n    const year = this.displayYear();\n    const monthIndex = this.displayMonthIndex();\n    const date = this._displayDate.getDate();\n    this._displayDate = new Date(year, monthIndex, date - 7);\n    this._render();\n  }\n\n  /** The date to display on the calendar. */\n  get displayDate(): Date {\n    return this._displayDate;\n  }\n\n  set displayDate(v: Date) {\n    this._displayDate = v;\n    this._render();\n  }\n\n  /**\n   * Leave as undefined to use the browser settings. Only really used for\n   * testing.\n   */\n  public get locale(): string | string[] | undefined {\n    return this._locale;\n  }\n\n  public set locale(v: string | string[] | undefined) {\n    this._locale = v;\n    this.buildWeekDayHeader();\n    this._render();\n  }\n}\n\ndefine('calendar-sk', CalendarSk);\n", "import './calendar-sk';\n", "/**\n * @module modules/calendar-input-sk\n * @description <h2><code>calendar-input-sk</code></h2>\n *\n * Displays a text input for the date along with a button that pops up a dialog\n * allowing the user to select the date from a calendar-sk.\n *\n * @evt input - A CustomEvent<Date> with the new date.\n *\n */\nimport { html } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport '../../../elements-sk/modules/icons/date-range-icon-sk';\nimport '../calendar-sk';\nimport { CalendarSk } from '../calendar-sk/calendar-sk';\n\nexport class CalendarInputSk extends ElementSk {\n  private dialog: HTMLDialogElement | null = null;\n\n  private calendar: CalendarSk | null = null;\n\n  private input: HTMLInputElement | null = null;\n\n  private _displayDate: Date = new Date();\n\n  // These two functions store the callbacks from a Promise, which allows the\n  // openHandler() function to be a nice linear function.\n  private resolve: ((value?: any) => void) | null = null;\n\n  private reject: ((reason?: any) => void) | null = null;\n\n  constructor() {\n    super(CalendarInputSk.template);\n  }\n\n  private static template = (ele: CalendarInputSk) => html`\n    <label>\n      <input\n        @input=${ele.inputChangeHandler}\n        type=\"text\"\n        pattern=\"[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}\"\n        title=\"Date in YYYY-MM-DD format.\"\n        placeholder=\"yyyy-mm-dd\"\n        .value=\"${ele._displayDate.getFullYear()}-${ele._displayDate.getMonth() +\n        1}-${ele._displayDate.getDate()}\" />\n      <span class=\"invalid\" aria-live=\"polite\" title=\"Date is invalid.\"> &cross; </span>\n    </label>\n    <button\n      id=\"cal-button\"\n      class=\"action\"\n      @click=${ele.openHandler}\n      title=\"Open calendar dialog to choose the date.\">\n      <date-range-icon-sk></date-range-icon-sk>\n    </button>\n    <dialog @cancel=${ele.dialogCancelHandler}>\n      <calendar-sk\n        @change=${ele.calendarChangeHandler}\n        .displayDate=${ele.displayDate}></calendar-sk>\n      <button @click=${ele.dialogCancelHandler}>Cancel</button>\n    </dialog>\n  `;\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    this._render();\n\n    this.dialog = this.querySelector('dialog')!;\n    this.calendar = this.querySelector<CalendarSk>('calendar-sk');\n    this.input = this.querySelector('input');\n  }\n\n  private inputChangeHandler(e: InputEvent) {\n    // We don't change event from the input element to be confused with the\n    // 'change' event that CalendarInputSk will produce.\n    e.stopPropagation();\n    e.preventDefault();\n\n    const inputElement = e.target! as HTMLInputElement;\n    if (inputElement.validity.patternMismatch) {\n      return;\n    }\n\n    // Since we have checked validity above we can parse the values with\n    // confidence here.\n    const dateString = inputElement.value;\n    const parts = dateString.split('-');\n    try {\n      this.displayDate = new Date(+parts[0], +parts[1] - 1, +parts[2]);\n    } catch (_error) {\n      return;\n    }\n    this.sendEvent();\n  }\n\n  private async openHandler() {\n    const keyboardHandler = (e: KeyboardEvent) => this.calendar!.keyboardHandler(e);\n    try {\n      this.dialog!.showModal();\n      this.dialog!.addEventListener('keydown', keyboardHandler);\n      const date = await new Promise<Date>((resolve, reject) => {\n        this.resolve = resolve;\n        this.reject = reject;\n      });\n      this.displayDate = date;\n      this.sendEvent();\n      this.input!.focus();\n    } catch (_) {\n      // Cancel button was pressed.\n    } finally {\n      this.dialog!.removeEventListener('keydown', keyboardHandler);\n    }\n  }\n\n  private sendEvent() {\n    this.dispatchEvent(\n      new CustomEvent<Date>('input', {\n        detail: this.displayDate,\n        bubbles: true,\n      })\n    );\n  }\n\n  private calendarChangeHandler(e: CustomEvent<Date>) {\n    this.dialog!.close();\n    this.resolve!(e.detail);\n  }\n\n  private dialogCancelHandler() {\n    this.dialog!.close();\n    this.reject!();\n  }\n\n  /** The default date, if not set defaults to today. */\n  get displayDate(): Date {\n    return this._displayDate;\n  }\n\n  set displayDate(val: Date) {\n    this._displayDate = val;\n    this._render();\n  }\n\n  /** @prop locale - The locale, used just for testing. */\n  get locale(): string | string[] | undefined {\n    return this.calendar!.locale;\n  }\n\n  set locale(val: string | string[] | undefined) {\n    this.calendar!.locale = val;\n  }\n}\n\ndefine('calendar-input-sk', CalendarInputSk);\n", "import './calendar-input-sk';\n", "/**\n * @module modules/day-range-sk\n * @description <h2><code>day-range-sk</code></h2>\n *\n * @evt day-range-change - Fired when the selection has stopped changing. Contains\n *      the begin and end timestamps in the details:\n *\n *      {\n *        begin: 1470084997,\n *        end: 1474184677\n *      }\n *\n * @attr {Number} begin - The beginning of the time range in seconds since the epoch.\n * @attr {Number} end - The end of the time range in seconds since the epoch.\n *\n */\nimport { html } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport '../calendar-input-sk';\n\nexport interface DayRangeSkChangeDetail {\n  // Seconds from the Unix epoch.\n  begin: number;\n\n  // Seconds from the Unix epoch.\n  end: number;\n}\n\n// Converts the timestamp in seconds from the epoch into a Date.\nfunction dateFromTimestamp(timestamp: number) {\n  return new Date(timestamp * 1000);\n}\n\nexport class DayRangeSk extends ElementSk {\n  constructor() {\n    super(DayRangeSk.template);\n  }\n\n  private static template = (ele: DayRangeSk) => html`\n    <label class=\"begin\">\n      Begin\n      <calendar-input-sk\n        @input=${ele._beginChanged}\n        .displayDate=${dateFromTimestamp(ele.begin)}></calendar-input-sk>\n    </label>\n    <label class=\"end\">\n      End\n      <calendar-input-sk\n        @input=${ele._endChanged}\n        .displayDate=${dateFromTimestamp(ele.end)}></calendar-input-sk>\n    </label>\n  `;\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    this._upgradeProperty('begin');\n    this._upgradeProperty('end');\n    const now = Date.now();\n    if (!this.begin) {\n      this.begin = now / 1000 - 24 * 60 * 60;\n    }\n    if (!this.end) {\n      this.end = now / 1000;\n    }\n    this._render();\n  }\n\n  attributeChangedCallback(): void {\n    this._render();\n  }\n\n  private _sendEvent() {\n    const detail = {\n      begin: this.begin,\n      end: this.end,\n    };\n    this.dispatchEvent(\n      new CustomEvent<DayRangeSkChangeDetail>('day-range-change', {\n        detail,\n        bubbles: true,\n      })\n    );\n  }\n\n  private _beginChanged(e: CustomEvent<Date>) {\n    this.begin = Math.floor(e.detail.valueOf() / 1000);\n    this._sendEvent();\n  }\n\n  private _endChanged(e: CustomEvent<Date>) {\n    this.end = Math.floor(e.detail.valueOf() / 1000);\n    this._sendEvent();\n  }\n\n  static get observedAttributes(): string[] {\n    return ['begin', 'end'];\n  }\n\n  /** Mirrors the 'begin' attribute. */\n  get begin(): number {\n    return +(this.getAttribute('begin') || '0');\n  }\n\n  set begin(val: number) {\n    this.setAttribute('begin', `${val}`);\n  }\n\n  /** @prop end - Mirrors the 'end' attribute. */\n  get end(): number {\n    return +(this.getAttribute('end') || '0');\n  }\n\n  set end(val: number) {\n    this.setAttribute('end', `${val}`);\n  }\n}\n\ndefine('day-range-sk', DayRangeSk);\n", "import './day-range-sk';\n", "/**\n * @module modules/tricon2-sk\n * @description <h2><code>tricon2-sk</code></h2>\n *\n * The triage state icons.\n *\n * @attr {string} value - A string representing the triage status, one of\n *     \"untriaged\", \"positive\", or \"negative\".\n *\n */\nimport { html } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport '../../../elements-sk/modules/icons/check-circle-icon-sk';\nimport '../../../elements-sk/modules/icons/cancel-icon-sk';\nimport '../../../elements-sk/modules/icons/help-icon-sk';\n\nexport class TriconSk extends ElementSk {\n  constructor() {\n    super(TriconSk.template);\n  }\n\n  private static template = (ele: TriconSk) => {\n    switch (ele.value) {\n      case 'positive':\n        return html` <check-circle-icon-sk></check-circle-icon-sk> `;\n      case 'negative':\n        return html` <cancel-icon-sk></cancel-icon-sk> `;\n      default:\n        return html` <help-icon-sk></help-icon-sk> `;\n    }\n  };\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    this._upgradeProperty('value');\n    this._render();\n  }\n\n  static get observedAttributes(): string[] {\n    return ['value'];\n  }\n\n  /** @prop value {string} Mirrors the 'value' attribute. */\n  get value(): string {\n    return this.getAttribute('value') || '';\n  }\n\n  set value(val: string) {\n    this.setAttribute('value', val);\n  }\n\n  attributeChangedCallback(): void {\n    this._render();\n  }\n}\n\ndefine('tricon2-sk', TriconSk);\n", "import './tricon2-sk';\n", "/**\n * @module modules/triage-status-sk\n * @description <h2><code>triage-status-sk</code></h2>\n *\n * Displays a button that shows the triage status of a cluster.  When the\n * button is pushed a dialog opens that allows the user to see the cluster\n * details and to change the triage status.\n *\n * @evt start-triage - Contains the new triage status. The detail contains the\n *    alert, cluster_type, full_summary, and triage.\n *\n */\nimport { html } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport '../tricon2-sk';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport { FullSummary, TriageStatus, Alert } from '../json';\n\nexport type ClusterType = 'high' | 'low';\n\nexport interface TriageStatusSkStartTriageEventDetails {\n  triage: TriageStatus;\n  full_summary: FullSummary | null;\n  alert: Alert | null;\n  cluster_type: ClusterType;\n  // eslint-disable-next-line no-use-before-define\n  element: TriageStatusSk;\n}\n\nexport class TriageStatusSk extends ElementSk {\n  private _triage: TriageStatus;\n\n  private _full_summary: FullSummary | null;\n\n  private _alert: Alert | null;\n\n  private _cluster_type: ClusterType;\n\n  constructor() {\n    super(TriageStatusSk.template);\n    this._triage = {\n      status: 'untriaged',\n      message: '(none)',\n    };\n    this._full_summary = null;\n    this._alert = null;\n    this._cluster_type = 'low';\n  }\n\n  private static template = (ele: TriageStatusSk) => html`\n    <button title=${ele.triage.message} @click=${ele._start_triage} class=${ele.triage.status}>\n      <tricon2-sk class=\"inside_status\" value=${ele.triage.status}></tricon2-sk>\n    </button>\n  `;\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    this._render();\n    this._upgradeProperty('alert');\n    this._upgradeProperty('cluster_type');\n    this._upgradeProperty('full_summary');\n    this._upgradeProperty('triage');\n  }\n\n  private _start_triage() {\n    const detail = {\n      full_summary: this.full_summary,\n      triage: this.triage,\n      alert: this.alert,\n      cluster_type: this.cluster_type,\n      element: this,\n    };\n    this.dispatchEvent(\n      new CustomEvent<TriageStatusSkStartTriageEventDetails>('start-triage', {\n        detail,\n        bubbles: true,\n      })\n    );\n  }\n\n  /** The config this cluster is associated with. */\n  get alert(): Alert | null {\n    return this._alert;\n  }\n\n  set alert(val: Alert | null) {\n    this._alert = val;\n  }\n\n  /** The type of cluster. */\n  get cluster_type(): ClusterType {\n    return this._cluster_type;\n  }\n\n  set cluster_type(val: ClusterType) {\n    this._cluster_type = val;\n  }\n\n  /** A serialized ClusterSummary and FrameResponse. */\n  get full_summary(): FullSummary | null {\n    return this._full_summary;\n  }\n\n  set full_summary(val: FullSummary | null) {\n    this._full_summary = val;\n  }\n\n  /** The triage status of the cluster. */\n  get triage(): TriageStatus {\n    return this._triage;\n  }\n\n  set triage(val: TriageStatus) {\n    this._triage = val;\n    this._render();\n  }\n}\n\ndefine('triage-status-sk', TriageStatusSk);\n", "import './triage-status-sk';\n", "/**\n * @module module/triage-page-sk\n * @description <h2><code>triage-page-sk</code></h2>\n *\n * Allows triaging clusters.\n *\n * TODO(jcgregorio) Needs working demo page and tests.\n *\n */\nimport { html } from 'lit/html.js';\nimport { define } from '../../../elements-sk/modules/define';\nimport { equals, deepCopy } from '../../../infra-sk/modules/object';\nimport { fromObject } from '../../../infra-sk/modules/query';\nimport { jsonOrThrow } from '../../../infra-sk/modules/jsonOrThrow';\nimport { stateReflector } from '../../../infra-sk/modules/stateReflector';\nimport { HintableObject } from '../../../infra-sk/modules/hintable';\nimport { errorMessage } from '../errorMessage';\nimport { ElementSk } from '../../../infra-sk/modules/ElementSk';\nimport {\n  RegressionRangeRequest,\n  RegressionRow,\n  Subset,\n  RegressionRangeResponse,\n  FullSummary,\n  Regression,\n  FrameResponse,\n  ClusterSummary,\n  TriageRequest,\n  TriageResponse,\n} from '../json';\n\nimport '../../../elements-sk/modules/spinner-sk';\n\nimport '../cluster-summary2-sk';\nimport '../commit-detail-sk';\nimport '../day-range-sk';\nimport '../triage-status-sk';\nimport { TriageStatusSkStartTriageEventDetails } from '../triage-status-sk/triage-status-sk';\nimport {\n  ClusterSummary2SkTriagedEventDetail,\n  ClusterSummary2SkOpenKeysEventDetail,\n} from '../cluster-summary2-sk/cluster-summary2-sk';\nimport { DayRangeSkChangeDetail } from '../day-range-sk/day-range-sk';\n\nfunction _full_summary(frame: FrameResponse, summary: ClusterSummary): FullSummary {\n  return {\n    frame,\n    summary,\n    triage: {\n      message: '',\n      status: 'untriaged',\n    },\n  };\n}\n\ninterface State {\n  begin: number;\n  end: number;\n  subset: Subset;\n  filter: string; // Legacy query parameter alias for alert_filter.\n  alert_filter: string;\n}\n\ninterface ValueOptions {\n  value: string;\n  title: string;\n  display: string;\n}\n\nexport class TriagePageSk extends ElementSk {\n  private state: State;\n\n  private triageInProgress: boolean;\n\n  private refreshRangeInProgress: boolean;\n\n  private statusIntervalID: number;\n\n  private firstConnect: boolean;\n\n  private reg: RegressionRangeResponse;\n\n  private dialogState: Partial<TriageStatusSkStartTriageEventDetails> = {};\n\n  private lastState: Partial<State> = {};\n\n  private dialog: HTMLDialogElement | null = null;\n\n  private allFilterOptions: ValueOptions[] = [];\n\n  constructor() {\n    super(TriagePageSk.template);\n    const now = Math.floor(Date.now() / 1000);\n\n    // The state to reflect to the URL, also the body of the POST request\n    // we send to /_/reg/.\n    this.state = {\n      begin: now - 2 * 7 * 24 * 60 * 60, // 2 weeks.\n      end: now,\n      subset: 'untriaged',\n      alert_filter: 'ALL',\n      filter: '',\n    };\n\n    this.reg = {\n      header: [],\n      table: [],\n      categories: [],\n    };\n\n    this.allFilterOptions = [];\n\n    this.triageInProgress = false;\n\n    this.refreshRangeInProgress = false;\n\n    // The ID of the setInterval that is updating _currentClusteringStatus.\n    this.statusIntervalID = 0;\n\n    this.firstConnect = false;\n  }\n\n  private static template = (ele: TriagePageSk) => html`\n    <header>\n      <details>\n        <summary>Filter</summary>\n        <h3>Which commits to display.</h3>\n        <select @input=${ele.commitsChange}>\n          <option\n            ?selected=${ele.state.subset === 'all'}\n            value=\"all\"\n            title=\"Show results for all commits in the time range.\">\n            All\n          </option>\n          <option\n            ?selected=${ele.state.subset === 'regressions'}\n            value=\"regressions\"\n            title=\"Show only the commits with regressions in the given time range regardless of triage status.\">\n            Regressions\n          </option>\n          <option\n            ?selected=${ele.state.subset === 'untriaged'}\n            value=\"untriaged\"\n            title=\"Show only commits with untriaged regressions in the given time range.\">\n            Untriaged\n          </option>\n        </select>\n\n        <h3>Which alerts to display.</h3>\n\n        <select @input=${ele.filterChange}>\n          ${TriagePageSk.allFilters(ele)}\n        </select>\n      </details>\n      <details>\n        <summary>Range</summary>\n        <day-range-sk\n          @day-range-change=${ele.rangeChange}\n          begin=${ele.state.begin}\n          end=${ele.state.end}></day-range-sk>\n      </details>\n    </header>\n    <spinner-sk ?active=${ele.triageInProgress || ele.refreshRangeInProgress}></spinner-sk>\n\n    <dialog>\n      <cluster-summary2-sk\n        @open-keys=${ele.openKeys}\n        @triaged=${ele.triaged}\n        .full_summary=${ele.dialogState!.full_summary}\n        .triage=${ele.dialogState!.triage}\n        .alert=${ele.dialogState!.alert}></cluster-summary2-sk>\n      <div class=\"buttons\">\n        <button @click=${ele.close}>Close</button>\n      </div>\n    </dialog>\n\n    <table @start-triage=${ele.triage_start}>\n      <tr>\n        <th>Commit</th>\n        ${TriagePageSk.headers(ele)}\n      </tr>\n      <tr>\n        <th></th>\n        ${TriagePageSk.subHeaders(ele)}\n      </tr>\n      ${TriagePageSk.rows(ele)}\n    </table>\n  `;\n\n  private static rows = (ele: TriagePageSk) =>\n    ele.reg!.table!.map(\n      (row, rowIndex) => html`\n        <tr>\n          <td class=\"fixed\">\n            <commit-detail-sk .cid=${row!.cid}></commit-detail-sk>\n          </td>\n          ${TriagePageSk.columns(ele, row!, rowIndex)}\n        </tr>\n      `\n    );\n\n  private static columns = (ele: TriagePageSk, row: RegressionRow, rowIndex: number) =>\n    row.columns!.map((col, colIndex) => {\n      const ret = [];\n\n      if (ele.stepDownAt(colIndex)) {\n        ret.push(html`\n          <td class=\"cluster\">${TriagePageSk.lowCell(ele, rowIndex, col!, colIndex)}</td>\n        `);\n      }\n\n      if (ele.stepUpAt(colIndex)) {\n        ret.push(html`\n          <td class=\"cluster\">${TriagePageSk.highCell(ele, rowIndex, col!, colIndex)}</td>\n        `);\n      }\n\n      if (ele.notBoth(colIndex)) {\n        ret.push(html` <td></td> `);\n      }\n      return ret;\n    });\n\n  private static lowCell = (\n    ele: TriagePageSk,\n    rowIndex: number,\n    col: Regression,\n    colIndex: number\n  ) => {\n    if (col && col.low) {\n      return html`\n        <triage-status-sk\n          .alert=${ele.alertAt(colIndex)}\n          .cluster_type=${'low'}\n          .full_summary=${_full_summary(col.frame!, col.low)}\n          .triage=${col.low_status}></triage-status-sk>\n      `;\n    }\n    return html`\n      <a\n        title=\"No clusters found.\"\n        href=\"/g/c/${ele.hashFrom(rowIndex)}?query=${ele.encQueryFrom(colIndex)}\">\n        ∅\n      </a>\n    `;\n  };\n\n  private static highCell = (\n    ele: TriagePageSk,\n    rowIndex: number,\n    col: Regression,\n    colIndex: number\n  ) => {\n    if (col && col.high) {\n      return html`\n        <triage-status-sk\n          .alert=${ele.alertAt(colIndex)}\n          .cluster_type=${'high'}\n          .full_summary=${_full_summary(col.frame!, col.high)}\n          .triage=${col.high_status}></triage-status-sk>\n      `;\n    }\n    return html`\n      <a\n        title=\"No clusters found.\"\n        href=\"/g/c/${ele.hashFrom(rowIndex)}?query=${ele.encQueryFrom(colIndex)}\">\n        ∅\n      </a>\n    `;\n  };\n\n  private static subHeaders = (ele: TriagePageSk) =>\n    ele.reg.header!.map((_, index) => {\n      const ret = [];\n      if (ele.stepDownAt(index)) {\n        ret.push(html` <th>Low</th> `);\n      }\n      if (ele.stepUpAt(index)) {\n        ret.push(html` <th>High</th> `);\n      }\n      // If we have only one of High or Low we stuff in an empty th to match\n      // colspan=2 above.\n      if (ele.notBoth(index)) {\n        ret.push(html` <th></th> `);\n      }\n      return ret;\n    });\n\n  private static headers = (ele: TriagePageSk) =>\n    ele.reg.header!.map((item) => {\n      let displayName = item!.display_name;\n      if (!item!.display_name) {\n        displayName = item!.query.slice(0, 10);\n      }\n      // The colspan=2 is important since we will have two columns under each\n      // header, one for high and one for low.\n      return html`\n        <th colspan=\"2\">\n          <a href=\"/a/?${item!.id_as_string}\">${displayName}</a>\n        </th>\n      `;\n    });\n\n  private static allFilters = (ele: TriagePageSk) =>\n    ele.allFilterOptions.map(\n      (o) => html`\n        <option ?selected=${ele.state.alert_filter === o.value} value=${o.value} title=${o.title}>\n          ${o.display}\n        </option>\n      `\n    );\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    if (this.firstConnect) {\n      return;\n    }\n    this.firstConnect = true;\n\n    this._render();\n    this.dialog = this.querySelector('triage-page-sk > dialog');\n    this.stateHasChanged = stateReflector(\n      () => this.state as unknown as HintableObject,\n      (state) => {\n        this.state = state as unknown as State;\n        // Support the legacy query parameter.\n        if (this.state.filter) {\n          this.state.alert_filter = this.state.filter;\n        }\n        this._render();\n        this.updateRange();\n      }\n    );\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  private stateHasChanged = () => {};\n\n  private commitsChange(e: InputEvent) {\n    this.state.subset = (e.target! as HTMLInputElement).value as Subset;\n    this.updateRange();\n    this.stateHasChanged();\n  }\n\n  private filterChange(e: InputEvent) {\n    this.state.alert_filter = (e.target! as HTMLInputElement).value;\n    this.updateRange();\n    this.stateHasChanged();\n  }\n\n  private triage_start(e: CustomEvent<TriageStatusSkStartTriageEventDetails>) {\n    this.dialogState = e.detail;\n    this._render();\n    this.dialog!.showModal();\n  }\n\n  private triaged(e: CustomEvent<ClusterSummary2SkTriagedEventDetail>) {\n    e.stopPropagation();\n    const body: TriageRequest = {\n      cid: e.detail.columnHeader.offset,\n      triage: e.detail.triage,\n      alert: this.dialogState!.alert!,\n      cluster_type: this.dialogState!.cluster_type!,\n    };\n    this.dialog!.close();\n    this._render();\n    if (this.triageInProgress) {\n      errorMessage('A triage request is in progress.');\n      return;\n    }\n    this.triageInProgress = true;\n    fetch('/_/triage/', {\n      method: 'POST',\n      body: JSON.stringify(body),\n      headers: {\n        'Content-Type': 'application/json',\n      },\n    })\n      .then(jsonOrThrow)\n      .then((json: TriageResponse) => {\n        this.triageInProgress = false;\n        this._render();\n        if (json.bug) {\n          // Open the bug reporting page in a new window.\n          window.open(json.bug, '_blank');\n        }\n      })\n      .catch((msg) => {\n        if (msg) {\n          errorMessage(msg, 10000);\n        }\n        this.triageInProgress = false;\n        this._render();\n      });\n  }\n\n  private close() {\n    this.dialog!.close();\n  }\n\n  private stepUpAt(index: number) {\n    const dir = this.reg.header![index]!.direction;\n    return dir === 'UP' || dir === 'BOTH';\n  }\n\n  private stepDownAt(index: number) {\n    const dir = this.reg.header![index]!.direction;\n    return dir === 'DOWN' || dir === 'BOTH';\n  }\n\n  private notBoth(index: number) {\n    return this.reg.header![index]!.direction !== 'BOTH';\n  }\n\n  private alertAt(index: number) {\n    return this.reg.header![index];\n  }\n\n  private encQueryFrom(colIndex: number) {\n    return encodeURIComponent(this.reg.header![colIndex]!.query);\n  }\n\n  private hashFrom(rowIndex: number) {\n    return this.reg.table![rowIndex]!.cid!.offset;\n  }\n\n  private openKeys(e: CustomEvent<ClusterSummary2SkOpenKeysEventDetail>) {\n    const query = {\n      keys: e.detail.shortcut,\n      begin: e.detail.begin,\n      end: e.detail.end,\n      xbaroffset: e.detail.xbar.offset,\n      num_commits: 50,\n      request_type: 1,\n    };\n    window.open(`/e/?${fromObject(query)}`, '_blank');\n  }\n\n  private rangeChange(e: CustomEvent<DayRangeSkChangeDetail>) {\n    this.state.begin = Math.floor(e.detail.begin);\n    this.state.end = Math.floor(e.detail.end);\n    this.stateHasChanged();\n    this.updateRange();\n  }\n\n  private updateRange() {\n    if (this.refreshRangeInProgress) {\n      return;\n    }\n    if (\n      equals(this.lastState! as unknown as HintableObject, this.state as unknown as HintableObject)\n    ) {\n      return;\n    }\n    this.lastState = deepCopy(this.state);\n    this.refreshRangeInProgress = true;\n    this._render();\n    const body: RegressionRangeRequest = this.state;\n    fetch('/_/reg/', {\n      method: 'POST',\n      body: JSON.stringify(body),\n      headers: {\n        'Content-Type': 'application/json',\n      },\n    })\n      .then(jsonOrThrow)\n      .then((json: RegressionRangeResponse) => {\n        this.refreshRangeInProgress = false;\n        this.reg = json;\n        this.calc_all_filter_options();\n        this._render();\n      })\n      .catch((msg) => {\n        if (msg) {\n          errorMessage(msg, 10000);\n        }\n        this.refreshRangeInProgress = false;\n        this._render();\n      });\n  }\n\n  private calc_all_filter_options() {\n    const opts = [\n      {\n        value: 'ALL',\n        title: 'Show all alerts.',\n        display: 'Show all alerts.',\n      },\n      {\n        value: 'OWNER',\n        title:\n          \"Show only the alerts owned by the logged in user (or all alerts if the user doesn't own any alerts).\",\n        display: 'Show alerts you own.',\n      },\n    ];\n    if (this.reg && this.reg.categories) {\n      this.reg.categories.forEach((cat) => {\n        const displayName = cat || '(default)';\n        opts.push({\n          value: `cat:${cat}`,\n          title: `Show only the alerts in the ${displayName} category.`,\n          display: `Category: ${displayName}`,\n        });\n      });\n    }\n    this.allFilterOptions = opts;\n  }\n}\n\ndefine('triage-page-sk', TriagePageSk);\n", "import './triage-page-sk';\n", "import '../modules/perf-scaffold-sk';\nimport '../modules/triage-page-sk';\n"],
  "mappings": "8zDAkuBA,SAASA,GACPC,EACAC,EAAAA,CAOA,GAAA,CAAKC,GAAQF,CAAAA,GAAAA,CAASA,EAAIG,eAAe,KAAA,EAiBvC,MAAUC,MAhBI,gCAAA,EAk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G,EAAE,MAIhCjC,GAAA;;yBAEYiC,EAAM,YAAY,KAAKP,CAAW;;OAGvD,CAAC,EAEYf,GAAA,WAAciB,GAC3BA,EAAI,iBAAiB,IAClBM,MAAMlC,GAAA;4BACe4B,EAAI,MAAM,eAAiBM,EAAE,KAAK,UAAUA,EAAE,KAAK,UAAUA,EAAE,KAAK;YACpFA,EAAE,OAAO;;OAEd,KAwMPjC,GAAA,QAAO,iBAAkBU,EAAY,iFC7frC,OCAA,IAAAwB,GAAO,SACPC,GAAO",
  "names": ["trustFromTemplateString", "tsa", "stringFromTSA", "isArray", "hasOwnProperty", "Error", "policy", "createHTML", "resolveDirective", "part", "value", "parent", "attributeIndex", "noChange", "currentDirective", "__directives", "__directive", "nextDirectiveConstructor", "isPrimitive", "constructor", "_$initialize", "_$resolve", "values", "global", "trustedTypes", "boundAttributeSuffix", "marker", "markerMatch", "nodeMarker", "d", "createMarker", "isIterable", "SPACE_CHAR", "textEndRegex", "commentEndRegex", "comment2EndRegex", "tagEndRegex", "singleQuoteAttrEndRegex", "doubleQuoteAttrEndRegex", "rawTextElement", "tag", "html", "svg", "mathml", "nothing", "templateCache", "walker", "getTemplateHtml", "Template", "TemplateInstance", "ChildPart", "AttributePart", "PropertyPart", "BooleanAttributePart", "EventPart", "ElementPart", "_$LH", "polyfillSupport", "render", "globalThis", "createPolicy", "s", "Math", "random", "toFixed", "slice", "document", "createComment", "Array", "Symbol", "iterator", "RegExp", "type", "strings", "_$litType$", "for", "WeakMap", "createTreeWalker", "l", "length", "attrNames", "rawTextEndRegex", "regex", "i", "attrName", "match", "attrNameEndIndex", "lastIndex", "exec", "test", "end", "startsWith", "push", "options", "node", "this", "parts", "nodeIndex", "attrNameIndex", "partCount", "el", "createElement", "currentNode", "content", "wrapper", "firstChild", "replaceWith", "childNodes", "nextNode", "nodeType", "hasAttributes", "name", "getAttributeNames", "endsWith", "realName", "statics", "getAttribute", "split", "m", "index", "ctor", "removeAttribute", "tagName", "textContent", "emptyScript", "append", "data", "indexOf", "_options", "innerHTML", "template", "_$parts", "_$disconnectableChildren", "_$template", "_$parent", "parentNode", "_$isConnected", "fragment", "creationScope", "importNode", "partIndex", "templatePart", "nextSibling", "_$setValue", "__isConnected", "startNode", "endNode", "_$committedValue", "_$startNode", "_$endNode", "isConnected", "directiveParent", "_$clear", "_commitText", "_commitTemplateResult", "_commitNode", "_commitIterable", "insertBefore", "_insert", "createTextNode", "result", "_$getTemplate", "h", "_update", "instance", "_clone", "get", "set", "itemParts", "itemPart", "item", "start", "from", "_$notifyConnectionChanged", "n", "remove", "element", "fill", "String", "valueIndex", "noCommit", "change", "v", "_commitValue", "setAttribute", "toggleAttribute", "super", "newListener", "oldListener", "shouldRemoveListener", "capture", "once", "passive", "shouldAddListener", "removeEventListener", "addEventListener", "event", "call", "host", "handleEvent", "_boundAttributeSuffix", "_marker", "_markerMatch", "_HTML_RESULT", "_getTemplateHtml", "_TemplateInstance", "_isIterable", "_resolveDirective", "_ChildPart", "_AttributePart", "_BooleanAttributePart", "_EventPart", "_PropertyPart", "_ElementPart", "litHtmlPolyfillSupport", "litHtmlVersions", "container", "partOwnerNode", "renderBefore", "html_exports", "__export", "si", "ke", "Se", "R", "D", "Q", "Oe", "init_html", "__esmMin", "init_lit_html", "choose", "value", "cases", "defaultCase", "c", "choose_exports", "__export", "rr", "init_choose", "__esmMin", "define", "tagName", "cl", "exports", "upgradeProperty", "ele", "prop", "value", "exports", "html_js_1", "upgradeProperty_1", "ElementSk", "templateFn", "name", "exports", "__exportStar", "exports", "define_1", "upgradeProperty_1", "ToastSk", "val", "exports", "define_1", "ErrorToastSk", "e", "exports", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "errorMessage", "message", "duration", "__async", "detail", "exports", "rootDomain", "ret", "exports", "html_js_1", "define_1", "errorMessage_1", "ElementSk_1", "url_1", "exports", "LoggedIn", "_0", "__async", "url", "resp", "defaultStatus", "fakeStatus", "AloginSk", "_AloginSk", "__superGet", "domain", "ele", "define_1", "iconSkTemplate", "icon", "html_js_1", "define_1", "ElementSk_1", "exports", "ThemeChooserSk", "_ThemeChooserSk", "val", "isDarkMode", "define_1", "iconSkTemplate", "icon", "define_1", "buttonTemplate", "AppSk", "header", "sidebar", "btn", "exports", "getBuildTag", "tag", "_b", "_a", "ats", "rawTag", "gitTag", "exports", "html_js_1", "choose_js_1", "define_1", "ElementSk_1", "window_1", "SIDEBAR_HELP_ID", "BUILDBOT_GIT", "move", "from", "to", "ele", "PerfScaffoldSk", "_a", "tag", "buildTag", "div", "mutList", "mut", "element", "urlText", "urlHref", "node", "exports", "fromParamSet", "o", "ret", "key", "value", "exports", "toParamSet", "s", "vars", "v", "pair", "fromObject", "toObject", "target", "targetValue", "r", "splitAmp", "queryStr", "separator", "query_1", "deepCopy", "o", "exports", "equals", "a", "b", "ta", "getDelta", "d", "ret", "key", "applyDelta", "delta", "JsonOrThrowError", "resp", "exports", "jsonOrThrow", "exports", "resolve", "$", "query", "ele", "$$", "findParent", "nodeName", "findParentSafe", "query", "__importStar", "object", "dom_1", "stateReflector", "getState", "setState", "defaultState", "loaded", "stateFromURL", "delta", "new_state", "old_state", "new_delta", "old_delta", "q", "exports", "errorMessage_1", "errorMessage", "message", "duration", "exports", "define_1", "upgradeProperty_1", "SpinnerSk", "val", "exports", "define_1", "upgradeProperty_1", "CollapseSk", "val", "exports", "TIME_DELTAS", "exports", "BYTES_DELTAS", "pad", "num", "size", "str", "strDuration", "seconds", "rv", "td", "s", "diffDate", "now", "diff", "humanize", "bytes", "b", "unit", "localeTime", "date", "timezone", "n", "deltas", "i", "index", "Params", "v", "exports", "ParamSet", "ReadOnlyParamSet", "Trace", "TraceSet", "SerializesToString", "CommitNumber", "TimestampSeconds", "CacheType", "CL", "__decorate", "decorators", "target", "key", "desc", "c", "r", "d", "i", "init_tslib_es6", "__esmMin", "customElement", "tagName", "classOrTarget", "context", "addInitializer", "customElements", "define", "global", "supportsAdoptingStyleSheets", "constructionToken", "cssTagCache", "CSSResult", "unsafeCSS", "css", "adoptStyles", "getCompatibleStyle", "globalThis", "ShadowRoot", "ShadyCSS", "nativeShadow", "Document", "prototype", "CSSStyleSheet", "Symbol", "WeakMap", "cssText", "strings", "safeToken", "this", "Error", "_strings", "styleSheet", "_styleSheet", "cacheable", "length", "get", "replaceSync", "set", "toString", "value", "String", "values", "reduce", "acc", "v", "idx", "renderRoot", "styles", "adoptedStyleSheets", "map", "s", "style", "document", "createElement", "nonce", "setAttribute", "textContent", "appendChild", "sheet", "rule", "cssRules", "is", "defineProperty", "getOwnPropertyDescriptor", "getOwnPropertyNames", "getOwnPropertySymbols", "getPrototypeOf", "global", "trustedTypes", "emptyStringForBooleanAttribute", "polyfillSupport", "JSCompiler_renameProperty", "defaultConverter", "notEqual", "defaultPropertyDeclaration", "ReactiveElement", "Object", "globalThis", "emptyScript", "reactiveElementPolyfillSupport", "prop", "_obj", "value", "type", "Boolean", "Array", "JSON", "stringify", "fromValue", "Number", "parse", "e", "old", "attribute", "String", "converter", "reflect", "hasChanged", "Symbol", "metadata", "litPropertyMetadata", "WeakMap", "HTMLElement", "initializer", "this", "__prepare", "_initializers", "push", "observedAttributes", "finalize", "__attributeToPropertyMap", "keys", "name", "options", "state", "elementProperties", "set", "noAccessor", "key", "descriptor", "getPropertyDescriptor", "prototype", "get", "v", "call", "oldValue", "requestUpdate", "configurable", "enumerable", "hasOwnProperty", "superCtor", "Map", "finalized", "props", "properties", "propKeys", "p", "createProperty", "attr", "__attributeNameForProperty", "elementStyles", "finalizeStyles", "styles", "isArray", "Set", "flat", "Infinity", "reverse", "s", "unshift", "getCompatibleStyle", "toLowerCase", "constructor", "super", "__instanceProperties", "isUpdatePending", "hasUpdated", "__reflectingProperty", "__initialize", "__updatePromise", "Promise", "res", "enableUpdating", "_$changedProperties", "__saveInstanceProperties", "forEach", "i", "controller", "__controllers", "add", "renderRoot", "isConnected", "hostConnected", "delete", "instanceProperties", "size", "createRenderRoot", "shadowRoot", "attachShadow", "shadowRootOptions", "adoptStyles", "connectedCallback", "c", "_requestedUpdate", "disconnectedCallback", "hostDisconnected", "_old", "_$attributeToProperty", "attrValue", "toAttribute", "removeAttribute", "setAttribute", "ctor", "propName", "getPropertyOptions", "fromAttribute", "_$changeProperty", "__enqueueUpdate", "has", "__reflectingProperties", "reject", "result", "scheduleUpdate", "performUpdate", "wrapped", "shouldUpdate", "changedProperties", "willUpdate", "hostUpdate", "update", "__markUpdated", "_$didUpdate", "_changedProperties", "hostUpdated", "firstUpdated", "updated", "updateComplete", "getUpdateComplete", "__propertyToAttribute", "mode", "reactiveElementVersions", "property", "options", "protoOrTarget", "nameOrContext", "standardProperty", "proto", "name", "hasOwnProperty", "constructor", "createProperty", "__spreadProps", "__spreadValues", "wrapped", "Object", "getOwnPropertyDescriptor", "defaultPropertyDeclaration", "attribute", "type", "String", "converter", "defaultConverter", "reflect", "hasChanged", "notEqual", "target", "context", "kind", "metadata", "properties", "globalThis", "litPropertyMetadata", "get", "set", "Map", "v", "oldValue", "call", "this", "requestUpdate", "_$changeProperty", "value", "Error", "state", "options", "property", "__spreadProps", "__spreadValues", "attribute", "desc", "obj", "name", "descriptor", "configurable", "enumerable", "Reflect", "decorate", "Object", "defineProperty", "query", "selector", "cache", "protoOrTarget", "nameOrContext", "descriptor", "doQuery", "el", "renderRoot", "querySelector", "get", "set", "key", "Symbol", "this", "v", "desc", "result", "call", "hasUpdated", "queryAssignedElements", "options", "obj", "name", "slot", "selector", "slotSelector", "desc", "get", "slotEl", "this", "renderRoot", "querySelector", "elements", "assignedElements", "filter", "node", "matches", "init_decorators", "__esmMin", "init_custom_element", "init_property", "init_state", "init_event_options", "init_query", "init_query_all", "init_query_async", "init_query_assigned_elements", "init_query_assigned_nodes", "LitElement", "polyfillSupport", "ReactiveElement", "constructor", "this", "renderOptions", "host", "__childPart", "createRenderRoot", "renderRoot", "super", "renderBefore", "firstChild", "changedProperties", "value", "render", "hasUpdated", "isConnected", "update", "connectedCallback", "setConnected", "disconnectedCallback", "noChange", "globalThis", "litElementHydrateSupport", "litElementPolyfillSupport", "litElementVersions", "push", "init_lit", "__esmMin", "init_reactive_element", "init_lit_html", "init_lit_element", "init_is_server", "ATTACHABLE_CONTROLLER", "FOR_ATTRIBUTE_OBSERVER", "AttachableController", "init_attachable_controller", "__esmMin", "init_lit", "records", "_a", "record", "htmlFor", "control", "host", "onControlChange", "EVENTS", "FocusRing", "HANDLED_BY_FOCUS_RING", "init_focus_ring", "__esmMin", "init_lit", "init_decorators", "init_attachable_controller", "h", "AttachableController", "htmlFor", "control", "event", "_a", "_b", "prev", "next", "changed", "__decorate", "n", "styles", "init_focus_ring_styles", "__esmMin", "init_lit", "i", "MdFocusRing", "init_md_focus_ring", "__esmMin", "init_decorators", "init_focus_ring", "init_focus_ring_styles", "FocusRing", "styles", "__decorate", "t", "PartType", "directive", "Directive", "ATTRIBUTE", "CHILD", "PROPERTY", "BOOLEAN_ATTRIBUTE", "EVENT", "ELEMENT", "c", "values", "_$litDirective$", "_partInfo", "_$isConnected", "this", "_$parent", "part", "parent", "attributeIndex", "__part", "__attributeIndex", "props", "update", "_part", "render", "classMap", "directive", "Directive", "partInfo", "super", "type", "PartType", "ATTRIBUTE", "name", "strings", "length", "Error", "classInfo", "Object", "keys", "filter", "key", "join", "part", "this", "_previousClasses", "Set", "_staticClasses", "split", "s", "has", "add", "render", "classList", "element", "remove", "delete", "value", "noChange", "init_class_map", "__esmMin", "EASING", "init_animation", "__esmMin", "PRESS_GROW_MS", "MINIMUM_PRESS_MS", "INITIAL_ORIGIN_SCALE", "PADDING", "SOFT_EDGE_MINIMUM_SIZE", "SOFT_EDGE_CONTAINER_RATIO", "PRESS_PSEUDO", "ANIMATION_FILL", "State", "EVENTS", "TOUCH_DELAY_MS", "FORCED_COLORS", "Ripple", "init_ripple", "__esmMin", "init_lit", "init_decorators", "init_class_map", "init_attachable_controller", "init_animation", "h", "AttachableController", "htmlFor", "control", "classes", "ke", "Rt", "changedProps", "event", "__async", "resolve", "height", "width", "maxDim", "softEdgeSize", "initialSize", "maxRadius", "__pow", "pointerEvent", "scrollX", "scrollY", "left", "top", "documentX", "documentY", "pageX", "pageY", "positionEvent", "endPoint", "startPoint", "_a", "translateStart", "translateEnd", "EASING", "animation", "pressAnimationPlayState", "isPrimaryButton", "x", "y", "bottom", "right", "pointerType", "prev", "next", "__decorate", "n", "r", "e", "styles", "init_ripple_styles", "__esmMin", "init_lit", "i", "MdRipple", "init_ripple", "__esmMin", "init_decorators", "init_ripple_styles", "Ripple", "styles", "__decorate", "t", "isAriaAttribute", "attribute", "ARIA_ATTRIBUTES", "ariaPropertyToAttribute", "property", "ARIA_PROPERTIES", "init_aria", "__esmMin", "mixinDelegatesAria", "base", "WithDelegatesAriaElement", "_a", "name", "oldValue", "newValue", "isAriaAttribute", "privateIgnoreAttributeChangesFor", "dataProperty", "ariaAttributeToDataProperty", "ariaAttributeToDataAttribute", "setupDelegatesAriaProperties", "ctor", "ariaProperty", "ARIA_PROPERTIES", "ariaAttribute", "ariaPropertyToAttribute", "dataAttribute", "value", "prevValue", "dashLetter", "init_delegate", "__esmMin", "init_lit", "init_aria", "mixinElementInternals", "base", "WithElementInternalsElement", "internals", "privateInternals", "init_element_internals", "__esmMin", "setupFormSubmitter", "ctor", "instance", "submitter", "event", "__async", "type", "internals", "elementInternals", "form", "resolve", "submitEvent", "init_form_submitter", "__esmMin", "init_lit", "init_element_internals", "dispatchActivationClick", "element", "event", "isActivationClick", "squelchEvent", "squelched", "isSquelchingEvents", "squelchEventsForMicrotask", "__async", "init_form_label_activation", "__esmMin", "buttonBaseClass", "Button", "init_button", "__esmMin", "init_md_focus_ring", "init_ripple", "init_lit", "init_decorators", "init_delegate", "init_form_submitter", "init_form_label_activation", "init_element_internals", "mixinDelegatesAria", "mixinElementInternals", "h", "_a", "name", "internals", "isRippleDisabled", "buttonOrLink", "buttonId", "ke", "ariaLabel", "ariaHasPopup", "ariaExpanded", "D", "icon", "event", "isActivationClick", "dispatchActivationClick", "setupFormSubmitter", "__decorate", "n", "e", "o", "OutlinedButton", "init_outlined_button", "__esmMin", "init_lit", "init_button", "Button", "ke", "styles", "init_outlined_styles", "__esmMin", "init_lit", "i", "styles", "init_shared_styles", "__esmMin", "init_lit", "i", "outlined_button_exports", "__export", "MdOutlinedButton", "init_outlined_button", "__esmMin", "init_decorators", "init_outlined_styles", "init_shared_styles", "OutlinedButton", "styles", "__decorate", "t", "html_js_1", "define_1", "upgradeProperty_1", "human_1", "ElementSk_1", "json_1", "CommitDetailSk", "_CommitDetailSk", "link", "val", "exports", "ele", "html_js_1", "define_1", "dom_1", "ElementSk_1", "CommitDetailPanelSk", "_CommitDetailPanelSk", "_", "oldValue", "newValue", "val", "index", "e", "ele", "commit", "detail", "exports", "item", "require_d3_array", "__commonJSMin", "exports", "module", "global", "factory", "ascending", "b", "bisector", "f", "delta", "compare", "d", "x", "ascendingComparator", "left", "a", "lo", "hi", "mid", "right", "center", "i", "number", "numbers", "values", "valueof", "value", "index", "ascendingBisect", "bisectRight", "bisectLeft", "bisectCenter", "count", "length$1", "array", "empty", "length", "arrayify", "reducer", "reduce", "cross", "lengths", "j", "product", "cumsum", "sum", "v", "descending", "variance", "mean", "deviation", "extent", "min", "max", "Adder", "p", "y", "n", "fsum", "adder", "fcumsum", "InternMap", "entries", "key", "keyof", "intern_get", "intern_set", "intern_delete", "InternSet", "_intern", "_key", "identity", "group", "keys", "nest", "groups", "rollup", "rollups", "unique", "indexes", "map", "regroup", "permute", "source", "sort", "F", "c", "groupSort", "ak", "av", "bk", "bv", "slice", "constant", "e10", "e5", "e2", "ticks", "start", "stop", "reverse", "step", "tickIncrement", "r0", "r1", "power", "error", "tickStep", "step0", "step1", "nice", "prestep", "sturges", "bin", "domain", "threshold", "histogram", "data", "xz", "x0", "x1", "tz", "tn", "m", "bins", "_", "quickselect", "k", "z", "s", "sd", "newLeft", "newRight", "t", "swap", "quantile", "i0", "value0", "value1", "quantileSorted", "freedmanDiaconis", "scott", "maxIndex", "median", "flatten", "arrays", "__yieldStar", "merge", "minIndex", "pairs", "pairof", "pair", "previous", "first", "range", "least", "defined", "minValue", "element", "leastIndex", "greatest", "maxValue", "greatestIndex", "scan", "shuffle", "shuffler", "random", "i1", "transpose", "matrix", "row", "zip", "every", "test", "some", "filter", "mapper", "iterator", "done", "next", "difference", "others", "other", "disjoint", "set", "intersection", "out", "superset", "o", "subset", "union", "initRange", "domain", "range", "initInterpolator", "interpolator", "init_init", "__esmMin", "ordinal", "index", "domain", "range", "unknown", "implicit", "scale", "d", "i", "_", "value", "initRange", "import_d3_array", "init_ordinal", "__esmMin", "init_init", "band", "scale", "ordinal", "domain", "ordinalRange", "r0", "r1", "step", "bandwidth", "round", "paddingInner", "paddingOuter", "align", "rescale", "n", "reverse", "start", "stop", "values", "sequence", "i", "_", "initRange", "pointish", "copy", "point", "import_d3_array", "init_band", "__esmMin", "init_init", "init_ordinal", "define_default", "constructor", "factory", "prototype", "extend", "parent", "definition", "key", "init_define", "__esmMin", "Color", "color_formatHex", "color_formatHex8", "color_formatHsl", "hslConvert", "color_formatRgb", "color", "format", "m", "l", "reHex", "rgbn", "Rgb", "rgba", "reRgbInteger", "reRgbPercent", "reRgbaInteger", "reRgbaPercent", "reHslPercent", "hsla", "reHslaPercent", "named", "n", "r", "g", "b", "a", "rgbConvert", "o", "rgb", "opacity", "rgb_formatHex", "hex", "rgb_formatHex8", "rgb_formatRgb", "clampa", "clampi", "value", "h", "s", "Hsl", "min", "max", "hsl", "clamph", "clampt", "hsl2rgb", "m1", "m2", "darker", "brighter", "reI", "reN", "reP", "init_color", "__esmMin", "init_define", "define_default", "channels", "extend", "k", "init_src", "__esmMin", "init_color", "basis", "t1", "v0", "v1", "v2", "v3", "t2", "t3", "basis_default", "values", "n", "t", "i", "init_basis", "__esmMin", "basisClosed_default", "values", "n", "t", "i", "v0", "v1", "v2", "v3", "basis", "init_basisClosed", "__esmMin", "init_basis", "constant_default", "init_constant", "__esmMin", "x", "linear", "a", "d", "t", "exponential", "b", "y", "gamma", "nogamma", "constant_default", "init_color", "__esmMin", "init_constant", "rgbSpline", "spline", "colors", "n", "r", "g", "b", "i", "color", "rgb", "t", "rgb_default", "rgbBasis", "rgbBasisClosed", "init_rgb", "__esmMin", "init_src", "init_basis", "init_basisClosed", "init_color", "rgbGamma", "y", "gamma", "start", "end", "opacity", "nogamma", "basis_default", "basisClosed_default", "numberArray_default", "a", "b", "n", "c", "t", "isNumberArray", "x", "init_numberArray", "__esmMin", "genericArray", "a", "b", "nb", "na", "x", "c", "i", "value_default", "t", "init_array", "__esmMin", "init_value", "date_default", "a", "b", "d", "t", "init_date", "__esmMin", "number_default", "a", "b", "t", "init_number", "__esmMin", "object_default", "a", "b", "i", "c", "k", "value_default", "t", "init_object", "__esmMin", "init_value", "zero", "b", "one", "string_default", "a", "bi", "reA", "reB", "am", "bm", "bs", "i", "s", "q", "number_default", "t", "o", "init_string", "__esmMin", "init_number", "value_default", "a", "b", "t", "c", "constant_default", "number_default", "color", "rgb_default", "string_default", "date_default", "isNumberArray", "numberArray_default", "genericArray", "object_default", "init_value", "__esmMin", "init_src", "init_rgb", "init_array", "init_date", "init_number", "init_object", "init_string", "init_constant", "init_numberArray", "round_default", "a", "b", "t", "init_round", "__esmMin", "piecewise", "interpolate", "values", "value_default", "i", "v", "I", "t", "init_piecewise", "__esmMin", "init_value", "init_src", "__esmMin", "init_value", "init_number", "init_round", "init_piecewise", "constants", "x", "init_constant", "__esmMin", "number", "x", "init_number", "__esmMin", "identity", "x", "normalize", "a", "b", "constants", "clamper", "t", "bimap", "domain", "range", "interpolate", "d0", "d1", "r0", "r1", "polymap", "j", "d", "r", "i", "copy", "source", "target", "transformer", "unit", "value_default", "transform", "untransform", "unknown", "clamp", "piecewise", "output", "input", "rescale", "n", "scale", "y", "number_default", "_", "number", "round_default", "u", "continuous", "import_d3_array", "init_continuous", "__esmMin", "init_src", "init_constant", "init_number", "formatDecimal_default", "x", "formatDecimalParts", "p", "i", "coefficient", "init_formatDecimal", "__esmMin", "exponent_default", "x", "formatDecimalParts", "init_exponent", "__esmMin", "init_formatDecimal", "formatGroup_default", "grouping", "thousands", "value", "width", "t", "j", "g", "length", "init_formatGroup", "__esmMin", "formatNumerals_default", "numerals", "value", "i", "init_formatNumerals", "__esmMin", "formatSpecifier", "specifier", "match", "re", "FormatSpecifier", "init_formatSpecifier", "__esmMin", "formatTrim_default", "s", "out", "n", "i", "i0", "i1", "init_formatTrim", "__esmMin", "formatPrefixAuto_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "i", "prefixExponent", "n", "init_formatPrefixAuto", "__esmMin", "init_formatDecimal", "formatRounded_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "init_formatRounded", "__esmMin", "init_formatDecimal", "formatTypes_default", "init_formatTypes", "__esmMin", "init_formatDecimal", "init_formatPrefixAuto", "init_formatRounded", "x", "p", "formatDecimal_default", "formatRounded_default", "formatPrefixAuto_default", "identity_default", "x", "init_identity", "__esmMin", "locale_default", "locale", "group", "identity_default", "formatGroup_default", "map", "currencyPrefix", "currencySuffix", "decimal", "numerals", "formatNumerals_default", "percent", "minus", "nan", "newFormat", "specifier", "formatSpecifier", "fill", "align", "sign", "symbol", "zero", "width", "comma", "precision", "trim", "type", "formatTypes_default", "prefix", "suffix", "formatType", "maybeSuffix", "format", "value", "valuePrefix", "valueSuffix", "i", "n", "c", "valueNegative", "formatTrim_default", "prefixes", "prefixExponent", "length", "padding", "formatPrefix", "f", "e", "exponent_default", "init_locale", "__esmMin", "init_exponent", "init_formatGroup", "init_formatNumerals", "init_formatSpecifier", "init_formatTrim", "init_formatTypes", "init_formatPrefixAuto", "init_identity", "defaultLocale", "definition", "locale", "locale_default", "format", "formatPrefix", "init_defaultLocale", "__esmMin", "init_locale", "precisionFixed_default", "step", "exponent_default", "init_precisionFixed", "__esmMin", "init_exponent", "precisionPrefix_default", "step", "value", "exponent_default", "init_precisionPrefix", "__esmMin", "init_exponent", "precisionRound_default", "step", "max", "exponent_default", "init_precisionRound", "__esmMin", "init_exponent", "init_src", "__esmMin", "init_defaultLocale", "init_formatSpecifier", "init_precisionFixed", "init_precisionPrefix", "init_precisionRound", "tickFormat", "start", "stop", "count", "specifier", "step", "precision", "formatSpecifier", "value", "precisionPrefix_default", "formatPrefix", "precisionRound_default", "precisionFixed_default", "format", "import_d3_array", "init_tickFormat", "__esmMin", "init_src", "linearish", "scale", "domain", "count", "d", "specifier", "tickFormat", "i0", "i1", "start", "stop", "prestep", "step", "maxIter", "linear", "continuous", "copy", "initRange", "import_d3_array", "init_linear", "__esmMin", "init_continuous", "init_init", "init_tickFormat", "identity", "domain", "unknown", "scale", "x", "_", "number", "linearish", "init_identity", "__esmMin", "init_linear", "init_number", "nice", "domain", "interval", "i0", "i1", "x0", "x1", "t", "init_nice", "__esmMin", "transformLog", "x", "transformExp", "transformLogn", "transformExpn", "pow10", "powp", "base", "logp", "reflect", "f", "k", "loggish", "transform", "scale", "domain", "logs", "pows", "rescale", "_", "count", "u", "v", "r", "i", "j", "t", "n", "z", "specifier", "formatSpecifier", "format", "d", "nice", "log", "transformer", "copy", "initRange", "import_d3_array", "init_log", "__esmMin", "init_src", "init_nice", "init_continuous", "init_init", "transformSymlog", "c", "x", "transformSymexp", "symlogish", "transform", "scale", "_", "linearish", "symlog", "transformer", "copy", "initRange", "init_symlog", "__esmMin", "init_linear", "init_continuous", "init_init", "transformPow", "exponent", "x", "transformSqrt", "transformSquare", "powish", "transform", "scale", "identity", "rescale", "_", "linearish", "pow", "transformer", "copy", "initRange", "sqrt", "init_pow", "__esmMin", "init_linear", "init_continuous", "init_init", "square", "x", "unsquare", "radial", "squared", "continuous", "range", "round", "unknown", "scale", "y", "_", "number", "initRange", "linearish", "init_radial", "__esmMin", "init_continuous", "init_init", "init_linear", "init_number", "quantile", "domain", "range", "thresholds", "unknown", "rescale", "i", "n", "threshold", "scale", "x", "y", "_", "d", "initRange", "import_d3_array", "init_quantile", "__esmMin", "init_init", "quantize", "x0", "x1", "n", "domain", "range", "unknown", "scale", "x", "rescale", "i", "_", "y", "initRange", "linearish", "import_d3_array", "init_quantize", "__esmMin", "init_linear", "init_init", "threshold", "domain", "range", "unknown", "scale", "x", "_", "y", "i", "initRange", "import_d3_array", "init_threshold", "__esmMin", "init_init", "newInterval", "floori", "offseti", "count", "field", "interval", "date", "d0", "d1", "step", "start", "stop", "range", "previous", "test", "end", "t0", "t1", "d", "init_interval", "__esmMin", "millisecond", "millisecond_default", "milliseconds", "init_millisecond", "__esmMin", "init_interval", "newInterval", "date", "step", "start", "end", "k", "second", "second_default", "seconds", "init_second", "__esmMin", "init_interval", "newInterval", "date", "step", "start", "end", "minute", "minute_default", "minutes", "init_minute", "__esmMin", "init_interval", "newInterval", "date", "step", "start", "end", "hour", "hour_default", "hours", "init_hour", "__esmMin", "init_interval", "newInterval", "date", "step", "start", "end", "day", "day_default", "days", "init_day", "__esmMin", "init_interval", "newInterval", "date", "step", "start", "end", "weekday", "i", "newInterval", "date", "step", "start", "end", "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sundays", "mondays", "tuesdays", "wednesdays", "thursdays", "fridays", "saturdays", "init_week", "__esmMin", "init_interval", "month", "month_default", "months", "init_month", "__esmMin", "init_interval", "newInterval", "date", "step", "start", "end", "year", "year_default", "years", "init_year", "__esmMin", "init_interval", "newInterval", "date", "step", "start", "end", "k", "utcMinute", "utcMinute_default", "utcMinutes", "init_utcMinute", "__esmMin", "init_interval", "newInterval", "date", "step", "start", "end", "utcHour", "utcHour_default", "utcHours", "init_utcHour", "__esmMin", "init_interval", "newInterval", "date", "step", "start", "end", "utcDay", "utcDay_default", "utcDays", "init_utcDay", "__esmMin", "init_interval", "newInterval", "date", "step", "start", "end", "utcWeekday", "i", "newInterval", "date", "step", "start", "end", "utcSunday", "utcMonday", "utcTuesday", "utcWednesday", "utcThursday", "utcFriday", "utcSaturday", "utcSundays", "utcMondays", "utcTuesdays", "utcWednesdays", "utcThursdays", "utcFridays", "utcSaturdays", "init_utcWeek", "__esmMin", "init_interval", "utcMonth", "utcMonth_default", "utcMonths", "init_utcMonth", "__esmMin", "init_interval", "newInterval", "date", "step", "start", "end", "utcYear", "utcYear_default", "utcYears", "init_utcYear", "__esmMin", "init_interval", "newInterval", "date", "step", "start", "end", "k", "ticker", "year", "month", "week", "day", "hour", "minute", "tickIntervals", "second_default", "ticks", "start", "stop", "count", "reverse", "interval", "tickInterval", "target", "i", "step", "millisecond_default", "t", "import_d3_array", "utcTicks", "utcTickInterval", "timeTicks", "timeTickInterval", "init_ticks", "__esmMin", "init_millisecond", "init_second", "init_minute", "init_hour", "init_day", "init_week", "init_month", "init_year", "init_utcMinute", "init_utcHour", "init_utcDay", "init_utcWeek", "init_utcMonth", "init_utcYear", "utcYear_default", "utcMonth_default", "utcSunday", "utcDay_default", "utcHour_default", "utcMinute_default", "year_default", "month_default", "sunday", "day_default", "hour_default", "minute_default", "init_src", "__esmMin", "init_second", "init_minute", "init_hour", "init_day", "init_week", "init_month", "init_year", "init_utcMinute", "init_utcHour", "init_utcDay", "init_utcWeek", "init_utcMonth", "init_utcYear", "init_ticks", "localDate", "d", "date", "utcDate", "newDate", "y", "m", "formatLocale", "locale", "locale_dateTime", "locale_date", "locale_time", "locale_periods", "locale_weekdays", "locale_shortWeekdays", "locale_months", "locale_shortMonths", "periodRe", "formatRe", "periodLookup", "formatLookup", "weekdayRe", "weekdayLookup", "shortWeekdayRe", "shortWeekdayLookup", "monthRe", "monthLookup", "shortMonthRe", "shortMonthLookup", "formats", "formatShortWeekday", "formatWeekday", "formatShortMonth", "formatMonth", "formatDayOfMonth", "formatMicroseconds", "formatYearISO", "formatFullYearISO", "formatHour24", "formatHour12", "formatDayOfYear", "formatMilliseconds", "formatMonthNumber", "formatMinutes", "formatPeriod", "formatQuarter", "formatUnixTimestamp", "formatUnixTimestampSeconds", "formatSeconds", "formatWeekdayNumberMonday", "formatWeekNumberSunday", "formatWeekNumberISO", "formatWeekdayNumberSunday", "formatWeekNumberMonday", "formatYear", "formatFullYear", "formatZone", "formatLiteralPercent", "utcFormats", "formatUTCShortWeekday", "formatUTCWeekday", "formatUTCShortMonth", "formatUTCMonth", "formatUTCDayOfMonth", "formatUTCMicroseconds", "formatUTCYearISO", "formatUTCFullYearISO", "formatUTCHour24", "formatUTCHour12", "formatUTCDayOfYear", "formatUTCMilliseconds", "formatUTCMonthNumber", "formatUTCMinutes", "formatUTCPeriod", "formatUTCQuarter", "formatUTCSeconds", "formatUTCWeekdayNumberMonday", "formatUTCWeekNumberSunday", "formatUTCWeekNumberISO", "formatUTCWeekdayNumberSunday", "formatUTCWeekNumberMonday", "formatUTCYear", "formatUTCFullYear", "formatUTCZone", "parses", "parseShortWeekday", "parseWeekday", "parseShortMonth", "parseMonth", "parseLocaleDateTime", "parseDayOfMonth", "parseMicroseconds", "parseYear", "parseFullYear", "parseHour24", "parseDayOfYear", "parseMilliseconds", "parseMonthNumber", "parseMinutes", "parsePeriod", "parseQuarter", "parseUnixTimestamp", "parseUnixTimestampSeconds", "parseSeconds", "parseWeekdayNumberMonday", "parseWeekNumberSunday", "parseWeekNumberISO", "parseWeekdayNumberSunday", "parseWeekNumberMonday", "parseLocaleDate", "parseLocaleTime", "parseZone", "parseLiteralPercent", "newFormat", "specifier", "string", "i", "n", "c", "pad", "format", "pads", "newParse", "Z", "parseSpecifier", "week", "day", "utcMonday", "utcDay_default", "monday", "day_default", "j", "parse", "f", "p", "value", "fill", "width", "sign", "length", "requote", "s", "requoteRe", "names", "name", "numberRe", "percentRe", "year_default", "sunday", "dISO", "thursday", "z", "utcYear_default", "dow", "utcSunday", "UTCdISO", "utcThursday", "init_locale", "__esmMin", "init_src", "defaultLocale", "definition", "locale", "formatLocale", "timeFormat", "timeParse", "utcFormat", "utcParse", "init_defaultLocale", "__esmMin", "init_locale", "init_src", "__esmMin", "init_defaultLocale", "date", "t", "number", "calendar", "ticks", "tickInterval", "year", "month", "week", "day", "hour", "minute", "second", "format", "scale", "continuous", "invert", "domain", "formatMillisecond", "formatSecond", "formatMinute", "formatHour", "formatDay", "formatWeek", "formatMonth", "formatYear", "tickFormat", "y", "_", "interval", "d", "count", "specifier", "nice", "copy", "time", "initRange", "timeTicks", "timeTickInterval", "year_default", "month_default", "sunday", "day_default", "hour_default", "minute_default", "second_default", "timeFormat", "init_time", "__esmMin", "init_src", "init_continuous", "init_init", "init_nice", "utcTime", "initRange", "calendar", "utcTicks", "utcTickInterval", "utcYear_default", "utcMonth_default", "utcSunday", "utcDay_default", "utcHour_default", "utcMinute_default", "second_default", "utcFormat", "init_utcTime", "__esmMin", "init_src", "init_time", "init_init", "transformer", "x0", "x1", "t0", "t1", "k10", "transform", "interpolator", "identity", "clamp", "unknown", "scale", "x", "_", "range", "interpolate", "r0", "r1", "value_default", "round_default", "t", "copy", "source", "target", "sequential", "linearish", "initInterpolator", "sequentialLog", "loggish", "sequentialSymlog", "symlogish", "sequentialPow", "powish", "sequentialSqrt", "init_sequential", "__esmMin", "init_src", "init_continuous", "init_init", "init_linear", "init_log", "init_symlog", "init_pow", "sequentialQuantile", "domain", "interpolator", "identity", "scale", "x", "_", "d", "i", "initInterpolator", "import_d3_array", "init_sequentialQuantile", "__esmMin", "init_continuous", "init_init", "transformer", "x0", "x1", "x2", "s", "t0", "t1", "t2", "k10", "k21", "interpolator", "identity", "transform", "clamp", "unknown", "scale", "x", "_", "range", "interpolate", "r0", "r1", "r2", "piecewise", "value_default", "round_default", "t", "diverging", "linearish", "copy", "initInterpolator", "divergingLog", "loggish", "divergingSymlog", "symlogish", "divergingPow", "powish", "divergingSqrt", "init_diverging", "__esmMin", "init_src", "init_continuous", "init_init", "init_linear", "init_log", "init_sequential", "init_symlog", "init_pow", "src_exports", "__export", "band", "diverging", "divergingLog", "divergingPow", "divergingSqrt", "divergingSymlog", "identity", "implicit", "linear", "log", "ordinal", "point", "pow", "quantile", "quantize", "radial", "sequential", "sequentialLog", "sequentialPow", "sequentialQuantile", "sequentialSqrt", "sequentialSymlog", "sqrt", "symlog", "threshold", "time", "utcTime", "tickFormat", "init_src", "__esmMin", "init_band", "init_identity", "init_linear", "init_log", "init_symlog", "init_ordinal", "init_pow", "init_radial", "init_quantile", "init_quantize", "init_threshold", "init_time", "init_utcTime", "init_sequential", "init_sequentialQuantile", "init_diverging", "init_tickFormat", "Node", "obj", "dimension", "parent", "KDTree", "points", "metric", "dimensions", "point", "bestNode", "saveNode", "node", "distance", "nearestSearch", "ownDistance", "bestChild", "otherChild", "pointOnHyperplane", "i", "depth", "dim", "a", "b", "median", "exports", "exports", "const_1", "exports", "ChartAxisFormat", "convertFromDataframe", "df", "domain", "traceKey", "_a", "keys", "firstRow", "k", "rows", "_b", "column", "idx", "row", "val", "ConvertData", "chartData", "columns", "lineKeys", "key", "rowCount", "i", "mainChartOptions", "style", "yAxis", "format", "SummaryChartOptions", "html_js_1", "d3Scale", "__importStar", "d3Array", "define_1", "ElementSk_1", "kd_1", "const_1", "plot_builder_1", "SPECIAL", "NUM_Y_TICKS", "HOVER_COLOR", "ZOOM_RECT_COLOR", "SUMMARY_LINE_WIDTH", "DETAIL_LINE_WIDTH", "AXIS_LINE_WIDTH", "MIN_MOUSE_MOVE_FOR_ZOOM", "PathBuilder", "xRange", "yRange", "radius", "x", "y", "cx", "cy", "invalidPoint", "pointIsValid", "p", "rectFromRange", "range", "rect", "cleft", "ctop", "cright", "cbottom", "exports", "rectFromRangeInvert", "left", "top", "right", "bottom", "defaultRect", "SearchBuilder", "name", "distance", "a", "b", "dx", "dy", "inRect", "pt", "clampToRect", "clipToRect", "ctx", "PlotSimpleSk", "_PlotSimpleSk", "entries", "entry", "e", "zx", "closest", "detail", "_", "oldValue", "newValue", "canvas", "overlayCanvas", "lines", "labels", "keys", "startedEmpty", "key", "values", "i", "ids", "line", "id", "ret", "style", "onBackground", "background", "errorColor", "secondaryColor", "beginIndex", "endIndex", "clientRect", "sx", "zoom", "s", "hash", "summaryBuilder", "domain", "detailBuilder", "previousPoint", "addedPointFromBeforeTheDomain", "addedPointFromAfterTheDomain", "detailDomain", "labelOffset", "detailLabels", "area", "yAxisPath", "thinX", "t", "label", "xAxisPath", "thinY", "tick", "searchBuilder", "domainEnd", "width", "height", "leftx", "rightx", "highlightedLine", "meas", "labelHeight", "labelWidth", "bx", "band", "anomalyData", "anomaly", "anomalyPath", "highlightPath", "highlightRadius", "regression_symbol", "improvement_symbol", "symbol", "trace_key", "commit_position", "issue", "isAnomaly", "anomaliesOnTrace", "path", "value", "bands", "anomalyDataMap", "userIssueMap", "show", "val", "ele", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "html_js_1", "define_1", "ElementSk_1", "isStatus", "value", "TriageSk", "_TriageSk", "v", "val", "_name", "oldValue", "newValue", "exports", "a", "b", "ele", "__exportStar", "exports", "html_js_1", "define_1", "ElementSk_1", "WordCloudSk", "_WordCloudSk", "val", "exports", "ele", "item", "jsonOrThrow_1", "lookupCids", "cids", "exports", "html_js_1", "define_1", "ElementSk_1", "cid_1", "const_1", "defaultcommitNumberToHashes", "cids", "__async", "exports", "json", "CommitRangeSk", "_CommitRangeSk", "url", "hashes", "error", "val", "commitIndex", "prevCommit", "startOffset", "_b", "_a", "endOffset", "_d", "_c", "ele", "MIN_TICKS", "MAX_TICKS", "choices", "formatterFromDuration", "ms", "i", "c", "ticks", "dates", "duration", "formatter", "last", "ret", "tickValue", "fixTicksLength", "exports", "_t", "html_js_1", "define_1", "errorMessage_1", "ElementSk_1", "cid_1", "alogin_sk_1", "ticks_1", "locale", "percentFormatter", "decimalFormatter", "emptyFormatter", "labelsForStepDetection", "ClusterSummary2Sk", "_ClusterSummary2Sk", "status", "detail", "e", "commitNumber", "_a", "json", "begin", "end", "val", "labels", "header", "step", "xbar", "h", "i", "exports", "ele", "_c", "_b", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "define_1", "iconSkTemplate", "icon", "html_js_1", "define_1", "ElementSk_1", "getNumberOfDaysInMonth", "year", "monthIndex", "firstDayIndexOfMonth", "sevenDaysInAWeek", "sixWeeks", "CalendarDate", "d", "CalendarSk", "_CalendarSk", "e", "keyHandled", "narrowFormatter", "longFormatter", "i", "date", "daysInMonth", "v", "exports", "ele", "selected", "weekIndex", "today", "firstDayOfTheMonthIndex", "selectedDate", "currentDate", "html_js_1", "define_1", "ElementSk_1", "CalendarInputSk", "_CalendarInputSk", "e", "inputElement", "parts", "_error", "__async", "keyboardHandler", "date", "resolve", "reject", "_", "val", "exports", "ele", "html_js_1", "define_1", "ElementSk_1", "dateFromTimestamp", "timestamp", "DayRangeSk", "_DayRangeSk", "now", "detail", "e", "val", "exports", "ele", "html_js_1", "define_1", "ElementSk_1", "TriconSk", "_TriconSk", "val", "exports", "ele", "html_js_1", "define_1", "ElementSk_1", "TriageStatusSk", "_TriageStatusSk", "detail", "val", "exports", "ele", "html_js_1", "define_1", "object_1", "query_1", "jsonOrThrow_1", "stateReflector_1", "errorMessage_1", "ElementSk_1", "_full_summary", "frame", "summary", "TriagePageSk", "_TriagePageSk", "now", "state", "e", "body", "json", "msg", "index", "dir", "colIndex", "rowIndex", "query", "opts", "cat", "displayName", "exports", "ele", "row", "col", "ret", "_", "item", "o", "import_perf_scaffold_sk", "import_triage_page_sk"]
}