-var t;const e=window,i=e.trustedTypes,s=i?i.createPolicy("lit-html",{createHTML:t=>t}):void 0,n="$lit$",o=`lit$${(Math.random()+"").slice(9)}$`,l="?"+o,r=`<${l}>`,h=document,u=()=>h.createComment(""),d=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,a="[ \t\n\f\r]",A=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,c=/-->/g,_=/>/g,v=RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,f=/^(?:script|style|textarea|title)$/i,m=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),y=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),x=new WeakMap,N=h.createTreeWalker(h,129,null,!1);function P(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(e):e}const V=(t,e)=>{const i=t.length-1,s=[];let l,h=2===e?"<svg>":"",$=A;for(let e=0;e<i;e++){const i=t[e];let a,m,y=-1,H=0;for(;H<i.length&&($.lastIndex=H,m=$.exec(i),null!==m);)H=$.lastIndex,$===A?"!--"===m[1]?$=c:void 0!==m[1]?$=_:void 0!==m[2]?(f.test(m[2])&&(l=RegExp("</"+m[2],"g")),$=v):void 0!==m[3]&&($=v):$===v?">"===m[0]?($=null!=l?l:A,y=-1):void 0===m[1]?y=-2:(y=$.lastIndex-m[2].length,a=m[1],$=void 0===m[3]?v:'"'===m[3]?g:p):$===g||$===p?$=v:$===c||$===_?$=A:($=v,l=void 0);const x=$===v&&t[e+1].startsWith("/>")?" ":"";h+=$===A?i+r:y>=0?(s.push(a),i.slice(0,y)+n+i.slice(y)+o+x):i+o+(-2===y?(s.push(void 0),e):x)}return[P(t,h+(t[i]||"<?>")+(2===e?"</svg>":"")),s]};class b{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let h=0,$=0;const a=t.length-1,A=this.parts,[c,_]=V(t,e);if(this.el=b.createElement(c,s),N.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=N.nextNode())&&A.length<a;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith(n)||e.startsWith(o)){const i=_[$++];if(t.push(e),void 0!==i){const t=r.getAttribute(i.toLowerCase()+n).split(o),e=/([.?@])?(.*)/.exec(i);A.push({type:1,index:h,name:e[2],strings:t,ctor:"."===e[1]?M:"?"===e[1]?I:"@"===e[1]?B:w})}else A.push({type:6,index:h})}for(const e of t)r.removeAttribute(e)}if(f.test(r.tagName)){const t=r.textContent.split(o),e=t.length-1;if(e>0){r.textContent=i?i.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],u()),N.nextNode(),A.push({type:2,index:++h});r.append(t[e],u())}}}else if(8===r.nodeType)if(r.data===l)A.push({type:2,index:h});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)A.push({type:7,index:h}),t+=o.length-1}h++}}static createElement(t,e){const i=h.createElement("template");return i.innerHTML=t,i}}function S(t,e,i=t,s){var n,o,l,r;if(e===y)return e;let h=void 0!==s?null===(n=i._$Co)||void 0===n?void 0:n[s]:i._$Cl;const $=d(e)?void 0:e._$litDirective$;return(null==h?void 0:h.constructor)!==$&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===$?h=void 0:(h=new $(t),h._$AT(t,i,s)),void 0!==s?(null!==(l=(r=i)._$Co)&&void 0!==l?l:r._$Co=[])[s]=h:i._$Cl=h),void 0!==h&&(e=S(t,h._$AS(t,e.values),h,s)),e}class C{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:h).importNode(i,!0);N.currentNode=n;let o=N.nextNode(),l=0,r=0,$=s[0];for(;void 0!==$;){if(l===$.index){let e;2===$.type?e=new T(o,o.nextSibling,this,t):1===$.type?e=new $.ctor(o,$.name,$.strings,this,t):6===$.type&&(e=new U(o,this,t)),this._$AV.push(e),$=s[++r]}l!==(null==$?void 0:$.index)&&(o=N.nextNode(),l++)}return N.currentNode=h,n}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class T{constructor(t,e,i,s){var n;this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=null===(n=null==s?void 0:s.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),d(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):t!==this._$AH&&t!==y&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>$(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==H&&d(this._$AH)?this._$AA.nextSibling.data=t:this.$(h.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,n="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=b.createElement(P(s.h,s.h[0]),this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.v(i);else{const t=new C(n,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=x.get(t.strings);return void 0===e&&x.set(t.strings,e=new b(t)),e}T(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new T(this.k(u()),this.k(u()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class w{constructor(t,e,i,s,n){this.type=1,this._$AH=H,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const n=this.strings;let o=!1;if(void 0===n)t=S(this,t,e,0),o=!d(t)||t!==this._$AH&&t!==y,o&&(this._$AH=t);else{const s=t;let l,r;for(t=n[0],l=0;l<n.length-1;l++)r=S(this,s[i+l],e,l),r===y&&(r=this._$AH[l]),o||(o=!d(r)||r!==this._$AH[l]),r===H?t=H:t!==H&&(t+=(null!=r?r:"")+n[l+1]),this._$AH[l]=r}o&&!s&&this.j(t)}j(t){t===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends w{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===H?void 0:t}}const E=i?i.emptyScript:"";class I extends w{constructor(){super(...arguments),this.type=4}j(t){t&&t!==H?this.element.setAttribute(this.name,E):this.element.removeAttribute(this.name)}}class B extends w{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=S(this,t,e,0))&&void 0!==i?i:H)===y)return;const s=this._$AH,n=t===H&&s!==H||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==H&&(s===H||n);n&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class U{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const R=e.litHtmlPolyfillSupport;null==R||R(b,T),(null!==(t=e.litHtmlVersions)&&void 0!==t?t:e.litHtmlVersions=[]).push("2.8.0");const D=(t,e,i)=>{var s,n;const o=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let l=o._$litPart$;if(void 0===l){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;o._$litPart$=l=new T(e.insertBefore(u(),t),t,void 0,null!=i?i:{})}return l._$AI(t),l};export{m as html,D as renderer};
0 commit comments