@wcstack/state 4.8.0 → 4.9.0
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.ja.md +9 -8
- package/README.md +9 -8
- package/dist/auto.min.js +1 -1
- package/dist/auto.min.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/parser.esm.js +1 -1
- package/dist/split/auto.js +1 -1
- package/dist/split/chunks/chunk-47I6RYV3.js +2 -0
- package/dist/split/chunks/{chunk-XXVJ6J2N.js.map → chunk-47I6RYV3.js.map} +1 -1
- package/dist/split/chunks/{chunk-DRSAQE4E.js → chunk-EBIQH2HE.js} +2 -2
- package/dist/split/chunks/{chunk-P3EXTBXC.js → chunk-FQUDP3XK.js} +2 -2
- package/dist/split/chunks/{chunk-IBGHHABS.js → chunk-ISBASPV2.js} +2 -2
- package/dist/split/chunks/{chunk-GQTEYSRZ.js → chunk-J3PTKUWV.js} +2 -2
- package/dist/split/chunks/{chunk-QMOIMPIJ.js → chunk-LWRYFYOC.js} +2 -2
- package/dist/split/chunks/{chunk-PKEAYPFR.js → chunk-P3JKSHRN.js} +2 -2
- package/dist/split/chunks/{chunk-T3KW5DZD.js → chunk-SOFOV2OG.js} +2 -2
- package/dist/split/chunks/{chunk-NITPUCPA.js → chunk-TS2HEHBQ.js} +2 -2
- package/dist/split/chunks/chunk-YIDHPXYQ.js +2 -0
- package/dist/split/chunks/{chunk-M3BJN6SQ.js.map → chunk-YIDHPXYQ.js.map} +1 -1
- package/dist/split/core.js +1 -1
- package/dist/split/features/devtools.js +1 -1
- package/dist/split/features/diagnostics.js +1 -1
- package/dist/split/features/diagnostics.js.map +1 -1
- package/dist/split/features/formats.js +1 -1
- package/dist/split/features/list-keys.js +1 -1
- package/dist/split/features/native-commands.js +1 -1
- package/dist/split/features/recursion.js +1 -1
- package/dist/split/features/scopes.js +1 -1
- package/dist/split/features/ssr.js +1 -1
- package/dist/split/features/temporal.js +1 -1
- package/package.json +1 -1
- package/dist/split/chunks/chunk-M3BJN6SQ.js +0 -2
- package/dist/split/chunks/chunk-XXVJ6J2N.js +0 -2
- /package/dist/split/chunks/{chunk-DRSAQE4E.js.map → chunk-EBIQH2HE.js.map} +0 -0
- /package/dist/split/chunks/{chunk-P3EXTBXC.js.map → chunk-FQUDP3XK.js.map} +0 -0
- /package/dist/split/chunks/{chunk-IBGHHABS.js.map → chunk-ISBASPV2.js.map} +0 -0
- /package/dist/split/chunks/{chunk-GQTEYSRZ.js.map → chunk-J3PTKUWV.js.map} +0 -0
- /package/dist/split/chunks/{chunk-QMOIMPIJ.js.map → chunk-LWRYFYOC.js.map} +0 -0
- /package/dist/split/chunks/{chunk-PKEAYPFR.js.map → chunk-P3JKSHRN.js.map} +0 -0
- /package/dist/split/chunks/{chunk-T3KW5DZD.js.map → chunk-SOFOV2OG.js.map} +0 -0
- /package/dist/split/chunks/{chunk-NITPUCPA.js.map → chunk-TS2HEHBQ.js.map} +0 -0
package/dist/parser.esm.js
CHANGED
|
@@ -363,7 +363,7 @@ var SENTENCES = {
|
|
|
363
363
|
[26 /* FilterOptionsRequired */]: (fn) => `filter ${fn} requires at least one option`,
|
|
364
364
|
[27 /* FilterOptionNotNumber */]: (fn) => `filter ${fn} requires a number as option`,
|
|
365
365
|
[28 /* FilterValueNotNumber */]: (fn, v) => `filter ${fn} requires a number value, not ${was(v)}${typeof v === "string" ? ` \u2014 put |number before |${fn}, or convert it where it is read` : ""}`,
|
|
366
|
-
[29 /* FilterValueNotDate */]: (fn, v) => `filter ${fn} requires a date value (a Date), not ${was(v)}${typeof v === "string" || typeof v === "number" ? " \u2014 make the Date where it is read: a getter returning new Date(\u2026)" : ""}`,
|
|
366
|
+
[29 /* FilterValueNotDate */]: (fn, v) => `filter ${fn} requires a date value (a Date), not ${was(v)}${typeof v === "string" || typeof v === "number" ? " \u2014 make the Date where it is read: a getter returning new Date(\u2026)" : ""}${typeof v === "string" && /^\d{4}-\d\d-\d\d$/.test(v) ? `. A date-only string is a day, not a moment: new Date(${JSON.stringify(v)}) is midnight UTC, the day before west of Greenwich \u2014 new Date(y, m - 1, d) is that day where the page is` : ""}`,
|
|
367
367
|
[52 /* FilterStyleInvalid */]: (fn, v) => `filter ${fn} takes a style of full, long, medium or short, not "${v}"`,
|
|
368
368
|
[53 /* FilterCurrencyInvalid */]: (v) => `filter currency takes an ISO 4217 currency code (JPY, USD, EUR), not "${v}"`,
|
|
369
369
|
[30 /* FilterValueNotArray */]: (fn) => `filter ${fn} requires an array value`,
|
package/dist/split/auto.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as t}from"./chunks/chunk-
|
|
1
|
+
import{d as t}from"./chunks/chunk-LWRYFYOC.js";import"./chunks/chunk-J3PTKUWV.js";import"./chunks/chunk-47I6RYV3.js";import"./chunks/chunk-ISBASPV2.js";import"./chunks/chunk-SOFOV2OG.js";import{a as n}from"./chunks/chunk-FQUDP3XK.js";import"./chunks/chunk-TS2HEHBQ.js";import"./chunks/chunk-P3JKSHRN.js";import"./chunks/chunk-EBIQH2HE.js";import{a as s,g as o}from"./chunks/chunk-BCL75PFH.js";var e,r=["formats","diagnostics","temporal","list-keys","scopes","recursion","ssr","devtools","native-commands"],a=(e=import.meta.url,t=>Promise.all(t.map(async t=>{if(!r.includes(t))throw new Error(`[@wcstack/state] [wcs/feature-unknown] "${t}" is not an add-on (${r.join(", ")}).`);return(await(import(new URL(`./features/${t}.js`,e).href))).default})));s.kt=t=>a(t).then(o),"loading"===document.readyState&&await new Promise(t=>document.addEventListener("DOMContentLoaded",t,{once:!0}));var c=document.querySelector(`${n.tagNames.state}:not([mount]):not([bind-component])`);o(await a(c?.getAttribute("features")?.split(/\s+/).filter(Boolean)??[])),t();
|
|
2
2
|
//# sourceMappingURL=auto.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{l as e}from"./chunk-ISBASPV2.js";import{a as t,d as n,e as l,j as i,k as r}from"./chunk-SOFOV2OG.js";import{a as s,g as o}from"./chunk-FQUDP3XK.js";import{a as u}from"./chunk-TS2HEHBQ.js";import{a,b as h,c,d as f,e as d,f as m,g as p,h as g,i as v,j as b,k as w,l as x,n as y}from"./chunk-P3JKSHRN.js";import{a as N,b as S}from"./chunk-EBIQH2HE.js";import{a as C,k}from"./chunk-BCL75PFH.js";var A=new Map,T=new Set(["if","elseif","else","for"]),P=new Set([a,"if","elseif","for","..."]),D=new Set([d,m,p,f,h,c]);function E(e){let t=function(e){return w(e,";")}(e).map(v).filter(e=>e.length>0).map(e=>{let t=b(e,":");-1===t&&S(101,[e]);let n=e.slice(0,t).trim(),l=e.slice(t+1).trim(),i=n.split("#")[0].split("|")[0].trim();if(P.has(i)){let t;return i!==n&&S(102,[e,i]),i===a?(l.length>0&&S(103,[e]),t={Ze:"#else",et:[]}):"..."===i?(0===l.length&&S(104,[e]),t=y(l),t.et.length>0&&S(105,[e])):(t=y(l),"for"===i&&t.et.length>0&&S(121,[e])),{Ee:i,Ne:[i],rn:[],D:[],...t,b:"..."===i?"spread":i}}(i===d||i===m)&&S(122,[e,i]);let r=y(l),s=function(e){let[t,n]=x(e,"input",A),l=t.split("#").map(v);l.length>2&&S(115,[t]);let[i,r]=l,s=i.split(".").map(v);return!(s.length>1&&""===s[0])&&(0===i.length||s.some(e=>0===e.length))&&S(116,[e]),{Ee:i,Ne:s,rn:r?r.split(",").map(v):[],D:n}}(n),[o]=s.Ne;if(""===o&&s.Ne.length>1){let e=s.Ne.slice(1);return(e.includes("")||D.has(e[0]))&&S(106,[n]),{...s,Ee:e.join("."),Ne:e,...r,b:"prop"}}return{...s,...r,b:"radio"===i||"checkbox"===i?i:o===h||o.startsWith("on")?"event":"prop"}});return t.length>1&&t.some(e=>T.has(e.b))&&S(201,[e]),t}function L(e,t){if(null!==e)for(let n=0;n<e.length;n++)t=e[n](t);return t}function I(t){return 0===t.length?null:(e(),t.map(e=>o(e.Hn,e.args,e.literals)))}var j=Symbol.for("wcstack.state.view-transition-naming"),F=new WeakSet;function O(){let e=t("state");return null!==e&&"auto"===e.naming?e.namingLimit:-1}var U=new Set(["click","dblclick","input","change","submit","keydown","keyup","mousedown","mouseup","pointerdown","pointerup"]),W=0,q=2,$=3,R=4,B=5,H=["text","prop","prop","prop","prop","event","for","if","prop","radio","checkbox","prop","prop","event","spread"],M=(e,t,n,l)=>e.Jt(t,n.o?.t??n.Tt,l,H[n.i]),G=Symbol();function K(e,t,n){let l=t.U;return null===l||"state"===l||"auto"===l&&void 0!==e.v(t.o,n)?t.K:G}var X=class{constructor(e,t,n,l,i,r,s,o,u,a=null){this.te=!1,this.D=null,this.An=!1,this.engine=e,this.i=t,this.a=n,this.name=l,this.o=i,this.r=r,this.Tn=s,this.x=o,this.value=u,this.j=a}on(){return H[this.i]}apply(){if(null!==this.j)return void this.j.xt();let e=L(this.x,this.engine.read(this.o,this.r));if(e===this.value&&9!==this.i&&("object"!=typeof e||null===e||11===this.i||8===this.i||i(this.name)))return;if(this.value===G)return void(this.value=e);let t=this.a;if(11!==this.i)9===this.i?t.checked=void 0!==e&&this.sn()===e:10===this.i?t.checked=Array.isArray(e)&&e.includes(this.sn()):Z(this.i,t,this.name,e),this.value=e;else{if(void 0===e)return void(this.value=e);this.value=e,this.An=!0;try{t[this.name]!==e&&(t[this.name]=e)}finally{this.An=!1}}}sn(){return L(this.D,this.a.value)}ir(){let e,t=this.a,n=this.engine;if(9===this.i){if(!t.checked)return;e=this.sn()}else if(10===this.i){let l=this.sn(),i=n.v(this.o,this.r),r=Array.isArray(i)?i:[],s=r.includes(l);if(t.checked?s:!s)return;e=s?r.filter(e=>e!==l):[...r,l]}else e=L(this.D,t[this.name]),this.value=NaN;n.A(this.o,this.r,e,!1,!0)}},V=e=>"textContent"===e||"innerText"===e||"innerHTML"===e;function Z(e,t,n,l){switch(e){case 0:return void(t.data=null==l?"":String(l));case 1:return void(V(n)?t[n]="innerHTML"===n?r(l):null==l?"":String(l):i(n)?null==l&&"srcdoc"===n?t.removeAttribute(n):void 0!==l&&(t[n]=r(l)):void 0!==l&&(t[n]!==l&&!("value"===n&&t.value===String(l))&&(t[n]=l),("value"===n||"selectedIndex"===n)&&"select"===t.localName&&(t[Q]=[n,l])));case 8:return void(t.innerHTML=r(l));case 2:return null!=l&&"boolean"!=typeof l&&S(401,[n,typeof l]),void t.classList.toggle(n,!0===l);case 3:return void(null==l?t.removeAttribute(n):t.setAttribute(n,String(l)));case 4:return void(n.includes("-")?null==l?t.style.removeProperty(n):t.style.setProperty(n,String(l)):t.style[n]=null==l?"":String(l))}}var Q=Symbol();function J(e){let t="optgroup"===e.localName?e.parentNode:e,n=t?.[Q];void 0!==n&&(t[n[0]]=n[1])}var z=class{constructor(e,t,n,l){this.w=!0,this.we=null,this.u=null,this.Pt=null,this.On=null,this.r=e,this.ct=t,this.L=n,this.C=l}Qo(e,t){let n=t.target,l=this.C,i=[],r=null;for(let t of l.Oe){if(t.name!==e)continue;let s=l.Cn[t.a],o=ae(null===this.L?this.ct:this.L[s[0]],s,1);o.contains(n)&&(o!==r&&i.unshift([]),i[0].push(t),r=o)}for(let e of i){for(let n of e)n.Fn(t,this.r);if(t.cancelBubble)return!0}return!1}get s(){return null===this.L?this.ct:this.L[this.L.length-1]}Re(){let e=this.On;return(null===e?null:e.In(this.ct))??this.ct}insertBefore(e,t){let n=this.s;for(let l=this.Re();;){let i=l.nextSibling;if(e.insertBefore(l,t),l===n)return;l=i}}bo(){null===this.L?this.ct.remove():he(this.Re(),this.s)}Pe(e){if(this.w=!1,null!==this.Pt)for(let e of this.Pt)e();let t=this.we;if(null!==t)for(let n=0;n<t.length;n++)e.Rn(t[n]);if(null!==this.u)for(let e of this.u)e.Pe()}},Y=class extends z{constructor(e,t,n,l){super(e,t,n,l),this.vo=0,this.V=null,this.pe=0===l.Ge.length?null:new Array(2*l.Ge.length)}ko(e,t){let n=this.V??=new Array(this.C.Ge.length),l=n[t];if(void 0===l){let i=this.C.Ge[t],r=this.pe;l=n[t]=new X(e,i.i,r[2*t],i.name,i.o,this.r,this,i.x,r[2*t+1])}return l}fo(e,t){let n=this.C.Ge;for(let l=0;l<n.length;l++)n[l].o.ee(t)&&e.tn(this.ko(e,l))}Pe(e){let t=this.r;t.N===this&&(t.N=null),super.Pe(e)}};function _(e,t,n,i){let r=l(n,t.n);try{return e.Ue(r,t)}catch(n){return e.Jt(n,t.t,i,"for"),null===r?e.oe.get(t):r.u.get(t)}}function ee(e,t,n){n&&e.nr(t);let l=t.Tn;null!==l&&(l.we??=[]).push(t)}var te=null;function ne(){let e=te;return te=null,e}var le=-1;function ie(e,t,n,l,i=null){let r,s=t.Cn,o=t.build,u=t.So,a=null,h=C.Te?.(t,null===l?i:l.S,null!==l),c=!h&&t.jn,f=h?document.createDocumentFragment():(c?t.root:t.ln).cloneNode(!0);if(!h)for(let e=0;e<o.length;e++){let t=o[e];u[t]=ae(f,s[t],c?1:0)}c?r=f:(a=h||[...f.childNodes],r=a[0]);let d,m=null;if(null!==l?(d=m=new Y(n,r,a,t),null===l.map?n.N=m:l.map.set(n,m)):d=new z(n,r,a,t),le>=0&&function(e,t,n,l){let i=null;if(null===t)i=1===e.nodeType?e:null;else for(let e=0;e<t.length&&null===i;e++)1===t[e].nodeType&&(i=t[e]);let r=i?.style;if(null===i||void 0===r||F.has(i))return;let s=globalThis[j]??={counter:0,assigned:0,warned:!1};s.assigned>=l?s.warned||(s.warned=!0,console.warn(`[@wcstack/state] ${N(25,[l])}`)):(F.add(i),s.assigned++,r.setProperty("view-transition-name",`wcs-${n}-${++s.counter}`),r.setProperty("view-transition-class",`wcs-${n}`))}(r,a,null!==l?"row":"branch",le),t.Oe.length>0){let t=e.Un;if(null===a)r[t]=d;else for(let e of a)1===e.nodeType&&(e[t]=d)}let p=t.sr,g=e.We,v=t.lr?u.slice(0,s.length):u,b=null===m?null:m.pe;if(null!==b){let e=t.Ge;for(let t=0;t<e.length;t++)b[2*t]=v[e[t].a],b[2*t+1]=e[t].K}for(let t=0;t<p.length;t++){let l=p[t],i=v[l.a],s=l.F;if(s>=0&&null!==b){let t=m.V?.[s];if(void 0!==t){t.te=!1,e.qe(t);continue}try{let t=L(l.x,e.read(l.o,n));t!==l.K&&(Z(l.i,i,l.name,t),b[2*s+1]=t),null!==g&&e.mo(l.o,n)}catch(t){e.Rt(t,m.ko(e,s))}continue}switch(l.i){case 6:{let t=new ue(e,l.C,_(e,l.o,n,i),i);(d.u??=[]).push(t),i===r&&(d.On=t),t.xt();break}case 7:{let t=se(e,l.q.map(e=>({C:e.C,o:e.o,x:e.x,S:v[e.a]})),n,d);(d.u??=[]).push(t),i===r&&(d.On=t);break}default:try{re(e,l,i,n,d)}catch(t){M(e,t,l,i)}}}return te=d,f}function re(e,t,n,i,r){let s=n;switch(t.i){case 5:return void function(e,t,n,l,i){let r=n.Fn,s=e=>r(e,l);if(n.nt){let l=e.co(n.name),i=t[l];t[l]=void 0===i?s:e=>{i(e),s(e)},n.xe&&t.addEventListener(n.name,e=>e.bubbles||s(e))}else t.addEventListener(n.name,s),n.wo&&null!==i&&(i.Pt??=[]).push(()=>t.removeEventListener(n.name,s))}(e,n,t,i,r);case 12:return void de(e,t,s,r,n=>function(e,t,n,l,i){let r=t.name,s=e.command(t.Tt.slice(9)),o=null===i?C.or?.(n,r):null;o||(null===i&&pe(1202,n,`command.${r}`),i.commands.has(r)||S(1203,[n.localName,r]));let u=new WeakRef(n),a=s.subscribe((...e)=>{let t=u.deref();if(void 0!==t)return t.isConnected?o?o(t,e):t[r](...e):void 0;a()});null!==l&&(l.Pt??=[]).push(a)}(e,t,s,r,n));case 13:return void de(e,t,s,r,n=>function(e,t,n,l,i){let r=t.name;null===i&&pe(1202,n,`eventToken.${r}`);let s=i.properties.get(r);void 0===s&&S(1204,[n.localName,r]);let o=t.Tt;n.addEventListener(s.event,n=>{t.At&&n.preventDefault(),t.Ft&&n.stopPropagation();try{e.Zo(o,n,l)}catch(e){k(e)}})}(e,t,s,i,n))}let o=t.o,u=l(i,o.n);if(14===t.i)return void de(e,t,s,r,n=>function(e,t,n,l,i,r){null===r&&pe(1501,n,`"...: ${t.o.t}"`);let s=new Set([...r.properties.keys(),...r.inputs]);for(let o of s){if(t.yo?.includes(o))continue;let s=e.o(`${t.o.t}.${o}`),u=0===s.n?null:l;me(e,{...t,U:null,X:null},n,o,s,u,i,r)}}(e,t,s,u,r,n));if(t.xe&&1===t.i)return void de(e,t,s,r,n=>function(e,t,n,l,i,r){if(null!==r)return void me(e,t,n,t.name,t.o,l,i,r);let s=new X(e,1,n,t.name,t.o,l,i,t.x,K(e,t,l));s.D=t.D,!C.ar?.(s,t.ro)&&(ee(e,s,!0),e.qe(s))}(e,t,s,u,r,n));let a=new X(e,t.i,n,t.name,o,u,r,t.x,K(e,t,u));a.D=t.D,ee(e,a,!0),e.qe(a),null!==t.Ot&&n.addEventListener(t.Ot,()=>a.ir())}function se(e,t,n,i){let r=new oe(e,t,n),s=null;for(let o of t){if(null===o.o)continue;let t=o.o,u=new X(e,7,o.S,"if",t,l(n,t.n),i,null,void 0,r);ee(e,u,!0),null===i&&r.ue.push(u),s??=u}return e.qe(s),r}var oe=class{constructor(e,t,n){this.w=!0,this.I=null,this.y=-1,this.ue=[],this.engine=e,this.q=t,this.r=n}In(e){return null!==this.I&&this.q[this.y].S===e?this.I.Re():null}xt(){let e=this.engine,t=-1;for(let n=0;n<this.q.length;n++){let i=this.q[n];if(null===i.o||L(i.x,e.read(i.o,l(this.r,i.o.n)))){t=n;break}}if(t!==this.y&&(le=O(),null!==this.I&&(this.I.bo(),this.I.Pe(e),this.I=null),this.y=t,t>=0)){let n=this.q[t],l=ie(e,n.C,this.r,null,n.S);this.I=ne();let i=n.S.parentNode;i.insertBefore(l,n.S),J(i)}}Pe(){this.w=!1;for(let e of this.ue)this.engine.Rn(e);null!==this.I&&this.I.Pe(this.engine)}},ue=class{constructor(e,t,n,l){this.w=!0,this.Ae=[],this.engine=e,this.C=t,this.l=n,this.S=l,null===n.N?(n.N=this,this.map=null):((n.W??=[]).push(this),this.map=new Map)}In(e){return 0===this.Ae.length?null:this.Ae[0].Re()}Ct(e){return null===this.map?e.N:this.map.get(e)??null}Lt(e){let t=this.map;null!==t&&t.get(e.r)===e&&t.delete(e.r),e.Pe(this.engine)}xt(){let e=this.engine,t=this.l.f,n=this.Ae;le=O();let l=t.length,i=n.length,r=this.S,s=r.parentNode;if(0===l){if(i>0){let e=n[0].Re(),t=n[i-1].s,l=[];for(let n=s.firstChild;null!==n;n=n===e?t.nextSibling:n.nextSibling)if(n!==e){if(n!==r&&3!==n.nodeType){l=null;break}l.push(n)}null!==l?s.replaceChildren(...l):he(e,t);for(let e=0;e<i;e++)this.Lt(n[e])}return void(this.Ae=[])}let o=new Array(l),u=0;for(;u<l&&u<i&&this.Ct(t[u])===n[u];)o[u]=n[u],u++;let a=i-1,h=l-1;for(;a>=u&&h>=u&&this.Ct(t[h])===n[a];)o[h]=n[a],a--,h--;for(let e=u;e<=a;e++){let t=n[e],l=t.r;l.w&&this.Ct(l)===t?t.vo=e:(t.bo(),this.Lt(t))}if(u<=h){let n=h-u+1,a=new Int32Array(n),c=!1;if(i>0)for(let e=0;e<n;e++){let n=this.Ct(t[u+e]);null!==n&&n.w?(a[e]=n.vo,c=!0):a[e]=-1}let f=h+1<l?o[h+1].Re():r;if(c){let l=function(e){let t=e.length,n=new Uint8Array(t),l=new Int32Array(t).fill(-1),i=[];for(let n=0;n<t;n++){let t=e[n];if(t<0)continue;let r=0,s=i.length;for(;r<s;){let n=r+s>>1;e[i[n]]<t?r=n+1:s=n}r>0&&(l[n]=i[r-1]),i[r]=n}let r=i.length>0?i[i.length-1]:-1;for(;r>=0;)n[r]=1,r=l[r];return n}(a),i=f;for(let r=n-1;r>=0;r--){let n=t[u+r],a=this.Ct(n);null!==a&&a.w?0===l[r]&&a.insertBefore(s,i):(s.insertBefore(ie(e,this.C,n,this),i),a=ne()),o[u+r]=a,i=a.Re()}}else{let n=document.createDocumentFragment();for(let l=u;l<=h;l++)n.appendChild(ie(e,this.C,t[l],this)),o[l]=ne();s.insertBefore(n,f)}}this.Ae=o,J(s)}Pe(){this.w=!1;let e=this.l;if(e.N===this)e.N=null;else if(null!==e.W){let t=e.W.indexOf(this);t>=0&&e.W.splice(t,1),0===e.W.length&&(e.W=null)}for(let e of this.Ae)e.Pe(this.engine);this.map?.clear()}};function ae(e,t,n){for(;n<t.length;n++){e=e.firstChild;for(let l=t[n];l>0;l--)e=e.nextSibling}return e}function he(e,t){for(let n,l=e;l!==t;l=n)n=l.nextSibling,l.remove();t.remove()}var ce=new WeakMap,fe=e=>e.customElementRegistry??customElements;function de(e,t,n,l,i,r=!1){let s=n.localName;if(!s.includes("-"))return i(null);let o=fe(n);if(!r&&!n.isConnected&&void 0===o.get(s)&&"customElementRegistry"in n)return void queueMicrotask(()=>de(e,t,n,l,i,!0));let u=()=>{let e=o.get(s);o.upgrade(n),i(e?function(e){if(ce.has(e))return ce.get(e);let t=e.wcBindable,n=null;if(null!==t&&"object"==typeof t&&"wc-bindable"===t.protocol&&Number.isInteger(t.version)&&t.version>=1){n={properties:new Map,inputs:new Set,commands:new Set};for(let e of t.properties??[])n.properties.set(e.name,{event:e.event,getter:"function"==typeof e.getter?e.getter:null,go:"event"===e.semantics});for(let e of t.inputs??[])n.inputs.add(e.name);for(let e of t.commands??[])null!==e&&"object"==typeof e&&"string"==typeof e.name&&n.commands.add(e.name)}return ce.set(e,n),n}(e):null)};if(!r&&void 0!==o.get(s))return u();null!==l&&!l.w||function(e,t,n){let l=n;null!==t&&(t.Pt??=[]).push(()=>{l=null}),e.then(()=>l?.())}(o.whenDefined(s),l,()=>{try{u()}catch(l){M(e,l,t,n)}e.ve()})}function me(e,t,n,l,i=t.o,r,s,o){let u=o.properties.get(l)??null,a=o.inputs.has(l),h=e.Vt;h&&null===u&&!a&&S(38,[l]);let c=t.U;(null===u?"element"===c||"auto"===c:!a&&("state"===c||"auto"===c))&&S(39,[c,l]),"connect"===t.X&&null===u&&S(40,[l]);let f=h&&null!==u&&!a,d=new X(e,11,n,l,i,r,s,t.x,void 0);d.D=t.D,ee(e,d,!f),null!==u&&!t.ro&&n.addEventListener(u.event,t=>{let i;null!==u.getter?i=u.getter(t):(i=t.detail,u.go||C.detail?.(n,l,i)),(!d.An||!Object.is(i,d.value))&&(i=L(d.D,i),null===d.x&&(d.value=i),e.A(d.o,d.r,i,u.go,!0))});let m=c??(f?"element":"state");if("state"===m)f||e.qe(d);else if("element"===m||"auto"===m){let i=()=>{if(null!==s&&!s.w)return;if("auto"===m&&void 0!==e.v(d.o,d.r))return void(f||e.qe(d));let t=n[l];null===d.x&&(d.value=t),e.A(d.o,d.r,t,!1,!0)};"connect"!==t.X||n.isConnected?i():Promise.resolve().then(i)}return d}function pe(e,t,n){S(e,[t.localName,n])}var ge=()=>s.bindAttributeName;function ve(){return{a:0,i:1,name:"",o:null,x:null,K:u,Fn:null,C:null,q:null,D:null,Ot:null,xe:!1,U:null,X:null,ro:!1,At:!1,Ft:!1,Tt:null,yo:null,F:-1,nt:!1,wo:!1}}var be=["state","element","auto","none"],we=["call","connect"],xe="$command.";function ye(e,t,n){g.test(t)&&(null===n&&S(1401,[t,Number(t.slice(1))]),t=`${n.t}.*.${t}`);let l=e.o(function(e,t){return 46!==e.charCodeAt(0)?e:(null===t&&S(1402,[e]),"."===e?`${t.t}.*`:`${t.t}.*${e}`)}(t,n)),i=null===n?0:n.n+1;l.n>i&&S(1401,[l.t,l.n,i]);for(let e=1;e<=l.n;e++){let t=e===i?n:n.h[e];l.h[e]!==t&&S(1403,[l.t,l.h[e].t,t.t])}return C.$o?.(e,l),l}var Ne=e=>1===e.i&&("outerHTML"===e.name||"outerText"===e.name),Se=e=>8===e.i||Ne(e)||1===e.i&&V(e.name);function Ce(e){S(202,[e])}function ke(e,t,l,r,s){let o=E(t).map(t=>function(e,t,l,r,s){let o=function(e,t){let n=t.find(e=>e.startsWith("on")),l=null,i=null;for(let n of t){let t=n.indexOf("=");if(t<0)continue;e.Vt||S(31);let r=n.slice(0,t).trim(),s=n.slice(t+1).trim(),o="init"===r;!o&&"sync"!==r&&S(33,[r,n]),null!==(o?l:i)&&S(34,[r]),(o?be:we).includes(s)||S(35,[r,s]),o?l=s:i=s}return{ro:t.includes("ro"),At:t.includes("prevent"),Ft:t.includes("stop"),event:n?n.slice(2):null,U:l,X:i}}(e,t.rn),u=r.localName.includes("-"),a=t.Ne,h=t.Ze;if("event"===t.b){if(null!==o.U&&"none"!==o.U&&S(36),"eventToken"===a[0])return{...ve(),a:s,i:13,name:a.slice(1).join("."),Tt:h,xe:u,At:o.At,Ft:o.Ft};let l=h.startsWith(xe)?h.slice(9):null,{At:i,Ft:r}=o,c=t.Ee.slice(2),f=t.rn.includes("direct"),d=!f&&U.has(c);d&&e.co(c);let m=t=>{k(t),d&&C.handlerThrew?.(e,h,c)};return{...ve(),a:s,i:5,name:c,nt:d,xe:u,wo:f,Fn(t,s){i&&t.preventDefault(),r&&t.stopPropagation();try{if(null!==l)e.er(l,t,s);else{let l=e.tr(h,t,s);n(l)&&l.then(void 0,m)}}catch(e){m(e)}}}}if("spread"===t.b)return{...ve(),a:s,i:14,o:ye(e,h,l),xe:u};if("command"===a[0]&&a.length>1)return h.startsWith(xe)||S(1201,[t.Ee,h]),{...ve(),a:s,i:12,name:a.slice(1).join("."),Tt:h,xe:u};let c=ye(e,h,l),f={...ve(),a:s,i:1,name:t.Ee,o:c,x:I(t.et),D:I(t.D),ro:o.ro,U:o.U,X:o.X};if("radio"===t.b||"checkbox"===t.b)return("element"===o.U||"auto"===o.U)&&S(37,[t.b,o.U]),f.i="radio"===t.b?9:10,o.ro||(f.Ot=o.event??"input"),f;if(a.length>1){let e=a.slice(1).join("."),t=a[0];if("class"===t||"attr"===t||"style"===t)return f.U=null,f.name=e,"class"===t?(f.i=2,f.K=r.classList.contains(e)):f.i="attr"===t?"srcdoc"===e&&"iframe"===r.localName?1:3:4,f}return"html"===t.Ee?(f.i=8,f):(f.name="text"===t.Ee?"textContent":t.Ee,f.xe=u&&!i(f.name),!u&&!o.ro&&function(e,t){let n=e.localName;if("input"===n){let n=(e.getAttribute("type")||"text").toLowerCase();return"button"!==n&&(("radio"===n||"checkbox"===n)&&"checked"===t||"value"===t||"valueAsNumber"===t||"valueAsDate"===t)}return("select"===n||"textarea"===n)&&"value"===t}(r,f.name)&&(f.Ot=o.event??("select"===r.localName?"change":"input")),f)}(e,t,l,r,s));for(let e=0;e<o.length;e++)14===o[e].i&&(o[e].yo=o.slice(e+1).filter(e=>1===e.i).map(e=>e.name));return o}var Ae=/\{\{([\s\S]+?)\}\}/g;function Te(e){let t=e.data,n=[],l=0;Ae.lastIndex=0;for(let i=Ae.exec(t);null!==i;i=Ae.exec(t)){let r=Ae.lastIndex-i[0].length;r>l&&e.before(t.slice(l,r));let s=e.ownerDocument.createTextNode("");e.before(s),n.push({a:s,cr:i[1].trim()}),l=Ae.lastIndex}return 0===n.length||(l<t.length&&e.before(t.slice(l)),e.remove()),n}function Pe(e,t,n,l){let i=function(e){return{Ee:"textContent",Ne:["textContent"],rn:[],D:[],...y(e),b:"text"}}(t);return{...ve(),a:l,i:0,o:ye(e,i.Ze,n),x:I(i.et),K:""}}function De(e){let t=e.getAttribute(ge());if(null===t)return null;let n=E(t)[0];return void 0===n||"for"!==n.b&&"if"!==n.b&&"elseif"!==n.b&&"else"!==n.b?null:n}var Ee=(e,t)=>0===e?s.commentIfPrefix:null===t.o?s.commentElsePrefix:s.commentElseIfPrefix;function Le(e,t,n){let l=(t,l)=>({el:t,o:"else"===l.b?null:ye(e,l.Ze,n),x:"else"===l.b?null:I(l.et)}),i=[l(t,De(t))];for(let e=t.nextSibling;null!==e;e=e.nextSibling){if(3===e.nodeType&&""===e.data.trim()||8===e.nodeType)continue;if(1!==e.nodeType||"template"!==e.localName)break;let t=De(e);if(null===t||"elseif"!==t.b&&"else"!==t.b||(i.push(l(e,t)),"else"===t.b))break}return i}var Ie=new WeakSet;function je(e,t,n,l,i,r,o,u){let a=(t,n)=>{let i=document.createComment(n);return t.replaceWith(i),l&&C.Dn?.(e,i,t),i},h=t=>{for(let c=0;c<t.length;c++){let f=t[c];if(null!==f.parentNode)if(1===f.nodeType){let t=f,u=t.localName;if(t.hasAttribute(ge()+"-ignore"))continue;if(l){if("script"===u||"style"===u||Ie.has(t))continue;if(Ie.add(t),u===s.tagNames.state){h([...t.childNodes]);continue}}let c="template"===u?De(t):null;if(null!==c){if("for"===c.b){let l=ye(e,c.Ze,n),r=Ue(e,t,l,!0);i(a(t,s.commentForPrefix),l,r)}else"if"===c.b?r(Le(e,t,n).map((t,l)=>({C:Ue(e,t.el,n,!1),o:t.o,x:t.x,S:a(t.el,Ee(l,t))}))):Ce(c.b);continue}let d=t.getAttribute(ge()),m=null===d?null:ke(e,d,n,t,0),p="noscript"!==u&&"iframe"!==u&&!m?.some(Se)&&!C.Eo?.(t);try{l&&p&&h([...t.childNodes])}finally{null!==m&&o(t,m)}!l&&p&&h([...t.childNodes])}else if(3===f.nodeType&&e.Mt&&f.data.includes("{{")&&!Ie.has(f))for(let{a:e,cr:t}of Te(f))u(e,t);else if(8===f.nodeType){let e=Fe.exec(f.data),t=e&&f.parentNode.localName;if(null!==t&&"textarea"!==t&&"title"!==t){let t=document.createTextNode("");f.replaceWith(t),u(t,e[1])}}}};h(t)}var Fe=/^\s*@@\s*(?:wcs-text)?\s*:\s*([\s\S]+?)\s*$/,Oe=e=>{let t=document.createRange();return t.selectNodeContents(e),e.content??t.cloneContents()};function Ue(e,t,n,l){let i=document.importNode(Oe(t),!0),r=[],s=[],o=e=>r.push(e)-1;je(e,[...i.childNodes],n,!1,(e,t,n)=>{s.push({...ve(),a:o(e),i:6,o:t,C:n})},e=>{let t=e.map(e=>({a:o(e.S),C:e.C,o:e.o,x:e.x}));s.push({...ve(),a:t[0].a,i:7,q:t})},(e,t)=>{let n=o(e);for(let e of t)Ne(e)&&S(203,[e.name]),e.a=n;s.push(...t),e.removeAttribute(ge())},(t,l)=>{s.push(Pe(e,l,n,o(t)))}),Re(i,new Set(r),!0);let u=r.map(e=>function(e,t){let n=[];for(let l=t;l!==e;l=l.parentNode){let e=0;for(let t=l.previousSibling;null!==t;t=t.previousSibling)e++;n.unshift(e)}return n}(i,e)),a=1===i.childNodes.length&&8!==i.firstChild.nodeType,h=s.some(e=>6===e.i||7===e.i),c=[],f=new Set,d=[],m=[],p=l?n.n+1:-1;for(let e of s){if(5===e.i&&e.nt&&!e.xe&&!We(r[e.a],i)){d.push(e);continue}m.push(e);let t=e.o;if(null!==t&&t.n===p&&t.h[p]===n&&qe(e)&&(e.F=c.push(e)-1),7===e.i)for(let t of e.q)f.add(t.a);else f.add(e.a)}let g=[...f].sort((e,t)=>e-t);return{ln:i,root:a?i.firstChild:null,Cn:u,build:g,Oe:d,sr:m,jn:a,lr:h,So:[],Ge:c}}function We(e,t){for(;e.parentNode!==t;e=e.parentNode){if(e.parentNode.localName.includes("-"))return!0;for(let t=e.previousSibling;t;t=t.previousSibling)if(8===t.nodeType)return!0}return!1}function qe(e){if(null!==e.U)return!1;switch(e.i){case 0:case 2:case 3:case 4:case 8:return!0;case 1:return!e.xe&&null===e.Ot;default:return!1}}var $e=new Set(["table","thead","tbody","tfoot","tr","colgroup","select","optgroup","datalist"]);function Re(e,t,n){for(let l=e.firstChild;null!==l;){let e=l.nextSibling;3===l.nodeType?n&&!t.has(l)&&""===l.data.trim()&&l.remove():1===l.nodeType&&Re(l,t,$e.has(l.localName)),l=e}}var Be=new WeakMap;function He(e,t){let n=9===t.nodeType?t.body:t;e.root=t,Be.set(t,e),Ge(e,[...n.childNodes]),e.ze()}function Me(e,t,n){try{let l="template"===t.localName?De(t):null;null!==l&&!n&&S(204,[l.b]),Ge(e,[t])}catch(e){k(e)}e.ze()}function Ge(e,t){je(e,t,null,!0,(t,n,l)=>{new ue(e,l,_(e,n,null,t),t).xt()},t=>{se(e,t,null,null)},(t,n)=>{C.Dn?.(e,t,n);for(let l of n)re(e,l,t,null,null)},(t,n)=>{C.Dn?.(e,t,n),re(e,Pe(e,n,null,0),t,null,null)})}export{E as a,fe as b,W as c,q as d,$ as e,R as f,B as g,Y as h,ue as i,Ne as j,Se as k,Pe as l,Ie as m,je as n,Oe as o,Be as p,He as q,Me as r};
|
|
2
|
+
//# sourceMappingURL=chunk-47I6RYV3.js.map
|