{"version":3,"sources":["webpack:///./node_modules/@microsoft/fast-element/dist/esm/templating/view.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/styles/css-directive.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/templating/binding.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/templating/compiler.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/templating/template.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/dom.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/observation/observable.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/templating/when.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/components/controller.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/components/fast-element.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/platform.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/styles/element-styles.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/styles/css.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/templating/ref.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/fast-design-system.js","webpack:///./node_modules/@microsoft/fast-components/node_modules/@microsoft/fast-web-utilities/dist/system-colors.js","webpack:///./node_modules/@microsoft/fast-components/node_modules/@microsoft/fast-web-utilities/dist/localization.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/utilities/relative-luminance.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/swatch.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/utilities/is-dark.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/utilities/direction-by-is-dark.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/palette.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/utilities/binary-search.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/utilities/color-constants.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/utilities/base-layer-luminance.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-layer-2.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/design-tokens.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-layer-card-container.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-layer-floating.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-layer-1.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-layer-3.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-layer-4.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/accent-fill.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/foreground-on-accent.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/accent-foreground.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-fill.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-fill-input.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-fill-stealth.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-fill-contrast.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-fill-layer.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/focus-stroke.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-foreground-hint.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-foreground.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-stroke.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/color/recipes/neutral-stroke-divider.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/styles/size.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/progress-ring/index.js","webpack:///./node_modules/@microsoft/fast-components/dist/esm/progress-ring/progress-ring.styles.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/observation/array-change-records.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/observation/array-observer.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/templating/repeat.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/templating/html-directive.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/components/attributes.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/observation/notifier.js","webpack:///./node_modules/@microsoft/fast-element/dist/esm/components/fast-definitions.js"],"names":["__webpack_require__","d","__webpack_exports__","HTMLView","range","document","createRange","[object Object]","fragment","behaviors","this","source","context","firstChild","lastChild","node","appendChild","hasChildNodes","parentNode","insertBefore","end","previousSibling","next","current","nextSibling","parent","removeChild","oldSource","i","ii","length","unbind","bind","views","setStartBefore","setEndAfter","deleteContents","view","j","jj","CSSDirective","normalBind","bindingObserver","observable","binding","isBindingVolatile","updateTarget","observe","triggerBind","target","addEventListener","targetName","normalUnbind","disconnect","contentUnbind","$fastView","isComposed","needsBindOnly","triggerUnbind","removeEventListener","updateAttributeTarget","value","dom","setAttribute","updateBooleanAttributeTarget","setBooleanAttribute","updateContentTarget","create","textContent","$fastTemplate","remove","updatePropertyTarget","updateClassTarget","classVersions","Object","version","names","split","currentName","classList","add","name","binding_HTMLBindingDirective","html_directive","super","isVolatileBinding","originalTargetName","cleanedTargetName","substr","s","c","createHTML","binding_BindingBehavior","event","setEvent","result","preventDefault","sharedContext","CompilationContext","factory","targetIndex","behaviorFactories","push","directive","targetAtContent","addFactory","directives","shareable","reset","createAggregateBinding","parts","partCount","finalParts","map","x","scope","output","interpolationEndLength","parseContent","valueParts","bindingParts","index","indexOf","literal","directiveIndex","parseInt","substring","compileAttributes","includeBasicValues","attributes","attr","attrValue","parseResult","removeAttributeNode","compileContent","walker","lastNode","currentPart","currentNode","createTextNode","captureContentBinding","nextNode","template_html","template_ViewTemplate","html","behaviorCount","hasHostBehaviors","targetOffset","viewBehaviorFactories","hostBehaviorFactories","hostBindingTarget","template","createElement","innerHTML","fec","content","firstElementChild","tagName","adoptNode","borrow","createTemplateWalker","nodeType","isMarker","extractDirectiveIndexFromMarker","childNodes","createComment","release","compileTemplate","cloneNode","viewFactories","Array","behaviorIndex","factoryIndex","createBehavior","hostFactories","templating_view","host","getElementById","appendTo","lastAttributeNameRegex","strings","values","currentString","match","exec","createPlaceholder","_interpolationStart","_interpolationEnd","DOM","_platform_js__WEBPACK_IMPORTED_MODULE_0__","updateQueue","FAST","getById","tasks","pendingErrors","throwFirstError","shift","tryRunTask","task","call","error","setTimeout","process","scan","newLength","freeze","enqueue","callable","requestAnimationFrame","fastHTMLPolicy","trustedTypes","createPolicy","htmlPolicy","marker","Math","random","toString","supportsAdoptedStyleSheets","isArray","adoptedStyleSheets","CSSStyleSheet","prototype","policy","Error","data","startsWith","replace","createInterpolationPlaceholder","attributeName","createBlockPlaceholder","queueUpdate","processUpdates","nextUpdate","Promise","element","removeAttribute","child","createTreeWalker","Observable","ExecutionContext","defaultExecutionContext","_dom_js__WEBPACK_IMPORTED_MODULE_0__","_platform_js__WEBPACK_IMPORTED_MODULE_1__","_notifier_js__WEBPACK_IMPORTED_MODULE_2__","volatileRegex","notifierLookup","WeakMap","watcher","createArrayObserver","array","getNotifier","found","$fastController","get","set","getAccessors","DefaultObservableAccessor","field","callback","watch","newValue","oldValue","notify","BindingObserverImplementation","initialSubscriber","needsRefresh","needsQueue","first","last","propertySource","propertyName","notifier","previousWatcher","unsubscribe","prev","subscribe","prevValue","undefined","done","Symbol","iterator","args","nameOrAccessor","Reflect","defineProperty","enumerable","getValue","setValue","test","contextEvent","parentContext","isEven","isOdd","isFirst","isInMiddle","isLast","seal","when","templateOrTemplateBinding","getTemplate","shadowRoots","defaultEventOptions","bubbles","composed","cancelable","getShadowRoot","shadowRoot","controller_Controller","definition","boundObservables","needsInitialization","_template","_styles","_isConnected","shadowOptions","attachShadow","mode","accessors","isConnected","track","renderTemplate","styles","removeStyles","addStyles","getRootNode","HTMLStyleElement","append","isAttachedTo","sourceBehaviors","addStylesTo","addBehaviors","removeStylesFrom","removeBehaviors","targetBehaviors","Map","behaviorsToBind","behavior","has","force","behaviorsToUnbind","count","delete","finishInitialization","setIsConnected","attrDef","attributeLookup","onAttributeChangedCallback","type","detail","options","dispatchEvent","CustomEvent","assign","propertyNames","keys","resolveTemplate","resolveStyles","dispose","removeChildNodes","render","controller","fast_definitions","forType","constructor","createFASTElement","BaseType","forCustomElement","emit","onConnectedCallback","onDisconnectedCallback","FASTElement","customElement","HTMLElement","from","define","nameOrDef","global","$global","emptyArray","createMetadataLocator","globalThis","self","window","Function","_a","n","r","propConfig","configurable","writable","storage","id","initialize","metadataLookup","metadata","currentTarget","getPrototypeOf","slice","ElementStyles","targets","WeakSet","concat","reduceStyles","reduce","curr","reduceBehaviors","styleSheetCache","AdoptedStyleSheetsStyles","StyleElementStyles","addAdoptedStyleSheets","sheets","removeAdoptedStyleSheets","filter","splice","sheet","e","_styleSheets","styleSheets","replaceSync","styleClassId","styleClass","normalizeTarget","className","querySelectorAll","body","css","cssPartial","_css_directive_js__WEBPACK_IMPORTED_MODULE_0__","_element_styles_js__WEBPACK_IMPORTED_MODULE_1__","collectStyles","cssString","createCSS","trim","elementStyles","withBehaviors","CSSPartial","stylesheets","accumulated","el","ref","_html_directive_js__WEBPACK_IMPORTED_MODULE_0__","RefBehavior","provideFASTDesignSystem","_microsoft_fast_foundation__WEBPACK_IMPORTED_MODULE_0__","getOrCreate","withPrefix","SystemColors","Direction","relative_luminance_contrast","a","b","L1","relativeLuminance","L2","SwatchRGB","g","swatch_SwatchRGBImpl","obj","color_rgba_64","red","green","blue","toColorString","toStringHexRGB","contrast","color_converters","sqrt","directionByIsDark","color","isDark","PaletteRGB","rOrSource","key","isSwatchRGB","palette_PaletteRGBImpl","swatches","closestIndexCache","reversedSwatches","reverse","lastIndex","reference","contrastTarget","initialSearchIndex","direction","closestIndexOf","endSearchIndex","startSearchIndex","binarySearch","valuesToSearch","searchCondition","startIndex","endIndex","middleIndex","floor","math_utilities","closest","previous","abs","component_state_color_palette","baseColor","fromObject","palette","_x","parse_color","white","black","middleGrey","accentBase","baseLayerLuminanceSwatch","luminance","neutralLayer2Index","layerDelta","fillRestDelta","fillHoverDelta","fillActiveDelta","max","design_tokens_create","design_token","createNonCss","cssCustomPropertyName","withDefault","baseHeightMultiplier","design_tokens_baseLayerLuminance","density","designUnit","accentFillHoverDelta","ltr","accentFillActiveDelta","accentFillFocusDelta","accentForegroundRestDelta","accentForegroundHoverDelta","accentForegroundActiveDelta","accentForegroundFocusDelta","neutralFillRestDelta","neutralFillHoverDelta","neutralFillActiveDelta","neutralFillFocusDelta","neutralFillInputRestDelta","neutralFillInputHoverDelta","neutralFillInputActiveDelta","neutralFillInputFocusDelta","neutralFillStealthRestDelta","neutralFillStealthHoverDelta","neutralFillStealthActiveDelta","neutralFillStealthFocusDelta","neutralFillStrongRestDelta","neutralFillStrongHoverDelta","neutralFillStrongActiveDelta","neutralFillStrongFocusDelta","neutralFillLayerRestDelta","neutralStrokeRestDelta","neutralStrokeHoverDelta","neutralStrokeActiveDelta","neutralStrokeFocusDelta","neutralStrokeDividerRestDelta","neutralColor","neutralPalette","getValueFor","accentColor","accentPalette","neutralLayerCardContainerRecipe","evaluate","neutralLayerCardContainer","neutralLayerFloatingRecipe","cardIndex","neutralLayerFloating","neutralLayer1Recipe","baseLayerLuminance","neutralLayer1","design_tokens_neutralLayer1","neutralLayer2Recipe","neutralLayer2","neutralLayer3Recipe","neutralLayer3","neutralLayer4Recipe","neutralLayer4","fillColor","ContrastTarget","accentFillRecipe","hoverDelta","activeDelta","focusDelta","accent","hoverIndex","restIndex","activeIndex","focusIndex","rest","hover","active","focus","accentFill","accentFillRest","accentFillHover","accentFillActive","accentFillFocus","foregroundOnAccentByContrast","foregroundOnAccent","foregroundOnAccentRecipe","normal","foregroundOnAccentLargeRecipe","large","accentForegroundByContrast","restDelta","accentIndex","min","accessibleSwatch","colorContrast","accessibleIndex1","accessibleIndex2","accentForeground","accentForegroundRecipe","accentForegroundRest","neutralFillRecipe","referenceIndex","neutralFill","neutralFillRest","neutralFillInputRecipe","neutralFillInput","neutralFillStealthRecipe","fillFocusDelta","swapThreshold","neutralFillStealth","neutralFillStrongRecipe","accessibleIndex","neutralFillContrast","neutralFillLayerRecipe","delta","neutralFillLayer","focusStrokeOuterRecipe","focusStrokeOuter","design_tokens_focusStrokeOuter","focusStrokeInnerRecipe","focusColor","focusStrokeInner","neutralForegroundHintRecipe","neutralForegroundHint","design_tokens_neutralForegroundHint","neutralForegroundRecipe","neutralForeground","neutralStrokeRecipe","neutralStroke","neutralStrokeDividerRecipe","neutralStrokeDivider","heightNumber","fastProgressRing","base_progress","compose","baseName","progress_ring_template","display","match_media_stylesheet_behavior","FieldText","Field","GrayText","indeterminateIndicator","newSplice","removed","addedCount","EDIT_LEAVE","EDIT_UPDATE","EDIT_ADD","EDIT_DELETE","calcSplices","currentStart","currentEnd","old","oldStart","oldEnd","prefixCount","suffixCount","minLength","searchLength","sharedPrefix","index1","index2","sharedSuffix","platform","ops","distances","edits","northWest","west","north","spliceOperationsFromEditDistances","rowCount","columnCount","calcEditDistances","splices","oldIndex","$push","mergeSplice","inserted","insertionOffset","intersectCount","start1","end1","start2","end2","deleteCount","currentRemoved","prepend","apply","offset","projectArraySplices","changeRecords","initialSplices","record","createInitialSplices","arrayObservationEnabled","adjustIndex","changeRecord","arrayLength","array_observer_ArrayObserver","oldCollection","flush","subscriber","finalSplices","repeat","defaultRepeatOptions","positioning","recycle","bindWithoutPositioning","items","bindWithPositioning","childContext","repeat_RepeatBehavior","location","itemsBinding","isItemsBindingVolatile","templateBinding","isTemplateBindingVolatile","itemsObserver","originalContext","bindView","itemsBindingObserver","templateBindingObserver","observeItems","refreshAllViews","unbindAllViews","updateViews","oldObserver","newObserver","hasNewObserver","leftoverViews","leftoverIndex","availableViews","removeIndex","addIndex","removedViews","totalAvailableViews","neighbor","currentContext","templateChanged","itemsLength","viewsLength","disposeContiguousBatch","repeat_RepeatDirective","setArrayObserverFactory","collection","proto","$fastPatch","pop","sort","unshift","notEmpty","methodCallResult","arguments","o","addSplice","oldArray","enableArrayObservation","HTMLDirective","TargetedHTMLDirective","AttachedBehaviorHTMLDirective","createCustomAttributePlaceholder","nullableNumberConverter","AttributeDefinition","_observation_observable_js__WEBPACK_IMPORTED_MODULE_0__","_dom_js__WEBPACK_IMPORTED_MODULE_1__","_platform_js__WEBPACK_IMPORTED_MODULE_2__","AttributeConfiguration","locate","booleanConverter","toView","fromView","number","isNaN","Owner","attribute","toLowerCase","converter","guards","Set","fieldName","callbackName","hasCallback","tryReflectToAttribute","latestValue","attributeLists","list","config","property","configOrTarget","prop","decorator","$target","$prop","SubscriberSet","PropertyChangeNotifier","sub1","sub2","spillover","handleChange","subscribers","sourceSubscribers","propertyToWatch","propertyToUnwatch","FASTElementDefinition","_observation_observable_js__WEBPACK_IMPORTED_MODULE_1__","_styles_element_styles_js__WEBPACK_IMPORTED_MODULE_2__","_attributes_js__WEBPACK_IMPORTED_MODULE_3__","defaultShadowOptions","defaultElementOptions","fastRegistry","typeToDefinition","register","getByType","nameOrConfig","collect","observedAttributes","propertyLookup","elementOptions","isDefined","registry","customElements"],"mappings":";2FAAAA,EAAAC,EAAAC,EAAA,sBAAAC,IAEA,MAAAC,EAAAC,SAAAC,cAKO,MAAAH,EAMPI,YAAAC,EAAAC,GACAC,KAAAF,WACAE,KAAAD,YAIAC,KAAAC,OAAA,KAIAD,KAAAE,QAAA,KACAF,KAAAG,WAAAL,EAAAK,WACAH,KAAAI,UAAAN,EAAAM,UAMAP,SAAAQ,GACAA,EAAAC,YAAAN,KAAAF,UAMAD,aAAAQ,GACA,GAAAL,KAAAF,SAAAS,gBACAF,EAAAG,WAAAC,aAAAT,KAAAF,SAAAO,OAEA,CACA,MAAAK,EAAAV,KAAAI,UACA,GAAAC,EAAAM,kBAAAD,EACA,OACA,MAAAF,EAAAH,EAAAG,WACA,IACAI,EADAC,EAAAb,KAAAG,WAEA,KAAAU,IAAAH,GACAE,EAAAC,EAAAC,YACAN,EAAAC,aAAAI,EAAAR,GAC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EAAAE,SAAAhzB,MAAA,CACA,MAAAuH,EAAAvH,KAAAuH,WACAunB,EAAA7Z,EAAA9H,UACA,QAAAjM,EAAA,EAAAC,EAAAoG,EAAAnG,OAAmDF,EAAAC,IAAQD,EAC3CuxB,EAAA,EAAUvhB,eAAA4d,EAAAvnB,EAAArG,IAE1B+P,QAAAC,eAAA+D,EAAA,sBACA9R,MAAAnD,KAAAozB,mBACAjiB,YAAA,IAMA,OAHAqiB,EAAArkB,IAAAnP,KAAAuE,OACAivB,EAAA5c,OAAA5W,KAAAuE,KAAA0Q,EAAAjV,KAAAszB,gBAEAtzB,MAOAwyB,EAAAxc,QAAA8c,EAAAG","file":"35.9450a9c976adac8268dd.js","sourcesContent":["// A singleton Range instance used to efficiently remove ranges of DOM nodes.\n// See the implementation of HTMLView below for further details.\nconst range = document.createRange();\n/**\n * The standard View implementation, which also implements ElementView and SyntheticView.\n * @public\n */\nexport class HTMLView {\n    /**\n     * Constructs an instance of HTMLView.\n     * @param fragment - The html fragment that contains the nodes for this view.\n     * @param behaviors - The behaviors to be applied to this view.\n     */\n    constructor(fragment, behaviors) {\n        this.fragment = fragment;\n        this.behaviors = behaviors;\n        /**\n         * The data that the view is bound to.\n         */\n        this.source = null;\n        /**\n         * The execution context the view is running within.\n         */\n        this.context = null;\n        this.firstChild = fragment.firstChild;\n        this.lastChild = fragment.lastChild;\n    }\n    /**\n     * Appends the view's DOM nodes to the referenced node.\n     * @param node - The parent node to append the view's DOM nodes to.\n     */\n    appendTo(node) {\n        node.appendChild(this.fragment);\n    }\n    /**\n     * Inserts the view's DOM nodes before the referenced node.\n     * @param node - The node to insert the view's DOM before.\n     */\n    insertBefore(node) {\n        if (this.fragment.hasChildNodes()) {\n            node.parentNode.insertBefore(this.fragment, node);\n        }\n        else {\n            const end = this.lastChild;\n            if (node.previousSibling === end)\n                return;\n            const parentNode = node.parentNode;\n            let current = this.firstChild;\n            let next;\n            while (current !== end) {\n                next = current.nextSibling;\n                parentNode.insertBefore(current, node);\n                current = next;\n            }\n            parentNode.insertBefore(end, node);\n        }\n    }\n    /**\n     * Removes the view's DOM nodes.\n     * The nodes are not disposed and the view can later be re-inserted.\n     */\n    remove() {\n        const fragment = this.fragment;\n        const end = this.lastChild;\n        let current = this.firstChild;\n        let next;\n        while (current !== end) {\n            next = current.nextSibling;\n            fragment.appendChild(current);\n            current = next;\n        }\n        fragment.appendChild(end);\n    }\n    /**\n     * Removes the view and unbinds its behaviors, disposing of DOM nodes afterward.\n     * Once a view has been disposed, it cannot be inserted or bound again.\n     */\n    dispose() {\n        const parent = this.firstChild.parentNode;\n        const end = this.lastChild;\n        let current = this.firstChild;\n        let next;\n        while (current !== end) {\n            next = current.nextSibling;\n            parent.removeChild(current);\n            current = next;\n        }\n        parent.removeChild(end);\n        const behaviors = this.behaviors;\n        const oldSource = this.source;\n        for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n            behaviors[i].unbind(oldSource);\n        }\n    }\n    /**\n     * Binds a view's behaviors to its binding source.\n     * @param source - The binding source for the view's binding behaviors.\n     * @param context - The execution context to run the behaviors within.\n     */\n    bind(source, context) {\n        const behaviors = this.behaviors;\n        if (this.source === source) {\n            return;\n        }\n        else if (this.source !== null) {\n            const oldSource = this.source;\n            this.source = source;\n            this.context = context;\n            for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n                const current = behaviors[i];\n                current.unbind(oldSource);\n                current.bind(source, context);\n            }\n        }\n        else {\n            this.source = source;\n            this.context = context;\n            for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n                behaviors[i].bind(source, context);\n            }\n        }\n    }\n    /**\n     * Unbinds a view's behaviors from its binding source.\n     */\n    unbind() {\n        if (this.source === null) {\n            return;\n        }\n        const behaviors = this.behaviors;\n        const oldSource = this.source;\n        for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n            behaviors[i].unbind(oldSource);\n        }\n        this.source = null;\n    }\n    /**\n     * Efficiently disposes of a contiguous range of synthetic view instances.\n     * @param views - A contiguous range of views to be disposed.\n     */\n    static disposeContiguousBatch(views) {\n        if (views.length === 0) {\n            return;\n        }\n        range.setStartBefore(views[0].firstChild);\n        range.setEndAfter(views[views.length - 1].lastChild);\n        range.deleteContents();\n        for (let i = 0, ii = views.length; i < ii; ++i) {\n            const view = views[i];\n            const behaviors = view.behaviors;\n            const oldSource = view.source;\n            for (let j = 0, jj = behaviors.length; j < jj; ++j) {\n                behaviors[j].unbind(oldSource);\n            }\n        }\n    }\n}\n","/**\n * Directive for use in {@link css}.\n *\n * @public\n */\nexport class CSSDirective {\n    /**\n     * Creates a CSS fragment to interpolate into the CSS document.\n     * @returns - the string to interpolate into CSS\n     */\n    createCSS() {\n        return \"\";\n    }\n    /**\n     * Creates a behavior to bind to the host element.\n     * @returns - the behavior to bind to the host element, or undefined.\n     */\n    createBehavior() {\n        return undefined;\n    }\n}\n","import { DOM } from \"../dom.js\";\nimport { ExecutionContext, Observable, } from \"../observation/observable.js\";\nimport { TargetedHTMLDirective } from \"./html-directive.js\";\nfunction normalBind(source, context) {\n    this.source = source;\n    this.context = context;\n    if (this.bindingObserver === null) {\n        this.bindingObserver = Observable.binding(this.binding, this, this.isBindingVolatile);\n    }\n    this.updateTarget(this.bindingObserver.observe(source, context));\n}\nfunction triggerBind(source, context) {\n    this.source = source;\n    this.context = context;\n    this.target.addEventListener(this.targetName, this);\n}\nfunction normalUnbind() {\n    this.bindingObserver.disconnect();\n    this.source = null;\n    this.context = null;\n}\nfunction contentUnbind() {\n    this.bindingObserver.disconnect();\n    this.source = null;\n    this.context = null;\n    const view = this.target.$fastView;\n    if (view !== void 0 && view.isComposed) {\n        view.unbind();\n        view.needsBindOnly = true;\n    }\n}\nfunction triggerUnbind() {\n    this.target.removeEventListener(this.targetName, this);\n    this.source = null;\n    this.context = null;\n}\nfunction updateAttributeTarget(value) {\n    DOM.setAttribute(this.target, this.targetName, value);\n}\nfunction updateBooleanAttributeTarget(value) {\n    DOM.setBooleanAttribute(this.target, this.targetName, value);\n}\nfunction updateContentTarget(value) {\n    // If there's no actual value, then this equates to the\n    // empty string for the purposes of content bindings.\n    if (value === null || value === undefined) {\n        value = \"\";\n    }\n    // If the value has a \"create\" method, then it's a template-like.\n    if (value.create) {\n        this.target.textContent = \"\";\n        let view = this.target.$fastView;\n        // If there's no previous view that we might be able to\n        // reuse then create a new view from the template.\n        if (view === void 0) {\n            view = value.create();\n        }\n        else {\n            // If there is a previous view, but it wasn't created\n            // from the same template as the new value, then we\n            // need to remove the old view if it's still in the DOM\n            // and create a new view from the template.\n            if (this.target.$fastTemplate !== value) {\n                if (view.isComposed) {\n                    view.remove();\n                    view.unbind();\n                }\n                view = value.create();\n            }\n        }\n        // It's possible that the value is the same as the previous template\n        // and that there's actually no need to compose it.\n        if (!view.isComposed) {\n            view.isComposed = true;\n            view.bind(this.source, this.context);\n            view.insertBefore(this.target);\n            this.target.$fastView = view;\n            this.target.$fastTemplate = value;\n        }\n        else if (view.needsBindOnly) {\n            view.needsBindOnly = false;\n            view.bind(this.source, this.context);\n        }\n    }\n    else {\n        const view = this.target.$fastView;\n        // If there is a view and it's currently composed into\n        // the DOM, then we need to remove it.\n        if (view !== void 0 && view.isComposed) {\n            view.isComposed = false;\n            view.remove();\n            if (view.needsBindOnly) {\n                view.needsBindOnly = false;\n            }\n            else {\n                view.unbind();\n            }\n        }\n        this.target.textContent = value;\n    }\n}\nfunction updatePropertyTarget(value) {\n    this.target[this.targetName] = value;\n}\nfunction updateClassTarget(value) {\n    const classVersions = this.classVersions || Object.create(null);\n    const target = this.target;\n    let version = this.version || 0;\n    // Add the classes, tracking the version at which they were added.\n    if (value !== null && value !== undefined && value.length) {\n        const names = value.split(/\\s+/);\n        for (let i = 0, ii = names.length; i < ii; ++i) {\n            const currentName = names[i];\n            if (currentName === \"\") {\n                continue;\n            }\n            classVersions[currentName] = version;\n            target.classList.add(currentName);\n        }\n    }\n    this.classVersions = classVersions;\n    this.version = version + 1;\n    // If this is the first call to add classes, there's no need to remove old ones.\n    if (version === 0) {\n        return;\n    }\n    // Remove classes from the previous version.\n    version -= 1;\n    for (const name in classVersions) {\n        if (classVersions[name] === version) {\n            target.classList.remove(name);\n        }\n    }\n}\n/**\n * A directive that configures data binding to element content and attributes.\n * @public\n */\nexport class HTMLBindingDirective extends TargetedHTMLDirective {\n    /**\n     * Creates an instance of BindingDirective.\n     * @param binding - A binding that returns the data used to update the DOM.\n     */\n    constructor(binding) {\n        super();\n        this.binding = binding;\n        this.bind = normalBind;\n        this.unbind = normalUnbind;\n        this.updateTarget = updateAttributeTarget;\n        this.isBindingVolatile = Observable.isVolatileBinding(this.binding);\n    }\n    /**\n     * Gets/sets the name of the attribute or property that this\n     * binding is targeting.\n     */\n    get targetName() {\n        return this.originalTargetName;\n    }\n    set targetName(value) {\n        this.originalTargetName = value;\n        if (value === void 0) {\n            return;\n        }\n        switch (value[0]) {\n            case \":\":\n                this.cleanedTargetName = value.substr(1);\n                this.updateTarget = updatePropertyTarget;\n                if (this.cleanedTargetName === \"innerHTML\") {\n                    const binding = this.binding;\n                    this.binding = (s, c) => DOM.createHTML(binding(s, c));\n                }\n                break;\n            case \"?\":\n                this.cleanedTargetName = value.substr(1);\n                this.updateTarget = updateBooleanAttributeTarget;\n                break;\n            case \"@\":\n                this.cleanedTargetName = value.substr(1);\n                this.bind = triggerBind;\n                this.unbind = triggerUnbind;\n                break;\n            default:\n                this.cleanedTargetName = value;\n                if (value === \"class\") {\n                    this.updateTarget = updateClassTarget;\n                }\n                break;\n        }\n    }\n    /**\n     * Makes this binding target the content of an element rather than\n     * a particular attribute or property.\n     */\n    targetAtContent() {\n        this.updateTarget = updateContentTarget;\n        this.unbind = contentUnbind;\n    }\n    /**\n     * Creates the runtime BindingBehavior instance based on the configuration\n     * information stored in the BindingDirective.\n     * @param target - The target node that the binding behavior should attach to.\n     */\n    createBehavior(target) {\n        /* eslint-disable-next-line @typescript-eslint/no-use-before-define */\n        return new BindingBehavior(target, this.binding, this.isBindingVolatile, this.bind, this.unbind, this.updateTarget, this.cleanedTargetName);\n    }\n}\n/**\n * A behavior that updates content and attributes based on a configured\n * BindingDirective.\n * @public\n */\nexport class BindingBehavior {\n    /**\n     * Creates an instance of BindingBehavior.\n     * @param target - The target of the data updates.\n     * @param binding - The binding that returns the latest value for an update.\n     * @param isBindingVolatile - Indicates whether the binding has volatile dependencies.\n     * @param bind - The operation to perform during binding.\n     * @param unbind - The operation to perform during unbinding.\n     * @param updateTarget - The operation to perform when updating.\n     * @param targetName - The name of the target attribute or property to update.\n     */\n    constructor(target, binding, isBindingVolatile, bind, unbind, updateTarget, targetName) {\n        /** @internal */\n        this.source = null;\n        /** @internal */\n        this.context = null;\n        /** @internal */\n        this.bindingObserver = null;\n        this.target = target;\n        this.binding = binding;\n        this.isBindingVolatile = isBindingVolatile;\n        this.bind = bind;\n        this.unbind = unbind;\n        this.updateTarget = updateTarget;\n        this.targetName = targetName;\n    }\n    /** @internal */\n    handleChange() {\n        this.updateTarget(this.bindingObserver.observe(this.source, this.context));\n    }\n    /** @internal */\n    handleEvent(event) {\n        ExecutionContext.setEvent(event);\n        const result = this.binding(this.source, this.context);\n        ExecutionContext.setEvent(null);\n        if (result !== true) {\n            event.preventDefault();\n        }\n    }\n}\n","import { _interpolationEnd, _interpolationStart, DOM } from \"../dom.js\";\nimport { HTMLBindingDirective } from \"./binding.js\";\nlet sharedContext = null;\nclass CompilationContext {\n    addFactory(factory) {\n        factory.targetIndex = this.targetIndex;\n        this.behaviorFactories.push(factory);\n    }\n    captureContentBinding(directive) {\n        directive.targetAtContent();\n        this.addFactory(directive);\n    }\n    reset() {\n        this.behaviorFactories = [];\n        this.targetIndex = -1;\n    }\n    release() {\n        /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n        sharedContext = this;\n    }\n    static borrow(directives) {\n        const shareable = sharedContext || new CompilationContext();\n        shareable.directives = directives;\n        shareable.reset();\n        sharedContext = null;\n        return shareable;\n    }\n}\nfunction createAggregateBinding(parts) {\n    if (parts.length === 1) {\n        return parts[0];\n    }\n    let targetName;\n    const partCount = parts.length;\n    const finalParts = parts.map((x) => {\n        if (typeof x === \"string\") {\n            return () => x;\n        }\n        targetName = x.targetName || targetName;\n        return x.binding;\n    });\n    const binding = (scope, context) => {\n        let output = \"\";\n        for (let i = 0; i < partCount; ++i) {\n            output += finalParts[i](scope, context);\n        }\n        return output;\n    };\n    const directive = new HTMLBindingDirective(binding);\n    directive.targetName = targetName;\n    return directive;\n}\nconst interpolationEndLength = _interpolationEnd.length;\nfunction parseContent(context, value) {\n    const valueParts = value.split(_interpolationStart);\n    if (valueParts.length === 1) {\n        return null;\n    }\n    const bindingParts = [];\n    for (let i = 0, ii = valueParts.length; i < ii; ++i) {\n        const current = valueParts[i];\n        const index = current.indexOf(_interpolationEnd);\n        let literal;\n        if (index === -1) {\n            literal = current;\n        }\n        else {\n            const directiveIndex = parseInt(current.substring(0, index));\n            bindingParts.push(context.directives[directiveIndex]);\n            literal = current.substring(index + interpolationEndLength);\n        }\n        if (literal !== \"\") {\n            bindingParts.push(literal);\n        }\n    }\n    return bindingParts;\n}\nfunction compileAttributes(context, node, includeBasicValues = false) {\n    const attributes = node.attributes;\n    for (let i = 0, ii = attributes.length; i < ii; ++i) {\n        const attr = attributes[i];\n        const attrValue = attr.value;\n        const parseResult = parseContent(context, attrValue);\n        let result = null;\n        if (parseResult === null) {\n            if (includeBasicValues) {\n                result = new HTMLBindingDirective(() => attrValue);\n                result.targetName = attr.name;\n            }\n        }\n        else {\n            result = createAggregateBinding(parseResult);\n        }\n        if (result !== null) {\n            node.removeAttributeNode(attr);\n            i--;\n            ii--;\n            context.addFactory(result);\n        }\n    }\n}\nfunction compileContent(context, node, walker) {\n    const parseResult = parseContent(context, node.textContent);\n    if (parseResult !== null) {\n        let lastNode = node;\n        for (let i = 0, ii = parseResult.length; i < ii; ++i) {\n            const currentPart = parseResult[i];\n            const currentNode = i === 0\n                ? node\n                : lastNode.parentNode.insertBefore(document.createTextNode(\"\"), lastNode.nextSibling);\n            if (typeof currentPart === \"string\") {\n                currentNode.textContent = currentPart;\n            }\n            else {\n                currentNode.textContent = \" \";\n                context.captureContentBinding(currentPart);\n            }\n            lastNode = currentNode;\n            context.targetIndex++;\n            if (currentNode !== node) {\n                walker.nextNode();\n            }\n        }\n        context.targetIndex--;\n    }\n}\n/**\n * Compiles a template and associated directives into a raw compilation\n * result which include a cloneable DocumentFragment and factories capable\n * of attaching runtime behavior to nodes within the fragment.\n * @param template - The template to compile.\n * @param directives - The directives referenced by the template.\n * @remarks\n * The template that is provided for compilation is altered in-place\n * and cannot be compiled again. If the original template must be preserved,\n * it is recommended that you clone the original and pass the clone to this API.\n * @public\n */\nexport function compileTemplate(template, directives) {\n    const fragment = template.content;\n    // https://bugs.chromium.org/p/chromium/issues/detail?id=1111864\n    document.adoptNode(fragment);\n    const context = CompilationContext.borrow(directives);\n    compileAttributes(context, template, true);\n    const hostBehaviorFactories = context.behaviorFactories;\n    context.reset();\n    const walker = DOM.createTemplateWalker(fragment);\n    let node;\n    while ((node = walker.nextNode())) {\n        context.targetIndex++;\n        switch (node.nodeType) {\n            case 1: // element node\n                compileAttributes(context, node);\n                break;\n            case 3: // text node\n                compileContent(context, node, walker);\n                break;\n            case 8: // comment\n                if (DOM.isMarker(node)) {\n                    context.addFactory(directives[DOM.extractDirectiveIndexFromMarker(node)]);\n                }\n        }\n    }\n    let targetOffset = 0;\n    if (\n    // If the first node in a fragment is a marker, that means it's an unstable first node,\n    // because something like a when, repeat, etc. could add nodes before the marker.\n    // To mitigate this, we insert a stable first node. However, if we insert a node,\n    // that will alter the result of the TreeWalker. So, we also need to offset the target index.\n    DOM.isMarker(fragment.firstChild) ||\n        // Or if there is only one node and a directive, it means the template's content\n        // is *only* the directive. In that case, HTMLView.dispose() misses any nodes inserted by\n        // the directive. Inserting a new node ensures proper disposal of nodes added by the directive.\n        (fragment.childNodes.length === 1 && directives.length)) {\n        fragment.insertBefore(document.createComment(\"\"), fragment.firstChild);\n        targetOffset = -1;\n    }\n    const viewBehaviorFactories = context.behaviorFactories;\n    context.release();\n    return {\n        fragment,\n        viewBehaviorFactories,\n        hostBehaviorFactories,\n        targetOffset,\n    };\n}\n","import { DOM } from \"../dom.js\";\nimport { defaultExecutionContext } from \"../observation/observable.js\";\nimport { compileTemplate } from \"./compiler.js\";\nimport { HTMLView } from \"./view.js\";\nimport { HTMLDirective, TargetedHTMLDirective, } from \"./html-directive.js\";\nimport { HTMLBindingDirective } from \"./binding.js\";\n/**\n * A template capable of creating HTMLView instances or rendering directly to DOM.\n * @public\n */\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nexport class ViewTemplate {\n    /**\n     * Creates an instance of ViewTemplate.\n     * @param html - The html representing what this template will instantiate, including placeholders for directives.\n     * @param directives - The directives that will be connected to placeholders in the html.\n     */\n    constructor(html, directives) {\n        this.behaviorCount = 0;\n        this.hasHostBehaviors = false;\n        this.fragment = null;\n        this.targetOffset = 0;\n        this.viewBehaviorFactories = null;\n        this.hostBehaviorFactories = null;\n        this.html = html;\n        this.directives = directives;\n    }\n    /**\n     * Creates an HTMLView instance based on this template definition.\n     * @param hostBindingTarget - The element that host behaviors will be bound to.\n     */\n    create(hostBindingTarget) {\n        if (this.fragment === null) {\n            let template;\n            const html = this.html;\n            if (typeof html === \"string\") {\n                template = document.createElement(\"template\");\n                template.innerHTML = DOM.createHTML(html);\n                const fec = template.content.firstElementChild;\n                if (fec !== null && fec.tagName === \"TEMPLATE\") {\n                    template = fec;\n                }\n            }\n            else {\n                template = html;\n            }\n            const result = compileTemplate(template, this.directives);\n            this.fragment = result.fragment;\n            this.viewBehaviorFactories = result.viewBehaviorFactories;\n            this.hostBehaviorFactories = result.hostBehaviorFactories;\n            this.targetOffset = result.targetOffset;\n            this.behaviorCount =\n                this.viewBehaviorFactories.length + this.hostBehaviorFactories.length;\n            this.hasHostBehaviors = this.hostBehaviorFactories.length > 0;\n        }\n        const fragment = this.fragment.cloneNode(true);\n        const viewFactories = this.viewBehaviorFactories;\n        const behaviors = new Array(this.behaviorCount);\n        const walker = DOM.createTemplateWalker(fragment);\n        let behaviorIndex = 0;\n        let targetIndex = this.targetOffset;\n        let node = walker.nextNode();\n        for (let ii = viewFactories.length; behaviorIndex < ii; ++behaviorIndex) {\n            const factory = viewFactories[behaviorIndex];\n            const factoryIndex = factory.targetIndex;\n            while (node !== null) {\n                if (targetIndex === factoryIndex) {\n                    behaviors[behaviorIndex] = factory.createBehavior(node);\n                    break;\n                }\n                else {\n                    node = walker.nextNode();\n                    targetIndex++;\n                }\n            }\n        }\n        if (this.hasHostBehaviors) {\n            const hostFactories = this.hostBehaviorFactories;\n            for (let i = 0, ii = hostFactories.length; i < ii; ++i, ++behaviorIndex) {\n                behaviors[behaviorIndex] = hostFactories[i].createBehavior(hostBindingTarget);\n            }\n        }\n        return new HTMLView(fragment, behaviors);\n    }\n    /**\n     * Creates an HTMLView from this template, binds it to the source, and then appends it to the host.\n     * @param source - The data source to bind the template to.\n     * @param host - The Element where the template will be rendered.\n     * @param hostBindingTarget - An HTML element to target the host bindings at if different from the\n     * host that the template is being attached to.\n     */\n    render(source, host, hostBindingTarget) {\n        if (typeof host === \"string\") {\n            host = document.getElementById(host);\n        }\n        if (hostBindingTarget === void 0) {\n            hostBindingTarget = host;\n        }\n        const view = this.create(hostBindingTarget);\n        view.bind(source, defaultExecutionContext);\n        view.appendTo(host);\n        return view;\n    }\n}\n// Much thanks to LitHTML for working this out!\nconst lastAttributeNameRegex = \n/* eslint-disable-next-line no-control-regex */\n/([ \\x09\\x0a\\x0c\\x0d])([^\\0-\\x1F\\x7F-\\x9F \"'>=/]+)([ \\x09\\x0a\\x0c\\x0d]*=[ \\x09\\x0a\\x0c\\x0d]*(?:[^ \\x09\\x0a\\x0c\\x0d\"'`<>=]*|\"[^\"]*|'[^']*))$/;\n/**\n * Transforms a template literal string into a renderable ViewTemplate.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @remarks\n * The html helper supports interpolation of strings, numbers, binding expressions,\n * other template instances, and Directive instances.\n * @public\n */\nexport function html(strings, ...values) {\n    const directives = [];\n    let html = \"\";\n    for (let i = 0, ii = strings.length - 1; i < ii; ++i) {\n        const currentString = strings[i];\n        let value = values[i];\n        html += currentString;\n        if (value instanceof ViewTemplate) {\n            const template = value;\n            value = () => template;\n        }\n        if (typeof value === \"function\") {\n            value = new HTMLBindingDirective(value);\n        }\n        if (value instanceof TargetedHTMLDirective) {\n            const match = lastAttributeNameRegex.exec(currentString);\n            if (match !== null) {\n                value.targetName = match[2];\n            }\n        }\n        if (value instanceof HTMLDirective) {\n            // Since not all values are directives, we can't use i\n            // as the index for the placeholder. Instead, we need to\n            // use directives.length to get the next index.\n            html += value.createPlaceholder(directives.length);\n            directives.push(value);\n        }\n        else {\n            html += value;\n        }\n    }\n    html += strings[strings.length - 1];\n    return new ViewTemplate(html, directives);\n}\n","import { $global } from \"./platform.js\";\nconst updateQueue = $global.FAST.getById(1 /* updateQueue */, () => {\n    const tasks = [];\n    const pendingErrors = [];\n    function throwFirstError() {\n        if (pendingErrors.length) {\n            throw pendingErrors.shift();\n        }\n    }\n    function tryRunTask(task) {\n        try {\n            task.call();\n        }\n        catch (error) {\n            pendingErrors.push(error);\n            setTimeout(throwFirstError, 0);\n        }\n    }\n    function process() {\n        const capacity = 1024;\n        let index = 0;\n        while (index < tasks.length) {\n            tryRunTask(tasks[index]);\n            index++;\n            // Prevent leaking memory for long chains of recursive calls to `DOM.queueUpdate`.\n            // If we call `DOM.queueUpdate` within a task scheduled by `DOM.queueUpdate`, the queue will\n            // grow, but to avoid an O(n) walk for every task we execute, we don't\n            // shift tasks off the queue after they have been executed.\n            // Instead, we periodically shift 1024 tasks off the queue.\n            if (index > capacity) {\n                // Manually shift all values starting at the index back to the\n                // beginning of the queue.\n                for (let scan = 0, newLength = tasks.length - index; scan < newLength; scan++) {\n                    tasks[scan] = tasks[scan + index];\n                }\n                tasks.length -= index;\n                index = 0;\n            }\n        }\n        tasks.length = 0;\n    }\n    function enqueue(callable) {\n        if (tasks.length < 1) {\n            $global.requestAnimationFrame(process);\n        }\n        tasks.push(callable);\n    }\n    return Object.freeze({\n        enqueue,\n        process,\n    });\n});\n/* eslint-disable */\nconst fastHTMLPolicy = $global.trustedTypes.createPolicy(\"fast-html\", {\n    createHTML: html => html,\n});\n/* eslint-enable */\nlet htmlPolicy = fastHTMLPolicy;\nconst marker = `fast-${Math.random().toString(36).substring(2, 8)}`;\n/** @internal */\nexport const _interpolationStart = `${marker}{`;\n/** @internal */\nexport const _interpolationEnd = `}${marker}`;\n/**\n * Common DOM APIs.\n * @public\n */\nexport const DOM = Object.freeze({\n    /**\n     * Indicates whether the DOM supports the adoptedStyleSheets feature.\n     */\n    supportsAdoptedStyleSheets: Array.isArray(document.adoptedStyleSheets) &&\n        \"replace\" in CSSStyleSheet.prototype,\n    /**\n     * Sets the HTML trusted types policy used by the templating engine.\n     * @param policy - The policy to set for HTML.\n     * @remarks\n     * This API can only be called once, for security reasons. It should be\n     * called by the application developer at the start of their program.\n     */\n    setHTMLPolicy(policy) {\n        if (htmlPolicy !== fastHTMLPolicy) {\n            throw new Error(\"The HTML policy can only be set once.\");\n        }\n        htmlPolicy = policy;\n    },\n    /**\n     * Turns a string into trusted HTML using the configured trusted types policy.\n     * @param html - The string to turn into trusted HTML.\n     * @remarks\n     * Used internally by the template engine when creating templates\n     * and setting innerHTML.\n     */\n    createHTML(html) {\n        return htmlPolicy.createHTML(html);\n    },\n    /**\n     * Determines if the provided node is a template marker used by the runtime.\n     * @param node - The node to test.\n     */\n    isMarker(node) {\n        return node && node.nodeType === 8 && node.data.startsWith(marker);\n    },\n    /**\n     * Given a marker node, extract the {@link HTMLDirective} index from the placeholder.\n     * @param node - The marker node to extract the index from.\n     */\n    extractDirectiveIndexFromMarker(node) {\n        return parseInt(node.data.replace(`${marker}:`, \"\"));\n    },\n    /**\n     * Creates a placeholder string suitable for marking out a location *within*\n     * an attribute value or HTML content.\n     * @param index - The directive index to create the placeholder for.\n     * @remarks\n     * Used internally by binding directives.\n     */\n    createInterpolationPlaceholder(index) {\n        return `${_interpolationStart}${index}${_interpolationEnd}`;\n    },\n    /**\n     * Creates a placeholder that manifests itself as an attribute on an\n     * element.\n     * @param attributeName - The name of the custom attribute.\n     * @param index - The directive index to create the placeholder for.\n     * @remarks\n     * Used internally by attribute directives such as `ref`, `slotted`, and `children`.\n     */\n    createCustomAttributePlaceholder(attributeName, index) {\n        return `${attributeName}=\"${this.createInterpolationPlaceholder(index)}\"`;\n    },\n    /**\n     * Creates a placeholder that manifests itself as a marker within the DOM structure.\n     * @param index - The directive index to create the placeholder for.\n     * @remarks\n     * Used internally by structural directives such as `repeat`.\n     */\n    createBlockPlaceholder(index) {\n        return `<!--${marker}:${index}-->`;\n    },\n    /**\n     * Schedules DOM update work in the next async batch.\n     * @param callable - The callable function or object to queue.\n     */\n    queueUpdate: updateQueue.enqueue,\n    /**\n     * Immediately processes all work previously scheduled\n     * through queueUpdate.\n     * @remarks\n     * This also forces nextUpdate promises\n     * to resolve.\n     */\n    processUpdates: updateQueue.process,\n    /**\n     * Resolves with the next DOM update.\n     */\n    nextUpdate() {\n        return new Promise(updateQueue.enqueue);\n    },\n    /**\n     * Sets an attribute value on an element.\n     * @param element - The element to set the attribute value on.\n     * @param attributeName - The attribute name to set.\n     * @param value - The value of the attribute to set.\n     * @remarks\n     * If the value is `null` or `undefined`, the attribute is removed, otherwise\n     * it is set to the provided value using the standard `setAttribute` API.\n     */\n    setAttribute(element, attributeName, value) {\n        if (value === null || value === undefined) {\n            element.removeAttribute(attributeName);\n        }\n        else {\n            element.setAttribute(attributeName, value);\n        }\n    },\n    /**\n     * Sets a boolean attribute value.\n     * @param element - The element to set the boolean attribute value on.\n     * @param attributeName - The attribute name to set.\n     * @param value - The value of the attribute to set.\n     * @remarks\n     * If the value is true, the attribute is added; otherwise it is removed.\n     */\n    setBooleanAttribute(element, attributeName, value) {\n        value\n            ? element.setAttribute(attributeName, \"\")\n            : element.removeAttribute(attributeName);\n    },\n    /**\n     * Removes all the child nodes of the provided parent node.\n     * @param parent - The node to remove the children from.\n     */\n    removeChildNodes(parent) {\n        for (let child = parent.firstChild; child !== null; child = parent.firstChild) {\n            parent.removeChild(child);\n        }\n    },\n    /**\n     * Creates a TreeWalker configured to walk a template fragment.\n     * @param fragment - The fragment to walk.\n     */\n    createTemplateWalker(fragment) {\n        return document.createTreeWalker(fragment, 133, // element, text, comment\n        null, false);\n    },\n});\n","import { DOM } from \"../dom.js\";\nimport { createMetadataLocator, FAST } from \"../platform.js\";\nimport { PropertyChangeNotifier, SubscriberSet } from \"./notifier.js\";\n/**\n * Common Observable APIs.\n * @public\n */\nexport const Observable = FAST.getById(2 /* observable */, () => {\n    const volatileRegex = /(:|&&|\\|\\||if)/;\n    const notifierLookup = new WeakMap();\n    const queueUpdate = DOM.queueUpdate;\n    let watcher = void 0;\n    let createArrayObserver = (array) => {\n        throw new Error(\"Must call enableArrayObservation before observing arrays.\");\n    };\n    function getNotifier(source) {\n        let found = source.$fastController || notifierLookup.get(source);\n        if (found === void 0) {\n            if (Array.isArray(source)) {\n                found = createArrayObserver(source);\n            }\n            else {\n                notifierLookup.set(source, (found = new PropertyChangeNotifier(source)));\n            }\n        }\n        return found;\n    }\n    const getAccessors = createMetadataLocator();\n    class DefaultObservableAccessor {\n        constructor(name) {\n            this.name = name;\n            this.field = `_${name}`;\n            this.callback = `${name}Changed`;\n        }\n        getValue(source) {\n            if (watcher !== void 0) {\n                watcher.watch(source, this.name);\n            }\n            return source[this.field];\n        }\n        setValue(source, newValue) {\n            const field = this.field;\n            const oldValue = source[field];\n            if (oldValue !== newValue) {\n                source[field] = newValue;\n                const callback = source[this.callback];\n                if (typeof callback === \"function\") {\n                    callback.call(source, oldValue, newValue);\n                }\n                getNotifier(source).notify(this.name);\n            }\n        }\n    }\n    class BindingObserverImplementation extends SubscriberSet {\n        constructor(binding, initialSubscriber, isVolatileBinding = false) {\n            super(binding, initialSubscriber);\n            this.binding = binding;\n            this.isVolatileBinding = isVolatileBinding;\n            this.needsRefresh = true;\n            this.needsQueue = true;\n            this.first = this;\n            this.last = null;\n            this.propertySource = void 0;\n            this.propertyName = void 0;\n            this.notifier = void 0;\n            this.next = void 0;\n        }\n        observe(source, context) {\n            if (this.needsRefresh && this.last !== null) {\n                this.disconnect();\n            }\n            const previousWatcher = watcher;\n            watcher = this.needsRefresh ? this : void 0;\n            this.needsRefresh = this.isVolatileBinding;\n            const result = this.binding(source, context);\n            watcher = previousWatcher;\n            return result;\n        }\n        disconnect() {\n            if (this.last !== null) {\n                let current = this.first;\n                while (current !== void 0) {\n                    current.notifier.unsubscribe(this, current.propertyName);\n                    current = current.next;\n                }\n                this.last = null;\n                this.needsRefresh = this.needsQueue = true;\n            }\n        }\n        watch(propertySource, propertyName) {\n            const prev = this.last;\n            const notifier = getNotifier(propertySource);\n            const current = prev === null ? this.first : {};\n            current.propertySource = propertySource;\n            current.propertyName = propertyName;\n            current.notifier = notifier;\n            notifier.subscribe(this, propertyName);\n            if (prev !== null) {\n                if (!this.needsRefresh) {\n                    // Declaring the variable prior to assignment below circumvents\n                    // a bug in Angular's optimization process causing infinite recursion\n                    // of this watch() method. Details https://github.com/microsoft/fast/issues/4969\n                    let prevValue;\n                    watcher = void 0;\n                    /* eslint-disable-next-line */\n                    prevValue = prev.propertySource[prev.propertyName];\n                    /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n                    watcher = this;\n                    if (propertySource === prevValue) {\n                        this.needsRefresh = true;\n                    }\n                }\n                prev.next = current;\n            }\n            this.last = current;\n        }\n        handleChange() {\n            if (this.needsQueue) {\n                this.needsQueue = false;\n                queueUpdate(this);\n            }\n        }\n        call() {\n            if (this.last !== null) {\n                this.needsQueue = true;\n                this.notify(this);\n            }\n        }\n        records() {\n            let next = this.first;\n            return {\n                next: () => {\n                    const current = next;\n                    if (current === undefined) {\n                        return { value: void 0, done: true };\n                    }\n                    else {\n                        next = next.next;\n                        return {\n                            value: current,\n                            done: false,\n                        };\n                    }\n                },\n                [Symbol.iterator]: function () {\n                    return this;\n                },\n            };\n        }\n    }\n    return Object.freeze({\n        /**\n         * @internal\n         * @param factory - The factory used to create array observers.\n         */\n        setArrayObserverFactory(factory) {\n            createArrayObserver = factory;\n        },\n        /**\n         * Gets a notifier for an object or Array.\n         * @param source - The object or Array to get the notifier for.\n         */\n        getNotifier,\n        /**\n         * Records a property change for a source object.\n         * @param source - The object to record the change against.\n         * @param propertyName - The property to track as changed.\n         */\n        track(source, propertyName) {\n            if (watcher !== void 0) {\n                watcher.watch(source, propertyName);\n            }\n        },\n        /**\n         * Notifies watchers that the currently executing property getter or function is volatile\n         * with respect to its observable dependencies.\n         */\n        trackVolatile() {\n            if (watcher !== void 0) {\n                watcher.needsRefresh = true;\n            }\n        },\n        /**\n         * Notifies subscribers of a source object of changes.\n         * @param source - the object to notify of changes.\n         * @param args - The change args to pass to subscribers.\n         */\n        notify(source, args) {\n            getNotifier(source).notify(args);\n        },\n        /**\n         * Defines an observable property on an object or prototype.\n         * @param target - The target object to define the observable on.\n         * @param nameOrAccessor - The name of the property to define as observable;\n         * or a custom accessor that specifies the property name and accessor implementation.\n         */\n        defineProperty(target, nameOrAccessor) {\n            if (typeof nameOrAccessor === \"string\") {\n                nameOrAccessor = new DefaultObservableAccessor(nameOrAccessor);\n            }\n            getAccessors(target).push(nameOrAccessor);\n            Reflect.defineProperty(target, nameOrAccessor.name, {\n                enumerable: true,\n                get: function () {\n                    return nameOrAccessor.getValue(this);\n                },\n                set: function (newValue) {\n                    nameOrAccessor.setValue(this, newValue);\n                },\n            });\n        },\n        /**\n         * Finds all the observable accessors defined on the target,\n         * including its prototype chain.\n         * @param target - The target object to search for accessor on.\n         */\n        getAccessors,\n        /**\n         * Creates a {@link BindingObserver} that can watch the\n         * provided {@link Binding} for changes.\n         * @param binding - The binding to observe.\n         * @param initialSubscriber - An initial subscriber to changes in the binding value.\n         * @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.\n         */\n        binding(binding, initialSubscriber, isVolatileBinding = this.isVolatileBinding(binding)) {\n            return new BindingObserverImplementation(binding, initialSubscriber, isVolatileBinding);\n        },\n        /**\n         * Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated\n         * on every evaluation of the value.\n         * @param binding - The binding to inspect.\n         */\n        isVolatileBinding(binding) {\n            return volatileRegex.test(binding.toString());\n        },\n    });\n});\n/**\n * Decorator: Defines an observable property on the target.\n * @param target - The target to define the observable on.\n * @param nameOrAccessor - The property name or accessor to define the observable as.\n * @public\n */\nexport function observable(target, nameOrAccessor) {\n    Observable.defineProperty(target, nameOrAccessor);\n}\n/**\n * Decorator: Marks a property getter as having volatile observable dependencies.\n * @param target - The target that the property is defined on.\n * @param name - The property name.\n * @param name - The existing descriptor.\n * @public\n */\nexport function volatile(target, name, descriptor) {\n    return Object.assign({}, descriptor, {\n        get: function () {\n            Observable.trackVolatile();\n            return descriptor.get.apply(this);\n        },\n    });\n}\nconst contextEvent = FAST.getById(3 /* contextEvent */, () => {\n    let current = null;\n    return {\n        get() {\n            return current;\n        },\n        set(event) {\n            current = event;\n        },\n    };\n});\n/**\n * Provides additional contextual information available to behaviors and expressions.\n * @public\n */\nexport class ExecutionContext {\n    constructor() {\n        /**\n         * The index of the current item within a repeat context.\n         */\n        this.index = 0;\n        /**\n         * The length of the current collection within a repeat context.\n         */\n        this.length = 0;\n        /**\n         * The parent data object within a repeat context.\n         */\n        this.parent = null;\n        /**\n         * The parent execution context when in nested context scenarios.\n         */\n        this.parentContext = null;\n    }\n    /**\n     * The current event within an event handler.\n     */\n    get event() {\n        return contextEvent.get();\n    }\n    /**\n     * Indicates whether the current item within a repeat context\n     * has an even index.\n     */\n    get isEven() {\n        return this.index % 2 === 0;\n    }\n    /**\n     * Indicates whether the current item within a repeat context\n     * has an odd index.\n     */\n    get isOdd() {\n        return this.index % 2 !== 0;\n    }\n    /**\n     * Indicates whether the current item within a repeat context\n     * is the first item in the collection.\n     */\n    get isFirst() {\n        return this.index === 0;\n    }\n    /**\n     * Indicates whether the current item within a repeat context\n     * is somewhere in the middle of the collection.\n     */\n    get isInMiddle() {\n        return !this.isFirst && !this.isLast;\n    }\n    /**\n     * Indicates whether the current item within a repeat context\n     * is the last item in the collection.\n     */\n    get isLast() {\n        return this.index === this.length - 1;\n    }\n    /**\n     * Sets the event for the current execution context.\n     * @param event - The event to set.\n     * @internal\n     */\n    static setEvent(event) {\n        contextEvent.set(event);\n    }\n}\nObservable.defineProperty(ExecutionContext.prototype, \"index\");\nObservable.defineProperty(ExecutionContext.prototype, \"length\");\n/**\n * The default execution context used in binding expressions.\n * @public\n */\nexport const defaultExecutionContext = Object.seal(new ExecutionContext());\n","/**\n * A directive that enables basic conditional rendering in a template.\n * @param binding - The condition to test for rendering.\n * @param templateOrTemplateBinding - The template or a binding that gets\n * the template to render when the condition is true.\n * @public\n */\nexport function when(binding, templateOrTemplateBinding) {\n    const getTemplate = typeof templateOrTemplateBinding === \"function\"\n        ? templateOrTemplateBinding\n        : () => templateOrTemplateBinding;\n    return (source, context) => binding(source, context) ? getTemplate(source, context) : null;\n}\n","import { DOM } from \"../dom.js\";\nimport { PropertyChangeNotifier } from \"../observation/notifier.js\";\nimport { defaultExecutionContext, Observable } from \"../observation/observable.js\";\nimport { FASTElementDefinition } from \"./fast-definitions.js\";\nconst shadowRoots = new WeakMap();\nconst defaultEventOptions = {\n    bubbles: true,\n    composed: true,\n    cancelable: true,\n};\nfunction getShadowRoot(element) {\n    return element.shadowRoot || shadowRoots.get(element) || null;\n}\n/**\n * Controls the lifecycle and rendering of a `FASTElement`.\n * @public\n */\nexport class Controller extends PropertyChangeNotifier {\n    /**\n     * Creates a Controller to control the specified element.\n     * @param element - The element to be controlled by this controller.\n     * @param definition - The element definition metadata that instructs this\n     * controller in how to handle rendering and other platform integrations.\n     * @internal\n     */\n    constructor(element, definition) {\n        super(element);\n        this.boundObservables = null;\n        this.behaviors = null;\n        this.needsInitialization = true;\n        this._template = null;\n        this._styles = null;\n        this._isConnected = false;\n        /**\n         * This allows Observable.getNotifier(...) to return the Controller\n         * when the notifier for the Controller itself is being requested. The\n         * result is that the Observable system does not need to create a separate\n         * instance of Notifier for observables on the Controller. The component and\n         * the controller will now share the same notifier, removing one-object construct\n         * per web component instance.\n         */\n        this.$fastController = this;\n        /**\n         * The view associated with the custom element.\n         * @remarks\n         * If `null` then the element is managing its own rendering.\n         */\n        this.view = null;\n        this.element = element;\n        this.definition = definition;\n        const shadowOptions = definition.shadowOptions;\n        if (shadowOptions !== void 0) {\n            const shadowRoot = element.attachShadow(shadowOptions);\n            if (shadowOptions.mode === \"closed\") {\n                shadowRoots.set(element, shadowRoot);\n            }\n        }\n        // Capture any observable values that were set by the binding engine before\n        // the browser upgraded the element. Then delete the property since it will\n        // shadow the getter/setter that is required to make the observable operate.\n        // Later, in the connect callback, we'll re-apply the values.\n        const accessors = Observable.getAccessors(element);\n        if (accessors.length > 0) {\n            const boundObservables = (this.boundObservables = Object.create(null));\n            for (let i = 0, ii = accessors.length; i < ii; ++i) {\n                const propertyName = accessors[i].name;\n                const value = element[propertyName];\n                if (value !== void 0) {\n                    delete element[propertyName];\n                    boundObservables[propertyName] = value;\n                }\n            }\n        }\n    }\n    /**\n     * Indicates whether or not the custom element has been\n     * connected to the document.\n     */\n    get isConnected() {\n        Observable.track(this, \"isConnected\");\n        return this._isConnected;\n    }\n    setIsConnected(value) {\n        this._isConnected = value;\n        Observable.notify(this, \"isConnected\");\n    }\n    /**\n     * Gets/sets the template used to render the component.\n     * @remarks\n     * This value can only be accurately read after connect but can be set at any time.\n     */\n    get template() {\n        return this._template;\n    }\n    set template(value) {\n        if (this._template === value) {\n            return;\n        }\n        this._template = value;\n        if (!this.needsInitialization) {\n            this.renderTemplate(value);\n        }\n    }\n    /**\n     * Gets/sets the primary styles used for the component.\n     * @remarks\n     * This value can only be accurately read after connect but can be set at any time.\n     */\n    get styles() {\n        return this._styles;\n    }\n    set styles(value) {\n        if (this._styles === value) {\n            return;\n        }\n        if (this._styles !== null) {\n            this.removeStyles(this._styles);\n        }\n        this._styles = value;\n        if (!this.needsInitialization && value !== null) {\n            this.addStyles(value);\n        }\n    }\n    /**\n     * Adds styles to this element. Providing an HTMLStyleElement will attach the element instance to the shadowRoot.\n     * @param styles - The styles to add.\n     */\n    addStyles(styles) {\n        const target = getShadowRoot(this.element) ||\n            this.element.getRootNode();\n        if (styles instanceof HTMLStyleElement) {\n            target.append(styles);\n        }\n        else if (!styles.isAttachedTo(target)) {\n            const sourceBehaviors = styles.behaviors;\n            styles.addStylesTo(target);\n            if (sourceBehaviors !== null) {\n                this.addBehaviors(sourceBehaviors);\n            }\n        }\n    }\n    /**\n     * Removes styles from this element. Providing an HTMLStyleElement will detach the element instance from the shadowRoot.\n     * @param styles - the styles to remove.\n     */\n    removeStyles(styles) {\n        const target = getShadowRoot(this.element) ||\n            this.element.getRootNode();\n        if (styles instanceof HTMLStyleElement) {\n            target.removeChild(styles);\n        }\n        else if (styles.isAttachedTo(target)) {\n            const sourceBehaviors = styles.behaviors;\n            styles.removeStylesFrom(target);\n            if (sourceBehaviors !== null) {\n                this.removeBehaviors(sourceBehaviors);\n            }\n        }\n    }\n    /**\n     * Adds behaviors to this element.\n     * @param behaviors - The behaviors to add.\n     */\n    addBehaviors(behaviors) {\n        const targetBehaviors = this.behaviors || (this.behaviors = new Map());\n        const length = behaviors.length;\n        const behaviorsToBind = [];\n        for (let i = 0; i < length; ++i) {\n            const behavior = behaviors[i];\n            if (targetBehaviors.has(behavior)) {\n                targetBehaviors.set(behavior, targetBehaviors.get(behavior) + 1);\n            }\n            else {\n                targetBehaviors.set(behavior, 1);\n                behaviorsToBind.push(behavior);\n            }\n        }\n        if (this._isConnected) {\n            const element = this.element;\n            for (let i = 0; i < behaviorsToBind.length; ++i) {\n                behaviorsToBind[i].bind(element, defaultExecutionContext);\n            }\n        }\n    }\n    /**\n     * Removes behaviors from this element.\n     * @param behaviors - The behaviors to remove.\n     * @param force - Forces unbinding of behaviors.\n     */\n    removeBehaviors(behaviors, force = false) {\n        const targetBehaviors = this.behaviors;\n        if (targetBehaviors === null) {\n            return;\n        }\n        const length = behaviors.length;\n        const behaviorsToUnbind = [];\n        for (let i = 0; i < length; ++i) {\n            const behavior = behaviors[i];\n            if (targetBehaviors.has(behavior)) {\n                const count = targetBehaviors.get(behavior) - 1;\n                count === 0 || force\n                    ? targetBehaviors.delete(behavior) && behaviorsToUnbind.push(behavior)\n                    : targetBehaviors.set(behavior, count);\n            }\n        }\n        if (this._isConnected) {\n            const element = this.element;\n            for (let i = 0; i < behaviorsToUnbind.length; ++i) {\n                behaviorsToUnbind[i].unbind(element);\n            }\n        }\n    }\n    /**\n     * Runs connected lifecycle behavior on the associated element.\n     */\n    onConnectedCallback() {\n        if (this._isConnected) {\n            return;\n        }\n        const element = this.element;\n        if (this.needsInitialization) {\n            this.finishInitialization();\n        }\n        else if (this.view !== null) {\n            this.view.bind(element, defaultExecutionContext);\n        }\n        const behaviors = this.behaviors;\n        if (behaviors !== null) {\n            for (const [behavior] of behaviors) {\n                behavior.bind(element, defaultExecutionContext);\n            }\n        }\n        this.setIsConnected(true);\n    }\n    /**\n     * Runs disconnected lifecycle behavior on the associated element.\n     */\n    onDisconnectedCallback() {\n        if (!this._isConnected) {\n            return;\n        }\n        this.setIsConnected(false);\n        const view = this.view;\n        if (view !== null) {\n            view.unbind();\n        }\n        const behaviors = this.behaviors;\n        if (behaviors !== null) {\n            const element = this.element;\n            for (const [behavior] of behaviors) {\n                behavior.unbind(element);\n            }\n        }\n    }\n    /**\n     * Runs the attribute changed callback for the associated element.\n     * @param name - The name of the attribute that changed.\n     * @param oldValue - The previous value of the attribute.\n     * @param newValue - The new value of the attribute.\n     */\n    onAttributeChangedCallback(name, oldValue, newValue) {\n        const attrDef = this.definition.attributeLookup[name];\n        if (attrDef !== void 0) {\n            attrDef.onAttributeChangedCallback(this.element, newValue);\n        }\n    }\n    /**\n     * Emits a custom HTML event.\n     * @param type - The type name of the event.\n     * @param detail - The event detail object to send with the event.\n     * @param options - The event options. By default bubbles and composed.\n     * @remarks\n     * Only emits events if connected.\n     */\n    emit(type, detail, options) {\n        if (this._isConnected) {\n            return this.element.dispatchEvent(new CustomEvent(type, Object.assign(Object.assign({ detail }, defaultEventOptions), options)));\n        }\n        return false;\n    }\n    finishInitialization() {\n        const element = this.element;\n        const boundObservables = this.boundObservables;\n        // If we have any observables that were bound, re-apply their values.\n        if (boundObservables !== null) {\n            const propertyNames = Object.keys(boundObservables);\n            for (let i = 0, ii = propertyNames.length; i < ii; ++i) {\n                const propertyName = propertyNames[i];\n                element[propertyName] = boundObservables[propertyName];\n            }\n            this.boundObservables = null;\n        }\n        const definition = this.definition;\n        // 1. Template overrides take top precedence.\n        if (this._template === null) {\n            if (this.element.resolveTemplate) {\n                // 2. Allow for element instance overrides next.\n                this._template = this.element.resolveTemplate();\n            }\n            else if (definition.template) {\n                // 3. Default to the static definition.\n                this._template = definition.template || null;\n            }\n        }\n        // If we have a template after the above process, render it.\n        // If there's no template, then the element author has opted into\n        // custom rendering and they will managed the shadow root's content themselves.\n        if (this._template !== null) {\n            this.renderTemplate(this._template);\n        }\n        // 1. Styles overrides take top precedence.\n        if (this._styles === null) {\n            if (this.element.resolveStyles) {\n                // 2. Allow for element instance overrides next.\n                this._styles = this.element.resolveStyles();\n            }\n            else if (definition.styles) {\n                // 3. Default to the static definition.\n                this._styles = definition.styles || null;\n            }\n        }\n        // If we have styles after the above process, add them.\n        if (this._styles !== null) {\n            this.addStyles(this._styles);\n        }\n        this.needsInitialization = false;\n    }\n    renderTemplate(template) {\n        const element = this.element;\n        // When getting the host to render to, we start by looking\n        // up the shadow root. If there isn't one, then that means\n        // we're doing a Light DOM render to the element's direct children.\n        const host = getShadowRoot(element) || element;\n        if (this.view !== null) {\n            // If there's already a view, we need to unbind and remove through dispose.\n            this.view.dispose();\n            this.view = null;\n        }\n        else if (!this.needsInitialization) {\n            // If there was previous custom rendering, we need to clear out the host.\n            DOM.removeChildNodes(host);\n        }\n        if (template) {\n            // If a new template was provided, render it.\n            this.view = template.render(element, host, element);\n        }\n    }\n    /**\n     * Locates or creates a controller for the specified element.\n     * @param element - The element to return the controller for.\n     * @remarks\n     * The specified element must have a {@link FASTElementDefinition}\n     * registered either through the use of the {@link customElement}\n     * decorator or a call to `FASTElement.define`.\n     */\n    static forCustomElement(element) {\n        const controller = element.$fastController;\n        if (controller !== void 0) {\n            return controller;\n        }\n        const definition = FASTElementDefinition.forType(element.constructor);\n        if (definition === void 0) {\n            throw new Error(\"Missing FASTElement definition.\");\n        }\n        return (element.$fastController = new Controller(element, definition));\n    }\n}\n","import { Controller } from \"./controller.js\";\nimport { FASTElementDefinition, } from \"./fast-definitions.js\";\n/* eslint-disable-next-line @typescript-eslint/explicit-function-return-type */\nfunction createFASTElement(BaseType) {\n    return class extends BaseType {\n        constructor() {\n            /* eslint-disable-next-line */\n            super();\n            Controller.forCustomElement(this);\n        }\n        $emit(type, detail, options) {\n            return this.$fastController.emit(type, detail, options);\n        }\n        connectedCallback() {\n            this.$fastController.onConnectedCallback();\n        }\n        disconnectedCallback() {\n            this.$fastController.onDisconnectedCallback();\n        }\n        attributeChangedCallback(name, oldValue, newValue) {\n            this.$fastController.onAttributeChangedCallback(name, oldValue, newValue);\n        }\n    };\n}\n/**\n * A minimal base class for FASTElements that also provides\n * static helpers for working with FASTElements.\n * @public\n */\nexport const FASTElement = Object.assign(createFASTElement(HTMLElement), {\n    /**\n     * Creates a new FASTElement base class inherited from the\n     * provided base type.\n     * @param BaseType - The base element type to inherit from.\n     */\n    from(BaseType) {\n        return createFASTElement(BaseType);\n    },\n    /**\n     * Defines a platform custom element based on the provided type and definition.\n     * @param type - The custom element type to define.\n     * @param nameOrDef - The name of the element to define or a definition object\n     * that describes the element to define.\n     */\n    define(type, nameOrDef) {\n        return new FASTElementDefinition(type, nameOrDef).define().type;\n    },\n});\n/**\n * Decorator: Defines a platform custom element based on `FASTElement`.\n * @param nameOrDef - The name of the element to define or a definition object\n * that describes the element to define.\n * @public\n */\nexport function customElement(nameOrDef) {\n    /* eslint-disable-next-line @typescript-eslint/explicit-function-return-type */\n    return function (type) {\n        new FASTElementDefinition(type, nameOrDef).define();\n    };\n}\n","/**\n * A reference to globalThis, with support\n * for browsers that don't yet support the spec.\n * @public\n */\nexport const $global = (function () {\n    if (typeof globalThis !== \"undefined\") {\n        // We're running in a modern environment.\n        return globalThis;\n    }\n    if (typeof global !== \"undefined\") {\n        // We're running in NodeJS\n        return global;\n    }\n    if (typeof self !== \"undefined\") {\n        // We're running in a worker.\n        return self;\n    }\n    if (typeof window !== \"undefined\") {\n        // We're running in the browser's main thread.\n        return window;\n    }\n    try {\n        // Hopefully we never get here...\n        // Not all environments allow eval and Function. Use only as a last resort:\n        // eslint-disable-next-line no-new-func\n        return new Function(\"return this\")();\n    }\n    catch (_a) {\n        // If all fails, give up and create an object.\n        // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n        return {};\n    }\n})();\n// API-only Polyfill for trustedTypes\nif ($global.trustedTypes === void 0) {\n    $global.trustedTypes = { createPolicy: (n, r) => r };\n}\nconst propConfig = {\n    configurable: false,\n    enumerable: false,\n    writable: false,\n};\nif ($global.FAST === void 0) {\n    Reflect.defineProperty($global, \"FAST\", Object.assign({ value: Object.create(null) }, propConfig));\n}\n/**\n * The FAST global.\n * @internal\n */\nexport const FAST = $global.FAST;\nif (FAST.getById === void 0) {\n    const storage = Object.create(null);\n    Reflect.defineProperty(FAST, \"getById\", Object.assign({ value(id, initialize) {\n            let found = storage[id];\n            if (found === void 0) {\n                found = initialize ? (storage[id] = initialize()) : null;\n            }\n            return found;\n        } }, propConfig));\n}\n/**\n * A readonly, empty array.\n * @remarks\n * Typically returned by APIs that return arrays when there are\n * no actual items to return.\n * @internal\n */\nexport const emptyArray = Object.freeze([]);\n/**\n * Creates a function capable of locating metadata associated with a type.\n * @returns A metadata locator function.\n * @internal\n */\nexport function createMetadataLocator() {\n    const metadataLookup = new WeakMap();\n    return function (target) {\n        let metadata = metadataLookup.get(target);\n        if (metadata === void 0) {\n            let currentTarget = Reflect.getPrototypeOf(target);\n            while (metadata === void 0 && currentTarget !== null) {\n                metadata = metadataLookup.get(currentTarget);\n                currentTarget = Reflect.getPrototypeOf(currentTarget);\n            }\n            metadata = metadata === void 0 ? [] : metadata.slice(0);\n            metadataLookup.set(target, metadata);\n        }\n        return metadata;\n    };\n}\n","import { DOM } from \"../dom.js\";\n/**\n * Represents styles that can be applied to a custom element.\n * @public\n */\nexport class ElementStyles {\n    constructor() {\n        this.targets = new WeakSet();\n    }\n    /** @internal */\n    addStylesTo(target) {\n        this.targets.add(target);\n    }\n    /** @internal */\n    removeStylesFrom(target) {\n        this.targets.delete(target);\n    }\n    /** @internal */\n    isAttachedTo(target) {\n        return this.targets.has(target);\n    }\n    /**\n     * Associates behaviors with this set of styles.\n     * @param behaviors - The behaviors to associate.\n     */\n    withBehaviors(...behaviors) {\n        this.behaviors =\n            this.behaviors === null ? behaviors : this.behaviors.concat(behaviors);\n        return this;\n    }\n}\n/**\n * Create ElementStyles from ComposableStyles.\n */\nElementStyles.create = (() => {\n    if (DOM.supportsAdoptedStyleSheets) {\n        const styleSheetCache = new Map();\n        return (styles) => \n        // eslint-disable-next-line @typescript-eslint/no-use-before-define\n        new AdoptedStyleSheetsStyles(styles, styleSheetCache);\n    }\n    // eslint-disable-next-line @typescript-eslint/no-use-before-define\n    return (styles) => new StyleElementStyles(styles);\n})();\nfunction reduceStyles(styles) {\n    return styles\n        .map((x) => x instanceof ElementStyles ? reduceStyles(x.styles) : [x])\n        .reduce((prev, curr) => prev.concat(curr), []);\n}\nfunction reduceBehaviors(styles) {\n    return styles\n        .map((x) => (x instanceof ElementStyles ? x.behaviors : null))\n        .reduce((prev, curr) => {\n        if (curr === null) {\n            return prev;\n        }\n        if (prev === null) {\n            prev = [];\n        }\n        return prev.concat(curr);\n    }, null);\n}\nlet addAdoptedStyleSheets = (target, sheets) => {\n    target.adoptedStyleSheets = [...target.adoptedStyleSheets, ...sheets];\n};\nlet removeAdoptedStyleSheets = (target, sheets) => {\n    target.adoptedStyleSheets = target.adoptedStyleSheets.filter((x) => sheets.indexOf(x) === -1);\n};\nif (DOM.supportsAdoptedStyleSheets) {\n    try {\n        // Test if browser implementation uses FrozenArray.\n        // If not, use push / splice to alter the stylesheets\n        // in place. This circumvents a bug in Safari 16.4 where\n        // periodically, assigning the array would previously\n        // cause sheets to be removed.\n        document.adoptedStyleSheets.push();\n        document.adoptedStyleSheets.splice();\n        addAdoptedStyleSheets = (target, sheets) => {\n            target.adoptedStyleSheets.push(...sheets);\n        };\n        removeAdoptedStyleSheets = (target, sheets) => {\n            for (const sheet of sheets) {\n                const index = target.adoptedStyleSheets.indexOf(sheet);\n                if (index !== -1) {\n                    target.adoptedStyleSheets.splice(index, 1);\n                }\n            }\n        };\n    }\n    catch (e) {\n        // Do nothing if an error is thrown, the default\n        // case handles FrozenArray.\n    }\n}\n/**\n * https://wicg.github.io/construct-stylesheets/\n * https://developers.google.com/web/updates/2019/02/constructable-stylesheets\n *\n * @internal\n */\nexport class AdoptedStyleSheetsStyles extends ElementStyles {\n    constructor(styles, styleSheetCache) {\n        super();\n        this.styles = styles;\n        this.styleSheetCache = styleSheetCache;\n        this._styleSheets = void 0;\n        this.behaviors = reduceBehaviors(styles);\n    }\n    get styleSheets() {\n        if (this._styleSheets === void 0) {\n            const styles = this.styles;\n            const styleSheetCache = this.styleSheetCache;\n            this._styleSheets = reduceStyles(styles).map((x) => {\n                if (x instanceof CSSStyleSheet) {\n                    return x;\n                }\n                let sheet = styleSheetCache.get(x);\n                if (sheet === void 0) {\n                    sheet = new CSSStyleSheet();\n                    sheet.replaceSync(x);\n                    styleSheetCache.set(x, sheet);\n                }\n                return sheet;\n            });\n        }\n        return this._styleSheets;\n    }\n    addStylesTo(target) {\n        addAdoptedStyleSheets(target, this.styleSheets);\n        super.addStylesTo(target);\n    }\n    removeStylesFrom(target) {\n        removeAdoptedStyleSheets(target, this.styleSheets);\n        super.removeStylesFrom(target);\n    }\n}\nlet styleClassId = 0;\nfunction getNextStyleClass() {\n    return `fast-style-class-${++styleClassId}`;\n}\n/**\n * @internal\n */\nexport class StyleElementStyles extends ElementStyles {\n    constructor(styles) {\n        super();\n        this.styles = styles;\n        this.behaviors = null;\n        this.behaviors = reduceBehaviors(styles);\n        this.styleSheets = reduceStyles(styles);\n        this.styleClass = getNextStyleClass();\n    }\n    addStylesTo(target) {\n        const styleSheets = this.styleSheets;\n        const styleClass = this.styleClass;\n        target = this.normalizeTarget(target);\n        for (let i = 0; i < styleSheets.length; i++) {\n            const element = document.createElement(\"style\");\n            element.innerHTML = styleSheets[i];\n            element.className = styleClass;\n            target.append(element);\n        }\n        super.addStylesTo(target);\n    }\n    removeStylesFrom(target) {\n        target = this.normalizeTarget(target);\n        const styles = target.querySelectorAll(`.${this.styleClass}`);\n        for (let i = 0, ii = styles.length; i < ii; ++i) {\n            target.removeChild(styles[i]);\n        }\n        super.removeStylesFrom(target);\n    }\n    isAttachedTo(target) {\n        return super.isAttachedTo(this.normalizeTarget(target));\n    }\n    normalizeTarget(target) {\n        return target === document ? document.body : target;\n    }\n}\n","import { CSSDirective } from \"./css-directive.js\";\nimport { ElementStyles } from \"./element-styles.js\";\nfunction collectStyles(strings, values) {\n    const styles = [];\n    let cssString = \"\";\n    const behaviors = [];\n    for (let i = 0, ii = strings.length - 1; i < ii; ++i) {\n        cssString += strings[i];\n        let value = values[i];\n        if (value instanceof CSSDirective) {\n            const behavior = value.createBehavior();\n            value = value.createCSS();\n            if (behavior) {\n                behaviors.push(behavior);\n            }\n        }\n        if (value instanceof ElementStyles || value instanceof CSSStyleSheet) {\n            if (cssString.trim() !== \"\") {\n                styles.push(cssString);\n                cssString = \"\";\n            }\n            styles.push(value);\n        }\n        else {\n            cssString += value;\n        }\n    }\n    cssString += strings[strings.length - 1];\n    if (cssString.trim() !== \"\") {\n        styles.push(cssString);\n    }\n    return {\n        styles,\n        behaviors,\n    };\n}\n/**\n * Transforms a template literal string into styles.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @remarks\n * The css helper supports interpolation of strings and ElementStyle instances.\n * @public\n */\nexport function css(strings, ...values) {\n    const { styles, behaviors } = collectStyles(strings, values);\n    const elementStyles = ElementStyles.create(styles);\n    if (behaviors.length) {\n        elementStyles.withBehaviors(...behaviors);\n    }\n    return elementStyles;\n}\nclass CSSPartial extends CSSDirective {\n    constructor(styles, behaviors) {\n        super();\n        this.behaviors = behaviors;\n        this.css = \"\";\n        const stylesheets = styles.reduce((accumulated, current) => {\n            if (typeof current === \"string\") {\n                this.css += current;\n            }\n            else {\n                accumulated.push(current);\n            }\n            return accumulated;\n        }, []);\n        if (stylesheets.length) {\n            this.styles = ElementStyles.create(stylesheets);\n        }\n    }\n    createBehavior() {\n        return this;\n    }\n    createCSS() {\n        return this.css;\n    }\n    bind(el) {\n        if (this.styles) {\n            el.$fastController.addStyles(this.styles);\n        }\n        if (this.behaviors.length) {\n            el.$fastController.addBehaviors(this.behaviors);\n        }\n    }\n    unbind(el) {\n        if (this.styles) {\n            el.$fastController.removeStyles(this.styles);\n        }\n        if (this.behaviors.length) {\n            el.$fastController.removeBehaviors(this.behaviors);\n        }\n    }\n}\n/**\n * Transforms a template literal string into partial CSS.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @public\n */\nexport function cssPartial(strings, ...values) {\n    const { styles, behaviors } = collectStyles(strings, values);\n    return new CSSPartial(styles, behaviors);\n}\n","import { AttachedBehaviorHTMLDirective } from \"./html-directive.js\";\n/**\n * The runtime behavior for template references.\n * @public\n */\nexport class RefBehavior {\n    /**\n     * Creates an instance of RefBehavior.\n     * @param target - The element to reference.\n     * @param propertyName - The name of the property to assign the reference to.\n     */\n    constructor(target, propertyName) {\n        this.target = target;\n        this.propertyName = propertyName;\n    }\n    /**\n     * Bind this behavior to the source.\n     * @param source - The source to bind to.\n     * @param context - The execution context that the binding is operating within.\n     */\n    bind(source) {\n        source[this.propertyName] = this.target;\n    }\n    /**\n     * Unbinds this behavior from the source.\n     * @param source - The source to unbind from.\n     */\n    /* eslint-disable-next-line @typescript-eslint/no-empty-function */\n    unbind() { }\n}\n/**\n * A directive that observes the updates a property with a reference to the element.\n * @param propertyName - The name of the property to assign the reference to.\n * @public\n */\nexport function ref(propertyName) {\n    return new AttachedBehaviorHTMLDirective(\"fast-ref\", RefBehavior, propertyName);\n}\n","import { DesignSystem } from \"@microsoft/fast-foundation\";\n/**\n * Provides a design system for the specified element either by returning one that was\n * already created for that element or creating one.\n * @param element - The element to root the design system at. By default, this is the body.\n * @returns A FAST Design System\n * @public\n */\nexport function provideFASTDesignSystem(element) {\n    return DesignSystem.getOrCreate(element).withPrefix(\"fast\");\n}\n","/**\n * Define system colors for use in CSS stylesheets.\n *\n * https://drafts.csswg.org/css-color/#css-system-colors\n */\nexport var SystemColors;\n(function (SystemColors) {\n    SystemColors[\"Canvas\"] = \"Canvas\";\n    SystemColors[\"CanvasText\"] = \"CanvasText\";\n    SystemColors[\"LinkText\"] = \"LinkText\";\n    SystemColors[\"VisitedText\"] = \"VisitedText\";\n    SystemColors[\"ActiveText\"] = \"ActiveText\";\n    SystemColors[\"ButtonFace\"] = \"ButtonFace\";\n    SystemColors[\"ButtonText\"] = \"ButtonText\";\n    SystemColors[\"Field\"] = \"Field\";\n    SystemColors[\"FieldText\"] = \"FieldText\";\n    SystemColors[\"Highlight\"] = \"Highlight\";\n    SystemColors[\"HighlightText\"] = \"HighlightText\";\n    SystemColors[\"GrayText\"] = \"GrayText\";\n})(SystemColors || (SystemColors = {}));\n","/**\n * Expose ltr and rtl strings\n */\nexport var Direction;\n(function (Direction) {\n    Direction[\"ltr\"] = \"ltr\";\n    Direction[\"rtl\"] = \"rtl\";\n})(Direction || (Direction = {}));\n","/**\n * @internal\n */\nexport function contrast(a, b) {\n    const L1 = a.relativeLuminance > b.relativeLuminance ? a : b;\n    const L2 = a.relativeLuminance > b.relativeLuminance ? b : a;\n    return (L1.relativeLuminance + 0.05) / (L2.relativeLuminance + 0.05);\n}\n","import { ColorRGBA64, rgbToRelativeLuminance } from \"@microsoft/fast-colors\";\nimport { contrast } from \"./utilities/relative-luminance.js\";\n/** @public */\nexport const SwatchRGB = Object.freeze({\n    create(r, g, b) {\n        return new SwatchRGBImpl(r, g, b);\n    },\n    from(obj) {\n        return new SwatchRGBImpl(obj.r, obj.g, obj.b);\n    },\n});\n/**\n * Runtime test for an objects conformance with the SwatchRGB interface.\n * @internal\n */\nexport function isSwatchRGB(value) {\n    const test = {\n        r: 0,\n        g: 0,\n        b: 0,\n        toColorString: () => \"\",\n        contrast: () => 0,\n        relativeLuminance: 0,\n    };\n    for (const key in test) {\n        if (typeof test[key] !== typeof value[key]) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * A RGB implementation of {@link Swatch}\n * @internal\n */\nclass SwatchRGBImpl extends ColorRGBA64 {\n    /**\n     *\n     * @param red - Red channel expressed as a number between 0 and 1\n     * @param green - Green channel expressed as a number between 0 and 1\n     * @param blue - Blue channel expressed as a number between 0 and 1\n     */\n    constructor(red, green, blue) {\n        super(red, green, blue, 1);\n        this.toColorString = this.toStringHexRGB;\n        this.contrast = contrast.bind(null, this);\n        this.createCSS = this.toColorString;\n        this.relativeLuminance = rgbToRelativeLuminance(this);\n    }\n    static fromObject(obj) {\n        return new SwatchRGBImpl(obj.r, obj.g, obj.b);\n    }\n}\n","/*\n * A color is in \"dark\" if there is more contrast between #000000 and a reference\n * color than #FFFFFF and the reference color. That threshold can be expressed as a relative luminance\n * using the contrast formula as (1 + 0.5) / (R + 0.05) === (R + 0.05) / (0 + 0.05),\n * which reduces to the following, where 'R' is the relative luminance of the reference color\n */\nconst target = (-0.1 + Math.sqrt(0.21)) / 2;\n/**\n * Determines if a color should be considered Dark Mode\n * @param color - The color to check to mode of\n * @returns boolean\n *\n * @public\n */\nexport function isDark(color) {\n    return color.relativeLuminance <= target;\n}\n","import { isDark } from \"./is-dark.js\";\n/**\n * @internal\n */\nexport function directionByIsDark(color) {\n    return isDark(color) ? -1 : 1;\n}\n","import { clamp, ColorRGBA64, ComponentStateColorPalette, parseColorHexRGB, } from \"@microsoft/fast-colors\";\nimport { isSwatchRGB, SwatchRGB } from \"./swatch.js\";\nimport { binarySearch } from \"./utilities/binary-search.js\";\nimport { directionByIsDark } from \"./utilities/direction-by-is-dark.js\";\nimport { contrast } from \"./utilities/relative-luminance.js\";\nfunction create(rOrSource, g, b) {\n    if (typeof rOrSource === \"number\") {\n        /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n        return PaletteRGB.from(SwatchRGB.create(rOrSource, g, b));\n    }\n    else {\n        return PaletteRGB.from(rOrSource);\n    }\n}\nfunction from(source) {\n    return isSwatchRGB(source)\n        ? PaletteRGBImpl.from(source)\n        : PaletteRGBImpl.from(SwatchRGB.create(source.r, source.g, source.b));\n}\n/** @public */\nexport const PaletteRGB = Object.freeze({\n    create,\n    from,\n});\n/**\n * A {@link Palette} representing RGB swatch values.\n * @public\n */\nclass PaletteRGBImpl {\n    /**\n     *\n     * @param source - The source color for the palette\n     * @param swatches - All swatches in the palette\n     */\n    constructor(source, swatches) {\n        this.closestIndexCache = new Map();\n        this.source = source;\n        this.swatches = swatches;\n        this.reversedSwatches = Object.freeze([...this.swatches].reverse());\n        this.lastIndex = this.swatches.length - 1;\n    }\n    /**\n     * {@inheritdoc Palette.colorContrast}\n     */\n    colorContrast(reference, contrastTarget, initialSearchIndex, direction) {\n        if (initialSearchIndex === undefined) {\n            initialSearchIndex = this.closestIndexOf(reference);\n        }\n        let source = this.swatches;\n        const endSearchIndex = this.lastIndex;\n        let startSearchIndex = initialSearchIndex;\n        if (direction === undefined) {\n            direction = directionByIsDark(reference);\n        }\n        const condition = (value) => contrast(reference, value) >= contrastTarget;\n        if (direction === -1) {\n            source = this.reversedSwatches;\n            startSearchIndex = endSearchIndex - startSearchIndex;\n        }\n        return binarySearch(source, condition, startSearchIndex, endSearchIndex);\n    }\n    /**\n     * {@inheritdoc Palette.get}\n     */\n    get(index) {\n        return this.swatches[index] || this.swatches[clamp(index, 0, this.lastIndex)];\n    }\n    /**\n     * {@inheritdoc Palette.closestIndexOf}\n     */\n    closestIndexOf(reference) {\n        if (this.closestIndexCache.has(reference.relativeLuminance)) {\n            /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n            return this.closestIndexCache.get(reference.relativeLuminance);\n        }\n        let index = this.swatches.indexOf(reference);\n        if (index !== -1) {\n            this.closestIndexCache.set(reference.relativeLuminance, index);\n            return index;\n        }\n        const closest = this.swatches.reduce((previous, next) => Math.abs(next.relativeLuminance - reference.relativeLuminance) <\n            Math.abs(previous.relativeLuminance - reference.relativeLuminance)\n            ? next\n            : previous);\n        index = this.swatches.indexOf(closest);\n        this.closestIndexCache.set(reference.relativeLuminance, index);\n        return index;\n    }\n    /**\n     * Create a color palette from a provided swatch\n     * @param source - The source swatch to create a palette from\n     * @returns\n     */\n    static from(source) {\n        return new PaletteRGBImpl(source, Object.freeze(new ComponentStateColorPalette({\n            /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n            baseColor: ColorRGBA64.fromObject(source),\n        }).palette.map(x => {\n            /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n            const _x = parseColorHexRGB(x.toStringHexRGB());\n            return SwatchRGB.create(_x.r, _x.g, _x.b);\n        })));\n    }\n}\n","/**\n * @internal\n */\nexport function binarySearch(valuesToSearch, searchCondition, startIndex = 0, endIndex = valuesToSearch.length - 1) {\n    if (endIndex === startIndex) {\n        return valuesToSearch[startIndex];\n    }\n    const middleIndex = Math.floor((endIndex - startIndex) / 2) + startIndex;\n    // Check to see if this passes on the item in the center of the array\n    // if it does check the previous values\n    return searchCondition(valuesToSearch[middleIndex])\n        ? binarySearch(valuesToSearch, searchCondition, startIndex, middleIndex // include this index because it passed the search condition\n        )\n        : binarySearch(valuesToSearch, searchCondition, middleIndex + 1, // exclude this index because it failed the search condition\n        endIndex);\n}\n","import { parseColorHexRGB } from \"@microsoft/fast-colors\";\nimport { SwatchRGB } from \"../swatch.js\";\n/**\n * @internal\n */\nexport const white = SwatchRGB.create(1, 1, 1);\n/**\n * @internal\n */\nexport const black = SwatchRGB.create(0, 0, 0);\n/**\n * @internal\n */\n/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\nexport const middleGrey = SwatchRGB.from(parseColorHexRGB(\"#808080\"));\n/**\n * @internal\n */\n/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\nexport const accentBase = SwatchRGB.from(parseColorHexRGB(\"#DA1A5F\"));\n","import { SwatchRGB } from \"../swatch.js\";\nexport function baseLayerLuminanceSwatch(luminance) {\n    return SwatchRGB.create(luminance, luminance, luminance);\n}\n/**\n * Recommended values for light and dark mode for {@link @microsoft/fast-components#baseLayerLuminance}.\n *\n * @public\n */\nexport const StandardLuminance = {\n    LightMode: 1,\n    DarkMode: 0.23,\n};\n","import { baseLayerLuminanceSwatch } from \"../utilities/base-layer-luminance.js\";\n/**\n * @internal\n */\nexport function neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {\n    return Math.max(palette.closestIndexOf(baseLayerLuminanceSwatch(luminance)) + layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta);\n}\n/**\n * @internal\n */\nexport function neutralLayer2(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {\n    return palette.get(neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta));\n}\n","import { DesignToken } from \"@microsoft/fast-foundation\";\nimport { Direction } from \"@microsoft/fast-web-utilities\";\nimport { PaletteRGB } from \"./color/palette.js\";\nimport { accentFill as accentFillAlgorithm } from \"./color/recipes/accent-fill.js\";\nimport { accentForeground as accentForegroundAlgorithm } from \"./color/recipes/accent-foreground.js\";\nimport { foregroundOnAccent as foregroundOnAccentAlgorithm } from \"./color/recipes/foreground-on-accent.js\";\nimport { neutralFill as neutralFillAlgorithm } from \"./color/recipes/neutral-fill.js\";\nimport { neutralFillInput as neutralFillInputAlgorithm } from \"./color/recipes/neutral-fill-input.js\";\nimport { neutralFillLayer as neutralFillLayerAlgorithm } from \"./color/recipes/neutral-fill-layer.js\";\nimport { neutralFillStealth as neutralFillStealthAlgorithm } from \"./color/recipes/neutral-fill-stealth.js\";\nimport { neutralFillContrast as neutralFillContrastAlgorithm } from \"./color/recipes/neutral-fill-contrast.js\";\nimport { focusStrokeInner as focusStrokeInnerAlgorithm, focusStrokeOuter as focusStrokeOuterAlgorithm, } from \"./color/recipes/focus-stroke.js\";\nimport { neutralForeground as neutralForegroundAlgorithm } from \"./color/recipes/neutral-foreground.js\";\nimport { neutralForegroundHint as neutralForegroundHintAlgorithm } from \"./color/recipes/neutral-foreground-hint.js\";\nimport { neutralLayerCardContainer as neutralLayerCardContainerAlgorithm } from \"./color/recipes/neutral-layer-card-container.js\";\nimport { neutralLayerFloating as neutralLayerFloatingAlgorithm } from \"./color/recipes/neutral-layer-floating.js\";\nimport { neutralLayer1 as neutralLayer1Algorithm } from \"./color/recipes/neutral-layer-1.js\";\nimport { neutralLayer2 as neutralLayer2Algorithm } from \"./color/recipes/neutral-layer-2.js\";\nimport { neutralLayer3 as neutralLayer3Algorithm } from \"./color/recipes/neutral-layer-3.js\";\nimport { neutralLayer4 as neutralLayer4Algorithm } from \"./color/recipes/neutral-layer-4.js\";\nimport { neutralStroke as neutralStrokeAlgorithm } from \"./color/recipes/neutral-stroke.js\";\nimport { neutralStrokeDivider as neutralStrokeDividerAlgorithm } from \"./color/recipes/neutral-stroke-divider.js\";\nimport { StandardLuminance } from \"./color/utilities/base-layer-luminance.js\";\nimport { accentBase, middleGrey } from \"./color/utilities/color-constants.js\";\nconst { create } = DesignToken;\nfunction createNonCss(name) {\n    return DesignToken.create({ name, cssCustomPropertyName: null });\n}\n// General tokens\n/** @public */\nexport const bodyFont = create(\"body-font\").withDefault('aktiv-grotesk, \"Segoe UI\", Arial, Helvetica, sans-serif');\n/** @public */\nexport const baseHeightMultiplier = create(\"base-height-multiplier\").withDefault(10);\n/** @public */\nexport const baseHorizontalSpacingMultiplier = create(\"base-horizontal-spacing-multiplier\").withDefault(3);\n/** @public */\nexport const baseLayerLuminance = create(\"base-layer-luminance\").withDefault(StandardLuminance.DarkMode);\n/** @public */\nexport const controlCornerRadius = create(\"control-corner-radius\").withDefault(4);\n/** @public */\nexport const density = create(\"density\").withDefault(0);\n/** @public */\nexport const designUnit = create(\"design-unit\").withDefault(4);\n/** @public */\nexport const direction = create(\"direction\").withDefault(Direction.ltr);\n/** @public */\nexport const disabledOpacity = create(\"disabled-opacity\").withDefault(0.3);\n/** @public */\nexport const strokeWidth = create(\"stroke-width\").withDefault(1);\n/** @public */\nexport const focusStrokeWidth = create(\"focus-stroke-width\").withDefault(2);\n// Typography values\n/** @public */\nexport const typeRampBaseFontSize = create(\"type-ramp-base-font-size\").withDefault(\"14px\");\n/** @public */\nexport const typeRampBaseLineHeight = create(\"type-ramp-base-line-height\").withDefault(\"20px\");\n/** @public */\nexport const typeRampMinus1FontSize = create(\"type-ramp-minus-1-font-size\").withDefault(\"12px\");\n/** @public */\nexport const typeRampMinus1LineHeight = create(\"type-ramp-minus-1-line-height\").withDefault(\"16px\");\n/** @public */\nexport const typeRampMinus2FontSize = create(\"type-ramp-minus-2-font-size\").withDefault(\"10px\");\n/** @public */\nexport const typeRampMinus2LineHeight = create(\"type-ramp-minus-2-line-height\").withDefault(\"16px\");\n/** @public */\nexport const typeRampPlus1FontSize = create(\"type-ramp-plus-1-font-size\").withDefault(\"16px\");\n/** @public */\nexport const typeRampPlus1LineHeight = create(\"type-ramp-plus-1-line-height\").withDefault(\"24px\");\n/** @public */\nexport const typeRampPlus2FontSize = create(\"type-ramp-plus-2-font-size\").withDefault(\"20px\");\n/** @public */\nexport const typeRampPlus2LineHeight = create(\"type-ramp-plus-2-line-height\").withDefault(\"28px\");\n/** @public */\nexport const typeRampPlus3FontSize = create(\"type-ramp-plus-3-font-size\").withDefault(\"28px\");\n/** @public */\nexport const typeRampPlus3LineHeight = create(\"type-ramp-plus-3-line-height\").withDefault(\"36px\");\n/** @public */\nexport const typeRampPlus4FontSize = create(\"type-ramp-plus-4-font-size\").withDefault(\"34px\");\n/** @public */\nexport const typeRampPlus4LineHeight = create(\"type-ramp-plus-4-line-height\").withDefault(\"44px\");\n/** @public */\nexport const typeRampPlus5FontSize = create(\"type-ramp-plus-5-font-size\").withDefault(\"46px\");\n/** @public */\nexport const typeRampPlus5LineHeight = create(\"type-ramp-plus-5-line-height\").withDefault(\"56px\");\n/** @public */\nexport const typeRampPlus6FontSize = create(\"type-ramp-plus-6-font-size\").withDefault(\"60px\");\n/** @public */\nexport const typeRampPlus6LineHeight = create(\"type-ramp-plus-6-line-height\").withDefault(\"72px\");\n// Color recipe values\n/** @public */\nexport const accentFillRestDelta = createNonCss(\"accent-fill-rest-delta\").withDefault(0);\n/** @public */\nexport const accentFillHoverDelta = createNonCss(\"accent-fill-hover-delta\").withDefault(4);\n/** @public */\nexport const accentFillActiveDelta = createNonCss(\"accent-fill-active-delta\").withDefault(-5);\n/** @public */\nexport const accentFillFocusDelta = createNonCss(\"accent-fill-focus-delta\").withDefault(0);\n/** @public */\nexport const accentForegroundRestDelta = createNonCss(\"accent-foreground-rest-delta\").withDefault(0);\n/** @public */\nexport const accentForegroundHoverDelta = createNonCss(\"accent-foreground-hover-delta\").withDefault(6);\n/** @public */\nexport const accentForegroundActiveDelta = createNonCss(\"accent-foreground-active-delta\").withDefault(-4);\n/** @public */\nexport const accentForegroundFocusDelta = createNonCss(\"accent-foreground-focus-delta\").withDefault(0);\n/** @public */\nexport const neutralFillRestDelta = createNonCss(\"neutral-fill-rest-delta\").withDefault(7);\n/** @public */\nexport const neutralFillHoverDelta = createNonCss(\"neutral-fill-hover-delta\").withDefault(10);\n/** @public */\nexport const neutralFillActiveDelta = createNonCss(\"neutral-fill-active-delta\").withDefault(5);\n/** @public */\nexport const neutralFillFocusDelta = createNonCss(\"neutral-fill-focus-delta\").withDefault(0);\n/** @public */\nexport const neutralFillInputRestDelta = createNonCss(\"neutral-fill-input-rest-delta\").withDefault(0);\n/** @public */\nexport const neutralFillInputHoverDelta = createNonCss(\"neutral-fill-input-hover-delta\").withDefault(0);\n/** @public */\nexport const neutralFillInputActiveDelta = createNonCss(\"neutral-fill-input-active-delta\").withDefault(0);\n/** @public */\nexport const neutralFillInputFocusDelta = createNonCss(\"neutral-fill-input-focus-delta\").withDefault(0);\n/** @public */\nexport const neutralFillStealthRestDelta = createNonCss(\"neutral-fill-stealth-rest-delta\").withDefault(0);\n/** @public */\nexport const neutralFillStealthHoverDelta = createNonCss(\"neutral-fill-stealth-hover-delta\").withDefault(5);\n/** @public */\nexport const neutralFillStealthActiveDelta = createNonCss(\"neutral-fill-stealth-active-delta\").withDefault(3);\n/** @public */\nexport const neutralFillStealthFocusDelta = createNonCss(\"neutral-fill-stealth-focus-delta\").withDefault(0);\n/** @public */\nexport const neutralFillStrongRestDelta = createNonCss(\"neutral-fill-strong-rest-delta\").withDefault(0);\n/** @public */\nexport const neutralFillStrongHoverDelta = createNonCss(\"neutral-fill-strong-hover-delta\").withDefault(8);\n/** @public */\nexport const neutralFillStrongActiveDelta = createNonCss(\"neutral-fill-strong-active-delta\").withDefault(-5);\n/** @public */\nexport const neutralFillStrongFocusDelta = createNonCss(\"neutral-fill-strong-focus-delta\").withDefault(0);\n/** @public */\nexport const neutralFillLayerRestDelta = createNonCss(\"neutral-fill-layer-rest-delta\").withDefault(3);\n/** @public */\nexport const neutralStrokeRestDelta = createNonCss(\"neutral-stroke-rest-delta\").withDefault(25);\n/** @public */\nexport const neutralStrokeHoverDelta = createNonCss(\"neutral-stroke-hover-delta\").withDefault(40);\n/** @public */\nexport const neutralStrokeActiveDelta = createNonCss(\"neutral-stroke-active-delta\").withDefault(16);\n/** @public */\nexport const neutralStrokeFocusDelta = createNonCss(\"neutral-stroke-focus-delta\").withDefault(25);\n/** @public */\nexport const neutralStrokeDividerRestDelta = createNonCss(\"neutral-stroke-divider-rest-delta\").withDefault(8);\n// Color recipes\n/** @public */\nexport const neutralColor = create(\"neutral-color\").withDefault(middleGrey);\n/** @public */\nexport const neutralPalette = createNonCss(\"neutral-palette\").withDefault((element) => PaletteRGB.from(neutralColor.getValueFor(element)));\n/** @public */\nexport const accentColor = create(\"accent-color\").withDefault(accentBase);\n/** @public */\nexport const accentPalette = createNonCss(\"accent-palette\").withDefault((element) => PaletteRGB.from(accentColor.getValueFor(element)));\n// Neutral Layer Card Container\n/** @public */\nexport const neutralLayerCardContainerRecipe = createNonCss(\"neutral-layer-card-container-recipe\").withDefault({\n    evaluate: (element) => neutralLayerCardContainerAlgorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element)),\n});\n/** @public */\nexport const neutralLayerCardContainer = create(\"neutral-layer-card-container\").withDefault((element) => neutralLayerCardContainerRecipe.getValueFor(element).evaluate(element));\n// Neutral Layer Floating\n/** @public */\nexport const neutralLayerFloatingRecipe = createNonCss(\"neutral-layer-floating-recipe\").withDefault({\n    evaluate: (element) => neutralLayerFloatingAlgorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element)),\n});\n/** @public */\nexport const neutralLayerFloating = create(\"neutral-layer-floating\").withDefault((element) => neutralLayerFloatingRecipe.getValueFor(element).evaluate(element));\n// Neutral Layer 1\n/** @public */\nexport const neutralLayer1Recipe = createNonCss(\"neutral-layer-1-recipe\").withDefault({\n    evaluate: (element) => neutralLayer1Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element)),\n});\n/** @public */\nexport const neutralLayer1 = create(\"neutral-layer-1\").withDefault((element) => neutralLayer1Recipe.getValueFor(element).evaluate(element));\n// Neutral Layer 2\n/** @public */\nexport const neutralLayer2Recipe = createNonCss(\"neutral-layer-2-recipe\").withDefault({\n    evaluate: (element) => neutralLayer2Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element)),\n});\n/** @public */\nexport const neutralLayer2 = create(\"neutral-layer-2\").withDefault((element) => neutralLayer2Recipe.getValueFor(element).evaluate(element));\n// Neutral Layer 3\n/** @public */\nexport const neutralLayer3Recipe = createNonCss(\"neutral-layer-3-recipe\").withDefault({\n    evaluate: (element) => neutralLayer3Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element)),\n});\n/** @public */\nexport const neutralLayer3 = create(\"neutral-layer-3\").withDefault((element) => neutralLayer3Recipe.getValueFor(element).evaluate(element));\n// Neutral Layer 4\n/** @public */\nexport const neutralLayer4Recipe = createNonCss(\"neutral-layer-4-recipe\").withDefault({\n    evaluate: (element) => neutralLayer4Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element)),\n});\n/** @public */\nexport const neutralLayer4 = create(\"neutral-layer-4\").withDefault((element) => neutralLayer4Recipe.getValueFor(element).evaluate(element));\n/** @public */\nexport const fillColor = create(\"fill-color\").withDefault(element => neutralLayer1.getValueFor(element));\nvar ContrastTarget;\n(function (ContrastTarget) {\n    ContrastTarget[ContrastTarget[\"normal\"] = 4.5] = \"normal\";\n    ContrastTarget[ContrastTarget[\"large\"] = 7] = \"large\";\n})(ContrastTarget || (ContrastTarget = {}));\n// Accent Fill\n/** @public */\nexport const accentFillRecipe = create({\n    name: \"accent-fill-recipe\",\n    cssCustomPropertyName: null,\n}).withDefault({\n    evaluate: (element, reference) => accentFillAlgorithm(accentPalette.getValueFor(element), neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), accentFillHoverDelta.getValueFor(element), accentFillActiveDelta.getValueFor(element), accentFillFocusDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element)),\n});\n/** @public */\nexport const accentFillRest = create(\"accent-fill-rest\").withDefault((element) => {\n    return accentFillRecipe.getValueFor(element).evaluate(element).rest;\n});\n/** @public */\nexport const accentFillHover = create(\"accent-fill-hover\").withDefault((element) => {\n    return accentFillRecipe.getValueFor(element).evaluate(element).hover;\n});\n/** @public */\nexport const accentFillActive = create(\"accent-fill-active\").withDefault((element) => {\n    return accentFillRecipe.getValueFor(element).evaluate(element).active;\n});\n/** @public */\nexport const accentFillFocus = create(\"accent-fill-focus\").withDefault((element) => {\n    return accentFillRecipe.getValueFor(element).evaluate(element).focus;\n});\n// Foreground On Accent\nconst foregroundOnAccentByContrast = (contrast) => (element, reference) => {\n    return foregroundOnAccentAlgorithm(reference || accentFillRest.getValueFor(element), contrast);\n};\n/** @public */\nexport const foregroundOnAccentRecipe = createNonCss(\"foreground-on-accent-recipe\").withDefault({\n    evaluate: (element, reference) => foregroundOnAccentByContrast(ContrastTarget.normal)(element, reference),\n});\n/** @public */\nexport const foregroundOnAccentRest = create(\"foreground-on-accent-rest\").withDefault((element) => foregroundOnAccentRecipe\n    .getValueFor(element)\n    .evaluate(element, accentFillRest.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentHover = create(\"foreground-on-accent-hover\").withDefault((element) => foregroundOnAccentRecipe\n    .getValueFor(element)\n    .evaluate(element, accentFillHover.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentActive = create(\"foreground-on-accent-active\").withDefault((element) => foregroundOnAccentRecipe\n    .getValueFor(element)\n    .evaluate(element, accentFillActive.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentFocus = create(\"foreground-on-accent-focus\").withDefault((element) => foregroundOnAccentRecipe\n    .getValueFor(element)\n    .evaluate(element, accentFillFocus.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentLargeRecipe = createNonCss(\"foreground-on-accent-large-recipe\").withDefault({\n    evaluate: (element, reference) => foregroundOnAccentByContrast(ContrastTarget.large)(element, reference),\n});\n/** @public */\nexport const foregroundOnAccentRestLarge = create(\"foreground-on-accent-rest-large\").withDefault((element) => foregroundOnAccentLargeRecipe\n    .getValueFor(element)\n    .evaluate(element, accentFillRest.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentHoverLarge = create(\"foreground-on-accent-hover-large\").withDefault((element) => foregroundOnAccentLargeRecipe\n    .getValueFor(element)\n    .evaluate(element, accentFillHover.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentActiveLarge = create(\"foreground-on-accent-active-large\").withDefault((element) => foregroundOnAccentLargeRecipe\n    .getValueFor(element)\n    .evaluate(element, accentFillActive.getValueFor(element)));\n/** @public */\nexport const foregroundOnAccentFocusLarge = create(\"foreground-on-accent-focus-large\").withDefault((element) => foregroundOnAccentLargeRecipe\n    .getValueFor(element)\n    .evaluate(element, accentFillFocus.getValueFor(element)));\n// Accent Foreground\nconst accentForegroundByContrast = (contrast) => (element, reference) => accentForegroundAlgorithm(accentPalette.getValueFor(element), reference || fillColor.getValueFor(element), contrast, accentForegroundRestDelta.getValueFor(element), accentForegroundHoverDelta.getValueFor(element), accentForegroundActiveDelta.getValueFor(element), accentForegroundFocusDelta.getValueFor(element));\n/** @public */\nexport const accentForegroundRecipe = create({\n    name: \"accent-foreground-recipe\",\n    cssCustomPropertyName: null,\n}).withDefault({\n    evaluate: (element, reference) => accentForegroundByContrast(ContrastTarget.normal)(element, reference),\n});\n/** @public */\nexport const accentForegroundRest = create(\"accent-foreground-rest\").withDefault((element) => accentForegroundRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const accentForegroundHover = create(\"accent-foreground-hover\").withDefault((element) => accentForegroundRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const accentForegroundActive = create(\"accent-foreground-active\").withDefault((element) => accentForegroundRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const accentForegroundFocus = create(\"accent-foreground-focus\").withDefault((element) => accentForegroundRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill\n/** @public */\nexport const neutralFillRecipe = create({\n    name: \"neutral-fill-recipe\",\n    cssCustomPropertyName: null,\n}).withDefault({\n    evaluate: (element, reference) => neutralFillAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element), neutralFillFocusDelta.getValueFor(element)),\n});\n/** @public */\nexport const neutralFillRest = create(\"neutral-fill-rest\").withDefault((element) => neutralFillRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralFillHover = create(\"neutral-fill-hover\").withDefault((element) => neutralFillRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralFillActive = create(\"neutral-fill-active\").withDefault((element) => neutralFillRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralFillFocus = create(\"neutral-fill-focus\").withDefault((element) => neutralFillRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Input\n/** @public */\nexport const neutralFillInputRecipe = create({\n    name: \"neutral-fill-input-recipe\",\n    cssCustomPropertyName: null,\n}).withDefault({\n    evaluate: (element, reference) => neutralFillInputAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillInputRestDelta.getValueFor(element), neutralFillInputHoverDelta.getValueFor(element), neutralFillInputActiveDelta.getValueFor(element), neutralFillInputFocusDelta.getValueFor(element)),\n});\n/** @public */\nexport const neutralFillInputRest = create(\"neutral-fill-input-rest\").withDefault((element) => neutralFillInputRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralFillInputHover = create(\"neutral-fill-input-hover\").withDefault((element) => neutralFillInputRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralFillInputActive = create(\"neutral-fill-input-active\").withDefault((element) => neutralFillInputRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralFillInputFocus = create(\"neutral-fill-input-focus\").withDefault((element) => neutralFillInputRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Stealth\n/** @public */\nexport const neutralFillStealthRecipe = create({\n    name: \"neutral-fill-stealth-recipe\",\n    cssCustomPropertyName: null,\n}).withDefault({\n    evaluate: (element, reference) => neutralFillStealthAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillStealthRestDelta.getValueFor(element), neutralFillStealthHoverDelta.getValueFor(element), neutralFillStealthActiveDelta.getValueFor(element), neutralFillStealthFocusDelta.getValueFor(element), neutralFillRestDelta.getValueFor(element), neutralFillHoverDelta.getValueFor(element), neutralFillActiveDelta.getValueFor(element), neutralFillFocusDelta.getValueFor(element)),\n});\n/** @public */\nexport const neutralFillStealthRest = create(\"neutral-fill-stealth-rest\").withDefault((element) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralFillStealthHover = create(\"neutral-fill-stealth-hover\").withDefault((element) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralFillStealthActive = create(\"neutral-fill-stealth-active\").withDefault((element) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralFillStealthFocus = create(\"neutral-fill-stealth-focus\").withDefault((element) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Strong\n/** @public */\nexport const neutralFillStrongRecipe = create({\n    name: \"neutral-fill-strong-recipe\",\n    cssCustomPropertyName: null,\n}).withDefault({\n    evaluate: (element, reference) => neutralFillContrastAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillStrongRestDelta.getValueFor(element), neutralFillStrongHoverDelta.getValueFor(element), neutralFillStrongActiveDelta.getValueFor(element), neutralFillStrongFocusDelta.getValueFor(element)),\n});\n/** @public */\nexport const neutralFillStrongRest = create(\"neutral-fill-strong-rest\").withDefault((element) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralFillStrongHover = create(\"neutral-fill-strong-hover\").withDefault((element) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralFillStrongActive = create(\"neutral-fill-strong-active\").withDefault((element) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralFillStrongFocus = create(\"neutral-fill-strong-focus\").withDefault((element) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Fill Layer\n/** @public */\nexport const neutralFillLayerRecipe = createNonCss(\"neutral-fill-layer-recipe\").withDefault({\n    evaluate: (element, reference) => neutralFillLayerAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralFillLayerRestDelta.getValueFor(element)),\n});\n/** @public */\nexport const neutralFillLayerRest = create(\"neutral-fill-layer-rest\").withDefault((element) => neutralFillLayerRecipe.getValueFor(element).evaluate(element));\n// Focus Stroke Outer\n/** @public */\nexport const focusStrokeOuterRecipe = createNonCss(\"focus-stroke-outer-recipe\").withDefault({\n    evaluate: (element) => focusStrokeOuterAlgorithm(neutralPalette.getValueFor(element), fillColor.getValueFor(element)),\n});\n/** @public */\nexport const focusStrokeOuter = create(\"focus-stroke-outer\").withDefault((element) => focusStrokeOuterRecipe.getValueFor(element).evaluate(element));\n// Focus Stroke Inner\n/** @public */\nexport const focusStrokeInnerRecipe = createNonCss(\"focus-stroke-inner-recipe\").withDefault({\n    evaluate: (element) => focusStrokeInnerAlgorithm(accentPalette.getValueFor(element), fillColor.getValueFor(element), focusStrokeOuter.getValueFor(element)),\n});\n/** @public */\nexport const focusStrokeInner = create(\"focus-stroke-inner\").withDefault((element) => focusStrokeInnerRecipe.getValueFor(element).evaluate(element));\n// Neutral Foreground Hint\n/** @public */\nexport const neutralForegroundHintRecipe = createNonCss(\"neutral-foreground-hint-recipe\").withDefault({\n    evaluate: (element) => neutralForegroundHintAlgorithm(neutralPalette.getValueFor(element), fillColor.getValueFor(element)),\n});\n/** @public */\nexport const neutralForegroundHint = create(\"neutral-foreground-hint\").withDefault((element) => neutralForegroundHintRecipe.getValueFor(element).evaluate(element));\n// Neutral Foreground\n/** @public */\nexport const neutralForegroundRecipe = createNonCss(\"neutral-foreground-recipe\").withDefault({\n    evaluate: (element) => neutralForegroundAlgorithm(neutralPalette.getValueFor(element), fillColor.getValueFor(element)),\n});\n/** @public */\nexport const neutralForegroundRest = create(\"neutral-foreground-rest\").withDefault((element) => neutralForegroundRecipe.getValueFor(element).evaluate(element));\n// Neutral Stroke\n/** @public */\nexport const neutralStrokeRecipe = create({\n    name: \"neutral-stroke-recipe\",\n    cssCustomPropertyName: null,\n}).withDefault({\n    evaluate: (element) => {\n        return neutralStrokeAlgorithm(neutralPalette.getValueFor(element), fillColor.getValueFor(element), neutralStrokeRestDelta.getValueFor(element), neutralStrokeHoverDelta.getValueFor(element), neutralStrokeActiveDelta.getValueFor(element), neutralStrokeFocusDelta.getValueFor(element));\n    },\n});\n/** @public */\nexport const neutralStrokeRest = create(\"neutral-stroke-rest\").withDefault((element) => neutralStrokeRecipe.getValueFor(element).evaluate(element).rest);\n/** @public */\nexport const neutralStrokeHover = create(\"neutral-stroke-hover\").withDefault((element) => neutralStrokeRecipe.getValueFor(element).evaluate(element).hover);\n/** @public */\nexport const neutralStrokeActive = create(\"neutral-stroke-active\").withDefault((element) => neutralStrokeRecipe.getValueFor(element).evaluate(element).active);\n/** @public */\nexport const neutralStrokeFocus = create(\"neutral-stroke-focus\").withDefault((element) => neutralStrokeRecipe.getValueFor(element).evaluate(element).focus);\n// Neutral Stroke Divider\n/** @public */\nexport const neutralStrokeDividerRecipe = createNonCss(\"neutral-stroke-divider-recipe\").withDefault({\n    evaluate: (element, reference) => neutralStrokeDividerAlgorithm(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), neutralStrokeDividerRestDelta.getValueFor(element)),\n});\n/** @public */\nexport const neutralStrokeDividerRest = create(\"neutral-stroke-divider-rest\").withDefault(element => neutralStrokeDividerRecipe.getValueFor(element).evaluate(element));\n/**\n * The control height formula expressed as a design token.\n * This token does not provide a CSS custom property.\n *\n * @public\n */\nexport const heightNumberAsToken = DesignToken.create({\n    name: \"height-number\",\n    cssCustomPropertyName: null,\n}).withDefault(target => (baseHeightMultiplier.getValueFor(target) + density.getValueFor(target)) *\n    designUnit.getValueFor(target));\n","import { baseLayerLuminanceSwatch } from \"../utilities/base-layer-luminance.js\";\n/**\n * @internal\n */\nexport function neutralLayerCardContainer(palette, relativeLuminance, layerDelta) {\n    return palette.get(palette.closestIndexOf(baseLayerLuminanceSwatch(relativeLuminance)) + layerDelta);\n}\n","import { baseLayerLuminanceSwatch } from \"../utilities/base-layer-luminance.js\";\n/**\n * @internal\n */\nexport function neutralLayerFloating(palette, relativeLuminance, layerDelta) {\n    const cardIndex = palette.closestIndexOf(baseLayerLuminanceSwatch(relativeLuminance)) - layerDelta;\n    return palette.get(cardIndex - layerDelta);\n}\n","import { baseLayerLuminanceSwatch } from \"../utilities/base-layer-luminance.js\";\nexport function neutralLayer1(palette, baseLayerLuminance) {\n    return palette.get(palette.closestIndexOf(baseLayerLuminanceSwatch(baseLayerLuminance)));\n}\n","import { neutralLayer2Index } from \"./neutral-layer-2.js\";\n/**\n * @internal\n */\nexport function neutralLayer3(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {\n    return palette.get(neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) + layerDelta);\n}\n","import { neutralLayer2Index } from \"./neutral-layer-2.js\";\n/**\n * @internal\n */\nexport function neutralLayer4(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {\n    return palette.get(neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) +\n        layerDelta * 2);\n}\n","/**\n * @internal\n */\nexport function accentFill(palette, neutralPalette, reference, hoverDelta, activeDelta, focusDelta, neutralFillRestDelta, neutralFillHoverDelta, neutralFillActiveDelta) {\n    const accent = palette.source;\n    const referenceIndex = neutralPalette.closestIndexOf(reference);\n    const swapThreshold = Math.max(neutralFillRestDelta, neutralFillHoverDelta, neutralFillActiveDelta);\n    const direction = referenceIndex >= swapThreshold ? -1 : 1;\n    const accentIndex = palette.closestIndexOf(accent);\n    const hoverIndex = accentIndex;\n    const restIndex = hoverIndex + direction * -1 * hoverDelta;\n    const activeIndex = restIndex + direction * activeDelta;\n    const focusIndex = restIndex + direction * focusDelta;\n    return {\n        rest: palette.get(restIndex),\n        hover: palette.get(hoverIndex),\n        active: palette.get(activeIndex),\n        focus: palette.get(focusIndex),\n    };\n}\n","import { black, white } from \"../utilities/color-constants.js\";\n/**\n * @internal\n */\nexport function foregroundOnAccent(reference, contrastTarget) {\n    return reference.contrast(white) >= contrastTarget ? white : black;\n}\n","import { directionByIsDark } from \"../utilities/direction-by-is-dark.js\";\n/**\n * @internal\n */\nexport function accentForeground(palette, reference, contrastTarget, restDelta, hoverDelta, activeDelta, focusDelta) {\n    const accent = palette.source;\n    const accentIndex = palette.closestIndexOf(accent);\n    const direction = directionByIsDark(reference);\n    const startIndex = accentIndex +\n        (direction === 1\n            ? Math.min(restDelta, hoverDelta)\n            : Math.max(direction * restDelta, direction * hoverDelta));\n    const accessibleSwatch = palette.colorContrast(reference, contrastTarget, startIndex, direction);\n    const accessibleIndex1 = palette.closestIndexOf(accessibleSwatch);\n    const accessibleIndex2 = accessibleIndex1 + direction * Math.abs(restDelta - hoverDelta);\n    const indexOneIsRestState = direction === 1\n        ? restDelta < hoverDelta\n        : direction * restDelta > direction * hoverDelta;\n    let restIndex;\n    let hoverIndex;\n    if (indexOneIsRestState) {\n        restIndex = accessibleIndex1;\n        hoverIndex = accessibleIndex2;\n    }\n    else {\n        restIndex = accessibleIndex2;\n        hoverIndex = accessibleIndex1;\n    }\n    return {\n        rest: palette.get(restIndex),\n        hover: palette.get(hoverIndex),\n        active: palette.get(restIndex + direction * activeDelta),\n        focus: palette.get(restIndex + direction * focusDelta),\n    };\n}\n","/**\n *\n * @param palette - The palette to operate on\n * @param reference - The reference color to calculate a color for\n * @param delta - The offset from the reference's location\n * @param threshold - Determines if a lighter or darker color than the reference will be picked.\n * @returns\n *\n * @internal\n */\nexport function neutralFill(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n    const referenceIndex = palette.closestIndexOf(reference);\n    const threshold = Math.max(restDelta, hoverDelta, activeDelta, focusDelta);\n    const direction = referenceIndex >= threshold ? -1 : 1;\n    return {\n        rest: palette.get(referenceIndex + direction * restDelta),\n        hover: palette.get(referenceIndex + direction * hoverDelta),\n        active: palette.get(referenceIndex + direction * activeDelta),\n        focus: palette.get(referenceIndex + direction * focusDelta),\n    };\n}\n","import { directionByIsDark } from \"../utilities/direction-by-is-dark.js\";\n/**\n * @internal\n */\nexport function neutralFillInput(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n    const direction = directionByIsDark(reference);\n    const referenceIndex = palette.closestIndexOf(reference);\n    return {\n        rest: palette.get(referenceIndex - direction * restDelta),\n        hover: palette.get(referenceIndex - direction * hoverDelta),\n        active: palette.get(referenceIndex - direction * activeDelta),\n        focus: palette.get(referenceIndex - direction * focusDelta),\n    };\n}\n","/**\n * @internal\n */\nexport function neutralFillStealth(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta, fillRestDelta, fillHoverDelta, fillActiveDelta, fillFocusDelta) {\n    const swapThreshold = Math.max(restDelta, hoverDelta, activeDelta, focusDelta, fillRestDelta, fillHoverDelta, fillActiveDelta, fillFocusDelta);\n    const referenceIndex = palette.closestIndexOf(reference);\n    const direction = referenceIndex >= swapThreshold ? -1 : 1;\n    return {\n        rest: palette.get(referenceIndex + direction * restDelta),\n        hover: palette.get(referenceIndex + direction * hoverDelta),\n        active: palette.get(referenceIndex + direction * activeDelta),\n        focus: palette.get(referenceIndex + direction * focusDelta),\n    };\n}\n","import { directionByIsDark } from \"../utilities/direction-by-is-dark.js\";\n/**\n * @internal\n */\nexport function neutralFillContrast(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n    const direction = directionByIsDark(reference);\n    const accessibleIndex = palette.closestIndexOf(palette.colorContrast(reference, 4.5));\n    const accessibleIndex2 = accessibleIndex + direction * Math.abs(restDelta - hoverDelta);\n    const indexOneIsRest = direction === 1\n        ? restDelta < hoverDelta\n        : direction * restDelta > direction * hoverDelta;\n    let restIndex;\n    let hoverIndex;\n    if (indexOneIsRest) {\n        restIndex = accessibleIndex;\n        hoverIndex = accessibleIndex2;\n    }\n    else {\n        restIndex = accessibleIndex2;\n        hoverIndex = accessibleIndex;\n    }\n    return {\n        rest: palette.get(restIndex),\n        hover: palette.get(hoverIndex),\n        active: palette.get(restIndex + direction * activeDelta),\n        focus: palette.get(restIndex + direction * focusDelta),\n    };\n}\n","/**\n * @internal\n */\nexport function neutralFillLayer(palette, reference, delta) {\n    const referenceIndex = palette.closestIndexOf(reference);\n    return palette.get(referenceIndex - (referenceIndex < delta ? delta * -1 : delta));\n}\n","import { directionByIsDark } from \"../utilities/direction-by-is-dark.js\";\n/** @internal */\nexport function focusStrokeOuter(palette, reference) {\n    return palette.colorContrast(reference, 3.5);\n}\n/** @internal */\nexport function focusStrokeInner(palette, reference, focusColor) {\n    return palette.colorContrast(focusColor, 3.5, palette.closestIndexOf(palette.source), (directionByIsDark(reference) * -1));\n}\n","/**\n * The neutralForegroundHint color recipe\n * @param palette - The palette to operate on\n * @param reference - The reference color\n *\n * @internal\n */\nexport function neutralForegroundHint(palette, reference) {\n    return palette.colorContrast(reference, 4.5);\n}\n","/**\n * @internal\n */\nexport function neutralForeground(palette, reference) {\n    return palette.colorContrast(reference, 14);\n}\n","import { directionByIsDark } from \"../utilities/direction-by-is-dark.js\";\n/**\n * @internal\n */\nexport function neutralStroke(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta) {\n    const referenceIndex = palette.closestIndexOf(reference);\n    const direction = directionByIsDark(reference);\n    const restIndex = referenceIndex + direction * restDelta;\n    const hoverIndex = restIndex + direction * (hoverDelta - restDelta);\n    const activeIndex = restIndex + direction * (activeDelta - restDelta);\n    const focusIndex = restIndex + direction * (focusDelta - restDelta);\n    return {\n        rest: palette.get(restIndex),\n        hover: palette.get(hoverIndex),\n        active: palette.get(activeIndex),\n        focus: palette.get(focusIndex),\n    };\n}\n","import { directionByIsDark } from \"../utilities/direction-by-is-dark.js\";\n/**\n * The neutralStrokeDivider color recipe\n * @param palette - The palette to operate on\n * @param reference - The reference color\n * @param delta - The offset from the reference\n *\n * @internal\n */\nexport function neutralStrokeDivider(palette, reference, delta) {\n    return palette.get(palette.closestIndexOf(reference) + directionByIsDark(reference) * delta);\n}\n","import { cssPartial } from \"@microsoft/fast-element\";\nimport { baseHeightMultiplier, density, designUnit } from \"../design-tokens.js\";\n/**\n * A formula to retrieve the control height.\n * Use this as the value of any CSS property that\n * accepts a pixel size.\n */\nexport const heightNumber = cssPartial `(${baseHeightMultiplier} + ${density}) * ${designUnit}`;\n","import { BaseProgress as ProgressRing, progressRingTemplate as template, } from \"@microsoft/fast-foundation\";\nimport { progressRingStyles as styles } from \"./progress-ring.styles.js\";\n/**\n * A function that returns a {@link @microsoft/fast-foundation#BaseProgress} registration for configuring the component with a DesignSystem.\n * Implements {@link @microsoft/fast-foundation#progressRingTemplate}\n *\n *\n * @public\n * @remarks\n * Generates HTML Element: `<fast-progress-ring>`\n */\nexport const fastProgressRing = ProgressRing.compose({\n    baseName: \"progress-ring\",\n    template,\n    styles,\n    indeterminateIndicator: /* html */ `\n        <svg class=\"progress\" part=\"progress\" viewBox=\"0 0 16 16\">\n            <circle\n                class=\"background\"\n                part=\"background\"\n                cx=\"8px\"\n                cy=\"8px\"\n                r=\"7px\"\n            ></circle>\n            <circle\n                class=\"indeterminate-indicator-1\"\n                part=\"indeterminate-indicator-1\"\n                cx=\"8px\"\n                cy=\"8px\"\n                r=\"7px\"\n            ></circle>\n        </svg>\n    `,\n});\n/**\n * Base class for ProgressRing\n * @public\n */\nexport { ProgressRing };\nexport { styles as progressRingStyles };\n","import { css } from \"@microsoft/fast-element\";\nimport { display, forcedColorsStylesheetBehavior, } from \"@microsoft/fast-foundation\";\nimport { SystemColors } from \"@microsoft/fast-web-utilities\";\nimport { accentForegroundRest, neutralFillRest, neutralForegroundHint, } from \"../design-tokens.js\";\nimport { heightNumber } from \"../styles/size.js\";\n/**\n * Styles for Progress Ring\n * @public\n */\nexport const progressRingStyles = (context, definition) => css `\n        ${display(\"flex\")} :host {\n            align-items: center;\n            outline: none;\n            height: calc(${heightNumber} * 1px);\n            width: calc(${heightNumber} * 1px);\n            margin: calc(${heightNumber} * 1px) 0;\n        }\n\n        .progress {\n            height: 100%;\n            width: 100%;\n        }\n\n        .background {\n            stroke: ${neutralFillRest};\n            fill: none;\n            stroke-width: 2px;\n        }\n\n        .determinate {\n            stroke: ${accentForegroundRest};\n            fill: none;\n            stroke-width: 2px;\n            stroke-linecap: round;\n            transform-origin: 50% 50%;\n            transform: rotate(-90deg);\n            transition: all 0.2s ease-in-out;\n        }\n\n        .indeterminate-indicator-1 {\n            stroke: ${accentForegroundRest};\n            fill: none;\n            stroke-width: 2px;\n            stroke-linecap: round;\n            transform-origin: 50% 50%;\n            transform: rotate(-90deg);\n            transition: all 0.2s ease-in-out;\n            animation: spin-infinite 2s linear infinite;\n        }\n\n        :host([paused]) .indeterminate-indicator-1 {\n            animation-play-state: paused;\n            stroke: ${neutralFillRest};\n        }\n\n        :host([paused]) .determinate {\n            stroke: ${neutralForegroundHint};\n        }\n\n        @keyframes spin-infinite {\n            0% {\n                stroke-dasharray: 0.01px 43.97px;\n                transform: rotate(0deg);\n            }\n            50% {\n                stroke-dasharray: 21.99px 21.99px;\n                transform: rotate(450deg);\n            }\n            100% {\n                stroke-dasharray: 0.01px 43.97px;\n                transform: rotate(1080deg);\n            }\n        }\n    `.withBehaviors(forcedColorsStylesheetBehavior(css `\n                .indeterminate-indicator-1,\n                .determinate {\n                    stroke: ${SystemColors.FieldText};\n                }\n                .background {\n                    stroke: ${SystemColors.Field};\n                }\n                :host([paused]) .indeterminate-indicator-1 {\n                    stroke: ${SystemColors.Field};\n                }\n                :host([paused]) .determinate {\n                    stroke: ${SystemColors.GrayText};\n                }\n            `));\n","import { emptyArray } from \"../platform.js\";\n/** @internal */\nexport function newSplice(index, removed, addedCount) {\n    return {\n        index: index,\n        removed: removed,\n        addedCount: addedCount,\n    };\n}\nconst EDIT_LEAVE = 0;\nconst EDIT_UPDATE = 1;\nconst EDIT_ADD = 2;\nconst EDIT_DELETE = 3;\n// Note: This function is *based* on the computation of the Levenshtein\n// \"edit\" distance. The one change is that \"updates\" are treated as two\n// edits - not one. With Array splices, an update is really a delete\n// followed by an add. By retaining this, we optimize for \"keeping\" the\n// maximum array items in the original array. For example:\n//\n//   'xxxx123' -> '123yyyy'\n//\n// With 1-edit updates, the shortest path would be just to update all seven\n// characters. With 2-edit updates, we delete 4, leave 3, and add 4. This\n// leaves the substring '123' intact.\nfunction calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd) {\n    // \"Deletion\" columns\n    const rowCount = oldEnd - oldStart + 1;\n    const columnCount = currentEnd - currentStart + 1;\n    const distances = new Array(rowCount);\n    let north;\n    let west;\n    // \"Addition\" rows. Initialize null column.\n    for (let i = 0; i < rowCount; ++i) {\n        distances[i] = new Array(columnCount);\n        distances[i][0] = i;\n    }\n    // Initialize null row\n    for (let j = 0; j < columnCount; ++j) {\n        distances[0][j] = j;\n    }\n    for (let i = 1; i < rowCount; ++i) {\n        for (let j = 1; j < columnCount; ++j) {\n            if (current[currentStart + j - 1] === old[oldStart + i - 1]) {\n                distances[i][j] = distances[i - 1][j - 1];\n            }\n            else {\n                north = distances[i - 1][j] + 1;\n                west = distances[i][j - 1] + 1;\n                distances[i][j] = north < west ? north : west;\n            }\n        }\n    }\n    return distances;\n}\n// This starts at the final weight, and walks \"backward\" by finding\n// the minimum previous weight recursively until the origin of the weight\n// matrix.\nfunction spliceOperationsFromEditDistances(distances) {\n    let i = distances.length - 1;\n    let j = distances[0].length - 1;\n    let current = distances[i][j];\n    const edits = [];\n    while (i > 0 || j > 0) {\n        if (i === 0) {\n            edits.push(EDIT_ADD);\n            j--;\n            continue;\n        }\n        if (j === 0) {\n            edits.push(EDIT_DELETE);\n            i--;\n            continue;\n        }\n        const northWest = distances[i - 1][j - 1];\n        const west = distances[i - 1][j];\n        const north = distances[i][j - 1];\n        let min;\n        if (west < north) {\n            min = west < northWest ? west : northWest;\n        }\n        else {\n            min = north < northWest ? north : northWest;\n        }\n        if (min === northWest) {\n            if (northWest === current) {\n                edits.push(EDIT_LEAVE);\n            }\n            else {\n                edits.push(EDIT_UPDATE);\n                current = northWest;\n            }\n            i--;\n            j--;\n        }\n        else if (min === west) {\n            edits.push(EDIT_DELETE);\n            i--;\n            current = west;\n        }\n        else {\n            edits.push(EDIT_ADD);\n            j--;\n            current = north;\n        }\n    }\n    edits.reverse();\n    return edits;\n}\nfunction sharedPrefix(current, old, searchLength) {\n    for (let i = 0; i < searchLength; ++i) {\n        if (current[i] !== old[i]) {\n            return i;\n        }\n    }\n    return searchLength;\n}\nfunction sharedSuffix(current, old, searchLength) {\n    let index1 = current.length;\n    let index2 = old.length;\n    let count = 0;\n    while (count < searchLength && current[--index1] === old[--index2]) {\n        count++;\n    }\n    return count;\n}\nfunction intersect(start1, end1, start2, end2) {\n    // Disjoint\n    if (end1 < start2 || end2 < start1) {\n        return -1;\n    }\n    // Adjacent\n    if (end1 === start2 || end2 === start1) {\n        return 0;\n    }\n    // Non-zero intersect, span1 first\n    if (start1 < start2) {\n        if (end1 < end2) {\n            return end1 - start2; // Overlap\n        }\n        return end2 - start2; // Contained\n    }\n    // Non-zero intersect, span2 first\n    if (end2 < end1) {\n        return end2 - start1; // Overlap\n    }\n    return end1 - start1; // Contained\n}\n/**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was transformed into a new array of items. Conceptually it is a list of\n * tuples of\n *\n *   <index, removed, addedCount>\n *\n * which are kept in ascending index order of. The tuple represents that at\n * the |index|, |removed| sequence of items were removed, and counting forward\n * from |index|, |addedCount| items were added.\n */\n/**\n * @internal\n * @remarks\n * Lacking individual splice mutation information, the minimal set of\n * splices can be synthesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortest path through it.\n *\n * Complexity: O(l * p)\n *   l: The length of the current array\n *   p: The length of the old array\n */\nexport function calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd) {\n    let prefixCount = 0;\n    let suffixCount = 0;\n    const minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n    if (currentStart === 0 && oldStart === 0) {\n        prefixCount = sharedPrefix(current, old, minLength);\n    }\n    if (currentEnd === current.length && oldEnd === old.length) {\n        suffixCount = sharedSuffix(current, old, minLength - prefixCount);\n    }\n    currentStart += prefixCount;\n    oldStart += prefixCount;\n    currentEnd -= suffixCount;\n    oldEnd -= suffixCount;\n    if (currentEnd - currentStart === 0 && oldEnd - oldStart === 0) {\n        return emptyArray;\n    }\n    if (currentStart === currentEnd) {\n        const splice = newSplice(currentStart, [], 0);\n        while (oldStart < oldEnd) {\n            splice.removed.push(old[oldStart++]);\n        }\n        return [splice];\n    }\n    else if (oldStart === oldEnd) {\n        return [newSplice(currentStart, [], currentEnd - currentStart)];\n    }\n    const ops = spliceOperationsFromEditDistances(calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));\n    const splices = [];\n    let splice = void 0;\n    let index = currentStart;\n    let oldIndex = oldStart;\n    for (let i = 0; i < ops.length; ++i) {\n        switch (ops[i]) {\n            case EDIT_LEAVE:\n                if (splice !== void 0) {\n                    splices.push(splice);\n                    splice = void 0;\n                }\n                index++;\n                oldIndex++;\n                break;\n            case EDIT_UPDATE:\n                if (splice === void 0) {\n                    splice = newSplice(index, [], 0);\n                }\n                splice.addedCount++;\n                index++;\n                splice.removed.push(old[oldIndex]);\n                oldIndex++;\n                break;\n            case EDIT_ADD:\n                if (splice === void 0) {\n                    splice = newSplice(index, [], 0);\n                }\n                splice.addedCount++;\n                index++;\n                break;\n            case EDIT_DELETE:\n                if (splice === void 0) {\n                    splice = newSplice(index, [], 0);\n                }\n                splice.removed.push(old[oldIndex]);\n                oldIndex++;\n                break;\n            // no default\n        }\n    }\n    if (splice !== void 0) {\n        splices.push(splice);\n    }\n    return splices;\n}\nconst $push = Array.prototype.push;\nfunction mergeSplice(splices, index, removed, addedCount) {\n    const splice = newSplice(index, removed, addedCount);\n    let inserted = false;\n    let insertionOffset = 0;\n    for (let i = 0; i < splices.length; i++) {\n        const current = splices[i];\n        current.index += insertionOffset;\n        if (inserted) {\n            continue;\n        }\n        const intersectCount = intersect(splice.index, splice.index + splice.removed.length, current.index, current.index + current.addedCount);\n        if (intersectCount >= 0) {\n            // Merge the two splices\n            splices.splice(i, 1);\n            i--;\n            insertionOffset -= current.addedCount - current.removed.length;\n            splice.addedCount += current.addedCount - intersectCount;\n            const deleteCount = splice.removed.length + current.removed.length - intersectCount;\n            if (!splice.addedCount && !deleteCount) {\n                // merged splice is a noop. discard.\n                inserted = true;\n            }\n            else {\n                let currentRemoved = current.removed;\n                if (splice.index < current.index) {\n                    // some prefix of splice.removed is prepended to current.removed.\n                    const prepend = splice.removed.slice(0, current.index - splice.index);\n                    $push.apply(prepend, currentRemoved);\n                    currentRemoved = prepend;\n                }\n                if (splice.index + splice.removed.length >\n                    current.index + current.addedCount) {\n                    // some suffix of splice.removed is appended to current.removed.\n                    const append = splice.removed.slice(current.index + current.addedCount - splice.index);\n                    $push.apply(currentRemoved, append);\n                }\n                splice.removed = currentRemoved;\n                if (current.index < splice.index) {\n                    splice.index = current.index;\n                }\n            }\n        }\n        else if (splice.index < current.index) {\n            // Insert splice here.\n            inserted = true;\n            splices.splice(i, 0, splice);\n            i++;\n            const offset = splice.addedCount - splice.removed.length;\n            current.index += offset;\n            insertionOffset += offset;\n        }\n    }\n    if (!inserted) {\n        splices.push(splice);\n    }\n}\nfunction createInitialSplices(changeRecords) {\n    const splices = [];\n    for (let i = 0, ii = changeRecords.length; i < ii; i++) {\n        const record = changeRecords[i];\n        mergeSplice(splices, record.index, record.removed, record.addedCount);\n    }\n    return splices;\n}\n/** @internal */\nexport function projectArraySplices(array, changeRecords) {\n    let splices = [];\n    const initialSplices = createInitialSplices(changeRecords);\n    for (let i = 0, ii = initialSplices.length; i < ii; ++i) {\n        const splice = initialSplices[i];\n        if (splice.addedCount === 1 && splice.removed.length === 1) {\n            if (splice.removed[0] !== array[splice.index]) {\n                splices.push(splice);\n            }\n            continue;\n        }\n        splices = splices.concat(calcSplices(array, splice.index, splice.index + splice.addedCount, splice.removed, 0, splice.removed.length));\n    }\n    return splices;\n}\n","import { DOM } from \"../dom.js\";\nimport { calcSplices, newSplice, projectArraySplices } from \"./array-change-records.js\";\nimport { SubscriberSet } from \"./notifier.js\";\nimport { Observable } from \"./observable.js\";\nlet arrayObservationEnabled = false;\nfunction adjustIndex(changeRecord, array) {\n    let index = changeRecord.index;\n    const arrayLength = array.length;\n    if (index > arrayLength) {\n        index = arrayLength - changeRecord.addedCount;\n    }\n    else if (index < 0) {\n        index =\n            arrayLength + changeRecord.removed.length + index - changeRecord.addedCount;\n    }\n    if (index < 0) {\n        index = 0;\n    }\n    changeRecord.index = index;\n    return changeRecord;\n}\nclass ArrayObserver extends SubscriberSet {\n    constructor(source) {\n        super(source);\n        this.oldCollection = void 0;\n        this.splices = void 0;\n        this.needsQueue = true;\n        this.call = this.flush;\n        Reflect.defineProperty(source, \"$fastController\", {\n            value: this,\n            enumerable: false,\n        });\n    }\n    subscribe(subscriber) {\n        this.flush();\n        super.subscribe(subscriber);\n    }\n    addSplice(splice) {\n        if (this.splices === void 0) {\n            this.splices = [splice];\n        }\n        else {\n            this.splices.push(splice);\n        }\n        if (this.needsQueue) {\n            this.needsQueue = false;\n            DOM.queueUpdate(this);\n        }\n    }\n    reset(oldCollection) {\n        this.oldCollection = oldCollection;\n        if (this.needsQueue) {\n            this.needsQueue = false;\n            DOM.queueUpdate(this);\n        }\n    }\n    flush() {\n        const splices = this.splices;\n        const oldCollection = this.oldCollection;\n        if (splices === void 0 && oldCollection === void 0) {\n            return;\n        }\n        this.needsQueue = true;\n        this.splices = void 0;\n        this.oldCollection = void 0;\n        const finalSplices = oldCollection === void 0\n            ? projectArraySplices(this.source, splices)\n            : calcSplices(this.source, 0, this.source.length, oldCollection, 0, oldCollection.length);\n        this.notify(finalSplices);\n    }\n}\n/* eslint-disable prefer-rest-params */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/**\n * Enables the array observation mechanism.\n * @remarks\n * Array observation is enabled automatically when using the\n * {@link RepeatDirective}, so calling this API manually is\n * not typically necessary.\n * @public\n */\nexport function enableArrayObservation() {\n    if (arrayObservationEnabled) {\n        return;\n    }\n    arrayObservationEnabled = true;\n    Observable.setArrayObserverFactory((collection) => {\n        return new ArrayObserver(collection);\n    });\n    const proto = Array.prototype;\n    // Don't patch Array if it has already been patched\n    // by another copy of fast-element.\n    if (proto.$fastPatch) {\n        return;\n    }\n    Reflect.defineProperty(proto, \"$fastPatch\", {\n        value: 1,\n        enumerable: false,\n    });\n    const pop = proto.pop;\n    const push = proto.push;\n    const reverse = proto.reverse;\n    const shift = proto.shift;\n    const sort = proto.sort;\n    const splice = proto.splice;\n    const unshift = proto.unshift;\n    proto.pop = function () {\n        const notEmpty = this.length > 0;\n        const methodCallResult = pop.apply(this, arguments);\n        const o = this.$fastController;\n        if (o !== void 0 && notEmpty) {\n            o.addSplice(newSplice(this.length, [methodCallResult], 0));\n        }\n        return methodCallResult;\n    };\n    proto.push = function () {\n        const methodCallResult = push.apply(this, arguments);\n        const o = this.$fastController;\n        if (o !== void 0) {\n            o.addSplice(adjustIndex(newSplice(this.length - arguments.length, [], arguments.length), this));\n        }\n        return methodCallResult;\n    };\n    proto.reverse = function () {\n        let oldArray;\n        const o = this.$fastController;\n        if (o !== void 0) {\n            o.flush();\n            oldArray = this.slice();\n        }\n        const methodCallResult = reverse.apply(this, arguments);\n        if (o !== void 0) {\n            o.reset(oldArray);\n        }\n        return methodCallResult;\n    };\n    proto.shift = function () {\n        const notEmpty = this.length > 0;\n        const methodCallResult = shift.apply(this, arguments);\n        const o = this.$fastController;\n        if (o !== void 0 && notEmpty) {\n            o.addSplice(newSplice(0, [methodCallResult], 0));\n        }\n        return methodCallResult;\n    };\n    proto.sort = function () {\n        let oldArray;\n        const o = this.$fastController;\n        if (o !== void 0) {\n            o.flush();\n            oldArray = this.slice();\n        }\n        const methodCallResult = sort.apply(this, arguments);\n        if (o !== void 0) {\n            o.reset(oldArray);\n        }\n        return methodCallResult;\n    };\n    proto.splice = function () {\n        const methodCallResult = splice.apply(this, arguments);\n        const o = this.$fastController;\n        if (o !== void 0) {\n            o.addSplice(adjustIndex(newSplice(+arguments[0], methodCallResult, arguments.length > 2 ? arguments.length - 2 : 0), this));\n        }\n        return methodCallResult;\n    };\n    proto.unshift = function () {\n        const methodCallResult = unshift.apply(this, arguments);\n        const o = this.$fastController;\n        if (o !== void 0) {\n            o.addSplice(adjustIndex(newSplice(0, [], arguments.length), this));\n        }\n        return methodCallResult;\n    };\n}\n/* eslint-enable prefer-rest-params */\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n","import { DOM } from \"../dom.js\";\nimport { Observable, } from \"../observation/observable.js\";\nimport { enableArrayObservation } from \"../observation/array-observer.js\";\nimport { emptyArray } from \"../platform.js\";\nimport { HTMLDirective } from \"./html-directive.js\";\nimport { HTMLView } from \"./view.js\";\nconst defaultRepeatOptions = Object.freeze({\n    positioning: false,\n    recycle: true,\n});\nfunction bindWithoutPositioning(view, items, index, context) {\n    view.bind(items[index], context);\n}\nfunction bindWithPositioning(view, items, index, context) {\n    const childContext = Object.create(context);\n    childContext.index = index;\n    childContext.length = items.length;\n    view.bind(items[index], childContext);\n}\n/**\n * A behavior that renders a template for each item in an array.\n * @public\n */\nexport class RepeatBehavior {\n    /**\n     * Creates an instance of RepeatBehavior.\n     * @param location - The location in the DOM to render the repeat.\n     * @param itemsBinding - The array to render.\n     * @param isItemsBindingVolatile - Indicates whether the items binding has volatile dependencies.\n     * @param templateBinding - The template to render for each item.\n     * @param isTemplateBindingVolatile - Indicates whether the template binding has volatile dependencies.\n     * @param options - Options used to turn on special repeat features.\n     */\n    constructor(location, itemsBinding, isItemsBindingVolatile, templateBinding, isTemplateBindingVolatile, options) {\n        this.location = location;\n        this.itemsBinding = itemsBinding;\n        this.templateBinding = templateBinding;\n        this.options = options;\n        this.source = null;\n        this.views = [];\n        this.items = null;\n        this.itemsObserver = null;\n        this.originalContext = void 0;\n        this.childContext = void 0;\n        this.bindView = bindWithoutPositioning;\n        this.itemsBindingObserver = Observable.binding(itemsBinding, this, isItemsBindingVolatile);\n        this.templateBindingObserver = Observable.binding(templateBinding, this, isTemplateBindingVolatile);\n        if (options.positioning) {\n            this.bindView = bindWithPositioning;\n        }\n    }\n    /**\n     * Bind this behavior to the source.\n     * @param source - The source to bind to.\n     * @param context - The execution context that the binding is operating within.\n     */\n    bind(source, context) {\n        this.source = source;\n        this.originalContext = context;\n        this.childContext = Object.create(context);\n        this.childContext.parent = source;\n        this.childContext.parentContext = this.originalContext;\n        this.items = this.itemsBindingObserver.observe(source, this.originalContext);\n        this.template = this.templateBindingObserver.observe(source, this.originalContext);\n        this.observeItems(true);\n        this.refreshAllViews();\n    }\n    /**\n     * Unbinds this behavior from the source.\n     * @param source - The source to unbind from.\n     */\n    unbind() {\n        this.source = null;\n        this.items = null;\n        if (this.itemsObserver !== null) {\n            this.itemsObserver.unsubscribe(this);\n        }\n        this.unbindAllViews();\n        this.itemsBindingObserver.disconnect();\n        this.templateBindingObserver.disconnect();\n    }\n    /** @internal */\n    handleChange(source, args) {\n        if (source === this.itemsBinding) {\n            this.items = this.itemsBindingObserver.observe(this.source, this.originalContext);\n            this.observeItems();\n            this.refreshAllViews();\n        }\n        else if (source === this.templateBinding) {\n            this.template = this.templateBindingObserver.observe(this.source, this.originalContext);\n            this.refreshAllViews(true);\n        }\n        else {\n            this.updateViews(args);\n        }\n    }\n    observeItems(force = false) {\n        if (!this.items) {\n            this.items = emptyArray;\n            return;\n        }\n        const oldObserver = this.itemsObserver;\n        const newObserver = (this.itemsObserver = Observable.getNotifier(this.items));\n        const hasNewObserver = oldObserver !== newObserver;\n        if (hasNewObserver && oldObserver !== null) {\n            oldObserver.unsubscribe(this);\n        }\n        if (hasNewObserver || force) {\n            newObserver.subscribe(this);\n        }\n    }\n    updateViews(splices) {\n        const childContext = this.childContext;\n        const views = this.views;\n        const bindView = this.bindView;\n        const items = this.items;\n        const template = this.template;\n        const recycle = this.options.recycle;\n        const leftoverViews = [];\n        let leftoverIndex = 0;\n        let availableViews = 0;\n        for (let i = 0, ii = splices.length; i < ii; ++i) {\n            const splice = splices[i];\n            const removed = splice.removed;\n            let removeIndex = 0;\n            let addIndex = splice.index;\n            const end = addIndex + splice.addedCount;\n            const removedViews = views.splice(splice.index, removed.length);\n            const totalAvailableViews = (availableViews =\n                leftoverViews.length + removedViews.length);\n            for (; addIndex < end; ++addIndex) {\n                const neighbor = views[addIndex];\n                const location = neighbor ? neighbor.firstChild : this.location;\n                let view;\n                if (recycle && availableViews > 0) {\n                    if (removeIndex <= totalAvailableViews && removedViews.length > 0) {\n                        view = removedViews[removeIndex];\n                        removeIndex++;\n                    }\n                    else {\n                        view = leftoverViews[leftoverIndex];\n                        leftoverIndex++;\n                    }\n                    availableViews--;\n                }\n                else {\n                    view = template.create();\n                }\n                views.splice(addIndex, 0, view);\n                bindView(view, items, addIndex, childContext);\n                view.insertBefore(location);\n            }\n            if (removedViews[removeIndex]) {\n                leftoverViews.push(...removedViews.slice(removeIndex));\n            }\n        }\n        for (let i = leftoverIndex, ii = leftoverViews.length; i < ii; ++i) {\n            leftoverViews[i].dispose();\n        }\n        if (this.options.positioning) {\n            for (let i = 0, ii = views.length; i < ii; ++i) {\n                const currentContext = views[i].context;\n                currentContext.length = ii;\n                currentContext.index = i;\n            }\n        }\n    }\n    refreshAllViews(templateChanged = false) {\n        const items = this.items;\n        const childContext = this.childContext;\n        const template = this.template;\n        const location = this.location;\n        const bindView = this.bindView;\n        let itemsLength = items.length;\n        let views = this.views;\n        let viewsLength = views.length;\n        if (itemsLength === 0 || templateChanged || !this.options.recycle) {\n            // all views need to be removed\n            HTMLView.disposeContiguousBatch(views);\n            viewsLength = 0;\n        }\n        if (viewsLength === 0) {\n            // all views need to be created\n            this.views = views = new Array(itemsLength);\n            for (let i = 0; i < itemsLength; ++i) {\n                const view = template.create();\n                bindView(view, items, i, childContext);\n                views[i] = view;\n                view.insertBefore(location);\n            }\n        }\n        else {\n            // attempt to reuse existing views with new data\n            let i = 0;\n            for (; i < itemsLength; ++i) {\n                if (i < viewsLength) {\n                    const view = views[i];\n                    bindView(view, items, i, childContext);\n                }\n                else {\n                    const view = template.create();\n                    bindView(view, items, i, childContext);\n                    views.push(view);\n                    view.insertBefore(location);\n                }\n            }\n            const removed = views.splice(i, viewsLength - i);\n            for (i = 0, itemsLength = removed.length; i < itemsLength; ++i) {\n                removed[i].dispose();\n            }\n        }\n    }\n    unbindAllViews() {\n        const views = this.views;\n        for (let i = 0, ii = views.length; i < ii; ++i) {\n            views[i].unbind();\n        }\n    }\n}\n/**\n * A directive that configures list rendering.\n * @public\n */\nexport class RepeatDirective extends HTMLDirective {\n    /**\n     * Creates an instance of RepeatDirective.\n     * @param itemsBinding - The binding that provides the array to render.\n     * @param templateBinding - The template binding used to obtain a template to render for each item in the array.\n     * @param options - Options used to turn on special repeat features.\n     */\n    constructor(itemsBinding, templateBinding, options) {\n        super();\n        this.itemsBinding = itemsBinding;\n        this.templateBinding = templateBinding;\n        this.options = options;\n        /**\n         * Creates a placeholder string based on the directive's index within the template.\n         * @param index - The index of the directive within the template.\n         */\n        this.createPlaceholder = DOM.createBlockPlaceholder;\n        enableArrayObservation();\n        this.isItemsBindingVolatile = Observable.isVolatileBinding(itemsBinding);\n        this.isTemplateBindingVolatile = Observable.isVolatileBinding(templateBinding);\n    }\n    /**\n     * Creates a behavior for the provided target node.\n     * @param target - The node instance to create the behavior for.\n     */\n    createBehavior(target) {\n        return new RepeatBehavior(target, this.itemsBinding, this.isItemsBindingVolatile, this.templateBinding, this.isTemplateBindingVolatile, this.options);\n    }\n}\n/**\n * A directive that enables list rendering.\n * @param itemsBinding - The array to render.\n * @param templateOrTemplateBinding - The template or a template binding used obtain a template\n * to render for each item in the array.\n * @param options - Options used to turn on special repeat features.\n * @public\n */\nexport function repeat(itemsBinding, templateOrTemplateBinding, options = defaultRepeatOptions) {\n    const templateBinding = typeof templateOrTemplateBinding === \"function\"\n        ? templateOrTemplateBinding\n        : () => templateOrTemplateBinding;\n    return new RepeatDirective(itemsBinding, templateBinding, Object.assign(Object.assign({}, defaultRepeatOptions), options));\n}\n","import { DOM } from \"../dom.js\";\n/**\n * Instructs the template engine to apply behavior to a node.\n * @public\n */\nexport class HTMLDirective {\n    constructor() {\n        /**\n         * The index of the DOM node to which the created behavior will apply.\n         */\n        this.targetIndex = 0;\n    }\n}\n/**\n * A {@link HTMLDirective} that targets a named attribute or property on a node.\n * @public\n */\nexport class TargetedHTMLDirective extends HTMLDirective {\n    constructor() {\n        super(...arguments);\n        /**\n         * Creates a placeholder string based on the directive's index within the template.\n         * @param index - The index of the directive within the template.\n         */\n        this.createPlaceholder = DOM.createInterpolationPlaceholder;\n    }\n}\n/**\n * A directive that attaches special behavior to an element via a custom attribute.\n * @public\n */\nexport class AttachedBehaviorHTMLDirective extends HTMLDirective {\n    /**\n     *\n     * @param name - The name of the behavior; used as a custom attribute on the element.\n     * @param behavior - The behavior to instantiate and attach to the element.\n     * @param options - Options to pass to the behavior during creation.\n     */\n    constructor(name, behavior, options) {\n        super();\n        this.name = name;\n        this.behavior = behavior;\n        this.options = options;\n    }\n    /**\n     * Creates a placeholder string based on the directive's index within the template.\n     * @param index - The index of the directive within the template.\n     * @remarks\n     * Creates a custom attribute placeholder.\n     */\n    createPlaceholder(index) {\n        return DOM.createCustomAttributePlaceholder(this.name, index);\n    }\n    /**\n     * Creates a behavior for the provided target node.\n     * @param target - The node instance to create the behavior for.\n     * @remarks\n     * Creates an instance of the `behavior` type this directive was constructed with\n     * and passes the target and options to that `behavior`'s constructor.\n     */\n    createBehavior(target) {\n        return new this.behavior(target, this.options);\n    }\n}\n","import { Observable } from \"../observation/observable.js\";\nimport { DOM } from \"../dom.js\";\nimport { createMetadataLocator } from \"../platform.js\";\n/**\n * Metadata used to configure a custom attribute's behavior.\n * @public\n */\nexport const AttributeConfiguration = Object.freeze({\n    /**\n     * Locates all attribute configurations associated with a type.\n     */\n    locate: createMetadataLocator(),\n});\n/**\n * A {@link ValueConverter} that converts to and from `boolean` values.\n * @remarks\n * Used automatically when the `boolean` {@link AttributeMode} is selected.\n * @public\n */\nexport const booleanConverter = {\n    toView(value) {\n        return value ? \"true\" : \"false\";\n    },\n    fromView(value) {\n        if (value === null ||\n            value === void 0 ||\n            value === \"false\" ||\n            value === false ||\n            value === 0) {\n            return false;\n        }\n        return true;\n    },\n};\n/**\n * A {@link ValueConverter} that converts to and from `number` values.\n * @remarks\n * This converter allows for nullable numbers, returning `null` if the\n * input was `null`, `undefined`, or `NaN`.\n * @public\n */\nexport const nullableNumberConverter = {\n    toView(value) {\n        if (value === null || value === undefined) {\n            return null;\n        }\n        const number = value * 1;\n        return isNaN(number) ? null : number.toString();\n    },\n    fromView(value) {\n        if (value === null || value === undefined) {\n            return null;\n        }\n        const number = value * 1;\n        return isNaN(number) ? null : number;\n    },\n};\n/**\n * An implementation of {@link Accessor} that supports reactivity,\n * change callbacks, attribute reflection, and type conversion for\n * custom elements.\n * @public\n */\nexport class AttributeDefinition {\n    /**\n     * Creates an instance of AttributeDefinition.\n     * @param Owner - The class constructor that owns this attribute.\n     * @param name - The name of the property associated with the attribute.\n     * @param attribute - The name of the attribute in HTML.\n     * @param mode - The {@link AttributeMode} that describes the behavior of this attribute.\n     * @param converter - A {@link ValueConverter} that integrates with the property getter/setter\n     * to convert values to and from a DOM string.\n     */\n    constructor(Owner, name, attribute = name.toLowerCase(), mode = \"reflect\", converter) {\n        this.guards = new Set();\n        this.Owner = Owner;\n        this.name = name;\n        this.attribute = attribute;\n        this.mode = mode;\n        this.converter = converter;\n        this.fieldName = `_${name}`;\n        this.callbackName = `${name}Changed`;\n        this.hasCallback = this.callbackName in Owner.prototype;\n        if (mode === \"boolean\" && converter === void 0) {\n            this.converter = booleanConverter;\n        }\n    }\n    /**\n     * Sets the value of the attribute/property on the source element.\n     * @param source - The source element to access.\n     * @param value - The value to set the attribute/property to.\n     */\n    setValue(source, newValue) {\n        const oldValue = source[this.fieldName];\n        const converter = this.converter;\n        if (converter !== void 0) {\n            newValue = converter.fromView(newValue);\n        }\n        if (oldValue !== newValue) {\n            source[this.fieldName] = newValue;\n            this.tryReflectToAttribute(source);\n            if (this.hasCallback) {\n                source[this.callbackName](oldValue, newValue);\n            }\n            source.$fastController.notify(this.name);\n        }\n    }\n    /**\n     * Gets the value of the attribute/property on the source element.\n     * @param source - The source element to access.\n     */\n    getValue(source) {\n        Observable.track(source, this.name);\n        return source[this.fieldName];\n    }\n    /** @internal */\n    onAttributeChangedCallback(element, value) {\n        if (this.guards.has(element)) {\n            return;\n        }\n        this.guards.add(element);\n        this.setValue(element, value);\n        this.guards.delete(element);\n    }\n    tryReflectToAttribute(element) {\n        const mode = this.mode;\n        const guards = this.guards;\n        if (guards.has(element) || mode === \"fromView\") {\n            return;\n        }\n        DOM.queueUpdate(() => {\n            guards.add(element);\n            const latestValue = element[this.fieldName];\n            switch (mode) {\n                case \"reflect\":\n                    const converter = this.converter;\n                    DOM.setAttribute(element, this.attribute, converter !== void 0 ? converter.toView(latestValue) : latestValue);\n                    break;\n                case \"boolean\":\n                    DOM.setBooleanAttribute(element, this.attribute, latestValue);\n                    break;\n            }\n            guards.delete(element);\n        });\n    }\n    /**\n     * Collects all attribute definitions associated with the owner.\n     * @param Owner - The class constructor to collect attribute for.\n     * @param attributeLists - Any existing attributes to collect and merge with those associated with the owner.\n     * @internal\n     */\n    static collect(Owner, ...attributeLists) {\n        const attributes = [];\n        attributeLists.push(AttributeConfiguration.locate(Owner));\n        for (let i = 0, ii = attributeLists.length; i < ii; ++i) {\n            const list = attributeLists[i];\n            if (list === void 0) {\n                continue;\n            }\n            for (let j = 0, jj = list.length; j < jj; ++j) {\n                const config = list[j];\n                if (typeof config === \"string\") {\n                    attributes.push(new AttributeDefinition(Owner, config));\n                }\n                else {\n                    attributes.push(new AttributeDefinition(Owner, config.property, config.attribute, config.mode, config.converter));\n                }\n            }\n        }\n        return attributes;\n    }\n}\nexport function attr(configOrTarget, prop) {\n    let config;\n    function decorator($target, $prop) {\n        if (arguments.length > 1) {\n            // Non invocation:\n            // - @attr\n            // Invocation with or w/o opts:\n            // - @attr()\n            // - @attr({...opts})\n            config.property = $prop;\n        }\n        AttributeConfiguration.locate($target.constructor).push(config);\n    }\n    if (arguments.length > 1) {\n        // Non invocation:\n        // - @attr\n        config = {};\n        decorator(configOrTarget, prop);\n        return;\n    }\n    // Invocation with or w/o opts:\n    // - @attr()\n    // - @attr({...opts})\n    config = configOrTarget === void 0 ? {} : configOrTarget;\n    return decorator;\n}\n","/**\n * An implementation of {@link Notifier} that efficiently keeps track of\n * subscribers interested in a specific change notification on an\n * observable source.\n *\n * @remarks\n * This set is optimized for the most common scenario of 1 or 2 subscribers.\n * With this in mind, it can store a subscriber in an internal field, allowing it to avoid Array#push operations.\n * If the set ever exceeds two subscribers, it upgrades to an array automatically.\n * @public\n */\nexport class SubscriberSet {\n    /**\n     * Creates an instance of SubscriberSet for the specified source.\n     * @param source - The object source that subscribers will receive notifications from.\n     * @param initialSubscriber - An initial subscriber to changes.\n     */\n    constructor(source, initialSubscriber) {\n        this.sub1 = void 0;\n        this.sub2 = void 0;\n        this.spillover = void 0;\n        this.source = source;\n        this.sub1 = initialSubscriber;\n    }\n    /**\n     * Checks whether the provided subscriber has been added to this set.\n     * @param subscriber - The subscriber to test for inclusion in this set.\n     */\n    has(subscriber) {\n        return this.spillover === void 0\n            ? this.sub1 === subscriber || this.sub2 === subscriber\n            : this.spillover.indexOf(subscriber) !== -1;\n    }\n    /**\n     * Subscribes to notification of changes in an object's state.\n     * @param subscriber - The object that is subscribing for change notification.\n     */\n    subscribe(subscriber) {\n        const spillover = this.spillover;\n        if (spillover === void 0) {\n            if (this.has(subscriber)) {\n                return;\n            }\n            if (this.sub1 === void 0) {\n                this.sub1 = subscriber;\n                return;\n            }\n            if (this.sub2 === void 0) {\n                this.sub2 = subscriber;\n                return;\n            }\n            this.spillover = [this.sub1, this.sub2, subscriber];\n            this.sub1 = void 0;\n            this.sub2 = void 0;\n        }\n        else {\n            const index = spillover.indexOf(subscriber);\n            if (index === -1) {\n                spillover.push(subscriber);\n            }\n        }\n    }\n    /**\n     * Unsubscribes from notification of changes in an object's state.\n     * @param subscriber - The object that is unsubscribing from change notification.\n     */\n    unsubscribe(subscriber) {\n        const spillover = this.spillover;\n        if (spillover === void 0) {\n            if (this.sub1 === subscriber) {\n                this.sub1 = void 0;\n            }\n            else if (this.sub2 === subscriber) {\n                this.sub2 = void 0;\n            }\n        }\n        else {\n            const index = spillover.indexOf(subscriber);\n            if (index !== -1) {\n                spillover.splice(index, 1);\n            }\n        }\n    }\n    /**\n     * Notifies all subscribers.\n     * @param args - Data passed along to subscribers during notification.\n     */\n    notify(args) {\n        const spillover = this.spillover;\n        const source = this.source;\n        if (spillover === void 0) {\n            const sub1 = this.sub1;\n            const sub2 = this.sub2;\n            if (sub1 !== void 0) {\n                sub1.handleChange(source, args);\n            }\n            if (sub2 !== void 0) {\n                sub2.handleChange(source, args);\n            }\n        }\n        else {\n            for (let i = 0, ii = spillover.length; i < ii; ++i) {\n                spillover[i].handleChange(source, args);\n            }\n        }\n    }\n}\n/**\n * An implementation of Notifier that allows subscribers to be notified\n * of individual property changes on an object.\n * @public\n */\nexport class PropertyChangeNotifier {\n    /**\n     * Creates an instance of PropertyChangeNotifier for the specified source.\n     * @param source - The object source that subscribers will receive notifications from.\n     */\n    constructor(source) {\n        this.subscribers = {};\n        this.sourceSubscribers = null;\n        this.source = source;\n    }\n    /**\n     * Notifies all subscribers, based on the specified property.\n     * @param propertyName - The property name, passed along to subscribers during notification.\n     */\n    notify(propertyName) {\n        var _a;\n        const subscribers = this.subscribers[propertyName];\n        if (subscribers !== void 0) {\n            subscribers.notify(propertyName);\n        }\n        (_a = this.sourceSubscribers) === null || _a === void 0 ? void 0 : _a.notify(propertyName);\n    }\n    /**\n     * Subscribes to notification of changes in an object's state.\n     * @param subscriber - The object that is subscribing for change notification.\n     * @param propertyToWatch - The name of the property that the subscriber is interested in watching for changes.\n     */\n    subscribe(subscriber, propertyToWatch) {\n        var _a;\n        if (propertyToWatch) {\n            let subscribers = this.subscribers[propertyToWatch];\n            if (subscribers === void 0) {\n                this.subscribers[propertyToWatch] = subscribers = new SubscriberSet(this.source);\n            }\n            subscribers.subscribe(subscriber);\n        }\n        else {\n            this.sourceSubscribers =\n                (_a = this.sourceSubscribers) !== null && _a !== void 0 ? _a : new SubscriberSet(this.source);\n            this.sourceSubscribers.subscribe(subscriber);\n        }\n    }\n    /**\n     * Unsubscribes from notification of changes in an object's state.\n     * @param subscriber - The object that is unsubscribing from change notification.\n     * @param propertyToUnwatch - The name of the property that the subscriber is no longer interested in watching.\n     */\n    unsubscribe(subscriber, propertyToUnwatch) {\n        var _a;\n        if (propertyToUnwatch) {\n            const subscribers = this.subscribers[propertyToUnwatch];\n            if (subscribers !== void 0) {\n                subscribers.unsubscribe(subscriber);\n            }\n        }\n        else {\n            (_a = this.sourceSubscribers) === null || _a === void 0 ? void 0 : _a.unsubscribe(subscriber);\n        }\n    }\n}\n","import { FAST } from \"../platform.js\";\nimport { Observable } from \"../observation/observable.js\";\nimport { ElementStyles } from \"../styles/element-styles.js\";\nimport { AttributeDefinition } from \"./attributes.js\";\nconst defaultShadowOptions = { mode: \"open\" };\nconst defaultElementOptions = {};\nconst fastRegistry = FAST.getById(4 /* elementRegistry */, () => {\n    const typeToDefinition = new Map();\n    return Object.freeze({\n        register(definition) {\n            if (typeToDefinition.has(definition.type)) {\n                return false;\n            }\n            typeToDefinition.set(definition.type, definition);\n            return true;\n        },\n        getByType(key) {\n            return typeToDefinition.get(key);\n        },\n    });\n});\n/**\n * Defines metadata for a FASTElement.\n * @public\n */\nexport class FASTElementDefinition {\n    /**\n     * Creates an instance of FASTElementDefinition.\n     * @param type - The type this definition is being created for.\n     * @param nameOrConfig - The name of the element to define or a config object\n     * that describes the element to define.\n     */\n    constructor(type, nameOrConfig = type.definition) {\n        if (typeof nameOrConfig === \"string\") {\n            nameOrConfig = { name: nameOrConfig };\n        }\n        this.type = type;\n        this.name = nameOrConfig.name;\n        this.template = nameOrConfig.template;\n        const attributes = AttributeDefinition.collect(type, nameOrConfig.attributes);\n        const observedAttributes = new Array(attributes.length);\n        const propertyLookup = {};\n        const attributeLookup = {};\n        for (let i = 0, ii = attributes.length; i < ii; ++i) {\n            const current = attributes[i];\n            observedAttributes[i] = current.attribute;\n            propertyLookup[current.name] = current;\n            attributeLookup[current.attribute] = current;\n        }\n        this.attributes = attributes;\n        this.observedAttributes = observedAttributes;\n        this.propertyLookup = propertyLookup;\n        this.attributeLookup = attributeLookup;\n        this.shadowOptions =\n            nameOrConfig.shadowOptions === void 0\n                ? defaultShadowOptions\n                : nameOrConfig.shadowOptions === null\n                    ? void 0\n                    : Object.assign(Object.assign({}, defaultShadowOptions), nameOrConfig.shadowOptions);\n        this.elementOptions =\n            nameOrConfig.elementOptions === void 0\n                ? defaultElementOptions\n                : Object.assign(Object.assign({}, defaultElementOptions), nameOrConfig.elementOptions);\n        this.styles =\n            nameOrConfig.styles === void 0\n                ? void 0\n                : Array.isArray(nameOrConfig.styles)\n                    ? ElementStyles.create(nameOrConfig.styles)\n                    : nameOrConfig.styles instanceof ElementStyles\n                        ? nameOrConfig.styles\n                        : ElementStyles.create([nameOrConfig.styles]);\n    }\n    /**\n     * Indicates if this element has been defined in at least one registry.\n     */\n    get isDefined() {\n        return !!fastRegistry.getByType(this.type);\n    }\n    /**\n     * Defines a custom element based on this definition.\n     * @param registry - The element registry to define the element in.\n     */\n    define(registry = customElements) {\n        const type = this.type;\n        if (fastRegistry.register(this)) {\n            const attributes = this.attributes;\n            const proto = type.prototype;\n            for (let i = 0, ii = attributes.length; i < ii; ++i) {\n                Observable.defineProperty(proto, attributes[i]);\n            }\n            Reflect.defineProperty(type, \"observedAttributes\", {\n                value: this.observedAttributes,\n                enumerable: true,\n            });\n        }\n        if (!registry.get(this.name)) {\n            registry.define(this.name, type, this.elementOptions);\n        }\n        return this;\n    }\n}\n/**\n * Gets the element definition associated with the specified type.\n * @param type - The custom element type to retrieve the definition for.\n */\nFASTElementDefinition.forType = fastRegistry.getByType;\n"],"sourceRoot":"","x_microsoft_symbol_client_key":"faf076a1ecbed06e181c657a788c5396e6c0269dc1259f76b0df4e20360d9f29"}