voodoojs 0.11.1 → 0.11.2
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 +4 -3
- package/dist/{chunk-XG2UDP4O.js → chunk-AH2VXDZD.js} +13 -13
- package/dist/{chunk-FCJ2APGN.js → chunk-DCE5WIGA.js} +5 -5
- package/dist/{chunk-KE6WWJOB.js → chunk-DJJB35SR.js} +6 -6
- package/dist/{chunk-32J7GDLD.js → chunk-H2ZUEQWV.js} +17 -9
- package/dist/{chunk-OJDW7KXT.js → chunk-IGZSDZKU.js} +4 -4
- package/dist/{chunk-BEQEBFQ2.js → chunk-IS3DR2KY.js} +3 -3
- package/dist/{chunk-OHSGDVPA.js → chunk-KQYSJHZR.js} +5 -5
- package/dist/{chunk-GC3BKNPT.js → chunk-NFDXVIII.js} +3 -3
- package/dist/{chunk-TXWSOPF2.js → chunk-UV5PMS7P.js} +4 -4
- package/dist/{chunk-J6RTM5P4.js → chunk-V3O3WOZH.js} +4 -4
- package/dist/{chunk-FITEA237.js → chunk-WJP3YGUI.js} +4 -4
- package/dist/essential.cjs +12 -4
- package/dist/essential.d.cts +1 -1
- package/dist/essential.d.ts +1 -1
- package/dist/essential.js +10 -10
- package/dist/gpu.cjs +1 -1
- package/dist/gpu.js +10 -10
- package/dist/http.cjs +1 -1
- package/dist/http.js +5 -5
- package/dist/index.cjs +12 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +20 -20
- package/dist/reactivity.cjs +1 -1
- package/dist/reactivity.js +2 -2
- package/dist/socket.cjs +11 -3
- package/dist/socket.js +9 -9
- package/dist/style-4X62SABN.js +5 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +2 -2
- package/dist/voodoo.core.js +12 -4
- package/dist/voodoo.core.min.js +3 -3
- package/dist/voodoo.full.js +12 -4
- package/dist/voodoo.full.min.js +22 -22
- package/dist/voodoo.js +12 -4
- package/dist/voodoo.min.js +8 -8
- package/package.json +1 -1
- package/dist/style-MX6ZATL4.js +0 -5
- package/dist/{query-p04Fl8VW.d.ts → query-Cf-7iibE.d.ts} +28 -28
- package/dist/{query-CbHihkvO.d.cts → query-DiQAS73Q.d.cts} +28 -28
package/dist/utils.cjs
CHANGED
package/dist/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { capitalize, chunk, clone, debounce, device, escapeHtml, formatCurrency, formatDate, formatFileSize, formatNumber, formatPercent, get, groupBy, isBrowser, matchesMedia, memoize, merge, once, parseDuration, random, relativeTime, sample, set, setFormatDefaults, sleep, slugify, sortBy, stripTags, throttle, titleCase, truncate, uid, unique, uuid } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { capitalize, chunk, clone, debounce, device, escapeHtml, formatCurrency, formatDate, formatFileSize, formatNumber, formatPercent, get, groupBy, isBrowser, matchesMedia, memoize, merge, once, parseDuration, random, relativeTime, sample, set, setFormatDefaults, sleep, slugify, sortBy, stripTags, throttle, titleCase, truncate, uid, unique, uuid } from './chunk-IGZSDZKU.js';
|
|
2
|
+
import './chunk-IS3DR2KY.js';
|
|
3
3
|
//# sourceMappingURL=utils.js.map
|
|
4
4
|
//# sourceMappingURL=utils.js.map
|
package/dist/voodoo.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Voodoo.js v0.11.
|
|
2
|
+
* Voodoo.js v0.11.2
|
|
3
3
|
* JavaScript feels like magic.
|
|
4
4
|
* (c) 2026 Voodoo.js contributors. MIT License.
|
|
5
5
|
*/
|
|
@@ -1649,9 +1649,17 @@ ${pointer}`);
|
|
|
1649
1649
|
if (t.type === "punct") {
|
|
1650
1650
|
if (t.value === "(") {
|
|
1651
1651
|
this.next();
|
|
1652
|
-
const
|
|
1652
|
+
const body = [this.parseExpression()];
|
|
1653
|
+
while (this.isPunct(",")) {
|
|
1654
|
+
this.next();
|
|
1655
|
+
if (this.isPunct(")")) {
|
|
1656
|
+
const stray = this.peek();
|
|
1657
|
+
throw new VoodooSyntaxError("Trailing comma in a group", this.source, stray.start);
|
|
1658
|
+
}
|
|
1659
|
+
body.push(this.parseExpression());
|
|
1660
|
+
}
|
|
1653
1661
|
this.expect(")");
|
|
1654
|
-
return
|
|
1662
|
+
return body.length === 1 ? body[0] : { t: "seq", body };
|
|
1655
1663
|
}
|
|
1656
1664
|
if (t.value === "[") return this.parseArrayLiteral();
|
|
1657
1665
|
if (t.value === "{") return this.parseObjectLiteral();
|
|
@@ -6825,7 +6833,7 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
6825
6833
|
Object.defineProperties(rootScope.data, Object.getOwnPropertyDescriptors(values));
|
|
6826
6834
|
return rootScope.data;
|
|
6827
6835
|
}
|
|
6828
|
-
var version2 = "0.11.
|
|
6836
|
+
var version2 = "0.11.2";
|
|
6829
6837
|
var core = {
|
|
6830
6838
|
// Utilities first: Voodoo's own names can override.
|
|
6831
6839
|
...utils_exports,
|
package/dist/voodoo.core.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Voodoo.js v0.11.
|
|
2
|
+
* Voodoo.js v0.11.2
|
|
3
3
|
* JavaScript feels like magic.
|
|
4
4
|
* (c) 2026 Voodoo.js contributors. MIT License.
|
|
5
5
|
*/
|
|
@@ -53,7 +53,7 @@ ${" ".repeat(Math.max(0,o))}^`;super(`${n}
|
|
|
53
53
|
${s}`);M(this,"source",r);M(this,"position",o);this.name="VoodooSyntaxError"}},Ci=[">>>=","===","!==","**=","...",">>>","<<=",">>=","&&=","||=","??=","?.","=>","==","!=","<=",">=","&&","||","??","**","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<",">>","+","-","*","/","%","!","<",">","=","&","|","^","~","(",")","[","]","{","}",",",".","?",":",";"],Pi=/[A-Za-z_$À-]/,Mi=/[A-Za-z0-9_$À-]/;function Li(e){return Pi.test(e)}function Ni(e){return Mi.test(e)}function Xt(e){return e>="0"&&e<="9"}var ro={n:`
|
|
54
54
|
`,t:" ",r:"\r",b:"\b",f:"\f",v:"\v",0:"\0"};function Jt(e){var o,s;let t=[],n=0,r=e.length;for(;n<r;){let i=e[n];if(i===" "||i===" "||i===`
|
|
55
55
|
`||i==="\r"||i==="\f"||i==="\v"){n++;continue}if(i==="/"&&e[n+1]==="/"){for(;n<r&&e[n]!==`
|
|
56
|
-
`;)n++;continue}if(i==="/"&&e[n+1]==="*"){let u=e.indexOf("*/",n+2);if(u===-1)throw new L("Unclosed block comment",e,n);n=u+2;continue}let a=n;if(Xt(i)||i==="."&&Xt(e[n+1])){let u="";if(i==="0"&&(e[n+1]==="x"||e[n+1]==="X"))for(u="0x",n+=2;n<r&&/[0-9a-fA-F_]/.test(e[n]);)u+=e[n++];else if(i==="0"&&(e[n+1]==="b"||e[n+1]==="B"))for(u="0b",n+=2;n<r&&/[01_]/.test(e[n]);)u+=e[n++];else if(i==="0"&&(e[n+1]==="o"||e[n+1]==="O"))for(u="0o",n+=2;n<r&&/[0-7_]/.test(e[n]);)u+=e[n++];else{for(;n<r&&/[0-9_]/.test(e[n]);)u+=e[n++];if(e[n]===".")for(u+=e[n++];n<r&&/[0-9_]/.test(e[n]);)u+=e[n++];if(e[n]==="e"||e[n]==="E")for(u+=e[n++],(e[n]==="+"||e[n]==="-")&&(u+=e[n++]);n<r&&Xt(e[n]);)u+=e[n++]}let l=Number(u.replace(/_/g,""));if(Number.isNaN(l))throw new L("Invalid number",e,a);t.push({type:"num",value:u,parsed:l,start:a,end:n});continue}if(i==='"'||i==="'"){n++;let u="";for(;n<r&&e[n]!==i;)if(e[n]==="\\"){n++;let l=e[n];if(l==="u")if(e[n+1]==="{"){let f=e.indexOf("}",n);if(f===-1)throw new L("Unclosed Unicode escape",e,a);let p=e.slice(n+2,f);if(!/^[0-9a-fA-F]+$/.test(p)||parseInt(p,16)>1114111)throw new L(`Invalid Unicode escape "\\u{${p}}"`,e,n-1);u+=String.fromCodePoint(parseInt(p,16)),n=f+1}else{let f=e.slice(n+1,n+5);if(!/^[0-9a-fA-F]{4}$/.test(f))throw new L("Invalid Unicode escape: \\u needs 4 hexadecimal digits",e,n-1);u+=String.fromCharCode(parseInt(f,16)),n+=5}else if(l==="x"){let f=e.slice(n+1,n+3);if(!/^[0-9a-fA-F]{2}$/.test(f))throw new L("Invalid hexadecimal escape: \\x needs 2 hexadecimal digits",e,n-1);u+=String.fromCharCode(parseInt(f,16)),n+=3}else u+=(o=ro[l])!=null?o:l,n++}else u+=e[n++];if(n>=r)throw new L("Unclosed string",e,a);n++,t.push({type:"str",value:u,parsed:u,start:a,end:n});continue}if(i==="`"){n++;let u=[],l=[],f="";for(;n<r&&e[n]!=="`";){if(e[n]==="\\"){let p=e[n+1];f+=(s=ro[p])!=null?s:p,n+=2;continue}if(e[n]==="$"&&e[n+1]==="{"){u.push(f),f="",n+=2;let p=1,d="";for(;n<r;){let m=e[n];if(m==="{")p++;else if(m==="}"){if(p--,p===0)break}else if(m==='"'||m==="'"||m==="`"){let g=m;for(d+=e[n++];n<r&&e[n]!==g;)e[n]==="\\"&&(d+=e[n++]),d+=e[n++]}d+=e[n++]}if(p!==0)throw new L("Unclosed template interpolation",e,a);n++,l.push(d);continue}f+=e[n++]}if(n>=r)throw new L("Unclosed template literal",e,a);n++,u.push(f),t.push({type:"tpl",value:e.slice(a,n),tpl:{quasis:u,exprs:l},start:a,end:n});continue}if(Li(i)){let u="";for(;n<r&&Ni(e[n]);)u+=e[n++];t.push({type:"ident",value:u,start:a,end:n});continue}let c;for(let u of Ci)if(e.startsWith(u,n)){if(u==="?."&&Xt(e[n+2]))continue;c=u;break}if(c){n+=c.length,t.push({type:"punct",value:c,start:a,end:n});continue}throw new L(`Unexpected character "${i}"`,e,n)}return t.push({type:"eof",value:"",start:r,end:r}),t}var oo={"??":1,"||":2,"&&":3,"|":4,"^":5,"&":6,"==":7,"!=":7,"===":7,"!==":7,"<":8,">":8,"<=":8,">=":8,in:8,instanceof:8,"<<":9,">>":9,">>>":9,"+":10,"-":10,"*":11,"/":11,"%":11,"**":12},Oi=new Set(["=","+=","-=","*=","/=","%=","**=","&&=","||=","??="]),$i=new Set(["!","-","+","~","typeof","void","delete"]),so=Object.assign(Object.create(null),{true:!0,false:!1,null:null,undefined:void 0}),io=1200,ao=32,Xn=0,Jn=class{constructor(t,n){M(this,"tokens",t);M(this,"source",n);M(this,"pos",0);M(this,"depth",0)}peek(t=0){return this.tokens[Math.min(this.pos+t,this.tokens.length-1)]}next(){return this.tokens[this.pos++]}isPunct(t,n=0){let r=this.peek(n);return r.type==="punct"&&r.value===t}isIdent(t,n=0){let r=this.peek(n);return r.type==="ident"&&r.value===t}expect(t){if(!this.isPunct(t)){let n=this.peek();throw new L(`Expected "${t}" but found "${n.value||"end of expression"}"`,this.source,n.start)}return this.next()}parseProgram(){let t=[];for(;this.peek().type!=="eof";)for(t.push(this.parseStatement());this.isPunct(";")||this.isPunct(",");)this.next();return t.length===0?{t:"lit",v:void 0}:t.length===1?t[0]:{t:"seq",body:t}}parseArrowBody(){if(!this.isPunct("{"))return this.parseAssignment();this.next();let t=[];for(;!this.isPunct("}")&&this.peek().type!=="eof";)for(t.push(this.parseStatement());this.isPunct(";")||this.isPunct(",");)this.next();return this.expect("}"),t.length===0?{t:"lit",v:void 0}:t.length===1?t[0]:{t:"seq",body:t}}parseStatement(){if(this.peek().type==="ident"&&this.peek().value==="return")return this.next(),this.isPunct(";")||this.isPunct(",")||this.isPunct("}")||this.peek().type==="eof"?{t:"return",a:null}:{t:"return",a:this.parseExpression()};if(this.peek().type==="ident"&&this.peek().value==="if"&&this.isPunct("(",1)){this.next(),this.expect("(");let t=this.parseExpression();this.expect(")");let n=this.parseBlockOrStatement(),r=null;return this.peek().type==="ident"&&this.peek().value==="else"&&(this.next(),r=this.parseBlockOrStatement()),{t:"if",test:t,cons:n,alt:r}}return this.parseExpression()}parseBlockOrStatement(){if(!this.isPunct("{"))return this.parseStatement();this.next();let t=[];for(;!this.isPunct("}")&&this.peek().type!=="eof";)for(t.push(this.parseStatement());this.isPunct(";")||this.isPunct(",");)this.next();return this.expect("}"),t.length===0?{t:"lit",v:void 0}:t.length===1?t[0]:{t:"seq",body:t}}parseExpression(){return this.parseAssignment()}enterLevel(){if(++this.depth>io){let t=this.peek();throw new L(`Expression too deeply nested (limit of ${io} levels)`,this.source,t.start)}}parseAssignment(){this.enterLevel();let t=this.parseAssignmentInternal();return this.depth--,t}parseAssignmentInternal(){if(this.peek().type==="ident"&&this.isPunct("=>",1)){let r=this.next().value;return this.next(),{t:"arrow",params:[{kind:"id",name:r}],body:this.parseArrowBody()}}if(this.isPunct("(")){let r=this.tryParseParenArrow();if(r)return r}let t=this.parseConditional(),n=this.peek();if(n.type==="punct"&&Oi.has(n.value)){if(t.t!=="id"&&t.t!=="member")throw new L("Invalid assignment target",this.source,n.start);this.next();let r=this.parseAssignment();return{t:"assign",op:n.value,target:t,value:r}}return t}tryParseParenArrow(){let t=this.pos,n=0,r=this.pos;for(;r<this.tokens.length;r++){let i=this.tokens[r];if(i.type==="punct"&&i.value==="(")n++;else if(i.type==="punct"&&i.value===")"){if(n--,n===0)break}else if(i.type==="eof")break}let o=this.tokens[r+1];if(!o||o.type!=="punct"||o.value!=="=>")return null;this.next();let s;try{s=this.parseParamList()}catch(i){return this.pos=t,null}return this.expect("=>"),{t:"arrow",params:s,body:this.parseArrowBody()}}parseParamList(){let t=[];for(;!this.isPunct(")")&&(t.push(this.parseParam()),this.isPunct(","));)this.next();return this.expect(")"),t}parseParam(){if(this.isPunct("...")){this.next();let n=this.next();if(n.type!=="ident")throw new L("Expected a name after ...",this.source,n.start);return{kind:"rest",name:n.value}}let t;if(this.isPunct("{")){this.next();let n=[],r;for(;!this.isPunct("}");){if(this.isPunct("...")){this.next();let o=this.next();if(o.type!=="ident")throw new L("Expected a name after ...",this.source,o.start);r=o.value}else{let o=this.next();if(o.type!=="ident"&&o.type!=="str")throw new L("Expected a property name",this.source,o.start);let s=this.isPunct(":")?(this.next(),this.parseParam()):{kind:"id",name:o.value};this.isPunct("=")&&(this.next(),s.def=this.parseAssignment()),n.push({key:String(o.value),value:s})}if(this.isPunct(","))this.next();else break}this.expect("}"),t={kind:"obj",props:n,rest:r}}else if(this.isPunct("[")){this.next();let n=[],r;for(;!this.isPunct("]");){if(this.isPunct(",")){this.next(),n.push(null);continue}if(this.isPunct("...")){this.next();let o=this.next();if(o.type!=="ident")throw new L("Expected a name after ...",this.source,o.start);r=o.value}else n.push(this.parseParam());if(this.isPunct(","))this.next();else break}this.expect("]"),t={kind:"arr",elements:n,rest:r}}else{let n=this.next();if(n.type!=="ident")throw new L("Expected a parameter name",this.source,n.start);t={kind:"id",name:n.value}}return this.isPunct("=")&&(this.next(),t.def=this.parseAssignment()),t}parseConditional(){let t=this.parseBinary(0);if(this.isPunct("?")){this.next();let n=this.parseAssignment();this.expect(":");let r=this.parseAssignment();return{t:"cond",test:t,cons:n,alt:r}}return t}parseBinary(t){this.enterLevel();let n=this.parseBinaryInternal(t);return this.depth--,n}parseBinaryInternal(t){let n=this.parseUnary();for(;;){let r=this.peek(),o=r.value;if(!(r.type==="punct"&&o in oo||r.type==="ident"&&(o==="in"||o==="instanceof")))break;let i=oo[o];if(i===void 0||i<=t)break;this.next();let a=this.parseBinary(o==="**"?i-1:i);n={t:o==="&&"||o==="||"||o==="??"?"logic":"bin",op:o,l:n,r:a}}return n}parseUnary(){this.enterLevel();let t=this.parseUnaryInternal();return this.depth--,t}parseUnaryInternal(){let t=this.peek();if((t.type==="punct"||t.type==="ident")&&$i.has(t.value))return this.next(),{t:"unary",op:t.value,a:this.parseUnary()};if(t.type==="punct"&&(t.value==="++"||t.value==="--")){this.next();let o=this.parseUnary();return{t:"update",op:t.value,a:o,prefix:!0}}let n=this.parseCallMember(),r=this.peek();return r.type==="punct"&&(r.value==="++"||r.value==="--")&&(this.next(),n={t:"update",op:r.value,a:n,prefix:!1}),n}parseNew(){this.next();let t=this.parseMemberOnly(this.parsePrimary()),n=this.isPunct("(")?this.parseArguments():[];return{t:"new",callee:t,args:n}}parseMemberOnly(t){let n=t;for(;;)if(this.isPunct(".")){this.next();let r=this.next();if(r.type!=="ident")throw new L("Invalid property name",this.source,r.start);n={t:"member",o:n,p:{t:"lit",v:r.value},computed:!1,opt:!1}}else if(this.isPunct("[")){this.next();let r=this.parseExpression();this.expect("]"),n={t:"member",o:n,p:r,computed:!0,opt:!1}}else return n}parseCallMember(){let t=this.isIdent("new")?this.parseNew():this.parsePrimary();for(;;)if(this.isPunct(".")){this.next();let n=this.next();if(n.type!=="ident")throw new L("Invalid property name",this.source,n.start);t={t:"member",o:t,p:{t:"lit",v:n.value},computed:!1,opt:!1}}else if(this.isPunct("?."))if(this.next(),this.isPunct("("))t={t:"call",callee:t,args:this.parseArguments(),opt:!0};else if(this.isPunct("[")){this.next();let n=this.parseExpression();this.expect("]"),t={t:"member",o:t,p:n,computed:!0,opt:!0}}else{let n=this.next();if(n.type!=="ident")throw new L("Invalid property name",this.source,n.start);t={t:"member",o:t,p:{t:"lit",v:n.value},computed:!1,opt:!0}}else if(this.isPunct("[")){this.next();let n=this.parseExpression();this.expect("]"),t={t:"member",o:t,p:n,computed:!0,opt:!1}}else if(this.isPunct("("))t={t:"call",callee:t,args:this.parseArguments(),opt:!1};else return t}parseArguments(){this.expect("(");let t=[];for(;!this.isPunct(")")&&(this.isPunct("...")?(this.next(),t.push({t:"unary",op:"...",a:this.parseAssignment()})):t.push(this.parseAssignment()),this.isPunct(","));)this.next();return this.expect(")"),t}parsePrimary(){let t=this.peek();if(t.type==="ident"&&t.value==="function")return this.next(),this.peek().type==="ident"&&this.next(),this.expect("("),{t:"arrow",params:this.parseParamList(),body:this.parseArrowBody()};if(t.type==="num"||t.type==="str")return this.next(),{t:"lit",v:t.parsed};if(t.type==="tpl"){this.next();let n=t.tpl;if(Xn>=ao)throw new L(`Template literal too deeply nested (limit of ${ao} levels)`,this.source,t.start);Xn++;try{return{t:"tpl",quasis:n.quasis,exprs:n.exprs.map(r=>le(r))}}finally{Xn--}}if(t.type==="ident")return t.value in so?(this.next(),{t:"lit",v:so[t.value]}):(this.next(),{t:"id",n:t.value});if(t.type==="punct"){if(t.value==="("){this.next();let n=this.parseExpression();return this.expect(")"),n}if(t.value==="[")return this.parseArrayLiteral();if(t.value==="{")return this.parseObjectLiteral()}throw new L(`Unexpected token "${t.value||"end of expression"}"`,this.source,t.start)}parseArrayLiteral(){this.expect("[");let t=[];for(;!this.isPunct("]")&&(this.isPunct("...")?(this.next(),t.push({spread:this.parseAssignment()})):t.push(this.parseAssignment()),this.isPunct(","));)this.next();return this.expect("]"),{t:"arr",els:t}}parseObjectLiteral(){var n;this.expect("{");let t=[];for(;!this.isPunct("}");){if(this.isPunct("..."))this.next(),t.push({key:null,spread:this.parseAssignment()});else if(this.isPunct("[")){this.next();let r=this.parseAssignment();this.expect("]"),this.expect(":"),t.push({key:null,keyExpr:r,value:this.parseAssignment()})}else{if(this.peek().type==="ident"&&this.peek().value==="get"&&this.peek(1).type==="ident"&&this.isPunct("(",2)){this.next();let s=this.next();this.expect("("),this.expect(")"),t.push({key:String(s.value),getter:!0,value:{t:"method",params:[],body:this.parseArrowBody()}}),this.isPunct(",")&&this.next();continue}let r=this.next();if(r.type!=="ident"&&r.type!=="str"&&r.type!=="num")throw new L("Invalid object key",this.source,r.start);let o=String((n=r.parsed)!=null?n:r.value);if(this.isPunct(":"))this.next(),t.push({key:o,value:this.parseAssignment()});else if(this.isPunct("(")){this.next();let s=this.parseParamList();t.push({key:o,value:{t:"method",params:s,body:this.parseArrowBody()}})}else t.push({key:o,value:{t:"id",n:o}})}if(this.isPunct(","))this.next();else break}return this.expect("}"),{t:"obj",props:t}}},Ye=new Map,co=2e3;function le(e){let t=Ye.get(e);if(t)return t;let n=new Jn(Jt(e),e).parseProgram();return Ye.size>=co&&Hi(),Ye.set(e,n),n}function Hi(){let e=Math.floor(co/2),t=0;for(let n of Ye.keys())if(Ye.delete(n),++t>=e)break}function uo(){Ye.clear()}var ho,Di=Object.freeze({keys:Object.keys,values:Object.values,entries:Object.entries,fromEntries:Object.fromEntries,assign:Object.assign,is:Object.is,hasOwn:(ho=Object.hasOwn)!=null?ho:((e,t)=>Object.prototype.hasOwnProperty.call(e,t))}),Ii=new Set(["eval","Function","window","globalThis","self","top","parent","document","fetch","XMLHttpRequest","importScripts","require","process","Reflect","Proxy","WebAssembly","localStorage","sessionStorage","indexedDB","navigator","location","history","crypto","Worker","SharedWorker","ServiceWorker"]),G={Math,JSON,Date,Number,String,Boolean,Array,Object:Di,Intl,RegExp,Promise,parseInt,parseFloat,isNaN,isFinite,encodeURIComponent,decodeURIComponent,console},B=class extends Error{constructor(n,r){super(r?`${n}
|
|
56
|
+
`;)n++;continue}if(i==="/"&&e[n+1]==="*"){let u=e.indexOf("*/",n+2);if(u===-1)throw new L("Unclosed block comment",e,n);n=u+2;continue}let a=n;if(Xt(i)||i==="."&&Xt(e[n+1])){let u="";if(i==="0"&&(e[n+1]==="x"||e[n+1]==="X"))for(u="0x",n+=2;n<r&&/[0-9a-fA-F_]/.test(e[n]);)u+=e[n++];else if(i==="0"&&(e[n+1]==="b"||e[n+1]==="B"))for(u="0b",n+=2;n<r&&/[01_]/.test(e[n]);)u+=e[n++];else if(i==="0"&&(e[n+1]==="o"||e[n+1]==="O"))for(u="0o",n+=2;n<r&&/[0-7_]/.test(e[n]);)u+=e[n++];else{for(;n<r&&/[0-9_]/.test(e[n]);)u+=e[n++];if(e[n]===".")for(u+=e[n++];n<r&&/[0-9_]/.test(e[n]);)u+=e[n++];if(e[n]==="e"||e[n]==="E")for(u+=e[n++],(e[n]==="+"||e[n]==="-")&&(u+=e[n++]);n<r&&Xt(e[n]);)u+=e[n++]}let l=Number(u.replace(/_/g,""));if(Number.isNaN(l))throw new L("Invalid number",e,a);t.push({type:"num",value:u,parsed:l,start:a,end:n});continue}if(i==='"'||i==="'"){n++;let u="";for(;n<r&&e[n]!==i;)if(e[n]==="\\"){n++;let l=e[n];if(l==="u")if(e[n+1]==="{"){let f=e.indexOf("}",n);if(f===-1)throw new L("Unclosed Unicode escape",e,a);let p=e.slice(n+2,f);if(!/^[0-9a-fA-F]+$/.test(p)||parseInt(p,16)>1114111)throw new L(`Invalid Unicode escape "\\u{${p}}"`,e,n-1);u+=String.fromCodePoint(parseInt(p,16)),n=f+1}else{let f=e.slice(n+1,n+5);if(!/^[0-9a-fA-F]{4}$/.test(f))throw new L("Invalid Unicode escape: \\u needs 4 hexadecimal digits",e,n-1);u+=String.fromCharCode(parseInt(f,16)),n+=5}else if(l==="x"){let f=e.slice(n+1,n+3);if(!/^[0-9a-fA-F]{2}$/.test(f))throw new L("Invalid hexadecimal escape: \\x needs 2 hexadecimal digits",e,n-1);u+=String.fromCharCode(parseInt(f,16)),n+=3}else u+=(o=ro[l])!=null?o:l,n++}else u+=e[n++];if(n>=r)throw new L("Unclosed string",e,a);n++,t.push({type:"str",value:u,parsed:u,start:a,end:n});continue}if(i==="`"){n++;let u=[],l=[],f="";for(;n<r&&e[n]!=="`";){if(e[n]==="\\"){let p=e[n+1];f+=(s=ro[p])!=null?s:p,n+=2;continue}if(e[n]==="$"&&e[n+1]==="{"){u.push(f),f="",n+=2;let p=1,d="";for(;n<r;){let m=e[n];if(m==="{")p++;else if(m==="}"){if(p--,p===0)break}else if(m==='"'||m==="'"||m==="`"){let g=m;for(d+=e[n++];n<r&&e[n]!==g;)e[n]==="\\"&&(d+=e[n++]),d+=e[n++]}d+=e[n++]}if(p!==0)throw new L("Unclosed template interpolation",e,a);n++,l.push(d);continue}f+=e[n++]}if(n>=r)throw new L("Unclosed template literal",e,a);n++,u.push(f),t.push({type:"tpl",value:e.slice(a,n),tpl:{quasis:u,exprs:l},start:a,end:n});continue}if(Li(i)){let u="";for(;n<r&&Ni(e[n]);)u+=e[n++];t.push({type:"ident",value:u,start:a,end:n});continue}let c;for(let u of Ci)if(e.startsWith(u,n)){if(u==="?."&&Xt(e[n+2]))continue;c=u;break}if(c){n+=c.length,t.push({type:"punct",value:c,start:a,end:n});continue}throw new L(`Unexpected character "${i}"`,e,n)}return t.push({type:"eof",value:"",start:r,end:r}),t}var oo={"??":1,"||":2,"&&":3,"|":4,"^":5,"&":6,"==":7,"!=":7,"===":7,"!==":7,"<":8,">":8,"<=":8,">=":8,in:8,instanceof:8,"<<":9,">>":9,">>>":9,"+":10,"-":10,"*":11,"/":11,"%":11,"**":12},Oi=new Set(["=","+=","-=","*=","/=","%=","**=","&&=","||=","??="]),$i=new Set(["!","-","+","~","typeof","void","delete"]),so=Object.assign(Object.create(null),{true:!0,false:!1,null:null,undefined:void 0}),io=1200,ao=32,Xn=0,Jn=class{constructor(t,n){M(this,"tokens",t);M(this,"source",n);M(this,"pos",0);M(this,"depth",0)}peek(t=0){return this.tokens[Math.min(this.pos+t,this.tokens.length-1)]}next(){return this.tokens[this.pos++]}isPunct(t,n=0){let r=this.peek(n);return r.type==="punct"&&r.value===t}isIdent(t,n=0){let r=this.peek(n);return r.type==="ident"&&r.value===t}expect(t){if(!this.isPunct(t)){let n=this.peek();throw new L(`Expected "${t}" but found "${n.value||"end of expression"}"`,this.source,n.start)}return this.next()}parseProgram(){let t=[];for(;this.peek().type!=="eof";)for(t.push(this.parseStatement());this.isPunct(";")||this.isPunct(",");)this.next();return t.length===0?{t:"lit",v:void 0}:t.length===1?t[0]:{t:"seq",body:t}}parseArrowBody(){if(!this.isPunct("{"))return this.parseAssignment();this.next();let t=[];for(;!this.isPunct("}")&&this.peek().type!=="eof";)for(t.push(this.parseStatement());this.isPunct(";")||this.isPunct(",");)this.next();return this.expect("}"),t.length===0?{t:"lit",v:void 0}:t.length===1?t[0]:{t:"seq",body:t}}parseStatement(){if(this.peek().type==="ident"&&this.peek().value==="return")return this.next(),this.isPunct(";")||this.isPunct(",")||this.isPunct("}")||this.peek().type==="eof"?{t:"return",a:null}:{t:"return",a:this.parseExpression()};if(this.peek().type==="ident"&&this.peek().value==="if"&&this.isPunct("(",1)){this.next(),this.expect("(");let t=this.parseExpression();this.expect(")");let n=this.parseBlockOrStatement(),r=null;return this.peek().type==="ident"&&this.peek().value==="else"&&(this.next(),r=this.parseBlockOrStatement()),{t:"if",test:t,cons:n,alt:r}}return this.parseExpression()}parseBlockOrStatement(){if(!this.isPunct("{"))return this.parseStatement();this.next();let t=[];for(;!this.isPunct("}")&&this.peek().type!=="eof";)for(t.push(this.parseStatement());this.isPunct(";")||this.isPunct(",");)this.next();return this.expect("}"),t.length===0?{t:"lit",v:void 0}:t.length===1?t[0]:{t:"seq",body:t}}parseExpression(){return this.parseAssignment()}enterLevel(){if(++this.depth>io){let t=this.peek();throw new L(`Expression too deeply nested (limit of ${io} levels)`,this.source,t.start)}}parseAssignment(){this.enterLevel();let t=this.parseAssignmentInternal();return this.depth--,t}parseAssignmentInternal(){if(this.peek().type==="ident"&&this.isPunct("=>",1)){let r=this.next().value;return this.next(),{t:"arrow",params:[{kind:"id",name:r}],body:this.parseArrowBody()}}if(this.isPunct("(")){let r=this.tryParseParenArrow();if(r)return r}let t=this.parseConditional(),n=this.peek();if(n.type==="punct"&&Oi.has(n.value)){if(t.t!=="id"&&t.t!=="member")throw new L("Invalid assignment target",this.source,n.start);this.next();let r=this.parseAssignment();return{t:"assign",op:n.value,target:t,value:r}}return t}tryParseParenArrow(){let t=this.pos,n=0,r=this.pos;for(;r<this.tokens.length;r++){let i=this.tokens[r];if(i.type==="punct"&&i.value==="(")n++;else if(i.type==="punct"&&i.value===")"){if(n--,n===0)break}else if(i.type==="eof")break}let o=this.tokens[r+1];if(!o||o.type!=="punct"||o.value!=="=>")return null;this.next();let s;try{s=this.parseParamList()}catch(i){return this.pos=t,null}return this.expect("=>"),{t:"arrow",params:s,body:this.parseArrowBody()}}parseParamList(){let t=[];for(;!this.isPunct(")")&&(t.push(this.parseParam()),this.isPunct(","));)this.next();return this.expect(")"),t}parseParam(){if(this.isPunct("...")){this.next();let n=this.next();if(n.type!=="ident")throw new L("Expected a name after ...",this.source,n.start);return{kind:"rest",name:n.value}}let t;if(this.isPunct("{")){this.next();let n=[],r;for(;!this.isPunct("}");){if(this.isPunct("...")){this.next();let o=this.next();if(o.type!=="ident")throw new L("Expected a name after ...",this.source,o.start);r=o.value}else{let o=this.next();if(o.type!=="ident"&&o.type!=="str")throw new L("Expected a property name",this.source,o.start);let s=this.isPunct(":")?(this.next(),this.parseParam()):{kind:"id",name:o.value};this.isPunct("=")&&(this.next(),s.def=this.parseAssignment()),n.push({key:String(o.value),value:s})}if(this.isPunct(","))this.next();else break}this.expect("}"),t={kind:"obj",props:n,rest:r}}else if(this.isPunct("[")){this.next();let n=[],r;for(;!this.isPunct("]");){if(this.isPunct(",")){this.next(),n.push(null);continue}if(this.isPunct("...")){this.next();let o=this.next();if(o.type!=="ident")throw new L("Expected a name after ...",this.source,o.start);r=o.value}else n.push(this.parseParam());if(this.isPunct(","))this.next();else break}this.expect("]"),t={kind:"arr",elements:n,rest:r}}else{let n=this.next();if(n.type!=="ident")throw new L("Expected a parameter name",this.source,n.start);t={kind:"id",name:n.value}}return this.isPunct("=")&&(this.next(),t.def=this.parseAssignment()),t}parseConditional(){let t=this.parseBinary(0);if(this.isPunct("?")){this.next();let n=this.parseAssignment();this.expect(":");let r=this.parseAssignment();return{t:"cond",test:t,cons:n,alt:r}}return t}parseBinary(t){this.enterLevel();let n=this.parseBinaryInternal(t);return this.depth--,n}parseBinaryInternal(t){let n=this.parseUnary();for(;;){let r=this.peek(),o=r.value;if(!(r.type==="punct"&&o in oo||r.type==="ident"&&(o==="in"||o==="instanceof")))break;let i=oo[o];if(i===void 0||i<=t)break;this.next();let a=this.parseBinary(o==="**"?i-1:i);n={t:o==="&&"||o==="||"||o==="??"?"logic":"bin",op:o,l:n,r:a}}return n}parseUnary(){this.enterLevel();let t=this.parseUnaryInternal();return this.depth--,t}parseUnaryInternal(){let t=this.peek();if((t.type==="punct"||t.type==="ident")&&$i.has(t.value))return this.next(),{t:"unary",op:t.value,a:this.parseUnary()};if(t.type==="punct"&&(t.value==="++"||t.value==="--")){this.next();let o=this.parseUnary();return{t:"update",op:t.value,a:o,prefix:!0}}let n=this.parseCallMember(),r=this.peek();return r.type==="punct"&&(r.value==="++"||r.value==="--")&&(this.next(),n={t:"update",op:r.value,a:n,prefix:!1}),n}parseNew(){this.next();let t=this.parseMemberOnly(this.parsePrimary()),n=this.isPunct("(")?this.parseArguments():[];return{t:"new",callee:t,args:n}}parseMemberOnly(t){let n=t;for(;;)if(this.isPunct(".")){this.next();let r=this.next();if(r.type!=="ident")throw new L("Invalid property name",this.source,r.start);n={t:"member",o:n,p:{t:"lit",v:r.value},computed:!1,opt:!1}}else if(this.isPunct("[")){this.next();let r=this.parseExpression();this.expect("]"),n={t:"member",o:n,p:r,computed:!0,opt:!1}}else return n}parseCallMember(){let t=this.isIdent("new")?this.parseNew():this.parsePrimary();for(;;)if(this.isPunct(".")){this.next();let n=this.next();if(n.type!=="ident")throw new L("Invalid property name",this.source,n.start);t={t:"member",o:t,p:{t:"lit",v:n.value},computed:!1,opt:!1}}else if(this.isPunct("?."))if(this.next(),this.isPunct("("))t={t:"call",callee:t,args:this.parseArguments(),opt:!0};else if(this.isPunct("[")){this.next();let n=this.parseExpression();this.expect("]"),t={t:"member",o:t,p:n,computed:!0,opt:!0}}else{let n=this.next();if(n.type!=="ident")throw new L("Invalid property name",this.source,n.start);t={t:"member",o:t,p:{t:"lit",v:n.value},computed:!1,opt:!0}}else if(this.isPunct("[")){this.next();let n=this.parseExpression();this.expect("]"),t={t:"member",o:t,p:n,computed:!0,opt:!1}}else if(this.isPunct("("))t={t:"call",callee:t,args:this.parseArguments(),opt:!1};else return t}parseArguments(){this.expect("(");let t=[];for(;!this.isPunct(")")&&(this.isPunct("...")?(this.next(),t.push({t:"unary",op:"...",a:this.parseAssignment()})):t.push(this.parseAssignment()),this.isPunct(","));)this.next();return this.expect(")"),t}parsePrimary(){let t=this.peek();if(t.type==="ident"&&t.value==="function")return this.next(),this.peek().type==="ident"&&this.next(),this.expect("("),{t:"arrow",params:this.parseParamList(),body:this.parseArrowBody()};if(t.type==="num"||t.type==="str")return this.next(),{t:"lit",v:t.parsed};if(t.type==="tpl"){this.next();let n=t.tpl;if(Xn>=ao)throw new L(`Template literal too deeply nested (limit of ${ao} levels)`,this.source,t.start);Xn++;try{return{t:"tpl",quasis:n.quasis,exprs:n.exprs.map(r=>le(r))}}finally{Xn--}}if(t.type==="ident")return t.value in so?(this.next(),{t:"lit",v:so[t.value]}):(this.next(),{t:"id",n:t.value});if(t.type==="punct"){if(t.value==="("){this.next();let n=[this.parseExpression()];for(;this.isPunct(",");){if(this.next(),this.isPunct(")")){let r=this.peek();throw new L("Trailing comma in a group",this.source,r.start)}n.push(this.parseExpression())}return this.expect(")"),n.length===1?n[0]:{t:"seq",body:n}}if(t.value==="[")return this.parseArrayLiteral();if(t.value==="{")return this.parseObjectLiteral()}throw new L(`Unexpected token "${t.value||"end of expression"}"`,this.source,t.start)}parseArrayLiteral(){this.expect("[");let t=[];for(;!this.isPunct("]")&&(this.isPunct("...")?(this.next(),t.push({spread:this.parseAssignment()})):t.push(this.parseAssignment()),this.isPunct(","));)this.next();return this.expect("]"),{t:"arr",els:t}}parseObjectLiteral(){var n;this.expect("{");let t=[];for(;!this.isPunct("}");){if(this.isPunct("..."))this.next(),t.push({key:null,spread:this.parseAssignment()});else if(this.isPunct("[")){this.next();let r=this.parseAssignment();this.expect("]"),this.expect(":"),t.push({key:null,keyExpr:r,value:this.parseAssignment()})}else{if(this.peek().type==="ident"&&this.peek().value==="get"&&this.peek(1).type==="ident"&&this.isPunct("(",2)){this.next();let s=this.next();this.expect("("),this.expect(")"),t.push({key:String(s.value),getter:!0,value:{t:"method",params:[],body:this.parseArrowBody()}}),this.isPunct(",")&&this.next();continue}let r=this.next();if(r.type!=="ident"&&r.type!=="str"&&r.type!=="num")throw new L("Invalid object key",this.source,r.start);let o=String((n=r.parsed)!=null?n:r.value);if(this.isPunct(":"))this.next(),t.push({key:o,value:this.parseAssignment()});else if(this.isPunct("(")){this.next();let s=this.parseParamList();t.push({key:o,value:{t:"method",params:s,body:this.parseArrowBody()}})}else t.push({key:o,value:{t:"id",n:o}})}if(this.isPunct(","))this.next();else break}return this.expect("}"),{t:"obj",props:t}}},Ye=new Map,co=2e3;function le(e){let t=Ye.get(e);if(t)return t;let n=new Jn(Jt(e),e).parseProgram();return Ye.size>=co&&Hi(),Ye.set(e,n),n}function Hi(){let e=Math.floor(co/2),t=0;for(let n of Ye.keys())if(Ye.delete(n),++t>=e)break}function uo(){Ye.clear()}var ho,Di=Object.freeze({keys:Object.keys,values:Object.values,entries:Object.entries,fromEntries:Object.fromEntries,assign:Object.assign,is:Object.is,hasOwn:(ho=Object.hasOwn)!=null?ho:((e,t)=>Object.prototype.hasOwnProperty.call(e,t))}),Ii=new Set(["eval","Function","window","globalThis","self","top","parent","document","fetch","XMLHttpRequest","importScripts","require","process","Reflect","Proxy","WebAssembly","localStorage","sessionStorage","indexedDB","navigator","location","history","crypto","Worker","SharedWorker","ServiceWorker"]),G={Math,JSON,Date,Number,String,Boolean,Array,Object:Di,Intl,RegExp,Promise,parseInt,parseFloat,isNaN,isFinite,encodeURIComponent,decodeURIComponent,console},B=class extends Error{constructor(n,r){super(r?`${n}
|
|
57
57
|
|
|
58
58
|
Expression: ${r}`:n);M(this,"expression",r);this.name="VoodooRuntimeError"}},er=Symbol("spread"),Et=class{constructor(t){M(this,"value",t)}};function lo(e){return e instanceof Et?e.value:e}var ji=new Set(["__proto__","constructor","prototype"]);function go(e){return typeof e=="string"&&ji.has(e)}function ge(e,t){if(go(e))throw new B(`Access blocked to "${String(e)}": template expressions cannot reach the prototype chain. Expose a method in state instead.`,t);return e}function x(e,t){var n,r;switch(e.t){case"lit":return e.v;case"tpl":{let o=(n=e.quasis[0])!=null?n:"";for(let s=0;s<e.exprs.length;s++)o+=ye(x(e.exprs[s],t)),o+=(r=e.quasis[s+1])!=null?r:"";return o}case"id":{ge(e.n);let o=t.lookup(e.n);return o?o[e.n]:e.n in G?G[e.n]:void 0}case"member":{let o=x(e.o,t);if(o==null){if(e.opt)return;throw new B(`Could not read "${Zn(e,t)}" from ${o===null?"null":"undefined"}`)}let s=ge(e.computed?x(e.p,t):e.p.v);return o[s]}case"new":{let o=x(e.callee,t);if(typeof o!="function")throw new B(`Cannot construct ${ye(o)}: it is not a constructor`);if(o===Function)throw new B("Cannot construct Function: expressions never compile code");let s=po(e.args,t);return Reflect.construct(o,s)}case"call":{let o,s;if(e.callee.t==="member"){let i=x(e.callee.o,t);if(i==null){if(e.callee.opt||e.opt)return;throw new B(`Could not call "${Zn(e.callee,t)}" from ${i===null?"null":"undefined"}`)}let a=ge(e.callee.computed?x(e.callee.p,t):e.callee.p.v);o=i,s=i[a]}else if(e.callee.t==="id"){ge(e.callee.n);let i=t.lookup(e.callee.n);i?(o=i,s=i[e.callee.n]):s=G[e.callee.n]}else s=x(e.callee,t);if(s==null&&e.opt)return;if(typeof s!="function"){let i=e.callee.t==="id"?e.callee.n:Zn(e.callee,t);throw e.callee.t==="id"&&!t.lookup(i)&&!(i in G)?Ii.has(i)?new B(`"${i}" is blocked. Expressions run in a sandbox without access to it.`):new B(`"${i}" was not found. Expressions cannot reach window: expose it with V.config.globals.${i} = ..., or put it in scope with V.data({ ${i} }).`):new B(`"${i}" is not a function`)}return s.apply(o,po(e.args,t))}case"unary":{if(e.op==="...")return{[er]:x(e.a,t)};if(e.op==="delete"){if(e.a.t!=="member")throw new B("delete needs a property, as in `delete user.name` or `delete list[0]`");let s=x(e.a.o,t);if(s==null)return!0;let i=ge(e.a.computed?x(e.a.p,t):e.a.p.v);return delete s[i]}if(e.op==="typeof"){if(e.a.t==="id"){if(go(e.a.n))return"undefined";let s=t.lookup(e.a.n);return typeof(s?s[e.a.n]:G[e.a.n])}return typeof x(e.a,t)}let o=x(e.a,t);switch(e.op){case"!":return!o;case"-":return-o;case"+":return+o;case"~":return~o;case"void":return}throw new B(`Unsupported unary operator: ${e.op}`)}case"update":{let o=Number(x(e.a,t)),s=e.op==="++"?o+1:o-1;return mo(e.a,s,t),e.prefix?s:o}case"bin":{let o=x(e.l,t),s=x(e.r,t);switch(e.op){case"+":return o+s;case"-":return o-s;case"*":return o*s;case"/":return o/s;case"%":return o%s;case"**":return o**s;case"==":return o==s;case"!=":return o!=s;case"===":return o===s;case"!==":return o!==s;case"<":return o<s;case">":return o>s;case"<=":return o<=s;case">=":return o>=s;case"in":return o in s;case"instanceof":return o instanceof s;case"&":return o&s;case"|":return o|s;case"^":return o^s;case"<<":return o<<s;case">>":return o>>s;case">>>":return o>>>s}throw new B(`Unsupported operator: ${e.op}`)}case"logic":{let o=x(e.l,t);return e.op==="&&"?o&&x(e.r,t):e.op==="||"?o||x(e.r,t):o!=null?o:x(e.r,t)}case"cond":return x(e.test,t)?x(e.cons,t):x(e.alt,t);case"assign":{let o;if(e.op==="=")o=x(e.value,t);else if(e.op==="&&="||e.op==="||="||e.op==="??="){let s=x(e.target,t);if(!(e.op==="&&="?!!s:e.op==="||="?!s:s==null))return s;o=x(e.value,t)}else{let s=x(e.target,t),i=x(e.value,t);switch(e.op){case"+=":o=s+i;break;case"-=":o=s-i;break;case"*=":o=s*i;break;case"/=":o=s/i;break;case"%=":o=s%i;break;case"**=":o=s**i;break;default:throw new B(`Unsupported assignment: ${e.op}`)}}return mo(e.target,o,t),o}case"if":return x(e.test,t)?x(e.cons,t):e.alt?x(e.alt,t):void 0;case"method":{let o=e.params,s=e.body;return function(...i){let a=fo(o,i,t),c=this,u=c!==null&&typeof c=="object"?t.child(c):t;return lo(x(s,u.child(a)))}}case"arrow":{let o=e.params,s=e.body;return(...i)=>lo(x(s,t.child(fo(o,i,t))))}case"obj":{let o={};for(let s of e.props)if(s.spread)Object.assign(o,x(s.spread,t));else{let i=ge(s.key!==null?s.key:String(x(s.keyExpr,t)));if(s.getter){let a=x(s.value,t);Object.defineProperty(o,i,{enumerable:!0,configurable:!0,get(){return a.call(this)}});continue}o[i]=x(s.value,t)}return o}case"arr":{let o=[];for(let s of e.els)s&&typeof s=="object"&&"spread"in s?o.push(...x(s.spread,t)):o.push(x(s,t));return o}case"return":return new Et(e.a?x(e.a,t):void 0);case"seq":{let o;for(let s of e.body)if(o=x(s,t),o instanceof Et)return o;return o}}throw new B(`Unknown node: ${e.t}`)}function tr(e,t,n,r){if(e.kind==="rest"){n[e.name]=t;return}if(e.def!==void 0&&t===void 0&&(t=x(e.def,r.child(n))),e.kind==="id"){n[e.name]=t;return}if(e.kind==="obj"){if(t==null)throw new B(`Cannot destructure ${t===null?"null":"undefined"}`);let s=new Set;for(let{key:i,value:a}of e.props)s.add(i),tr(a,t[ge(i)],n,r);if(e.rest){let i={};for(let a of Object.keys(t))s.has(a)||(i[a]=t[a]);n[e.rest]=i}return}let o=Array.isArray(t)?t:Array.from(t);e.elements.forEach((s,i)=>{s&&tr(s,o[i],n,r)}),e.rest&&(n[e.rest]=o.slice(e.elements.length))}function fo(e,t,n){let r={};for(let o=0;o<e.length;o++){let s=e[o];tr(s,s.kind==="rest"?t.slice(o):t[o],r,n)}return r}function po(e,t){let n=[];for(let r of e){let o=x(r,t);o&&typeof o=="object"&&er in o?n.push(...o[er]):n.push(o)}return n}function mo(e,t,n){if(e.t==="id"){ge(e.n),n.set(e.n,t);return}if(e.t==="member"){let r=x(e.o,n);if(r==null)throw new B("Could not write to null or undefined");let o=ge(e.computed?x(e.p,n):e.p.v);r[o]=t;return}throw new B("Invalid assignment target")}function Zn(e,t){return e.t==="member"?e.computed?String(x(e.p,t)):String(e.p.v):e.t==="id"?e.n:"value"}function ye(e){if(e==null)return"";if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(e instanceof Date)return e.toLocaleString();if(typeof e=="object")try{return JSON.stringify(e)}catch(t){return String(e)}return String(e)}re();Z();var kt=new Map;function N(e,t){kt.set(e.startsWith("$")?e:`$${e}`,t)}var De=class e{constructor(t={},n=null,r=null){this.refs={},this.component=null,this.provides=null,this.magicCache=null,this.data=t,this.parent=n,this.el=r}get root(){let t=this;for(;t.parent;)t=t.parent;return t}inject(t,n){let r=this;for(;r;){if(r.provides&&t in r.provides)return r.provides[t];r=r.parent}return n}get owner(){let t=this;for(;t;){if(t.component)return t;t=t.parent}return null}get allRefs(){let t=[],n=this;for(;n;)t.unshift(n),n=n.parent;let r={};for(let o of t)Object.assign(r,o.refs);return r}lookup(t){let n=this;for(;n;){if(t in n.data)return n.data;n=n.parent}if(t.charCodeAt(0)===36&&kt.has(t))return this.magicContainer(t)}has(t){return this.lookup(t)!==void 0}get(t){let n=this.lookup(t);return n?n[t]:void 0}set(t,n){let r=this;for(;r;){if(t in r.data){r.data[t]=n;return}r=r.parent}this.data[t]=n}child(t={},n=null){return new e(t,this,n!=null?n:this.el)}reactiveChild(t,n=null){return new e(F(t),this,n!=null?n:this.el)}magicContainer(t){this.magicCache||(this.magicCache=new Map);let n=this.magicCache.get(t);if(n)return n;let r=kt.get(t),o=this,s={};return Object.defineProperty(s,t,{get:()=>r(o),set:i=>{let a=r(o);a&&typeof a=="object"&&"set"in a&&a.set(i)},enumerable:!0,configurable:!0}),this.magicCache.set(t,s),s}},de=new De(F({}));Z();re();re();function be(){return w.devtools===!0}function we(e){if(!e)return"(no element)";let t=e.tagName.toLowerCase();e.id&&(t+=`#${e.id}`);let n=(e.getAttribute("class")||"").trim().split(/\s+/).filter(Boolean);return n.length&&(t+=`.${n.slice(0,2).join(".")}`),`<${t}>`}function Ie(e){be()&&console.warn(`[Voodoo] ${e}`)}var vo=new Set;function St(e,t){be()&&(vo.has(e)||(vo.add(e),console.warn(`[Voodoo] ${t}`)))}var Fi=new Set(["confirm-title","confirm-label","confirm-cancel","hold-duration"]);function bo(e,t,n){be()&&(Fi.has(n)||St(`unknown-directive:${n}`,`unknown directive "${t}" at ${we(e)}. No directive named "${n}" was registered. Check the spelling or register with V.directive("${n}", ...).`))}function wo(e,t){St(`unknown-component:${t}`,`component "${t}" not registered at ${we(e)}. Register with V.component("${t}", { ... }) before using the tag, or remove the attribute to leave the element as plain HTML.`)}function To(e,t,n,r){if(!be())return;let o=r instanceof Error?r.message.split(`
|
|
59
59
|
`)[0]:String(r);Ie(`invalid expression in ${t}="${n}" on element ${we(e)}.
|
|
@@ -135,7 +135,7 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
135
135
|
.v-json-object dt{font-weight:600;color:var(--v-text-muted,#6B6580)}
|
|
136
136
|
.v-json-object dd{margin:0}
|
|
137
137
|
.v-json-empty{color:var(--v-text-muted,#6B6580);font-style:italic}
|
|
138
|
-
`)}))}function lc(e){let t=e.tagName;if(t==="FORM")return"submit";if(t==="INPUT"||t==="SELECT"||t==="TEXTAREA"){let n=e.type;return n==="button"||n==="submit"?"click":"change"}return"click"}function dc({el:e,cleanup:t,run:n}){var l,f;let r=E(e,"trigger")||lc(e),[o,...s]=r.split(/[.\s]+/),i=_((l=E(e,"poll"))!=null?l:void 0,0);if(i>0){n();let p=setInterval(()=>{document.visibilityState==="visible"&&n()},i);t(()=>clearInterval(p));return}if(o==="load"||o==="ready"){n();return}if(o==="visible"||o==="revealed"){if(typeof IntersectionObserver=="undefined"){n();return}let p=new IntersectionObserver(d=>{for(let m of d)m.isIntersecting&&(n(),s.includes("repeat")||p.unobserve(e))},{rootMargin:"80px"});p.observe(e),t(()=>p.disconnect());return}let a=s.includes("once"),c=_((f=E(e,"debounce"))!=null?f:void 0,0),u=p=>{(e.tagName==="FORM"||e.href)&&p.preventDefault(),n(p)};c>0&&(u=Fe(u,c)),e.addEventListener(o,u,{once:a}),t(()=>e.removeEventListener(o,u))}var fc=[["get","GET"],["post","POST"],["put","PUT"],["patch","PATCH"],["delete","DELETE"]];for(let[e,t]of fc)A(e,({el:n,scope:r,expression:o,cleanup:s})=>{dc({el:n,scope:r,cleanup:s,run:a=>{let c=jt(o,r);if(!c)return;let u=E(n,"body")||E(n,"data-body"),l=u?O(u,r.child({$event:a}),"v-body"):void 0,f=E(n,"params"),p=f?O(f,r,"v-params"):void 0;It({el:n,scope:r,method:t,url:c,body:l,params:p,event:a})}})});function jt(e,t){let n=e.trim();if(!n)return"";if((/^[./#?]/.test(n)||/^https?:\/\//i.test(n)||/^[\w-]+\/[\w\-/.]*$/.test(n))&&!/[+`'"]|\$\{/.test(n))return n;let o=O(n,t,"URL");return typeof o=="string"?o:n}A("load",({el:e,scope:t,expression:n})=>{let r=jt(n,t);r&&It({el:e,scope:t,method:"GET",url:r})});A("load-visible",({el:e,scope:t,cleanup:n,expression:r})=>{let o=jt(r,t);if(!o)return;if(typeof IntersectionObserver=="undefined"){It({el:e,scope:t,method:"GET",url:o});return}let s=new IntersectionObserver(i=>{for(let a of i)a.isIntersecting&&(s.unobserve(e),It({el:e,scope:t,method:"GET",url:o}))},{rootMargin:"120px"});s.observe(e),n(()=>s.disconnect())});A("search",({el:e,scope:t,expression:n,cleanup:r})=>{var f,p;let o=e,s=jt(n,t),i=E(e,"param")||o.getAttribute("name")||"q",a=_((f=E(e,"debounce"))!=null?f:void 0,300),c=Number((p=E(e,"min-length"))!=null?p:0),u=Fe(()=>{let d=o.value.trim();d.length<c||It({el:e,scope:t,method:"GET",url:s,params:{[i]:d}})},a),l=()=>u();o.addEventListener("input",l),r(()=>{o.removeEventListener("input",l),u.cancel()})});A("resource",({el:e,scope:t,expression:n,cleanup:r})=>{var c,u,l,f;let o=n.indexOf(":"),s=E(e,"as")||"resource",i=n.trim();if(o>-1){let p=n.slice(0,o).trim();/^[A-Za-z_$][\w$]*$/.test(p)&&(s=p,i=n.slice(o+1).trim())}let a=bn(()=>jt(i,t),{method:(E(e,"method")||"GET").toUpperCase(),params:()=>E(e,"params")?O(E(e,"params"),t,"v-params"):void 0,cache:_((c=E(e,"cache"))!=null?c:void 0,0)||void 0,retry:Number((u=E(e,"retry"))!=null?u:0),timeout:_((l=E(e,"timeout"))!=null?l:void 0,oe.defaults.timeout),jsonPath:E(e,"json-path"),poll:_((f=E(e,"poll"))!=null?f:void 0,0),manual:Nr(e,"manual"),onSuccess:p=>ht(e,"voodoo:success",{data:p}),onError:(p,d)=>ht(e,"voodoo:error",{error:p,message:d})});t.set(s,a),r(()=>a.stop())},{priority:U.DATA});for(let e of["target","swap","trigger","poll","param","params","body","data-body","headers","cache","retry","timeout","as","json-path","template","offline-queue","min-length","scroll-to","manual","debounce","throttle","indicator"])A(e,()=>{},{priority:U.TRANSITION});Fo(zo);Wo(At);Jo(js);vs();var Ft=new Map;function Is(e,t){let n=Ft.get(e);return n||Ft.set(e,n=new Set),n.add(t),()=>n.delete(t)}function pc(e,t){let n=Is(e,r=>{n(),t(r)});return n}function mc(e,t){let n=Ft.get(e);if(n)for(let r of[...n])try{r(t)}catch(o){$(o,`event "${e}"`)}}function hc(e,t){var n;if(!t){Ft.delete(e);return}(n=Ft.get(e))==null||n.delete(t)}function js(e,t){var r,o;let n=typeof t=="function"?{mounted:t,updated:t}:t;A(e,s=>{var l,f;let i,a=!1,c=p=>{var d,m;return{el:s.el,value:p,oldValue:i,arg:s.arg,modifiers:s.modifiers,expression:s.expression,scope:s.scope,instance:(m=(d=s.scope.owner)==null?void 0:d.component)!=null?m:null}},u=n.raw?s.expression:s.evaluate();(l=n.created)==null||l.call(n,s.el,c(u)),(f=n.beforeMount)==null||f.call(n,s.el,c(u)),s.effect(()=>{var m,g;let p=n.raw?s.expression:s.evaluate();if(!a){a=!0,i=p,(m=n.mounted)==null||m.call(n,s.el,c(p));return}if(p===i)return;let d=c(p);(g=n.updated)==null||g.call(n,s.el,d),i=p}),s.cleanup(()=>{var d,m;let p=c(i);(d=n.beforeUnmount)==null||d.call(n,s.el,p),(m=n.unmounted)==null||m.call(n,s.el,p)})},{priority:(r=n.priority)!=null?r:U.DEFAULT,terminal:(o=n.terminal)!=null?o:!1})}function gc(e){return Object.defineProperties(de.data,Object.getOwnPropertyDescriptors(e)),de.data}var yc="0.11.1",En={...wr,version:yc,config:w,reactive:F,ref:Tt,shallowRef:Kn,computed:xt,effect:te,watch:ue,watchEffect:Yn,nextTick:$e,toRaw:K,markRaw:zn,unref:Gn,stop:qn,effectScope:_n,EffectScope:ne,flushSync:jn,data:gc,store:ns,stores:ln,removeStore:rs,storeNames:os,scope:de,component:rt,components:z,directive:js,directives:ve,magic:N,magics:kt,createApp:Zo,start:Uo,whenReady:an,whenElement:cn,walk:j,refresh:_o,destroy:H,stopObserving:qo,getScope:et,findScope:xe,addCleanup:fe,parseAttribute:Je,parse:le,tokenize:Jt,evaluate:x,evaluateIn:O,stringify:ye,clearParseCache:uo,globals:G,http:oe,request:Lt,HttpError:X,resource:bn,toast:Pe,storage:se,session:mn,cookie:hn,cache:yn,url:gn,theme:ft,clipboard:Ar,screen:ie,network:_e,enter:Ot,leave:$t,fadeIn:wn,fadeOut:Tn,slideUp:Dt,slideDown:Ht,viewTransition:Es,injectStyle:Ee,ensureTokens:Ue,on:Is,once:pc,off:hc,emit:mc,use(e,t){Zt(En,e,t)},onError(e){Fn(e)},instances:on,Scope:De,PRIORITY:U,VoodooSyntaxError:L,VoodooRuntimeError:B};ts(En);Z();var vc=new Set(["animation-iteration-count","aspect-ratio","border-image-slice","column-count","flex","flex-grow","flex-shrink","font-weight","grid-area","grid-column","grid-row","line-height","opacity","order","orphans","scale","tab-size","widows","z-index","zoom"]);function Qs(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function ae(e){return e.length<2?e:Array.from(new Set(e))}function Ve(e){return String(e!=null?e:"").split(/\s+/).filter(Boolean)}function Or(e){if(typeof document=="undefined")return[];let t=document.createElement("template");t.innerHTML=e.trim();let n=[];for(let r of Array.from(t.content.children))n.push(r);return n}function Ks(e){return e.length>2&&e.charCodeAt(0)===60&&e.endsWith(">")}function bc(e){if(e==null)return typeof document=="undefined"?[]:[document];if(e instanceof pe)return e.toArray();if(typeof e=="string")return We(e);if(typeof e=="function")return typeof document=="undefined"?[]:[document];let t=We(e);return t.length?t:typeof document=="undefined"?[]:[document]}function We(e,t){if(e==null)return[];if(typeof e=="string"){let o=e.trim();if(!o)return[];if(Ks(o))return Or(o);let s=[];for(let i of bc(t))try{for(let a of Array.from(i.querySelectorAll(o)))s.push(a)}catch(a){}return ae(s)}if(e instanceof pe)return e.toArray();if(typeof e=="function")return[];let n=e;if(typeof n.nodeType=="number"){if(n.nodeType===1)return[n];if(n.nodeType===9){let o=n;return o.documentElement?[o.documentElement]:[]}return n.nodeType===11?Array.from(n.children):[]}let r=e;if(typeof r.length=="number"){let o=[];for(let s=0;s<r.length;s++){let i=r[s];i&&i.nodeType===1&&o.push(i)}return ae(o)}return[]}function Fs(e){if(e==null)return[];if(typeof e=="string"){let r=e;return Ks(r.trim())?Or(r):[document.createTextNode(r)]}if(e instanceof pe)return e.toArray();if(typeof e=="function")return[];let t=e;if(typeof t.nodeType=="number")return[t];let n=e;if(typeof n.length=="number"){let r=[];for(let o=0;o<n.length;o++)n[o]&&r.push(n[o]);return r}return[]}function kn(e,t,n){let r=Qs(t);if(n===null||n===""){e.style.removeProperty(r);return}let o=typeof n=="number"&&!vc.has(r)&&!r.startsWith("--")?`${n}px`:String(n);e.style.setProperty(r,o)}function wc(e,t){for(let[n,r]of Object.entries(t))kn(e,n,r)}function Bs(e){if(e===void 0)return;if(e==="")return"";if(e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(/^-?\d+(\.\d+)?$/.test(e))return Number(e);let t=e.charCodeAt(0);if(t===123||t===91||t===34)try{return JSON.parse(e)}catch(n){return e}return e}function Us(e){return e.replace(/-([a-z0-9])/g,(t,n)=>n.toUpperCase())}var Gs=new WeakMap;function qs(e){return e.hasAttribute("hidden")||e.style.display==="none"?!0:e.isConnected?getComputedStyle(e).display==="none":!1}function _s(e){e.removeAttribute("hidden");let t=Gs.get(e);t!==void 0&&t!=="none"?e.style.display=t:e.style.removeProperty("display"),e.isConnected&&getComputedStyle(e).display==="none"&&(e.style.display="block")}function Vs(e){let t=e.style.display;t&&t!=="none"&&Gs.set(e,t),e.style.display="none"}var Ws="input,select,textarea";function zs(e){return e.matches(Ws)?[e]:Array.from(e.querySelectorAll(Ws))}function Tc(e){let t=e;if(!t.name||t.disabled)return!1;let n=(t.getAttribute("type")||"").toLowerCase();return!(n==="file"||n==="submit"||n==="reset"||n==="button"||(n==="checkbox"||n==="radio")&&!t.checked)}var Sn=new WeakMap;function xc(e){let t=Sn.get(e);return t||Sn.set(e,t=[]),t}var pe=class e{constructor(t=[]){M(this,"length");M(this,"elements");this.elements=t,this.length=t.length;let n=this;for(let r=0;r<t.length;r++)n[r]=t[r]}[Symbol.iterator](){return this.elements[Symbol.iterator]()}find(t){let n=[];for(let r of this.elements)try{for(let o of Array.from(r.querySelectorAll(t)))n.push(o)}catch(o){}return new e(ae(n))}closest(t){let n=[];for(let r of this.elements){let o=r.closest(t);o&&n.push(o)}return new e(ae(n))}parent(t){let n=[];for(let r of this.elements){let o=r.parentElement;o&&(!t||o.matches(t))&&n.push(o)}return new e(ae(n))}parents(t){let n=[];for(let r of this.elements){let o=r.parentElement;for(;o;)(!t||o.matches(t))&&n.push(o),o=o.parentElement}return new e(ae(n))}children(t){let n=[];for(let r of this.elements)for(let o of Array.from(r.children))(!t||o.matches(t))&&n.push(o);return new e(ae(n))}siblings(t){let n=[];for(let r of this.elements){let o=r.parentElement;if(o)for(let s of Array.from(o.children))s!==r&&(!t||s.matches(t))&&n.push(s)}return new e(ae(n))}next(t){let n=[];for(let r of this.elements){let o=r.nextElementSibling;o&&(!t||o.matches(t))&&n.push(o)}return new e(ae(n))}prev(t){let n=[];for(let r of this.elements){let o=r.previousElementSibling;o&&(!t||o.matches(t))&&n.push(o)}return new e(ae(n))}first(){return this.eq(0)}last(){return this.eq(-1)}eq(t){let n=t<0?this.elements.length+t:t,r=this.elements[n];return new e(r?[r]:[])}filter(t){let n=this.elements.filter((r,o)=>typeof t=="function"?t(r,o):r.matches(t));return new e(n)}not(t){let n=this.elements.filter((r,o)=>typeof t=="function"?!t(r,o):!r.matches(t));return new e(n)}has(t){let n=this.elements.filter(r=>typeof t=="string"?r.querySelector(t)!==null:r.contains(t));return new e(n)}is(t){return this.elements.some((n,r)=>typeof t=="function"?t(n,r):n.matches(t))}map(t){return this.elements.map((n,r)=>t(n,r))}each(t){for(let n=0;n<this.elements.length;n++){let r=this.elements[n];if(t.call(r,r,n)===!1)break}return this}get(...t){if(!t.length)return this.toArray();let n=Number(t[0]);return this.elements[n<0?this.elements.length+n:n]}toArray(){return this.elements.slice()}add(t,n){return new e(ae([...this.elements,...We(t,n)]))}slice(t,n){return new e(this.elements.slice(t,n))}text(...t){var o,s;if(!t.length)return(s=(o=this.elements[0])==null?void 0:o.textContent)!=null?s:"";let n=t[0],r=n==null?"":String(n);for(let i of this.elements){for(let a of Array.from(i.childNodes))H(a);i.textContent=r}return this}html(...t){var o,s;if(!t.length)return(s=(o=this.elements[0])==null?void 0:o.innerHTML)!=null?s:"";let n=t[0],r=n==null?"":String(n);for(let i of this.elements){for(let a of Array.from(i.childNodes))H(a);i.innerHTML=r}return this}val(...t){var r;if(!t.length){let o=this.elements[0];if(!o)return"";let s=o;return o.tagName==="SELECT"&&s.multiple?Array.from(s.selectedOptions).map(i=>i.value):o.type==="checkbox"?o.checked?o.value||"on":"":(r=o.value)!=null?r:""}let n=t[0];for(let o of this.elements){let s=o,i=o;if(s.tagName==="SELECT"&&i.multiple){let a=(Array.isArray(n)?n:[n]).map(String);for(let c of Array.from(i.options))c.selected=a.includes(c.value);continue}if(s.type==="checkbox"||s.type==="radio"){s.checked=Array.isArray(n)?n.map(String).includes(s.value):n===!0||String(n)===s.value;continue}s.value=n==null?"":String(n)}return this}attr(...t){var s,i;let n=t[0];if(n!==null&&typeof n=="object"){for(let a of this.elements)for(let[c,u]of Object.entries(n))u===null||u===!1?a.removeAttribute(c):a.setAttribute(c,u===!0?"":String(u));return this}let r=String(n);if(t.length<2)return(i=(s=this.elements[0])==null?void 0:s.getAttribute(r))!=null?i:void 0;let o=t[1];for(let a of this.elements)o===null||o===!1?a.removeAttribute(r):a.setAttribute(r,o===!0?"":String(o));return this}removeAttr(t){let n=Ve(t);for(let r of this.elements)for(let o of n)r.removeAttribute(o);return this}prop(...t){let n=String(t[0]);if(t.length<2){let r=this.elements[0];return r?r[n]:void 0}for(let r of this.elements)r[n]=t[1];return this}data(...t){let n=t[0];if(!t.length){let s=this.elements[0];if(!s)return{};let i={};for(let[a,c]of Object.entries(s.dataset))i[a]=Bs(c);return i}if(n!==null&&typeof n=="object"){for(let s of this.elements)for(let[i,a]of Object.entries(n))s.dataset[Us(i)]=typeof a=="string"?a:JSON.stringify(a!=null?a:null);return this}let r=Us(String(n));if(t.length<2){let s=this.elements[0];return s?Bs(s.dataset[r]):void 0}let o=t[1];for(let s of this.elements)s.dataset[r]=typeof o=="string"?o:JSON.stringify(o!=null?o:null);return this}css(...t){let n=t[0];if(n!==null&&typeof n=="object"){for(let o of this.elements)wc(o,n);return this}let r=String(n);if(t.length<2){let o=this.elements[0];if(!o)return"";let s=Qs(r);return((o.isConnected?getComputedStyle(o).getPropertyValue(s):"")||o.style.getPropertyValue(s)).trim()}for(let o of this.elements)kn(o,r,t[1]);return this}width(...t){if(!t.length){let n=this.elements[0];return n?n.getBoundingClientRect().width:0}for(let n of this.elements)kn(n,"width",t[0]);return this}height(...t){if(!t.length){let n=this.elements[0];return n?n.getBoundingClientRect().height:0}for(let n of this.elements)kn(n,"height",t[0]);return this}offset(){let t=this.elements[0];if(!t)return{top:0,left:0};let n=t.getBoundingClientRect();return{top:n.top+window.scrollY,left:n.left+window.scrollX}}position(){let t=this.elements[0];return t?{top:t.offsetTop,left:t.offsetLeft}:{top:0,left:0}}scrollTop(...t){var r,o;if(!t.length)return(o=(r=this.elements[0])==null?void 0:r.scrollTop)!=null?o:0;let n=Number(t[0])||0;for(let s of this.elements)s.scrollTop=n;return this}addClass(t){let n=Ve(t);if(n.length)for(let r of this.elements)r.classList.add(...n);return this}removeClass(t){let n=Ve(t);if(n.length)for(let r of this.elements)r.classList.remove(...n);return this}toggleClass(t,n){let r=Ve(t);for(let o of this.elements)for(let s of r)n===void 0?o.classList.toggle(s):o.classList.toggle(s,n);return this}hasClass(t){let n=Ve(t);return n.length?this.elements.some(r=>n.every(o=>r.classList.contains(o))):!1}insert(t,n){let r=this.elements.length;for(let o=0;o<r;o++){let s=this.elements[o];for(let i of Fs(t))n(s,o===r-1?i:i.cloneNode(!0))}return this}append(t){return this.insert(t,(n,r)=>n.appendChild(r))}prepend(t){return this.insert(t,(n,r)=>n.insertBefore(r,n.firstChild))}before(t){return this.insert(t,(n,r)=>{var o;return(o=n.parentNode)==null?void 0:o.insertBefore(r,n)})}after(t){return this.insert(t,(n,r)=>{var o;return(o=n.parentNode)==null?void 0:o.insertBefore(r,n.nextSibling)})}appendTo(t){let n=We(t);for(let r=0;r<n.length;r++)for(let o of this.elements)n[r].appendChild(r===n.length-1?o:o.cloneNode(!0));return this}prependTo(t){let n=We(t);for(let r=0;r<n.length;r++){let o=n[r],s=this.elements.map(i=>r===n.length-1?i:i.cloneNode(!0));for(let i=s.length-1;i>=0;i--)o.insertBefore(s[i],o.firstChild)}return this}replaceWith(t){for(let n of this.elements){let r=n.parentNode;if(r){for(let o of Fs(t))r.insertBefore(o,n);H(n),n.remove()}}return this}wrap(t){var n;for(let r of this.elements){let o=We(t)[0];if(!o)continue;let s=o.cloneNode(!0);(n=r.parentNode)==null||n.insertBefore(s,r);let i=s;for(;i.firstElementChild;)i=i.firstElementChild;i.appendChild(r)}return this}unwrap(){let t=new Set;for(let n of this.elements){let r=n.parentElement;r&&r!==document.body&&t.add(r)}for(let n of t){let r=n.parentNode;if(r){for(;n.firstChild;)r.insertBefore(n.firstChild,n);H(n),n.remove()}}return this}remove(){for(let t of this.elements)H(t),t.remove();return this}empty(){for(let t of this.elements){for(let n of Array.from(t.childNodes))H(n);t.replaceChildren()}return this}clone(t=!0){return new e(this.elements.map(n=>n.cloneNode(t)))}on(t,...n){var a;let r=typeof n[0]=="string",o=r?n[0]:null,s=r?n[1]:n[0],i=(a=r?n[2]:n[1])!=null?a:{};if(typeof s!="function")return this;for(let c of this.elements)for(let u of Ve(t)){let l=f=>{if(!o){s.call(c,f);return}let p=f.target,d=p==null?void 0:p.closest(o);!d||!c.contains(d)||s.call(d,f)};c.addEventListener(u,l,i),xc(c).push({type:u,selector:o,handler:s,wrapped:l,options:i})}return this}off(t,n,r){let o=typeof n=="string"?n:null,s=typeof n=="function"?n:r!=null?r:null,i=t?Ve(t):null;for(let a of this.elements){let c=Sn.get(a);if(!c)continue;let u=[];for(let l of c){let f=!i||i.includes(l.type),p=o===null||l.selector===o,d=s===null||l.handler===s;f&&p&&d?a.removeEventListener(l.type,l.wrapped,l.options):u.push(l)}Sn.set(a,u)}return this}once(t,...n){let r=typeof n[0]=="string",o=r?n[0]:null,s=r?n[1]:n[0];if(typeof s!="function")return this;let i=this,a=function(c){return o?i.off(t,o,a):i.off(t,a),s.call(this,c)};return o?this.on(t,o,a):this.on(t,a)}trigger(t,n){for(let r of this.elements){if(n===void 0&&typeof r[t]=="function"){r[t]();continue}let o=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0});o.__voodoo=!0,r.dispatchEvent(o)}return this}emit(t,n){for(let r of this.elements){let o=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0});o.__voodoo=!0,r.dispatchEvent(o)}return this}show(){for(let t of this.elements)_s(t);return this}hide(){for(let t of this.elements)Vs(t);return this}toggle(t){for(let n of this.elements)(t===void 0?qs(n):t)?_s(n):Vs(n);return this}fadeIn(t=220){for(let n of this.elements)n.removeAttribute("hidden"),wn(n,t);return this}fadeOut(t=220){for(let n of this.elements)Tn(n,t);return this}slideUp(t=240){for(let n of this.elements)Dt(n,t);return this}slideDown(t=240){for(let n of this.elements)n.removeAttribute("hidden"),Ht(n,t);return this}slideToggle(t=240){for(let n of this.elements)qs(n)?(n.removeAttribute("hidden"),Ht(n,t)):Dt(n,t);return this}animate(t,n=300){for(let r of this.elements)typeof r.animate=="function"&&r.animate(t,n);return this}scrollIntoView(t={behavior:"smooth",block:"start"}){var n;return(n=this.elements[0])==null||n.scrollIntoView(t),this}serialize(){let t=this.elements[0];if(!t)return"";let n=new URLSearchParams;for(let r of zs(t)){if(!Tc(r))continue;let o=r,s=r;if(o.tagName==="SELECT"&&s.multiple){for(let i of Array.from(s.selectedOptions))n.append(o.name,i.value);continue}n.append(o.name,o.value)}return n.toString()}serializeObject(){var r,o,s,i;let t=this.elements[0],n={};if(!t)return n;for(let a of zs(t)){let c=a;if(!c.name||c.disabled)continue;let u=(c.getAttribute("type")||"").toLowerCase();if(u==="submit"||u==="reset"||u==="button")continue;let l=c.name.endsWith("[]"),f=l?c.name.slice(0,-2):c.name,p=a,d;if(u==="checkbox"){if(!c.checked&&!l){n[f]=(r=n[f])!=null?r:!1;continue}if(!c.checked)continue;d=c.value==="on"?!0:c.value}else if(u==="radio"){if(!c.checked)continue;d=c.value}else u==="file"?d=c.multiple?Array.from((o=c.files)!=null?o:[]):(i=(s=c.files)==null?void 0:s[0])!=null?i:null:c.tagName==="SELECT"&&p.multiple?d=Array.from(p.selectedOptions).map(m=>m.value):u==="number"||u==="range"?d=c.value===""?null:Number(c.value):d=c.value;if(l){let m=n[f];Array.isArray(m)?m.push(d):n[f]=[d];continue}if(Object.prototype.hasOwnProperty.call(n,f)){let m=n[f];Array.isArray(m)?m.push(d):m===void 0||m===!1?n[f]=d:n[f]=[m,d];continue}n[f]=d}return n}focus(t){var n;return(n=this.elements[0])==null||n.focus(t),this}blur(){for(let t of this.elements)t.blur();return this}select(){for(let t of this.elements){let n=t;typeof n.select=="function"&&n.select()}return this}walk(t=!1){for(let n of this.elements)t&&H(n),j(n,xe(n.parentNode));return this}destroy(){for(let t of this.elements)H(t);return this}};function $r(e,t){if(typeof e=="function"){Hr(e);let n=typeof document!="undefined"?document.documentElement:null;return new pe(n?[n]:[])}return new pe(We(e,t))}function Hr(e){return typeof document=="undefined"?Promise.resolve():new Promise(t=>{Xo(()=>{try{e==null||e()}catch(n){$(n,"V.ready")}t()})})}function Ys(e){return new pe(Or(e))}var Xs=((e,t)=>$r(e,t));Object.assign(Xs,En,{query:$r,ready:Hr,fromHtml:Ys,Collection:pe,magic:N});var Dr=Xs;re();ut();re();var Ec=/^#([0-9a-f])([0-9a-f])([0-9a-f])[0-9a-f]?$/i,kc=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})(?:[0-9a-f]{2})?$/i,Sc=/^rgba?\(([^)]+)\)$/i,Ac=/^hsla?\(([^)]+)\)$/i;function Js(e){return e.split(/[\s,/]+/).map(t=>parseFloat(t)).filter(t=>!Number.isNaN(t))}function Rc(e,t,n){let r=(e%360+360)%360,o=J(t/100,0,1),s=J(n/100,0,1),i=(1-Math.abs(2*s-1))*o,a=i*(1-Math.abs(r/60%2-1)),c=s-i/2,u=Math.floor(r/60)%6,l=[[i,a,0],[a,i,0],[0,i,a],[0,a,i],[a,0,i],[i,0,a]],[f,p,d]=l[u];return{r:Math.round((f+c)*255),g:Math.round((p+c)*255),b:Math.round((d+c)*255)}}function me(e){let t=String(e!=null?e:"").trim();if(!t)return null;let n=Ec.exec(t);if(n)return{r:parseInt(n[1]+n[1],16),g:parseInt(n[2]+n[2],16),b:parseInt(n[3]+n[3],16)};let r=kc.exec(t);if(r)return{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)};let o=Sc.exec(t);if(o){let[i,a,c]=Js(o[1]);return i===void 0||a===void 0||c===void 0?null:{r:J(i,0,255),g:J(a,0,255),b:J(c,0,255)}}let s=Ac.exec(t);if(s){let[i,a,c]=Js(s[1]);return i===void 0||a===void 0||c===void 0?null:Rc(i,a,c)}return null}function J(e,t,n){return e<t?t:e>n?n:e}function vt(e){let t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ir(e){return e<=.0031308?e*12.92:1.055*Math.pow(e,.4166666666666667)-.055}function Cc(e){let t=vt(e.r),n=vt(e.g),r=vt(e.b),o=.4122214708*t+.5363325363*n+.0514459929*r,s=.2119034982*t+.6806995451*n+.1073969566*r,i=.0883024619*t+.2817188376*n+.6299787005*r,a=Math.cbrt(o),c=Math.cbrt(s),u=Math.cbrt(i);return{l:.2104542553*a+.793617785*c-.0040720468*u,a:1.9779984951*a-2.428592205*c+.4505937099*u,b:.0259040371*a+.7827717662*c-.808675766*u}}function Pc(e){let t=e.l+.3963377774*e.a+.2158037573*e.b,n=e.l-.1055613458*e.a-.0638541728*e.b,r=e.l-.0894841775*e.a-1.291485548*e.b,o=t*t*t,s=n*n*n,i=r*r*r;return{r:Ir(4.0767416621*o-3.3077115913*s+.2309699292*i),g:Ir(-1.2684380046*o+2.6097574011*s-.3413193965*i),b:Ir(-.0041960863*o-.7034186147*s+1.707614701*i)}}function Rn(e){let t=Cc(e),n=Math.sqrt(t.a*t.a+t.b*t.b),r=Math.atan2(t.b,t.a)*180/Math.PI;return r<0&&(r+=360),{l:t.l,c:n,h:n<1e-5?0:r}}function Zs(e){let t=e.h*Math.PI/180;return Pc({l:e.l,a:Math.cos(t)*e.c,b:Math.sin(t)*e.c})}function yt(e){let t=Math.max(0,e.c);for(let r=0;r<32;r++){let o=Zs({l:J(e.l,0,1),c:t,h:e.h});if(o.r>=-.001&&o.r<=1.001&&o.g>=-.001&&o.g<=1.001&&o.b>=-.001&&o.b<=1.001)return{r:Math.round(J(o.r,0,1)*255),g:Math.round(J(o.g,0,1)*255),b:Math.round(J(o.b,0,1)*255)};t*=.92}let n=Zs({l:J(e.l,0,1),c:0,h:e.h});return{r:Math.round(J(n.r,0,1)*255),g:Math.round(J(n.g,0,1)*255),b:Math.round(J(n.b,0,1)*255)}}function jr(e){return J(Math.round(e),0,255).toString(16).padStart(2,"0")}function ze(e){return`#${jr(e.r)}${jr(e.g)}${jr(e.b)}`}function gt(e,t){return`rgba(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)}, ${Number(t.toFixed(3))})`}function oi(e){return ze(yt(e))}function Br(e){return .2126*vt(e.r)+.7152*vt(e.g)+.0722*vt(e.b)}function Ur(e,t){let n=typeof e=="string"?me(e):e,r=typeof t=="string"?me(t):t;if(!n||!r)return 1;let o=Br(n),s=Br(r),i=Math.max(o,s),a=Math.min(o,s);return(i+.05)/(a+.05)}var si={r:255,g:255,b:255},Cn={r:0,g:0,b:0};function Bt(e){let t=typeof e=="string"?me(e):e;return t?Ur(t,si)>=Ur(t,Cn)?"#ffffff":"#000000":"#ffffff"}var qr=[50,100,200,300,400,500,600,700,800,900],ii=[.973,.941,.889,.819,.732,.638,.558,.478,.399,.327],Mc=[.14,.26,.46,.68,.88,1,.97,.89,.78,.65],ai=[.244,.286,.343,.408,.484,.588,.668,.748,.836,.928],Lc=[.3,.42,.6,.78,.92,1,.92,.78,.57,.33];function ci(e,t=!1){var a;let n=typeof e=="string"?(a=me(e))!=null?a:Cn:e,r=Rn(n),o=t?ai:ii,s=t?Lc:Mc,i={};return qr.forEach((c,u)=>{i[String(c)]=oi({l:o[u],c:r.c*s[u],h:r.h})}),i}var Pn={violeta:{primary:"#6D3BF5",accent:"#FF3D8B",success:"#16A34A",warning:"#D97706",danger:"#E11D48",info:"#7C6BFF"},oceano:{primary:"#0E7BC4",accent:"#0FB5C9",success:"#0F9D6E",warning:"#D08700",danger:"#DC2F3E",info:"#3B82F6"},floresta:{primary:"#1F8A4C",accent:"#7FA80E",success:"#18A05A",warning:"#C97A0A",danger:"#C93A2E",info:"#2C8FA8"},poente:{primary:"#E4632A",accent:"#D62F63",success:"#3E9B52",warning:"#D99000",danger:"#D32F2F",info:"#B45FC0"},grafite:{primary:"#4C5A70",accent:"#2E7FD1",success:"#2F8F60",warning:"#B57A12",danger:"#C2453F",info:"#5B7A99"}},ui=["primary","accent","success","warning","danger","info"],_r="voodoo:palette",ei="voodoo-palette",Nc="system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Oc="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace";function ti(e,t){let n=(e!=null?e:"").trim();return n?n.includes(",")?n:`${/^['"]/.test(n)?n:`'${n}'`}, ${t}`:t}var $c=/^([\d.]+)(px|rem|em)$/;function Hc(e){let t=(e||"12px").trim(),n=$c.exec(t);if(!n)return{"--v-radius":t,"--v-radius-sm":`calc(${t} * 0.6)`,"--v-radius-lg":`calc(${t} * 1.5)`,"--v-radius-xl":`calc(${t} * 2)`,"--v-radius-full":"999px"};let r=parseFloat(n[1]),o=n[2],s=i=>`${Math.round(i*1e3)/1e3}${o}`;return{"--v-radius":s(r),"--v-radius-sm":s(Math.max(r*.55,0)),"--v-radius-lg":s(r*1.5),"--v-radius-xl":s(r*2),"--v-radius-full":"999px"}}function ni(e,t){var u,l,f,p;let n={},r={},o={};for(let d of ui){let m=(u=me(e[d]))!=null?u:Cn,g=Rn(m),h=ci(m,t);r[d]=h;for(let P of qr)n[`--v-${d}-${P}`]=h[String(P)];let y=t?{l:Math.max(g.l,.62),c:g.c*.95,h:g.h}:g,S=t?{l:Math.min(y.l+.07,.94),c:y.c*.95,h:y.h}:{l:Math.max(y.l-.055,.12),c:y.c,h:y.h},V=t?{l:Math.min(y.l+.13,.97),c:y.c*.88,h:y.h}:{l:Math.max(y.l-.105,.1),c:y.c,h:y.h},k=yt(y),v=yt(S),I=yt(V);n[`--v-${d}`]=ze(t?k:m),n[`--v-${d}-hover`]=ze(v),n[`--v-${d}-active`]=ze(I),n[`--v-${d}-contrast`]=Bt(t?k:m),n[`--v-${d}-contrast-hover`]=Bt(v),n[`--v-${d}-contrast-active`]=Bt(I);let D=h[50],C=h[100],W=t?h[800]:h[700];n[`--v-${d}-soft`]=D,n[`--v-${d}-soft-hover`]=C,n[`--v-${d}-soft-text`]=W,n[`--v-${d}-ring`]=gt(k,t?.45:.32),n[`--v-${d}-border`]=t?h[300]:h[200],o[d]=n[`--v-${d}-contrast`]}let s=(f=me((l=e.neutral)!=null?l:e.primary))!=null?f:Cn,i=Rn(s).h,a=(d,m)=>oi({l:d,c:m,h:i}),c={};if(qr.forEach((d,m)=>{let g=t?ai:ii;c[String(d)]=a(g[m],.012),n[`--v-neutral-${d}`]=c[String(d)]}),r.neutral=c,t)n["--v-surface"]=a(.248,.021),n["--v-surface-2"]=a(.196,.021),n["--v-surface-3"]=a(.305,.024),n["--v-surface-inset"]=a(.17,.02),n["--v-text"]=a(.965,.008),n["--v-text-muted"]=a(.748,.017),n["--v-text-soft"]=a(.63,.017),n["--v-border"]=a(.355,.023),n["--v-border-strong"]=a(.46,.026),n["--v-overlay"]="rgba(0, 0, 0, 0.62)",n["--v-shadow-sm"]="0 1px 2px rgba(0, 0, 0, 0.5)",n["--v-shadow"]="0 10px 30px rgba(0, 0, 0, 0.5)",n["--v-shadow-lg"]="0 24px 60px rgba(0, 0, 0, 0.62)";else{let d=yt({l:.24,c:.028,h:i});n["--v-surface"]=a(1,0),n["--v-surface-2"]=a(.981,.006),n["--v-surface-3"]=a(.955,.009),n["--v-surface-inset"]=a(.968,.008),n["--v-text"]=ze(d),n["--v-text-muted"]=a(.53,.023),n["--v-text-soft"]=a(.655,.018),n["--v-border"]=a(.906,.012),n["--v-border-strong"]=a(.828,.016),n["--v-overlay"]=gt(d,.45),n["--v-shadow-sm"]=`0 1px 2px ${gt(d,.08)}`,n["--v-shadow"]=`0 10px 30px ${gt(d,.14)}`,n["--v-shadow-lg"]=`0 24px 60px ${gt(d,.2)}`}return n["--v-focus-ring"]=n["--v-primary-ring"],o.surface=Bt((p=me(n["--v-surface"]))!=null?p:si),{vars:n,scales:r,contrast:o}}function Fr(e,t){let n=Object.entries(t).map(([r,o])=>` ${r}: ${o};`).join(`
|
|
138
|
+
`)}))}function lc(e){let t=e.tagName;if(t==="FORM")return"submit";if(t==="INPUT"||t==="SELECT"||t==="TEXTAREA"){let n=e.type;return n==="button"||n==="submit"?"click":"change"}return"click"}function dc({el:e,cleanup:t,run:n}){var l,f;let r=E(e,"trigger")||lc(e),[o,...s]=r.split(/[.\s]+/),i=_((l=E(e,"poll"))!=null?l:void 0,0);if(i>0){n();let p=setInterval(()=>{document.visibilityState==="visible"&&n()},i);t(()=>clearInterval(p));return}if(o==="load"||o==="ready"){n();return}if(o==="visible"||o==="revealed"){if(typeof IntersectionObserver=="undefined"){n();return}let p=new IntersectionObserver(d=>{for(let m of d)m.isIntersecting&&(n(),s.includes("repeat")||p.unobserve(e))},{rootMargin:"80px"});p.observe(e),t(()=>p.disconnect());return}let a=s.includes("once"),c=_((f=E(e,"debounce"))!=null?f:void 0,0),u=p=>{(e.tagName==="FORM"||e.href)&&p.preventDefault(),n(p)};c>0&&(u=Fe(u,c)),e.addEventListener(o,u,{once:a}),t(()=>e.removeEventListener(o,u))}var fc=[["get","GET"],["post","POST"],["put","PUT"],["patch","PATCH"],["delete","DELETE"]];for(let[e,t]of fc)A(e,({el:n,scope:r,expression:o,cleanup:s})=>{dc({el:n,scope:r,cleanup:s,run:a=>{let c=jt(o,r);if(!c)return;let u=E(n,"body")||E(n,"data-body"),l=u?O(u,r.child({$event:a}),"v-body"):void 0,f=E(n,"params"),p=f?O(f,r,"v-params"):void 0;It({el:n,scope:r,method:t,url:c,body:l,params:p,event:a})}})});function jt(e,t){let n=e.trim();if(!n)return"";if((/^[./#?]/.test(n)||/^https?:\/\//i.test(n)||/^[\w-]+\/[\w\-/.]*$/.test(n))&&!/[+`'"]|\$\{/.test(n))return n;let o=O(n,t,"URL");return typeof o=="string"?o:n}A("load",({el:e,scope:t,expression:n})=>{let r=jt(n,t);r&&It({el:e,scope:t,method:"GET",url:r})});A("load-visible",({el:e,scope:t,cleanup:n,expression:r})=>{let o=jt(r,t);if(!o)return;if(typeof IntersectionObserver=="undefined"){It({el:e,scope:t,method:"GET",url:o});return}let s=new IntersectionObserver(i=>{for(let a of i)a.isIntersecting&&(s.unobserve(e),It({el:e,scope:t,method:"GET",url:o}))},{rootMargin:"120px"});s.observe(e),n(()=>s.disconnect())});A("search",({el:e,scope:t,expression:n,cleanup:r})=>{var f,p;let o=e,s=jt(n,t),i=E(e,"param")||o.getAttribute("name")||"q",a=_((f=E(e,"debounce"))!=null?f:void 0,300),c=Number((p=E(e,"min-length"))!=null?p:0),u=Fe(()=>{let d=o.value.trim();d.length<c||It({el:e,scope:t,method:"GET",url:s,params:{[i]:d}})},a),l=()=>u();o.addEventListener("input",l),r(()=>{o.removeEventListener("input",l),u.cancel()})});A("resource",({el:e,scope:t,expression:n,cleanup:r})=>{var c,u,l,f;let o=n.indexOf(":"),s=E(e,"as")||"resource",i=n.trim();if(o>-1){let p=n.slice(0,o).trim();/^[A-Za-z_$][\w$]*$/.test(p)&&(s=p,i=n.slice(o+1).trim())}let a=bn(()=>jt(i,t),{method:(E(e,"method")||"GET").toUpperCase(),params:()=>E(e,"params")?O(E(e,"params"),t,"v-params"):void 0,cache:_((c=E(e,"cache"))!=null?c:void 0,0)||void 0,retry:Number((u=E(e,"retry"))!=null?u:0),timeout:_((l=E(e,"timeout"))!=null?l:void 0,oe.defaults.timeout),jsonPath:E(e,"json-path"),poll:_((f=E(e,"poll"))!=null?f:void 0,0),manual:Nr(e,"manual"),onSuccess:p=>ht(e,"voodoo:success",{data:p}),onError:(p,d)=>ht(e,"voodoo:error",{error:p,message:d})});t.set(s,a),r(()=>a.stop())},{priority:U.DATA});for(let e of["target","swap","trigger","poll","param","params","body","data-body","headers","cache","retry","timeout","as","json-path","template","offline-queue","min-length","scroll-to","manual","debounce","throttle","indicator"])A(e,()=>{},{priority:U.TRANSITION});Fo(zo);Wo(At);Jo(js);vs();var Ft=new Map;function Is(e,t){let n=Ft.get(e);return n||Ft.set(e,n=new Set),n.add(t),()=>n.delete(t)}function pc(e,t){let n=Is(e,r=>{n(),t(r)});return n}function mc(e,t){let n=Ft.get(e);if(n)for(let r of[...n])try{r(t)}catch(o){$(o,`event "${e}"`)}}function hc(e,t){var n;if(!t){Ft.delete(e);return}(n=Ft.get(e))==null||n.delete(t)}function js(e,t){var r,o;let n=typeof t=="function"?{mounted:t,updated:t}:t;A(e,s=>{var l,f;let i,a=!1,c=p=>{var d,m;return{el:s.el,value:p,oldValue:i,arg:s.arg,modifiers:s.modifiers,expression:s.expression,scope:s.scope,instance:(m=(d=s.scope.owner)==null?void 0:d.component)!=null?m:null}},u=n.raw?s.expression:s.evaluate();(l=n.created)==null||l.call(n,s.el,c(u)),(f=n.beforeMount)==null||f.call(n,s.el,c(u)),s.effect(()=>{var m,g;let p=n.raw?s.expression:s.evaluate();if(!a){a=!0,i=p,(m=n.mounted)==null||m.call(n,s.el,c(p));return}if(p===i)return;let d=c(p);(g=n.updated)==null||g.call(n,s.el,d),i=p}),s.cleanup(()=>{var d,m;let p=c(i);(d=n.beforeUnmount)==null||d.call(n,s.el,p),(m=n.unmounted)==null||m.call(n,s.el,p)})},{priority:(r=n.priority)!=null?r:U.DEFAULT,terminal:(o=n.terminal)!=null?o:!1})}function gc(e){return Object.defineProperties(de.data,Object.getOwnPropertyDescriptors(e)),de.data}var yc="0.11.2",En={...wr,version:yc,config:w,reactive:F,ref:Tt,shallowRef:Kn,computed:xt,effect:te,watch:ue,watchEffect:Yn,nextTick:$e,toRaw:K,markRaw:zn,unref:Gn,stop:qn,effectScope:_n,EffectScope:ne,flushSync:jn,data:gc,store:ns,stores:ln,removeStore:rs,storeNames:os,scope:de,component:rt,components:z,directive:js,directives:ve,magic:N,magics:kt,createApp:Zo,start:Uo,whenReady:an,whenElement:cn,walk:j,refresh:_o,destroy:H,stopObserving:qo,getScope:et,findScope:xe,addCleanup:fe,parseAttribute:Je,parse:le,tokenize:Jt,evaluate:x,evaluateIn:O,stringify:ye,clearParseCache:uo,globals:G,http:oe,request:Lt,HttpError:X,resource:bn,toast:Pe,storage:se,session:mn,cookie:hn,cache:yn,url:gn,theme:ft,clipboard:Ar,screen:ie,network:_e,enter:Ot,leave:$t,fadeIn:wn,fadeOut:Tn,slideUp:Dt,slideDown:Ht,viewTransition:Es,injectStyle:Ee,ensureTokens:Ue,on:Is,once:pc,off:hc,emit:mc,use(e,t){Zt(En,e,t)},onError(e){Fn(e)},instances:on,Scope:De,PRIORITY:U,VoodooSyntaxError:L,VoodooRuntimeError:B};ts(En);Z();var vc=new Set(["animation-iteration-count","aspect-ratio","border-image-slice","column-count","flex","flex-grow","flex-shrink","font-weight","grid-area","grid-column","grid-row","line-height","opacity","order","orphans","scale","tab-size","widows","z-index","zoom"]);function Qs(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function ae(e){return e.length<2?e:Array.from(new Set(e))}function Ve(e){return String(e!=null?e:"").split(/\s+/).filter(Boolean)}function Or(e){if(typeof document=="undefined")return[];let t=document.createElement("template");t.innerHTML=e.trim();let n=[];for(let r of Array.from(t.content.children))n.push(r);return n}function Ks(e){return e.length>2&&e.charCodeAt(0)===60&&e.endsWith(">")}function bc(e){if(e==null)return typeof document=="undefined"?[]:[document];if(e instanceof pe)return e.toArray();if(typeof e=="string")return We(e);if(typeof e=="function")return typeof document=="undefined"?[]:[document];let t=We(e);return t.length?t:typeof document=="undefined"?[]:[document]}function We(e,t){if(e==null)return[];if(typeof e=="string"){let o=e.trim();if(!o)return[];if(Ks(o))return Or(o);let s=[];for(let i of bc(t))try{for(let a of Array.from(i.querySelectorAll(o)))s.push(a)}catch(a){}return ae(s)}if(e instanceof pe)return e.toArray();if(typeof e=="function")return[];let n=e;if(typeof n.nodeType=="number"){if(n.nodeType===1)return[n];if(n.nodeType===9){let o=n;return o.documentElement?[o.documentElement]:[]}return n.nodeType===11?Array.from(n.children):[]}let r=e;if(typeof r.length=="number"){let o=[];for(let s=0;s<r.length;s++){let i=r[s];i&&i.nodeType===1&&o.push(i)}return ae(o)}return[]}function Fs(e){if(e==null)return[];if(typeof e=="string"){let r=e;return Ks(r.trim())?Or(r):[document.createTextNode(r)]}if(e instanceof pe)return e.toArray();if(typeof e=="function")return[];let t=e;if(typeof t.nodeType=="number")return[t];let n=e;if(typeof n.length=="number"){let r=[];for(let o=0;o<n.length;o++)n[o]&&r.push(n[o]);return r}return[]}function kn(e,t,n){let r=Qs(t);if(n===null||n===""){e.style.removeProperty(r);return}let o=typeof n=="number"&&!vc.has(r)&&!r.startsWith("--")?`${n}px`:String(n);e.style.setProperty(r,o)}function wc(e,t){for(let[n,r]of Object.entries(t))kn(e,n,r)}function Bs(e){if(e===void 0)return;if(e==="")return"";if(e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(/^-?\d+(\.\d+)?$/.test(e))return Number(e);let t=e.charCodeAt(0);if(t===123||t===91||t===34)try{return JSON.parse(e)}catch(n){return e}return e}function Us(e){return e.replace(/-([a-z0-9])/g,(t,n)=>n.toUpperCase())}var Gs=new WeakMap;function qs(e){return e.hasAttribute("hidden")||e.style.display==="none"?!0:e.isConnected?getComputedStyle(e).display==="none":!1}function _s(e){e.removeAttribute("hidden");let t=Gs.get(e);t!==void 0&&t!=="none"?e.style.display=t:e.style.removeProperty("display"),e.isConnected&&getComputedStyle(e).display==="none"&&(e.style.display="block")}function Vs(e){let t=e.style.display;t&&t!=="none"&&Gs.set(e,t),e.style.display="none"}var Ws="input,select,textarea";function zs(e){return e.matches(Ws)?[e]:Array.from(e.querySelectorAll(Ws))}function Tc(e){let t=e;if(!t.name||t.disabled)return!1;let n=(t.getAttribute("type")||"").toLowerCase();return!(n==="file"||n==="submit"||n==="reset"||n==="button"||(n==="checkbox"||n==="radio")&&!t.checked)}var Sn=new WeakMap;function xc(e){let t=Sn.get(e);return t||Sn.set(e,t=[]),t}var pe=class e{constructor(t=[]){M(this,"length");M(this,"elements");this.elements=t,this.length=t.length;let n=this;for(let r=0;r<t.length;r++)n[r]=t[r]}[Symbol.iterator](){return this.elements[Symbol.iterator]()}find(t){let n=[];for(let r of this.elements)try{for(let o of Array.from(r.querySelectorAll(t)))n.push(o)}catch(o){}return new e(ae(n))}closest(t){let n=[];for(let r of this.elements){let o=r.closest(t);o&&n.push(o)}return new e(ae(n))}parent(t){let n=[];for(let r of this.elements){let o=r.parentElement;o&&(!t||o.matches(t))&&n.push(o)}return new e(ae(n))}parents(t){let n=[];for(let r of this.elements){let o=r.parentElement;for(;o;)(!t||o.matches(t))&&n.push(o),o=o.parentElement}return new e(ae(n))}children(t){let n=[];for(let r of this.elements)for(let o of Array.from(r.children))(!t||o.matches(t))&&n.push(o);return new e(ae(n))}siblings(t){let n=[];for(let r of this.elements){let o=r.parentElement;if(o)for(let s of Array.from(o.children))s!==r&&(!t||s.matches(t))&&n.push(s)}return new e(ae(n))}next(t){let n=[];for(let r of this.elements){let o=r.nextElementSibling;o&&(!t||o.matches(t))&&n.push(o)}return new e(ae(n))}prev(t){let n=[];for(let r of this.elements){let o=r.previousElementSibling;o&&(!t||o.matches(t))&&n.push(o)}return new e(ae(n))}first(){return this.eq(0)}last(){return this.eq(-1)}eq(t){let n=t<0?this.elements.length+t:t,r=this.elements[n];return new e(r?[r]:[])}filter(t){let n=this.elements.filter((r,o)=>typeof t=="function"?t(r,o):r.matches(t));return new e(n)}not(t){let n=this.elements.filter((r,o)=>typeof t=="function"?!t(r,o):!r.matches(t));return new e(n)}has(t){let n=this.elements.filter(r=>typeof t=="string"?r.querySelector(t)!==null:r.contains(t));return new e(n)}is(t){return this.elements.some((n,r)=>typeof t=="function"?t(n,r):n.matches(t))}map(t){return this.elements.map((n,r)=>t(n,r))}each(t){for(let n=0;n<this.elements.length;n++){let r=this.elements[n];if(t.call(r,r,n)===!1)break}return this}get(...t){if(!t.length)return this.toArray();let n=Number(t[0]);return this.elements[n<0?this.elements.length+n:n]}toArray(){return this.elements.slice()}add(t,n){return new e(ae([...this.elements,...We(t,n)]))}slice(t,n){return new e(this.elements.slice(t,n))}text(...t){var o,s;if(!t.length)return(s=(o=this.elements[0])==null?void 0:o.textContent)!=null?s:"";let n=t[0],r=n==null?"":String(n);for(let i of this.elements){for(let a of Array.from(i.childNodes))H(a);i.textContent=r}return this}html(...t){var o,s;if(!t.length)return(s=(o=this.elements[0])==null?void 0:o.innerHTML)!=null?s:"";let n=t[0],r=n==null?"":String(n);for(let i of this.elements){for(let a of Array.from(i.childNodes))H(a);i.innerHTML=r}return this}val(...t){var r;if(!t.length){let o=this.elements[0];if(!o)return"";let s=o;return o.tagName==="SELECT"&&s.multiple?Array.from(s.selectedOptions).map(i=>i.value):o.type==="checkbox"?o.checked?o.value||"on":"":(r=o.value)!=null?r:""}let n=t[0];for(let o of this.elements){let s=o,i=o;if(s.tagName==="SELECT"&&i.multiple){let a=(Array.isArray(n)?n:[n]).map(String);for(let c of Array.from(i.options))c.selected=a.includes(c.value);continue}if(s.type==="checkbox"||s.type==="radio"){s.checked=Array.isArray(n)?n.map(String).includes(s.value):n===!0||String(n)===s.value;continue}s.value=n==null?"":String(n)}return this}attr(...t){var s,i;let n=t[0];if(n!==null&&typeof n=="object"){for(let a of this.elements)for(let[c,u]of Object.entries(n))u===null||u===!1?a.removeAttribute(c):a.setAttribute(c,u===!0?"":String(u));return this}let r=String(n);if(t.length<2)return(i=(s=this.elements[0])==null?void 0:s.getAttribute(r))!=null?i:void 0;let o=t[1];for(let a of this.elements)o===null||o===!1?a.removeAttribute(r):a.setAttribute(r,o===!0?"":String(o));return this}removeAttr(t){let n=Ve(t);for(let r of this.elements)for(let o of n)r.removeAttribute(o);return this}prop(...t){let n=String(t[0]);if(t.length<2){let r=this.elements[0];return r?r[n]:void 0}for(let r of this.elements)r[n]=t[1];return this}data(...t){let n=t[0];if(!t.length){let s=this.elements[0];if(!s)return{};let i={};for(let[a,c]of Object.entries(s.dataset))i[a]=Bs(c);return i}if(n!==null&&typeof n=="object"){for(let s of this.elements)for(let[i,a]of Object.entries(n))s.dataset[Us(i)]=typeof a=="string"?a:JSON.stringify(a!=null?a:null);return this}let r=Us(String(n));if(t.length<2){let s=this.elements[0];return s?Bs(s.dataset[r]):void 0}let o=t[1];for(let s of this.elements)s.dataset[r]=typeof o=="string"?o:JSON.stringify(o!=null?o:null);return this}css(...t){let n=t[0];if(n!==null&&typeof n=="object"){for(let o of this.elements)wc(o,n);return this}let r=String(n);if(t.length<2){let o=this.elements[0];if(!o)return"";let s=Qs(r);return((o.isConnected?getComputedStyle(o).getPropertyValue(s):"")||o.style.getPropertyValue(s)).trim()}for(let o of this.elements)kn(o,r,t[1]);return this}width(...t){if(!t.length){let n=this.elements[0];return n?n.getBoundingClientRect().width:0}for(let n of this.elements)kn(n,"width",t[0]);return this}height(...t){if(!t.length){let n=this.elements[0];return n?n.getBoundingClientRect().height:0}for(let n of this.elements)kn(n,"height",t[0]);return this}offset(){let t=this.elements[0];if(!t)return{top:0,left:0};let n=t.getBoundingClientRect();return{top:n.top+window.scrollY,left:n.left+window.scrollX}}position(){let t=this.elements[0];return t?{top:t.offsetTop,left:t.offsetLeft}:{top:0,left:0}}scrollTop(...t){var r,o;if(!t.length)return(o=(r=this.elements[0])==null?void 0:r.scrollTop)!=null?o:0;let n=Number(t[0])||0;for(let s of this.elements)s.scrollTop=n;return this}addClass(t){let n=Ve(t);if(n.length)for(let r of this.elements)r.classList.add(...n);return this}removeClass(t){let n=Ve(t);if(n.length)for(let r of this.elements)r.classList.remove(...n);return this}toggleClass(t,n){let r=Ve(t);for(let o of this.elements)for(let s of r)n===void 0?o.classList.toggle(s):o.classList.toggle(s,n);return this}hasClass(t){let n=Ve(t);return n.length?this.elements.some(r=>n.every(o=>r.classList.contains(o))):!1}insert(t,n){let r=this.elements.length;for(let o=0;o<r;o++){let s=this.elements[o];for(let i of Fs(t))n(s,o===r-1?i:i.cloneNode(!0))}return this}append(t){return this.insert(t,(n,r)=>n.appendChild(r))}prepend(t){return this.insert(t,(n,r)=>n.insertBefore(r,n.firstChild))}before(t){return this.insert(t,(n,r)=>{var o;return(o=n.parentNode)==null?void 0:o.insertBefore(r,n)})}after(t){return this.insert(t,(n,r)=>{var o;return(o=n.parentNode)==null?void 0:o.insertBefore(r,n.nextSibling)})}appendTo(t){let n=We(t);for(let r=0;r<n.length;r++)for(let o of this.elements)n[r].appendChild(r===n.length-1?o:o.cloneNode(!0));return this}prependTo(t){let n=We(t);for(let r=0;r<n.length;r++){let o=n[r],s=this.elements.map(i=>r===n.length-1?i:i.cloneNode(!0));for(let i=s.length-1;i>=0;i--)o.insertBefore(s[i],o.firstChild)}return this}replaceWith(t){for(let n of this.elements){let r=n.parentNode;if(r){for(let o of Fs(t))r.insertBefore(o,n);H(n),n.remove()}}return this}wrap(t){var n;for(let r of this.elements){let o=We(t)[0];if(!o)continue;let s=o.cloneNode(!0);(n=r.parentNode)==null||n.insertBefore(s,r);let i=s;for(;i.firstElementChild;)i=i.firstElementChild;i.appendChild(r)}return this}unwrap(){let t=new Set;for(let n of this.elements){let r=n.parentElement;r&&r!==document.body&&t.add(r)}for(let n of t){let r=n.parentNode;if(r){for(;n.firstChild;)r.insertBefore(n.firstChild,n);H(n),n.remove()}}return this}remove(){for(let t of this.elements)H(t),t.remove();return this}empty(){for(let t of this.elements){for(let n of Array.from(t.childNodes))H(n);t.replaceChildren()}return this}clone(t=!0){return new e(this.elements.map(n=>n.cloneNode(t)))}on(t,...n){var a;let r=typeof n[0]=="string",o=r?n[0]:null,s=r?n[1]:n[0],i=(a=r?n[2]:n[1])!=null?a:{};if(typeof s!="function")return this;for(let c of this.elements)for(let u of Ve(t)){let l=f=>{if(!o){s.call(c,f);return}let p=f.target,d=p==null?void 0:p.closest(o);!d||!c.contains(d)||s.call(d,f)};c.addEventListener(u,l,i),xc(c).push({type:u,selector:o,handler:s,wrapped:l,options:i})}return this}off(t,n,r){let o=typeof n=="string"?n:null,s=typeof n=="function"?n:r!=null?r:null,i=t?Ve(t):null;for(let a of this.elements){let c=Sn.get(a);if(!c)continue;let u=[];for(let l of c){let f=!i||i.includes(l.type),p=o===null||l.selector===o,d=s===null||l.handler===s;f&&p&&d?a.removeEventListener(l.type,l.wrapped,l.options):u.push(l)}Sn.set(a,u)}return this}once(t,...n){let r=typeof n[0]=="string",o=r?n[0]:null,s=r?n[1]:n[0];if(typeof s!="function")return this;let i=this,a=function(c){return o?i.off(t,o,a):i.off(t,a),s.call(this,c)};return o?this.on(t,o,a):this.on(t,a)}trigger(t,n){for(let r of this.elements){if(n===void 0&&typeof r[t]=="function"){r[t]();continue}let o=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0});o.__voodoo=!0,r.dispatchEvent(o)}return this}emit(t,n){for(let r of this.elements){let o=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0});o.__voodoo=!0,r.dispatchEvent(o)}return this}show(){for(let t of this.elements)_s(t);return this}hide(){for(let t of this.elements)Vs(t);return this}toggle(t){for(let n of this.elements)(t===void 0?qs(n):t)?_s(n):Vs(n);return this}fadeIn(t=220){for(let n of this.elements)n.removeAttribute("hidden"),wn(n,t);return this}fadeOut(t=220){for(let n of this.elements)Tn(n,t);return this}slideUp(t=240){for(let n of this.elements)Dt(n,t);return this}slideDown(t=240){for(let n of this.elements)n.removeAttribute("hidden"),Ht(n,t);return this}slideToggle(t=240){for(let n of this.elements)qs(n)?(n.removeAttribute("hidden"),Ht(n,t)):Dt(n,t);return this}animate(t,n=300){for(let r of this.elements)typeof r.animate=="function"&&r.animate(t,n);return this}scrollIntoView(t={behavior:"smooth",block:"start"}){var n;return(n=this.elements[0])==null||n.scrollIntoView(t),this}serialize(){let t=this.elements[0];if(!t)return"";let n=new URLSearchParams;for(let r of zs(t)){if(!Tc(r))continue;let o=r,s=r;if(o.tagName==="SELECT"&&s.multiple){for(let i of Array.from(s.selectedOptions))n.append(o.name,i.value);continue}n.append(o.name,o.value)}return n.toString()}serializeObject(){var r,o,s,i;let t=this.elements[0],n={};if(!t)return n;for(let a of zs(t)){let c=a;if(!c.name||c.disabled)continue;let u=(c.getAttribute("type")||"").toLowerCase();if(u==="submit"||u==="reset"||u==="button")continue;let l=c.name.endsWith("[]"),f=l?c.name.slice(0,-2):c.name,p=a,d;if(u==="checkbox"){if(!c.checked&&!l){n[f]=(r=n[f])!=null?r:!1;continue}if(!c.checked)continue;d=c.value==="on"?!0:c.value}else if(u==="radio"){if(!c.checked)continue;d=c.value}else u==="file"?d=c.multiple?Array.from((o=c.files)!=null?o:[]):(i=(s=c.files)==null?void 0:s[0])!=null?i:null:c.tagName==="SELECT"&&p.multiple?d=Array.from(p.selectedOptions).map(m=>m.value):u==="number"||u==="range"?d=c.value===""?null:Number(c.value):d=c.value;if(l){let m=n[f];Array.isArray(m)?m.push(d):n[f]=[d];continue}if(Object.prototype.hasOwnProperty.call(n,f)){let m=n[f];Array.isArray(m)?m.push(d):m===void 0||m===!1?n[f]=d:n[f]=[m,d];continue}n[f]=d}return n}focus(t){var n;return(n=this.elements[0])==null||n.focus(t),this}blur(){for(let t of this.elements)t.blur();return this}select(){for(let t of this.elements){let n=t;typeof n.select=="function"&&n.select()}return this}walk(t=!1){for(let n of this.elements)t&&H(n),j(n,xe(n.parentNode));return this}destroy(){for(let t of this.elements)H(t);return this}};function $r(e,t){if(typeof e=="function"){Hr(e);let n=typeof document!="undefined"?document.documentElement:null;return new pe(n?[n]:[])}return new pe(We(e,t))}function Hr(e){return typeof document=="undefined"?Promise.resolve():new Promise(t=>{Xo(()=>{try{e==null||e()}catch(n){$(n,"V.ready")}t()})})}function Ys(e){return new pe(Or(e))}var Xs=((e,t)=>$r(e,t));Object.assign(Xs,En,{query:$r,ready:Hr,fromHtml:Ys,Collection:pe,magic:N});var Dr=Xs;re();ut();re();var Ec=/^#([0-9a-f])([0-9a-f])([0-9a-f])[0-9a-f]?$/i,kc=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})(?:[0-9a-f]{2})?$/i,Sc=/^rgba?\(([^)]+)\)$/i,Ac=/^hsla?\(([^)]+)\)$/i;function Js(e){return e.split(/[\s,/]+/).map(t=>parseFloat(t)).filter(t=>!Number.isNaN(t))}function Rc(e,t,n){let r=(e%360+360)%360,o=J(t/100,0,1),s=J(n/100,0,1),i=(1-Math.abs(2*s-1))*o,a=i*(1-Math.abs(r/60%2-1)),c=s-i/2,u=Math.floor(r/60)%6,l=[[i,a,0],[a,i,0],[0,i,a],[0,a,i],[a,0,i],[i,0,a]],[f,p,d]=l[u];return{r:Math.round((f+c)*255),g:Math.round((p+c)*255),b:Math.round((d+c)*255)}}function me(e){let t=String(e!=null?e:"").trim();if(!t)return null;let n=Ec.exec(t);if(n)return{r:parseInt(n[1]+n[1],16),g:parseInt(n[2]+n[2],16),b:parseInt(n[3]+n[3],16)};let r=kc.exec(t);if(r)return{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)};let o=Sc.exec(t);if(o){let[i,a,c]=Js(o[1]);return i===void 0||a===void 0||c===void 0?null:{r:J(i,0,255),g:J(a,0,255),b:J(c,0,255)}}let s=Ac.exec(t);if(s){let[i,a,c]=Js(s[1]);return i===void 0||a===void 0||c===void 0?null:Rc(i,a,c)}return null}function J(e,t,n){return e<t?t:e>n?n:e}function vt(e){let t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ir(e){return e<=.0031308?e*12.92:1.055*Math.pow(e,.4166666666666667)-.055}function Cc(e){let t=vt(e.r),n=vt(e.g),r=vt(e.b),o=.4122214708*t+.5363325363*n+.0514459929*r,s=.2119034982*t+.6806995451*n+.1073969566*r,i=.0883024619*t+.2817188376*n+.6299787005*r,a=Math.cbrt(o),c=Math.cbrt(s),u=Math.cbrt(i);return{l:.2104542553*a+.793617785*c-.0040720468*u,a:1.9779984951*a-2.428592205*c+.4505937099*u,b:.0259040371*a+.7827717662*c-.808675766*u}}function Pc(e){let t=e.l+.3963377774*e.a+.2158037573*e.b,n=e.l-.1055613458*e.a-.0638541728*e.b,r=e.l-.0894841775*e.a-1.291485548*e.b,o=t*t*t,s=n*n*n,i=r*r*r;return{r:Ir(4.0767416621*o-3.3077115913*s+.2309699292*i),g:Ir(-1.2684380046*o+2.6097574011*s-.3413193965*i),b:Ir(-.0041960863*o-.7034186147*s+1.707614701*i)}}function Rn(e){let t=Cc(e),n=Math.sqrt(t.a*t.a+t.b*t.b),r=Math.atan2(t.b,t.a)*180/Math.PI;return r<0&&(r+=360),{l:t.l,c:n,h:n<1e-5?0:r}}function Zs(e){let t=e.h*Math.PI/180;return Pc({l:e.l,a:Math.cos(t)*e.c,b:Math.sin(t)*e.c})}function yt(e){let t=Math.max(0,e.c);for(let r=0;r<32;r++){let o=Zs({l:J(e.l,0,1),c:t,h:e.h});if(o.r>=-.001&&o.r<=1.001&&o.g>=-.001&&o.g<=1.001&&o.b>=-.001&&o.b<=1.001)return{r:Math.round(J(o.r,0,1)*255),g:Math.round(J(o.g,0,1)*255),b:Math.round(J(o.b,0,1)*255)};t*=.92}let n=Zs({l:J(e.l,0,1),c:0,h:e.h});return{r:Math.round(J(n.r,0,1)*255),g:Math.round(J(n.g,0,1)*255),b:Math.round(J(n.b,0,1)*255)}}function jr(e){return J(Math.round(e),0,255).toString(16).padStart(2,"0")}function ze(e){return`#${jr(e.r)}${jr(e.g)}${jr(e.b)}`}function gt(e,t){return`rgba(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)}, ${Number(t.toFixed(3))})`}function oi(e){return ze(yt(e))}function Br(e){return .2126*vt(e.r)+.7152*vt(e.g)+.0722*vt(e.b)}function Ur(e,t){let n=typeof e=="string"?me(e):e,r=typeof t=="string"?me(t):t;if(!n||!r)return 1;let o=Br(n),s=Br(r),i=Math.max(o,s),a=Math.min(o,s);return(i+.05)/(a+.05)}var si={r:255,g:255,b:255},Cn={r:0,g:0,b:0};function Bt(e){let t=typeof e=="string"?me(e):e;return t?Ur(t,si)>=Ur(t,Cn)?"#ffffff":"#000000":"#ffffff"}var qr=[50,100,200,300,400,500,600,700,800,900],ii=[.973,.941,.889,.819,.732,.638,.558,.478,.399,.327],Mc=[.14,.26,.46,.68,.88,1,.97,.89,.78,.65],ai=[.244,.286,.343,.408,.484,.588,.668,.748,.836,.928],Lc=[.3,.42,.6,.78,.92,1,.92,.78,.57,.33];function ci(e,t=!1){var a;let n=typeof e=="string"?(a=me(e))!=null?a:Cn:e,r=Rn(n),o=t?ai:ii,s=t?Lc:Mc,i={};return qr.forEach((c,u)=>{i[String(c)]=oi({l:o[u],c:r.c*s[u],h:r.h})}),i}var Pn={violeta:{primary:"#6D3BF5",accent:"#FF3D8B",success:"#16A34A",warning:"#D97706",danger:"#E11D48",info:"#7C6BFF"},oceano:{primary:"#0E7BC4",accent:"#0FB5C9",success:"#0F9D6E",warning:"#D08700",danger:"#DC2F3E",info:"#3B82F6"},floresta:{primary:"#1F8A4C",accent:"#7FA80E",success:"#18A05A",warning:"#C97A0A",danger:"#C93A2E",info:"#2C8FA8"},poente:{primary:"#E4632A",accent:"#D62F63",success:"#3E9B52",warning:"#D99000",danger:"#D32F2F",info:"#B45FC0"},grafite:{primary:"#4C5A70",accent:"#2E7FD1",success:"#2F8F60",warning:"#B57A12",danger:"#C2453F",info:"#5B7A99"}},ui=["primary","accent","success","warning","danger","info"],_r="voodoo:palette",ei="voodoo-palette",Nc="system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",Oc="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace";function ti(e,t){let n=(e!=null?e:"").trim();return n?n.includes(",")?n:`${/^['"]/.test(n)?n:`'${n}'`}, ${t}`:t}var $c=/^([\d.]+)(px|rem|em)$/;function Hc(e){let t=(e||"12px").trim(),n=$c.exec(t);if(!n)return{"--v-radius":t,"--v-radius-sm":`calc(${t} * 0.6)`,"--v-radius-lg":`calc(${t} * 1.5)`,"--v-radius-xl":`calc(${t} * 2)`,"--v-radius-full":"999px"};let r=parseFloat(n[1]),o=n[2],s=i=>`${Math.round(i*1e3)/1e3}${o}`;return{"--v-radius":s(r),"--v-radius-sm":s(Math.max(r*.55,0)),"--v-radius-lg":s(r*1.5),"--v-radius-xl":s(r*2),"--v-radius-full":"999px"}}function ni(e,t){var u,l,f,p;let n={},r={},o={};for(let d of ui){let m=(u=me(e[d]))!=null?u:Cn,g=Rn(m),h=ci(m,t);r[d]=h;for(let P of qr)n[`--v-${d}-${P}`]=h[String(P)];let y=t?{l:Math.max(g.l,.62),c:g.c*.95,h:g.h}:g,S=t?{l:Math.min(y.l+.07,.94),c:y.c*.95,h:y.h}:{l:Math.max(y.l-.055,.12),c:y.c,h:y.h},V=t?{l:Math.min(y.l+.13,.97),c:y.c*.88,h:y.h}:{l:Math.max(y.l-.105,.1),c:y.c,h:y.h},k=yt(y),v=yt(S),I=yt(V);n[`--v-${d}`]=ze(t?k:m),n[`--v-${d}-hover`]=ze(v),n[`--v-${d}-active`]=ze(I),n[`--v-${d}-contrast`]=Bt(t?k:m),n[`--v-${d}-contrast-hover`]=Bt(v),n[`--v-${d}-contrast-active`]=Bt(I);let D=h[50],C=h[100],W=t?h[800]:h[700];n[`--v-${d}-soft`]=D,n[`--v-${d}-soft-hover`]=C,n[`--v-${d}-soft-text`]=W,n[`--v-${d}-ring`]=gt(k,t?.45:.32),n[`--v-${d}-border`]=t?h[300]:h[200],o[d]=n[`--v-${d}-contrast`]}let s=(f=me((l=e.neutral)!=null?l:e.primary))!=null?f:Cn,i=Rn(s).h,a=(d,m)=>oi({l:d,c:m,h:i}),c={};if(qr.forEach((d,m)=>{let g=t?ai:ii;c[String(d)]=a(g[m],.012),n[`--v-neutral-${d}`]=c[String(d)]}),r.neutral=c,t)n["--v-surface"]=a(.248,.021),n["--v-surface-2"]=a(.196,.021),n["--v-surface-3"]=a(.305,.024),n["--v-surface-inset"]=a(.17,.02),n["--v-text"]=a(.965,.008),n["--v-text-muted"]=a(.748,.017),n["--v-text-soft"]=a(.63,.017),n["--v-border"]=a(.355,.023),n["--v-border-strong"]=a(.46,.026),n["--v-overlay"]="rgba(0, 0, 0, 0.62)",n["--v-shadow-sm"]="0 1px 2px rgba(0, 0, 0, 0.5)",n["--v-shadow"]="0 10px 30px rgba(0, 0, 0, 0.5)",n["--v-shadow-lg"]="0 24px 60px rgba(0, 0, 0, 0.62)";else{let d=yt({l:.24,c:.028,h:i});n["--v-surface"]=a(1,0),n["--v-surface-2"]=a(.981,.006),n["--v-surface-3"]=a(.955,.009),n["--v-surface-inset"]=a(.968,.008),n["--v-text"]=ze(d),n["--v-text-muted"]=a(.53,.023),n["--v-text-soft"]=a(.655,.018),n["--v-border"]=a(.906,.012),n["--v-border-strong"]=a(.828,.016),n["--v-overlay"]=gt(d,.45),n["--v-shadow-sm"]=`0 1px 2px ${gt(d,.08)}`,n["--v-shadow"]=`0 10px 30px ${gt(d,.14)}`,n["--v-shadow-lg"]=`0 24px 60px ${gt(d,.2)}`}return n["--v-focus-ring"]=n["--v-primary-ring"],o.surface=Bt((p=me(n["--v-surface"]))!=null?p:si),{vars:n,scales:r,contrast:o}}function Fr(e,t){let n=Object.entries(t).map(([r,o])=>` ${r}: ${o};`).join(`
|
|
139
139
|
`);return`${e} {
|
|
140
140
|
${n}
|
|
141
141
|
}`}var qt=null,Ut=null;function Dc(e){var r,o,s,i,a,c,u,l,f;let t=(r=Pn[e.preset])!=null?r:Pn.violeta,n={primary:(o=e.primary)!=null?o:t.primary,accent:(s=e.accent)!=null?s:t.accent,success:(i=e.success)!=null?i:t.success,warning:(a=e.warning)!=null?a:t.warning,danger:(c=e.danger)!=null?c:t.danger,info:(u=e.info)!=null?u:t.info,neutral:(l=e.neutral)!=null?l:t.neutral};for(let p of ui)me(n[p])||(console.warn(`[Voodoo] invalid color in palette.${p}: "${n[p]}". Using preset.`),n[p]=t[p]);return{colors:n,radius:(f=e.radius)!=null?f:"12px",font:ti(e.font,Nc),mono:ti(e.monoFont,Oc)}}function Ic(e){if(typeof document=="undefined"||!w.injectStyles)return;Ue();let t=document.getElementById(ei);t||(t=document.createElement("style"),t.id=ei,t.setAttribute("data-voodoo","palette"),document.head.appendChild(t)),t.textContent=e}function An(e={}){let{colors:t,radius:n,font:r,mono:o}=Dc(e),s=ni(t,!1),i=ni(t,!0),a={...Hc(n),"--v-font-sans":r,"--v-font-mono":o},c=["/* Palette generated by V.palette(). Do not edit manually. */",Fr(":root",{...a,...s.vars}),`@media (prefers-color-scheme: dark) {
|
package/dist/voodoo.full.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Voodoo.js v0.11.
|
|
2
|
+
* Voodoo.js v0.11.2
|
|
3
3
|
* JavaScript feels like magic.
|
|
4
4
|
* (c) 2026 Voodoo.js contributors. MIT License.
|
|
5
5
|
*/
|
|
@@ -1649,9 +1649,17 @@ ${pointer}`);
|
|
|
1649
1649
|
if (t2.type === "punct") {
|
|
1650
1650
|
if (t2.value === "(") {
|
|
1651
1651
|
this.next();
|
|
1652
|
-
const
|
|
1652
|
+
const body = [this.parseExpression()];
|
|
1653
|
+
while (this.isPunct(",")) {
|
|
1654
|
+
this.next();
|
|
1655
|
+
if (this.isPunct(")")) {
|
|
1656
|
+
const stray = this.peek();
|
|
1657
|
+
throw new VoodooSyntaxError("Trailing comma in a group", this.source, stray.start);
|
|
1658
|
+
}
|
|
1659
|
+
body.push(this.parseExpression());
|
|
1660
|
+
}
|
|
1653
1661
|
this.expect(")");
|
|
1654
|
-
return
|
|
1662
|
+
return body.length === 1 ? body[0] : { t: "seq", body };
|
|
1655
1663
|
}
|
|
1656
1664
|
if (t2.value === "[") return this.parseArrayLiteral();
|
|
1657
1665
|
if (t2.value === "{") return this.parseObjectLiteral();
|
|
@@ -6883,7 +6891,7 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
6883
6891
|
Object.defineProperties(rootScope.data, Object.getOwnPropertyDescriptors(values));
|
|
6884
6892
|
return rootScope.data;
|
|
6885
6893
|
}
|
|
6886
|
-
var version2 = "0.11.
|
|
6894
|
+
var version2 = "0.11.2";
|
|
6887
6895
|
var core = {
|
|
6888
6896
|
// Utilities first: Voodoo's own names can override.
|
|
6889
6897
|
...utils_exports,
|