@pandacss/language-server 0.0.0-dev-20230919122009 → 0.0.0-dev-20230920234116

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -30773,7 +30773,7 @@ ${qt}`}Bn.exports={isPragma:Kt,hasPragma:E,insertPragma:g}}}),RS=ms({"src/langua
30773
30773
  ${r.type!=="rule"&&a>0?`
30774
30774
  `:""}${" ".repeat(e)}`),uxn(i,e+1)})}function HXe(){return r=>{uxn(r),r.first&&(r.first.raws.before="")}}HXe.postcssPlugin="panda-prettify";var Tar=[":link",":visited",":focus-within",":focus",":focus-visible",":hover",":active"],$Sn=r=>Tar.findIndex(i=>r.trim().includes(i))+1;function M5t(){let r=e=>{let i=[],a=[],u=[];e.each(d=>{switch(d.type){case"rule":{d.first?.type==="atrule"?u.push(d):a.push(d);break}case"atrule":{u.push(d);break}default:i.push(d)}}),a.sort((d,h)=>{let b=d.selectors.length?d.selectors[0]:d.selector,x=h.selectors.length?h.selectors[0]:h.selector;return $Sn(b)-$Sn(x)}),e.nodes=[...i,...a,...u],e.nodes.forEach(d=>{"nodes"in d&&r(d)})};return r}M5t.postcssPlugin="panda-sort-css";var pxn=/(!?\(\s*min(-device-)?-width)(.|\n)+\(\s*max(-device)?-width/i,Aar=/\(\s*min(-device)?-width/i,fxn=/(!?\(\s*max(-device)?-width)(.|\n)+\(\s*min(-device)?-width/i,kar=/\(\s*max(-device)?-width/i,x5t=pBt(pxn,fxn,Aar),ZSn=pBt(fxn,pxn,kar),dxn=/(!?\(\s*min(-device)?-height)(.|\n)+\(\s*max(-device)?-height/i,war=/\(\s*min(-device)?-height/i,mxn=/(!?\(\s*max(-device)?-height)(.|\n)+\(\s*min(-device)?-height/i,Iar=/\(\s*max(-device)?-height/i,E5t=pBt(dxn,mxn,war),exn=pBt(mxn,dxn,Iar),txn=/print/i,nxn=/^print$/i,VXe=Number.MAX_VALUE;function rxn(r){let e=/(-?\d*\.?\d+)(ch|em|ex|px|rem)/.exec(r);if(e===null&&(x5t(r)||E5t(r))&&(e=/(\d)/.exec(r)),e==="0")return 0;if(e===null)return VXe;let i=e[1];switch(e[2]){case"ch":i=parseFloat(i)*8.8984375;break;case"em":case"rem":i=parseFloat(i)*16;break;case"ex":i=parseFloat(i)*8.296875;break;case"px":i=parseFloat(i);break}return+i}function pBt(r,e,i){return function(a){return r.test(a)?!0:e.test(a)?!1:i.test(a)}}function Par(r,e){let i=txn.test(r),a=nxn.test(r),u=txn.test(e),d=nxn.test(e);return i&&u?!a&&d?1:a&&!d?-1:r.localeCompare(e):i?1:u?-1:null}function Nar(r={}){let{unitlessMqAlwaysFirst:e}=r;return function(a,u){let d=Par(a,u);if(d!==null)return d;let h=x5t(a)||E5t(a),b=ZSn(a)||exn(a),x=x5t(u)||E5t(u),I=ZSn(u)||exn(u);if(e&&(!h&&!b||!x&&!I))return!h&&!b&&!x&&!I?a.localeCompare(u):!x&&!I?1:-1;{if(h&&I)return-1;if(b&&x)return 1;let L=rxn(a),q=rxn(u);return L===VXe&&q===VXe?a.localeCompare(u):L===VXe?1:q===VXe?-1:L>q?b?-1:1:L<q?b?1:-1:a.localeCompare(u)}}}var Rar=Nar();function F5t(){let r=e=>{e.nodes.sort((i,a)=>SB({a:i,b:a}).with({a:{type:"atrule",name:"media"},b:{type:"atrule",name:"media"}},({a:u,b:d})=>Rar(u.params,d.params)).with({a:{type:"atrule",name:"media"},b:xD.any},()=>1).with({a:xD.any,b:{type:"atrule",name:"media"}},()=>-1).otherwise(()=>0)),e.nodes.forEach(i=>{"nodes"in i&&r(i)})};return r}F5t.postcssPlugin="panda-sort-mq";function fBt(r,e={}){let{minify:i=!1}=e,a=[(0,uBt.default)(),L5t(),F5t(),(0,w5t.default)(),(0,P5t.default)(),M5t(),(0,I5t.default)()];i?a.push((0,R5t.default)(),(0,N5t.default)()):a.push(HXe());let{css:u}=s0(a).process(r);return u}function Lar(r,e={}){let{token:i,raw:a}=e,{css:u}=s0([Dar(i,a)]).process(r);return u}function dBt(r,e={}){let{minify:i=!1}=e,a=[(0,uBt.default)(),L5t(),F5t(),(0,w5t.default)(),(0,P5t.default)(),M5t(),(0,I5t.default)()];i?a.push((0,R5t.default)(),(0,N5t.default)()):a.push(HXe());let{css:u}=s0(a).process(r);return u}function _xn(r){let{css:e}=s0([(0,uBt.default)(),HXe()]).process(r);return e}function hxn(r){let{css:e}=s0([HXe()]).process(r);return e}function mBt(r,e){let i=UXe(r),a=UXe(e),u=i.nodes.filter($pe({type:"atrule",name:"layer",params:"utilities"}));return a.walkAtRules("layer",d=>{d.params==="utilities"&&u.forEach(h=>{d.append(h.nodes)})}),dBt(a)}var L7={classNames:new Map,styles:new Map,nodes:new Map,slots:new Map},O5t=class{constructor(r={},e){this.recipes=r,this.context=e,this.assignRules()}rules=new Map;getPropKey=(r,e,i)=>`${r} (${e} = ${i})`;get separator(){return this.context.utility.separator??"_"}getClassName=(r,e,i)=>`${r}--${e}${this.separator}${i}`;save=()=>{for(let[r,e]of Object.entries(this.recipes))if(aRe(e)){let i=MKe(e),a=new Map;Object.entries(i).forEach(([u,d])=>{let h=this.getSlotKey(r,u);this.normalize(h,d),a.set(h,d)}),this.assignRecipe(r,e),L7.slots.set(r,a)}else this.assignRecipe(r,this.normalize(r,e))};assignRecipe=(r,e)=>{let i=Object.keys(e.variants??{}),a=e.jsx??[g4(r)],u=LKe(a);L7.nodes.set(r,{...this.getNames(r),jsx:a,type:"recipe",variantKeys:i,variantKeyMap:Object.fromEntries(Object.entries(e.variants??{}).map(([d,h])=>[d,Object.keys(h)])),match:u,config:e,splitProps:d=>_8t(d,i),props:i})};getSlotKey=(r,e)=>`${r}__${e}`;assignRules=()=>{if(this.context)for(let[r,e]of Object.entries(this.recipes))aRe(e)?e.slots.forEach(i=>{let a=this.getSlotKey(r,i);this.rules.set(a,this.createRule(a,!0))}):this.rules.set(r,this.createRule(r))};isEmpty=()=>L7.nodes.size===0;getNames=zE(r=>({baseName:r,upperName:g4(r),dashName:PKe(r),jsxName:g4(r)}));getRecipe=zE(r=>L7.nodes.get(r));getConfig=zE(r=>this.recipes[r]);find=zE(r=>this.details.find(e=>e.match.test(r)));filter=zE(r=>this.details.filter(e=>e.match.test(r)));get details(){return Array.from(L7.nodes.values())}splitProps=(r,e)=>{let i=this.details.find(a=>a.baseName===r);return i?i.splitProps(e):[{},e]};normalize=(r,e)=>{let{className:i,jsx:a=[g4(r)],base:u={},variants:d={},defaultVariants:h={},description:b="",compoundVariants:x=[]}=e,I={...e,jsx:a,className:i,description:b,base:{},variants:{},defaultVariants:h,compoundVariants:x};I.base=this.serialize(u),L7.styles.set(r,I.base),L7.classNames.set(r,i);for(let[L,q]of Object.entries(d))for(let[te,me]of Object.entries(q)){let Ee=this.getPropKey(r,L,te),ke=this.getClassName(e.className,L,te),Ue=this.serialize(me);L7.styles.set(Ee,Ue),L7.classNames.set(Ee,ke),(0,gxn.default)(I.variants,{[L]:{[te]:Ue}})}return I};serialize=r=>this.context?k5t(r,this.context):r;getTransform=r=>(e,i)=>{if(i==="__ignore__")return{layer:"_base",className:L7.classNames.get(r),styles:L7.styles.get(r)??{}};let a=this.getPropKey(r,e,i);return{className:L7.classNames.get(a),styles:L7.styles.get(a)??{}}};createRule=(r,e)=>{if(!this.context)throw new Error("Can't create a rule without a context");let i=new cBt({...this.context,transform:this.getTransform(r)}),a=this.context.layers.recipes;return i.layer=e?`${a}.slots`:a,i};check=(r,e,i)=>{let{defaultVariants:a={},base:u={}}=r,d=Object.assign({[e]:"__ignore__"},a,i),h=Object.keys(d);return{styles:d,isEmpty:h.length===1&&Object.keys(u).length===0}};process=(r,e)=>{let{styles:i}=e,a=this.getRecipe(r);if(!a)return;let u=L7.slots.get(r);if(u)u.forEach((d,h)=>{let{isEmpty:b,styles:x}=this.check(d,h,i);if(b)return;this.rules.get(h)?.process({styles:x})});else{let{isEmpty:d,styles:h}=this.check(a.config,a.config.className,i);if(d)return;this.rules.get(r)?.process({styles:h})}};toCss=()=>this.context?this.context.root.toString():""},Mar=/\s&/g;function yxn(r){let e=new Set;(0,Bxn.default)(a=>{a.each(u=>{let d=S5t(u.toString());SB(d).with({type:"parent-nesting"},()=>{e.add(u.toString().replace(Mar,"").trim())}).otherwise(()=>{})})}).processSync(r);let i=Array.from(e).join(", ").trim();return e.size>1?`:where(${i})`:i}var EBi=aBt(),v5t=(r,e)=>r.breakpoints.includes(e)?e:`_${e}`;function Cxn(r){let{css:e=[],recipes:i={}}=r,a={css:[],recipes:[]};return u=>(e.forEach(d=>{let h=d.conditions||[];d.responsive&&h.push(...u.breakpoints),Object.entries(d.properties).forEach(([b,x])=>{x.flatMap(L=>L==="*"?u.getPropertyKeys(b):L).forEach(L=>{let q=h.reduce((te,me)=>({base:L,...te,[v5t(u,me)]:L}),{});a.css.push({[b]:h.length?q:L})})})}),Object.entries(i).forEach(([d,h])=>{h.forEach(b=>{let{__base:x,...I}=u.getRecipeKeys(d),L=b==="*",{conditions:q=[],responsive:te=L,...me}=L?I:b;if(te&&q.push(...u.breakpoints),x){let Ee=q.reduce((ke,Ue)=>({base:x,...ke,[v5t(u,Ue)]:x}),{});a.recipes.push({[d]:q.length?Ee:x})}Object.entries(me).forEach(([Ee,ke])=>{if(!Array.isArray(ke))return;ke.flatMap(Fe=>Fe==="*"?I[Ee]:Fe).forEach(Fe=>{let We=q.reduce((Tt,Vt)=>({base:Fe,...Tt,[v5t(u,Vt)]:Fe}),{});a.recipes.push({[d]:{[Ee]:q.length?We:Fe}})})})})}),a)}var vxn=class{constructor(r,e){this.context=r,this.options=e;let{recipes:i={},slotRecipes:a={}}=e??{},u=Object.assign({},i,a);this.recipes=new O5t(u,r)}recipes;processGlobalCss=r=>{let{conditions:e,utility:i}=this.context,a=har(r,{conditions:e,utility:i}),u=s0.atRule({name:"layer",params:this.context.layers.base,nodes:[a]});this.context.root.append(u)};processSelectorObject(r,e){let i=kj(e),{nodes:a}=UXe(i);if(a.length===0)return;let u=s0.rule({selector:r,nodes:i.root.nodes});this.context.root.append(u)}processObject(r){let i=kj(r).root;this.context.root.append(i)}processAtomic=(...r)=>{let e=new cBt(this.context);r.forEach(i=>{i&&e.process({styles:i})})};processStyleProps=r=>{let{css:e,...i}=r;this.processAtomic(i,e)};processCompoundVariants=r=>{r.compoundVariants?.forEach(e=>{if(aRe(r))for(let i of Object.values(e.css))this.processAtomic(i);else this.processAtomic(e.css)})};processRecipe=(r,e,i)=>{this.recipes.process(r,{styles:i}),this.processCompoundVariants(e)};processAtomicSlotRecipe=r=>{let e=MKe(r);for(let i of Object.values(e))this.processAtomicRecipe(i)};processAtomicRecipe=r=>{let{base:e={},variants:i={},compoundVariants:a=[]}=r;this.processAtomic(e);for(let u of Object.values(i))for(let d of Object.values(u))this.processAtomic(d);a.forEach(u=>{this.processAtomic(u.css)})};toCss=({optimize:r=!1,minify:e}={})=>{try{let{conditions:{breakpoints:i},utility:a}=this.context;i.expandScreenAtRule(this.context.root),Lar(this.context.root,{token:a.getToken,raw:this.context.utility.tokens.getByName});let u=this.context.root.toString();return r&&(u=fBt(u,{minify:e})),this.options?.content&&(u=`${this.options.content}
30775
30775
 
30776
- ${u}`),r?dBt(u,{minify:e}):u}catch(i){throw i instanceof WZt&&(v2.error("sheet",i.message),i.plugin&&v2.error("sheet",`By plugin: ${i.plugin}:`),i.source&&(v2.error("sheet",`Line ${i.line}:${i.column}, in:`),v2.error("sheet",i.source))),i}};append=(...r)=>{this.context.root.append(...r)};prepend=(...r)=>{this.context.root.prepend(...r)}},bxn=class{tokens;classNames=new Map;styles=new Map;shorthands=new Map;types=new Map;propertyKeys=new Map;config={};customValues=new Map;transforms=new Map;configs=new Map;separator="_";prefix="";strictTokens=!1;constructor(r){let{tokens:e,config:i={},separator:a,prefix:u,shorthands:d,strictTokens:h}=r;this.tokens=e,this.config=i,a&&(this.separator=a),u&&(this.prefix=u),h&&(this.strictTokens=h),d&&this.assignShorthands(),this.assignColorPaletteProperty(),this.assignProperties(),this.assignPropertyTypes()}register=(r,e)=>{this.assignProperty(r,e),this.assignPropertyType(r,e),this.config[r]=e};assignShorthands=()=>{for(let[r,e]of Object.entries(this.config)){let{shorthand:i}=this.normalize(e)??{};if(!i)continue;(Array.isArray(i)?i:[i]).forEach(u=>{this.shorthands.set(u,r)})}};assignColorPaletteProperty=()=>{let r=this.tokens.colorPalettes;this.config.colorPalette={values:Object.keys(r),transform(e){return r[e]}}};resolveShorthand=r=>this.shorthands.get(r)??r;get hasShorthand(){return this.shorthands.size>0}get isEmpty(){return Object.keys(this.config).length===0}entries=()=>Object.entries(this.config).filter(([,e])=>!!e?.className).map(([e,i])=>[e,i.className]);getPropKey=(r,e)=>`(${r} = ${e})`;hash=(r,e)=>`${r}${this.separator}${e}`;getPropertyValues=(r,e)=>{let{values:i}=r,a=u=>{let d=e?.(u);return d?{[d]:d}:void 0};return bj(i)?a?.(i)??this.tokens.getValue(i)??{}:Array.isArray(i)?i.reduce((u,d)=>(u[d]=d,u),{}):c8t(i)?i(e?a:this.getToken.bind(this)):i};getToken=r=>this.tokens.get(r);normalize=r=>r;assignProperty=(r,e)=>{let i=this.normalize(e);if(this.setTransform(r,i?.transform),!i)return;this.configs.set(r,i);let a=this.getPropertyValues(i);if(a)for(let[u,d]of Object.entries(a)){let h=this.getPropKey(r,u);this.setStyles(r,d,u,h),this.setClassName(r,u)}};assignProperties=()=>{for(let[r,e]of Object.entries(this.config))e&&this.assignProperty(r,e)};getPropertyKeys=r=>{let e=this.propertyKeys.get(r);return e?Array.from(e):[]};assignPropertyType=(r,e)=>{let i=this.normalize(e);if(!i)return;let a=this.getPropertyValues(i,d=>`type:Tokens["${d}"]`);if(typeof a=="object"&&a.type){this.types.set(r,new Set([`type:${a.type}`]));return}if(a){let d=new Set(Object.keys(a));this.types.set(r,d),this.propertyKeys.set(r,d)}let u=this.types.get(r)??new Set;!this.strictTokens&&i.property&&this.types.set(r,u.add(`CssProperties["${i.property}"]`))};assignPropertyTypes=()=>{for(let[r,e]of Object.entries(this.config))e&&this.assignPropertyType(r,e)};getTypes=()=>{let r=new Map;for(let[e,i]of this.types.entries()){if(i.size===0){r.set(e,["string"]);continue}let a=Array.from(i).map(u=>u.startsWith("CssProperties")?u:u.startsWith("type:")?u.replace("type:",""):JSON.stringify(u));r.set(e,a)}return r};defaultTransform=zE((r,e)=>{if(e.startsWith("--")){let a=this.tokens.getTokenVar(r);r=typeof a=="string"?a:r}return{[e]:r}});setTransform=(r,e)=>{let a=e??(u=>this.defaultTransform(u,r));return this.transforms.set(r,a),this};setStyles=(r,e,i,a)=>{a=a??this.getPropKey(r,e);let u=x=>this.defaultTransform(x,r),d=this.transforms.get(r)??u,h=Object.assign(this.getToken.bind(this),{raw:x=>this.tokens.getByName(x)}),b=d(e,{token:h,raw:i});return this.styles.set(a,b??{}),this};formatClassName=r=>[this.prefix,r].filter(Boolean).join("-");setClassName=(r,e)=>{let i=this.getPropKey(r,e),a=this.configs.get(r),u;return!a||!a.className?u=this.hash(Fve(r),e):u=this.hash(a.className,e),this.classNames.set(i,u),this};isProperty=r=>this.configs.has(r);getOrCreateClassName=(r,e)=>((a,u)=>{let d=this.getPropKey(a,u);return this.classNames.has(d)||(this.isProperty(a)&&this.customValues.set(a,u),this.setClassName(a,u)),this.classNames.get(d)})(r,e);getOrCreateStyle=(r,e)=>{let i=this.getPropKey(r,e);return this.styles.get(i)??this.setStyles(r,e,e,i),this.styles.get(i)};transform=(r,e)=>{if(e==null)return{className:"",styles:{}};let i=this.resolveShorthand(r);return Upe({layer:this.configs.get(i)?.layer,className:this.getOrCreateClassName(i,NKe(e)),styles:this.getOrCreateStyle(i,e)})};keys=()=>{let r=Array.from(this.shorthands.keys()),e=Object.keys(this.config);return[...r,...e]};getPropShorthandsMap=()=>{let r=new Map;return this.shorthands.forEach((e,i)=>{let a=r.get(e)??[];a.push(i),r.set(e,a)}),r};getPropShorthands=r=>this.getPropShorthandsMap().get(r)??[]};ae();ae();var FRe=b_(NW(),1);var tm=b_(NW(),1);ae();var Pdr=b_(nzt(),1),RW=b_(UAn(),1);ae();var Mj=b_(require("path"),1),JAn=b_(require("os"),1),pdr=/(^\/\w:\/)|(^\/\w:\\)/,HAn=Mj.default.parse(process.cwd()).root,qAn=/^\w:/,fdr=JAn.default.platform();function ddr(r){return/\\/.test(r)||qAn.test(r)}function KAn(r){let e=/^\\\\\?\\/.test(r),i=/[^\u0000-\u0080]+/.test(r);return e||i?r:r.replace(/\\/g,"/")}function mdr(r){let e=typeof r=="string"?r:r.pathname;return e.startsWith("file:")&&(e.startsWith("file://")&&(e=e.slice(7)),pdr.test(e)&&(e=e.slice(1))),rzt(e)}function XAn(r){return[...r].some(e=>typeof e=="string"&&ddr(e))?Mj.default.win32:Mj.default}function Sfe(r,e){return KAn(XAn(e)[r](...e))}function YAn(r,e){return Mj.default.posix[r](...[...e].map(i=>typeof i=="string"?KAn(i):i))}function _dr(r){return YAn("parse",arguments)}function hdr(r){return YAn("extname",arguments)}function gdr(r){return XAn(arguments).isAbsolute(r)}function Bdr(...r){return Sfe("join",arguments)}function rzt(r){let e=Sfe("normalize",arguments);return r.startsWith("./")&&!e.startsWith("./")?"./"+e:e}function ydr(r,e){return Sfe("relative",arguments)}function Cdr(...r){return Sfe("resolve",arguments)}function vdr(r){return Sfe("dirname",arguments)}function bdr(r,e){return Sfe("basename",arguments)}function Sdr(r){return Sfe("format",arguments)}function xdr(r){return Sfe("toNamespacedPath",arguments)}function Edr(r){return fdr!=="win32"||qAn.test(r)||r.startsWith(HAn)||!Mj.default.win32.isAbsolute(Mj.default.win32.normalize(r))?r:Mj.default.win32.join(HAn,r)}var izt={sep:Mj.default.posix.sep,delimiter:Mj.default.posix.delimiter,parse:_dr,isAbsolute:gdr,join:Bdr,extname:hdr,normalize:rzt,relative:ydr,resolve:Cdr,dirname:vdr,basename:bdr,format:Sdr,toNamespacedPath:xdr,get posix(){return this},get win32(){return QAn}},QAn={...Mj.default.win32,get posix(){return izt},get win32(){return this}},Ddr=Mj.default,D1e={...izt,posix:izt,win32:QAn,native:Ddr,includeDriveLetter:Edr,urlToFilename:mdr};var ukn=require("module"),pkn=require("util"),fkn=b_(rkn(),1),sbt=()=>{let r={Infinity:1/0,NaN:NaN,undefined:void 0,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Array,Boolean,Date,Error,EvalError,Number,Object,RangeError,ReferenceError,RegExp,String,SyntaxError,TypeError,URIError,JSON,Math,escape,unescape,eval,Function};try{r.AggregateError=AggregateError}catch{}try{r.FinalizationRegistry=FinalizationRegistry}catch{}try{r.WeakRef=WeakRef}catch{}try{r.BigInt=BigInt}catch{}try{r.Reflect=Reflect}catch{}try{r.WeakMap=WeakMap}catch{}try{r.WeakSet=WeakSet}catch{}try{r.Set=Set}catch{}try{r.Map=Map}catch{}try{r.Uint8Array=Uint8Array}catch{}try{r.BigUint64Array=BigUint64Array}catch{}try{r.BigInt64Array=BigInt64Array}catch{}try{r.Atomics=Atomics}catch{}try{r.SharedArrayBuffer=SharedArrayBuffer}catch{}try{r.WebAssembly=WebAssembly}catch{}try{r.Uint8ClampedArray=Uint8ClampedArray}catch{}try{r.Uint16Array=Uint16Array}catch{}try{r.Uint32Array=Uint32Array}catch{}try{r.Intl=Intl}catch{}try{r.Int8Array=Int8Array}catch{}try{r.Int16Array=Int16Array}catch{}try{r.Int32Array=Int32Array}catch{}try{r.Float32Array=Float32Array}catch{}try{r.Float64Array=Float64Array}catch{}try{r.ArrayBuffer=ArrayBuffer}catch{}try{r.DataView=DataView}catch{}try{r.isFinite=isFinite}catch{}try{r.Promise=Promise}catch{}try{r.Proxy=Proxy}catch{}try{r.Symbol=Symbol}catch{}return r};function Efe(r,e,i){let a={};return[r,e??{},i??{}].forEach(h=>Object.defineProperties(a,Object.getOwnPropertyDescriptors(h))),a}function $1t(r,e){let i={};return Object.getOwnPropertyNames(r).forEach(a=>{a in e||Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(r,a))}),i}var dkn=(0,ukn.createRequire)(dt),Ndr=()=>{let r=sbt(),e=Efe($1t(global,r),r,{require:dkn,process,__dirname:i=>D1e.native.normalize(D1e.native.dirname(i)),__filename:i=>D1e.native.normalize(i)});return Object.defineProperties(e,{global:{get(){return e}},globalThis:{get(){return e}}}),e};function Rdr(r){let e=0;return{requestAnimationFrame:function(d){let h=new Date().getTime(),b=Math.max(0,16-(h-e)),x=r.setTimeout(function(){d(h+b)},b);return e=h+b,x},cancelAnimationFrame:function(d){clearTimeout(d)}}}var X1t;function Ldr(r=!1){return X1t??(X1t=Mdr("evaluate against a browser environment",r,"jsdom"))}function Mdr(r,e,i=r){try{return dkn(i)}catch{if(e)throw new ReferenceError(`You must install the peer dependency '${i}' in order to ${r} with ts-evaluator`);return}}var Fdr=()=>{let{JSDOM:r}=Ldr(!0),{window:e}=new r("",{url:"https://example.com"}),i=sbt(),a=Rdr(e),u=Efe($1t(e,i),$1t(a,e),i);return Object.defineProperties(u,{window:{get(){return u}},globalThis:{get(){return u}}}),u},Vx="[return]",u8="[break]",G7="[continue]",z7="this",T1e="super",Odr=()=>{let r=sbt(),e=Efe($1t(global,r),r,{import:{meta:{url:i=>{let a=D1e.normalize(i);return`file:///${a.startsWith("/")?a.slice(1):a}`}}},process});return Object.defineProperties(e,{global:{get(){return e}},globalThis:{get(){return e}}}),e};function mkn(r,e){return e.isDeclaration(r)}function Wdr(r,e){return e.isPropertyAccessExpression(r)?!1:"name"in r&&r.name!=null}function _kn(r,e){return r.flags!==e.NodeFlags.Const&&r.flags!==e.NodeFlags.Let}var j7=class extends Error{constructor({node:e,environment:i,message:a}){super(a),Error.captureStackTrace(this,this.constructor),this.node=e,this.environment=i}};function wre(r){return typeof r=="object"&&r!=null&&r instanceof j7}var Z1t=class extends j7{constructor({path:e,node:i,environment:a,message:u=`Module '${e}' could not be resolved'`}){super({message:u,environment:a,node:i}),this.path=e}},mR=class extends j7{constructor({node:e,environment:i,typescript:a,message:u=`Unexpected Node: '${a.SyntaxKind[e.kind]}'`}){super({message:u,node:e,environment:i})}};function Gdr(r){var e;let{node:i,evaluate:a,environment:u,typescript:d,throwError:h}=r,b=d.getNameOfDeclaration(i);if(b!=null)return d.isIdentifier(b)||!((e=d.isPrivateIdentifier)===null||e===void 0)&&e.call(d,b)||d.isStringLiteralLike(b)?b.text:d.isNumericLiteral(b)?Number(b.text):d.isComputedPropertyName(b)?a.expression(b.expression,r):h(new mR({node:b,environment:u,typescript:d}))}function hkn(r,e){let{node:i,typescript:a}=e;if(!a.isExternalModuleNameRelative(r))return r;let u=i.getSourceFile().fileName;return D1e.join(D1e.dirname(u),r)}function ebt(r){var e,i,a,u,d;let{node:h,typescript:b,throwError:x,environment:I}=r,L=Gdr(r);if(wre(L))return L;if(L==null)return x(new mR({node:h,environment:I,typescript:b}));let q=gw(h,r.environment,L);if(q!=null&&q.literal!=null)return q.literal;let te=gw(h,r.environment,"require").literal,me=b.isModuleDeclaration(h)?h:zdr(h,b.SyntaxKind.ModuleDeclaration,b);if(me==null)return x(new mR({node:h,environment:I,typescript:b}));let Ee=me.name.text,ke=hkn(Ee,r);try{let Ue=(u=(i=(e=r.moduleOverrides)===null||e===void 0?void 0:e[Ee])!==null&&i!==void 0?i:(a=r.moduleOverrides)===null||a===void 0?void 0:a[ke])!==null&&u!==void 0?u:te(ke);return b.isModuleDeclaration(h)?Ue:(d=Ue[L])!==null&&d!==void 0?d:Ue}catch(Ue){return wre(Ue)?Ue:x(new Z1t({node:me,environment:I,path:ke}))}}function Y1t(r,e,i){var a,u,d,h,b,x;let{node:I,throwError:L,environment:q}=i,te=gw(I,i.environment,"require").literal,me=hkn(e,i);try{let Ee=(h=(u=(a=i.moduleOverrides)===null||a===void 0?void 0:a[e])!==null&&u!==void 0?u:(d=i.moduleOverrides)===null||d===void 0?void 0:d[me])!==null&&h!==void 0?h:te(me);return(x=(b=Ee[r])!==null&&b!==void 0?b:Ee.default)!==null&&x!==void 0?x:Ee}catch(Ee){return wre(Ee)?Ee:L(new Z1t({node:I,environment:q,path:me}))}}function zdr(r,e,i){let a=r;for(;;){if(a=a.parent,a==null)return;if(a.kind===e){let u=i.getCombinedNodeFlags(a);if(!((u&i.NodeFlags.Namespace)!==0||(u&i.NodeFlags.NestedNamespace)!==0))return a}if(i.isSourceFile(a))return}}function yzt(r,e,i,a=new WeakSet){let{typescript:u}=i,d;function h(x,I=0){var L,q,te,me,Ee;if(a.has(x))return!1;if(a.add(x),u.isIdentifier(x)){if(x.text===e)return d=x,!0}else{if(u.isShorthandPropertyAssignment(x))return!1;if(u.isPropertyAssignment(x))return!1;if(u.isImportDeclaration(x)){if(x.importClause!=null){if(x.importClause.name!=null&&h(x.importClause.name)){let ke=x.moduleSpecifier;if(ke!=null&&u.isStringLiteralLike(ke))return d=Y1t(e,ke.text,i),!0}else if(x.importClause.namedBindings!=null&&h(x.importClause.namedBindings))return!0}return!1}else if(u.isImportEqualsDeclaration(x)){if(x.name!=null&&h(x.name)){if(u.isIdentifier(x.moduleReference))return d=yzt(x.parent,x.moduleReference.text,i,a),d!=null;if(u.isQualifiedName(x.moduleReference))return!1;{let ke=x.moduleReference.expression;if(ke!=null&&u.isStringLiteralLike(ke))return d=Y1t(e,ke.text,i),!0}}return!1}else if(u.isNamespaceImport(x)){if(h(x.name)){let ke=(q=(L=x.parent)===null||L===void 0?void 0:L.parent)===null||q===void 0?void 0:q.moduleSpecifier;return ke==null||!u.isStringLiteralLike(ke)?!1:(d=Y1t(e,ke.text,i),!0)}}else if(u.isNamedImports(x)){for(let ke of x.elements)if(h(ke))return!0}else if(u.isImportSpecifier(x)){if(h(x.name)){let ke=(Ee=(me=(te=x.parent)===null||te===void 0?void 0:te.parent)===null||me===void 0?void 0:me.parent)===null||Ee===void 0?void 0:Ee.moduleSpecifier;return ke==null||!u.isStringLiteralLike(ke)?!1:(d=Y1t(e,ke.text,i),!0)}}else if(u.isSourceFile(x)){for(let ke of x.statements)if(h(ke))return!0}else if(u.isVariableStatement(x)){for(let ke of x.declarationList.declarations)if(h(ke)&&(_kn(x.declarationList,u)||I<1))return!0}else if(u.isBlock(x)){for(let ke of x.statements)if(h(ke,I+1))return!0}else if(Wdr(x,u)&&x.name!=null&&h(x.name))return d=x,!0}return!1}return u.findAncestor(r,x=>h(x))?d:void 0}function ikn(r,e){let i=r;for(;;){if(i=i.parent,i==null)return;if(mkn(i,e)||e.isSourceFile(i))return i}}function jdr(r){return r!=null&&(typeof r=="function"||typeof r=="object")}function okn(r){return jdr(r)}function Czt(r,e){switch(r){case Function.prototype.bind:case Function.prototype.call:case Function.prototype.apply:return!0}if(e!=null){let i=gw(void 0,e,"Function").literal;switch(r){case i.prototype.bind:case i.prototype.call:case i.prototype.apply:return!0}}return!1}var kre=class{constructor(e){this.intent=e}construct(e,i){return this.intent(e,i)}};function gkn(r){return typeof r=="object"&&r!=null&&r instanceof kre}function abt(r,e,i){return gkn(i)?e.throwError(i.construct(r,e)):i}function azt(r){return r.map(e=>typeof e=="symbol"?e.description:e).join(".")}function skn({hook:r,item:e,scope:i,policy:a}){function u(d,h){let b=(x,I)=>{if(x!==!1)return gkn(x)||wre(x)?x:I()};return!okn(h)||Czt(h)?h:new Proxy(h,{construct(x,I,L){return b(r({kind:"__$$_PROXY_CONSTRUCT",policy:a,newTarget:L,argArray:I,target:x,path:azt(d)}),()=>Reflect.construct(x,I,L))},apply(x,I,L=[]){return b(r({kind:"__$$_PROXY_APPLY",policy:a,thisArg:I,argArray:L,target:x,path:azt(d)}),()=>Reflect.apply(x,I,L))},get(x,I,L){let q=[...d,I];return b(r({kind:"__$$_PROXY_GET",policy:a,path:azt(q),target:x}),()=>{let te=Reflect.get(x,I,L),me=Reflect.getOwnPropertyDescriptor(h,I);return me!=null&&me.configurable===!1&&me.writable===!1?h[I]:u(q,te)})}})}return okn(e)?u([i],e):e}function akn(r,e){switch(r){case"__$$_PROXY_GET":return`get ${e}`;case"__$$_PROXY_APPLY":return`${e}(...)`;case"__$$_PROXY_CONSTRUCT":return`new ${e}(...)`}}var Bkn={"node:http2":"http2",http2:{connect:{__$$_PROXY_APPLY:!0},createSecureServer:{__$$_PROXY_APPLY:!0},createServer:{__$$_PROXY_APPLY:!0}},"node:https":"https",https:{createServer:{__$$_PROXY_APPLY:!0},request:{__$$_PROXY_APPLY:!0},get:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},globalAgent:{destroy:{__$$_PROXY_APPLY:!0}},Agent:{__$$_PROXY_CONSTRUCT:!0}},"node:http":"http",http:{createServer:{__$$_PROXY_APPLY:!0},request:{__$$_PROXY_APPLY:!0},get:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},ClientRequest:{__$$_PROXY_CONSTRUCT:!0},globalAgent:{destroy:{__$$_PROXY_APPLY:!0}},Agent:{__$$_PROXY_CONSTRUCT:!0}},"node:dgram":"dgram",dgram:{createSocket:{__$$_PROXY_APPLY:!0}},"node:dns":"dns",dns:{lookup:{__$$_PROXY_APPLY:!0},lookupService:{__$$_PROXY_APPLY:!0},resolve:{__$$_PROXY_APPLY:!0},resolve4:{__$$_PROXY_APPLY:!0},resolve6:{__$$_PROXY_APPLY:!0},resolveAny:{__$$_PROXY_APPLY:!0},resolveCname:{__$$_PROXY_APPLY:!0},resolveMx:{__$$_PROXY_APPLY:!0},resolveNaptr:{__$$_PROXY_APPLY:!0},resolveNs:{__$$_PROXY_APPLY:!0},resolvePtr:{__$$_PROXY_APPLY:!0},resolveSoa:{__$$_PROXY_APPLY:!0},resolveSrv:{__$$_PROXY_APPLY:!0},resolveTxt:{__$$_PROXY_APPLY:!0},reverse:{__$$_PROXY_APPLY:!0},Resolver:{__$$_PROXY_CONSTRUCT:!0}},"node:net":"net",net:{createServer:{__$$_PROXY_APPLY:!0},createConnection:{__$$_PROXY_APPLY:!0},connect:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0}},"node:tls":"tls",tls:{createServer:{__$$_PROXY_APPLY:!0},createSecureContext:{__$$_PROXY_APPLY:!0},connect:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},TLSSocket:{__$$_PROXY_CONSTRUCT:!0}}},Vdr={...Bkn,Math:{random:{__$$_PROXY_APPLY:!0}},Date:{now:{__$$_PROXY_APPLY:!0},__$$_PROXY_CONSTRUCT:(...r)=>r.length===0&&!(r[0]instanceof Date)}};function Udr(r,e){return typeof r==typeof e||typeof r=="function"}function Hdr(r){return typeof r=="function"}function A1e(r,e,i){let a=i.path.split(".");return czt(r,e,i,a)}function czt(r,e,i,a){let[u,...d]=a;if(u==null)return!1;let h=r[u];if(h==null)return!1;if(typeof h=="string")return czt(r,e,i,[h,...d]);if(Udr(h,e))return lkn(h,e,i);{let b=h[i.kind];return b!=null?lkn(b,e,i):czt(h,e,i,d)}}function lkn(r,e,i){if(Hdr(r)){let a=i;return a.argArray!=null&&r(...a.argArray)===e}else return r===e}function Jdr(r){return A1e(Vdr,!0,r)}var Dfe=class extends j7{constructor({violation:e,node:i,environment:a,message:u}){super({node:i,environment:a,message:`[${e}]: ${u}`}),this.violation=e}},uzt=class extends Dfe{constructor({operation:e,node:i,environment:a,message:u=`The operation: '${e}' is nondeterministic. That is in violation of the policy`}){super({violation:"deterministic",message:u,node:i,environment:a}),this.operation=e}},ykn={"node:fs":"fs",fs:{readFile:{__$$_PROXY_APPLY:"read"},readFileSync:{__$$_PROXY_APPLY:"read"},readdir:{__$$_PROXY_APPLY:"read"},readdirSync:{__$$_PROXY_APPLY:"read"},read:{__$$_PROXY_APPLY:"read"},readSync:{__$$_PROXY_APPLY:"read"},exists:{__$$_PROXY_APPLY:"read"},existsSync:{__$$_PROXY_APPLY:"read"},access:{__$$_PROXY_APPLY:"read"},accessSync:{__$$_PROXY_APPLY:"read"},close:{__$$_PROXY_APPLY:"read"},closeSync:{__$$_PROXY_APPLY:"read"},createReadStream:{__$$_PROXY_APPLY:"read"},stat:{__$$_PROXY_APPLY:"read"},statSync:{__$$_PROXY_APPLY:"read"},watch:{__$$_PROXY_APPLY:"read"},watchFile:{__$$_PROXY_APPLY:"read"},unwatchFile:{__$$_PROXY_APPLY:"read"},realpath:{__$$_PROXY_APPLY:"read"},realpathSync:{__$$_PROXY_APPLY:"read"},fstat:{__$$_PROXY_APPLY:"read"},fstatSync:{__$$_PROXY_APPLY:"read"},createWriteStream:{__$$_PROXY_APPLY:"write"},copyFile:{__$$_PROXY_APPLY:"write"},copyFileSync:{__$$_PROXY_APPLY:"write"},unlink:{__$$_PROXY_APPLY:"write"},unlinkSync:{__$$_PROXY_APPLY:"write"},rmdir:{__$$_PROXY_APPLY:"write"},rmdirSync:{__$$_PROXY_APPLY:"write"},symlink:{__$$_PROXY_APPLY:"write"},symlinkSync:{__$$_PROXY_APPLY:"write"},truncate:{__$$_PROXY_APPLY:"write"},truncateSync:{__$$_PROXY_APPLY:"write"},utimes:{__$$_PROXY_APPLY:"write"},utimesSync:{__$$_PROXY_APPLY:"write"},appendFile:{__$$_PROXY_APPLY:"write"},appendFileSync:{__$$_PROXY_APPLY:"write"},write:{__$$_PROXY_APPLY:"write"},writeSync:{__$$_PROXY_APPLY:"write"},writeFile:{__$$_PROXY_APPLY:"write"},writeFileSync:{__$$_PROXY_APPLY:"write"},chmod:{__$$_PROXY_APPLY:"write"},chmodSync:{__$$_PROXY_APPLY:"write"},chown:{__$$_PROXY_APPLY:"write"},chownSync:{__$$_PROXY_APPLY:"write"},mkdir:{__$$_PROXY_APPLY:"write"},mkdirSync:{__$$_PROXY_APPLY:"write"},rename:{__$$_PROXY_APPLY:"write"},renameSync:{__$$_PROXY_APPLY:"write"},futimes:{__$$_PROXY_APPLY:"write"},futimesSync:{__$$_PROXY_APPLY:"write"},link:{__$$_PROXY_APPLY:"write"},linkSync:{__$$_PROXY_APPLY:"write"},mkdtemp:{__$$_PROXY_APPLY:"write"},open:{__$$_PROXY_APPLY:"write"},openSync:{__$$_PROXY_APPLY:"write"},fchmod:{__$$_PROXY_APPLY:"write"},fchmodSync:{__$$_PROXY_APPLY:"write"},fchown:{__$$_PROXY_APPLY:"write"},fchownSync:{__$$_PROXY_APPLY:"write"},ftruncate:{__$$_PROXY_APPLY:"write"},ftruncateSync:{__$$_PROXY_APPLY:"write"},fsync:{__$$_PROXY_APPLY:"write"},fsyncSync:{__$$_PROXY_APPLY:"write"},fdatasync:{__$$_PROXY_APPLY:"write"},fdatasyncSync:{__$$_PROXY_APPLY:"write"},lchmod:{__$$_PROXY_APPLY:"write"},lchmodSync:{__$$_PROXY_APPLY:"write"}}};function qdr(r){return A1e(ykn,"read",r)}var tbt=class extends Dfe{constructor({node:e,environment:i,kind:a,message:u=`${a} operations are in violation of the policy`}){super({violation:"io",message:u,environment:i,node:e}),this.kind=a}};function Kdr(r){return A1e(ykn,"write",r)}function Xdr(r){return A1e(Bkn,!0,r)}var pzt=class extends Dfe{constructor({operation:e,node:i,environment:a,message:u=`The operation: '${e}' is performing network activity. That is in violation of the policy`}){super({violation:"deterministic",message:u,node:i,environment:a}),this.operation=e}},Ckn={"node:process":"process",process:{exit:{__$$_PROXY_APPLY:"exit"}},"node:child_process":"child_process",child_process:{__$$_PROXY_APPLY:"spawnChild"},"node:cluster":"cluster",cluster:{Worker:{__$$_PROXY_CONSTRUCT:"spawnChild"}}};function Ydr(r){return A1e(Ckn,"exit",r)}var nbt=class extends Dfe{constructor({kind:e,node:i,environment:a,message:u=`${e} operations are in violation of the policy`}){super({violation:"process",message:u,node:i,environment:a}),this.kind=e}};function Qdr(r){return A1e(Ckn,"spawnChild",r)}var $dr={"node:console":"console",console:{__$$_PROXY_APPLY:!0}};function Zdr(r){return A1e($dr,!0,r)}function emr({policy:r,env:e}){let i=h=>!r.console&&Zdr(h)?!1:!r.io.read&&qdr(h)?new kre((b,x)=>new tbt({...x,node:b,kind:"read"})):!r.io.write&&Kdr(h)?new kre((b,x)=>new tbt({...x,node:b,kind:"write"})):!r.process.exit&&Ydr(h)?new kre((b,x)=>new nbt({...x,node:b,kind:"exit"})):!r.process.exit&&Qdr(h)?new kre((b,x)=>new nbt({...x,node:b,kind:"spawnChild"})):!r.network&&Xdr(h)?new kre((b,x)=>new pzt({...x,node:b,operation:akn(h.kind,h.path)})):r.deterministic&&Jdr(h)?new kre((b,x)=>new uzt({...x,node:b,operation:akn(h.kind,h.path)})):!0,a=Object.entries(Object.getOwnPropertyDescriptors(e)),u=Object.assign({},...a.filter(([,h])=>!("value"in h)).map(([h,b])=>({[h]:b}))),d=Object.assign({},...a.filter(([,h])=>"value"in h).map(([h,b])=>({[h]:h==="require"?new Proxy(b.value,{apply(x,I,L=[]){let[q]=L;return skn({policy:r,item:Reflect.apply(x,I,L),scope:q,hook:i})}}):skn({policy:r,item:b.value,scope:h,hook:i})})));return Object.defineProperties(d,{...u})}function MYe(r,e){let[i]=e.split(".");if(RW.default.has(r.env,i))return r.env;if(r.parentEnv!=null)return MYe(r.parentEnv,e)}function fzt(r){return r.preset!=null?r.preset:r.parentEnv!=null?fzt(r.parentEnv):"NONE"}function vkn(r,e,i){let a=ikn(r.startingNode,i),u=ikn(e,i);if(a?.pos===u?.pos)return r;if(r.parentEnv!=null)return vkn(r.parentEnv,e,i)}function gw(r,e,i){let[a]=i.split(".");if(RW.default.has(e.env,a)){let u=RW.default.get(e.env,i);switch(i){case"__dirname":case"__filename":{let d=fzt(e);return(d==="NODE"||d==="NODE_CJS")&&typeof u=="function"&&r!=null?{literal:u(r.getSourceFile().fileName)}:{literal:u}}case"import.meta":{let d=fzt(e);return(d==="NODE_ESM"||d==="BROWSER"||d==="ECMA")&&typeof u=="object"&&u!=null&&typeof u.url=="function"&&r!=null?{literal:{url:u.url(r.getSourceFile().fileName)}}:{literal:u}}default:return{literal:u}}}if(e.parentEnv!=null)return gw(r,e.parentEnv,i)}function ST(r,e,i,...a){return a.some(u=>{let d=gw(r,e,u);return d==null?!1:d.literal===i})}function lzt(r){switch(r){case Vx:case u8:case G7:case z7:case T1e:return!0;default:return!1}}function wg({environment:r,path:e,value:i,reporting:a,node:u,newBinding:d=!1}){let[h]=e.split(".");if(RW.default.has(r.env,h)||d||r.parentEnv==null){if(RW.default.has(r.env,e)&&RW.default.get(r.env,e)===i)return;RW.default.set(r.env,e,i),a.reportBindings!=null&&!lzt(e)&&a.reportBindings({path:e,value:i,node:u})}else{let b=r.parentEnv;for(;b!=null;)if(RW.default.has(b.env,h)){if(RW.default.has(b.env,e)&&RW.default.get(b.env,e)===i)return;RW.default.set(b.env,e,i),a.reportBindings!=null&&!lzt(e)&&a.reportBindings({path:e,value:i,node:u});return}else b.parentEnv==null?(RW.default.set(b.env,e,i),a.reportBindings!=null&&!lzt(e)&&a.reportBindings({path:e,value:i,node:u})):b=b.parentEnv}}function tmr({inputEnvironment:{extra:r,preset:e},startingNode:i,policy:a}){let u;switch(e){case"NONE":u=Efe(r);break;case"ECMA":u=Efe(sbt(),r);break;case"NODE":case"NODE_CJS":u=Efe(Ndr(),r);break;case"NODE_ESM":u=Efe(Odr(),r);break;case"BROWSER":u=Efe(Fdr(),r);break;default:u={};break}return{parentEnv:void 0,preset:e,startingNode:i,env:emr({policy:a,env:u})}}function bkn(r,e){return r.kind===e.SyntaxKind.TrueKeyword||r.kind===e.SyntaxKind.FalseKeyword}function Skn(r,e){return r.kind===e.SyntaxKind.NullKeyword}function nmr(r,e){var i;return e.isStringLiteralLike(r)?{success:!0,value:r.text}:bkn(r,e)?{success:!0,value:r.kind===e.SyntaxKind.TrueKeyword}:e.isRegularExpressionLiteral(r)?{success:!0,value:new Function(`return ${r.text}`)()}:e.isNumericLiteral(r)?{success:!0,value:Number(r.text)}:!((i=e.isBigIntLiteral)===null||i===void 0)&&i.call(e,r)?{success:!0,value:BigInt(r.text)}:e.isIdentifier(r)&&r.text==="Infinity"?{success:!0,value:1/0}:e.isIdentifier(r)&&r.text==="NaN"?{success:!0,value:NaN}:e.isIdentifier(r)&&r.text==="null"?{success:!0,value:null}:e.isIdentifier(r)&&r.text==="undefined"?{success:!0,value:void 0}:Skn(r,e)?{success:!0,value:null}:{success:!1}}var dzt=class extends Dfe{constructor({ops:e,node:i,environment:a,message:u=`Maximum ops exceeded: ${e}`}){super({violation:"maxOps",message:u,node:i,environment:a}),this.ops=e}};function xkn(r,e){let{node:i,environment:a,evaluate:u,stack:d,typescript:h,throwError:b,getCurrentError:x}=r,I=e??(i.initializer==null?void 0:u.expression(i.initializer,r));if(x()==null){if(I==null&&!h.isIdentifier(i.name))return b(new j7({node:i,environment:a}));u.nodeWithArgument(i.name,I,r),x()==null&&d.push(I)}}function Ekn(r,e){return r.kind===e.SyntaxKind.ThisKeyword}function lbt(r,e){return r.kind===e.SyntaxKind.SuperKeyword}function MRe(r){var e,i;let{node:a,evaluate:u,typescript:d}=r;if(d.isIdentifier(a))return a.text;if(!((e=d.isPrivateIdentifier)===null||e===void 0)&&e.call(d,a))return a.text;if(Ekn(a,d))return z7;if(lbt(a,d))return T1e;if(d.isParenthesizedExpression(a))return MRe({...r,node:a.expression});if(!((i=d.isTypeAssertionExpression)===null||i===void 0)&&i.call(d,a)||!("isTypeAssertionExpression"in d)&&d.isTypeAssertion(a))return MRe({...r,node:a.expression});if(d.isPropertyAccessExpression(a)){let h=MRe({...r,node:a.expression});h==null&&(h=u.expression(a.expression,r));let b=MRe({...r,node:a.name});return b==null&&(b=u.expression(a.name,r)),h==null||b==null?void 0:`${h}.${b}`}else if(d.isElementAccessExpression(a)){let h=MRe({...r,node:a.expression});h==null&&(h=u.expression(a.expression,r));let b=u.expression(a.argumentExpression,r);return h==null||b==null?void 0:`${h}.${b}`}else if(d.isFunctionDeclaration(a))return a.name==null?void 0:a.name.text}var mzt=class extends j7{constructor({node:e,environment:i,message:a="'No leftValue could be determined'"}){super({message:a,environment:i,node:e})}};function Q1t(r,e){var i;return e.isParenthesizedExpression(r)||e.isAsExpression(r)||!((i=e.isTypeAssertionExpression)===null||i===void 0)&&i.call(e,r)||!("isTypeAssertionExpression"in e)&&e.isTypeAssertion(r)?Q1t(r.expression,e):r}function Dkn(r){return r!=null&&typeof r=="object"&&"kind"in r&&"flags"in r&&"pos"in r&&"end"in r}function rmr(r){var e;let{node:i,environment:a,evaluate:u,logger:d,throwError:h,typeChecker:b,typescript:x,getCurrentError:I}=r,L=u.expression(i.left,r);if(I()!=null)return;let q=u.expression(i.right,r);if(I()!=null)return;let te=MRe({...r,node:i.left}),me=i.operatorToken.kind;switch(me){case x.SyntaxKind.AmpersandToken:return L&q;case x.SyntaxKind.AmpersandAmpersandToken:return L&&q;case x.SyntaxKind.AmpersandEqualsToken:case x.SyntaxKind.CaretEqualsToken:case x.SyntaxKind.BarEqualsToken:case x.SyntaxKind.MinusEqualsToken:case x.SyntaxKind.PlusEqualsToken:case x.SyntaxKind.PercentEqualsToken:case x.SyntaxKind.SlashEqualsToken:case x.SyntaxKind.AsteriskEqualsToken:case x.SyntaxKind.AsteriskAsteriskEqualsToken:case x.SyntaxKind.LessThanLessThanEqualsToken:case x.SyntaxKind.GreaterThanGreaterThanEqualsToken:case x.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:case x.SyntaxKind.QuestionQuestionEqualsToken:case x.SyntaxKind.BarBarEqualsToken:case x.SyntaxKind.AmpersandAmpersandEqualsToken:{let Ee=L;switch(me){case x.SyntaxKind.AmpersandEqualsToken:Ee&=q;break;case x.SyntaxKind.CaretEqualsToken:Ee^=q;break;case x.SyntaxKind.BarEqualsToken:Ee|=q;break;case x.SyntaxKind.AsteriskEqualsToken:Ee*=q;break;case x.SyntaxKind.AsteriskAsteriskEqualsToken:Ee**=q;break;case x.SyntaxKind.LessThanLessThanEqualsToken:Ee<<=q;break;case x.SyntaxKind.GreaterThanGreaterThanEqualsToken:Ee>>=q;break;case x.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:Ee>>>=q;break;case x.SyntaxKind.MinusEqualsToken:Ee-=q;break;case x.SyntaxKind.PlusEqualsToken:Ee+=q;break;case x.SyntaxKind.PercentEqualsToken:Ee%=q;break;case x.SyntaxKind.SlashEqualsToken:Ee/=q;break;case x.SyntaxKind.QuestionQuestionEqualsToken:Ee=L??q;break;case x.SyntaxKind.BarBarEqualsToken:L||(Ee=q);break;case x.SyntaxKind.AmpersandAmpersandEqualsToken:L&&(Ee=q);break}return te!=null&&wg({...r,path:te,value:Ee}),Ee}case x.SyntaxKind.AsteriskToken:return L*q;case x.SyntaxKind.AsteriskAsteriskToken:return L**q;case x.SyntaxKind.BarToken:return L|q;case x.SyntaxKind.BarBarToken:return L||q;case x.SyntaxKind.CaretToken:return L^q;case x.SyntaxKind.CommaToken:return q;case x.SyntaxKind.MinusToken:return L-q;case x.SyntaxKind.PlusToken:return d.logResult(L+q,"BinaryExpression (PlusToken)"),L+q;case x.SyntaxKind.PercentToken:return L%q;case x.SyntaxKind.SlashToken:return L/q;case x.SyntaxKind.EqualsToken:{if(te!=null){let Ee=Q1t(i.left,x),ke=b?.getSymbolAtLocation(Ee),Ue=ke?.valueDeclaration;if(Ue==null&&b==null&&x.isIdentifier(Ee)){let We=yzt(Ee.parent,Ee.text,r);Dkn(We)&&(Ue=We)}let Fe=Ue==null?a:(e=vkn(a,Ue,x))!==null&&e!==void 0?e:a;wg({...r,environment:Fe,path:te,value:q}),d.logBinding(te,q,"Assignment")}else return h(new mzt({node:i.left,environment:a}));return q}case x.SyntaxKind.EqualsEqualsToken:return L==q;case x.SyntaxKind.EqualsEqualsEqualsToken:return L===q;case x.SyntaxKind.ExclamationEqualsToken:return L!=q;case x.SyntaxKind.ExclamationEqualsEqualsToken:return L!==q;case x.SyntaxKind.GreaterThanToken:return L>q;case x.SyntaxKind.GreaterThanEqualsToken:return L>=q;case x.SyntaxKind.LessThanToken:return L<q;case x.SyntaxKind.LessThanEqualsToken:return L<=q;case x.SyntaxKind.InKeyword:return L in q;case x.SyntaxKind.QuestionQuestionToken:return L??q;case x.SyntaxKind.InstanceOfKeyword:return L instanceof q}return h(new mR({node:i.operatorToken,typescript:x,environment:a}))}var vzt="___lazyCallFlag";function imr(r){return r!=null&&typeof r=="object"&&vzt in r}function bzt(r){return r===void 0?"undefined":r===null?"null":typeof r=="string"?`"${r}"`:r.toString()}var rbt=class extends j7{constructor({value:e,node:i,environment:a,message:u=`${bzt(e)} is not a function'`}){super({message:u,environment:a,node:i}),this.value=e}};function xfe(r,e){var i;return lbt(r,e)?!0:e.isPropertyAccessExpression(r)?xfe(r.expression,e)||xfe(r.name,e):e.isElementAccessExpression(r)?xfe(r.expression,e)||xfe(r.argumentExpression,e):e.isParenthesizedExpression(r)||e.isAsExpression(r)||!((i=e.isTypeAssertionExpression)===null||i===void 0)&&i.call(e,r)||!("isTypeAssertionExpression"in e)&&e.isTypeAssertion(r)?xfe(r.expression,e):!1}function omr(r){let{node:e,environment:i,evaluate:a,throwError:u,typescript:d,logger:h,getCurrentError:b}=r,x=[];for(let L=0;L<e.arguments.length;L++)if(x[L]=a.expression(e.arguments[L],r),b()!=null)return;let I=a.expression(e.expression,r);if(b()==null)if(imr(I)){let L=xfe(e.expression,d)?gw(e,i,z7):void 0,q=I.invoke(L?.literal,...x);return b()!=null?void 0:(h.logResult(q,"CallExpression"),q)}else{if(e.questionDotToken==null&&typeof I!="function")return u(new rbt({value:I,node:e.expression,environment:i}));let L=typeof I!="function"?void 0:abt(e,r,I(...x));return b()!=null?void 0:(h.logResult(L,"CallExpression"),L)}}function smr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function i6(r,e){return{parentEnv:r,startingNode:e,env:{}}}function NQ(r,e){let i=Array.isArray(r)?r:r.modifiers;return i!=null&&i.some(a=>a.kind===e)}function RQ(r,e,i){let{node:a,evaluate:u,environment:d,typescript:h,getCurrentError:b}=r,x=a.filter(I=>!(h.isIdentifier(I.name)&&I.name.text==="this"));for(let I=0;I<x.length;I++){let L=x[I];if(L.dotDotDotToken!=null){if(u.nodeWithArgument(L,e.slice(I),r),b()!=null)return;break}else{if(u.nodeWithArgument(L,e[I],r),b()!=null)return;if(i!=null&&h.isIdentifier(L.name)&&(NQ(L,h.SyntaxKind.PublicKeyword)||NQ(L,h.SyntaxKind.ProtectedKeyword)||NQ(L,h.SyntaxKind.PrivateKeyword))){let q=gw(L,d,L.name.text);q!=null&&(i[L.name.text]=q.literal)}}}}function amr(r){let{node:e,environment:i,evaluate:a,stack:u,typescript:d,getCurrentError:h}=r,b=NQ(e,d.SyntaxKind.AsyncKeyword)?async(...x)=>{let I=i6(i,e),L={...r,environment:I};if(wg({...L,path:Vx,value:!1,newBinding:!0}),wg({...L,path:"arguments",value:arguments,newBinding:!0}),RQ({...r,node:e.parameters,environment:I},x),h()==null)return d.isBlock(e.body)?(a.statement(e.body,L),h()!=null?void 0:ST(e,I,!0,Vx)?u.pop():void 0):a.expression(e.body,L)}:(...x)=>{let I=i6(i,e),L={...r,environment:I};if(wg({...L,path:Vx,value:!1,newBinding:!0}),wg({...L,path:"arguments",value:arguments,newBinding:!0}),RQ({...r,node:e.parameters,environment:I},x),h()==null)return d.isBlock(e.body)?(a.statement(e.body,L),h()!=null?void 0:ST(e,I,!0,Vx)?u.pop():void 0):a.expression(e.body,L)};return b.toString=()=>"[Function: anonymous]",Object.setPrototypeOf(b,gw(e,i,"Function").literal),b}function lmr({node:r}){return r.text}function cmr({node:r}){return Number(r.text)}function umr({node:r,typescript:e}){return r.kind===e.SyntaxKind.TrueKeyword}function pmr({node:r,environment:e}){let i=gw(r,e,"Function").literal;return new i(`return ${r.text}`)()}function fmr(r){let{node:e,evaluate:i,environment:a,getCurrentError:u}=r,d=gw(e,a,"Object").literal,h=d.create(d.prototype);wg({...r,path:z7,value:h,newBinding:!0});for(let b of e.properties)if(i.nodeWithArgument(b,h,r),u()!=null)return;return h}function dmr(r){return r!=null&&r[Symbol.iterator]!=null}function mmr(r){let{node:e,environment:i,evaluate:a,typescript:u,getCurrentError:d}=r,b=gw(e,i,"Array").literal.of();for(let x of e.elements){let I=a.expression(x,r);if(d()!=null)return;u.isSpreadElement(x)&&dmr(I)?b.push(...I):b.push(I)}return b}var ibt=class extends j7{constructor({node:e,environment:i,message:a=`'${e.text}' is not defined'`}){super({message:a,environment:i,node:e})}};function ckn(r){let{node:e,environment:i,typeChecker:a,evaluate:u,stack:d,logger:h,reporting:b,typescript:x,throwError:I,getCurrentError:L}=r,q=gw(e,i,e.text);if(q!=null)return h.logBinding(e.text,q.literal,"Lexical Environment match"),q.literal;let te=x.isShorthandPropertyAssignment(e.parent)?a?.getShorthandAssignmentValueSymbol(e.parent):a?.getSymbolAtLocation(e),me=te?.valueDeclaration;if(te!=null&&me==null)try{let Ee=a?.getAliasedSymbol(te);me=Ee?.valueDeclaration}catch{}if(me==null){let Ee=yzt(e.parent,e.text,r);if(L()!=null)return;if(Dkn(Ee)&&!x.isIdentifier(Ee))me=Ee;else if(Ee!=null)return wg({...r,path:e.text,value:Ee}),h.logBinding(e.text,Ee,"Discovered declaration value"),Ee}if(me!=null){if(me.getSourceFile().isDeclarationFile){let ke=ebt({...r,node:me});return L()!=null?void 0:(wg({environment:i,path:e.text,value:ke,reporting:b,node:me}),h.logBinding(e.text,ke,`Discovered declaration value${me.getSourceFile()===e.getSourceFile()?"":` (imported into '${e.getSourceFile().fileName}' from '${me.getSourceFile().fileName}')`}`),ke)}if(x.isVariableDeclaration(me)&&me.getSourceFile().fileName===e.getSourceFile().fileName&&me.pos>e.pos)if(x.isVariableDeclarationList(me.parent)&&_kn(me.parent,x)){wg({...r,path:e.text,value:void 0,newBinding:!0,node:me}),h.logBinding(e.text,void 0,"Hoisted var declaration");return}else return I(new ibt({node:e,environment:i}));if(u.declaration(me,r),L()!=null)return;let Ee=d.pop();return wg({...r,path:e.text,value:Ee,node:me}),h.logBinding(e.text,Ee,`Discovered declaration value${me.getSourceFile()===e.getSourceFile()?"":` (imported into '${e.getSourceFile().fileName}' from '${me.getSourceFile().fileName}')`}`),Ee}return I(new ibt({node:e,environment:i}))}function _mr(r){let{node:e,environment:i,typescript:a,evaluate:u,getCurrentError:d}=r,h=i6(i,e);for(let b=0;b<e.statements.length;b++){let x=e.statements[b];if(!(a.isConstructorDeclaration(e.parent)&&b===0&&a.isExpressionStatement(x)&&a.isCallExpression(x.expression)&&lbt(x.expression.expression,a))&&(u.statement(x,{...r,environment:h}),d()!=null||ST(e,h,!0,u8,G7,Vx)))break}}function hmr({node:r,evaluate:e,stack:i,...a}){let{getCurrentError:u}=a;if(wg({...a,environment:a.environment,path:Vx,value:!0,node:r}),r.expression==null)i.push(void 0);else{let d=e.expression(r.expression,a);if(u()!=null)return;i.push(d)}}function Tkn({node:r,evaluate:e,...i}){for(let a of r.declarations)if(e.declaration(a,i),i.getCurrentError()!=null)return}function gmr({node:r,...e}){Tkn({node:r.declarationList,...e})}function Bmr(r){var e,i;let{node:a,environment:u,evaluate:d,reporting:h,typescript:b,throwError:x,getCurrentError:I}=r,L=d.expression(a.operand,r);if(I()==null)switch(a.operator){case b.SyntaxKind.PlusToken:return+L;case b.SyntaxKind.MinusToken:return-L;case b.SyntaxKind.TildeToken:return~L;case b.SyntaxKind.ExclamationToken:return!L;case b.SyntaxKind.PlusPlusToken:{if(!b.isIdentifier(a.operand)&&!(!((e=b.isPrivateIdentifier)===null||e===void 0)&&e.call(b,a.operand)))return x(new mR({node:a.operand,environment:u,typescript:b}));let q=MYe(u,a.operand.text),te=++q[a.operand.text];return h.reportBindings!=null&&h.reportBindings({path:a.operand.text,value:te,node:a}),te}case b.SyntaxKind.MinusMinusToken:{if(!b.isIdentifier(a.operand)&&!(!((i=b.isPrivateIdentifier)===null||i===void 0)&&i.call(b,a.operand)))return x(new mR({node:a.operand,environment:u,typescript:b}));let q=MYe(u,a.operand.text),te=--q[a.operand.text];return h.reportBindings!=null&&h.reportBindings({path:a.operand.text,value:te,node:a}),te}}}function ymr(r){let{evaluate:e,node:i,statementTraversalStack:a,environment:u,typescript:d,getCurrentError:h}=r,b=e.expression(i.expression,r);if(b==null||h()!=null)return;let x=i.questionDotToken!=null&&b==null?void 0:b[i.name.text];return typeof x=="function"&&a.includes(d.SyntaxKind.CallExpression)?{[vzt]:0,invoke:(I,...L)=>abt(i,r,I!=null&&!Czt(x,u)?b[i.name.text].call(I,...L):b[i.name.text](...L))}:x}function Cmr(r){let{node:e,environment:i,evaluate:a,statementTraversalStack:u,typescript:d,getCurrentError:h}=r,b=a.expression(e.expression,r);if(h()!=null)return;let x=a.expression(e.argumentExpression,r);if(h()!=null)return;let I=e.questionDotToken!=null&&b==null?void 0:b[x];return typeof I=="function"&&u.includes(d.SyntaxKind.CallExpression)?{[vzt]:0,invoke:(L,...q)=>abt(e,r,L!=null&&!Czt(I,i)?b[x].call(L,...q):b[x](...q))}:I}function vmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function bmr(r){let{node:e,environment:i,evaluate:a,stack:u,typescript:d,getCurrentError:h}=r,b=e.name==null?void 0:e.name.text,x=NQ(e,d.SyntaxKind.AsyncKeyword)?async function(...L){let q=i6(i,e),te={...r,environment:q};if(wg({...te,path:Vx,value:!1,newBinding:!0}),wg({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&wg({...te,path:z7,value:this,newBinding:!0}),RQ({...r,node:e.parameters,environment:q},L),h()!=null)return;let me=e.getSourceFile();if(b!=null&&me.isDeclarationFile)return ebt(r)(...L);if(e.body!=null&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()}:function(...L){let q=i6(i,e),te={...r,environment:q};if(wg({...te,path:Vx,value:!1,newBinding:!0}),wg({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&wg({...te,path:z7,value:this,newBinding:!0}),RQ({...te,node:e.parameters},L),h()!=null)return;let me=e.getSourceFile();if(b!=null&&me.isDeclarationFile)return ebt(r)(...L);if(e.body!=null&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()};b!=null&&wg({...r,path:b,value:x.bind(x)}),x.toString=()=>`[Function${b==null?"":`: ${b}`}]`,Object.setPrototypeOf(x,gw(e,i,"Function").literal),u.push(x)}function Smr({node:r,evaluate:e,...i}){let{getCurrentError:a}=i,u=e.expression(r.expression,i);if(a()==null){if(u){if(e.statement(r.thenStatement,i),a()!=null)return}else if(r.elseStatement!=null)return e.statement(r.elseStatement,i)}}function xmr({node:r,evaluate:e,stack:i,...a}){let u=e.expression(r.expression,a);a.getCurrentError()==null&&i.push(u)}function Emr({node:r,evaluate:e,...i}){let a="";a+=r.head.text;for(let u of r.templateSpans){let d=e.expression(u.expression,i);if(i.getCurrentError()!=null)return;a+=d,a+=u.literal.text}return a}function Dmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Tmr(r){var e,i;let{evaluate:a,node:u,environment:d,typescript:h,throwError:b,reporting:x}=r;switch(a.expression(u.operand,r),u.operator){case h.SyntaxKind.PlusPlusToken:{if(!h.isIdentifier(u.operand)&&!(!((e=h.isPrivateIdentifier)===null||e===void 0)&&e.call(h,u.operand)))return b(new mR({node:u.operand,environment:d,typescript:h}));let I=MYe(d,u.operand.text)[u.operand.text]++;return x.reportBindings!=null&&x.reportBindings({path:u.operand.text,value:I,node:u}),I}case h.SyntaxKind.MinusMinusToken:{if(!h.isIdentifier(u.operand)&&!(!((i=h.isPrivateIdentifier)===null||i===void 0)&&i.call(h,u.operand)))return b(new mR({node:u.operand,environment:d,typescript:h}));let I=MYe(d,u.operand.text)[u.operand.text]--;return x.reportBindings!=null&&x.reportBindings({path:u.operand.text,value:I,node:u}),I}}}function Amr({node:r,evaluate:e,...i}){let{getCurrentError:a}=i,u=[];if(r.arguments!=null){for(let h=0;h<r.arguments.length;h++)if(u[h]=e.expression(r.arguments[h],i),a()!=null)return}let d=e.expression(r.expression,i);if(a()==null)return typeof d=="function"&&wg({...i,node:r,path:"[[NewTarget]]",value:d,newBinding:!0}),abt(r,i,new d(...u))}function kmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function wmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Imr({node:r,evaluate:e,...i}){let a=e.expression(r.expression,i);i.getCurrentError()==null&&e.nodeWithArgument(r.caseBlock,a,i)}var _zt=class extends j7{constructor({message:e="It is not possible to evaluate an async iterator'",typescript:i,environment:a}){var u,d;super({message:e,environment:a,node:(d=(u=i.factory)===null||u===void 0?void 0:u.createEmptyStatement())!==null&&d!==void 0?d:i.createEmptyStatement()})}};function Pmr(r){let{node:e,environment:i,evaluate:a,logger:u,typescript:d,throwError:h,getCurrentError:b}=r,x=a.expression(e.expression,r);if(b()==null){if(d.isVariableDeclarationList(e.initializer)){if(e.initializer.declarations.length>1)return h(new mR({node:e.initializer.declarations[1],environment:i,typescript:d}))}else return h(new mR({node:e.initializer,environment:i,typescript:d}));if(e.awaitModifier!=null)return h(new _zt({typescript:d,environment:i}));for(let I of x){let L=i6(i,e),q={...r,environment:L};if(wg({...q,path:u8,value:!1,newBinding:!0}),wg({...q,path:G7,value:!1,newBinding:!0}),a.nodeWithArgument(e.initializer.declarations[0],I,q),b()!=null||(a.statement(e.statement,q),b()!=null))return;if(ST(e,L,!0,u8)){u.logBreak(e,d);break}else if(ST(e,L,!0,G7)){u.logContinue(e,d);continue}else if(ST(e,L,!0,Vx)){u.logReturn(e,d);return}}}}function Nmr({node:r,environment:e}){let i=gw(r,e,z7);return i?.literal}function Rmr(r){wg({...r,path:u8,value:!0})}function Lmr(r){wg({...r,path:G7,value:!0})}function Mmr({environment:r,evaluate:e,typescript:i,...a}){let{node:u,getCurrentError:d}=a,h=i6(r,u),b={...a,environment:h};if(u.initializer!==void 0){if(i.isVariableDeclarationList(u.initializer)){for(let x of u.initializer.declarations)if(e.declaration(x,b),d()!=null)return}else if(e.expression(u.initializer,b),d()!=null)return}for(;;){let x=i6(h,u),I={...a,environment:x};if(wg({...I,path:u8,value:!1,newBinding:!0}),wg({...I,path:G7,value:!1,newBinding:!0}),!(u.condition==null?!0:e.expression(u.condition,b))||d()!=null||(e.statement(u.statement,I),d()!=null))return;if(ST(u,x,!0,u8))break;if(ST(u,x,!0,Vx))return;if(u.incrementor!=null){if(e.expression(u.incrementor,b),d()!=null)return}else if(ST(u,x,!0,G7))continue}}function Fmr(r){let{node:e,environment:i,evaluate:a,logger:u,typescript:d,getCurrentError:h}=r,b=a.expression(e.expression,r);if(h()==null)for(;b;){let x=i6(i,e),I={...r,environment:x};if(wg({...I,path:u8,value:!1,newBinding:!0}),wg({...I,path:G7,value:!1,newBinding:!0}),a.statement(e.statement,I),h()!=null)return;if(ST(e,x,!0,u8)){u.logBreak(e,d);break}else if(ST(e,x,!0,Vx)){u.logReturn(e,d);return}if(b=a.expression(e.expression,r),h()!=null)return;if(ST(e,x,!0,G7)){u.logContinue(e,d);continue}}}function Omr(r){let{node:e,environment:i,evaluate:a,logger:u,typescript:d,throwError:h,getCurrentError:b}=r,x=a.expression(e.expression,r);if(b()==null){if(d.isVariableDeclarationList(e.initializer)){if(e.initializer.declarations.length>1)return h(new mR({node:e.initializer.declarations[1],environment:i,typescript:d}))}else return h(new mR({node:e.initializer,environment:i,typescript:d}));for(let I in x){let L=i6(i,e),q={...r,environment:L};if(wg({...q,path:u8,value:!1,newBinding:!0}),wg({...q,path:G7,value:!1,newBinding:!0}),a.nodeWithArgument(e.initializer.declarations[0],I,q),b()!=null||(a.statement(e.statement,q),b()!=null))return;if(ST(e,L,!0,u8)){u.logBreak(e,d);break}else if(ST(e,L,!0,G7)){u.logContinue(e,d);continue}else if(ST(e,L,!0,Vx)){u.logReturn(e,d);return}}}}function Wmr(r){let{node:e,environment:i,evaluate:a,stack:u,typescript:d,getCurrentError:h}=r,b=e.name==null?void 0:e.name.text,x=NQ(e,d.SyntaxKind.AsyncKeyword)?async function(...L){let q=i6(i,e),te={...r,environment:q};if(wg({...te,path:Vx,value:!1,newBinding:!0}),wg({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&wg({...te,path:z7,value:this,newBinding:!0}),RQ({...te,node:e.parameters},L),!(e.body==null||h()!=null)&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()}:function(...L){let q=i6(i,e),te={...r,environment:q};if(wg({...te,path:Vx,value:!1,newBinding:!0}),wg({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&wg({...te,path:z7,value:this,newBinding:!0}),RQ({...te,node:e.parameters},L),!(e.body==null||h()!=null)&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()};return b!=null&&wg({...r,path:b,value:x.bind(x)}),x.toString=()=>`[Function${b==null?"":`: ${b}`}]`,Object.setPrototypeOf(x,gw(e,i,"Function").literal),x}var hzt=class extends j7{constructor({node:e,environment:i,message:a="Missing catch or finally after try"}){super({node:e,environment:i,message:a})}};function Gmr(r){let{node:e,evaluate:i,environment:a,throwError:u}=r,d,h=()=>{try{return i.statement(e.tryBlock,{...r,throwError:I=>(d=I,I),getCurrentError:()=>d})}catch(I){d=I}},b=I=>{i.nodeWithArgument(e.catchClause,I,r)},x=()=>{let I;i.statement(e.finallyBlock,{...r,throwError:L=>(I=L,r.throwError(L),L),getCurrentError:()=>I})};if(e.catchClause==null&&e.finallyBlock==null)return u(new hzt({node:e,environment:a}));e.catchClause!=null&&e.finallyBlock==null?(h(),d!=null&&b(d)):e.catchClause!=null&&e.finallyBlock!=null?(h(),d!=null&&b(d),x()):e.catchClause==null&&e.finallyBlock!=null&&(h(),d!=null&&u(d),x())}function Akn({name:r,extendedType:e,ctor:i=()=>{}}){return e==null?new Function("ctor",`return class ${r??""} {constructor () {const ctorReturnValue = ctor.call(this, ...arguments); if (ctorReturnValue != null) return ctorReturnValue;}}`)(i):new Function("extendedType","ctor",`return class ${r??""} extends extendedType {constructor () {super(...arguments); const ctorReturnValue = ctor.call(this, ...arguments); if (ctorReturnValue != null) return ctorReturnValue;}}`)(e,i)}function FYe(r,e){return"canHaveDecorators"in e?e.canHaveDecorators(r):!0}function OYe(r,e){var i;if("getDecorators"in e)return e.getDecorators(r);{let a="decorators"in r&&Array.isArray(r.decorators)?r.decorators:void 0,u=(i=r.modifiers)===null||i===void 0?void 0:i.filter(d=>"expression"in d);return[...a??[],...u??[]]}}function zmr(r){var e;let{node:i,evaluate:a,stack:u,logger:d,typescript:h,getCurrentError:b}=r,x,I=i.members.find(h.isConstructorDeclaration),L=i.members.filter(Ee=>!h.isConstructorDeclaration(Ee)),q;if(I!=null){if(a.declaration(I,r),b()!=null)return;q=u.pop()}if(i.heritageClauses!=null){let Ee=i.heritageClauses.find(ke=>ke.token===h.SyntaxKind.ExtendsKeyword);if(Ee!=null){let[ke]=Ee.types;if(ke!=null&&(x=a.expression(ke.expression,r),b()!=null))return}}let te=i.name==null?void 0:i.name.text,me=Akn({name:te,extendedType:x,ctor:q});if(FYe(i,h))for(let Ee of(e=OYe(i,h))!==null&&e!==void 0?e:[]){if(a.nodeWithArgument(Ee,[me],r),b()!=null)return;me=u.pop()}me.toString=()=>`[Class${te==null?"":`: ${te}`}]`,te!=null&&wg({...r,path:te,value:me,newBinding:!0});for(let Ee of L)if(a.nodeWithArgument(Ee,NQ(Ee,h.SyntaxKind.StaticKeyword)?me:me.prototype,r),b()!=null)return;d.logHeritage(me),u.push(me),d.logStack(u)}function jmr(r){let{node:e,environment:i,evaluate:a,stack:u,getCurrentError:d}=r;function h(...b){let x=i6(i,e),I={...r,environment:x};if(wg({...I,path:Vx,value:!1,newBinding:!0}),wg({...I,path:"arguments",value:arguments,newBinding:!0}),this!=null&&wg({...I,path:z7,value:this,newBinding:!0}),RQ({...I,node:e.parameters},b,this),!(e.body==null||d()!=null)&&(a.statement(e.body,I),d()==null&&ST(e,x,!0,Vx)))return u.pop()}h.toString=()=>"[Function: constructor]",u.push(h)}function Vmr({node:r,environment:e}){let i=gw(r,e,T1e);return i?.literal}function Umr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Hmr(r){var e;let{node:i,evaluate:a,stack:u,logger:d,typescript:h,getCurrentError:b}=r,x,I=i.members.find(h.isConstructorDeclaration),L=i.members.filter(Ee=>!h.isConstructorDeclaration(Ee)),q;if(I!=null){if(a.declaration(I,r),b()!=null)return;q=u.pop()}if(i.heritageClauses!=null){let Ee=i.heritageClauses.find(ke=>ke.token===h.SyntaxKind.ExtendsKeyword);if(Ee!=null){let[ke]=Ee.types;if(ke!=null&&(x=a.expression(ke.expression,r),b()!=null))return}}let te=i.name==null?void 0:i.name.text,me=Akn({name:te,extendedType:x,ctor:q});if(FYe(i,h))for(let Ee of(e=OYe(i,h))!==null&&e!==void 0?e:[]){if(a.nodeWithArgument(Ee,[me],r),b()!=null)return;me=u.pop()}me.toString=()=>`[Class${te==null?"":`: ${te}`}]`,te!=null&&wg({...r,path:te,value:me,newBinding:!0});for(let Ee of L)if(a.nodeWithArgument(Ee,NQ(Ee,h.SyntaxKind.StaticKeyword)?me:me.prototype,r),b()!=null)return;return d.logHeritage(me),me}function Jmr(r){return null}function qmr({node:r,evaluate:e,...i}){e.expression(r.expression,i)}function Kmr({evaluate:r,node:e,...i}){let a=r.expression(e.expression,i);if(i.getCurrentError()==null)return typeof a}function Xmr({node:r,environment:e}){let i=gw(r,e,"BigInt").literal;return i(r.text.endsWith("n")?r.text.slice(0,-1):r.text)}function Ymr(r){let{node:e,environment:i,evaluate:a,stack:u,getCurrentError:d}=r,h=gw(e,i,"Object").literal,b=h.create(h.prototype),x=e.name.text;wg({...r,path:x,value:b,newBinding:!0});for(let I of e.members)if(a.nodeWithArgument(I,b,r),d()!=null)return;b.toString=()=>`[Enum: ${x}]`,u.push(b)}function Qmr(r){let{node:e,evaluate:i,environment:a,typeChecker:u,stack:d,getCurrentError:h}=r,b=gw(e,a,"Object").literal,x=b.create(b.prototype),I=u?.getSymbolAtLocation(e);if(I!=null){let L=I.exports;if(L!=null)for(let[q,te]of L.entries()){let me=te.valueDeclaration;if(me==null||(i.declaration(me,r),h()!=null))return;x[q]=d.pop()}}d.push(x)}function $mr(r){let{getCurrentError:e,stack:i}=r,a=ebt(r);e()==null&&i.push(a)}function Zmr({node:r,evaluate:e,...i}){r.importClause!=null&&e.declaration(r.importClause,i)}function e_r({node:r,evaluate:e,...i}){let{getCurrentError:a,throwError:u}=i,d=e.expression(r.expression,i);if(a()==null)return u(d)}var gzt=class extends Dfe{constructor({duration:e,environment:i,node:a,message:u=`Maximum operation duration exceeded: ${e}`}){super({violation:"maxOpDuration",message:u,node:a,environment:i}),this.duration=e}};async function t_r(r){let{node:e,environment:i,evaluate:a,policy:u,throwError:d,getCurrentError:h}=r,b=u.maxOpDuration===1/0?void 0:setTimeout(()=>{d(new gzt({duration:u.maxOpDuration,node:e,environment:i}))},u.maxOpDuration),x=a.expression(e.expression,r);if(b!=null&&clearTimeout(b),h()==null)return x}function n_r({node:r,evaluate:e,...i}){let{getCurrentError:a}=i,u=e.expression(r.condition,i);if(a()==null)return u?e.expression(r.whenTrue,i):e.expression(r.whenFalse,i)}function cbt(r,e){let i=r;for(;i!=null&&!e.isSourceFile(i);){if(NQ(i,e.SyntaxKind.StaticKeyword))return!0;i=i.parent}return!1}function kkn(r,e){var i,a;let{node:u,environment:d,evaluate:h,stack:b,typescript:x,getCurrentError:I}=r,L=h.nodeWithValue(u.name,r);if(I()!=null)return;let q=cbt(u,x);if(e==null){let me;if(x.isClassLike(u.parent)){if(h.declaration(u.parent,r),I()!=null)return;me=b.pop()}else if(me=h.expression(u.parent,r),I()!=null)return;b.push(q?me[L]:me.prototype[L]);return}let te=NQ(u,x.SyntaxKind.AsyncKeyword)?async function(...Ee){let ke=i6(d,u),Ue={...r,environment:ke};if(wg({...Ue,path:Vx,value:!1,newBinding:!0}),wg({...Ue,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(wg({...Ue,path:z7,value:this,newBinding:!0}),wg({...Ue,path:T1e,value:q?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RQ({...r,node:u.parameters,environment:ke},Ee),!(u.body==null||I()!=null)&&(h.statement(u.body,Ue),I()==null&&ST(u,ke,!0,Vx)))return b.pop()}:function(...Ee){let ke=i6(d,u),Ue={...r,environment:ke};if(wg({...Ue,path:Vx,value:!1,newBinding:!0}),wg({...Ue,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(wg({...Ue,path:z7,value:this,newBinding:!0}),wg({...Ue,path:T1e,value:q?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RQ({...r,node:u.parameters,environment:ke},Ee),!(u.body==null||I()!=null)&&(h.statement(u.body,Ue),I()==null&&ST(u,ke,!0,Vx)))return b.pop()};if(te.toString=()=>`[Method: ${L}]`,Object.setPrototypeOf(te,gw(u,d,"Function").literal),e[L]=te,FYe(u,x))for(let me of(i=OYe(u,x))!==null&&i!==void 0?i:[]){if(h.nodeWithArgument(me,[e,L],r),I()!=null)return;b.pop()}if(u.parameters!=null){let me=u.parameters.filter(Ee=>!(x.isIdentifier(Ee.name)&&Ee.name.text==="this"));for(let Ee=0;Ee<me.length;Ee++){let ke=me[Ee];if(FYe(ke,x))for(let Ue of(a=OYe(ke,x))!==null&&a!==void 0?a:[]){if(h.nodeWithArgument(Ue,[e,L,Ee],r),I()!=null)return;b.pop()}}}}function wkn({node:r,evaluate:e,typescript:i,stack:a,...u},d){var h;let{getCurrentError:b}=u,x=e.nodeWithValue(r.name,u);if(b()==null){if(d==null){if(e.declaration(r.parent,u),b()!=null)return;let I=a.pop(),L=cbt(r,i);a.push(L?I[x]:I.prototype[x]);return}if(d[x]=r.initializer==null?void 0:e.expression(r.initializer,u),b()==null&&FYe(r,i))for(let I of(h=OYe(r,i))!==null&&h!==void 0?h:[]){if(e.nodeWithArgument(I,[d,x],u),b()!=null)return;a.pop()}}}function Ikn(r,e){let{node:i,environment:a,evaluate:u,stack:d,typescript:h,getCurrentError:b}=r;if(h.isTypeLiteralNode(i.parent)||h.isInterfaceDeclaration(i.parent))return;let x=u.nodeWithValue(i.name,r);if(b()!=null)return;let I=cbt(i,h);if(e==null){let te;if(h.isClassLike(i.parent)){if(u.declaration(i.parent,r),b()!=null)return;te=d.pop()}else if(te=u.expression(i.parent,r),b()!=null)return;d.push(I?te[x]:te.prototype[x]);return}function L(){let te=i6(a,i),me={...r,environment:te};if(wg({...me,path:Vx,value:!1,newBinding:!0}),wg({...me,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(wg({...me,path:z7,value:this,newBinding:!0}),wg({...me,path:T1e,value:I?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),i.body!=null&&(u.statement(i.body,me),b()==null&&ST(i,te,!0,Vx)))return d.pop()}L.toString=()=>`[Get: ${x}]`;let q=Object.getOwnPropertyDescriptor(e,x);q==null&&(q={}),Object.defineProperty(e,x,{...q,configurable:!0,get:L})}function r_r({node:r,evaluate:e,...i}){let{getCurrentError:a}=i;if(!(r.name!=null&&(e.declaration(r.name,i),a()!=null))&&r.namedBindings!=null)if("elements"in r.namedBindings){for(let u of r.namedBindings.elements)if(e.declaration(u,i),a()!=null)return}else e.declaration(r.namedBindings.name,i)}function i_r({node:r,evaluate:e,...i}){var a;e.declaration((a=r.propertyName)!==null&&a!==void 0?a:r.name,i)}function o_r({node:r,evaluate:e,...i}){e.declaration(r.name,i)}var obt=class extends j7{constructor({node:e,environment:i,message:a="'SyntaxError'"}){super({message:a,environment:i,node:e})}};function s_r({node:r,typescript:e,throwError:i,environment:a}){var u,d;switch(r.keywordToken){case e.SyntaxKind.NewKeyword:switch(r.name.text){case"target":return(u=gw(r,a,"[[NewTarget]]"))===null||u===void 0?void 0:u.literal;default:return i(new obt({node:r.name,environment:a}))}case e.SyntaxKind.ImportKeyword:switch(r.name.text){case"meta":return(d=gw(r,a,"import.meta"))===null||d===void 0?void 0:d.literal;default:return i(new obt({node:r.name,environment:a}))}}}function Szt({node:r,...e}){var i,a,u,d,h,b;return e.typescript.isIdentifier(r)?ckn({node:r,...e}):!((a=(i=e.typescript).isPrivateIdentifier)===null||a===void 0)&&a.call(i,r)?ckn({node:r,...e}):e.typescript.isStringLiteralLike(r)?lmr({node:r,...e}):e.typescript.isNumericLiteral(r)?cmr({node:r,...e}):bkn(r,e.typescript)?umr({node:r,...e}):e.typescript.isForOfStatement(r)?Pmr({node:r,...e}):e.typescript.isForInStatement(r)?Omr({node:r,...e}):e.typescript.isForStatement(r)?Mmr({node:r,...e}):e.typescript.isWhileStatement(r)?Fmr({node:r,...e}):e.typescript.isRegularExpressionLiteral(r)?pmr({node:r,...e}):e.typescript.isObjectLiteralExpression(r)?fmr({node:r,...e}):e.typescript.isAwaitExpression(r)?t_r({node:r,...e}):!((d=(u=e.typescript).isTypeAssertionExpression)===null||d===void 0)&&d.call(u,r)||!("isTypeAssertionExpression"in e.typescript)&&e.typescript.isTypeAssertion(r)?Dmr({node:r,...e}):e.typescript.isTemplateExpression(r)?Emr({node:r,...e}):e.typescript.isMethodDeclaration(r)?kkn({node:r,...e}):e.typescript.isPropertyDeclaration(r)?wkn({node:r,...e}):e.typescript.isGetAccessorDeclaration(r)?Ikn({node:r,...e}):e.typescript.isArrayLiteralExpression(r)?mmr({node:r,...e}):e.typescript.isSourceFile(r)?Qmr({node:r,...e}):e.typescript.isModuleDeclaration(r)?$mr({node:r,...e}):e.typescript.isPrefixUnaryExpression(r)?Bmr({node:r,...e}):e.typescript.isPostfixUnaryExpression(r)?Tmr({node:r,...e}):e.typescript.isVariableStatement(r)?gmr({node:r,...e}):e.typescript.isComputedPropertyName(r)?vmr({node:r,...e}):e.typescript.isVariableDeclarationList(r)?Tkn({node:r,...e}):e.typescript.isImportDeclaration(r)?Zmr({node:r,...e}):e.typescript.isImportClause(r)?r_r({node:r,...e}):e.typescript.isImportSpecifier(r)?i_r({node:r,...e}):e.typescript.isNamespaceImport(r)?o_r({node:r,...e}):e.typescript.isImportEqualsDeclaration(r)?({...e},void 0):e.typescript.isMetaProperty(r)?s_r({node:r,...e}):e.typescript.isThrowStatement(r)?e_r({node:r,...e}):e.typescript.isVariableDeclaration(r)?xkn({node:r,...e}):e.typescript.isEnumDeclaration(r)?Ymr({node:r,...e}):e.typescript.isConstructorDeclaration(r)?jmr({node:r,...e}):e.typescript.isBinaryExpression(r)?rmr({node:r,...e}):e.typescript.isParenthesizedExpression(r)?smr({node:r,...e}):e.typescript.isExpressionStatement(r)?xmr({node:r,...e}):e.typescript.isArrowFunction(r)?amr({node:r,...e}):e.typescript.isFunctionDeclaration(r)?bmr({node:r,...e}):e.typescript.isFunctionExpression(r)?Wmr({node:r,...e}):e.typescript.isClassDeclaration(r)?zmr({node:r,...e}):e.typescript.isIfStatement(r)?Smr({node:r,...e}):e.typescript.isConditionalExpression(r)?n_r({node:r,...e}):e.typescript.isPropertyAccessExpression(r)?ymr({node:r,...e}):e.typescript.isElementAccessExpression(r)?Cmr({node:r,...e}):e.typescript.isCallExpression(r)?omr({node:r,...e}):e.typescript.isSwitchStatement(r)?Imr({node:r,...e}):e.typescript.isNewExpression(r)?Amr({node:r,...e}):e.typescript.isNonNullExpression(r)?kmr({node:r,...e}):e.typescript.isAsExpression(r)?wmr({node:r,...e}):e.typescript.isBlock(r)?_mr({node:r,...e}):e.typescript.isClassExpression(r)?Hmr({node:r,...e}):e.typescript.isSpreadElement(r)?Umr({node:r,...e}):e.typescript.isTryStatement(r)?Gmr({node:r,...e}):e.typescript.isReturnStatement(r)?hmr({node:r,...e}):Ekn(r,e.typescript)?Nmr({node:r,...e}):e.typescript.isVoidExpression(r)?qmr({node:r,...e}):e.typescript.isTypeOfExpression(r)?Kmr({node:r,...e}):lbt(r,e.typescript)?Vmr({node:r,...e}):Skn(r,e.typescript)?Jmr({node:r,...e}):!((b=(h=e.typescript).isBigIntLiteral)===null||b===void 0)&&b.call(h,r)?Xmr({node:r,...e}):e.typescript.isBreakStatement(r)?Rmr({node:r,...e}):e.typescript.isContinueStatement(r)?Lmr({node:r,...e}):e.typescript.isTypeAliasDeclaration(r)?({...e},void 0):e.typescript.isInterfaceDeclaration(r)?({...e},void 0):e.getCurrentError()!=null?void 0:e.throwError(new mR({node:r,environment:e.environment,typescript:e.typescript}))}function xzt(){return[]}function a_r(r){r.logger.logNode(r.node,r.typescript),r.statementTraversalStack=xzt(),Szt(r)}function l_r(r){let{getCurrentError:e}=r;r.logger.logNode(r.node,r.typescript);let i=Szt(r);if(e()==null)return r.reporting.reportIntermediateResults!=null&&r.reporting.reportIntermediateResults({node:r.node,value:i}),i}function c_r(r){r.logger.logNode(r.node,r.typescript),Szt(r)}function u_r({node:r,evaluate:e,typescript:i,logger:a,...u},d){var h;i.isIdentifier(r)||!((h=i.isPrivateIdentifier)===null||h===void 0)&&h.call(i,r)?(wg({...u,node:r,path:r.text,value:d,newBinding:!0}),a.logBinding(r.text,d,"evaluateBindingName")):e.nodeWithArgument(r,d,u)}function p_r(r,e){let{node:i,environment:a,evaluate:u,typescript:d,getCurrentError:h}=r,b=u.nodeWithValue(i.name,r);if(h()!=null)return;let x=cbt(i,d);function I(...q){let te=i6(a,i),me={...r,environment:te};wg({...me,path:Vx,value:!1,newBinding:!0}),wg({...me,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(wg({...me,path:z7,value:this,newBinding:!0}),wg({...me,path:T1e,value:x?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RQ({...me,node:i.parameters},q),!(i.body==null||h()!=null)&&(u.statement(i.body,me),h()==null)}I.toString=()=>`[Set: ${b}]`;let L=Object.getOwnPropertyDescriptor(e,b);L==null&&(L={}),Object.defineProperty(e,b,{...L,configurable:!0,set:I})}function f_r({node:r,evaluate:e,...i},a){let u=e.expression(r.initializer,i);if(i.getCurrentError()!=null)return;let d=e.nodeWithValue(r.name,i);i.getCurrentError()==null&&(a[d]=u)}function d_r({node:r,evaluate:e,logger:i,...a},u){let d=u!=null||r.initializer===void 0?u:e.expression(r.initializer,a);a.getCurrentError()==null&&(i.logBinding(r.name.getText(),d,"evaluateParameterDeclaration"),e.nodeWithArgument(r.name,d,a))}function m_r({node:r,evaluate:e,...i},a){let{getCurrentError:u}=i,d=r.name.text,h=e.expression(r.name,i);u()==null&&(a[d]=h)}function __r({node:r,evaluate:e,...i},a){let u=e.expression(r.expression,i);i.getCurrentError()==null&&Object.assign(a,u)}function h_r({node:r,evaluate:e,...i},a){let u=a[Symbol.iterator](),d=0;for(;d<r.elements.length;){let{done:h,value:b}=u.next();if(h===!0)break;if(e.nodeWithArgument(r.elements[d++],b,i),i.getCurrentError()!=null)return}}function g_r(r,e){var i,a,u,d;let{node:h,evaluate:b,logger:x,typescript:I,getCurrentError:L}=r,q=h.initializer==null?void 0:b.expression(h.initializer,r);if(L()==null){if((I.isIdentifier(h.name)||!((i=I.isPrivateIdentifier)===null||i===void 0)&&i.call(I,h.name))&&h.propertyName!=null){let te=h.name.text,me=b.nodeWithValue(h.propertyName,r);if(L()!=null)return;let Ee=I.isArrayBindingPattern(h.parent)?e:e[me];wg({...r,path:te,value:Ee??q,newBinding:!0})}else if((I.isIdentifier(h.name)||!((a=I.isPrivateIdentifier)===null||a===void 0)&&a.call(I,h.name))&&h.propertyName==null){let te=h.name.text,me=I.isArrayBindingPattern(h.parent)?e:e[te],Ee=me??q;x.logBinding(h.name.text,Ee),wg({...r,path:h.name.text,value:Ee,newBinding:!0})}else if(!I.isIdentifier(h.name)&&!(!((u=I.isPrivateIdentifier)===null||u===void 0)&&u.call(I,h.name))&&h.propertyName!=null){let te=b.nodeWithValue(h.propertyName,r);if(L()!=null)return;let me=I.isArrayBindingPattern(h.parent)?e:e[te],Ee=me??q;if(b.nodeWithArgument(h.name,Ee,r),L()!=null)return}else if(!I.isIdentifier(h.name)&&!(!((d=I.isPrivateIdentifier)===null||d===void 0)&&d.call(I,h.name))&&h.propertyName==null){let te=e??q;if(b.nodeWithArgument(h.name,te,r),L()!=null)return}}}function B_r({node:r,evaluate:e,...i},a){for(let u of r.elements)if(e.nodeWithArgument(u,a,i),i.getCurrentError()!=null)return}function y_r(r,e){let{node:i,evaluate:a,environment:u,getCurrentError:d}=r,h=i6(u,i),b={...r,environment:h};wg({...b,path:u8,value:!1,newBinding:!0});for(let x of i.clauses){if(a.nodeWithArgument(x,e,b),d()!=null)return;if(ST(i,h,!0,u8,G7,Vx))break}}function C_r({node:r,evaluate:e,...i},a){let{getCurrentError:u}=i;if(!(e.expression(r.expression,i)!==a||u()!=null))for(let h of r.statements){if(e.statement(h,i),u()!=null)return;if(ST(r,i.environment,!0,u8,G7,Vx))break}}function v_r(r){let{node:e,evaluate:i,environment:a,getCurrentError:u}=r;for(let d of e.statements){if(i.statement(d,r),u()!=null)return;if(ST(e,a,!0,u8,G7,Vx))break}}function b_r(r,e){let{node:i,evaluate:a,environment:u,getCurrentError:d}=r,h=i.variableDeclaration==null?u:i6(u,i),b={...r,environment:h};i.variableDeclaration!=null&&(a.nodeWithArgument(i.variableDeclaration,e,b),d()!=null)||a.statement(i.block,b)}function S_r(r,e,i,a){let u=arguments.length,d=u<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,i):a,h;for(let b=r.length-1;b>=0;b--)(h=r[b])&&(d=(u<3?h(d):u>3?h(e,i,d):h(e,i))||d);return u>3&&d&&Object.defineProperty(e,i,d),d}function x_r(r,e){return function(i,a){e(i,a,r)}}function E_r(r,[e,i,a]){let{node:u,evaluate:d,environment:h,throwError:b,stack:x,getCurrentError:I}=r,L=d.expression(u.expression,r);if(I()==null){if(typeof L!="function")return b(new rbt({node:u,environment:h,value:L,message:`${bzt(L)} is not a valid decorator implementation'`}));x.push(S_r([a!=null?x_r(a,L):L],e,i))}}function D_r(r,e){let{node:i,typeChecker:a,evaluate:u,getCurrentError:d}=r,h=a?.getConstantValue(i);if(h==null)if(i.initializer!=null){if(h=u.expression(i.initializer,r),d()!=null)return}else{let x=i.parent.members,I=x.findIndex(te=>te===i),L=x.slice(0,I),q=0;for(let te of[...L].reverse())if(q++,te.initializer!=null){let me=u.expression(te.initializer,r);if(d()!=null)return;if(typeof me=="number"){h=me+q;break}}h==null&&(h=I)}let b=u.nodeWithValue(i.name,r);d()==null&&(typeof h=="string"?e[b]=h:e[e[b]=h??0]=b)}function T_r(r,e){r.logger.logNode(r.node,r.typescript,"nodeWithArgument");let{node:i,...a}=r;if(a.typescript.isGetAccessorDeclaration(i))Ikn({node:i,...a},e);else if(a.typescript.isSetAccessorDeclaration(i))p_r({node:i,...a},e);else if(a.typescript.isPropertyAssignment(i))f_r({node:i,...a},e);else if(a.typescript.isPropertyDeclaration(i))wkn({node:i,...a},e);else if(a.typescript.isParameter(i))d_r({node:i,...a},e);else if(a.typescript.isEnumMember(i))D_r({node:i,...a},e);else if(a.typescript.isShorthandPropertyAssignment(i))m_r({node:i,...a},e);else if(a.typescript.isDecorator(i))E_r({node:i,...a},e);else if(a.typescript.isSpreadAssignment(i))__r({node:i,...a},e);else if(a.typescript.isMethodDeclaration(i))kkn({node:i,...a},e);else if(a.typescript.isArrayBindingPattern(i))h_r({node:i,...a},e);else if(a.typescript.isBindingElement(i))g_r({node:i,...a},e);else if(a.typescript.isObjectBindingPattern(i))B_r({node:i,...a},e);else if(a.typescript.isVariableDeclaration(i))xkn({node:i,...a},e);else if(a.typescript.isCaseBlock(i))y_r({node:i,...a},e);else if(a.typescript.isCaseClause(i))C_r({node:i,...a},e);else if(a.typescript.isDefaultClause(i))v_r({node:i,...a});else if(a.typescript.isCatchClause(i))b_r({node:i,...a},e);else if(a.typescript.isBindingName(i))u_r({node:i,...a},e);else if(a.typescript.isOmittedExpression(i))({...a});else{if(r.getCurrentError()!=null)return;a.throwError(new mR({node:i,environment:a.environment,typescript:a.typescript}))}}function A_r({node:r,evaluate:e,typescript:i,...a}){var u;return i.isComputedPropertyName(r)?e.expression(r.expression,a):i.isIdentifier(r)||!((u=i.isPrivateIdentifier)===null||u===void 0)&&u.call(i,r)?r.text:e.expression(r,a)}function k_r(r){r.logger.logNode(r.node,r.typescript,"nodeWithValue");let{node:e,...i}=r;return r.typescript.isPropertyName(e)||r.typescript.isPrivateIdentifier(e)?A_r({node:e,...i}):r.throwError(new mR({node:e,environment:r.environment,typescript:r.typescript}))}function w_r(r){let e=0,{policy:i,reporting:a}=r,u=(b,x)=>{let{environment:I=r.environment,statementTraversalStack:L=r.statementTraversalStack,getCurrentError:q=r.getCurrentError,throwError:te=r.throwError}=x??{},me=q();if(me!=null)return me;if(e++,e>=i.maxOps)return te(new dzt({ops:e,environment:I,node:b}));L.push(b.kind),a.reportTraversal!=null&&a.reportTraversal({node:b})},d={statement:(b,x)=>{let I={...x,statementTraversalStack:xzt()},L=u(b,I);if(!wre(L))return a_r(h(b,I))},declaration:(b,x)=>{let I=u(b,x);if(!wre(I))return c_r(h(b,x))},nodeWithArgument:(b,x,I)=>{let L=u(b,I);if(!wre(L))return T_r(h(b,I),x)},expression:(b,x)=>{let I=u(b,x);return wre(I)?I:l_r(h(b,x))},nodeWithValue:(b,x)=>{let I=u(b,x);return wre(I)?I:k_r(h(b,x))}};function h(b,x){return{...r,...x,evaluate:d,node:b}}return d}function LYe(r,e){return r===e.SyntaxKind.NumericLiteral?"NumericLiteral":e.SyntaxKind[r]}var Bzt=class{constructor(e={}){let{logLevel:i=0,color:{info:a="white",verbose:u="yellow",debug:d="magenta"}={}}=typeof e=="object"?e:{logLevel:e};this.options={logLevel:i,color:{info:a,verbose:u,debug:d}}}logInfo(e){this.options.logLevel<1||console.log(this.formatWithColor(this.options.color.info,e))}logVerbose(e){this.options.logLevel<2||console.log(this.formatWithColor(this.options.color.verbose,e))}logDebug(e){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,e))}logContinue(e,i){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"continue")} encountered within ${this.formatWithColor(this.options.color.debug,LYe(e.kind,i))}`)}logBreak(e,i){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"break")} encountered within ${this.formatWithColor(this.options.color.debug,LYe(e.kind,i))}`)}logReturn(e,i){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"return")} encountered within ${this.formatWithColor(this.options.color.debug,LYe(e.kind,i))}`)}logResult(e,i){this.options.logLevel<1||(i!=null?console.log(this.formatWithColor(this.options.color.info,`(intermediate value from context '${i}'):`),this.formatWithColor(this.options.color.info,"[RESULT]:"),this.compactValue(e)):console.log(this.formatWithColor(this.options.color.info,"[RESULT]:"),e))}logNode(e,i,a){if(this.options.logLevel<3)return;let u=`[${LYe(e.kind,i)}]`.padEnd(25);a!=null&&(u+=this.formatWithColor(this.options.color.debug,`(${a})`));let d=e.getText(),h=this.formatWithColor(this.options.color.debug,u),b=this.formatWithColor(this.options.color.debug,d);console.log(h),console.log(b)}logBinding(e,i,a){this.options.logLevel<2||console.log(`${a==null?"":this.formatWithColor(this.options.color.verbose,`(${a}): `)}${this.formatWithColor(this.options.color.verbose,`${e} ->`)}`,this.formatWithColor(this.options.color.verbose,this.compactValue(i)))}logHeritage(e){if(this.options.logLevel<3)return;let i=Object.getPrototypeOf(e);i.toString().includes("[Class")&&console.log(`${this.formatWithColor(this.options.color.debug,e.toString())} ${this.formatWithColor(this.options.color.debug,"extends")} ${this.formatWithColor(this.options.color.debug,i.toString())}`)}logStack(e){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,`Stack value: ${bzt(this.compactValue(e.lastItem))}`))}logStatementTraversalStack(e,i){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,`[${e.map(a=>LYe(a,i)).join(", ")}]`))}compactValue(e){return(0,pkn.inspect)(e,{depth:0,colors:!0,compact:!0,maxArrayLength:5})}formatWithColor(e,i){return fkn.default[e](i)}};function I_r(r,e){var i;return e.isExpressionNode(r)||e.isIdentifier(r)||((i=e.isPrivateIdentifier)===null||i===void 0?void 0:i.call(e,r))}function P_r(r,e){return e.isStatementButNotDeclaration(r)}function N_r(){let r=[];return{[Symbol.iterator](){return r[Symbol.iterator]()},get length(){return r.length},get lastItem(){return r[r.length-1]},push(...e){return r.push(...e)},pop(){return r.pop()}}}function R_r(r,e,i){r.reportErrors!=null&&!r.reportedErrorSet.has(e)&&(r.reportedErrorSet.add(e),r.reportErrors({error:e,node:e instanceof j7?e.node:i}))}function L_r(){return new WeakSet}function Pkn({typeChecker:r,node:e,environment:{preset:i="NODE",extra:a={}}={},moduleOverrides:u={},typescript:d=Pdr,logLevel:h=0,policy:{deterministic:b=!1,network:x=!1,console:I=!1,maxOps:L=1/0,maxOpDuration:q=1/0,io:te={read:!0,write:!1},process:me={exit:!1,spawnChild:!1}}={},reporting:Ee={}}){let ke=nmr(e,d);if(ke.success)return ke;let Ue={deterministic:b,maxOps:L,maxOpDuration:q,network:x,console:I,io:{read:typeof te=="boolean"?te:te.read,write:typeof te=="boolean"?te:te.write},process:{exit:typeof me=="boolean"?me:me.exit,spawnChild:typeof me=="boolean"?me:me.spawnChild}},Fe={...Ee,reportedErrorSet:L_r()},We,Tt=new Bzt(h),Vt=ur=>(R_r(Fe,ur,ur.node),We=ur,We),un=tmr({inputEnvironment:{preset:i,extra:a},startingNode:e,policy:Ue}),Jn=N_r(),Dn=xzt(),mn={policy:Ue,typeChecker:r,typescript:d,logger:Tt,stack:Jn,moduleOverrides:u,reporting:Fe,throwError:Vt,environment:un,statementTraversalStack:Dn,getCurrentError:()=>We},qn=w_r(mn);try{let ur;return I_r(e,d)?ur=qn.expression(e,mn):P_r(e,d)?(qn.statement(e,mn),ur=Jn.pop()):mkn(e,d)?(qn.declaration(e,mn),ur=Jn.pop()):Vt(new mR({node:e,environment:un,typescript:d})),We!=null?{success:!1,reason:We}:(Tt.logResult(ur),{success:!0,value:ur})}catch(ur){return Vt(ur),{success:!1,reason:ur}}}var Gkn=b_(NW(),1),V7=b_(NW(),1),GYe=b_(NW(),1);var w1e=b_(NW(),1);var FJ=b_(NW(),1);var Tzt=b_(NW(),1);var Azt=b_(NW(),1);var M_r=r=>{if(Array.isArray(r))return"array";if(typeof r=="string")return"string";if(typeof r=="number")return"number";if(typeof r=="boolean")return"boolean";if(r===null)return"null";if(r===void 0)return"undefined";throw new Error(`Unexpected literal type: ${r}`)},o6=r=>r!=null,Fkn=r=>r==null,Okn=r=>r!=null&&typeof r=="object",F_r=r=>Array.isArray(r),O_r=r=>{let e=typeof r;return e==="string"||e==="number"||e==="boolean"||r===null||r===void 0},Ux=r=>FRe.Node.isAsExpression(r)||FRe.Node.isParenthesizedExpression(r)||FRe.Node.isNonNullExpression(r)||FRe.Node.isTypeAssertion(r)||FRe.Node.isSatisfiesExpression(r)?Ux(r.getExpression()):r,W_r=r=>r.getTagNameNode().getText(),G_r=/\s+/g,Wkn=r=>r.replaceAll(G_r," "),z_r=r=>{let e=r.getSourceFile(),[i,a]=[r.getStart(),r.getEnd()],u=e.getLineAndColumnAtPos(i),d=e.getLineAndColumnAtPos(a);return{startPosition:i,startLineNumber:u.line,startColumn:u.column,endPosition:a,endLineNumber:d.line,endColumn:d.column}},Afe=class{type;stack=[];node;constructor(r){this.type=r.type,this.node=r.node,this.stack=[...r.stack??[]]}getNode(){return this.node}getStack(){return this.stack}getRange=()=>z_r(this.node);toJSON(){let r=this.getRange();return{type:this.type,value:this.value,node:this.node.getKindName(),line:r.startLineNumber,column:r.startColumn}}toString(){return JSON.stringify(this.toJSON(),null,2)}},Nkn=class extends Afe{value;isEmpty;constructor(r){super(r),this.value=r.value,this.isEmpty=r.isEmpty}},j_r=class extends Afe{value;kind;constructor(r){super(r),this.value=r.value,this.kind=r.kind}},V_r=class extends Afe{value;spreadConditions;constructor(r){super(r),this.value=r.value}},U_r=class extends Afe{value;constructor(r){super(r),this.value=r.value}},H_r=class extends Afe{},J_r=class extends Afe{whenTrue;whenFalse;constructor(r){super(r),this.whenTrue=r.whenTrue,this.whenFalse=r.whenFalse}},q_r=class extends Afe{},ORe=r=>r instanceof Afe;function Dzt(r,e,i){return SB(r).when(Fkn,()=>{}).when(ORe,a=>a).when(Okn,a=>_p.object(a,e,i)).when(F_r,a=>a.length===1?Dzt(a[0],e,i):a.map(u=>Dzt(u,e,i))).when(O_r,a=>_p.literal(a,e,i)).otherwise(()=>{})}var _p={object(r,e,i){return new Nkn({type:"object",value:r,node:e,stack:i})},literal(r,e,i){return new j_r({type:"literal",value:r,kind:M_r(r),node:e,stack:i})},map(r,e,i){return new V_r({type:"map",value:r,node:e,stack:i})},array(r,e,i){return new U_r({type:"array",value:r,node:e,stack:i})},conditional(r,e,i,a){return new J_r({type:"conditional",whenTrue:r,whenFalse:e,node:i,stack:a})},from:Dzt,emptyObject:(r,e)=>new Nkn({type:"object",value:{},isEmpty:!0,node:r,stack:e}),emptyInitializer:(r,e)=>new q_r({type:"empty-initializer",node:r,stack:e}),unresolvable:(r,e)=>new H_r({type:"unresolvable",node:r,stack:e}),isObject(r){return r?.type==="object"},isLiteral(r){return r?.type==="literal"},isMap(r){return r?.type==="map"},isArray(r){return r?.type==="array"},isUnresolvable(r){return r?.type==="unresolvable"},isConditional(r){return r?.type==="conditional"},isEmptyInitializer(r){return r?.type==="empty-initializer"},isNumberLiteral(r){return _p.isLiteral(r)&&r.kind==="number"},hasValue:r=>_p.isObject(r)||_p.isLiteral(r)||_p.isMap(r)||_p.isArray(r)},zkn=Symbol("EvalError"),Ezt=new WeakMap,K_r=(r,e,i)=>{if(i.flags?.skipEvaluate||i.canEval&&!i.canEval?.(r,e))return;if(Ezt.has(r))return Ezt.get(r);let a=Pkn({policy:{deterministic:!0,network:!1,console:!1,maxOps:Number.POSITIVE_INFINITY,maxOpDuration:1e3,io:{read:!0,write:!1},process:{exit:!1,spawnChild:!1}},...i.getEvaluateOptions?.(r,e),node:r.compilerNode,typescript:Gkn.ts}),u=a.success?a.value:zkn;return Ezt.set(r,u),u},ubt=(r,e,i)=>{let a=K_r(r,e,i);if(a!==zkn)return a};function X_r(r){return V7.Node.isFunctionDeclaration(r)||V7.Node.isFunctionExpression(r)||V7.Node.isArrowFunction(r)||V7.Node.isSourceFile(r)}function Y_r(r,e,i){let a=r.getParent();if(!a)return;let u=[],d;if((V7.Node.isVariableDeclaration(a)||V7.Node.isParameterDeclaration(a)||V7.Node.isFunctionDeclaration(a)||V7.Node.isBindingElement(a))&&a.getNameNode()==r)u.push(a),d=a;else if(V7.Node.isImportSpecifier(a)&&a.getNameNode()==r){if(i.flags?.skipTraverseFiles)return;let h=qkn(a.getImportDeclaration());if(h){let b=[a,h],x=Jkn(r.getText(),h,b,i);x&&(u.push(...b.concat(x)),d=x)}}return d&&e.push(...u),d}var Q_r=r=>{let e=r.getParent();for(;e&&!X_r(e);)e=e.getParent();return e};function mbt(r,e,i,a=new Map){let u=r,d,h=!1,b=0,x=[];do{if(u=Q_r(u),b++,!u)return;let I=r.getText();if(u.forEachDescendant((L,q)=>{if(a.has(L)){q.skip(),x.push(...a.get(L));return}if(L!=r&&(a.set(L,x),V7.Node.isIdentifier(L)&&L.getText()==I)){let te=[L],me=Y_r(L,te,i);if(me){if(V7.Node.isParameterDeclaration(me)){let Ee=me.getInitializer(),ke=me.getTypeNode();Ee?(x.push(...te.concat(Ee)),d=me):ke&&V7.Node.isTypeLiteral(ke)?(x.push(...te.concat(ke)),d=me):h=!0,q.stop();return}x.push(...te),d=me,q.stop()}}}),d||h)return d&&e.push(...x),d}while(u&&!V7.Node.isSourceFile(u)&&!d&&!h&&b<100)}var $_r=(r,e,i)=>SB(r).when(w1e.Node.isPropertyAssignment,a=>{let u=Ux(a.getNameNode());return SB(u).when(w1e.Node.isIdentifier,d=>_p.from(d.getText(),d,e)).when(w1e.Node.isComputedPropertyName,d=>{let h=d.getExpression();return e.push(h),MQ(h,e,i)}).when(Z3.or(w1e.Node.isStringLiteral,w1e.Node.isNumericLiteral),d=>_p.from(d.getLiteralText(),d,e)).otherwise(()=>{})}).when(w1e.Node.isShorthandPropertyAssignment,a=>{let u=a.getName();if(u!=null)return _p.from(u,a,e)}).otherwise(()=>{}),Z_r=(r,e,i,a)=>{let u=r.getProperties();if(u.length===0)return _p.emptyObject(r,e);let d=[],h=[];u.forEach(I=>{let L=[...e];if(L.push(I),GYe.Node.isPropertyAssignment(I)||GYe.Node.isShorthandPropertyAssignment(I)){let q=$_r(I,L,i);if(!q)return;let te=q.value;if(Fkn(te)||a&&!a?.({propName:te,propNode:I}))return;if(GYe.Node.isShorthandPropertyAssignment(I)){let Ue=I.getNameNode();L.push(Ue);let Fe=rE(Ue,L,i);if(Fe){d.push([te.toString(),Fe]);return}}let me=I.getInitializer();if(!me)return;let Ee=Ux(me);L.push(Ee);let ke=rE(Ee,L,i);if(ke){d.push([te.toString(),ke]);return}}if(GYe.Node.isSpreadAssignment(I)){let q=Ux(I.getExpression());L.push(q);let te=rE(q,L,i,a);if(!te)return;if(_p.isObject(te)){Object.entries(te.value).forEach(([me,Ee])=>{let ke=_p.from(Ee,q,L);ke&&d.push([me,ke])});return}if(_p.isMap(te)){te.value.forEach((me,Ee)=>{d.push([Ee,me])});return}_p.isConditional(te)&&h.push(te)}});let b=new Map;d.forEach(([I,L])=>{b.has(I)&&b.delete(I),b.set(I,L)});let x=_p.map(b,r,e);return h.length>0&&(x.spreadConditions=h),x},kzt=new WeakMap,ehr=r=>kzt.has(r),thr=r=>kzt.get(r),nhr=r=>r===tm.ts.SyntaxKind.PlusToken,rhr=r=>r===tm.ts.SyntaxKind.BarBarToken||r===tm.ts.SyntaxKind.QuestionQuestionToken||r===tm.ts.SyntaxKind.AmpersandAmpersandToken||r===tm.ts.SyntaxKind.EqualsEqualsEqualsToken||r===tm.ts.SyntaxKind.EqualsEqualsToken||r===tm.ts.SyntaxKind.ExclamationEqualsEqualsToken||r===tm.ts.SyntaxKind.ExclamationEqualsToken||r===tm.ts.SyntaxKind.GreaterThanEqualsToken||r===tm.ts.SyntaxKind.GreaterThanToken||r===tm.ts.SyntaxKind.LessThanEqualsToken||r===tm.ts.SyntaxKind.LessThanToken||r===tm.ts.SyntaxKind.InstanceOfKeyword||r===tm.ts.SyntaxKind.InKeyword,ihr=r=>r===tm.ts.SyntaxKind.AsteriskToken||r===tm.ts.SyntaxKind.SlashToken||r===tm.ts.SyntaxKind.PercentToken||r===tm.ts.SyntaxKind.AsteriskAsteriskToken||r===tm.ts.SyntaxKind.MinusToken,ohr=r=>r===tm.ts.SyntaxKind.BarBarToken||r===tm.ts.SyntaxKind.QuestionQuestionToken;function rE(r,e,i,a){let u=d=>(kzt.set(r,d),d);return SB(r).when(ehr,thr).when(Z3.or(tm.Node.isStringLiteral,tm.Node.isNoSubstitutionTemplateLiteral),d=>{let h=Wkn(d.getLiteralValue());return u(_p.literal(h,d,e))}).when(tm.Node.isObjectLiteralExpression,d=>u(Z_r(d,e,i,a))).when(Z3.or(tm.Node.isTrueLiteral,tm.Node.isFalseLiteral),d=>{let h=d.getLiteralValue();return u(_p.literal(h,d,e))}).when(tm.Node.isNumericLiteral,d=>{let h=d.getLiteralValue();return u(_p.literal(h,d,e))}).when(tm.Node.isNullLiteral,d=>u(_p.literal(null,d,e))).when(tm.Node.isPrefixUnaryExpression,d=>{let h=d.getOperand(),b=d.getOperatorToken(),x=rE(h,e,i);if(_p.isNumberLiteral(x))return u(b===tm.ts.SyntaxKind.MinusToken?_p.literal(-Number(x.value),d,e):x)}).when(tm.Node.isArrayLiteralExpression,d=>{let h=d.getElements().map(b=>rE(b,e,i)??u(_p.unresolvable(b,e)));return u(_p.array(h,d,e))}).when(tm.Node.isIdentifier,d=>SB(d.getText()).with("undefined",()=>u(_p.literal(void 0,d,e))).otherwise(()=>u(mhr(d,e,i)))).when(tm.Node.isTemplateHead,d=>u(_p.literal(d.getLiteralText(),d,e))).when(tm.Node.isTemplateExpression,d=>{let h=Vkn(d,e,i);return u(_p.literal(h,d,e))}).when(tm.Node.isTaggedTemplateExpression,d=>u(rE(d.getTemplate(),e,i))).when(tm.Node.isElementAccessExpression,d=>u(fbt(d,e,i))).when(tm.Node.isPropertyAccessExpression,d=>u(dbt(d,[],e,i))).when(tm.Node.isConditionalExpression,d=>{if(i.flags?.skipConditions)return u(_p.unresolvable(d,e));let h=Ux(d.getCondition()),b=(tm.Node.isIdentifier(h)?rE(h,[],i):ubt(h,e,i))??_p.unresolvable(h,e),x=ORe(b)?b:_p.from(b,d,e);if(_p.isEmptyInitializer(x))return;let I=x.getStack().some(me=>tm.Node.isBindingElement(me));if(_p.isUnresolvable(x)||_p.isConditional(x)||I){let me=Ux(d.getWhenTrue()),Ee=Ux(d.getWhenFalse());return u(Rkn({whenTrueExpr:me,whenFalseExpr:Ee,node:d,stack:e},i))}if(x.value){let me=Ux(d.getWhenTrue()),Ee=[...e],ke=rE(me,Ee,i);return u(ke??_p.unresolvable(me,e))}let L=Ux(d.getWhenFalse()),q=[...e],te=rE(L,q,i);return u(te??_p.unresolvable(d,e))}).when(tm.Node.isCallExpression,d=>{let h=ubt(d,e,i);if(h)return u(_p.from(h,d,e))}).when(tm.Node.isBinaryExpression,d=>{let h=d.getOperatorToken().getKind();return SB(h).when(nhr,()=>{let b=Kkn(d,e,i)??ubt(d,e,i);if(b)return u(_p.from(b,d,e))}).when(rhr,b=>{let x=Ux(d.getLeft()),I=Ux(d.getRight()),L={whenTrueExpr:x,whenFalseExpr:I,node:d,stack:e,canReturnWhenTrue:ohr(b)};return u(Rkn(L,i))}).when(ihr,()=>u(_p.literal(ubt(d,e,i),d,e))).otherwise(()=>{})}).otherwise(()=>{})}var jkn=r=>{if(r&&ORe(r)&&_p.isLiteral(r)&&typeof r.value=="string")return r},shr=r=>{if(r&&ORe(r)&&_p.isLiteral(r)&&typeof r.value=="number")return r},ahr=(r,e,i)=>jkn(rE(r,e,i)),MQ=(r,e,i)=>{let a=rE(r,e,i),u=jkn(a);if(u)return u;let d=shr(a);if(d)return d},Rkn=({whenTrueExpr:r,whenFalseExpr:e,node:i,stack:a,canReturnWhenTrue:u},d)=>{let h=rE(r,a,d),b=rE(e,a,d);if(u&&h&&!_p.isUnresolvable(h))return h;if(tm.Node.isBinaryExpression(i)&&i.getOperatorToken().getKind()===tm.ts.SyntaxKind.AmpersandAmpersandToken&&h&&b&&_p.isLiteral(h)&&h.value===!0)return b;if(!h&&!b)return;if(h&&!b)return h;if(!h&&b)return b;let x=h,I=b;return _p.isLiteral(x)&&_p.isLiteral(I)&&x.value===I.value?x:_p.conditional(x,I,i,a)},lhr=(r,e,i,a)=>{let u=[...i];if(tm.Node.isPropertyAssignment(r)){let d=r.getNameNode();if(tm.Node.isIdentifier(d)&&d.getText()===e)return u.push(d),r;if(tm.Node.isStringLiteral(d)&&d.getLiteralText()===e)return u.push(d),d.getLiteralText();if(tm.Node.isComputedPropertyName(d)){let h=Ux(d.getExpression()),b=MQ(h,u,a);if(!b)return;if(String(b.value)===e)return u.push(d,h),r}}if(tm.Node.isShorthandPropertyAssignment(r)){let d=r.getNameNode();if(tm.Node.isIdentifier(d)&&d.getText()===e)return u.push(d),r}},wzt=(r,e,i,a)=>{let u=[...i],d=e.pop(),h=r.getProperty(d)??r.getProperties().find(b=>lhr(b,d,u,a));if(h){if(u.push(h),tm.Node.isPropertyAssignment(h)){let b=h.getInitializer();if(!b)return;if(tm.Node.isObjectLiteralExpression(b))return e.length>0?wzt(b,e,u,a):rE(b,u,a);let x=rE(b,u,a);if(x)return x}if(tm.Node.isShorthandPropertyAssignment(h)){let b=h.getNameNode();if(e.length>0)return LQ(b,e,u,a);let x=rE(b,u,a);if(x)return x}}},Vkn=(r,e,i)=>{let a=r.getHead(),u=r.getTemplateSpans(),d=ahr(a,e,i);if(!d)return;let h=u.map(b=>{let x=b.getExpression(),I=MQ(x,e,i);if(!I)return;let L=b.getLiteral();return I.value+L.getLiteralText()});if(h.every(o6))return d.value+h.join("")},Ukn=(r,e,i,a)=>{let u=r.getParent();if(!u)return;let d=u.getParent();if(d){if(tm.Node.isArrayBindingPattern(u)){let h=u.getChildIndex();if(Number.isNaN(h))return;if(tm.Node.isVariableDeclaration(d)){let b=d.getInitializer();if(!b)return;let x=Ux(b);if(!tm.Node.isArrayLiteralExpression(x))return;let I=x.getElements()[h+1];if(!I)return;let L=[...e,x,I],q=rE(I,L,a);if(!q)return;if(_p.isObject(q)){let me=q.value[i];return _p.from(me,I,L)}if(!_p.isMap(q))return q;let te=q.value.get(i);return te||void 0}}tm.Node.isObjectBindingPattern(u)}};function chr(r,e,i,a){let u=e.at(-1);if(tm.Node.isVariableDeclaration(r)){let d=r.getInitializer();if(!d){let I=r.getTypeNode();if(!I)return;if(tm.Node.isTypeLiteral(I)){if(e.length>0){let q=[...i];q.push(I);let te=e.pop(),me=I.getProperty(te),Ee=me?.getTypeNode();for(;me&&e.length>0&&Ee&&tm.Node.isTypeLiteral(Ee);)q.push(me,Ee),te=e.pop(),me=Ee.getProperty(te),Ee=me?.getTypeNode();if(!Ee)return;let ke=Izt(Ee,q,a);return _p.from(ke,Ee,q)}let L=Hkn(I,u,i,a);return i.push(I),_p.from(L,I,i)}return}let h=Ux(d);if(tm.Node.isObjectLiteralExpression(h)){let I=wzt(h,e,i,a);return I?(i.push(h),I):void 0}if(tm.Node.isArrayLiteralExpression(h)){let I=Number(u);if(Number.isNaN(I))return;let L=h.getElements()[I];if(!L)return;i.push(h);let q=rE(L,i,a);if(q&&ORe(q)&&_p.isLiteral(q))return q}let b=[...i,h],x=rE(h,b,a);if(x)return x}if(tm.Node.isBindingElement(r)){let d=Ukn(r,i,u,a);if(d)return d}}var LQ=(r,e,i,a)=>{let u=mbt(r,i,a);if(!u)return _p.unresolvable(r,i);let d=chr(u,e,i,a);return d||_p.unresolvable(r,i)},k1e=new WeakMap,Hkn=(r,e,i,a)=>{if(k1e.has(r)){let h=k1e.get(r);if(h===null)return;if(h?.has(e))return h.get(e)}let d=r.getMembers().find(h=>tm.Node.isPropertySignature(h)&&h.getName()===e);if(tm.Node.isPropertySignature(d)&&d.isReadonly()){let h=d.getTypeNode();if(!h){k1e.set(r,null);return}let b=Izt(h,i,a);if(o6(b))return k1e.has(r)||k1e.set(r,new Map),k1e.get(r).set(e,b),b}k1e.set(r,null)};function uhr(r){return tm.Node.isStringLiteral(r)?r.getLiteralText():r.getText()}var WYe=new WeakMap,Izt=(r,e,i)=>{if(WYe.has(r))return WYe.get(r);if(tm.Node.isLiteralTypeNode(r)){let a=r.getLiteral();if(tm.Node.isStringLiteral(a)){let u=a.getLiteralText();return WYe.set(r,u),u}}if(tm.Node.isTypeLiteral(r)){let a=r.getMembers();if(!a.some(u=>!tm.Node.isPropertySignature(u)||!u.isReadonly())){let d=a.map(b=>{let x=b.getNameNode(),I=x.getText(),L=uhr(x);if(!L)return;let q=Hkn(r,I,e,i);return[L,q]}).filter(o6),h=Object.fromEntries(d);return WYe.set(r,h),h}}WYe.set(r,void 0)},phr=(r,e,i)=>{if(tm.Node.isShorthandPropertyAssignment(r)){let a=r.getNameNode();return LQ(a,[a.getText()],e,i)}if(tm.Node.isVariableDeclaration(r)){let a=r.getInitializer();if(!a){let b=r.getTypeNode();if(!b)return;if(tm.Node.isTypeLiteral(b)){e.push(b);let x=Izt(b,e,i);if(o6(x))return _p.from(x,r,e)}return _p.unresolvable(r,e)}let u=Ux(a),d=[...e,u],h=rE(u,d,i);if(h)return h}if(tm.Node.isBindingElement(r)){let a=r.getInitializer();if(!a){let b=r.getPropertyNameNode()??r.getNameNode(),x=b.getText(),I=[...e,b],L=Ukn(r,I,x,i);return L||_p.unresolvable(r,e)}let u=Ux(a),d=[...e,u],h=rE(u,d,i);if(h)return h}},Jkn=(r,e,i,a)=>{let u=e.getVariableDeclaration(r);if(u)return u;let d=dhr(r,e,i,a);if(d)return d},fhr=(r,e)=>{let i=e.getNamedExports();if(i.length===0)return!0;for(let a of i)if(a.getNameNode().getText()===r)return!0},qkn=r=>{let e=r.getProject(),i=r.getModuleSpecifierValue();if(!i)return;let a=r.getSourceFile().getFilePath(),u=tm.ts.resolveModuleName(i,a,e.getCompilerOptions(),e.getModuleResolutionHost());return u.resolvedModule?e.addSourceFileAtPath(u.resolvedModule.resolvedFileName):void 0};function dhr(r,e,i,a){for(let u of e.getExportDeclarations()){let d=[u];if(!fhr(r,u))continue;let h=qkn(u);if(!h)continue;d.push(h);let b=Jkn(r,h,i,a);if(b)return i.push(...d.concat(b)),b}}var mhr=(r,e,i)=>{let a=mbt(r,e,i);if(!a)return _p.unresolvable(r,e);let u=Ux(a),d=[...e],h=phr(u,d,i);return h||_p.unresolvable(r,d)},Kkn=(r,e,i)=>{let a=Ux(r.getLeft()),u=Ux(r.getRight()),d=MQ(a,e,i),h=MQ(u,e,i);if(!(!d||!h)&&o6(d.value)&&o6(h.value))return _p.literal(String(d.value)+String(h.value),r,e)},fbt=(r,e,i)=>{let a=Ux(r.getExpression()),u=r.getArgumentExpression();if(!u)return;let d=Ux(u),h=[...e,a,d],b=MQ(d,h,i);if(tm.Node.isIdentifier(a)&&b)return o6(b.value)?LQ(a,[b.value.toString()],h,i):void 0;if(tm.Node.isBinaryExpression(d)){if(d.getOperatorToken().getKind()!==tm.ts.SyntaxKind.PlusToken)return;let x=Kkn(d,h,i)??MQ(d,h,i);if(x&&tm.Node.isIdentifier(a))return o6(x.value)?LQ(a,[x.value.toString()],h,i):void 0}if(tm.Node.isTemplateExpression(d)){let x=Vkn(d,h,i);if(x&&tm.Node.isIdentifier(a))return LQ(a,[x],h,i)}if(tm.Node.isObjectLiteralExpression(a)&&b)return o6(b.value)?wzt(a,[b.value.toString()],h,i):void 0;if(tm.Node.isPropertyAccessExpression(d))return dbt(d,[],h,i);if(tm.Node.isPropertyAccessExpression(a)&&b&&o6(b.value)){let x=dbt(a,[],h,i);if(!x)return _p.unresolvable(a,h);let I=b.value.toString();if(_p.isObject(x)){let L=x.value[I];return _p.from(L,d,h)}if(_p.isMap(x)){let L=x.value.get(I);return _p.from(L,d,h)}if(_p.isArray(x)){let L=x.value[Number(I)];return _p.from(L,d,h)}return _p.unresolvable(a,h)}if(tm.Node.isIdentifier(a)&&tm.Node.isElementAccessExpression(d)){let x=fbt(d,h,i);if(typeof x=="string"&&o6(x))return LQ(a,[x],h,i)}if(tm.Node.isElementAccessExpression(a)&&b&&o6(b.value)){let x=fbt(a,h,i);if(Okn(x)){let I=b.value.toString();if(_p.isMap(x))return x.value.get(I);if(_p.isObject(x)){let L=x.value[I];return L?_p.from(L,r,h):void 0}}}if(tm.Node.isArrayLiteralExpression(a)&&b)return _hr(a,Number(b.value),h,i);if(tm.Node.isConditionalExpression(d)){if(i.flags?.skipConditions)return _p.unresolvable(d,h);let x=MQ(d,h,i);if(o6(x)&&o6(x.value)&&tm.Node.isIdentifier(a))return LQ(a,[x.value.toString()],h,i);let I=Ux(d.getWhenTrue()),L=Ux(d.getWhenFalse()),q=MQ(I,h,i),te=MQ(L,h,i);if(tm.Node.isIdentifier(a)){let me=q&&o6(q.value)?LQ(a,[q.value.toString()],h,i):void 0,Ee=te&&o6(te.value)?LQ(a,[te.value.toString()],h,i):void 0;return!me&&!Ee?void 0:me&&!Ee?me:!me&&Ee?Ee:_p.conditional(me,Ee,d,h)}}},_hr=(r,e,i,a)=>{let u=r.getElements()[e];if(!u)return;let d=rE(u,i,a);if(o6(d))return d},dbt=(r,e,i,a)=>{let u=r.getName(),d=Ux(r.getExpression()),h=e.concat(u);if(i.push(d),tm.Node.isIdentifier(d))return LQ(d,h,i,a);if(tm.Node.isPropertyAccessExpression(d))return dbt(d,h,i,a);if(tm.Node.isElementAccessExpression(d)){let b=fbt(d,i,a);if(!b)return;if(_p.isObject(b)){let x=b.value[u];return _p.from(x,r,i)}if(_p.isMap(b)){let x=b.value.get(u);return _p.from(x,r,i)}}},Lkn=()=>!0,_bt=(r,e,i=Lkn,a=Lkn)=>{let u=r.getArguments(),d=r.getExpression().getText();return u.length===0?_p.array([],r,[]):_p.array(u.map((h,b)=>{let x=Ux(h),I=[r,x];return SB(x).when(L=>a({fnNode:r,fnName:d,argNode:L,index:b}),L=>rE(L,I,e,i)??_p.unresolvable(L,I)).otherwise(()=>_p.unresolvable(x,I))}),r,[])},hbt=(r,e)=>{let i=r.getInitializer(),a=[r,i];return SB(i).with(xD.nullish,()=>{let u=r.getNameNode();return _p.emptyInitializer(u,a)}).when(Tzt.Node.isStringLiteral,u=>{let d=u.getLiteralText();return _p.literal(Wkn(d),u,a)}).when(Tzt.Node.isJsxExpression,u=>{let d=u.getExpression();if(!d)return;let h=Ux(d);if(!h)return;a.push(h);let b=rE(h,a,e);if(b)return b}).otherwise(()=>{})},Xkn=(r,e,i)=>{let a=Ux(r.getExpression());return rE(a,[],e,i)},Mkn=(r,e)=>r?ORe(r)?_p.isUnresolvable(r)||_p.isConditional(r)?new Map:_p.isMap(r)?r.value:new Map(Object.entries(r.value).map(([i,a])=>{let u=_p.from(a,r.getNode()??e,r.getStack()??[]);return[i,u||null]}).filter(([,i])=>i!==null)):new Map(Object.entries(r)):new Map,hhr=Z3.or(FJ.Node.isImportDeclaration,FJ.Node.isExportDeclaration),Ykn=({ast:r,...e})=>{let{components:i,functions:a,taggedTemplates:u}=e,d=new Map,h=new Map,b,x,I,L,q;return r.forEachDescendant((te,me)=>{if(hhr(te)){me.skip();return}if(i){if(FJ.Node.isJsxOpeningElement(te)||FJ.Node.isJsxSelfClosingElement(te)){if(b=te,x=W_r(b),I=x.includes("."),!i.matchTag({tagNode:b,tagName:x,isFactory:I})){b=void 0;return}d.has(x)||d.set(x,{kind:"component",nodesByProp:new Map,queryList:[]}),L=d.get(x).nodesByProp,h.has(b)||h.set(b,{name:x,props:new Map,conditionals:[]}),q=h.get(b)}if(FJ.Node.isJsxSpreadAttribute(te)){if(!b||!q)return;let Ee=({propName:We,propNode:Tt})=>i.matchProp({tagNode:b,tagName:x,propName:We,propNode:Tt}),ke=Xkn(te,e,dQ(Ee));if(!ke)return;let Ue=We=>{let Tt=Mkn(We,te),Vt=_p.isMap(We),un=_p.map(Tt,te,[b]);Vt&&We.spreadConditions?.length&&(un.spreadConditions=We.spreadConditions),Tt.forEach((Jn,Dn)=>{Ee({propName:Dn,propNode:te})&&(q.props.set(Dn,Jn),L.set(Dn,(L.get(Dn)??[]).concat(Jn)))})};(We=>SB(We).when(_p.isConditional,Tt=>{q.conditionals.push(Tt)}).when(Z3.or(_p.isObject,_p.isMap),Tt=>Ue(Tt)).otherwise(ggt))(ke);return}if(FJ.Node.isJsxAttribute(te)){if(!b||!q)return;let Ee=te.getNameNode().getText();if(!i.matchProp({tagNode:b,tagName:x,propName:Ee,propNode:te}))return;GN(hbt(te,e),NXe.fromNullable,NXe.tap(ke=>{q.props.set(Ee,ke),L.set(Ee,(L.get(Ee)??[]).concat(ke))}))}}if(a&&FJ.Node.isCallExpression(te)){let Ee=te.getExpression(),ke=FJ.Node.isCallExpression(Ee)?Ee.getExpression().getText():Ee.getText();if(!a.matchFn({fnNode:te,fnName:ke}))return;let Ue=({propName:Jn,propNode:Dn})=>a.matchProp({fnNode:te,fnName:ke,propName:Jn,propNode:Dn});d.has(ke)||d.set(ke,{kind:"function",nodesByProp:new Map,queryList:[]});let Fe=d.get(ke),We=Fe.nodesByProp,Tt=_bt(te,e,Ue,a.matchArg),Vt=GN(Tt.value,Aj.map(Jn=>SB(Jn).when(Z3.or(_p.isObject,_p.isMap),Dn=>{let mn=Mkn(Dn,te),qn=_p.isMap(Dn);mn.forEach((nn,ha)=>{(qn||Ue({propName:ha,propNode:te}))&&We.set(ha,(We.get(ha)??[]).concat(nn))});let ur=_p.map(mn,te,Dn.getStack());return _p.isMap(Dn)&&Dn.spreadConditions?.length&&(ur.spreadConditions=Dn.spreadConditions),ur}).otherwise(Dn=>Dn))),un={kind:"call-expression",name:ke,box:_p.array(Vt,te,[])};Fe.queryList.push(un)}if(u&&FJ.Node.isTaggedTemplateExpression(te)){let Ee=te.getTag(),ke=FJ.Node.isCallExpression(Ee)?Ee.getExpression().getText():Ee.getText();if(!u.matchTaggedTemplate({taggedTemplateNode:te,fnName:ke}))return;d.has(ke)||d.set(ke,{kind:"function",nodesByProp:new Map,queryList:[]});let Ue=d.get(ke),Fe={kind:"tagged-template",name:ke,box:rE(te,[],e)};Ue.queryList.push(Fe)}}),h.forEach((te,me)=>{let Ee=h.get(me);if(!Ee)return;let ke=dQ({name:te.name,box:_p.map(Ee.props,me,[])});Ee.conditionals?.length&&(ke.box.spreadConditions=Ee.conditionals);let Ue=te.name;d.get(Ue).queryList.push(ke)}),d},ghr=Z3.or(_p.isObject,_p.isMap),Qkn=(r,e)=>{let i=r.getTagNameNode().getText(),a=r.getAttributes(),u=new Map;return a.forEach(d=>{if(Azt.Node.isJsxAttribute(d)){let h=d.getNameNode(),b=hbt(d,e);if(!b)return;u.set(h.getText(),b);return}if(Azt.Node.isJsxSpreadAttribute(d)){let h=Xkn(d,e,()=>!0);if(!ghr(h))return;_p.isMap(h)&&h.value.forEach((b,x)=>{u.set(x,b)}),_p.isObject(h)&&Object.entries(h.value).forEach(([b,x])=>{u.set(b,_p.literal(x,r,[]))})}}),{name:i,props:u}},pbt=(r,e)=>{if(!r.length)return e;let i={};return r.reduce((a,u,d)=>{let h=d===r.length-1;return a[u]=h?e:{},h?i:a[u]},i),i},Tfe=(r,e)=>SB(r).with(xD.nullish,()=>{}).when(_p.isConditional,i=>{let a=e.path,u=Tfe(i.whenTrue,Object.assign({},e,{path:a,parent:i})),d=Tfe(i.whenFalse,Object.assign({},e,{path:a,parent:i}));u&&e.conditions.push(pbt(a,u)),d&&e.conditions.push(pbt(a,d))}).when(Z3.or(_p.isLiteral,_p.isObject),i=>i.value).when(_p.isEmptyInitializer,()=>!0).when(_p.isMap,i=>{if(i.spreadConditions){let a=e.path;i.spreadConditions.forEach(u=>{let d=Tfe(u.whenTrue,Object.assign({},e,{path:a,parent:i})),h=Tfe(u.whenFalse,Object.assign({},e,{path:a,parent:i}));d&&e.spreadConditions.push(pbt(a,d)),h&&e.spreadConditions.push(pbt(a,h))})}return GN(Aj.from(i.value.entries()),Aj.map(([a,u])=>[a,Tfe(u,Object.assign({},e,{path:e.path.concat(a),parent:i}))]),Aj.filter(([,a])=>o6(a)),Object.fromEntries)}).when(_p.isArray,i=>{let a=0;return GN(i.value,Aj.map(u=>Tfe(u,Object.assign({},e,{path:e.path.concat(String(a++)),parent:i}))),u=>u.flat())}).otherwise(()=>{}),Bhr=new WeakMap,yhr=r=>({value:r,has:e=>r.has(e),get:e=>r.get(e),set:(e,i)=>r.set(e,i)}),OJ=(r,e)=>{let i={cache:e?.cache??Bhr,...e,path:[],parent:void 0,conditions:[],spreadConditions:[]},a=yhr(i.cache);return{raw:SB(r).with(xD.nullish,()=>{}).when(a.has,a.get).when(Array.isArray,d=>{let h=GN(d,Aj.map(b=>Tfe(b,i)),Aj.filter(o6),Aj.head);return a.set(d,h),h}).otherwise(d=>{let h=Tfe(d,i);return a.set(d,h),h})??{},conditions:i.conditions,spreadConditions:i.spreadConditions}};ae();ae();ae();ae();function zYe(r){return Object.prototype.toString.call(r).slice(8,-1)}function Chr(r){return zYe(r)==="Undefined"}function vhr(r){return zYe(r)==="Null"}function jYe(r){if(zYe(r)!=="Object")return!1;let e=Object.getPrototypeOf(r);return e.constructor===Object&&e===Object.prototype}function Pzt(r){return zYe(r)==="Array"}function Nzt(r){return zYe(r)==="Symbol"}var Fvi=bhr(vhr,Chr);function bhr(r,e,i,a,u){return d=>r(d)||e(d)||!!i&&i(d)||!!a&&a(d)||!!u&&u(d)}function Shr(r,e){return Pzt(r)&&Pzt(e)?r.concat(e):e}function $kn(r,e,i,a){let u={}.propertyIsEnumerable.call(a,e)?"enumerable":"nonenumerable";u==="enumerable"&&(r[e]=i),u==="nonenumerable"&&Object.defineProperty(r,e,{value:i,enumerable:!1,writable:!0,configurable:!0})}function Zkn(r,e,i){if(!jYe(e))return e;let a={};if(jYe(r)){let b=Object.getOwnPropertyNames(r),x=Object.getOwnPropertySymbols(r);a=[...b,...x].reduce((I,L)=>{let q=r[L];return(!Nzt(L)&&!Object.getOwnPropertyNames(e).includes(L)||Nzt(L)&&!Object.getOwnPropertySymbols(e).includes(L))&&$kn(I,L,q,r),I},{})}let u=Object.getOwnPropertyNames(e),d=Object.getOwnPropertySymbols(e);return[...u,...d].reduce((b,x)=>{let I=e[x],L=jYe(r)?r[x]:void 0;L!==void 0&&jYe(I)&&(I=Zkn(L,I,i));let q=i?i(L,I,x):I;return $kn(b,x,q,e),b},a)}function ewn(r,...e){return e.reduce((i,a)=>Zkn(i,a,Shr),r)}var twn=r=>Object.prototype.toString.call(r)==="[object Object]";function Rzt(r,...e){let i=e.pop();for(let a of e)for(let u in a){let d=i(r[u],a[u]);d===void 0?twn(r[u])&&twn(a[u])?r[u]=Rzt({},r[u],a[u],i):r[u]=a[u]:r[u]=d}return r}function nwn(r,...e){for(let i of e)for(let a in i)r?.hasOwnProperty?.(a)||(r[a]=i[a]);return r}function xhr(r){return r.reduce((e,{extend:i})=>i?Rzt(e,i,(a,u)=>u===void 0?a??[]:a===void 0?[u]:Array.isArray(a)?[u,...a]:[u,a]):e,{})}function Ehr(r){return{...r.reduce((e,i)=>nwn(e,i),{}),extend:xhr(r)}}function VYe(r){let{extend:e=[],...i}=Ehr(r);return Rzt(i,e,(a,u)=>ewn({},a,...u))}var Dhr=r=>typeof r=="object"&&Object.keys(r).length===0,Thr=r=>Object.keys(r).reduce((e,i)=>(r[i]!==void 0&&!Dhr(r[i])&&(e[i]=r[i]),e),{});function rwn(r){let e=nwn({conditions:VYe(r.map(i=>i.conditions??{})),theme:VYe(r.map(i=>i.theme??{})),patterns:VYe(r.map(i=>i.patterns??{})),utilities:VYe(r.map(i=>i.utilities??{})),globalCss:VYe(r.map(i=>i.globalCss??{}))},...r);return Thr(e)}ae();var gbt=require("path"),UYe=(r,e)=>{for(let i of r){let a=e.match(i.pattern);if(a)for(let u of i.paths){let d=0;return u.replace(/\*/g,()=>{let b=Math.min(++d,a.length-1);return a[b]}).split(gbt.sep).join(gbt.posix.sep)}}};ae();var WRe=require("path"),Bbt=require("fs");function iwn(r,e){let i=(0,WRe.resolve)(".",r),a;for((0,Bbt.statSync)(i).isDirectory()||(i=(0,WRe.dirname)(i));;){if(a=e(i,(0,Bbt.readdirSync)(i)),a)return(0,WRe.resolve)(i,a);if(i=(0,WRe.dirname)(a=i),a===i)break}}var pwn=require("path"),HYe=b_(require("fs"),1),GRe=b_(require("path"),1),fwn=require("path"),Lzt=b_(nzt(),1);ae();var own=require("esbuild"),swn=b_(require("path"),1),ybt=b_(require("fs"),1),FQ=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,i)=>(typeof require<"u"?require:e)[i]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});function Ahr(r){let e=ybt.default.realpathSync(r);delete FQ.cache[r];let i=FQ(e);return{mod:i.default??i,dependencies:[e],code:ybt.default.readFileSync(e,"utf-8")}}async function khr(r,e){let i=await(0,own.build)({absWorkingDir:e,entryPoints:[r],outfile:"out.js",write:!1,platform:"node",bundle:!0,format:"cjs",sourcemap:!1,metafile:!0,mainFields:["module","main"]}),{text:a}=i.outputFiles[0];return{code:a,dependencies:i.metafile?Object.keys(i.metafile.inputs):[]}}function whr(r,e){let i=swn.default.extname(r),a=ybt.default.realpathSync(r),u=FQ.extensions[i];FQ.extensions[i]=(b,x)=>{x===a?b._compile(e,x):u(b,x)},delete FQ.cache[FQ.resolve(r)];let d=FQ(r),h=d.default??d;return FQ.extensions[i]=u,h}async function awn(r,e={}){let{cwd:i=process.cwd()}=e,a=FQ.resolve(r,{paths:[i]});try{return Ahr(a)}catch{let u=await khr(a,i);try{u.mod=await whr(a,u.code)}catch{u.mod=FQ("node-eval")(u.code).default}return u}}ae();var lwn=class extends Error{code;hint;constructor(r,e,i){super(e),this.code=`ERR_PANDA_${r}`,this.hint=i?.hint}};var Cbt=class extends lwn{constructor(){let r="Cannot find config file: panda.config.ts or panda.config.js/cjs/mjs/mts/cts. Did you forget to run `panda init`?";super("NO_CONFIG",r)}},cwn=class extends lwn{constructor(r){super("CONFIG_ERROR",r)}};var Mzt=require("@pandacss/preset-base"),bbt=require("@pandacss/preset-panda"),Ihr=[".ts",".js",".mts",".mjs",".cts",".cjs"],Phr=new RegExp(`panda.config(${Ihr.join("|")})$`),Nhr=r=>Phr.test(r);function Rhr({cwd:r,file:e}){return e?(0,pwn.resolve)(r,e):iwn(r,(i,a)=>a.find(Nhr))}function dwn(r,e){let i=Object.keys(r).sort((u,d)=>uwn(d)-uwn(u)),a=[];for(let u of i){let d=r[u];u=Lhr(u).replace(/\*/g,"(.+)"),a.push({pattern:new RegExp("^"+u+"$"),paths:d.map(h=>(0,fwn.resolve)(e,h))})}return a}function uwn(r){let e=r.indexOf("*");return r.substr(0,e).length}function Lhr(r){return r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Mhr=[".js",".cjs",".mjs"],Fhr=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],Ohr=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];function Whr(r,e){for(let i of e){let a=`${r}${i}`;if(HYe.default.existsSync(a)&&HYe.default.statSync(a).isFile())return a}for(let i of e){let a=`${r}/index${i}`;if(HYe.default.existsSync(a))return a}return null}var Ghr=/import[\s\S]*?['"](.{3,}?)['"]/gi,zhr=/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,jhr=/require\(['"`](.+)['"`]\)/gi,Vhr=/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi;function vbt(r,e){let{filename:i,seen:a}=r,{moduleResolution:u,...d}=r.compilerOptions??{},h=Whr(GRe.default.resolve(r.cwd,i),Mhr.includes(r.ext)?Fhr:Ohr);if(h===null||(e&&r.foundModuleAliases.set(e,h),a.size>1&&a.has(h)))return;a.add(h);let b=HYe.default.readFileSync(h,"utf-8"),x=[...b.matchAll(Ghr),...b.matchAll(zhr),...b.matchAll(jhr),...b.matchAll(Vhr)];if(!x.length)return;let I={cwd:GRe.default.dirname(h),ext:GRe.default.extname(h),seen:a,baseUrl:r.baseUrl,pathMappings:r.pathMappings,foundModuleAliases:r.foundModuleAliases};x.forEach(L=>{let q=L[1];if(q[0]==="."){vbt(Object.assign({},I,{filename:q}));return}try{let te=Lzt.default.resolveModuleName(q,h,d,Lzt.default.sys).resolvedModule;if(te&&te.extension===".ts"){vbt(Object.assign({},I,{filename:te.resolvedFileName}));return}if(!r.pathMappings)return;let me=UYe(r.pathMappings,q);if(!me)return;vbt(Object.assign({},I,{filename:me}),q)}catch{}})}function mwn(r,e={pathMappings:[]},i){if(r===null)return{deps:new Set,aliases:new Map};let a=new Map,u=new Set;return u.add(r),vbt({filename:r,ext:GRe.default.extname(r),cwd:GRe.default.dirname(r),seen:u,baseUrl:e.baseUrl,pathMappings:e.pathMappings??[],foundModuleAliases:a,compilerOptions:i}),{deps:u,aliases:a}}async function _wn(r,e){let{mod:i,dependencies:a}=await awn(r,{cwd:e,interopDefault:!0});return{config:i?.default??i,dependencies:a}}async function Uhr(r,e){let i=r.presets??[],a=[r];for(;i.length>0;){let u=await i.shift();if(typeof u=="string"){let d=await _wn(u,e);a.push(await d.config),i.unshift(...await d.config.presets??[])}else a.push(u),i.unshift(...u.presets??[])}return rwn(a)}var hwn={"@pandacss/preset-base":Mzt.preset,"@pandacss/preset-panda":bbt.preset,"@pandacss/dev/presets":bbt.preset},Hhr=Object.keys(hwn),Jhr=r=>Hhr.includes(r);async function gwn(r){let e=await Khr(r);return qhr(e,r.cwd)}async function qhr(r,e){let i=new Set;r.config.eject||i.add(Mzt.preset),r.config.presets?r.config.presets.forEach(u=>{typeof u=="string"&&Jhr(u)?i.add(hwn[u]):i.add(u)}):r.config.eject||i.add(bbt.preset),r.config.presets=Array.from(i);let a=await Uhr(r.config,e);return{...r,config:a}}async function Khr(r){let{cwd:e,file:i}=r,a=Rhr({cwd:e,file:i});if(!a)throw new Cbt;v2.debug("config:path",a);let u=await _wn(a,e);if(typeof u.config!="object")throw new cwn("\u{1F4A5} Config must export or return an object.");return{...u,config:u.config,path:a}}var f5n=require("fs"),kqt=b_(ejt(),1),F2t=require("path");ae();var HRe=require("path"),tjt=require("fs");var _Pn=r=>r===(0,HRe.dirname)(r),tyr=Symbol("stop"),nyr=r=>r===tyr;var Rbt=(r,e=process.cwd())=>{if(typeof r=="function"&&r(e)instanceof Promise)throw new Error("Async matcher can not be used in 'lookItUpSync'");if(typeof r=="string"){let a=(0,HRe.join)(e,r);return(0,tjt.existsSync)(a)?a:_Pn(e)?null:Rbt(r,(0,HRe.dirname)(e))}let i=r(e);return nyr(i)?null:i??(_Pn(e)?null:Rbt(r,(0,HRe.dirname)(e)))};ae();var JRe=b_(require("path"),1),SPn=require("fs"),xPn=b_(require("path"),1);var zJ=b_(require("path"),1),DPn=require("fs"),sjt=require("module"),EI=b_(require("path"),1),TPn=require("fs");async function hPn(r,e){let i=JRe.default.dirname(JRe.default.resolve(r)),a=e?.root?JRe.default.resolve(e.root):null;for(;i;){let u=await ryr(i,e);if(u)return u;{if(a===i)break;let d=JRe.default.dirname(i);if(d===i)break;i=d}}throw new Error(`no tsconfig file found for ${r}`)}async function ryr(r,e){let i=JRe.default.join(r,"tsconfig.json");if(e?.tsConfigPaths)return e.tsConfigPaths.has(i)?i:void 0;try{let a=await SPn.promises.stat(i);if(a.isFile()||a.isFIFO())return i}catch(a){if(a.code!=="ENOENT")throw a}}var Tbi=xPn.default.sep;function iyr(r){let e=oyr(syr(ayr(r)));return e.trim()===""?"{}":e}function oyr(r){let e=!1,i=0,a="",u=null;for(let d=0;d<r.length;d++){let h=r[d];if(h==='"'&&(EPn(r,d)||(e=!e)),e){u=null;continue}if(h===","){u=d;continue}u&&(h==="}"||h==="]"?(a+=r.slice(i,u)+" ",i=u+1,u=null):h.match(/\s/)||(u=null))}return a+r.substring(i)}function EPn(r,e){let i=e-1,a=0;for(;r[i]==="\\";)i-=1,a+=1;return!!(a%2)}function Lbt(r,e,i){return r.slice(e,i).replace(/\S/g," ")}var njt=Symbol("singleComment"),gPn=Symbol("multiComment");function syr(r){let e=!1,i=!1,a=0,u="";for(let d=0;d<r.length;d++){let h=r[d],b=r[d+1];!i&&h==='"'&&(EPn(r,d)||(e=!e)),!e&&(!i&&h+b==="//"?(u+=r.slice(a,d),a=d,i=njt,d++):i===njt&&h+b===`\r
30776
+ ${u}`),r?dBt(u,{minify:e}):u}catch(i){throw i instanceof WZt&&(v2.error("sheet",i.message),i.plugin&&v2.error("sheet",`By plugin: ${i.plugin}:`),i.source&&(v2.error("sheet",`Line ${i.line}:${i.column}, in:`),v2.error("sheet",i.source))),i}};append=(...r)=>{this.context.root.append(...r)};prepend=(...r)=>{this.context.root.prepend(...r)}},bxn=class{tokens;classNames=new Map;styles=new Map;shorthands=new Map;types=new Map;propertyKeys=new Map;config={};customValues=new Map;transforms=new Map;configs=new Map;separator="_";prefix="";strictTokens=!1;constructor(r){let{tokens:e,config:i={},separator:a,prefix:u,shorthands:d,strictTokens:h}=r;this.tokens=e,this.config=i,a&&(this.separator=a),u&&(this.prefix=u),h&&(this.strictTokens=h),d&&this.assignShorthands(),this.assignColorPaletteProperty(),this.assignProperties(),this.assignPropertyTypes()}register=(r,e)=>{this.assignProperty(r,e),this.assignPropertyType(r,e),this.config[r]=e};assignShorthands=()=>{for(let[r,e]of Object.entries(this.config)){let{shorthand:i}=this.normalize(e)??{};if(!i)continue;(Array.isArray(i)?i:[i]).forEach(u=>{this.shorthands.set(u,r)})}};assignColorPaletteProperty=()=>{let r=this.tokens.colorPalettes;this.config.colorPalette={values:Object.keys(r),transform(e){return r[e]}}};resolveShorthand=r=>this.shorthands.get(r)??r;get hasShorthand(){return this.shorthands.size>0}get isEmpty(){return Object.keys(this.config).length===0}entries=()=>Object.entries(this.config).filter(([,e])=>!!e?.className).map(([e,i])=>[e,i.className]);getPropKey=(r,e)=>`(${r} = ${e})`;hash=(r,e)=>`${r}${this.separator}${e}`;getPropertyValues=(r,e)=>{let{values:i}=r,a=u=>{let d=e?.(u);return d?{[d]:d}:void 0};return bj(i)?a?.(i)??this.tokens.getValue(i)??{}:Array.isArray(i)?i.reduce((u,d)=>(u[d]=d,u),{}):c8t(i)?i(e?a:this.getToken.bind(this)):i};getToken=r=>this.tokens.get(r);normalize=r=>r;assignProperty=(r,e)=>{let i=this.normalize(e);if(this.setTransform(r,i?.transform),!i)return;this.configs.set(r,i);let a=this.getPropertyValues(i);if(a)for(let[u,d]of Object.entries(a)){let h=this.getPropKey(r,u);this.setStyles(r,d,u,h),this.setClassName(r,u)}};assignProperties=()=>{for(let[r,e]of Object.entries(this.config))e&&this.assignProperty(r,e)};getPropertyKeys=r=>{let e=this.propertyKeys.get(r);return e?Array.from(e):[]};assignPropertyType=(r,e)=>{let i=this.normalize(e);if(!i)return;let a=this.getPropertyValues(i,d=>`type:Tokens["${d}"]`);if(typeof a=="object"&&a.type){this.types.set(r,new Set([`type:${a.type}`]));return}if(a){let d=new Set(Object.keys(a));this.types.set(r,d),this.propertyKeys.set(r,d)}let u=this.types.get(r)??new Set;!this.strictTokens&&i.property&&this.types.set(r,u.add(`CssProperties["${i.property}"]`))};assignPropertyTypes=()=>{for(let[r,e]of Object.entries(this.config))e&&this.assignPropertyType(r,e)};getTypes=()=>{let r=new Map;for(let[e,i]of this.types.entries()){if(i.size===0){r.set(e,["string"]);continue}let a=Array.from(i).map(u=>u.startsWith("CssProperties")?u:u.startsWith("type:")?u.replace("type:",""):JSON.stringify(u));r.set(e,a)}return r};defaultTransform=zE((r,e)=>{if(e.startsWith("--")){let a=this.tokens.getTokenVar(r);r=typeof a=="string"?a:r}return{[e]:r}});setTransform=(r,e)=>{let a=e??(u=>this.defaultTransform(u,r));return this.transforms.set(r,a),this};setStyles=(r,e,i,a)=>{a=a??this.getPropKey(r,e);let u=x=>this.defaultTransform(x,r),d=this.transforms.get(r)??u,h=Object.assign(this.getToken.bind(this),{raw:x=>this.tokens.getByName(x)}),b=d(e,{token:h,raw:i});return this.styles.set(a,b??{}),this};formatClassName=r=>[this.prefix,r].filter(Boolean).join("-");setClassName=(r,e)=>{let i=this.getPropKey(r,e),a=this.configs.get(r),u;return!a||!a.className?u=this.hash(Fve(r),e):u=this.hash(a.className,e),this.classNames.set(i,u),this};isProperty=r=>this.configs.has(r);getOrCreateClassName=(r,e)=>((a,u)=>{let d=this.getPropKey(a,u);return this.classNames.has(d)||(this.isProperty(a)&&this.customValues.set(a,u),this.setClassName(a,u)),this.classNames.get(d)})(r,e);getOrCreateStyle=(r,e)=>{let i=this.getPropKey(r,e);return this.styles.get(i)??this.setStyles(r,e,e,i),this.styles.get(i)};transform=(r,e)=>{if(e==null)return{className:"",styles:{}};let i=this.resolveShorthand(r);return Upe({layer:this.configs.get(i)?.layer,className:this.getOrCreateClassName(i,NKe(e)),styles:this.getOrCreateStyle(i,e)})};keys=()=>{let r=Array.from(this.shorthands.keys()),e=Object.keys(this.config);return[...r,...e]};getPropShorthandsMap=()=>{let r=new Map;return this.shorthands.forEach((e,i)=>{let a=r.get(e)??[];a.push(i),r.set(e,a)}),r};getPropShorthands=r=>this.getPropShorthandsMap().get(r)??[]};ae();ae();var FRe=b_(NW(),1);var tm=b_(NW(),1);ae();var Pdr=b_(nzt(),1),RW=b_(UAn(),1);ae();var Mj=b_(require("path"),1),JAn=b_(require("os"),1),pdr=/(^\/\w:\/)|(^\/\w:\\)/,HAn=Mj.default.parse(process.cwd()).root,qAn=/^\w:/,fdr=JAn.default.platform();function ddr(r){return/\\/.test(r)||qAn.test(r)}function KAn(r){let e=/^\\\\\?\\/.test(r),i=/[^\u0000-\u0080]+/.test(r);return e||i?r:r.replace(/\\/g,"/")}function mdr(r){let e=typeof r=="string"?r:r.pathname;return e.startsWith("file:")&&(e.startsWith("file://")&&(e=e.slice(7)),pdr.test(e)&&(e=e.slice(1))),rzt(e)}function XAn(r){return[...r].some(e=>typeof e=="string"&&ddr(e))?Mj.default.win32:Mj.default}function Sfe(r,e){return KAn(XAn(e)[r](...e))}function YAn(r,e){return Mj.default.posix[r](...[...e].map(i=>typeof i=="string"?KAn(i):i))}function _dr(r){return YAn("parse",arguments)}function hdr(r){return YAn("extname",arguments)}function gdr(r){return XAn(arguments).isAbsolute(r)}function Bdr(...r){return Sfe("join",arguments)}function rzt(r){let e=Sfe("normalize",arguments);return r.startsWith("./")&&!e.startsWith("./")?"./"+e:e}function ydr(r,e){return Sfe("relative",arguments)}function Cdr(...r){return Sfe("resolve",arguments)}function vdr(r){return Sfe("dirname",arguments)}function bdr(r,e){return Sfe("basename",arguments)}function Sdr(r){return Sfe("format",arguments)}function xdr(r){return Sfe("toNamespacedPath",arguments)}function Edr(r){return fdr!=="win32"||qAn.test(r)||r.startsWith(HAn)||!Mj.default.win32.isAbsolute(Mj.default.win32.normalize(r))?r:Mj.default.win32.join(HAn,r)}var izt={sep:Mj.default.posix.sep,delimiter:Mj.default.posix.delimiter,parse:_dr,isAbsolute:gdr,join:Bdr,extname:hdr,normalize:rzt,relative:ydr,resolve:Cdr,dirname:vdr,basename:bdr,format:Sdr,toNamespacedPath:xdr,get posix(){return this},get win32(){return QAn}},QAn={...Mj.default.win32,get posix(){return izt},get win32(){return this}},Ddr=Mj.default,D1e={...izt,posix:izt,win32:QAn,native:Ddr,includeDriveLetter:Edr,urlToFilename:mdr};var ukn=require("module"),pkn=require("util"),fkn=b_(rkn(),1),sbt=()=>{let r={Infinity:1/0,NaN:NaN,undefined:void 0,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Array,Boolean,Date,Error,EvalError,Number,Object,RangeError,ReferenceError,RegExp,String,SyntaxError,TypeError,URIError,JSON,Math,escape,unescape,eval,Function};try{r.AggregateError=AggregateError}catch{}try{r.FinalizationRegistry=FinalizationRegistry}catch{}try{r.WeakRef=WeakRef}catch{}try{r.BigInt=BigInt}catch{}try{r.Reflect=Reflect}catch{}try{r.WeakMap=WeakMap}catch{}try{r.WeakSet=WeakSet}catch{}try{r.Set=Set}catch{}try{r.Map=Map}catch{}try{r.Uint8Array=Uint8Array}catch{}try{r.BigUint64Array=BigUint64Array}catch{}try{r.BigInt64Array=BigInt64Array}catch{}try{r.Atomics=Atomics}catch{}try{r.SharedArrayBuffer=SharedArrayBuffer}catch{}try{r.WebAssembly=WebAssembly}catch{}try{r.Uint8ClampedArray=Uint8ClampedArray}catch{}try{r.Uint16Array=Uint16Array}catch{}try{r.Uint32Array=Uint32Array}catch{}try{r.Intl=Intl}catch{}try{r.Int8Array=Int8Array}catch{}try{r.Int16Array=Int16Array}catch{}try{r.Int32Array=Int32Array}catch{}try{r.Float32Array=Float32Array}catch{}try{r.Float64Array=Float64Array}catch{}try{r.ArrayBuffer=ArrayBuffer}catch{}try{r.DataView=DataView}catch{}try{r.isFinite=isFinite}catch{}try{r.Promise=Promise}catch{}try{r.Proxy=Proxy}catch{}try{r.Symbol=Symbol}catch{}return r};function Efe(r,e,i){let a={};return[r,e??{},i??{}].forEach(h=>Object.defineProperties(a,Object.getOwnPropertyDescriptors(h))),a}function $1t(r,e){let i={};return Object.getOwnPropertyNames(r).forEach(a=>{a in e||Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(r,a))}),i}var dkn=(0,ukn.createRequire)(dt),Ndr=()=>{let r=sbt(),e=Efe($1t(global,r),r,{require:dkn,process,__dirname:i=>D1e.native.normalize(D1e.native.dirname(i)),__filename:i=>D1e.native.normalize(i)});return Object.defineProperties(e,{global:{get(){return e}},globalThis:{get(){return e}}}),e};function Rdr(r){let e=0;return{requestAnimationFrame:function(d){let h=new Date().getTime(),b=Math.max(0,16-(h-e)),x=r.setTimeout(function(){d(h+b)},b);return e=h+b,x},cancelAnimationFrame:function(d){clearTimeout(d)}}}var X1t;function Ldr(r=!1){return X1t??(X1t=Mdr("evaluate against a browser environment",r,"jsdom"))}function Mdr(r,e,i=r){try{return dkn(i)}catch{if(e)throw new ReferenceError(`You must install the peer dependency '${i}' in order to ${r} with ts-evaluator`);return}}var Fdr=()=>{let{JSDOM:r}=Ldr(!0),{window:e}=new r("",{url:"https://example.com"}),i=sbt(),a=Rdr(e),u=Efe($1t(e,i),$1t(a,e),i);return Object.defineProperties(u,{window:{get(){return u}},globalThis:{get(){return u}}}),u},Vx="[return]",u8="[break]",G7="[continue]",z7="this",T1e="super",Odr=()=>{let r=sbt(),e=Efe($1t(global,r),r,{import:{meta:{url:i=>{let a=D1e.normalize(i);return`file:///${a.startsWith("/")?a.slice(1):a}`}}},process});return Object.defineProperties(e,{global:{get(){return e}},globalThis:{get(){return e}}}),e};function mkn(r,e){return e.isDeclaration(r)}function Wdr(r,e){return e.isPropertyAccessExpression(r)?!1:"name"in r&&r.name!=null}function _kn(r,e){return r.flags!==e.NodeFlags.Const&&r.flags!==e.NodeFlags.Let}var j7=class extends Error{constructor({node:e,environment:i,message:a}){super(a),Error.captureStackTrace(this,this.constructor),this.node=e,this.environment=i}};function wre(r){return typeof r=="object"&&r!=null&&r instanceof j7}var Z1t=class extends j7{constructor({path:e,node:i,environment:a,message:u=`Module '${e}' could not be resolved'`}){super({message:u,environment:a,node:i}),this.path=e}},mR=class extends j7{constructor({node:e,environment:i,typescript:a,message:u=`Unexpected Node: '${a.SyntaxKind[e.kind]}'`}){super({message:u,node:e,environment:i})}};function Gdr(r){var e;let{node:i,evaluate:a,environment:u,typescript:d,throwError:h}=r,b=d.getNameOfDeclaration(i);if(b!=null)return d.isIdentifier(b)||!((e=d.isPrivateIdentifier)===null||e===void 0)&&e.call(d,b)||d.isStringLiteralLike(b)?b.text:d.isNumericLiteral(b)?Number(b.text):d.isComputedPropertyName(b)?a.expression(b.expression,r):h(new mR({node:b,environment:u,typescript:d}))}function hkn(r,e){let{node:i,typescript:a}=e;if(!a.isExternalModuleNameRelative(r))return r;let u=i.getSourceFile().fileName;return D1e.join(D1e.dirname(u),r)}function ebt(r){var e,i,a,u,d;let{node:h,typescript:b,throwError:x,environment:I}=r,L=Gdr(r);if(wre(L))return L;if(L==null)return x(new mR({node:h,environment:I,typescript:b}));let q=gw(h,r.environment,L);if(q!=null&&q.literal!=null)return q.literal;let te=gw(h,r.environment,"require").literal,me=b.isModuleDeclaration(h)?h:zdr(h,b.SyntaxKind.ModuleDeclaration,b);if(me==null)return x(new mR({node:h,environment:I,typescript:b}));let Ee=me.name.text,ke=hkn(Ee,r);try{let Ue=(u=(i=(e=r.moduleOverrides)===null||e===void 0?void 0:e[Ee])!==null&&i!==void 0?i:(a=r.moduleOverrides)===null||a===void 0?void 0:a[ke])!==null&&u!==void 0?u:te(ke);return b.isModuleDeclaration(h)?Ue:(d=Ue[L])!==null&&d!==void 0?d:Ue}catch(Ue){return wre(Ue)?Ue:x(new Z1t({node:me,environment:I,path:ke}))}}function Y1t(r,e,i){var a,u,d,h,b,x;let{node:I,throwError:L,environment:q}=i,te=gw(I,i.environment,"require").literal,me=hkn(e,i);try{let Ee=(h=(u=(a=i.moduleOverrides)===null||a===void 0?void 0:a[e])!==null&&u!==void 0?u:(d=i.moduleOverrides)===null||d===void 0?void 0:d[me])!==null&&h!==void 0?h:te(me);return(x=(b=Ee[r])!==null&&b!==void 0?b:Ee.default)!==null&&x!==void 0?x:Ee}catch(Ee){return wre(Ee)?Ee:L(new Z1t({node:I,environment:q,path:me}))}}function zdr(r,e,i){let a=r;for(;;){if(a=a.parent,a==null)return;if(a.kind===e){let u=i.getCombinedNodeFlags(a);if(!((u&i.NodeFlags.Namespace)!==0||(u&i.NodeFlags.NestedNamespace)!==0))return a}if(i.isSourceFile(a))return}}function yzt(r,e,i,a=new WeakSet){let{typescript:u}=i,d;function h(x,I=0){var L,q,te,me,Ee;if(a.has(x))return!1;if(a.add(x),u.isIdentifier(x)){if(x.text===e)return d=x,!0}else{if(u.isShorthandPropertyAssignment(x))return!1;if(u.isPropertyAssignment(x))return!1;if(u.isImportDeclaration(x)){if(x.importClause!=null){if(x.importClause.name!=null&&h(x.importClause.name)){let ke=x.moduleSpecifier;if(ke!=null&&u.isStringLiteralLike(ke))return d=Y1t(e,ke.text,i),!0}else if(x.importClause.namedBindings!=null&&h(x.importClause.namedBindings))return!0}return!1}else if(u.isImportEqualsDeclaration(x)){if(x.name!=null&&h(x.name)){if(u.isIdentifier(x.moduleReference))return d=yzt(x.parent,x.moduleReference.text,i,a),d!=null;if(u.isQualifiedName(x.moduleReference))return!1;{let ke=x.moduleReference.expression;if(ke!=null&&u.isStringLiteralLike(ke))return d=Y1t(e,ke.text,i),!0}}return!1}else if(u.isNamespaceImport(x)){if(h(x.name)){let ke=(q=(L=x.parent)===null||L===void 0?void 0:L.parent)===null||q===void 0?void 0:q.moduleSpecifier;return ke==null||!u.isStringLiteralLike(ke)?!1:(d=Y1t(e,ke.text,i),!0)}}else if(u.isNamedImports(x)){for(let ke of x.elements)if(h(ke))return!0}else if(u.isImportSpecifier(x)){if(h(x.name)){let ke=(Ee=(me=(te=x.parent)===null||te===void 0?void 0:te.parent)===null||me===void 0?void 0:me.parent)===null||Ee===void 0?void 0:Ee.moduleSpecifier;return ke==null||!u.isStringLiteralLike(ke)?!1:(d=Y1t(e,ke.text,i),!0)}}else if(u.isSourceFile(x)){for(let ke of x.statements)if(h(ke))return!0}else if(u.isVariableStatement(x)){for(let ke of x.declarationList.declarations)if(h(ke)&&(_kn(x.declarationList,u)||I<1))return!0}else if(u.isBlock(x)){for(let ke of x.statements)if(h(ke,I+1))return!0}else if(Wdr(x,u)&&x.name!=null&&h(x.name))return d=x,!0}return!1}return u.findAncestor(r,x=>h(x))?d:void 0}function ikn(r,e){let i=r;for(;;){if(i=i.parent,i==null)return;if(mkn(i,e)||e.isSourceFile(i))return i}}function jdr(r){return r!=null&&(typeof r=="function"||typeof r=="object")}function okn(r){return jdr(r)}function Czt(r,e){switch(r){case Function.prototype.bind:case Function.prototype.call:case Function.prototype.apply:return!0}if(e!=null){let i=gw(void 0,e,"Function").literal;switch(r){case i.prototype.bind:case i.prototype.call:case i.prototype.apply:return!0}}return!1}var kre=class{constructor(e){this.intent=e}construct(e,i){return this.intent(e,i)}};function gkn(r){return typeof r=="object"&&r!=null&&r instanceof kre}function abt(r,e,i){return gkn(i)?e.throwError(i.construct(r,e)):i}function azt(r){return r.map(e=>typeof e=="symbol"?e.description:e).join(".")}function skn({hook:r,item:e,scope:i,policy:a}){function u(d,h){let b=(x,I)=>{if(x!==!1)return gkn(x)||wre(x)?x:I()};return!okn(h)||Czt(h)?h:new Proxy(h,{construct(x,I,L){return b(r({kind:"__$$_PROXY_CONSTRUCT",policy:a,newTarget:L,argArray:I,target:x,path:azt(d)}),()=>Reflect.construct(x,I,L))},apply(x,I,L=[]){return b(r({kind:"__$$_PROXY_APPLY",policy:a,thisArg:I,argArray:L,target:x,path:azt(d)}),()=>Reflect.apply(x,I,L))},get(x,I,L){let q=[...d,I];return b(r({kind:"__$$_PROXY_GET",policy:a,path:azt(q),target:x}),()=>{let te=Reflect.get(x,I,L),me=Reflect.getOwnPropertyDescriptor(h,I);return me!=null&&me.configurable===!1&&me.writable===!1?h[I]:u(q,te)})}})}return okn(e)?u([i],e):e}function akn(r,e){switch(r){case"__$$_PROXY_GET":return`get ${e}`;case"__$$_PROXY_APPLY":return`${e}(...)`;case"__$$_PROXY_CONSTRUCT":return`new ${e}(...)`}}var Bkn={"node:http2":"http2",http2:{connect:{__$$_PROXY_APPLY:!0},createSecureServer:{__$$_PROXY_APPLY:!0},createServer:{__$$_PROXY_APPLY:!0}},"node:https":"https",https:{createServer:{__$$_PROXY_APPLY:!0},request:{__$$_PROXY_APPLY:!0},get:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},globalAgent:{destroy:{__$$_PROXY_APPLY:!0}},Agent:{__$$_PROXY_CONSTRUCT:!0}},"node:http":"http",http:{createServer:{__$$_PROXY_APPLY:!0},request:{__$$_PROXY_APPLY:!0},get:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},ClientRequest:{__$$_PROXY_CONSTRUCT:!0},globalAgent:{destroy:{__$$_PROXY_APPLY:!0}},Agent:{__$$_PROXY_CONSTRUCT:!0}},"node:dgram":"dgram",dgram:{createSocket:{__$$_PROXY_APPLY:!0}},"node:dns":"dns",dns:{lookup:{__$$_PROXY_APPLY:!0},lookupService:{__$$_PROXY_APPLY:!0},resolve:{__$$_PROXY_APPLY:!0},resolve4:{__$$_PROXY_APPLY:!0},resolve6:{__$$_PROXY_APPLY:!0},resolveAny:{__$$_PROXY_APPLY:!0},resolveCname:{__$$_PROXY_APPLY:!0},resolveMx:{__$$_PROXY_APPLY:!0},resolveNaptr:{__$$_PROXY_APPLY:!0},resolveNs:{__$$_PROXY_APPLY:!0},resolvePtr:{__$$_PROXY_APPLY:!0},resolveSoa:{__$$_PROXY_APPLY:!0},resolveSrv:{__$$_PROXY_APPLY:!0},resolveTxt:{__$$_PROXY_APPLY:!0},reverse:{__$$_PROXY_APPLY:!0},Resolver:{__$$_PROXY_CONSTRUCT:!0}},"node:net":"net",net:{createServer:{__$$_PROXY_APPLY:!0},createConnection:{__$$_PROXY_APPLY:!0},connect:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0}},"node:tls":"tls",tls:{createServer:{__$$_PROXY_APPLY:!0},createSecureContext:{__$$_PROXY_APPLY:!0},connect:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},TLSSocket:{__$$_PROXY_CONSTRUCT:!0}}},Vdr={...Bkn,Math:{random:{__$$_PROXY_APPLY:!0}},Date:{now:{__$$_PROXY_APPLY:!0},__$$_PROXY_CONSTRUCT:(...r)=>r.length===0&&!(r[0]instanceof Date)}};function Udr(r,e){return typeof r==typeof e||typeof r=="function"}function Hdr(r){return typeof r=="function"}function A1e(r,e,i){let a=i.path.split(".");return czt(r,e,i,a)}function czt(r,e,i,a){let[u,...d]=a;if(u==null)return!1;let h=r[u];if(h==null)return!1;if(typeof h=="string")return czt(r,e,i,[h,...d]);if(Udr(h,e))return lkn(h,e,i);{let b=h[i.kind];return b!=null?lkn(b,e,i):czt(h,e,i,d)}}function lkn(r,e,i){if(Hdr(r)){let a=i;return a.argArray!=null&&r(...a.argArray)===e}else return r===e}function Jdr(r){return A1e(Vdr,!0,r)}var Dfe=class extends j7{constructor({violation:e,node:i,environment:a,message:u}){super({node:i,environment:a,message:`[${e}]: ${u}`}),this.violation=e}},uzt=class extends Dfe{constructor({operation:e,node:i,environment:a,message:u=`The operation: '${e}' is nondeterministic. That is in violation of the policy`}){super({violation:"deterministic",message:u,node:i,environment:a}),this.operation=e}},ykn={"node:fs":"fs",fs:{readFile:{__$$_PROXY_APPLY:"read"},readFileSync:{__$$_PROXY_APPLY:"read"},readdir:{__$$_PROXY_APPLY:"read"},readdirSync:{__$$_PROXY_APPLY:"read"},read:{__$$_PROXY_APPLY:"read"},readSync:{__$$_PROXY_APPLY:"read"},exists:{__$$_PROXY_APPLY:"read"},existsSync:{__$$_PROXY_APPLY:"read"},access:{__$$_PROXY_APPLY:"read"},accessSync:{__$$_PROXY_APPLY:"read"},close:{__$$_PROXY_APPLY:"read"},closeSync:{__$$_PROXY_APPLY:"read"},createReadStream:{__$$_PROXY_APPLY:"read"},stat:{__$$_PROXY_APPLY:"read"},statSync:{__$$_PROXY_APPLY:"read"},watch:{__$$_PROXY_APPLY:"read"},watchFile:{__$$_PROXY_APPLY:"read"},unwatchFile:{__$$_PROXY_APPLY:"read"},realpath:{__$$_PROXY_APPLY:"read"},realpathSync:{__$$_PROXY_APPLY:"read"},fstat:{__$$_PROXY_APPLY:"read"},fstatSync:{__$$_PROXY_APPLY:"read"},createWriteStream:{__$$_PROXY_APPLY:"write"},copyFile:{__$$_PROXY_APPLY:"write"},copyFileSync:{__$$_PROXY_APPLY:"write"},unlink:{__$$_PROXY_APPLY:"write"},unlinkSync:{__$$_PROXY_APPLY:"write"},rmdir:{__$$_PROXY_APPLY:"write"},rmdirSync:{__$$_PROXY_APPLY:"write"},symlink:{__$$_PROXY_APPLY:"write"},symlinkSync:{__$$_PROXY_APPLY:"write"},truncate:{__$$_PROXY_APPLY:"write"},truncateSync:{__$$_PROXY_APPLY:"write"},utimes:{__$$_PROXY_APPLY:"write"},utimesSync:{__$$_PROXY_APPLY:"write"},appendFile:{__$$_PROXY_APPLY:"write"},appendFileSync:{__$$_PROXY_APPLY:"write"},write:{__$$_PROXY_APPLY:"write"},writeSync:{__$$_PROXY_APPLY:"write"},writeFile:{__$$_PROXY_APPLY:"write"},writeFileSync:{__$$_PROXY_APPLY:"write"},chmod:{__$$_PROXY_APPLY:"write"},chmodSync:{__$$_PROXY_APPLY:"write"},chown:{__$$_PROXY_APPLY:"write"},chownSync:{__$$_PROXY_APPLY:"write"},mkdir:{__$$_PROXY_APPLY:"write"},mkdirSync:{__$$_PROXY_APPLY:"write"},rename:{__$$_PROXY_APPLY:"write"},renameSync:{__$$_PROXY_APPLY:"write"},futimes:{__$$_PROXY_APPLY:"write"},futimesSync:{__$$_PROXY_APPLY:"write"},link:{__$$_PROXY_APPLY:"write"},linkSync:{__$$_PROXY_APPLY:"write"},mkdtemp:{__$$_PROXY_APPLY:"write"},open:{__$$_PROXY_APPLY:"write"},openSync:{__$$_PROXY_APPLY:"write"},fchmod:{__$$_PROXY_APPLY:"write"},fchmodSync:{__$$_PROXY_APPLY:"write"},fchown:{__$$_PROXY_APPLY:"write"},fchownSync:{__$$_PROXY_APPLY:"write"},ftruncate:{__$$_PROXY_APPLY:"write"},ftruncateSync:{__$$_PROXY_APPLY:"write"},fsync:{__$$_PROXY_APPLY:"write"},fsyncSync:{__$$_PROXY_APPLY:"write"},fdatasync:{__$$_PROXY_APPLY:"write"},fdatasyncSync:{__$$_PROXY_APPLY:"write"},lchmod:{__$$_PROXY_APPLY:"write"},lchmodSync:{__$$_PROXY_APPLY:"write"}}};function qdr(r){return A1e(ykn,"read",r)}var tbt=class extends Dfe{constructor({node:e,environment:i,kind:a,message:u=`${a} operations are in violation of the policy`}){super({violation:"io",message:u,environment:i,node:e}),this.kind=a}};function Kdr(r){return A1e(ykn,"write",r)}function Xdr(r){return A1e(Bkn,!0,r)}var pzt=class extends Dfe{constructor({operation:e,node:i,environment:a,message:u=`The operation: '${e}' is performing network activity. That is in violation of the policy`}){super({violation:"deterministic",message:u,node:i,environment:a}),this.operation=e}},Ckn={"node:process":"process",process:{exit:{__$$_PROXY_APPLY:"exit"}},"node:child_process":"child_process",child_process:{__$$_PROXY_APPLY:"spawnChild"},"node:cluster":"cluster",cluster:{Worker:{__$$_PROXY_CONSTRUCT:"spawnChild"}}};function Ydr(r){return A1e(Ckn,"exit",r)}var nbt=class extends Dfe{constructor({kind:e,node:i,environment:a,message:u=`${e} operations are in violation of the policy`}){super({violation:"process",message:u,node:i,environment:a}),this.kind=e}};function Qdr(r){return A1e(Ckn,"spawnChild",r)}var $dr={"node:console":"console",console:{__$$_PROXY_APPLY:!0}};function Zdr(r){return A1e($dr,!0,r)}function emr({policy:r,env:e}){let i=h=>!r.console&&Zdr(h)?!1:!r.io.read&&qdr(h)?new kre((b,x)=>new tbt({...x,node:b,kind:"read"})):!r.io.write&&Kdr(h)?new kre((b,x)=>new tbt({...x,node:b,kind:"write"})):!r.process.exit&&Ydr(h)?new kre((b,x)=>new nbt({...x,node:b,kind:"exit"})):!r.process.exit&&Qdr(h)?new kre((b,x)=>new nbt({...x,node:b,kind:"spawnChild"})):!r.network&&Xdr(h)?new kre((b,x)=>new pzt({...x,node:b,operation:akn(h.kind,h.path)})):r.deterministic&&Jdr(h)?new kre((b,x)=>new uzt({...x,node:b,operation:akn(h.kind,h.path)})):!0,a=Object.entries(Object.getOwnPropertyDescriptors(e)),u=Object.assign({},...a.filter(([,h])=>!("value"in h)).map(([h,b])=>({[h]:b}))),d=Object.assign({},...a.filter(([,h])=>"value"in h).map(([h,b])=>({[h]:h==="require"?new Proxy(b.value,{apply(x,I,L=[]){let[q]=L;return skn({policy:r,item:Reflect.apply(x,I,L),scope:q,hook:i})}}):skn({policy:r,item:b.value,scope:h,hook:i})})));return Object.defineProperties(d,{...u})}function MYe(r,e){let[i]=e.split(".");if(RW.default.has(r.env,i))return r.env;if(r.parentEnv!=null)return MYe(r.parentEnv,e)}function fzt(r){return r.preset!=null?r.preset:r.parentEnv!=null?fzt(r.parentEnv):"NONE"}function vkn(r,e,i){let a=ikn(r.startingNode,i),u=ikn(e,i);if(a?.pos===u?.pos)return r;if(r.parentEnv!=null)return vkn(r.parentEnv,e,i)}function gw(r,e,i){let[a]=i.split(".");if(RW.default.has(e.env,a)){let u=RW.default.get(e.env,i);switch(i){case"__dirname":case"__filename":{let d=fzt(e);return(d==="NODE"||d==="NODE_CJS")&&typeof u=="function"&&r!=null?{literal:u(r.getSourceFile().fileName)}:{literal:u}}case"import.meta":{let d=fzt(e);return(d==="NODE_ESM"||d==="BROWSER"||d==="ECMA")&&typeof u=="object"&&u!=null&&typeof u.url=="function"&&r!=null?{literal:{url:u.url(r.getSourceFile().fileName)}}:{literal:u}}default:return{literal:u}}}if(e.parentEnv!=null)return gw(r,e.parentEnv,i)}function ST(r,e,i,...a){return a.some(u=>{let d=gw(r,e,u);return d==null?!1:d.literal===i})}function lzt(r){switch(r){case Vx:case u8:case G7:case z7:case T1e:return!0;default:return!1}}function wg({environment:r,path:e,value:i,reporting:a,node:u,newBinding:d=!1}){let[h]=e.split(".");if(RW.default.has(r.env,h)||d||r.parentEnv==null){if(RW.default.has(r.env,e)&&RW.default.get(r.env,e)===i)return;RW.default.set(r.env,e,i),a.reportBindings!=null&&!lzt(e)&&a.reportBindings({path:e,value:i,node:u})}else{let b=r.parentEnv;for(;b!=null;)if(RW.default.has(b.env,h)){if(RW.default.has(b.env,e)&&RW.default.get(b.env,e)===i)return;RW.default.set(b.env,e,i),a.reportBindings!=null&&!lzt(e)&&a.reportBindings({path:e,value:i,node:u});return}else b.parentEnv==null?(RW.default.set(b.env,e,i),a.reportBindings!=null&&!lzt(e)&&a.reportBindings({path:e,value:i,node:u})):b=b.parentEnv}}function tmr({inputEnvironment:{extra:r,preset:e},startingNode:i,policy:a}){let u;switch(e){case"NONE":u=Efe(r);break;case"ECMA":u=Efe(sbt(),r);break;case"NODE":case"NODE_CJS":u=Efe(Ndr(),r);break;case"NODE_ESM":u=Efe(Odr(),r);break;case"BROWSER":u=Efe(Fdr(),r);break;default:u={};break}return{parentEnv:void 0,preset:e,startingNode:i,env:emr({policy:a,env:u})}}function bkn(r,e){return r.kind===e.SyntaxKind.TrueKeyword||r.kind===e.SyntaxKind.FalseKeyword}function Skn(r,e){return r.kind===e.SyntaxKind.NullKeyword}function nmr(r,e){var i;return e.isStringLiteralLike(r)?{success:!0,value:r.text}:bkn(r,e)?{success:!0,value:r.kind===e.SyntaxKind.TrueKeyword}:e.isRegularExpressionLiteral(r)?{success:!0,value:new Function(`return ${r.text}`)()}:e.isNumericLiteral(r)?{success:!0,value:Number(r.text)}:!((i=e.isBigIntLiteral)===null||i===void 0)&&i.call(e,r)?{success:!0,value:BigInt(r.text)}:e.isIdentifier(r)&&r.text==="Infinity"?{success:!0,value:1/0}:e.isIdentifier(r)&&r.text==="NaN"?{success:!0,value:NaN}:e.isIdentifier(r)&&r.text==="null"?{success:!0,value:null}:e.isIdentifier(r)&&r.text==="undefined"?{success:!0,value:void 0}:Skn(r,e)?{success:!0,value:null}:{success:!1}}var dzt=class extends Dfe{constructor({ops:e,node:i,environment:a,message:u=`Maximum ops exceeded: ${e}`}){super({violation:"maxOps",message:u,node:i,environment:a}),this.ops=e}};function xkn(r,e){let{node:i,environment:a,evaluate:u,stack:d,typescript:h,throwError:b,getCurrentError:x}=r,I=e??(i.initializer==null?void 0:u.expression(i.initializer,r));if(x()==null){if(I==null&&!h.isIdentifier(i.name))return b(new j7({node:i,environment:a}));u.nodeWithArgument(i.name,I,r),x()==null&&d.push(I)}}function Ekn(r,e){return r.kind===e.SyntaxKind.ThisKeyword}function lbt(r,e){return r.kind===e.SyntaxKind.SuperKeyword}function MRe(r){var e,i;let{node:a,evaluate:u,typescript:d}=r;if(d.isIdentifier(a))return a.text;if(!((e=d.isPrivateIdentifier)===null||e===void 0)&&e.call(d,a))return a.text;if(Ekn(a,d))return z7;if(lbt(a,d))return T1e;if(d.isParenthesizedExpression(a))return MRe({...r,node:a.expression});if(!((i=d.isTypeAssertionExpression)===null||i===void 0)&&i.call(d,a)||!("isTypeAssertionExpression"in d)&&d.isTypeAssertion(a))return MRe({...r,node:a.expression});if(d.isPropertyAccessExpression(a)){let h=MRe({...r,node:a.expression});h==null&&(h=u.expression(a.expression,r));let b=MRe({...r,node:a.name});return b==null&&(b=u.expression(a.name,r)),h==null||b==null?void 0:`${h}.${b}`}else if(d.isElementAccessExpression(a)){let h=MRe({...r,node:a.expression});h==null&&(h=u.expression(a.expression,r));let b=u.expression(a.argumentExpression,r);return h==null||b==null?void 0:`${h}.${b}`}else if(d.isFunctionDeclaration(a))return a.name==null?void 0:a.name.text}var mzt=class extends j7{constructor({node:e,environment:i,message:a="'No leftValue could be determined'"}){super({message:a,environment:i,node:e})}};function Q1t(r,e){var i;return e.isParenthesizedExpression(r)||e.isAsExpression(r)||!((i=e.isTypeAssertionExpression)===null||i===void 0)&&i.call(e,r)||!("isTypeAssertionExpression"in e)&&e.isTypeAssertion(r)?Q1t(r.expression,e):r}function Dkn(r){return r!=null&&typeof r=="object"&&"kind"in r&&"flags"in r&&"pos"in r&&"end"in r}function rmr(r){var e;let{node:i,environment:a,evaluate:u,logger:d,throwError:h,typeChecker:b,typescript:x,getCurrentError:I}=r,L=u.expression(i.left,r);if(I()!=null)return;let q=u.expression(i.right,r);if(I()!=null)return;let te=MRe({...r,node:i.left}),me=i.operatorToken.kind;switch(me){case x.SyntaxKind.AmpersandToken:return L&q;case x.SyntaxKind.AmpersandAmpersandToken:return L&&q;case x.SyntaxKind.AmpersandEqualsToken:case x.SyntaxKind.CaretEqualsToken:case x.SyntaxKind.BarEqualsToken:case x.SyntaxKind.MinusEqualsToken:case x.SyntaxKind.PlusEqualsToken:case x.SyntaxKind.PercentEqualsToken:case x.SyntaxKind.SlashEqualsToken:case x.SyntaxKind.AsteriskEqualsToken:case x.SyntaxKind.AsteriskAsteriskEqualsToken:case x.SyntaxKind.LessThanLessThanEqualsToken:case x.SyntaxKind.GreaterThanGreaterThanEqualsToken:case x.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:case x.SyntaxKind.QuestionQuestionEqualsToken:case x.SyntaxKind.BarBarEqualsToken:case x.SyntaxKind.AmpersandAmpersandEqualsToken:{let Ee=L;switch(me){case x.SyntaxKind.AmpersandEqualsToken:Ee&=q;break;case x.SyntaxKind.CaretEqualsToken:Ee^=q;break;case x.SyntaxKind.BarEqualsToken:Ee|=q;break;case x.SyntaxKind.AsteriskEqualsToken:Ee*=q;break;case x.SyntaxKind.AsteriskAsteriskEqualsToken:Ee**=q;break;case x.SyntaxKind.LessThanLessThanEqualsToken:Ee<<=q;break;case x.SyntaxKind.GreaterThanGreaterThanEqualsToken:Ee>>=q;break;case x.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:Ee>>>=q;break;case x.SyntaxKind.MinusEqualsToken:Ee-=q;break;case x.SyntaxKind.PlusEqualsToken:Ee+=q;break;case x.SyntaxKind.PercentEqualsToken:Ee%=q;break;case x.SyntaxKind.SlashEqualsToken:Ee/=q;break;case x.SyntaxKind.QuestionQuestionEqualsToken:Ee=L??q;break;case x.SyntaxKind.BarBarEqualsToken:L||(Ee=q);break;case x.SyntaxKind.AmpersandAmpersandEqualsToken:L&&(Ee=q);break}return te!=null&&wg({...r,path:te,value:Ee}),Ee}case x.SyntaxKind.AsteriskToken:return L*q;case x.SyntaxKind.AsteriskAsteriskToken:return L**q;case x.SyntaxKind.BarToken:return L|q;case x.SyntaxKind.BarBarToken:return L||q;case x.SyntaxKind.CaretToken:return L^q;case x.SyntaxKind.CommaToken:return q;case x.SyntaxKind.MinusToken:return L-q;case x.SyntaxKind.PlusToken:return d.logResult(L+q,"BinaryExpression (PlusToken)"),L+q;case x.SyntaxKind.PercentToken:return L%q;case x.SyntaxKind.SlashToken:return L/q;case x.SyntaxKind.EqualsToken:{if(te!=null){let Ee=Q1t(i.left,x),ke=b?.getSymbolAtLocation(Ee),Ue=ke?.valueDeclaration;if(Ue==null&&b==null&&x.isIdentifier(Ee)){let We=yzt(Ee.parent,Ee.text,r);Dkn(We)&&(Ue=We)}let Fe=Ue==null?a:(e=vkn(a,Ue,x))!==null&&e!==void 0?e:a;wg({...r,environment:Fe,path:te,value:q}),d.logBinding(te,q,"Assignment")}else return h(new mzt({node:i.left,environment:a}));return q}case x.SyntaxKind.EqualsEqualsToken:return L==q;case x.SyntaxKind.EqualsEqualsEqualsToken:return L===q;case x.SyntaxKind.ExclamationEqualsToken:return L!=q;case x.SyntaxKind.ExclamationEqualsEqualsToken:return L!==q;case x.SyntaxKind.GreaterThanToken:return L>q;case x.SyntaxKind.GreaterThanEqualsToken:return L>=q;case x.SyntaxKind.LessThanToken:return L<q;case x.SyntaxKind.LessThanEqualsToken:return L<=q;case x.SyntaxKind.InKeyword:return L in q;case x.SyntaxKind.QuestionQuestionToken:return L??q;case x.SyntaxKind.InstanceOfKeyword:return L instanceof q}return h(new mR({node:i.operatorToken,typescript:x,environment:a}))}var vzt="___lazyCallFlag";function imr(r){return r!=null&&typeof r=="object"&&vzt in r}function bzt(r){return r===void 0?"undefined":r===null?"null":typeof r=="string"?`"${r}"`:r.toString()}var rbt=class extends j7{constructor({value:e,node:i,environment:a,message:u=`${bzt(e)} is not a function'`}){super({message:u,environment:a,node:i}),this.value=e}};function xfe(r,e){var i;return lbt(r,e)?!0:e.isPropertyAccessExpression(r)?xfe(r.expression,e)||xfe(r.name,e):e.isElementAccessExpression(r)?xfe(r.expression,e)||xfe(r.argumentExpression,e):e.isParenthesizedExpression(r)||e.isAsExpression(r)||!((i=e.isTypeAssertionExpression)===null||i===void 0)&&i.call(e,r)||!("isTypeAssertionExpression"in e)&&e.isTypeAssertion(r)?xfe(r.expression,e):!1}function omr(r){let{node:e,environment:i,evaluate:a,throwError:u,typescript:d,logger:h,getCurrentError:b}=r,x=[];for(let L=0;L<e.arguments.length;L++)if(x[L]=a.expression(e.arguments[L],r),b()!=null)return;let I=a.expression(e.expression,r);if(b()==null)if(imr(I)){let L=xfe(e.expression,d)?gw(e,i,z7):void 0,q=I.invoke(L?.literal,...x);return b()!=null?void 0:(h.logResult(q,"CallExpression"),q)}else{if(e.questionDotToken==null&&typeof I!="function")return u(new rbt({value:I,node:e.expression,environment:i}));let L=typeof I!="function"?void 0:abt(e,r,I(...x));return b()!=null?void 0:(h.logResult(L,"CallExpression"),L)}}function smr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function i6(r,e){return{parentEnv:r,startingNode:e,env:{}}}function NQ(r,e){let i=Array.isArray(r)?r:r.modifiers;return i!=null&&i.some(a=>a.kind===e)}function RQ(r,e,i){let{node:a,evaluate:u,environment:d,typescript:h,getCurrentError:b}=r,x=a.filter(I=>!(h.isIdentifier(I.name)&&I.name.text==="this"));for(let I=0;I<x.length;I++){let L=x[I];if(L.dotDotDotToken!=null){if(u.nodeWithArgument(L,e.slice(I),r),b()!=null)return;break}else{if(u.nodeWithArgument(L,e[I],r),b()!=null)return;if(i!=null&&h.isIdentifier(L.name)&&(NQ(L,h.SyntaxKind.PublicKeyword)||NQ(L,h.SyntaxKind.ProtectedKeyword)||NQ(L,h.SyntaxKind.PrivateKeyword))){let q=gw(L,d,L.name.text);q!=null&&(i[L.name.text]=q.literal)}}}}function amr(r){let{node:e,environment:i,evaluate:a,stack:u,typescript:d,getCurrentError:h}=r,b=NQ(e,d.SyntaxKind.AsyncKeyword)?async(...x)=>{let I=i6(i,e),L={...r,environment:I};if(wg({...L,path:Vx,value:!1,newBinding:!0}),wg({...L,path:"arguments",value:arguments,newBinding:!0}),RQ({...r,node:e.parameters,environment:I},x),h()==null)return d.isBlock(e.body)?(a.statement(e.body,L),h()!=null?void 0:ST(e,I,!0,Vx)?u.pop():void 0):a.expression(e.body,L)}:(...x)=>{let I=i6(i,e),L={...r,environment:I};if(wg({...L,path:Vx,value:!1,newBinding:!0}),wg({...L,path:"arguments",value:arguments,newBinding:!0}),RQ({...r,node:e.parameters,environment:I},x),h()==null)return d.isBlock(e.body)?(a.statement(e.body,L),h()!=null?void 0:ST(e,I,!0,Vx)?u.pop():void 0):a.expression(e.body,L)};return b.toString=()=>"[Function: anonymous]",Object.setPrototypeOf(b,gw(e,i,"Function").literal),b}function lmr({node:r}){return r.text}function cmr({node:r}){return Number(r.text)}function umr({node:r,typescript:e}){return r.kind===e.SyntaxKind.TrueKeyword}function pmr({node:r,environment:e}){let i=gw(r,e,"Function").literal;return new i(`return ${r.text}`)()}function fmr(r){let{node:e,evaluate:i,environment:a,getCurrentError:u}=r,d=gw(e,a,"Object").literal,h=d.create(d.prototype);wg({...r,path:z7,value:h,newBinding:!0});for(let b of e.properties)if(i.nodeWithArgument(b,h,r),u()!=null)return;return h}function dmr(r){return r!=null&&r[Symbol.iterator]!=null}function mmr(r){let{node:e,environment:i,evaluate:a,typescript:u,getCurrentError:d}=r,b=gw(e,i,"Array").literal.of();for(let x of e.elements){let I=a.expression(x,r);if(d()!=null)return;u.isSpreadElement(x)&&dmr(I)?b.push(...I):b.push(I)}return b}var ibt=class extends j7{constructor({node:e,environment:i,message:a=`'${e.text}' is not defined'`}){super({message:a,environment:i,node:e})}};function ckn(r){let{node:e,environment:i,typeChecker:a,evaluate:u,stack:d,logger:h,reporting:b,typescript:x,throwError:I,getCurrentError:L}=r,q=gw(e,i,e.text);if(q!=null)return h.logBinding(e.text,q.literal,"Lexical Environment match"),q.literal;let te=x.isShorthandPropertyAssignment(e.parent)?a?.getShorthandAssignmentValueSymbol(e.parent):a?.getSymbolAtLocation(e),me=te?.valueDeclaration;if(te!=null&&me==null)try{let Ee=a?.getAliasedSymbol(te);me=Ee?.valueDeclaration}catch{}if(me==null){let Ee=yzt(e.parent,e.text,r);if(L()!=null)return;if(Dkn(Ee)&&!x.isIdentifier(Ee))me=Ee;else if(Ee!=null)return wg({...r,path:e.text,value:Ee}),h.logBinding(e.text,Ee,"Discovered declaration value"),Ee}if(me!=null){if(me.getSourceFile().isDeclarationFile){let ke=ebt({...r,node:me});return L()!=null?void 0:(wg({environment:i,path:e.text,value:ke,reporting:b,node:me}),h.logBinding(e.text,ke,`Discovered declaration value${me.getSourceFile()===e.getSourceFile()?"":` (imported into '${e.getSourceFile().fileName}' from '${me.getSourceFile().fileName}')`}`),ke)}if(x.isVariableDeclaration(me)&&me.getSourceFile().fileName===e.getSourceFile().fileName&&me.pos>e.pos)if(x.isVariableDeclarationList(me.parent)&&_kn(me.parent,x)){wg({...r,path:e.text,value:void 0,newBinding:!0,node:me}),h.logBinding(e.text,void 0,"Hoisted var declaration");return}else return I(new ibt({node:e,environment:i}));if(u.declaration(me,r),L()!=null)return;let Ee=d.pop();return wg({...r,path:e.text,value:Ee,node:me}),h.logBinding(e.text,Ee,`Discovered declaration value${me.getSourceFile()===e.getSourceFile()?"":` (imported into '${e.getSourceFile().fileName}' from '${me.getSourceFile().fileName}')`}`),Ee}return I(new ibt({node:e,environment:i}))}function _mr(r){let{node:e,environment:i,typescript:a,evaluate:u,getCurrentError:d}=r,h=i6(i,e);for(let b=0;b<e.statements.length;b++){let x=e.statements[b];if(!(a.isConstructorDeclaration(e.parent)&&b===0&&a.isExpressionStatement(x)&&a.isCallExpression(x.expression)&&lbt(x.expression.expression,a))&&(u.statement(x,{...r,environment:h}),d()!=null||ST(e,h,!0,u8,G7,Vx)))break}}function hmr({node:r,evaluate:e,stack:i,...a}){let{getCurrentError:u}=a;if(wg({...a,environment:a.environment,path:Vx,value:!0,node:r}),r.expression==null)i.push(void 0);else{let d=e.expression(r.expression,a);if(u()!=null)return;i.push(d)}}function Tkn({node:r,evaluate:e,...i}){for(let a of r.declarations)if(e.declaration(a,i),i.getCurrentError()!=null)return}function gmr({node:r,...e}){Tkn({node:r.declarationList,...e})}function Bmr(r){var e,i;let{node:a,environment:u,evaluate:d,reporting:h,typescript:b,throwError:x,getCurrentError:I}=r,L=d.expression(a.operand,r);if(I()==null)switch(a.operator){case b.SyntaxKind.PlusToken:return+L;case b.SyntaxKind.MinusToken:return-L;case b.SyntaxKind.TildeToken:return~L;case b.SyntaxKind.ExclamationToken:return!L;case b.SyntaxKind.PlusPlusToken:{if(!b.isIdentifier(a.operand)&&!(!((e=b.isPrivateIdentifier)===null||e===void 0)&&e.call(b,a.operand)))return x(new mR({node:a.operand,environment:u,typescript:b}));let q=MYe(u,a.operand.text),te=++q[a.operand.text];return h.reportBindings!=null&&h.reportBindings({path:a.operand.text,value:te,node:a}),te}case b.SyntaxKind.MinusMinusToken:{if(!b.isIdentifier(a.operand)&&!(!((i=b.isPrivateIdentifier)===null||i===void 0)&&i.call(b,a.operand)))return x(new mR({node:a.operand,environment:u,typescript:b}));let q=MYe(u,a.operand.text),te=--q[a.operand.text];return h.reportBindings!=null&&h.reportBindings({path:a.operand.text,value:te,node:a}),te}}}function ymr(r){let{evaluate:e,node:i,statementTraversalStack:a,environment:u,typescript:d,getCurrentError:h}=r,b=e.expression(i.expression,r);if(b==null||h()!=null)return;let x=i.questionDotToken!=null&&b==null?void 0:b[i.name.text];return typeof x=="function"&&a.includes(d.SyntaxKind.CallExpression)?{[vzt]:0,invoke:(I,...L)=>abt(i,r,I!=null&&!Czt(x,u)?b[i.name.text].call(I,...L):b[i.name.text](...L))}:x}function Cmr(r){let{node:e,environment:i,evaluate:a,statementTraversalStack:u,typescript:d,getCurrentError:h}=r,b=a.expression(e.expression,r);if(h()!=null)return;let x=a.expression(e.argumentExpression,r);if(h()!=null)return;let I=e.questionDotToken!=null&&b==null?void 0:b[x];return typeof I=="function"&&u.includes(d.SyntaxKind.CallExpression)?{[vzt]:0,invoke:(L,...q)=>abt(e,r,L!=null&&!Czt(I,i)?b[x].call(L,...q):b[x](...q))}:I}function vmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function bmr(r){let{node:e,environment:i,evaluate:a,stack:u,typescript:d,getCurrentError:h}=r,b=e.name==null?void 0:e.name.text,x=NQ(e,d.SyntaxKind.AsyncKeyword)?async function(...L){let q=i6(i,e),te={...r,environment:q};if(wg({...te,path:Vx,value:!1,newBinding:!0}),wg({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&wg({...te,path:z7,value:this,newBinding:!0}),RQ({...r,node:e.parameters,environment:q},L),h()!=null)return;let me=e.getSourceFile();if(b!=null&&me.isDeclarationFile)return ebt(r)(...L);if(e.body!=null&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()}:function(...L){let q=i6(i,e),te={...r,environment:q};if(wg({...te,path:Vx,value:!1,newBinding:!0}),wg({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&wg({...te,path:z7,value:this,newBinding:!0}),RQ({...te,node:e.parameters},L),h()!=null)return;let me=e.getSourceFile();if(b!=null&&me.isDeclarationFile)return ebt(r)(...L);if(e.body!=null&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()};b!=null&&wg({...r,path:b,value:x.bind(x)}),x.toString=()=>`[Function${b==null?"":`: ${b}`}]`,Object.setPrototypeOf(x,gw(e,i,"Function").literal),u.push(x)}function Smr({node:r,evaluate:e,...i}){let{getCurrentError:a}=i,u=e.expression(r.expression,i);if(a()==null){if(u){if(e.statement(r.thenStatement,i),a()!=null)return}else if(r.elseStatement!=null)return e.statement(r.elseStatement,i)}}function xmr({node:r,evaluate:e,stack:i,...a}){let u=e.expression(r.expression,a);a.getCurrentError()==null&&i.push(u)}function Emr({node:r,evaluate:e,...i}){let a="";a+=r.head.text;for(let u of r.templateSpans){let d=e.expression(u.expression,i);if(i.getCurrentError()!=null)return;a+=d,a+=u.literal.text}return a}function Dmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Tmr(r){var e,i;let{evaluate:a,node:u,environment:d,typescript:h,throwError:b,reporting:x}=r;switch(a.expression(u.operand,r),u.operator){case h.SyntaxKind.PlusPlusToken:{if(!h.isIdentifier(u.operand)&&!(!((e=h.isPrivateIdentifier)===null||e===void 0)&&e.call(h,u.operand)))return b(new mR({node:u.operand,environment:d,typescript:h}));let I=MYe(d,u.operand.text)[u.operand.text]++;return x.reportBindings!=null&&x.reportBindings({path:u.operand.text,value:I,node:u}),I}case h.SyntaxKind.MinusMinusToken:{if(!h.isIdentifier(u.operand)&&!(!((i=h.isPrivateIdentifier)===null||i===void 0)&&i.call(h,u.operand)))return b(new mR({node:u.operand,environment:d,typescript:h}));let I=MYe(d,u.operand.text)[u.operand.text]--;return x.reportBindings!=null&&x.reportBindings({path:u.operand.text,value:I,node:u}),I}}}function Amr({node:r,evaluate:e,...i}){let{getCurrentError:a}=i,u=[];if(r.arguments!=null){for(let h=0;h<r.arguments.length;h++)if(u[h]=e.expression(r.arguments[h],i),a()!=null)return}let d=e.expression(r.expression,i);if(a()==null)return typeof d=="function"&&wg({...i,node:r,path:"[[NewTarget]]",value:d,newBinding:!0}),abt(r,i,new d(...u))}function kmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function wmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Imr({node:r,evaluate:e,...i}){let a=e.expression(r.expression,i);i.getCurrentError()==null&&e.nodeWithArgument(r.caseBlock,a,i)}var _zt=class extends j7{constructor({message:e="It is not possible to evaluate an async iterator'",typescript:i,environment:a}){var u,d;super({message:e,environment:a,node:(d=(u=i.factory)===null||u===void 0?void 0:u.createEmptyStatement())!==null&&d!==void 0?d:i.createEmptyStatement()})}};function Pmr(r){let{node:e,environment:i,evaluate:a,logger:u,typescript:d,throwError:h,getCurrentError:b}=r,x=a.expression(e.expression,r);if(b()==null){if(d.isVariableDeclarationList(e.initializer)){if(e.initializer.declarations.length>1)return h(new mR({node:e.initializer.declarations[1],environment:i,typescript:d}))}else return h(new mR({node:e.initializer,environment:i,typescript:d}));if(e.awaitModifier!=null)return h(new _zt({typescript:d,environment:i}));for(let I of x){let L=i6(i,e),q={...r,environment:L};if(wg({...q,path:u8,value:!1,newBinding:!0}),wg({...q,path:G7,value:!1,newBinding:!0}),a.nodeWithArgument(e.initializer.declarations[0],I,q),b()!=null||(a.statement(e.statement,q),b()!=null))return;if(ST(e,L,!0,u8)){u.logBreak(e,d);break}else if(ST(e,L,!0,G7)){u.logContinue(e,d);continue}else if(ST(e,L,!0,Vx)){u.logReturn(e,d);return}}}}function Nmr({node:r,environment:e}){let i=gw(r,e,z7);return i?.literal}function Rmr(r){wg({...r,path:u8,value:!0})}function Lmr(r){wg({...r,path:G7,value:!0})}function Mmr({environment:r,evaluate:e,typescript:i,...a}){let{node:u,getCurrentError:d}=a,h=i6(r,u),b={...a,environment:h};if(u.initializer!==void 0){if(i.isVariableDeclarationList(u.initializer)){for(let x of u.initializer.declarations)if(e.declaration(x,b),d()!=null)return}else if(e.expression(u.initializer,b),d()!=null)return}for(;;){let x=i6(h,u),I={...a,environment:x};if(wg({...I,path:u8,value:!1,newBinding:!0}),wg({...I,path:G7,value:!1,newBinding:!0}),!(u.condition==null?!0:e.expression(u.condition,b))||d()!=null||(e.statement(u.statement,I),d()!=null))return;if(ST(u,x,!0,u8))break;if(ST(u,x,!0,Vx))return;if(u.incrementor!=null){if(e.expression(u.incrementor,b),d()!=null)return}else if(ST(u,x,!0,G7))continue}}function Fmr(r){let{node:e,environment:i,evaluate:a,logger:u,typescript:d,getCurrentError:h}=r,b=a.expression(e.expression,r);if(h()==null)for(;b;){let x=i6(i,e),I={...r,environment:x};if(wg({...I,path:u8,value:!1,newBinding:!0}),wg({...I,path:G7,value:!1,newBinding:!0}),a.statement(e.statement,I),h()!=null)return;if(ST(e,x,!0,u8)){u.logBreak(e,d);break}else if(ST(e,x,!0,Vx)){u.logReturn(e,d);return}if(b=a.expression(e.expression,r),h()!=null)return;if(ST(e,x,!0,G7)){u.logContinue(e,d);continue}}}function Omr(r){let{node:e,environment:i,evaluate:a,logger:u,typescript:d,throwError:h,getCurrentError:b}=r,x=a.expression(e.expression,r);if(b()==null){if(d.isVariableDeclarationList(e.initializer)){if(e.initializer.declarations.length>1)return h(new mR({node:e.initializer.declarations[1],environment:i,typescript:d}))}else return h(new mR({node:e.initializer,environment:i,typescript:d}));for(let I in x){let L=i6(i,e),q={...r,environment:L};if(wg({...q,path:u8,value:!1,newBinding:!0}),wg({...q,path:G7,value:!1,newBinding:!0}),a.nodeWithArgument(e.initializer.declarations[0],I,q),b()!=null||(a.statement(e.statement,q),b()!=null))return;if(ST(e,L,!0,u8)){u.logBreak(e,d);break}else if(ST(e,L,!0,G7)){u.logContinue(e,d);continue}else if(ST(e,L,!0,Vx)){u.logReturn(e,d);return}}}}function Wmr(r){let{node:e,environment:i,evaluate:a,stack:u,typescript:d,getCurrentError:h}=r,b=e.name==null?void 0:e.name.text,x=NQ(e,d.SyntaxKind.AsyncKeyword)?async function(...L){let q=i6(i,e),te={...r,environment:q};if(wg({...te,path:Vx,value:!1,newBinding:!0}),wg({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&wg({...te,path:z7,value:this,newBinding:!0}),RQ({...te,node:e.parameters},L),!(e.body==null||h()!=null)&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()}:function(...L){let q=i6(i,e),te={...r,environment:q};if(wg({...te,path:Vx,value:!1,newBinding:!0}),wg({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&wg({...te,path:z7,value:this,newBinding:!0}),RQ({...te,node:e.parameters},L),!(e.body==null||h()!=null)&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()};return b!=null&&wg({...r,path:b,value:x.bind(x)}),x.toString=()=>`[Function${b==null?"":`: ${b}`}]`,Object.setPrototypeOf(x,gw(e,i,"Function").literal),x}var hzt=class extends j7{constructor({node:e,environment:i,message:a="Missing catch or finally after try"}){super({node:e,environment:i,message:a})}};function Gmr(r){let{node:e,evaluate:i,environment:a,throwError:u}=r,d,h=()=>{try{return i.statement(e.tryBlock,{...r,throwError:I=>(d=I,I),getCurrentError:()=>d})}catch(I){d=I}},b=I=>{i.nodeWithArgument(e.catchClause,I,r)},x=()=>{let I;i.statement(e.finallyBlock,{...r,throwError:L=>(I=L,r.throwError(L),L),getCurrentError:()=>I})};if(e.catchClause==null&&e.finallyBlock==null)return u(new hzt({node:e,environment:a}));e.catchClause!=null&&e.finallyBlock==null?(h(),d!=null&&b(d)):e.catchClause!=null&&e.finallyBlock!=null?(h(),d!=null&&b(d),x()):e.catchClause==null&&e.finallyBlock!=null&&(h(),d!=null&&u(d),x())}function Akn({name:r,extendedType:e,ctor:i=()=>{}}){return e==null?new Function("ctor",`return class ${r??""} {constructor () {const ctorReturnValue = ctor.call(this, ...arguments); if (ctorReturnValue != null) return ctorReturnValue;}}`)(i):new Function("extendedType","ctor",`return class ${r??""} extends extendedType {constructor () {super(...arguments); const ctorReturnValue = ctor.call(this, ...arguments); if (ctorReturnValue != null) return ctorReturnValue;}}`)(e,i)}function FYe(r,e){return"canHaveDecorators"in e?e.canHaveDecorators(r):!0}function OYe(r,e){var i;if("getDecorators"in e)return e.getDecorators(r);{let a="decorators"in r&&Array.isArray(r.decorators)?r.decorators:void 0,u=(i=r.modifiers)===null||i===void 0?void 0:i.filter(d=>"expression"in d);return[...a??[],...u??[]]}}function zmr(r){var e;let{node:i,evaluate:a,stack:u,logger:d,typescript:h,getCurrentError:b}=r,x,I=i.members.find(h.isConstructorDeclaration),L=i.members.filter(Ee=>!h.isConstructorDeclaration(Ee)),q;if(I!=null){if(a.declaration(I,r),b()!=null)return;q=u.pop()}if(i.heritageClauses!=null){let Ee=i.heritageClauses.find(ke=>ke.token===h.SyntaxKind.ExtendsKeyword);if(Ee!=null){let[ke]=Ee.types;if(ke!=null&&(x=a.expression(ke.expression,r),b()!=null))return}}let te=i.name==null?void 0:i.name.text,me=Akn({name:te,extendedType:x,ctor:q});if(FYe(i,h))for(let Ee of(e=OYe(i,h))!==null&&e!==void 0?e:[]){if(a.nodeWithArgument(Ee,[me],r),b()!=null)return;me=u.pop()}me.toString=()=>`[Class${te==null?"":`: ${te}`}]`,te!=null&&wg({...r,path:te,value:me,newBinding:!0});for(let Ee of L)if(a.nodeWithArgument(Ee,NQ(Ee,h.SyntaxKind.StaticKeyword)?me:me.prototype,r),b()!=null)return;d.logHeritage(me),u.push(me),d.logStack(u)}function jmr(r){let{node:e,environment:i,evaluate:a,stack:u,getCurrentError:d}=r;function h(...b){let x=i6(i,e),I={...r,environment:x};if(wg({...I,path:Vx,value:!1,newBinding:!0}),wg({...I,path:"arguments",value:arguments,newBinding:!0}),this!=null&&wg({...I,path:z7,value:this,newBinding:!0}),RQ({...I,node:e.parameters},b,this),!(e.body==null||d()!=null)&&(a.statement(e.body,I),d()==null&&ST(e,x,!0,Vx)))return u.pop()}h.toString=()=>"[Function: constructor]",u.push(h)}function Vmr({node:r,environment:e}){let i=gw(r,e,T1e);return i?.literal}function Umr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Hmr(r){var e;let{node:i,evaluate:a,stack:u,logger:d,typescript:h,getCurrentError:b}=r,x,I=i.members.find(h.isConstructorDeclaration),L=i.members.filter(Ee=>!h.isConstructorDeclaration(Ee)),q;if(I!=null){if(a.declaration(I,r),b()!=null)return;q=u.pop()}if(i.heritageClauses!=null){let Ee=i.heritageClauses.find(ke=>ke.token===h.SyntaxKind.ExtendsKeyword);if(Ee!=null){let[ke]=Ee.types;if(ke!=null&&(x=a.expression(ke.expression,r),b()!=null))return}}let te=i.name==null?void 0:i.name.text,me=Akn({name:te,extendedType:x,ctor:q});if(FYe(i,h))for(let Ee of(e=OYe(i,h))!==null&&e!==void 0?e:[]){if(a.nodeWithArgument(Ee,[me],r),b()!=null)return;me=u.pop()}me.toString=()=>`[Class${te==null?"":`: ${te}`}]`,te!=null&&wg({...r,path:te,value:me,newBinding:!0});for(let Ee of L)if(a.nodeWithArgument(Ee,NQ(Ee,h.SyntaxKind.StaticKeyword)?me:me.prototype,r),b()!=null)return;return d.logHeritage(me),me}function Jmr(r){return null}function qmr({node:r,evaluate:e,...i}){e.expression(r.expression,i)}function Kmr({evaluate:r,node:e,...i}){let a=r.expression(e.expression,i);if(i.getCurrentError()==null)return typeof a}function Xmr({node:r,environment:e}){let i=gw(r,e,"BigInt").literal;return i(r.text.endsWith("n")?r.text.slice(0,-1):r.text)}function Ymr(r){let{node:e,environment:i,evaluate:a,stack:u,getCurrentError:d}=r,h=gw(e,i,"Object").literal,b=h.create(h.prototype),x=e.name.text;wg({...r,path:x,value:b,newBinding:!0});for(let I of e.members)if(a.nodeWithArgument(I,b,r),d()!=null)return;b.toString=()=>`[Enum: ${x}]`,u.push(b)}function Qmr(r){let{node:e,evaluate:i,environment:a,typeChecker:u,stack:d,getCurrentError:h}=r,b=gw(e,a,"Object").literal,x=b.create(b.prototype),I=u?.getSymbolAtLocation(e);if(I!=null){let L=I.exports;if(L!=null)for(let[q,te]of L.entries()){let me=te.valueDeclaration;if(me==null||(i.declaration(me,r),h()!=null))return;x[q]=d.pop()}}d.push(x)}function $mr(r){let{getCurrentError:e,stack:i}=r,a=ebt(r);e()==null&&i.push(a)}function Zmr({node:r,evaluate:e,...i}){r.importClause!=null&&e.declaration(r.importClause,i)}function e_r({node:r,evaluate:e,...i}){let{getCurrentError:a,throwError:u}=i,d=e.expression(r.expression,i);if(a()==null)return u(d)}var gzt=class extends Dfe{constructor({duration:e,environment:i,node:a,message:u=`Maximum operation duration exceeded: ${e}`}){super({violation:"maxOpDuration",message:u,node:a,environment:i}),this.duration=e}};async function t_r(r){let{node:e,environment:i,evaluate:a,policy:u,throwError:d,getCurrentError:h}=r,b=u.maxOpDuration===1/0?void 0:setTimeout(()=>{d(new gzt({duration:u.maxOpDuration,node:e,environment:i}))},u.maxOpDuration),x=a.expression(e.expression,r);if(b!=null&&clearTimeout(b),h()==null)return x}function n_r({node:r,evaluate:e,...i}){let{getCurrentError:a}=i,u=e.expression(r.condition,i);if(a()==null)return u?e.expression(r.whenTrue,i):e.expression(r.whenFalse,i)}function cbt(r,e){let i=r;for(;i!=null&&!e.isSourceFile(i);){if(NQ(i,e.SyntaxKind.StaticKeyword))return!0;i=i.parent}return!1}function kkn(r,e){var i,a;let{node:u,environment:d,evaluate:h,stack:b,typescript:x,getCurrentError:I}=r,L=h.nodeWithValue(u.name,r);if(I()!=null)return;let q=cbt(u,x);if(e==null){let me;if(x.isClassLike(u.parent)){if(h.declaration(u.parent,r),I()!=null)return;me=b.pop()}else if(me=h.expression(u.parent,r),I()!=null)return;b.push(q?me[L]:me.prototype[L]);return}let te=NQ(u,x.SyntaxKind.AsyncKeyword)?async function(...Ee){let ke=i6(d,u),Ue={...r,environment:ke};if(wg({...Ue,path:Vx,value:!1,newBinding:!0}),wg({...Ue,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(wg({...Ue,path:z7,value:this,newBinding:!0}),wg({...Ue,path:T1e,value:q?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RQ({...r,node:u.parameters,environment:ke},Ee),!(u.body==null||I()!=null)&&(h.statement(u.body,Ue),I()==null&&ST(u,ke,!0,Vx)))return b.pop()}:function(...Ee){let ke=i6(d,u),Ue={...r,environment:ke};if(wg({...Ue,path:Vx,value:!1,newBinding:!0}),wg({...Ue,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(wg({...Ue,path:z7,value:this,newBinding:!0}),wg({...Ue,path:T1e,value:q?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RQ({...r,node:u.parameters,environment:ke},Ee),!(u.body==null||I()!=null)&&(h.statement(u.body,Ue),I()==null&&ST(u,ke,!0,Vx)))return b.pop()};if(te.toString=()=>`[Method: ${L}]`,Object.setPrototypeOf(te,gw(u,d,"Function").literal),e[L]=te,FYe(u,x))for(let me of(i=OYe(u,x))!==null&&i!==void 0?i:[]){if(h.nodeWithArgument(me,[e,L],r),I()!=null)return;b.pop()}if(u.parameters!=null){let me=u.parameters.filter(Ee=>!(x.isIdentifier(Ee.name)&&Ee.name.text==="this"));for(let Ee=0;Ee<me.length;Ee++){let ke=me[Ee];if(FYe(ke,x))for(let Ue of(a=OYe(ke,x))!==null&&a!==void 0?a:[]){if(h.nodeWithArgument(Ue,[e,L,Ee],r),I()!=null)return;b.pop()}}}}function wkn({node:r,evaluate:e,typescript:i,stack:a,...u},d){var h;let{getCurrentError:b}=u,x=e.nodeWithValue(r.name,u);if(b()==null){if(d==null){if(e.declaration(r.parent,u),b()!=null)return;let I=a.pop(),L=cbt(r,i);a.push(L?I[x]:I.prototype[x]);return}if(d[x]=r.initializer==null?void 0:e.expression(r.initializer,u),b()==null&&FYe(r,i))for(let I of(h=OYe(r,i))!==null&&h!==void 0?h:[]){if(e.nodeWithArgument(I,[d,x],u),b()!=null)return;a.pop()}}}function Ikn(r,e){let{node:i,environment:a,evaluate:u,stack:d,typescript:h,getCurrentError:b}=r;if(h.isTypeLiteralNode(i.parent)||h.isInterfaceDeclaration(i.parent))return;let x=u.nodeWithValue(i.name,r);if(b()!=null)return;let I=cbt(i,h);if(e==null){let te;if(h.isClassLike(i.parent)){if(u.declaration(i.parent,r),b()!=null)return;te=d.pop()}else if(te=u.expression(i.parent,r),b()!=null)return;d.push(I?te[x]:te.prototype[x]);return}function L(){let te=i6(a,i),me={...r,environment:te};if(wg({...me,path:Vx,value:!1,newBinding:!0}),wg({...me,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(wg({...me,path:z7,value:this,newBinding:!0}),wg({...me,path:T1e,value:I?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),i.body!=null&&(u.statement(i.body,me),b()==null&&ST(i,te,!0,Vx)))return d.pop()}L.toString=()=>`[Get: ${x}]`;let q=Object.getOwnPropertyDescriptor(e,x);q==null&&(q={}),Object.defineProperty(e,x,{...q,configurable:!0,get:L})}function r_r({node:r,evaluate:e,...i}){let{getCurrentError:a}=i;if(!(r.name!=null&&(e.declaration(r.name,i),a()!=null))&&r.namedBindings!=null)if("elements"in r.namedBindings){for(let u of r.namedBindings.elements)if(e.declaration(u,i),a()!=null)return}else e.declaration(r.namedBindings.name,i)}function i_r({node:r,evaluate:e,...i}){var a;e.declaration((a=r.propertyName)!==null&&a!==void 0?a:r.name,i)}function o_r({node:r,evaluate:e,...i}){e.declaration(r.name,i)}var obt=class extends j7{constructor({node:e,environment:i,message:a="'SyntaxError'"}){super({message:a,environment:i,node:e})}};function s_r({node:r,typescript:e,throwError:i,environment:a}){var u,d;switch(r.keywordToken){case e.SyntaxKind.NewKeyword:switch(r.name.text){case"target":return(u=gw(r,a,"[[NewTarget]]"))===null||u===void 0?void 0:u.literal;default:return i(new obt({node:r.name,environment:a}))}case e.SyntaxKind.ImportKeyword:switch(r.name.text){case"meta":return(d=gw(r,a,"import.meta"))===null||d===void 0?void 0:d.literal;default:return i(new obt({node:r.name,environment:a}))}}}function Szt({node:r,...e}){var i,a,u,d,h,b;return e.typescript.isIdentifier(r)?ckn({node:r,...e}):!((a=(i=e.typescript).isPrivateIdentifier)===null||a===void 0)&&a.call(i,r)?ckn({node:r,...e}):e.typescript.isStringLiteralLike(r)?lmr({node:r,...e}):e.typescript.isNumericLiteral(r)?cmr({node:r,...e}):bkn(r,e.typescript)?umr({node:r,...e}):e.typescript.isForOfStatement(r)?Pmr({node:r,...e}):e.typescript.isForInStatement(r)?Omr({node:r,...e}):e.typescript.isForStatement(r)?Mmr({node:r,...e}):e.typescript.isWhileStatement(r)?Fmr({node:r,...e}):e.typescript.isRegularExpressionLiteral(r)?pmr({node:r,...e}):e.typescript.isObjectLiteralExpression(r)?fmr({node:r,...e}):e.typescript.isAwaitExpression(r)?t_r({node:r,...e}):!((d=(u=e.typescript).isTypeAssertionExpression)===null||d===void 0)&&d.call(u,r)||!("isTypeAssertionExpression"in e.typescript)&&e.typescript.isTypeAssertion(r)?Dmr({node:r,...e}):e.typescript.isTemplateExpression(r)?Emr({node:r,...e}):e.typescript.isMethodDeclaration(r)?kkn({node:r,...e}):e.typescript.isPropertyDeclaration(r)?wkn({node:r,...e}):e.typescript.isGetAccessorDeclaration(r)?Ikn({node:r,...e}):e.typescript.isArrayLiteralExpression(r)?mmr({node:r,...e}):e.typescript.isSourceFile(r)?Qmr({node:r,...e}):e.typescript.isModuleDeclaration(r)?$mr({node:r,...e}):e.typescript.isPrefixUnaryExpression(r)?Bmr({node:r,...e}):e.typescript.isPostfixUnaryExpression(r)?Tmr({node:r,...e}):e.typescript.isVariableStatement(r)?gmr({node:r,...e}):e.typescript.isComputedPropertyName(r)?vmr({node:r,...e}):e.typescript.isVariableDeclarationList(r)?Tkn({node:r,...e}):e.typescript.isImportDeclaration(r)?Zmr({node:r,...e}):e.typescript.isImportClause(r)?r_r({node:r,...e}):e.typescript.isImportSpecifier(r)?i_r({node:r,...e}):e.typescript.isNamespaceImport(r)?o_r({node:r,...e}):e.typescript.isImportEqualsDeclaration(r)?({...e},void 0):e.typescript.isMetaProperty(r)?s_r({node:r,...e}):e.typescript.isThrowStatement(r)?e_r({node:r,...e}):e.typescript.isVariableDeclaration(r)?xkn({node:r,...e}):e.typescript.isEnumDeclaration(r)?Ymr({node:r,...e}):e.typescript.isConstructorDeclaration(r)?jmr({node:r,...e}):e.typescript.isBinaryExpression(r)?rmr({node:r,...e}):e.typescript.isParenthesizedExpression(r)?smr({node:r,...e}):e.typescript.isExpressionStatement(r)?xmr({node:r,...e}):e.typescript.isArrowFunction(r)?amr({node:r,...e}):e.typescript.isFunctionDeclaration(r)?bmr({node:r,...e}):e.typescript.isFunctionExpression(r)?Wmr({node:r,...e}):e.typescript.isClassDeclaration(r)?zmr({node:r,...e}):e.typescript.isIfStatement(r)?Smr({node:r,...e}):e.typescript.isConditionalExpression(r)?n_r({node:r,...e}):e.typescript.isPropertyAccessExpression(r)?ymr({node:r,...e}):e.typescript.isElementAccessExpression(r)?Cmr({node:r,...e}):e.typescript.isCallExpression(r)?omr({node:r,...e}):e.typescript.isSwitchStatement(r)?Imr({node:r,...e}):e.typescript.isNewExpression(r)?Amr({node:r,...e}):e.typescript.isNonNullExpression(r)?kmr({node:r,...e}):e.typescript.isAsExpression(r)?wmr({node:r,...e}):e.typescript.isBlock(r)?_mr({node:r,...e}):e.typescript.isClassExpression(r)?Hmr({node:r,...e}):e.typescript.isSpreadElement(r)?Umr({node:r,...e}):e.typescript.isTryStatement(r)?Gmr({node:r,...e}):e.typescript.isReturnStatement(r)?hmr({node:r,...e}):Ekn(r,e.typescript)?Nmr({node:r,...e}):e.typescript.isVoidExpression(r)?qmr({node:r,...e}):e.typescript.isTypeOfExpression(r)?Kmr({node:r,...e}):lbt(r,e.typescript)?Vmr({node:r,...e}):Skn(r,e.typescript)?Jmr({node:r,...e}):!((b=(h=e.typescript).isBigIntLiteral)===null||b===void 0)&&b.call(h,r)?Xmr({node:r,...e}):e.typescript.isBreakStatement(r)?Rmr({node:r,...e}):e.typescript.isContinueStatement(r)?Lmr({node:r,...e}):e.typescript.isTypeAliasDeclaration(r)?({...e},void 0):e.typescript.isInterfaceDeclaration(r)?({...e},void 0):e.getCurrentError()!=null?void 0:e.throwError(new mR({node:r,environment:e.environment,typescript:e.typescript}))}function xzt(){return[]}function a_r(r){r.logger.logNode(r.node,r.typescript),r.statementTraversalStack=xzt(),Szt(r)}function l_r(r){let{getCurrentError:e}=r;r.logger.logNode(r.node,r.typescript);let i=Szt(r);if(e()==null)return r.reporting.reportIntermediateResults!=null&&r.reporting.reportIntermediateResults({node:r.node,value:i}),i}function c_r(r){r.logger.logNode(r.node,r.typescript),Szt(r)}function u_r({node:r,evaluate:e,typescript:i,logger:a,...u},d){var h;i.isIdentifier(r)||!((h=i.isPrivateIdentifier)===null||h===void 0)&&h.call(i,r)?(wg({...u,node:r,path:r.text,value:d,newBinding:!0}),a.logBinding(r.text,d,"evaluateBindingName")):e.nodeWithArgument(r,d,u)}function p_r(r,e){let{node:i,environment:a,evaluate:u,typescript:d,getCurrentError:h}=r,b=u.nodeWithValue(i.name,r);if(h()!=null)return;let x=cbt(i,d);function I(...q){let te=i6(a,i),me={...r,environment:te};wg({...me,path:Vx,value:!1,newBinding:!0}),wg({...me,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(wg({...me,path:z7,value:this,newBinding:!0}),wg({...me,path:T1e,value:x?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RQ({...me,node:i.parameters},q),!(i.body==null||h()!=null)&&(u.statement(i.body,me),h()==null)}I.toString=()=>`[Set: ${b}]`;let L=Object.getOwnPropertyDescriptor(e,b);L==null&&(L={}),Object.defineProperty(e,b,{...L,configurable:!0,set:I})}function f_r({node:r,evaluate:e,...i},a){let u=e.expression(r.initializer,i);if(i.getCurrentError()!=null)return;let d=e.nodeWithValue(r.name,i);i.getCurrentError()==null&&(a[d]=u)}function d_r({node:r,evaluate:e,logger:i,...a},u){let d=u!=null||r.initializer===void 0?u:e.expression(r.initializer,a);a.getCurrentError()==null&&(i.logBinding(r.name.getText(),d,"evaluateParameterDeclaration"),e.nodeWithArgument(r.name,d,a))}function m_r({node:r,evaluate:e,...i},a){let{getCurrentError:u}=i,d=r.name.text,h=e.expression(r.name,i);u()==null&&(a[d]=h)}function __r({node:r,evaluate:e,...i},a){let u=e.expression(r.expression,i);i.getCurrentError()==null&&Object.assign(a,u)}function h_r({node:r,evaluate:e,...i},a){let u=a[Symbol.iterator](),d=0;for(;d<r.elements.length;){let{done:h,value:b}=u.next();if(h===!0)break;if(e.nodeWithArgument(r.elements[d++],b,i),i.getCurrentError()!=null)return}}function g_r(r,e){var i,a,u,d;let{node:h,evaluate:b,logger:x,typescript:I,getCurrentError:L}=r,q=h.initializer==null?void 0:b.expression(h.initializer,r);if(L()==null){if((I.isIdentifier(h.name)||!((i=I.isPrivateIdentifier)===null||i===void 0)&&i.call(I,h.name))&&h.propertyName!=null){let te=h.name.text,me=b.nodeWithValue(h.propertyName,r);if(L()!=null)return;let Ee=I.isArrayBindingPattern(h.parent)?e:e[me];wg({...r,path:te,value:Ee??q,newBinding:!0})}else if((I.isIdentifier(h.name)||!((a=I.isPrivateIdentifier)===null||a===void 0)&&a.call(I,h.name))&&h.propertyName==null){let te=h.name.text,me=I.isArrayBindingPattern(h.parent)?e:e[te],Ee=me??q;x.logBinding(h.name.text,Ee),wg({...r,path:h.name.text,value:Ee,newBinding:!0})}else if(!I.isIdentifier(h.name)&&!(!((u=I.isPrivateIdentifier)===null||u===void 0)&&u.call(I,h.name))&&h.propertyName!=null){let te=b.nodeWithValue(h.propertyName,r);if(L()!=null)return;let me=I.isArrayBindingPattern(h.parent)?e:e[te],Ee=me??q;if(b.nodeWithArgument(h.name,Ee,r),L()!=null)return}else if(!I.isIdentifier(h.name)&&!(!((d=I.isPrivateIdentifier)===null||d===void 0)&&d.call(I,h.name))&&h.propertyName==null){let te=e??q;if(b.nodeWithArgument(h.name,te,r),L()!=null)return}}}function B_r({node:r,evaluate:e,...i},a){for(let u of r.elements)if(e.nodeWithArgument(u,a,i),i.getCurrentError()!=null)return}function y_r(r,e){let{node:i,evaluate:a,environment:u,getCurrentError:d}=r,h=i6(u,i),b={...r,environment:h};wg({...b,path:u8,value:!1,newBinding:!0});for(let x of i.clauses){if(a.nodeWithArgument(x,e,b),d()!=null)return;if(ST(i,h,!0,u8,G7,Vx))break}}function C_r({node:r,evaluate:e,...i},a){let{getCurrentError:u}=i;if(!(e.expression(r.expression,i)!==a||u()!=null))for(let h of r.statements){if(e.statement(h,i),u()!=null)return;if(ST(r,i.environment,!0,u8,G7,Vx))break}}function v_r(r){let{node:e,evaluate:i,environment:a,getCurrentError:u}=r;for(let d of e.statements){if(i.statement(d,r),u()!=null)return;if(ST(e,a,!0,u8,G7,Vx))break}}function b_r(r,e){let{node:i,evaluate:a,environment:u,getCurrentError:d}=r,h=i.variableDeclaration==null?u:i6(u,i),b={...r,environment:h};i.variableDeclaration!=null&&(a.nodeWithArgument(i.variableDeclaration,e,b),d()!=null)||a.statement(i.block,b)}function S_r(r,e,i,a){let u=arguments.length,d=u<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,i):a,h;for(let b=r.length-1;b>=0;b--)(h=r[b])&&(d=(u<3?h(d):u>3?h(e,i,d):h(e,i))||d);return u>3&&d&&Object.defineProperty(e,i,d),d}function x_r(r,e){return function(i,a){e(i,a,r)}}function E_r(r,[e,i,a]){let{node:u,evaluate:d,environment:h,throwError:b,stack:x,getCurrentError:I}=r,L=d.expression(u.expression,r);if(I()==null){if(typeof L!="function")return b(new rbt({node:u,environment:h,value:L,message:`${bzt(L)} is not a valid decorator implementation'`}));x.push(S_r([a!=null?x_r(a,L):L],e,i))}}function D_r(r,e){let{node:i,typeChecker:a,evaluate:u,getCurrentError:d}=r,h=a?.getConstantValue(i);if(h==null)if(i.initializer!=null){if(h=u.expression(i.initializer,r),d()!=null)return}else{let x=i.parent.members,I=x.findIndex(te=>te===i),L=x.slice(0,I),q=0;for(let te of[...L].reverse())if(q++,te.initializer!=null){let me=u.expression(te.initializer,r);if(d()!=null)return;if(typeof me=="number"){h=me+q;break}}h==null&&(h=I)}let b=u.nodeWithValue(i.name,r);d()==null&&(typeof h=="string"?e[b]=h:e[e[b]=h??0]=b)}function T_r(r,e){r.logger.logNode(r.node,r.typescript,"nodeWithArgument");let{node:i,...a}=r;if(a.typescript.isGetAccessorDeclaration(i))Ikn({node:i,...a},e);else if(a.typescript.isSetAccessorDeclaration(i))p_r({node:i,...a},e);else if(a.typescript.isPropertyAssignment(i))f_r({node:i,...a},e);else if(a.typescript.isPropertyDeclaration(i))wkn({node:i,...a},e);else if(a.typescript.isParameter(i))d_r({node:i,...a},e);else if(a.typescript.isEnumMember(i))D_r({node:i,...a},e);else if(a.typescript.isShorthandPropertyAssignment(i))m_r({node:i,...a},e);else if(a.typescript.isDecorator(i))E_r({node:i,...a},e);else if(a.typescript.isSpreadAssignment(i))__r({node:i,...a},e);else if(a.typescript.isMethodDeclaration(i))kkn({node:i,...a},e);else if(a.typescript.isArrayBindingPattern(i))h_r({node:i,...a},e);else if(a.typescript.isBindingElement(i))g_r({node:i,...a},e);else if(a.typescript.isObjectBindingPattern(i))B_r({node:i,...a},e);else if(a.typescript.isVariableDeclaration(i))xkn({node:i,...a},e);else if(a.typescript.isCaseBlock(i))y_r({node:i,...a},e);else if(a.typescript.isCaseClause(i))C_r({node:i,...a},e);else if(a.typescript.isDefaultClause(i))v_r({node:i,...a});else if(a.typescript.isCatchClause(i))b_r({node:i,...a},e);else if(a.typescript.isBindingName(i))u_r({node:i,...a},e);else if(a.typescript.isOmittedExpression(i))({...a});else{if(r.getCurrentError()!=null)return;a.throwError(new mR({node:i,environment:a.environment,typescript:a.typescript}))}}function A_r({node:r,evaluate:e,typescript:i,...a}){var u;return i.isComputedPropertyName(r)?e.expression(r.expression,a):i.isIdentifier(r)||!((u=i.isPrivateIdentifier)===null||u===void 0)&&u.call(i,r)?r.text:e.expression(r,a)}function k_r(r){r.logger.logNode(r.node,r.typescript,"nodeWithValue");let{node:e,...i}=r;return r.typescript.isPropertyName(e)||r.typescript.isPrivateIdentifier(e)?A_r({node:e,...i}):r.throwError(new mR({node:e,environment:r.environment,typescript:r.typescript}))}function w_r(r){let e=0,{policy:i,reporting:a}=r,u=(b,x)=>{let{environment:I=r.environment,statementTraversalStack:L=r.statementTraversalStack,getCurrentError:q=r.getCurrentError,throwError:te=r.throwError}=x??{},me=q();if(me!=null)return me;if(e++,e>=i.maxOps)return te(new dzt({ops:e,environment:I,node:b}));L.push(b.kind),a.reportTraversal!=null&&a.reportTraversal({node:b})},d={statement:(b,x)=>{let I={...x,statementTraversalStack:xzt()},L=u(b,I);if(!wre(L))return a_r(h(b,I))},declaration:(b,x)=>{let I=u(b,x);if(!wre(I))return c_r(h(b,x))},nodeWithArgument:(b,x,I)=>{let L=u(b,I);if(!wre(L))return T_r(h(b,I),x)},expression:(b,x)=>{let I=u(b,x);return wre(I)?I:l_r(h(b,x))},nodeWithValue:(b,x)=>{let I=u(b,x);return wre(I)?I:k_r(h(b,x))}};function h(b,x){return{...r,...x,evaluate:d,node:b}}return d}function LYe(r,e){return r===e.SyntaxKind.NumericLiteral?"NumericLiteral":e.SyntaxKind[r]}var Bzt=class{constructor(e={}){let{logLevel:i=0,color:{info:a="white",verbose:u="yellow",debug:d="magenta"}={}}=typeof e=="object"?e:{logLevel:e};this.options={logLevel:i,color:{info:a,verbose:u,debug:d}}}logInfo(e){this.options.logLevel<1||console.log(this.formatWithColor(this.options.color.info,e))}logVerbose(e){this.options.logLevel<2||console.log(this.formatWithColor(this.options.color.verbose,e))}logDebug(e){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,e))}logContinue(e,i){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"continue")} encountered within ${this.formatWithColor(this.options.color.debug,LYe(e.kind,i))}`)}logBreak(e,i){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"break")} encountered within ${this.formatWithColor(this.options.color.debug,LYe(e.kind,i))}`)}logReturn(e,i){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"return")} encountered within ${this.formatWithColor(this.options.color.debug,LYe(e.kind,i))}`)}logResult(e,i){this.options.logLevel<1||(i!=null?console.log(this.formatWithColor(this.options.color.info,`(intermediate value from context '${i}'):`),this.formatWithColor(this.options.color.info,"[RESULT]:"),this.compactValue(e)):console.log(this.formatWithColor(this.options.color.info,"[RESULT]:"),e))}logNode(e,i,a){if(this.options.logLevel<3)return;let u=`[${LYe(e.kind,i)}]`.padEnd(25);a!=null&&(u+=this.formatWithColor(this.options.color.debug,`(${a})`));let d=e.getText(),h=this.formatWithColor(this.options.color.debug,u),b=this.formatWithColor(this.options.color.debug,d);console.log(h),console.log(b)}logBinding(e,i,a){this.options.logLevel<2||console.log(`${a==null?"":this.formatWithColor(this.options.color.verbose,`(${a}): `)}${this.formatWithColor(this.options.color.verbose,`${e} ->`)}`,this.formatWithColor(this.options.color.verbose,this.compactValue(i)))}logHeritage(e){if(this.options.logLevel<3)return;let i=Object.getPrototypeOf(e);i.toString().includes("[Class")&&console.log(`${this.formatWithColor(this.options.color.debug,e.toString())} ${this.formatWithColor(this.options.color.debug,"extends")} ${this.formatWithColor(this.options.color.debug,i.toString())}`)}logStack(e){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,`Stack value: ${bzt(this.compactValue(e.lastItem))}`))}logStatementTraversalStack(e,i){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,`[${e.map(a=>LYe(a,i)).join(", ")}]`))}compactValue(e){return(0,pkn.inspect)(e,{depth:0,colors:!0,compact:!0,maxArrayLength:5})}formatWithColor(e,i){return fkn.default[e](i)}};function I_r(r,e){var i;return e.isExpressionNode(r)||e.isIdentifier(r)||((i=e.isPrivateIdentifier)===null||i===void 0?void 0:i.call(e,r))}function P_r(r,e){return e.isStatementButNotDeclaration(r)}function N_r(){let r=[];return{[Symbol.iterator](){return r[Symbol.iterator]()},get length(){return r.length},get lastItem(){return r[r.length-1]},push(...e){return r.push(...e)},pop(){return r.pop()}}}function R_r(r,e,i){r.reportErrors!=null&&!r.reportedErrorSet.has(e)&&(r.reportedErrorSet.add(e),r.reportErrors({error:e,node:e instanceof j7?e.node:i}))}function L_r(){return new WeakSet}function Pkn({typeChecker:r,node:e,environment:{preset:i="NODE",extra:a={}}={},moduleOverrides:u={},typescript:d=Pdr,logLevel:h=0,policy:{deterministic:b=!1,network:x=!1,console:I=!1,maxOps:L=1/0,maxOpDuration:q=1/0,io:te={read:!0,write:!1},process:me={exit:!1,spawnChild:!1}}={},reporting:Ee={}}){let ke=nmr(e,d);if(ke.success)return ke;let Ue={deterministic:b,maxOps:L,maxOpDuration:q,network:x,console:I,io:{read:typeof te=="boolean"?te:te.read,write:typeof te=="boolean"?te:te.write},process:{exit:typeof me=="boolean"?me:me.exit,spawnChild:typeof me=="boolean"?me:me.spawnChild}},Fe={...Ee,reportedErrorSet:L_r()},We,Tt=new Bzt(h),Vt=ur=>(R_r(Fe,ur,ur.node),We=ur,We),un=tmr({inputEnvironment:{preset:i,extra:a},startingNode:e,policy:Ue}),Jn=N_r(),Dn=xzt(),mn={policy:Ue,typeChecker:r,typescript:d,logger:Tt,stack:Jn,moduleOverrides:u,reporting:Fe,throwError:Vt,environment:un,statementTraversalStack:Dn,getCurrentError:()=>We},qn=w_r(mn);try{let ur;return I_r(e,d)?ur=qn.expression(e,mn):P_r(e,d)?(qn.statement(e,mn),ur=Jn.pop()):mkn(e,d)?(qn.declaration(e,mn),ur=Jn.pop()):Vt(new mR({node:e,environment:un,typescript:d})),We!=null?{success:!1,reason:We}:(Tt.logResult(ur),{success:!0,value:ur})}catch(ur){return Vt(ur),{success:!1,reason:ur}}}var Gkn=b_(NW(),1),V7=b_(NW(),1),GYe=b_(NW(),1);var w1e=b_(NW(),1);var FJ=b_(NW(),1);var Tzt=b_(NW(),1);var Azt=b_(NW(),1);var M_r=r=>{if(Array.isArray(r))return"array";if(typeof r=="string")return"string";if(typeof r=="number")return"number";if(typeof r=="boolean")return"boolean";if(r===null)return"null";if(r===void 0)return"undefined";throw new Error(`Unexpected literal type: ${r}`)},o6=r=>r!=null,Fkn=r=>r==null,Okn=r=>r!=null&&typeof r=="object",F_r=r=>Array.isArray(r),O_r=r=>{let e=typeof r;return e==="string"||e==="number"||e==="boolean"||r===null||r===void 0},Ux=r=>FRe.Node.isAsExpression(r)||FRe.Node.isParenthesizedExpression(r)||FRe.Node.isNonNullExpression(r)||FRe.Node.isTypeAssertion(r)||FRe.Node.isSatisfiesExpression(r)?Ux(r.getExpression()):r,W_r=r=>r.getTagNameNode().getText(),G_r=/\s+/g,Wkn=r=>r.replaceAll(G_r," "),z_r=r=>{let e=r.getSourceFile(),[i,a]=[r.getStart(),r.getEnd()],u=e.getLineAndColumnAtPos(i),d=e.getLineAndColumnAtPos(a);return{startPosition:i,startLineNumber:u.line,startColumn:u.column,endPosition:a,endLineNumber:d.line,endColumn:d.column}},Afe=class{type;stack=[];node;constructor(r){this.type=r.type,this.node=r.node,this.stack=[...r.stack??[]]}getNode(){return this.node}getStack(){return this.stack}getRange=()=>z_r(this.node);toJSON(){let r=this.getRange();return{type:this.type,value:this.value,node:this.node.getKindName(),line:r.startLineNumber,column:r.startColumn}}toString(){return JSON.stringify(this.toJSON(),null,2)}},Nkn=class extends Afe{value;isEmpty;constructor(r){super(r),this.value=r.value,this.isEmpty=r.isEmpty}},j_r=class extends Afe{value;kind;constructor(r){super(r),this.value=r.value,this.kind=r.kind}},V_r=class extends Afe{value;spreadConditions;constructor(r){super(r),this.value=r.value}},U_r=class extends Afe{value;constructor(r){super(r),this.value=r.value}},H_r=class extends Afe{},J_r=class extends Afe{whenTrue;whenFalse;constructor(r){super(r),this.whenTrue=r.whenTrue,this.whenFalse=r.whenFalse}},q_r=class extends Afe{},ORe=r=>r instanceof Afe;function Dzt(r,e,i){return SB(r).when(Fkn,()=>{}).when(ORe,a=>a).when(Okn,a=>_p.object(a,e,i)).when(F_r,a=>a.length===1?Dzt(a[0],e,i):a.map(u=>Dzt(u,e,i))).when(O_r,a=>_p.literal(a,e,i)).otherwise(()=>{})}var _p={object(r,e,i){return new Nkn({type:"object",value:r,node:e,stack:i})},literal(r,e,i){return new j_r({type:"literal",value:r,kind:M_r(r),node:e,stack:i})},map(r,e,i){return new V_r({type:"map",value:r,node:e,stack:i})},array(r,e,i){return new U_r({type:"array",value:r,node:e,stack:i})},conditional(r,e,i,a){return new J_r({type:"conditional",whenTrue:r,whenFalse:e,node:i,stack:a})},from:Dzt,emptyObject:(r,e)=>new Nkn({type:"object",value:{},isEmpty:!0,node:r,stack:e}),emptyInitializer:(r,e)=>new q_r({type:"empty-initializer",node:r,stack:e}),unresolvable:(r,e)=>new H_r({type:"unresolvable",node:r,stack:e}),isObject(r){return r?.type==="object"},isLiteral(r){return r?.type==="literal"},isMap(r){return r?.type==="map"},isArray(r){return r?.type==="array"},isUnresolvable(r){return r?.type==="unresolvable"},isConditional(r){return r?.type==="conditional"},isEmptyInitializer(r){return r?.type==="empty-initializer"},isNumberLiteral(r){return _p.isLiteral(r)&&r.kind==="number"},hasValue:r=>_p.isObject(r)||_p.isLiteral(r)||_p.isMap(r)||_p.isArray(r)},zkn=Symbol("EvalError"),Ezt=new WeakMap,K_r=(r,e,i)=>{if(i.flags?.skipEvaluate||i.canEval&&!i.canEval?.(r,e))return;if(Ezt.has(r))return Ezt.get(r);let a=Pkn({policy:{deterministic:!0,network:!1,console:!1,maxOps:Number.POSITIVE_INFINITY,maxOpDuration:1e3,io:{read:!0,write:!1},process:{exit:!1,spawnChild:!1}},...i.getEvaluateOptions?.(r,e),node:r.compilerNode,typescript:Gkn.ts}),u=a.success?a.value:zkn;return Ezt.set(r,u),u},ubt=(r,e,i)=>{let a=K_r(r,e,i);if(a!==zkn)return a};function X_r(r){return V7.Node.isFunctionDeclaration(r)||V7.Node.isFunctionExpression(r)||V7.Node.isArrowFunction(r)||V7.Node.isSourceFile(r)}function Y_r(r,e,i){let a=r.getParent();if(!a)return;let u=[],d;if((V7.Node.isVariableDeclaration(a)||V7.Node.isParameterDeclaration(a)||V7.Node.isFunctionDeclaration(a)||V7.Node.isBindingElement(a))&&a.getNameNode()==r)u.push(a),d=a;else if(V7.Node.isImportSpecifier(a)&&a.getNameNode()==r){if(i.flags?.skipTraverseFiles)return;let h=qkn(a.getImportDeclaration());if(h){let b=[a,h],x=Jkn(r.getText(),h,b,i);x&&(u.push(...b.concat(x)),d=x)}}return d&&e.push(...u),d}var Q_r=r=>{let e=r.getParent();for(;e&&!X_r(e);)e=e.getParent();return e};function mbt(r,e,i,a=new Map){let u=r,d,h=!1,b=0,x=[];do{if(u=Q_r(u),b++,!u)return;let I=r.getText();if(u.forEachDescendant((L,q)=>{if(a.has(L)){q.skip(),x.push(...a.get(L));return}if(L!=r&&(a.set(L,x),V7.Node.isIdentifier(L)&&L.getText()==I)){let te=[L],me=Y_r(L,te,i);if(me){if(V7.Node.isParameterDeclaration(me)){let Ee=me.getInitializer(),ke=me.getTypeNode();Ee?(x.push(...te.concat(Ee)),d=me):ke&&V7.Node.isTypeLiteral(ke)?(x.push(...te.concat(ke)),d=me):h=!0,q.stop();return}x.push(...te),d=me,q.stop()}}}),d||h)return d&&e.push(...x),d}while(u&&!V7.Node.isSourceFile(u)&&!d&&!h&&b<100)}var $_r=(r,e,i)=>SB(r).when(w1e.Node.isPropertyAssignment,a=>{let u=Ux(a.getNameNode());return SB(u).when(w1e.Node.isIdentifier,d=>_p.from(d.getText(),d,e)).when(w1e.Node.isComputedPropertyName,d=>{let h=d.getExpression();return e.push(h),MQ(h,e,i)}).when(Z3.or(w1e.Node.isStringLiteral,w1e.Node.isNumericLiteral),d=>_p.from(d.getLiteralText(),d,e)).otherwise(()=>{})}).when(w1e.Node.isShorthandPropertyAssignment,a=>{let u=a.getName();if(u!=null)return _p.from(u,a,e)}).otherwise(()=>{}),Z_r=(r,e,i,a)=>{let u=r.getProperties();if(u.length===0)return _p.emptyObject(r,e);let d=[],h=[];u.forEach(I=>{let L=[...e];if(L.push(I),GYe.Node.isPropertyAssignment(I)||GYe.Node.isShorthandPropertyAssignment(I)){let q=$_r(I,L,i);if(!q)return;let te=q.value;if(Fkn(te)||a&&!a?.({propName:te,propNode:I}))return;if(GYe.Node.isShorthandPropertyAssignment(I)){let Ue=I.getNameNode();L.push(Ue);let Fe=rE(Ue,L,i);if(Fe){d.push([te.toString(),Fe]);return}}let me=I.getInitializer();if(!me)return;let Ee=Ux(me);L.push(Ee);let ke=rE(Ee,L,i);if(ke){d.push([te.toString(),ke]);return}}if(GYe.Node.isSpreadAssignment(I)){let q=Ux(I.getExpression());L.push(q);let te=rE(q,L,i,a);if(!te)return;if(_p.isObject(te)){Object.entries(te.value).forEach(([me,Ee])=>{let ke=_p.from(Ee,q,L);ke&&d.push([me,ke])});return}if(_p.isMap(te)){te.value.forEach((me,Ee)=>{d.push([Ee,me])});return}_p.isConditional(te)&&h.push(te)}});let b=new Map;d.forEach(([I,L])=>{b.has(I)&&b.delete(I),b.set(I,L)});let x=_p.map(b,r,e);return h.length>0&&(x.spreadConditions=h),x},kzt=new WeakMap,ehr=r=>kzt.has(r),thr=r=>kzt.get(r),nhr=r=>r===tm.ts.SyntaxKind.PlusToken,rhr=r=>r===tm.ts.SyntaxKind.BarBarToken||r===tm.ts.SyntaxKind.QuestionQuestionToken||r===tm.ts.SyntaxKind.AmpersandAmpersandToken||r===tm.ts.SyntaxKind.EqualsEqualsEqualsToken||r===tm.ts.SyntaxKind.EqualsEqualsToken||r===tm.ts.SyntaxKind.ExclamationEqualsEqualsToken||r===tm.ts.SyntaxKind.ExclamationEqualsToken||r===tm.ts.SyntaxKind.GreaterThanEqualsToken||r===tm.ts.SyntaxKind.GreaterThanToken||r===tm.ts.SyntaxKind.LessThanEqualsToken||r===tm.ts.SyntaxKind.LessThanToken||r===tm.ts.SyntaxKind.InstanceOfKeyword||r===tm.ts.SyntaxKind.InKeyword,ihr=r=>r===tm.ts.SyntaxKind.AsteriskToken||r===tm.ts.SyntaxKind.SlashToken||r===tm.ts.SyntaxKind.PercentToken||r===tm.ts.SyntaxKind.AsteriskAsteriskToken||r===tm.ts.SyntaxKind.MinusToken,ohr=r=>r===tm.ts.SyntaxKind.BarBarToken||r===tm.ts.SyntaxKind.QuestionQuestionToken;function rE(r,e,i,a){let u=d=>(kzt.set(r,d),d);return SB(r).when(ehr,thr).when(Z3.or(tm.Node.isStringLiteral,tm.Node.isNoSubstitutionTemplateLiteral),d=>{let h=Wkn(d.getLiteralValue());return u(_p.literal(h,d,e))}).when(tm.Node.isObjectLiteralExpression,d=>u(Z_r(d,e,i,a))).when(Z3.or(tm.Node.isTrueLiteral,tm.Node.isFalseLiteral),d=>{let h=d.getLiteralValue();return u(_p.literal(h,d,e))}).when(tm.Node.isNumericLiteral,d=>{let h=d.getLiteralValue();return u(_p.literal(h,d,e))}).when(tm.Node.isNullLiteral,d=>u(_p.literal(null,d,e))).when(tm.Node.isPrefixUnaryExpression,d=>{let h=d.getOperand(),b=d.getOperatorToken(),x=rE(h,e,i);if(_p.isNumberLiteral(x))return u(b===tm.ts.SyntaxKind.MinusToken?_p.literal(-Number(x.value),d,e):x)}).when(tm.Node.isArrayLiteralExpression,d=>{let h=d.getElements().map(b=>rE(b,e,i)??u(_p.unresolvable(b,e)));return u(_p.array(h,d,e))}).when(tm.Node.isIdentifier,d=>SB(d.getText()).with("undefined",()=>u(_p.literal(void 0,d,e))).otherwise(()=>u(mhr(d,e,i)))).when(tm.Node.isTemplateHead,d=>u(_p.literal(d.getLiteralText(),d,e))).when(tm.Node.isTemplateExpression,d=>{let h=Vkn(d,e,i);return u(_p.literal(h,d,e))}).when(tm.Node.isTaggedTemplateExpression,d=>u(rE(d.getTemplate(),e,i))).when(tm.Node.isElementAccessExpression,d=>u(fbt(d,e,i))).when(tm.Node.isPropertyAccessExpression,d=>u(dbt(d,[],e,i))).when(tm.Node.isConditionalExpression,d=>{if(i.flags?.skipConditions)return u(_p.unresolvable(d,e));let h=Ux(d.getCondition()),b=(tm.Node.isIdentifier(h)?rE(h,[],i):ubt(h,e,i))??_p.unresolvable(h,e),x=ORe(b)?b:_p.from(b,d,e);if(_p.isEmptyInitializer(x))return;let I=x.getStack().some(me=>tm.Node.isBindingElement(me));if(_p.isUnresolvable(x)||_p.isConditional(x)||I){let me=Ux(d.getWhenTrue()),Ee=Ux(d.getWhenFalse());return u(Rkn({whenTrueExpr:me,whenFalseExpr:Ee,node:d,stack:e},i))}if(x.value){let me=Ux(d.getWhenTrue()),Ee=[...e],ke=rE(me,Ee,i);return u(ke??_p.unresolvable(me,e))}let L=Ux(d.getWhenFalse()),q=[...e],te=rE(L,q,i);return u(te??_p.unresolvable(d,e))}).when(tm.Node.isCallExpression,d=>{let h=ubt(d,e,i);if(h)return u(_p.from(h,d,e))}).when(tm.Node.isBinaryExpression,d=>{let h=d.getOperatorToken().getKind();return SB(h).when(nhr,()=>{let b=Kkn(d,e,i)??ubt(d,e,i);if(b)return u(_p.from(b,d,e))}).when(rhr,b=>{let x=Ux(d.getLeft()),I=Ux(d.getRight()),L={whenTrueExpr:x,whenFalseExpr:I,node:d,stack:e,canReturnWhenTrue:ohr(b)};return u(Rkn(L,i))}).when(ihr,()=>u(_p.literal(ubt(d,e,i),d,e))).otherwise(()=>{})}).otherwise(()=>{})}var jkn=r=>{if(r&&ORe(r)&&_p.isLiteral(r)&&typeof r.value=="string")return r},shr=r=>{if(r&&ORe(r)&&_p.isLiteral(r)&&typeof r.value=="number")return r},ahr=(r,e,i)=>jkn(rE(r,e,i)),MQ=(r,e,i)=>{let a=rE(r,e,i),u=jkn(a);if(u)return u;let d=shr(a);if(d)return d},Rkn=({whenTrueExpr:r,whenFalseExpr:e,node:i,stack:a,canReturnWhenTrue:u},d)=>{let h=rE(r,a,d),b=rE(e,a,d);if(u&&h&&!_p.isUnresolvable(h))return h;if(tm.Node.isBinaryExpression(i)&&i.getOperatorToken().getKind()===tm.ts.SyntaxKind.AmpersandAmpersandToken&&h&&b&&_p.isLiteral(h)&&h.value===!0)return b;if(!h&&!b)return;if(h&&!b)return h;if(!h&&b)return b;let x=h,I=b;return _p.isLiteral(x)&&_p.isLiteral(I)&&x.value===I.value?x:_p.conditional(x,I,i,a)},lhr=(r,e,i,a)=>{let u=[...i];if(tm.Node.isPropertyAssignment(r)){let d=r.getNameNode();if(tm.Node.isIdentifier(d)&&d.getText()===e)return u.push(d),r;if(tm.Node.isStringLiteral(d)&&d.getLiteralText()===e)return u.push(d),d.getLiteralText();if(tm.Node.isComputedPropertyName(d)){let h=Ux(d.getExpression()),b=MQ(h,u,a);if(!b)return;if(String(b.value)===e)return u.push(d,h),r}}if(tm.Node.isShorthandPropertyAssignment(r)){let d=r.getNameNode();if(tm.Node.isIdentifier(d)&&d.getText()===e)return u.push(d),r}},wzt=(r,e,i,a)=>{let u=[...i],d=e.pop(),h=r.getProperty(d)??r.getProperties().find(b=>lhr(b,d,u,a));if(h){if(u.push(h),tm.Node.isPropertyAssignment(h)){let b=h.getInitializer();if(!b)return;if(tm.Node.isObjectLiteralExpression(b))return e.length>0?wzt(b,e,u,a):rE(b,u,a);let x=rE(b,u,a);if(x)return x}if(tm.Node.isShorthandPropertyAssignment(h)){let b=h.getNameNode();if(e.length>0)return LQ(b,e,u,a);let x=rE(b,u,a);if(x)return x}}},Vkn=(r,e,i)=>{let a=r.getHead(),u=r.getTemplateSpans(),d=ahr(a,e,i);if(!d)return;let h=u.map(b=>{let x=b.getExpression(),I=MQ(x,e,i);if(!I)return;let L=b.getLiteral();return I.value+L.getLiteralText()});if(h.every(o6))return d.value+h.join("")},Ukn=(r,e,i,a)=>{let u=r.getParent();if(!u)return;let d=u.getParent();if(d){if(tm.Node.isArrayBindingPattern(u)){let h=u.getChildIndex();if(Number.isNaN(h))return;if(tm.Node.isVariableDeclaration(d)){let b=d.getInitializer();if(!b)return;let x=Ux(b);if(!tm.Node.isArrayLiteralExpression(x))return;let I=x.getElements()[h+1];if(!I)return;let L=[...e,x,I],q=rE(I,L,a);if(!q)return;if(_p.isObject(q)){let me=q.value[i];return _p.from(me,I,L)}if(!_p.isMap(q))return q;let te=q.value.get(i);return te||void 0}}tm.Node.isObjectBindingPattern(u)}};function chr(r,e,i,a){let u=e.at(-1);if(tm.Node.isVariableDeclaration(r)){let d=r.getInitializer();if(!d){let I=r.getTypeNode();if(!I)return;if(tm.Node.isTypeLiteral(I)){if(e.length>0){let q=[...i];q.push(I);let te=e.pop(),me=I.getProperty(te),Ee=me?.getTypeNode();for(;me&&e.length>0&&Ee&&tm.Node.isTypeLiteral(Ee);)q.push(me,Ee),te=e.pop(),me=Ee.getProperty(te),Ee=me?.getTypeNode();if(!Ee)return;let ke=Izt(Ee,q,a);return _p.from(ke,Ee,q)}let L=Hkn(I,u,i,a);return i.push(I),_p.from(L,I,i)}return}let h=Ux(d);if(tm.Node.isObjectLiteralExpression(h)){let I=wzt(h,e,i,a);return I?(i.push(h),I):void 0}if(tm.Node.isArrayLiteralExpression(h)){let I=Number(u);if(Number.isNaN(I))return;let L=h.getElements()[I];if(!L)return;i.push(h);let q=rE(L,i,a);if(q&&ORe(q)&&_p.isLiteral(q))return q}let b=[...i,h],x=rE(h,b,a);if(x)return x}if(tm.Node.isBindingElement(r)){let d=Ukn(r,i,u,a);if(d)return d}}var LQ=(r,e,i,a)=>{let u=mbt(r,i,a);if(!u)return _p.unresolvable(r,i);let d=chr(u,e,i,a);return d||_p.unresolvable(r,i)},k1e=new WeakMap,Hkn=(r,e,i,a)=>{if(k1e.has(r)){let h=k1e.get(r);if(h===null)return;if(h?.has(e))return h.get(e)}let d=r.getMembers().find(h=>tm.Node.isPropertySignature(h)&&h.getName()===e);if(tm.Node.isPropertySignature(d)&&d.isReadonly()){let h=d.getTypeNode();if(!h){k1e.set(r,null);return}let b=Izt(h,i,a);if(o6(b))return k1e.has(r)||k1e.set(r,new Map),k1e.get(r).set(e,b),b}k1e.set(r,null)};function uhr(r){return tm.Node.isStringLiteral(r)?r.getLiteralText():r.getText()}var WYe=new WeakMap,Izt=(r,e,i)=>{if(WYe.has(r))return WYe.get(r);if(tm.Node.isLiteralTypeNode(r)){let a=r.getLiteral();if(tm.Node.isStringLiteral(a)){let u=a.getLiteralText();return WYe.set(r,u),u}}if(tm.Node.isTypeLiteral(r)){let a=r.getMembers();if(!a.some(u=>!tm.Node.isPropertySignature(u)||!u.isReadonly())){let d=a.map(b=>{let x=b.getNameNode(),I=x.getText(),L=uhr(x);if(!L)return;let q=Hkn(r,I,e,i);return[L,q]}).filter(o6),h=Object.fromEntries(d);return WYe.set(r,h),h}}WYe.set(r,void 0)},phr=(r,e,i)=>{if(tm.Node.isShorthandPropertyAssignment(r)){let a=r.getNameNode();return LQ(a,[a.getText()],e,i)}if(tm.Node.isVariableDeclaration(r)){let a=r.getInitializer();if(!a){let b=r.getTypeNode();if(!b)return;if(tm.Node.isTypeLiteral(b)){e.push(b);let x=Izt(b,e,i);if(o6(x))return _p.from(x,r,e)}return _p.unresolvable(r,e)}let u=Ux(a),d=[...e,u],h=rE(u,d,i);if(h)return h}if(tm.Node.isBindingElement(r)){let a=r.getInitializer();if(!a){let b=r.getPropertyNameNode()??r.getNameNode(),x=b.getText(),I=[...e,b],L=Ukn(r,I,x,i);return L||_p.unresolvable(r,e)}let u=Ux(a),d=[...e,u],h=rE(u,d,i);if(h)return h}},Jkn=(r,e,i,a)=>{let u=e.getVariableDeclaration(r);if(u)return u;let d=dhr(r,e,i,a);if(d)return d},fhr=(r,e)=>{let i=e.getNamedExports();if(i.length===0)return!0;for(let a of i)if(a.getNameNode().getText()===r)return!0},qkn=r=>{let e=r.getProject(),i=r.getModuleSpecifierValue();if(!i)return;let a=r.getSourceFile().getFilePath(),u=tm.ts.resolveModuleName(i,a,e.getCompilerOptions(),e.getModuleResolutionHost());return u.resolvedModule?e.addSourceFileAtPath(u.resolvedModule.resolvedFileName):void 0};function dhr(r,e,i,a){for(let u of e.getExportDeclarations()){let d=[u];if(!fhr(r,u))continue;let h=qkn(u);if(!h)continue;d.push(h);let b=Jkn(r,h,i,a);if(b)return i.push(...d.concat(b)),b}}var mhr=(r,e,i)=>{let a=mbt(r,e,i);if(!a)return _p.unresolvable(r,e);let u=Ux(a),d=[...e],h=phr(u,d,i);return h||_p.unresolvable(r,d)},Kkn=(r,e,i)=>{let a=Ux(r.getLeft()),u=Ux(r.getRight()),d=MQ(a,e,i),h=MQ(u,e,i);if(!(!d||!h)&&o6(d.value)&&o6(h.value))return _p.literal(String(d.value)+String(h.value),r,e)},fbt=(r,e,i)=>{let a=Ux(r.getExpression()),u=r.getArgumentExpression();if(!u)return;let d=Ux(u),h=[...e,a,d],b=MQ(d,h,i);if(tm.Node.isIdentifier(a)&&b)return o6(b.value)?LQ(a,[b.value.toString()],h,i):void 0;if(tm.Node.isBinaryExpression(d)){if(d.getOperatorToken().getKind()!==tm.ts.SyntaxKind.PlusToken)return;let x=Kkn(d,h,i)??MQ(d,h,i);if(x&&tm.Node.isIdentifier(a))return o6(x.value)?LQ(a,[x.value.toString()],h,i):void 0}if(tm.Node.isTemplateExpression(d)){let x=Vkn(d,h,i);if(x&&tm.Node.isIdentifier(a))return LQ(a,[x],h,i)}if(tm.Node.isObjectLiteralExpression(a)&&b)return o6(b.value)?wzt(a,[b.value.toString()],h,i):void 0;if(tm.Node.isPropertyAccessExpression(d))return dbt(d,[],h,i);if(tm.Node.isPropertyAccessExpression(a)&&b&&o6(b.value)){let x=dbt(a,[],h,i);if(!x)return _p.unresolvable(a,h);let I=b.value.toString();if(_p.isObject(x)){let L=x.value[I];return _p.from(L,d,h)}if(_p.isMap(x)){let L=x.value.get(I);return _p.from(L,d,h)}if(_p.isArray(x)){let L=x.value[Number(I)];return _p.from(L,d,h)}return _p.unresolvable(a,h)}if(tm.Node.isIdentifier(a)&&tm.Node.isElementAccessExpression(d)){let x=fbt(d,h,i);if(typeof x=="string"&&o6(x))return LQ(a,[x],h,i)}if(tm.Node.isElementAccessExpression(a)&&b&&o6(b.value)){let x=fbt(a,h,i);if(Okn(x)){let I=b.value.toString();if(_p.isMap(x))return x.value.get(I);if(_p.isObject(x)){let L=x.value[I];return L?_p.from(L,r,h):void 0}}}if(tm.Node.isArrayLiteralExpression(a)&&b)return _hr(a,Number(b.value),h,i);if(tm.Node.isConditionalExpression(d)){if(i.flags?.skipConditions)return _p.unresolvable(d,h);let x=MQ(d,h,i);if(o6(x)&&o6(x.value)&&tm.Node.isIdentifier(a))return LQ(a,[x.value.toString()],h,i);let I=Ux(d.getWhenTrue()),L=Ux(d.getWhenFalse()),q=MQ(I,h,i),te=MQ(L,h,i);if(tm.Node.isIdentifier(a)){let me=q&&o6(q.value)?LQ(a,[q.value.toString()],h,i):void 0,Ee=te&&o6(te.value)?LQ(a,[te.value.toString()],h,i):void 0;return!me&&!Ee?void 0:me&&!Ee?me:!me&&Ee?Ee:_p.conditional(me,Ee,d,h)}}},_hr=(r,e,i,a)=>{let u=r.getElements()[e];if(!u)return;let d=rE(u,i,a);if(o6(d))return d},dbt=(r,e,i,a)=>{let u=r.getName(),d=Ux(r.getExpression()),h=e.concat(u);if(i.push(d),tm.Node.isIdentifier(d))return LQ(d,h,i,a);if(tm.Node.isPropertyAccessExpression(d))return dbt(d,h,i,a);if(tm.Node.isElementAccessExpression(d)){let b=fbt(d,i,a);if(!b)return;if(_p.isObject(b)){let x=b.value[u];return _p.from(x,r,i)}if(_p.isMap(b)){let x=b.value.get(u);return _p.from(x,r,i)}}},Lkn=()=>!0,_bt=(r,e,i=Lkn,a=Lkn)=>{let u=r.getArguments(),d=r.getExpression().getText();return u.length===0?_p.array([],r,[]):_p.array(u.map((h,b)=>{let x=Ux(h),I=[r,x];return SB(x).when(L=>a({fnNode:r,fnName:d,argNode:L,index:b}),L=>rE(L,I,e,i)??_p.unresolvable(L,I)).otherwise(()=>_p.unresolvable(x,I))}),r,[])},hbt=(r,e)=>{let i=r.getInitializer(),a=[r,i];return SB(i).with(xD.nullish,()=>{let u=r.getNameNode();return _p.emptyInitializer(u,a)}).when(Tzt.Node.isStringLiteral,u=>{let d=u.getLiteralText();return _p.literal(Wkn(d),u,a)}).when(Tzt.Node.isJsxExpression,u=>{let d=u.getExpression();if(!d)return;let h=Ux(d);if(!h)return;a.push(h);let b=rE(h,a,e);if(b)return b}).otherwise(()=>{})},Xkn=(r,e,i)=>{let a=Ux(r.getExpression());return rE(a,[],e,i)},Mkn=(r,e)=>r?ORe(r)?_p.isUnresolvable(r)||_p.isConditional(r)?new Map:_p.isMap(r)?r.value:new Map(Object.entries(r.value).map(([i,a])=>{let u=_p.from(a,r.getNode()??e,r.getStack()??[]);return[i,u||null]}).filter(([,i])=>i!==null)):new Map(Object.entries(r)):new Map,hhr=Z3.or(FJ.Node.isImportDeclaration,FJ.Node.isExportDeclaration),Ykn=({ast:r,...e})=>{let{components:i,functions:a,taggedTemplates:u}=e,d=new Map,h=new Map,b,x,I,L,q;return r.forEachDescendant((te,me)=>{if(hhr(te)){me.skip();return}if(i){if(FJ.Node.isJsxOpeningElement(te)||FJ.Node.isJsxSelfClosingElement(te)){if(b=te,x=W_r(b),I=x.includes("."),!i.matchTag({tagNode:b,tagName:x,isFactory:I})){b=void 0;return}d.has(x)||d.set(x,{kind:"component",nodesByProp:new Map,queryList:[]}),L=d.get(x).nodesByProp,h.has(b)||h.set(b,{name:x,props:new Map,conditionals:[]}),q=h.get(b)}if(FJ.Node.isJsxSpreadAttribute(te)){if(!b||!q)return;let Ee=({propName:We,propNode:Tt})=>i.matchProp({tagNode:b,tagName:x,propName:We,propNode:Tt}),ke=Xkn(te,e,dQ(Ee));if(!ke)return;let Ue=We=>{let Tt=Mkn(We,te),Vt=_p.isMap(We),un=_p.map(Tt,te,[b]);Vt&&We.spreadConditions?.length&&(un.spreadConditions=We.spreadConditions),Tt.forEach((Jn,Dn)=>{Ee({propName:Dn,propNode:te})&&(q.props.set(Dn,Jn),L.set(Dn,(L.get(Dn)??[]).concat(Jn)))})};(We=>SB(We).when(_p.isConditional,Tt=>{q.conditionals.push(Tt)}).when(Z3.or(_p.isObject,_p.isMap),Tt=>Ue(Tt)).otherwise(ggt))(ke);return}if(FJ.Node.isJsxAttribute(te)){if(!b||!q)return;let Ee=te.getNameNode().getText();if(!i.matchProp({tagNode:b,tagName:x,propName:Ee,propNode:te}))return;GN(hbt(te,e),NXe.fromNullable,NXe.tap(ke=>{q.props.set(Ee,ke),L.set(Ee,(L.get(Ee)??[]).concat(ke))}))}}if(a&&FJ.Node.isCallExpression(te)){let Ee=te.getExpression(),ke=FJ.Node.isCallExpression(Ee)?Ee.getExpression().getText():Ee.getText();if(!a.matchFn({fnNode:te,fnName:ke}))return;let Ue=({propName:Jn,propNode:Dn})=>a.matchProp({fnNode:te,fnName:ke,propName:Jn,propNode:Dn});d.has(ke)||d.set(ke,{kind:"function",nodesByProp:new Map,queryList:[]});let Fe=d.get(ke),We=Fe.nodesByProp,Tt=_bt(te,e,Ue,a.matchArg),Vt=GN(Tt.value,Aj.map(Jn=>SB(Jn).when(Z3.or(_p.isObject,_p.isMap),Dn=>{let mn=Mkn(Dn,te),qn=_p.isMap(Dn);mn.forEach((nn,ha)=>{(qn||Ue({propName:ha,propNode:te}))&&We.set(ha,(We.get(ha)??[]).concat(nn))});let ur=_p.map(mn,te,Dn.getStack());return _p.isMap(Dn)&&Dn.spreadConditions?.length&&(ur.spreadConditions=Dn.spreadConditions),ur}).otherwise(Dn=>Dn))),un={kind:"call-expression",name:ke,box:_p.array(Vt,te,[])};Fe.queryList.push(un)}if(u&&FJ.Node.isTaggedTemplateExpression(te)){let Ee=te.getTag(),ke=FJ.Node.isCallExpression(Ee)?Ee.getExpression().getText():Ee.getText();if(!u.matchTaggedTemplate({taggedTemplateNode:te,fnName:ke}))return;d.has(ke)||d.set(ke,{kind:"function",nodesByProp:new Map,queryList:[]});let Ue=d.get(ke),Fe={kind:"tagged-template",name:ke,box:rE(te,[],e)};Ue.queryList.push(Fe)}}),h.forEach((te,me)=>{let Ee=h.get(me);if(!Ee)return;let ke=dQ({name:te.name,box:_p.map(Ee.props,me,[])});Ee.conditionals?.length&&(ke.box.spreadConditions=Ee.conditionals);let Ue=te.name;d.get(Ue).queryList.push(ke)}),d},ghr=Z3.or(_p.isObject,_p.isMap),Qkn=(r,e)=>{let i=r.getTagNameNode().getText(),a=r.getAttributes(),u=new Map;return a.forEach(d=>{if(Azt.Node.isJsxAttribute(d)){let h=d.getNameNode(),b=hbt(d,e);if(!b)return;u.set(h.getText(),b);return}if(Azt.Node.isJsxSpreadAttribute(d)){let h=Xkn(d,e,()=>!0);if(!ghr(h))return;_p.isMap(h)&&h.value.forEach((b,x)=>{u.set(x,b)}),_p.isObject(h)&&Object.entries(h.value).forEach(([b,x])=>{u.set(b,_p.literal(x,r,[]))})}}),{name:i,props:u}},pbt=(r,e)=>{if(!r.length)return e;let i={};return r.reduce((a,u,d)=>{let h=d===r.length-1;return a[u]=h?e:{},h?i:a[u]},i),i},Tfe=(r,e)=>SB(r).with(xD.nullish,()=>{}).when(_p.isConditional,i=>{let a=e.path,u=Tfe(i.whenTrue,Object.assign({},e,{path:a,parent:i})),d=Tfe(i.whenFalse,Object.assign({},e,{path:a,parent:i}));u&&e.conditions.push(pbt(a,u)),d&&e.conditions.push(pbt(a,d))}).when(Z3.or(_p.isLiteral,_p.isObject),i=>i.value).when(_p.isEmptyInitializer,()=>!0).when(_p.isMap,i=>{if(i.spreadConditions){let a=e.path;i.spreadConditions.forEach(u=>{let d=Tfe(u.whenTrue,Object.assign({},e,{path:a,parent:i})),h=Tfe(u.whenFalse,Object.assign({},e,{path:a,parent:i}));d&&e.spreadConditions.push(pbt(a,d)),h&&e.spreadConditions.push(pbt(a,h))})}return GN(Aj.from(i.value.entries()),Aj.map(([a,u])=>[a,Tfe(u,Object.assign({},e,{path:e.path.concat(a),parent:i}))]),Aj.filter(([,a])=>o6(a)),Object.fromEntries)}).when(_p.isArray,i=>{let a=0;return GN(i.value,Aj.map(u=>Tfe(u,Object.assign({},e,{path:e.path.concat(String(a++)),parent:i}))),u=>u.flat())}).otherwise(()=>{}),Bhr=new WeakMap,yhr=r=>({value:r,has:e=>r.has(e),get:e=>r.get(e),set:(e,i)=>r.set(e,i)}),OJ=(r,e)=>{let i={cache:e?.cache??Bhr,...e,path:[],parent:void 0,conditions:[],spreadConditions:[]},a=yhr(i.cache);return{raw:SB(r).with(xD.nullish,()=>{}).when(a.has,a.get).when(Array.isArray,d=>{let h=GN(d,Aj.map(b=>Tfe(b,i)),Aj.filter(o6),Aj.head);return a.set(d,h),h}).otherwise(d=>{let h=Tfe(d,i);return a.set(d,h),h})??{},conditions:i.conditions,spreadConditions:i.spreadConditions}};ae();ae();ae();ae();function zYe(r){return Object.prototype.toString.call(r).slice(8,-1)}function Chr(r){return zYe(r)==="Undefined"}function vhr(r){return zYe(r)==="Null"}function jYe(r){if(zYe(r)!=="Object")return!1;let e=Object.getPrototypeOf(r);return e.constructor===Object&&e===Object.prototype}function Pzt(r){return zYe(r)==="Array"}function Nzt(r){return zYe(r)==="Symbol"}var Fvi=bhr(vhr,Chr);function bhr(r,e,i,a,u){return d=>r(d)||e(d)||!!i&&i(d)||!!a&&a(d)||!!u&&u(d)}function Shr(r,e){return Pzt(r)&&Pzt(e)?r.concat(e):e}function $kn(r,e,i,a){let u={}.propertyIsEnumerable.call(a,e)?"enumerable":"nonenumerable";u==="enumerable"&&(r[e]=i),u==="nonenumerable"&&Object.defineProperty(r,e,{value:i,enumerable:!1,writable:!0,configurable:!0})}function Zkn(r,e,i){if(!jYe(e))return e;let a={};if(jYe(r)){let b=Object.getOwnPropertyNames(r),x=Object.getOwnPropertySymbols(r);a=[...b,...x].reduce((I,L)=>{let q=r[L];return(!Nzt(L)&&!Object.getOwnPropertyNames(e).includes(L)||Nzt(L)&&!Object.getOwnPropertySymbols(e).includes(L))&&$kn(I,L,q,r),I},{})}let u=Object.getOwnPropertyNames(e),d=Object.getOwnPropertySymbols(e);return[...u,...d].reduce((b,x)=>{let I=e[x],L=jYe(r)?r[x]:void 0;L!==void 0&&jYe(I)&&(I=Zkn(L,I,i));let q=i?i(L,I,x):I;return $kn(b,x,q,e),b},a)}function ewn(r,...e){return e.reduce((i,a)=>Zkn(i,a,Shr),r)}var twn=r=>Object.prototype.toString.call(r)==="[object Object]";function Rzt(r,...e){let i=e.pop();for(let a of e)for(let u in a){let d=i(r[u],a[u]);d===void 0?twn(r[u])&&twn(a[u])?r[u]=Rzt({},r[u],a[u],i):r[u]=a[u]:r[u]=d}return r}function nwn(r,...e){for(let i of e)for(let a in i)r?.hasOwnProperty?.(a)||(r[a]=i[a]);return r}function xhr(r){return r.reduce((e,{extend:i})=>i?Rzt(e,i,(a,u)=>u===void 0?a??[]:a===void 0?[u]:Array.isArray(a)?[u,...a]:[u,a]):e,{})}function Ehr(r){return{...r.reduce((e,i)=>nwn(e,i),{}),extend:xhr(r)}}function VYe(r){let{extend:e=[],...i}=Ehr(r);return Rzt(i,e,(a,u)=>ewn({},a,...u))}var Dhr=r=>typeof r=="object"&&Object.keys(r).length===0,Thr=r=>Object.keys(r).reduce((e,i)=>(r[i]!==void 0&&!Dhr(r[i])&&(e[i]=r[i]),e),{});function rwn(r){let e=nwn({conditions:VYe(r.map(i=>i.conditions??{})),theme:VYe(r.map(i=>i.theme??{})),patterns:VYe(r.map(i=>i.patterns??{})),utilities:VYe(r.map(i=>i.utilities??{})),globalCss:VYe(r.map(i=>i.globalCss??{}))},...r);return Thr(e)}ae();var gbt=require("path"),UYe=(r,e)=>{for(let i of r){let a=e.match(i.pattern);if(a)for(let u of i.paths){let d=0;return u.replace(/\*/g,()=>{let b=Math.min(++d,a.length-1);return a[b]}).split(gbt.sep).join(gbt.posix.sep)}}};ae();var WRe=require("path"),Bbt=require("fs");function iwn(r,e){let i=(0,WRe.resolve)(".",r),a;for((0,Bbt.statSync)(i).isDirectory()||(i=(0,WRe.dirname)(i));;){if(a=e(i,(0,Bbt.readdirSync)(i)),a)return(0,WRe.resolve)(i,a);if(i=(0,WRe.dirname)(a=i),a===i)break}}var pwn=require("path"),HYe=b_(require("fs"),1),GRe=b_(require("path"),1),fwn=require("path"),Lzt=b_(nzt(),1);ae();var own=require("esbuild"),swn=b_(require("path"),1),ybt=b_(require("fs"),1),FQ=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,i)=>(typeof require<"u"?require:e)[i]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});function Ahr(r){let e=ybt.default.realpathSync(r);delete FQ.cache[r];let i=FQ(e);return{mod:i.default??i,dependencies:[e],code:ybt.default.readFileSync(e,"utf-8")}}async function khr(r,e){let i=await(0,own.build)({absWorkingDir:e,entryPoints:[r],outfile:"out.js",write:!1,platform:"node",bundle:!0,format:"cjs",sourcemap:!1,metafile:!0,mainFields:["module","main"]}),{text:a}=i.outputFiles[0];return{code:a,dependencies:i.metafile?Object.keys(i.metafile.inputs):[]}}function whr(r,e){let i=swn.default.extname(r),a=ybt.default.realpathSync(r),u=FQ.extensions[i];FQ.extensions[i]=(b,x)=>{x===a?b._compile(e,x):u(b,x)},delete FQ.cache[FQ.resolve(r)];let d=FQ(r),h=d.default??d;return FQ.extensions[i]=u,h}async function awn(r,e={}){let{cwd:i=process.cwd()}=e,a=FQ.resolve(r,{paths:[i]});try{return Ahr(a)}catch{let u=await khr(a,i);try{u.mod=await whr(a,u.code)}catch{u.mod=FQ("node-eval")(u.code).default}return u}}ae();var lwn=class extends Error{code;hint;constructor(r,e,i){super(e),this.code=`ERR_PANDA_${r}`,this.hint=i?.hint}};var Cbt=class extends lwn{constructor(){let r="Cannot find config file: panda.config.ts or panda.config.js/cjs/mjs/mts/cts. Did you forget to run `panda init`?";super("NO_CONFIG",r)}},cwn=class extends lwn{constructor(r){super("CONFIG_ERROR",r)}};var Mzt=require("@pandacss/preset-base"),bbt=require("@pandacss/preset-panda"),Ihr=[".ts",".js",".mts",".mjs",".cts",".cjs"],Phr=new RegExp(`panda.config(${Ihr.join("|")})$`),Nhr=r=>Phr.test(r);function Rhr({cwd:r,file:e}){return e?(0,pwn.resolve)(r,e):iwn(r,(i,a)=>a.find(Nhr))}function dwn(r,e){let i=Object.keys(r).sort((u,d)=>uwn(d)-uwn(u)),a=[];for(let u of i){let d=r[u];u=Lhr(u).replace(/\*/g,"(.+)"),a.push({pattern:new RegExp("^"+u+"$"),paths:d.map(h=>(0,fwn.resolve)(e,h))})}return a}function uwn(r){let e=r.indexOf("*");return r.substr(0,e).length}function Lhr(r){return r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Mhr=[".js",".cjs",".mjs"],Fhr=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],Ohr=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];function Whr(r,e){for(let i of e){let a=`${r}${i}`;if(HYe.default.existsSync(a)&&HYe.default.statSync(a).isFile())return a}for(let i of e){let a=`${r}/index${i}`;if(HYe.default.existsSync(a))return a}return null}var Ghr=/import[\s\S]*?['"](.{3,}?)['"]/gi,zhr=/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,jhr=/require\(['"`](.+)['"`]\)/gi,Vhr=/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi;function vbt(r,e){let{filename:i,seen:a}=r,{moduleResolution:u,...d}=r.compilerOptions??{},h=Whr(GRe.default.resolve(r.cwd,i),Mhr.includes(r.ext)?Fhr:Ohr);if(h===null||(e&&r.foundModuleAliases.set(e,h),a.size>1&&a.has(h)))return;a.add(h);let b=HYe.default.readFileSync(h,"utf-8"),x=[...b.matchAll(Ghr),...b.matchAll(zhr),...b.matchAll(jhr),...b.matchAll(Vhr)];if(!x.length)return;let I={cwd:GRe.default.dirname(h),ext:GRe.default.extname(h),seen:a,baseUrl:r.baseUrl,pathMappings:r.pathMappings,foundModuleAliases:r.foundModuleAliases};x.forEach(L=>{let q=L[1];if(q[0]==="."){vbt(Object.assign({},I,{filename:q}));return}try{let te=Lzt.default.resolveModuleName(q,h,d,Lzt.default.sys).resolvedModule;if(te&&te.extension===".ts"){vbt(Object.assign({},I,{filename:te.resolvedFileName}));return}if(!r.pathMappings)return;let me=UYe(r.pathMappings,q);if(!me)return;vbt(Object.assign({},I,{filename:me}),q)}catch{}})}function mwn(r,e={pathMappings:[]},i){if(r===null)return{deps:new Set,aliases:new Map};let a=new Map,u=new Set;return u.add(r),vbt({filename:r,ext:GRe.default.extname(r),cwd:GRe.default.dirname(r),seen:u,baseUrl:e.baseUrl,pathMappings:e.pathMappings??[],foundModuleAliases:a,compilerOptions:i}),{deps:u,aliases:a}}async function _wn(r,e){let{mod:i,dependencies:a}=await awn(r,{cwd:e,interopDefault:!0});return{config:i?.default??i,dependencies:a}}async function Uhr(r,e){let i=r.presets??[],a=[r];for(;i.length>0;){let u=await i.shift();if(typeof u=="string"){let d=await _wn(u,e);a.unshift(await d.config),i.unshift(...await d.config.presets??[])}else a.unshift(u),i.unshift(...u.presets??[])}return rwn(a)}var hwn={"@pandacss/preset-base":Mzt.preset,"@pandacss/preset-panda":bbt.preset,"@pandacss/dev/presets":bbt.preset},Hhr=Object.keys(hwn),Jhr=r=>Hhr.includes(r);async function gwn(r){let e=await Khr(r);return qhr(e,r.cwd)}async function qhr(r,e){let i=new Set;r.config.eject||i.add(Mzt.preset),r.config.presets?r.config.presets.forEach(u=>{typeof u=="string"&&Jhr(u)?i.add(hwn[u]):i.add(u)}):r.config.eject||i.add(bbt.preset),r.config.presets=Array.from(i);let a=await Uhr(r.config,e);return{...r,config:a}}async function Khr(r){let{cwd:e,file:i}=r,a=Rhr({cwd:e,file:i});if(!a)throw new Cbt;v2.debug("config:path",a);let u=await _wn(a,e);if(typeof u.config!="object")throw new cwn("\u{1F4A5} Config must export or return an object.");return{...u,config:u.config,path:a}}var f5n=require("fs"),kqt=b_(ejt(),1),F2t=require("path");ae();var HRe=require("path"),tjt=require("fs");var _Pn=r=>r===(0,HRe.dirname)(r),tyr=Symbol("stop"),nyr=r=>r===tyr;var Rbt=(r,e=process.cwd())=>{if(typeof r=="function"&&r(e)instanceof Promise)throw new Error("Async matcher can not be used in 'lookItUpSync'");if(typeof r=="string"){let a=(0,HRe.join)(e,r);return(0,tjt.existsSync)(a)?a:_Pn(e)?null:Rbt(r,(0,HRe.dirname)(e))}let i=r(e);return nyr(i)?null:i??(_Pn(e)?null:Rbt(r,(0,HRe.dirname)(e)))};ae();var JRe=b_(require("path"),1),SPn=require("fs"),xPn=b_(require("path"),1);var zJ=b_(require("path"),1),DPn=require("fs"),sjt=require("module"),EI=b_(require("path"),1),TPn=require("fs");async function hPn(r,e){let i=JRe.default.dirname(JRe.default.resolve(r)),a=e?.root?JRe.default.resolve(e.root):null;for(;i;){let u=await ryr(i,e);if(u)return u;{if(a===i)break;let d=JRe.default.dirname(i);if(d===i)break;i=d}}throw new Error(`no tsconfig file found for ${r}`)}async function ryr(r,e){let i=JRe.default.join(r,"tsconfig.json");if(e?.tsConfigPaths)return e.tsConfigPaths.has(i)?i:void 0;try{let a=await SPn.promises.stat(i);if(a.isFile()||a.isFIFO())return i}catch(a){if(a.code!=="ENOENT")throw a}}var Tbi=xPn.default.sep;function iyr(r){let e=oyr(syr(ayr(r)));return e.trim()===""?"{}":e}function oyr(r){let e=!1,i=0,a="",u=null;for(let d=0;d<r.length;d++){let h=r[d];if(h==='"'&&(EPn(r,d)||(e=!e)),e){u=null;continue}if(h===","){u=d;continue}u&&(h==="}"||h==="]"?(a+=r.slice(i,u)+" ",i=u+1,u=null):h.match(/\s/)||(u=null))}return a+r.substring(i)}function EPn(r,e){let i=e-1,a=0;for(;r[i]==="\\";)i-=1,a+=1;return!!(a%2)}function Lbt(r,e,i){return r.slice(e,i).replace(/\S/g," ")}var njt=Symbol("singleComment"),gPn=Symbol("multiComment");function syr(r){let e=!1,i=!1,a=0,u="";for(let d=0;d<r.length;d++){let h=r[d],b=r[d+1];!i&&h==='"'&&(EPn(r,d)||(e=!e)),!e&&(!i&&h+b==="//"?(u+=r.slice(a,d),a=d,i=njt,d++):i===njt&&h+b===`\r
30777
30777
  `?(d++,i=!1,u+=Lbt(r,a,d),a=d):i===njt&&h===`
30778
30778
  `?(i=!1,u+=Lbt(r,a,d),a=d):!i&&h+b==="/*"?(u+=r.slice(a,d),a=d,i=gPn,d++):i===gPn&&h+b==="*/"&&(d++,i=!1,u+=Lbt(r,a,d+1),a=d+1))}return u+(i?Lbt(r.slice(a)):r.slice(a))}function ayr(r){return r.charCodeAt(0)===65279?r.slice(1):r}var lyr=new RegExp("\\"+EI.default.posix.sep,"g"),cyr=new RegExp("\\"+EI.default.sep,"g"),rjt=new Map,APn="**/*",ljt=[".ts",".tsx",".mts",".cts"],uyr=`\\.(?:${ljt.map(r=>r.substring(1)).join("|")})`,Abi=new Function("path","return import(path).then(m => m.default)");async function BPn(r){if(EI.default.extname(r)!==".json")return;let e=EI.default.resolve(r);try{let i=await TPn.promises.stat(e);if(i.isFile()||i.isFIFO())return e}catch(i){if(i.code!=="ENOENT")throw i}throw new Error(`no tsconfig file found for ${r}`)}function ijt(r){return EI.default.posix.sep!==EI.default.sep&&r.includes(EI.default.posix.sep)?r.replace(lyr,EI.default.sep):r}function cjt(r){return EI.default.posix.sep!==EI.default.sep&&r.includes(EI.default.sep)?r.replace(cyr,EI.default.posix.sep):r}function eQe(r,e){return EI.default.sep===EI.default.posix.sep?r?EI.default.resolve(r,e):EI.default.resolve(e):cjt(r?EI.default.resolve(ijt(r),ijt(e)):EI.default.resolve(ijt(e)))}function pyr(r){let e=EI.default.dirname(r.tsconfigFile);return r.tsconfig.references.map(i=>{let a=i.path.endsWith(".json")?i.path:EI.default.join(i.path,"tsconfig.json");return eQe(e,a)})}function fyr(r,e){if(e.referenced&&ljt.some(i=>r.endsWith(i))&&!yPn(r,e)){let i=e.referenced.find(a=>yPn(r,a));if(i)return{...i,solution:e}}return e}function yPn(r,e){let i=cjt(EI.default.dirname(e.tsconfigFile)),a=(e.tsconfig.files||[]).map(h=>eQe(i,h)),u=eQe(null,r);return a.includes(r)?!0:CPn(u,i,e.tsconfig.include||(e.tsconfig.files?[]:[APn]))?!CPn(u,i,e.tsconfig.exclude||[]):!1}function CPn(r,e,i){return i.some(a=>{let u=a.length,d=!1;for(let I=a.length-1;I>-1;I--)if(a[I]==="*"||a[I]==="?"){u=I,d=!0;break}if(u<a.length-1&&!r.endsWith(a.slice(u+1))||a.endsWith("*")&&!ljt.some(I=>r.endsWith(I)))return!1;if(a===APn)return r.startsWith(`${e}/`);let h=eQe(e,a),b=-1;for(let I=0;I<h.length;I++)if(h[I]==="*"||h[I]==="?"){b=I,d=!0;break}if(b>1&&!r.startsWith(h.slice(0,b-1)))return!1;if(!d)return r===h;if(rjt.has(h))return rjt.get(h).test(r);let x=dyr(h);return rjt.set(h,x),x.test(r)})}function dyr(r){let e="^";for(let i=0;i<r.length;i++){let a=r[i];if(a==="?"){e+="[^\\/]";continue}if(a==="*"){if(r[i+1]==="*"&&r[i+2]==="/"){i+=2,e+="(?:[^\\/]*\\/)*";continue}e+="[^\\/]*";continue}"/.+^${}()|[]\\".includes(a)&&(e+="\\"),e+=a}return r.endsWith("*")&&(e+=uyr),e+="$",new RegExp(e)}async function kPn(r,e){let i=e?.cache;if(i?.has(r))return i.get(r);let a;if(e?.resolveWithEmptyIfConfigNotFound)try{a=await BPn(r)||await hPn(r,e)}catch{let h={tsconfigFile:"no_tsconfig_file_found",tsconfig:{}};return i?.set(r,h),h}else a=await BPn(r)||await hPn(r,e);let u;return i?.has(a)?u=i.get(a):(u=await ujt(a,i),await Promise.all([wPn(u,i),_yr(u,i)]),i?.set(a,u)),u=fyr(r,u),i?.set(r,u),u}async function ujt(r,e){if(e?.has(r))return e.get(r);try{let i=await DPn.promises.readFile(r,"utf-8"),a=iyr(i),u={tsconfigFile:r,tsconfig:myr(JSON.parse(a),zJ.default.dirname(r))};return e?.set(r,u),u}catch(i){throw new pjt(`parsing ${r} failed: ${i}`,"PARSE_FILE",r,i)}}function myr(r,e){var i;return(i=r.compilerOptions)!=null&&i.baseUrl&&!zJ.default.isAbsolute(r.compilerOptions.baseUrl)&&(r.compilerOptions.baseUrl=eQe(e,r.compilerOptions.baseUrl)),r}async function _yr(r,e){if(!r.tsconfig.references)return;let i=pyr(r),a=await Promise.all(i.map(u=>ujt(u,e)));await Promise.all(a.map(u=>wPn(u,e))),r.referenced=a}async function wPn(r,e){if(!r.tsconfig.extends)return;let i=[{tsconfigFile:r.tsconfigFile,tsconfig:JSON.parse(JSON.stringify(r.tsconfig))}],a=0,u=[],d=0;for(;a<i.length;){let h=i[a];if(u.push(h.tsconfigFile),h.tsconfig.extends){d+=1;let b;Array.isArray(h.tsconfig.extends)?b=h.tsconfig.extends.reverse().map(I=>vPn(I,h.tsconfigFile)):b=[vPn(h.tsconfig.extends,h.tsconfigFile)];let x=b.find(I=>u.includes(I));if(x){let I=u.concat([x]).join(" -> ");throw new pjt(`Circular dependency in "extends": ${I}`,"EXTENDS_CIRCULAR",r.tsconfigFile)}i.splice(a+1,0,...await Promise.all(b.map(I=>ujt(I,e))))}else u.splice(-d),d=0;a=a+1}r.extended=i;for(let h of r.extended.slice(1))gyr(r,h)}function vPn(r,e){let i;try{return(0,sjt.createRequire)(e).resolve(r)}catch(a){i=a}if(!zJ.default.isAbsolute(r)&&!r.startsWith("./")&&!r.startsWith("../"))try{let a=zJ.default.join(r,"tsconfig.json");return(0,sjt.createRequire)(e).resolve(a)}catch(a){i=a}throw new pjt(`failed to resolve "extends":"${r}" in ${e}`,"EXTENDS_RESOLVE",e,i)}var hyr=["compilerOptions","files","include","exclude","watchOptions","compileOnSave","typeAcquisition","buildOptions"];function gyr(r,e){let i=r.tsconfig,a=e.tsconfig,u=cjt(zJ.default.relative(zJ.default.dirname(r.tsconfigFile),zJ.default.dirname(e.tsconfigFile)));for(let d of Object.keys(a).filter(h=>hyr.includes(h)))if(d==="compilerOptions"){i.compilerOptions||(i.compilerOptions={});for(let h of Object.keys(a.compilerOptions))Object.prototype.hasOwnProperty.call(i.compilerOptions,h)||(i.compilerOptions[h]=ojt(h,a.compilerOptions[h],u))}else if(i[d]===void 0)if(d==="watchOptions"){i.watchOptions={};for(let h of Object.keys(a.watchOptions))i.watchOptions[h]=ojt(h,a.watchOptions[h],u)}else i[d]=ojt(d,a[d],u)}var Byr=["files","include","exclude","baseUrl","rootDir","rootDirs","typeRoots","outDir","outFile","declarationDir","excludeDirectories","excludeFiles"];function ojt(r,e,i){return Byr.includes(r)?Array.isArray(e)?e.map(a=>bPn(a,i)):bPn(e,i):e}function bPn(r,e){return zJ.default.isAbsolute(r)?r:zJ.default.posix.normalize(zJ.default.posix.join(e,r))}var pjt=class ajt extends Error{constructor(e,i,a,u){super(e),Object.setPrototypeOf(this,ajt.prototype),this.name=ajt.name,this.code=i,this.cause=u,this.tsconfigFile=a}};ae();ae();function Mbt(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e]}function IPn(){return typeof WeakMap<"u"?new WeakMap:yyr()}function yyr(){return{add:Mbt,delete:Mbt,get:Mbt,set:Mbt,has:function(r){return!1}}}var Cyr=Object.prototype.hasOwnProperty,djt=function(r,e){return Cyr.call(r,e)};function fjt(r,e){for(var i in e)djt(e,i)&&(r[i]=e[i]);return r}var vyr=/^[ \t]*(?:\r\n|\r|\n)/,byr=/(?:\r\n|\r|\n)[ \t]*$/,Syr=/^(?:[\r\n]|$)/,xyr=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,Eyr=/^[ \t]*[\r\n][ \t\r\n]*$/;function PPn(r,e,i){var a=0,u=r[0].match(xyr);u&&(a=u[1].length);var d="(\\r\\n|\\r|\\n).{0,"+a+"}",h=new RegExp(d,"g");e&&(r=r.slice(1));var b=i.newline,x=i.trimLeadingNewline,I=i.trimTrailingNewline,L=typeof b=="string",q=r.length,te=r.map(function(me,Ee){return me=me.replace(h,"$1"),Ee===0&&x&&(me=me.replace(vyr,"")),Ee===q-1&&I&&(me=me.replace(byr,"")),L&&(me=me.replace(/\r\n|\n|\r/g,function(ke){return b})),me});return te}function Dyr(r,e){for(var i="",a=0,u=r.length;a<u;a++)i+=r[a],a<u-1&&(i+=e[a]);return i}function Tyr(r){return djt(r,"raw")&&djt(r,"length")}function NPn(r){var e=IPn(),i=IPn();function a(d){for(var h=[],b=1;b<arguments.length;b++)h[b-1]=arguments[b];if(Tyr(d)){var x=d,I=(h[0]===a||h[0]===pp)&&Eyr.test(x[0])&&Syr.test(x[1]),L=I?i:e,q=L.get(x);if(q||(q=PPn(x,I,r),L.set(x,q)),h.length===0)return q[0];var te=Dyr(q,I?h.slice(1):h);return te}else return NPn(fjt(fjt({},r),d||{}))}var u=fjt(a,{string:function(d){return PPn([d],!1,r)[0]}});return u}var pp=NPn({trimLeadingNewline:!0,trimTrailingNewline:!0}),xT=pp;if(typeof module<"u")try{module.exports=pp,Object.defineProperty(pp,"__esModule",{value:!0}),pp.default=pp,pp.outdent=pp}catch{}px();px();var dNn=b_(jPn(),1);px();ae();var eCr="",tCr=eCr.split(","),nCr="WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationTimingFunction,animationTimeline,appearance,aspectRatio,azimuth,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockOverflow,blockSize,border,borderBlock,borderBlockColor,borderBlockStyle,borderBlockWidth,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineEnd,borderInlineColor,borderInlineStyle,borderInlineWidth,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,color,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicSize,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,direction,display,emptyCells,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontVariationSettings,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inputSecurity,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,printColorAdjust,quotes,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,scale,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockStart,scrollMarginBlockEnd,scrollMarginBottom,scrollMarginInline,scrollMarginInlineStart,scrollMarginInlineEnd,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineStart,scrollPaddingInlineEnd,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,shapeImageThreshold,shapeMargin,shapeOutside,tabSize,tableLayout,textAlign,textAlignLast,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textTransform,textUnderlineOffset,textUnderlinePosition,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,verticalAlign,viewTransitionName,visibility,whiteSpace,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,zIndex,zoom,alignmentBaseline,baselineShift,clipRule,colorInterpolation,colorRendering,dominantBaseline,fill,fillOpacity,fillRule,floodColor,floodOpacity,glyphOrientationVertical,lightingColor,marker,markerEnd,markerMid,markerStart,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,textAnchor,vectorEffect",gjt=nCr.split(",").concat(tCr),rCr=new Map(gjt.map(r=>[r,!0]));function iCr(r){let e=Object.create(null);return i=>(e[i]===void 0&&(e[i]=r(i)),e[i])}var oCr=/&|@/,VPn=iCr(r=>rCr.has(r)||r.startsWith("--")||oCr.test(r));px();var _Nn=b_(UPn(),1);ae();px();ae();px();px();px();px();px();px();px();var qPn=/(\$[^\s,]+\w)|({([^}]*)})/g,sCr=/[{}]/g;function Sjt(r){if(typeof r!="string")return[];let e=r.match(qPn);return e?e.map(i=>i.replace(sCr,"")).map(i=>i.trim()):[]}function aCr(r){return qPn.test(r)}function lCr(r){let e={};return r.forEach((i,a)=>{i instanceof Map?e[a]=Object.fromEntries(i):e[a]=i}),e}var vjt=r=>EW(r)&&"value"in r;function HPn(r){if(!vjt(r))throw new Error(`Invalid token format: ${JSON.stringify(r)}`)}var jbt=class KPn{name;value;originalValue;path;type;description;extensions;constructor(e){this.name=e.name,this.value=e.value,this.originalValue=e.value,this.path=e.path??[],e.type&&(this.type=e.type),e.description&&(this.description=e.description),this.extensions=e.extensions??{},this.extensions.condition=e.extensions?.condition??"base",this.setType()}get id(){return Rve(`${this.name}-${this.extensions.condition}-${this.value}`)}get isConditional(){return!!this.extensions?.conditions}get hasReference(){return!!this.extensions?.references}get isComposite(){return EW(this.originalValue)||Array.isArray(this.originalValue)}expandReferences(){if(!this.hasReference)return this.extensions.varRef??this.value;let e=this.extensions.references??{};return this.value=Object.keys(e).reduce((i,a)=>{let u=e[a];if(u.isConditional)return i;let d=u.expandReferences();return i.replace(`{${a}}`,d)},this.value),delete this.extensions.references,this.value}get isReference(){return aCr(this.originalValue)}get references(){return Sjt(this.originalValue)}clone(){return new KPn({name:this.name,value:this.value,type:this.type,path:[...this.path],description:this.description,extensions:bjt(this.extensions)})}getConditionTokens(){if(!this.isConditional)return;let e=this.extensions.conditions??{},i=[];return jL(e,(a,u)=>{let d=u.filter(b=>!A6e(b));if(!d.length)return;let h=this.clone();h.value=a,h.extensions.condition=d.join(":"),i.push(h)}),i}setExtensions(e){return this.extensions={...this.extensions,...e},this.setType(),this}setType(){this.type||this.extensions.category&&(this.type=cCr[this.extensions.category])}};function bjt(r){return r instanceof jbt?r.clone():Array.isArray(r)?r.map(e=>bjt(e)):typeof r=="object"&&r!==null?Object.fromEntries(Object.entries(r).map(([e,i])=>[e,bjt(i)])):r}var cCr={colors:"color",spacing:"dimension",sizing:"dimension",shadows:"shadow",fonts:"fontFamily",fontSizes:"fontSize",fontWeights:"fontWeight",letterSpacings:"letterSpacing",durations:"duration",transitions:"transition",radii:"borderRadius",gradients:"gradient",easings:"cubicBezier",borders:"border",components:"cti",assets:"asset"};function uCr(r){return r?{breakpoints:Lve(r,e=>({value:e})),sizes:Object.fromEntries(Object.entries(r).map(([e,i])=>[`breakpoint-${e}`,{value:i}]))}:{breakpoints:{},sizes:{}}}function JPn(r){return r[0]==="DEFAULT"?r:r.filter(e=>e!=="DEFAULT")}var pCr=class{allTokens=[];prefix;hash;get allNames(){return Array.from(new Set(this.allTokens.map(r=>r.name)))}constructor(r){let{tokens:e={},semanticTokens:i={},breakpoints:a,prefix:u,hash:d}=r,h=uCr(a),b=Upe({...e,breakpoints:h.breakpoints,sizes:{...e.sizes,...h.sizes}});this.prefix=u,this.hash=d,jL(b,(x,I)=>{I=JPn(I),HPn(x);let L=I[0],q=I.join("."),te=new jbt({...x,name:q,path:I});te.setExtensions({category:L,prop:I.slice(1).join(".")}),this.allTokens.push(te)},{stop:vjt}),jL(i,(x,I)=>{I=JPn(I),HPn(x);let L=I[0],q=I.join("."),te=bj(x.value)?{value:{base:x.value}}:x,{value:me,...Ee}=te,ke=new jbt({...Ee,name:q,value:me.base||"",path:I});ke.setExtensions({category:L,conditions:me,prop:I.slice(1).join(".")}),this.allTokens.push(ke)},{stop:vjt})}getByName=zE(r=>{for(let e of this.allTokens)if(e.name===r)return e});transforms=new Map;registerTransform(...r){return r.forEach(e=>{e.type||="value",e.enforce||="pre",this.transforms.set(e.name,e)}),this}execTransform(r){let e=this.transforms.get(r);e&&this.allTokens.forEach(i=>{if(i.extensions.hasReference||typeof e.match=="function"&&!e.match(i))return;let a=e.transform(i,{prefix:this.prefix,hash:this.hash});SB(e).with({type:"extensions"},()=>{i.setExtensions(a)}).with({type:"value"},()=>{i.value=a,i.isComposite&&(i.originalValue=a)}).otherwise(()=>{i[e.type]=a})})}transformTokens(r){return this.transforms.forEach(e=>{e.enforce===r&&this.execTransform(e.name)}),this}middlewares=[];registerMiddleware(...r){for(let e of r)e.enforce||="pre",this.middlewares.push(e);return this}applyMiddlewares(r){this.middlewares.forEach(e=>{e.enforce===r&&e.transform(this,{prefix:this.prefix,hash:this.hash})})}getReferences(r){return Sjt(r).map(i=>this.getByName(i)).filter(Boolean)}usesReference(r){return bj(r)?this.getReferences(r).length>0:!1}addReferences(){return this.allTokens.forEach(r=>{if(!this.usesReference(r.value))return;let e=this.getReferences(r.value);r.setExtensions({references:e.reduce((i,a)=>(i[a.name]=a,i),{})})}),this}filter(r){let e=typeof r=="function"?r:$pe(r);return this.allTokens.filter(e)}addConditionalTokens(){let r=[];return this.allTokens.forEach(e=>{r.push(e);let i=e.getConditionTokens();i&&i.length>0&&r.push(...i)}),this.allTokens=r,this}expandReferences(){return this.allTokens.forEach(r=>{r.expandReferences()}),this}build(){this.applyMiddlewares("pre"),this.transformTokens("pre"),this.addConditionalTokens(),this.addReferences(),this.expandReferences(),this.applyMiddlewares("post"),this.transformTokens("post")}get isEmpty(){return this.allTokens.length===0}},Pre={groupByCondition(r){let e=new Map;return r.allTokens.forEach(i=>{let{condition:a}=i.extensions;a&&(e.get(a)||e.set(a,new Set),e.set(a,e.get(a).add(i)))}),e},groupByColorPalette(r){let e=new Map;return r.allTokens.forEach(i=>{let{colorPalette:a,colorPaletteRoots:u}=i.extensions;!a||i.extensions.isVirtual||u.forEach(d=>{e.get(d)||e.set(d,new Map);let h=i.name.replace(d,"colorPalette"),b=r.getByName(h);if(!b)return;let x=b.extensions.var;e.get(d).set(x,i.extensions.varRef)})}),e},groupByCategory(r){let e=new Map;return r.allTokens.forEach(i=>{let{category:a,prop:u}=i.extensions;a&&(e.get(a)||e.set(a,new Map),e.set(a,e.get(a).set(u,i)))}),e},getFlattenedValues(r){let e=Pre.groupByCategory(r),i=new Map;return e.forEach((a,u)=>{i.get(u)||i.set(u,new Map),a.forEach(d=>{let{prop:h,varRef:b,isNegative:x}=d.extensions,I=x?d.isConditional?d.originalValue:d.value:b;i.set(u,i.get(u).set(h,I))})}),i},getVars(r){let e=Pre.groupByCondition(r),i=new Map;return e.forEach((a,u)=>{i.get(u)||i.set(u,new Map),a.forEach(d=>{d.extensions.isNegative||d.extensions.isVirtual||i.get(u).set(d.extensions.var,d.value)})}),i},createVarGetter(r){let e=lCr(Pre.getFlattenedValues(r));return function(a,u){return N6e(e,a,u)}},getColorPaletteValues(r){let e=new Set;return r.allTokens.forEach(i=>{let{colorPalette:a}=i.extensions;!a||i.extensions.isVirtual||e.add(a)}),e}},fCr={enforce:"pre",transform(r,{prefix:e,hash:i}){r.filter({extensions:{category:"spacing"}}).forEach(u=>{let d=[...u.path],h=P6e(d.join("-"),{prefix:e,hash:i});if(u.value==="0rem")return;let b=u.clone();b.setExtensions({isNegative:!0,prop:`-${u.extensions.prop}`,originalPath:d}),b.value=u8t.negate(h);let x=b.path.at(-1);x!=null&&(b.path[b.path.length-1]=`-${x}`),b.path&&(b.name=b.path.join(".")),r.allTokens.push(b)})}},dCr=new Set(["spacing","sizes","borderWidths","fontSizes","radii"]),mCr={enforce:"post",transform(r){r.filter(i=>dCr.has(i.extensions.category)&&!i.extensions.isNegative).forEach(i=>{i.setExtensions({pixelValue:Mve(i.value)})})}},_Cr={enforce:"post",transform(r){let e=r.filter({extensions:{category:"colors"}}),i=new Set,a=new Map;e.forEach(u=>{let{colorPalette:d,colorPaletteRoots:h,colorPaletteTokenKeys:b}=u.extensions;d&&(b.forEach(i.add,i),h.forEach(x=>{let I=a.get(x)||[];I.push(u),a.set(x,I)}))}),i.forEach(u=>{let d=new jbt({name:`colors.colorPalette.${u}`,value:`{colors.colorPalette.${u}}`,path:["colors","colorPalette",...u.split(".")]});d.setExtensions({category:"colors",prop:`colorPalette.${u}`,isVirtual:!0}),r.allTokens.push(d)}),r.transformTokens("pre")}},hCr={enforce:"post",transform(r){r.allTokens=r.allTokens.filter(e=>e.value!=="")}},gCr=[fCr,_Cr,hCr,mCr],Cjt={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi},xjt={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function BCr(r){return r.trim().replace(xjt.whitespace," ")}function yCr(r){return encodeURIComponent(r).replace(xjt.urlHexPairs,vCr)}function CCr(r){return SCr(Cjt).forEach(e=>{Cjt[e].test(r)&&(r=r.replace(Cjt[e],e))}),r}function vCr(r){switch(r){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return r.toLowerCase()}}function bCr(r){if(typeof r!="string")throw new TypeError("Expected a string, but received "+typeof r);r.charCodeAt(0)===65279&&(r=r.slice(1));let e=CCr(BCr(r)).replace(xjt.quotes,"'");return"data:image/svg+xml,"+yCr(e)}var SCr=r=>Object.keys(r),xCr=$pe({inset:xD.optional(xD.boolean),offsetX:xD.number,offsetY:xD.number,blur:xD.number,spread:xD.number,color:xD.string}),ECr={name:"tokens/shadow",match:r=>r.extensions.category==="shadows",transform(r,{prefix:e}){if(bj(r.value))return r.value;if(Array.isArray(r.value)){if(r.extensions.conditions){let i=r.extensions.conditions;for(let[a,u]of Object.entries(i))Array.isArray(u)&&(i[a]=u.map(d=>this.transform({value:d},{prefix:e})).join(", "));if(r.extensions.conditions?.base&&Array.isArray(r.originalValue))return r.extensions.conditions.base}return r.value.map(i=>this.transform({value:i},{prefix:e})).join(", ")}if(xCr(r.value)){let{offsetX:i,offsetY:a,blur:u,spread:d,color:h,inset:b}=r.value;return`${b?"inset ":""}${i}px ${a}px ${u}px ${d}px ${h}`}return r.value}},DCr=$pe({type:xD.string,placement:xD.string,stops:xD.union(xD.array(xD.string),xD.array({color:xD.string,position:xD.number}))}),TCr={name:"tokens/gradient",match:r=>r.extensions.category==="gradients",transform(r){if(bj(r.value))return r.value;if(DCr(r.value)){let{type:e,stops:i,placement:a}=r.value,u=i.map(d=>{if(bj(d))return d;let{color:h,position:b}=d;return`${h} ${b}px`});return`${e}-gradient(${a}, ${u.join(", ")})`}return r.value}},ACr={name:"tokens/fonts",match:r=>r.extensions.category==="fonts",transform(r){return Array.isArray(r.value)?r.value.join(", "):r.value}},kCr={name:"tokens/easings",match:r=>r.extensions.category==="easings",transform(r){return bj(r.value)?r.value:`cubic-bezier(${r.value.join(", ")})`}},wCr={name:"tokens/borders",match:r=>r.extensions.category==="borders",transform(r){if(bj(r.value))return r.value;let{width:e,style:i,color:a}=r.value;return`${e}px ${i} ${a}`}},ICr={name:"tokens/assets",match:r=>r.extensions.category==="assets",transform(r){let e=r.value;return SB(e).with(xD.string,i=>i).with({type:"url"},({value:i})=>`url('${i}')`).with({type:"svg"},({value:i})=>`url('${bCr(i)})'`).exhaustive()}},PCr={type:"extensions",name:"tokens/css-var",transform(r,{prefix:e,hash:i}){let{isNegative:a,originalPath:u}=r.extensions,d=a?u:r.path,h=P6e(d.join("-"),{prefix:e,hash:i});return{var:h.var,varRef:h.ref}}},NCr={enforce:"post",name:"tokens/conditionals",transform(r,{prefix:e,hash:i}){let a=Sjt(r.value);return a.length&&a.forEach(u=>{let d=P6e(u.split(".").join("-"),{prefix:e,hash:i}).ref;r.value=r.value.replace(`{${u}}`,d)}),r.value}},RCr={type:"extensions",name:"tokens/colors/colorPalette",match(r){return r.extensions.category==="colors"&&!r.extensions.isVirtual},transform(r){let e=[...r.path];if(e.pop(),e.shift(),e.length===0)return{};let i=e.reduce((h,b,x,I)=>(h.push(I.slice(0,x+1).join(".")),h),[]),a=e.at(0),u=e.join("."),d=r.path.slice(r.path.indexOf(a)+1).reduce((h,b,x,I)=>(h.push(I.slice(x).join(".")),h),[]);return{colorPalette:u,colorPaletteRoots:i,colorPaletteTokenKeys:d}}},LCr=[ECr,TCr,ACr,kCr,wCr,ICr,PCr,NCr,RCr],XPn=class extends pCr{constructor(r){super(r),this.registerTransform(...LCr),this.registerMiddleware(...gCr),this.build()}get get(){return Pre.createVarGetter(this)}get conditionMap(){return Pre.groupByCondition(this)}get categoryMap(){return Pre.groupByCategory(this)}get values(){return Pre.getFlattenedValues(this)}get colorPalettes(){return xht(Pre.groupByColorPalette(this))}get vars(){return Pre.getVars(this)}getValue(r){let e=this.values.get(r);if(e!=null)return Object.fromEntries(e)}getTokenVar(r){let e=xht(this.values);return N6e(e,r)}};px();px();var MCr=Object.defineProperty,FCr=(r,e)=>{for(var i in e)MCr(r,i,{get:e[i],enumerable:!0})},OCr={};FCr(OCr,{artifactsGenerated:()=>$Pn,buildComplete:()=>oNn,codegenComplete:()=>tNn,configExists:()=>ZPn,configWatch:()=>iNn,getMessages:()=>sNn,noExtract:()=>nNn,thankYou:()=>eNn,watch:()=>rNn});var nQe=pR.green().bold("\u2714\uFE0F"),$Pn=r=>{let{config:{outdir:e},recipes:i,patterns:a,tokens:u,jsx:d}=r;return()=>[pp`
30779
30779
  ${nQe} ${hre(e,"/css")}: the css function to author styles
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@pandacss/language-server",
3
3
  "displayName": "Panda CSS",
4
4
  "description": "🐼 The official Panda language server",
5
- "version": "0.0.0-dev-20230919122009",
5
+ "version": "0.0.0-dev-20230920234116",
6
6
  "main": "dist/index.js",
7
7
  "repository": {
8
8
  "url": "https://github.com/chakra-ui/panda",
@@ -32,14 +32,14 @@
32
32
  "vscode-languageserver": "^8.1.0",
33
33
  "vscode-languageserver-textdocument": "^1.0.8",
34
34
  "vscode-uri": "^3.0.7",
35
- "@pandacss/core": "0.0.0-dev-20230919122009",
36
- "@pandacss/extension-shared": "0.0.0-dev-20230919122009",
37
- "@pandacss/extractor": "0.0.0-dev-20230919122009",
38
- "@pandacss/node": "0.0.0-dev-20230919122009",
39
- "@pandacss/parser": "0.0.0-dev-20230919122009",
40
- "@pandacss/shared": "0.0.0-dev-20230919122009",
41
- "@pandacss/token-dictionary": "0.0.0-dev-20230919122009",
42
- "@pandacss/types": "0.0.0-dev-20230919122009"
35
+ "@pandacss/core": "0.0.0-dev-20230920234116",
36
+ "@pandacss/extension-shared": "0.0.0-dev-20230920234116",
37
+ "@pandacss/extractor": "0.0.0-dev-20230920234116",
38
+ "@pandacss/node": "0.0.0-dev-20230920234116",
39
+ "@pandacss/parser": "0.0.0-dev-20230920234116",
40
+ "@pandacss/shared": "0.0.0-dev-20230920234116",
41
+ "@pandacss/token-dictionary": "0.0.0-dev-20230920234116",
42
+ "@pandacss/types": "0.0.0-dev-20230920234116"
43
43
  },
44
44
  "dependencies": {
45
45
  "fast-glob": "^3.3.1"