@unocss/inspector 0.48.2 → 0.48.4
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/dist/client/assets/_id_-7136d08d.js +1 -0
- package/dist/client/assets/{index-2559afe9.js → index-37a7aac6.js} +1 -1
- package/dist/client/assets/{repl-b3fb6a34.js → repl-58bdd3f9.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/_id_-0ddf21f5.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as O,t as R,x as I,d as B,y as W,z as D,r as C,u as U,A as j,B as Z,C as q,i,c as w,e as v,w as A,g as d,D as M,_ as G,o as E,k as S,E as V,F as N,n as P,h as H,v as K,M as J,G as L,m as Q,l as X,q as Y,H as tt}from"./index-37a7aac6.js";const F=/^(?!.*\[(?:[^:]+):(?:.+)\]$)((?:.+:)?!?)?(.*)$/,et=(t={})=>{const n=t.prefix??"un-",a=t.prefixedOnly??!1,m=t.trueToNonValued??!1;return{name:"attributify",match(h){const x=O(h);if(!x)return;let e=x[1];if(e.startsWith(n))e=e.slice(n.length);else if(a)return;const l=x[2],[,c="",r=l]=l.match(F)||[];return r==="~"||m&&r==="true"||!r?`${c}${e}`:`${c}${e}-${r}`}}},rt=/(<\w[\w:\.$-]*\s)((?:'[^>]*?'|"[^>]*?"|`[^>]*?`|\{[^>]*?\}|[^>]*?)*)/g,lt=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-]+)(?:=("[^"]*|'[^']*))?/g,z=/[\s'"`;>]+/,st={name:"attributify",extract:({content:t,cursor:n})=>{const a=t.matchAll(rt);let m,h=0;for(const s of a){const[,p,y]=s,b=s.index+p.length;if(n>b&&n<=b+y.length){h=b,m=y;break}}if(!m)return null;const x=m.matchAll(lt);let e=0,l,c;for(const s of x){const[p,y,b]=s,$=h+s.index;if(n>$&&n<=$+p.length){e=$,l=y,c=b==null?void 0:b.slice(1);break}}if(!l||l==="class"||l==="className"||l===":class")return null;if(c===void 0)return{extracted:l,resolveReplacement(s){return{start:e,end:e+l.length,replacement:s}}};const r=e+l.length+2;let u=z.exec(c),o=0,_;for(;u;){const[s]=u;if(n>r+o&&n<=r+o+u.index){_=c.slice(o,o+u.index);break}o+=u.index+s.length,u=z.exec(c.slice(o))}_===void 0&&(_=c.slice(o));const[,f="",g]=_.match(F)||[];return{extracted:`${f}${l}-${g}`,transformSuggestions(s){return s.filter(p=>p.startsWith(`${f}${l}-`)).map(p=>f+p.slice(f.length+l.length+1))},resolveReplacement(s){return{start:o+r,end:o+r+_.length,replacement:f+s.slice(f.length+l.length+1)}}}}},nt=["v-bind:",":"],k=/[\s'"`;]+/g,at=/<\w(?=.*>)[\w:\.$-]*\s((?:['"`\{].*?['"`\}]|.*?)*?)>/gs,ct=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.]+)=?(?:["]([^"]*)["]|[']([^']*)[']|[{]([^}]*)[}])?/gms,T=["placeholder"],ot=t=>{const n=(t==null?void 0:t.ignoreAttributes)??T,a=(t==null?void 0:t.nonValuedAttribute)??!0,m=(t==null?void 0:t.trueToNonValued)??!1;return{name:"attributify",extract({code:h}){const x=Array.from(h.matchAll(at)).flatMap(e=>Array.from((e[1]||"").matchAll(ct))).flatMap(([,e,...l])=>{const c=l.filter(Boolean).join("");if(n.includes(e))return[];for(const r of nt)if(e.startsWith(r)){e=e.slice(r.length);break}if(!c){if(R(e)&&a!==!1){const r=[`[${e}=""]`];return m&&r.push(`[${e}="true"]`),r}return[]}if(["class","className"].includes(e))return c.split(k).filter(R);{if((t==null?void 0:t.prefixedOnly)&&t.prefix&&!e.startsWith(t.prefix))return[];const r=Array.from(c.matchAll(/(?:[\?:].*?)(["'])([^\1]*?)\1/gms)).map(([,,u])=>u.split(k)).flat();return(r.length?r:c.split(k)).filter(u=>Boolean(u)&&u!==":").map(u=>`[${e}~="${u}"]`)}});return new Set(x)}}},it=(t={})=>{t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??T;const n=[et(t)],a=[ot(t)],m=[st];return t.strict||a.unshift(I),{name:"@unocss/preset-attributify",variants:n,extractors:a,options:t,autocomplete:{extractors:m}}},ut={key:0,"h-full":"","of-hidden":""},dt=d("div",{op50:""}," Module ",-1),ft=d("div",{"i-carbon-launch":""},null,-1),mt=d("div",{op50:""}," Matched Rules ",-1),ht=d("div",{op50:""}," CSS Size ",-1),_t=d("span",{op50:""},"gzipped",-1),pt={key:0,"row-span-3":""},xt=d("div",{op50:""}," Potentially Unmatched ",-1),yt={"h-full":"","of-hidden":""},gt=B({__name:"ModuleInfo",props:{id:null},setup(t){const n=t,{data:a}=W(D(n,"id")),m=n.id.split(/\./g).pop(),h=C(null),x=U(h,"module-scrolls");function e(){fetch(`/__open-in-editor?file=${encodeURIComponent(n.id)}`)}const{extractors:l}=it({strict:!0}),c=j(async()=>{var _;const o=new Set;if(l){const f={code:((_=a.value)==null?void 0:_.code)||""};for(const g of l){const s=await g.extract(f);s==null||s.forEach(p=>o.add(p))}}return Array.from(o).filter(f=>!f.startsWith("[")).filter(f=>{var g;return!((g=a.value)!=null&&g.matched.includes(f))})}),r=C(!1),u=Z(q(()=>{var o;return(o=a.value)==null?void 0:o.css}),r);return(o,_)=>{const f=L,g=G,s=Q,p=X;return i(a)?(E(),w("div",ut,[v(g,{ref_key:"status",ref:h,grid:"~ cols-3 gap-4"},{default:A(()=>{var y;return[d("div",null,[dt,d("a",{"cursor-pointer":"",op80:"","hover:op100":"",onClick:e},[v(f,{id:i(a).id,"mr-1":""},null,8,["id"]),ft])]),d("div",null,[mt,S(" "+V(i(a).matched.length),1)]),d("div",null,[ht,S(" "+V(((((y=i(a))==null?void 0:y.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),_t]),i(c).length?(E(),w("div",pt,[xt,d("code",null,V(i(c).join(", ")),1)])):M("",!0)]}),_:1},512),d("div",yt,[v(i(J),null,{default:A(()=>[v(i(N),{size:"50"},{default:A(()=>[v(s,{"h-full":"","model-value":i(a).code,"read-only":!0,mode:i(m),matched:i(a).matched,class:"scrolls module-scrolls",style:P(i(x))},null,8,["model-value","mode","matched","style"])]),_:1}),v(i(N),{size:"50"},{default:A(()=>[d("div",null,[v(p,{border:"l b gray-400/20",title:"Output CSS"},{default:A(()=>[d("label",null,[H(d("input",{"onUpdate:modelValue":_[0]||(_[0]=y=>r.value=y),type:"checkbox"},null,512),[[K,r.value]]),S(" Prettify ")])]),_:1}),v(s,{"h-full":"",b:"l main","model-value":i(u),"read-only":!0,mode:"css",class:"scrolls module-scrolls",style:P(i(x))},null,8,["model-value","style"])])]),_:1})]),_:1})])])):M("",!0)}}}),bt=B({__name:"[id]",setup(t){const n=tt();return(a,m)=>{const h=gt;return E(),Y(h,{id:i(n).params.id},null,8,["id"])}}});export{bt as default};
|
|
@@ -277,4 +277,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
277
277
|
`),cooked:l===null?null:l.slice(1,y)},m.tail=d,this.next();let C=this.finishNode(m,"TemplateElement");return this.resetEndLocation(C,on(this.state.lastTokEndLoc,y)),C}parseTemplate(s){let t=this.startNode();t.expressions=[];let r=this.parseTemplateElement(s);for(t.quasis=[r];!r.tail;)t.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),t.quasis.push(r=this.parseTemplateElement(s));return this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(s,t,r,a){r&&this.expectPlugin("recordAndTuple");let l=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let f=Object.create(null),m=!0,d=this.startNode();for(d.properties=[],this.next();!this.match(s);){if(m)m=!1;else if(this.expect(12),this.match(s)){this.addTrailingCommaExtraToNode(d);break}let v;t?v=this.parseBindingProperty():(v=this.parsePropertyDefinition(a),this.checkProto(v,r,f,a)),r&&!this.isObjectProperty(v)&&v.type!=="SpreadElement"&&this.raise(st.InvalidRecordProperty,{at:v}),v.shorthand&&this.addExtra(v,"shorthand",!0),d.properties.push(v)}this.next(),this.state.inFSharpPipelineDirectBody=l;let y="ObjectExpression";return t?y="ObjectPattern":r&&(y="RecordExpression"),this.finishNode(d,y)}addTrailingCommaExtraToNode(s){this.addExtra(s,"trailingComma",this.state.lastTokStart),this.addExtra(s,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(s){return!s.computed&&s.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(s){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(st.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)t.push(this.parseDecorator());let r=this.startNode(),a=!1,l=!1,f;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(r.decorators=t,t=[]),r.method=!1,s&&(f=this.state.startLoc);let m=this.eat(55);this.parsePropertyNamePrefixOperator(r);let d=this.state.containsEsc,y=this.parsePropertyName(r,s);if(!m&&!d&&this.maybeAsyncOrAccessorProp(r)){let v=y.name;v==="async"&&!this.hasPrecedingLineBreak()&&(a=!0,this.resetPreviousNodeTrailingComments(y),m=this.eat(55),this.parsePropertyName(r)),(v==="get"||v==="set")&&(l=!0,this.resetPreviousNodeTrailingComments(y),r.kind=v,this.match(55)&&(m=!0,this.raise(st.AccessorIsGenerator,{at:this.state.curPosition(),kind:v}),this.next()),this.parsePropertyName(r))}return this.parseObjPropValue(r,f,m,a,!1,l,s)}getGetterSetterExpectedParamCount(s){return s.kind==="get"?0:1}getObjectOrClassMethodParams(s){return s.params}checkGetterSetterParams(s){var t;let r=this.getGetterSetterExpectedParamCount(s),a=this.getObjectOrClassMethodParams(s);a.length!==r&&this.raise(s.kind==="get"?st.BadGetterArity:st.BadSetterArity,{at:s}),s.kind==="set"&&((t=a[a.length-1])==null?void 0:t.type)==="RestElement"&&this.raise(st.BadSetterRestParameter,{at:s})}parseObjectMethod(s,t,r,a,l){if(l){let f=this.parseMethod(s,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(f),f}if(r||t||this.match(10))return a&&this.unexpected(),s.kind="method",s.method=!0,this.parseMethod(s,t,r,!1,!1,"ObjectMethod")}parseObjectProperty(s,t,r,a){if(s.shorthand=!1,this.eat(14))return s.value=r?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(a),this.finishNode(s,"ObjectProperty");if(!s.computed&&s.key.type==="Identifier"){if(this.checkReservedWord(s.key.name,s.key.loc.start,!0,!1),r)s.value=this.parseMaybeDefault(t,xe(s.key));else if(this.match(29)){let l=this.state.startLoc;a!=null?a.shorthandAssignLoc===null&&(a.shorthandAssignLoc=l):this.raise(st.InvalidCoverInitializedName,{at:l}),s.value=this.parseMaybeDefault(t,xe(s.key))}else s.value=xe(s.key);return s.shorthand=!0,this.finishNode(s,"ObjectProperty")}}parseObjPropValue(s,t,r,a,l,f,m){let d=this.parseObjectMethod(s,r,a,l,f)||this.parseObjectProperty(s,t,l,m);return d||this.unexpected(),d}parsePropertyName(s,t){if(this.eat(0))s.computed=!0,s.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:r,value:a}=this.state,l;if(en(r))l=this.parseIdentifier(!0);else switch(r){case 132:l=this.parseNumericLiteral(a);break;case 131:l=this.parseStringLiteral(a);break;case 133:l=this.parseBigIntLiteral(a);break;case 134:l=this.parseDecimalLiteral(a);break;case 136:{let f=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=f):this.raise(st.UnexpectedPrivateField,{at:f}),l=this.parsePrivateName();break}default:throw this.unexpected()}s.key=l,r!==136&&(s.computed=!1)}return s.key}initFunction(s,t){s.id=null,s.generator=!1,s.async=!!t}parseMethod(s,t,r,a,l,f){let m=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1;this.initFunction(s,r),s.generator=!!t;let d=a;this.scope.enter(vo|lo|(m?Ea:0)|(l?pa:0)),this.prodParam.enter(Lo(r,s.generator)),this.parseFunctionParams(s,d);let y=this.parseFunctionBodyAndFinish(s,f,!0);return this.prodParam.exit(),this.scope.exit(),y}parseArrayLike(s,t,r,a){r&&this.expectPlugin("recordAndTuple");let l=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let f=this.startNode();return this.next(),f.elements=this.parseExprList(s,!r,a,f),this.state.inFSharpPipelineDirectBody=l,this.finishNode(f,r?"TupleExpression":"ArrayExpression")}parseArrowExpression(s,t,r,a){this.scope.enter(vo|Lu);let l=Lo(r,!1);!this.match(5)&&this.prodParam.hasIn&&(l|=Oo),this.prodParam.enter(l),this.initFunction(s,r);let f=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(s,t,a)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(s,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=f,this.finishNode(s,"ArrowFunctionExpression")}setArrowFunctionParameters(s,t,r){this.toAssignableList(t,r,!1),s.params=t}parseFunctionBodyAndFinish(s,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.parseFunctionBody(s,!1,r),this.finishNode(s,t)}parseFunctionBody(s,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=t&&!this.match(5);if(this.expressionScope.enter(bu()),a)s.body=this.parseMaybeAssign(),this.checkParams(s,!1,t,!1);else{let l=this.state.strict,f=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|Nl),s.body=this.parseBlock(!0,!1,m=>{let d=!this.isSimpleParamList(s.params);m&&d&&this.raise(st.IllegalLanguageModeDirective,{at:(s.kind==="method"||s.kind==="constructor")&&!!s.key?s.key.loc.end:s});let y=!l&&this.state.strict;this.checkParams(s,!this.state.strict&&!t&&!r&&!d,t,y),this.state.strict&&s.id&&this.checkIdentifier(s.id,_o,y)}),this.prodParam.exit(),this.state.labels=f}this.expressionScope.exit()}isSimpleParameter(s){return s.type==="Identifier"}isSimpleParamList(s){for(let t=0,r=s.length;t<r;t++)if(!this.isSimpleParameter(s[t]))return!1;return!0}checkParams(s,t,r){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,l=!t&&new Set,f={type:"FormalParameters"};for(let m of s.params)this.checkLVal(m,{in:f,binding:tl,checkClashes:l,strictModeChanged:a})}parseExprList(s,t,r,a){let l=[],f=!0;for(;!this.eat(s);){if(f)f=!1;else if(this.expect(12),this.match(s)){a&&this.addTrailingCommaExtraToNode(a),this.next();break}l.push(this.parseExprListItem(t,r))}return l}parseExprListItem(s,t,r){let a;if(this.match(12))s||this.raise(st.UnexpectedToken,{at:this.state.curPosition(),unexpected:","}),a=null;else if(this.match(21)){let l=this.state.startLoc;a=this.parseParenItem(this.parseSpread(t),l)}else if(this.match(17)){this.expectPlugin("partialApplication"),r||this.raise(st.UnexpectedArgumentPlaceholder,{at:this.state.startLoc});let l=this.startNode();this.next(),a=this.finishNode(l,"ArgumentPlaceholder")}else a=this.parseMaybeAssignAllowIn(t,this.parseParenItem);return a}parseIdentifier(s){let t=this.startNode(),r=this.parseIdentifierName(s);return this.createIdentifier(t,r)}createIdentifier(s,t){return s.name=t,s.loc.identifierName=t,this.finishNode(s,"Identifier")}parseIdentifierName(s){let t,{startLoc:r,type:a}=this.state;if(en(a))t=this.state.value;else throw this.unexpected();let l=Cs(a);return s?l&&this.replaceToken(130):this.checkReservedWord(t,r,l,!1),this.next(),t}checkReservedWord(s,t,r,a){if(!(s.length>10||!uo(s))){if(s==="yield"){if(this.prodParam.hasYield){this.raise(st.YieldBindingIdentifier,{at:t});return}}else if(s==="await"){if(this.prodParam.hasAwait){this.raise(st.AwaitBindingIdentifier,{at:t});return}if(this.scope.inStaticBlock){this.raise(st.AwaitBindingIdentifierInStaticBlock,{at:t});return}this.expressionScope.recordAsyncArrowParametersError({at:t})}else if(s==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(st.ArgumentsInClass,{at:t});return}if(r&&_a(s)){this.raise(st.UnexpectedKeyword,{at:t,keyword:s});return}(this.state.strict?a?Ba:Po:ru)(s,this.inModule)&&this.raise(st.UnexpectedReservedWord,{at:t,reservedWord:s})}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(s){let t=this.startNodeAt(s);return this.expressionScope.recordParameterInitializerError(st.AwaitExpressionFormalParameter,{at:t}),this.eat(55)&&this.raise(st.ObsoleteAwaitStar,{at:t}),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:s}=this.state;return s===53||s===10||s===0||la(s)||s===135||s===56||this.hasPlugin("v8intrinsic")&&s===54}parseYield(){let s=this.startNode();this.expressionScope.recordParameterInitializerError(st.YieldInParameter,{at:s}),this.next();let t=!1,r=null;if(!this.hasPrecedingLineBreak())switch(t=this.eat(55),this.state.type){case 13:case 137:case 8:case 11:case 3:case 9:case 14:case 12:if(!t)break;default:r=this.parseMaybeAssign()}return s.delegate=t,s.argument=r,this.finishNode(s,"YieldExpression")}checkPipelineAtInfixOperator(s,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&s.type==="SequenceExpression"&&this.raise(st.PipelineHeadSequenceExpression,{at:t})}parseSmartPipelineBodyInStyle(s,t){if(this.isSimpleReference(s)){let r=this.startNodeAt(t);return r.callee=s,this.finishNode(r,"PipelineBareFunction")}else{let r=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),r.expression=s,this.finishNode(r,"PipelineTopicExpression")}}isSimpleReference(s){switch(s.type){case"MemberExpression":return!s.computed&&this.isSimpleReference(s.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(s){if(this.match(19))throw this.raise(st.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(st.PipelineTopicUnused,{at:s})}withTopicBindingContext(s){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return s()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(s){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return s()}finally{this.state.topicContext=t}}else return s()}withSoloAwaitPermittingContext(s){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return s()}finally{this.state.soloAwait=t}}allowInAnd(s){let t=this.prodParam.currentFlags();if(Oo&~t){this.prodParam.enter(t|Oo);try{return s()}finally{this.prodParam.exit()}}return s()}disallowInAnd(s){let t=this.prodParam.currentFlags();if(Oo&t){this.prodParam.enter(t&~Oo);try{return s()}finally{this.prodParam.exit()}}return s()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(s){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let a=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,s);return this.state.inFSharpPipelineDirectBody=r,a}parseModuleExpression(){this.expectPlugin("moduleBlocks");let s=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let r=this.initializeScopes(!0);this.enterInitialScopes();try{s.body=this.parseProgram(t,8,"module")}finally{r()}return this.finishNode(s,"ModuleExpression")}parsePropertyNamePrefixOperator(s){}},zs={kind:"loop"},Qs={kind:"switch"},fo=0,gs=1,Us=2,Aa=4,ua=/[\uD800-\uDFFF]/u,Hs=/in(?:stanceof)?/y;function ya(s,t){for(let r=0;r<s.length;r++){let a=s[r],{type:l}=a;if(typeof l=="number"){{if(l===136){let{loc:f,start:m,value:d,end:y}=a,v=m+1,C=on(f.start,1);s.splice(r,1,new ha({type:Rs(27),value:"#",start:m,end:v,startLoc:f.start,endLoc:C}),new ha({type:Rs(130),value:d,start:v,end:y,startLoc:C,endLoc:f.end})),r++;continue}if(la(l)){let{loc:f,start:m,value:d,end:y}=a,v=m+1,C=on(f.start,1),A;t.charCodeAt(m)===96?A=new ha({type:Rs(22),value:"`",start:m,end:v,startLoc:f.start,endLoc:C}):A=new ha({type:Rs(8),value:"}",start:m,end:v,startLoc:f.start,endLoc:C});let B,N,L,P;l===24?(N=y-1,L=on(f.end,-1),B=d===null?null:d.slice(1,-1),P=new ha({type:Rs(22),value:"`",start:N,end:y,startLoc:L,endLoc:f.end})):(N=y-2,L=on(f.end,-2),B=d===null?null:d.slice(1,-2),P=new ha({type:Rs(23),value:"${",start:N,end:y,startLoc:L,endLoc:f.end})),s.splice(r,1,A,new ha({type:Rs(20),value:B,start:v,end:N,startLoc:C,endLoc:L}),P),r+=2;continue}}a.type=Rs(l)}}return s}var _l=class extends Ys{parseTopLevel(s,t){return s.program=this.parseProgram(t),s.comments=this.state.comments,this.options.tokens&&(s.tokens=ya(this.tokens,this.input)),this.finishNode(s,"File")}parseProgram(s){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:137,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.options.sourceType;if(s.sourceType=r,s.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(s,!0,!0,t),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[l,f]of Array.from(this.scope.undefinedExports))this.raise(st.ModuleExportUndefined,{at:f,localName:l});let a;return t===137?a=this.finishNode(s,"Program"):a=this.finishNodeAt(s,"Program",on(this.state.startLoc,-1)),a}stmtToDirective(s){let t=s;t.type="Directive",t.value=t.expression,delete t.expression;let r=t.value,a=r.value,l=this.input.slice(r.start,r.end),f=r.value=l.slice(1,-1);return this.addExtra(r,"raw",l),this.addExtra(r,"rawValue",f),this.addExtra(r,"expressionValue",a),r.type="DirectiveLiteral",t}parseInterpreterDirective(){if(!this.match(28))return null;let s=this.startNode();return s.value=this.state.value,this.next(),this.finishNode(s,"InterpreterDirective")}isLet(s){return this.isContextual(99)?this.hasFollowingIdentifier(s):!1}hasFollowingIdentifier(s){let t=this.nextTokenStart(),r=this.codePointAtPos(t);if(r===92||r===91)return!0;if(s)return!1;if(r===123)return!0;if(ps(r)){if(Hs.lastIndex=t,Hs.test(this.input)){let a=this.codePointAtPos(Hs.lastIndex);if(!bs(a)&&a!==92)return!1}return!0}return!1}startsUsingForOf(){let s=this.lookahead();return s.type===101&&!s.containsEsc?!1:(this.expectPlugin("explicitResourceManagement"),!0)}parseStatement(s,t){let r=null;return this.match(26)&&(r=this.parseDecorators(!0)),this.parseStatementContent(s,t,r)}parseStatementContent(s,t,r){let a=this.state.type,l=this.startNode();switch(a){case 60:return this.parseBreakContinueStatement(l,!0);case 63:return this.parseBreakContinueStatement(l,!1);case 64:return this.parseDebuggerStatement(l);case 90:return this.parseDoStatement(l);case 91:return this.parseForStatement(l);case 68:if(this.lookaheadCharCode()===46)break;return s&&(this.state.strict?this.raise(st.StrictFunction,{at:this.state.startLoc}):s!=="if"&&s!=="label"&&this.raise(st.SloppyFunction,{at:this.state.startLoc})),this.parseFunctionStatement(l,!1,!s);case 80:return s&&this.unexpected(),this.parseClass(this.maybeTakeDecorators(r,l),!0);case 69:return this.parseIfStatement(l);case 70:return this.parseReturnStatement(l);case 71:return this.parseSwitchStatement(l);case 72:return this.parseThrowStatement(l);case 73:return this.parseTryStatement(l);case 105:if(this.hasFollowingLineBreak())break;case 99:if(this.state.containsEsc||!this.hasFollowingIdentifier(s))break;case 75:case 74:{let d=this.state.value;return d==="using"&&(this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel&&this.raise(st.UnexpectedUsingDeclaration,{at:this.state.startLoc})),s&&d!=="var"&&this.raise(st.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(l,d)}case 92:return this.parseWhileStatement(l);case 76:return this.parseWithStatement(l);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(l);case 83:{let d=this.lookaheadCharCode();if(d===40||d===46)break}case 82:{!this.options.allowImportExportEverywhere&&!t&&this.raise(st.UnexpectedImportExport,{at:this.state.startLoc}),this.next();let d;return a===83?(d=this.parseImport(l),d.type==="ImportDeclaration"&&(!d.importKind||d.importKind==="value")&&(this.sawUnambiguousESM=!0)):(d=this.parseExport(l,r),(d.type==="ExportNamedDeclaration"&&(!d.exportKind||d.exportKind==="value")||d.type==="ExportAllDeclaration"&&(!d.exportKind||d.exportKind==="value")||d.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(d),d}default:if(this.isAsyncFunction())return s&&this.raise(st.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(l,!0,!s)}let f=this.state.value,m=this.parseExpression();return Ln(a)&&m.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(l,f,m,s):this.parseExpressionStatement(l,m,r)}assertModuleNodeAllowed(s){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(st.ImportOutsideModule,{at:s})}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&!!this.getPluginOption("decorators","decoratorsBeforeExport")}maybeTakeDecorators(s,t,r){return s&&(t.decorators=s,this.resetStartLocationFromNode(t,s[0]),r&&this.resetStartLocationFromNode(r,t)),t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(s){let t=[];do t.push(this.parseDecorator());while(this.match(26));if(this.match(82))s||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(st.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(st.UnexpectedLeadingDecorator,{at:this.state.startLoc});return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let s=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t=this.state.startLoc,r;if(this.match(10)){let a=this.state.startLoc;this.next(),r=this.parseExpression(),this.expect(11),r=this.wrapParenthesis(a,r);let l=this.state.startLoc;s.expression=this.parseMaybeDecoratorArguments(r),this.getPluginOption("decorators","allowCallParenthesized")===!1&&s.expression!==r&&this.raise(st.DecoratorArgumentsOutsideParentheses,{at:l})}else{for(r=this.parseIdentifier(!1);this.eat(16);){let a=this.startNodeAt(t);a.object=r,this.match(136)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),a.computed=!1,r=this.finishNode(a,"MemberExpression")}s.expression=this.parseMaybeDecoratorArguments(r)}}else s.expression=this.parseExprSubscripts();return this.finishNode(s,"Decorator")}parseMaybeDecoratorArguments(s){if(this.eat(10)){let t=this.startNodeAtNode(s);return t.callee=s,t.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(t.arguments),this.finishNode(t,"CallExpression")}return s}parseBreakContinueStatement(s,t){return this.next(),this.isLineTerminator()?s.label=null:(s.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(s,t),this.finishNode(s,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(s,t){let r;for(r=0;r<this.state.labels.length;++r){let a=this.state.labels[r];if((s.label==null||a.name===s.label.name)&&(a.kind!=null&&(t||a.kind==="loop")||s.label&&t))break}if(r===this.state.labels.length){let a=t?"BreakStatement":"ContinueStatement";this.raise(st.IllegalBreakContinue,{at:s,type:a})}}parseDebuggerStatement(s){return this.next(),this.semicolon(),this.finishNode(s,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let s=this.parseExpression();return this.expect(11),s}parseDoStatement(s){return this.next(),this.state.labels.push(zs),s.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement("do")),this.state.labels.pop(),this.expect(92),s.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(s,"DoWhileStatement")}parseForStatement(s){this.next(),this.state.labels.push(zs);let t=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(t=this.state.lastTokStartLoc),this.scope.enter(qo),this.expect(10),this.match(13))return t!==null&&this.unexpected(t),this.parseFor(s,null);let r=this.isContextual(99),a=this.isContextual(105)&&!this.hasFollowingLineBreak(),l=r&&this.hasFollowingIdentifier()||a&&this.hasFollowingIdentifier()&&this.startsUsingForOf();if(this.match(74)||this.match(75)||l){let v=this.startNode(),C=this.state.value;this.next(),this.parseVar(v,!0,C);let A=this.finishNode(v,"VariableDeclaration"),B=this.match(58);return B&&a&&this.raise(st.ForInUsing,{at:A}),(B||this.isContextual(101))&&A.declarations.length===1?this.parseForIn(s,A,t):(t!==null&&this.unexpected(t),this.parseFor(s,A))}let f=this.isContextual(95),m=new te,d=this.parseExpression(!0,m),y=this.isContextual(101);if(y&&(r&&this.raise(st.ForOfLet,{at:d}),t===null&&f&&d.type==="Identifier"&&this.raise(st.ForOfAsync,{at:d})),y||this.match(58)){this.checkDestructuringPrivate(m),this.toAssignable(d,!0);let v=y?"ForOfStatement":"ForInStatement";return this.checkLVal(d,{in:{type:v}}),this.parseForIn(s,d,t)}else this.checkExpressionErrors(m,!0);return t!==null&&this.unexpected(t),this.parseFor(s,d)}parseFunctionStatement(s,t,r){return this.next(),this.parseFunction(s,gs|(r?0:Us),t)}parseIfStatement(s){return this.next(),s.test=this.parseHeaderExpression(),s.consequent=this.parseStatement("if"),s.alternate=this.eat(66)?this.parseStatement("if"):null,this.finishNode(s,"IfStatement")}parseReturnStatement(s){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(st.IllegalReturn,{at:this.state.startLoc}),this.next(),this.isLineTerminator()?s.argument=null:(s.argument=this.parseExpression(),this.semicolon()),this.finishNode(s,"ReturnStatement")}parseSwitchStatement(s){this.next(),s.discriminant=this.parseHeaderExpression();let t=s.cases=[];this.expect(5),this.state.labels.push(Qs),this.scope.enter(qo);let r;for(let a;!this.match(8);)if(this.match(61)||this.match(65)){let l=this.match(61);r&&this.finishNode(r,"SwitchCase"),t.push(r=this.startNode()),r.consequent=[],this.next(),l?r.test=this.parseExpression():(a&&this.raise(st.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc}),a=!0,r.test=null),this.expect(14)}else r?r.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(s,"SwitchStatement")}parseThrowStatement(s){return this.next(),this.hasPrecedingLineBreak()&&this.raise(st.NewlineAfterThrow,{at:this.state.lastTokEndLoc}),s.argument=this.parseExpression(),this.semicolon(),this.finishNode(s,"ThrowStatement")}parseCatchClauseParam(){let s=this.parseBindingAtom(),t=s.type==="Identifier";return this.scope.enter(t?No:0),this.checkLVal(s,{in:{type:"CatchClause"},binding:Ya,allowingSloppyLetBinding:!0}),s}parseTryStatement(s){if(this.next(),s.block=this.parseBlock(),s.handler=null,this.match(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(qo)),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),s.handler=this.finishNode(t,"CatchClause")}return s.finalizer=this.eat(67)?this.parseBlock():null,!s.handler&&!s.finalizer&&this.raise(st.NoCatchOrFinally,{at:s}),this.finishNode(s,"TryStatement")}parseVarStatement(s,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.next(),this.parseVar(s,!1,t,r),this.semicolon(),this.finishNode(s,"VariableDeclaration")}parseWhileStatement(s){return this.next(),s.test=this.parseHeaderExpression(),this.state.labels.push(zs),s.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement("while")),this.state.labels.pop(),this.finishNode(s,"WhileStatement")}parseWithStatement(s){return this.state.strict&&this.raise(st.StrictWith,{at:this.state.startLoc}),this.next(),s.object=this.parseHeaderExpression(),s.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement("with")),this.finishNode(s,"WithStatement")}parseEmptyStatement(s){return this.next(),this.finishNode(s,"EmptyStatement")}parseLabeledStatement(s,t,r,a){for(let f of this.state.labels)f.name===t&&this.raise(st.LabelRedeclaration,{at:r,labelName:t});let l=ft(this.state.type)?"loop":this.match(71)?"switch":null;for(let f=this.state.labels.length-1;f>=0;f--){let m=this.state.labels[f];if(m.statementStart===s.start)m.statementStart=this.state.start,m.kind=l;else break}return this.state.labels.push({name:t,kind:l,statementStart:this.state.start}),s.body=this.parseStatement(a?a.indexOf("label")===-1?a+"label":a:"label"),this.state.labels.pop(),s.label=r,this.finishNode(s,"LabeledStatement")}parseExpressionStatement(s,t,r){return s.expression=t,this.semicolon(),this.finishNode(s,"ExpressionStatement")}parseBlock(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=arguments.length>2?arguments[2]:void 0,a=this.startNode();return s&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(qo),this.parseBlockBody(a,s,!1,8,r),t&&this.scope.exit(),this.finishNode(a,"BlockStatement")}isValidDirective(s){return s.type==="ExpressionStatement"&&s.expression.type==="StringLiteral"&&!s.expression.extra.parenthesized}parseBlockBody(s,t,r,a,l){let f=s.body=[],m=s.directives=[];this.parseBlockOrModuleBlockBody(f,t?m:void 0,r,a,l)}parseBlockOrModuleBlockBody(s,t,r,a,l){let f=this.state.strict,m=!1,d=!1;for(;!this.match(a);){let y=this.parseStatement(null,r);if(t&&!d){if(this.isValidDirective(y)){let v=this.stmtToDirective(y);t.push(v),!m&&v.value.value==="use strict"&&(m=!0,this.setStrict(!0));continue}d=!0,this.state.strictErrors.clear()}s.push(y)}l&&l.call(this,m),f||this.setStrict(!1),this.next()}parseFor(s,t){return s.init=t,this.semicolon(!1),s.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),s.update=this.match(11)?null:this.parseExpression(),this.expect(11),s.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement("for")),this.scope.exit(),this.state.labels.pop(),this.finishNode(s,"ForStatement")}parseForIn(s,t,r){let a=this.match(58);return this.next(),a?r!==null&&this.unexpected(r):s.await=r!==null,t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!a||this.state.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(st.ForInOfLoopInitializer,{at:t,type:a?"ForInStatement":"ForOfStatement"}),t.type==="AssignmentPattern"&&this.raise(st.InvalidLhs,{at:t,ancestor:{type:"ForStatement"}}),s.left=t,s.right=a?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),s.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement("for")),this.scope.exit(),this.state.labels.pop(),this.finishNode(s,a?"ForInStatement":"ForOfStatement")}parseVar(s,t,r){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,l=s.declarations=[];for(s.kind=r;;){let f=this.startNode();if(this.parseVarId(f,r),f.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,f.init===null&&!a&&(f.id.type!=="Identifier"&&!(t&&(this.match(58)||this.isContextual(101)))?this.raise(st.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"}):r==="const"&&!(this.match(58)||this.isContextual(101))&&this.raise(st.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"})),l.push(this.finishNode(f,"VariableDeclarator")),!this.eat(12))break}return s}parseVarId(s,t){let r=this.parseBindingAtom();t==="using"&&r.type!=="Identifier"&&this.raise(st.UsingDeclarationHasBindingPattern,{at:r}),this.checkLVal(r,{in:{type:"VariableDeclarator"},binding:t==="var"?tl:Ya}),s.id=r}parseFunction(s){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fo,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=t&gs,l=t&Us,f=!!a&&!(t&Aa);this.initFunction(s,r),this.match(55)&&l&&this.raise(st.GeneratorInSingleStatementContext,{at:this.state.startLoc}),s.generator=this.eat(55),a&&(s.id=this.parseFunctionId(f));let m=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(vo),this.prodParam.enter(Lo(r,s.generator)),a||(s.id=this.parseFunctionId()),this.parseFunctionParams(s,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(s,a?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),a&&!l&&this.registerFunctionStatementId(s),this.state.maybeInArrowParameters=m,s}parseFunctionId(s){return s||Ln(this.state.type)?this.parseIdentifier():null}parseFunctionParams(s,t){this.expect(10),this.expressionScope.enter(Yo()),s.params=this.parseBindingList(11,41,!1,t),this.expressionScope.exit()}registerFunctionStatementId(s){!s.id||this.scope.declareName(s.id.name,this.state.strict||s.generator||s.async?this.scope.treatFunctionsAsVar?tl:Ya:Hl,s.id.loc.start)}parseClass(s,t,r){this.next();let a=this.state.strict;return this.state.strict=!0,this.parseClassId(s,t,r),this.parseClassSuper(s),s.body=this.parseClassBody(!!s.superClass,a),this.finishNode(s,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(s){return!s.computed&&!s.static&&(s.key.name==="constructor"||s.key.value==="constructor")}parseClassBody(s,t){this.classScope.enter();let r={hadConstructor:!1,hadSuperClass:s},a=[],l=this.startNode();if(l.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(a.length>0)throw this.raise(st.DecoratorSemicolon,{at:this.state.lastTokEndLoc});continue}if(this.match(26)){a.push(this.parseDecorator());continue}let f=this.startNode();a.length&&(f.decorators=a,this.resetStartLocationFromNode(f,a[0]),a=[]),this.parseClassMember(l,f,r),f.kind==="constructor"&&f.decorators&&f.decorators.length>0&&this.raise(st.DecoratorConstructor,{at:f})}}),this.state.strict=t,this.next(),a.length)throw this.raise(st.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(l,"ClassBody")}parseClassMemberFromModifier(s,t){let r=this.parseIdentifier(!0);if(this.isClassMethod()){let a=t;return a.kind="method",a.computed=!1,a.key=r,a.static=!1,this.pushClassMethod(s,a,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let a=t;return a.computed=!1,a.key=r,a.static=!1,s.body.push(this.parseClassProperty(a)),!0}return this.resetPreviousNodeTrailingComments(r),!1}parseClassMember(s,t,r){let a=this.isContextual(104);if(a){if(this.parseClassMemberFromModifier(s,t))return;if(this.eat(5)){this.parseClassStaticBlock(s,t);return}}this.parseClassMemberWithIsStatic(s,t,r,a)}parseClassMemberWithIsStatic(s,t,r,a){let l=t,f=t,m=t,d=t,y=t,v=l,C=l;if(t.static=a,this.parsePropertyNamePrefixOperator(t),this.eat(55)){v.kind="method";let P=this.match(136);if(this.parseClassElementName(v),P){this.pushClassPrivateMethod(s,f,!0,!1);return}this.isNonstaticConstructor(l)&&this.raise(st.ConstructorIsGenerator,{at:l.key}),this.pushClassMethod(s,l,!0,!1,!1,!1);return}let A=Ln(this.state.type)&&!this.state.containsEsc,B=this.match(136),N=this.parseClassElementName(t),L=this.state.startLoc;if(this.parsePostMemberNameModifiers(C),this.isClassMethod()){if(v.kind="method",B){this.pushClassPrivateMethod(s,f,!1,!1);return}let P=this.isNonstaticConstructor(l),_=!1;P&&(l.kind="constructor",r.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(st.DuplicateConstructor,{at:N}),P&&this.hasPlugin("typescript")&&t.override&&this.raise(st.OverrideOnConstructor,{at:N}),r.hadConstructor=!0,_=r.hadSuperClass),this.pushClassMethod(s,l,!1,!1,P,_)}else if(this.isClassProperty())B?this.pushClassPrivateProperty(s,d):this.pushClassProperty(s,m);else if(A&&N.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(N);let P=this.eat(55);C.optional&&this.unexpected(L),v.kind="method";let _=this.match(136);this.parseClassElementName(v),this.parsePostMemberNameModifiers(C),_?this.pushClassPrivateMethod(s,f,P,!0):(this.isNonstaticConstructor(l)&&this.raise(st.ConstructorIsAsync,{at:l.key}),this.pushClassMethod(s,l,P,!0,!1,!1))}else if(A&&(N.name==="get"||N.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(N),v.kind=N.name;let P=this.match(136);this.parseClassElementName(l),P?this.pushClassPrivateMethod(s,f,!1,!1):(this.isNonstaticConstructor(l)&&this.raise(st.ConstructorIsAccessor,{at:l.key}),this.pushClassMethod(s,l,!1,!1,!1,!1)),this.checkGetterSetterParams(l)}else if(A&&N.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(N);let P=this.match(136);this.parseClassElementName(m),this.pushClassAccessorProperty(s,y,P)}else this.isLineTerminator()?B?this.pushClassPrivateProperty(s,d):this.pushClassProperty(s,m):this.unexpected()}parseClassElementName(s){let{type:t,value:r}=this.state;if((t===130||t===131)&&s.static&&r==="prototype"&&this.raise(st.StaticPrototype,{at:this.state.startLoc}),t===136){r==="constructor"&&this.raise(st.ConstructorClassPrivateField,{at:this.state.startLoc});let a=this.parsePrivateName();return s.key=a,a}return this.parsePropertyName(s)}parseClassStaticBlock(s,t){var r;this.scope.enter(Ea|Ia|lo);let a=this.state.labels;this.state.labels=[],this.prodParam.enter(iu);let l=t.body=[];this.parseBlockOrModuleBlockBody(l,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=a,s.body.push(this.finishNode(t,"StaticBlock")),(r=t.decorators)!=null&&r.length&&this.raise(st.DecoratorStaticBlock,{at:t})}pushClassProperty(s,t){!t.computed&&(t.key.name==="constructor"||t.key.value==="constructor")&&this.raise(st.ConstructorClassField,{at:t.key}),s.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(s,t){let r=this.parseClassPrivateProperty(t);s.body.push(r),this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),vu,r.key.loc.start)}pushClassAccessorProperty(s,t,r){if(!r&&!t.computed){let l=t.key;(l.name==="constructor"||l.value==="constructor")&&this.raise(st.ConstructorClassField,{at:l})}let a=this.parseClassAccessorProperty(t);s.body.push(a),r&&this.classScope.declarePrivateName(this.getPrivateNameSV(a.key),vu,a.key.loc.start)}pushClassMethod(s,t,r,a,l,f){s.body.push(this.parseMethod(t,r,a,l,f,"ClassMethod",!0))}pushClassPrivateMethod(s,t,r,a){let l=this.parseMethod(t,r,a,!1,!1,"ClassPrivateMethod",!0);s.body.push(l);let f=l.kind==="get"?l.static?Co:wl:l.kind==="set"?l.static?Al:Du:vu;this.declareClassPrivateMethodInScope(l,f)}declareClassPrivateMethodInScope(s,t){this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),t,s.key.loc.start)}parsePostMemberNameModifiers(s){}parseClassPrivateProperty(s){return this.parseInitializer(s),this.semicolon(),this.finishNode(s,"ClassPrivateProperty")}parseClassProperty(s){return this.parseInitializer(s),this.semicolon(),this.finishNode(s,"ClassProperty")}parseClassAccessorProperty(s){return this.parseInitializer(s),this.semicolon(),this.finishNode(s,"ClassAccessorProperty")}parseInitializer(s){this.scope.enter(Ea|lo),this.expressionScope.enter(bu()),this.prodParam.enter(iu),s.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(s,t,r){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:gu;if(Ln(this.state.type))s.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(s.id,a);else if(r||!t)s.id=null;else throw this.raise(st.MissingClassName,{at:this.state.startLoc})}parseClassSuper(s){s.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(s,t){let r=this.maybeParseExportDefaultSpecifier(s),a=!r||this.eat(12),l=a&&this.eatExportStar(s),f=l&&this.maybeParseExportNamespaceSpecifier(s),m=a&&(!f||this.eat(12)),d=r||l;if(l&&!f){if(r&&this.unexpected(),t)throw this.raise(st.UnsupportedDecoratorExport,{at:s});return this.parseExportFrom(s,!0),this.finishNode(s,"ExportAllDeclaration")}let y=this.maybeParseExportNamedSpecifiers(s);if(r&&a&&!l&&!y||f&&m&&!y)throw this.unexpected(null,5);let v;if(d||y){if(v=!1,t)throw this.raise(st.UnsupportedDecoratorExport,{at:s});this.parseExportFrom(s,d)}else v=this.maybeParseExportDeclaration(s);if(d||y||v){var C;let A=s;if(this.checkExport(A,!0,!1,!!A.source),((C=A.declaration)==null?void 0:C.type)==="ClassDeclaration")this.maybeTakeDecorators(t,A.declaration,A);else if(t)throw this.raise(st.UnsupportedDecoratorExport,{at:s});return this.finishNode(A,"ExportNamedDeclaration")}if(this.eat(65)){let A=s,B=this.parseExportDefaultExpression();if(A.declaration=B,B.type==="ClassDeclaration")this.maybeTakeDecorators(t,B,A);else if(t)throw this.raise(st.UnsupportedDecoratorExport,{at:s});return this.checkExport(A,!0,!0),this.finishNode(A,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(s){return this.eat(55)}maybeParseExportDefaultSpecifier(s){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");let t=this.startNode();return t.exported=this.parseIdentifier(!0),s.specifiers=[this.finishNode(t,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(s){if(this.isContextual(93)){s.specifiers||(s.specifiers=[]);let t=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),s.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(s){if(this.match(5)){s.specifiers||(s.specifiers=[]);let t=s.exportKind==="type";return s.specifiers.push(...this.parseExportSpecifiers(t)),s.source=null,s.declaration=null,this.hasPlugin("importAssertions")&&(s.assertions=[]),!0}return!1}maybeParseExportDeclaration(s){return this.shouldParseExportDeclaration()?(s.specifiers=[],s.source=null,this.hasPlugin("importAssertions")&&(s.assertions=[]),s.declaration=this.parseExportDeclaration(s),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let s=this.nextTokenStart();return!oa.test(this.input.slice(this.state.pos,s))&&this.isUnparsedContextual(s,"function")}parseExportDefaultExpression(){let s=this.startNode(),t=this.isAsyncFunction();if(this.match(68)||t)return this.next(),t&&this.next(),this.parseFunction(s,gs|Aa,t);if(this.match(80))return this.parseClass(s,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(st.DecoratorBeforeExport,{at:this.state.startLoc}),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(st.UnsupportedDefaultExport,{at:this.state.startLoc});let r=this.parseMaybeAssignAllowIn();return this.semicolon(),r}parseExportDeclaration(s){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatement(null)}isExportDefaultSpecifier(){let{type:s}=this.state;if(Ln(s)){if(s===95&&!this.state.containsEsc||s===99)return!1;if((s===128||s===127)&&!this.state.containsEsc){let{type:a}=this.lookahead();if(Ln(a)&&a!==97||a===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),r=this.isUnparsedContextual(t,"from");if(this.input.charCodeAt(t)===44||Ln(this.state.type)&&r)return!0;if(this.match(65)&&r){let a=this.input.charCodeAt(this.nextTokenStartSince(t+4));return a===34||a===39}return!1}parseExportFrom(s,t){if(this.eatContextual(97)){s.source=this.parseImportSource(),this.checkExport(s);let r=this.maybeParseImportAssertions();r&&(s.assertions=r,this.checkJSONModuleImport(s))}else t&&this.unexpected();this.semicolon()}shouldParseExportDeclaration(){let{type:s}=this.state;if(s===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(this.getPluginOption("decorators","decoratorsBeforeExport"))throw this.raise(st.DecoratorBeforeExport,{at:this.state.startLoc});return!0}return s===74||s===75||s===68||s===80||this.isLet()||this.isAsyncFunction()}checkExport(s,t,r,a){if(t){if(r){if(this.checkDuplicateExports(s,"default"),this.hasPlugin("exportDefaultFrom")){var l;let f=s.declaration;f.type==="Identifier"&&f.name==="from"&&f.end-f.start===4&&!((l=f.extra)!=null&&l.parenthesized)&&this.raise(st.ExportDefaultFromAsIdentifier,{at:f})}}else if(s.specifiers&&s.specifiers.length)for(let f of s.specifiers){let{exported:m}=f,d=m.type==="Identifier"?m.name:m.value;if(this.checkDuplicateExports(f,d),!a&&f.local){let{local:y}=f;y.type!=="Identifier"?this.raise(st.ExportBindingIsString,{at:f,localName:y.value,exportName:d}):(this.checkReservedWord(y.name,y.loc.start,!0,!1),this.scope.checkLocalExport(y))}}else if(s.declaration){if(s.declaration.type==="FunctionDeclaration"||s.declaration.type==="ClassDeclaration"){let f=s.declaration.id;if(!f)throw new Error("Assertion failure");this.checkDuplicateExports(s,f.name)}else if(s.declaration.type==="VariableDeclaration")for(let f of s.declaration.declarations)this.checkDeclaration(f.id)}}}checkDeclaration(s){if(s.type==="Identifier")this.checkDuplicateExports(s,s.name);else if(s.type==="ObjectPattern")for(let t of s.properties)this.checkDeclaration(t);else if(s.type==="ArrayPattern")for(let t of s.elements)t&&this.checkDeclaration(t);else s.type==="ObjectProperty"?this.checkDeclaration(s.value):s.type==="RestElement"?this.checkDeclaration(s.argument):s.type==="AssignmentPattern"&&this.checkDeclaration(s.left)}checkDuplicateExports(s,t){this.exportedIdentifiers.has(t)&&(t==="default"?this.raise(st.DuplicateDefaultExport,{at:s}):this.raise(st.DuplicateExport,{at:s,exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(s){let t=[],r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else if(this.expect(12),this.eat(8))break;let a=this.isContextual(128),l=this.match(131),f=this.startNode();f.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(f,l,s,a))}return t}parseExportSpecifier(s,t,r,a){return this.eatContextual(93)?s.exported=this.parseModuleExportName():t?s.exported=ge(s.local):s.exported||(s.exported=xe(s.local)),this.finishNode(s,"ExportSpecifier")}parseModuleExportName(){if(this.match(131)){let s=this.parseStringLiteral(this.state.value),t=s.value.match(ua);return t&&this.raise(st.ModuleExportNameHasLoneSurrogate,{at:s,surrogateCharCode:t[0].charCodeAt(0)}),s}return this.parseIdentifier(!0)}isJSONModuleImport(s){return s.assertions!=null?s.assertions.some(t=>{let{key:r,value:a}=t;return a.value==="json"&&(r.type==="Identifier"?r.name==="type":r.value==="type")}):!1}checkImportReflection(s){if(s.module){var t;(s.specifiers.length!==1||s.specifiers[0].type!=="ImportDefaultSpecifier")&&this.raise(st.ImportReflectionNotBinding,{at:s.specifiers[0].loc.start}),((t=s.assertions)==null?void 0:t.length)>0&&this.raise(st.ImportReflectionHasAssertion,{at:s.specifiers[0].loc.start})}}checkJSONModuleImport(s){if(this.isJSONModuleImport(s)&&s.type!=="ExportAllDeclaration"){let{specifiers:t}=s;if(t!=null){let r=t.find(a=>{let l;if(a.type==="ExportSpecifier"?l=a.local:a.type==="ImportSpecifier"&&(l=a.imported),l!==void 0)return l.type==="Identifier"?l.name!=="default":l.value!=="default"});r!==void 0&&this.raise(st.ImportJSONBindingNotDefault,{at:r.loc.start})}}}parseMaybeImportReflection(s){let t=!1;if(this.isContextual(125)){let r=this.lookahead();Ln(r.type)?(r.type!==97||this.input.charCodeAt(this.nextTokenStartSince(r.end))===102)&&(t=!0):t=!0}t?(this.expectPlugin("importReflection"),this.next(),s.module=!0):this.hasPlugin("importReflection")&&(s.module=!1)}parseImport(s){if(s.specifiers=[],!this.match(131)){this.parseMaybeImportReflection(s);let r=!this.maybeParseDefaultImportSpecifier(s)||this.eat(12),a=r&&this.maybeParseStarImportSpecifier(s);r&&!a&&this.parseNamedImportSpecifiers(s),this.expectContextual(97)}s.source=this.parseImportSource();let t=this.maybeParseImportAssertions();if(t)s.assertions=t;else{let r=this.maybeParseModuleAttributes();r&&(s.attributes=r)}return this.checkImportReflection(s),this.checkJSONModuleImport(s),this.semicolon(),this.finishNode(s,"ImportDeclaration")}parseImportSource(){return this.match(131)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(s){return Ln(this.state.type)}parseImportSpecifierLocal(s,t,r){t.local=this.parseIdentifier(),s.specifiers.push(this.finishImportSpecifier(t,r))}finishImportSpecifier(s,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ya;return this.checkLVal(s.local,{in:s,binding:r}),this.finishNode(s,t)}parseAssertEntries(){let s=[],t=new Set;do{if(this.match(8))break;let r=this.startNode(),a=this.state.value;if(t.has(a)&&this.raise(st.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:a}),t.add(a),this.match(131)?r.key=this.parseStringLiteral(a):r.key=this.parseIdentifier(!0),this.expect(14),!this.match(131))throw this.raise(st.ModuleAttributeInvalidValue,{at:this.state.startLoc});r.value=this.parseStringLiteral(this.state.value),s.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return s}maybeParseModuleAttributes(){if(this.match(76)&&!this.hasPrecedingLineBreak())this.expectPlugin("moduleAttributes"),this.next();else return this.hasPlugin("moduleAttributes")?[]:null;let s=[],t=new Set;do{let r=this.startNode();if(r.key=this.parseIdentifier(!0),r.key.name!=="type"&&this.raise(st.ModuleAttributeDifferentFromType,{at:r.key}),t.has(r.key.name)&&this.raise(st.ModuleAttributesWithDuplicateKeys,{at:r.key,key:r.key.name}),t.add(r.key.name),this.expect(14),!this.match(131))throw this.raise(st.ModuleAttributeInvalidValue,{at:this.state.startLoc});r.value=this.parseStringLiteral(this.state.value),this.finishNode(r,"ImportAttribute"),s.push(r)}while(this.eat(12));return s}maybeParseImportAssertions(){if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.expectPlugin("importAssertions"),this.next();else return this.hasPlugin("importAssertions")?[]:null;this.eat(5);let s=this.parseAssertEntries();return this.eat(8),s}maybeParseDefaultImportSpecifier(s){return this.shouldParseDefaultImport(s)?(this.parseImportSpecifierLocal(s,this.startNode(),"ImportDefaultSpecifier"),!0):!1}maybeParseStarImportSpecifier(s){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(s,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(s){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(st.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}let r=this.startNode(),a=this.match(131),l=this.isContextual(128);r.imported=this.parseModuleExportName();let f=this.parseImportSpecifier(r,a,s.importKind==="type"||s.importKind==="typeof",l,void 0);s.specifiers.push(f)}}parseImportSpecifier(s,t,r,a,l){if(this.eatContextual(93))s.local=this.parseIdentifier();else{let{imported:f}=s;if(t)throw this.raise(st.ImportBindingIsString,{at:s,importName:f.value});this.checkReservedWord(f.name,s.loc.start,!0,!0),s.local||(s.local=xe(f))}return this.finishImportSpecifier(s,"ImportSpecifier",l)}isThisParam(s){return s.type==="Identifier"&&s.name==="this"}},hl=class extends _l{constructor(s,t){s=_n(s),super(s,t),this.options=s,this.initializeScopes(),this.plugins=Oc(this.options.plugins),this.filename=s.sourceFilename}getScopeHandler(){return ja}parse(){this.enterInitialScopes();let s=this.startNode(),t=this.startNode();return this.nextToken(),s.errors=null,this.parseTopLevel(s,t),s.errors=this.state.errors,s}};function Oc(s){let t=new Map;for(let r of s){let[a,l]=Array.isArray(r)?r:[r,{}];t.has(a)||t.set(a,l||{})}return t}function Lc(s,t){var r;if(((r=t)==null?void 0:r.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let a=Au(t,s),l=a.parse();if(a.sawUnambiguousESM)return l;if(a.ambiguousScriptDifferentAst)try{return t.sourceType="script",Au(t,s).parse()}catch{}else l.program.sourceType="script";return l}catch(a){try{return t.sourceType="script",Au(t,s).parse()}catch{}throw a}}else return Au(t,s).parse()}function Mc(s,t){let r=Au(t,s);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}function mo(s){let t={};for(let r of Object.keys(s))t[r]=Rs(s[r]);return t}var Il=mo(pi);function Au(s,t){let r=hl;return s!=null&&s.plugins&&(Ti(s.plugins),r=su(s.plugins)),new r(s,t)}var fl={};function su(s){let t=Ar.filter(l=>Li(s,l)),r=t.join("/"),a=fl[r];if(!a){a=hl;for(let l of t)a=Wt[l](a);fl[r]=a}return a}ri.parse=Lc,ri.parseExpression=Mc,ri.tokTypes=Il}}),cu=Pr({"src/language-js/parse/json.js"(ri,yn){re();var bn=us(),an=Bi(),on=ks(),ni=Fu();function Qn(){let Rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{allowComments:Ri=!0}=Rn;return function(rs){let{parseExpression:wi}=zo(),Xi;try{Xi=wi(rs,{tokens:!0,ranges:!0})}catch(js){throw ni(js)}if(!Ri&&bn(Xi.comments))throw oi(Xi.comments[0],"Comment");return yi(Xi),Xi}}function oi(Rn,Ri){let[rs,wi]=[Rn.loc.start,Rn.loc.end].map(Xi=>{let{line:js,column:_i}=Xi;return{line:js,column:_i+1}});return an(`${Ri} is not allowed in JSON.`,{start:rs,end:wi})}function yi(Rn){switch(Rn.type){case"ArrayExpression":for(let Ri of Rn.elements)Ri!==null&&yi(Ri);return;case"ObjectExpression":for(let Ri of Rn.properties)yi(Ri);return;case"ObjectProperty":if(Rn.computed)throw oi(Rn.key,"Computed key");if(Rn.shorthand)throw oi(Rn.key,"Shorthand property");Rn.key.type!=="Identifier"&&yi(Rn.key),yi(Rn.value);return;case"UnaryExpression":{let{operator:Ri,argument:rs}=Rn;if(Ri!=="+"&&Ri!=="-")throw oi(Rn,`Operator '${Rn.operator}'`);if(rs.type==="NumericLiteral"||rs.type==="Identifier"&&(rs.name==="Infinity"||rs.name==="NaN"))return;throw oi(rs,`Operator '${Ri}' before '${rs.type}'`)}case"Identifier":if(Rn.name!=="Infinity"&&Rn.name!=="NaN"&&Rn.name!=="undefined")throw oi(Rn,`Identifier '${Rn.name}'`);return;case"TemplateLiteral":if(bn(Rn.expressions))throw oi(Rn.expressions[0],"'TemplateLiteral' with expression");for(let Ri of Rn.quasis)yi(Ri);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw oi(Rn,`'${Rn.type}'`)}}var Ki=Qn(),Ci={json:on({parse:Ki,hasPragma(){return!0}}),json5:on(Ki),"json-stringify":on({parse:Qn({allowComments:!1}),astFormat:"estree-json"})};yn.exports=Ci}});re();var Nu=ve(),Bu=Fe(),_u=Qt(),Do=ks(),Iu=Fu(),Ou=Pu(),Ha=cu(),Cl={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication",["decorators",{decoratorsBeforeExport:!1}],"importAssertions","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors"],tokens:!0,ranges:!0},pu=["recordAndTuple",{syntaxType:"hash"}],Sa="v8intrinsic",ao=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],va=function(ri){let yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Cl;return Object.assign(Object.assign({},yn),{},{plugins:[...yn.plugins,...ri]})},hu=/@(?:no)?flow\b/;function Qu(ri,yn){if(yn.filepath&&yn.filepath.endsWith(".js.flow"))return!0;let bn=Bu(ri);bn&&(ri=ri.slice(bn.length));let an=_u(ri,0);return an!==!1&&(ri=ri.slice(0,an)),hu.test(ri)}function Zu(ri,yn,bn){let an=zo()[ri](yn,bn),on=an.errors.find(ni=>!Uo.has(ni.reasonCode));if(on)throw on;return an}function qa(ri){for(var yn=arguments.length,bn=new Array(yn>1?yn-1:0),an=1;an<yn;an++)bn[an-1]=arguments[an];return function(on,ni){let Qn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if((Qn.parser==="babel"||Qn.parser==="__babel_estree")&&Qu(on,Qn))return Qn.parser="babel-flow",Pi(on,ni,Qn);let oi=bn;Qn.__babelSourceType==="script"&&(oi=oi.map(Rn=>Object.assign(Object.assign({},Rn),{},{sourceType:"script"}))),/#[[{]/.test(on)&&(oi=oi.map(Rn=>va([pu],Rn)));let yi=/%[A-Z]/.test(on);on.includes("|>")?oi=(yi?[...ao,Sa]:ao).flatMap(Rn=>oi.map(Ri=>va([Rn],Ri))):yi&&(oi=oi.map(Rn=>va([Sa],Rn)));let{result:Ki,error:Ci}=Nu(...oi.map(Rn=>()=>Zu(ri,on,Rn)));if(!Ki)throw Iu(Ci);return Qn.originalText=on,Ou(Ki,Qn)}}var Wa=qa("parse",va(["jsx","flow"])),Pi=qa("parse",va(["jsx",["flow",{all:!0,enums:!0}]])),Fa=qa("parse",va(["jsx","typescript"]),va(["typescript"])),oo=qa("parse",va(["jsx","flow","estree"])),xa=qa("parseExpression",va(["jsx"])),Va=qa("parseExpression",va(["typescript"])),Uo=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","UnexpectedParameterModifier","MixedLabeledAndUnlabeledElements","InvalidTupleMemberLabel","NonClassMethodPropertyHasAbstractModifer","ReadonlyForMethodSignature","ClassMethodHasDeclare","ClassMethodHasReadonly","InvalidModifierOnTypeMember","DuplicateAccessibilityModifier","IndexSignatureHasDeclare","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","UnsupportedPropertyDecorator","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),eu=Do(Wa),tu=Do(Fa),Ga=Do(xa),fu=Do(Va);Bt.exports={parsers:Object.assign(Object.assign({babel:eu,"babel-flow":Do(Pi),"babel-ts":tu},Ha),{},{__js_expression:Ga,__vue_expression:Ga,__vue_ts_expression:fu,__vue_event_binding:eu,__vue_ts_event_binding:tu,__babel_estree:Do(oo)})}});return On()})})(fv);const dv=Hp(Ah);function mv(i,h,c){const g={css:cv,html:hv,babel:dv};return Ws(()=>{if(!hs(h))return hs(i)||"/* empty */";try{return uv.format(hs(i)||"",{parser:c,plugins:[g[c]],singleQuote:!0,semi:!1})}catch(x){return console.error(x),`/* Error on prettifying: ${x.message} */
|
|
278
278
|
${hs(i)||""}`}})}function gv(i,h=!0){return mv(i,h,"css")}const yv={"h-full":""},Dv={p:"x4 y2",grid:"~ cols-4 gap-4"},vv=qi("div",{op80:""}," Presets ",-1),xv={op50:"","ws-pre":""},Cv={overflow:"auto"},Ev=qi("div",{op80:""}," Rules ",-1),bv=qi("span",{op50:""},"dynamic",-1),Av=qi("br",null,null,-1),wv=qi("span",{op50:""},"static",-1),Tv=qi("div",{op80:""}," Variants ",-1),Sv=qi("div",{op80:""}," Shortcuts ",-1),Fv={key:0},kv=qi("div",{op80:""}," Config File ",-1),Pv=qi("div",{op80:""}," Version ",-1),Nv={op50:"","ws-pre":""},Bv={b:"t main",p:"x4 y2",grid:"~ cols-4 gap-4"},_v=qi("div",{op80:""}," Included Files ",-1),Iv=qi("div",{op80:""}," CSS Size ",-1),Ov=qi("span",{op50:""},"gzipped",-1),Lv=qi("div",{op80:""}," Matched Rules ",-1),Mv=qi("div",{op80:""}," Layers ",-1),jv={op50:"","ws-pre":""},Rv=Yu({__name:"Overview",setup(i){const h=Ta(null),c=av(h,"overview-scrolls");Yh.execute();const g=Ta(!1),x=gv(Ws(()=>{var S;return(S=lp.value)==null?void 0:S.css}),g);return(S,H)=>{const ie=sv,ce=ZD,De=JD,be=WD;return ma(),go("div",yv,[Gs(De,{ref_key:"status",ref:h,p0:""},{default:jl(()=>{var Ge,tt,Ct,$t,Rt,Fr,Ze,ct,Et,rr,gr,Pn,kr,ln,Dn,mn,gn,Xn;return[qi("div",Dv,[qi("div",null,[vv,qi("div",xv,jo((Ct=(tt=(Ge=hs(ro))==null?void 0:Ge.config)==null?void 0:tt.presets)==null?void 0:Ct.map(hr=>hr.name).join(`
|
|
279
279
|
`)),1)]),qi("div",Cv,[Ev,Vu(" "+jo((Fr=(Rt=($t=hs(ro))==null?void 0:$t.config)==null?void 0:Rt.rulesDynamic)==null?void 0:Fr.length)+" ",1),bv,Av,Vu(" "+jo(Object.keys(((ct=(Ze=hs(ro))==null?void 0:Ze.config)==null?void 0:ct.rulesStaticMap)||{}).length)+" ",1),wv]),qi("div",null,[Tv,Vu(" "+jo((gr=(rr=(Et=hs(ro))==null?void 0:Et.config)==null?void 0:rr.variants)==null?void 0:gr.length),1)]),qi("div",null,[Sv,Vu(" "+jo((Pn=hs(ro))==null?void 0:Pn.config.shortcuts.length),1)]),(kr=hs(ro))!=null&&kr.configPath?(ma(),go("div",Fv,[kv,Gs(ie,{id:hs(ro).configPath},null,8,["id"])])):Ap("",!0),qi("div",null,[Pv,qi("div",Nv,jo((ln=hs(ro))==null?void 0:ln.version),1)])]),qi("div",Bv,[qi("div",null,[_v,Vu(" "+jo((Dn=hs(ro))==null?void 0:Dn.modules.length),1)]),qi("div",null,[Iv,Vu(" "+jo(((((mn=hs(lp))==null?void 0:mn.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),Ov]),qi("div",null,[Lv,Vu(" "+jo((gn=hs(lp))==null?void 0:gn.matched.length),1)]),qi("div",null,[Mv,qi("div",jv,jo((Xn=hs(lp))==null?void 0:Xn.layers.join(`
|
|
280
|
-
`)),1)])]),Gs(ce,{border:"t gray-400/20",title:"Output CSS"},{default:jl(()=>[qi("label",null,[D0(qi("input",{"onUpdate:modelValue":H[0]||(H[0]=hr=>g.value=hr),type:"checkbox"},null,512),[[yy,g.value]]),Vu(" Prettify ")])]),_:1})]}),_:1},512),Gs(be,{"model-value":hs(x),"read-only":!0,mode:"css",class:"scrolls overview-scrolls",style:tp(hs(c))},null,8,["model-value","style"])])}}}),$v={};function zv(i,h){const c=Rv;return ma(),Tc(c)}const Uv=Nm($v,[["render",zv]]),Hv=()=>Fh(()=>import("./repl-b3fb6a34.js"),[]),qv=()=>Fh(()=>import("./_id_-0ddf21f5.js"),[]),Wv=[{name:"repl",path:"/repl",component:Hv,props:!0},{name:"index",path:"/",component:Uv,props:!0},{name:"module-id",path:"/module/:id",component:qv,props:!0}];const vc=typeof window<"u";function Vv(i){return i.__esModule||i[Symbol.toStringTag]==="Module"}const qs=Object.assign;function eh(i,h){const c={};for(const g in h){const x=h[g];c[g]=Xu(x)?x.map(i):i(x)}return c}const Wc=()=>{},Xu=Array.isArray,Gv=/\/$/,Kv=i=>i.replace(Gv,"");function th(i,h,c="/"){let g,x={},S="",H="";const ie=h.indexOf("#");let ce=h.indexOf("?");return ie<ce&&ie>=0&&(ce=-1),ce>-1&&(g=h.slice(0,ce),S=h.slice(ce+1,ie>-1?ie:h.length),x=i(S)),ie>-1&&(g=g||h.slice(0,ie),H=h.slice(ie,h.length)),g=Qv(g??h,c),{fullPath:g+(S&&"?")+S+H,path:g,query:x,hash:H}}function Jv(i,h){const c=h.query?i(h.query):"";return h.path+(c&&"?")+c+(h.hash||"")}function rd(i,h){return!h||!i.toLowerCase().startsWith(h.toLowerCase())?i:i.slice(h.length)||"/"}function Xv(i,h,c){const g=h.matched.length-1,x=c.matched.length-1;return g>-1&&g===x&&Fc(h.matched[g],c.matched[x])&&Lm(h.params,c.params)&&i(h.query)===i(c.query)&&h.hash===c.hash}function Fc(i,h){return(i.aliasOf||i)===(h.aliasOf||h)}function Lm(i,h){if(Object.keys(i).length!==Object.keys(h).length)return!1;for(const c in i)if(!Yv(i[c],h[c]))return!1;return!0}function Yv(i,h){return Xu(i)?nd(i,h):Xu(h)?nd(h,i):i===h}function nd(i,h){return Xu(h)?i.length===h.length&&i.every((c,g)=>c===h[g]):i.length===1&&i[0]===h}function Qv(i,h){if(i.startsWith("/"))return i;if(!i)return h;const c=h.split("/"),g=i.split("/");let x=c.length-1,S,H;for(S=0;S<g.length;S++)if(H=g[S],H!==".")if(H==="..")x>1&&x--;else break;return c.slice(0,x).join("/")+"/"+g.slice(S-(S===g.length?1:0)).join("/")}var ep;(function(i){i.pop="pop",i.push="push"})(ep||(ep={}));var Vc;(function(i){i.back="back",i.forward="forward",i.unknown=""})(Vc||(Vc={}));function Zv(i){if(!i)if(vc){const h=document.querySelector("base");i=h&&h.getAttribute("href")||"/",i=i.replace(/^\w+:\/\/[^\/]+/,"")}else i="/";return i[0]!=="/"&&i[0]!=="#"&&(i="/"+i),Kv(i)}const e1=/^[^#]+#/;function t1(i,h){return i.replace(e1,"#")+h}function r1(i,h){const c=document.documentElement.getBoundingClientRect(),g=i.getBoundingClientRect();return{behavior:h.behavior,left:g.left-c.left-(h.left||0),top:g.top-c.top-(h.top||0)}}const Wp=()=>({left:window.pageXOffset,top:window.pageYOffset});function n1(i){let h;if("el"in i){const c=i.el,g=typeof c=="string"&&c.startsWith("#"),x=typeof c=="string"?g?document.getElementById(c.slice(1)):document.querySelector(c):c;if(!x)return;h=r1(x,i)}else h=i;"scrollBehavior"in document.documentElement.style?window.scrollTo(h):window.scrollTo(h.left!=null?h.left:window.pageXOffset,h.top!=null?h.top:window.pageYOffset)}function id(i,h){return(history.state?history.state.position-h:-1)+i}const wh=new Map;function i1(i,h){wh.set(i,h)}function s1(i){const h=wh.get(i);return wh.delete(i),h}let a1=()=>location.protocol+"//"+location.host;function Mm(i,h){const{pathname:c,search:g,hash:x}=h,S=i.indexOf("#");if(S>-1){let ie=x.includes(i.slice(S))?i.slice(S).length:1,ce=x.slice(ie);return ce[0]!=="/"&&(ce="/"+ce),rd(ce,"")}return rd(c,i)+g+x}function o1(i,h,c,g){let x=[],S=[],H=null;const ie=({state:tt})=>{const Ct=Mm(i,location),$t=c.value,Rt=h.value;let Fr=0;if(tt){if(c.value=Ct,h.value=tt,H&&H===$t){H=null;return}Fr=Rt?tt.position-Rt.position:0}else g(Ct);x.forEach(Ze=>{Ze(c.value,$t,{delta:Fr,type:ep.pop,direction:Fr?Fr>0?Vc.forward:Vc.back:Vc.unknown})})};function ce(){H=c.value}function De(tt){x.push(tt);const Ct=()=>{const $t=x.indexOf(tt);$t>-1&&x.splice($t,1)};return S.push(Ct),Ct}function be(){const{history:tt}=window;!tt.state||tt.replaceState(qs({},tt.state,{scroll:Wp()}),"")}function Ge(){for(const tt of S)tt();S=[],window.removeEventListener("popstate",ie),window.removeEventListener("beforeunload",be)}return window.addEventListener("popstate",ie),window.addEventListener("beforeunload",be),{pauseListeners:ce,listen:De,destroy:Ge}}function sd(i,h,c,g=!1,x=!1){return{back:i,current:h,forward:c,replaced:g,position:window.history.length,scroll:x?Wp():null}}function u1(i){const{history:h,location:c}=window,g={value:Mm(i,c)},x={value:h.state};x.value||S(g.value,{back:null,current:g.value,forward:null,position:h.length-1,replaced:!0,scroll:null},!0);function S(ce,De,be){const Ge=i.indexOf("#"),tt=Ge>-1?(c.host&&document.querySelector("base")?i:i.slice(Ge))+ce:a1()+i+ce;try{h[be?"replaceState":"pushState"](De,"",tt),x.value=De}catch(Ct){console.error(Ct),c[be?"replace":"assign"](tt)}}function H(ce,De){const be=qs({},h.state,sd(x.value.back,ce,x.value.forward,!0),De,{position:x.value.position});S(ce,be,!0),g.value=ce}function ie(ce,De){const be=qs({},x.value,h.state,{forward:ce,scroll:Wp()});S(be.current,be,!0);const Ge=qs({},sd(g.value,ce,null),{position:be.position+1},De);S(ce,Ge,!1),g.value=ce}return{location:g,state:x,push:ie,replace:H}}function l1(i){i=Zv(i);const h=u1(i),c=o1(i,h.state,h.location,h.replace);function g(S,H=!0){H||c.pauseListeners(),history.go(S)}const x=qs({location:"",base:i,go:g,createHref:t1.bind(null,i)},h,c);return Object.defineProperty(x,"location",{enumerable:!0,get:()=>h.location.value}),Object.defineProperty(x,"state",{enumerable:!0,get:()=>h.state.value}),x}function c1(i){return i=location.host?i||location.pathname+location.search:"",i.includes("#")||(i+="#"),l1(i)}function p1(i){return typeof i=="string"||i&&typeof i=="object"}function jm(i){return typeof i=="string"||typeof i=="symbol"}const Xl={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Rm=Symbol("");var ad;(function(i){i[i.aborted=4]="aborted",i[i.cancelled=8]="cancelled",i[i.duplicated=16]="duplicated"})(ad||(ad={}));function kc(i,h){return qs(new Error,{type:i,[Rm]:!0},h)}function Ll(i,h){return i instanceof Error&&Rm in i&&(h==null||!!(i.type&h))}const od="[^/]+?",h1={sensitive:!1,strict:!1,start:!0,end:!0},f1=/[.+*?^${}()[\]/\\]/g;function d1(i,h){const c=qs({},h1,h),g=[];let x=c.start?"^":"";const S=[];for(const De of i){const be=De.length?[]:[90];c.strict&&!De.length&&(x+="/");for(let Ge=0;Ge<De.length;Ge++){const tt=De[Ge];let Ct=40+(c.sensitive?.25:0);if(tt.type===0)Ge||(x+="/"),x+=tt.value.replace(f1,"\\$&"),Ct+=40;else if(tt.type===1){const{value:$t,repeatable:Rt,optional:Fr,regexp:Ze}=tt;S.push({name:$t,repeatable:Rt,optional:Fr});const ct=Ze||od;if(ct!==od){Ct+=10;try{new RegExp(`(${ct})`)}catch(rr){throw new Error(`Invalid custom RegExp for param "${$t}" (${ct}): `+rr.message)}}let Et=Rt?`((?:${ct})(?:/(?:${ct}))*)`:`(${ct})`;Ge||(Et=Fr&&De.length<2?`(?:/${Et})`:"/"+Et),Fr&&(Et+="?"),x+=Et,Ct+=20,Fr&&(Ct+=-8),Rt&&(Ct+=-20),ct===".*"&&(Ct+=-50)}be.push(Ct)}g.push(be)}if(c.strict&&c.end){const De=g.length-1;g[De][g[De].length-1]+=.7000000000000001}c.strict||(x+="/?"),c.end?x+="$":c.strict&&(x+="(?:/|$)");const H=new RegExp(x,c.sensitive?"":"i");function ie(De){const be=De.match(H),Ge={};if(!be)return null;for(let tt=1;tt<be.length;tt++){const Ct=be[tt]||"",$t=S[tt-1];Ge[$t.name]=Ct&&$t.repeatable?Ct.split("/"):Ct}return Ge}function ce(De){let be="",Ge=!1;for(const tt of i){(!Ge||!be.endsWith("/"))&&(be+="/"),Ge=!1;for(const Ct of tt)if(Ct.type===0)be+=Ct.value;else if(Ct.type===1){const{value:$t,repeatable:Rt,optional:Fr}=Ct,Ze=$t in De?De[$t]:"";if(Xu(Ze)&&!Rt)throw new Error(`Provided param "${$t}" is an array but it is not repeatable (* or + modifiers)`);const ct=Xu(Ze)?Ze.join("/"):Ze;if(!ct)if(Fr)tt.length<2&&(be.endsWith("/")?be=be.slice(0,-1):Ge=!0);else throw new Error(`Missing required param "${$t}"`);be+=ct}}return be||"/"}return{re:H,score:g,keys:S,parse:ie,stringify:ce}}function m1(i,h){let c=0;for(;c<i.length&&c<h.length;){const g=h[c]-i[c];if(g)return g;c++}return i.length<h.length?i.length===1&&i[0]===40+40?-1:1:i.length>h.length?h.length===1&&h[0]===40+40?1:-1:0}function g1(i,h){let c=0;const g=i.score,x=h.score;for(;c<g.length&&c<x.length;){const S=m1(g[c],x[c]);if(S)return S;c++}if(Math.abs(x.length-g.length)===1){if(ud(g))return 1;if(ud(x))return-1}return x.length-g.length}function ud(i){const h=i[i.length-1];return i.length>0&&h[h.length-1]<0}const y1={type:0,value:""},D1=/[a-zA-Z0-9_]/;function v1(i){if(!i)return[[]];if(i==="/")return[[y1]];if(!i.startsWith("/"))throw new Error(`Invalid path "${i}"`);function h(Ct){throw new Error(`ERR (${c})/"${De}": ${Ct}`)}let c=0,g=c;const x=[];let S;function H(){S&&x.push(S),S=[]}let ie=0,ce,De="",be="";function Ge(){!De||(c===0?S.push({type:0,value:De}):c===1||c===2||c===3?(S.length>1&&(ce==="*"||ce==="+")&&h(`A repeatable param (${De}) must be alone in its segment. eg: '/:ids+.`),S.push({type:1,value:De,regexp:be,repeatable:ce==="*"||ce==="+",optional:ce==="*"||ce==="?"})):h("Invalid state to consume buffer"),De="")}function tt(){De+=ce}for(;ie<i.length;){if(ce=i[ie++],ce==="\\"&&c!==2){g=c,c=4;continue}switch(c){case 0:ce==="/"?(De&&Ge(),H()):ce===":"?(Ge(),c=1):tt();break;case 4:tt(),c=g;break;case 1:ce==="("?c=2:D1.test(ce)?tt():(Ge(),c=0,ce!=="*"&&ce!=="?"&&ce!=="+"&&ie--);break;case 2:ce===")"?be[be.length-1]=="\\"?be=be.slice(0,-1)+ce:c=3:be+=ce;break;case 3:Ge(),c=0,ce!=="*"&&ce!=="?"&&ce!=="+"&&ie--,be="";break;default:h("Unknown state");break}}return c===2&&h(`Unfinished custom RegExp for param "${De}"`),Ge(),H(),x}function x1(i,h,c){const g=d1(v1(i.path),c),x=qs(g,{record:i,parent:h,children:[],alias:[]});return h&&!x.record.aliasOf==!h.record.aliasOf&&h.children.push(x),x}function C1(i,h){const c=[],g=new Map;h=pd({strict:!1,end:!0,sensitive:!1},h);function x(be){return g.get(be)}function S(be,Ge,tt){const Ct=!tt,$t=E1(be);$t.aliasOf=tt&&tt.record;const Rt=pd(h,be),Fr=[$t];if("alias"in be){const Et=typeof be.alias=="string"?[be.alias]:be.alias;for(const rr of Et)Fr.push(qs({},$t,{components:tt?tt.record.components:$t.components,path:rr,aliasOf:tt?tt.record:$t}))}let Ze,ct;for(const Et of Fr){const{path:rr}=Et;if(Ge&&rr[0]!=="/"){const gr=Ge.record.path,Pn=gr[gr.length-1]==="/"?"":"/";Et.path=Ge.record.path+(rr&&Pn+rr)}if(Ze=x1(Et,Ge,Rt),tt?tt.alias.push(Ze):(ct=ct||Ze,ct!==Ze&&ct.alias.push(Ze),Ct&&be.name&&!cd(Ze)&&H(be.name)),$t.children){const gr=$t.children;for(let Pn=0;Pn<gr.length;Pn++)S(gr[Pn],Ze,tt&&tt.children[Pn])}tt=tt||Ze,(Ze.record.components&&Object.keys(Ze.record.components).length||Ze.record.name||Ze.record.redirect)&&ce(Ze)}return ct?()=>{H(ct)}:Wc}function H(be){if(jm(be)){const Ge=g.get(be);Ge&&(g.delete(be),c.splice(c.indexOf(Ge),1),Ge.children.forEach(H),Ge.alias.forEach(H))}else{const Ge=c.indexOf(be);Ge>-1&&(c.splice(Ge,1),be.record.name&&g.delete(be.record.name),be.children.forEach(H),be.alias.forEach(H))}}function ie(){return c}function ce(be){let Ge=0;for(;Ge<c.length&&g1(be,c[Ge])>=0&&(be.record.path!==c[Ge].record.path||!$m(be,c[Ge]));)Ge++;c.splice(Ge,0,be),be.record.name&&!cd(be)&&g.set(be.record.name,be)}function De(be,Ge){let tt,Ct={},$t,Rt;if("name"in be&&be.name){if(tt=g.get(be.name),!tt)throw kc(1,{location:be});Rt=tt.record.name,Ct=qs(ld(Ge.params,tt.keys.filter(ct=>!ct.optional).map(ct=>ct.name)),be.params&&ld(be.params,tt.keys.map(ct=>ct.name))),$t=tt.stringify(Ct)}else if("path"in be)$t=be.path,tt=c.find(ct=>ct.re.test($t)),tt&&(Ct=tt.parse($t),Rt=tt.record.name);else{if(tt=Ge.name?g.get(Ge.name):c.find(ct=>ct.re.test(Ge.path)),!tt)throw kc(1,{location:be,currentLocation:Ge});Rt=tt.record.name,Ct=qs({},Ge.params,be.params),$t=tt.stringify(Ct)}const Fr=[];let Ze=tt;for(;Ze;)Fr.unshift(Ze.record),Ze=Ze.parent;return{name:Rt,path:$t,params:Ct,matched:Fr,meta:A1(Fr)}}return i.forEach(be=>S(be)),{addRoute:S,resolve:De,removeRoute:H,getRoutes:ie,getRecordMatcher:x}}function ld(i,h){const c={};for(const g of h)g in i&&(c[g]=i[g]);return c}function E1(i){return{path:i.path,redirect:i.redirect,name:i.name,meta:i.meta||{},aliasOf:void 0,beforeEnter:i.beforeEnter,props:b1(i),children:i.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in i?i.components||null:i.component&&{default:i.component}}}function b1(i){const h={},c=i.props||!1;if("component"in i)h.default=c;else for(const g in i.components)h[g]=typeof c=="boolean"?c:c[g];return h}function cd(i){for(;i;){if(i.record.aliasOf)return!0;i=i.parent}return!1}function A1(i){return i.reduce((h,c)=>qs(h,c.meta),{})}function pd(i,h){const c={};for(const g in i)c[g]=g in h?h[g]:i[g];return c}function $m(i,h){return h.children.some(c=>c===i||$m(i,c))}const zm=/#/g,w1=/&/g,T1=/\//g,S1=/=/g,F1=/\?/g,Um=/\+/g,k1=/%5B/g,P1=/%5D/g,Hm=/%5E/g,N1=/%60/g,qm=/%7B/g,B1=/%7C/g,Wm=/%7D/g,_1=/%20/g;function Qh(i){return encodeURI(""+i).replace(B1,"|").replace(k1,"[").replace(P1,"]")}function I1(i){return Qh(i).replace(qm,"{").replace(Wm,"}").replace(Hm,"^")}function Th(i){return Qh(i).replace(Um,"%2B").replace(_1,"+").replace(zm,"%23").replace(w1,"%26").replace(N1,"`").replace(qm,"{").replace(Wm,"}").replace(Hm,"^")}function O1(i){return Th(i).replace(S1,"%3D")}function L1(i){return Qh(i).replace(zm,"%23").replace(F1,"%3F")}function M1(i){return i==null?"":L1(i).replace(T1,"%2F")}function Sp(i){try{return decodeURIComponent(""+i)}catch{}return""+i}function j1(i){const h={};if(i===""||i==="?")return h;const g=(i[0]==="?"?i.slice(1):i).split("&");for(let x=0;x<g.length;++x){const S=g[x].replace(Um," "),H=S.indexOf("="),ie=Sp(H<0?S:S.slice(0,H)),ce=H<0?null:Sp(S.slice(H+1));if(ie in h){let De=h[ie];Xu(De)||(De=h[ie]=[De]),De.push(ce)}else h[ie]=ce}return h}function hd(i){let h="";for(let c in i){const g=i[c];if(c=O1(c),g==null){g!==void 0&&(h+=(h.length?"&":"")+c);continue}(Xu(g)?g.map(S=>S&&Th(S)):[g&&Th(g)]).forEach(S=>{S!==void 0&&(h+=(h.length?"&":"")+c,S!=null&&(h+="="+S))})}return h}function R1(i){const h={};for(const c in i){const g=i[c];g!==void 0&&(h[c]=Xu(g)?g.map(x=>x==null?null:""+x):g==null?g:""+g)}return h}const $1=Symbol(""),fd=Symbol(""),Zh=Symbol(""),ef=Symbol(""),Sh=Symbol("");function Rc(){let i=[];function h(g){return i.push(g),()=>{const x=i.indexOf(g);x>-1&&i.splice(x,1)}}function c(){i=[]}return{add:h,list:()=>i,reset:c}}function Ql(i,h,c,g,x){const S=g&&(g.enterCallbacks[x]=g.enterCallbacks[x]||[]);return()=>new Promise((H,ie)=>{const ce=Ge=>{Ge===!1?ie(kc(4,{from:c,to:h})):Ge instanceof Error?ie(Ge):p1(Ge)?ie(kc(2,{from:h,to:Ge})):(S&&g.enterCallbacks[x]===S&&typeof Ge=="function"&&S.push(Ge),H())},De=i.call(g&&g.instances[x],h,c,ce);let be=Promise.resolve(De);i.length<3&&(be=be.then(ce)),be.catch(Ge=>ie(Ge))})}function rh(i,h,c,g){const x=[];for(const S of i)for(const H in S.components){let ie=S.components[H];if(!(h!=="beforeRouteEnter"&&!S.instances[H]))if(z1(ie)){const De=(ie.__vccOpts||ie)[h];De&&x.push(Ql(De,c,g,S,H))}else{let ce=ie();x.push(()=>ce.then(De=>{if(!De)return Promise.reject(new Error(`Couldn't resolve component "${H}" at "${S.path}"`));const be=Vv(De)?De.default:De;S.components[H]=be;const tt=(be.__vccOpts||be)[h];return tt&&Ql(tt,c,g,S,H)()}))}}return x}function z1(i){return typeof i=="object"||"displayName"in i||"props"in i||"__vccOpts"in i}function dd(i){const h=Rl(Zh),c=Rl(ef),g=Ws(()=>h.resolve(hs(i.to))),x=Ws(()=>{const{matched:ce}=g.value,{length:De}=ce,be=ce[De-1],Ge=c.matched;if(!be||!Ge.length)return-1;const tt=Ge.findIndex(Fc.bind(null,be));if(tt>-1)return tt;const Ct=md(ce[De-2]);return De>1&&md(be)===Ct&&Ge[Ge.length-1].path!==Ct?Ge.findIndex(Fc.bind(null,ce[De-2])):tt}),S=Ws(()=>x.value>-1&&W1(c.params,g.value.params)),H=Ws(()=>x.value>-1&&x.value===c.matched.length-1&&Lm(c.params,g.value.params));function ie(ce={}){return q1(ce)?h[hs(i.replace)?"replace":"push"](hs(i.to)).catch(Wc):Promise.resolve()}return{route:g,href:Ws(()=>g.value.href),isActive:S,isExactActive:H,navigate:ie}}const U1=Yu({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:dd,setup(i,{slots:h}){const c=_c(dd(i)),{options:g}=Rl(Zh),x=Ws(()=>({[gd(i.activeClass,g.linkActiveClass,"router-link-active")]:c.isActive,[gd(i.exactActiveClass,g.linkExactActiveClass,"router-link-exact-active")]:c.isExactActive}));return()=>{const S=h.default&&h.default(c);return i.custom?S:Kh("a",{"aria-current":c.isExactActive?i.ariaCurrentValue:null,href:c.href,onClick:c.navigate,class:x.value},S)}}}),H1=U1;function q1(i){if(!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)&&!i.defaultPrevented&&!(i.button!==void 0&&i.button!==0)){if(i.currentTarget&&i.currentTarget.getAttribute){const h=i.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(h))return}return i.preventDefault&&i.preventDefault(),!0}}function W1(i,h){for(const c in h){const g=h[c],x=i[c];if(typeof g=="string"){if(g!==x)return!1}else if(!Xu(x)||x.length!==g.length||g.some((S,H)=>S!==x[H]))return!1}return!0}function md(i){return i?i.aliasOf?i.aliasOf.path:i.path:""}const gd=(i,h,c)=>i??h??c,V1=Yu({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(i,{attrs:h,slots:c}){const g=Rl(Sh),x=Ws(()=>i.route||g.value),S=Rl(fd,0),H=Ws(()=>{let De=hs(S);const{matched:be}=x.value;let Ge;for(;(Ge=be[De])&&!Ge.components;)De++;return De}),ie=Ws(()=>x.value.matched[H.value]);fp(fd,Ws(()=>H.value+1)),fp($1,ie),fp(Sh,x);const ce=Ta();return Ua(()=>[ce.value,ie.value,i.name],([De,be,Ge],[tt,Ct,$t])=>{be&&(be.instances[Ge]=De,Ct&&Ct!==be&&De&&De===tt&&(be.leaveGuards.size||(be.leaveGuards=Ct.leaveGuards),be.updateGuards.size||(be.updateGuards=Ct.updateGuards))),De&&be&&(!Ct||!Fc(be,Ct)||!tt)&&(be.enterCallbacks[Ge]||[]).forEach(Rt=>Rt(De))},{flush:"post"}),()=>{const De=x.value,be=i.name,Ge=ie.value,tt=Ge&&Ge.components[be];if(!tt)return yd(c.default,{Component:tt,route:De});const Ct=Ge.props[be],$t=Ct?Ct===!0?De.params:typeof Ct=="function"?Ct(De):Ct:null,Fr=Kh(tt,qs({},$t,h,{onVnodeUnmounted:Ze=>{Ze.component.isUnmounted&&(Ge.instances[be]=null)},ref:ce}));return yd(c.default,{Component:Fr,route:De})||Fr}}});function yd(i,h){if(!i)return null;const c=i(h);return c.length===1?c[0]:c}const G1=V1;function K1(i){const h=C1(i.routes,i),c=i.parseQuery||j1,g=i.stringifyQuery||hd,x=i.history,S=Rc(),H=Rc(),ie=Rc(),ce=zc(Xl);let De=Xl;vc&&i.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const be=eh.bind(null,Mr=>""+Mr),Ge=eh.bind(null,M1),tt=eh.bind(null,Sp);function Ct(Mr,$r){let yr,cn;return jm(Mr)?(yr=h.getRecordMatcher(Mr),cn=$r):cn=Mr,h.addRoute(cn,yr)}function $t(Mr){const $r=h.getRecordMatcher(Mr);$r&&h.removeRoute($r)}function Rt(){return h.getRoutes().map(Mr=>Mr.record)}function Fr(Mr){return!!h.getRecordMatcher(Mr)}function Ze(Mr,$r){if($r=qs({},$r||ce.value),typeof Mr=="string"){const Xe=th(c,Mr,$r.path),At=h.resolve({path:Xe.path},$r),wr=x.createHref(Xe.fullPath);return qs(Xe,At,{params:tt(At.params),hash:Sp(Xe.hash),redirectedFrom:void 0,href:wr})}let yr;if("path"in Mr)yr=qs({},Mr,{path:th(c,Mr.path,$r.path).path});else{const Xe=qs({},Mr.params);for(const At in Xe)Xe[At]==null&&delete Xe[At];yr=qs({},Mr,{params:Ge(Mr.params)}),$r.params=Ge($r.params)}const cn=h.resolve(yr,$r),$n=Mr.hash||"";cn.params=be(tt(cn.params));const ci=Jv(g,qs({},Mr,{hash:I1($n),path:cn.path})),Mn=x.createHref(ci);return qs({fullPath:ci,hash:$n,query:g===hd?R1(Mr.query):Mr.query||{}},cn,{redirectedFrom:void 0,href:Mn})}function ct(Mr){return typeof Mr=="string"?th(c,Mr,ce.value.path):qs({},Mr)}function Et(Mr,$r){if(De!==Mr)return kc(8,{from:$r,to:Mr})}function rr(Mr){return kr(Mr)}function gr(Mr){return rr(qs(ct(Mr),{replace:!0}))}function Pn(Mr){const $r=Mr.matched[Mr.matched.length-1];if($r&&$r.redirect){const{redirect:yr}=$r;let cn=typeof yr=="function"?yr(Mr):yr;return typeof cn=="string"&&(cn=cn.includes("?")||cn.includes("#")?cn=ct(cn):{path:cn},cn.params={}),qs({query:Mr.query,hash:Mr.hash,params:"path"in cn?{}:Mr.params},cn)}}function kr(Mr,$r){const yr=De=Ze(Mr),cn=ce.value,$n=Mr.state,ci=Mr.force,Mn=Mr.replace===!0,Xe=Pn(yr);if(Xe)return kr(qs(ct(Xe),{state:typeof Xe=="object"?qs({},$n,Xe.state):$n,force:ci,replace:Mn}),$r||yr);const At=yr;At.redirectedFrom=$r;let wr;return!ci&&Xv(g,cn,yr)&&(wr=kc(16,{to:At,from:cn}),Vi(cn,cn,!0,!1)),(wr?Promise.resolve(wr):Dn(At,cn)).catch(Hr=>Ll(Hr)?Ll(Hr,2)?Hr:ti(Hr):ur(Hr,At,cn)).then(Hr=>{if(Hr){if(Ll(Hr,2))return kr(qs({replace:Mn},ct(Hr.to),{state:typeof Hr.to=="object"?qs({},$n,Hr.to.state):$n,force:ci}),$r||At)}else Hr=gn(At,cn,!0,Mn,$n);return mn(At,cn,Hr),Hr})}function ln(Mr,$r){const yr=Et(Mr,$r);return yr?Promise.reject(yr):Promise.resolve()}function Dn(Mr,$r){let yr;const[cn,$n,ci]=J1(Mr,$r);yr=rh(cn.reverse(),"beforeRouteLeave",Mr,$r);for(const Xe of cn)Xe.leaveGuards.forEach(At=>{yr.push(Ql(At,Mr,$r))});const Mn=ln.bind(null,Mr,$r);return yr.push(Mn),Dc(yr).then(()=>{yr=[];for(const Xe of S.list())yr.push(Ql(Xe,Mr,$r));return yr.push(Mn),Dc(yr)}).then(()=>{yr=rh($n,"beforeRouteUpdate",Mr,$r);for(const Xe of $n)Xe.updateGuards.forEach(At=>{yr.push(Ql(At,Mr,$r))});return yr.push(Mn),Dc(yr)}).then(()=>{yr=[];for(const Xe of Mr.matched)if(Xe.beforeEnter&&!$r.matched.includes(Xe))if(Xu(Xe.beforeEnter))for(const At of Xe.beforeEnter)yr.push(Ql(At,Mr,$r));else yr.push(Ql(Xe.beforeEnter,Mr,$r));return yr.push(Mn),Dc(yr)}).then(()=>(Mr.matched.forEach(Xe=>Xe.enterCallbacks={}),yr=rh(ci,"beforeRouteEnter",Mr,$r),yr.push(Mn),Dc(yr))).then(()=>{yr=[];for(const Xe of H.list())yr.push(Ql(Xe,Mr,$r));return yr.push(Mn),Dc(yr)}).catch(Xe=>Ll(Xe,8)?Xe:Promise.reject(Xe))}function mn(Mr,$r,yr){for(const cn of ie.list())cn(Mr,$r,yr)}function gn(Mr,$r,yr,cn,$n){const ci=Et(Mr,$r);if(ci)return ci;const Mn=$r===Xl,Xe=vc?history.state:{};yr&&(cn||Mn?x.replace(Mr.fullPath,qs({scroll:Mn&&Xe&&Xe.scroll},$n)):x.push(Mr.fullPath,$n)),ce.value=Mr,Vi(Mr,$r,yr,Mn),ti()}let Xn;function hr(){Xn||(Xn=x.listen((Mr,$r,yr)=>{if(!ts.listening)return;const cn=Ze(Mr),$n=Pn(cn);if($n){kr(qs($n,{replace:!0}),cn).catch(Wc);return}De=cn;const ci=ce.value;vc&&i1(id(ci.fullPath,yr.delta),Wp()),Dn(cn,ci).catch(Mn=>Ll(Mn,12)?Mn:Ll(Mn,2)?(kr(Mn.to,cn).then(Xe=>{Ll(Xe,20)&&!yr.delta&&yr.type===ep.pop&&x.go(-1,!1)}).catch(Wc),Promise.reject()):(yr.delta&&x.go(-yr.delta,!1),ur(Mn,cn,ci))).then(Mn=>{Mn=Mn||gn(cn,ci,!1),Mn&&(yr.delta&&!Ll(Mn,8)?x.go(-yr.delta,!1):yr.type===ep.pop&&Ll(Mn,20)&&x.go(-1,!1)),mn(cn,ci,Mn)}).catch(Wc)}))}let Tn=Rc(),Ce=Rc(),tn;function ur(Mr,$r,yr){ti(Mr);const cn=Ce.list();return cn.length?cn.forEach($n=>$n(Mr,$r,yr)):console.error(Mr),Promise.reject(Mr)}function kn(){return tn&&ce.value!==Xl?Promise.resolve():new Promise((Mr,$r)=>{Tn.add([Mr,$r])})}function ti(Mr){return tn||(tn=!Mr,hr(),Tn.list().forEach(([$r,yr])=>Mr?yr(Mr):$r()),Tn.reset()),Mr}function Vi(Mr,$r,yr,cn){const{scrollBehavior:$n}=i;if(!vc||!$n)return Promise.resolve();const ci=!yr&&s1(id(Mr.fullPath,0))||(cn||!yr)&&history.state&&history.state.scroll||null;return Op().then(()=>$n(Mr,$r,ci)).then(Mn=>Mn&&n1(Mn)).catch(Mn=>ur(Mn,Mr,$r))}const as=Mr=>x.go(Mr);let fs;const es=new Set,ts={currentRoute:ce,listening:!0,addRoute:Ct,removeRoute:$t,hasRoute:Fr,getRoutes:Rt,resolve:Ze,options:i,push:rr,replace:gr,go:as,back:()=>as(-1),forward:()=>as(1),beforeEach:S.add,beforeResolve:H.add,afterEach:ie.add,onError:Ce.add,isReady:kn,install(Mr){const $r=this;Mr.component("RouterLink",H1),Mr.component("RouterView",G1),Mr.config.globalProperties.$router=$r,Object.defineProperty(Mr.config.globalProperties,"$route",{enumerable:!0,get:()=>hs(ce)}),vc&&!fs&&ce.value===Xl&&(fs=!0,rr(x.location).catch($n=>{}));const yr={};for(const $n in Xl)yr[$n]=Ws(()=>ce.value[$n]);Mr.provide(Zh,$r),Mr.provide(ef,_c(yr)),Mr.provide(Sh,ce);const cn=Mr.unmount;es.add(Mr),Mr.unmount=function(){es.delete(Mr),es.size<1&&(De=Xl,Xn&&Xn(),Xn=null,ce.value=Xl,fs=!1,tn=!1),cn()}}};return ts}function Dc(i){return i.reduce((h,c)=>h.then(()=>c()),Promise.resolve())}function J1(i,h){const c=[],g=[],x=[],S=Math.max(h.matched.length,i.matched.length);for(let H=0;H<S;H++){const ie=h.matched[H];ie&&(i.matched.find(De=>Fc(De,ie))?g.push(ie):c.push(ie));const ce=i.matched[H];ce&&(h.matched.find(De=>Fc(De,ce))||x.push(ce))}return[c,g,x]}function X1(){return Rl(ef)}const Y1=Yu({__name:"FileIcon",props:{id:null},setup(i){const h=i,c=Ws(()=>h.id.split(/\./g).pop()),g=Ws(()=>{switch(c.value){case"vue":return"i-logos-vue";default:return"i-carbon-document-blank"}});return(x,S)=>(ma(),go("div",{class:Ac(hs(g))},null,2))}}),Q1={open:""},Z1={"cursor-default":"","select-none":"","text-sm":"",truncate:"",p:"y1"},ex={"ml-1":""},tx=Yu({__name:"ModuleTreeNode",props:{node:null,icon:{default:"i-carbon-folder"}},setup(i){const h=X1();return(c,g)=>{const x=vp("ModuleTreeNode",!0),S=Y1,H=vp("RouterLink");return ma(),go("details",Q1,[qi("summary",Z1,[qi("div",{class:Ac(i.icon)},null,2),Vu(" "+jo(i.node.name),1)]),(ma(!0),go(Ro,null,yf(Object.entries(i.node.children),ie=>(ma(),Tc(x,{key:ie[0],ml2:"",node:ie[1]},null,8,["node"]))),128)),(ma(!0),go(Ro,null,yf(i.node.items,ie=>(ma(),go("div",{key:ie.full,ml4:"","ws-nowrap":""},[Gs(H,{block:"","text-sm":"",p:"x2 y1",rounded:"",to:`/module/${encodeURIComponent(ie.full)}`,class:Ac({"bg-gray/10":ie.full===hs(h).params.id})},{default:jl(()=>[Gs(S,{id:ie.path},null,8,["id"]),qi("span",ex,jo(ie.path.split("/").pop()),1)]),_:2},1032,["to","class"])]))),128))])}}}),rx="/__unocss/icon.svg",nx={p:"x4 y3",b:"b main",flex:"","children:my-auto":""},ix=qi("div",{flex:"","flex-auto":"","children:my-auto":"","ws-nowrap":""},[qi("img",{src:rx,filter:"","dark:invert":"","inline-block":"",h:"1.3em",m:"r-1.5"}),qi("div",{"of-hidden":""},[Vu(" Inspector "),qi("sup",{"text-teal5":"","bg-teal5:10":"",p:"x1.5 y0.5",rounded:"",italic:""},"beta")])],-1),sx=Yu({__name:"NarBar",setup(i){const h=hD(),c=_y(h);return(g,x)=>(ma(),go("nav",nx,[ix,qi("button",{"text-lg":"","i-carbon-sun":"","dark:i-carbon-moon":"",onClick:x[0]||(x[0]=S=>hs(c)())})]))}}),ax={"h-full":""},ox={b:"r main","of-hidden":""},ux={pt:"4",flex:"~ col gap-3"},lx=qi("div",{"i-carbon-dashboard":""},null,-1),cx=qi("span",null," Overview ",-1),px=qi("div",{"i-carbon-terminal":""},null,-1),hx=qi("span",null," REPL ",-1),fx=qi("div",{b:"b main"},null,-1),dx={b:"r main",class:"scrolls scrolls-sidebar"},mx=Yu({__name:"Sidebar",setup(i){return(h,c)=>{const g=sx,x=vp("RouterLink"),S=tx;return ma(),go("div",ax,[qi("div",ox,[Gs(g),qi("div",ux,[Gs(x,{block:"",to:"/","text-sm":"",m:"l-3.7"},{default:jl(()=>[lx,cx]),_:1}),Gs(x,{block:"",to:"/repl","text-sm":"",m:"l-3.7"},{default:jl(()=>[px,hx]),_:1}),fx])]),qi("div",dx,[Object.keys(hs(cp).workspace.children).length?(ma(),Tc(S,{key:0,node:hs(cp).workspace,p:"l3 t4",icon:"i-carbon-portfolio"},null,8,["node"])):Ap("",!0),Object.keys(hs(cp).root.children).length?(ma(),Tc(S,{key:1,node:hs(cp).root,p:"l3 t4",icon:"i-carbon-vmdk-disk"},null,8,["node"])):Ap("",!0)])])}}}),gx={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((i,h)=>(i[h.id]=h)&&i,{})}},methods:{updatePaneComponents(){this.panes.forEach(i=>{i.update&&i.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[i.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(i,h){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=h},onMouseMove(i){this.touch.mouseDown&&(i.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(i)),this.$emit("resize",this.panes.map(h=>({min:h.min,max:h.max,size:h.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(i,h){"ontouchstart"in window&&(i.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===h?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(i,h),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=h,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[h])},onSplitterDblClick(i,h){let c=0;this.panes=this.panes.map((g,x)=>(g.size=x===h?g.max:g.min,x!==h&&(c+=g.min),g)),this.panes[h].size-=c,this.$emit("pane-maximize",this.panes[h]),this.$emit("resized",this.panes.map(g=>({min:g.min,max:g.max,size:g.size})))},onPaneClick(i,h){this.$emit("pane-click",this.indexedPanes[h])},getCurrentMouseDrag(i){const h=this.container.getBoundingClientRect(),{clientX:c,clientY:g}="ontouchstart"in window&&i.touches?i.touches[0]:i;return{x:c-h.left,y:g-h.top}},getCurrentDragPercentage(i){i=i[this.horizontal?"y":"x"];const h=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(i=h-i),i*100/h},calculatePanesSize(i){const h=this.touch.activeSplitter;let c={prevPanesSize:this.sumPrevPanesSize(h),nextPanesSize:this.sumNextPanesSize(h),prevReachedMinPanes:0,nextReachedMinPanes:0};const g=0+(this.pushOtherPanes?0:c.prevPanesSize),x=100-(this.pushOtherPanes?0:c.nextPanesSize),S=Math.max(Math.min(this.getCurrentDragPercentage(i),x),g);let H=[h,h+1],ie=this.panes[H[0]]||null,ce=this.panes[H[1]]||null;const De=ie.max<100&&S>=ie.max+c.prevPanesSize,be=ce.max<100&&S<=100-(ce.max+this.sumNextPanesSize(h+1));if(De||be){De?(ie.size=ie.max,ce.size=Math.max(100-ie.max-c.prevPanesSize-c.nextPanesSize,0)):(ie.size=Math.max(100-ce.max-c.prevPanesSize-this.sumNextPanesSize(h+1),0),ce.size=ce.max);return}if(this.pushOtherPanes){const Ge=this.doPushOtherPanes(c,S);if(!Ge)return;({sums:c,panesToResize:H}=Ge),ie=this.panes[H[0]]||null,ce=this.panes[H[1]]||null}ie!==null&&(ie.size=Math.min(Math.max(S-c.prevPanesSize-c.prevReachedMinPanes,ie.min),ie.max)),ce!==null&&(ce.size=Math.min(Math.max(100-S-c.nextPanesSize-c.nextReachedMinPanes,ce.min),ce.max))},doPushOtherPanes(i,h){const c=this.touch.activeSplitter,g=[c,c+1];return h<i.prevPanesSize+this.panes[g[0]].min&&(g[0]=this.findPrevExpandedPane(c).index,i.prevReachedMinPanes=0,g[0]<c&&this.panes.forEach((x,S)=>{S>g[0]&&S<=c&&(x.size=x.min,i.prevReachedMinPanes+=x.min)}),i.prevPanesSize=this.sumPrevPanesSize(g[0]),g[0]===void 0)?(i.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((x,S)=>{S>0&&S<=c&&(x.size=x.min,i.prevReachedMinPanes+=x.min)}),this.panes[g[1]].size=100-i.prevReachedMinPanes-this.panes[0].min-i.prevPanesSize-i.nextPanesSize,null):h>100-i.nextPanesSize-this.panes[g[1]].min&&(g[1]=this.findNextExpandedPane(c).index,i.nextReachedMinPanes=0,g[1]>c+1&&this.panes.forEach((x,S)=>{S>c&&S<g[1]&&(x.size=x.min,i.nextReachedMinPanes+=x.min)}),i.nextPanesSize=this.sumNextPanesSize(g[1]-1),g[1]===void 0)?(i.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((x,S)=>{S<this.panesCount-1&&S>=c+1&&(x.size=x.min,i.nextReachedMinPanes+=x.min)}),this.panes[g[0]].size=100-i.prevPanesSize-i.nextReachedMinPanes-this.panes[this.panesCount-1].min-i.nextPanesSize,null):{sums:i,panesToResize:g}},sumPrevPanesSize(i){return this.panes.reduce((h,c,g)=>h+(g<i?c.size:0),0)},sumNextPanesSize(i){return this.panes.reduce((h,c,g)=>h+(g>i+1?c.size:0),0)},findPrevExpandedPane(i){return[...this.panes].reverse().find(h=>h.index<i&&h.size>h.min)||{}},findNextExpandedPane(i){return this.panes.find(h=>h.index>i+1&&h.size>h.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(i=>{const h=i.classList.contains("splitpanes__pane"),c=i.classList.contains("splitpanes__splitter");!h&&!c&&(i.parentNode.removeChild(i),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))})},addSplitter(i,h,c=!1){const g=i-1,x=document.createElement("div");x.classList.add("splitpanes__splitter"),c||(x.onmousedown=S=>this.onMouseDown(S,g),typeof window<"u"&&"ontouchstart"in window&&(x.ontouchstart=S=>this.onMouseDown(S,g)),x.onclick=S=>this.onSplitterClick(S,g+1)),this.dblClickSplitter&&(x.ondblclick=S=>this.onSplitterDblClick(S,g+1)),h.parentNode.insertBefore(x,h)},removeSplitter(i){i.onmousedown=void 0,i.onclick=void 0,i.ondblclick=void 0,i.parentNode.removeChild(i)},redoSplitters(){const i=Array.from(this.container.children);i.forEach(c=>{c.className.includes("splitpanes__splitter")&&this.removeSplitter(c)});let h=0;i.forEach(c=>{c.className.includes("splitpanes__pane")&&(!h&&this.firstSplitter?this.addSplitter(h,c,!0):h&&this.addSplitter(h,c),h++)})},requestUpdate({target:i,...h}){const c=this.indexedPanes[i._.uid];Object.entries(h).forEach(([g,x])=>c[g]=x)},onPaneAdd(i){let h=-1;Array.from(i.$el.parentNode.children).some(x=>(x.className.includes("splitpanes__pane")&&h++,x===i.$el));const c=parseFloat(i.minSize),g=parseFloat(i.maxSize);this.panes.splice(h,0,{id:i._.uid,index:h,min:isNaN(c)?0:c,max:isNaN(g)?100:g,size:i.size===null?null:parseFloat(i.size),givenSize:i.size,update:i.update}),this.panes.forEach((x,S)=>x.index=S),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[h]}),this.$emit("pane-add",{index:h,panes:this.panes.map(x=>({min:x.min,max:x.max,size:x.size}))})})},onPaneRemove(i){const h=this.panes.findIndex(g=>g.id===i._.uid),c=this.panes.splice(h,1)[0];this.panes.forEach((g,x)=>g.index=x),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...c,index:h}}),this.$emit("pane-remove",{removed:c,panes:this.panes.map(g=>({min:g.min,max:g.max,size:g.size}))})})},resetPaneSizes(i={}){!i.addedPane&&!i.removedPane?this.initialPanesSizing():this.panes.some(h=>h.givenSize!==null||h.min||h.max<100)?this.equalizeAfterAddOrRemove(i):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(h=>({min:h.min,max:h.max,size:h.size})))},equalize(){const i=100/this.panesCount;let h=0;const c=[],g=[];this.panes.forEach(x=>{x.size=Math.max(Math.min(i,x.max),x.min),h-=x.size,x.size>=x.max&&c.push(x.id),x.size<=x.min&&g.push(x.id)}),h>.1&&this.readjustSizes(h,c,g)},initialPanesSizing(){let i=100;const h=[],c=[];let g=0;this.panes.forEach(S=>{i-=S.size,S.size!==null&&g++,S.size>=S.max&&h.push(S.id),S.size<=S.min&&c.push(S.id)});let x=100;i>.1&&(this.panes.forEach(S=>{S.size===null&&(S.size=Math.max(Math.min(i/(this.panesCount-g),S.max),S.min)),x-=S.size}),x>.1&&this.readjustSizes(i,h,c))},equalizeAfterAddOrRemove({addedPane:i,removedPane:h}={}){let c=100/this.panesCount,g=0;const x=[],S=[];i&&i.givenSize!==null&&(c=(100-i.givenSize)/(this.panesCount-1)),this.panes.forEach(H=>{g-=H.size,H.size>=H.max&&x.push(H.id),H.size<=H.min&&S.push(H.id)}),!(Math.abs(g)<.1)&&(this.panes.forEach(H=>{i&&i.givenSize!==null&&i.id===H.id||(H.size=Math.max(Math.min(c,H.max),H.min)),g-=H.size,H.size>=H.max&&x.push(H.id),H.size<=H.min&&S.push(H.id)}),g>.1&&this.readjustSizes(g,x,S))},readjustSizes(i,h,c){let g;i>0?g=i/(this.panesCount-h.length):g=i/(this.panesCount-c.length),this.panes.forEach((x,S)=>{if(i>0&&!h.includes(x.id)){const H=Math.max(Math.min(x.size+g,x.max),x.min),ie=H-x.size;i-=ie,x.size=H}else if(!c.includes(x.id)){const H=Math.max(Math.min(x.size+g,x.max),x.min),ie=H-x.size;i-=ie,x.size=H}x.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[x.id].size}%`})}),Math.abs(i)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(i){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((h,c)=>{h.ondblclick=i?g=>this.onSplitterDblClick(g,c):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return Kh("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},yx=(i,h)=>{const c=i.__vccOpts||i;for(const[g,x]of h)c[g]=x;return c},Dx={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(i){this.style=i}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(i){this.requestUpdate({target:this,size:i})},minSizeNumber(i){this.requestUpdate({target:this,min:i})},maxSizeNumber(i){this.requestUpdate({target:this,max:i})}}};function vx(i,h,c,g,x,S){return ma(),go("div",{class:"splitpanes__pane",onClick:h[0]||(h[0]=H=>S.onPaneClick(H,i._.uid)),style:tp(i.style)},[xp(i.$slots,"default")],4)}const Dd=yx(Dx,[["render",vx]]),xx={"h-screen":"","w-screen":"","of-hidden":""},Cx={"h-full":"","of-hidden":""},Ex=Yu({__name:"App",setup(i){return(h,c)=>{const g=mx,x=vp("RouterView");return ma(),go("div",xx,[Gs(hs(gx),null,{default:jl(()=>[Gs(hs(Dd),{size:"20","push-other-panes":!1},{default:jl(()=>[Gs(g)]),_:1}),Gs(hs(Dd),{size:"80"},{default:jl(()=>[qi("div",Cx,[Gs(x)])]),_:1})]),_:1})])}}}),Vm=Cy(Ex);Vm.use(K1({history:c1(),routes:Wv}));Vm.mount("#app");export{bx as A,gv as B,Ws as C,Ap as D,jo as E,Dd as F,sv as G,X1 as H,gx as M,JD as _,Ax as a,Sm as b,go as c,Yu as d,Gs as e,Sx as f,qi as g,D0 as h,hs as i,wa as j,Vu as k,ZD as l,WD as m,tp as n,ma as o,Nm as p,Tc as q,Ta as r,ND as s,BD as t,av as u,yy as v,jl as w,wx as x,Tx as y,Hg as z};
|
|
280
|
+
`)),1)])]),Gs(ce,{border:"t gray-400/20",title:"Output CSS"},{default:jl(()=>[qi("label",null,[D0(qi("input",{"onUpdate:modelValue":H[0]||(H[0]=hr=>g.value=hr),type:"checkbox"},null,512),[[yy,g.value]]),Vu(" Prettify ")])]),_:1})]}),_:1},512),Gs(be,{"model-value":hs(x),"read-only":!0,mode:"css",class:"scrolls overview-scrolls",style:tp(hs(c))},null,8,["model-value","style"])])}}}),$v={};function zv(i,h){const c=Rv;return ma(),Tc(c)}const Uv=Nm($v,[["render",zv]]),Hv=()=>Fh(()=>import("./repl-58bdd3f9.js"),[]),qv=()=>Fh(()=>import("./_id_-7136d08d.js"),[]),Wv=[{name:"repl",path:"/repl",component:Hv,props:!0},{name:"index",path:"/",component:Uv,props:!0},{name:"module-id",path:"/module/:id",component:qv,props:!0}];const vc=typeof window<"u";function Vv(i){return i.__esModule||i[Symbol.toStringTag]==="Module"}const qs=Object.assign;function eh(i,h){const c={};for(const g in h){const x=h[g];c[g]=Xu(x)?x.map(i):i(x)}return c}const Wc=()=>{},Xu=Array.isArray,Gv=/\/$/,Kv=i=>i.replace(Gv,"");function th(i,h,c="/"){let g,x={},S="",H="";const ie=h.indexOf("#");let ce=h.indexOf("?");return ie<ce&&ie>=0&&(ce=-1),ce>-1&&(g=h.slice(0,ce),S=h.slice(ce+1,ie>-1?ie:h.length),x=i(S)),ie>-1&&(g=g||h.slice(0,ie),H=h.slice(ie,h.length)),g=Qv(g??h,c),{fullPath:g+(S&&"?")+S+H,path:g,query:x,hash:H}}function Jv(i,h){const c=h.query?i(h.query):"";return h.path+(c&&"?")+c+(h.hash||"")}function rd(i,h){return!h||!i.toLowerCase().startsWith(h.toLowerCase())?i:i.slice(h.length)||"/"}function Xv(i,h,c){const g=h.matched.length-1,x=c.matched.length-1;return g>-1&&g===x&&Fc(h.matched[g],c.matched[x])&&Lm(h.params,c.params)&&i(h.query)===i(c.query)&&h.hash===c.hash}function Fc(i,h){return(i.aliasOf||i)===(h.aliasOf||h)}function Lm(i,h){if(Object.keys(i).length!==Object.keys(h).length)return!1;for(const c in i)if(!Yv(i[c],h[c]))return!1;return!0}function Yv(i,h){return Xu(i)?nd(i,h):Xu(h)?nd(h,i):i===h}function nd(i,h){return Xu(h)?i.length===h.length&&i.every((c,g)=>c===h[g]):i.length===1&&i[0]===h}function Qv(i,h){if(i.startsWith("/"))return i;if(!i)return h;const c=h.split("/"),g=i.split("/");let x=c.length-1,S,H;for(S=0;S<g.length;S++)if(H=g[S],H!==".")if(H==="..")x>1&&x--;else break;return c.slice(0,x).join("/")+"/"+g.slice(S-(S===g.length?1:0)).join("/")}var ep;(function(i){i.pop="pop",i.push="push"})(ep||(ep={}));var Vc;(function(i){i.back="back",i.forward="forward",i.unknown=""})(Vc||(Vc={}));function Zv(i){if(!i)if(vc){const h=document.querySelector("base");i=h&&h.getAttribute("href")||"/",i=i.replace(/^\w+:\/\/[^\/]+/,"")}else i="/";return i[0]!=="/"&&i[0]!=="#"&&(i="/"+i),Kv(i)}const e1=/^[^#]+#/;function t1(i,h){return i.replace(e1,"#")+h}function r1(i,h){const c=document.documentElement.getBoundingClientRect(),g=i.getBoundingClientRect();return{behavior:h.behavior,left:g.left-c.left-(h.left||0),top:g.top-c.top-(h.top||0)}}const Wp=()=>({left:window.pageXOffset,top:window.pageYOffset});function n1(i){let h;if("el"in i){const c=i.el,g=typeof c=="string"&&c.startsWith("#"),x=typeof c=="string"?g?document.getElementById(c.slice(1)):document.querySelector(c):c;if(!x)return;h=r1(x,i)}else h=i;"scrollBehavior"in document.documentElement.style?window.scrollTo(h):window.scrollTo(h.left!=null?h.left:window.pageXOffset,h.top!=null?h.top:window.pageYOffset)}function id(i,h){return(history.state?history.state.position-h:-1)+i}const wh=new Map;function i1(i,h){wh.set(i,h)}function s1(i){const h=wh.get(i);return wh.delete(i),h}let a1=()=>location.protocol+"//"+location.host;function Mm(i,h){const{pathname:c,search:g,hash:x}=h,S=i.indexOf("#");if(S>-1){let ie=x.includes(i.slice(S))?i.slice(S).length:1,ce=x.slice(ie);return ce[0]!=="/"&&(ce="/"+ce),rd(ce,"")}return rd(c,i)+g+x}function o1(i,h,c,g){let x=[],S=[],H=null;const ie=({state:tt})=>{const Ct=Mm(i,location),$t=c.value,Rt=h.value;let Fr=0;if(tt){if(c.value=Ct,h.value=tt,H&&H===$t){H=null;return}Fr=Rt?tt.position-Rt.position:0}else g(Ct);x.forEach(Ze=>{Ze(c.value,$t,{delta:Fr,type:ep.pop,direction:Fr?Fr>0?Vc.forward:Vc.back:Vc.unknown})})};function ce(){H=c.value}function De(tt){x.push(tt);const Ct=()=>{const $t=x.indexOf(tt);$t>-1&&x.splice($t,1)};return S.push(Ct),Ct}function be(){const{history:tt}=window;!tt.state||tt.replaceState(qs({},tt.state,{scroll:Wp()}),"")}function Ge(){for(const tt of S)tt();S=[],window.removeEventListener("popstate",ie),window.removeEventListener("beforeunload",be)}return window.addEventListener("popstate",ie),window.addEventListener("beforeunload",be),{pauseListeners:ce,listen:De,destroy:Ge}}function sd(i,h,c,g=!1,x=!1){return{back:i,current:h,forward:c,replaced:g,position:window.history.length,scroll:x?Wp():null}}function u1(i){const{history:h,location:c}=window,g={value:Mm(i,c)},x={value:h.state};x.value||S(g.value,{back:null,current:g.value,forward:null,position:h.length-1,replaced:!0,scroll:null},!0);function S(ce,De,be){const Ge=i.indexOf("#"),tt=Ge>-1?(c.host&&document.querySelector("base")?i:i.slice(Ge))+ce:a1()+i+ce;try{h[be?"replaceState":"pushState"](De,"",tt),x.value=De}catch(Ct){console.error(Ct),c[be?"replace":"assign"](tt)}}function H(ce,De){const be=qs({},h.state,sd(x.value.back,ce,x.value.forward,!0),De,{position:x.value.position});S(ce,be,!0),g.value=ce}function ie(ce,De){const be=qs({},x.value,h.state,{forward:ce,scroll:Wp()});S(be.current,be,!0);const Ge=qs({},sd(g.value,ce,null),{position:be.position+1},De);S(ce,Ge,!1),g.value=ce}return{location:g,state:x,push:ie,replace:H}}function l1(i){i=Zv(i);const h=u1(i),c=o1(i,h.state,h.location,h.replace);function g(S,H=!0){H||c.pauseListeners(),history.go(S)}const x=qs({location:"",base:i,go:g,createHref:t1.bind(null,i)},h,c);return Object.defineProperty(x,"location",{enumerable:!0,get:()=>h.location.value}),Object.defineProperty(x,"state",{enumerable:!0,get:()=>h.state.value}),x}function c1(i){return i=location.host?i||location.pathname+location.search:"",i.includes("#")||(i+="#"),l1(i)}function p1(i){return typeof i=="string"||i&&typeof i=="object"}function jm(i){return typeof i=="string"||typeof i=="symbol"}const Xl={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Rm=Symbol("");var ad;(function(i){i[i.aborted=4]="aborted",i[i.cancelled=8]="cancelled",i[i.duplicated=16]="duplicated"})(ad||(ad={}));function kc(i,h){return qs(new Error,{type:i,[Rm]:!0},h)}function Ll(i,h){return i instanceof Error&&Rm in i&&(h==null||!!(i.type&h))}const od="[^/]+?",h1={sensitive:!1,strict:!1,start:!0,end:!0},f1=/[.+*?^${}()[\]/\\]/g;function d1(i,h){const c=qs({},h1,h),g=[];let x=c.start?"^":"";const S=[];for(const De of i){const be=De.length?[]:[90];c.strict&&!De.length&&(x+="/");for(let Ge=0;Ge<De.length;Ge++){const tt=De[Ge];let Ct=40+(c.sensitive?.25:0);if(tt.type===0)Ge||(x+="/"),x+=tt.value.replace(f1,"\\$&"),Ct+=40;else if(tt.type===1){const{value:$t,repeatable:Rt,optional:Fr,regexp:Ze}=tt;S.push({name:$t,repeatable:Rt,optional:Fr});const ct=Ze||od;if(ct!==od){Ct+=10;try{new RegExp(`(${ct})`)}catch(rr){throw new Error(`Invalid custom RegExp for param "${$t}" (${ct}): `+rr.message)}}let Et=Rt?`((?:${ct})(?:/(?:${ct}))*)`:`(${ct})`;Ge||(Et=Fr&&De.length<2?`(?:/${Et})`:"/"+Et),Fr&&(Et+="?"),x+=Et,Ct+=20,Fr&&(Ct+=-8),Rt&&(Ct+=-20),ct===".*"&&(Ct+=-50)}be.push(Ct)}g.push(be)}if(c.strict&&c.end){const De=g.length-1;g[De][g[De].length-1]+=.7000000000000001}c.strict||(x+="/?"),c.end?x+="$":c.strict&&(x+="(?:/|$)");const H=new RegExp(x,c.sensitive?"":"i");function ie(De){const be=De.match(H),Ge={};if(!be)return null;for(let tt=1;tt<be.length;tt++){const Ct=be[tt]||"",$t=S[tt-1];Ge[$t.name]=Ct&&$t.repeatable?Ct.split("/"):Ct}return Ge}function ce(De){let be="",Ge=!1;for(const tt of i){(!Ge||!be.endsWith("/"))&&(be+="/"),Ge=!1;for(const Ct of tt)if(Ct.type===0)be+=Ct.value;else if(Ct.type===1){const{value:$t,repeatable:Rt,optional:Fr}=Ct,Ze=$t in De?De[$t]:"";if(Xu(Ze)&&!Rt)throw new Error(`Provided param "${$t}" is an array but it is not repeatable (* or + modifiers)`);const ct=Xu(Ze)?Ze.join("/"):Ze;if(!ct)if(Fr)tt.length<2&&(be.endsWith("/")?be=be.slice(0,-1):Ge=!0);else throw new Error(`Missing required param "${$t}"`);be+=ct}}return be||"/"}return{re:H,score:g,keys:S,parse:ie,stringify:ce}}function m1(i,h){let c=0;for(;c<i.length&&c<h.length;){const g=h[c]-i[c];if(g)return g;c++}return i.length<h.length?i.length===1&&i[0]===40+40?-1:1:i.length>h.length?h.length===1&&h[0]===40+40?1:-1:0}function g1(i,h){let c=0;const g=i.score,x=h.score;for(;c<g.length&&c<x.length;){const S=m1(g[c],x[c]);if(S)return S;c++}if(Math.abs(x.length-g.length)===1){if(ud(g))return 1;if(ud(x))return-1}return x.length-g.length}function ud(i){const h=i[i.length-1];return i.length>0&&h[h.length-1]<0}const y1={type:0,value:""},D1=/[a-zA-Z0-9_]/;function v1(i){if(!i)return[[]];if(i==="/")return[[y1]];if(!i.startsWith("/"))throw new Error(`Invalid path "${i}"`);function h(Ct){throw new Error(`ERR (${c})/"${De}": ${Ct}`)}let c=0,g=c;const x=[];let S;function H(){S&&x.push(S),S=[]}let ie=0,ce,De="",be="";function Ge(){!De||(c===0?S.push({type:0,value:De}):c===1||c===2||c===3?(S.length>1&&(ce==="*"||ce==="+")&&h(`A repeatable param (${De}) must be alone in its segment. eg: '/:ids+.`),S.push({type:1,value:De,regexp:be,repeatable:ce==="*"||ce==="+",optional:ce==="*"||ce==="?"})):h("Invalid state to consume buffer"),De="")}function tt(){De+=ce}for(;ie<i.length;){if(ce=i[ie++],ce==="\\"&&c!==2){g=c,c=4;continue}switch(c){case 0:ce==="/"?(De&&Ge(),H()):ce===":"?(Ge(),c=1):tt();break;case 4:tt(),c=g;break;case 1:ce==="("?c=2:D1.test(ce)?tt():(Ge(),c=0,ce!=="*"&&ce!=="?"&&ce!=="+"&&ie--);break;case 2:ce===")"?be[be.length-1]=="\\"?be=be.slice(0,-1)+ce:c=3:be+=ce;break;case 3:Ge(),c=0,ce!=="*"&&ce!=="?"&&ce!=="+"&&ie--,be="";break;default:h("Unknown state");break}}return c===2&&h(`Unfinished custom RegExp for param "${De}"`),Ge(),H(),x}function x1(i,h,c){const g=d1(v1(i.path),c),x=qs(g,{record:i,parent:h,children:[],alias:[]});return h&&!x.record.aliasOf==!h.record.aliasOf&&h.children.push(x),x}function C1(i,h){const c=[],g=new Map;h=pd({strict:!1,end:!0,sensitive:!1},h);function x(be){return g.get(be)}function S(be,Ge,tt){const Ct=!tt,$t=E1(be);$t.aliasOf=tt&&tt.record;const Rt=pd(h,be),Fr=[$t];if("alias"in be){const Et=typeof be.alias=="string"?[be.alias]:be.alias;for(const rr of Et)Fr.push(qs({},$t,{components:tt?tt.record.components:$t.components,path:rr,aliasOf:tt?tt.record:$t}))}let Ze,ct;for(const Et of Fr){const{path:rr}=Et;if(Ge&&rr[0]!=="/"){const gr=Ge.record.path,Pn=gr[gr.length-1]==="/"?"":"/";Et.path=Ge.record.path+(rr&&Pn+rr)}if(Ze=x1(Et,Ge,Rt),tt?tt.alias.push(Ze):(ct=ct||Ze,ct!==Ze&&ct.alias.push(Ze),Ct&&be.name&&!cd(Ze)&&H(be.name)),$t.children){const gr=$t.children;for(let Pn=0;Pn<gr.length;Pn++)S(gr[Pn],Ze,tt&&tt.children[Pn])}tt=tt||Ze,(Ze.record.components&&Object.keys(Ze.record.components).length||Ze.record.name||Ze.record.redirect)&&ce(Ze)}return ct?()=>{H(ct)}:Wc}function H(be){if(jm(be)){const Ge=g.get(be);Ge&&(g.delete(be),c.splice(c.indexOf(Ge),1),Ge.children.forEach(H),Ge.alias.forEach(H))}else{const Ge=c.indexOf(be);Ge>-1&&(c.splice(Ge,1),be.record.name&&g.delete(be.record.name),be.children.forEach(H),be.alias.forEach(H))}}function ie(){return c}function ce(be){let Ge=0;for(;Ge<c.length&&g1(be,c[Ge])>=0&&(be.record.path!==c[Ge].record.path||!$m(be,c[Ge]));)Ge++;c.splice(Ge,0,be),be.record.name&&!cd(be)&&g.set(be.record.name,be)}function De(be,Ge){let tt,Ct={},$t,Rt;if("name"in be&&be.name){if(tt=g.get(be.name),!tt)throw kc(1,{location:be});Rt=tt.record.name,Ct=qs(ld(Ge.params,tt.keys.filter(ct=>!ct.optional).map(ct=>ct.name)),be.params&&ld(be.params,tt.keys.map(ct=>ct.name))),$t=tt.stringify(Ct)}else if("path"in be)$t=be.path,tt=c.find(ct=>ct.re.test($t)),tt&&(Ct=tt.parse($t),Rt=tt.record.name);else{if(tt=Ge.name?g.get(Ge.name):c.find(ct=>ct.re.test(Ge.path)),!tt)throw kc(1,{location:be,currentLocation:Ge});Rt=tt.record.name,Ct=qs({},Ge.params,be.params),$t=tt.stringify(Ct)}const Fr=[];let Ze=tt;for(;Ze;)Fr.unshift(Ze.record),Ze=Ze.parent;return{name:Rt,path:$t,params:Ct,matched:Fr,meta:A1(Fr)}}return i.forEach(be=>S(be)),{addRoute:S,resolve:De,removeRoute:H,getRoutes:ie,getRecordMatcher:x}}function ld(i,h){const c={};for(const g of h)g in i&&(c[g]=i[g]);return c}function E1(i){return{path:i.path,redirect:i.redirect,name:i.name,meta:i.meta||{},aliasOf:void 0,beforeEnter:i.beforeEnter,props:b1(i),children:i.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in i?i.components||null:i.component&&{default:i.component}}}function b1(i){const h={},c=i.props||!1;if("component"in i)h.default=c;else for(const g in i.components)h[g]=typeof c=="boolean"?c:c[g];return h}function cd(i){for(;i;){if(i.record.aliasOf)return!0;i=i.parent}return!1}function A1(i){return i.reduce((h,c)=>qs(h,c.meta),{})}function pd(i,h){const c={};for(const g in i)c[g]=g in h?h[g]:i[g];return c}function $m(i,h){return h.children.some(c=>c===i||$m(i,c))}const zm=/#/g,w1=/&/g,T1=/\//g,S1=/=/g,F1=/\?/g,Um=/\+/g,k1=/%5B/g,P1=/%5D/g,Hm=/%5E/g,N1=/%60/g,qm=/%7B/g,B1=/%7C/g,Wm=/%7D/g,_1=/%20/g;function Qh(i){return encodeURI(""+i).replace(B1,"|").replace(k1,"[").replace(P1,"]")}function I1(i){return Qh(i).replace(qm,"{").replace(Wm,"}").replace(Hm,"^")}function Th(i){return Qh(i).replace(Um,"%2B").replace(_1,"+").replace(zm,"%23").replace(w1,"%26").replace(N1,"`").replace(qm,"{").replace(Wm,"}").replace(Hm,"^")}function O1(i){return Th(i).replace(S1,"%3D")}function L1(i){return Qh(i).replace(zm,"%23").replace(F1,"%3F")}function M1(i){return i==null?"":L1(i).replace(T1,"%2F")}function Sp(i){try{return decodeURIComponent(""+i)}catch{}return""+i}function j1(i){const h={};if(i===""||i==="?")return h;const g=(i[0]==="?"?i.slice(1):i).split("&");for(let x=0;x<g.length;++x){const S=g[x].replace(Um," "),H=S.indexOf("="),ie=Sp(H<0?S:S.slice(0,H)),ce=H<0?null:Sp(S.slice(H+1));if(ie in h){let De=h[ie];Xu(De)||(De=h[ie]=[De]),De.push(ce)}else h[ie]=ce}return h}function hd(i){let h="";for(let c in i){const g=i[c];if(c=O1(c),g==null){g!==void 0&&(h+=(h.length?"&":"")+c);continue}(Xu(g)?g.map(S=>S&&Th(S)):[g&&Th(g)]).forEach(S=>{S!==void 0&&(h+=(h.length?"&":"")+c,S!=null&&(h+="="+S))})}return h}function R1(i){const h={};for(const c in i){const g=i[c];g!==void 0&&(h[c]=Xu(g)?g.map(x=>x==null?null:""+x):g==null?g:""+g)}return h}const $1=Symbol(""),fd=Symbol(""),Zh=Symbol(""),ef=Symbol(""),Sh=Symbol("");function Rc(){let i=[];function h(g){return i.push(g),()=>{const x=i.indexOf(g);x>-1&&i.splice(x,1)}}function c(){i=[]}return{add:h,list:()=>i,reset:c}}function Ql(i,h,c,g,x){const S=g&&(g.enterCallbacks[x]=g.enterCallbacks[x]||[]);return()=>new Promise((H,ie)=>{const ce=Ge=>{Ge===!1?ie(kc(4,{from:c,to:h})):Ge instanceof Error?ie(Ge):p1(Ge)?ie(kc(2,{from:h,to:Ge})):(S&&g.enterCallbacks[x]===S&&typeof Ge=="function"&&S.push(Ge),H())},De=i.call(g&&g.instances[x],h,c,ce);let be=Promise.resolve(De);i.length<3&&(be=be.then(ce)),be.catch(Ge=>ie(Ge))})}function rh(i,h,c,g){const x=[];for(const S of i)for(const H in S.components){let ie=S.components[H];if(!(h!=="beforeRouteEnter"&&!S.instances[H]))if(z1(ie)){const De=(ie.__vccOpts||ie)[h];De&&x.push(Ql(De,c,g,S,H))}else{let ce=ie();x.push(()=>ce.then(De=>{if(!De)return Promise.reject(new Error(`Couldn't resolve component "${H}" at "${S.path}"`));const be=Vv(De)?De.default:De;S.components[H]=be;const tt=(be.__vccOpts||be)[h];return tt&&Ql(tt,c,g,S,H)()}))}}return x}function z1(i){return typeof i=="object"||"displayName"in i||"props"in i||"__vccOpts"in i}function dd(i){const h=Rl(Zh),c=Rl(ef),g=Ws(()=>h.resolve(hs(i.to))),x=Ws(()=>{const{matched:ce}=g.value,{length:De}=ce,be=ce[De-1],Ge=c.matched;if(!be||!Ge.length)return-1;const tt=Ge.findIndex(Fc.bind(null,be));if(tt>-1)return tt;const Ct=md(ce[De-2]);return De>1&&md(be)===Ct&&Ge[Ge.length-1].path!==Ct?Ge.findIndex(Fc.bind(null,ce[De-2])):tt}),S=Ws(()=>x.value>-1&&W1(c.params,g.value.params)),H=Ws(()=>x.value>-1&&x.value===c.matched.length-1&&Lm(c.params,g.value.params));function ie(ce={}){return q1(ce)?h[hs(i.replace)?"replace":"push"](hs(i.to)).catch(Wc):Promise.resolve()}return{route:g,href:Ws(()=>g.value.href),isActive:S,isExactActive:H,navigate:ie}}const U1=Yu({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:dd,setup(i,{slots:h}){const c=_c(dd(i)),{options:g}=Rl(Zh),x=Ws(()=>({[gd(i.activeClass,g.linkActiveClass,"router-link-active")]:c.isActive,[gd(i.exactActiveClass,g.linkExactActiveClass,"router-link-exact-active")]:c.isExactActive}));return()=>{const S=h.default&&h.default(c);return i.custom?S:Kh("a",{"aria-current":c.isExactActive?i.ariaCurrentValue:null,href:c.href,onClick:c.navigate,class:x.value},S)}}}),H1=U1;function q1(i){if(!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)&&!i.defaultPrevented&&!(i.button!==void 0&&i.button!==0)){if(i.currentTarget&&i.currentTarget.getAttribute){const h=i.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(h))return}return i.preventDefault&&i.preventDefault(),!0}}function W1(i,h){for(const c in h){const g=h[c],x=i[c];if(typeof g=="string"){if(g!==x)return!1}else if(!Xu(x)||x.length!==g.length||g.some((S,H)=>S!==x[H]))return!1}return!0}function md(i){return i?i.aliasOf?i.aliasOf.path:i.path:""}const gd=(i,h,c)=>i??h??c,V1=Yu({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(i,{attrs:h,slots:c}){const g=Rl(Sh),x=Ws(()=>i.route||g.value),S=Rl(fd,0),H=Ws(()=>{let De=hs(S);const{matched:be}=x.value;let Ge;for(;(Ge=be[De])&&!Ge.components;)De++;return De}),ie=Ws(()=>x.value.matched[H.value]);fp(fd,Ws(()=>H.value+1)),fp($1,ie),fp(Sh,x);const ce=Ta();return Ua(()=>[ce.value,ie.value,i.name],([De,be,Ge],[tt,Ct,$t])=>{be&&(be.instances[Ge]=De,Ct&&Ct!==be&&De&&De===tt&&(be.leaveGuards.size||(be.leaveGuards=Ct.leaveGuards),be.updateGuards.size||(be.updateGuards=Ct.updateGuards))),De&&be&&(!Ct||!Fc(be,Ct)||!tt)&&(be.enterCallbacks[Ge]||[]).forEach(Rt=>Rt(De))},{flush:"post"}),()=>{const De=x.value,be=i.name,Ge=ie.value,tt=Ge&&Ge.components[be];if(!tt)return yd(c.default,{Component:tt,route:De});const Ct=Ge.props[be],$t=Ct?Ct===!0?De.params:typeof Ct=="function"?Ct(De):Ct:null,Fr=Kh(tt,qs({},$t,h,{onVnodeUnmounted:Ze=>{Ze.component.isUnmounted&&(Ge.instances[be]=null)},ref:ce}));return yd(c.default,{Component:Fr,route:De})||Fr}}});function yd(i,h){if(!i)return null;const c=i(h);return c.length===1?c[0]:c}const G1=V1;function K1(i){const h=C1(i.routes,i),c=i.parseQuery||j1,g=i.stringifyQuery||hd,x=i.history,S=Rc(),H=Rc(),ie=Rc(),ce=zc(Xl);let De=Xl;vc&&i.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const be=eh.bind(null,Mr=>""+Mr),Ge=eh.bind(null,M1),tt=eh.bind(null,Sp);function Ct(Mr,$r){let yr,cn;return jm(Mr)?(yr=h.getRecordMatcher(Mr),cn=$r):cn=Mr,h.addRoute(cn,yr)}function $t(Mr){const $r=h.getRecordMatcher(Mr);$r&&h.removeRoute($r)}function Rt(){return h.getRoutes().map(Mr=>Mr.record)}function Fr(Mr){return!!h.getRecordMatcher(Mr)}function Ze(Mr,$r){if($r=qs({},$r||ce.value),typeof Mr=="string"){const Xe=th(c,Mr,$r.path),At=h.resolve({path:Xe.path},$r),wr=x.createHref(Xe.fullPath);return qs(Xe,At,{params:tt(At.params),hash:Sp(Xe.hash),redirectedFrom:void 0,href:wr})}let yr;if("path"in Mr)yr=qs({},Mr,{path:th(c,Mr.path,$r.path).path});else{const Xe=qs({},Mr.params);for(const At in Xe)Xe[At]==null&&delete Xe[At];yr=qs({},Mr,{params:Ge(Mr.params)}),$r.params=Ge($r.params)}const cn=h.resolve(yr,$r),$n=Mr.hash||"";cn.params=be(tt(cn.params));const ci=Jv(g,qs({},Mr,{hash:I1($n),path:cn.path})),Mn=x.createHref(ci);return qs({fullPath:ci,hash:$n,query:g===hd?R1(Mr.query):Mr.query||{}},cn,{redirectedFrom:void 0,href:Mn})}function ct(Mr){return typeof Mr=="string"?th(c,Mr,ce.value.path):qs({},Mr)}function Et(Mr,$r){if(De!==Mr)return kc(8,{from:$r,to:Mr})}function rr(Mr){return kr(Mr)}function gr(Mr){return rr(qs(ct(Mr),{replace:!0}))}function Pn(Mr){const $r=Mr.matched[Mr.matched.length-1];if($r&&$r.redirect){const{redirect:yr}=$r;let cn=typeof yr=="function"?yr(Mr):yr;return typeof cn=="string"&&(cn=cn.includes("?")||cn.includes("#")?cn=ct(cn):{path:cn},cn.params={}),qs({query:Mr.query,hash:Mr.hash,params:"path"in cn?{}:Mr.params},cn)}}function kr(Mr,$r){const yr=De=Ze(Mr),cn=ce.value,$n=Mr.state,ci=Mr.force,Mn=Mr.replace===!0,Xe=Pn(yr);if(Xe)return kr(qs(ct(Xe),{state:typeof Xe=="object"?qs({},$n,Xe.state):$n,force:ci,replace:Mn}),$r||yr);const At=yr;At.redirectedFrom=$r;let wr;return!ci&&Xv(g,cn,yr)&&(wr=kc(16,{to:At,from:cn}),Vi(cn,cn,!0,!1)),(wr?Promise.resolve(wr):Dn(At,cn)).catch(Hr=>Ll(Hr)?Ll(Hr,2)?Hr:ti(Hr):ur(Hr,At,cn)).then(Hr=>{if(Hr){if(Ll(Hr,2))return kr(qs({replace:Mn},ct(Hr.to),{state:typeof Hr.to=="object"?qs({},$n,Hr.to.state):$n,force:ci}),$r||At)}else Hr=gn(At,cn,!0,Mn,$n);return mn(At,cn,Hr),Hr})}function ln(Mr,$r){const yr=Et(Mr,$r);return yr?Promise.reject(yr):Promise.resolve()}function Dn(Mr,$r){let yr;const[cn,$n,ci]=J1(Mr,$r);yr=rh(cn.reverse(),"beforeRouteLeave",Mr,$r);for(const Xe of cn)Xe.leaveGuards.forEach(At=>{yr.push(Ql(At,Mr,$r))});const Mn=ln.bind(null,Mr,$r);return yr.push(Mn),Dc(yr).then(()=>{yr=[];for(const Xe of S.list())yr.push(Ql(Xe,Mr,$r));return yr.push(Mn),Dc(yr)}).then(()=>{yr=rh($n,"beforeRouteUpdate",Mr,$r);for(const Xe of $n)Xe.updateGuards.forEach(At=>{yr.push(Ql(At,Mr,$r))});return yr.push(Mn),Dc(yr)}).then(()=>{yr=[];for(const Xe of Mr.matched)if(Xe.beforeEnter&&!$r.matched.includes(Xe))if(Xu(Xe.beforeEnter))for(const At of Xe.beforeEnter)yr.push(Ql(At,Mr,$r));else yr.push(Ql(Xe.beforeEnter,Mr,$r));return yr.push(Mn),Dc(yr)}).then(()=>(Mr.matched.forEach(Xe=>Xe.enterCallbacks={}),yr=rh(ci,"beforeRouteEnter",Mr,$r),yr.push(Mn),Dc(yr))).then(()=>{yr=[];for(const Xe of H.list())yr.push(Ql(Xe,Mr,$r));return yr.push(Mn),Dc(yr)}).catch(Xe=>Ll(Xe,8)?Xe:Promise.reject(Xe))}function mn(Mr,$r,yr){for(const cn of ie.list())cn(Mr,$r,yr)}function gn(Mr,$r,yr,cn,$n){const ci=Et(Mr,$r);if(ci)return ci;const Mn=$r===Xl,Xe=vc?history.state:{};yr&&(cn||Mn?x.replace(Mr.fullPath,qs({scroll:Mn&&Xe&&Xe.scroll},$n)):x.push(Mr.fullPath,$n)),ce.value=Mr,Vi(Mr,$r,yr,Mn),ti()}let Xn;function hr(){Xn||(Xn=x.listen((Mr,$r,yr)=>{if(!ts.listening)return;const cn=Ze(Mr),$n=Pn(cn);if($n){kr(qs($n,{replace:!0}),cn).catch(Wc);return}De=cn;const ci=ce.value;vc&&i1(id(ci.fullPath,yr.delta),Wp()),Dn(cn,ci).catch(Mn=>Ll(Mn,12)?Mn:Ll(Mn,2)?(kr(Mn.to,cn).then(Xe=>{Ll(Xe,20)&&!yr.delta&&yr.type===ep.pop&&x.go(-1,!1)}).catch(Wc),Promise.reject()):(yr.delta&&x.go(-yr.delta,!1),ur(Mn,cn,ci))).then(Mn=>{Mn=Mn||gn(cn,ci,!1),Mn&&(yr.delta&&!Ll(Mn,8)?x.go(-yr.delta,!1):yr.type===ep.pop&&Ll(Mn,20)&&x.go(-1,!1)),mn(cn,ci,Mn)}).catch(Wc)}))}let Tn=Rc(),Ce=Rc(),tn;function ur(Mr,$r,yr){ti(Mr);const cn=Ce.list();return cn.length?cn.forEach($n=>$n(Mr,$r,yr)):console.error(Mr),Promise.reject(Mr)}function kn(){return tn&&ce.value!==Xl?Promise.resolve():new Promise((Mr,$r)=>{Tn.add([Mr,$r])})}function ti(Mr){return tn||(tn=!Mr,hr(),Tn.list().forEach(([$r,yr])=>Mr?yr(Mr):$r()),Tn.reset()),Mr}function Vi(Mr,$r,yr,cn){const{scrollBehavior:$n}=i;if(!vc||!$n)return Promise.resolve();const ci=!yr&&s1(id(Mr.fullPath,0))||(cn||!yr)&&history.state&&history.state.scroll||null;return Op().then(()=>$n(Mr,$r,ci)).then(Mn=>Mn&&n1(Mn)).catch(Mn=>ur(Mn,Mr,$r))}const as=Mr=>x.go(Mr);let fs;const es=new Set,ts={currentRoute:ce,listening:!0,addRoute:Ct,removeRoute:$t,hasRoute:Fr,getRoutes:Rt,resolve:Ze,options:i,push:rr,replace:gr,go:as,back:()=>as(-1),forward:()=>as(1),beforeEach:S.add,beforeResolve:H.add,afterEach:ie.add,onError:Ce.add,isReady:kn,install(Mr){const $r=this;Mr.component("RouterLink",H1),Mr.component("RouterView",G1),Mr.config.globalProperties.$router=$r,Object.defineProperty(Mr.config.globalProperties,"$route",{enumerable:!0,get:()=>hs(ce)}),vc&&!fs&&ce.value===Xl&&(fs=!0,rr(x.location).catch($n=>{}));const yr={};for(const $n in Xl)yr[$n]=Ws(()=>ce.value[$n]);Mr.provide(Zh,$r),Mr.provide(ef,_c(yr)),Mr.provide(Sh,ce);const cn=Mr.unmount;es.add(Mr),Mr.unmount=function(){es.delete(Mr),es.size<1&&(De=Xl,Xn&&Xn(),Xn=null,ce.value=Xl,fs=!1,tn=!1),cn()}}};return ts}function Dc(i){return i.reduce((h,c)=>h.then(()=>c()),Promise.resolve())}function J1(i,h){const c=[],g=[],x=[],S=Math.max(h.matched.length,i.matched.length);for(let H=0;H<S;H++){const ie=h.matched[H];ie&&(i.matched.find(De=>Fc(De,ie))?g.push(ie):c.push(ie));const ce=i.matched[H];ce&&(h.matched.find(De=>Fc(De,ce))||x.push(ce))}return[c,g,x]}function X1(){return Rl(ef)}const Y1=Yu({__name:"FileIcon",props:{id:null},setup(i){const h=i,c=Ws(()=>h.id.split(/\./g).pop()),g=Ws(()=>{switch(c.value){case"vue":return"i-logos-vue";default:return"i-carbon-document-blank"}});return(x,S)=>(ma(),go("div",{class:Ac(hs(g))},null,2))}}),Q1={open:""},Z1={"cursor-default":"","select-none":"","text-sm":"",truncate:"",p:"y1"},ex={"ml-1":""},tx=Yu({__name:"ModuleTreeNode",props:{node:null,icon:{default:"i-carbon-folder"}},setup(i){const h=X1();return(c,g)=>{const x=vp("ModuleTreeNode",!0),S=Y1,H=vp("RouterLink");return ma(),go("details",Q1,[qi("summary",Z1,[qi("div",{class:Ac(i.icon)},null,2),Vu(" "+jo(i.node.name),1)]),(ma(!0),go(Ro,null,yf(Object.entries(i.node.children),ie=>(ma(),Tc(x,{key:ie[0],ml2:"",node:ie[1]},null,8,["node"]))),128)),(ma(!0),go(Ro,null,yf(i.node.items,ie=>(ma(),go("div",{key:ie.full,ml4:"","ws-nowrap":""},[Gs(H,{block:"","text-sm":"",p:"x2 y1",rounded:"",to:`/module/${encodeURIComponent(ie.full)}`,class:Ac({"bg-gray/10":ie.full===hs(h).params.id})},{default:jl(()=>[Gs(S,{id:ie.path},null,8,["id"]),qi("span",ex,jo(ie.path.split("/").pop()),1)]),_:2},1032,["to","class"])]))),128))])}}}),rx="/__unocss/icon.svg",nx={p:"x4 y3",b:"b main",flex:"","children:my-auto":""},ix=qi("div",{flex:"","flex-auto":"","children:my-auto":"","ws-nowrap":""},[qi("img",{src:rx,filter:"","dark:invert":"","inline-block":"",h:"1.3em",m:"r-1.5"}),qi("div",{"of-hidden":""},[Vu(" Inspector "),qi("sup",{"text-teal5":"","bg-teal5:10":"",p:"x1.5 y0.5",rounded:"",italic:""},"beta")])],-1),sx=Yu({__name:"NarBar",setup(i){const h=hD(),c=_y(h);return(g,x)=>(ma(),go("nav",nx,[ix,qi("button",{"text-lg":"","i-carbon-sun":"","dark:i-carbon-moon":"",onClick:x[0]||(x[0]=S=>hs(c)())})]))}}),ax={"h-full":""},ox={b:"r main","of-hidden":""},ux={pt:"4",flex:"~ col gap-3"},lx=qi("div",{"i-carbon-dashboard":""},null,-1),cx=qi("span",null," Overview ",-1),px=qi("div",{"i-carbon-terminal":""},null,-1),hx=qi("span",null," REPL ",-1),fx=qi("div",{b:"b main"},null,-1),dx={b:"r main",class:"scrolls scrolls-sidebar"},mx=Yu({__name:"Sidebar",setup(i){return(h,c)=>{const g=sx,x=vp("RouterLink"),S=tx;return ma(),go("div",ax,[qi("div",ox,[Gs(g),qi("div",ux,[Gs(x,{block:"",to:"/","text-sm":"",m:"l-3.7"},{default:jl(()=>[lx,cx]),_:1}),Gs(x,{block:"",to:"/repl","text-sm":"",m:"l-3.7"},{default:jl(()=>[px,hx]),_:1}),fx])]),qi("div",dx,[Object.keys(hs(cp).workspace.children).length?(ma(),Tc(S,{key:0,node:hs(cp).workspace,p:"l3 t4",icon:"i-carbon-portfolio"},null,8,["node"])):Ap("",!0),Object.keys(hs(cp).root.children).length?(ma(),Tc(S,{key:1,node:hs(cp).root,p:"l3 t4",icon:"i-carbon-vmdk-disk"},null,8,["node"])):Ap("",!0)])])}}}),gx={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((i,h)=>(i[h.id]=h)&&i,{})}},methods:{updatePaneComponents(){this.panes.forEach(i=>{i.update&&i.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[i.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(i,h){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=h},onMouseMove(i){this.touch.mouseDown&&(i.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(i)),this.$emit("resize",this.panes.map(h=>({min:h.min,max:h.max,size:h.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(i,h){"ontouchstart"in window&&(i.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===h?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(i,h),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=h,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[h])},onSplitterDblClick(i,h){let c=0;this.panes=this.panes.map((g,x)=>(g.size=x===h?g.max:g.min,x!==h&&(c+=g.min),g)),this.panes[h].size-=c,this.$emit("pane-maximize",this.panes[h]),this.$emit("resized",this.panes.map(g=>({min:g.min,max:g.max,size:g.size})))},onPaneClick(i,h){this.$emit("pane-click",this.indexedPanes[h])},getCurrentMouseDrag(i){const h=this.container.getBoundingClientRect(),{clientX:c,clientY:g}="ontouchstart"in window&&i.touches?i.touches[0]:i;return{x:c-h.left,y:g-h.top}},getCurrentDragPercentage(i){i=i[this.horizontal?"y":"x"];const h=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(i=h-i),i*100/h},calculatePanesSize(i){const h=this.touch.activeSplitter;let c={prevPanesSize:this.sumPrevPanesSize(h),nextPanesSize:this.sumNextPanesSize(h),prevReachedMinPanes:0,nextReachedMinPanes:0};const g=0+(this.pushOtherPanes?0:c.prevPanesSize),x=100-(this.pushOtherPanes?0:c.nextPanesSize),S=Math.max(Math.min(this.getCurrentDragPercentage(i),x),g);let H=[h,h+1],ie=this.panes[H[0]]||null,ce=this.panes[H[1]]||null;const De=ie.max<100&&S>=ie.max+c.prevPanesSize,be=ce.max<100&&S<=100-(ce.max+this.sumNextPanesSize(h+1));if(De||be){De?(ie.size=ie.max,ce.size=Math.max(100-ie.max-c.prevPanesSize-c.nextPanesSize,0)):(ie.size=Math.max(100-ce.max-c.prevPanesSize-this.sumNextPanesSize(h+1),0),ce.size=ce.max);return}if(this.pushOtherPanes){const Ge=this.doPushOtherPanes(c,S);if(!Ge)return;({sums:c,panesToResize:H}=Ge),ie=this.panes[H[0]]||null,ce=this.panes[H[1]]||null}ie!==null&&(ie.size=Math.min(Math.max(S-c.prevPanesSize-c.prevReachedMinPanes,ie.min),ie.max)),ce!==null&&(ce.size=Math.min(Math.max(100-S-c.nextPanesSize-c.nextReachedMinPanes,ce.min),ce.max))},doPushOtherPanes(i,h){const c=this.touch.activeSplitter,g=[c,c+1];return h<i.prevPanesSize+this.panes[g[0]].min&&(g[0]=this.findPrevExpandedPane(c).index,i.prevReachedMinPanes=0,g[0]<c&&this.panes.forEach((x,S)=>{S>g[0]&&S<=c&&(x.size=x.min,i.prevReachedMinPanes+=x.min)}),i.prevPanesSize=this.sumPrevPanesSize(g[0]),g[0]===void 0)?(i.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((x,S)=>{S>0&&S<=c&&(x.size=x.min,i.prevReachedMinPanes+=x.min)}),this.panes[g[1]].size=100-i.prevReachedMinPanes-this.panes[0].min-i.prevPanesSize-i.nextPanesSize,null):h>100-i.nextPanesSize-this.panes[g[1]].min&&(g[1]=this.findNextExpandedPane(c).index,i.nextReachedMinPanes=0,g[1]>c+1&&this.panes.forEach((x,S)=>{S>c&&S<g[1]&&(x.size=x.min,i.nextReachedMinPanes+=x.min)}),i.nextPanesSize=this.sumNextPanesSize(g[1]-1),g[1]===void 0)?(i.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((x,S)=>{S<this.panesCount-1&&S>=c+1&&(x.size=x.min,i.nextReachedMinPanes+=x.min)}),this.panes[g[0]].size=100-i.prevPanesSize-i.nextReachedMinPanes-this.panes[this.panesCount-1].min-i.nextPanesSize,null):{sums:i,panesToResize:g}},sumPrevPanesSize(i){return this.panes.reduce((h,c,g)=>h+(g<i?c.size:0),0)},sumNextPanesSize(i){return this.panes.reduce((h,c,g)=>h+(g>i+1?c.size:0),0)},findPrevExpandedPane(i){return[...this.panes].reverse().find(h=>h.index<i&&h.size>h.min)||{}},findNextExpandedPane(i){return this.panes.find(h=>h.index>i+1&&h.size>h.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(i=>{const h=i.classList.contains("splitpanes__pane"),c=i.classList.contains("splitpanes__splitter");!h&&!c&&(i.parentNode.removeChild(i),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))})},addSplitter(i,h,c=!1){const g=i-1,x=document.createElement("div");x.classList.add("splitpanes__splitter"),c||(x.onmousedown=S=>this.onMouseDown(S,g),typeof window<"u"&&"ontouchstart"in window&&(x.ontouchstart=S=>this.onMouseDown(S,g)),x.onclick=S=>this.onSplitterClick(S,g+1)),this.dblClickSplitter&&(x.ondblclick=S=>this.onSplitterDblClick(S,g+1)),h.parentNode.insertBefore(x,h)},removeSplitter(i){i.onmousedown=void 0,i.onclick=void 0,i.ondblclick=void 0,i.parentNode.removeChild(i)},redoSplitters(){const i=Array.from(this.container.children);i.forEach(c=>{c.className.includes("splitpanes__splitter")&&this.removeSplitter(c)});let h=0;i.forEach(c=>{c.className.includes("splitpanes__pane")&&(!h&&this.firstSplitter?this.addSplitter(h,c,!0):h&&this.addSplitter(h,c),h++)})},requestUpdate({target:i,...h}){const c=this.indexedPanes[i._.uid];Object.entries(h).forEach(([g,x])=>c[g]=x)},onPaneAdd(i){let h=-1;Array.from(i.$el.parentNode.children).some(x=>(x.className.includes("splitpanes__pane")&&h++,x===i.$el));const c=parseFloat(i.minSize),g=parseFloat(i.maxSize);this.panes.splice(h,0,{id:i._.uid,index:h,min:isNaN(c)?0:c,max:isNaN(g)?100:g,size:i.size===null?null:parseFloat(i.size),givenSize:i.size,update:i.update}),this.panes.forEach((x,S)=>x.index=S),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[h]}),this.$emit("pane-add",{index:h,panes:this.panes.map(x=>({min:x.min,max:x.max,size:x.size}))})})},onPaneRemove(i){const h=this.panes.findIndex(g=>g.id===i._.uid),c=this.panes.splice(h,1)[0];this.panes.forEach((g,x)=>g.index=x),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...c,index:h}}),this.$emit("pane-remove",{removed:c,panes:this.panes.map(g=>({min:g.min,max:g.max,size:g.size}))})})},resetPaneSizes(i={}){!i.addedPane&&!i.removedPane?this.initialPanesSizing():this.panes.some(h=>h.givenSize!==null||h.min||h.max<100)?this.equalizeAfterAddOrRemove(i):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(h=>({min:h.min,max:h.max,size:h.size})))},equalize(){const i=100/this.panesCount;let h=0;const c=[],g=[];this.panes.forEach(x=>{x.size=Math.max(Math.min(i,x.max),x.min),h-=x.size,x.size>=x.max&&c.push(x.id),x.size<=x.min&&g.push(x.id)}),h>.1&&this.readjustSizes(h,c,g)},initialPanesSizing(){let i=100;const h=[],c=[];let g=0;this.panes.forEach(S=>{i-=S.size,S.size!==null&&g++,S.size>=S.max&&h.push(S.id),S.size<=S.min&&c.push(S.id)});let x=100;i>.1&&(this.panes.forEach(S=>{S.size===null&&(S.size=Math.max(Math.min(i/(this.panesCount-g),S.max),S.min)),x-=S.size}),x>.1&&this.readjustSizes(i,h,c))},equalizeAfterAddOrRemove({addedPane:i,removedPane:h}={}){let c=100/this.panesCount,g=0;const x=[],S=[];i&&i.givenSize!==null&&(c=(100-i.givenSize)/(this.panesCount-1)),this.panes.forEach(H=>{g-=H.size,H.size>=H.max&&x.push(H.id),H.size<=H.min&&S.push(H.id)}),!(Math.abs(g)<.1)&&(this.panes.forEach(H=>{i&&i.givenSize!==null&&i.id===H.id||(H.size=Math.max(Math.min(c,H.max),H.min)),g-=H.size,H.size>=H.max&&x.push(H.id),H.size<=H.min&&S.push(H.id)}),g>.1&&this.readjustSizes(g,x,S))},readjustSizes(i,h,c){let g;i>0?g=i/(this.panesCount-h.length):g=i/(this.panesCount-c.length),this.panes.forEach((x,S)=>{if(i>0&&!h.includes(x.id)){const H=Math.max(Math.min(x.size+g,x.max),x.min),ie=H-x.size;i-=ie,x.size=H}else if(!c.includes(x.id)){const H=Math.max(Math.min(x.size+g,x.max),x.min),ie=H-x.size;i-=ie,x.size=H}x.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[x.id].size}%`})}),Math.abs(i)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(i){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((h,c)=>{h.ondblclick=i?g=>this.onSplitterDblClick(g,c):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return Kh("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},yx=(i,h)=>{const c=i.__vccOpts||i;for(const[g,x]of h)c[g]=x;return c},Dx={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(i){this.style=i}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(i){this.requestUpdate({target:this,size:i})},minSizeNumber(i){this.requestUpdate({target:this,min:i})},maxSizeNumber(i){this.requestUpdate({target:this,max:i})}}};function vx(i,h,c,g,x,S){return ma(),go("div",{class:"splitpanes__pane",onClick:h[0]||(h[0]=H=>S.onPaneClick(H,i._.uid)),style:tp(i.style)},[xp(i.$slots,"default")],4)}const Dd=yx(Dx,[["render",vx]]),xx={"h-screen":"","w-screen":"","of-hidden":""},Cx={"h-full":"","of-hidden":""},Ex=Yu({__name:"App",setup(i){return(h,c)=>{const g=mx,x=vp("RouterView");return ma(),go("div",xx,[Gs(hs(gx),null,{default:jl(()=>[Gs(hs(Dd),{size:"20","push-other-panes":!1},{default:jl(()=>[Gs(g)]),_:1}),Gs(hs(Dd),{size:"80"},{default:jl(()=>[qi("div",Cx,[Gs(x)])]),_:1})]),_:1})])}}}),Vm=Cy(Ex);Vm.use(K1({history:c1(),routes:Wv}));Vm.mount("#app");export{bx as A,gv as B,Ws as C,Ap as D,jo as E,Dd as F,sv as G,X1 as H,gx as M,JD as _,Ax as a,Sm as b,go as c,Yu as d,Gs as e,Sx as f,qi as g,D0 as h,hs as i,wa as j,Vu as k,ZD as l,WD as m,tp as n,ma as o,Nm as p,Tc as q,Ta as r,ND as s,BD as t,av as u,yy as v,jl as w,wx as x,Tx as y,Hg as z};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{d as x,r as b,u as S,a as k,b as V,f as B,o as h,c as w,e as a,w as m,g as s,h as C,v as R,i as e,j as p,k as P,n as f,_ as E,l as N,m as U,p as $,q as I}from"./index-
|
|
1
|
+
import{d as x,r as b,u as S,a as k,b as V,f as B,o as h,c as w,e as a,w as m,g as s,h as C,v as R,i as e,j as p,k as P,n as f,_ as E,l as N,m as U,p as $,q as I}from"./index-37a7aac6.js";const L={"h-full":"",grid:"~ rows-[max-content_1fr]","of-hidden":""},M=s("div",null," REPL Playground ",-1),T=s("div",{op60:""}," Edit your code below to test and play UnoCSS's matching and generating. ",-1),j={"h-full":"","of-hidden":"",grid:"","grid-cols-2":""},q=x({__name:"ReplPlayground",setup(y){const r=b(null),l=S(r,"rpel-scrolls"),t=k("unocss:inspector:repl",`<div class="text-sm hover:text-red">
|
|
2
2
|
Hello World
|
|
3
3
|
</div>`),o=V("unocss-inspector-safelist",!1),{data:d}=B(t,o);return(H,n)=>{var i,_;const g=E,v=N,u=U;return h(),w("div",L,[a(g,{ref_key:"status",ref:r},{default:m(()=>[M,T]),_:1},512),a(v,{border:"b gray-400/20",title:""},{default:m(()=>[s("label",null,[C(s("input",{"onUpdate:modelValue":n[0]||(n[0]=c=>p(o)?o.value=c:null),type:"checkbox"},null,512),[[R,e(o)]]),P(" Include safelist ")])]),_:1}),s("div",j,[a(u,{modelValue:e(t),"onUpdate:modelValue":n[1]||(n[1]=c=>p(t)?t.value=c:null),mode:"html",matched:((i=e(d))==null?void 0:i.matched)||[],class:"scrolls rpel-scrolls",style:f(e(l))},null,8,["modelValue","matched","style"]),a(u,{"b-l":"","b-main":"","model-value":((_=e(d))==null?void 0:_.css)||"/* empty */","read-only":!0,mode:"css",class:"scrolls rpel-scrolls",style:f(e(l))},null,8,["model-value","style"])])])}}}),z={};function D(y,r){const l=q;return h(),I(l)}const A=$(z,[["render",D]]);export{A as default};
|
package/dist/client/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;400&family=Fira+Code&display=swap" rel="stylesheet" />
|
|
11
|
-
<script type="module" crossorigin src="/__unocss/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/__unocss/assets/index-37a7aac6.js"></script>
|
|
12
12
|
<link rel="stylesheet" href="/__unocss/assets/index-2d2f163c.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as O,t as R,x as I,d as B,y as W,z as D,r as C,u as U,A as j,B as Z,C as q,i,c as w,e as v,w as A,g as u,D as M,_ as G,o as E,k as S,E as V,F as N,n as P,h as H,v as K,M as J,G as L,m as Q,l as X,q as Y,H as tt}from"./index-2559afe9.js";const F=/^(?!.*\[(?:[^:]+):(?:.+)\]$)((?:.+:)?!?)?(.*)$/,et=(t={})=>{const n=t.prefix??"un-",a=t.prefixedOnly??!1,f=t.trueToNonValued??!1;return{name:"attributify",match(h){const x=O(h);if(!x)return;let e=x[1];if(e.startsWith(n))e=e.slice(n.length);else if(a)return;const l=x[2],[,c="",r=l]=l.match(F)||[];return r==="~"||f&&r==="true"||!r?`${c}${e}`:`${c}${e}-${r}`}}},rt=/(<\w[\w:\.$-]*\s)((?:'[^>]*?'|"[^>]*?"|`[^>]*?`|\{[^>]*?\}|[^>]*?)*)/g,lt=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-]+)(?:=("[^"]*|'[^']*))?/g,z=/[\s'"`;>]+/,st={name:"attributify",extract:({content:t,cursor:n})=>{const a=t.matchAll(rt);let f,h=0;for(const s of a){const[,p,y]=s,b=s.index+p.length;if(n>b&&n<=b+y.length){h=b,f=y;break}}if(!f)return null;const x=f.matchAll(lt);let e=0,l,c;for(const s of x){const[p,y,b]=s,$=h+s.index;if(n>$&&n<=$+p.length){e=$,l=y,c=b==null?void 0:b.slice(1);break}}if(!l||l==="class"||l==="className"||l===":class")return null;if(c===void 0)return{extracted:l,resolveReplacement(s){return{start:e,end:e+l.length,replacement:s}}};const r=e+l.length+2;let m=z.exec(c),o=0,_;for(;m;){const[s]=m;if(n>r+o&&n<=r+o+m.index){_=c.slice(o,o+m.index);break}o+=m.index+s.length,m=z.exec(c.slice(o))}_===void 0&&(_=c.slice(o));const[,d="",g]=_.match(F)||[];return{extracted:`${d}${l}-${g}`,transformSuggestions(s){return s.filter(p=>p.startsWith(`${d}${l}-`)).map(p=>d+p.slice(d.length+l.length+1))},resolveReplacement(s){return{start:o+r,end:o+r+_.length,replacement:d+s.slice(d.length+l.length+1)}}}}},nt=["v-bind:",":"],k=/[\s'"`;]+/g,at=/<\w(?=.*>)[\w:\.$-]*\s((?:['"`\{].*?['"`\}]|.*?)*?)>/gs,ct=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.]+)=?(?:["]([^"]*)["]|[']([^']*)[']|[{]([^}]*)[}])?/gms,T=["placeholder"],ot=t=>{const n=(t==null?void 0:t.ignoreAttributes)??T,a=(t==null?void 0:t.nonValuedAttribute)??!0,f=(t==null?void 0:t.trueToNonValued)??!1;return{name:"attributify",extract({code:h}){const x=Array.from(h.matchAll(at)).flatMap(e=>Array.from((e[1]||"").matchAll(ct))).flatMap(([,e,...l])=>{const c=l.filter(Boolean).join("");if(n.includes(e))return[];for(const r of nt)if(e.startsWith(r)){e=e.slice(r.length);break}if(!c){if(R(e)&&a!==!1){const r=[`[${e}=""]`];return f&&r.push(`[${e}="true"]`),r}return[]}if(["class","className"].includes(e))return c.split(k).filter(R);{if((t==null?void 0:t.prefixedOnly)&&t.prefix&&!e.startsWith(t.prefix))return[];const r=Array.from(c.matchAll(/(?:[\?:].*?)(["'])([^\1]*?)\1/gms)).map(([,,m])=>m.split(k)).flat();return(r.length?r:c.split(k)).filter(Boolean).map(m=>`[${e}~="${m}"]`)}});return new Set(x)}}},it=(t={})=>{t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??T;const n=[et(t)],a=[ot(t)],f=[st];return t.strict||a.unshift(I),{name:"@unocss/preset-attributify",variants:n,extractors:a,options:t,autocomplete:{extractors:f}}},ut={key:0,"h-full":"","of-hidden":""},dt=u("div",{op50:""}," Module ",-1),ft=u("div",{"i-carbon-launch":""},null,-1),mt=u("div",{op50:""}," Matched Rules ",-1),ht=u("div",{op50:""}," CSS Size ",-1),_t=u("span",{op50:""},"gzipped",-1),pt={key:0,"row-span-3":""},xt=u("div",{op50:""}," Potentially Unmatched ",-1),yt={"h-full":"","of-hidden":""},gt=B({__name:"ModuleInfo",props:{id:null},setup(t){const n=t,{data:a}=W(D(n,"id")),f=n.id.split(/\./g).pop(),h=C(null),x=U(h,"module-scrolls");function e(){fetch(`/__open-in-editor?file=${encodeURIComponent(n.id)}`)}const{extractors:l}=it({strict:!0}),c=j(async()=>{var _;const o=new Set;if(l){const d={code:((_=a.value)==null?void 0:_.code)||""};for(const g of l){const s=await g.extract(d);s==null||s.forEach(p=>o.add(p))}}return Array.from(o).filter(d=>!d.startsWith("[")).filter(d=>{var g;return!((g=a.value)!=null&&g.matched.includes(d))})}),r=C(!1),m=Z(q(()=>{var o;return(o=a.value)==null?void 0:o.css}),r);return(o,_)=>{const d=L,g=G,s=Q,p=X;return i(a)?(E(),w("div",ut,[v(g,{ref_key:"status",ref:h,grid:"~ cols-3 gap-4"},{default:A(()=>{var y;return[u("div",null,[dt,u("a",{"cursor-pointer":"",op80:"","hover:op100":"",onClick:e},[v(d,{id:i(a).id,"mr-1":""},null,8,["id"]),ft])]),u("div",null,[mt,S(" "+V(i(a).matched.length),1)]),u("div",null,[ht,S(" "+V(((((y=i(a))==null?void 0:y.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),_t]),i(c).length?(E(),w("div",pt,[xt,u("code",null,V(i(c).join(", ")),1)])):M("",!0)]}),_:1},512),u("div",yt,[v(i(J),null,{default:A(()=>[v(i(N),{size:"50"},{default:A(()=>[v(s,{"h-full":"","model-value":i(a).code,"read-only":!0,mode:i(f),matched:i(a).matched,class:"scrolls module-scrolls",style:P(i(x))},null,8,["model-value","mode","matched","style"])]),_:1}),v(i(N),{size:"50"},{default:A(()=>[u("div",null,[v(p,{border:"l b gray-400/20",title:"Output CSS"},{default:A(()=>[u("label",null,[H(u("input",{"onUpdate:modelValue":_[0]||(_[0]=y=>r.value=y),type:"checkbox"},null,512),[[K,r.value]]),S(" Prettify ")])]),_:1}),v(s,{"h-full":"",b:"l main","model-value":i(m),"read-only":!0,mode:"css",class:"scrolls module-scrolls",style:P(i(x))},null,8,["model-value","style"])])]),_:1})]),_:1})])])):M("",!0)}}}),bt=B({__name:"[id]",setup(t){const n=tt();return(a,f)=>{const h=gt;return E(),Y(h,{id:i(n).params.id},null,8,["id"])}}});export{bt as default};
|