@unocss/inspector 0.60.1 → 0.60.3

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.
@@ -0,0 +1 @@
1
+ import{s as q,t as M,d as W,x as G,y as H,r as R,u as K,z as J,A as L,B as Q,j as s,c as w,g as A,w as k,q as j,C as B,_ as X,D as Y,o as S,e as m,k as P,E as C,i as F,F as z,n as O,h as Z,v as ee,M as te,G as re,H as le,m as se,l as ne,I as ae}from"./index-BF4NBrFx.js";const D=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function ce(e={}){const h=e.prefix??"un-",r=e.prefixedOnly??!1,g=e.trueToNonValued??!1;let o;return{name:"attributify",match(n,{generator:$}){var _,c;const a=q(n);if(!a)return;let t=a[1];if(t.startsWith(h))t=t.slice(h.length);else if(r)return;const i=a[2],[,x="",p=i]=i.match(D)||[];if(p==="~"||g&&p==="true"||!p)return`${x}${t}`;if(o==null){const l=(c=(_=$==null?void 0:$.config)==null?void 0:_.separators)==null?void 0:c.join("|");l?o=new RegExp(`^(.*\\](?:${l}))(\\[[^\\]]+?\\])$`):o=!1}if(o){const[,l,u]=i.match(o)||[];if(u)return`${l}${x}${t}-${u}`}return`${x}${t}-${p}`}}}const oe=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,ie=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,I=/[\s'"`;>]+/;function ue(e){return{name:"attributify",extract:({content:h,cursor:r})=>{const g=h.matchAll(oe);let o,n=0;for(const f of g){const[,v,y]=f,b=f.index+v.length;if(r>b&&r<=b+y.length){n=b,o=y;break}}if(!o)return null;const $=o.matchAll(ie);let a=0,t,i;for(const f of $){const[v,y,b]=f,E=n+f.index;if(r>E&&r<=E+v.length){a=E,t=y,i=b==null?void 0:b.slice(1);break}}if(!t||t==="class"||t==="className"||t===":class")return null;const x=!!(e!=null&&e.prefix)&&t.startsWith(e.prefix);if(e!=null&&e.prefixedOnly&&!x)return null;const p=x?t.slice(e.prefix.length):t;if(i===void 0)return{extracted:p,resolveReplacement(f){const v=x?e.prefix.length:0;return{start:a+v,end:a+t.length,replacement:f}}};const _=a+t.length+2;let c=I.exec(i),l=0,u;for(;c;){const[f]=c;if(r>_+l&&r<=_+l+c.index){u=i.slice(l,l+c.index);break}l+=c.index+f.length,c=I.exec(i.slice(l))}u===void 0&&(u=i.slice(l));const[,d="",V]=u.match(D)||[];return{extracted:`${d}${p}-${V}`,transformSuggestions(f){return f.filter(v=>v.startsWith(`${d}${p}-`)).map(v=>d+v.slice(d.length+p.length+1))},resolveReplacement(f){return{start:l+_,end:l+_+u.length,replacement:d+f.slice(d.length+p.length+1)}}}}}}const de=["v-bind:",":"],T=/[\s'"`;]+/g,N=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,fe=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,U=["placeholder","fill","opacity","stroke-opacity"];function me(e){const h=(e==null?void 0:e.ignoreAttributes)??U,r=(e==null?void 0:e.nonValuedAttribute)??!0,g=(e==null?void 0:e.trueToNonValued)??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(N)).flatMap(n=>Array.from((n[1]||"").matchAll(fe))).flatMap(([,n,...$])=>{const a=$.filter(Boolean).join("");if(h.includes(n))return[];for(const t of de)if(n.startsWith(t)){n=n.slice(t.length);break}if(!a){if(M(n)&&r!==!1){const t=[`[${n}=""]`];return g&&t.push(`[${n}="true"]`),t}return[]}return["class","className"].includes(n)?a.split(T).filter(M):N.test(a)?(N.lastIndex=0,this.extract({code:a})):e!=null&&e.prefixedOnly&&e.prefix&&!n.startsWith(e.prefix)?[]:a.split(T).filter(t=>!!t&&t!==":").map(t=>`[${n}~="${t}"]`)})}}}const he=(e={})=>{e.strict=e.strict??!1,e.prefix=e.prefix??"un-",e.prefixedOnly=e.prefixedOnly??!1,e.nonValuedAttribute=e.nonValuedAttribute??!0,e.ignoreAttributes=e.ignoreAttributes??U;const h=[ce(e)],r=[me(e)],g=[ue(e)];return{name:"@unocss/preset-attributify",enforce:"post",variants:h,extractors:r,options:e,autocomplete:{extractors:g},extractorDefault:e.strict?!1:void 0}},_e={key:0,"h-full":"","of-hidden":"",flex:"","flex-col":""},xe={p:"4",grid:"~ cols-4 gap-4"},pe=m("div",{op50:""}," Module ",-1),ye=m("div",{"i-carbon-launch":""},null,-1),ve=m("div",{op50:""}," Matched Rules ",-1),be=m("div",{op50:""}," CSS Size ",-1),ge=m("span",{op50:""},"gzipped",-1),$e={key:0,"row-span-3":""},Ae=m("div",{op50:""}," Potentially Unmatched ",-1),Ve={key:0,"h-full":"","of-hidden":""},ke=W({__name:"ModuleInfo",props:{id:{}},setup(e){const h=e,{data:r}=G(H(h,"id")),g=h.id.split(/\./g).pop(),o=R(null),n=K(o,"module-scrolls");function $(){fetch(`/__open-in-editor?file=${encodeURIComponent(h.id)}`)}const{extractors:a}=he({strict:!0}),t=J(async()=>{var c;const _=new Set;if(a){const l={code:((c=r.value)==null?void 0:c.code)||""};for(const u of a){const d=await u.extract(l);d==null||d.forEach(V=>_.add(V))}}return Array.from(_).filter(l=>!l.startsWith("[")).filter(l=>{var u,d;return!((d=(u=r.value)==null?void 0:u.matched)!=null&&d.some(({rawSelector:V})=>V===l))})}),i=R(!1),x=R("source"),p=L(Q(()=>{var _;return(_=r.value)==null?void 0:_.css}),i);return(_,c)=>{const l=re,u=le,d=X,V=se,f=ne,v=Y;return s(r)?(S(),w("div",_e,[A(d,{ref_key:"status",ref:o,p0:""},{default:k(()=>{var y;return[m("div",xe,[m("div",null,[pe,m("a",{"cursor-pointer":"",op80:"","hover:op100":"",onClick:$},[A(l,{id:s(r).id,"mr-1":""},null,8,["id"]),ye])]),m("div",null,[ve,P(" "+C(s(r).matched.length),1)]),m("div",null,[be,P(" "+C(((((y=s(r))==null?void 0:y.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),ge]),s(t).length?(S(),w("div",$e,[Ae,m("code",null,C(s(t).join(", ")),1)])):B("",!0)]),A(u,{modelValue:s(x),"onUpdate:modelValue":c[0]||(c[0]=b=>F(x)?x.value=b:null)},null,8,["modelValue"])]}),_:1},512),s(x)==="source"?(S(),w("div",Ve,[A(s(te),null,{default:k(()=>[A(s(z),{size:"50"},{default:k(()=>{var y;return[A(V,{"h-full":"","model-value":s(r).code,"read-only":!0,mode:s(g),matched:(y=s(r).matched)==null?void 0:y.map(({rawSelector:b})=>b),class:"scrolls module-scrolls",style:O(s(n))},null,8,["model-value","mode","matched","style"])]}),_:1}),A(s(z),{size:"50"},{default:k(()=>[m("div",null,[A(f,{border:"l b gray-400/20",title:"Output CSS"},{default:k(()=>[m("label",null,[Z(m("input",{"onUpdate:modelValue":c[1]||(c[1]=y=>F(i)?i.value=y:null),type:"checkbox"},null,512),[[ee,s(i)]]),P(" Prettify ")])]),_:1}),A(V,{"h-full":"",border:"l main","model-value":s(p),"read-only":!0,mode:"css",class:"scrolls module-scrolls",style:O(s(n))},null,8,["model-value","style"])])]),_:1})]),_:1})])):(S(),j(v,{key:1,"flex-grow":"","overflow-y-auto":"",selectors:s(r).matched,colors:s(r).colors},null,8,["selectors","colors"]))])):B("",!0)}}}),Ee=W({__name:"[id]",setup(e){const h=ae();return(r,g)=>{const o=ke;return S(),j(o,{id:s(h).params.id},null,8,["id"])}}});export{Ee as default};
@@ -14,7 +14,7 @@
14
14
  * @vue/runtime-dom v3.4.27
15
15
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
16
  * @license MIT
17
- **/const dP="http://www.w3.org/2000/svg",mP="http://www.w3.org/1998/Math/MathML",Rc=typeof document<"u"?document:null,g1=Rc&&Rc.createElement("template"),gP={insert:(r,e,t)=>{e.insertBefore(r,t||null)},remove:r=>{const e=r.parentNode;e&&e.removeChild(r)},createElement:(r,e,t,n)=>{const i=e==="svg"?Rc.createElementNS(dP,r):e==="mathml"?Rc.createElementNS(mP,r):Rc.createElement(r,t?{is:t}:void 0);return r==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:r=>Rc.createTextNode(r),createComment:r=>Rc.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Rc.querySelector(r),setScopeId(r,e){r.setAttribute(e,"")},insertStaticContent(r,e,t,n,i,s){const a=t?t.previousSibling:e.lastChild;if(i&&(i===s||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),t),!(i===s||!(i=i.nextSibling)););else{g1.innerHTML=n==="svg"?`<svg>${r}</svg>`:n==="mathml"?`<math>${r}</math>`:r;const l=g1.content;if(n==="svg"||n==="mathml"){const p=l.firstChild;for(;p.firstChild;)l.appendChild(p.firstChild);l.removeChild(p)}e.insertBefore(l,t)}return[a?a.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},yP=Symbol("_vtc");function DP(r,e,t){const n=r[yP];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?r.removeAttribute("class"):t?r.setAttribute("class",e):r.className=e}const y1=Symbol("_vod"),OP=Symbol("_vsh"),xP=Symbol(""),bP=/(^|;)\s*display\s*:/;function vP(r,e,t){const n=r.style,i=bo(t);let s=!1;if(t&&!i){if(e)if(bo(e))for(const a of e.split(";")){const l=a.slice(0,a.indexOf(":")).trim();t[l]==null&&ym(n,l,"")}else for(const a in e)t[a]==null&&ym(n,a,"");for(const a in t)a==="display"&&(s=!0),ym(n,a,t[a])}else if(i){if(e!==t){const a=n[xP];a&&(t+=";"+a),n.cssText=t,s=bP.test(t)}}else e&&r.removeAttribute("style");y1 in r&&(r[y1]=s?n.display:"",r[OP]&&(n.display="none"))}const D1=/\s*!important$/;function ym(r,e,t){if(Pi(t))t.forEach(n=>ym(r,e,n));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const n=CP(r,e);D1.test(t)?r.setProperty(Jh(n),t.replace(D1,""),"important"):r[n]=t}}const O1=["Webkit","Moz","ms"],b0={};function CP(r,e){const t=b0[e];if(t)return t;let n=xl(e);if(n!=="filter"&&n in r)return b0[e]=n;n=Eg(n);for(let i=0;i<O1.length;i++){const s=O1[i]+n;if(s in r)return b0[e]=s}return e}const x1="http://www.w3.org/1999/xlink";function SP(r,e,t,n,i){if(n&&e.startsWith("xlink:"))t==null?r.removeAttributeNS(x1,e.slice(6,e.length)):r.setAttributeNS(x1,e,t);else{const s=CA(e);t==null||s&&!qv(t)?r.removeAttribute(e):r.setAttribute(e,s?"":t)}}function EP(r,e,t,n,i,s,a){if(e==="innerHTML"||e==="textContent"){n&&a(n,i,s),r[e]=t??"";return}const l=r.tagName;if(e==="value"&&l!=="PROGRESS"&&!l.includes("-")){const m=l==="OPTION"?r.getAttribute("value")||"":r.value,g=t??"";(m!==g||!("_value"in r))&&(r.value=g),t==null&&r.removeAttribute(e),r._value=t;return}let p=!1;if(t===""||t==null){const m=typeof r[e];m==="boolean"?t=qv(t):t==null&&m==="string"?(t="",p=!0):m==="number"&&(t=0,p=!0)}try{r[e]=t}catch{}p&&r.removeAttribute(e)}function jC(r,e,t,n){r.addEventListener(e,t,n)}function wP(r,e,t,n){r.removeEventListener(e,t,n)}const b1=Symbol("_vei");function AP(r,e,t,n,i=null){const s=r[b1]||(r[b1]={}),a=s[e];if(n&&a)a.value=n;else{const[l,p]=TP(e);if(n){const m=s[e]=FP(n,i);jC(r,l,m,p)}else a&&(wP(r,l,a,p),s[e]=void 0)}}const v1=/(?:Once|Passive|Capture)$/;function TP(r){let e;if(v1.test(r)){e={};let n;for(;n=r.match(v1);)r=r.slice(0,r.length-n[0].length),e[n[0].toLowerCase()]=!0}return[r[2]===":"?r.slice(3):Jh(r.slice(2)),e]}let v0=0;const PP=Promise.resolve(),kP=()=>v0||(PP.then(()=>v0=0),v0=Date.now());function FP(r,e){const t=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=t.attached)return;Eu(_P(n,t.value),e,5,[n])};return t.value=r,t.attached=kP(),t}function _P(r,e){if(Pi(e)){const t=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{t.call(r),r._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const C1=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)>96&&r.charCodeAt(2)<123,$P=(r,e,t,n,i,s,a,l,p)=>{const m=i==="svg";e==="class"?DP(r,n,m):e==="style"?vP(r,t,n):vg(e)?wD(e)||AP(r,e,t,n,a):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):BP(r,e,n,m))?EP(r,e,n,s,a,l,p):(e==="true-value"?r._trueValue=n:e==="false-value"&&(r._falseValue=n),SP(r,e,n,m))};function BP(r,e,t,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in r&&C1(e)&&Vi(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=r.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return C1(e)&&bo(t)?!1:e in r}const S1=r=>{const e=r.props["onUpdate:modelValue"]||!1;return Pi(e)?t=>dm(e,t):e},C0=Symbol("_assign"),NP={deep:!0,created(r,e,t){r[C0]=S1(t),jC(r,"change",()=>{const n=r._modelValue,i=IP(r),s=r.checked,a=r[C0];if(Pi(n)){const l=zv(n,i),p=l!==-1;if(s&&!p)a(n.concat(i));else if(!s&&p){const m=[...n];m.splice(l,1),a(m)}}else if(Cg(n)){const l=new Set(n);s?l.add(i):l.delete(i),a(l)}else a(LC(r,s))})},mounted:E1,beforeUpdate(r,e,t){r[C0]=S1(t),E1(r,e,t)}};function E1(r,{value:e,oldValue:t},n){r._modelValue=e,Pi(e)?r.checked=zv(e,n.props.value)>-1:Cg(e)?r.checked=e.has(n.props.value):e!==t&&(r.checked=wg(e,LC(r,!0)))}function IP(r){return"_value"in r?r._value:r.value}function LC(r,e){const t=e?"_trueValue":"_falseValue";return t in r?r[t]:e}const RP={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},MP=(r,e)=>{const t=r._withKeys||(r._withKeys={}),n=e.join(".");return t[n]||(t[n]=i=>{if(!("key"in i))return;const s=Jh(i.key);if(e.some(a=>a===s||RP[a]===s))return r(i)})},QP=jo({patchProp:$P},gP);let w1;function jP(){return w1||(w1=GT(QP))}const LP=(...r)=>{const e=jP().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=VP(n);if(!i)return;const s=e._component;!Vi(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.innerHTML="";const a=t(i,!1,XP(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},e};function XP(r){if(r instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&r instanceof MathMLElement)return"mathml"}function VP(r){return bo(r)?document.querySelector(r):r}function Xd(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const UP=/^\[(.+?)~?="(.*)"\]$/,qP=/[\w\u00A0-\uFFFF-_:%-?]/;function XC(r){return r.match(UP)}function tR(r=""){return qP.test(r)}const zP=/([\\:]?[\s"'`;<>]|:\(|\)"|\)\s)/g;var tc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ig(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var A1={exports:{}};(function(r,e){(function(t,n){n(e)})(tc,function(t){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=new Uint8Array(64),l=new Uint8Array(128);for(let ge=0;ge<s.length;ge++){const je=s.charCodeAt(ge);a[ge]=je,l[je]=ge}const p=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(ge){return Buffer.from(ge.buffer,ge.byteOffset,ge.byteLength).toString()}}:{decode(ge){let je="";for(let pt=0;pt<ge.length;pt++)je+=String.fromCharCode(ge[pt]);return je}};function m(ge){const je=new Int32Array(5),pt=[];let Dt=0;do{const bt=g(ge,Dt),Pt=[];let nr=!0,Ur=0;je[0]=0;for(let jr=Dt;jr<bt;jr++){let gr;jr=b(ge,jr,je,0);const Lr=je[0];Lr<Ur&&(nr=!1),Ur=Lr,C(ge,jr,bt)?(jr=b(ge,jr,je,1),jr=b(ge,jr,je,2),jr=b(ge,jr,je,3),C(ge,jr,bt)?(jr=b(ge,jr,je,4),gr=[Lr,je[1],je[2],je[3],je[4]]):gr=[Lr,je[1],je[2],je[3]]):gr=[Lr],Pt.push(gr)}nr||$(Pt),pt.push(Pt),Dt=bt+1}while(Dt<=ge.length);return pt}function g(ge,je){const pt=ge.indexOf(";",je);return pt===-1?ge.length:pt}function b(ge,je,pt,Dt){let bt=0,Pt=0,nr=0;do{const jr=ge.charCodeAt(je++);nr=l[jr],bt|=(nr&31)<<Pt,Pt+=5}while(nr&32);const Ur=bt&1;return bt>>>=1,Ur&&(bt=-2147483648|-bt),pt[Dt]+=bt,je}function C(ge,je,pt){return je>=pt?!1:ge.charCodeAt(je)!==44}function $(ge){ge.sort(Y)}function Y(ge,je){return ge[0]-je[0]}function xe(ge){const je=new Int32Array(5),pt=1024*16,Dt=pt-36,bt=new Uint8Array(pt),Pt=bt.subarray(0,Dt);let nr=0,Ur="";for(let jr=0;jr<ge.length;jr++){const gr=ge[jr];if(jr>0&&(nr===pt&&(Ur+=p.decode(bt),nr=0),bt[nr++]=59),gr.length!==0){je[0]=0;for(let Lr=0;Lr<gr.length;Lr++){const kn=gr[Lr];nr>Dt&&(Ur+=p.decode(Pt),bt.copyWithin(0,Dt,nr),nr-=Dt),Lr>0&&(bt[nr++]=44),nr=ke(bt,nr,je,kn,0),kn.length!==1&&(nr=ke(bt,nr,je,kn,1),nr=ke(bt,nr,je,kn,2),nr=ke(bt,nr,je,kn,3),kn.length!==4&&(nr=ke(bt,nr,je,kn,4)))}}}return Ur+p.decode(bt.subarray(0,nr))}function ke(ge,je,pt,Dt,bt){const Pt=Dt[bt];let nr=Pt-pt[bt];pt[bt]=Pt,nr=nr<0?-nr<<1|1:nr<<1;do{let Ur=nr&31;nr>>>=5,nr>0&&(Ur|=32),ge[je++]=a[Ur]}while(nr>0);return je}t.decode=m,t.encode=xe,Object.defineProperty(t,"__esModule",{value:!0})})})(A1,A1.exports);const WP=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,ZP=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g;function YP(r,e,t){const n=[];return e.forEach(i=>{if(i.includes(":"))i===r&&n.push([t,t+i.length,i]);else{const a=new RegExp(`.(${i})[.#=s(]|.(${i})$`).exec(r);a?n.push([t+a.index+1,t+a.index+i.length+1,i]):i===r&&n.push([t,t+i.length,i])}}),n}function GP(r,e,t=[],n={}){const i=[],s=[],a=new Set,l=[],p=[];if(n.includeRegex)for(const b of n.includeRegex)for(const C of r.matchAll(b))l.push([C.index,C.index+C[0].length]);else l.push([0,r.length]);if(n.excludeRegex)for(const b of n.excludeRegex)for(const C of r.matchAll(b))p.push([C.index,C.index+C[0].length]);Array.from(e).forEach(b=>{const C=XC(b);C?C[2]?s.push(C):(m(C[1]),a.add(C[1])):(m(b),a.add(b))});function m(b){if(/[><]/.test(b))for(const C of r.matchAll(new RegExp(Xd(b),"g"))){const $=C.index,Y=$+C[0].length;i.push([$,Y,C[0]])}}let g=0;r.split(zP).forEach(b=>{const C=g+b.length;n.isPug?i.push(...YP(b,a,g)):a.has(b)&&i.push([g,C,b]),g=C});for(const b of r.matchAll(WP)){const C=b.index,$=C+b[0].length;a.has(b[0])&&i.push([C,$,b[0]])}for(const b of r.matchAll(ZP)){const C=b.index,$=C+b[0].length;a.has(b[0])&&i.findIndex(([xe,ke])=>xe===C&&ke===$)<0&&i.push([C,$,b[0]])}return s.forEach(([,b,C])=>{const $=new RegExp(`(${Xd(b)}=)(['"])[^\\2]*?${Xd(C)}[^\\2]*?\\2`,"g");Array.from(r.matchAll($)).forEach(Y=>{var Dt;const xe=Y[1],ke=Y[0].slice(xe.length);let ge=((Dt=ke.match(`[\\b\\s'"]${Xd(C)}[\\b\\s'"]`))==null?void 0:Dt.index)??-1;if(/[\s'"]/.test(ke[ge]??"")&&ge++,ge<0)return;const je=Y.index+xe.length+ge,pt=je+C.length;i.push([je,pt,`[${b}="${C}"]`])})}),i.push(...t.map(b=>[b.offset,b.offset+b.length,b.className])),i.filter(([b,C])=>p.some(([$,Y])=>b>=$&&C<=Y)?!1:!!l.some(([$,Y])=>b>=$&&C<=Y)).sort((b,C)=>b[0]-C[0])}class Os{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(t,this.length,i,1),ll.from(i,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let n=[];return this.decompose(e,t,n,0),ll.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new _f(this),s=new _f(e);for(let a=t,l=t;;){if(i.next(a),s.next(a),a=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(l+=i.value.length,i.done||l>=n)return!0}}iter(e=1){return new _f(this,e)}iterRange(e,t=this.length){return new VC(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new UC(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Os.empty:e.length<=32?new ho(e):ll.from(ho.split(e,[]))}}class ho extends Os{constructor(e,t=HP(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,i){for(let s=0;;s++){let a=this.text[s],l=i+a.length;if((t?n:l)>=e)return new JP(i,l,n,a);i=l+1,n++}}decompose(e,t,n,i){let s=e<=0&&t>=this.length?this:new ho(T1(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let a=n.pop(),l=Dm(s.text,a.text.slice(),0,s.length);if(l.length<=32)n.push(new ho(l,a.length+s.length));else{let p=l.length>>1;n.push(new ho(l.slice(0,p)),new ho(l.slice(p)))}}else n.push(s)}replace(e,t,n){if(!(n instanceof ho))return super.replace(e,t,n);let i=Dm(this.text,Dm(n.text,T1(this.text,0,e)),t),s=this.length+n.length-(t-e);return i.length<=32?new ho(i,s):ll.from(ho.split(i,[]),s)}sliceString(e,t=this.length,n=`
17
+ **/const dP="http://www.w3.org/2000/svg",mP="http://www.w3.org/1998/Math/MathML",Rc=typeof document<"u"?document:null,g1=Rc&&Rc.createElement("template"),gP={insert:(r,e,t)=>{e.insertBefore(r,t||null)},remove:r=>{const e=r.parentNode;e&&e.removeChild(r)},createElement:(r,e,t,n)=>{const i=e==="svg"?Rc.createElementNS(dP,r):e==="mathml"?Rc.createElementNS(mP,r):Rc.createElement(r,t?{is:t}:void 0);return r==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:r=>Rc.createTextNode(r),createComment:r=>Rc.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Rc.querySelector(r),setScopeId(r,e){r.setAttribute(e,"")},insertStaticContent(r,e,t,n,i,s){const a=t?t.previousSibling:e.lastChild;if(i&&(i===s||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),t),!(i===s||!(i=i.nextSibling)););else{g1.innerHTML=n==="svg"?`<svg>${r}</svg>`:n==="mathml"?`<math>${r}</math>`:r;const l=g1.content;if(n==="svg"||n==="mathml"){const p=l.firstChild;for(;p.firstChild;)l.appendChild(p.firstChild);l.removeChild(p)}e.insertBefore(l,t)}return[a?a.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},yP=Symbol("_vtc");function DP(r,e,t){const n=r[yP];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?r.removeAttribute("class"):t?r.setAttribute("class",e):r.className=e}const y1=Symbol("_vod"),OP=Symbol("_vsh"),xP=Symbol(""),bP=/(^|;)\s*display\s*:/;function vP(r,e,t){const n=r.style,i=bo(t);let s=!1;if(t&&!i){if(e)if(bo(e))for(const a of e.split(";")){const l=a.slice(0,a.indexOf(":")).trim();t[l]==null&&ym(n,l,"")}else for(const a in e)t[a]==null&&ym(n,a,"");for(const a in t)a==="display"&&(s=!0),ym(n,a,t[a])}else if(i){if(e!==t){const a=n[xP];a&&(t+=";"+a),n.cssText=t,s=bP.test(t)}}else e&&r.removeAttribute("style");y1 in r&&(r[y1]=s?n.display:"",r[OP]&&(n.display="none"))}const D1=/\s*!important$/;function ym(r,e,t){if(Pi(t))t.forEach(n=>ym(r,e,n));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const n=CP(r,e);D1.test(t)?r.setProperty(Jh(n),t.replace(D1,""),"important"):r[n]=t}}const O1=["Webkit","Moz","ms"],b0={};function CP(r,e){const t=b0[e];if(t)return t;let n=xl(e);if(n!=="filter"&&n in r)return b0[e]=n;n=Eg(n);for(let i=0;i<O1.length;i++){const s=O1[i]+n;if(s in r)return b0[e]=s}return e}const x1="http://www.w3.org/1999/xlink";function SP(r,e,t,n,i){if(n&&e.startsWith("xlink:"))t==null?r.removeAttributeNS(x1,e.slice(6,e.length)):r.setAttributeNS(x1,e,t);else{const s=CA(e);t==null||s&&!qv(t)?r.removeAttribute(e):r.setAttribute(e,s?"":t)}}function EP(r,e,t,n,i,s,a){if(e==="innerHTML"||e==="textContent"){n&&a(n,i,s),r[e]=t??"";return}const l=r.tagName;if(e==="value"&&l!=="PROGRESS"&&!l.includes("-")){const m=l==="OPTION"?r.getAttribute("value")||"":r.value,g=t??"";(m!==g||!("_value"in r))&&(r.value=g),t==null&&r.removeAttribute(e),r._value=t;return}let p=!1;if(t===""||t==null){const m=typeof r[e];m==="boolean"?t=qv(t):t==null&&m==="string"?(t="",p=!0):m==="number"&&(t=0,p=!0)}try{r[e]=t}catch{}p&&r.removeAttribute(e)}function jC(r,e,t,n){r.addEventListener(e,t,n)}function wP(r,e,t,n){r.removeEventListener(e,t,n)}const b1=Symbol("_vei");function AP(r,e,t,n,i=null){const s=r[b1]||(r[b1]={}),a=s[e];if(n&&a)a.value=n;else{const[l,p]=TP(e);if(n){const m=s[e]=FP(n,i);jC(r,l,m,p)}else a&&(wP(r,l,a,p),s[e]=void 0)}}const v1=/(?:Once|Passive|Capture)$/;function TP(r){let e;if(v1.test(r)){e={};let n;for(;n=r.match(v1);)r=r.slice(0,r.length-n[0].length),e[n[0].toLowerCase()]=!0}return[r[2]===":"?r.slice(3):Jh(r.slice(2)),e]}let v0=0;const PP=Promise.resolve(),kP=()=>v0||(PP.then(()=>v0=0),v0=Date.now());function FP(r,e){const t=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=t.attached)return;Eu(_P(n,t.value),e,5,[n])};return t.value=r,t.attached=kP(),t}function _P(r,e){if(Pi(e)){const t=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{t.call(r),r._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const C1=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)>96&&r.charCodeAt(2)<123,$P=(r,e,t,n,i,s,a,l,p)=>{const m=i==="svg";e==="class"?DP(r,n,m):e==="style"?vP(r,t,n):vg(e)?wD(e)||AP(r,e,t,n,a):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):BP(r,e,n,m))?EP(r,e,n,s,a,l,p):(e==="true-value"?r._trueValue=n:e==="false-value"&&(r._falseValue=n),SP(r,e,n,m))};function BP(r,e,t,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in r&&C1(e)&&Vi(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=r.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return C1(e)&&bo(t)?!1:e in r}const S1=r=>{const e=r.props["onUpdate:modelValue"]||!1;return Pi(e)?t=>dm(e,t):e},C0=Symbol("_assign"),NP={deep:!0,created(r,e,t){r[C0]=S1(t),jC(r,"change",()=>{const n=r._modelValue,i=IP(r),s=r.checked,a=r[C0];if(Pi(n)){const l=zv(n,i),p=l!==-1;if(s&&!p)a(n.concat(i));else if(!s&&p){const m=[...n];m.splice(l,1),a(m)}}else if(Cg(n)){const l=new Set(n);s?l.add(i):l.delete(i),a(l)}else a(LC(r,s))})},mounted:E1,beforeUpdate(r,e,t){r[C0]=S1(t),E1(r,e,t)}};function E1(r,{value:e,oldValue:t},n){r._modelValue=e,Pi(e)?r.checked=zv(e,n.props.value)>-1:Cg(e)?r.checked=e.has(n.props.value):e!==t&&(r.checked=wg(e,LC(r,!0)))}function IP(r){return"_value"in r?r._value:r.value}function LC(r,e){const t=e?"_trueValue":"_falseValue";return t in r?r[t]:e}const RP={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},MP=(r,e)=>{const t=r._withKeys||(r._withKeys={}),n=e.join(".");return t[n]||(t[n]=i=>{if(!("key"in i))return;const s=Jh(i.key);if(e.some(a=>a===s||RP[a]===s))return r(i)})},QP=jo({patchProp:$P},gP);let w1;function jP(){return w1||(w1=GT(QP))}const LP=(...r)=>{const e=jP().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=VP(n);if(!i)return;const s=e._component;!Vi(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.innerHTML="";const a=t(i,!1,XP(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},e};function XP(r){if(r instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&r instanceof MathMLElement)return"mathml"}function VP(r){return bo(r)?document.querySelector(r):r}function Xd(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const UP=/^\[(.+?)~?="(.*)"\]$/,qP=/[\w\u00A0-\uFFFF%-?]/;function XC(r){return r.match(UP)}function tR(r=""){return qP.test(r)}const zP=/([\\:]?[\s"'`;<>]|:\(|\)"|\)\s)/g;var tc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ig(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var A1={exports:{}};(function(r,e){(function(t,n){n(e)})(tc,function(t){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=new Uint8Array(64),l=new Uint8Array(128);for(let ge=0;ge<s.length;ge++){const je=s.charCodeAt(ge);a[ge]=je,l[je]=ge}const p=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(ge){return Buffer.from(ge.buffer,ge.byteOffset,ge.byteLength).toString()}}:{decode(ge){let je="";for(let pt=0;pt<ge.length;pt++)je+=String.fromCharCode(ge[pt]);return je}};function m(ge){const je=new Int32Array(5),pt=[];let Dt=0;do{const bt=g(ge,Dt),Pt=[];let nr=!0,Ur=0;je[0]=0;for(let jr=Dt;jr<bt;jr++){let gr;jr=b(ge,jr,je,0);const Lr=je[0];Lr<Ur&&(nr=!1),Ur=Lr,C(ge,jr,bt)?(jr=b(ge,jr,je,1),jr=b(ge,jr,je,2),jr=b(ge,jr,je,3),C(ge,jr,bt)?(jr=b(ge,jr,je,4),gr=[Lr,je[1],je[2],je[3],je[4]]):gr=[Lr,je[1],je[2],je[3]]):gr=[Lr],Pt.push(gr)}nr||$(Pt),pt.push(Pt),Dt=bt+1}while(Dt<=ge.length);return pt}function g(ge,je){const pt=ge.indexOf(";",je);return pt===-1?ge.length:pt}function b(ge,je,pt,Dt){let bt=0,Pt=0,nr=0;do{const jr=ge.charCodeAt(je++);nr=l[jr],bt|=(nr&31)<<Pt,Pt+=5}while(nr&32);const Ur=bt&1;return bt>>>=1,Ur&&(bt=-2147483648|-bt),pt[Dt]+=bt,je}function C(ge,je,pt){return je>=pt?!1:ge.charCodeAt(je)!==44}function $(ge){ge.sort(Y)}function Y(ge,je){return ge[0]-je[0]}function xe(ge){const je=new Int32Array(5),pt=1024*16,Dt=pt-36,bt=new Uint8Array(pt),Pt=bt.subarray(0,Dt);let nr=0,Ur="";for(let jr=0;jr<ge.length;jr++){const gr=ge[jr];if(jr>0&&(nr===pt&&(Ur+=p.decode(bt),nr=0),bt[nr++]=59),gr.length!==0){je[0]=0;for(let Lr=0;Lr<gr.length;Lr++){const kn=gr[Lr];nr>Dt&&(Ur+=p.decode(Pt),bt.copyWithin(0,Dt,nr),nr-=Dt),Lr>0&&(bt[nr++]=44),nr=ke(bt,nr,je,kn,0),kn.length!==1&&(nr=ke(bt,nr,je,kn,1),nr=ke(bt,nr,je,kn,2),nr=ke(bt,nr,je,kn,3),kn.length!==4&&(nr=ke(bt,nr,je,kn,4)))}}}return Ur+p.decode(bt.subarray(0,nr))}function ke(ge,je,pt,Dt,bt){const Pt=Dt[bt];let nr=Pt-pt[bt];pt[bt]=Pt,nr=nr<0?-nr<<1|1:nr<<1;do{let Ur=nr&31;nr>>>=5,nr>0&&(Ur|=32),ge[je++]=a[Ur]}while(nr>0);return je}t.decode=m,t.encode=xe,Object.defineProperty(t,"__esModule",{value:!0})})})(A1,A1.exports);const WP=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,ZP=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g;function YP(r,e,t){const n=[];return e.forEach(i=>{if(i.includes(":"))i===r&&n.push([t,t+i.length,i]);else{const a=new RegExp(`.(${i})[.#=s(]|.(${i})$`).exec(r);a?n.push([t+a.index+1,t+a.index+i.length+1,i]):i===r&&n.push([t,t+i.length,i])}}),n}function GP(r,e,t=[],n={}){const i=[],s=[],a=new Set,l=[],p=[];if(n.includeRegex)for(const b of n.includeRegex)for(const C of r.matchAll(b))l.push([C.index,C.index+C[0].length]);else l.push([0,r.length]);if(n.excludeRegex)for(const b of n.excludeRegex)for(const C of r.matchAll(b))p.push([C.index,C.index+C[0].length]);Array.from(e).forEach(b=>{const C=XC(b);C?C[2]?s.push(C):(m(C[1]),a.add(C[1])):(m(b),a.add(b))});function m(b){if(/[><]/.test(b))for(const C of r.matchAll(new RegExp(Xd(b),"g"))){const $=C.index,Y=$+C[0].length;i.push([$,Y,C[0]])}}let g=0;r.split(zP).forEach(b=>{const C=g+b.length;n.isPug?i.push(...YP(b,a,g)):a.has(b)&&i.push([g,C,b]),g=C});for(const b of r.matchAll(WP)){const C=b.index,$=C+b[0].length;a.has(b[0])&&i.push([C,$,b[0]])}for(const b of r.matchAll(ZP)){const C=b.index,$=C+b[0].length;a.has(b[0])&&i.findIndex(([xe,ke])=>xe===C&&ke===$)<0&&i.push([C,$,b[0]])}return s.forEach(([,b,C])=>{const $=new RegExp(`(${Xd(b)}=)(['"])[^\\2]*?${Xd(C)}[^\\2]*?\\2`,"g");Array.from(r.matchAll($)).forEach(Y=>{var Dt;const xe=Y[1],ke=Y[0].slice(xe.length);let ge=((Dt=ke.match(`[\\b\\s'"]${Xd(C)}[\\b\\s'"]`))==null?void 0:Dt.index)??-1;if(/[\s'"]/.test(ke[ge]??"")&&ge++,ge<0)return;const je=Y.index+xe.length+ge,pt=je+C.length;i.push([je,pt,`[${b}="${C}"]`])})}),i.push(...t.map(b=>[b.offset,b.offset+b.length,b.className])),i.filter(([b,C])=>p.some(([$,Y])=>b>=$&&C<=Y)?!1:!!l.some(([$,Y])=>b>=$&&C<=Y)).sort((b,C)=>b[0]-C[0])}class Os{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(t,this.length,i,1),ll.from(i,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let n=[];return this.decompose(e,t,n,0),ll.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new _f(this),s=new _f(e);for(let a=t,l=t;;){if(i.next(a),s.next(a),a=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(l+=i.value.length,i.done||l>=n)return!0}}iter(e=1){return new _f(this,e)}iterRange(e,t=this.length){return new VC(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new UC(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Os.empty:e.length<=32?new ho(e):ll.from(ho.split(e,[]))}}class ho extends Os{constructor(e,t=HP(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,i){for(let s=0;;s++){let a=this.text[s],l=i+a.length;if((t?n:l)>=e)return new JP(i,l,n,a);i=l+1,n++}}decompose(e,t,n,i){let s=e<=0&&t>=this.length?this:new ho(T1(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let a=n.pop(),l=Dm(s.text,a.text.slice(),0,s.length);if(l.length<=32)n.push(new ho(l,a.length+s.length));else{let p=l.length>>1;n.push(new ho(l.slice(0,p)),new ho(l.slice(p)))}}else n.push(s)}replace(e,t,n){if(!(n instanceof ho))return super.replace(e,t,n);let i=Dm(this.text,Dm(n.text,T1(this.text,0,e)),t),s=this.length+n.length-(t-e);return i.length<=32?new ho(i,s):ll.from(ho.split(i,[]),s)}sliceString(e,t=this.length,n=`
18
18
  `){let i="";for(let s=0,a=0;s<=t&&a<this.text.length;a++){let l=this.text[a],p=s+l.length;s>e&&a&&(i+=n),e<p&&t>s&&(i+=l.slice(Math.max(0,e-s),t-s)),s=p+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],i=-1;for(let s of e)n.push(s),i+=s.length+1,n.length==32&&(t.push(new ho(n,i)),n=[],i=-1);return i>-1&&t.push(new ho(n,i)),t}}class ll extends Os{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,i){for(let s=0;;s++){let a=this.children[s],l=i+a.length,p=n+a.lines-1;if((t?p:l)>=e)return a.lineInner(e,t,n,i);i=l+1,n=p+1}}decompose(e,t,n,i){for(let s=0,a=0;a<=t&&s<this.children.length;s++){let l=this.children[s],p=a+l.length;if(e<=p&&t>=a){let m=i&((a<=e?1:0)|(p>=t?2:0));a>=e&&p<=t&&!m?n.push(l):l.decompose(e-a,t-a,n,m)}a=p+1}}replace(e,t,n){if(n.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let a=this.children[i],l=s+a.length;if(e>=s&&t<=l){let p=a.replace(e-s,t-s,n),m=this.lines-a.lines+p.lines;if(p.lines<m>>4&&p.lines>m>>6){let g=this.children.slice();return g[i]=p,new ll(g,this.length-(t-e)+n.length)}return super.replace(s,l,p)}s=l+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
19
19
  `){let i="";for(let s=0,a=0;s<this.children.length&&a<=t;s++){let l=this.children[s],p=a+l.length;a>e&&s&&(i+=n),e<p&&t>a&&(i+=l.sliceString(e-a,t-a,n)),a=p+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ll))return 0;let n=0,[i,s,a,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==a||s==l)return n;let p=this.children[i],m=e.children[s];if(p!=m)return n+p.scanIdentical(m,t);n+=p.length+1}}static from(e,t=e.reduce((n,i)=>n+i.length+1,-1)){let n=0;for(let $ of e)n+=$.lines;if(n<32){let $=[];for(let Y of e)Y.flatten($);return new ho($,t)}let i=Math.max(32,n>>5),s=i<<1,a=i>>1,l=[],p=0,m=-1,g=[];function b($){let Y;if($.lines>s&&$ instanceof ll)for(let xe of $.children)b(xe);else $.lines>a&&(p>a||!p)?(C(),l.push($)):$ instanceof ho&&p&&(Y=g[g.length-1])instanceof ho&&$.lines+Y.lines<=32?(p+=$.lines,m+=$.length+1,g[g.length-1]=new ho(Y.text.concat($.text),Y.length+1+$.length)):(p+$.lines>i&&C(),p+=$.lines,m+=$.length+1,g.push($))}function C(){p!=0&&(l.push(g.length==1?g[0]:ll.from(g,m)),m=-1,p=g.length=0)}for(let $ of e)b($);return C(),l.length==1?l[0]:new ll(l,t)}}Os.empty=new ho([""],0);function HP(r){let e=-1;for(let t of r)e+=t.length+1;return e}function Dm(r,e,t=0,n=1e9){for(let i=0,s=0,a=!0;s<r.length&&i<=n;s++){let l=r[s],p=i+l.length;p>=t&&(p>n&&(l=l.slice(0,n-i)),i<t&&(l=l.slice(t-i)),a?(e[e.length-1]+=l,a=!1):e.push(l)),i=p+1}return e}function T1(r,e,t){return Dm(r,[""],e,t)}class _f{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof ho?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],s=this.offsets[n],a=s>>1,l=i instanceof ho?i.text.length:i.children.length;if(a==(t>0?l:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
20
20
  `,this;e--}else if(i instanceof ho){let p=i.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,p.length>Math.max(0,e))return this.value=e==0?p:t>0?p.slice(e):p.slice(0,p.length-e),this;e-=p.length}else{let p=i.children[a+(t<0?-1:0)];e>p.length?(e-=p.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(p),this.offsets.push(t>0?1:(p instanceof ho?p.text.length:p.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class VC{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new _f(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=n?i:t<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class UC{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:i}=this.inner.next(e);return t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Os.prototype[Symbol.iterator]=function(){return this.iter()},_f.prototype[Symbol.iterator]=VC.prototype[Symbol.iterator]=UC.prototype[Symbol.iterator]=function(){return this});class JP{constructor(e,t,n,i){this.from=e,this.to=t,this.number=n,this.text=i}get length(){return this.to-this.from}}let Rp="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(r=>r?parseInt(r,36):1);for(let r=1;r<Rp.length;r++)Rp[r]+=Rp[r-1];function KP(r){for(let e=1;e<Rp.length;e+=2)if(Rp[e]>r)return Rp[e-1]<=r;return!1}function P1(r){return r>=127462&&r<=127487}const k1=8205;function ua(r,e,t=!0,n=!0){return(t?qC:ek)(r,e,n)}function qC(r,e,t){if(e==r.length)return e;e&&zC(r.charCodeAt(e))&&WC(r.charCodeAt(e-1))&&e--;let n=zo(r,e);for(e+=Ga(n);e<r.length;){let i=zo(r,e);if(n==k1||i==k1||t&&KP(i))e+=Ga(i),n=i;else if(P1(i)){let s=0,a=e-2;for(;a>=0&&P1(zo(r,a));)s++,a-=2;if(s%2==0)break;e+=2}else break}return e}function ek(r,e,t){for(;e>0;){let n=qC(r,e-2,t);if(n<e)return n;e--}return 0}function zC(r){return r>=56320&&r<57344}function WC(r){return r>=55296&&r<56320}function zo(r,e){let t=r.charCodeAt(e);if(!WC(t)||e+1==r.length)return t;let n=r.charCodeAt(e+1);return zC(n)?(t-55296<<10)+(n-56320)+65536:t}function qD(r){return r<=65535?String.fromCharCode(r):(r-=65536,String.fromCharCode((r>>10)+55296,(r&1023)+56320))}function Ga(r){return r<65536?1:2}const Oy=/\r\n?|\n/;var Yo=function(r){return r[r.Simple=0]="Simple",r[r.TrackDel=1]="TrackDel",r[r.TrackBefore=2]="TrackBefore",r[r.TrackAfter=3]="TrackAfter",r}(Yo||(Yo={}));class gl{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,i=0;t<this.sections.length;){let s=this.sections[t++],a=this.sections[t++];a<0?(e(n,i,s),i+=s):i+=a,n+=s}}iterChangedRanges(e,t=!1){xy(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];i<0?e.push(n,i):e.push(i,n)}return new gl(e)}composeDesc(e){return this.empty?e:e.empty?this:ZC(this,e)}mapDesc(e,t=!1){return e.empty?this:by(this,e,t)}mapPos(e,t=-1,n=Yo.Simple){let i=0,s=0;for(let a=0;a<this.sections.length;){let l=this.sections[a++],p=this.sections[a++],m=i+l;if(p<0){if(m>e)return s+(e-i);s+=l}else{if(n!=Yo.Simple&&m>=e&&(n==Yo.TrackDel&&i<e&&m>e||n==Yo.TrackBefore&&i<e||n==Yo.TrackAfter&&m>e))return null;if(m>e||m==e&&t<0&&!l)return e==i||t<0?s:s+p;s+=p}i=m}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let n=0,i=0;n<this.sections.length&&i<=t;){let s=this.sections[n++],a=this.sections[n++],l=i+s;if(a>=0&&i<=t&&l>=e)return i<e&&l>t?"cover":!0;i=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+n+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new gl(e)}static create(e){return new gl(e)}}class To extends gl{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return xy(this,(t,n,i,s,a)=>e=e.replace(i,i+(n-t),a),!1),e}mapDesc(e,t=!1){return by(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let i=0,s=0;i<t.length;i+=2){let a=t[i],l=t[i+1];if(l>=0){t[i]=l,t[i+1]=a;let p=i>>1;for(;n.length<p;)n.push(Os.empty);n.push(a?e.slice(s,s+a):Os.empty)}s+=a}return new To(t,n)}compose(e){return this.empty?e:e.empty?this:ZC(this,e,!0)}map(e,t=!1){return e.empty?this:by(this,e,t,!0)}iterChanges(e,t=!1){xy(this,e,t)}get desc(){return gl.create(this.sections)}filter(e){let t=[],n=[],i=[],s=new Zf(this);e:for(let a=0,l=0;;){let p=a==e.length?1e9:e[a++];for(;l<p||l==p&&s.len==0;){if(s.done)break e;let g=Math.min(s.len,p-l);sa(i,g,-1);let b=s.ins==-1?-1:s.off==0?s.ins:0;sa(t,g,b),b>0&&Vc(n,t,s.text),s.forward(g),l+=g}let m=e[a++];for(;l<m;){if(s.done)break e;let g=Math.min(s.len,m-l);sa(t,g,-1),sa(i,g,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(g),l+=g}}return{changes:new To(t,n),filtered:gl.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],i=this.sections[t+1];i<0?e.push(n):i==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let i=[],s=[],a=0,l=null;function p(g=!1){if(!g&&!i.length)return;a<t&&sa(i,t-a,-1);let b=new To(i,s);l=l?l.compose(b.map(l)):b,i=[],s=[],a=0}function m(g){if(Array.isArray(g))for(let b of g)m(b);else if(g instanceof To){if(g.length!=t)throw new RangeError(`Mismatched change set length (got ${g.length}, expected ${t})`);p(),l=l?l.compose(g.map(l)):g}else{let{from:b,to:C=b,insert:$}=g;if(b>C||b<0||C>t)throw new RangeError(`Invalid change range ${b} to ${C} (in doc of length ${t})`);let Y=$?typeof $=="string"?Os.of($.split(n||Oy)):$:Os.empty,xe=Y.length;if(b==C&&xe==0)return;b<a&&p(),b>a&&sa(i,b-a,-1),sa(i,C-b,xe),Vc(s,i,Y),a=C}}return m(e),p(!l),l}static empty(e){return new To(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((a,l)=>l&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;n.length<i;)n.push(Os.empty);n[i]=Os.of(s.slice(1)),t.push(s[0],n[i].length)}}}return new To(t,n)}static createSet(e,t){return new To(e,t)}}function sa(r,e,t,n=!1){if(e==0&&t<=0)return;let i=r.length-2;i>=0&&t<=0&&t==r[i+1]?r[i]+=e:e==0&&r[i]==0?r[i+1]+=t:n?(r[i]+=e,r[i+1]+=t):r.push(e,t)}function Vc(r,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n<r.length)r[r.length-1]=r[r.length-1].append(t);else{for(;r.length<n;)r.push(Os.empty);r.push(t)}}function xy(r,e,t){let n=r.inserted;for(let i=0,s=0,a=0;a<r.sections.length;){let l=r.sections[a++],p=r.sections[a++];if(p<0)i+=l,s+=l;else{let m=i,g=s,b=Os.empty;for(;m+=l,g+=p,p&&n&&(b=b.append(n[a-2>>1])),!(t||a==r.sections.length||r.sections[a+1]<0);)l=r.sections[a++],p=r.sections[a++];e(i,m,s,g,b),i=m,s=g}}}function by(r,e,t,n=!1){let i=[],s=n?[]:null,a=new Zf(r),l=new Zf(e);for(let p=-1;;)if(a.ins==-1&&l.ins==-1){let m=Math.min(a.len,l.len);sa(i,m,-1),a.forward(m),l.forward(m)}else if(l.ins>=0&&(a.ins<0||p==a.i||a.off==0&&(l.len<a.len||l.len==a.len&&!t))){let m=l.len;for(sa(i,l.ins,-1);m;){let g=Math.min(a.len,m);a.ins>=0&&p<a.i&&a.len<=g&&(sa(i,0,a.ins),s&&Vc(s,i,a.text),p=a.i),a.forward(g),m-=g}l.next()}else if(a.ins>=0){let m=0,g=a.len;for(;g;)if(l.ins==-1){let b=Math.min(g,l.len);m+=b,g-=b,l.forward(b)}else if(l.ins==0&&l.len<g)g-=l.len,l.next();else break;sa(i,m,p<a.i?a.ins:0),s&&p<a.i&&Vc(s,i,a.text),p=a.i,a.forward(a.len-g)}else{if(a.done&&l.done)return s?To.createSet(i,s):gl.create(i);throw new Error("Mismatched change set lengths")}}function ZC(r,e,t=!1){let n=[],i=t?[]:null,s=new Zf(r),a=new Zf(e);for(let l=!1;;){if(s.done&&a.done)return i?To.createSet(n,i):gl.create(n);if(s.ins==0)sa(n,s.len,0,l),s.next();else if(a.len==0&&!a.done)sa(n,0,a.ins,l),i&&Vc(i,n,a.text),a.next();else{if(s.done||a.done)throw new Error("Mismatched change set lengths");{let p=Math.min(s.len2,a.len),m=n.length;if(s.ins==-1){let g=a.ins==-1?-1:a.off?0:a.ins;sa(n,p,g,l),i&&g&&Vc(i,n,a.text)}else a.ins==-1?(sa(n,s.off?0:s.len,p,l),i&&Vc(i,n,s.textBit(p))):(sa(n,s.off?0:s.len,a.off?0:a.ins,l),i&&!a.off&&Vc(i,n,a.text));l=(s.ins>p||a.ins>=0&&a.len>p)&&(l||n.length>m),s.forward2(p),a.forward(p)}}}}class Zf{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Os.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Os.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Mh{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,t=-1){let n,i;return this.empty?n=i=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new Mh(n,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return Pr.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Pr.range(this.anchor,n)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Pr.range(e.anchor,e.head)}static create(e,t,n){return new Mh(e,t,n)}}class Pr{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Pr.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;t<this.ranges.length;t++)if(!this.ranges[t].eq(e.ranges[t]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Pr([this.main],0)}addRange(e,t=!0){return Pr.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,Pr.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Pr(e.ranges.map(t=>Mh.fromJSON(t)),e.main)}static single(e,t=e){return new Pr([Pr.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=n:s.from<n)return Pr.normalized(e.slice(),t);n=s.to}return new Pr(e,t)}static cursor(e,t=0,n,i){return Mh.create(e,e,(t==0?0:t<0?4:8)|(n==null?3:Math.min(2,n))|(i??33554431)<<5)}static range(e,t,n,i){let s=(n??33554431)<<5|(i==null?3:Math.min(2,i));return t<e?Mh.create(t,e,24|s):Mh.create(e,t,(t>e?4:0)|s)}static normalized(e,t=0){let n=e[t];e.sort((i,s)=>i.from-s.from),t=e.indexOf(n);for(let i=1;i<e.length;i++){let s=e[i],a=e[i-1];if(s.empty?s.from<=a.to:s.from<a.to){let l=a.from,p=Math.max(s.to,a.to);i<=t&&t--,e.splice(--i,2,s.anchor>s.head?Pr.range(p,l):Pr.range(l,p))}}return new Pr(e,t)}}function YC(r,e){for(let t of r.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let zD=0;class Wn{constructor(e,t,n,i,s){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=i,this.id=zD++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}static define(e={}){return new Wn(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:WD),!!e.static,e.enables)}of(e){return new Om([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Om(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Om(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}}function WD(r,e){return r==e||r.length==e.length&&r.every((t,n)=>t===e[n])}class Om{constructor(e,t,n,i){this.dependencies=e,this.facet=t,this.type=n,this.value=i,this.id=zD++}dynamicSlot(e){var t;let n=this.value,i=this.facet.compareInput,s=this.id,a=e[s]>>1,l=this.type==2,p=!1,m=!1,g=[];for(let b of this.dependencies)b=="doc"?p=!0:b=="selection"?m=!0:((t=e[b.id])!==null&&t!==void 0?t:1)&1||g.push(e[b.id]);return{create(b){return b.values[a]=n(b),1},update(b,C){if(p&&C.docChanged||m&&(C.docChanged||C.selection)||vy(b,g)){let $=n(b);if(l?!F1($,b.values[a],i):!i($,b.values[a]))return b.values[a]=$,1}return 0},reconfigure:(b,C)=>{let $,Y=C.config.address[s];if(Y!=null){let xe=Lm(C,Y);if(this.dependencies.every(ke=>ke instanceof Wn?C.facet(ke)===b.facet(ke):ke instanceof Fo?C.field(ke,!1)==b.field(ke,!1):!0)||(l?F1($=n(b),xe,i):i($=n(b),xe)))return b.values[a]=xe,0}else $=n(b);return b.values[a]=$,1}}}}function F1(r,e,t){if(r.length!=e.length)return!1;for(let n=0;n<r.length;n++)if(!t(r[n],e[n]))return!1;return!0}function vy(r,e){let t=!1;for(let n of e)$f(r,n)&1&&(t=!0);return t}function tk(r,e,t){let n=t.map(p=>r[p.id]),i=t.map(p=>p.type),s=n.filter(p=>!(p&1)),a=r[e.id]>>1;function l(p){let m=[];for(let g=0;g<n.length;g++){let b=Lm(p,n[g]);if(i[g]==2)for(let C of b)m.push(C);else m.push(b)}return e.combine(m)}return{create(p){for(let m of n)$f(p,m);return p.values[a]=l(p),1},update(p,m){if(!vy(p,s))return 0;let g=l(p);return e.compare(g,p.values[a])?0:(p.values[a]=g,1)},reconfigure(p,m){let g=vy(p,n),b=m.config.facets[e.id],C=m.facet(e);if(b&&!g&&WD(t,b))return p.values[a]=C,0;let $=l(p);return e.compare($,C)?(p.values[a]=C,0):(p.values[a]=$,1)}}}const _1=Wn.define({static:!0});class Fo{constructor(e,t,n,i,s){this.id=e,this.createF=t,this.updateF=n,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let t=new Fo(zD++,e.create,e.update,e.compare||((n,i)=>n===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(_1).find(n=>n.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,i)=>{let s=n.values[t],a=this.updateF(s,i);return this.compareF(s,a)?0:(n.values[t]=a,1)},reconfigure:(n,i)=>i.config.address[this.id]!=null?(n.values[t]=i.field(this),0):(n.values[t]=this.create(n),1)}}init(e){return[this,_1.of({field:this,create:e})]}get extension(){return this}}const Nh={lowest:4,low:3,default:2,high:1,highest:0};function hf(r){return e=>new GC(e,r)}const ep={highest:hf(Nh.highest),high:hf(Nh.high),default:hf(Nh.default),low:hf(Nh.low),lowest:hf(Nh.lowest)};class GC{constructor(e,t){this.inner=e,this.prec=t}}class Rg{of(e){return new Cy(this,e)}reconfigure(e){return Rg.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Cy{constructor(e,t){this.compartment=e,this.inner=t}}class jm{constructor(e,t,n,i,s,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=i,this.staticValues=s,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let i=[],s=Object.create(null),a=new Map;for(let C of rk(e,t,a))C instanceof Fo?i.push(C):(s[C.facet.id]||(s[C.facet.id]=[])).push(C);let l=Object.create(null),p=[],m=[];for(let C of i)l[C.id]=m.length<<1,m.push($=>C.slot($));let g=n==null?void 0:n.config.facets;for(let C in s){let $=s[C],Y=$[0].facet,xe=g&&g[C]||[];if($.every(ke=>ke.type==0))if(l[Y.id]=p.length<<1|1,WD(xe,$))p.push(n.facet(Y));else{let ke=Y.combine($.map(ge=>ge.value));p.push(n&&Y.compare(ke,n.facet(Y))?n.facet(Y):ke)}else{for(let ke of $)ke.type==0?(l[ke.id]=p.length<<1|1,p.push(ke.value)):(l[ke.id]=m.length<<1,m.push(ge=>ke.dynamicSlot(ge)));l[Y.id]=m.length<<1,m.push(ke=>tk(ke,Y,$))}}let b=m.map(C=>C(l));return new jm(e,a,b,l,p,s)}}function rk(r,e,t){let n=[[],[],[],[],[]],i=new Map;function s(a,l){let p=i.get(a);if(p!=null){if(p<=l)return;let m=n[p].indexOf(a);m>-1&&n[p].splice(m,1),a instanceof Cy&&t.delete(a.compartment)}if(i.set(a,l),Array.isArray(a))for(let m of a)s(m,l);else if(a instanceof Cy){if(t.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let m=e.get(a.compartment)||a.inner;t.set(a.compartment,m),s(m,l)}else if(a instanceof GC)s(a.inner,a.prec);else if(a instanceof Fo)n[l].push(a),a.provides&&s(a.provides,l);else if(a instanceof Om)n[l].push(a),a.facet.extensions&&s(a.facet.extensions,Nh.default);else{let m=a.extension;if(!m)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(m,l)}}return s(r,Nh.default),n.reduce((a,l)=>a.concat(l))}function $f(r,e){if(e&1)return 2;let t=e>>1,n=r.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;r.status[t]=4;let i=r.computeSlot(r,r.config.dynamicSlots[t]);return r.status[t]=2|i}function Lm(r,e){return e&1?r.config.staticValues[e>>1]:r.values[e>>1]}const HC=Wn.define(),JC=Wn.define({combine:r=>r.some(e=>e),static:!0}),KC=Wn.define({combine:r=>r.length?r[0]:void 0,static:!0}),eS=Wn.define(),tS=Wn.define(),rS=Wn.define(),nS=Wn.define({combine:r=>r.length?r[0]:!1});class ac{constructor(e,t){this.type=e,this.value=t}static define(){return new nk}}class nk{of(e){return new ac(this,e)}}class ik{constructor(e){this.map=e}of(e){return new Qi(this,e)}}class Qi{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new Qi(this.type,t)}is(e){return this.type==e}static define(e={}){return new ik(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let i of e){let s=i.map(t);s&&n.push(s)}return n}}Qi.reconfigure=Qi.define();Qi.appendConfig=Qi.define();class ko{constructor(e,t,n,i,s,a){this.startState=e,this.changes=t,this.selection=n,this.effects=i,this.annotations=s,this.scrollIntoView=a,this._doc=null,this._state=null,n&&YC(n,t.newLength),s.some(l=>l.type==ko.time)||(this.annotations=s.concat(ko.time.of(Date.now())))}static create(e,t,n,i,s,a){return new ko(e,t,n,i,s,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(ko.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}ko.time=ac.define();ko.userEvent=ac.define();ko.addToHistory=ac.define();ko.remote=ac.define();function sk(r,e){let t=[];for(let n=0,i=0;;){let s,a;if(n<r.length&&(i==e.length||e[i]>=r[n]))s=r[n++],a=r[n++];else if(i<e.length)s=e[i++],a=e[i++];else return t;!t.length||t[t.length-1]<s?t.push(s,a):t[t.length-1]<a&&(t[t.length-1]=a)}}function iS(r,e,t){var n;let i,s,a;return t?(i=e.changes,s=To.empty(e.changes.length),a=r.changes.compose(e.changes)):(i=e.changes.map(r.changes),s=r.changes.mapDesc(e.changes,!0),a=r.changes.compose(i)),{changes:a,selection:e.selection?e.selection.map(s):(n=r.selection)===null||n===void 0?void 0:n.map(i),effects:Qi.mapEffects(r.effects,i).concat(Qi.mapEffects(e.effects,s)),annotations:r.annotations.length?r.annotations.concat(e.annotations):e.annotations,scrollIntoView:r.scrollIntoView||e.scrollIntoView}}function Sy(r,e,t){let n=e.selection,i=Mp(e.annotations);return e.userEvent&&(i=i.concat(ko.userEvent.of(e.userEvent))),{changes:e.changes instanceof To?e.changes:To.of(e.changes||[],t,r.facet(KC)),selection:n&&(n instanceof Pr?n:Pr.single(n.anchor,n.head)),effects:Mp(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function sS(r,e,t){let n=Sy(r,e.length?e[0]:{},r.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let a=!!e[s].sequential;n=iS(n,Sy(r,e[s],a?n.changes.newLength:r.doc.length),a)}let i=ko.create(r,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return ak(t?ok(i):i)}function ok(r){let e=r.startState,t=!0;for(let i of e.facet(eS)){let s=i(r);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:sk(t,s))}if(t!==!0){let i,s;if(t===!1)s=r.changes.invertedDesc,i=To.empty(e.doc.length);else{let a=r.changes.filter(t);i=a.changes,s=a.filtered.mapDesc(a.changes).invertedDesc}r=ko.create(e,i,r.selection&&r.selection.map(s),Qi.mapEffects(r.effects,s),r.annotations,r.scrollIntoView)}let n=e.facet(tS);for(let i=n.length-1;i>=0;i--){let s=n[i](r);s instanceof ko?r=s:Array.isArray(s)&&s.length==1&&s[0]instanceof ko?r=s[0]:r=sS(e,Mp(s),!1)}return r}function ak(r){let e=r.startState,t=e.facet(rS),n=r;for(let i=t.length-1;i>=0;i--){let s=t[i](r);s&&Object.keys(s).length&&(n=iS(n,Sy(e,s,r.changes.newLength),!0))}return n==r?r:ko.create(e,r.changes,r.selection,n.effects,n.annotations,n.scrollIntoView)}const uk=[];function Mp(r){return r==null?uk:Array.isArray(r)?r:[r]}var Js=function(r){return r[r.Word=0]="Word",r[r.Space=1]="Space",r[r.Other=2]="Other",r}(Js||(Js={}));const lk=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Ey;try{Ey=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function ck(r){if(Ey)return Ey.test(r);for(let e=0;e<r.length;e++){let t=r[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||lk.test(t)))return!0}return!1}function hk(r){return e=>{if(!/\S/.test(e))return Js.Space;if(ck(e))return Js.Word;for(let t=0;t<r.length;t++)if(e.indexOf(r[t])>-1)return Js.Word;return Js.Other}}class gs{constructor(e,t,n,i,s,a){this.config=e,this.doc=t,this.selection=n,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,a&&(a._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)$f(this,l<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw new RangeError("Field is not present in this state");return}return $f(this,n),Lm(this,n)}update(...e){return sS(this,e,!0)}applyTransaction(e){let t=this.config,{base:n,compartments:i}=t;for(let a of e.effects)a.is(Rg.reconfigure)?(t&&(i=new Map,t.compartments.forEach((l,p)=>i.set(p,l)),t=null),i.set(a.value.compartment,a.value.extension)):a.is(Qi.reconfigure)?(t=null,n=a.value):a.is(Qi.appendConfig)&&(t=null,n=Mp(n).concat(a.value));let s;t?s=e.startState.values.slice():(t=jm.resolve(n,i,this),s=new gs(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,p)=>p.reconfigure(l,this),null).values),new gs(t,e.newDoc,e.newSelection,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:Pr.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),i=this.changes(n.changes),s=[n.range],a=Mp(n.effects);for(let l=1;l<t.ranges.length;l++){let p=e(t.ranges[l]),m=this.changes(p.changes),g=m.map(i);for(let C=0;C<l;C++)s[C]=s[C].map(g);let b=i.mapDesc(m,!0);s.push(p.range.map(b)),i=i.compose(g),a=Qi.mapEffects(a,g).concat(Qi.mapEffects(Mp(p.effects),b))}return{changes:i,selection:Pr.create(s,t.mainIndex),effects:a}}changes(e=[]){return e instanceof To?e:To.of(e,this.doc.length,this.facet(gs.lineSeparator))}toText(e){return Os.of(e.split(this.facet(gs.lineSeparator)||Oy))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:($f(this,t),Lm(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let i=e[n];i instanceof Fo&&this.config.address[i.id]!=null&&(t[n]=i.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(n){for(let s in n)if(Object.prototype.hasOwnProperty.call(e,s)){let a=n[s],l=e[s];i.push(a.init(p=>a.spec.fromJSON(l,p)))}}return gs.create({doc:e.doc,selection:Pr.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=jm.resolve(e.extensions||[],new Map),n=e.doc instanceof Os?e.doc:Os.of((e.doc||"").split(t.staticFacet(gs.lineSeparator)||Oy)),i=e.selection?e.selection instanceof Pr?e.selection:Pr.single(e.selection.anchor,e.selection.head):Pr.single(0);return YC(i,n.length),t.staticFacet(JC)||(i=i.asSingle()),new gs(t,n,i,t.dynamicSlots.map(()=>null),(s,a)=>a.create(s),null)}get tabSize(){return this.facet(gs.tabSize)}get lineBreak(){return this.facet(gs.lineSeparator)||`
@@ -289,7 +289,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
289
289
  `),cooked:f===null?null:f.slice(1,O)},y.tail=D,this.next();let v=this.finishNode(y,"TemplateElement");return this.resetEndLocation(v,wi(this.state.lastTokEndLoc,O)),v}parseTemplate(c){let o=this.startNode();o.expressions=[];let u=this.parseTemplateElement(c);for(o.quasis=[u];!u.tail;)o.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),o.quasis.push(u=this.parseTemplateElement(c));return this.finishNode(o,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(c,o,u,h){u&&this.expectPlugin("recordAndTuple");let f=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let d=Object.create(null),y=!0,D=this.startNode();for(D.properties=[],this.next();!this.match(c);){if(y)y=!1;else if(this.expect(12),this.match(c)){this.addTrailingCommaExtraToNode(D);break}let x;o?x=this.parseBindingProperty():(x=this.parsePropertyDefinition(h),this.checkProto(x,u,d,h)),u&&!this.isObjectProperty(x)&&x.type!=="SpreadElement"&&this.raise(Qe.InvalidRecordProperty,{at:x}),x.shorthand&&this.addExtra(x,"shorthand",!0),D.properties.push(x)}this.next(),this.state.inFSharpPipelineDirectBody=f;let O="ObjectExpression";return o?O="ObjectPattern":u&&(O="RecordExpression"),this.finishNode(D,O)}addTrailingCommaExtraToNode(c){this.addExtra(c,"trailingComma",this.state.lastTokStart),this.addExtra(c,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(c){return!c.computed&&c.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(c){let o=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(Qe.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)o.push(this.parseDecorator());let u=this.startNode(),h=!1,f=!1,d;if(this.match(21))return o.length&&this.unexpected(),this.parseSpread();o.length&&(u.decorators=o,o=[]),u.method=!1,c&&(d=this.state.startLoc);let y=this.eat(55);this.parsePropertyNamePrefixOperator(u);let D=this.state.containsEsc,O=this.parsePropertyName(u,c);if(!y&&!D&&this.maybeAsyncOrAccessorProp(u)){let x=O.name;x==="async"&&!this.hasPrecedingLineBreak()&&(h=!0,this.resetPreviousNodeTrailingComments(O),y=this.eat(55),this.parsePropertyName(u)),(x==="get"||x==="set")&&(f=!0,this.resetPreviousNodeTrailingComments(O),u.kind=x,this.match(55)&&(y=!0,this.raise(Qe.AccessorIsGenerator,{at:this.state.curPosition(),kind:x}),this.next()),this.parsePropertyName(u))}return this.parseObjPropValue(u,d,y,h,!1,f,c)}getGetterSetterExpectedParamCount(c){return c.kind==="get"?0:1}getObjectOrClassMethodParams(c){return c.params}checkGetterSetterParams(c){var o;let u=this.getGetterSetterExpectedParamCount(c),h=this.getObjectOrClassMethodParams(c);h.length!==u&&this.raise(c.kind==="get"?Qe.BadGetterArity:Qe.BadSetterArity,{at:c}),c.kind==="set"&&((o=h[h.length-1])==null?void 0:o.type)==="RestElement"&&this.raise(Qe.BadSetterRestParameter,{at:c})}parseObjectMethod(c,o,u,h,f){if(f){let d=this.parseMethod(c,o,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(d),d}if(u||o||this.match(10))return h&&this.unexpected(),c.kind="method",c.method=!0,this.parseMethod(c,o,u,!1,!1,"ObjectMethod")}parseObjectProperty(c,o,u,h){if(c.shorthand=!1,this.eat(14))return c.value=u?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(h),this.finishNode(c,"ObjectProperty");if(!c.computed&&c.key.type==="Identifier"){if(this.checkReservedWord(c.key.name,c.key.loc.start,!0,!1),u)c.value=this.parseMaybeDefault(o,U(c.key));else if(this.match(29)){let f=this.state.startLoc;h!=null?h.shorthandAssignLoc===null&&(h.shorthandAssignLoc=f):this.raise(Qe.InvalidCoverInitializedName,{at:f}),c.value=this.parseMaybeDefault(o,U(c.key))}else c.value=U(c.key);return c.shorthand=!0,this.finishNode(c,"ObjectProperty")}}parseObjPropValue(c,o,u,h,f,d,y){let D=this.parseObjectMethod(c,u,h,f,d)||this.parseObjectProperty(c,o,f,y);return D||this.unexpected(),D}parsePropertyName(c,o){if(this.eat(0))c.computed=!0,c.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:u,value:h}=this.state,f;if(qe(u))f=this.parseIdentifier(!0);else switch(u){case 132:f=this.parseNumericLiteral(h);break;case 131:f=this.parseStringLiteral(h);break;case 133:f=this.parseBigIntLiteral(h);break;case 134:f=this.parseDecimalLiteral(h);break;case 136:{let d=this.state.startLoc;o!=null?o.privateKeyLoc===null&&(o.privateKeyLoc=d):this.raise(Qe.UnexpectedPrivateField,{at:d}),f=this.parsePrivateName();break}default:this.unexpected()}c.key=f,u!==136&&(c.computed=!1)}return c.key}initFunction(c,o){c.id=null,c.generator=!1,c.async=o}parseMethod(c,o,u,h,f,d){let y=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1;this.initFunction(c,u),c.generator=o,this.scope.enter(xa|pu|(y?Ia:0)|(f?Bl:0)),this.prodParam.enter(fe(u,c.generator)),this.parseFunctionParams(c,h);let D=this.parseFunctionBodyAndFinish(c,d,!0);return this.prodParam.exit(),this.scope.exit(),D}parseArrayLike(c,o,u,h){u&&this.expectPlugin("recordAndTuple");let f=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let d=this.startNode();return this.next(),d.elements=this.parseExprList(c,!u,h,d),this.state.inFSharpPipelineDirectBody=f,this.finishNode(d,u?"TupleExpression":"ArrayExpression")}parseArrowExpression(c,o,u,h){this.scope.enter(xa|$l);let f=fe(u,!1);!this.match(5)&&this.prodParam.hasIn&&(f|=pe),this.prodParam.enter(f),this.initFunction(c,u);let d=this.state.maybeInArrowParameters;return o&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(c,o,h)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(c,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=d,this.finishNode(c,"ArrowFunctionExpression")}setArrowFunctionParameters(c,o,u){this.toAssignableList(o,u,!1),c.params=o}parseFunctionBodyAndFinish(c,o){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.parseFunctionBody(c,!1,u),this.finishNode(c,o)}parseFunctionBody(c,o){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,h=o&&!this.match(5);if(this.expressionScope.enter(w()),h)c.body=this.parseMaybeAssign(),this.checkParams(c,!1,o,!1);else{let f=this.state.strict,d=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|oe),c.body=this.parseBlock(!0,!1,y=>{let D=!this.isSimpleParamList(c.params);y&&D&&this.raise(Qe.IllegalLanguageModeDirective,{at:(c.kind==="method"||c.kind==="constructor")&&c.key?c.key.loc.end:c});let O=!f&&this.state.strict;this.checkParams(c,!this.state.strict&&!o&&!u&&!D,o,O),this.state.strict&&c.id&&this.checkIdentifier(c.id,up,O)}),this.prodParam.exit(),this.state.labels=d}this.expressionScope.exit()}isSimpleParameter(c){return c.type==="Identifier"}isSimpleParamList(c){for(let o=0,u=c.length;o<u;o++)if(!this.isSimpleParameter(c[o]))return!1;return!0}checkParams(c,o,u){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,f=!o&&new Set,d={type:"FormalParameters"};for(let y of c.params)this.checkLVal(y,{in:d,binding:Yu,checkClashes:f,strictModeChanged:h})}parseExprList(c,o,u,h){let f=[],d=!0;for(;!this.eat(c);){if(d)d=!1;else if(this.expect(12),this.match(c)){h&&this.addTrailingCommaExtraToNode(h),this.next();break}f.push(this.parseExprListItem(o,u))}return f}parseExprListItem(c,o,u){let h;if(this.match(12))c||this.raise(Qe.UnexpectedToken,{at:this.state.curPosition(),unexpected:","}),h=null;else if(this.match(21)){let f=this.state.startLoc;h=this.parseParenItem(this.parseSpread(o),f)}else if(this.match(17)){this.expectPlugin("partialApplication"),u||this.raise(Qe.UnexpectedArgumentPlaceholder,{at:this.state.startLoc});let f=this.startNode();this.next(),h=this.finishNode(f,"ArgumentPlaceholder")}else h=this.parseMaybeAssignAllowIn(o,this.parseParenItem);return h}parseIdentifier(c){let o=this.startNode(),u=this.parseIdentifierName(c);return this.createIdentifier(o,u)}createIdentifier(c,o){return c.name=o,c.loc.identifierName=o,this.finishNode(c,"Identifier")}parseIdentifierName(c){let o,{startLoc:u,type:h}=this.state;qe(h)?o=this.state.value:this.unexpected();let f=kt(h);return c?f&&this.replaceToken(130):this.checkReservedWord(o,u,f,!1),this.next(),o}checkReservedWord(c,o,u,h){if(!(c.length>10||!op(c))){if(u&&Xu(c)){this.raise(Qe.UnexpectedKeyword,{at:o,keyword:c});return}if((this.state.strict?h?ss:Za:fh)(c,this.inModule)){this.raise(Qe.UnexpectedReservedWord,{at:o,reservedWord:c});return}else if(c==="yield"){if(this.prodParam.hasYield){this.raise(Qe.YieldBindingIdentifier,{at:o});return}}else if(c==="await"){if(this.prodParam.hasAwait){this.raise(Qe.AwaitBindingIdentifier,{at:o});return}if(this.scope.inStaticBlock){this.raise(Qe.AwaitBindingIdentifierInStaticBlock,{at:o});return}this.expressionScope.recordAsyncArrowParametersError({at:o})}else if(c==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(Qe.ArgumentsInClass,{at:o});return}}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(c){let o=this.startNodeAt(c);return this.expressionScope.recordParameterInitializerError(Qe.AwaitExpressionFormalParameter,{at:o}),this.eat(55)&&this.raise(Qe.ObsoleteAwaitStar,{at:o}),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(o.argument=this.parseMaybeUnary(null,!0)),this.finishNode(o,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:c}=this.state;return c===53||c===10||c===0||ts(c)||c===101&&!this.state.containsEsc||c===135||c===56||this.hasPlugin("v8intrinsic")&&c===54}parseYield(){let c=this.startNode();this.expressionScope.recordParameterInitializerError(Qe.YieldInParameter,{at:c}),this.next();let o=!1,u=null;if(!this.hasPrecedingLineBreak())switch(o=this.eat(55),this.state.type){case 13:case 137:case 8:case 11:case 3:case 9:case 14:case 12:if(!o)break;default:u=this.parseMaybeAssign()}return c.delegate=o,c.argument=u,this.finishNode(c,"YieldExpression")}checkPipelineAtInfixOperator(c,o){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&c.type==="SequenceExpression"&&this.raise(Qe.PipelineHeadSequenceExpression,{at:o})}parseSmartPipelineBodyInStyle(c,o){if(this.isSimpleReference(c)){let u=this.startNodeAt(o);return u.callee=c,this.finishNode(u,"PipelineBareFunction")}else{let u=this.startNodeAt(o);return this.checkSmartPipeTopicBodyEarlyErrors(o),u.expression=c,this.finishNode(u,"PipelineTopicExpression")}}isSimpleReference(c){switch(c.type){case"MemberExpression":return!c.computed&&this.isSimpleReference(c.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(c){if(this.match(19))throw this.raise(Qe.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(Qe.PipelineTopicUnused,{at:c})}withTopicBindingContext(c){let o=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return c()}finally{this.state.topicContext=o}}withSmartMixTopicForbiddingContext(c){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let o=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return c()}finally{this.state.topicContext=o}}else return c()}withSoloAwaitPermittingContext(c){let o=this.state.soloAwait;this.state.soloAwait=!0;try{return c()}finally{this.state.soloAwait=o}}allowInAnd(c){let o=this.prodParam.currentFlags();if(pe&~o){this.prodParam.enter(o|pe);try{return c()}finally{this.prodParam.exit()}}return c()}disallowInAnd(c){let o=this.prodParam.currentFlags();if(pe&o){this.prodParam.enter(o&~pe);try{return c()}finally{this.prodParam.exit()}}return c()}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(c){let o=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let u=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let h=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),o,c);return this.state.inFSharpPipelineDirectBody=u,h}parseModuleExpression(){this.expectPlugin("moduleBlocks");let c=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let o=this.startNodeAt(this.state.endLoc);this.next();let u=this.initializeScopes(!0);this.enterInitialScopes();try{c.body=this.parseProgram(o,8,"module")}finally{u()}return this.finishNode(c,"ModuleExpression")}parsePropertyNamePrefixOperator(c){}},Ac={kind:"loop"},Cp={kind:"switch"},i0=/[\uD800-\uDFFF]/u,lf=/in(?:stanceof)?/y;function s0(c,o){for(let u=0;u<c.length;u++){let h=c[u],{type:f}=h;if(typeof f=="number"){{if(f===136){let{loc:d,start:y,value:D,end:O}=h,x=y+1,v=wi(d.start,1);c.splice(u,1,new na({type:Er(27),value:"#",start:y,end:x,startLoc:d.start,endLoc:v}),new na({type:Er(130),value:D,start:x,end:O,startLoc:v,endLoc:d.end})),u++;continue}if(ts(f)){let{loc:d,start:y,value:D,end:O}=h,x=y+1,v=wi(d.start,1),E;o.charCodeAt(y)===96?E=new na({type:Er(22),value:"`",start:y,end:x,startLoc:d.start,endLoc:v}):E=new na({type:Er(8),value:"}",start:y,end:x,startLoc:d.start,endLoc:v});let F,k,I,T;f===24?(k=O-1,I=wi(d.end,-1),F=D===null?null:D.slice(1,-1),T=new na({type:Er(22),value:"`",start:k,end:O,startLoc:I,endLoc:d.end})):(k=O-2,I=wi(d.end,-2),F=D===null?null:D.slice(1,-2),T=new na({type:Er(23),value:"${",start:k,end:O,startLoc:I,endLoc:d.end})),c.splice(u,1,E,new na({type:Er(20),value:F,start:x,end:k,startLoc:v,endLoc:I}),T),u+=2;continue}}h.type=Er(f)}}return c}var o0=class extends oo{parseTopLevel(c,o){return c.program=this.parseProgram(o),c.comments=this.state.comments,this.options.tokens&&(c.tokens=s0(this.tokens,this.input)),this.finishNode(c,"File")}parseProgram(c){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:137,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.options.sourceType;if(c.sourceType=u,c.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(c,!0,!0,o),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[f,d]of Array.from(this.scope.undefinedExports))this.raise(Qe.ModuleExportUndefined,{at:d,localName:f});let h;return o===137?h=this.finishNode(c,"Program"):h=this.finishNodeAt(c,"Program",wi(this.state.startLoc,-1)),h}stmtToDirective(c){let o=c;o.type="Directive",o.value=o.expression,delete o.expression;let u=o.value,h=u.value,f=this.input.slice(u.start,u.end),d=u.value=f.slice(1,-1);return this.addExtra(u,"raw",f),this.addExtra(u,"rawValue",d),this.addExtra(u,"expressionValue",h),u.type="DirectiveLiteral",o}parseInterpreterDirective(){if(!this.match(28))return null;let c=this.startNode();return c.value=this.state.value,this.next(),this.finishNode(c,"InterpreterDirective")}isLet(){return this.isContextual(99)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(c,o){if(Xo(c)){if(lf.lastIndex=o,lf.test(this.input)){let u=this.codePointAtPos(lf.lastIndex);if(!Oa(u)&&u!==92)return!1}return!0}else return c===92}chStartsBindingPattern(c){return c===91||c===123}hasFollowingBindingAtom(){let c=this.nextTokenStart(),o=this.codePointAtPos(c);return this.chStartsBindingPattern(o)||this.chStartsBindingIdentifier(o,c)}hasFollowingBindingIdentifier(){let c=this.nextTokenStart(),o=this.codePointAtPos(c);return this.chStartsBindingIdentifier(o,c)}startsUsingForOf(){let c=this.lookahead();return c.type===101&&!c.containsEsc?!1:(this.expectPlugin("explicitResourceManagement"),!0)}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=0;return this.options.annexB&&!this.state.strict&&(o|=4,c&&(o|=8)),this.parseStatementLike(o)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(c){let o=null;return this.match(26)&&(o=this.parseDecorators(!0)),this.parseStatementContent(c,o)}parseStatementContent(c,o){let u=this.state.type,h=this.startNode(),f=!!(c&2),d=!!(c&4),y=c&1;switch(u){case 60:return this.parseBreakContinueStatement(h,!0);case 63:return this.parseBreakContinueStatement(h,!1);case 64:return this.parseDebuggerStatement(h);case 90:return this.parseDoWhileStatement(h);case 91:return this.parseForStatement(h);case 68:if(this.lookaheadCharCode()===46)break;return d||this.raise(this.state.strict?Qe.StrictFunction:this.options.annexB?Qe.SloppyFunctionAnnexB:Qe.SloppyFunction,{at:this.state.startLoc}),this.parseFunctionStatement(h,!1,!f&&d);case 80:return f||this.unexpected(),this.parseClass(this.maybeTakeDecorators(o,h),!0);case 69:return this.parseIfStatement(h);case 70:return this.parseReturnStatement(h);case 71:return this.parseSwitchStatement(h);case 72:return this.parseThrowStatement(h);case 73:return this.parseTryStatement(h);case 105:if(this.hasFollowingLineBreak()||this.state.containsEsc||!this.hasFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(Qe.UnexpectedUsingDeclaration,{at:this.state.startLoc}):f||this.raise(Qe.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(h,"using");case 99:{if(this.state.containsEsc)break;let x=this.nextTokenStart(),v=this.codePointAtPos(x);if(v!==91&&(!f&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(v,x)&&v!==123))break}case 75:f||this.raise(Qe.UnexpectedLexicalDeclaration,{at:this.state.startLoc});case 74:{let x=this.state.value;return this.parseVarStatement(h,x)}case 92:return this.parseWhileStatement(h);case 76:return this.parseWithStatement(h);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(h);case 83:{let x=this.lookaheadCharCode();if(x===40||x===46)break}case 82:{!this.options.allowImportExportEverywhere&&!y&&this.raise(Qe.UnexpectedImportExport,{at:this.state.startLoc}),this.next();let x;return u===83?(x=this.parseImport(h),x.type==="ImportDeclaration"&&(!x.importKind||x.importKind==="value")&&(this.sawUnambiguousESM=!0)):(x=this.parseExport(h,o),(x.type==="ExportNamedDeclaration"&&(!x.exportKind||x.exportKind==="value")||x.type==="ExportAllDeclaration"&&(!x.exportKind||x.exportKind==="value")||x.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(x),x}default:if(this.isAsyncFunction())return f||this.raise(Qe.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(h,!0,!f&&d)}let D=this.state.value,O=this.parseExpression();return at(u)&&O.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(h,D,O,c):this.parseExpressionStatement(h,O,o)}assertModuleNodeAllowed(c){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(Qe.ImportOutsideModule,{at:c})}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(c,o,u){return c&&(o.decorators&&o.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(Qe.DecoratorsBeforeAfterExport,{at:o.decorators[0]}),o.decorators.unshift(...c)):o.decorators=c,this.resetStartLocationFromNode(o,c[0]),u&&this.resetStartLocationFromNode(u,o)),o}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(c){let o=[];do o.push(this.parseDecorator());while(this.match(26));if(this.match(82))c||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(Qe.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(Qe.UnexpectedLeadingDecorator,{at:this.state.startLoc});return o}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let c=this.startNode();if(this.next(),this.hasPlugin("decorators")){let o=this.state.startLoc,u;if(this.match(10)){let h=this.state.startLoc;this.next(),u=this.parseExpression(),this.expect(11),u=this.wrapParenthesis(h,u);let f=this.state.startLoc;c.expression=this.parseMaybeDecoratorArguments(u),this.getPluginOption("decorators","allowCallParenthesized")===!1&&c.expression!==u&&this.raise(Qe.DecoratorArgumentsOutsideParentheses,{at:f})}else{for(u=this.parseIdentifier(!1);this.eat(16);){let h=this.startNodeAt(o);h.object=u,this.match(136)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),h.property=this.parsePrivateName()):h.property=this.parseIdentifier(!0),h.computed=!1,u=this.finishNode(h,"MemberExpression")}c.expression=this.parseMaybeDecoratorArguments(u)}}else c.expression=this.parseExprSubscripts();return this.finishNode(c,"Decorator")}parseMaybeDecoratorArguments(c){if(this.eat(10)){let o=this.startNodeAtNode(c);return o.callee=c,o.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(o.arguments),this.finishNode(o,"CallExpression")}return c}parseBreakContinueStatement(c,o){return this.next(),this.isLineTerminator()?c.label=null:(c.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(c,o),this.finishNode(c,o?"BreakStatement":"ContinueStatement")}verifyBreakContinue(c,o){let u;for(u=0;u<this.state.labels.length;++u){let h=this.state.labels[u];if((c.label==null||h.name===c.label.name)&&(h.kind!=null&&(o||h.kind==="loop")||c.label&&o))break}if(u===this.state.labels.length){let h=o?"BreakStatement":"ContinueStatement";this.raise(Qe.IllegalBreakContinue,{at:c,type:h})}}parseDebuggerStatement(c){return this.next(),this.semicolon(),this.finishNode(c,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let c=this.parseExpression();return this.expect(11),c}parseDoWhileStatement(c){return this.next(),this.state.labels.push(Ac),c.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),c.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(c,"DoWhileStatement")}parseForStatement(c){this.next(),this.state.labels.push(Ac);let o=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(o=this.state.lastTokStartLoc),this.scope.enter(Vu),this.expect(10),this.match(13))return o!==null&&this.unexpected(o),this.parseFor(c,null);let u=this.isContextual(99),h=this.isContextual(105)&&!this.hasFollowingLineBreak(),f=u&&this.hasFollowingBindingAtom()||h&&this.hasFollowingBindingIdentifier()&&this.startsUsingForOf();if(this.match(74)||this.match(75)||f){let x=this.startNode(),v=this.state.value;this.next(),this.parseVar(x,!0,v);let E=this.finishNode(x,"VariableDeclaration"),F=this.match(58);return F&&h&&this.raise(Qe.ForInUsing,{at:E}),(F||this.isContextual(101))&&E.declarations.length===1?this.parseForIn(c,E,o):(o!==null&&this.unexpected(o),this.parseFor(c,E))}let d=this.isContextual(95),y=new de,D=this.parseExpression(!0,y),O=this.isContextual(101);if(O&&(u&&this.raise(Qe.ForOfLet,{at:D}),o===null&&d&&D.type==="Identifier"&&this.raise(Qe.ForOfAsync,{at:D})),O||this.match(58)){this.checkDestructuringPrivate(y),this.toAssignable(D,!0);let x=O?"ForOfStatement":"ForInStatement";return this.checkLVal(D,{in:{type:x}}),this.parseForIn(c,D,o)}else this.checkExpressionErrors(y,!0);return o!==null&&this.unexpected(o),this.parseFor(c,D)}parseFunctionStatement(c,o,u){return this.next(),this.parseFunction(c,1|(u?2:0)|(o?8:0))}parseIfStatement(c){return this.next(),c.test=this.parseHeaderExpression(),c.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),c.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(c,"IfStatement")}parseReturnStatement(c){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(Qe.IllegalReturn,{at:this.state.startLoc}),this.next(),this.isLineTerminator()?c.argument=null:(c.argument=this.parseExpression(),this.semicolon()),this.finishNode(c,"ReturnStatement")}parseSwitchStatement(c){this.next(),c.discriminant=this.parseHeaderExpression();let o=c.cases=[];this.expect(5),this.state.labels.push(Cp),this.scope.enter(Vu);let u;for(let h;!this.match(8);)if(this.match(61)||this.match(65)){let f=this.match(61);u&&this.finishNode(u,"SwitchCase"),o.push(u=this.startNode()),u.consequent=[],this.next(),f?u.test=this.parseExpression():(h&&this.raise(Qe.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc}),h=!0,u.test=null),this.expect(14)}else u?u.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),u&&this.finishNode(u,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(c,"SwitchStatement")}parseThrowStatement(c){return this.next(),this.hasPrecedingLineBreak()&&this.raise(Qe.NewlineAfterThrow,{at:this.state.lastTokEndLoc}),c.argument=this.parseExpression(),this.semicolon(),this.finishNode(c,"ThrowStatement")}parseCatchClauseParam(){let c=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&c.type==="Identifier"?qu:0),this.checkLVal(c,{in:{type:"CatchClause"},binding:Oc}),c}parseTryStatement(c){if(this.next(),c.block=this.parseBlock(),c.handler=null,this.match(62)){let o=this.startNode();this.next(),this.match(10)?(this.expect(10),o.param=this.parseCatchClauseParam(),this.expect(11)):(o.param=null,this.scope.enter(Vu)),o.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),c.handler=this.finishNode(o,"CatchClause")}return c.finalizer=this.eat(67)?this.parseBlock():null,!c.handler&&!c.finalizer&&this.raise(Qe.NoCatchOrFinally,{at:c}),this.finishNode(c,"TryStatement")}parseVarStatement(c,o){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.next(),this.parseVar(c,!1,o,u),this.semicolon(),this.finishNode(c,"VariableDeclaration")}parseWhileStatement(c){return this.next(),c.test=this.parseHeaderExpression(),this.state.labels.push(Ac),c.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(c,"WhileStatement")}parseWithStatement(c){return this.state.strict&&this.raise(Qe.StrictWith,{at:this.state.startLoc}),this.next(),c.object=this.parseHeaderExpression(),c.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(c,"WithStatement")}parseEmptyStatement(c){return this.next(),this.finishNode(c,"EmptyStatement")}parseLabeledStatement(c,o,u,h){for(let d of this.state.labels)d.name===o&&this.raise(Qe.LabelRedeclaration,{at:u,labelName:o});let f=wt(this.state.type)?"loop":this.match(71)?"switch":null;for(let d=this.state.labels.length-1;d>=0;d--){let y=this.state.labels[d];if(y.statementStart===c.start)y.statementStart=this.state.start,y.kind=f;else break}return this.state.labels.push({name:o,kind:f,statementStart:this.state.start}),c.body=h&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),c.label=u,this.finishNode(c,"LabeledStatement")}parseExpressionStatement(c,o,u){return c.expression=o,this.semicolon(),this.finishNode(c,"ExpressionStatement")}parseBlock(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,u=arguments.length>2?arguments[2]:void 0,h=this.startNode();return c&&this.state.strictErrors.clear(),this.expect(5),o&&this.scope.enter(Vu),this.parseBlockBody(h,c,!1,8,u),o&&this.scope.exit(),this.finishNode(h,"BlockStatement")}isValidDirective(c){return c.type==="ExpressionStatement"&&c.expression.type==="StringLiteral"&&!c.expression.extra.parenthesized}parseBlockBody(c,o,u,h,f){let d=c.body=[],y=c.directives=[];this.parseBlockOrModuleBlockBody(d,o?y:void 0,u,h,f)}parseBlockOrModuleBlockBody(c,o,u,h,f){let d=this.state.strict,y=!1,D=!1;for(;!this.match(h);){let O=u?this.parseModuleItem():this.parseStatementListItem();if(o&&!D){if(this.isValidDirective(O)){let x=this.stmtToDirective(O);o.push(x),!y&&x.value.value==="use strict"&&(y=!0,this.setStrict(!0));continue}D=!0,this.state.strictErrors.clear()}c.push(O)}f&&f.call(this,y),d||this.setStrict(!1),this.next()}parseFor(c,o){return c.init=o,this.semicolon(!1),c.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),c.update=this.match(11)?null:this.parseExpression(),this.expect(11),c.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(c,"ForStatement")}parseForIn(c,o,u){let h=this.match(58);return this.next(),h?u!==null&&this.unexpected(u):c.await=u!==null,o.type==="VariableDeclaration"&&o.declarations[0].init!=null&&(!h||!this.options.annexB||this.state.strict||o.kind!=="var"||o.declarations[0].id.type!=="Identifier")&&this.raise(Qe.ForInOfLoopInitializer,{at:o,type:h?"ForInStatement":"ForOfStatement"}),o.type==="AssignmentPattern"&&this.raise(Qe.InvalidLhs,{at:o,ancestor:{type:"ForStatement"}}),c.left=o,c.right=h?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),c.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(c,h?"ForInStatement":"ForOfStatement")}parseVar(c,o,u){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,f=c.declarations=[];for(c.kind=u;;){let d=this.startNode();if(this.parseVarId(d,u),d.init=this.eat(29)?o?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,d.init===null&&!h&&(d.id.type!=="Identifier"&&!(o&&(this.match(58)||this.isContextual(101)))?this.raise(Qe.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"}):u==="const"&&!(this.match(58)||this.isContextual(101))&&this.raise(Qe.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"})),f.push(this.finishNode(d,"VariableDeclarator")),!this.eat(12))break}return c}parseVarId(c,o){o==="using"&&!this.inModule&&this.match(96)&&this.raise(Qe.AwaitInUsingBinding,{at:this.state.startLoc});let u=this.parseBindingAtom();this.checkLVal(u,{in:{type:"VariableDeclarator"},binding:o==="var"?Yu:Ra}),c.id=u}parseAsyncFunctionExpression(c){return this.parseFunction(c,8)}parseFunction(c){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,u=o&2,h=!!(o&1),f=h&&!(o&4),d=!!(o&8);this.initFunction(c,d),this.match(55)&&(u&&this.raise(Qe.GeneratorInSingleStatementContext,{at:this.state.startLoc}),this.next(),c.generator=!0),h&&(c.id=this.parseFunctionId(f));let y=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(xa),this.prodParam.enter(fe(d,c.generator)),h||(c.id=this.parseFunctionId()),this.parseFunctionParams(c,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(c,h?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),h&&!u&&this.registerFunctionStatementId(c),this.state.maybeInArrowParameters=y,c}parseFunctionId(c){return c||at(this.state.type)?this.parseIdentifier():null}parseFunctionParams(c,o){this.expect(10),this.expressionScope.enter(Eh()),c.params=this.parseBindingList(11,41,2|(o?4:0)),this.expressionScope.exit()}registerFunctionStatementId(c){c.id&&this.scope.declareName(c.id.name,!this.options.annexB||this.state.strict||c.generator||c.async?this.scope.treatFunctionsAsVar?Yu:Ra:xc,c.id.loc.start)}parseClass(c,o,u){this.next();let h=this.state.strict;return this.state.strict=!0,this.parseClassId(c,o,u),this.parseClassSuper(c),c.body=this.parseClassBody(!!c.superClass,h),this.finishNode(c,o?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(c){return!c.computed&&!c.static&&(c.key.name==="constructor"||c.key.value==="constructor")}parseClassBody(c,o){this.classScope.enter();let u={hadConstructor:!1,hadSuperClass:c},h=[],f=this.startNode();if(f.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(h.length>0)throw this.raise(Qe.DecoratorSemicolon,{at:this.state.lastTokEndLoc});continue}if(this.match(26)){h.push(this.parseDecorator());continue}let d=this.startNode();h.length&&(d.decorators=h,this.resetStartLocationFromNode(d,h[0]),h=[]),this.parseClassMember(f,d,u),d.kind==="constructor"&&d.decorators&&d.decorators.length>0&&this.raise(Qe.DecoratorConstructor,{at:d})}}),this.state.strict=o,this.next(),h.length)throw this.raise(Qe.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(f,"ClassBody")}parseClassMemberFromModifier(c,o){let u=this.parseIdentifier(!0);if(this.isClassMethod()){let h=o;return h.kind="method",h.computed=!1,h.key=u,h.static=!1,this.pushClassMethod(c,h,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let h=o;return h.computed=!1,h.key=u,h.static=!1,c.body.push(this.parseClassProperty(h)),!0}return this.resetPreviousNodeTrailingComments(u),!1}parseClassMember(c,o,u){let h=this.isContextual(104);if(h){if(this.parseClassMemberFromModifier(c,o))return;if(this.eat(5)){this.parseClassStaticBlock(c,o);return}}this.parseClassMemberWithIsStatic(c,o,u,h)}parseClassMemberWithIsStatic(c,o,u,h){let f=o,d=o,y=o,D=o,O=o,x=f,v=f;if(o.static=h,this.parsePropertyNamePrefixOperator(o),this.eat(55)){x.kind="method";let T=this.match(136);if(this.parseClassElementName(x),T){this.pushClassPrivateMethod(c,d,!0,!1);return}this.isNonstaticConstructor(f)&&this.raise(Qe.ConstructorIsGenerator,{at:f.key}),this.pushClassMethod(c,f,!0,!1,!1,!1);return}let E=at(this.state.type)&&!this.state.containsEsc,F=this.match(136),k=this.parseClassElementName(o),I=this.state.startLoc;if(this.parsePostMemberNameModifiers(v),this.isClassMethod()){if(x.kind="method",F){this.pushClassPrivateMethod(c,d,!1,!1);return}let T=this.isNonstaticConstructor(f),_=!1;T&&(f.kind="constructor",u.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(Qe.DuplicateConstructor,{at:k}),T&&this.hasPlugin("typescript")&&o.override&&this.raise(Qe.OverrideOnConstructor,{at:k}),u.hadConstructor=!0,_=u.hadSuperClass),this.pushClassMethod(c,f,!1,!1,T,_)}else if(this.isClassProperty())F?this.pushClassPrivateProperty(c,D):this.pushClassProperty(c,y);else if(E&&k.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(k);let T=this.eat(55);v.optional&&this.unexpected(I),x.kind="method";let _=this.match(136);this.parseClassElementName(x),this.parsePostMemberNameModifiers(v),_?this.pushClassPrivateMethod(c,d,T,!0):(this.isNonstaticConstructor(f)&&this.raise(Qe.ConstructorIsAsync,{at:f.key}),this.pushClassMethod(c,f,T,!0,!1,!1))}else if(E&&(k.name==="get"||k.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(k),x.kind=k.name;let T=this.match(136);this.parseClassElementName(f),T?this.pushClassPrivateMethod(c,d,!1,!1):(this.isNonstaticConstructor(f)&&this.raise(Qe.ConstructorIsAccessor,{at:f.key}),this.pushClassMethod(c,f,!1,!1,!1,!1)),this.checkGetterSetterParams(f)}else if(E&&k.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(k);let T=this.match(136);this.parseClassElementName(y),this.pushClassAccessorProperty(c,O,T)}else this.isLineTerminator()?F?this.pushClassPrivateProperty(c,D):this.pushClassProperty(c,y):this.unexpected()}parseClassElementName(c){let{type:o,value:u}=this.state;if((o===130||o===131)&&c.static&&u==="prototype"&&this.raise(Qe.StaticPrototype,{at:this.state.startLoc}),o===136){u==="constructor"&&this.raise(Qe.ConstructorClassPrivateField,{at:this.state.startLoc});let h=this.parsePrivateName();return c.key=h,h}return this.parsePropertyName(c)}parseClassStaticBlock(c,o){var u;this.scope.enter(Ia|zu|pu);let h=this.state.labels;this.state.labels=[],this.prodParam.enter(ee);let f=o.body=[];this.parseBlockOrModuleBlockBody(f,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=h,c.body.push(this.finishNode(o,"StaticBlock")),(u=o.decorators)!=null&&u.length&&this.raise(Qe.DecoratorStaticBlock,{at:o})}pushClassProperty(c,o){!o.computed&&(o.key.name==="constructor"||o.key.value==="constructor")&&this.raise(Qe.ConstructorClassField,{at:o.key}),c.body.push(this.parseClassProperty(o))}pushClassPrivateProperty(c,o){let u=this.parseClassPrivateProperty(o);c.body.push(u),this.classScope.declarePrivateName(this.getPrivateNameSV(u.key),Ju,u.key.loc.start)}pushClassAccessorProperty(c,o,u){if(!u&&!o.computed){let f=o.key;(f.name==="constructor"||f.value==="constructor")&&this.raise(Qe.ConstructorClassField,{at:f})}let h=this.parseClassAccessorProperty(o);c.body.push(h),u&&this.classScope.declarePrivateName(this.getPrivateNameSV(h.key),Ju,h.key.loc.start)}pushClassMethod(c,o,u,h,f,d){c.body.push(this.parseMethod(o,u,h,f,d,"ClassMethod",!0))}pushClassPrivateMethod(c,o,u,h){let f=this.parseMethod(o,u,h,!1,!1,"ClassPrivateMethod",!0);c.body.push(f);let d=f.kind==="get"?f.static?vc:Cc:f.kind==="set"?f.static?Hu:Vl:Ju;this.declareClassPrivateMethodInScope(f,d)}declareClassPrivateMethodInScope(c,o){this.classScope.declarePrivateName(this.getPrivateNameSV(c.key),o,c.key.loc.start)}parsePostMemberNameModifiers(c){}parseClassPrivateProperty(c){return this.parseInitializer(c),this.semicolon(),this.finishNode(c,"ClassPrivateProperty")}parseClassProperty(c){return this.parseInitializer(c),this.semicolon(),this.finishNode(c,"ClassProperty")}parseClassAccessorProperty(c){return this.parseInitializer(c),this.semicolon(),this.finishNode(c,"ClassAccessorProperty")}parseInitializer(c){this.scope.enter(Ia|pu),this.expressionScope.enter(w()),this.prodParam.enter(ee),c.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(c,o,u){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ap;if(at(this.state.type))c.id=this.parseIdentifier(),o&&this.declareNameFromIdentifier(c.id,h);else if(u||!o)c.id=null;else throw this.raise(Qe.MissingClassName,{at:this.state.startLoc})}parseClassSuper(c){c.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(c,o){let u=this.maybeParseExportDefaultSpecifier(c),h=!u||this.eat(12),f=h&&this.eatExportStar(c),d=f&&this.maybeParseExportNamespaceSpecifier(c),y=h&&(!d||this.eat(12)),D=u||f;if(f&&!d){if(u&&this.unexpected(),o)throw this.raise(Qe.UnsupportedDecoratorExport,{at:c});return this.parseExportFrom(c,!0),this.finishNode(c,"ExportAllDeclaration")}let O=this.maybeParseExportNamedSpecifiers(c);u&&h&&!f&&!O&&this.unexpected(null,5),d&&y&&this.unexpected(null,97);let x;if(D||O){if(x=!1,o)throw this.raise(Qe.UnsupportedDecoratorExport,{at:c});this.parseExportFrom(c,D)}else x=this.maybeParseExportDeclaration(c);if(D||O||x){var v;let E=c;if(this.checkExport(E,!0,!1,!!E.source),((v=E.declaration)==null?void 0:v.type)==="ClassDeclaration")this.maybeTakeDecorators(o,E.declaration,E);else if(o)throw this.raise(Qe.UnsupportedDecoratorExport,{at:c});return this.finishNode(E,"ExportNamedDeclaration")}if(this.eat(65)){let E=c,F=this.parseExportDefaultExpression();if(E.declaration=F,F.type==="ClassDeclaration")this.maybeTakeDecorators(o,F,E);else if(o)throw this.raise(Qe.UnsupportedDecoratorExport,{at:c});return this.checkExport(E,!0,!0),this.finishNode(E,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(c){return this.eat(55)}maybeParseExportDefaultSpecifier(c){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");let o=this.startNode();return o.exported=this.parseIdentifier(!0),c.specifiers=[this.finishNode(o,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(c){if(this.isContextual(93)){c.specifiers||(c.specifiers=[]);let o=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),o.exported=this.parseModuleExportName(),c.specifiers.push(this.finishNode(o,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(c){if(this.match(5)){c.specifiers||(c.specifiers=[]);let o=c.exportKind==="type";return c.specifiers.push(...this.parseExportSpecifiers(o)),c.source=null,c.declaration=null,this.hasPlugin("importAssertions")&&(c.assertions=[]),!0}return!1}maybeParseExportDeclaration(c){return this.shouldParseExportDeclaration()?(c.specifiers=[],c.source=null,this.hasPlugin("importAssertions")&&(c.assertions=[]),c.declaration=this.parseExportDeclaration(c),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let c=this.nextTokenStart();return!yh.test(this.input.slice(this.state.pos,c))&&this.isUnparsedContextual(c,"function")}parseExportDefaultExpression(){let c=this.startNode();if(this.match(68))return this.next(),this.parseFunction(c,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(c,13);if(this.match(80))return this.parseClass(c,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(Qe.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(Qe.UnsupportedDefaultExport,{at:this.state.startLoc});let o=this.parseMaybeAssignAllowIn();return this.semicolon(),o}parseExportDeclaration(c){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:c}=this.state;if(at(c)){if(c===95&&!this.state.containsEsc||c===99)return!1;if((c===128||c===127)&&!this.state.containsEsc){let{type:h}=this.lookahead();if(at(h)&&h!==97||h===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let o=this.nextTokenStart(),u=this.isUnparsedContextual(o,"from");if(this.input.charCodeAt(o)===44||at(this.state.type)&&u)return!0;if(this.match(65)&&u){let h=this.input.charCodeAt(this.nextTokenStartSince(o+4));return h===34||h===39}return!1}parseExportFrom(c,o){if(this.eatContextual(97)){c.source=this.parseImportSource(),this.checkExport(c);let u=this.maybeParseImportAssertions();u&&(c.assertions=u,this.checkJSONModuleImport(c))}else o&&this.unexpected();this.semicolon()}shouldParseExportDeclaration(){let{type:c}=this.state;return c===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(Qe.DecoratorBeforeExport,{at:this.state.startLoc}),!0):c===74||c===75||c===68||c===80||this.isLet()||this.isAsyncFunction()}checkExport(c,o,u,h){if(o){if(u){if(this.checkDuplicateExports(c,"default"),this.hasPlugin("exportDefaultFrom")){var f;let d=c.declaration;d.type==="Identifier"&&d.name==="from"&&d.end-d.start===4&&!((f=d.extra)!=null&&f.parenthesized)&&this.raise(Qe.ExportDefaultFromAsIdentifier,{at:d})}}else if(c.specifiers&&c.specifiers.length)for(let d of c.specifiers){let{exported:y}=d,D=y.type==="Identifier"?y.name:y.value;if(this.checkDuplicateExports(d,D),!h&&d.local){let{local:O}=d;O.type!=="Identifier"?this.raise(Qe.ExportBindingIsString,{at:d,localName:O.value,exportName:D}):(this.checkReservedWord(O.name,O.loc.start,!0,!1),this.scope.checkLocalExport(O))}}else if(c.declaration){if(c.declaration.type==="FunctionDeclaration"||c.declaration.type==="ClassDeclaration"){let d=c.declaration.id;if(!d)throw new Error("Assertion failure");this.checkDuplicateExports(c,d.name)}else if(c.declaration.type==="VariableDeclaration")for(let d of c.declaration.declarations)this.checkDeclaration(d.id)}}}checkDeclaration(c){if(c.type==="Identifier")this.checkDuplicateExports(c,c.name);else if(c.type==="ObjectPattern")for(let o of c.properties)this.checkDeclaration(o);else if(c.type==="ArrayPattern")for(let o of c.elements)o&&this.checkDeclaration(o);else c.type==="ObjectProperty"?this.checkDeclaration(c.value):c.type==="RestElement"?this.checkDeclaration(c.argument):c.type==="AssignmentPattern"&&this.checkDeclaration(c.left)}checkDuplicateExports(c,o){this.exportedIdentifiers.has(o)&&(o==="default"?this.raise(Qe.DuplicateDefaultExport,{at:c}):this.raise(Qe.DuplicateExport,{at:c,exportName:o})),this.exportedIdentifiers.add(o)}parseExportSpecifiers(c){let o=[],u=!0;for(this.expect(5);!this.eat(8);){if(u)u=!1;else if(this.expect(12),this.eat(8))break;let h=this.isContextual(128),f=this.match(131),d=this.startNode();d.local=this.parseModuleExportName(),o.push(this.parseExportSpecifier(d,f,c,h))}return o}parseExportSpecifier(c,o,u,h){return this.eatContextual(93)?c.exported=this.parseModuleExportName():o?c.exported=we(c.local):c.exported||(c.exported=U(c.local)),this.finishNode(c,"ExportSpecifier")}parseModuleExportName(){if(this.match(131)){let c=this.parseStringLiteral(this.state.value),o=c.value.match(i0);return o&&this.raise(Qe.ModuleExportNameHasLoneSurrogate,{at:c,surrogateCharCode:o[0].charCodeAt(0)}),c}return this.parseIdentifier(!0)}isJSONModuleImport(c){return c.assertions!=null?c.assertions.some(o=>{let{key:u,value:h}=o;return h.value==="json"&&(u.type==="Identifier"?u.name==="type":u.value==="type")}):!1}checkImportReflection(c){if(c.module){var o;(c.specifiers.length!==1||c.specifiers[0].type!=="ImportDefaultSpecifier")&&this.raise(Qe.ImportReflectionNotBinding,{at:c.specifiers[0].loc.start}),((o=c.assertions)==null?void 0:o.length)>0&&this.raise(Qe.ImportReflectionHasAssertion,{at:c.specifiers[0].loc.start})}}checkJSONModuleImport(c){if(this.isJSONModuleImport(c)&&c.type!=="ExportAllDeclaration"){let{specifiers:o}=c;if(o!=null){let u=o.find(h=>{let f;if(h.type==="ExportSpecifier"?f=h.local:h.type==="ImportSpecifier"&&(f=h.imported),f!==void 0)return f.type==="Identifier"?f.name!=="default":f.value!=="default"});u!==void 0&&this.raise(Qe.ImportJSONBindingNotDefault,{at:u.loc.start})}}}parseMaybeImportReflection(c){let o=!1;if(this.isContextual(125)){let u=this.lookahead(),h=u.type;at(h)?(h!==97||this.input.charCodeAt(this.nextTokenStartSince(u.end))===102)&&(o=!0):h!==12&&(o=!0)}o?(this.expectPlugin("importReflection"),this.next(),c.module=!0):this.hasPlugin("importReflection")&&(c.module=!1)}parseImport(c){if(c.specifiers=[],!this.match(131)){this.parseMaybeImportReflection(c);let u=!this.maybeParseDefaultImportSpecifier(c)||this.eat(12),h=u&&this.maybeParseStarImportSpecifier(c);u&&!h&&this.parseNamedImportSpecifiers(c),this.expectContextual(97)}c.source=this.parseImportSource();let o=this.maybeParseImportAssertions();if(o)c.assertions=o;else{let u=this.maybeParseModuleAttributes();u&&(c.attributes=u)}return this.checkImportReflection(c),this.checkJSONModuleImport(c),this.semicolon(),this.finishNode(c,"ImportDeclaration")}parseImportSource(){return this.match(131)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(c){return at(this.state.type)}parseImportSpecifierLocal(c,o,u){o.local=this.parseIdentifier(),c.specifiers.push(this.finishImportSpecifier(o,u))}finishImportSpecifier(c,o){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ra;return this.checkLVal(c.local,{in:{type:o},binding:u}),this.finishNode(c,o)}parseAssertEntries(){let c=[],o=new Set;do{if(this.match(8))break;let u=this.startNode(),h=this.state.value;if(o.has(h)&&this.raise(Qe.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:h}),o.add(h),this.match(131)?u.key=this.parseStringLiteral(h):u.key=this.parseIdentifier(!0),this.expect(14),!this.match(131))throw this.raise(Qe.ModuleAttributeInvalidValue,{at:this.state.startLoc});u.value=this.parseStringLiteral(this.state.value),c.push(this.finishNode(u,"ImportAttribute"))}while(this.eat(12));return c}maybeParseModuleAttributes(){if(this.match(76)&&!this.hasPrecedingLineBreak())this.expectPlugin("moduleAttributes"),this.next();else return this.hasPlugin("moduleAttributes")?[]:null;let c=[],o=new Set;do{let u=this.startNode();if(u.key=this.parseIdentifier(!0),u.key.name!=="type"&&this.raise(Qe.ModuleAttributeDifferentFromType,{at:u.key}),o.has(u.key.name)&&this.raise(Qe.ModuleAttributesWithDuplicateKeys,{at:u.key,key:u.key.name}),o.add(u.key.name),this.expect(14),!this.match(131))throw this.raise(Qe.ModuleAttributeInvalidValue,{at:this.state.startLoc});u.value=this.parseStringLiteral(this.state.value),this.finishNode(u,"ImportAttribute"),c.push(u)}while(this.eat(12));return c}maybeParseImportAssertions(){if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.expectPlugin("importAssertions"),this.next();else return this.hasPlugin("importAssertions")?[]:null;this.eat(5);let c=this.parseAssertEntries();return this.eat(8),c}maybeParseDefaultImportSpecifier(c){return this.shouldParseDefaultImport(c)?(this.parseImportSpecifierLocal(c,this.startNode(),"ImportDefaultSpecifier"),!0):!1}maybeParseStarImportSpecifier(c){if(this.match(55)){let o=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(c,o,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(c){let o=!0;for(this.expect(5);!this.eat(8);){if(o)o=!1;else{if(this.eat(14))throw this.raise(Qe.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}let u=this.startNode(),h=this.match(131),f=this.isContextual(128);u.imported=this.parseModuleExportName();let d=this.parseImportSpecifier(u,h,c.importKind==="type"||c.importKind==="typeof",f,void 0);c.specifiers.push(d)}}parseImportSpecifier(c,o,u,h,f){if(this.eatContextual(93))c.local=this.parseIdentifier();else{let{imported:d}=c;if(o)throw this.raise(Qe.ImportBindingIsString,{at:c,importName:d.value});this.checkReservedWord(d.name,c.loc.start,!0,!0),c.local||(c.local=U(d))}return this.finishImportSpecifier(c,"ImportSpecifier",f)}isThisParam(c){return c.type==="Identifier"&&c.name==="this"}},$d=class extends o0{constructor(c,o){c=Vr(c),super(c,o),this.options=c,this.initializeScopes(),this.plugins=a0(this.options.plugins),this.filename=c.sourceFilename}getScopeHandler(){return yu}parse(){this.enterInitialScopes();let c=this.startNode(),o=this.startNode();return this.nextToken(),c.errors=null,this.parseTopLevel(c,o),c.errors=this.state.errors,c}};function a0(c){let o=new Map;for(let u of c){let[h,f]=Array.isArray(u)?u:[u,{}];o.has(h)||o.set(h,f||{})}return o}function u0(c,o){var u;if(((u=o)==null?void 0:u.sourceType)==="unambiguous"){o=Object.assign({},o);try{o.sourceType="module";let h=Th(o,c),f=h.parse();if(h.sawUnambiguousESM)return f;if(h.ambiguousScriptDifferentAst)try{return o.sourceType="script",Th(o,c).parse()}catch{}else f.program.sourceType="script";return f}catch(h){try{return o.sourceType="script",Th(o,c).parse()}catch{}throw h}}else return Th(o,c).parse()}function l0(c,o){let u=Th(o,c);return u.options.strictMode&&(u.state.strict=!0),u.getExpression()}function Tc(c){let o={};for(let u of Object.keys(c))o[u]=Er(c[u]);return o}var c0=Tc(ot);function Th(c,o){let u=$d;return c!=null&&c.plugins&&(Ro(c.plugins),u=h0(c.plugins)),new u(c,o)}var Bd={};function h0(c){let o=qs.filter(f=>qi(c,f)),u=o.join("/"),h=Bd[u];if(!h){h=$d;for(let f of o)h=ks[f](h);Bd[u]=h}return h}bn.parse=u0,bn.parseExpression=l0,bn.tokTypes=c0}}),kl=Ie({"src/language-js/parse/json.js"(bn,qr){ae();var Vr=wl(),Ar=au(),dr=Al(),Br=_a();function rr(){let Fn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{allowComments:Ti=!0}=Fn;return function(Mr){let{parseExpression:Bi}=Bu(),Fs;try{Fs=Bi(Mr,{tokens:!0,ranges:!0})}catch(Un){throw Br(Un)}if(!Ti&&Vr(Fs.comments))throw vn(Fs.comments[0],"Comment");return li(Fs),Fs}}function vn(Fn,Ti){let[Mr,Bi]=[Fn.loc.start,Fn.loc.end].map(Fs=>{let{line:Un,column:ki}=Fs;return{line:Un,column:ki+1}});return Ar(`${Ti} is not allowed in JSON.`,{start:Mr,end:Bi})}function li(Fn){switch(Fn.type){case"ArrayExpression":for(let Ti of Fn.elements)Ti!==null&&li(Ti);return;case"ObjectExpression":for(let Ti of Fn.properties)li(Ti);return;case"ObjectProperty":if(Fn.computed)throw vn(Fn.key,"Computed key");if(Fn.shorthand)throw vn(Fn.key,"Shorthand property");Fn.key.type!=="Identifier"&&li(Fn.key),li(Fn.value);return;case"UnaryExpression":{let{operator:Ti,argument:Mr}=Fn;if(Ti!=="+"&&Ti!=="-")throw vn(Fn,`Operator '${Fn.operator}'`);if(Mr.type==="NumericLiteral"||Mr.type==="Identifier"&&(Mr.name==="Infinity"||Mr.name==="NaN"))return;throw vn(Mr,`Operator '${Ti}' before '${Mr.type}'`)}case"Identifier":if(Fn.name!=="Infinity"&&Fn.name!=="NaN"&&Fn.name!=="undefined")throw vn(Fn,`Identifier '${Fn.name}'`);return;case"TemplateLiteral":if(Vr(Fn.expressions))throw vn(Fn.expressions[0],"'TemplateLiteral' with expression");for(let Ti of Fn.quasis)li(Ti);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw vn(Fn,`'${Fn.type}'`)}}var vi=rr(),gi={json:dr({parse:vi,hasPragma(){return!0}}),json5:dr(vi),"json-stringify":dr({parse:rr({allowComments:!1}),astFormat:"estree-json"})};qr.exports=gi}});ae();var hh=Ee(),pc=be(),fc=Ct(),ya=Al(),Nu=_a(),Da=Pl(),dc=kl(),mc={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},ph=["recordAndTuple",{syntaxType:"hash"}],Iu="v8intrinsic",Ru=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],yo=function(bn){let qr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mc;return Object.assign(Object.assign({},qr),{},{plugins:[...qr.plugins,...bn]})},Ko=/@(?:no)?flow\b/;function ea(bn,qr){if(qr.filepath&&qr.filepath.endsWith(".js.flow"))return!0;let Vr=pc(bn);Vr&&(bn=bn.slice(Vr.length));let Ar=fc(bn,0);return Ar!==!1&&(bn=bn.slice(0,Ar)),Ko.test(bn)}function Lo(bn,qr,Vr){let Ar=Bu()[bn],dr=Ar(qr,Vr),Br=dr.errors.find(rr=>!Qu.has(rr.reasonCode));if(Br)throw Br;return dr}function $o(bn){for(var qr=arguments.length,Vr=new Array(qr>1?qr-1:0),Ar=1;Ar<qr;Ar++)Vr[Ar-1]=arguments[Ar];return function(dr,Br){let rr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if((rr.parser==="babel"||rr.parser==="__babel_estree")&&ea(dr,rr))return rr.parser="babel-flow",$a(dr,Br,rr);let vn=Vr;rr.__babelSourceType==="script"&&(vn=vn.map(Fn=>Object.assign(Object.assign({},Fn),{},{sourceType:"script"}))),/#[[{]/.test(dr)&&(vn=vn.map(Fn=>yo([ph],Fn)));let li=/%[A-Z]/.test(dr);dr.includes("|>")?vn=(li?[...Ru,Iu]:Ru).flatMap(Fn=>vn.map(Ti=>yo([Fn],Ti))):li&&(vn=vn.map(Fn=>yo([Iu],Fn)));let{result:vi,error:gi}=hh(...vn.map(Fn=>()=>Lo(bn,dr,Fn)));if(!vi)throw Nu(gi);return rr.originalText=dr,Da(vi,rr)}}var fi=$o("parse",yo(["jsx","flow"])),$a=$o("parse",yo(["jsx",["flow",{all:!0,enums:!0}]])),Fl=$o("parse",yo(["jsx","typescript"]),yo(["typescript"])),uu=$o("parse",yo(["jsx","flow","estree"])),Mu=$o("parseExpression",yo(["jsx"])),Ba=$o("parseExpression",yo(["typescript"])),Qu=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"]),ju=ya(fi),lu=ya(Fl),Lu=ya(Mu),_l=ya(Ba);xt.exports={parsers:Object.assign(Object.assign({babel:ju,"babel-flow":ya($a),"babel-ts":lu},dc),{},{__js_expression:Lu,__vue_expression:Lu,__vue_ts_expression:_l,__vue_event_binding:ju,__vue_ts_event_binding:lu,__babel_estree:ya(uu)})}});return mi()})})($w);var x6=$w.exports;const b6=Ig(x6);function v6(r,e,t){const n={css:y6,html:O6,babel:b6};return as(()=>{if(!xo(e))return xo(r)||"/* empty */";try{return m6.format(xo(r)||"",{parser:t,plugins:[n[t]],singleQuote:!0,semi:!1})}catch(i){return console.error(i),`/* Error on prettifying: ${i.message} */
290
290
  ${xo(r)||""}`}})}function C6(r,e=!0){return v6(r,e,"css")}const S6=Co({__name:"Copy",setup(r){const{copy:e,copied:t}=i_();return(n,i)=>ec(n.$slots,"default",{copy:Ai(e),copied:Ai(t)})}}),E6=["top","right","bottom","left"],ov=["start","end"],av=E6.reduce((r,e)=>r.concat(e,e+"-"+ov[0],e+"-"+ov[1]),[]),hd=Math.min,$h=Math.max,w6={left:"right",right:"left",bottom:"top",top:"bottom"},A6={start:"end",end:"start"};function yD(r,e,t){return $h(r,hd(e,t))}function rp(r,e){return typeof r=="function"?r(e):r}function vl(r){return r.split("-")[0]}function Tu(r){return r.split("-")[1]}function Bw(r){return r==="x"?"y":"x"}function BO(r){return r==="y"?"height":"width"}function _d(r){return["top","bottom"].includes(vl(r))?"y":"x"}function NO(r){return Bw(_d(r))}function Nw(r,e,t){t===void 0&&(t=!1);const n=Tu(r),i=NO(r),s=BO(i);let a=i==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Og(a)),[a,Og(a)]}function T6(r){const e=Og(r);return[Dg(r),e,Dg(e)]}function Dg(r){return r.replace(/start|end/g,e=>A6[e])}function P6(r,e,t){const n=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(r){case"top":case"bottom":return t?e?i:n:e?n:i;case"left":case"right":return e?s:a;default:return[]}}function k6(r,e,t,n){const i=Tu(r);let s=P6(vl(r),t==="start",n);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(Dg)))),s}function Og(r){return r.replace(/left|right|bottom|top/g,e=>w6[e])}function F6(r){return{top:0,right:0,bottom:0,left:0,...r}}function Iw(r){return typeof r!="number"?F6(r):{top:r,right:r,bottom:r,left:r}}function Rf(r){return{...r,top:r.y,left:r.x,right:r.x+r.width,bottom:r.y+r.height}}function uv(r,e,t){let{reference:n,floating:i}=r;const s=_d(e),a=NO(e),l=BO(a),p=vl(e),m=s==="y",g=n.x+n.width/2-i.width/2,b=n.y+n.height/2-i.height/2,C=n[l]/2-i[l]/2;let $;switch(p){case"top":$={x:g,y:n.y-i.height};break;case"bottom":$={x:g,y:n.y+n.height};break;case"right":$={x:n.x+n.width,y:b};break;case"left":$={x:n.x-i.width,y:b};break;default:$={x:n.x,y:n.y}}switch(Tu(e)){case"start":$[a]-=C*(t&&m?-1:1);break;case"end":$[a]+=C*(t&&m?-1:1);break}return $}const _6=async(r,e,t)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:a}=t,l=s.filter(Boolean),p=await(a.isRTL==null?void 0:a.isRTL(e));let m=await a.getElementRects({reference:r,floating:e,strategy:i}),{x:g,y:b}=uv(m,n,p),C=n,$={},Y=0;for(let xe=0;xe<l.length;xe++){const{name:ke,fn:ge}=l[xe],{x:je,y:pt,data:Dt,reset:bt}=await ge({x:g,y:b,initialPlacement:n,placement:C,strategy:i,middlewareData:$,rects:m,platform:a,elements:{reference:r,floating:e}});if(g=je??g,b=pt??b,$={...$,[ke]:{...$[ke],...Dt}},bt&&Y<=50){Y++,typeof bt=="object"&&(bt.placement&&(C=bt.placement),bt.rects&&(m=bt.rects===!0?await a.getElementRects({reference:r,floating:e,strategy:i}):bt.rects),{x:g,y:b}=uv(m,C,p)),xe=-1;continue}}return{x:g,y:b,placement:C,strategy:i,middlewareData:$}};async function Kg(r,e){var t;e===void 0&&(e={});const{x:n,y:i,platform:s,rects:a,elements:l,strategy:p}=r,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:b="floating",altBoundary:C=!1,padding:$=0}=rp(e,r),Y=Iw($),ke=l[C?b==="floating"?"reference":"floating":b],ge=Rf(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(ke)))==null||t?ke:ke.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:m,rootBoundary:g,strategy:p})),je=b==="floating"?{...a.floating,x:n,y:i}:a.reference,pt=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),Dt=await(s.isElement==null?void 0:s.isElement(pt))?await(s.getScale==null?void 0:s.getScale(pt))||{x:1,y:1}:{x:1,y:1},bt=Rf(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:je,offsetParent:pt,strategy:p}):je);return{top:(ge.top-bt.top+Y.top)/Dt.y,bottom:(bt.bottom-ge.bottom+Y.bottom)/Dt.y,left:(ge.left-bt.left+Y.left)/Dt.x,right:(bt.right-ge.right+Y.right)/Dt.x}}const $6=r=>({name:"arrow",options:r,async fn(e){const{x:t,y:n,placement:i,rects:s,platform:a,elements:l}=e,{element:p,padding:m=0}=rp(r,e)||{};if(p==null)return{};const g=Iw(m),b={x:t,y:n},C=NO(i),$=BO(C),Y=await a.getDimensions(p),xe=C==="y",ke=xe?"top":"left",ge=xe?"bottom":"right",je=xe?"clientHeight":"clientWidth",pt=s.reference[$]+s.reference[C]-b[C]-s.floating[$],Dt=b[C]-s.reference[C],bt=await(a.getOffsetParent==null?void 0:a.getOffsetParent(p));let Pt=bt?bt[je]:0;(!Pt||!await(a.isElement==null?void 0:a.isElement(bt)))&&(Pt=l.floating[je]||s.floating[$]);const nr=pt/2-Dt/2,Ur=Pt/2-Y[$]/2-1,jr=hd(g[ke],Ur),gr=hd(g[ge],Ur),Lr=jr,kn=Pt-Y[$]-gr,Gn=Pt/2-Y[$]/2+nr,Ii=yD(Lr,Gn,kn),Sn=Tu(i)!=null&&Gn!=Ii&&s.reference[$]/2-(Gn<Lr?jr:gr)-Y[$]/2<0?Gn<Lr?Lr-Gn:kn-Gn:0;return{[C]:b[C]-Sn,data:{[C]:Ii,centerOffset:Gn-Ii+Sn}}}});function B6(r,e,t){return(r?[...t.filter(i=>Tu(i)===r),...t.filter(i=>Tu(i)!==r)]:t.filter(i=>vl(i)===i)).filter(i=>r?Tu(i)===r||(e?Dg(i)!==i:!1):!0)}const N6=function(r){return r===void 0&&(r={}),{name:"autoPlacement",options:r,async fn(e){var t,n,i;const{rects:s,middlewareData:a,placement:l,platform:p,elements:m}=e,{crossAxis:g=!1,alignment:b,allowedPlacements:C=av,autoAlignment:$=!0,...Y}=rp(r,e),xe=b!==void 0||C===av?B6(b||null,$,C):C,ke=await Kg(e,Y),ge=((t=a.autoPlacement)==null?void 0:t.index)||0,je=xe[ge];if(je==null)return{};const pt=Nw(je,s,await(p.isRTL==null?void 0:p.isRTL(m.floating)));if(l!==je)return{reset:{placement:xe[0]}};const Dt=[ke[vl(je)],ke[pt[0]],ke[pt[1]]],bt=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:je,overflows:Dt}],Pt=xe[ge+1];if(Pt)return{data:{index:ge+1,overflows:bt},reset:{placement:Pt}};const nr=bt.map(gr=>{const Lr=Tu(gr.placement);return[gr.placement,Lr&&g?gr.overflows.slice(0,2).reduce((kn,Gn)=>kn+Gn,0):gr.overflows[0],gr.overflows]}).sort((gr,Lr)=>gr[1]-Lr[1]),jr=((i=nr.filter(gr=>gr[2].slice(0,Tu(gr[0])?2:3).every(Lr=>Lr<=0))[0])==null?void 0:i[0])||nr[0][0];return jr!==l?{data:{index:ge+1,overflows:bt},reset:{placement:jr}}:{}}}},I6=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var t;const{placement:n,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:p}=e,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:$="none",flipAlignment:Y=!0,...xe}=rp(r,e),ke=vl(n),ge=vl(a)===a,je=await(l.isRTL==null?void 0:l.isRTL(p.floating)),pt=b||(ge||!Y?[Og(a)]:T6(a));!b&&$!=="none"&&pt.push(...k6(a,Y,$,je));const Dt=[a,...pt],bt=await Kg(e,xe),Pt=[];let nr=((t=i.flip)==null?void 0:t.overflows)||[];if(m&&Pt.push(bt[ke]),g){const Lr=Nw(n,s,je);Pt.push(bt[Lr[0]],bt[Lr[1]])}if(nr=[...nr,{placement:n,overflows:Pt}],!Pt.every(Lr=>Lr<=0)){var Ur,jr;const Lr=(((Ur=i.flip)==null?void 0:Ur.index)||0)+1,kn=Dt[Lr];if(kn)return{data:{index:Lr,overflows:nr},reset:{placement:kn}};let Gn=(jr=nr.filter(Ii=>Ii.overflows[0]<=0).sort((Ii,ni)=>Ii.overflows[1]-ni.overflows[1])[0])==null?void 0:jr.placement;if(!Gn)switch(C){case"bestFit":{var gr;const Ii=(gr=nr.map(ni=>[ni.placement,ni.overflows.filter(Sn=>Sn>0).reduce((Sn,Vn)=>Sn+Vn,0)]).sort((ni,Sn)=>ni[1]-Sn[1])[0])==null?void 0:gr[0];Ii&&(Gn=Ii);break}case"initialPlacement":Gn=a;break}if(n!==Gn)return{reset:{placement:Gn}}}return{}}}};async function R6(r,e){const{placement:t,platform:n,elements:i}=r,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=vl(t),l=Tu(t),p=_d(t)==="y",m=["left","top"].includes(a)?-1:1,g=s&&p?-1:1,b=rp(e,r);let{mainAxis:C,crossAxis:$,alignmentAxis:Y}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...b};return l&&typeof Y=="number"&&($=l==="end"?Y*-1:Y),p?{x:$*g,y:C*m}:{x:C*m,y:$*g}}const M6=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){const{x:t,y:n}=e,i=await R6(e,r);return{x:t+i.x,y:n+i.y,data:i}}}},Q6=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:ke=>{let{x:ge,y:je}=ke;return{x:ge,y:je}}},...p}=rp(r,e),m={x:t,y:n},g=await Kg(e,p),b=_d(vl(i)),C=Bw(b);let $=m[C],Y=m[b];if(s){const ke=C==="y"?"top":"left",ge=C==="y"?"bottom":"right",je=$+g[ke],pt=$-g[ge];$=yD(je,$,pt)}if(a){const ke=b==="y"?"top":"left",ge=b==="y"?"bottom":"right",je=Y+g[ke],pt=Y-g[ge];Y=yD(je,Y,pt)}const xe=l.fn({...e,[C]:$,[b]:Y});return{...xe,data:{x:xe.x-t,y:xe.y-n}}}}},j6=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(e){const{placement:t,rects:n,platform:i,elements:s}=e,{apply:a=()=>{},...l}=rp(r,e),p=await Kg(e,l),m=vl(t),g=Tu(t),b=_d(t)==="y",{width:C,height:$}=n.floating;let Y,xe;m==="top"||m==="bottom"?(Y=m,xe=g===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(xe=m,Y=g==="end"?"top":"bottom");const ke=$-p[Y],ge=C-p[xe],je=!e.middlewareData.shift;let pt=ke,Dt=ge;if(b){const Pt=C-p.left-p.right;Dt=g||je?hd(ge,Pt):Pt}else{const Pt=$-p.top-p.bottom;pt=g||je?hd(ke,Pt):Pt}if(je&&!g){const Pt=$h(p.left,0),nr=$h(p.right,0),Ur=$h(p.top,0),jr=$h(p.bottom,0);b?Dt=C-2*(Pt!==0||nr!==0?Pt+nr:$h(p.left,p.right)):pt=$-2*(Ur!==0||jr!==0?Ur+jr:$h(p.top,p.bottom))}await a({...e,availableWidth:Dt,availableHeight:pt});const bt=await i.getDimensions(s.floating);return C!==bt.width||$!==bt.height?{reset:{rects:!0}}:{}}}};function eu(r){var e;return((e=r.ownerDocument)==null?void 0:e.defaultView)||window}function Dl(r){return eu(r).getComputedStyle(r)}const lv=Math.min,Mf=Math.max,xg=Math.round;function Rw(r){const e=Dl(r);let t=parseFloat(e.width),n=parseFloat(e.height);const i=r.offsetWidth,s=r.offsetHeight,a=xg(t)!==i||xg(n)!==s;return a&&(t=i,n=s),{width:t,height:n,fallback:a}}function oh(r){return Qw(r)?(r.nodeName||"").toLowerCase():""}let pm;function Mw(){if(pm)return pm;const r=navigator.userAgentData;return r&&Array.isArray(r.brands)?(pm=r.brands.map(e=>e.brand+"/"+e.version).join(" "),pm):navigator.userAgent}function Ol(r){return r instanceof eu(r).HTMLElement}function Gc(r){return r instanceof eu(r).Element}function Qw(r){return r instanceof eu(r).Node}function cv(r){return typeof ShadowRoot>"u"?!1:r instanceof eu(r).ShadowRoot||r instanceof ShadowRoot}function e0(r){const{overflow:e,overflowX:t,overflowY:n,display:i}=Dl(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(i)}function L6(r){return["table","td","th"].includes(oh(r))}function DD(r){const e=/firefox/i.test(Mw()),t=Dl(r),n=t.backdropFilter||t.WebkitBackdropFilter;return t.transform!=="none"||t.perspective!=="none"||!!n&&n!=="none"||e&&t.willChange==="filter"||e&&!!t.filter&&t.filter!=="none"||["transform","perspective"].some(i=>t.willChange.includes(i))||["paint","layout","strict","content"].some(i=>{const s=t.contain;return s!=null&&s.includes(i)})}function jw(){return!/^((?!chrome|android).)*safari/i.test(Mw())}function IO(r){return["html","body","#document"].includes(oh(r))}function Lw(r){return Gc(r)?r:r.contextElement}const Xw={x:1,y:1};function Vp(r){const e=Lw(r);if(!Ol(e))return Xw;const t=e.getBoundingClientRect(),{width:n,height:i,fallback:s}=Rw(e);let a=(s?xg(t.width):t.width)/n,l=(s?xg(t.height):t.height)/i;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function pd(r,e,t,n){var i,s;e===void 0&&(e=!1),t===void 0&&(t=!1);const a=r.getBoundingClientRect(),l=Lw(r);let p=Xw;e&&(n?Gc(n)&&(p=Vp(n)):p=Vp(r));const m=l?eu(l):window,g=!jw()&&t;let b=(a.left+(g&&((i=m.visualViewport)==null?void 0:i.offsetLeft)||0))/p.x,C=(a.top+(g&&((s=m.visualViewport)==null?void 0:s.offsetTop)||0))/p.y,$=a.width/p.x,Y=a.height/p.y;if(l){const xe=eu(l),ke=n&&Gc(n)?eu(n):n;let ge=xe.frameElement;for(;ge&&n&&ke!==xe;){const je=Vp(ge),pt=ge.getBoundingClientRect(),Dt=getComputedStyle(ge);pt.x+=(ge.clientLeft+parseFloat(Dt.paddingLeft))*je.x,pt.y+=(ge.clientTop+parseFloat(Dt.paddingTop))*je.y,b*=je.x,C*=je.y,$*=je.x,Y*=je.y,b+=pt.x,C+=pt.y,ge=eu(ge).frameElement}}return{width:$,height:Y,top:C,right:b+$,bottom:C+Y,left:b,x:b,y:C}}function Hc(r){return((Qw(r)?r.ownerDocument:r.document)||window.document).documentElement}function t0(r){return Gc(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function Vw(r){return pd(Hc(r)).left+t0(r).scrollLeft}function fd(r){if(oh(r)==="html")return r;const e=r.assignedSlot||r.parentNode||cv(r)&&r.host||Hc(r);return cv(e)?e.host:e}function Uw(r){const e=fd(r);return IO(e)?e.ownerDocument.body:Ol(e)&&e0(e)?e:Uw(e)}function bg(r,e){var t;e===void 0&&(e=[]);const n=Uw(r),i=n===((t=r.ownerDocument)==null?void 0:t.body),s=eu(n);return i?e.concat(s,s.visualViewport||[],e0(n)?n:[]):e.concat(n,bg(n))}function hv(r,e,t){return e==="viewport"?Rf(function(n,i){const s=eu(n),a=Hc(n),l=s.visualViewport;let p=a.clientWidth,m=a.clientHeight,g=0,b=0;if(l){p=l.width,m=l.height;const C=jw();(C||!C&&i==="fixed")&&(g=l.offsetLeft,b=l.offsetTop)}return{width:p,height:m,x:g,y:b}}(r,t)):Gc(e)?Rf(function(n,i){const s=pd(n,!0,i==="fixed"),a=s.top+n.clientTop,l=s.left+n.clientLeft,p=Ol(n)?Vp(n):{x:1,y:1};return{width:n.clientWidth*p.x,height:n.clientHeight*p.y,x:l*p.x,y:a*p.y}}(e,t)):Rf(function(n){const i=Hc(n),s=t0(n),a=n.ownerDocument.body,l=Mf(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),p=Mf(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let m=-s.scrollLeft+Vw(n);const g=-s.scrollTop;return Dl(a).direction==="rtl"&&(m+=Mf(i.clientWidth,a.clientWidth)-l),{width:l,height:p,x:m,y:g}}(Hc(r)))}function pv(r){return Ol(r)&&Dl(r).position!=="fixed"?r.offsetParent:null}function fv(r){const e=eu(r);let t=pv(r);for(;t&&L6(t)&&Dl(t).position==="static";)t=pv(t);return t&&(oh(t)==="html"||oh(t)==="body"&&Dl(t).position==="static"&&!DD(t))?e:t||function(n){let i=fd(n);for(;Ol(i)&&!IO(i);){if(DD(i))return i;i=fd(i)}return null}(r)||e}function X6(r,e,t){const n=Ol(e),i=Hc(e),s=pd(r,!0,t==="fixed",e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&t!=="fixed")if((oh(e)!=="body"||e0(i))&&(a=t0(e)),Ol(e)){const p=pd(e,!0);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else i&&(l.x=Vw(i));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}const V6={getClippingRect:function(r){let{element:e,boundary:t,rootBoundary:n,strategy:i}=r;const s=t==="clippingAncestors"?function(m,g){const b=g.get(m);if(b)return b;let C=bg(m).filter(ke=>Gc(ke)&&oh(ke)!=="body"),$=null;const Y=Dl(m).position==="fixed";let xe=Y?fd(m):m;for(;Gc(xe)&&!IO(xe);){const ke=Dl(xe),ge=DD(xe);(Y?ge||$:ge||ke.position!=="static"||!$||!["absolute","fixed"].includes($.position))?$=ke:C=C.filter(je=>je!==xe),xe=fd(xe)}return g.set(m,C),C}(e,this._c):[].concat(t),a=[...s,n],l=a[0],p=a.reduce((m,g)=>{const b=hv(e,g,i);return m.top=Mf(b.top,m.top),m.right=lv(b.right,m.right),m.bottom=lv(b.bottom,m.bottom),m.left=Mf(b.left,m.left),m},hv(e,l,i));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(r){let{rect:e,offsetParent:t,strategy:n}=r;const i=Ol(t),s=Hc(t);if(t===s)return e;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const p={x:0,y:0};if((i||!i&&n!=="fixed")&&((oh(t)!=="body"||e0(s))&&(a=t0(t)),Ol(t))){const m=pd(t);l=Vp(t),p.x=m.x+t.clientLeft,p.y=m.y+t.clientTop}return{width:e.width*l.x,height:e.height*l.y,x:e.x*l.x-a.scrollLeft*l.x+p.x,y:e.y*l.y-a.scrollTop*l.y+p.y}},isElement:Gc,getDimensions:function(r){return Ol(r)?Rw(r):r.getBoundingClientRect()},getOffsetParent:fv,getDocumentElement:Hc,getScale:Vp,async getElementRects(r){let{reference:e,floating:t,strategy:n}=r;const i=this.getOffsetParent||fv,s=this.getDimensions;return{reference:X6(e,await i(t),n),floating:{x:0,y:0,...await s(t)}}},getClientRects:r=>Array.from(r.getClientRects()),isRTL:r=>Dl(r).direction==="rtl"},U6=(r,e,t)=>{const n=new Map,i={platform:V6,...t},s={...i.platform,_c:n};return _6(r,e,{...i,platform:s})},Vh={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:5e3,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:r=>[...r,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover","focus"],delay:{show:0,hide:400}}}};function OD(r,e){let t=Vh.themes[r]||{},n;do n=t[e],typeof n>"u"?t.$extend?t=Vh.themes[t.$extend]||{}:(t=null,n=Vh[e]):t=null;while(t);return n}function q6(r){const e=[r];let t=Vh.themes[r]||{};do t.$extend&&!t.$resetCss?(e.push(t.$extend),t=Vh.themes[t.$extend]||{}):t=null;while(t);return e.map(n=>`v-popper--theme-${n}`)}function dv(r){const e=[r];let t=Vh.themes[r]||{};do t.$extend?(e.push(t.$extend),t=Vh.themes[t.$extend]||{}):t=null;while(t);return e}let Gp=!1;if(typeof window<"u"){Gp=!1;try{const r=Object.defineProperty({},"passive",{get(){Gp=!0}});window.addEventListener("test",null,r)}catch{}}let qw=!1;typeof window<"u"&&typeof navigator<"u"&&(qw=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const z6=["auto","top","bottom","left","right"].reduce((r,e)=>r.concat([e,`${e}-start`,`${e}-end`]),[]),mv={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},gv={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function yv(r,e){const t=r.indexOf(e);t!==-1&&r.splice(t,1)}function iy(){return new Promise(r=>requestAnimationFrame(()=>{requestAnimationFrame(r)}))}const vu=[];let _h=null;const Dv={};function Ov(r){let e=Dv[r];return e||(e=Dv[r]=[]),e}let xD=function(){};typeof window<"u"&&(xD=window.Element);function fs(r){return function(e){return OD(e.theme,r)}}const sy="__floating-vue__popper",zw=()=>Co({name:"VPopper",provide(){return{[sy]:{parentPopper:this}}},inject:{[sy]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:fs("disabled")},positioningDisabled:{type:Boolean,default:fs("positioningDisabled")},placement:{type:String,default:fs("placement"),validator:r=>z6.includes(r)},delay:{type:[String,Number,Object],default:fs("delay")},distance:{type:[Number,String],default:fs("distance")},skidding:{type:[Number,String],default:fs("skidding")},triggers:{type:Array,default:fs("triggers")},showTriggers:{type:[Array,Function],default:fs("showTriggers")},hideTriggers:{type:[Array,Function],default:fs("hideTriggers")},popperTriggers:{type:Array,default:fs("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:fs("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:fs("popperHideTriggers")},container:{type:[String,Object,xD,Boolean],default:fs("container")},boundary:{type:[String,xD],default:fs("boundary")},strategy:{type:String,validator:r=>["absolute","fixed"].includes(r),default:fs("strategy")},autoHide:{type:[Boolean,Function],default:fs("autoHide")},handleResize:{type:Boolean,default:fs("handleResize")},instantMove:{type:Boolean,default:fs("instantMove")},eagerMount:{type:Boolean,default:fs("eagerMount")},popperClass:{type:[String,Array,Object],default:fs("popperClass")},computeTransformOrigin:{type:Boolean,default:fs("computeTransformOrigin")},autoMinSize:{type:Boolean,default:fs("autoMinSize")},autoSize:{type:[Boolean,String],default:fs("autoSize")},autoMaxSize:{type:Boolean,default:fs("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:fs("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:fs("preventOverflow")},overflowPadding:{type:[Number,String],default:fs("overflowPadding")},arrowPadding:{type:[Number,String],default:fs("arrowPadding")},arrowOverflow:{type:Boolean,default:fs("arrowOverflow")},flip:{type:Boolean,default:fs("flip")},shift:{type:Boolean,default:fs("shift")},shiftCrossAxis:{type:Boolean,default:fs("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:fs("noAutoFocus")},disposeTimeout:{type:Number,default:fs("disposeTimeout")}},emits:["show","hide","update:shown","apply-show","apply-hide","close-group","close-directive","auto-hide","resize","dispose"],data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},shownChildren:new Set,lastAutoHide:!0}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var r;return(r=this[sy])==null?void 0:r.parentPopper},hasPopperShowTriggerHover(){var r,e;return((r=this.popperTriggers)==null?void 0:r.includes("hover"))||((e=this.popperShowTriggers)==null?void 0:e.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(r){r?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},...["triggers","positioningDisabled"].reduce((r,e)=>(r[e]="$_refreshListeners",r),{}),...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((r,e)=>(r[e]="$_computePosition",r),{})},created(){this.$_isDisposed=!0,this.randomId=`popper_${[Math.random(),Date.now()].map(r=>r.toString(36).substring(2,10)).join("_")}`,this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:r=null,skipDelay:e=!1,force:t=!1}={}){var n,i;(n=this.parentPopper)!=null&&n.lockedChild&&this.parentPopper.lockedChild!==this||(this.$_pendingHide=!1,(t||!this.disabled)&&(((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(r,e),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:r=null,skipDelay:e=!1}={}){var t;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:e}),this.parentPopper.lockedChild=null)},1e3));return}((t=this.parentPopper)==null?void 0:t.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_pendingHide=!1,this.$_scheduleHide(r,e),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var r;this.$_isDisposed&&(this.$_isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((r=this.referenceNode)==null?void 0:r.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(e=>e.nodeType===e.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.$_isDisposed||(this.$_isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"),this.$emit("dispose"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.$_isDisposed||this.positioningDisabled)return;const r={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&r.middleware.push(M6({mainAxis:this.distance,crossAxis:this.skidding}));const e=this.placement.startsWith("auto");if(e?r.middleware.push(N6({alignment:this.placement.split("-")[1]??""})):r.placement=this.placement,this.preventOverflow&&(this.shift&&r.middleware.push(Q6({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!e&&this.flip&&r.middleware.push(I6({padding:this.overflowPadding,boundary:this.boundary}))),r.middleware.push($6({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&r.middleware.push({name:"arrowOverflow",fn:({placement:n,rects:i,middlewareData:s})=>{let a;const{centerOffset:l}=s.arrow;return n.startsWith("top")||n.startsWith("bottom")?a=Math.abs(l)>i.reference.width/2:a=Math.abs(l)>i.reference.height/2,{data:{overflow:a}}}}),this.autoMinSize||this.autoSize){const n=this.autoSize?this.autoSize:this.autoMinSize?"min":null;r.middleware.push({name:"autoSize",fn:({rects:i,placement:s,middlewareData:a})=>{var l;if((l=a.autoSize)!=null&&l.skip)return{};let p,m;return s.startsWith("top")||s.startsWith("bottom")?p=i.reference.width:m=i.reference.height,this.$_innerNode.style[n==="min"?"minWidth":n==="max"?"maxWidth":"width"]=p!=null?`${p}px`:null,this.$_innerNode.style[n==="min"?"minHeight":n==="max"?"maxHeight":"height"]=m!=null?`${m}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,r.middleware.push(j6({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:n,availableHeight:i})=>{this.$_innerNode.style.maxWidth=n!=null?`${n}px`:null,this.$_innerNode.style.maxHeight=i!=null?`${i}px`:null}})));const t=await U6(this.$_referenceNode,this.$_popperNode,r);Object.assign(this.result,{x:t.x,y:t.y,placement:t.placement,strategy:t.strategy,arrow:{...t.middlewareData.arrow,...t.middlewareData.arrowOverflow}})},$_scheduleShow(r=null,e=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),_h&&this.instantMove&&_h.instantMove&&_h!==this.parentPopper){_h.$_applyHide(!0),this.$_applyShow(!0);return}e?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(r=null,e=!1){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(_h=this),e?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(r){const e=this.delay;return parseInt(e&&e[r]||e||0)},async $_applyShow(r=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=r,!this.isShown&&(this.$_ensureTeleport(),await iy(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...bg(this.$_referenceNode),...bg(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const e=this.$_referenceNode.getBoundingClientRect(),t=this.$_popperNode.querySelector(".v-popper__wrapper"),n=t.parentNode.getBoundingClientRect(),i=e.x+e.width/2-(n.left+t.offsetLeft),s=e.y+e.height/2-(n.top+t.offsetTop);this.result.transformOrigin=`${i}px ${s}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const r=this.showGroup;if(r){let e;for(let t=0;t<vu.length;t++)e=vu[t],e.showGroup!==r&&(e.hide(),e.$emit("close-group"))}vu.push(this),document.body.classList.add("v-popper--some-open");for(const e of dv(this.theme))Ov(e).push(this),document.body.classList.add(`v-popper--some-open--${e}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await iy(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(r=!1){if(this.shownChildren.size>0){this.$_pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=r,yv(vu,this),vu.length===0&&document.body.classList.remove("v-popper--some-open");for(const t of dv(this.theme)){const n=Ov(t);yv(n,this),n.length===0&&document.body.classList.remove(`v-popper--some-open--${t}`)}_h===this&&(_h=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const e=this.disposeTimeout;e!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},e)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await iy(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.$_isDisposed)return;let r=this.container;if(typeof r=="string"?r=window.document.querySelector(r):r===!1&&(r=this.$_targetNodes[0].parentNode),!r)throw new Error("No container for popover: "+this.container);r.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const r=t=>{this.isShown&&!this.$_hideInProgress||(t.usedByTooltip=!0,!this.$_preventShow&&this.show({event:t}))};this.$_registerTriggerListeners(this.$_targetNodes,mv,this.triggers,this.showTriggers,r),this.$_registerTriggerListeners([this.$_popperNode],mv,this.popperTriggers,this.popperShowTriggers,r);const e=t=>{t.usedByTooltip||this.hide({event:t})};this.$_registerTriggerListeners(this.$_targetNodes,gv,this.triggers,this.hideTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],gv,this.popperTriggers,this.popperHideTriggers,e)},$_registerEventListeners(r,e,t){this.$_events.push({targetNodes:r,eventType:e,handler:t}),r.forEach(n=>n.addEventListener(e,t,Gp?{passive:!0}:void 0))},$_registerTriggerListeners(r,e,t,n,i){let s=t;n!=null&&(s=typeof n=="function"?n(s):n),s.forEach(a=>{const l=e[a];l&&this.$_registerEventListeners(r,l,i)})},$_removeEventListeners(r){const e=[];this.$_events.forEach(t=>{const{targetNodes:n,eventType:i,handler:s}=t;!r||r===i?n.forEach(a=>a.removeEventListener(i,s)):e.push(t)}),this.$_events=e},$_refreshListeners(){this.$_isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(r,e=!1){this.$_showFrameLocked||(this.hide({event:r}),r.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),e&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(r,e){for(const t of this.$_targetNodes){const n=t.getAttribute(r);n&&(t.removeAttribute(r),t.setAttribute(e,n))}},$_applyAttrsToTarget(r){for(const e of this.$_targetNodes)for(const t in r){const n=r[t];n==null?e.removeAttribute(t):e.setAttribute(t,n)}},$_updateParentShownChildren(r){let e=this.parentPopper;for(;e;)r?e.shownChildren.add(this.randomId):(e.shownChildren.delete(this.randomId),e.$_pendingHide&&e.hide()),e=e.parentPopper},$_isAimingPopper(){const r=this.$_referenceNode.getBoundingClientRect();if(Qf>=r.left&&Qf<=r.right&&jf>=r.top&&jf<=r.bottom){const e=this.$_popperNode.getBoundingClientRect(),t=Qf-$c,n=jf-Bc,i=e.left+e.width/2-$c+(e.top+e.height/2)-Bc+e.width+e.height,s=$c+t*i,a=Bc+n*i;return fm($c,Bc,s,a,e.left,e.top,e.left,e.bottom)||fm($c,Bc,s,a,e.left,e.top,e.right,e.top)||fm($c,Bc,s,a,e.right,e.top,e.right,e.bottom)||fm($c,Bc,s,a,e.left,e.bottom,e.right,e.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});typeof document<"u"&&typeof window<"u"&&(qw?(document.addEventListener("touchstart",xv,Gp?{passive:!0,capture:!0}:!0),document.addEventListener("touchend",Z6,Gp?{passive:!0,capture:!0}:!0)):(window.addEventListener("mousedown",xv,!0),window.addEventListener("click",W6,!0)),window.addEventListener("resize",H6));function xv(r){for(let e=0;e<vu.length;e++){const t=vu[e];try{const n=t.popperNode();t.$_mouseDownContains=n.contains(r.target)}catch{}}}function W6(r){Ww(r)}function Z6(r){Ww(r,!0)}function Ww(r,e=!1){const t={};for(let n=vu.length-1;n>=0;n--){const i=vu[n];try{const s=i.$_containsGlobalTarget=Y6(i,r);i.$_pendingHide=!1,requestAnimationFrame(()=>{if(i.$_pendingHide=!1,!t[i.randomId]&&bv(i,s,r)){if(i.$_handleGlobalClose(r,e),!r.closeAllPopover&&r.closePopover&&s){let l=i.parentPopper;for(;l;)t[l.randomId]=!0,l=l.parentPopper;return}let a=i.parentPopper;for(;a&&bv(a,a.$_containsGlobalTarget,r);)a.$_handleGlobalClose(r,e),a=a.parentPopper}})}catch{}}}function Y6(r,e){const t=r.popperNode();return r.$_mouseDownContains||t.contains(e.target)}function bv(r,e,t){return t.closeAllPopover||t.closePopover&&e||G6(r,t)&&!e}function G6(r,e){if(typeof r.autoHide=="function"){const t=r.autoHide(e);return r.lastAutoHide=t,t}return r.autoHide}function H6(r){for(let e=0;e<vu.length;e++)vu[e].$_computePosition(r)}let $c=0,Bc=0,Qf=0,jf=0;typeof window<"u"&&window.addEventListener("mousemove",r=>{$c=Qf,Bc=jf,Qf=r.clientX,jf=r.clientY},Gp?{passive:!0}:void 0);function fm(r,e,t,n,i,s,a,l){const p=((a-i)*(e-s)-(l-s)*(r-i))/((l-s)*(t-r)-(a-i)*(n-e)),m=((t-r)*(e-s)-(n-e)*(r-i))/((l-s)*(t-r)-(a-i)*(n-e));return p>=0&&p<=1&&m>=0&&m<=1}const J6={extends:zw()},RO=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t};function K6(r,e,t,n,i,s){return bi(),ns("div",{ref:"reference",class:Pa(["v-popper",{"v-popper--shown":r.slotData.isShown}])},[ec(r.$slots,"default",bA(RC(r.slotData)))],2)}const e9=RO(J6,[["render",K6]]);function t9(){var r=window.navigator.userAgent,e=r.indexOf("MSIE ");if(e>0)return parseInt(r.substring(e+5,r.indexOf(".",e)),10);var t=r.indexOf("Trident/");if(t>0){var n=r.indexOf("rv:");return parseInt(r.substring(n+3,r.indexOf(".",n)),10)}var i=r.indexOf("Edge/");return i>0?parseInt(r.substring(i+5,r.indexOf(".",i)),10):-1}let $m;function bD(){bD.init||(bD.init=!0,$m=t9()!==-1)}var r0={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){bD(),Kh(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const r=document.createElement("object");this._resizeObject=r,r.setAttribute("aria-hidden","true"),r.setAttribute("tabindex",-1),r.onload=this.addResizeHandlers,r.type="text/html",$m&&this.$el.appendChild(r),r.data="about:blank",$m||this.$el.appendChild(r)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!$m&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const r9=pT();cT("data-v-b329ee4c");const n9={class:"resize-observer",tabindex:"-1"};hT();const i9=r9((r,e,t,n,i,s)=>(bi(),Go("div",n9)));r0.render=i9;r0.__scopeId="data-v-b329ee4c";r0.__file="src/components/ResizeObserver.vue";const Zw=(r="theme")=>({computed:{themeClass(){return q6(this[r])}}}),s9=Co({name:"VPopperContent",components:{ResizeObserver:r0},mixins:[Zw()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(r){return r!=null&&!isNaN(r)?`${r}px`:null}}}),o9=["id","aria-hidden","tabindex","data-popper-placement"],a9={ref:"inner",class:"v-popper__inner"},u9=sn("div",{class:"v-popper__arrow-outer"},null,-1),l9=sn("div",{class:"v-popper__arrow-inner"},null,-1),c9=[u9,l9];function h9(r,e,t,n,i,s){const a=qh("ResizeObserver");return bi(),ns("div",{id:r.popperId,ref:"popover",class:Pa(["v-popper__popper",[r.themeClass,r.classes.popperClass,{"v-popper__popper--shown":r.shown,"v-popper__popper--hidden":!r.shown,"v-popper__popper--show-from":r.classes.showFrom,"v-popper__popper--show-to":r.classes.showTo,"v-popper__popper--hide-from":r.classes.hideFrom,"v-popper__popper--hide-to":r.classes.hideTo,"v-popper__popper--skip-transition":r.skipTransition,"v-popper__popper--arrow-overflow":r.result&&r.result.arrow.overflow,"v-popper__popper--no-positioning":!r.result}]]),style:dl(r.result?{position:r.result.strategy,transform:`translate3d(${Math.round(r.result.x)}px,${Math.round(r.result.y)}px,0)`}:void 0),"aria-hidden":r.shown?"false":"true",tabindex:r.autoHide?0:void 0,"data-popper-placement":r.result?r.result.placement:void 0,onKeyup:e[2]||(e[2]=MP(l=>r.autoHide&&r.$emit("hide"),["esc"]))},[sn("div",{class:"v-popper__backdrop",onClick:e[0]||(e[0]=l=>r.autoHide&&r.$emit("hide"))}),sn("div",{class:"v-popper__wrapper",style:dl(r.result?{transformOrigin:r.result.transformOrigin}:void 0)},[sn("div",a9,[r.mounted?(bi(),ns(po,{key:0},[sn("div",null,[ec(r.$slots,"default")]),r.handleResize?(bi(),Go(a,{key:0,onNotify:e[1]||(e[1]=l=>r.$emit("resize",l))})):wu("",!0)],64)):wu("",!0)],512),sn("div",{ref:"arrow",class:"v-popper__arrow-container",style:dl(r.result?{left:r.toPx(r.result.arrow.x),top:r.toPx(r.result.arrow.y)}:void 0)},c9,4)],4)],46,o9)}const Yw=RO(s9,[["render",h9]]),Gw={methods:{show(...r){return this.$refs.popper.show(...r)},hide(...r){return this.$refs.popper.hide(...r)},dispose(...r){return this.$refs.popper.dispose(...r)},onResize(...r){return this.$refs.popper.onResize(...r)}}},p9=Co({name:"VPopperWrapper",components:{Popper:e9,PopperContent:Yw},mixins:[Gw,Zw("finalTheme")],props:{theme:{type:String,default:null}},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(r=>r!==this.$refs.popperContent.$el)}}});function f9(r,e,t,n,i,s){const a=qh("PopperContent"),l=qh("Popper");return bi(),Go(l,{ref:"popper",theme:r.finalTheme,"target-nodes":r.getTargetNodes,"popper-node":()=>r.$refs.popperContent.$el,class:Pa([r.themeClass])},{default:fa(({popperId:p,isShown:m,shouldMountContent:g,skipTransition:b,autoHide:C,show:$,hide:Y,handleResize:xe,onResize:ke,classes:ge,result:je})=>[ec(r.$slots,"default",{shown:m,show:$,hide:Y}),bs(a,{ref:"popperContent","popper-id":p,theme:r.finalTheme,shown:m,mounted:g,"skip-transition":b,"auto-hide":C,"handle-resize":xe,classes:ge,result:je,onHide:Y,onResize:ke},{default:fa(()=>[ec(r.$slots,"popper",{shown:m,hide:Y})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},8,["theme","target-nodes","popper-node","class"])}const MO=RO(p9,[["render",f9]]),d9={...MO,name:"VDropdown",vPopperTheme:"dropdown"};({...MO});({...MO});zw();const m9=d9,g9={"font-mono":"","text-sm":"","cursor-pointer":"",border:"b transparent hover:current",op:"50 hover:100"},y9={"text-sm":"","of-ellipsis":""},D9={"text-xs":"","ml-0.5":"",op30:""},O9={"space-x-4":"",px4:"",py3:""},x9=["onClick"],b9=["href"],v9=sn("div",{"i-carbon-notebook":""},null,-1),C9={border:"t gray-400/20","max-h-60":"","of-auto":"",px4:"",py3:"","text-sm":""},S9=sn("span",{op50:""},"It has been referenced ",-1),E9=sn("span",{op50:""}," times by:",-1),w9={flex:"~ col gap-2","items-start":"",pt3:""},A9=["onClick"],T9=sn("div",{"i-carbon-launch":""},null,-1),P9=Co({__name:"AnalyzerItem",props:{item:{}},setup(r){const e=r,t=as(()=>XC(e.item.name)),n=as(()=>t.value?`[${e.item.name.slice(1,-1).replace(/=""$/,"").replace(/~="/,'="')}]`:e.item.name);function i(s){fetch(`/__open-in-editor?file=${encodeURIComponent(s)}`)}return(s,a)=>{const l=S6,p=Pw;return bi(),Go(Ai(m9),{distance:10},{popper:fa(()=>[sn("div",O9,[bs(l,null,{default:fa(({copy:m,copied:g})=>[sn("button",{class:Pa(g?"text-green":"text-dark:50 hover:text-dark dark:text-white:50 dark:hover:text-white"),"text-sm":"",onClick:b=>m(s.item.name)},[sn("div",{class:Pa(g?"i-carbon-checkmark-outline":"i-carbon-copy")},null,2),pa(" "+Hs(g?"Copied":"Copy"),1)],10,x9)]),_:1}),s.item?(bi(),ns("a",{key:0,href:`https://unocss.dev/interactive/?s=${s.item.name}`,target:"_blank","text-sm":"","text-dark:50":"","hover:text-dark":"","dark:text-white:50":"","dark:hover:text-white":""},[v9,pa(" Docs ")],8,b9)):wu("",!0)]),sn("div",C9,[sn("div",null,[S9,sn("strong",null,Hs(s.item.count),1),E9]),sn("div",w9,[(bi(!0),ns(po,null,Xc(s.item.modules,m=>(bi(),ns("a",{key:m,"text-sm":"","cursor-pointer":"",op80:"","hover:op100":"",onClick:g=>i(m)},[bs(p,{id:m,"mr-1":""},null,8,["id"]),T9],8,A9))),128))])])]),default:fa(()=>[sn("span",g9,[sn("span",y9,Hs(n.value),1)]),sn("sup",D9,Hs(s.item.count),1)]),_:1})}}}),k9={"p-4":"","space-y-8":""},F9={key:0},_9=sn("div",{"mb-4":"",op50:"",uppercase:"","text-sm":""}," Top 10 Utilities ",-1),$9={"p-4":"","bg-active":""},B9={flex:"~ wrap",gap:"x-2 y-2"},N9={key:1},I9={uppercase:"","text-sm":"","mb-4":"",op50:""},R9={op50:"","text-sm":""},M9={flex:"","flex-wrap":"","gap-2":""},Q9={"p-2":"","w-25":"","inline-block":"","of-hidden":"","bg-active":""},j9={"font-mono":"","text-sm":"",op50:"","ws-nowrap":"","of-ellipsis":"","of-hidden":""},L9=sn("div",{"mb-4":"",op50:"",uppercase:"","text-sm":""}," Utilities Usage ",-1),X9={key:0,grid:"~ cols-1 md:cols-2 gap-4"},V9={"text-sm":"","pb-4":""},U9={capitalize:""},q9={op50:"","ml-1":""},z9={flex:"","flex-wrap":"","gap-x-2":"","gap-y-2":""},W9={key:1,op50:""},Z9=Co({__name:"Analyzer",props:{selectors:{},colors:{}},setup(r){const e=r,t=as(()=>[...e.selectors].sort((s,a)=>a.count-s.count)),n=as(()=>(e.colors||[]).map(s=>({...s,name:s.no==="DEFAULT"?`${s.name}`:`${s.name}-${s.no}`})).sort((s,a)=>a.count-s.count)),i=as(()=>t.value.reduce((s,a)=>{const l=a.category,p=s.find(m=>m.name===l);return p?(p.items.push(a),p.count+=a.count):s.push({name:l,count:a.count,items:[a]}),s},[]).sort((s,a)=>a.count-s.count));return(s,a)=>{const l=P9;return bi(),ns("div",k9,[t.value.length>10?(bi(),ns("div",F9,[_9,sn("div",$9,[sn("div",B9,[(bi(!0),ns(po,null,Xc(t.value.slice(0,10),(p,m)=>(bi(),Go(l,{key:m,item:p},null,8,["item"]))),128))])])])):wu("",!0),n.value.length?(bi(),ns("div",N9,[sn("div",I9,[pa(" Color Palette "),sn("sup",R9,Hs(n.value.length),1)]),sn("div",M9,[(bi(!0),ns(po,null,Xc(n.value,(p,m)=>(bi(),ns("span",{key:m},[sn("div",Q9,[bs(l,{item:p},null,8,["item"]),sn("div",j9,Hs(p.color),1),sn("div",{"h-10":"","mt-1":"",style:dl({background:p.color})},null,4)])]))),128))])])):wu("",!0),sn("div",null,[L9,i.value.length?(bi(),ns("div",X9,[(bi(!0),ns(po,null,Xc(i.value,(p,m)=>(bi(),ns("div",{key:m,"p-4":"","bg-active":""},[sn("div",V9,[sn("span",U9,Hs(p.name),1),sn("sup",q9,Hs(p.count),1)]),sn("div",z9,[(bi(!0),ns(po,null,Xc(p.items,(g,b)=>(bi(),Go(l,{key:b,item:g},null,8,["item"]))),128))])]))),128))])):(bi(),ns("div",W9," No utilities found. "))])])}}}),Y9={"h-full":"",flex:"","flex-col":""},G9={p:"4",grid:"~ cols-4 gap-4"},H9=sn("div",{op80:""}," Presets ",-1),J9={op50:"","ws-pre":""},K9={overflow:"auto"},e4=sn("div",{op80:""}," Rules ",-1),t4=sn("span",{op50:""},"dynamic",-1),r4=sn("br",null,null,-1),n4=sn("span",{op50:""},"static",-1),i4=sn("div",{op80:""}," Variants ",-1),s4=sn("div",{op80:""}," Shortcuts ",-1),o4={key:0},a4=sn("div",{op80:""}," Config File ",-1),u4=sn("div",{op80:""}," Version ",-1),l4={op50:"","ws-pre":""},c4={border:"t main",p:"x4 y2",grid:"~ cols-4 gap-4"},h4=sn("div",{op80:""}," Included Files ",-1),p4=sn("div",{op80:""}," CSS Size ",-1),f4=sn("span",{op50:""},"gzipped",-1),d4=sn("div",{op80:""}," Matched Rules ",-1),m4=sn("div",{op80:""}," Layers ",-1),g4={op50:"","ws-pre":""},y4=Co({__name:"Overview",setup(r){const e=Ys(null),t=f6(e,"overview-scrolls");$O.execute();const n=Ys(!1),i=Ys("source"),s=C6(as(()=>{var a;return(a=Ep.value)==null?void 0:a.css}),n);return(a,l)=>{const p=Pw,m=a6,g=n6,b=K5,C=Y5;return bi(),ns("div",Y9,[bs(b,{ref_key:"status",ref:e,p0:""},{default:fa(()=>{var $,Y,xe,ke,ge,je,pt,Dt,bt,Pt,nr,Ur,jr,gr,Lr,kn,Gn,Ii;return[sn("div",G9,[sn("div",null,[H9,sn("div",J9,Hs((xe=(Y=($=Ai(qo))==null?void 0:$.config)==null?void 0:Y.presets)==null?void 0:xe.map(ni=>ni.name).join(`
291
291
  `)),1)]),sn("div",K9,[e4,pa(" "+Hs((je=(ge=(ke=Ai(qo))==null?void 0:ke.config)==null?void 0:ge.rulesDynamic)==null?void 0:je.length)+" ",1),t4,r4,pa(" "+Hs(Object.keys(((Dt=(pt=Ai(qo))==null?void 0:pt.config)==null?void 0:Dt.rulesStaticMap)||{}).length)+" ",1),n4]),sn("div",null,[i4,pa(" "+Hs((nr=(Pt=(bt=Ai(qo))==null?void 0:bt.config)==null?void 0:Pt.variants)==null?void 0:nr.length),1)]),sn("div",null,[s4,pa(" "+Hs((Ur=Ai(qo))==null?void 0:Ur.config.shortcuts.length),1)]),(jr=Ai(qo))!=null&&jr.configPath?(bi(),ns("div",o4,[a4,bs(p,{id:Ai(qo).configPath},null,8,["id"])])):wu("",!0),sn("div",null,[u4,sn("div",l4,Hs((gr=Ai(qo))==null?void 0:gr.version),1)])]),sn("div",c4,[sn("div",null,[h4,pa(" "+Hs((Lr=Ai(qo))==null?void 0:Lr.modules.length),1)]),sn("div",null,[p4,pa(" "+Hs(((((kn=Ai(Ep))==null?void 0:kn.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),f4]),sn("div",null,[d4,pa(" "+Hs((Gn=Ai(Ep))==null?void 0:Gn.matched.length),1)]),sn("div",null,[m4,sn("div",g4,Hs((Ii=Ai(Ep))==null?void 0:Ii.layers.join(`
292
- `)),1)])]),bs(m,{modelValue:Ai(i),"onUpdate:modelValue":l[0]||(l[0]=ni=>so(i)?i.value=ni:null)},null,8,["modelValue"]),Ai(i)==="source"?(bi(),Go(g,{key:0,border:"t gray-400/20",title:"Output CSS"},{default:fa(()=>[sn("label",null,[ET(sn("input",{"onUpdate:modelValue":l[1]||(l[1]=ni=>so(n)?n.value=ni:null),type:"checkbox"},null,512),[[NP,Ai(n)]]),pa(" Prettify ")])]),_:1})):wu("",!0)]}),_:1},512),Ai(i)==="source"?(bi(),Go(C,{key:0,"model-value":Ai(s),"read-only":!0,mode:"css",class:"overview-scrolls",style:dl(Ai(t))},null,8,["model-value","style"])):(bi(),Go(Z9,{key:1,"flex-grow":"","overflow-y-auto":"",selectors:Ai(Ep).matched,colors:Ai(Ep).colors},null,8,["selectors","colors"]))])}}}),D4={};function O4(r,e){const t=y4;return bi(),Go(t)}const x4=Sw(D4,[["render",O4]]),b4=()=>Qv(()=>import("./repl-CFybYQ3f.js"),[]),v4=()=>Qv(()=>import("./_id_-DDKIswmY.js"),[]),C4=[{name:"repl",path:"/repl",component:b4,props:!0},{name:"index",path:"/",component:x4,props:!0},{name:"module-id",path:"/module/:id",component:v4,props:!0}];/*!
292
+ `)),1)])]),bs(m,{modelValue:Ai(i),"onUpdate:modelValue":l[0]||(l[0]=ni=>so(i)?i.value=ni:null)},null,8,["modelValue"]),Ai(i)==="source"?(bi(),Go(g,{key:0,border:"t gray-400/20",title:"Output CSS"},{default:fa(()=>[sn("label",null,[ET(sn("input",{"onUpdate:modelValue":l[1]||(l[1]=ni=>so(n)?n.value=ni:null),type:"checkbox"},null,512),[[NP,Ai(n)]]),pa(" Prettify ")])]),_:1})):wu("",!0)]}),_:1},512),Ai(i)==="source"?(bi(),Go(C,{key:0,"model-value":Ai(s),"read-only":!0,mode:"css",class:"overview-scrolls",style:dl(Ai(t))},null,8,["model-value","style"])):(bi(),Go(Z9,{key:1,"flex-grow":"","overflow-y-auto":"",selectors:Ai(Ep).matched,colors:Ai(Ep).colors},null,8,["selectors","colors"]))])}}}),D4={};function O4(r,e){const t=y4;return bi(),Go(t)}const x4=Sw(D4,[["render",O4]]),b4=()=>Qv(()=>import("./repl-B_GcRsEP.js"),[]),v4=()=>Qv(()=>import("./_id_-BwoivDF2.js"),[]),C4=[{name:"repl",path:"/repl",component:b4,props:!0},{name:"index",path:"/",component:x4,props:!0},{name:"module-id",path:"/module/:id",component:v4,props:!0}];/*!
293
293
  * vue-router v4.3.2
294
294
  * (c) 2024 Eduardo San Martin Morote
295
295
  * @license MIT
@@ -1,3 +1,3 @@
1
- import{d as x,r as S,u as b,a as k,b as V,f as B,o as h,c as w,e as s,g as a,w as m,h as C,i as p,v as R,j as e,k as P,n as f,_ as E,l as N,m as U,p as $,q as I}from"./index-Ddbxbqdh.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=S(null),l=b(r,"repl-scrolls"),t=k("unocss:inspector:repl",`<div class="text-sm hover:text-red">
1
+ import{d as x,r as S,u as b,a as k,b as V,f as B,o as h,c as w,e as s,g as a,w as m,h as C,i as p,v as R,j as e,k as P,n as f,_ as E,l as N,m as U,p as $,q as I}from"./index-BF4NBrFx.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=S(null),l=b(r,"repl-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 v=E,g=N,u=U;return h(),w("div",L,[s("div",{ref_key:"status",ref:r},[a(v,null,{default:m(()=>[M,T]),_:1}),a(g,{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})],512),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 repl-scrolls",style:f(e(l))},null,8,["modelValue","matched","style"]),a(u,{border:"l main","model-value":((_=e(d))==null?void 0:_.css)||"/* empty */","read-only":!0,mode:"css",class:"scrolls repl-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};
@@ -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-Ddbxbqdh.js"></script>
11
+ <script type="module" crossorigin src="/__unocss/assets/index-BF4NBrFx.js"></script>
12
12
  <link rel="stylesheet" crossorigin href="/__unocss/assets/index-pjbTb0tu.css">
13
13
  </head>
14
14
  <body>
package/dist/index.mjs CHANGED
@@ -47,7 +47,7 @@ const globalKeywords = [
47
47
  ];
48
48
 
49
49
  const numberWithUnitRE = /^(-?\d*(?:\.\d+)?)(px|pt|pc|%|r?(?:em|ex|lh|cap|ch|ic)|(?:[sld]?v|cq)(?:[whib]|min|max)|in|cm|mm|rpx)?$/i;
50
- const numberRE = /^(-?\d*(?:\.\d+)?)$/i;
50
+ const numberRE = /^(-?\d*(?:\.\d+)?)$/;
51
51
  const unitOnlyRE = /^(px|[sld]?v[wh])$/i;
52
52
  const unitOnlyMap = {
53
53
  px: 1,
@@ -120,7 +120,7 @@ const cssProps = [
120
120
  "border-radius"
121
121
  ];
122
122
  function round(n) {
123
- return n.toFixed(10).replace(/\.0+$/, "").replace(/(\.\d+?)0+$/, "$1");
123
+ return +n.toFixed(10);
124
124
  }
125
125
  function numberWithUnit(str) {
126
126
  const match = str.match(numberWithUnitRE);
@@ -232,7 +232,7 @@ function bracketWithType(str, requiredType) {
232
232
  return match2.replace(/var\((--.+?)[,)]/g, (match3, g1) => {
233
233
  vars.push(g1);
234
234
  return match3.replace(g1, "--un-calc");
235
- }).replace(/(-?\d*\.?\d(?!\b-\d.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, "$1 $2 ").replace(/--un-calc/g, () => vars.shift());
235
+ }).replace(/(-?\d*\.?\d(?!-\d.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, "$1 $2 ").replace(/--un-calc/g, () => vars.shift());
236
236
  });
237
237
  }
238
238
  }
@@ -349,7 +349,7 @@ function parseColor(body, theme, key) {
349
349
  if (!split)
350
350
  return;
351
351
  const [main, opacity] = split;
352
- const colors = main.replace(/([a-z])([0-9])/g, "$1-$2").split(/-/g);
352
+ const colors = main.replace(/([a-z])(\d)/g, "$1-$2").split(/-/g);
353
353
  const [name] = colors;
354
354
  if (!name)
355
355
  return;
@@ -358,7 +358,7 @@ function parseColor(body, theme, key) {
358
358
  const bracketOrMain = bracket || main;
359
359
  if (h.numberWithUnit(bracketOrMain))
360
360
  return;
361
- if (/^#[\da-fA-F]+$/.test(bracketOrMain))
361
+ if (/^#[\da-f]+$/i.test(bracketOrMain))
362
362
  color = bracketOrMain;
363
363
  else if (/^hex-[\da-fA-F]+$/.test(bracketOrMain))
364
364
  color = `#${bracketOrMain.slice(4)}`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/inspector",
3
3
  "type": "module",
4
- "version": "0.60.1",
4
+ "version": "0.60.3",
5
5
  "description": "The inspector UI for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -36,8 +36,8 @@
36
36
  "dependencies": {
37
37
  "gzip-size": "^6.0.0",
38
38
  "sirv": "^2.0.4",
39
- "@unocss/core": "0.60.1",
40
- "@unocss/rule-utils": "0.60.1"
39
+ "@unocss/rule-utils": "0.60.3",
40
+ "@unocss/core": "0.60.3"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "unbuild",
@@ -1 +0,0 @@
1
- import{s as Z,t as z,d as W,x as q,y as G,r as R,u as H,z as K,A as J,B as L,j as s,c as P,g as A,w as k,q as j,C as M,_ as Q,D as X,o as S,e as m,k as w,E as C,i as B,F,n as O,h as Y,v as ee,M as te,G as re,H as le,m as se,l as ae,I as ne}from"./index-Ddbxbqdh.js";const D=/^(?!.*\[(?:[^:]+):(?:.+)\]$)((?:.+:)?!?)?(.*)$/;function ce(e={}){const h=e.prefix??"un-",r=e.prefixedOnly??!1,g=e.trueToNonValued??!1;let o;return{name:"attributify",match(a,{generator:$}){var _,c;const n=Z(a);if(!n)return;let t=n[1];if(t.startsWith(h))t=t.slice(h.length);else if(r)return;const i=n[2],[,x="",p=i]=i.match(D)||[];if(p==="~"||g&&p==="true"||!p)return`${x}${t}`;if(o==null){const l=(c=(_=$==null?void 0:$.config)==null?void 0:_.separators)==null?void 0:c.join("|");l?o=new RegExp(`^(.*\\](?:${l}))(\\[[^\\]]+?\\])$`):o=!1}if(o){const[,l,u]=i.match(o)||[];if(u)return`${l}${x}${t}-${u}`}return`${x}${t}-${p}`}}}const oe=/(<\w[\w:\.$-]*\s)((?:'[^>]*?'|"[^>]*?"|`[^>]*?`|\{[^>]*?\}|[^>]*?)*)/g,ie=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-]+)(?:=("[^"]*|'[^']*))?/g,I=/[\s'"`;>]+/;function ue(e){return{name:"attributify",extract:({content:h,cursor:r})=>{const g=h.matchAll(oe);let o,a=0;for(const f of g){const[,v,y]=f,b=f.index+v.length;if(r>b&&r<=b+y.length){a=b,o=y;break}}if(!o)return null;const $=o.matchAll(ie);let n=0,t,i;for(const f of $){const[v,y,b]=f,E=a+f.index;if(r>E&&r<=E+v.length){n=E,t=y,i=b==null?void 0:b.slice(1);break}}if(!t||t==="class"||t==="className"||t===":class")return null;const x=!!(e!=null&&e.prefix)&&t.startsWith(e.prefix);if(e!=null&&e.prefixedOnly&&!x)return null;const p=x?t.slice(e.prefix.length):t;if(i===void 0)return{extracted:p,resolveReplacement(f){const v=x?e.prefix.length:0;return{start:n+v,end:n+t.length,replacement:f}}};const _=n+t.length+2;let c=I.exec(i),l=0,u;for(;c;){const[f]=c;if(r>_+l&&r<=_+l+c.index){u=i.slice(l,l+c.index);break}l+=c.index+f.length,c=I.exec(i.slice(l))}u===void 0&&(u=i.slice(l));const[,d="",V]=u.match(D)||[];return{extracted:`${d}${p}-${V}`,transformSuggestions(f){return f.filter(v=>v.startsWith(`${d}${p}-`)).map(v=>d+v.slice(d.length+p.length+1))},resolveReplacement(f){return{start:l+_,end:l+_+u.length,replacement:d+f.slice(d.length+p.length+1)}}}}}}const de=["v-bind:",":"],T=/[\s'"`;]+/g,N=/<[^>\s]*\s((?:'.*?'|".*?"|`.*?`|\{.*?\}|=>|[^>]*?)*)/g,fe=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.~<]+)=?(?:["]([^"]*)["]|[']([^']*)[']|[{]([^}]*)[}])?/gms,U=["placeholder","fill","opacity","stroke-opacity"];function me(e){const h=(e==null?void 0:e.ignoreAttributes)??U,r=(e==null?void 0:e.nonValuedAttribute)??!0,g=(e==null?void 0:e.trueToNonValued)??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(N)).flatMap(a=>Array.from((a[1]||"").matchAll(fe))).flatMap(([,a,...$])=>{const n=$.filter(Boolean).join("");if(h.includes(a))return[];for(const t of de)if(a.startsWith(t)){a=a.slice(t.length);break}if(!n){if(z(a)&&r!==!1){const t=[`[${a}=""]`];return g&&t.push(`[${a}="true"]`),t}return[]}return["class","className"].includes(a)?n.split(T).filter(z):N.test(n)?(N.lastIndex=0,this.extract({code:n})):e!=null&&e.prefixedOnly&&e.prefix&&!a.startsWith(e.prefix)?[]:n.split(T).filter(t=>!!t&&t!==":").map(t=>`[${a}~="${t}"]`)})}}}const he=(e={})=>{e.strict=e.strict??!1,e.prefix=e.prefix??"un-",e.prefixedOnly=e.prefixedOnly??!1,e.nonValuedAttribute=e.nonValuedAttribute??!0,e.ignoreAttributes=e.ignoreAttributes??U;const h=[ce(e)],r=[me(e)],g=[ue(e)];return{name:"@unocss/preset-attributify",enforce:"post",variants:h,extractors:r,options:e,autocomplete:{extractors:g},extractorDefault:e.strict?!1:void 0}},_e={key:0,"h-full":"","of-hidden":"",flex:"","flex-col":""},xe={p:"4",grid:"~ cols-4 gap-4"},pe=m("div",{op50:""}," Module ",-1),ye=m("div",{"i-carbon-launch":""},null,-1),ve=m("div",{op50:""}," Matched Rules ",-1),be=m("div",{op50:""}," CSS Size ",-1),ge=m("span",{op50:""},"gzipped",-1),$e={key:0,"row-span-3":""},Ae=m("div",{op50:""}," Potentially Unmatched ",-1),Ve={key:0,"h-full":"","of-hidden":""},ke=W({__name:"ModuleInfo",props:{id:{}},setup(e){const h=e,{data:r}=q(G(h,"id")),g=h.id.split(/\./g).pop(),o=R(null),a=H(o,"module-scrolls");function $(){fetch(`/__open-in-editor?file=${encodeURIComponent(h.id)}`)}const{extractors:n}=he({strict:!0}),t=K(async()=>{var c;const _=new Set;if(n){const l={code:((c=r.value)==null?void 0:c.code)||""};for(const u of n){const d=await u.extract(l);d==null||d.forEach(V=>_.add(V))}}return Array.from(_).filter(l=>!l.startsWith("[")).filter(l=>{var u,d;return!((d=(u=r.value)==null?void 0:u.matched)!=null&&d.some(({rawSelector:V})=>V===l))})}),i=R(!1),x=R("source"),p=J(L(()=>{var _;return(_=r.value)==null?void 0:_.css}),i);return(_,c)=>{const l=re,u=le,d=Q,V=se,f=ae,v=X;return s(r)?(S(),P("div",_e,[A(d,{ref_key:"status",ref:o,p0:""},{default:k(()=>{var y;return[m("div",xe,[m("div",null,[pe,m("a",{"cursor-pointer":"",op80:"","hover:op100":"",onClick:$},[A(l,{id:s(r).id,"mr-1":""},null,8,["id"]),ye])]),m("div",null,[ve,w(" "+C(s(r).matched.length),1)]),m("div",null,[be,w(" "+C(((((y=s(r))==null?void 0:y.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),ge]),s(t).length?(S(),P("div",$e,[Ae,m("code",null,C(s(t).join(", ")),1)])):M("",!0)]),A(u,{modelValue:s(x),"onUpdate:modelValue":c[0]||(c[0]=b=>B(x)?x.value=b:null)},null,8,["modelValue"])]}),_:1},512),s(x)==="source"?(S(),P("div",Ve,[A(s(te),null,{default:k(()=>[A(s(F),{size:"50"},{default:k(()=>{var y;return[A(V,{"h-full":"","model-value":s(r).code,"read-only":!0,mode:s(g),matched:(y=s(r).matched)==null?void 0:y.map(({rawSelector:b})=>b),class:"scrolls module-scrolls",style:O(s(a))},null,8,["model-value","mode","matched","style"])]}),_:1}),A(s(F),{size:"50"},{default:k(()=>[m("div",null,[A(f,{border:"l b gray-400/20",title:"Output CSS"},{default:k(()=>[m("label",null,[Y(m("input",{"onUpdate:modelValue":c[1]||(c[1]=y=>B(i)?i.value=y:null),type:"checkbox"},null,512),[[ee,s(i)]]),w(" Prettify ")])]),_:1}),A(V,{"h-full":"",border:"l main","model-value":s(p),"read-only":!0,mode:"css",class:"scrolls module-scrolls",style:O(s(a))},null,8,["model-value","style"])])]),_:1})]),_:1})])):(S(),j(v,{key:1,"flex-grow":"","overflow-y-auto":"",selectors:s(r).matched,colors:s(r).colors},null,8,["selectors","colors"]))])):M("",!0)}}}),Ee=W({__name:"[id]",setup(e){const h=ne();return(r,g)=>{const o=ke;return S(),j(o,{id:s(h).params.id},null,8,["id"])}}});export{Ee as default};