@verajs/renderer 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -6
- package/dist/development/vera-renderer-hydrate.js +185 -50
- package/dist/development/vera-renderer-hydrate.js.map +1 -1
- package/dist/development/vera-renderer-profiler.js +185 -50
- package/dist/development/vera-renderer-profiler.js.map +1 -1
- package/dist/development/vera-renderer-spread.d.ts +32 -42
- package/dist/development/vera-renderer-spread.d.ts.map +1 -1
- package/dist/development/vera-renderer-spread.js +140 -6
- package/dist/development/vera-renderer-spread.js.map +1 -1
- package/dist/development/vera-renderer-tag.js +107 -5
- package/dist/development/vera-renderer-tag.js.map +1 -1
- package/dist/development/vera-renderer.js +185 -50
- package/dist/development/vera-renderer.js.map +1 -1
- package/dist/vera-renderer-hydrate.min.js +1 -1
- package/dist/vera-renderer-hydrate.min.js.map +1 -1
- package/dist/vera-renderer-spread.min.js +1 -1
- package/dist/vera-renderer-spread.min.js.map +1 -1
- package/dist/vera-renderer-tag.min.js +1 -1
- package/dist/vera-renderer-tag.min.js.map +1 -1
- package/dist/vera-renderer.min.js +1 -1
- package/dist/vera-renderer.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const t=t=>null!=t&&"object"==typeof t&&g(t)?{$h:t}:t,s="$v"+(1e9*Math.random()>>>0).toString(36)+"$",i="?"+s,n=document,l=(t="")=>n.createComment(t),e=n.createTreeWalker(n,129),o=n.createTreeWalker(n,5),h=/^(?:script|style|textarea|title|iframe|noscript)$/i,r=/[\s"'>=/]/;let c=null;new Set;const f=new WeakMap;class u{t;i=[];constructor(t){const c=t._$litType$??1,{markup:f,specs:u}=(t=>{const i=[];let n="",l=0,e="",o=0,c="",f=0,u=!1,a="",_=[],d="";const p=t=>{let s=t;for(;s>0&&!r.test(n[s-1]);)s--;return n.slice(s,t)};for(let r=0;r<t.length;r++){const v=t[r];let m=0;for(;m<v.length;){const t=v[m];if(5===l){if(t===e||""===e&&(" "===t||"\t"===t||"\n"===t||"\r"===t||">"===t||"/"===t)){_.push(d);const t=e||'"';n+=` ${i.length}${s}=${t}${_.join(s)}${t}`,i.push({l:1,o:a}),l=1,""!==e&&m++;continue}d+=t,m++}else if(0===l){if("<"===t){if(v.startsWith("!--",m+1)){l=3,n+="\x3c!--",m+=4;continue}u="/"===v[m+1],f=n.length+(u?2:1),l=1}n+=t,m++}else if(1===l){if('"'===t||"'"===t)e=t,o=n.length,l=2;else if(">"===t){const t=n.slice(f).match(/^[a-zA-Z][^\s/>]*/)?.[0]??"";u||!h.test(t)||n.endsWith("/")?l=0:(c=t.toLowerCase(),l=4)}n+=t,m++}else if(2===l)t===e&&(l=1),n+=t,m++;else if(3===l){if("-"===t&&v.startsWith("->",m+1)){n+="--\x3e",m+=3,l=0;continue}n+=t,m++}else"<"===t&&v.slice(m+1,m+2+c.length).toLowerCase()==="/"+c&&(m+2+c.length>=v.length||/[\s/>]/.test(v[m+2+c.length]))&&(u=!0,f=n.length+2,l=1),n+=t,m++}if(r===t.length-1)break;if(0===l)n+=`<?${s}>`,i.push({l:0});else if(4===l)n+=s,i.push({l:0});else if(3===l)i.push({l:2});else if(5===l)_.push(d),d="";else if(2===l){const t="="===n[o-1]?p(o-1):"";t?(a=t,_=[n.slice(o+1)],d="",n=n.slice(0,o-1-t.length),l=5):i.push({l:2})}else{const t=n.endsWith("=")?p(n.length-1):"";t?(a=t,_=[""],d="",e="",n=n.slice(0,n.length-1-t.length),l=5):(n+=` ${i.length}${s}="${s}"`,i.push({l:1,o:"&"}))}}return{markup:n,specs:i}})(t.strings);this.t=n.createElement("template"),this.t.innerHTML=2===c?`<svg>${f}</svg>`:3===c?`<math>${f}</math>`:f;const a=this.t.content;if(1!==c){const t=a.firstChild;for(;t.firstChild;)a.insertBefore(t.firstChild,t);a.removeChild(t)}e.currentNode=a;let _,d=0;const p=this.i,v=()=>{for(;d<u.length&&2===u[d].l;)p.push({l:2,h:-1}),d++};for(v();d<u.length&&null!==(_=e.nextNode());)if(1===_.nodeType){const t=_;if(t.hasAttributes())for(const i of t.getAttributeNames())if(i.endsWith(s)){const n=parseInt(i,10);if(n>d)do{p.push({l:2,h:-1})}while(++d<n);const l=u[d++];p.push({l:1,h:-1,o:l.o,u:t.getAttribute(i).split(s),_:t.hasAttribute(l.o),p:t}),t.removeAttribute(i),v()}if(h.test(t.tagName)&&t.textContent.includes(s)){const n=t.textContent.split(s);t.textContent="";for(let s=0;s<n.length-1;s++)n[s]&&t.append(n[s]),t.append(l(i));n[n.length-1]&&t.append(n[n.length-1])}}else if(_.data===i){d++;const t=n.createTextNode("");_.parentNode.insertBefore(t,_),e.currentNode=t,_.remove(),p.push({l:0,h:-1,p:t}),v()}o.currentNode=a;let m=-1,y=0;for(;y<p.length&&2===p[y].l;)y++;for(;y<p.length&&null!==(_=o.nextNode());)for(m++;y<p.length&&p[y].p===_;)for(p[y].h=m,y++;y<p.length&&2===p[y].l;)y++;for(const t of p)t.p=void 0;const w=I();if(void 0!==w){o.currentNode=a;let t=-1;for(;null!==(_=o.nextNode());)t++,"slot"===_.localName&&(this.v=w,(this.m??=[]).push(t))}}}const a=t=>{let s=f.get(t.strings);return void 0===s&&f.set(t.strings,s=new u(t)),s},_={$:(t,s)=>s+1},d={},p=(t,s)=>{const i=l(),n=l();return t.insertBefore(i,s),t.insertBefore(n,s),new F(i,n)},v=t=>null==t?"":`${t}`,m=(t,s)=>{try{t(s)}catch(t){console.error("[vera] ref threw",t)}};class y{t;o;u;m;k;j;S=d;A=null;M=!1;_;constructor(t,s,i,n=!1){const l=s[0];let e="."===l?1:"?"===l?2:"@"===l?4:"&"===l?5:"!"===l?3:0,o=e?s.slice(1):s;1!==e&&3!==e||"__proto__"!==o||(e=-1),0===e&&"o"===l&&110===s.charCodeAt(1)&&s.charCodeAt(2)>64&&s.charCodeAt(2)<91&&(e=4,o=s.slice(2).toLowerCase()),this.k=e,this.o=o,this.t=t,this.u=i,this.m=i.length-1,this.j=1===this.m&&""===i[0]&&""===i[1],this.M=1===e&&"value"===o&&"select"===t.localName,this._=n}I(){const t=this.S;"function"==typeof t?m(t,null):null!==t&&"object"==typeof t&&void 0===t._$apply$&&(t.value=null),this.S=d}handleEvent(t){const s=this.A;"function"==typeof s?s.call(this.t,t):"function"==typeof s?.handleEvent&&s.handleEvent(t)}$(t,s,i){const n=this.k;if(-1===n)return s+this.m;let l;if(this.j||n>=4)l=t[s];else{const i=this.u;let n=i[0];for(let l=0;l<this.m;l++)n+=v(t[s+l])+i[l+1];l=n}if(3===n){if(this.S=l,!i){const t=this.t;t[this.o]!==l&&(t[this.o]=l)}return s+this.m}if(this.M)return this.S=l,i||(w??=[]).push(this.t,l),s+this.m;if(l!==this.S){if(0===n)null==l?(this._||this.S!==d)&&this.t.removeAttribute(this.o):this.t.setAttribute(this.o,l);else if(1===n){const t=this.t,n=this.o;if(i&&("value"===n||"checked"===n||"selected"===n))return this.S=l,s+this.m;t[n]=l}else if(2===n)this.t.toggleAttribute(this.o,!!l);else if(4===n)null===this.A&&null!=l&&this.t.addEventListener(this.o,this),this.A=l??null;else if(null!=l)if(L=!0,"function"==typeof l)m(l,this.t);else if("object"==typeof l){const t=l;t._$apply$?t._$apply$(this.t,this):t.value=this.t}this.S=l}return s+this.m}}let w=null;const $=n.createDocumentFragment(),b={value:!0,enumerable:!1,configurable:!0,writable:!0},k=(t,s=!0)=>{if(b.value=s,11!==t.nodeType)Object.defineProperty(t,"_$own$",b);else for(let s=t.firstChild;null!==s;s=s.nextSibling)Object.defineProperty(s,"_$own$",b)},j=t=>{t.W?.O(),t.F?.L()};class x{i=[];H;constructor(t){this.H=n.importNode(t.t.content,!0);const s=t.i;o.currentNode=this.H;let i=-1,l=null;for(let t=0;t<s.length;t++){const n=s[t];if(2!==n.l){for(;i<n.h;)l=o.nextNode(),i++;this.i.push(0===n.l?new S(l):new y(l,n.o,n.u,n._))}else this.i.push(_)}if(void 0!==t.v&&null!==c){const s=t.m;o.currentNode=this.H,i=-1;const n=[];for(let t=0;t<s.length;t++){for(;i<s[t];)l=o.nextNode(),i++;n.push(l)}this.N=n}}O(){const t=this.i;for(let s=0;s<t.length;s++){const i=t[s];5===i.k&&i.I(),i.V?.L()}this.Z?.forEach((t=>t._$park$?.()))}q(t){let s=0;const i=this.i;for(let n=0;n<i.length;n++)s=i[n].$(t,s);void 0!==this.N&&this.B()}B(){const t=this.N;this.N=void 0;const s=c,i=I();if(void 0!==i&&null!==s)for(let n=0;n<t.length;n++){const l=t[n],e=i(l,s,l.getAttribute("name")??"");null!=e&&((this.Z??=[]).push(e),L=!0)}}}const g=t=>void 0!==t.strings;class S{C;D="";V=null;constructor(t){this.C=t}$(t,s){const i=t[s];if(null!==this.V)return this.V.G(i),s+1;if(null==i||"object"==typeof i){const t=l(),n=l(),e=I()?._$home$?.(this.C)??null,o=null!==e?e.parentNode:this.C.parentNode;null!==e?(o.insertBefore(t,e),o.insertBefore(n,e)):(o.insertBefore(t,this.C),o.insertBefore(n,this.C.nextSibling));const h=new F(t,n);return h.J=E,h.C=this.C,h.D=this.D,this.V=h,h.G(i),s+1}return i!==this.D&&(this.D=i,this.C.data=i),s+1}}let A=null,M=!1;const I=()=>{const t=A?.get("slot")?.[0];return void 0!==t&&(M=!0),t},O=[],W=[];let L=!1;const z=()=>{L=!0},E=1;class F{K;P;J=0;D;C=null;W=null;R=null;T=null;U=!1;X=null;Y=void 0;tt=void 0;constructor(t,s){this.K=t,this.P=s}$(t,s){return this.G(t[s]),s+1}st(t){const s=this.K.parentNode;M&&!0===s._$hosted$&&k(t,null===this.P||this),s.insertBefore(t,this.P)}L(){void 0!==this.tt&&this.tt._$detach$?.(this.Y),this.W?.O();const t=this.T;if(null!=t)for(let s=0;s<t.length;s++)j(t[s])}it(){L&&this.L();const t=this.K.parentNode,s=this.P,i=this.T;if(this.K.nextSibling===s&&0!==this.J)if(null!==i){for(const t of i)null!==t&&this.$m(t,null,$);$.textContent=""}else if(this.J===E)this.C?.remove();else if(2===this.J){if(Array.isArray(this.D))for(const t of this.D)t.remove()}else 4===this.J&&"function"==typeof this.D.remove&&this.D.remove();else if(null!==this.K.previousSibling||null!==s&&null!==s.nextSibling){let s=this.K.nextSibling;for(;null!==s&&s!==this.P;){const i=s.nextSibling;t.removeChild(s),s=i}}else t.textContent="",t.appendChild(this.K),null!==s&&t.appendChild(s);this.J=0,this.C=null,this.W=null,this.T=null,this.R=null,this.Y=void 0,this.tt=void 0}_$commit$(t){const s=this.Y,i=this.tt;this.G(t),this.Y=s,this.tt=i}G(t){if(null==t)return void(0!==this.J&&this.it());if("object"!=typeof t)return void(this.J===E?this.D!==t&&(this.D=t,this.C.data=t):(0!==this.J&&this.it(),this.C=n.createTextNode(t),this.st(this.C),this.D=t,this.J=E));const s=t.$h;if(void 0!==s)return void this.nt(s);if(g(t)){if(this.R===t.strings)return void this.W.q(t.values);const s=a(t);0!==this.J&&this.it();const i=new x(s);return i.q(t.values),this.D=[...i.H.childNodes],this.st(i.H),this.W=i,this.R=t.strings,void(this.J=2)}const i=A?A.get("value")??O:O;for(let s=0;s<i.length;s++)if(i[s](this,t))return;for(let s=0;s<W.length;s++)if(W[s](this,t))return;const l=t._$child$;if(void 0!==l){const s=this.tt===l?this.Y:void 0;return this.tt=l,void 0!==l._$detach$&&(L=!0),void(this.Y=l.call(t,this,s))}void 0===t.nodeType?this.G(String(t)):4===this.J&&this.D===t||(0!==this.J&&this.it(),this.st(t),this.D=t,this.J=4)}nt(t){if(2===this.J&&this.R===t.strings)return void this.W.q(t.values);const s=this.X??=new Map;if(2===this.J){const t=this.W.H;if(this.K.nextSibling===this.P&&Array.isArray(this.D))for(const s of this.D)t.appendChild(s);else{let s=this.K.nextSibling;for(;s!==this.P;){const i=s.nextSibling;t.appendChild(s),s=i}}s.set(this.R,this.W)}else 0!==this.J&&this.it();const i=s.get(t.strings)??new x(a(t));i.q(t.values),this.D=[...i.H.childNodes],this.st(i.H),this.W=i,this.R=t.strings,this.J=2}$c(t,s,i){const n=M&&!0===s._$hosted$?null===this.P||this:null;if(null!==t&&"object"==typeof t&&void 0!==t.strings){const l=t,e=a(l),o=new x(e);o.q(l.values);const h=o.H.firstChild;if(null!==h&&1===h.nodeType&&null===h.nextSibling)return null!==n&&k(h,n),s.insertBefore(h,i),{$k:l.key,t:h,W:o,R:l.strings,F:null};const r=p(s,i);return r.W=o,r.R=l.strings,r.J=2,r.D=[...o.H.childNodes],null!==n&&k(o.H,n),r.K.parentNode.insertBefore(o.H,r.P),{$k:l.key,t:null,W:null,R:null,F:r}}const l=p(s,i);return l.G(t),{$k:t?.key,t:null,W:null,R:null,F:l}}$u(t,s){if(null!==t.t){if(null!==s&&"object"==typeof s&&s.strings===t.R)return void t.W.q(s.values);const i=p(t.t.parentNode,t.t);return t.t.remove(),t.t=null,t.W=null,t.R=null,void(t.F=i).G(s)}t.F.G(s)}$f(t){return t.t??t.F.K}$m(t,s,i=this.K.parentNode){const n=t.t??t.F.P;if(n.nextSibling===s&&n.parentNode===i)return;if(null!==t.t)return void i.insertBefore(t.t,s);let l=t.F.K;const e=t.F.P.nextSibling;for(;l!==e;){const t=l.nextSibling;i.insertBefore(l,s),l=t}}$d(t){L&&j(t),this.$m(t,null,$),$.textContent=""}lt(t){3!==this.J&&(0!==this.J&&this.it(),this.T=[],this.U=!1,this.J=3);const s=t.length;if(0===s)return void(this.T.length&&(this.it(),this.T=[],this.J=3));const i=null!=t[0]&&void 0!==t[0].$r;i!==this.U&&this.T.length&&(this.it(),this.T=[],this.J=3),this.U=i;const l=this.T;if(0!==l.length)if(i)this.T=t[0].$r(this,t,l,this.K.parentNode,this.P);else{const i=l.length<s?l.length:s;for(let s=0;s<i;s++)this.$u(l[s],t[s]);if(s>l.length){const i=n.createDocumentFragment();for(let n=l.length;n<s;n++)l.push(this.$c(t[n],i,null));this.st(i)}else if(s<l.length){if(L)for(let t=s;t<l.length;t++)j(l[t]);for(let t=s;t<l.length;t++)this.$m(l[t],null,$);$.textContent="",l.length=s}}else{const i=n.createDocumentFragment();for(let n=0;n<s;n++)l.push(this.$c(t[n],i,null));this.st(i)}}}const H=new WeakMap,N=(t,s)=>{let i=H.get(s);if(void 0===i){const t=l();s.appendChild(t),1===s.nodeType&&I()?._$capture$?.(s,t),H.set(s,i=new F(t,null))}c=s;try{i.G(t)}finally{c=null,(()=>{const t=w;if(null!==t){w=null;for(let s=0;s<t.length;s+=2)t[s].value=t[s+1]}})()}};W.push(((t,s)=>Array.isArray(s)?(t.lt(s),!0):null!==s&&"function"==typeof s[Symbol.iterator]&&(t.lt([...s]),!0)));const V={name:"@verajs/renderer",on:"render",fn:N,priority:50,connect:t=>{A=t}},Z={},q=t=>(t.offset>0&&(t.node=t.node.splitText(t.offset),t.offset=0),t.node),B=t=>{for(;0===t.offset&&null!==t.node&&8===t.node.nodeType;)t.node=t.node.nextSibling},C=new WeakMap;let D=null,G=!1,J=[];const K=(t,s)=>{const i=s.et.i;for(let l=t.firstChild;null!==l;l=l.nextSibling)if(1===l.nodeType||3===l.nodeType){for(s.ot++;s.ht<i.length&&i[s.ht].h===s.ot;)s.rt+=1===(n=i[s.ht]).l?n.u.length-1:1,s.ht++;1===l.nodeType&&K(l,s)}var n},P=(t,s,i)=>{i.ot++;const n=i.et.i;if(3===t.nodeType){let l=!1;for(;i.ht<n.length&&n[i.ht].h===i.ot;)l=!0,i.ht++,R(s,i.ct[i.rt++],i.ft),Q(i);return void(l||((t,s)=>{let i=s;for(;i.length>0;){B(t);const s=t.node;if(null===s||3!==s.nodeType)throw Z;const n=s.data,l=n.length-t.offset;if(0===l){t.node=s.nextSibling,t.offset=0;continue}const e=l<i.length?l:i.length;if(n.slice(t.offset,t.offset+e)!==i.slice(0,e))throw Z;i=i.slice(e),t.offset+=e,t.offset===n.length&&(t.node=s.nextSibling,t.offset=0)}})(s,t.data))}if(void 0!==i.et.v&&"slot"===t.localName)return void((t,s,i)=>{const n=i.et.v._$adopt$,l=t.cloneNode(!1),e=i.et.i;for(;i.ht<e.length&&e[i.ht].h===i.ot;){const t=e[i.ht++],s=new y(l,t.o,t.u,t._);i.ft.push(s),i.rt=s.$(i.ct,i.rt,!0),Q(i)}const o=l.getAttribute("name")??"";B(s);const h=s.parent,r=[];if(""!==o){let t=q(s);for(;null!==t&&1===t.nodeType&&t.getAttribute("slot")===o;)r.push(t),s.node=t.nextSibling,t=q(s)}else if(!G){const t=h.getAttribute?.("data-vm-slotted"),i=null==t?0:Number(t.slice(t.indexOf(",")+1));if(i>0){G=!0,h.removeAttribute("data-vm-slotted");for(let t=0;t<i;t++){const t=q(s);if(null===t)break;r.push(t),s.node=t.nextSibling}}}if(r.length>0){const e=s.node,c=[];for(let s=t.firstChild;null!==s;s=s.nextSibling)1!==s.nodeType&&3!==s.nodeType||c.push(s.cloneNode(!0));K(t,i);const f=n(D,o,r,c,h,e,l);J.push(f),(i.Z??=[]).push(f),z()}else{const e=s.node;for(let n=t.firstChild;null!==n;n=n.nextSibling)1!==n.nodeType&&3!==n.nodeType||P(n,s,i);const r=[];for(let t=e;null!==t&&t!==s.node;t=t.nextSibling)r.push(t);const c=n(D,o,null,r,h,s.node,l);J.push(c),(i.Z??=[]).push(c),z()}})(t,s,i);B(s);const l=q(s);if(null===l||1!==l.nodeType)throw Z;if(l.localName!==t.localName)throw Z;for(;i.ht<n.length&&n[i.ht].h===i.ot;){const t=n[i.ht++],s=new y(l,t.o,t.u,t._);i.ft.push(s),i.rt=s.$(i.ct,i.rt,!0),Q(i)}const e={parent:l,node:l.firstChild,offset:0};let o=t.firstChild;for(;null!==o;)1!==o.nodeType&&3!==o.nodeType||P(o,e,i),o=o.nextSibling;if(null!==e.node&&3===e.node.nodeType&&null===e.node.nextSibling&&null===t.firstChild&&"textarea"===l.localName&&(e.node=null),B(e),null!==e.node&&(3!==e.node.nodeType||""!==e.node.data||null!==e.node.nextSibling))throw Z;s.node=l.nextSibling,s.offset=0},Q=t=>{const s=t.et.i;for(;t.ht<s.length&&2===s[t.ht].l;)t.ft.push(_),t.rt++,t.ht++},R=(t,s,i)=>{const e=s?.$h,o=void 0!==e?e:s;if(null!=o&&("object"!=typeof o||!g(o)&&void 0===o.nodeType&&"function"!=typeof o[Symbol.iterator])){const s=new S(((t,s)=>{const i=q(t);if(""===s){const s=n.createTextNode("");return t.parent.insertBefore(s,i),s}if(null===i||3!==i.nodeType)throw Z;const l=i;if(l.data.length>s.length&&l.splitText(s.length),l.data!==s)throw Z;return t.node=l.nextSibling,t.offset=0,l})(t,v(o)));return s.D=o,void i.push(s)}const h=l();t.parent.insertBefore(h,q(t));const r=new F(h,null);if(null==o);else if(g(o))r.W=U(a(o),o.values,t),r.R=o.strings,r.J=2;else if(void 0!==o.nodeType)t.parent.insertBefore(o,q(t)),r.D=o,r.J=4;else{const s=Array.isArray(o)?o:[...o],i=[];for(const n of s)i.push(T(t,n));r.T=i,r.U=s.length>0&&void 0!==s[0]?.$r,r.J=3}const c=l();t.parent.insertBefore(c,q(t)),r.P=c,i.push(r)},T=(t,s)=>{if(null!==s&&"object"==typeof s&&void 0!==s.strings){const i=s,n=a(i),e=n.t.content.firstChild;if(null!==e&&1===e.nodeType&&null===e.nextSibling){const s=q(t),l=U(n,i.values,t);return{$k:i.key,t:s,W:l,R:i.strings,F:null}}const o=l();t.parent.insertBefore(o,q(t));const h=U(n,i.values,t),r=l();t.parent.insertBefore(r,q(t));const c=new F(o,r);return c.W=h,c.R=i.strings,c.J=2,{$k:i.key,t:null,W:null,R:null,F:c}}const i=[];return R(t,s,i),{$k:s?.key,t:null,W:null,R:null,F:i[0]}},U=(t,s,i)=>{const l=Object.create(x.prototype);l.i=[],l.H=n.createDocumentFragment();const e={et:t,ct:s,rt:0,ht:0,ot:-1,ft:l.i};Q(e),(t=>{let s=C.get(t);if(void 0===s){let i;for(s=[],o.currentNode=t.t.content;null!==(i=o.nextNode());)s.push(i);C.set(t,s)}})(t);let h=t.t.content.firstChild;for(;null!==h;)1!==h.nodeType&&3!==h.nodeType||P(h,i,e),h=h.nextSibling;if(Q(e),e.ht!==t.i.length)throw Z;return void 0!==e.Z&&(l.Z=e.Z),l},X=(t,s)=>{if(!H.has(s)&&null!==s.firstChild&&null!==t&&"object"==typeof t&&g(t)){const i=((t,s)=>{let i=s.firstChild;for(;null!==i&&1===i.nodeType&&i.hasAttribute("data-vm-sheet");)i=i.nextSibling;const n=l();s.insertBefore(n,i),D=1===s.nodeType?s:null,G=!1,J=[];try{const i={parent:s,node:n.nextSibling,offset:0},l=U(a(t),t.values,i);if(B(i),null!==i.node)throw Z;const e=new F(n,null);return e.W=l,e.R=t.strings,e.J=2,e}catch(t){if(t!==Z)throw t;for(const t of J)t._$park$();return J=[],n.remove(),null}})(t,s);if(null!==i)return void H.set(s,i);const n=1===s.nodeType?I()?._$rescue$?.(s):null;if((t=>{let s=t.firstChild;for(;null!==s;){const i=s.nextSibling;1===s.nodeType&&s.hasAttribute("data-vm-sheet")||t.removeChild(s),s=i}})(s),null!=n)for(const t of n)s.appendChild(t)}N(t,s)},Y={...V,fn:X};export{t as hold,X as renderInto,Y as renderer};
|
|
1
|
+
const t=t=>null!=t&&"object"==typeof t&&g(t)?{$h:t}:t,s="$v"+(1e9*Math.random()>>>0).toString(36)+"$",i="?"+s,n=document,e=(t="")=>n.createComment(t),l=n.createTreeWalker(n,129),o=n.createTreeWalker(n,5),h=/^(?:script|style|textarea|title|iframe|noscript)$/i,r=/[\s"'>=/]/;let c=null;new Set;const f=new WeakMap;class u{t;i=[];constructor(t){const c=t._$litType$??1,{markup:f,specs:u}=(t=>{const i=[];let n="",e=0,l="",o=0,c="",f=0,u=!1,a="",_=[],d="";const v=t=>{let s=t;for(;s>0&&!r.test(n[s-1]);)s--;return n.slice(s,t)};for(let r=0;r<t.length;r++){const p=t[r];let m=0;for(;m<p.length;){const t=p[m];if(5===e){if(t===l||""===l&&(" "===t||"\t"===t||"\n"===t||"\r"===t||">"===t||"/"===t)){_.push(d);const t=l||'"';n+=` ${i.length}${s}=${t}${_.join(s)}${t}`,i.push({l:1,o:a}),e=1,""!==l&&m++;continue}d+=t,m++}else if(0===e){if("<"===t){if(p.startsWith("!--",m+1)){e=3,n+="\x3c!--",m+=4;continue}u="/"===p[m+1],f=n.length+(u?2:1),e=1}n+=t,m++}else if(1===e){if('"'===t||"'"===t)l=t,o=n.length,e=2;else if(">"===t){const t=n.slice(f).match(/^[a-zA-Z][^\s/>]*/)?.[0]??"";u||!h.test(t)||n.endsWith("/")?e=0:(c=t.toLowerCase(),e=4)}n+=t,m++}else if(2===e)t===l&&(e=1),n+=t,m++;else if(3===e){if("-"===t&&p.startsWith("->",m+1)){n+="--\x3e",m+=3,e=0;continue}n+=t,m++}else"<"===t&&p.slice(m+1,m+2+c.length).toLowerCase()==="/"+c&&(m+2+c.length>=p.length||/[\s/>]/.test(p[m+2+c.length]))&&(u=!0,f=n.length+2,e=1),n+=t,m++}if(r===t.length-1)break;if(0===e)n+=`<?${s}>`,i.push({l:0});else if(4===e)n+=s,i.push({l:0});else if(3===e)i.push({l:2});else if(5===e)_.push(d),d="";else if(2===e){const t="="===n[o-1]?v(o-1):"";t?(a=t,_=[n.slice(o+1)],d="",n=n.slice(0,o-1-t.length),e=5):i.push({l:2})}else{const t=n.endsWith("=")?v(n.length-1):"";t?(a=t,_=[""],d="",l="",n=n.slice(0,n.length-1-t.length),e=5):(n+=` ${i.length}${s}="${s}"`,i.push({l:1,o:"&"}))}}return{markup:n,specs:i}})(t.strings);this.t=n.createElement("template"),this.t.innerHTML=2===c?`<svg>${f}</svg>`:3===c?`<math>${f}</math>`:f;const a=this.t.content;if(1!==c){const t=a.firstChild;for(;t.firstChild;)a.insertBefore(t.firstChild,t);a.removeChild(t)}l.currentNode=a;let _,d=0;const v=this.i,p=()=>{for(;d<u.length&&2===u[d].l;)v.push({l:2,h:-1}),d++};for(p();d<u.length&&null!==(_=l.nextNode());)if(1===_.nodeType){const t=_;if(t.hasAttributes())for(const i of t.getAttributeNames())if(i.endsWith(s)){const n=parseInt(i,10);if(n>d)do{v.push({l:2,h:-1})}while(++d<n);const e=u[d++];v.push({l:1,h:-1,o:e.o,u:t.getAttribute(i).split(s),_:t.hasAttribute(e.o),v:t}),t.removeAttribute(i),p()}if(h.test(t.tagName)&&t.textContent.includes(s)){const n=t.textContent.split(s);t.textContent="";for(let s=0;s<n.length-1;s++)n[s]&&t.append(n[s]),t.append(e(i));n[n.length-1]&&t.append(n[n.length-1])}}else if(_.data===i){d++;const t=n.createTextNode("");_.parentNode.insertBefore(t,_),l.currentNode=t,_.remove(),v.push({l:0,h:-1,v:t}),p()}o.currentNode=a;let m=-1,y=0;for(;y<v.length&&2===v[y].l;)y++;for(;y<v.length&&null!==(_=o.nextNode());)for(m++;y<v.length&&v[y].v===_;)for(v[y].h=m,y++;y<v.length&&2===v[y].l;)y++;for(const t of v)t.v=void 0;const w=I();if(void 0!==w){o.currentNode=a;let t=-1;for(;null!==(_=o.nextNode());)t++,"slot"===_.localName&&(this.p=w,(this.m??=[]).push(t))}}}const a=t=>{let s=f.get(t.strings);return void 0===s&&f.set(t.strings,s=new u(t)),s},_={$:(t,s)=>s+1},d={},v=(t,s)=>{const i=e(),n=e();return t.insertBefore(i,s),t.insertBefore(n,s),new H(i,n)},p=t=>null==t?"":`${t}`,m=(t,s,i)=>{const n=t;let e=n;for(;null!==e;){const t=Object.getOwnPropertyDescriptor(e,s);if(void 0!==t){if(void 0!==t.set)return n[s]=i,1;if(void 0!==t.get)return void 0!==n._$adopt$&&n._$adopt$(s,i),-1;break}e=Object.getPrototypeOf(e)}if(n[s]=i,void 0!==n._$adopt$)return n._$adopt$(s,i),1;const l=n._$props$??={};Object.hasOwn(l,s),l[s]=i;const o=t.ownerDocument.defaultView;return null===o||Object.getPrototypeOf(n)!==o.HTMLElement.prototype?1:0},y=(t,s)=>{try{t(s)}catch(t){console.error("[vera] ref threw",t)}};class w{t;o;u;m;j;k;O=d;S=null;A=!1;_;constructor(t,s,i,n=!1){const e=s[0];let l="."===e?1:"?"===e?2:"@"===e?4:"&"===e?5:"!"===e?3:0,o=l?s.slice(1):s;1!==l&&3!==l||"__proto__"!==o||(l=-1),0===l&&"o"===e&&110===s.charCodeAt(1)&&s.charCodeAt(2)>64&&s.charCodeAt(2)<91&&(l=4,o=s.slice(2).toLowerCase()),1===l&&t.localName.includes("-")&&(l=6),this.j=l,this.o=o,this.t=t,this.u=i,this.m=i.length-1,this.k=1===this.m&&""===i[0]&&""===i[1],this.A=1===l&&"value"===o&&"select"===t.localName,this._=n}M(){const t=this.O;"function"==typeof t?y(t,null):null!==t&&"object"==typeof t&&void 0===t._$apply$&&(t.value=null),this.O=d}handleEvent(t){const s=this.S;"function"==typeof s?s.call(this.t,t):"function"==typeof s?.handleEvent&&s.handleEvent(t)}$(t,s,i){const n=this.j;if(-1===n)return s+this.m;let e;if(this.k||n>=4)e=t[s];else{const i=this.u;let n=i[0];for(let e=0;e<this.m;e++)n+=p(t[s+e])+i[e+1];e=n}if(3===n){if(this.O=e,i)this.t.localName.includes("-")&&m(this.t,this.o,e);else{const t=this.t;t[this.o]!==e&&(t[this.o]=e)}return s+this.m}if(this.A)return this.O=e,i||($??=[]).push(this.t,e),s+this.m;if(e!==this.O){if(0===n)null==e?(this._||this.O!==d)&&this.t.removeAttribute(this.o):this.t.setAttribute(this.o,e);else if(1===n){const t=this.t,n=this.o;if(i&&("value"===n||"checked"===n||"selected"===n))return this.O=e,s+this.m;t[n]=e}else if(2===n)this.t.toggleAttribute(this.o,!!e);else if(4===n)null===this.S&&null!=e&&this.t.addEventListener(this.o,this),this.S=e??null;else if(6===n){const t=m(this.t,this.o,e);0!==t&&(this.j=t)}else if(null!=e)if(z=!0,"function"==typeof e)y(e,this.t);else if("object"==typeof e){const t=e;t._$apply$?t._$apply$(this.t,this):t.value=this.t}this.O=e}return s+this.m}}let $=null;const b=n.createDocumentFragment(),j={value:!0,enumerable:!1,configurable:!0,writable:!0},k=(t,s=!0)=>{if(j.value=s,11!==t.nodeType)Object.defineProperty(t,"_$own$",j);else for(let s=t.firstChild;null!==s;s=s.nextSibling)Object.defineProperty(s,"_$own$",j)},x=t=>{t.W?.I(),t.F?.L()};class O{i=[];H;constructor(t){this.H=n.importNode(t.t.content,!0);const s=t.i;o.currentNode=this.H;let i=-1,e=null;for(let t=0;t<s.length;t++){const n=s[t];if(2!==n.l){for(;i<n.h;)e=o.nextNode(),i++;this.i.push(0===n.l?new S(e):new w(e,n.o,n.u,n._))}else this.i.push(_)}if(void 0!==t.p&&null!==c){const s=t.m;o.currentNode=this.H,i=-1;const n=[];for(let t=0;t<s.length;t++){for(;i<s[t];)e=o.nextNode(),i++;n.push(e)}this.N=n}}I(){const t=this.i;for(let s=0;s<t.length;s++){const i=t[s];5===i.j&&i.M(),i.V?.L()}this.Z?.forEach((t=>t._$park$?.()))}q(t){let s=0;const i=this.i;for(let n=0;n<i.length;n++)s=i[n].$(t,s);void 0!==this.N&&this.B()}B(){const t=this.N;this.N=void 0;const s=c,i=I();if(void 0!==i&&null!==s)for(let n=0;n<t.length;n++){const e=t[n],l=i(e,s,e.getAttribute("name")??"");null!=l&&((this.Z??=[]).push(l),z=!0)}}}const g=t=>void 0!==t.strings;class S{C;D="";V=null;constructor(t){this.C=t}$(t,s){const i=t[s];if(null!==this.V)return this.V.G(i),s+1;if(null==i||"object"==typeof i){const t=e(),n=e(),l=I()?._$home$?.(this.C)??null,o=null!==l?l.parentNode:this.C.parentNode;null!==l?(o.insertBefore(t,l),o.insertBefore(n,l)):(o.insertBefore(t,this.C),o.insertBefore(n,this.C.nextSibling));const h=new H(t,n);return h.J=F,h.C=this.C,h.D=this.D,this.V=h,h.G(i),s+1}return i!==this.D&&(this.D=i,this.C.data=i),s+1}}let A=null,M=!1;const I=()=>{const t=A?.get("slot")?.[0];return void 0!==t&&(M=!0),t},W=[],L=[];let z=!1;const E=()=>{z=!0},F=1;class H{K;P;J=0;D;C=null;W=null;R=null;T=null;U=!1;X=null;Y=void 0;tt=void 0;constructor(t,s){this.K=t,this.P=s}$(t,s){return this.G(t[s]),s+1}st(t){const s=this.K.parentNode;M&&!0===s._$hosted$&&k(t,null===this.P||this),s.insertBefore(t,this.P)}L(){void 0!==this.tt&&this.tt._$detach$?.(this.Y),this.W?.I();const t=this.T;if(null!=t)for(let s=0;s<t.length;s++)x(t[s])}it(){z&&this.L();const t=this.K.parentNode,s=this.P,i=this.T;if(this.K.nextSibling===s&&0!==this.J)if(null!==i){for(const t of i)null!==t&&this.$m(t,null,b);b.textContent=""}else if(this.J===F)this.C?.remove();else if(2===this.J){if(Array.isArray(this.D))for(const t of this.D)t.remove()}else 4===this.J&&"function"==typeof this.D.remove&&this.D.remove();else if(null!==this.K.previousSibling||null!==s&&null!==s.nextSibling){let s=this.K.nextSibling;for(;null!==s&&s!==this.P;){const i=s.nextSibling;t.removeChild(s),s=i}}else t.textContent="",t.appendChild(this.K),null!==s&&t.appendChild(s);this.J=0,this.C=null,this.W=null,this.T=null,this.R=null,this.Y=void 0,this.tt=void 0}_$commit$(t){const s=this.Y,i=this.tt;this.G(t),this.Y=s,this.tt=i}G(t){if(null==t)return void(0!==this.J&&this.it());if("object"!=typeof t)return void(this.J===F?this.D!==t&&(this.D=t,this.C.data=t):(0!==this.J&&this.it(),this.C=n.createTextNode(t),this.st(this.C),this.D=t,this.J=F));const s=t.$h;if(void 0!==s)return void this.nt(s);if(g(t)){if(this.R===t.strings)return void this.W.q(t.values);const s=a(t);0!==this.J&&this.it();const i=new O(s);return i.q(t.values),this.D=[...i.H.childNodes],this.st(i.H),this.W=i,this.R=t.strings,void(this.J=2)}const i=A?A.get("value")??W:W;for(let s=0;s<i.length;s++)if(i[s](this,t))return;for(let s=0;s<L.length;s++)if(L[s](this,t))return;const e=t._$child$;if(void 0!==e){const s=this.tt===e?this.Y:void 0;return this.tt=e,void 0!==e._$detach$&&(z=!0),void(this.Y=e.call(t,this,s))}void 0===t.nodeType?this.G(String(t)):4===this.J&&this.D===t||(0!==this.J&&this.it(),this.st(t),this.D=t,this.J=4)}nt(t){if(2===this.J&&this.R===t.strings)return void this.W.q(t.values);const s=this.X??=new Map;if(2===this.J){const t=this.W.H;if(this.K.nextSibling===this.P&&Array.isArray(this.D))for(const s of this.D)t.appendChild(s);else{let s=this.K.nextSibling;for(;s!==this.P;){const i=s.nextSibling;t.appendChild(s),s=i}}s.set(this.R,this.W)}else 0!==this.J&&this.it();const i=s.get(t.strings)??new O(a(t));i.q(t.values),this.D=[...i.H.childNodes],this.st(i.H),this.W=i,this.R=t.strings,this.J=2}$c(t,s,i){const n=M&&!0===s._$hosted$?null===this.P||this:null;if(null!==t&&"object"==typeof t&&void 0!==t.strings){const e=t,l=a(e),o=new O(l);o.q(e.values);const h=o.H.firstChild;if(null!==h&&1===h.nodeType&&null===h.nextSibling)return null!==n&&k(h,n),s.insertBefore(h,i),{$k:e.key,t:h,W:o,R:e.strings,F:null};const r=v(s,i);return r.W=o,r.R=e.strings,r.J=2,r.D=[...o.H.childNodes],null!==n&&k(o.H,n),r.K.parentNode.insertBefore(o.H,r.P),{$k:e.key,t:null,W:null,R:null,F:r}}const e=v(s,i);return e.G(t),{$k:t?.key,t:null,W:null,R:null,F:e}}$u(t,s){if(null!==t.t){if(null!==s&&"object"==typeof s&&s.strings===t.R)return void t.W.q(s.values);const i=v(t.t.parentNode,t.t);return t.t.remove(),t.t=null,t.W=null,t.R=null,void(t.F=i).G(s)}t.F.G(s)}$f(t){return t.t??t.F.K}$m(t,s,i=this.K.parentNode){const n=t.t??t.F.P;if(n.nextSibling===s&&n.parentNode===i)return;if(null!==t.t)return void i.insertBefore(t.t,s);let e=t.F.K;const l=t.F.P.nextSibling;for(;e!==l;){const t=e.nextSibling;i.insertBefore(e,s),e=t}}$d(t){z&&x(t),this.$m(t,null,b),b.textContent=""}et(t){3!==this.J&&(0!==this.J&&this.it(),this.T=[],this.U=!1,this.J=3);const s=t.length;if(0===s)return void(this.T.length&&(this.it(),this.T=[],this.J=3));const i=null!=t[0]&&void 0!==t[0].$r;i!==this.U&&this.T.length&&(this.it(),this.T=[],this.J=3),this.U=i;const e=this.T;if(0!==e.length)if(i)this.T=t[0].$r(this,t,e,this.K.parentNode,this.P);else{const i=e.length<s?e.length:s;for(let s=0;s<i;s++)this.$u(e[s],t[s]);if(s>e.length){const i=n.createDocumentFragment();for(let n=e.length;n<s;n++)e.push(this.$c(t[n],i,null));this.st(i)}else if(s<e.length){if(z)for(let t=s;t<e.length;t++)x(e[t]);for(let t=s;t<e.length;t++)this.$m(e[t],null,b);b.textContent="",e.length=s}}else{const i=n.createDocumentFragment();for(let n=0;n<s;n++)e.push(this.$c(t[n],i,null));this.st(i)}}}const N=new WeakMap,V=(t,s)=>{let i=N.get(s);if(void 0===i){const t=e();s.appendChild(t),1===s.nodeType&&I()?._$capture$?.(s,t),N.set(s,i=new H(t,null))}c=s;try{i.G(t)}finally{c=null,(()=>{const t=$;if(null!==t){$=null;for(let s=0;s<t.length;s+=2)t[s].value=t[s+1]}})()}};L.push(((t,s)=>Array.isArray(s)?(t.et(s),!0):null!==s&&"function"==typeof s[Symbol.iterator]&&(t.et([...s]),!0)));const Z={name:"@verajs/renderer",on:"render",fn:V,priority:50,connect:t=>{A=t}},q={},B=t=>(t.offset>0&&(t.node=t.node.splitText(t.offset),t.offset=0),t.node),C=t=>{for(;0===t.offset&&null!==t.node&&8===t.node.nodeType;)t.node=t.node.nextSibling},D=new WeakMap;let G=null,J=!1,K=[];const P=(t,s)=>{const i=s.lt.i;for(let e=t.firstChild;null!==e;e=e.nextSibling)if(1===e.nodeType||3===e.nodeType){for(s.ot++;s.ht<i.length&&i[s.ht].h===s.ot;)s.rt+=1===(n=i[s.ht]).l?n.u.length-1:1,s.ht++;1===e.nodeType&&P(e,s)}var n},Q=(t,s,i)=>{i.ot++;const n=i.lt.i;if(3===t.nodeType){let e=!1;for(;i.ht<n.length&&n[i.ht].h===i.ot;)e=!0,i.ht++,T(s,i.ct[i.rt++],i.ft),R(i);return void(e||((t,s)=>{let i=s;for(;i.length>0;){C(t);const s=t.node;if(null===s||3!==s.nodeType)throw q;const n=s.data,e=n.length-t.offset;if(0===e){t.node=s.nextSibling,t.offset=0;continue}const l=e<i.length?e:i.length;if(n.slice(t.offset,t.offset+l)!==i.slice(0,l))throw q;i=i.slice(l),t.offset+=l,t.offset===n.length&&(t.node=s.nextSibling,t.offset=0)}})(s,t.data))}if(void 0!==i.lt.p&&"slot"===t.localName)return void((t,s,i)=>{const n=i.lt.p._$adopt$,e=t.cloneNode(!1),l=i.lt.i;for(;i.ht<l.length&&l[i.ht].h===i.ot;){const t=l[i.ht++],s=new w(e,t.o,t.u,t._);i.ft.push(s),i.rt=s.$(i.ct,i.rt,!0),R(i)}const o=e.getAttribute("name")??"";C(s);const h=s.parent,r=[];if(""!==o){let t=B(s);for(;null!==t&&1===t.nodeType&&t.getAttribute("slot")===o;)r.push(t),s.node=t.nextSibling,t=B(s)}else if(!J){const t=h.getAttribute?.("data-vm-slotted"),i=null==t?0:Number(t.slice(t.indexOf(",")+1));if(i>0){J=!0,h.removeAttribute("data-vm-slotted");for(let t=0;t<i;t++){const t=B(s);if(null===t)break;r.push(t),s.node=t.nextSibling}}}if(r.length>0){const l=s.node,c=[];for(let s=t.firstChild;null!==s;s=s.nextSibling)1!==s.nodeType&&3!==s.nodeType||c.push(s.cloneNode(!0));P(t,i);const f=n(G,o,r,c,h,l,e);K.push(f),(i.Z??=[]).push(f),E()}else{const l=s.node;for(let n=t.firstChild;null!==n;n=n.nextSibling)1!==n.nodeType&&3!==n.nodeType||Q(n,s,i);const r=[];for(let t=l;null!==t&&t!==s.node;t=t.nextSibling)r.push(t);const c=n(G,o,null,r,h,s.node,e);K.push(c),(i.Z??=[]).push(c),E()}})(t,s,i);C(s);const e=B(s);if(null===e||1!==e.nodeType)throw q;if(e.localName!==t.localName)throw q;for(;i.ht<n.length&&n[i.ht].h===i.ot;){const t=n[i.ht++],s=new w(e,t.o,t.u,t._);i.ft.push(s),i.rt=s.$(i.ct,i.rt,!0),R(i)}const l={parent:e,node:e.firstChild,offset:0};let o=t.firstChild;for(;null!==o;)1!==o.nodeType&&3!==o.nodeType||Q(o,l,i),o=o.nextSibling;if(null!==l.node&&3===l.node.nodeType&&null===l.node.nextSibling&&null===t.firstChild&&"textarea"===e.localName&&(l.node=null),C(l),null!==l.node&&(3!==l.node.nodeType||""!==l.node.data||null!==l.node.nextSibling))throw q;s.node=e.nextSibling,s.offset=0},R=t=>{const s=t.lt.i;for(;t.ht<s.length&&2===s[t.ht].l;)t.ft.push(_),t.rt++,t.ht++},T=(t,s,i)=>{const l=s?.$h,o=void 0!==l?l:s;if(null!=o&&("object"!=typeof o||!g(o)&&void 0===o.nodeType&&"function"!=typeof o[Symbol.iterator])){const s=new S(((t,s)=>{const i=B(t);if(""===s){const s=n.createTextNode("");return t.parent.insertBefore(s,i),s}if(null===i||3!==i.nodeType)throw q;const e=i;if(e.data.length>s.length&&e.splitText(s.length),e.data!==s)throw q;return t.node=e.nextSibling,t.offset=0,e})(t,p(o)));return s.D=o,void i.push(s)}const h=e();t.parent.insertBefore(h,B(t));const r=new H(h,null);if(null==o);else if(g(o))r.W=X(a(o),o.values,t),r.R=o.strings,r.J=2;else if(void 0!==o.nodeType)t.parent.insertBefore(o,B(t)),r.D=o,r.J=4;else{const s=Array.isArray(o)?o:[...o],i=[];for(const n of s)i.push(U(t,n));r.T=i,r.U=s.length>0&&void 0!==s[0]?.$r,r.J=3}const c=e();t.parent.insertBefore(c,B(t)),r.P=c,i.push(r)},U=(t,s)=>{if(null!==s&&"object"==typeof s&&void 0!==s.strings){const i=s,n=a(i),l=n.t.content.firstChild;if(null!==l&&1===l.nodeType&&null===l.nextSibling){const s=B(t),e=X(n,i.values,t);return{$k:i.key,t:s,W:e,R:i.strings,F:null}}const o=e();t.parent.insertBefore(o,B(t));const h=X(n,i.values,t),r=e();t.parent.insertBefore(r,B(t));const c=new H(o,r);return c.W=h,c.R=i.strings,c.J=2,{$k:i.key,t:null,W:null,R:null,F:c}}const i=[];return T(t,s,i),{$k:s?.key,t:null,W:null,R:null,F:i[0]}},X=(t,s,i)=>{const e=Object.create(O.prototype);e.i=[],e.H=n.createDocumentFragment();const l={lt:t,ct:s,rt:0,ht:0,ot:-1,ft:e.i};R(l),(t=>{let s=D.get(t);if(void 0===s){let i;for(s=[],o.currentNode=t.t.content;null!==(i=o.nextNode());)s.push(i);D.set(t,s)}})(t);let h=t.t.content.firstChild;for(;null!==h;)1!==h.nodeType&&3!==h.nodeType||Q(h,i,l),h=h.nextSibling;if(R(l),l.ht!==t.i.length)throw q;return void 0!==l.Z&&(e.Z=l.Z),e},Y=(t,s)=>{if(!N.has(s)&&null!==s.firstChild&&null!==t&&"object"==typeof t&&g(t)){const i=((t,s)=>{let i=s.firstChild;for(;null!==i&&1===i.nodeType&&i.hasAttribute("data-vm-sheet");)i=i.nextSibling;const n=e();s.insertBefore(n,i),G=1===s.nodeType?s:null,J=!1,K=[];try{const i={parent:s,node:n.nextSibling,offset:0},e=X(a(t),t.values,i);if(C(i),null!==i.node)throw q;const l=new H(n,null);return l.W=e,l.R=t.strings,l.J=2,l}catch(t){if(t!==q)throw t;for(const t of K)t._$park$();return K=[],n.remove(),null}})(t,s);if(null!==i)return void N.set(s,i);const n=1===s.nodeType?I()?._$rescue$?.(s):null;if((t=>{let s=t.firstChild;for(;null!==s;){const i=s.nextSibling;1===s.nodeType&&s.hasAttribute("data-vm-sheet")||t.removeChild(s),s=i}})(s),null!=n)for(const t of n)s.appendChild(t)}V(t,s)},tt={...Z,fn:Y};export{t as hold,Y as renderInto,tt as renderer};
|
|
2
2
|
//# sourceMappingURL=vera-renderer-hydrate.min.js.map
|