/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
import{_$LH as e}from"./lit-html.js";const{_ChildPart:t}=e,o=window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch?window.ShadyDOM.wrap:e=>e;export const isPrimitive=e=>null===e||"object"!=typeof e&&"function"!=typeof e;export const TemplateResultType={HTML:1,SVG:2,MATHML:3};export const isTemplateResult=(e,t)=>void 0===t?void 0!==e?._$litType$:e?._$litType$===t;export const isCompiledTemplateResult=e=>null!=e?._$litType$?.h;export const isDirectiveResult=e=>void 0!==e?._$litDirective$;export const getDirectiveClass=e=>e?._$litDirective$;export const isSingleExpression=e=>void 0===e.strings;const createMarker=()=>document.createComment("");export const insertPart=(e,n,i)=>{const s=o(e._$startNode).parentNode,r=void 0===n?e._$endNode:n._$startNode;if(void 0===i){const n=o(s).insertBefore(createMarker(),r),c=o(s).insertBefore(createMarker(),r);i=new t(n,c,e,e.options)}else{const t=o(i._$endNode).nextSibling,n=i._$parent,c=n!==e;if(c){let t;i._$reparentDisconnectables?.(e),i._$parent=e,void 0!==i._$notifyConnectionChanged&&(t=e._$isConnected)!==n._$isConnected&&i._$notifyConnectionChanged(t)}if(t!==r||c){let e=i._$startNode;for(;e!==t;){const t=o(e).nextSibling;o(s).insertBefore(e,r),e=t}}}return i};export const setChildPartValue=(e,t,o=e)=>(e._$setValue(t,o),e);const n={};export const setCommittedValue=(e,t=n)=>e._$committedValue=t;export const getCommittedValue=e=>e._$committedValue;export const removePart=e=>{e._$notifyConnectionChanged?.(!1,!0);let t=e._$startNode;const n=o(e._$endNode).nextSibling;for(;t!==n;){const e=o(t).nextSibling;o(t).remove(),t=e}};export const clearPart=e=>{e._$clear()};