@ddd-tool/domain-designer-cli 0.1.0-beta.1 → 0.1.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,191 +1,191 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var Pm=Object.create;var Dl=Object.defineProperty;var Mm=Object.getOwnPropertyDescriptor;var jm=Object.getOwnPropertyNames;var Fm=Object.getPrototypeOf,qm=Object.prototype.hasOwnProperty;var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Vm=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of jm(e))!qm.call(t,s)&&s!==n&&Dl(t,s,{get:()=>e[s],enumerable:!(r=Mm(e,s))||r.enumerable});return t};var L=(t,e,n)=>(n=t!=null?Pm(Fm(t)):{},Vm(e||!t||!t.__esModule?Dl(n,"default",{value:t,enumerable:!0}):n,t));var Yl=S(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});function me(t){let e=Object.create(null);for(let n of t.split(","))e[n]=1;return n=>n in e}var Lm={},Hm=[],Gm=()=>{},Um=()=>!1,Wm=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Km=t=>t.startsWith("onUpdate:"),Bm=Object.assign,zm=(t,e)=>{let n=t.indexOf(e);n>-1&&t.splice(n,1)},Ym=Object.prototype.hasOwnProperty,Jm=(t,e)=>Ym.call(t,e),Rt=Array.isArray,jl=t=>Nt(t)==="[object Map]",Fl=t=>Nt(t)==="[object Set]",ri=t=>Nt(t)==="[object Date]",Xm=t=>Nt(t)==="[object RegExp]",On=t=>typeof t=="function",Ne=t=>typeof t=="string",Tn=t=>typeof t=="symbol",lt=t=>t!==null&&typeof t=="object",Zm=t=>(lt(t)||On(t))&&On(t.then)&&On(t.catch),si=Object.prototype.toString,Nt=t=>si.call(t),Qm=t=>Nt(t).slice(8,-1),ql=t=>Nt(t)==="[object Object]",eg=t=>Ne(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,tg=me(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ng=me("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),vr=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},rg=/-(\w)/g,sg=vr(t=>t.replace(rg,(e,n)=>n?n.toUpperCase():"")),ig=/\B([A-Z])/g,Vl=vr(t=>t.replace(ig,"-$1").toLowerCase()),Ll=vr(t=>t.charAt(0).toUpperCase()+t.slice(1)),og=vr(t=>t?`on${Ll(t)}`:""),ag=(t,e)=>!Object.is(t,e),lg=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},cg=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},ug=t=>{let e=parseFloat(t);return isNaN(e)?t:e},dg=t=>{let e=Ne(t)?Number(t):NaN;return isNaN(e)?t:e},Pl,hg=()=>Pl||(Pl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),pg=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;function fg(t){return pg.test(t)?`__props.${t}`:`__props[${JSON.stringify(t)}]`}function mg(t,e){return t+JSON.stringify(e,(n,r)=>typeof r=="function"?r.toString():r)}var gg={TEXT:1,1:"TEXT",CLASS:2,2:"CLASS",STYLE:4,4:"STYLE",PROPS:8,8:"PROPS",FULL_PROPS:16,16:"FULL_PROPS",NEED_HYDRATION:32,32:"NEED_HYDRATION",STABLE_FRAGMENT:64,64:"STABLE_FRAGMENT",KEYED_FRAGMENT:128,128:"KEYED_FRAGMENT",UNKEYED_FRAGMENT:256,256:"UNKEYED_FRAGMENT",NEED_PATCH:512,512:"NEED_PATCH",DYNAMIC_SLOTS:1024,1024:"DYNAMIC_SLOTS",DEV_ROOT_FRAGMENT:2048,2048:"DEV_ROOT_FRAGMENT",CACHED:-1,"-1":"CACHED",BAIL:-2,"-2":"BAIL"},_g={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"NEED_HYDRATION",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},vg={ELEMENT:1,1:"ELEMENT",FUNCTIONAL_COMPONENT:2,2:"FUNCTIONAL_COMPONENT",STATEFUL_COMPONENT:4,4:"STATEFUL_COMPONENT",TEXT_CHILDREN:8,8:"TEXT_CHILDREN",ARRAY_CHILDREN:16,16:"ARRAY_CHILDREN",SLOTS_CHILDREN:32,32:"SLOTS_CHILDREN",TELEPORT:64,64:"TELEPORT",SUSPENSE:128,128:"SUSPENSE",COMPONENT_SHOULD_KEEP_ALIVE:256,256:"COMPONENT_SHOULD_KEEP_ALIVE",COMPONENT_KEPT_ALIVE:512,512:"COMPONENT_KEPT_ALIVE",COMPONENT:6,6:"COMPONENT"},bg={STABLE:1,1:"STABLE",DYNAMIC:2,2:"DYNAMIC",FORWARDED:3,3:"FORWARDED"},yg={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},wg="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",Hl=me(wg),Cg=Hl,Ml=2;function Sg(t,e=0,n=t.length){if(e=Math.max(0,Math.min(e,t.length)),n=Math.max(0,Math.min(n,t.length)),e>n)return"";let r=t.split(/(\r?\n)/),s=r.filter((a,l)=>l%2===1);r=r.filter((a,l)=>l%2===0);let i=0,o=[];for(let a=0;a<r.length;a++)if(i+=r[a].length+(s[a]&&s[a].length||0),i>=e){for(let l=a-Ml;l<=a+Ml||n>i;l++){if(l<0||l>=r.length)continue;let d=l+1;o.push(`${d}${" ".repeat(Math.max(3-String(d).length,0))}| ${r[l]}`);let u=r[l].length,c=s[l]&&s[l].length||0;if(l===a){let h=e-(i-(u+c)),f=Math.max(1,n>i?u-h:n-e);o.push(" | "+" ".repeat(h)+"^".repeat(f))}else if(l>a){if(n>i){let h=Math.max(Math.min(n-i,u),1);o.push(" | "+"^".repeat(h))}i+=u+c}}break}return o.join(`
3
- `)}function ii(t){if(Rt(t)){let e={};for(let n=0;n<t.length;n++){let r=t[n],s=Ne(r)?Gl(r):ii(r);if(s)for(let i in s)e[i]=s[i]}return e}else if(Ne(t)||lt(t))return t}var xg=/;(?![^(]*\))/g,Ag=/:([^]+)/,Eg=/\/\*[^]*?\*\//g;function Gl(t){let e={};return t.replace(Eg,"").split(xg).forEach(n=>{if(n){let r=n.split(Ag);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Og(t){if(!t)return"";if(Ne(t))return t;let e="";for(let n in t){let r=t[n];if(Ne(r)||typeof r=="number"){let s=n.startsWith("--")?n:Vl(n);e+=`${s}:${r};`}}return e}function oi(t){let e="";if(Ne(t))e=t;else if(Rt(t))for(let n=0;n<t.length;n++){let r=oi(t[n]);r&&(e+=r+" ")}else if(lt(t))for(let n in t)t[n]&&(e+=n+" ");return e.trim()}function Tg(t){if(!t)return null;let{class:e,style:n}=t;return e&&!Ne(e)&&(t.class=oi(e)),n&&(t.style=ii(n)),t}var $g="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Rg="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Ng="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",kg="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Ig=me($g),Dg=me(Rg),Pg=me(Ng),Mg=me(kg),Ul="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",jg=me(Ul),Fg=me(Ul+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function qg(t){return!!t||t===""}var Vg=/[>/="'\u0009\u000a\u000c\u0020]/,ti={};function Lg(t){if(ti.hasOwnProperty(t))return ti[t];let e=Vg.test(t);return e&&console.error(`unsafe attribute name: ${t}`),ti[t]=!e}var Hg={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},Gg=me("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap"),Ug=me("xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan"),Wg=me("accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns");function Kg(t){if(t==null)return!1;let e=typeof t;return e==="string"||e==="number"||e==="boolean"}var Bg=/["'&<>]/;function zg(t){let e=""+t,n=Bg.exec(e);if(!n)return e;let r="",s,i,o=0;for(i=n.index;i<e.length;i++){switch(e.charCodeAt(i)){case 34:s="&quot;";break;case 38:s="&amp;";break;case 39:s="&#39;";break;case 60:s="&lt;";break;case 62:s="&gt;";break;default:continue}o!==i&&(r+=e.slice(o,i)),o=i+1,r+=s}return o!==i?r+e.slice(o,i):r}var Yg=/^-?>|<!--|-->|--!>|<!-$/g;function Jg(t){return t.replace(Yg,"")}var Wl=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function Xg(t,e){return t.replace(Wl,n=>e?n==='"'?'\\\\\\"':`\\\\${n}`:`\\${n}`)}function Zg(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=br(t[r],e[r]);return n}function br(t,e){if(t===e)return!0;let n=ri(t),r=ri(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Tn(t),r=Tn(e),n||r)return t===e;if(n=Rt(t),r=Rt(e),n||r)return n&&r?Zg(t,e):!1;if(n=lt(t),r=lt(e),n||r){if(!n||!r)return!1;let s=Object.keys(t).length,i=Object.keys(e).length;if(s!==i)return!1;for(let o in t){let a=t.hasOwnProperty(o),l=e.hasOwnProperty(o);if(a&&!l||!a&&l||!br(t[o],e[o]))return!1}}return String(t)===String(e)}function Qg(t,e){return t.findIndex(n=>br(n,e))}var Kl=t=>!!(t&&t.__v_isRef===!0),Bl=t=>Ne(t)?t:t==null?"":Rt(t)||lt(t)&&(t.toString===si||!On(t.toString))?Kl(t)?Bl(t.value):JSON.stringify(t,zl,2):String(t),zl=(t,e)=>Kl(e)?zl(t,e.value):jl(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,s],i)=>(n[ni(r,i)+" =>"]=s,n),{})}:Fl(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>ni(n))}:Tn(e)?ni(e):lt(e)&&!Rt(e)&&!ql(e)?String(e):e,ni=(t,e="")=>{var n;return Tn(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};x.EMPTY_ARR=Hm;x.EMPTY_OBJ=Lm;x.NO=Um;x.NOOP=Gm;x.PatchFlagNames=_g;x.PatchFlags=gg;x.ShapeFlags=vg;x.SlotFlags=bg;x.camelize=sg;x.capitalize=Ll;x.cssVarNameEscapeSymbolsRE=Wl;x.def=cg;x.escapeHtml=zg;x.escapeHtmlComment=Jg;x.extend=Bm;x.genCacheKey=mg;x.genPropsAccessExp=fg;x.generateCodeFrame=Sg;x.getEscapedCssVarName=Xg;x.getGlobalThis=hg;x.hasChanged=ag;x.hasOwn=Jm;x.hyphenate=Vl;x.includeBooleanAttr=qg;x.invokeArrayFns=lg;x.isArray=Rt;x.isBooleanAttr=Fg;x.isBuiltInDirective=ng;x.isDate=ri;x.isFunction=On;x.isGloballyAllowed=Hl;x.isGloballyWhitelisted=Cg;x.isHTMLTag=Ig;x.isIntegerKey=eg;x.isKnownHtmlAttr=Gg;x.isKnownMathMLAttr=Wg;x.isKnownSvgAttr=Ug;x.isMap=jl;x.isMathMLTag=Pg;x.isModelListener=Km;x.isObject=lt;x.isOn=Wm;x.isPlainObject=ql;x.isPromise=Zm;x.isRegExp=Xm;x.isRenderableAttrValue=Kg;x.isReservedProp=tg;x.isSSRSafeAttrName=Lg;x.isSVGTag=Dg;x.isSet=Fl;x.isSpecialBooleanAttr=jg;x.isString=Ne;x.isSymbol=Tn;x.isVoidTag=Mg;x.looseEqual=br;x.looseIndexOf=Qg;x.looseToNumber=ug;x.makeMap=me;x.normalizeClass=oi;x.normalizeProps=Tg;x.normalizeStyle=ii;x.objectToString=si;x.parseStringStyle=Gl;x.propsToAttrMap=Hg;x.remove=zm;x.slotFlagsText=yg;x.stringifyStyle=Og;x.toDisplayString=Bl;x.toHandlerKey=og;x.toNumber=dg;x.toRawType=Qm;x.toTypeString=Nt});var uc=S(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});function ge(t){let e=Object.create(null);for(let n of t.split(","))e[n]=1;return n=>n in e}var e_=Object.freeze({}),t_=Object.freeze([]),n_=()=>{},r_=()=>!1,s_=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),i_=t=>t.startsWith("onUpdate:"),o_=Object.assign,a_=(t,e)=>{let n=t.indexOf(e);n>-1&&t.splice(n,1)},l_=Object.prototype.hasOwnProperty,c_=(t,e)=>l_.call(t,e),kt=Array.isArray,Zl=t=>It(t)==="[object Map]",Ql=t=>It(t)==="[object Set]",ci=t=>It(t)==="[object Date]",u_=t=>It(t)==="[object RegExp]",$n=t=>typeof t=="function",ke=t=>typeof t=="string",Rn=t=>typeof t=="symbol",ct=t=>t!==null&&typeof t=="object",d_=t=>(ct(t)||$n(t))&&$n(t.then)&&$n(t.catch),ui=Object.prototype.toString,It=t=>ui.call(t),h_=t=>It(t).slice(8,-1),ec=t=>It(t)==="[object Object]",p_=t=>ke(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,f_=ge(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),m_=ge("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),yr=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},g_=/-(\w)/g,__=yr(t=>t.replace(g_,(e,n)=>n?n.toUpperCase():"")),v_=/\B([A-Z])/g,tc=yr(t=>t.replace(v_,"-$1").toLowerCase()),nc=yr(t=>t.charAt(0).toUpperCase()+t.slice(1)),b_=yr(t=>t?`on${nc(t)}`:""),y_=(t,e)=>!Object.is(t,e),w_=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},C_=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},S_=t=>{let e=parseFloat(t);return isNaN(e)?t:e},x_=t=>{let e=ke(t)?Number(t):NaN;return isNaN(e)?t:e},Jl,A_=()=>Jl||(Jl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),E_=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;function O_(t){return E_.test(t)?`__props.${t}`:`__props[${JSON.stringify(t)}]`}function T_(t,e){return t+JSON.stringify(e,(n,r)=>typeof r=="function"?r.toString():r)}var $_={TEXT:1,1:"TEXT",CLASS:2,2:"CLASS",STYLE:4,4:"STYLE",PROPS:8,8:"PROPS",FULL_PROPS:16,16:"FULL_PROPS",NEED_HYDRATION:32,32:"NEED_HYDRATION",STABLE_FRAGMENT:64,64:"STABLE_FRAGMENT",KEYED_FRAGMENT:128,128:"KEYED_FRAGMENT",UNKEYED_FRAGMENT:256,256:"UNKEYED_FRAGMENT",NEED_PATCH:512,512:"NEED_PATCH",DYNAMIC_SLOTS:1024,1024:"DYNAMIC_SLOTS",DEV_ROOT_FRAGMENT:2048,2048:"DEV_ROOT_FRAGMENT",CACHED:-1,"-1":"CACHED",BAIL:-2,"-2":"BAIL"},R_={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"NEED_HYDRATION",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},N_={ELEMENT:1,1:"ELEMENT",FUNCTIONAL_COMPONENT:2,2:"FUNCTIONAL_COMPONENT",STATEFUL_COMPONENT:4,4:"STATEFUL_COMPONENT",TEXT_CHILDREN:8,8:"TEXT_CHILDREN",ARRAY_CHILDREN:16,16:"ARRAY_CHILDREN",SLOTS_CHILDREN:32,32:"SLOTS_CHILDREN",TELEPORT:64,64:"TELEPORT",SUSPENSE:128,128:"SUSPENSE",COMPONENT_SHOULD_KEEP_ALIVE:256,256:"COMPONENT_SHOULD_KEEP_ALIVE",COMPONENT_KEPT_ALIVE:512,512:"COMPONENT_KEPT_ALIVE",COMPONENT:6,6:"COMPONENT"},k_={STABLE:1,1:"STABLE",DYNAMIC:2,2:"DYNAMIC",FORWARDED:3,3:"FORWARDED"},I_={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},D_="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",rc=ge(D_),P_=rc,Xl=2;function M_(t,e=0,n=t.length){if(e=Math.max(0,Math.min(e,t.length)),n=Math.max(0,Math.min(n,t.length)),e>n)return"";let r=t.split(/(\r?\n)/),s=r.filter((a,l)=>l%2===1);r=r.filter((a,l)=>l%2===0);let i=0,o=[];for(let a=0;a<r.length;a++)if(i+=r[a].length+(s[a]&&s[a].length||0),i>=e){for(let l=a-Xl;l<=a+Xl||n>i;l++){if(l<0||l>=r.length)continue;let d=l+1;o.push(`${d}${" ".repeat(Math.max(3-String(d).length,0))}| ${r[l]}`);let u=r[l].length,c=s[l]&&s[l].length||0;if(l===a){let h=e-(i-(u+c)),f=Math.max(1,n>i?u-h:n-e);o.push(" | "+" ".repeat(h)+"^".repeat(f))}else if(l>a){if(n>i){let h=Math.max(Math.min(n-i,u),1);o.push(" | "+"^".repeat(h))}i+=u+c}}break}return o.join(`
4
- `)}function di(t){if(kt(t)){let e={};for(let n=0;n<t.length;n++){let r=t[n],s=ke(r)?sc(r):di(r);if(s)for(let i in s)e[i]=s[i]}return e}else if(ke(t)||ct(t))return t}var j_=/;(?![^(]*\))/g,F_=/:([^]+)/,q_=/\/\*[^]*?\*\//g;function sc(t){let e={};return t.replace(q_,"").split(j_).forEach(n=>{if(n){let r=n.split(F_);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function V_(t){if(!t)return"";if(ke(t))return t;let e="";for(let n in t){let r=t[n];if(ke(r)||typeof r=="number"){let s=n.startsWith("--")?n:tc(n);e+=`${s}:${r};`}}return e}function hi(t){let e="";if(ke(t))e=t;else if(kt(t))for(let n=0;n<t.length;n++){let r=hi(t[n]);r&&(e+=r+" ")}else if(ct(t))for(let n in t)t[n]&&(e+=n+" ");return e.trim()}function L_(t){if(!t)return null;let{class:e,style:n}=t;return e&&!ke(e)&&(t.class=hi(e)),n&&(t.style=di(n)),t}var H_="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",G_="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",U_="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",W_="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",K_=ge(H_),B_=ge(G_),z_=ge(U_),Y_=ge(W_),ic="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",J_=ge(ic),X_=ge(ic+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Z_(t){return!!t||t===""}var Q_=/[>/="'\u0009\u000a\u000c\u0020]/,ai={};function ev(t){if(ai.hasOwnProperty(t))return ai[t];let e=Q_.test(t);return e&&console.error(`unsafe attribute name: ${t}`),ai[t]=!e}var tv={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},nv=ge("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap"),rv=ge("xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan"),sv=ge("accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns");function iv(t){if(t==null)return!1;let e=typeof t;return e==="string"||e==="number"||e==="boolean"}var ov=/["'&<>]/;function av(t){let e=""+t,n=ov.exec(e);if(!n)return e;let r="",s,i,o=0;for(i=n.index;i<e.length;i++){switch(e.charCodeAt(i)){case 34:s="&quot;";break;case 38:s="&amp;";break;case 39:s="&#39;";break;case 60:s="&lt;";break;case 62:s="&gt;";break;default:continue}o!==i&&(r+=e.slice(o,i)),o=i+1,r+=s}return o!==i?r+e.slice(o,i):r}var lv=/^-?>|<!--|-->|--!>|<!-$/g;function cv(t){return t.replace(lv,"")}var oc=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function uv(t,e){return t.replace(oc,n=>e?n==='"'?'\\\\\\"':`\\\\${n}`:`\\${n}`)}function dv(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=wr(t[r],e[r]);return n}function wr(t,e){if(t===e)return!0;let n=ci(t),r=ci(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Rn(t),r=Rn(e),n||r)return t===e;if(n=kt(t),r=kt(e),n||r)return n&&r?dv(t,e):!1;if(n=ct(t),r=ct(e),n||r){if(!n||!r)return!1;let s=Object.keys(t).length,i=Object.keys(e).length;if(s!==i)return!1;for(let o in t){let a=t.hasOwnProperty(o),l=e.hasOwnProperty(o);if(a&&!l||!a&&l||!wr(t[o],e[o]))return!1}}return String(t)===String(e)}function hv(t,e){return t.findIndex(n=>wr(n,e))}var ac=t=>!!(t&&t.__v_isRef===!0),lc=t=>ke(t)?t:t==null?"":kt(t)||ct(t)&&(t.toString===ui||!$n(t.toString))?ac(t)?lc(t.value):JSON.stringify(t,cc,2):String(t),cc=(t,e)=>ac(e)?cc(t,e.value):Zl(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,s],i)=>(n[li(r,i)+" =>"]=s,n),{})}:Ql(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>li(n))}:Rn(e)?li(e):ct(e)&&!kt(e)&&!ec(e)?String(e):e,li=(t,e="")=>{var n;return Rn(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};A.EMPTY_ARR=t_;A.EMPTY_OBJ=e_;A.NO=r_;A.NOOP=n_;A.PatchFlagNames=R_;A.PatchFlags=$_;A.ShapeFlags=N_;A.SlotFlags=k_;A.camelize=__;A.capitalize=nc;A.cssVarNameEscapeSymbolsRE=oc;A.def=C_;A.escapeHtml=av;A.escapeHtmlComment=cv;A.extend=o_;A.genCacheKey=T_;A.genPropsAccessExp=O_;A.generateCodeFrame=M_;A.getEscapedCssVarName=uv;A.getGlobalThis=A_;A.hasChanged=y_;A.hasOwn=c_;A.hyphenate=tc;A.includeBooleanAttr=Z_;A.invokeArrayFns=w_;A.isArray=kt;A.isBooleanAttr=X_;A.isBuiltInDirective=m_;A.isDate=ci;A.isFunction=$n;A.isGloballyAllowed=rc;A.isGloballyWhitelisted=P_;A.isHTMLTag=K_;A.isIntegerKey=p_;A.isKnownHtmlAttr=nv;A.isKnownMathMLAttr=sv;A.isKnownSvgAttr=rv;A.isMap=Zl;A.isMathMLTag=z_;A.isModelListener=i_;A.isObject=ct;A.isOn=s_;A.isPlainObject=ec;A.isPromise=d_;A.isRegExp=u_;A.isRenderableAttrValue=iv;A.isReservedProp=f_;A.isSSRSafeAttrName=ev;A.isSVGTag=B_;A.isSet=Ql;A.isSpecialBooleanAttr=J_;A.isString=ke;A.isSymbol=Rn;A.isVoidTag=Y_;A.looseEqual=wr;A.looseIndexOf=hv;A.looseToNumber=S_;A.makeMap=ge;A.normalizeClass=hi;A.normalizeProps=L_;A.normalizeStyle=di;A.objectToString=ui;A.parseStringStyle=sc;A.propsToAttrMap=tv;A.remove=a_;A.slotFlagsText=I_;A.stringifyStyle=V_;A.toDisplayString=lc;A.toHandlerKey=b_;A.toNumber=x_;A.toRawType=h_;A.toTypeString=It});var fi=S((dE,pi)=>{"use strict";process.env.NODE_ENV==="production"?pi.exports=Yl():pi.exports=uc()});var Rc=S(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});var $=fi(),re,Ar=class{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=re,!e&&re&&(this.index=(re.scopes||(re.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){let n=re;try{return re=this,e()}finally{re=n}}}on(){re=this}off(){re=this.parent}stop(e){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}};function pv(t){return new Ar(t)}function pc(){return re}function fv(t,e=!1){re&&re.cleanups.push(t)}var q,mv={ACTIVE:1,1:"ACTIVE",RUNNING:2,2:"RUNNING",TRACKING:4,4:"TRACKING",NOTIFIED:8,8:"NOTIFIED",DIRTY:16,16:"DIRTY",ALLOW_RECURSE:32,32:"ALLOW_RECURSE",PAUSED:64,64:"PAUSED"},mi=new WeakSet,Pt=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,re&&re.active&&re.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,mi.has(this)&&(mi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||mc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,dc(this),gc(this);let e=q,n=_e;q=this,_e=!0;try{return this.fn()}finally{_c(this),q=e,_e=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ti(e);this.deps=this.depsTail=void 0,dc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?mi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){vi(this)&&this.run()}get dirty(){return vi(this)}},fc=0,kn,In;function mc(t,e=!1){if(t.flags|=8,e){t.next=In,In=t;return}t.next=kn,kn=t}function Ei(){fc++}function Oi(){if(--fc>0)return;if(In){let e=In;for(In=void 0;e;){let n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;kn;){let e=kn;for(kn=void 0;e;){let n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(r){t||(t=r)}e=n}}if(t)throw t}function gc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function _c(t){let e,n=t.depsTail,r=n;for(;r;){let s=r.prevDep;r.version===-1?(r===n&&(n=s),Ti(r),gv(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}t.deps=e,t.depsTail=n}function vi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(vc(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function vc(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Dn))return;t.globalVersion=Dn;let e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!vi(t)){t.flags&=-3;return}let n=q,r=_e;q=t,_e=!0;try{gc(t);let s=t.fn(t._value);(e.version===0||$.hasChanged(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{q=n,_e=r,_c(t),t.flags&=-3}}function Ti(t,e=!1){let{dep:n,prevSub:r,nextSub:s}=t;if(r&&(r.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=r,t.nextSub=void 0),n.subs===t&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Ti(i,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function gv(t){let{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function _v(t,e){t.effect instanceof Pt&&(t=t.effect.fn);let n=new Pt(t);e&&$.extend(n,e);try{n.run()}catch(s){throw n.stop(),s}let r=n.run.bind(n);return r.effect=n,r}function vv(t){t.effect.stop()}var _e=!0,$i=[];function Ri(){$i.push(_e),_e=!1}function bv(){$i.push(_e),_e=!0}function Ni(){let t=$i.pop();_e=t===void 0?!0:t}function yv(t,e=!1){q instanceof Pt&&(q.cleanup=t)}function dc(t){let{cleanup:e}=t;if(t.cleanup=void 0,e){let n=q;q=void 0;try{e()}finally{q=n}}}var Dn=0,bi=class{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Qt=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!q||!_e||q===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==q)n=this.activeLink=new bi(q,this),q.deps?(n.prevDep=q.depsTail,q.depsTail.nextDep=n,q.depsTail=n):q.deps=q.depsTail=n,bc(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){let r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=q.depsTail,n.nextDep=void 0,q.depsTail.nextDep=n,q.depsTail=n,q.deps===n&&(q.deps=r)}return n}trigger(e){this.version++,Dn++,this.notify(e)}notify(e){Ei();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Oi()}}};function bc(t){if(t.dep.sc++,t.sub.flags&4){let e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let r=e.deps;r;r=r.nextDep)bc(r)}let n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}var Er=new WeakMap,dt=Symbol(""),Or=Symbol(""),en=Symbol("");function se(t,e,n){if(_e&&q){let r=Er.get(t);r||Er.set(t,r=new Map);let s=r.get(n);s||(r.set(n,s=new Qt),s.map=r,s.key=n),s.track()}}function Ke(t,e,n,r,s,i){let o=Er.get(t);if(!o){Dn++;return}let a=l=>{l&&l.trigger()};if(Ei(),e==="clear")o.forEach(a);else{let l=$.isArray(t),d=l&&$.isIntegerKey(n);if(l&&n==="length"){let u=Number(r);o.forEach((c,h)=>{(h==="length"||h===en||!$.isSymbol(h)&&h>=u)&&a(c)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),d&&a(o.get(en)),e){case"add":l?d&&a(o.get("length")):(a(o.get(dt)),$.isMap(t)&&a(o.get(Or)));break;case"delete":l||(a(o.get(dt)),$.isMap(t)&&a(o.get(Or)));break;case"set":$.isMap(t)&&a(o.get(dt));break}}Oi()}function wv(t,e){let n=Er.get(t);return n&&n.get(e)}function Dt(t){let e=M(t);return e===t?e:(se(e,"iterate",en),ye(t)?e:e.map(ee))}function Ir(t){return se(t=M(t),"iterate",en),t}var Cv={__proto__:null,[Symbol.iterator](){return gi(this,Symbol.iterator,ee)},concat(...t){return Dt(this).concat(...t.map(e=>$.isArray(e)?Dt(e):e))},entries(){return gi(this,"entries",t=>(t[1]=ee(t[1]),t))},every(t,e){return We(this,"every",t,e,void 0,arguments)},filter(t,e){return We(this,"filter",t,e,n=>n.map(ee),arguments)},find(t,e){return We(this,"find",t,e,ee,arguments)},findIndex(t,e){return We(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return We(this,"findLast",t,e,ee,arguments)},findLastIndex(t,e){return We(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return We(this,"forEach",t,e,void 0,arguments)},includes(...t){return _i(this,"includes",t)},indexOf(...t){return _i(this,"indexOf",t)},join(t){return Dt(this).join(t)},lastIndexOf(...t){return _i(this,"lastIndexOf",t)},map(t,e){return We(this,"map",t,e,void 0,arguments)},pop(){return Nn(this,"pop")},push(...t){return Nn(this,"push",t)},reduce(t,...e){return hc(this,"reduce",t,e)},reduceRight(t,...e){return hc(this,"reduceRight",t,e)},shift(){return Nn(this,"shift")},some(t,e){return We(this,"some",t,e,void 0,arguments)},splice(...t){return Nn(this,"splice",t)},toReversed(){return Dt(this).toReversed()},toSorted(t){return Dt(this).toSorted(t)},toSpliced(...t){return Dt(this).toSpliced(...t)},unshift(...t){return Nn(this,"unshift",t)},values(){return gi(this,"values",ee)}};function gi(t,e,n){let r=Ir(t),s=r[e]();return r!==t&&!ye(t)&&(s._next=s.next,s.next=()=>{let i=s._next();return i.value&&(i.value=n(i.value)),i}),s}var Sv=Array.prototype;function We(t,e,n,r,s,i){let o=Ir(t),a=o!==t&&!ye(t),l=o[e];if(l!==Sv[e]){let c=l.apply(t,i);return a?ee(c):c}let d=n;o!==t&&(a?d=function(c,h){return n.call(this,ee(c),h,t)}:n.length>2&&(d=function(c,h){return n.call(this,c,h,t)}));let u=l.call(o,d,r);return a&&s?s(u):u}function hc(t,e,n,r){let s=Ir(t),i=n;return s!==t&&(ye(t)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,t)}):i=function(o,a,l){return n.call(this,o,ee(a),l,t)}),s[e](i,...r)}function _i(t,e,n){let r=M(t);se(r,"iterate",en);let s=r[e](...n);return(s===-1||s===!1)&&Ac(n[0])?(n[0]=M(n[0]),r[e](...n)):s}function Nn(t,e,n=[]){Ri(),Ei();let r=M(t)[e].apply(t,n);return Oi(),Ni(),r}var xv=$.makeMap("__proto__,__v_isRef,__isVue"),yc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter($.isSymbol));function Av(t){$.isSymbol(t)||(t=String(t));let e=M(this);return se(e,"has",t),e.hasOwnProperty(t)}var Tr=class{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){if(n==="__v_skip")return e.__v_skip;let s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?xc:Sc:i?Cc:wc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;let o=$.isArray(e);if(!s){let l;if(o&&(l=Cv[n]))return l;if(n==="hasOwnProperty")return Av}let a=Reflect.get(e,n,ie(e)?e:r);return($.isSymbol(n)?yc.has(n):xv(n))||(s||se(e,"get",n),i)?a:ie(a)?o&&$.isIntegerKey(n)?a:a.value:$.isObject(a)?s?Ii(a):ki(a):a}},$r=class extends Tr{constructor(e=!1){super(!1,e)}set(e,n,r,s){let i=e[n];if(!this._isShallow){let l=ht(i);if(!ye(r)&&!ht(r)&&(i=M(i),r=M(r)),!$.isArray(e)&&ie(i)&&!ie(r))return l?!1:(i.value=r,!0)}let o=$.isArray(e)&&$.isIntegerKey(n)?Number(n)<e.length:$.hasOwn(e,n),a=Reflect.set(e,n,r,ie(e)?e:s);return e===M(s)&&(o?$.hasChanged(r,i)&&Ke(e,"set",n,r):Ke(e,"add",n,r)),a}deleteProperty(e,n){let r=$.hasOwn(e,n);e[n];let s=Reflect.deleteProperty(e,n);return s&&r&&Ke(e,"delete",n,void 0),s}has(e,n){let r=Reflect.has(e,n);return(!$.isSymbol(n)||!yc.has(n))&&se(e,"has",n),r}ownKeys(e){return se(e,"iterate",$.isArray(e)?"length":dt),Reflect.ownKeys(e)}},Rr=class extends Tr{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}},Ev=new $r,Ov=new Rr,Tv=new $r(!0),$v=new Rr(!0),yi=t=>t,Cr=t=>Reflect.getPrototypeOf(t);function Rv(t,e,n){return function(...r){let s=this.__v_raw,i=M(s),o=$.isMap(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,d=s[t](...r),u=n?yi:e?Nr:ee;return!e&&se(i,"iterate",l?Or:dt),{next(){let{value:c,done:h}=d.next();return h?{value:c,done:h}:{value:a?[u(c[0]),u(c[1])]:u(c),done:h}},[Symbol.iterator](){return this}}}}function Sr(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Nv(t,e){let n={get(s){let i=this.__v_raw,o=M(i),a=M(s);t||($.hasChanged(s,a)&&se(o,"get",s),se(o,"get",a));let{has:l}=Cr(o),d=e?yi:t?Nr:ee;if(l.call(o,s))return d(i.get(s));if(l.call(o,a))return d(i.get(a));i!==o&&i.get(s)},get size(){let s=this.__v_raw;return!t&&se(M(s),"iterate",dt),Reflect.get(s,"size",s)},has(s){let i=this.__v_raw,o=M(i),a=M(s);return t||($.hasChanged(s,a)&&se(o,"has",s),se(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){let o=this,a=o.__v_raw,l=M(a),d=e?yi:t?Nr:ee;return!t&&se(l,"iterate",dt),a.forEach((u,c)=>s.call(i,d(u),d(c),o))}};return $.extend(n,t?{add:Sr("add"),set:Sr("set"),delete:Sr("delete"),clear:Sr("clear")}:{add(s){!e&&!ye(s)&&!ht(s)&&(s=M(s));let i=M(this);return Cr(i).has.call(i,s)||(i.add(s),Ke(i,"add",s,s)),this},set(s,i){!e&&!ye(i)&&!ht(i)&&(i=M(i));let o=M(this),{has:a,get:l}=Cr(o),d=a.call(o,s);d||(s=M(s),d=a.call(o,s));let u=l.call(o,s);return o.set(s,i),d?$.hasChanged(i,u)&&Ke(o,"set",s,i):Ke(o,"add",s,i),this},delete(s){let i=M(this),{has:o,get:a}=Cr(i),l=o.call(i,s);l||(s=M(s),l=o.call(i,s)),a&&a.call(i,s);let d=i.delete(s);return l&&Ke(i,"delete",s,void 0),d},clear(){let s=M(this),i=s.size!==0,o=s.clear();return i&&Ke(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Rv(s,t,e)}),n}function Dr(t,e){let n=Nv(t,e);return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get($.hasOwn(n,s)&&s in r?n:r,s,i)}var kv={get:Dr(!1,!1)},Iv={get:Dr(!1,!0)},Dv={get:Dr(!0,!1)},Pv={get:Dr(!0,!0)},wc=new WeakMap,Cc=new WeakMap,Sc=new WeakMap,xc=new WeakMap;function Mv(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function jv(t){return t.__v_skip||!Object.isExtensible(t)?0:Mv($.toRawType(t))}function ki(t){return ht(t)?t:Pr(t,!1,Ev,kv,wc)}function Fv(t){return Pr(t,!1,Tv,Iv,Cc)}function Ii(t){return Pr(t,!0,Ov,Dv,Sc)}function qv(t){return Pr(t,!0,$v,Pv,xc)}function Pr(t,e,n,r,s){if(!$.isObject(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;let i=s.get(t);if(i)return i;let o=jv(t);if(o===0)return t;let a=new Proxy(t,o===2?r:n);return s.set(t,a),a}function Zt(t){return ht(t)?Zt(t.__v_raw):!!(t&&t.__v_isReactive)}function ht(t){return!!(t&&t.__v_isReadonly)}function ye(t){return!!(t&&t.__v_isShallow)}function Ac(t){return t?!!t.__v_raw:!1}function M(t){let e=t&&t.__v_raw;return e?M(e):t}function Vv(t){return!$.hasOwn(t,"__v_skip")&&Object.isExtensible(t)&&$.def(t,"__v_skip",!0),t}var ee=t=>$.isObject(t)?ki(t):t,Nr=t=>$.isObject(t)?Ii(t):t;function ie(t){return t?t.__v_isRef===!0:!1}function Ec(t){return Oc(t,!1)}function Lv(t){return Oc(t,!0)}function Oc(t,e){return ie(t)?t:new wi(t,e)}var wi=class{constructor(e,n){this.dep=new Qt,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:M(e),this._value=n?e:ee(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){let n=this._rawValue,r=this.__v_isShallow||ye(e)||ht(e);e=r?e:M(e),$.hasChanged(e,n)&&(this._rawValue=e,this._value=r?e:ee(e),this.dep.trigger())}};function Hv(t){t.dep&&t.dep.trigger()}function Di(t){return ie(t)?t.value:t}function Gv(t){return $.isFunction(t)?t():Di(t)}var Uv={get:(t,e,n)=>e==="__v_raw"?t:Di(Reflect.get(t,e,n)),set:(t,e,n,r)=>{let s=t[e];return ie(s)&&!ie(n)?(s.value=n,!0):Reflect.set(t,e,n,r)}};function Wv(t){return Zt(t)?t:new Proxy(t,Uv)}var Ci=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let n=this.dep=new Qt,{get:r,set:s}=e(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}};function Kv(t){return new Ci(t)}function Bv(t){let e=$.isArray(t)?new Array(t.length):{};for(let n in t)e[n]=Tc(t,n);return e}var Si=class{constructor(e,n,r){this._object=e,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return wv(M(this._object),this._key)}},xi=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function zv(t,e,n){return ie(t)?t:$.isFunction(t)?new xi(t):$.isObject(t)&&arguments.length>1?Tc(t,e,n):Ec(t)}function Tc(t,e,n){let r=t[e];return ie(r)?r:new Si(t,e,n)}var Ai=class{constructor(e,n,r){this.fn=e,this.setter=n,this._value=void 0,this.dep=new Qt(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Dn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&q!==this)return mc(this,!0),!0}get value(){let e=this.dep.track();return vc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Yv(t,e,n=!1){let r,s;return $.isFunction(t)?r=t:(r=t.get,s=t.set),new Ai(r,s,n)}var Jv={GET:"get",HAS:"has",ITERATE:"iterate"},Xv={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Zv={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},Qv={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},xr={},kr=new WeakMap,ut;function eb(){return ut}function $c(t,e=!1,n=ut){if(n){let r=kr.get(n);r||kr.set(n,r=[]),r.push(t)}}function tb(t,e,n=$.EMPTY_OBJ){let{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,d=g=>s?g:ye(g)||s===!1||s===0?Be(g,1):Be(g),u,c,h,f,v=!1,m=!1;if(ie(t)?(c=()=>t.value,v=ye(t)):Zt(t)?(c=()=>d(t),v=!0):$.isArray(t)?(m=!0,v=t.some(g=>Zt(g)||ye(g)),c=()=>t.map(g=>{if(ie(g))return g.value;if(Zt(g))return d(g);if($.isFunction(g))return l?l(g,2):g()})):$.isFunction(t)?e?c=l?()=>l(t,2):t:c=()=>{if(h){Ri();try{h()}finally{Ni()}}let g=ut;ut=u;try{return l?l(t,3,[f]):t(f)}finally{ut=g}}:c=$.NOOP,e&&s){let g=c,p=s===!0?1/0:s;c=()=>Be(g(),p)}let _=pc(),y=()=>{u.stop(),_&&_.active&&$.remove(_.effects,u)};if(i&&e){let g=e;e=(...p)=>{g(...p),y()}}let b=m?new Array(t.length).fill(xr):xr,w=g=>{if(!(!(u.flags&1)||!u.dirty&&!g))if(e){let p=u.run();if(s||v||(m?p.some((C,k)=>$.hasChanged(C,b[k])):$.hasChanged(p,b))){h&&h();let C=ut;ut=u;try{let k=[p,b===xr?void 0:m&&b[0]===xr?[]:b,f];l?l(e,3,k):e(...k),b=p}finally{ut=C}}}else u.run()};return a&&a(w),u=new Pt(c),u.scheduler=o?()=>o(w,!1):w,f=g=>$c(g,!1,u),h=u.onStop=()=>{let g=kr.get(u);if(g){if(l)l(g,4);else for(let p of g)p();kr.delete(u)}},e?r?w(!0):b=u.run():o?o(w.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function Be(t,e=1/0,n){if(e<=0||!$.isObject(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,ie(t))Be(t.value,e,n);else if($.isArray(t))for(let r=0;r<t.length;r++)Be(t[r],e,n);else if($.isSet(t)||$.isMap(t))t.forEach(r=>{Be(r,e,n)});else if($.isPlainObject(t)){for(let r in t)Be(t[r],e,n);for(let r of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,r)&&Be(t[r],e,n)}return t}R.ARRAY_ITERATE_KEY=en;R.EffectFlags=mv;R.EffectScope=Ar;R.ITERATE_KEY=dt;R.MAP_KEY_ITERATE_KEY=Or;R.ReactiveEffect=Pt;R.ReactiveFlags=Zv;R.TrackOpTypes=Jv;R.TriggerOpTypes=Xv;R.WatchErrorCodes=Qv;R.computed=Yv;R.customRef=Kv;R.effect=_v;R.effectScope=pv;R.enableTracking=bv;R.getCurrentScope=pc;R.getCurrentWatcher=eb;R.isProxy=Ac;R.isReactive=Zt;R.isReadonly=ht;R.isRef=ie;R.isShallow=ye;R.markRaw=Vv;R.onEffectCleanup=yv;R.onScopeDispose=fv;R.onWatcherCleanup=$c;R.pauseTracking=Ri;R.proxyRefs=Wv;R.reactive=ki;R.reactiveReadArray=Dt;R.readonly=Ii;R.ref=Ec;R.resetTracking=Ni;R.shallowReactive=Fv;R.shallowReadArray=Ir;R.shallowReadonly=qv;R.shallowRef=Lv;R.stop=vv;R.toRaw=M;R.toReactive=ee;R.toReadonly=Nr;R.toRef=zv;R.toRefs=Bv;R.toValue=Gv;R.track=se;R.traverse=Be;R.trigger=Ke;R.triggerRef=Hv;R.unref=Di;R.watch=tb});var Jc=S(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});var T=fi();function be(t,...e){console.warn(`[Vue warn] ${t}`,...e)}var oe,qr=class{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=oe,!e&&oe&&(this.index=(oe.scopes||(oe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){let n=oe;try{return oe=this,e()}finally{oe=n}}else be("cannot run an inactive effect scope.")}on(){oe=this}off(){oe=this.parent}stop(e){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}};function nb(t){return new qr(t)}function Dc(){return oe}function rb(t,e=!1){oe?oe.cleanups.push(t):e||be("onScopeDispose() is called when there is no active effect scope to be associated with.")}var D,sb={ACTIVE:1,1:"ACTIVE",RUNNING:2,2:"RUNNING",TRACKING:4,4:"TRACKING",NOTIFIED:8,8:"NOTIFIED",DIRTY:16,16:"DIRTY",ALLOW_RECURSE:32,32:"ALLOW_RECURSE",PAUSED:64,64:"PAUSED"},Pi=new WeakSet,jt=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,oe&&oe.active&&oe.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Pi.has(this)&&(Pi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Mc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Nc(this),jc(this);let e=D,n=ve;D=this,ve=!0;try{return this.fn()}finally{D!==this&&be("Active effect was not restored correctly - this is likely a Vue internal bug."),Fc(this),D=e,ve=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)zi(e);this.deps=this.depsTail=void 0,Nc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Pi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Fi(this)&&this.run()}get dirty(){return Fi(this)}},Pc=0,Mn,jn;function Mc(t,e=!1){if(t.flags|=8,e){t.next=jn,jn=t;return}t.next=Mn,Mn=t}function Ki(){Pc++}function Bi(){if(--Pc>0)return;if(jn){let e=jn;for(jn=void 0;e;){let n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;Mn;){let e=Mn;for(Mn=void 0;e;){let n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(r){t||(t=r)}e=n}}if(t)throw t}function jc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Fc(t){let e,n=t.depsTail,r=n;for(;r;){let s=r.prevDep;r.version===-1?(r===n&&(n=s),zi(r),ib(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}t.deps=e,t.depsTail=n}function Fi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(qc(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function qc(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Fn))return;t.globalVersion=Fn;let e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Fi(t)){t.flags&=-3;return}let n=D,r=ve;D=t,ve=!0;try{jc(t);let s=t.fn(t._value);(e.version===0||T.hasChanged(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{D=n,ve=r,Fc(t),t.flags&=-3}}function zi(t,e=!1){let{dep:n,prevSub:r,nextSub:s}=t;if(r&&(r.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=r,t.nextSub=void 0),n.subsHead===t&&(n.subsHead=s),n.subs===t&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)zi(i,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function ib(t){let{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function ob(t,e){t.effect instanceof jt&&(t=t.effect.fn);let n=new jt(t);e&&T.extend(n,e);try{n.run()}catch(s){throw n.stop(),s}let r=n.run.bind(n);return r.effect=n,r}function ab(t){t.effect.stop()}var ve=!0,Yi=[];function Ji(){Yi.push(ve),ve=!1}function lb(){Yi.push(ve),ve=!0}function Xi(){let t=Yi.pop();ve=t===void 0?!0:t}function cb(t,e=!1){D instanceof jt?D.cleanup=t:e||be("onEffectCleanup() was called when there was no active effect to associate with.")}function Nc(t){let{cleanup:e}=t;if(t.cleanup=void 0,e){let n=D;D=void 0;try{e()}finally{D=n}}}var Fn=0,qi=class{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},nn=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.subsHead=void 0}track(e){if(!D||!ve||D===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==D)n=this.activeLink=new qi(D,this),D.deps?(n.prevDep=D.depsTail,D.depsTail.nextDep=n,D.depsTail=n):D.deps=D.depsTail=n,Vc(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){let r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=D.depsTail,n.nextDep=void 0,D.depsTail.nextDep=n,D.depsTail=n,D.deps===n&&(D.deps=r)}return D.onTrack&&D.onTrack(T.extend({effect:D},e)),n}trigger(e){this.version++,Fn++,this.notify(e)}notify(e){Ki();try{for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(T.extend({effect:n.sub},e));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Bi()}}};function Vc(t){if(t.dep.sc++,t.sub.flags&4){let e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let r=e.deps;r;r=r.nextDep)Vc(r)}let n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subsHead===void 0&&(t.dep.subsHead=t),t.dep.subs=t}}var Vr=new WeakMap,ft=Symbol("Object iterate"),Lr=Symbol("Map keys iterate"),rn=Symbol("Array iterate");function ae(t,e,n){if(ve&&D){let r=Vr.get(t);r||Vr.set(t,r=new Map);let s=r.get(n);s||(r.set(n,s=new nn),s.map=r,s.key=n),s.track({target:t,type:e,key:n})}}function Ye(t,e,n,r,s,i){let o=Vr.get(t);if(!o){Fn++;return}let a=l=>{l&&l.trigger({target:t,type:e,key:n,newValue:r,oldValue:s,oldTarget:i})};if(Ki(),e==="clear")o.forEach(a);else{let l=T.isArray(t),d=l&&T.isIntegerKey(n);if(l&&n==="length"){let u=Number(r);o.forEach((c,h)=>{(h==="length"||h===rn||!T.isSymbol(h)&&h>=u)&&a(c)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),d&&a(o.get(rn)),e){case"add":l?d&&a(o.get("length")):(a(o.get(ft)),T.isMap(t)&&a(o.get(Lr)));break;case"delete":l||(a(o.get(ft)),T.isMap(t)&&a(o.get(Lr)));break;case"set":T.isMap(t)&&a(o.get(ft));break}}Bi()}function ub(t,e){let n=Vr.get(t);return n&&n.get(e)}function Mt(t){let e=P(t);return e===t?e:(ae(e,"iterate",rn),we(t)?e:e.map(te))}function Br(t){return ae(t=P(t),"iterate",rn),t}var db={__proto__:null,[Symbol.iterator](){return Mi(this,Symbol.iterator,te)},concat(...t){return Mt(this).concat(...t.map(e=>T.isArray(e)?Mt(e):e))},entries(){return Mi(this,"entries",t=>(t[1]=te(t[1]),t))},every(t,e){return ze(this,"every",t,e,void 0,arguments)},filter(t,e){return ze(this,"filter",t,e,n=>n.map(te),arguments)},find(t,e){return ze(this,"find",t,e,te,arguments)},findIndex(t,e){return ze(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return ze(this,"findLast",t,e,te,arguments)},findLastIndex(t,e){return ze(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return ze(this,"forEach",t,e,void 0,arguments)},includes(...t){return ji(this,"includes",t)},indexOf(...t){return ji(this,"indexOf",t)},join(t){return Mt(this).join(t)},lastIndexOf(...t){return ji(this,"lastIndexOf",t)},map(t,e){return ze(this,"map",t,e,void 0,arguments)},pop(){return Pn(this,"pop")},push(...t){return Pn(this,"push",t)},reduce(t,...e){return kc(this,"reduce",t,e)},reduceRight(t,...e){return kc(this,"reduceRight",t,e)},shift(){return Pn(this,"shift")},some(t,e){return ze(this,"some",t,e,void 0,arguments)},splice(...t){return Pn(this,"splice",t)},toReversed(){return Mt(this).toReversed()},toSorted(t){return Mt(this).toSorted(t)},toSpliced(...t){return Mt(this).toSpliced(...t)},unshift(...t){return Pn(this,"unshift",t)},values(){return Mi(this,"values",te)}};function Mi(t,e,n){let r=Br(t),s=r[e]();return r!==t&&!we(t)&&(s._next=s.next,s.next=()=>{let i=s._next();return i.value&&(i.value=n(i.value)),i}),s}var hb=Array.prototype;function ze(t,e,n,r,s,i){let o=Br(t),a=o!==t&&!we(t),l=o[e];if(l!==hb[e]){let c=l.apply(t,i);return a?te(c):c}let d=n;o!==t&&(a?d=function(c,h){return n.call(this,te(c),h,t)}:n.length>2&&(d=function(c,h){return n.call(this,c,h,t)}));let u=l.call(o,d,r);return a&&s?s(u):u}function kc(t,e,n,r){let s=Br(t),i=n;return s!==t&&(we(t)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,t)}):i=function(o,a,l){return n.call(this,o,te(a),l,t)}),s[e](i,...r)}function ji(t,e,n){let r=P(t);ae(r,"iterate",rn);let s=r[e](...n);return(s===-1||s===!1)&&eo(n[0])?(n[0]=P(n[0]),r[e](...n)):s}function Pn(t,e,n=[]){Ji(),Ki();let r=P(t)[e].apply(t,n);return Bi(),Xi(),r}var pb=T.makeMap("__proto__,__v_isRef,__isVue"),Lc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(T.isSymbol));function fb(t){T.isSymbol(t)||(t=String(t));let e=P(this);return ae(e,"has",t),e.hasOwnProperty(t)}var Hr=class{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){if(n==="__v_skip")return e.__v_skip;let s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?Wc:Uc:i?Gc:Hc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;let o=T.isArray(e);if(!s){let l;if(o&&(l=db[n]))return l;if(n==="hasOwnProperty")return fb}let a=Reflect.get(e,n,le(e)?e:r);return(T.isSymbol(n)?Lc.has(n):pb(n))||(s||ae(e,"get",n),i)?a:le(a)?o&&T.isIntegerKey(n)?a:a.value:T.isObject(a)?s?Qi(a):Zi(a):a}},Gr=class extends Hr{constructor(e=!1){super(!1,e)}set(e,n,r,s){let i=e[n];if(!this._isShallow){let l=mt(i);if(!we(r)&&!mt(r)&&(i=P(i),r=P(r)),!T.isArray(e)&&le(i)&&!le(r))return l?!1:(i.value=r,!0)}let o=T.isArray(e)&&T.isIntegerKey(n)?Number(n)<e.length:T.hasOwn(e,n),a=Reflect.set(e,n,r,le(e)?e:s);return e===P(s)&&(o?T.hasChanged(r,i)&&Ye(e,"set",n,r,i):Ye(e,"add",n,r)),a}deleteProperty(e,n){let r=T.hasOwn(e,n),s=e[n],i=Reflect.deleteProperty(e,n);return i&&r&&Ye(e,"delete",n,void 0,s),i}has(e,n){let r=Reflect.has(e,n);return(!T.isSymbol(n)||!Lc.has(n))&&ae(e,"has",n),r}ownKeys(e){return ae(e,"iterate",T.isArray(e)?"length":ft),Reflect.ownKeys(e)}},Ur=class extends Hr{constructor(e=!1){super(!0,e)}set(e,n){return be(`Set operation on key "${String(n)}" failed: target is readonly.`,e),!0}deleteProperty(e,n){return be(`Delete operation on key "${String(n)}" failed: target is readonly.`,e),!0}},mb=new Gr,gb=new Ur,_b=new Gr(!0),vb=new Ur(!0),Vi=t=>t,Mr=t=>Reflect.getPrototypeOf(t);function bb(t,e,n){return function(...r){let s=this.__v_raw,i=P(s),o=T.isMap(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,d=s[t](...r),u=n?Vi:e?Wr:te;return!e&&ae(i,"iterate",l?Lr:ft),{next(){let{value:c,done:h}=d.next();return h?{value:c,done:h}:{value:a?[u(c[0]),u(c[1])]:u(c),done:h}},[Symbol.iterator](){return this}}}}function jr(t){return function(...e){{let n=e[0]?`on key "${e[0]}" `:"";be(`${T.capitalize(t)} operation ${n}failed: target is readonly.`,P(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function yb(t,e){let n={get(s){let i=this.__v_raw,o=P(i),a=P(s);t||(T.hasChanged(s,a)&&ae(o,"get",s),ae(o,"get",a));let{has:l}=Mr(o),d=e?Vi:t?Wr:te;if(l.call(o,s))return d(i.get(s));if(l.call(o,a))return d(i.get(a));i!==o&&i.get(s)},get size(){let s=this.__v_raw;return!t&&ae(P(s),"iterate",ft),Reflect.get(s,"size",s)},has(s){let i=this.__v_raw,o=P(i),a=P(s);return t||(T.hasChanged(s,a)&&ae(o,"has",s),ae(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){let o=this,a=o.__v_raw,l=P(a),d=e?Vi:t?Wr:te;return!t&&ae(l,"iterate",ft),a.forEach((u,c)=>s.call(i,d(u),d(c),o))}};return T.extend(n,t?{add:jr("add"),set:jr("set"),delete:jr("delete"),clear:jr("clear")}:{add(s){!e&&!we(s)&&!mt(s)&&(s=P(s));let i=P(this);return Mr(i).has.call(i,s)||(i.add(s),Ye(i,"add",s,s)),this},set(s,i){!e&&!we(i)&&!mt(i)&&(i=P(i));let o=P(this),{has:a,get:l}=Mr(o),d=a.call(o,s);d?Ic(o,a,s):(s=P(s),d=a.call(o,s));let u=l.call(o,s);return o.set(s,i),d?T.hasChanged(i,u)&&Ye(o,"set",s,i,u):Ye(o,"add",s,i),this},delete(s){let i=P(this),{has:o,get:a}=Mr(i),l=o.call(i,s);l?Ic(i,o,s):(s=P(s),l=o.call(i,s));let d=a?a.call(i,s):void 0,u=i.delete(s);return l&&Ye(i,"delete",s,void 0,d),u},clear(){let s=P(this),i=s.size!==0,o=T.isMap(s)?new Map(s):new Set(s),a=s.clear();return i&&Ye(s,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=bb(s,t,e)}),n}function zr(t,e){let n=yb(t,e);return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get(T.hasOwn(n,s)&&s in r?n:r,s,i)}var wb={get:zr(!1,!1)},Cb={get:zr(!1,!0)},Sb={get:zr(!0,!1)},xb={get:zr(!0,!0)};function Ic(t,e,n){let r=P(n);if(r!==n&&e.call(t,r)){let s=T.toRawType(t);be(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var Hc=new WeakMap,Gc=new WeakMap,Uc=new WeakMap,Wc=new WeakMap;function Ab(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Eb(t){return t.__v_skip||!Object.isExtensible(t)?0:Ab(T.toRawType(t))}function Zi(t){return mt(t)?t:Yr(t,!1,mb,wb,Hc)}function Ob(t){return Yr(t,!1,_b,Cb,Gc)}function Qi(t){return Yr(t,!0,gb,Sb,Uc)}function Tb(t){return Yr(t,!0,vb,xb,Wc)}function Yr(t,e,n,r,s){if(!T.isObject(t))return be(`value cannot be made ${e?"readonly":"reactive"}: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive))return t;let i=s.get(t);if(i)return i;let o=Eb(t);if(o===0)return t;let a=new Proxy(t,o===2?r:n);return s.set(t,a),a}function tn(t){return mt(t)?tn(t.__v_raw):!!(t&&t.__v_isReactive)}function mt(t){return!!(t&&t.__v_isReadonly)}function we(t){return!!(t&&t.__v_isShallow)}function eo(t){return t?!!t.__v_raw:!1}function P(t){let e=t&&t.__v_raw;return e?P(e):t}function $b(t){return!T.hasOwn(t,"__v_skip")&&Object.isExtensible(t)&&T.def(t,"__v_skip",!0),t}var te=t=>T.isObject(t)?Zi(t):t,Wr=t=>T.isObject(t)?Qi(t):t;function le(t){return t?t.__v_isRef===!0:!1}function Kc(t){return Bc(t,!1)}function Rb(t){return Bc(t,!0)}function Bc(t,e){return le(t)?t:new Li(t,e)}var Li=class{constructor(e,n){this.dep=new nn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:P(e),this._value=n?e:te(e),this.__v_isShallow=n}get value(){return this.dep.track({target:this,type:"get",key:"value"}),this._value}set value(e){let n=this._rawValue,r=this.__v_isShallow||we(e)||mt(e);e=r?e:P(e),T.hasChanged(e,n)&&(this._rawValue=e,this._value=r?e:te(e),this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:n}))}};function Nb(t){t.dep&&t.dep.trigger({target:t,type:"set",key:"value",newValue:t._value})}function to(t){return le(t)?t.value:t}function kb(t){return T.isFunction(t)?t():to(t)}var Ib={get:(t,e,n)=>e==="__v_raw"?t:to(Reflect.get(t,e,n)),set:(t,e,n,r)=>{let s=t[e];return le(s)&&!le(n)?(s.value=n,!0):Reflect.set(t,e,n,r)}};function Db(t){return tn(t)?t:new Proxy(t,Ib)}var Hi=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let n=this.dep=new nn,{get:r,set:s}=e(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}};function Pb(t){return new Hi(t)}function Mb(t){eo(t)||be("toRefs() expects a reactive object but received a plain one.");let e=T.isArray(t)?new Array(t.length):{};for(let n in t)e[n]=zc(t,n);return e}var Gi=class{constructor(e,n,r){this._object=e,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return ub(P(this._object),this._key)}},Ui=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function jb(t,e,n){return le(t)?t:T.isFunction(t)?new Ui(t):T.isObject(t)&&arguments.length>1?zc(t,e,n):Kc(t)}function zc(t,e,n){let r=t[e];return le(r)?r:new Gi(t,e,n)}var Wi=class{constructor(e,n,r){this.fn=e,this.setter=n,this._value=void 0,this.dep=new nn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Fn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&D!==this)return Mc(this,!0),!0}get value(){let e=this.dep.track({target:this,type:"get",key:"value"});return qc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter?this.setter(e):be("Write operation failed: computed value is readonly")}};function Fb(t,e,n=!1){let r,s;T.isFunction(t)?r=t:(r=t.get,s=t.set);let i=new Wi(r,s,n);return e&&!n&&(i.onTrack=e.onTrack,i.onTrigger=e.onTrigger),i}var qb={GET:"get",HAS:"has",ITERATE:"iterate"},Vb={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Lb={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},Hb={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},Fr={},Kr=new WeakMap,pt;function Gb(){return pt}function Yc(t,e=!1,n=pt){if(n){let r=Kr.get(n);r||Kr.set(n,r=[]),r.push(t)}else e||be("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Ub(t,e,n=T.EMPTY_OBJ){let{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,d=p=>{(n.onWarn||be)("Invalid watch source: ",p,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},u=p=>s?p:we(p)||s===!1||s===0?Je(p,1):Je(p),c,h,f,v,m=!1,_=!1;if(le(t)?(h=()=>t.value,m=we(t)):tn(t)?(h=()=>u(t),m=!0):T.isArray(t)?(_=!0,m=t.some(p=>tn(p)||we(p)),h=()=>t.map(p=>{if(le(p))return p.value;if(tn(p))return u(p);if(T.isFunction(p))return l?l(p,2):p();d(p)})):T.isFunction(t)?e?h=l?()=>l(t,2):t:h=()=>{if(f){Ji();try{f()}finally{Xi()}}let p=pt;pt=c;try{return l?l(t,3,[v]):t(v)}finally{pt=p}}:(h=T.NOOP,d(t)),e&&s){let p=h,C=s===!0?1/0:s;h=()=>Je(p(),C)}let y=Dc(),b=()=>{c.stop(),y&&y.active&&T.remove(y.effects,c)};if(i&&e){let p=e;e=(...C)=>{p(...C),b()}}let w=_?new Array(t.length).fill(Fr):Fr,g=p=>{if(!(!(c.flags&1)||!c.dirty&&!p))if(e){let C=c.run();if(s||m||(_?C.some((k,_r)=>T.hasChanged(k,w[_r])):T.hasChanged(C,w))){f&&f();let k=pt;pt=c;try{let _r=[C,w===Fr?void 0:_&&w[0]===Fr?[]:w,v];l?l(e,3,_r):e(..._r),w=C}finally{pt=k}}}else c.run()};return a&&a(g),c=new jt(h),c.scheduler=o?()=>o(g,!1):g,v=p=>Yc(p,!1,c),f=c.onStop=()=>{let p=Kr.get(c);if(p){if(l)l(p,4);else for(let C of p)C();Kr.delete(c)}},c.onTrack=n.onTrack,c.onTrigger=n.onTrigger,e?r?g(!0):w=c.run():o?o(g.bind(null,!0),!0):c.run(),b.pause=c.pause.bind(c),b.resume=c.resume.bind(c),b.stop=b,b}function Je(t,e=1/0,n){if(e<=0||!T.isObject(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,le(t))Je(t.value,e,n);else if(T.isArray(t))for(let r=0;r<t.length;r++)Je(t[r],e,n);else if(T.isSet(t)||T.isMap(t))t.forEach(r=>{Je(r,e,n)});else if(T.isPlainObject(t)){for(let r in t)Je(t[r],e,n);for(let r of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,r)&&Je(t[r],e,n)}return t}N.ARRAY_ITERATE_KEY=rn;N.EffectFlags=sb;N.EffectScope=qr;N.ITERATE_KEY=ft;N.MAP_KEY_ITERATE_KEY=Lr;N.ReactiveEffect=jt;N.ReactiveFlags=Lb;N.TrackOpTypes=qb;N.TriggerOpTypes=Vb;N.WatchErrorCodes=Hb;N.computed=Fb;N.customRef=Pb;N.effect=ob;N.effectScope=nb;N.enableTracking=lb;N.getCurrentScope=Dc;N.getCurrentWatcher=Gb;N.isProxy=eo;N.isReactive=tn;N.isReadonly=mt;N.isRef=le;N.isShallow=we;N.markRaw=$b;N.onEffectCleanup=cb;N.onScopeDispose=rb;N.onWatcherCleanup=Yc;N.pauseTracking=Ji;N.proxyRefs=Db;N.reactive=Zi;N.reactiveReadArray=Mt;N.readonly=Qi;N.ref=Kc;N.resetTracking=Xi;N.shallowReactive=Ob;N.shallowReadArray=Br;N.shallowReadonly=Tb;N.shallowRef=Rb;N.stop=ab;N.toRaw=P;N.toReactive=te;N.toReadonly=Wr;N.toRef=jb;N.toRefs=Mb;N.toValue=kb;N.track=ae;N.traverse=Je;N.trigger=Ye;N.triggerRef=Nb;N.unref=to;N.watch=Ub});var Jr=S((fE,no)=>{"use strict";process.env.NODE_ENV==="production"?no.exports=Rc():no.exports=Jc()});var qn=S(so=>{"use strict";var Xr=class extends Error{constructor(e,n,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=e,this.nestedError=void 0}},ro=class extends Xr{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};so.CommanderError=Xr;so.InvalidArgumentError=ro});var Zr=S(oo=>{"use strict";var{InvalidArgumentError:Wb}=qn(),io=class{constructor(e,n){switch(this.description=n||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:n.concat(e)}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new Wb(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(n,r):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Kb(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}oo.Argument=io;oo.humanReadableArgName=Kb});var lo=S(Xc=>{"use strict";var{humanReadableArgName:Bb}=Zr(),ao=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let n=e.commands.filter(s=>!s._hidden),r=e._getHelpCommand();return r&&!r._hidden&&n.push(r),this.sortSubcommands&&n.sort((s,i)=>s.name().localeCompare(i.name())),n}compareOptions(e,n){let r=s=>s.short?s.short.replace(/^-/,""):s.long.replace(/^--/,"");return r(e).localeCompare(r(n))}visibleOptions(e){let n=e.options.filter(s=>!s.hidden),r=e._getHelpOption();if(r&&!r.hidden){let s=r.short&&e._findOption(r.short),i=r.long&&e._findOption(r.long);!s&&!i?n.push(r):r.long&&!i?n.push(e.createOption(r.long,r.description)):r.short&&!s&&n.push(e.createOption(r.short,r.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let n=[];for(let r=e.parent;r;r=r.parent){let s=r.options.filter(i=>!i.hidden);n.push(...s)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(n=>{n.description=n.description||e._argsDescription[n.name()]||""}),e.registeredArguments.find(n=>n.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(r=>Bb(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,n){return n.visibleCommands(e).reduce((r,s)=>Math.max(r,n.subcommandTerm(s).length),0)}longestOptionTermLength(e,n){return n.visibleOptions(e).reduce((r,s)=>Math.max(r,n.optionTerm(s).length),0)}longestGlobalOptionTermLength(e,n){return n.visibleGlobalOptions(e).reduce((r,s)=>Math.max(r,n.optionTerm(s).length),0)}longestArgumentTermLength(e,n){return n.visibleArguments(e).reduce((r,s)=>Math.max(r,n.argumentTerm(s).length),0)}commandUsage(e){let n=e._name;e._aliases[0]&&(n=n+"|"+e._aliases[0]);let r="";for(let s=e.parent;s;s=s.parent)r=s.name()+" "+r;return r+n+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let n=[];return e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&n.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&n.push(`env: ${e.envVar}`),n.length>0?`${e.description} (${n.join(", ")})`:e.description}argumentDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatHelp(e,n){let r=n.padWidth(e,n),s=n.helpWidth||80,i=2,o=2;function a(v,m){if(m){let _=`${v.padEnd(r+o)}${m}`;return n.wrap(_,s-i,r+o)}return v}function l(v){return v.join(`
2
+ "use strict";var Fm=Object.create;var Fl=Object.defineProperty;var Vm=Object.getOwnPropertyDescriptor;var qm=Object.getOwnPropertyNames;var Lm=Object.getPrototypeOf,Hm=Object.prototype.hasOwnProperty;var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Gm=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of qm(e))!Hm.call(t,s)&&s!==n&&Fl(t,s,{get:()=>e[s],enumerable:!(r=Vm(e,s))||r.enumerable});return t};var q=(t,e,n)=>(n=t!=null?Fm(Lm(t)):{},Gm(e||!t||!t.__esModule?Fl(n,"default",{value:t,enumerable:!0}):n,t));var Ql=S(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});function ge(t){let e=Object.create(null);for(let n of t.split(","))e[n]=1;return n=>n in e}var Um={},Wm=[],Bm=()=>{},zm=()=>!1,Km=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Ym=t=>t.startsWith("onUpdate:"),Jm=Object.assign,Xm=(t,e)=>{let n=t.indexOf(e);n>-1&&t.splice(n,1)},Zm=Object.prototype.hasOwnProperty,Qm=(t,e)=>Zm.call(t,e),Dt=Array.isArray,Ll=t=>Pt(t)==="[object Map]",Hl=t=>Pt(t)==="[object Set]",si=t=>Pt(t)==="[object Date]",eg=t=>Pt(t)==="[object RegExp]",kn=t=>typeof t=="function",ke=t=>typeof t=="string",In=t=>typeof t=="symbol",pt=t=>t!==null&&typeof t=="object",tg=t=>(pt(t)||kn(t))&&kn(t.then)&&kn(t.catch),ii=Object.prototype.toString,Pt=t=>ii.call(t),ng=t=>Pt(t).slice(8,-1),Gl=t=>Pt(t)==="[object Object]",rg=t=>ke(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,sg=ge(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ig=ge("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Sr=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},og=/-(\w)/g,ag=Sr(t=>t.replace(og,(e,n)=>n?n.toUpperCase():"")),lg=/\B([A-Z])/g,Ul=Sr(t=>t.replace(lg,"-$1").toLowerCase()),Wl=Sr(t=>t.charAt(0).toUpperCase()+t.slice(1)),cg=Sr(t=>t?`on${Wl(t)}`:""),ug=(t,e)=>!Object.is(t,e),dg=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},hg=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},pg=t=>{let e=parseFloat(t);return isNaN(e)?t:e},fg=t=>{let e=ke(t)?Number(t):NaN;return isNaN(e)?t:e},Vl,mg=()=>Vl||(Vl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),gg=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;function _g(t){return gg.test(t)?`__props.${t}`:`__props[${JSON.stringify(t)}]`}function vg(t,e){return t+JSON.stringify(e,(n,r)=>typeof r=="function"?r.toString():r)}var bg={TEXT:1,1:"TEXT",CLASS:2,2:"CLASS",STYLE:4,4:"STYLE",PROPS:8,8:"PROPS",FULL_PROPS:16,16:"FULL_PROPS",NEED_HYDRATION:32,32:"NEED_HYDRATION",STABLE_FRAGMENT:64,64:"STABLE_FRAGMENT",KEYED_FRAGMENT:128,128:"KEYED_FRAGMENT",UNKEYED_FRAGMENT:256,256:"UNKEYED_FRAGMENT",NEED_PATCH:512,512:"NEED_PATCH",DYNAMIC_SLOTS:1024,1024:"DYNAMIC_SLOTS",DEV_ROOT_FRAGMENT:2048,2048:"DEV_ROOT_FRAGMENT",CACHED:-1,"-1":"CACHED",BAIL:-2,"-2":"BAIL"},yg={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"NEED_HYDRATION",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},wg={ELEMENT:1,1:"ELEMENT",FUNCTIONAL_COMPONENT:2,2:"FUNCTIONAL_COMPONENT",STATEFUL_COMPONENT:4,4:"STATEFUL_COMPONENT",TEXT_CHILDREN:8,8:"TEXT_CHILDREN",ARRAY_CHILDREN:16,16:"ARRAY_CHILDREN",SLOTS_CHILDREN:32,32:"SLOTS_CHILDREN",TELEPORT:64,64:"TELEPORT",SUSPENSE:128,128:"SUSPENSE",COMPONENT_SHOULD_KEEP_ALIVE:256,256:"COMPONENT_SHOULD_KEEP_ALIVE",COMPONENT_KEPT_ALIVE:512,512:"COMPONENT_KEPT_ALIVE",COMPONENT:6,6:"COMPONENT"},Cg={STABLE:1,1:"STABLE",DYNAMIC:2,2:"DYNAMIC",FORWARDED:3,3:"FORWARDED"},Sg={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},xg="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",Bl=ge(xg),Ag=Bl,ql=2;function Eg(t,e=0,n=t.length){if(e=Math.max(0,Math.min(e,t.length)),n=Math.max(0,Math.min(n,t.length)),e>n)return"";let r=t.split(/(\r?\n)/),s=r.filter((a,l)=>l%2===1);r=r.filter((a,l)=>l%2===0);let i=0,o=[];for(let a=0;a<r.length;a++)if(i+=r[a].length+(s[a]&&s[a].length||0),i>=e){for(let l=a-ql;l<=a+ql||n>i;l++){if(l<0||l>=r.length)continue;let d=l+1;o.push(`${d}${" ".repeat(Math.max(3-String(d).length,0))}| ${r[l]}`);let u=r[l].length,c=s[l]&&s[l].length||0;if(l===a){let h=e-(i-(u+c)),f=Math.max(1,n>i?u-h:n-e);o.push(" | "+" ".repeat(h)+"^".repeat(f))}else if(l>a){if(n>i){let h=Math.max(Math.min(n-i,u),1);o.push(" | "+"^".repeat(h))}i+=u+c}}break}return o.join(`
3
+ `)}function oi(t){if(Dt(t)){let e={};for(let n=0;n<t.length;n++){let r=t[n],s=ke(r)?zl(r):oi(r);if(s)for(let i in s)e[i]=s[i]}return e}else if(ke(t)||pt(t))return t}var Og=/;(?![^(]*\))/g,Tg=/:([^]+)/,$g=/\/\*[^]*?\*\//g;function zl(t){let e={};return t.replace($g,"").split(Og).forEach(n=>{if(n){let r=n.split(Tg);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Rg(t){if(!t)return"";if(ke(t))return t;let e="";for(let n in t){let r=t[n];if(ke(r)||typeof r=="number"){let s=n.startsWith("--")?n:Ul(n);e+=`${s}:${r};`}}return e}function ai(t){let e="";if(ke(t))e=t;else if(Dt(t))for(let n=0;n<t.length;n++){let r=ai(t[n]);r&&(e+=r+" ")}else if(pt(t))for(let n in t)t[n]&&(e+=n+" ");return e.trim()}function Ng(t){if(!t)return null;let{class:e,style:n}=t;return e&&!ke(e)&&(t.class=ai(e)),n&&(t.style=oi(n)),t}var kg="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Ig="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Dg="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",Pg="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Mg=ge(kg),jg=ge(Ig),Fg=ge(Dg),Vg=ge(Pg),Kl="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",qg=ge(Kl),Lg=ge(Kl+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Hg(t){return!!t||t===""}var Gg=/[>/="'\u0009\u000a\u000c\u0020]/,ni={};function Ug(t){if(ni.hasOwnProperty(t))return ni[t];let e=Gg.test(t);return e&&console.error(`unsafe attribute name: ${t}`),ni[t]=!e}var Wg={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},Bg=ge("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap"),zg=ge("xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan"),Kg=ge("accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns");function Yg(t){if(t==null)return!1;let e=typeof t;return e==="string"||e==="number"||e==="boolean"}var Jg=/["'&<>]/;function Xg(t){let e=""+t,n=Jg.exec(e);if(!n)return e;let r="",s,i,o=0;for(i=n.index;i<e.length;i++){switch(e.charCodeAt(i)){case 34:s="&quot;";break;case 38:s="&amp;";break;case 39:s="&#39;";break;case 60:s="&lt;";break;case 62:s="&gt;";break;default:continue}o!==i&&(r+=e.slice(o,i)),o=i+1,r+=s}return o!==i?r+e.slice(o,i):r}var Zg=/^-?>|<!--|-->|--!>|<!-$/g;function Qg(t){return t.replace(Zg,"")}var Yl=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function e_(t,e){return t.replace(Yl,n=>e?n==='"'?'\\\\\\"':`\\\\${n}`:`\\${n}`)}function t_(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=xr(t[r],e[r]);return n}function xr(t,e){if(t===e)return!0;let n=si(t),r=si(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=In(t),r=In(e),n||r)return t===e;if(n=Dt(t),r=Dt(e),n||r)return n&&r?t_(t,e):!1;if(n=pt(t),r=pt(e),n||r){if(!n||!r)return!1;let s=Object.keys(t).length,i=Object.keys(e).length;if(s!==i)return!1;for(let o in t){let a=t.hasOwnProperty(o),l=e.hasOwnProperty(o);if(a&&!l||!a&&l||!xr(t[o],e[o]))return!1}}return String(t)===String(e)}function n_(t,e){return t.findIndex(n=>xr(n,e))}var Jl=t=>!!(t&&t.__v_isRef===!0),Xl=t=>ke(t)?t:t==null?"":Dt(t)||pt(t)&&(t.toString===ii||!kn(t.toString))?Jl(t)?Xl(t.value):JSON.stringify(t,Zl,2):String(t),Zl=(t,e)=>Jl(e)?Zl(t,e.value):Ll(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,s],i)=>(n[ri(r,i)+" =>"]=s,n),{})}:Hl(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>ri(n))}:In(e)?ri(e):pt(e)&&!Dt(e)&&!Gl(e)?String(e):e,ri=(t,e="")=>{var n;return In(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};A.EMPTY_ARR=Wm;A.EMPTY_OBJ=Um;A.NO=zm;A.NOOP=Bm;A.PatchFlagNames=yg;A.PatchFlags=bg;A.ShapeFlags=wg;A.SlotFlags=Cg;A.camelize=ag;A.capitalize=Wl;A.cssVarNameEscapeSymbolsRE=Yl;A.def=hg;A.escapeHtml=Xg;A.escapeHtmlComment=Qg;A.extend=Jm;A.genCacheKey=vg;A.genPropsAccessExp=_g;A.generateCodeFrame=Eg;A.getEscapedCssVarName=e_;A.getGlobalThis=mg;A.hasChanged=ug;A.hasOwn=Qm;A.hyphenate=Ul;A.includeBooleanAttr=Hg;A.invokeArrayFns=dg;A.isArray=Dt;A.isBooleanAttr=Lg;A.isBuiltInDirective=ig;A.isDate=si;A.isFunction=kn;A.isGloballyAllowed=Bl;A.isGloballyWhitelisted=Ag;A.isHTMLTag=Mg;A.isIntegerKey=rg;A.isKnownHtmlAttr=Bg;A.isKnownMathMLAttr=Kg;A.isKnownSvgAttr=zg;A.isMap=Ll;A.isMathMLTag=Fg;A.isModelListener=Ym;A.isObject=pt;A.isOn=Km;A.isPlainObject=Gl;A.isPromise=tg;A.isRegExp=eg;A.isRenderableAttrValue=Yg;A.isReservedProp=sg;A.isSSRSafeAttrName=Ug;A.isSVGTag=jg;A.isSet=Hl;A.isSpecialBooleanAttr=qg;A.isString=ke;A.isSymbol=In;A.isVoidTag=Vg;A.looseEqual=xr;A.looseIndexOf=n_;A.looseToNumber=pg;A.makeMap=ge;A.normalizeClass=ai;A.normalizeProps=Ng;A.normalizeStyle=oi;A.objectToString=ii;A.parseStringStyle=zl;A.propsToAttrMap=Wg;A.remove=Xm;A.slotFlagsText=Sg;A.stringifyStyle=Rg;A.toDisplayString=Xl;A.toHandlerKey=cg;A.toNumber=fg;A.toRawType=ng;A.toTypeString=Pt});var fc=S(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});function _e(t){let e=Object.create(null);for(let n of t.split(","))e[n]=1;return n=>n in e}var r_=Object.freeze({}),s_=Object.freeze([]),i_=()=>{},o_=()=>!1,a_=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),l_=t=>t.startsWith("onUpdate:"),c_=Object.assign,u_=(t,e)=>{let n=t.indexOf(e);n>-1&&t.splice(n,1)},d_=Object.prototype.hasOwnProperty,h_=(t,e)=>d_.call(t,e),Mt=Array.isArray,nc=t=>jt(t)==="[object Map]",rc=t=>jt(t)==="[object Set]",ui=t=>jt(t)==="[object Date]",p_=t=>jt(t)==="[object RegExp]",Dn=t=>typeof t=="function",Ie=t=>typeof t=="string",Pn=t=>typeof t=="symbol",ft=t=>t!==null&&typeof t=="object",f_=t=>(ft(t)||Dn(t))&&Dn(t.then)&&Dn(t.catch),di=Object.prototype.toString,jt=t=>di.call(t),m_=t=>jt(t).slice(8,-1),sc=t=>jt(t)==="[object Object]",g_=t=>Ie(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,__=_e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),v_=_e("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Ar=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},b_=/-(\w)/g,y_=Ar(t=>t.replace(b_,(e,n)=>n?n.toUpperCase():"")),w_=/\B([A-Z])/g,ic=Ar(t=>t.replace(w_,"-$1").toLowerCase()),oc=Ar(t=>t.charAt(0).toUpperCase()+t.slice(1)),C_=Ar(t=>t?`on${oc(t)}`:""),S_=(t,e)=>!Object.is(t,e),x_=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},A_=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},E_=t=>{let e=parseFloat(t);return isNaN(e)?t:e},O_=t=>{let e=Ie(t)?Number(t):NaN;return isNaN(e)?t:e},ec,T_=()=>ec||(ec=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),$_=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;function R_(t){return $_.test(t)?`__props.${t}`:`__props[${JSON.stringify(t)}]`}function N_(t,e){return t+JSON.stringify(e,(n,r)=>typeof r=="function"?r.toString():r)}var k_={TEXT:1,1:"TEXT",CLASS:2,2:"CLASS",STYLE:4,4:"STYLE",PROPS:8,8:"PROPS",FULL_PROPS:16,16:"FULL_PROPS",NEED_HYDRATION:32,32:"NEED_HYDRATION",STABLE_FRAGMENT:64,64:"STABLE_FRAGMENT",KEYED_FRAGMENT:128,128:"KEYED_FRAGMENT",UNKEYED_FRAGMENT:256,256:"UNKEYED_FRAGMENT",NEED_PATCH:512,512:"NEED_PATCH",DYNAMIC_SLOTS:1024,1024:"DYNAMIC_SLOTS",DEV_ROOT_FRAGMENT:2048,2048:"DEV_ROOT_FRAGMENT",CACHED:-1,"-1":"CACHED",BAIL:-2,"-2":"BAIL"},I_={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"NEED_HYDRATION",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},D_={ELEMENT:1,1:"ELEMENT",FUNCTIONAL_COMPONENT:2,2:"FUNCTIONAL_COMPONENT",STATEFUL_COMPONENT:4,4:"STATEFUL_COMPONENT",TEXT_CHILDREN:8,8:"TEXT_CHILDREN",ARRAY_CHILDREN:16,16:"ARRAY_CHILDREN",SLOTS_CHILDREN:32,32:"SLOTS_CHILDREN",TELEPORT:64,64:"TELEPORT",SUSPENSE:128,128:"SUSPENSE",COMPONENT_SHOULD_KEEP_ALIVE:256,256:"COMPONENT_SHOULD_KEEP_ALIVE",COMPONENT_KEPT_ALIVE:512,512:"COMPONENT_KEPT_ALIVE",COMPONENT:6,6:"COMPONENT"},P_={STABLE:1,1:"STABLE",DYNAMIC:2,2:"DYNAMIC",FORWARDED:3,3:"FORWARDED"},M_={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},j_="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",ac=_e(j_),F_=ac,tc=2;function V_(t,e=0,n=t.length){if(e=Math.max(0,Math.min(e,t.length)),n=Math.max(0,Math.min(n,t.length)),e>n)return"";let r=t.split(/(\r?\n)/),s=r.filter((a,l)=>l%2===1);r=r.filter((a,l)=>l%2===0);let i=0,o=[];for(let a=0;a<r.length;a++)if(i+=r[a].length+(s[a]&&s[a].length||0),i>=e){for(let l=a-tc;l<=a+tc||n>i;l++){if(l<0||l>=r.length)continue;let d=l+1;o.push(`${d}${" ".repeat(Math.max(3-String(d).length,0))}| ${r[l]}`);let u=r[l].length,c=s[l]&&s[l].length||0;if(l===a){let h=e-(i-(u+c)),f=Math.max(1,n>i?u-h:n-e);o.push(" | "+" ".repeat(h)+"^".repeat(f))}else if(l>a){if(n>i){let h=Math.max(Math.min(n-i,u),1);o.push(" | "+"^".repeat(h))}i+=u+c}}break}return o.join(`
4
+ `)}function hi(t){if(Mt(t)){let e={};for(let n=0;n<t.length;n++){let r=t[n],s=Ie(r)?lc(r):hi(r);if(s)for(let i in s)e[i]=s[i]}return e}else if(Ie(t)||ft(t))return t}var q_=/;(?![^(]*\))/g,L_=/:([^]+)/,H_=/\/\*[^]*?\*\//g;function lc(t){let e={};return t.replace(H_,"").split(q_).forEach(n=>{if(n){let r=n.split(L_);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function G_(t){if(!t)return"";if(Ie(t))return t;let e="";for(let n in t){let r=t[n];if(Ie(r)||typeof r=="number"){let s=n.startsWith("--")?n:ic(n);e+=`${s}:${r};`}}return e}function pi(t){let e="";if(Ie(t))e=t;else if(Mt(t))for(let n=0;n<t.length;n++){let r=pi(t[n]);r&&(e+=r+" ")}else if(ft(t))for(let n in t)t[n]&&(e+=n+" ");return e.trim()}function U_(t){if(!t)return null;let{class:e,style:n}=t;return e&&!Ie(e)&&(t.class=pi(e)),n&&(t.style=hi(n)),t}var W_="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",B_="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",z_="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",K_="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Y_=_e(W_),J_=_e(B_),X_=_e(z_),Z_=_e(K_),cc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Q_=_e(cc),ev=_e(cc+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function tv(t){return!!t||t===""}var nv=/[>/="'\u0009\u000a\u000c\u0020]/,li={};function rv(t){if(li.hasOwnProperty(t))return li[t];let e=nv.test(t);return e&&console.error(`unsafe attribute name: ${t}`),li[t]=!e}var sv={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},iv=_e("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap"),ov=_e("xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan"),av=_e("accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns");function lv(t){if(t==null)return!1;let e=typeof t;return e==="string"||e==="number"||e==="boolean"}var cv=/["'&<>]/;function uv(t){let e=""+t,n=cv.exec(e);if(!n)return e;let r="",s,i,o=0;for(i=n.index;i<e.length;i++){switch(e.charCodeAt(i)){case 34:s="&quot;";break;case 38:s="&amp;";break;case 39:s="&#39;";break;case 60:s="&lt;";break;case 62:s="&gt;";break;default:continue}o!==i&&(r+=e.slice(o,i)),o=i+1,r+=s}return o!==i?r+e.slice(o,i):r}var dv=/^-?>|<!--|-->|--!>|<!-$/g;function hv(t){return t.replace(dv,"")}var uc=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function pv(t,e){return t.replace(uc,n=>e?n==='"'?'\\\\\\"':`\\\\${n}`:`\\${n}`)}function fv(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=Er(t[r],e[r]);return n}function Er(t,e){if(t===e)return!0;let n=ui(t),r=ui(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Pn(t),r=Pn(e),n||r)return t===e;if(n=Mt(t),r=Mt(e),n||r)return n&&r?fv(t,e):!1;if(n=ft(t),r=ft(e),n||r){if(!n||!r)return!1;let s=Object.keys(t).length,i=Object.keys(e).length;if(s!==i)return!1;for(let o in t){let a=t.hasOwnProperty(o),l=e.hasOwnProperty(o);if(a&&!l||!a&&l||!Er(t[o],e[o]))return!1}}return String(t)===String(e)}function mv(t,e){return t.findIndex(n=>Er(n,e))}var dc=t=>!!(t&&t.__v_isRef===!0),hc=t=>Ie(t)?t:t==null?"":Mt(t)||ft(t)&&(t.toString===di||!Dn(t.toString))?dc(t)?hc(t.value):JSON.stringify(t,pc,2):String(t),pc=(t,e)=>dc(e)?pc(t,e.value):nc(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,s],i)=>(n[ci(r,i)+" =>"]=s,n),{})}:rc(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>ci(n))}:Pn(e)?ci(e):ft(e)&&!Mt(e)&&!sc(e)?String(e):e,ci=(t,e="")=>{var n;return Pn(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};E.EMPTY_ARR=s_;E.EMPTY_OBJ=r_;E.NO=o_;E.NOOP=i_;E.PatchFlagNames=I_;E.PatchFlags=k_;E.ShapeFlags=D_;E.SlotFlags=P_;E.camelize=y_;E.capitalize=oc;E.cssVarNameEscapeSymbolsRE=uc;E.def=A_;E.escapeHtml=uv;E.escapeHtmlComment=hv;E.extend=c_;E.genCacheKey=N_;E.genPropsAccessExp=R_;E.generateCodeFrame=V_;E.getEscapedCssVarName=pv;E.getGlobalThis=T_;E.hasChanged=S_;E.hasOwn=h_;E.hyphenate=ic;E.includeBooleanAttr=tv;E.invokeArrayFns=x_;E.isArray=Mt;E.isBooleanAttr=ev;E.isBuiltInDirective=v_;E.isDate=ui;E.isFunction=Dn;E.isGloballyAllowed=ac;E.isGloballyWhitelisted=F_;E.isHTMLTag=Y_;E.isIntegerKey=g_;E.isKnownHtmlAttr=iv;E.isKnownMathMLAttr=av;E.isKnownSvgAttr=ov;E.isMap=nc;E.isMathMLTag=X_;E.isModelListener=l_;E.isObject=ft;E.isOn=a_;E.isPlainObject=sc;E.isPromise=f_;E.isRegExp=p_;E.isRenderableAttrValue=lv;E.isReservedProp=__;E.isSSRSafeAttrName=rv;E.isSVGTag=J_;E.isSet=rc;E.isSpecialBooleanAttr=Q_;E.isString=Ie;E.isSymbol=Pn;E.isVoidTag=Z_;E.looseEqual=Er;E.looseIndexOf=mv;E.looseToNumber=E_;E.makeMap=_e;E.normalizeClass=pi;E.normalizeProps=U_;E.normalizeStyle=hi;E.objectToString=di;E.parseStringStyle=lc;E.propsToAttrMap=sv;E.remove=u_;E.slotFlagsText=M_;E.stringifyStyle=G_;E.toDisplayString=hc;E.toHandlerKey=C_;E.toNumber=O_;E.toRawType=m_;E.toTypeString=jt});var mi=S((_E,fi)=>{"use strict";process.env.NODE_ENV==="production"?fi.exports=Ql():fi.exports=fc()});var Dc=S(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});var $=mi(),se,Rr=class{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=se,!e&&se&&(this.index=(se.scopes||(se.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){let n=se;try{return se=this,e()}finally{se=n}}}on(){se=this}off(){se=this.parent}stop(e){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}};function gv(t){return new Rr(t)}function _c(){return se}function _v(t,e=!1){se&&se.cleanups.push(t)}var V,vv={ACTIVE:1,1:"ACTIVE",RUNNING:2,2:"RUNNING",TRACKING:4,4:"TRACKING",NOTIFIED:8,8:"NOTIFIED",DIRTY:16,16:"DIRTY",ALLOW_RECURSE:32,32:"ALLOW_RECURSE",PAUSED:64,64:"PAUSED"},gi=new WeakSet,Vt=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,se&&se.active&&se.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,gi.has(this)&&(gi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||bc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,mc(this),yc(this);let e=V,n=ve;V=this,ve=!0;try{return this.fn()}finally{wc(this),V=e,ve=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)$i(e);this.deps=this.depsTail=void 0,mc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?gi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){bi(this)&&this.run()}get dirty(){return bi(this)}},vc=0,jn,Fn;function bc(t,e=!1){if(t.flags|=8,e){t.next=Fn,Fn=t;return}t.next=jn,jn=t}function Oi(){vc++}function Ti(){if(--vc>0)return;if(Fn){let e=Fn;for(Fn=void 0;e;){let n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;jn;){let e=jn;for(jn=void 0;e;){let n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(r){t||(t=r)}e=n}}if(t)throw t}function yc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function wc(t){let e,n=t.depsTail,r=n;for(;r;){let s=r.prevDep;r.version===-1?(r===n&&(n=s),$i(r),bv(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}t.deps=e,t.depsTail=n}function bi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Cc(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Cc(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Vn))return;t.globalVersion=Vn;let e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!bi(t)){t.flags&=-3;return}let n=V,r=ve;V=t,ve=!0;try{yc(t);let s=t.fn(t._value);(e.version===0||$.hasChanged(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{V=n,ve=r,wc(t),t.flags&=-3}}function $i(t,e=!1){let{dep:n,prevSub:r,nextSub:s}=t;if(r&&(r.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=r,t.nextSub=void 0),n.subs===t&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)$i(i,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function bv(t){let{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function yv(t,e){t.effect instanceof Vt&&(t=t.effect.fn);let n=new Vt(t);e&&$.extend(n,e);try{n.run()}catch(s){throw n.stop(),s}let r=n.run.bind(n);return r.effect=n,r}function wv(t){t.effect.stop()}var ve=!0,Ri=[];function Ni(){Ri.push(ve),ve=!1}function Cv(){Ri.push(ve),ve=!0}function ki(){let t=Ri.pop();ve=t===void 0?!0:t}function Sv(t,e=!1){V instanceof Vt&&(V.cleanup=t)}function mc(t){let{cleanup:e}=t;if(t.cleanup=void 0,e){let n=V;V=void 0;try{e()}finally{V=n}}}var Vn=0,yi=class{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},on=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!V||!ve||V===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==V)n=this.activeLink=new yi(V,this),V.deps?(n.prevDep=V.depsTail,V.depsTail.nextDep=n,V.depsTail=n):V.deps=V.depsTail=n,Sc(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){let r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=V.depsTail,n.nextDep=void 0,V.depsTail.nextDep=n,V.depsTail=n,V.deps===n&&(V.deps=r)}return n}trigger(e){this.version++,Vn++,this.notify(e)}notify(e){Oi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ti()}}};function Sc(t){if(t.dep.sc++,t.sub.flags&4){let e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let r=e.deps;r;r=r.nextDep)Sc(r)}let n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}var Nr=new WeakMap,gt=Symbol(""),kr=Symbol(""),an=Symbol("");function ie(t,e,n){if(ve&&V){let r=Nr.get(t);r||Nr.set(t,r=new Map);let s=r.get(n);s||(r.set(n,s=new on),s.map=r,s.key=n),s.track()}}function Je(t,e,n,r,s,i){let o=Nr.get(t);if(!o){Vn++;return}let a=l=>{l&&l.trigger()};if(Oi(),e==="clear")o.forEach(a);else{let l=$.isArray(t),d=l&&$.isIntegerKey(n);if(l&&n==="length"){let u=Number(r);o.forEach((c,h)=>{(h==="length"||h===an||!$.isSymbol(h)&&h>=u)&&a(c)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),d&&a(o.get(an)),e){case"add":l?d&&a(o.get("length")):(a(o.get(gt)),$.isMap(t)&&a(o.get(kr)));break;case"delete":l||(a(o.get(gt)),$.isMap(t)&&a(o.get(kr)));break;case"set":$.isMap(t)&&a(o.get(gt));break}}Ti()}function xv(t,e){let n=Nr.get(t);return n&&n.get(e)}function Ft(t){let e=M(t);return e===t?e:(ie(e,"iterate",an),we(t)?e:e.map(ne))}function Fr(t){return ie(t=M(t),"iterate",an),t}var Av={__proto__:null,[Symbol.iterator](){return _i(this,Symbol.iterator,ne)},concat(...t){return Ft(this).concat(...t.map(e=>$.isArray(e)?Ft(e):e))},entries(){return _i(this,"entries",t=>(t[1]=ne(t[1]),t))},every(t,e){return Ye(this,"every",t,e,void 0,arguments)},filter(t,e){return Ye(this,"filter",t,e,n=>n.map(ne),arguments)},find(t,e){return Ye(this,"find",t,e,ne,arguments)},findIndex(t,e){return Ye(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Ye(this,"findLast",t,e,ne,arguments)},findLastIndex(t,e){return Ye(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Ye(this,"forEach",t,e,void 0,arguments)},includes(...t){return vi(this,"includes",t)},indexOf(...t){return vi(this,"indexOf",t)},join(t){return Ft(this).join(t)},lastIndexOf(...t){return vi(this,"lastIndexOf",t)},map(t,e){return Ye(this,"map",t,e,void 0,arguments)},pop(){return Mn(this,"pop")},push(...t){return Mn(this,"push",t)},reduce(t,...e){return gc(this,"reduce",t,e)},reduceRight(t,...e){return gc(this,"reduceRight",t,e)},shift(){return Mn(this,"shift")},some(t,e){return Ye(this,"some",t,e,void 0,arguments)},splice(...t){return Mn(this,"splice",t)},toReversed(){return Ft(this).toReversed()},toSorted(t){return Ft(this).toSorted(t)},toSpliced(...t){return Ft(this).toSpliced(...t)},unshift(...t){return Mn(this,"unshift",t)},values(){return _i(this,"values",ne)}};function _i(t,e,n){let r=Fr(t),s=r[e]();return r!==t&&!we(t)&&(s._next=s.next,s.next=()=>{let i=s._next();return i.value&&(i.value=n(i.value)),i}),s}var Ev=Array.prototype;function Ye(t,e,n,r,s,i){let o=Fr(t),a=o!==t&&!we(t),l=o[e];if(l!==Ev[e]){let c=l.apply(t,i);return a?ne(c):c}let d=n;o!==t&&(a?d=function(c,h){return n.call(this,ne(c),h,t)}:n.length>2&&(d=function(c,h){return n.call(this,c,h,t)}));let u=l.call(o,d,r);return a&&s?s(u):u}function gc(t,e,n,r){let s=Fr(t),i=n;return s!==t&&(we(t)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,t)}):i=function(o,a,l){return n.call(this,o,ne(a),l,t)}),s[e](i,...r)}function vi(t,e,n){let r=M(t);ie(r,"iterate",an);let s=r[e](...n);return(s===-1||s===!1)&&$c(n[0])?(n[0]=M(n[0]),r[e](...n)):s}function Mn(t,e,n=[]){Ni(),Oi();let r=M(t)[e].apply(t,n);return Ti(),ki(),r}var Ov=$.makeMap("__proto__,__v_isRef,__isVue"),xc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter($.isSymbol));function Tv(t){$.isSymbol(t)||(t=String(t));let e=M(this);return ie(e,"has",t),e.hasOwnProperty(t)}var Ir=class{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){if(n==="__v_skip")return e.__v_skip;let s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?Tc:Oc:i?Ec:Ac).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;let o=$.isArray(e);if(!s){let l;if(o&&(l=Av[n]))return l;if(n==="hasOwnProperty")return Tv}let a=Reflect.get(e,n,oe(e)?e:r);return($.isSymbol(n)?xc.has(n):Ov(n))||(s||ie(e,"get",n),i)?a:oe(a)?o&&$.isIntegerKey(n)?a:a.value:$.isObject(a)?s?Di(a):Ii(a):a}},Dr=class extends Ir{constructor(e=!1){super(!1,e)}set(e,n,r,s){let i=e[n];if(!this._isShallow){let l=_t(i);if(!we(r)&&!_t(r)&&(i=M(i),r=M(r)),!$.isArray(e)&&oe(i)&&!oe(r))return l?!1:(i.value=r,!0)}let o=$.isArray(e)&&$.isIntegerKey(n)?Number(n)<e.length:$.hasOwn(e,n),a=Reflect.set(e,n,r,oe(e)?e:s);return e===M(s)&&(o?$.hasChanged(r,i)&&Je(e,"set",n,r):Je(e,"add",n,r)),a}deleteProperty(e,n){let r=$.hasOwn(e,n);e[n];let s=Reflect.deleteProperty(e,n);return s&&r&&Je(e,"delete",n,void 0),s}has(e,n){let r=Reflect.has(e,n);return(!$.isSymbol(n)||!xc.has(n))&&ie(e,"has",n),r}ownKeys(e){return ie(e,"iterate",$.isArray(e)?"length":gt),Reflect.ownKeys(e)}},Pr=class extends Ir{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}},$v=new Dr,Rv=new Pr,Nv=new Dr(!0),kv=new Pr(!0),wi=t=>t,Or=t=>Reflect.getPrototypeOf(t);function Iv(t,e,n){return function(...r){let s=this.__v_raw,i=M(s),o=$.isMap(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,d=s[t](...r),u=n?wi:e?Mr:ne;return!e&&ie(i,"iterate",l?kr:gt),{next(){let{value:c,done:h}=d.next();return h?{value:c,done:h}:{value:a?[u(c[0]),u(c[1])]:u(c),done:h}},[Symbol.iterator](){return this}}}}function Tr(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Dv(t,e){let n={get(s){let i=this.__v_raw,o=M(i),a=M(s);t||($.hasChanged(s,a)&&ie(o,"get",s),ie(o,"get",a));let{has:l}=Or(o),d=e?wi:t?Mr:ne;if(l.call(o,s))return d(i.get(s));if(l.call(o,a))return d(i.get(a));i!==o&&i.get(s)},get size(){let s=this.__v_raw;return!t&&ie(M(s),"iterate",gt),Reflect.get(s,"size",s)},has(s){let i=this.__v_raw,o=M(i),a=M(s);return t||($.hasChanged(s,a)&&ie(o,"has",s),ie(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){let o=this,a=o.__v_raw,l=M(a),d=e?wi:t?Mr:ne;return!t&&ie(l,"iterate",gt),a.forEach((u,c)=>s.call(i,d(u),d(c),o))}};return $.extend(n,t?{add:Tr("add"),set:Tr("set"),delete:Tr("delete"),clear:Tr("clear")}:{add(s){!e&&!we(s)&&!_t(s)&&(s=M(s));let i=M(this);return Or(i).has.call(i,s)||(i.add(s),Je(i,"add",s,s)),this},set(s,i){!e&&!we(i)&&!_t(i)&&(i=M(i));let o=M(this),{has:a,get:l}=Or(o),d=a.call(o,s);d||(s=M(s),d=a.call(o,s));let u=l.call(o,s);return o.set(s,i),d?$.hasChanged(i,u)&&Je(o,"set",s,i):Je(o,"add",s,i),this},delete(s){let i=M(this),{has:o,get:a}=Or(i),l=o.call(i,s);l||(s=M(s),l=o.call(i,s)),a&&a.call(i,s);let d=i.delete(s);return l&&Je(i,"delete",s,void 0),d},clear(){let s=M(this),i=s.size!==0,o=s.clear();return i&&Je(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Iv(s,t,e)}),n}function Vr(t,e){let n=Dv(t,e);return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get($.hasOwn(n,s)&&s in r?n:r,s,i)}var Pv={get:Vr(!1,!1)},Mv={get:Vr(!1,!0)},jv={get:Vr(!0,!1)},Fv={get:Vr(!0,!0)},Ac=new WeakMap,Ec=new WeakMap,Oc=new WeakMap,Tc=new WeakMap;function Vv(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function qv(t){return t.__v_skip||!Object.isExtensible(t)?0:Vv($.toRawType(t))}function Ii(t){return _t(t)?t:qr(t,!1,$v,Pv,Ac)}function Lv(t){return qr(t,!1,Nv,Mv,Ec)}function Di(t){return qr(t,!0,Rv,jv,Oc)}function Hv(t){return qr(t,!0,kv,Fv,Tc)}function qr(t,e,n,r,s){if(!$.isObject(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;let i=s.get(t);if(i)return i;let o=qv(t);if(o===0)return t;let a=new Proxy(t,o===2?r:n);return s.set(t,a),a}function sn(t){return _t(t)?sn(t.__v_raw):!!(t&&t.__v_isReactive)}function _t(t){return!!(t&&t.__v_isReadonly)}function we(t){return!!(t&&t.__v_isShallow)}function $c(t){return t?!!t.__v_raw:!1}function M(t){let e=t&&t.__v_raw;return e?M(e):t}function Gv(t){return!$.hasOwn(t,"__v_skip")&&Object.isExtensible(t)&&$.def(t,"__v_skip",!0),t}var ne=t=>$.isObject(t)?Ii(t):t,Mr=t=>$.isObject(t)?Di(t):t;function oe(t){return t?t.__v_isRef===!0:!1}function Rc(t){return Nc(t,!1)}function Uv(t){return Nc(t,!0)}function Nc(t,e){return oe(t)?t:new Ci(t,e)}var Ci=class{constructor(e,n){this.dep=new on,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:M(e),this._value=n?e:ne(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){let n=this._rawValue,r=this.__v_isShallow||we(e)||_t(e);e=r?e:M(e),$.hasChanged(e,n)&&(this._rawValue=e,this._value=r?e:ne(e),this.dep.trigger())}};function Wv(t){t.dep&&t.dep.trigger()}function Pi(t){return oe(t)?t.value:t}function Bv(t){return $.isFunction(t)?t():Pi(t)}var zv={get:(t,e,n)=>e==="__v_raw"?t:Pi(Reflect.get(t,e,n)),set:(t,e,n,r)=>{let s=t[e];return oe(s)&&!oe(n)?(s.value=n,!0):Reflect.set(t,e,n,r)}};function Kv(t){return sn(t)?t:new Proxy(t,zv)}var Si=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let n=this.dep=new on,{get:r,set:s}=e(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}};function Yv(t){return new Si(t)}function Jv(t){let e=$.isArray(t)?new Array(t.length):{};for(let n in t)e[n]=kc(t,n);return e}var xi=class{constructor(e,n,r){this._object=e,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return xv(M(this._object),this._key)}},Ai=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function Xv(t,e,n){return oe(t)?t:$.isFunction(t)?new Ai(t):$.isObject(t)&&arguments.length>1?kc(t,e,n):Rc(t)}function kc(t,e,n){let r=t[e];return oe(r)?r:new xi(t,e,n)}var Ei=class{constructor(e,n,r){this.fn=e,this.setter=n,this._value=void 0,this.dep=new on(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Vn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&V!==this)return bc(this,!0),!0}get value(){let e=this.dep.track();return Cc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Zv(t,e,n=!1){let r,s;return $.isFunction(t)?r=t:(r=t.get,s=t.set),new Ei(r,s,n)}var Qv={GET:"get",HAS:"has",ITERATE:"iterate"},eb={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},tb={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},nb={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},$r={},jr=new WeakMap,mt;function rb(){return mt}function Ic(t,e=!1,n=mt){if(n){let r=jr.get(n);r||jr.set(n,r=[]),r.push(t)}}function sb(t,e,n=$.EMPTY_OBJ){let{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,d=g=>s?g:we(g)||s===!1||s===0?Xe(g,1):Xe(g),u,c,h,f,v=!1,m=!1;if(oe(t)?(c=()=>t.value,v=we(t)):sn(t)?(c=()=>d(t),v=!0):$.isArray(t)?(m=!0,v=t.some(g=>sn(g)||we(g)),c=()=>t.map(g=>{if(oe(g))return g.value;if(sn(g))return d(g);if($.isFunction(g))return l?l(g,2):g()})):$.isFunction(t)?e?c=l?()=>l(t,2):t:c=()=>{if(h){Ni();try{h()}finally{ki()}}let g=mt;mt=u;try{return l?l(t,3,[f]):t(f)}finally{mt=g}}:c=$.NOOP,e&&s){let g=c,p=s===!0?1/0:s;c=()=>Xe(g(),p)}let _=_c(),y=()=>{u.stop(),_&&_.active&&$.remove(_.effects,u)};if(i&&e){let g=e;e=(...p)=>{g(...p),y()}}let b=m?new Array(t.length).fill($r):$r,w=g=>{if(!(!(u.flags&1)||!u.dirty&&!g))if(e){let p=u.run();if(s||v||(m?p.some((C,k)=>$.hasChanged(C,b[k])):$.hasChanged(p,b))){h&&h();let C=mt;mt=u;try{let k=[p,b===$r?void 0:m&&b[0]===$r?[]:b,f];l?l(e,3,k):e(...k),b=p}finally{mt=C}}}else u.run()};return a&&a(w),u=new Vt(c),u.scheduler=o?()=>o(w,!1):w,f=g=>Ic(g,!1,u),h=u.onStop=()=>{let g=jr.get(u);if(g){if(l)l(g,4);else for(let p of g)p();jr.delete(u)}},e?r?w(!0):b=u.run():o?o(w.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function Xe(t,e=1/0,n){if(e<=0||!$.isObject(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,oe(t))Xe(t.value,e,n);else if($.isArray(t))for(let r=0;r<t.length;r++)Xe(t[r],e,n);else if($.isSet(t)||$.isMap(t))t.forEach(r=>{Xe(r,e,n)});else if($.isPlainObject(t)){for(let r in t)Xe(t[r],e,n);for(let r of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,r)&&Xe(t[r],e,n)}return t}R.ARRAY_ITERATE_KEY=an;R.EffectFlags=vv;R.EffectScope=Rr;R.ITERATE_KEY=gt;R.MAP_KEY_ITERATE_KEY=kr;R.ReactiveEffect=Vt;R.ReactiveFlags=tb;R.TrackOpTypes=Qv;R.TriggerOpTypes=eb;R.WatchErrorCodes=nb;R.computed=Zv;R.customRef=Yv;R.effect=yv;R.effectScope=gv;R.enableTracking=Cv;R.getCurrentScope=_c;R.getCurrentWatcher=rb;R.isProxy=$c;R.isReactive=sn;R.isReadonly=_t;R.isRef=oe;R.isShallow=we;R.markRaw=Gv;R.onEffectCleanup=Sv;R.onScopeDispose=_v;R.onWatcherCleanup=Ic;R.pauseTracking=Ni;R.proxyRefs=Kv;R.reactive=Ii;R.reactiveReadArray=Ft;R.readonly=Di;R.ref=Rc;R.resetTracking=ki;R.shallowReactive=Lv;R.shallowReadArray=Fr;R.shallowReadonly=Hv;R.shallowRef=Uv;R.stop=wv;R.toRaw=M;R.toReactive=ne;R.toReadonly=Mr;R.toRef=Xv;R.toRefs=Jv;R.toValue=Bv;R.track=ie;R.traverse=Xe;R.trigger=Je;R.triggerRef=Wv;R.unref=Pi;R.watch=sb});var eu=S(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});var T=mi();function ye(t,...e){console.warn(`[Vue warn] ${t}`,...e)}var ae,Ur=class{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ae,!e&&ae&&(this.index=(ae.scopes||(ae.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){let n=ae;try{return ae=this,e()}finally{ae=n}}else ye("cannot run an inactive effect scope.")}on(){ae=this}off(){ae=this.parent}stop(e){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}};function ib(t){return new Ur(t)}function Fc(){return ae}function ob(t,e=!1){ae?ae.cleanups.push(t):e||ye("onScopeDispose() is called when there is no active effect scope to be associated with.")}var D,ab={ACTIVE:1,1:"ACTIVE",RUNNING:2,2:"RUNNING",TRACKING:4,4:"TRACKING",NOTIFIED:8,8:"NOTIFIED",DIRTY:16,16:"DIRTY",ALLOW_RECURSE:32,32:"ALLOW_RECURSE",PAUSED:64,64:"PAUSED"},Mi=new WeakSet,Lt=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ae&&ae.active&&ae.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Mi.has(this)&&(Mi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||qc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Pc(this),Lc(this);let e=D,n=be;D=this,be=!0;try{return this.fn()}finally{D!==this&&ye("Active effect was not restored correctly - this is likely a Vue internal bug."),Hc(this),D=e,be=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Yi(e);this.deps=this.depsTail=void 0,Pc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Mi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Vi(this)&&this.run()}get dirty(){return Vi(this)}},Vc=0,Ln,Hn;function qc(t,e=!1){if(t.flags|=8,e){t.next=Hn,Hn=t;return}t.next=Ln,Ln=t}function zi(){Vc++}function Ki(){if(--Vc>0)return;if(Hn){let e=Hn;for(Hn=void 0;e;){let n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;Ln;){let e=Ln;for(Ln=void 0;e;){let n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(r){t||(t=r)}e=n}}if(t)throw t}function Lc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Hc(t){let e,n=t.depsTail,r=n;for(;r;){let s=r.prevDep;r.version===-1?(r===n&&(n=s),Yi(r),lb(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}t.deps=e,t.depsTail=n}function Vi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Gc(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Gc(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Gn))return;t.globalVersion=Gn;let e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Vi(t)){t.flags&=-3;return}let n=D,r=be;D=t,be=!0;try{Lc(t);let s=t.fn(t._value);(e.version===0||T.hasChanged(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{D=n,be=r,Hc(t),t.flags&=-3}}function Yi(t,e=!1){let{dep:n,prevSub:r,nextSub:s}=t;if(r&&(r.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=r,t.nextSub=void 0),n.subsHead===t&&(n.subsHead=s),n.subs===t&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Yi(i,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function lb(t){let{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function cb(t,e){t.effect instanceof Lt&&(t=t.effect.fn);let n=new Lt(t);e&&T.extend(n,e);try{n.run()}catch(s){throw n.stop(),s}let r=n.run.bind(n);return r.effect=n,r}function ub(t){t.effect.stop()}var be=!0,Ji=[];function Xi(){Ji.push(be),be=!1}function db(){Ji.push(be),be=!0}function Zi(){let t=Ji.pop();be=t===void 0?!0:t}function hb(t,e=!1){D instanceof Lt?D.cleanup=t:e||ye("onEffectCleanup() was called when there was no active effect to associate with.")}function Pc(t){let{cleanup:e}=t;if(t.cleanup=void 0,e){let n=D;D=void 0;try{e()}finally{D=n}}}var Gn=0,qi=class{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},cn=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.subsHead=void 0}track(e){if(!D||!be||D===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==D)n=this.activeLink=new qi(D,this),D.deps?(n.prevDep=D.depsTail,D.depsTail.nextDep=n,D.depsTail=n):D.deps=D.depsTail=n,Uc(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){let r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=D.depsTail,n.nextDep=void 0,D.depsTail.nextDep=n,D.depsTail=n,D.deps===n&&(D.deps=r)}return D.onTrack&&D.onTrack(T.extend({effect:D},e)),n}trigger(e){this.version++,Gn++,this.notify(e)}notify(e){zi();try{for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(T.extend({effect:n.sub},e));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ki()}}};function Uc(t){if(t.dep.sc++,t.sub.flags&4){let e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let r=e.deps;r;r=r.nextDep)Uc(r)}let n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subsHead===void 0&&(t.dep.subsHead=t),t.dep.subs=t}}var Wr=new WeakMap,bt=Symbol("Object iterate"),Br=Symbol("Map keys iterate"),un=Symbol("Array iterate");function le(t,e,n){if(be&&D){let r=Wr.get(t);r||Wr.set(t,r=new Map);let s=r.get(n);s||(r.set(n,s=new cn),s.map=r,s.key=n),s.track({target:t,type:e,key:n})}}function Qe(t,e,n,r,s,i){let o=Wr.get(t);if(!o){Gn++;return}let a=l=>{l&&l.trigger({target:t,type:e,key:n,newValue:r,oldValue:s,oldTarget:i})};if(zi(),e==="clear")o.forEach(a);else{let l=T.isArray(t),d=l&&T.isIntegerKey(n);if(l&&n==="length"){let u=Number(r);o.forEach((c,h)=>{(h==="length"||h===un||!T.isSymbol(h)&&h>=u)&&a(c)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),d&&a(o.get(un)),e){case"add":l?d&&a(o.get("length")):(a(o.get(bt)),T.isMap(t)&&a(o.get(Br)));break;case"delete":l||(a(o.get(bt)),T.isMap(t)&&a(o.get(Br)));break;case"set":T.isMap(t)&&a(o.get(bt));break}}Ki()}function pb(t,e){let n=Wr.get(t);return n&&n.get(e)}function qt(t){let e=P(t);return e===t?e:(le(e,"iterate",un),Ce(t)?e:e.map(re))}function Zr(t){return le(t=P(t),"iterate",un),t}var fb={__proto__:null,[Symbol.iterator](){return ji(this,Symbol.iterator,re)},concat(...t){return qt(this).concat(...t.map(e=>T.isArray(e)?qt(e):e))},entries(){return ji(this,"entries",t=>(t[1]=re(t[1]),t))},every(t,e){return Ze(this,"every",t,e,void 0,arguments)},filter(t,e){return Ze(this,"filter",t,e,n=>n.map(re),arguments)},find(t,e){return Ze(this,"find",t,e,re,arguments)},findIndex(t,e){return Ze(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Ze(this,"findLast",t,e,re,arguments)},findLastIndex(t,e){return Ze(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Ze(this,"forEach",t,e,void 0,arguments)},includes(...t){return Fi(this,"includes",t)},indexOf(...t){return Fi(this,"indexOf",t)},join(t){return qt(this).join(t)},lastIndexOf(...t){return Fi(this,"lastIndexOf",t)},map(t,e){return Ze(this,"map",t,e,void 0,arguments)},pop(){return qn(this,"pop")},push(...t){return qn(this,"push",t)},reduce(t,...e){return Mc(this,"reduce",t,e)},reduceRight(t,...e){return Mc(this,"reduceRight",t,e)},shift(){return qn(this,"shift")},some(t,e){return Ze(this,"some",t,e,void 0,arguments)},splice(...t){return qn(this,"splice",t)},toReversed(){return qt(this).toReversed()},toSorted(t){return qt(this).toSorted(t)},toSpliced(...t){return qt(this).toSpliced(...t)},unshift(...t){return qn(this,"unshift",t)},values(){return ji(this,"values",re)}};function ji(t,e,n){let r=Zr(t),s=r[e]();return r!==t&&!Ce(t)&&(s._next=s.next,s.next=()=>{let i=s._next();return i.value&&(i.value=n(i.value)),i}),s}var mb=Array.prototype;function Ze(t,e,n,r,s,i){let o=Zr(t),a=o!==t&&!Ce(t),l=o[e];if(l!==mb[e]){let c=l.apply(t,i);return a?re(c):c}let d=n;o!==t&&(a?d=function(c,h){return n.call(this,re(c),h,t)}:n.length>2&&(d=function(c,h){return n.call(this,c,h,t)}));let u=l.call(o,d,r);return a&&s?s(u):u}function Mc(t,e,n,r){let s=Zr(t),i=n;return s!==t&&(Ce(t)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,t)}):i=function(o,a,l){return n.call(this,o,re(a),l,t)}),s[e](i,...r)}function Fi(t,e,n){let r=P(t);le(r,"iterate",un);let s=r[e](...n);return(s===-1||s===!1)&&to(n[0])?(n[0]=P(n[0]),r[e](...n)):s}function qn(t,e,n=[]){Xi(),zi();let r=P(t)[e].apply(t,n);return Ki(),Zi(),r}var gb=T.makeMap("__proto__,__v_isRef,__isVue"),Wc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(T.isSymbol));function _b(t){T.isSymbol(t)||(t=String(t));let e=P(this);return le(e,"has",t),e.hasOwnProperty(t)}var zr=class{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){if(n==="__v_skip")return e.__v_skip;let s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?Yc:Kc:i?zc:Bc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;let o=T.isArray(e);if(!s){let l;if(o&&(l=fb[n]))return l;if(n==="hasOwnProperty")return _b}let a=Reflect.get(e,n,ce(e)?e:r);return(T.isSymbol(n)?Wc.has(n):gb(n))||(s||le(e,"get",n),i)?a:ce(a)?o&&T.isIntegerKey(n)?a:a.value:T.isObject(a)?s?eo(a):Qi(a):a}},Kr=class extends zr{constructor(e=!1){super(!1,e)}set(e,n,r,s){let i=e[n];if(!this._isShallow){let l=yt(i);if(!Ce(r)&&!yt(r)&&(i=P(i),r=P(r)),!T.isArray(e)&&ce(i)&&!ce(r))return l?!1:(i.value=r,!0)}let o=T.isArray(e)&&T.isIntegerKey(n)?Number(n)<e.length:T.hasOwn(e,n),a=Reflect.set(e,n,r,ce(e)?e:s);return e===P(s)&&(o?T.hasChanged(r,i)&&Qe(e,"set",n,r,i):Qe(e,"add",n,r)),a}deleteProperty(e,n){let r=T.hasOwn(e,n),s=e[n],i=Reflect.deleteProperty(e,n);return i&&r&&Qe(e,"delete",n,void 0,s),i}has(e,n){let r=Reflect.has(e,n);return(!T.isSymbol(n)||!Wc.has(n))&&le(e,"has",n),r}ownKeys(e){return le(e,"iterate",T.isArray(e)?"length":bt),Reflect.ownKeys(e)}},Yr=class extends zr{constructor(e=!1){super(!0,e)}set(e,n){return ye(`Set operation on key "${String(n)}" failed: target is readonly.`,e),!0}deleteProperty(e,n){return ye(`Delete operation on key "${String(n)}" failed: target is readonly.`,e),!0}},vb=new Kr,bb=new Yr,yb=new Kr(!0),wb=new Yr(!0),Li=t=>t,Lr=t=>Reflect.getPrototypeOf(t);function Cb(t,e,n){return function(...r){let s=this.__v_raw,i=P(s),o=T.isMap(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,d=s[t](...r),u=n?Li:e?Jr:re;return!e&&le(i,"iterate",l?Br:bt),{next(){let{value:c,done:h}=d.next();return h?{value:c,done:h}:{value:a?[u(c[0]),u(c[1])]:u(c),done:h}},[Symbol.iterator](){return this}}}}function Hr(t){return function(...e){{let n=e[0]?`on key "${e[0]}" `:"";ye(`${T.capitalize(t)} operation ${n}failed: target is readonly.`,P(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function Sb(t,e){let n={get(s){let i=this.__v_raw,o=P(i),a=P(s);t||(T.hasChanged(s,a)&&le(o,"get",s),le(o,"get",a));let{has:l}=Lr(o),d=e?Li:t?Jr:re;if(l.call(o,s))return d(i.get(s));if(l.call(o,a))return d(i.get(a));i!==o&&i.get(s)},get size(){let s=this.__v_raw;return!t&&le(P(s),"iterate",bt),Reflect.get(s,"size",s)},has(s){let i=this.__v_raw,o=P(i),a=P(s);return t||(T.hasChanged(s,a)&&le(o,"has",s),le(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){let o=this,a=o.__v_raw,l=P(a),d=e?Li:t?Jr:re;return!t&&le(l,"iterate",bt),a.forEach((u,c)=>s.call(i,d(u),d(c),o))}};return T.extend(n,t?{add:Hr("add"),set:Hr("set"),delete:Hr("delete"),clear:Hr("clear")}:{add(s){!e&&!Ce(s)&&!yt(s)&&(s=P(s));let i=P(this);return Lr(i).has.call(i,s)||(i.add(s),Qe(i,"add",s,s)),this},set(s,i){!e&&!Ce(i)&&!yt(i)&&(i=P(i));let o=P(this),{has:a,get:l}=Lr(o),d=a.call(o,s);d?jc(o,a,s):(s=P(s),d=a.call(o,s));let u=l.call(o,s);return o.set(s,i),d?T.hasChanged(i,u)&&Qe(o,"set",s,i,u):Qe(o,"add",s,i),this},delete(s){let i=P(this),{has:o,get:a}=Lr(i),l=o.call(i,s);l?jc(i,o,s):(s=P(s),l=o.call(i,s));let d=a?a.call(i,s):void 0,u=i.delete(s);return l&&Qe(i,"delete",s,void 0,d),u},clear(){let s=P(this),i=s.size!==0,o=T.isMap(s)?new Map(s):new Set(s),a=s.clear();return i&&Qe(s,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Cb(s,t,e)}),n}function Qr(t,e){let n=Sb(t,e);return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get(T.hasOwn(n,s)&&s in r?n:r,s,i)}var xb={get:Qr(!1,!1)},Ab={get:Qr(!1,!0)},Eb={get:Qr(!0,!1)},Ob={get:Qr(!0,!0)};function jc(t,e,n){let r=P(n);if(r!==n&&e.call(t,r)){let s=T.toRawType(t);ye(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var Bc=new WeakMap,zc=new WeakMap,Kc=new WeakMap,Yc=new WeakMap;function Tb(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function $b(t){return t.__v_skip||!Object.isExtensible(t)?0:Tb(T.toRawType(t))}function Qi(t){return yt(t)?t:es(t,!1,vb,xb,Bc)}function Rb(t){return es(t,!1,yb,Ab,zc)}function eo(t){return es(t,!0,bb,Eb,Kc)}function Nb(t){return es(t,!0,wb,Ob,Yc)}function es(t,e,n,r,s){if(!T.isObject(t))return ye(`value cannot be made ${e?"readonly":"reactive"}: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive))return t;let i=s.get(t);if(i)return i;let o=$b(t);if(o===0)return t;let a=new Proxy(t,o===2?r:n);return s.set(t,a),a}function ln(t){return yt(t)?ln(t.__v_raw):!!(t&&t.__v_isReactive)}function yt(t){return!!(t&&t.__v_isReadonly)}function Ce(t){return!!(t&&t.__v_isShallow)}function to(t){return t?!!t.__v_raw:!1}function P(t){let e=t&&t.__v_raw;return e?P(e):t}function kb(t){return!T.hasOwn(t,"__v_skip")&&Object.isExtensible(t)&&T.def(t,"__v_skip",!0),t}var re=t=>T.isObject(t)?Qi(t):t,Jr=t=>T.isObject(t)?eo(t):t;function ce(t){return t?t.__v_isRef===!0:!1}function Jc(t){return Xc(t,!1)}function Ib(t){return Xc(t,!0)}function Xc(t,e){return ce(t)?t:new Hi(t,e)}var Hi=class{constructor(e,n){this.dep=new cn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:P(e),this._value=n?e:re(e),this.__v_isShallow=n}get value(){return this.dep.track({target:this,type:"get",key:"value"}),this._value}set value(e){let n=this._rawValue,r=this.__v_isShallow||Ce(e)||yt(e);e=r?e:P(e),T.hasChanged(e,n)&&(this._rawValue=e,this._value=r?e:re(e),this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:n}))}};function Db(t){t.dep&&t.dep.trigger({target:t,type:"set",key:"value",newValue:t._value})}function no(t){return ce(t)?t.value:t}function Pb(t){return T.isFunction(t)?t():no(t)}var Mb={get:(t,e,n)=>e==="__v_raw"?t:no(Reflect.get(t,e,n)),set:(t,e,n,r)=>{let s=t[e];return ce(s)&&!ce(n)?(s.value=n,!0):Reflect.set(t,e,n,r)}};function jb(t){return ln(t)?t:new Proxy(t,Mb)}var Gi=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let n=this.dep=new cn,{get:r,set:s}=e(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}};function Fb(t){return new Gi(t)}function Vb(t){to(t)||ye("toRefs() expects a reactive object but received a plain one.");let e=T.isArray(t)?new Array(t.length):{};for(let n in t)e[n]=Zc(t,n);return e}var Ui=class{constructor(e,n,r){this._object=e,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return pb(P(this._object),this._key)}},Wi=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function qb(t,e,n){return ce(t)?t:T.isFunction(t)?new Wi(t):T.isObject(t)&&arguments.length>1?Zc(t,e,n):Jc(t)}function Zc(t,e,n){let r=t[e];return ce(r)?r:new Ui(t,e,n)}var Bi=class{constructor(e,n,r){this.fn=e,this.setter=n,this._value=void 0,this.dep=new cn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Gn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&D!==this)return qc(this,!0),!0}get value(){let e=this.dep.track({target:this,type:"get",key:"value"});return Gc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter?this.setter(e):ye("Write operation failed: computed value is readonly")}};function Lb(t,e,n=!1){let r,s;T.isFunction(t)?r=t:(r=t.get,s=t.set);let i=new Bi(r,s,n);return e&&!n&&(i.onTrack=e.onTrack,i.onTrigger=e.onTrigger),i}var Hb={GET:"get",HAS:"has",ITERATE:"iterate"},Gb={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Ub={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},Wb={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},Gr={},Xr=new WeakMap,vt;function Bb(){return vt}function Qc(t,e=!1,n=vt){if(n){let r=Xr.get(n);r||Xr.set(n,r=[]),r.push(t)}else e||ye("onWatcherCleanup() was called when there was no active watcher to associate with.")}function zb(t,e,n=T.EMPTY_OBJ){let{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,d=p=>{(n.onWarn||ye)("Invalid watch source: ",p,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},u=p=>s?p:Ce(p)||s===!1||s===0?et(p,1):et(p),c,h,f,v,m=!1,_=!1;if(ce(t)?(h=()=>t.value,m=Ce(t)):ln(t)?(h=()=>u(t),m=!0):T.isArray(t)?(_=!0,m=t.some(p=>ln(p)||Ce(p)),h=()=>t.map(p=>{if(ce(p))return p.value;if(ln(p))return u(p);if(T.isFunction(p))return l?l(p,2):p();d(p)})):T.isFunction(t)?e?h=l?()=>l(t,2):t:h=()=>{if(f){Xi();try{f()}finally{Zi()}}let p=vt;vt=c;try{return l?l(t,3,[v]):t(v)}finally{vt=p}}:(h=T.NOOP,d(t)),e&&s){let p=h,C=s===!0?1/0:s;h=()=>et(p(),C)}let y=Fc(),b=()=>{c.stop(),y&&y.active&&T.remove(y.effects,c)};if(i&&e){let p=e;e=(...C)=>{p(...C),b()}}let w=_?new Array(t.length).fill(Gr):Gr,g=p=>{if(!(!(c.flags&1)||!c.dirty&&!p))if(e){let C=c.run();if(s||m||(_?C.some((k,Cr)=>T.hasChanged(k,w[Cr])):T.hasChanged(C,w))){f&&f();let k=vt;vt=c;try{let Cr=[C,w===Gr?void 0:_&&w[0]===Gr?[]:w,v];l?l(e,3,Cr):e(...Cr),w=C}finally{vt=k}}}else c.run()};return a&&a(g),c=new Lt(h),c.scheduler=o?()=>o(g,!1):g,v=p=>Qc(p,!1,c),f=c.onStop=()=>{let p=Xr.get(c);if(p){if(l)l(p,4);else for(let C of p)C();Xr.delete(c)}},c.onTrack=n.onTrack,c.onTrigger=n.onTrigger,e?r?g(!0):w=c.run():o?o(g.bind(null,!0),!0):c.run(),b.pause=c.pause.bind(c),b.resume=c.resume.bind(c),b.stop=b,b}function et(t,e=1/0,n){if(e<=0||!T.isObject(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,ce(t))et(t.value,e,n);else if(T.isArray(t))for(let r=0;r<t.length;r++)et(t[r],e,n);else if(T.isSet(t)||T.isMap(t))t.forEach(r=>{et(r,e,n)});else if(T.isPlainObject(t)){for(let r in t)et(t[r],e,n);for(let r of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,r)&&et(t[r],e,n)}return t}N.ARRAY_ITERATE_KEY=un;N.EffectFlags=ab;N.EffectScope=Ur;N.ITERATE_KEY=bt;N.MAP_KEY_ITERATE_KEY=Br;N.ReactiveEffect=Lt;N.ReactiveFlags=Ub;N.TrackOpTypes=Hb;N.TriggerOpTypes=Gb;N.WatchErrorCodes=Wb;N.computed=Lb;N.customRef=Fb;N.effect=cb;N.effectScope=ib;N.enableTracking=db;N.getCurrentScope=Fc;N.getCurrentWatcher=Bb;N.isProxy=to;N.isReactive=ln;N.isReadonly=yt;N.isRef=ce;N.isShallow=Ce;N.markRaw=kb;N.onEffectCleanup=hb;N.onScopeDispose=ob;N.onWatcherCleanup=Qc;N.pauseTracking=Xi;N.proxyRefs=jb;N.reactive=Qi;N.reactiveReadArray=qt;N.readonly=eo;N.ref=Jc;N.resetTracking=Zi;N.shallowReactive=Rb;N.shallowReadArray=Zr;N.shallowReadonly=Nb;N.shallowRef=Ib;N.stop=ub;N.toRaw=P;N.toReactive=re;N.toReadonly=Jr;N.toRef=qb;N.toRefs=Vb;N.toValue=Pb;N.track=le;N.traverse=et;N.trigger=Qe;N.triggerRef=Db;N.unref=no;N.watch=zb});var Un=S((yE,ro)=>{"use strict";process.env.NODE_ENV==="production"?ro.exports=Dc():ro.exports=eu()});var Wn=S(io=>{"use strict";var ts=class extends Error{constructor(e,n,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=e,this.nestedError=void 0}},so=class extends ts{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};io.CommanderError=ts;io.InvalidArgumentError=so});var ns=S(ao=>{"use strict";var{InvalidArgumentError:Kb}=Wn(),oo=class{constructor(e,n){switch(this.description=n||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:n.concat(e)}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new Kb(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(n,r):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Yb(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}ao.Argument=oo;ao.humanReadableArgName=Yb});var co=S(tu=>{"use strict";var{humanReadableArgName:Jb}=ns(),lo=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let n=e.commands.filter(s=>!s._hidden),r=e._getHelpCommand();return r&&!r._hidden&&n.push(r),this.sortSubcommands&&n.sort((s,i)=>s.name().localeCompare(i.name())),n}compareOptions(e,n){let r=s=>s.short?s.short.replace(/^-/,""):s.long.replace(/^--/,"");return r(e).localeCompare(r(n))}visibleOptions(e){let n=e.options.filter(s=>!s.hidden),r=e._getHelpOption();if(r&&!r.hidden){let s=r.short&&e._findOption(r.short),i=r.long&&e._findOption(r.long);!s&&!i?n.push(r):r.long&&!i?n.push(e.createOption(r.long,r.description)):r.short&&!s&&n.push(e.createOption(r.short,r.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let n=[];for(let r=e.parent;r;r=r.parent){let s=r.options.filter(i=>!i.hidden);n.push(...s)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(n=>{n.description=n.description||e._argsDescription[n.name()]||""}),e.registeredArguments.find(n=>n.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(r=>Jb(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,n){return n.visibleCommands(e).reduce((r,s)=>Math.max(r,n.subcommandTerm(s).length),0)}longestOptionTermLength(e,n){return n.visibleOptions(e).reduce((r,s)=>Math.max(r,n.optionTerm(s).length),0)}longestGlobalOptionTermLength(e,n){return n.visibleGlobalOptions(e).reduce((r,s)=>Math.max(r,n.optionTerm(s).length),0)}longestArgumentTermLength(e,n){return n.visibleArguments(e).reduce((r,s)=>Math.max(r,n.argumentTerm(s).length),0)}commandUsage(e){let n=e._name;e._aliases[0]&&(n=n+"|"+e._aliases[0]);let r="";for(let s=e.parent;s;s=s.parent)r=s.name()+" "+r;return r+n+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let n=[];return e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&n.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&n.push(`env: ${e.envVar}`),n.length>0?`${e.description} (${n.join(", ")})`:e.description}argumentDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatHelp(e,n){let r=n.padWidth(e,n),s=n.helpWidth||80,i=2,o=2;function a(v,m){if(m){let _=`${v.padEnd(r+o)}${m}`;return n.wrap(_,s-i,r+o)}return v}function l(v){return v.join(`
5
5
  `).replace(/^/gm," ".repeat(i))}let d=[`Usage: ${n.commandUsage(e)}`,""],u=n.commandDescription(e);u.length>0&&(d=d.concat([n.wrap(u,s,0),""]));let c=n.visibleArguments(e).map(v=>a(n.argumentTerm(v),n.argumentDescription(v)));c.length>0&&(d=d.concat(["Arguments:",l(c),""]));let h=n.visibleOptions(e).map(v=>a(n.optionTerm(v),n.optionDescription(v)));if(h.length>0&&(d=d.concat(["Options:",l(h),""])),this.showGlobalOptions){let v=n.visibleGlobalOptions(e).map(m=>a(n.optionTerm(m),n.optionDescription(m)));v.length>0&&(d=d.concat(["Global Options:",l(v),""]))}let f=n.visibleCommands(e).map(v=>a(n.subcommandTerm(v),n.subcommandDescription(v)));return f.length>0&&(d=d.concat(["Commands:",l(f),""])),d.join(`
6
6
  `)}padWidth(e,n){return Math.max(n.longestOptionTermLength(e,n),n.longestGlobalOptionTermLength(e,n),n.longestSubcommandTermLength(e,n),n.longestArgumentTermLength(e,n))}wrap(e,n,r,s=40){let i=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",o=new RegExp(`[\\n][${i}]+`);if(e.match(o))return e;let a=n-r;if(a<s)return e;let l=e.slice(0,r),d=e.slice(r).replace(`\r
7
7
  `,`
8
8
  `),u=" ".repeat(r),h="\\s\u200B",f=new RegExp(`
9
9
  |.{1,${a-1}}([${h}]|$)|[^${h}]+?([${h}]|$)`,"g"),v=d.match(f)||[];return l+v.map((m,_)=>m===`
10
10
  `?"":(_>0?u:"")+m.trimEnd()).join(`
11
- `)}};Xc.Help=ao});var po=S(ho=>{"use strict";var{InvalidArgumentError:zb}=qn(),co=class{constructor(e,n){this.flags=e,this.description=n||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=Jb(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let n=e;return typeof e=="string"&&(n={[e]:!0}),this.implied=Object.assign(this.implied||{},n),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:n.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new zb(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(n,r):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Yb(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},uo=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,n){let r=n.attributeName();if(!this.dualOptions.has(r))return!0;let s=this.negativeOptions.get(r).presetArg,i=s!==void 0?s:!1;return n.negate===(i===e)}};function Yb(t){return t.split("-").reduce((e,n)=>e+n[0].toUpperCase()+n.slice(1))}function Jb(t){let e,n,r=t.split(/[ |,]+/);return r.length>1&&!/^[[<]/.test(r[1])&&(e=r.shift()),n=r.shift(),!e&&/^-[^-]$/.test(n)&&(e=n,n=void 0),{shortFlag:e,longFlag:n}}ho.Option=co;ho.DualOptions=uo});var Qc=S(Zc=>{"use strict";function Xb(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let n=[];for(let r=0;r<=t.length;r++)n[r]=[r];for(let r=0;r<=e.length;r++)n[0][r]=r;for(let r=1;r<=e.length;r++)for(let s=1;s<=t.length;s++){let i=1;t[s-1]===e[r-1]?i=0:i=1,n[s][r]=Math.min(n[s-1][r]+1,n[s][r-1]+1,n[s-1][r-1]+i),s>1&&r>1&&t[s-1]===e[r-2]&&t[s-2]===e[r-1]&&(n[s][r]=Math.min(n[s][r],n[s-2][r-2]+1))}return n[t.length][e.length]}function Zb(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let n=t.startsWith("--");n&&(t=t.slice(2),e=e.map(o=>o.slice(2)));let r=[],s=3,i=.4;return e.forEach(o=>{if(o.length<=1)return;let a=Xb(t,o),l=Math.max(t.length,o.length);(l-a)/l>i&&(a<s?(s=a,r=[o]):a===s&&r.push(o))}),r.sort((o,a)=>o.localeCompare(a)),n&&(r=r.map(o=>`--${o}`)),r.length>1?`
11
+ `)}};tu.Help=lo});var fo=S(po=>{"use strict";var{InvalidArgumentError:Xb}=Wn(),uo=class{constructor(e,n){this.flags=e,this.description=n||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=Qb(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let n=e;return typeof e=="string"&&(n={[e]:!0}),this.implied=Object.assign(this.implied||{},n),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:n.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new Xb(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(n,r):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Zb(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ho=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,n){let r=n.attributeName();if(!this.dualOptions.has(r))return!0;let s=this.negativeOptions.get(r).presetArg,i=s!==void 0?s:!1;return n.negate===(i===e)}};function Zb(t){return t.split("-").reduce((e,n)=>e+n[0].toUpperCase()+n.slice(1))}function Qb(t){let e,n,r=t.split(/[ |,]+/);return r.length>1&&!/^[[<]/.test(r[1])&&(e=r.shift()),n=r.shift(),!e&&/^-[^-]$/.test(n)&&(e=n,n=void 0),{shortFlag:e,longFlag:n}}po.Option=uo;po.DualOptions=ho});var ru=S(nu=>{"use strict";function ey(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let n=[];for(let r=0;r<=t.length;r++)n[r]=[r];for(let r=0;r<=e.length;r++)n[0][r]=r;for(let r=1;r<=e.length;r++)for(let s=1;s<=t.length;s++){let i=1;t[s-1]===e[r-1]?i=0:i=1,n[s][r]=Math.min(n[s-1][r]+1,n[s][r-1]+1,n[s-1][r-1]+i),s>1&&r>1&&t[s-1]===e[r-2]&&t[s-2]===e[r-1]&&(n[s][r]=Math.min(n[s][r],n[s-2][r-2]+1))}return n[t.length][e.length]}function ty(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let n=t.startsWith("--");n&&(t=t.slice(2),e=e.map(o=>o.slice(2)));let r=[],s=3,i=.4;return e.forEach(o=>{if(o.length<=1)return;let a=ey(t,o),l=Math.max(t.length,o.length);(l-a)/l>i&&(a<s?(s=a,r=[o]):a===s&&r.push(o))}),r.sort((o,a)=>o.localeCompare(a)),n&&(r=r.map(o=>`--${o}`)),r.length>1?`
12
12
  (Did you mean one of ${r.join(", ")}?)`:r.length===1?`
13
- (Did you mean ${r[0]}?)`:""}Zc.suggestSimilar=Zb});var su=S(ru=>{"use strict";var Qb=require("node:events").EventEmitter,fo=require("node:child_process"),Xe=require("node:path"),mo=require("node:fs"),B=require("node:process"),{Argument:ey,humanReadableArgName:ty}=Zr(),{CommanderError:go}=qn(),{Help:ny}=lo(),{Option:eu,DualOptions:ry}=po(),{suggestSimilar:tu}=Qc(),_o=class t extends Qb{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:n=>B.stdout.write(n),writeErr:n=>B.stderr.write(n),getOutHelpWidth:()=>B.stdout.isTTY?B.stdout.columns:void 0,getErrHelpWidth:()=>B.stderr.isTTY?B.stderr.columns:void 0,outputError:(n,r)=>r(n)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let n=this;n;n=n.parent)e.push(n);return e}command(e,n,r){let s=n,i=r;typeof s=="object"&&s!==null&&(i=s,s=null),i=i||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return s&&(l.description(s),l._executableHandler=!0),i.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(i.noHelp||i.hidden),l._executableFile=i.executableFile||null,a&&l.arguments(a),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),s?this:l}createCommand(e){return new t(e)}createHelp(){return Object.assign(new ny,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,n){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
14
- - specify the name in Command constructor or using .name()`);return n=n||{},n.isDefault&&(this._defaultCommandName=e._name),(n.noHelp||n.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,n){return new ey(e,n)}argument(e,n,r,s){let i=this.createArgument(e,n);return typeof r=="function"?i.default(s).argParser(r):i.default(r),this.addArgument(i),this}arguments(e){return e.trim().split(/ +/).forEach(n=>{this.argument(n)}),this}addArgument(e){let n=this.registeredArguments.slice(-1)[0];if(n&&n.variadic)throw new Error(`only the last argument can be variadic '${n.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,n){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,r,s]=e.match(/([^ ]+) *(.*)/),i=n??"display help for command",o=this.createCommand(r);return o.helpOption(!1),s&&o.arguments(s),i&&o.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,n){return typeof e!="object"?(this.helpCommand(e,n),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,n){let r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
15
- Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(n):this._lifeCycleHooks[e]=[n],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(e,n,r){this._exitCallback&&this._exitCallback(new go(e,n,r)),B.exit(e)}action(e){let n=r=>{let s=this.registeredArguments.length,i=r.slice(0,s);return this._storeOptionsAsProperties?i[s]=this:i[s]=this.opts(),i.push(this),e.apply(this,i)};return this._actionHandler=n,this}createOption(e,n){return new eu(e,n)}_callParseArg(e,n,r,s){try{return e.parseArg(n,r)}catch(i){if(i.code==="commander.invalidArgument"){let o=`${s} ${i.message}`;this.error(o,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(e){let n=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(n){let r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'
16
- - already used by option '${n.flags}'`)}this.options.push(e)}_registerCommand(e){let n=s=>[s.name()].concat(s.aliases()),r=n(e).find(s=>this._findCommand(s));if(r){let s=n(this._findCommand(r)).join("|"),i=n(e).join("|");throw new Error(`cannot add command '${i}' as already have command '${s}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let n=e.name(),r=e.attributeName();if(e.negate){let i=e.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let s=(i,o,a)=>{i==null&&e.presetArg!==void 0&&(i=e.presetArg);let l=this.getOptionValue(r);i!==null&&e.parseArg?i=this._callParseArg(e,i,l,o):i!==null&&e.variadic&&(i=e._concatValue(i,l)),i==null&&(e.negate?i=!1:e.isBoolean()||e.optional?i=!0:i=""),this.setOptionValueWithSource(r,i,a)};return this.on("option:"+n,i=>{let o=`error: option '${e.flags}' argument '${i}' is invalid.`;s(i,o,"cli")}),e.envVar&&this.on("optionEnv:"+n,i=>{let o=`error: option '${e.flags}' value '${i}' from env '${e.envVar}' is invalid.`;s(i,o,"env")}),this}_optionEx(e,n,r,s,i){if(typeof n=="object"&&n instanceof eu)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(n,r);if(o.makeOptionMandatory(!!e.mandatory),typeof s=="function")o.default(i).argParser(s);else if(s instanceof RegExp){let a=s;s=(l,d)=>{let u=a.exec(l);return u?u[0]:d},o.default(i).argParser(s)}else o.default(s);return this.addOption(o)}option(e,n,r,s){return this._optionEx({},e,n,r,s)}requiredOption(e,n,r,s){return this._optionEx({mandatory:!0},e,n,r,s)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,n){return this.setOptionValueWithSource(e,n,void 0)}setOptionValueWithSource(e,n,r){return this._storeOptionsAsProperties?this[e]=n:this._optionValues[e]=n,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let n;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(n=r.getOptionValueSource(e))}),n}_prepareUserArgs(e,n){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(n=n||{},e===void 0&&n.from===void 0){B.versions?.electron&&(n.from="electron");let s=B.execArgv??[];(s.includes("-e")||s.includes("--eval")||s.includes("-p")||s.includes("--print"))&&(n.from="eval")}e===void 0&&(e=B.argv),this.rawArgs=e.slice();let r;switch(n.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":B.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${n.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,n){let r=this._prepareUserArgs(e,n);return this._parseCommand([],r),this}async parseAsync(e,n){let r=this._prepareUserArgs(e,n);return await this._parseCommand([],r),this}_executeSubCommand(e,n){n=n.slice();let r=!1,s=[".js",".ts",".tsx",".mjs",".cjs"];function i(u,c){let h=Xe.resolve(u,c);if(mo.existsSync(h))return h;if(s.includes(Xe.extname(c)))return;let f=s.find(v=>mo.existsSync(`${h}${v}`));if(f)return`${h}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=mo.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=Xe.resolve(Xe.dirname(u),a)}if(a){let u=i(a,o);if(!u&&!e._executableFile&&this._scriptPath){let c=Xe.basename(this._scriptPath,Xe.extname(this._scriptPath));c!==this._name&&(u=i(a,`${c}-${e._name}`))}o=u||o}r=s.includes(Xe.extname(o));let l;B.platform!=="win32"?r?(n.unshift(o),n=nu(B.execArgv).concat(n),l=fo.spawn(B.argv[0],n,{stdio:"inherit"})):l=fo.spawn(o,n,{stdio:"inherit"}):(n.unshift(o),n=nu(B.execArgv).concat(n),l=fo.spawn(B.execPath,n,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{B.on(c,()=>{l.killed===!1&&l.exitCode===null&&l.kill(c)})});let d=this._exitCallback;l.on("close",u=>{u=u??1,d?d(new go(u,"commander.executeSubCommandAsync","(close)")):B.exit(u)}),l.on("error",u=>{if(u.code==="ENOENT"){let c=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",h=`'${o}' does not exist
13
+ (Did you mean ${r[0]}?)`:""}nu.suggestSimilar=ty});var lu=S(au=>{"use strict";var ny=require("node:events").EventEmitter,mo=require("node:child_process"),tt=require("node:path"),go=require("node:fs"),K=require("node:process"),{Argument:ry,humanReadableArgName:sy}=ns(),{CommanderError:_o}=Wn(),{Help:iy}=co(),{Option:su,DualOptions:oy}=fo(),{suggestSimilar:iu}=ru(),vo=class t extends ny{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:n=>K.stdout.write(n),writeErr:n=>K.stderr.write(n),getOutHelpWidth:()=>K.stdout.isTTY?K.stdout.columns:void 0,getErrHelpWidth:()=>K.stderr.isTTY?K.stderr.columns:void 0,outputError:(n,r)=>r(n)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let n=this;n;n=n.parent)e.push(n);return e}command(e,n,r){let s=n,i=r;typeof s=="object"&&s!==null&&(i=s,s=null),i=i||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return s&&(l.description(s),l._executableHandler=!0),i.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(i.noHelp||i.hidden),l._executableFile=i.executableFile||null,a&&l.arguments(a),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),s?this:l}createCommand(e){return new t(e)}createHelp(){return Object.assign(new iy,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,n){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
14
+ - specify the name in Command constructor or using .name()`);return n=n||{},n.isDefault&&(this._defaultCommandName=e._name),(n.noHelp||n.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,n){return new ry(e,n)}argument(e,n,r,s){let i=this.createArgument(e,n);return typeof r=="function"?i.default(s).argParser(r):i.default(r),this.addArgument(i),this}arguments(e){return e.trim().split(/ +/).forEach(n=>{this.argument(n)}),this}addArgument(e){let n=this.registeredArguments.slice(-1)[0];if(n&&n.variadic)throw new Error(`only the last argument can be variadic '${n.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,n){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,r,s]=e.match(/([^ ]+) *(.*)/),i=n??"display help for command",o=this.createCommand(r);return o.helpOption(!1),s&&o.arguments(s),i&&o.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,n){return typeof e!="object"?(this.helpCommand(e,n),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,n){let r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
15
+ Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(n):this._lifeCycleHooks[e]=[n],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(e,n,r){this._exitCallback&&this._exitCallback(new _o(e,n,r)),K.exit(e)}action(e){let n=r=>{let s=this.registeredArguments.length,i=r.slice(0,s);return this._storeOptionsAsProperties?i[s]=this:i[s]=this.opts(),i.push(this),e.apply(this,i)};return this._actionHandler=n,this}createOption(e,n){return new su(e,n)}_callParseArg(e,n,r,s){try{return e.parseArg(n,r)}catch(i){if(i.code==="commander.invalidArgument"){let o=`${s} ${i.message}`;this.error(o,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(e){let n=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(n){let r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'
16
+ - already used by option '${n.flags}'`)}this.options.push(e)}_registerCommand(e){let n=s=>[s.name()].concat(s.aliases()),r=n(e).find(s=>this._findCommand(s));if(r){let s=n(this._findCommand(r)).join("|"),i=n(e).join("|");throw new Error(`cannot add command '${i}' as already have command '${s}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let n=e.name(),r=e.attributeName();if(e.negate){let i=e.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let s=(i,o,a)=>{i==null&&e.presetArg!==void 0&&(i=e.presetArg);let l=this.getOptionValue(r);i!==null&&e.parseArg?i=this._callParseArg(e,i,l,o):i!==null&&e.variadic&&(i=e._concatValue(i,l)),i==null&&(e.negate?i=!1:e.isBoolean()||e.optional?i=!0:i=""),this.setOptionValueWithSource(r,i,a)};return this.on("option:"+n,i=>{let o=`error: option '${e.flags}' argument '${i}' is invalid.`;s(i,o,"cli")}),e.envVar&&this.on("optionEnv:"+n,i=>{let o=`error: option '${e.flags}' value '${i}' from env '${e.envVar}' is invalid.`;s(i,o,"env")}),this}_optionEx(e,n,r,s,i){if(typeof n=="object"&&n instanceof su)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(n,r);if(o.makeOptionMandatory(!!e.mandatory),typeof s=="function")o.default(i).argParser(s);else if(s instanceof RegExp){let a=s;s=(l,d)=>{let u=a.exec(l);return u?u[0]:d},o.default(i).argParser(s)}else o.default(s);return this.addOption(o)}option(e,n,r,s){return this._optionEx({},e,n,r,s)}requiredOption(e,n,r,s){return this._optionEx({mandatory:!0},e,n,r,s)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,n){return this.setOptionValueWithSource(e,n,void 0)}setOptionValueWithSource(e,n,r){return this._storeOptionsAsProperties?this[e]=n:this._optionValues[e]=n,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let n;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(n=r.getOptionValueSource(e))}),n}_prepareUserArgs(e,n){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(n=n||{},e===void 0&&n.from===void 0){K.versions?.electron&&(n.from="electron");let s=K.execArgv??[];(s.includes("-e")||s.includes("--eval")||s.includes("-p")||s.includes("--print"))&&(n.from="eval")}e===void 0&&(e=K.argv),this.rawArgs=e.slice();let r;switch(n.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":K.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${n.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,n){let r=this._prepareUserArgs(e,n);return this._parseCommand([],r),this}async parseAsync(e,n){let r=this._prepareUserArgs(e,n);return await this._parseCommand([],r),this}_executeSubCommand(e,n){n=n.slice();let r=!1,s=[".js",".ts",".tsx",".mjs",".cjs"];function i(u,c){let h=tt.resolve(u,c);if(go.existsSync(h))return h;if(s.includes(tt.extname(c)))return;let f=s.find(v=>go.existsSync(`${h}${v}`));if(f)return`${h}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=go.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=tt.resolve(tt.dirname(u),a)}if(a){let u=i(a,o);if(!u&&!e._executableFile&&this._scriptPath){let c=tt.basename(this._scriptPath,tt.extname(this._scriptPath));c!==this._name&&(u=i(a,`${c}-${e._name}`))}o=u||o}r=s.includes(tt.extname(o));let l;K.platform!=="win32"?r?(n.unshift(o),n=ou(K.execArgv).concat(n),l=mo.spawn(K.argv[0],n,{stdio:"inherit"})):l=mo.spawn(o,n,{stdio:"inherit"}):(n.unshift(o),n=ou(K.execArgv).concat(n),l=mo.spawn(K.execPath,n,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{K.on(c,()=>{l.killed===!1&&l.exitCode===null&&l.kill(c)})});let d=this._exitCallback;l.on("close",u=>{u=u??1,d?d(new _o(u,"commander.executeSubCommandAsync","(close)")):K.exit(u)}),l.on("error",u=>{if(u.code==="ENOENT"){let c=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",h=`'${o}' does not exist
17
17
  - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
18
18
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
19
- - ${c}`;throw new Error(h)}else if(u.code==="EACCES")throw new Error(`'${o}' not executable`);if(!d)B.exit(1);else{let c=new go(1,"commander.executeSubCommandAsync","(error)");c.nestedError=u,d(c)}}),this.runningCommand=l}_dispatchSubcommand(e,n,r){let s=this._findCommand(e);s||this.help({error:!0});let i;return i=this._chainOrCallSubCommandHook(i,s,"preSubcommand"),i=this._chainOrCall(i,()=>{if(s._executableHandler)this._executeSubCommand(s,n.concat(r));else return s._parseCommand(n,r)}),i}_dispatchHelpCommand(e){e||this.help();let n=this._findCommand(e);return n&&!n._executableHandler&&n.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,n)=>{e.required&&this.args[n]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,s,i)=>{let o=s;if(s!==null&&r.parseArg){let a=`error: command-argument value '${s}' is invalid for argument '${r.name()}'.`;o=this._callParseArg(r,s,i,a)}return o};this._checkNumberOfArguments();let n=[];this.registeredArguments.forEach((r,s)=>{let i=r.defaultValue;r.variadic?s<this.args.length?(i=this.args.slice(s),r.parseArg&&(i=i.reduce((o,a)=>e(r,a,o),r.defaultValue))):i===void 0&&(i=[]):s<this.args.length&&(i=this.args[s],r.parseArg&&(i=e(r,i,r.defaultValue))),n[s]=i}),this.processedArgs=n}_chainOrCall(e,n){return e&&e.then&&typeof e.then=="function"?e.then(()=>n()):n()}_chainOrCallHooks(e,n){let r=e,s=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[n]!==void 0).forEach(i=>{i._lifeCycleHooks[n].forEach(o=>{s.push({hookedCommand:i,callback:o})})}),n==="postAction"&&s.reverse(),s.forEach(i=>{r=this._chainOrCall(r,()=>i.callback(i.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,n,r){let s=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(i=>{s=this._chainOrCall(s,()=>i(this,n))}),s}_parseCommand(e,n){let r=this.parseOptions(n);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),n=r.unknown,this.args=e.concat(n),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),n);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(n),this._dispatchSubcommand(this._defaultCommandName,e,n);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){s(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(i,e,n)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(i))s(),this._processArguments(),this.parent.emit(i,e,n);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,n);this.listenerCount("command:*")?this.emit("command:*",e,n):this.commands.length?this.unknownCommand():(s(),this._processArguments())}else this.commands.length?(s(),this.help({error:!0})):(s(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(n=>n._name===e||n._aliases.includes(e))}_findOption(e){return this.options.find(n=>n.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(n=>{n.mandatory&&e.getOptionValue(n.attributeName())===void 0&&e.missingMandatoryOptionValue(n)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(r=>{let s=r.attributeName();return this.getOptionValue(s)===void 0?!1:this.getOptionValueSource(s)!=="default"});e.filter(r=>r.conflictsWith.length>0).forEach(r=>{let s=e.find(i=>r.conflictsWith.includes(i.attributeName()));s&&this._conflictingOption(r,s)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let n=[],r=[],s=n,i=e.slice();function o(l){return l.length>1&&l[0]==="-"}let a=null;for(;i.length;){let l=i.shift();if(l==="--"){s===r&&s.push(l),s.push(...i);break}if(a&&!o(l)){this.emit(`option:${a.name()}`,l);continue}if(a=null,o(l)){let d=this._findOption(l);if(d){if(d.required){let u=i.shift();u===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,u)}else if(d.optional){let u=null;i.length>0&&!o(i[0])&&(u=i.shift()),this.emit(`option:${d.name()}`,u)}else this.emit(`option:${d.name()}`);a=d.variadic?d:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let d=this._findOption(`-${l[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,l.slice(2)):(this.emit(`option:${d.name()}`),i.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let d=l.indexOf("="),u=this._findOption(l.slice(0,d));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,l.slice(d+1));continue}}if(o(l)&&(s=r),(this._enablePositionalOptions||this._passThroughOptions)&&n.length===0&&r.length===0){if(this._findCommand(l)){n.push(l),i.length>0&&r.push(...i);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){n.push(l),i.length>0&&n.push(...i);break}else if(this._defaultCommandName){r.push(l),i.length>0&&r.push(...i);break}}if(this._passThroughOptions){s.push(l),i.length>0&&s.push(...i);break}s.push(l)}return{operands:n,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},n=this.options.length;for(let r=0;r<n;r++){let s=this.options[r].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,n)=>Object.assign(e,n.opts()),{})}error(e,n){this._outputConfiguration.outputError(`${e}
19
+ - ${c}`;throw new Error(h)}else if(u.code==="EACCES")throw new Error(`'${o}' not executable`);if(!d)K.exit(1);else{let c=new _o(1,"commander.executeSubCommandAsync","(error)");c.nestedError=u,d(c)}}),this.runningCommand=l}_dispatchSubcommand(e,n,r){let s=this._findCommand(e);s||this.help({error:!0});let i;return i=this._chainOrCallSubCommandHook(i,s,"preSubcommand"),i=this._chainOrCall(i,()=>{if(s._executableHandler)this._executeSubCommand(s,n.concat(r));else return s._parseCommand(n,r)}),i}_dispatchHelpCommand(e){e||this.help();let n=this._findCommand(e);return n&&!n._executableHandler&&n.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,n)=>{e.required&&this.args[n]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,s,i)=>{let o=s;if(s!==null&&r.parseArg){let a=`error: command-argument value '${s}' is invalid for argument '${r.name()}'.`;o=this._callParseArg(r,s,i,a)}return o};this._checkNumberOfArguments();let n=[];this.registeredArguments.forEach((r,s)=>{let i=r.defaultValue;r.variadic?s<this.args.length?(i=this.args.slice(s),r.parseArg&&(i=i.reduce((o,a)=>e(r,a,o),r.defaultValue))):i===void 0&&(i=[]):s<this.args.length&&(i=this.args[s],r.parseArg&&(i=e(r,i,r.defaultValue))),n[s]=i}),this.processedArgs=n}_chainOrCall(e,n){return e&&e.then&&typeof e.then=="function"?e.then(()=>n()):n()}_chainOrCallHooks(e,n){let r=e,s=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[n]!==void 0).forEach(i=>{i._lifeCycleHooks[n].forEach(o=>{s.push({hookedCommand:i,callback:o})})}),n==="postAction"&&s.reverse(),s.forEach(i=>{r=this._chainOrCall(r,()=>i.callback(i.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,n,r){let s=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(i=>{s=this._chainOrCall(s,()=>i(this,n))}),s}_parseCommand(e,n){let r=this.parseOptions(n);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),n=r.unknown,this.args=e.concat(n),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),n);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(n),this._dispatchSubcommand(this._defaultCommandName,e,n);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){s(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(i,e,n)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(i))s(),this._processArguments(),this.parent.emit(i,e,n);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,n);this.listenerCount("command:*")?this.emit("command:*",e,n):this.commands.length?this.unknownCommand():(s(),this._processArguments())}else this.commands.length?(s(),this.help({error:!0})):(s(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(n=>n._name===e||n._aliases.includes(e))}_findOption(e){return this.options.find(n=>n.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(n=>{n.mandatory&&e.getOptionValue(n.attributeName())===void 0&&e.missingMandatoryOptionValue(n)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(r=>{let s=r.attributeName();return this.getOptionValue(s)===void 0?!1:this.getOptionValueSource(s)!=="default"});e.filter(r=>r.conflictsWith.length>0).forEach(r=>{let s=e.find(i=>r.conflictsWith.includes(i.attributeName()));s&&this._conflictingOption(r,s)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let n=[],r=[],s=n,i=e.slice();function o(l){return l.length>1&&l[0]==="-"}let a=null;for(;i.length;){let l=i.shift();if(l==="--"){s===r&&s.push(l),s.push(...i);break}if(a&&!o(l)){this.emit(`option:${a.name()}`,l);continue}if(a=null,o(l)){let d=this._findOption(l);if(d){if(d.required){let u=i.shift();u===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,u)}else if(d.optional){let u=null;i.length>0&&!o(i[0])&&(u=i.shift()),this.emit(`option:${d.name()}`,u)}else this.emit(`option:${d.name()}`);a=d.variadic?d:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let d=this._findOption(`-${l[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,l.slice(2)):(this.emit(`option:${d.name()}`),i.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let d=l.indexOf("="),u=this._findOption(l.slice(0,d));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,l.slice(d+1));continue}}if(o(l)&&(s=r),(this._enablePositionalOptions||this._passThroughOptions)&&n.length===0&&r.length===0){if(this._findCommand(l)){n.push(l),i.length>0&&r.push(...i);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){n.push(l),i.length>0&&n.push(...i);break}else if(this._defaultCommandName){r.push(l),i.length>0&&r.push(...i);break}}if(this._passThroughOptions){s.push(l),i.length>0&&s.push(...i);break}s.push(l)}return{operands:n,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},n=this.options.length;for(let r=0;r<n;r++){let s=this.options[r].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,n)=>Object.assign(e,n.opts()),{})}error(e,n){this._outputConfiguration.outputError(`${e}
20
20
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
21
21
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
22
- `),this.outputHelp({error:!0}));let r=n||{},s=r.exitCode||1,i=r.code||"commander.error";this._exit(s,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in B.env){let n=e.attributeName();(this.getOptionValue(n)===void 0||["default","config","env"].includes(this.getOptionValueSource(n)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,B.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new ry(this.options),n=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&n(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(s=>!n(s)).forEach(s=>{this.setOptionValueWithSource(s,r.implied[s],"implied")})})}missingArgument(e){let n=`error: missing required argument '${e}'`;this.error(n,{code:"commander.missingArgument"})}optionMissingArgument(e){let n=`error: option '${e.flags}' argument missing`;this.error(n,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let n=`error: required option '${e.flags}' not specified`;this.error(n,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,n){let r=o=>{let a=o.attributeName(),l=this.getOptionValue(a),d=this.options.find(c=>c.negate&&a===c.attributeName()),u=this.options.find(c=>!c.negate&&a===c.attributeName());return d&&(d.presetArg===void 0&&l===!1||d.presetArg!==void 0&&l===d.presetArg)?d:u||o},s=o=>{let a=r(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},i=`error: ${s(e)} cannot be used with ${s(n)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let n="";if(e.startsWith("--")&&this._showSuggestionAfterError){let s=[],i=this;do{let o=i.createHelp().visibleOptions(i).filter(a=>a.long).map(a=>a.long);s=s.concat(o),i=i.parent}while(i&&!i._enablePositionalOptions);n=tu(e,s)}let r=`error: unknown option '${e}'${n}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let n=this.registeredArguments.length,r=n===1?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${n} argument${r} but got ${e.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],n="";if(this._showSuggestionAfterError){let s=[];this.createHelp().visibleCommands(this).forEach(i=>{s.push(i.name()),i.alias()&&s.push(i.alias())}),n=tu(e,s)}let r=`error: unknown command '${e}'${n}`;this.error(r,{code:"commander.unknownCommand"})}version(e,n,r){if(e===void 0)return this._version;this._version=e,n=n||"-V, --version",r=r||"output the version number";let s=this.createOption(n,r);return this._versionOptionName=s.attributeName(),this._registerOption(s),this.on("option:"+s.name(),()=>{this._outputConfiguration.writeOut(`${e}
23
- `),this._exit(0,"commander.version",e)}),this}description(e,n){return e===void 0&&n===void 0?this._description:(this._description=e,n&&(this._argsDescription=n),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),e===n._name)throw new Error("Command alias can't be the same as its name");let r=this.parent?._findCommand(e);if(r){let s=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return n._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(n=>this.alias(n)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(r=>ty(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?n:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=Xe.basename(e,Xe.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let n=this.createHelp();return n.helpWidth===void 0&&(n.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),n.formatHelp(this,n)}_getHelpContext(e){e=e||{};let n={error:!!e.error},r;return n.error?r=s=>this._outputConfiguration.writeErr(s):r=s=>this._outputConfiguration.writeOut(s),n.write=e.write||r,n.command=this,n}outputHelp(e){let n;typeof e=="function"&&(n=e,e=void 0);let r=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(i=>i.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let s=this.helpInformation(r);if(n&&(s=n(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach(i=>i.emit("afterAllHelp",r))}helpOption(e,n){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",n=n??"display help for command",this._helpOption=this.createOption(e,n),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let n=B.exitCode||0;n===0&&e&&typeof e!="function"&&e.error&&(n=1),this._exit(n,"commander.help","(outputHelp)")}addHelpText(e,n){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
22
+ `),this.outputHelp({error:!0}));let r=n||{},s=r.exitCode||1,i=r.code||"commander.error";this._exit(s,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in K.env){let n=e.attributeName();(this.getOptionValue(n)===void 0||["default","config","env"].includes(this.getOptionValueSource(n)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,K.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new oy(this.options),n=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&n(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(s=>!n(s)).forEach(s=>{this.setOptionValueWithSource(s,r.implied[s],"implied")})})}missingArgument(e){let n=`error: missing required argument '${e}'`;this.error(n,{code:"commander.missingArgument"})}optionMissingArgument(e){let n=`error: option '${e.flags}' argument missing`;this.error(n,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let n=`error: required option '${e.flags}' not specified`;this.error(n,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,n){let r=o=>{let a=o.attributeName(),l=this.getOptionValue(a),d=this.options.find(c=>c.negate&&a===c.attributeName()),u=this.options.find(c=>!c.negate&&a===c.attributeName());return d&&(d.presetArg===void 0&&l===!1||d.presetArg!==void 0&&l===d.presetArg)?d:u||o},s=o=>{let a=r(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},i=`error: ${s(e)} cannot be used with ${s(n)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let n="";if(e.startsWith("--")&&this._showSuggestionAfterError){let s=[],i=this;do{let o=i.createHelp().visibleOptions(i).filter(a=>a.long).map(a=>a.long);s=s.concat(o),i=i.parent}while(i&&!i._enablePositionalOptions);n=iu(e,s)}let r=`error: unknown option '${e}'${n}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let n=this.registeredArguments.length,r=n===1?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${n} argument${r} but got ${e.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],n="";if(this._showSuggestionAfterError){let s=[];this.createHelp().visibleCommands(this).forEach(i=>{s.push(i.name()),i.alias()&&s.push(i.alias())}),n=iu(e,s)}let r=`error: unknown command '${e}'${n}`;this.error(r,{code:"commander.unknownCommand"})}version(e,n,r){if(e===void 0)return this._version;this._version=e,n=n||"-V, --version",r=r||"output the version number";let s=this.createOption(n,r);return this._versionOptionName=s.attributeName(),this._registerOption(s),this.on("option:"+s.name(),()=>{this._outputConfiguration.writeOut(`${e}
23
+ `),this._exit(0,"commander.version",e)}),this}description(e,n){return e===void 0&&n===void 0?this._description:(this._description=e,n&&(this._argsDescription=n),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),e===n._name)throw new Error("Command alias can't be the same as its name");let r=this.parent?._findCommand(e);if(r){let s=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return n._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(n=>this.alias(n)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(r=>sy(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?n:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=tt.basename(e,tt.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let n=this.createHelp();return n.helpWidth===void 0&&(n.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),n.formatHelp(this,n)}_getHelpContext(e){e=e||{};let n={error:!!e.error},r;return n.error?r=s=>this._outputConfiguration.writeErr(s):r=s=>this._outputConfiguration.writeOut(s),n.write=e.write||r,n.command=this,n}outputHelp(e){let n;typeof e=="function"&&(n=e,e=void 0);let r=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(i=>i.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let s=this.helpInformation(r);if(n&&(s=n(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach(i=>i.emit("afterAllHelp",r))}helpOption(e,n){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",n=n??"display help for command",this._helpOption=this.createOption(e,n),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let n=K.exitCode||0;n===0&&e&&typeof e!="function"&&e.error&&(n=1),this._exit(n,"commander.help","(outputHelp)")}addHelpText(e,n){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
24
24
  Expecting one of '${r.join("', '")}'`);let s=`${e}Help`;return this.on(s,i=>{let o;typeof n=="function"?o=n({error:i.error,command:i.command}):o=n,o&&i.write(`${o}
25
- `)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(s=>n.is(s))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function nu(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let n,r="127.0.0.1",s="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?n=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=i[1],/^\d+$/.test(i[3])?s=i[3]:r=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=i[1],r=i[3],s=i[4]),n&&s!=="0"?`${n}=${r}:${parseInt(s)+1}`:e})}ru.Command=_o});var lu=S(Ce=>{"use strict";var{Argument:iu}=Zr(),{Command:vo}=su(),{CommanderError:sy,InvalidArgumentError:ou}=qn(),{Help:iy}=lo(),{Option:au}=po();Ce.program=new vo;Ce.createCommand=t=>new vo(t);Ce.createOption=(t,e)=>new au(t,e);Ce.createArgument=(t,e)=>new iu(t,e);Ce.Command=vo;Ce.Option=au;Ce.Argument=iu;Ce.Help=iy;Ce.CommanderError=sy;Ce.InvalidArgumentError=ou;Ce.InvalidOptionArgumentError=ou});var G=S((kE,hu)=>{"use strict";var{FORCE_COLOR:oy,NODE_DISABLE_COLORS:ay,TERM:ly}=process.env,j={enabled:!ay&&ly!=="dumb"&&oy!=="0",reset:V(0,0),bold:V(1,22),dim:V(2,22),italic:V(3,23),underline:V(4,24),inverse:V(7,27),hidden:V(8,28),strikethrough:V(9,29),black:V(30,39),red:V(31,39),green:V(32,39),yellow:V(33,39),blue:V(34,39),magenta:V(35,39),cyan:V(36,39),white:V(37,39),gray:V(90,39),grey:V(90,39),bgBlack:V(40,49),bgRed:V(41,49),bgGreen:V(42,49),bgYellow:V(43,49),bgBlue:V(44,49),bgMagenta:V(45,49),bgCyan:V(46,49),bgWhite:V(47,49)};function du(t,e){let n=0,r,s="",i="";for(;n<t.length;n++)r=t[n],s+=r.open,i+=r.close,e.includes(r.close)&&(e=e.replace(r.rgx,r.close+r.open));return s+e+i}function cy(t,e){let n={has:t,keys:e};return n.reset=j.reset.bind(n),n.bold=j.bold.bind(n),n.dim=j.dim.bind(n),n.italic=j.italic.bind(n),n.underline=j.underline.bind(n),n.inverse=j.inverse.bind(n),n.hidden=j.hidden.bind(n),n.strikethrough=j.strikethrough.bind(n),n.black=j.black.bind(n),n.red=j.red.bind(n),n.green=j.green.bind(n),n.yellow=j.yellow.bind(n),n.blue=j.blue.bind(n),n.magenta=j.magenta.bind(n),n.cyan=j.cyan.bind(n),n.white=j.white.bind(n),n.gray=j.gray.bind(n),n.grey=j.grey.bind(n),n.bgBlack=j.bgBlack.bind(n),n.bgRed=j.bgRed.bind(n),n.bgGreen=j.bgGreen.bind(n),n.bgYellow=j.bgYellow.bind(n),n.bgBlue=j.bgBlue.bind(n),n.bgMagenta=j.bgMagenta.bind(n),n.bgCyan=j.bgCyan.bind(n),n.bgWhite=j.bgWhite.bind(n),n}function V(t,e){let n={open:`\x1B[${t}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(this.has.includes(t)||(this.has.push(t),this.keys.push(n)),r===void 0?this:j.enabled?du(this.keys,r+""):r+""):r===void 0?cy([t],[n]):j.enabled?du([n],r+""):r+""}}hu.exports=j});var fu=S((IE,pu)=>{"use strict";pu.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c"||t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(e){if(t.name==="j")return"down";if(t.name==="k")return"up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":!1}}});var Qr=S((DE,mu)=>{"use strict";mu.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(e,"g");return typeof t=="string"?t.replace(n,""):t}});var W=S((PE,gu)=>{"use strict";var bo="\x1B",U=`${bo}[`,uy="\x07",yo={to(t,e){return e?`${U}${e+1};${t+1}H`:`${U}${t+1}G`},move(t,e){let n="";return t<0?n+=`${U}${-t}D`:t>0&&(n+=`${U}${t}C`),e<0?n+=`${U}${-e}A`:e>0&&(n+=`${U}${e}B`),n},up:(t=1)=>`${U}${t}A`,down:(t=1)=>`${U}${t}B`,forward:(t=1)=>`${U}${t}C`,backward:(t=1)=>`${U}${t}D`,nextLine:(t=1)=>`${U}E`.repeat(t),prevLine:(t=1)=>`${U}F`.repeat(t),left:`${U}G`,hide:`${U}?25l`,show:`${U}?25h`,save:`${bo}7`,restore:`${bo}8`},dy={up:(t=1)=>`${U}S`.repeat(t),down:(t=1)=>`${U}T`.repeat(t)},hy={screen:`${U}2J`,up:(t=1)=>`${U}1J`.repeat(t),down:(t=1)=>`${U}J`.repeat(t),line:`${U}2K`,lineEnd:`${U}K`,lineStart:`${U}1K`,lines(t){let e="";for(let n=0;n<t;n++)e+=this.line+(n<t-1?yo.up():"");return t&&(e+=yo.left),e}};gu.exports={cursor:yo,scroll:dy,erase:hy,beep:uy}});var wu=S((ME,yu)=>{"use strict";function py(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=fy(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(d){throw d},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
26
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,a;return{s:function(){n=n.call(t)},n:function(){var d=n.next();return i=d.done,d},e:function(d){o=!0,a=d},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}}}function fy(t,e){if(t){if(typeof t=="string")return _u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _u(t,e)}}function _u(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var my=Qr(),bu=W(),vu=bu.erase,gy=bu.cursor,_y=t=>[...my(t)].length;yu.exports=function(t,e){if(!e)return vu.line+gy.to(0);let n=0,r=t.split(/\r?\n/);var s=py(r),i;try{for(s.s();!(i=s.n()).done;){let o=i.value;n+=1+Math.floor(Math.max(_y(o)-1,0)/e)}}catch(o){s.e(o)}finally{s.f()}return vu.lines(n)}});var wo=S((jE,Cu)=>{"use strict";var Vn={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},vy={arrowUp:Vn.arrowUp,arrowDown:Vn.arrowDown,arrowLeft:Vn.arrowLeft,arrowRight:Vn.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},by=process.platform==="win32"?vy:Vn;Cu.exports=by});var xu=S((FE,Su)=>{"use strict";var sn=G(),Ft=wo(),Co=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),yy=t=>Co[t]||Co.default,Ln=Object.freeze({aborted:sn.red(Ft.cross),done:sn.green(Ft.tick),exited:sn.yellow(Ft.cross),default:sn.cyan("?")}),wy=(t,e,n)=>e?Ln.aborted:n?Ln.exited:t?Ln.done:Ln.default,Cy=t=>sn.gray(t?Ft.ellipsis:Ft.pointerSmall),Sy=(t,e)=>sn.gray(t?e?Ft.pointerSmall:"+":Ft.line);Su.exports={styles:Co,render:yy,symbols:Ln,symbol:wy,delimiter:Cy,item:Sy}});var Eu=S((qE,Au)=>{"use strict";var xy=Qr();Au.exports=function(t,e){let n=String(xy(t)||"").split(/\r?\n/);return e?n.map(r=>Math.ceil(r.length/e)).reduce((r,s)=>r+s):n.length}});var Tu=S((VE,Ou)=>{"use strict";Ou.exports=(t,e={})=>{let n=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",r=e.width;return(t||"").split(/\r?\n/g).map(s=>s.split(/\s+/g).reduce((i,o)=>(o.length+n.length>=r||i[i.length-1].length+o.length+1<r?i[i.length-1]+=` ${o}`:i.push(`${n}${o}`),i),[n]).join(`
25
+ `)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(s=>n.is(s))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function ou(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let n,r="127.0.0.1",s="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?n=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=i[1],/^\d+$/.test(i[3])?s=i[3]:r=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=i[1],r=i[3],s=i[4]),n&&s!=="0"?`${n}=${r}:${parseInt(s)+1}`:e})}au.Command=vo});var hu=S(Se=>{"use strict";var{Argument:cu}=ns(),{Command:bo}=lu(),{CommanderError:ay,InvalidArgumentError:uu}=Wn(),{Help:ly}=co(),{Option:du}=fo();Se.program=new bo;Se.createCommand=t=>new bo(t);Se.createOption=(t,e)=>new du(t,e);Se.createArgument=(t,e)=>new cu(t,e);Se.Command=bo;Se.Option=du;Se.Argument=cu;Se.Help=ly;Se.CommanderError=ay;Se.InvalidArgumentError=uu;Se.InvalidOptionArgumentError=uu});var G=S((FE,gu)=>{"use strict";var{FORCE_COLOR:cy,NODE_DISABLE_COLORS:uy,TERM:dy}=process.env,j={enabled:!uy&&dy!=="dumb"&&cy!=="0",reset:L(0,0),bold:L(1,22),dim:L(2,22),italic:L(3,23),underline:L(4,24),inverse:L(7,27),hidden:L(8,28),strikethrough:L(9,29),black:L(30,39),red:L(31,39),green:L(32,39),yellow:L(33,39),blue:L(34,39),magenta:L(35,39),cyan:L(36,39),white:L(37,39),gray:L(90,39),grey:L(90,39),bgBlack:L(40,49),bgRed:L(41,49),bgGreen:L(42,49),bgYellow:L(43,49),bgBlue:L(44,49),bgMagenta:L(45,49),bgCyan:L(46,49),bgWhite:L(47,49)};function mu(t,e){let n=0,r,s="",i="";for(;n<t.length;n++)r=t[n],s+=r.open,i+=r.close,e.includes(r.close)&&(e=e.replace(r.rgx,r.close+r.open));return s+e+i}function hy(t,e){let n={has:t,keys:e};return n.reset=j.reset.bind(n),n.bold=j.bold.bind(n),n.dim=j.dim.bind(n),n.italic=j.italic.bind(n),n.underline=j.underline.bind(n),n.inverse=j.inverse.bind(n),n.hidden=j.hidden.bind(n),n.strikethrough=j.strikethrough.bind(n),n.black=j.black.bind(n),n.red=j.red.bind(n),n.green=j.green.bind(n),n.yellow=j.yellow.bind(n),n.blue=j.blue.bind(n),n.magenta=j.magenta.bind(n),n.cyan=j.cyan.bind(n),n.white=j.white.bind(n),n.gray=j.gray.bind(n),n.grey=j.grey.bind(n),n.bgBlack=j.bgBlack.bind(n),n.bgRed=j.bgRed.bind(n),n.bgGreen=j.bgGreen.bind(n),n.bgYellow=j.bgYellow.bind(n),n.bgBlue=j.bgBlue.bind(n),n.bgMagenta=j.bgMagenta.bind(n),n.bgCyan=j.bgCyan.bind(n),n.bgWhite=j.bgWhite.bind(n),n}function L(t,e){let n={open:`\x1B[${t}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(this.has.includes(t)||(this.has.push(t),this.keys.push(n)),r===void 0?this:j.enabled?mu(this.keys,r+""):r+""):r===void 0?hy([t],[n]):j.enabled?mu([n],r+""):r+""}}gu.exports=j});var vu=S((VE,_u)=>{"use strict";_u.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c"||t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(e){if(t.name==="j")return"down";if(t.name==="k")return"up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":!1}}});var rs=S((qE,bu)=>{"use strict";bu.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(e,"g");return typeof t=="string"?t.replace(n,""):t}});var W=S((LE,yu)=>{"use strict";var yo="\x1B",U=`${yo}[`,py="\x07",wo={to(t,e){return e?`${U}${e+1};${t+1}H`:`${U}${t+1}G`},move(t,e){let n="";return t<0?n+=`${U}${-t}D`:t>0&&(n+=`${U}${t}C`),e<0?n+=`${U}${-e}A`:e>0&&(n+=`${U}${e}B`),n},up:(t=1)=>`${U}${t}A`,down:(t=1)=>`${U}${t}B`,forward:(t=1)=>`${U}${t}C`,backward:(t=1)=>`${U}${t}D`,nextLine:(t=1)=>`${U}E`.repeat(t),prevLine:(t=1)=>`${U}F`.repeat(t),left:`${U}G`,hide:`${U}?25l`,show:`${U}?25h`,save:`${yo}7`,restore:`${yo}8`},fy={up:(t=1)=>`${U}S`.repeat(t),down:(t=1)=>`${U}T`.repeat(t)},my={screen:`${U}2J`,up:(t=1)=>`${U}1J`.repeat(t),down:(t=1)=>`${U}J`.repeat(t),line:`${U}2K`,lineEnd:`${U}K`,lineStart:`${U}1K`,lines(t){let e="";for(let n=0;n<t;n++)e+=this.line+(n<t-1?wo.up():"");return t&&(e+=wo.left),e}};yu.exports={cursor:wo,scroll:fy,erase:my,beep:py}});var Au=S((HE,xu)=>{"use strict";function gy(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=_y(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(d){throw d},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
26
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,a;return{s:function(){n=n.call(t)},n:function(){var d=n.next();return i=d.done,d},e:function(d){o=!0,a=d},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}}}function _y(t,e){if(t){if(typeof t=="string")return wu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wu(t,e)}}function wu(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var vy=rs(),Su=W(),Cu=Su.erase,by=Su.cursor,yy=t=>[...vy(t)].length;xu.exports=function(t,e){if(!e)return Cu.line+by.to(0);let n=0,r=t.split(/\r?\n/);var s=gy(r),i;try{for(s.s();!(i=s.n()).done;){let o=i.value;n+=1+Math.floor(Math.max(yy(o)-1,0)/e)}}catch(o){s.e(o)}finally{s.f()}return Cu.lines(n)}});var Co=S((GE,Eu)=>{"use strict";var Bn={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},wy={arrowUp:Bn.arrowUp,arrowDown:Bn.arrowDown,arrowLeft:Bn.arrowLeft,arrowRight:Bn.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},Cy=process.platform==="win32"?wy:Bn;Eu.exports=Cy});var Tu=S((UE,Ou)=>{"use strict";var dn=G(),Ht=Co(),So=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),Sy=t=>So[t]||So.default,zn=Object.freeze({aborted:dn.red(Ht.cross),done:dn.green(Ht.tick),exited:dn.yellow(Ht.cross),default:dn.cyan("?")}),xy=(t,e,n)=>e?zn.aborted:n?zn.exited:t?zn.done:zn.default,Ay=t=>dn.gray(t?Ht.ellipsis:Ht.pointerSmall),Ey=(t,e)=>dn.gray(t?e?Ht.pointerSmall:"+":Ht.line);Ou.exports={styles:So,render:Sy,symbols:zn,symbol:xy,delimiter:Ay,item:Ey}});var Ru=S((WE,$u)=>{"use strict";var Oy=rs();$u.exports=function(t,e){let n=String(Oy(t)||"").split(/\r?\n/);return e?n.map(r=>Math.ceil(r.length/e)).reduce((r,s)=>r+s):n.length}});var ku=S((BE,Nu)=>{"use strict";Nu.exports=(t,e={})=>{let n=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",r=e.width;return(t||"").split(/\r?\n/g).map(s=>s.split(/\s+/g).reduce((i,o)=>(o.length+n.length>=r||i[i.length-1].length+o.length+1<r?i[i.length-1]+=` ${o}`:i.push(`${n}${o}`),i),[n]).join(`
27
27
  `)).join(`
28
- `)}});var Ru=S((LE,$u)=>{"use strict";$u.exports=(t,e,n)=>{n=n||e;let r=Math.min(e-n,t-Math.floor(n/2));r<0&&(r=0);let s=Math.min(r+n,e);return{startIndex:r,endIndex:s}}});var Oe=S((HE,Nu)=>{"use strict";Nu.exports={action:fu(),clear:wu(),style:xu(),strip:Qr(),figures:wo(),lines:Eu(),wrap:Tu(),entriesToDisplay:Ru()}});var Ze=S((GE,Du)=>{"use strict";var ku=require("readline"),Ay=Oe(),Ey=Ay.action,Oy=require("events"),Iu=W(),Ty=Iu.beep,$y=Iu.cursor,Ry=G(),So=class extends Oy{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let n=ku.createInterface({input:this.in,escapeCodeTimeout:50});ku.emitKeypressEvents(this.in,n),this.in.isTTY&&this.in.setRawMode(!0);let r=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,s=(i,o)=>{let a=Ey(o,r);a===!1?this._&&this._(i,o):typeof this[a]=="function"?this[a](o):this.bell()};this.close=()=>{this.out.write($y.show),this.in.removeListener("keypress",s),this.in.isTTY&&this.in.setRawMode(!1),n.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",s)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(Ty)}render(){this.onRender(Ry),this.firstRender&&(this.firstRender=!1)}};Du.exports=So});var qu=S((UE,Fu)=>{"use strict";function Pu(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(d){n(d);return}a.done?e(l):Promise.resolve(l).then(r,s)}function Mu(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){Pu(i,r,s,o,a,"next",l)}function a(l){Pu(i,r,s,o,a,"throw",l)}o(void 0)})}}var es=G(),Ny=Ze(),ju=W(),ky=ju.erase,Hn=ju.cursor,ts=Oe(),xo=ts.style,Ao=ts.clear,Iy=ts.lines,Dy=ts.figures,Eo=class extends Ny{constructor(e={}){super(e),this.transform=xo.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=Ao("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=es.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
29
- `),this.close()}validate(){var e=this;return Mu(function*(){let n=yield e.validator(e.value);typeof n=="string"&&(e.errorMsg=n,n=!1),e.error=!n})()}submit(){var e=this;return Mu(function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error){e.red=!0,e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
30
- `),e.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,n){let r=this.value.slice(0,this.cursor),s=this.value.slice(this.cursor);this.value=`${r}${e}${s}`,this.red=!1,this.cursor=this.placeholder?0:r.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),n=this.value.slice(this.cursor);this.value=`${e}${n}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor+1);this.value=`${e}${n}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Hn.down(Iy(this.outputError,this.out.columns)-1)+Ao(this.outputError,this.out.columns)),this.out.write(Ao(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[xo.symbol(this.done,this.aborted),es.bold(this.msg),xo.delimiter(this.done),this.red?es.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
28
+ `)}});var Du=S((zE,Iu)=>{"use strict";Iu.exports=(t,e,n)=>{n=n||e;let r=Math.min(e-n,t-Math.floor(n/2));r<0&&(r=0);let s=Math.min(r+n,e);return{startIndex:r,endIndex:s}}});var Te=S((KE,Pu)=>{"use strict";Pu.exports={action:vu(),clear:Au(),style:Tu(),strip:rs(),figures:Co(),lines:Ru(),wrap:ku(),entriesToDisplay:Du()}});var nt=S((YE,Fu)=>{"use strict";var Mu=require("readline"),Ty=Te(),$y=Ty.action,Ry=require("events"),ju=W(),Ny=ju.beep,ky=ju.cursor,Iy=G(),xo=class extends Ry{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let n=Mu.createInterface({input:this.in,escapeCodeTimeout:50});Mu.emitKeypressEvents(this.in,n),this.in.isTTY&&this.in.setRawMode(!0);let r=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,s=(i,o)=>{let a=$y(o,r);a===!1?this._&&this._(i,o):typeof this[a]=="function"?this[a](o):this.bell()};this.close=()=>{this.out.write(ky.show),this.in.removeListener("keypress",s),this.in.isTTY&&this.in.setRawMode(!1),n.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",s)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(Ny)}render(){this.onRender(Iy),this.firstRender&&(this.firstRender=!1)}};Fu.exports=xo});var Gu=S((JE,Hu)=>{"use strict";function Vu(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(d){n(d);return}a.done?e(l):Promise.resolve(l).then(r,s)}function qu(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){Vu(i,r,s,o,a,"next",l)}function a(l){Vu(i,r,s,o,a,"throw",l)}o(void 0)})}}var ss=G(),Dy=nt(),Lu=W(),Py=Lu.erase,Kn=Lu.cursor,is=Te(),Ao=is.style,Eo=is.clear,My=is.lines,jy=is.figures,Oo=class extends Dy{constructor(e={}){super(e),this.transform=Ao.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=Eo("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=ss.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
29
+ `),this.close()}validate(){var e=this;return qu(function*(){let n=yield e.validator(e.value);typeof n=="string"&&(e.errorMsg=n,n=!1),e.error=!n})()}submit(){var e=this;return qu(function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error){e.red=!0,e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
30
+ `),e.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,n){let r=this.value.slice(0,this.cursor),s=this.value.slice(this.cursor);this.value=`${r}${e}${s}`,this.red=!1,this.cursor=this.placeholder?0:r.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),n=this.value.slice(this.cursor);this.value=`${e}${n}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor+1);this.value=`${e}${n}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Kn.down(My(this.outputError,this.out.columns)-1)+Eo(this.outputError,this.out.columns)),this.out.write(Eo(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Ao.symbol(this.done,this.aborted),ss.bold(this.msg),Ao.delimiter(this.done),this.red?ss.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
31
31
  `).reduce((e,n,r)=>e+`
32
- ${r?" ":Dy.pointerSmall} ${es.red().italic(n)}`,"")),this.out.write(ky.line+Hn.to(0)+this.outputText+Hn.save+this.outputError+Hn.restore+Hn.move(this.cursorOffset,0)))}};Fu.exports=Eo});var Gu=S((WE,Hu)=>{"use strict";var Qe=G(),Py=Ze(),Gn=Oe(),Vu=Gn.style,Lu=Gn.clear,ns=Gn.figures,My=Gn.wrap,jy=Gn.entriesToDisplay,Fy=W(),qy=Fy.cursor,Oo=class extends Py{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((n,r)=>(typeof n=="string"&&(n={title:n,value:r}),{title:n&&(n.title||n.value||n),value:n&&(n.value===void 0?r:n.value),description:n&&n.description,selected:n&&n.selected,disabled:n&&n.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Lu("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
32
+ ${r?" ":jy.pointerSmall} ${ss.red().italic(n)}`,"")),this.out.write(Py.line+Kn.to(0)+this.outputText+Kn.save+this.outputError+Kn.restore+Kn.move(this.cursorOffset,0)))}};Hu.exports=Oo});var zu=S((XE,Bu)=>{"use strict";var rt=G(),Fy=nt(),Yn=Te(),Uu=Yn.style,Wu=Yn.clear,os=Yn.figures,Vy=Yn.wrap,qy=Yn.entriesToDisplay,Ly=W(),Hy=Ly.cursor,To=class extends Fy{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((n,r)=>(typeof n=="string"&&(n={title:n,value:r}),{title:n&&(n.title||n.value||n),value:n&&(n.value===void 0?r:n.value),description:n&&n.description,selected:n&&n.selected,disabled:n&&n.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Wu("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
33
33
  `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
34
- `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,n){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(qy.hide):this.out.write(Lu(this.outputText,this.out.columns)),super.render();let e=jy(this.cursor,this.choices.length,this.optionsPerPage),n=e.startIndex,r=e.endIndex;if(this.outputText=[Vu.symbol(this.done,this.aborted),Qe.bold(this.msg),Vu.delimiter(!1),this.done?this.selection.title:this.selection.disabled?Qe.yellow(this.warn):Qe.gray(this.hint)].join(" "),!this.done){this.outputText+=`
35
- `;for(let s=n;s<r;s++){let i,o,a="",l=this.choices[s];s===n&&n>0?o=ns.arrowUp:s===r-1&&r<this.choices.length?o=ns.arrowDown:o=" ",l.disabled?(i=this.cursor===s?Qe.gray().underline(l.title):Qe.strikethrough().gray(l.title),o=(this.cursor===s?Qe.bold().gray(ns.pointer)+" ":" ")+o):(i=this.cursor===s?Qe.cyan().underline(l.title):l.title,o=(this.cursor===s?Qe.cyan(ns.pointer)+" ":" ")+o,l.description&&this.cursor===s&&(a=` - ${l.description}`,(o.length+i.length+a.length>=this.out.columns||l.description.split(/\r?\n/).length>1)&&(a=`
36
- `+My(l.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${i}${Qe.gray(a)}
37
- `}}this.out.write(this.outputText)}};Hu.exports=Oo});var Yu=S((KE,zu)=>{"use strict";var rs=G(),Vy=Ze(),Ku=Oe(),Uu=Ku.style,Ly=Ku.clear,Bu=W(),Wu=Bu.cursor,Hy=Bu.erase,To=class extends Vy{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
34
+ `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,n){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(Hy.hide):this.out.write(Wu(this.outputText,this.out.columns)),super.render();let e=qy(this.cursor,this.choices.length,this.optionsPerPage),n=e.startIndex,r=e.endIndex;if(this.outputText=[Uu.symbol(this.done,this.aborted),rt.bold(this.msg),Uu.delimiter(!1),this.done?this.selection.title:this.selection.disabled?rt.yellow(this.warn):rt.gray(this.hint)].join(" "),!this.done){this.outputText+=`
35
+ `;for(let s=n;s<r;s++){let i,o,a="",l=this.choices[s];s===n&&n>0?o=os.arrowUp:s===r-1&&r<this.choices.length?o=os.arrowDown:o=" ",l.disabled?(i=this.cursor===s?rt.gray().underline(l.title):rt.strikethrough().gray(l.title),o=(this.cursor===s?rt.bold().gray(os.pointer)+" ":" ")+o):(i=this.cursor===s?rt.cyan().underline(l.title):l.title,o=(this.cursor===s?rt.cyan(os.pointer)+" ":" ")+o,l.description&&this.cursor===s&&(a=` - ${l.description}`,(o.length+i.length+a.length>=this.out.columns||l.description.split(/\r?\n/).length>1)&&(a=`
36
+ `+Vy(l.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${i}${rt.gray(a)}
37
+ `}}this.out.write(this.outputText)}};Bu.exports=To});var Qu=S((ZE,Zu)=>{"use strict";var as=G(),Gy=nt(),Ju=Te(),Ku=Ju.style,Uy=Ju.clear,Xu=W(),Yu=Xu.cursor,Wy=Xu.erase,$o=class extends Gy{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
38
38
  `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
39
- `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,n){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(Wu.hide):this.out.write(Ly(this.outputText,this.out.columns)),super.render(),this.outputText=[Uu.symbol(this.done,this.aborted),rs.bold(this.msg),Uu.delimiter(this.done),this.value?this.inactive:rs.cyan().underline(this.inactive),rs.gray("/"),this.value?rs.cyan().underline(this.active):this.active].join(" "),this.out.write(Hy.line+Wu.to(0)+this.outputText))}};zu.exports=To});var Ie=S((BE,Ju)=>{"use strict";var $o=class t{constructor({token:e,date:n,parts:r,locales:s}){this.token=e,this.date=n||new Date,this.parts=r||[this],this.locales=s||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((n,r)=>r>e&&n instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),n=e.indexOf(this);return e.find((r,s)=>s>n&&r instanceof t)}toString(){return String(this.date)}};Ju.exports=$o});var Zu=S((zE,Xu)=>{"use strict";var Gy=Ie(),Ro=class extends Gy{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};Xu.exports=Ro});var ed=S((YE,Qu)=>{"use strict";var Uy=Ie(),Wy=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),No=class extends Uy{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+Wy(e):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:e}};Qu.exports=No});var nd=S((JE,td)=>{"use strict";var Ky=Ie(),ko=class extends Ky{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};td.exports=ko});var sd=S((XE,rd)=>{"use strict";var By=Ie(),Io=class extends By{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};rd.exports=Io});var od=S((ZE,id)=>{"use strict";var zy=Ie(),Do=class extends zy{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};id.exports=Do});var ld=S((QE,ad)=>{"use strict";var Yy=Ie(),Po=class extends Yy{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),n=this.token.length;return n===2?String(e+1).padStart(2,"0"):n===3?this.locales.monthsShort[e]:n===4?this.locales.months[e]:String(e+1)}};ad.exports=Po});var ud=S((eO,cd)=>{"use strict";var Jy=Ie(),Mo=class extends Jy{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};cd.exports=Mo});var hd=S((tO,dd)=>{"use strict";var Xy=Ie(),jo=class extends Xy{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};dd.exports=jo});var fd=S((nO,pd)=>{"use strict";pd.exports={DatePart:Ie(),Meridiem:Zu(),Day:ed(),Hours:nd(),Milliseconds:sd(),Minutes:od(),Month:ld(),Seconds:ud(),Year:hd()}});var xd=S((rO,Sd)=>{"use strict";function md(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(d){n(d);return}a.done?e(l):Promise.resolve(l).then(r,s)}function gd(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){md(i,r,s,o,a,"next",l)}function a(l){md(i,r,s,o,a,"throw",l)}o(void 0)})}}var Fo=G(),Zy=Ze(),Vo=Oe(),_d=Vo.style,vd=Vo.clear,Qy=Vo.figures,Cd=W(),ew=Cd.erase,bd=Cd.cursor,et=fd(),yd=et.DatePart,tw=et.Meridiem,nw=et.Day,rw=et.Hours,sw=et.Milliseconds,iw=et.Minutes,ow=et.Month,aw=et.Seconds,lw=et.Year,cw=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,wd={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new nw(t),3:t=>new ow(t),4:t=>new lw(t),5:t=>new tw(t),6:t=>new rw(t),7:t=>new iw(t),8:t=>new aw(t),9:t=>new sw(t)},uw={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},qo=class extends Zy{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(uw,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=vd("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let n;for(this.parts=[];n=cw.exec(e);){let s=n.shift(),i=n.findIndex(o=>o!=null);this.parts.push(i in wd?wd[i]({token:n[i]||s,date:this.date,parts:this.parts,locales:this.locales}):n[i]||s)}let r=this.parts.reduce((s,i)=>(typeof i=="string"&&typeof s[s.length-1]=="string"?s[s.length-1]+=i:s.push(i),s),[]);this.parts.splice(0),this.parts.push(...r),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof yd)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
40
- `),this.close()}validate(){var e=this;return gd(function*(){let n=yield e.validator(e.value);typeof n=="string"&&(e.errorMsg=n,n=!1),e.error=!n})()}submit(){var e=this;return gd(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
41
- `),e.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(n=>n instanceof yd)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(bd.hide):this.out.write(vd(this.outputText,this.out.columns)),super.render(),this.outputText=[_d.symbol(this.done,this.aborted),Fo.bold(this.msg),_d.delimiter(!1),this.parts.reduce((e,n,r)=>e.concat(r===this.cursor&&!this.done?Fo.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
39
+ `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,n){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(Yu.hide):this.out.write(Uy(this.outputText,this.out.columns)),super.render(),this.outputText=[Ku.symbol(this.done,this.aborted),as.bold(this.msg),Ku.delimiter(this.done),this.value?this.inactive:as.cyan().underline(this.inactive),as.gray("/"),this.value?as.cyan().underline(this.active):this.active].join(" "),this.out.write(Wy.line+Yu.to(0)+this.outputText))}};Zu.exports=$o});var De=S((QE,ed)=>{"use strict";var Ro=class t{constructor({token:e,date:n,parts:r,locales:s}){this.token=e,this.date=n||new Date,this.parts=r||[this],this.locales=s||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((n,r)=>r>e&&n instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),n=e.indexOf(this);return e.find((r,s)=>s>n&&r instanceof t)}toString(){return String(this.date)}};ed.exports=Ro});var nd=S((eO,td)=>{"use strict";var By=De(),No=class extends By{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};td.exports=No});var sd=S((tO,rd)=>{"use strict";var zy=De(),Ky=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),ko=class extends zy{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+Ky(e):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:e}};rd.exports=ko});var od=S((nO,id)=>{"use strict";var Yy=De(),Io=class extends Yy{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};id.exports=Io});var ld=S((rO,ad)=>{"use strict";var Jy=De(),Do=class extends Jy{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};ad.exports=Do});var ud=S((sO,cd)=>{"use strict";var Xy=De(),Po=class extends Xy{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};cd.exports=Po});var hd=S((iO,dd)=>{"use strict";var Zy=De(),Mo=class extends Zy{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),n=this.token.length;return n===2?String(e+1).padStart(2,"0"):n===3?this.locales.monthsShort[e]:n===4?this.locales.months[e]:String(e+1)}};dd.exports=Mo});var fd=S((oO,pd)=>{"use strict";var Qy=De(),jo=class extends Qy{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};pd.exports=jo});var gd=S((aO,md)=>{"use strict";var ew=De(),Fo=class extends ew{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};md.exports=Fo});var vd=S((lO,_d)=>{"use strict";_d.exports={DatePart:De(),Meridiem:nd(),Day:sd(),Hours:od(),Milliseconds:ld(),Minutes:ud(),Month:hd(),Seconds:fd(),Year:gd()}});var Td=S((cO,Od)=>{"use strict";function bd(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(d){n(d);return}a.done?e(l):Promise.resolve(l).then(r,s)}function yd(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){bd(i,r,s,o,a,"next",l)}function a(l){bd(i,r,s,o,a,"throw",l)}o(void 0)})}}var Vo=G(),tw=nt(),Lo=Te(),wd=Lo.style,Cd=Lo.clear,nw=Lo.figures,Ed=W(),rw=Ed.erase,Sd=Ed.cursor,st=vd(),xd=st.DatePart,sw=st.Meridiem,iw=st.Day,ow=st.Hours,aw=st.Milliseconds,lw=st.Minutes,cw=st.Month,uw=st.Seconds,dw=st.Year,hw=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,Ad={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new iw(t),3:t=>new cw(t),4:t=>new dw(t),5:t=>new sw(t),6:t=>new ow(t),7:t=>new lw(t),8:t=>new uw(t),9:t=>new aw(t)},pw={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},qo=class extends tw{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(pw,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=Cd("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let n;for(this.parts=[];n=hw.exec(e);){let s=n.shift(),i=n.findIndex(o=>o!=null);this.parts.push(i in Ad?Ad[i]({token:n[i]||s,date:this.date,parts:this.parts,locales:this.locales}):n[i]||s)}let r=this.parts.reduce((s,i)=>(typeof i=="string"&&typeof s[s.length-1]=="string"?s[s.length-1]+=i:s.push(i),s),[]);this.parts.splice(0),this.parts.push(...r),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof xd)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
40
+ `),this.close()}validate(){var e=this;return yd(function*(){let n=yield e.validator(e.value);typeof n=="string"&&(e.errorMsg=n,n=!1),e.error=!n})()}submit(){var e=this;return yd(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
41
+ `),e.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(n=>n instanceof xd)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(Sd.hide):this.out.write(Cd(this.outputText,this.out.columns)),super.render(),this.outputText=[wd.symbol(this.done,this.aborted),Vo.bold(this.msg),wd.delimiter(!1),this.parts.reduce((e,n,r)=>e.concat(r===this.cursor&&!this.done?Vo.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
42
42
  `).reduce((e,n,r)=>e+`
43
- ${r?" ":Qy.pointerSmall} ${Fo.red().italic(n)}`,"")),this.out.write(ew.line+bd.to(0)+this.outputText))}};Sd.exports=qo});var Nd=S((sO,Rd)=>{"use strict";function Ad(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(d){n(d);return}a.done?e(l):Promise.resolve(l).then(r,s)}function Ed(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){Ad(i,r,s,o,a,"next",l)}function a(l){Ad(i,r,s,o,a,"throw",l)}o(void 0)})}}var ss=G(),dw=Ze(),$d=W(),is=$d.cursor,hw=$d.erase,os=Oe(),Lo=os.style,pw=os.figures,Od=os.clear,fw=os.lines,mw=/[0-9]/,Ho=t=>t!==void 0,Td=(t,e)=>{let n=Math.pow(10,e);return Math.round(t*n)/n},Go=class extends dw{constructor(e={}){super(e),this.transform=Lo.render(e.style),this.msg=e.message,this.initial=Ho(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=Ho(e.min)?e.min:-1/0,this.max=Ho(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=ss.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${Td(e,this.round)}`),this._value=Td(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||mw.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
44
- `),this.close()}validate(){var e=this;return Ed(function*(){let n=yield e.validator(e.value);typeof n=="string"&&(e.errorMsg=n,n=!1),e.error=!n})()}submit(){var e=this;return Ed(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}let n=e.value;e.value=n!==""?n:e.initial,e.done=!0,e.aborted=!1,e.error=!1,e.fire(),e.render(),e.out.write(`
45
- `),e.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,n){if(!this.valid(e))return this.bell();let r=Date.now();if(r-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=r,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(is.down(fw(this.outputError,this.out.columns)-1)+Od(this.outputError,this.out.columns)),this.out.write(Od(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Lo.symbol(this.done,this.aborted),ss.bold(this.msg),Lo.delimiter(this.done),!this.done||!this.done&&!this.placeholder?ss[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
43
+ ${r?" ":nw.pointerSmall} ${Vo.red().italic(n)}`,"")),this.out.write(rw.line+Sd.to(0)+this.outputText))}};Od.exports=qo});var Pd=S((uO,Dd)=>{"use strict";function $d(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(d){n(d);return}a.done?e(l):Promise.resolve(l).then(r,s)}function Rd(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){$d(i,r,s,o,a,"next",l)}function a(l){$d(i,r,s,o,a,"throw",l)}o(void 0)})}}var ls=G(),fw=nt(),Id=W(),cs=Id.cursor,mw=Id.erase,us=Te(),Ho=us.style,gw=us.figures,Nd=us.clear,_w=us.lines,vw=/[0-9]/,Go=t=>t!==void 0,kd=(t,e)=>{let n=Math.pow(10,e);return Math.round(t*n)/n},Uo=class extends fw{constructor(e={}){super(e),this.transform=Ho.render(e.style),this.msg=e.message,this.initial=Go(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=Go(e.min)?e.min:-1/0,this.max=Go(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=ls.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${kd(e,this.round)}`),this._value=kd(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||vw.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
44
+ `),this.close()}validate(){var e=this;return Rd(function*(){let n=yield e.validator(e.value);typeof n=="string"&&(e.errorMsg=n,n=!1),e.error=!n})()}submit(){var e=this;return Rd(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}let n=e.value;e.value=n!==""?n:e.initial,e.done=!0,e.aborted=!1,e.error=!1,e.fire(),e.render(),e.out.write(`
45
+ `),e.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,n){if(!this.valid(e))return this.bell();let r=Date.now();if(r-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=r,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(cs.down(_w(this.outputError,this.out.columns)-1)+Nd(this.outputError,this.out.columns)),this.out.write(Nd(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Ho.symbol(this.done,this.aborted),ls.bold(this.msg),Ho.delimiter(this.done),!this.done||!this.done&&!this.placeholder?ls[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
46
46
  `).reduce((e,n,r)=>e+`
47
- ${r?" ":pw.pointerSmall} ${ss.red().italic(n)}`,"")),this.out.write(hw.line+is.to(0)+this.outputText+is.save+this.outputError+is.restore))}};Rd.exports=Go});var Wo=S((iO,Dd)=>{"use strict";var De=G(),gw=W(),_w=gw.cursor,vw=Ze(),Un=Oe(),kd=Un.clear,gt=Un.figures,Id=Un.style,bw=Un.wrap,yw=Un.entriesToDisplay,Uo=class extends vw{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((n,r)=>(typeof n=="string"&&(n={title:n,value:r}),{title:n&&(n.title||n.value||n),description:n&&n.description,value:n&&(n.value===void 0?r:n.value),selected:n&&n.selected,disabled:n&&n.disabled})),this.clear=kd("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
47
+ ${r?" ":gw.pointerSmall} ${ls.red().italic(n)}`,"")),this.out.write(mw.line+cs.to(0)+this.outputText+cs.save+this.outputError+cs.restore))}};Dd.exports=Uo});var Bo=S((dO,Fd)=>{"use strict";var Pe=G(),bw=W(),yw=bw.cursor,ww=nt(),Jn=Te(),Md=Jn.clear,wt=Jn.figures,jd=Jn.style,Cw=Jn.wrap,Sw=Jn.entriesToDisplay,Wo=class extends ww{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((n,r)=>(typeof n=="string"&&(n={title:n,value:r}),{title:n&&(n.title||n.value||n),description:n&&n.description,value:n&&(n.value===void 0?r:n.value),selected:n&&n.selected,disabled:n&&n.disabled})),this.clear=Md("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
48
48
  `),this.close()}submit(){let e=this.value.filter(n=>n.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
49
49
  `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(n=>!n.disabled).forEach(n=>n.selected=e),this.render()}_(e,n){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
50
50
  Instructions:
51
- ${gt.arrowUp}/${gt.arrowDown}: Highlight option
52
- ${gt.arrowLeft}/${gt.arrowRight}/[space]: Toggle selection
51
+ ${wt.arrowUp}/${wt.arrowDown}: Highlight option
52
+ ${wt.arrowLeft}/${wt.arrowRight}/[space]: Toggle selection
53
53
  `+(this.maxChoices===void 0?` a: Toggle all
54
- `:"")+" enter/return: Complete answer":""}renderOption(e,n,r,s){let i=(n.selected?De.green(gt.radioOn):gt.radioOff)+" "+s+" ",o,a;return n.disabled?o=e===r?De.gray().underline(n.title):De.strikethrough().gray(n.title):(o=e===r?De.cyan().underline(n.title):n.title,e===r&&n.description&&(a=` - ${n.description}`,(i.length+o.length+a.length>=this.out.columns||n.description.split(/\r?\n/).length>1)&&(a=`
55
- `+bw(n.description,{margin:i.length,width:this.out.columns})))),i+o+De.gray(a||"")}paginateOptions(e){if(e.length===0)return De.red("No matches for this query.");let n=yw(this.cursor,e.length,this.optionsPerPage),r=n.startIndex,s=n.endIndex,i,o=[];for(let a=r;a<s;a++)a===r&&r>0?i=gt.arrowUp:a===s-1&&s<e.length?i=gt.arrowDown:i=" ",o.push(this.renderOption(this.cursor,e[a],a,i));return`
54
+ `:"")+" enter/return: Complete answer":""}renderOption(e,n,r,s){let i=(n.selected?Pe.green(wt.radioOn):wt.radioOff)+" "+s+" ",o,a;return n.disabled?o=e===r?Pe.gray().underline(n.title):Pe.strikethrough().gray(n.title):(o=e===r?Pe.cyan().underline(n.title):n.title,e===r&&n.description&&(a=` - ${n.description}`,(i.length+o.length+a.length>=this.out.columns||n.description.split(/\r?\n/).length>1)&&(a=`
55
+ `+Cw(n.description,{margin:i.length,width:this.out.columns})))),i+o+Pe.gray(a||"")}paginateOptions(e){if(e.length===0)return Pe.red("No matches for this query.");let n=Sw(this.cursor,e.length,this.optionsPerPage),r=n.startIndex,s=n.endIndex,i,o=[];for(let a=r;a<s;a++)a===r&&r>0?i=wt.arrowUp:a===s-1&&s<e.length?i=wt.arrowDown:i=" ",o.push(this.renderOption(this.cursor,e[a],a,i));return`
56
56
  `+o.join(`
57
- `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let e=[De.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(De.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(_w.hide),super.render();let e=[Id.symbol(this.done,this.aborted),De.bold(this.msg),Id.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=De.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=kd(e,this.out.columns)}};Dd.exports=Uo});var Ld=S((oO,Vd)=>{"use strict";function Pd(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(d){n(d);return}a.done?e(l):Promise.resolve(l).then(r,s)}function ww(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){Pd(i,r,s,o,a,"next",l)}function a(l){Pd(i,r,s,o,a,"throw",l)}o(void 0)})}}var Wn=G(),Cw=Ze(),qd=W(),Sw=qd.erase,Md=qd.cursor,Kn=Oe(),Ko=Kn.style,jd=Kn.clear,Bo=Kn.figures,xw=Kn.wrap,Aw=Kn.entriesToDisplay,Fd=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),Ew=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),Ow=(t,e)=>{let n=t.findIndex(r=>r.value===e||r.title===e);return n>-1?n:void 0},zo=class extends Cw{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:Ow(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=Ko.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=jd("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=Fd(this.suggestions,e):this.value=this.fallback.value,this.fire()}complete(e){var n=this;return ww(function*(){let r=n.completing=n.suggest(n.input,n.choices),s=yield r;if(n.completing!==r)return;n.suggestions=s.map((o,a,l)=>({title:Ew(l,a),value:Fd(l,a),description:o.description})),n.completing=!1;let i=Math.max(s.length-1,0);n.moveSelect(Math.min(i,n.select)),e&&e()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
57
+ `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let e=[Pe.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(Pe.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(yw.hide),super.render();let e=[jd.symbol(this.done,this.aborted),Pe.bold(this.msg),jd.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Pe.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=Md(e,this.out.columns)}};Fd.exports=Wo});var Wd=S((hO,Ud)=>{"use strict";function Vd(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(d){n(d);return}a.done?e(l):Promise.resolve(l).then(r,s)}function xw(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){Vd(i,r,s,o,a,"next",l)}function a(l){Vd(i,r,s,o,a,"throw",l)}o(void 0)})}}var Xn=G(),Aw=nt(),Gd=W(),Ew=Gd.erase,qd=Gd.cursor,Zn=Te(),zo=Zn.style,Ld=Zn.clear,Ko=Zn.figures,Ow=Zn.wrap,Tw=Zn.entriesToDisplay,Hd=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),$w=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),Rw=(t,e)=>{let n=t.findIndex(r=>r.value===e||r.title===e);return n>-1?n:void 0},Yo=class extends Aw{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:Rw(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=zo.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Ld("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=Hd(this.suggestions,e):this.value=this.fallback.value,this.fire()}complete(e){var n=this;return xw(function*(){let r=n.completing=n.suggest(n.input,n.choices),s=yield r;if(n.completing!==r)return;n.suggestions=s.map((o,a,l)=>({title:$w(l,a),value:Hd(l,a),description:o.description})),n.completing=!1;let i=Math.max(s.length-1,0);n.moveSelect(Math.min(i,n.select)),e&&e()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
58
58
  `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
59
59
  `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
60
- `),this.close()}_(e,n){let r=this.input.slice(0,this.cursor),s=this.input.slice(this.cursor);this.input=`${r}${e}${s}`,this.cursor=r.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),n=this.input.slice(this.cursor);this.input=`${e}${n}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor+1);this.input=`${e}${n}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,n,r,s){let i,o=r?Bo.arrowUp:s?Bo.arrowDown:" ",a=n?Wn.cyan().underline(e.title):e.title;return o=(n?Wn.cyan(Bo.pointer)+" ":" ")+o,e.description&&(i=` - ${e.description}`,(o.length+a.length+i.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(i=`
61
- `+xw(e.description,{margin:3,width:this.out.columns}))),o+" "+a+Wn.gray(i||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Md.hide):this.out.write(jd(this.outputText,this.out.columns)),super.render();let e=Aw(this.select,this.choices.length,this.limit),n=e.startIndex,r=e.endIndex;if(this.outputText=[Ko.symbol(this.done,this.aborted,this.exited),Wn.bold(this.msg),Ko.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let s=this.suggestions.slice(n,r).map((i,o)=>this.renderOption(i,this.select===o+n,o===0&&n>0,o+n===r-1&&r<this.choices.length)).join(`
60
+ `),this.close()}_(e,n){let r=this.input.slice(0,this.cursor),s=this.input.slice(this.cursor);this.input=`${r}${e}${s}`,this.cursor=r.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),n=this.input.slice(this.cursor);this.input=`${e}${n}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor+1);this.input=`${e}${n}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,n,r,s){let i,o=r?Ko.arrowUp:s?Ko.arrowDown:" ",a=n?Xn.cyan().underline(e.title):e.title;return o=(n?Xn.cyan(Ko.pointer)+" ":" ")+o,e.description&&(i=` - ${e.description}`,(o.length+a.length+i.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(i=`
61
+ `+Ow(e.description,{margin:3,width:this.out.columns}))),o+" "+a+Xn.gray(i||"")}render(){if(this.closed)return;this.firstRender?this.out.write(qd.hide):this.out.write(Ld(this.outputText,this.out.columns)),super.render();let e=Tw(this.select,this.choices.length,this.limit),n=e.startIndex,r=e.endIndex;if(this.outputText=[zo.symbol(this.done,this.aborted,this.exited),Xn.bold(this.msg),zo.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let s=this.suggestions.slice(n,r).map((i,o)=>this.renderOption(i,this.select===o+n,o===0&&n>0,o+n===r-1&&r<this.choices.length)).join(`
62
62
  `);this.outputText+=`
63
- `+(s||Wn.gray(this.fallback.title))}this.out.write(Sw.line+Md.to(0)+this.outputText)}};Vd.exports=zo});var Wd=S((aO,Ud)=>{"use strict";var tt=G(),Tw=W(),$w=Tw.cursor,Rw=Wo(),Jo=Oe(),Hd=Jo.clear,Gd=Jo.style,on=Jo.figures,Yo=class extends Rw{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=Hd("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(r=>this.inputValue?!!(typeof r.title=="string"&&r.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof r.value=="string"&&r.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let n=this.filteredOptions.findIndex(r=>r===e);this.cursor=n<0?0:n,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,n){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
63
+ `+(s||Xn.gray(this.fallback.title))}this.out.write(Ew.line+qd.to(0)+this.outputText)}};Ud.exports=Yo});var Yd=S((pO,Kd)=>{"use strict";var it=G(),Nw=W(),kw=Nw.cursor,Iw=Bo(),Xo=Te(),Bd=Xo.clear,zd=Xo.style,hn=Xo.figures,Jo=class extends Iw{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=Bd("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(r=>this.inputValue?!!(typeof r.title=="string"&&r.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof r.value=="string"&&r.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let n=this.filteredOptions.findIndex(r=>r===e);this.cursor=n<0?0:n,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,n){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
64
64
  Instructions:
65
- ${on.arrowUp}/${on.arrowDown}: Highlight option
66
- ${on.arrowLeft}/${on.arrowRight}/[space]: Toggle selection
65
+ ${hn.arrowUp}/${hn.arrowDown}: Highlight option
66
+ ${hn.arrowLeft}/${hn.arrowRight}/[space]: Toggle selection
67
67
  [a,b,c]/delete: Filter choices
68
68
  enter/return: Complete answer
69
69
  `:""}renderCurrentInput(){return`
70
- Filtered results for: ${this.inputValue?this.inputValue:tt.gray("Enter something to filter")}
71
- `}renderOption(e,n,r){let s;return n.disabled?s=e===r?tt.gray().underline(n.title):tt.strikethrough().gray(n.title):s=e===r?tt.cyan().underline(n.title):n.title,(n.selected?tt.green(on.radioOn):on.radioOff)+" "+s}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let e=[tt.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(tt.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write($w.hide),super.render();let e=[Gd.symbol(this.done,this.aborted),tt.bold(this.msg),Gd.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=tt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=Hd(e,this.out.columns)}};Ud.exports=Yo});var Zd=S((lO,Xd)=>{"use strict";var Kd=G(),Nw=Ze(),Yd=Oe(),Bd=Yd.style,kw=Yd.clear,Jd=W(),Iw=Jd.erase,zd=Jd.cursor,Xo=class extends Nw{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
70
+ Filtered results for: ${this.inputValue?this.inputValue:it.gray("Enter something to filter")}
71
+ `}renderOption(e,n,r){let s;return n.disabled?s=e===r?it.gray().underline(n.title):it.strikethrough().gray(n.title):s=e===r?it.cyan().underline(n.title):n.title,(n.selected?it.green(hn.radioOn):hn.radioOff)+" "+s}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let e=[it.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(it.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(kw.hide),super.render();let e=[zd.symbol(this.done,this.aborted),it.bold(this.msg),zd.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=it.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=Bd(e,this.out.columns)}};Kd.exports=Jo});var nh=S((fO,th)=>{"use strict";var Jd=G(),Dw=nt(),Qd=Te(),Xd=Qd.style,Pw=Qd.clear,eh=W(),Mw=eh.erase,Zd=eh.cursor,Zo=class extends Dw{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
72
72
  `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
73
- `),this.close()}_(e,n){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(zd.hide):this.out.write(kw(this.outputText,this.out.columns)),super.render(),this.outputText=[Bd.symbol(this.done,this.aborted),Kd.bold(this.msg),Bd.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Kd.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Iw.line+zd.to(0)+this.outputText))}};Xd.exports=Xo});var eh=S((cO,Qd)=>{"use strict";Qd.exports={TextPrompt:qu(),SelectPrompt:Gu(),TogglePrompt:Yu(),DatePrompt:xd(),NumberPrompt:Nd(),MultiselectPrompt:Wo(),AutocompletePrompt:Ld(),AutocompleteMultiselectPrompt:Wd(),ConfirmPrompt:Zd()}});var nh=S(th=>{"use strict";var he=th,Dw=eh(),as=t=>t;function Pe(t,e,n={}){return new Promise((r,s)=>{let i=new Dw[t](e),o=n.onAbort||as,a=n.onSubmit||as,l=n.onExit||as;i.on("state",e.onState||as),i.on("submit",d=>r(a(d))),i.on("exit",d=>r(l(d))),i.on("abort",d=>s(o(d)))})}he.text=t=>Pe("TextPrompt",t);he.password=t=>(t.style="password",he.text(t));he.invisible=t=>(t.style="invisible",he.text(t));he.number=t=>Pe("NumberPrompt",t);he.date=t=>Pe("DatePrompt",t);he.confirm=t=>Pe("ConfirmPrompt",t);he.list=t=>{let e=t.separator||",";return Pe("TextPrompt",t,{onSubmit:n=>n.split(e).map(r=>r.trim())})};he.toggle=t=>Pe("TogglePrompt",t);he.select=t=>Pe("SelectPrompt",t);he.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=n=>n.filter(r=>r.selected).map(r=>r.value);return Pe("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};he.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=n=>n.filter(r=>r.selected).map(r=>r.value);return Pe("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var Pw=(t,e)=>Promise.resolve(e.filter(n=>n.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));he.autocomplete=t=>(t.suggest=t.suggest||Pw,t.choices=[].concat(t.choices||[]),Pe("AutocompletePrompt",t))});var uh=S((dO,ch)=>{"use strict";function rh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function sh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rh(Object(n),!0).forEach(function(r){Mw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rh(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Mw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jw(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Fw(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(d){throw d},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
74
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,a;return{s:function(){n=n.call(t)},n:function(){var d=n.next();return i=d.done,d},e:function(d){o=!0,a=d},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}}}function Fw(t,e){if(t){if(typeof t=="string")return ih(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ih(t,e)}}function ih(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function oh(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(d){n(d);return}a.done?e(l):Promise.resolve(l).then(r,s)}function ah(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){oh(i,r,s,o,a,"next",l)}function a(l){oh(i,r,s,o,a,"throw",l)}o(void 0)})}}var Zo=nh(),qw=["suggest","format","onState","validate","onRender","type"],lh=()=>{};function _t(){return Qo.apply(this,arguments)}function Qo(){return Qo=ah(function*(t=[],{onSubmit:e=lh,onCancel:n=lh}={}){let r={},s=_t._override||{};t=[].concat(t);let i,o,a,l,d,u,c=function(){var _=ah(function*(y,b,w=!1){if(!(!w&&y.validate&&y.validate(b)!==!0))return y.format?yield y.format(b,r):b});return function(b,w){return _.apply(this,arguments)}}();var h=jw(t),f;try{for(h.s();!(f=h.n()).done;){o=f.value;var v=o;if(l=v.name,d=v.type,typeof d=="function"&&(d=yield d(i,sh({},r),o),o.type=d),!!d){for(let _ in o){if(qw.includes(_))continue;let y=o[_];o[_]=typeof y=="function"?yield y(i,sh({},r),u):y}if(u=o,typeof o.message!="string")throw new Error("prompt message is required");var m=o;if(l=m.name,d=m.type,Zo[d]===void 0)throw new Error(`prompt type (${d}) is not defined`);if(s[o.name]!==void 0&&(i=yield c(o,s[o.name]),i!==void 0)){r[l]=i;continue}try{i=_t._injected?Vw(_t._injected,o.initial):yield Zo[d](o),r[l]=i=yield c(o,i,!0),a=yield e(o,i,r)}catch{a=!(yield n(o,r))}if(a)return r}}}catch(_){h.e(_)}finally{h.f()}return r}),Qo.apply(this,arguments)}function Vw(t,e){let n=t.shift();if(n instanceof Error)throw n;return n===void 0?e:n}function Lw(t){_t._injected=(_t._injected||[]).concat(t)}function Hw(t){_t._override=Object.assign({},t)}ch.exports=Object.assign(_t,{prompt:_t,prompts:Zo,inject:Lw,override:Hw})});var hh=S((hO,dh)=>{"use strict";dh.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c"||t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(e){if(t.name==="j")return"down";if(t.name==="k")return"up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":!1}}});var ls=S((pO,ph)=>{"use strict";ph.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(e,"g");return typeof t=="string"?t.replace(n,""):t}});var gh=S((fO,mh)=>{"use strict";var Gw=ls(),{erase:fh,cursor:Uw}=W(),Ww=t=>[...Gw(t)].length;mh.exports=function(t,e){if(!e)return fh.line+Uw.to(0);let n=0,r=t.split(/\r?\n/);for(let s of r)n+=1+Math.floor(Math.max(Ww(s)-1,0)/e);return fh.lines(n)}});var ea=S((mO,_h)=>{"use strict";var Bn={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},Kw={arrowUp:Bn.arrowUp,arrowDown:Bn.arrowDown,arrowLeft:Bn.arrowLeft,arrowRight:Bn.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},Bw=process.platform==="win32"?Kw:Bn;_h.exports=Bw});var bh=S((gO,vh)=>{"use strict";var an=G(),qt=ea(),ta=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),zw=t=>ta[t]||ta.default,zn=Object.freeze({aborted:an.red(qt.cross),done:an.green(qt.tick),exited:an.yellow(qt.cross),default:an.cyan("?")}),Yw=(t,e,n)=>e?zn.aborted:n?zn.exited:t?zn.done:zn.default,Jw=t=>an.gray(t?qt.ellipsis:qt.pointerSmall),Xw=(t,e)=>an.gray(t?e?qt.pointerSmall:"+":qt.line);vh.exports={styles:ta,render:zw,symbols:zn,symbol:Yw,delimiter:Jw,item:Xw}});var wh=S((_O,yh)=>{"use strict";var Zw=ls();yh.exports=function(t,e){let n=String(Zw(t)||"").split(/\r?\n/);return e?n.map(r=>Math.ceil(r.length/e)).reduce((r,s)=>r+s):n.length}});var Sh=S((vO,Ch)=>{"use strict";Ch.exports=(t,e={})=>{let n=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",r=e.width;return(t||"").split(/\r?\n/g).map(s=>s.split(/\s+/g).reduce((i,o)=>(o.length+n.length>=r||i[i.length-1].length+o.length+1<r?i[i.length-1]+=` ${o}`:i.push(`${n}${o}`),i),[n]).join(`
73
+ `),this.close()}_(e,n){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Zd.hide):this.out.write(Pw(this.outputText,this.out.columns)),super.render(),this.outputText=[Xd.symbol(this.done,this.aborted),Jd.bold(this.msg),Xd.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Jd.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Mw.line+Zd.to(0)+this.outputText))}};th.exports=Zo});var sh=S((mO,rh)=>{"use strict";rh.exports={TextPrompt:Gu(),SelectPrompt:zu(),TogglePrompt:Qu(),DatePrompt:Td(),NumberPrompt:Pd(),MultiselectPrompt:Bo(),AutocompletePrompt:Wd(),AutocompleteMultiselectPrompt:Yd(),ConfirmPrompt:nh()}});var oh=S(ih=>{"use strict";var pe=ih,jw=sh(),ds=t=>t;function Me(t,e,n={}){return new Promise((r,s)=>{let i=new jw[t](e),o=n.onAbort||ds,a=n.onSubmit||ds,l=n.onExit||ds;i.on("state",e.onState||ds),i.on("submit",d=>r(a(d))),i.on("exit",d=>r(l(d))),i.on("abort",d=>s(o(d)))})}pe.text=t=>Me("TextPrompt",t);pe.password=t=>(t.style="password",pe.text(t));pe.invisible=t=>(t.style="invisible",pe.text(t));pe.number=t=>Me("NumberPrompt",t);pe.date=t=>Me("DatePrompt",t);pe.confirm=t=>Me("ConfirmPrompt",t);pe.list=t=>{let e=t.separator||",";return Me("TextPrompt",t,{onSubmit:n=>n.split(e).map(r=>r.trim())})};pe.toggle=t=>Me("TogglePrompt",t);pe.select=t=>Me("SelectPrompt",t);pe.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=n=>n.filter(r=>r.selected).map(r=>r.value);return Me("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};pe.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=n=>n.filter(r=>r.selected).map(r=>r.value);return Me("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var Fw=(t,e)=>Promise.resolve(e.filter(n=>n.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));pe.autocomplete=t=>(t.suggest=t.suggest||Fw,t.choices=[].concat(t.choices||[]),Me("AutocompletePrompt",t))});var fh=S((_O,ph)=>{"use strict";function ah(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function lh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ah(Object(n),!0).forEach(function(r){Vw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ah(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Vw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qw(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Lw(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(d){throw d},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
74
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,a;return{s:function(){n=n.call(t)},n:function(){var d=n.next();return i=d.done,d},e:function(d){o=!0,a=d},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}}}function Lw(t,e){if(t){if(typeof t=="string")return ch(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ch(t,e)}}function ch(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function uh(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(d){n(d);return}a.done?e(l):Promise.resolve(l).then(r,s)}function dh(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){uh(i,r,s,o,a,"next",l)}function a(l){uh(i,r,s,o,a,"throw",l)}o(void 0)})}}var Qo=oh(),Hw=["suggest","format","onState","validate","onRender","type"],hh=()=>{};function Ct(){return ea.apply(this,arguments)}function ea(){return ea=dh(function*(t=[],{onSubmit:e=hh,onCancel:n=hh}={}){let r={},s=Ct._override||{};t=[].concat(t);let i,o,a,l,d,u,c=function(){var _=dh(function*(y,b,w=!1){if(!(!w&&y.validate&&y.validate(b)!==!0))return y.format?yield y.format(b,r):b});return function(b,w){return _.apply(this,arguments)}}();var h=qw(t),f;try{for(h.s();!(f=h.n()).done;){o=f.value;var v=o;if(l=v.name,d=v.type,typeof d=="function"&&(d=yield d(i,lh({},r),o),o.type=d),!!d){for(let _ in o){if(Hw.includes(_))continue;let y=o[_];o[_]=typeof y=="function"?yield y(i,lh({},r),u):y}if(u=o,typeof o.message!="string")throw new Error("prompt message is required");var m=o;if(l=m.name,d=m.type,Qo[d]===void 0)throw new Error(`prompt type (${d}) is not defined`);if(s[o.name]!==void 0&&(i=yield c(o,s[o.name]),i!==void 0)){r[l]=i;continue}try{i=Ct._injected?Gw(Ct._injected,o.initial):yield Qo[d](o),r[l]=i=yield c(o,i,!0),a=yield e(o,i,r)}catch{a=!(yield n(o,r))}if(a)return r}}}catch(_){h.e(_)}finally{h.f()}return r}),ea.apply(this,arguments)}function Gw(t,e){let n=t.shift();if(n instanceof Error)throw n;return n===void 0?e:n}function Uw(t){Ct._injected=(Ct._injected||[]).concat(t)}function Ww(t){Ct._override=Object.assign({},t)}ph.exports=Object.assign(Ct,{prompt:Ct,prompts:Qo,inject:Uw,override:Ww})});var gh=S((vO,mh)=>{"use strict";mh.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c"||t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(e){if(t.name==="j")return"down";if(t.name==="k")return"up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":!1}}});var hs=S((bO,_h)=>{"use strict";_h.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(e,"g");return typeof t=="string"?t.replace(n,""):t}});var yh=S((yO,bh)=>{"use strict";var Bw=hs(),{erase:vh,cursor:zw}=W(),Kw=t=>[...Bw(t)].length;bh.exports=function(t,e){if(!e)return vh.line+zw.to(0);let n=0,r=t.split(/\r?\n/);for(let s of r)n+=1+Math.floor(Math.max(Kw(s)-1,0)/e);return vh.lines(n)}});var ta=S((wO,wh)=>{"use strict";var Qn={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},Yw={arrowUp:Qn.arrowUp,arrowDown:Qn.arrowDown,arrowLeft:Qn.arrowLeft,arrowRight:Qn.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},Jw=process.platform==="win32"?Yw:Qn;wh.exports=Jw});var Sh=S((CO,Ch)=>{"use strict";var pn=G(),Gt=ta(),na=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),Xw=t=>na[t]||na.default,er=Object.freeze({aborted:pn.red(Gt.cross),done:pn.green(Gt.tick),exited:pn.yellow(Gt.cross),default:pn.cyan("?")}),Zw=(t,e,n)=>e?er.aborted:n?er.exited:t?er.done:er.default,Qw=t=>pn.gray(t?Gt.ellipsis:Gt.pointerSmall),eC=(t,e)=>pn.gray(t?e?Gt.pointerSmall:"+":Gt.line);Ch.exports={styles:na,render:Xw,symbols:er,symbol:Zw,delimiter:Qw,item:eC}});var Ah=S((SO,xh)=>{"use strict";var tC=hs();xh.exports=function(t,e){let n=String(tC(t)||"").split(/\r?\n/);return e?n.map(r=>Math.ceil(r.length/e)).reduce((r,s)=>r+s):n.length}});var Oh=S((xO,Eh)=>{"use strict";Eh.exports=(t,e={})=>{let n=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",r=e.width;return(t||"").split(/\r?\n/g).map(s=>s.split(/\s+/g).reduce((i,o)=>(o.length+n.length>=r||i[i.length-1].length+o.length+1<r?i[i.length-1]+=` ${o}`:i.push(`${n}${o}`),i),[n]).join(`
75
75
  `)).join(`
76
- `)}});var Ah=S((bO,xh)=>{"use strict";xh.exports=(t,e,n)=>{n=n||e;let r=Math.min(e-n,t-Math.floor(n/2));r<0&&(r=0);let s=Math.min(r+n,e);return{startIndex:r,endIndex:s}}});var Te=S((yO,Eh)=>{"use strict";Eh.exports={action:hh(),clear:gh(),style:bh(),strip:ls(),figures:ea(),lines:wh(),wrap:Sh(),entriesToDisplay:Ah()}});var nt=S((wO,Th)=>{"use strict";var Oh=require("readline"),{action:Qw}=Te(),eC=require("events"),{beep:tC,cursor:nC}=W(),rC=G(),na=class extends eC{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let n=Oh.createInterface({input:this.in,escapeCodeTimeout:50});Oh.emitKeypressEvents(this.in,n),this.in.isTTY&&this.in.setRawMode(!0);let r=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,s=(i,o)=>{let a=Qw(o,r);a===!1?this._&&this._(i,o):typeof this[a]=="function"?this[a](o):this.bell()};this.close=()=>{this.out.write(nC.show),this.in.removeListener("keypress",s),this.in.isTTY&&this.in.setRawMode(!1),n.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",s)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(tC)}render(){this.onRender(rC),this.firstRender&&(this.firstRender=!1)}};Th.exports=na});var Rh=S((CO,$h)=>{"use strict";var cs=G(),sC=nt(),{erase:iC,cursor:Yn}=W(),{style:ra,clear:sa,lines:oC,figures:aC}=Te(),ia=class extends sC{constructor(e={}){super(e),this.transform=ra.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=sa("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=cs.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
76
+ `)}});var $h=S((AO,Th)=>{"use strict";Th.exports=(t,e,n)=>{n=n||e;let r=Math.min(e-n,t-Math.floor(n/2));r<0&&(r=0);let s=Math.min(r+n,e);return{startIndex:r,endIndex:s}}});var $e=S((EO,Rh)=>{"use strict";Rh.exports={action:gh(),clear:yh(),style:Sh(),strip:hs(),figures:ta(),lines:Ah(),wrap:Oh(),entriesToDisplay:$h()}});var ot=S((OO,kh)=>{"use strict";var Nh=require("readline"),{action:nC}=$e(),rC=require("events"),{beep:sC,cursor:iC}=W(),oC=G(),ra=class extends rC{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let n=Nh.createInterface({input:this.in,escapeCodeTimeout:50});Nh.emitKeypressEvents(this.in,n),this.in.isTTY&&this.in.setRawMode(!0);let r=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,s=(i,o)=>{let a=nC(o,r);a===!1?this._&&this._(i,o):typeof this[a]=="function"?this[a](o):this.bell()};this.close=()=>{this.out.write(iC.show),this.in.removeListener("keypress",s),this.in.isTTY&&this.in.setRawMode(!1),n.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",s)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(sC)}render(){this.onRender(oC),this.firstRender&&(this.firstRender=!1)}};kh.exports=ra});var Dh=S((TO,Ih)=>{"use strict";var ps=G(),aC=ot(),{erase:lC,cursor:tr}=W(),{style:sa,clear:ia,lines:cC,figures:uC}=$e(),oa=class extends aC{constructor(e={}){super(e),this.transform=sa.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=ia("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=ps.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
77
77
  `),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
78
- `),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,n){let r=this.value.slice(0,this.cursor),s=this.value.slice(this.cursor);this.value=`${r}${e}${s}`,this.red=!1,this.cursor=this.placeholder?0:r.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),n=this.value.slice(this.cursor);this.value=`${e}${n}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor+1);this.value=`${e}${n}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Yn.down(oC(this.outputError,this.out.columns)-1)+sa(this.outputError,this.out.columns)),this.out.write(sa(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[ra.symbol(this.done,this.aborted),cs.bold(this.msg),ra.delimiter(this.done),this.red?cs.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
78
+ `),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,n){let r=this.value.slice(0,this.cursor),s=this.value.slice(this.cursor);this.value=`${r}${e}${s}`,this.red=!1,this.cursor=this.placeholder?0:r.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),n=this.value.slice(this.cursor);this.value=`${e}${n}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor+1);this.value=`${e}${n}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(tr.down(cC(this.outputError,this.out.columns)-1)+ia(this.outputError,this.out.columns)),this.out.write(ia(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[sa.symbol(this.done,this.aborted),ps.bold(this.msg),sa.delimiter(this.done),this.red?ps.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
79
79
  `).reduce((e,n,r)=>e+`
80
- ${r?" ":aC.pointerSmall} ${cs.red().italic(n)}`,"")),this.out.write(iC.line+Yn.to(0)+this.outputText+Yn.save+this.outputError+Yn.restore+Yn.move(this.cursorOffset,0)))}};$h.exports=ia});var Dh=S((SO,Ih)=>{"use strict";var rt=G(),lC=nt(),{style:Nh,clear:kh,figures:us,wrap:cC,entriesToDisplay:uC}=Te(),{cursor:dC}=W(),oa=class extends lC{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((n,r)=>(typeof n=="string"&&(n={title:n,value:r}),{title:n&&(n.title||n.value||n),value:n&&(n.value===void 0?r:n.value),description:n&&n.description,selected:n&&n.selected,disabled:n&&n.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=kh("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
80
+ ${r?" ":uC.pointerSmall} ${ps.red().italic(n)}`,"")),this.out.write(lC.line+tr.to(0)+this.outputText+tr.save+this.outputError+tr.restore+tr.move(this.cursorOffset,0)))}};Ih.exports=oa});var Fh=S(($O,jh)=>{"use strict";var at=G(),dC=ot(),{style:Ph,clear:Mh,figures:fs,wrap:hC,entriesToDisplay:pC}=$e(),{cursor:fC}=W(),aa=class extends dC{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((n,r)=>(typeof n=="string"&&(n={title:n,value:r}),{title:n&&(n.title||n.value||n),value:n&&(n.value===void 0?r:n.value),description:n&&n.description,selected:n&&n.selected,disabled:n&&n.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Mh("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
81
81
  `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
82
- `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,n){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(dC.hide):this.out.write(kh(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:n}=uC(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Nh.symbol(this.done,this.aborted),rt.bold(this.msg),Nh.delimiter(!1),this.done?this.selection.title:this.selection.disabled?rt.yellow(this.warn):rt.gray(this.hint)].join(" "),!this.done){this.outputText+=`
83
- `;for(let r=e;r<n;r++){let s,i,o="",a=this.choices[r];r===e&&e>0?i=us.arrowUp:r===n-1&&n<this.choices.length?i=us.arrowDown:i=" ",a.disabled?(s=this.cursor===r?rt.gray().underline(a.title):rt.strikethrough().gray(a.title),i=(this.cursor===r?rt.bold().gray(us.pointer)+" ":" ")+i):(s=this.cursor===r?rt.cyan().underline(a.title):a.title,i=(this.cursor===r?rt.cyan(us.pointer)+" ":" ")+i,a.description&&this.cursor===r&&(o=` - ${a.description}`,(i.length+s.length+o.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(o=`
84
- `+cC(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${i} ${s}${rt.gray(o)}
85
- `}}this.out.write(this.outputText)}};Ih.exports=oa});var Fh=S((xO,jh)=>{"use strict";var ds=G(),hC=nt(),{style:Ph,clear:pC}=Te(),{cursor:Mh,erase:fC}=W(),aa=class extends hC{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
82
+ `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,n){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(fC.hide):this.out.write(Mh(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:n}=pC(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Ph.symbol(this.done,this.aborted),at.bold(this.msg),Ph.delimiter(!1),this.done?this.selection.title:this.selection.disabled?at.yellow(this.warn):at.gray(this.hint)].join(" "),!this.done){this.outputText+=`
83
+ `;for(let r=e;r<n;r++){let s,i,o="",a=this.choices[r];r===e&&e>0?i=fs.arrowUp:r===n-1&&n<this.choices.length?i=fs.arrowDown:i=" ",a.disabled?(s=this.cursor===r?at.gray().underline(a.title):at.strikethrough().gray(a.title),i=(this.cursor===r?at.bold().gray(fs.pointer)+" ":" ")+i):(s=this.cursor===r?at.cyan().underline(a.title):a.title,i=(this.cursor===r?at.cyan(fs.pointer)+" ":" ")+i,a.description&&this.cursor===r&&(o=` - ${a.description}`,(i.length+s.length+o.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(o=`
84
+ `+hC(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${i} ${s}${at.gray(o)}
85
+ `}}this.out.write(this.outputText)}};jh.exports=aa});var Hh=S((RO,Lh)=>{"use strict";var ms=G(),mC=ot(),{style:Vh,clear:gC}=$e(),{cursor:qh,erase:_C}=W(),la=class extends mC{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
86
86
  `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
87
- `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,n){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(Mh.hide):this.out.write(pC(this.outputText,this.out.columns)),super.render(),this.outputText=[Ph.symbol(this.done,this.aborted),ds.bold(this.msg),Ph.delimiter(this.done),this.value?this.inactive:ds.cyan().underline(this.inactive),ds.gray("/"),this.value?ds.cyan().underline(this.active):this.active].join(" "),this.out.write(fC.line+Mh.to(0)+this.outputText))}};jh.exports=aa});var Me=S((AO,qh)=>{"use strict";var la=class t{constructor({token:e,date:n,parts:r,locales:s}){this.token=e,this.date=n||new Date,this.parts=r||[this],this.locales=s||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((n,r)=>r>e&&n instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),n=e.indexOf(this);return e.find((r,s)=>s>n&&r instanceof t)}toString(){return String(this.date)}};qh.exports=la});var Lh=S((EO,Vh)=>{"use strict";var mC=Me(),ca=class extends mC{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};Vh.exports=ca});var Gh=S((OO,Hh)=>{"use strict";var gC=Me(),_C=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),ua=class extends gC{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+_C(e):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:e}};Hh.exports=ua});var Wh=S((TO,Uh)=>{"use strict";var vC=Me(),da=class extends vC{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};Uh.exports=da});var Bh=S(($O,Kh)=>{"use strict";var bC=Me(),ha=class extends bC{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};Kh.exports=ha});var Yh=S((RO,zh)=>{"use strict";var yC=Me(),pa=class extends yC{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};zh.exports=pa});var Xh=S((NO,Jh)=>{"use strict";var wC=Me(),fa=class extends wC{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),n=this.token.length;return n===2?String(e+1).padStart(2,"0"):n===3?this.locales.monthsShort[e]:n===4?this.locales.months[e]:String(e+1)}};Jh.exports=fa});var Qh=S((kO,Zh)=>{"use strict";var CC=Me(),ma=class extends CC{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};Zh.exports=ma});var tp=S((IO,ep)=>{"use strict";var SC=Me(),ga=class extends SC{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};ep.exports=ga});var rp=S((DO,np)=>{"use strict";np.exports={DatePart:Me(),Meridiem:Lh(),Day:Gh(),Hours:Wh(),Milliseconds:Bh(),Minutes:Yh(),Month:Xh(),Seconds:Qh(),Year:tp()}});var up=S((PO,cp)=>{"use strict";var _a=G(),xC=nt(),{style:sp,clear:ip,figures:AC}=Te(),{erase:EC,cursor:op}=W(),{DatePart:ap,Meridiem:OC,Day:TC,Hours:$C,Milliseconds:RC,Minutes:NC,Month:kC,Seconds:IC,Year:DC}=rp(),PC=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,lp={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new TC(t),3:t=>new kC(t),4:t=>new DC(t),5:t=>new OC(t),6:t=>new $C(t),7:t=>new NC(t),8:t=>new IC(t),9:t=>new RC(t)},MC={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},va=class extends xC{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(MC,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=ip("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let n;for(this.parts=[];n=PC.exec(e);){let s=n.shift(),i=n.findIndex(o=>o!=null);this.parts.push(i in lp?lp[i]({token:n[i]||s,date:this.date,parts:this.parts,locales:this.locales}):n[i]||s)}let r=this.parts.reduce((s,i)=>(typeof i=="string"&&typeof s[s.length-1]=="string"?s[s.length-1]+=i:s.push(i),s),[]);this.parts.splice(0),this.parts.push(...r),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof ap)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
87
+ `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,n){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(qh.hide):this.out.write(gC(this.outputText,this.out.columns)),super.render(),this.outputText=[Vh.symbol(this.done,this.aborted),ms.bold(this.msg),Vh.delimiter(this.done),this.value?this.inactive:ms.cyan().underline(this.inactive),ms.gray("/"),this.value?ms.cyan().underline(this.active):this.active].join(" "),this.out.write(_C.line+qh.to(0)+this.outputText))}};Lh.exports=la});var je=S((NO,Gh)=>{"use strict";var ca=class t{constructor({token:e,date:n,parts:r,locales:s}){this.token=e,this.date=n||new Date,this.parts=r||[this],this.locales=s||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((n,r)=>r>e&&n instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),n=e.indexOf(this);return e.find((r,s)=>s>n&&r instanceof t)}toString(){return String(this.date)}};Gh.exports=ca});var Wh=S((kO,Uh)=>{"use strict";var vC=je(),ua=class extends vC{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};Uh.exports=ua});var zh=S((IO,Bh)=>{"use strict";var bC=je(),yC=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),da=class extends bC{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+yC(e):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:e}};Bh.exports=da});var Yh=S((DO,Kh)=>{"use strict";var wC=je(),ha=class extends wC{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};Kh.exports=ha});var Xh=S((PO,Jh)=>{"use strict";var CC=je(),pa=class extends CC{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};Jh.exports=pa});var Qh=S((MO,Zh)=>{"use strict";var SC=je(),fa=class extends SC{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};Zh.exports=fa});var tp=S((jO,ep)=>{"use strict";var xC=je(),ma=class extends xC{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),n=this.token.length;return n===2?String(e+1).padStart(2,"0"):n===3?this.locales.monthsShort[e]:n===4?this.locales.months[e]:String(e+1)}};ep.exports=ma});var rp=S((FO,np)=>{"use strict";var AC=je(),ga=class extends AC{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};np.exports=ga});var ip=S((VO,sp)=>{"use strict";var EC=je(),_a=class extends EC{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};sp.exports=_a});var ap=S((qO,op)=>{"use strict";op.exports={DatePart:je(),Meridiem:Wh(),Day:zh(),Hours:Yh(),Milliseconds:Xh(),Minutes:Qh(),Month:tp(),Seconds:rp(),Year:ip()}});var fp=S((LO,pp)=>{"use strict";var va=G(),OC=ot(),{style:lp,clear:cp,figures:TC}=$e(),{erase:$C,cursor:up}=W(),{DatePart:dp,Meridiem:RC,Day:NC,Hours:kC,Milliseconds:IC,Minutes:DC,Month:PC,Seconds:MC,Year:jC}=ap(),FC=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,hp={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new NC(t),3:t=>new PC(t),4:t=>new jC(t),5:t=>new RC(t),6:t=>new kC(t),7:t=>new DC(t),8:t=>new MC(t),9:t=>new IC(t)},VC={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},ba=class extends OC{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(VC,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=cp("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let n;for(this.parts=[];n=FC.exec(e);){let s=n.shift(),i=n.findIndex(o=>o!=null);this.parts.push(i in hp?hp[i]({token:n[i]||s,date:this.date,parts:this.parts,locales:this.locales}):n[i]||s)}let r=this.parts.reduce((s,i)=>(typeof i=="string"&&typeof s[s.length-1]=="string"?s[s.length-1]+=i:s.push(i),s),[]);this.parts.splice(0),this.parts.push(...r),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof dp)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
88
88
  `),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
89
- `),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(n=>n instanceof ap)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(op.hide):this.out.write(ip(this.outputText,this.out.columns)),super.render(),this.outputText=[sp.symbol(this.done,this.aborted),_a.bold(this.msg),sp.delimiter(!1),this.parts.reduce((e,n,r)=>e.concat(r===this.cursor&&!this.done?_a.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
89
+ `),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(n=>n instanceof dp)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(up.hide):this.out.write(cp(this.outputText,this.out.columns)),super.render(),this.outputText=[lp.symbol(this.done,this.aborted),va.bold(this.msg),lp.delimiter(!1),this.parts.reduce((e,n,r)=>e.concat(r===this.cursor&&!this.done?va.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
90
90
  `).reduce((e,n,r)=>e+`
91
- ${r?" ":AC.pointerSmall} ${_a.red().italic(n)}`,"")),this.out.write(EC.line+op.to(0)+this.outputText))}};cp.exports=va});var fp=S((MO,pp)=>{"use strict";var hs=G(),jC=nt(),{cursor:ps,erase:FC}=W(),{style:ba,figures:qC,clear:dp,lines:VC}=Te(),LC=/[0-9]/,ya=t=>t!==void 0,hp=(t,e)=>{let n=Math.pow(10,e);return Math.round(t*n)/n},wa=class extends jC{constructor(e={}){super(e),this.transform=ba.render(e.style),this.msg=e.message,this.initial=ya(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=ya(e.min)?e.min:-1/0,this.max=ya(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=hs.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${hp(e,this.round)}`),this._value=hp(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||LC.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
91
+ ${r?" ":TC.pointerSmall} ${va.red().italic(n)}`,"")),this.out.write($C.line+up.to(0)+this.outputText))}};pp.exports=ba});var vp=S((HO,_p)=>{"use strict";var gs=G(),qC=ot(),{cursor:_s,erase:LC}=W(),{style:ya,figures:HC,clear:mp,lines:GC}=$e(),UC=/[0-9]/,wa=t=>t!==void 0,gp=(t,e)=>{let n=Math.pow(10,e);return Math.round(t*n)/n},Ca=class extends qC{constructor(e={}){super(e),this.transform=ya.render(e.style),this.msg=e.message,this.initial=wa(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=wa(e.min)?e.min:-1/0,this.max=wa(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=gs.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${gp(e,this.round)}`),this._value=gp(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||UC.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
92
92
  `),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let e=this.value;this.value=e!==""?e:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
93
- `),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,n){if(!this.valid(e))return this.bell();let r=Date.now();if(r-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=r,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(ps.down(VC(this.outputError,this.out.columns)-1)+dp(this.outputError,this.out.columns)),this.out.write(dp(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[ba.symbol(this.done,this.aborted),hs.bold(this.msg),ba.delimiter(this.done),!this.done||!this.done&&!this.placeholder?hs[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
93
+ `),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,n){if(!this.valid(e))return this.bell();let r=Date.now();if(r-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=r,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(_s.down(GC(this.outputError,this.out.columns)-1)+mp(this.outputError,this.out.columns)),this.out.write(mp(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[ya.symbol(this.done,this.aborted),gs.bold(this.msg),ya.delimiter(this.done),!this.done||!this.done&&!this.placeholder?gs[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
94
94
  `).reduce((e,n,r)=>e+`
95
- ${r?" ":qC.pointerSmall} ${hs.red().italic(n)}`,"")),this.out.write(FC.line+ps.to(0)+this.outputText+ps.save+this.outputError+ps.restore))}};pp.exports=wa});var Sa=S((jO,_p)=>{"use strict";var je=G(),{cursor:HC}=W(),GC=nt(),{clear:mp,figures:vt,style:gp,wrap:UC,entriesToDisplay:WC}=Te(),Ca=class extends GC{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((n,r)=>(typeof n=="string"&&(n={title:n,value:r}),{title:n&&(n.title||n.value||n),description:n&&n.description,value:n&&(n.value===void 0?r:n.value),selected:n&&n.selected,disabled:n&&n.disabled})),this.clear=mp("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
95
+ ${r?" ":HC.pointerSmall} ${gs.red().italic(n)}`,"")),this.out.write(LC.line+_s.to(0)+this.outputText+_s.save+this.outputError+_s.restore))}};_p.exports=Ca});var xa=S((GO,wp)=>{"use strict";var Fe=G(),{cursor:WC}=W(),BC=ot(),{clear:bp,figures:St,style:yp,wrap:zC,entriesToDisplay:KC}=$e(),Sa=class extends BC{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((n,r)=>(typeof n=="string"&&(n={title:n,value:r}),{title:n&&(n.title||n.value||n),description:n&&n.description,value:n&&(n.value===void 0?r:n.value),selected:n&&n.selected,disabled:n&&n.disabled})),this.clear=bp("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
96
96
  `),this.close()}submit(){let e=this.value.filter(n=>n.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
97
97
  `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(n=>!n.disabled).forEach(n=>n.selected=e),this.render()}_(e,n){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
98
98
  Instructions:
99
- ${vt.arrowUp}/${vt.arrowDown}: Highlight option
100
- ${vt.arrowLeft}/${vt.arrowRight}/[space]: Toggle selection
99
+ ${St.arrowUp}/${St.arrowDown}: Highlight option
100
+ ${St.arrowLeft}/${St.arrowRight}/[space]: Toggle selection
101
101
  `+(this.maxChoices===void 0?` a: Toggle all
102
- `:"")+" enter/return: Complete answer":""}renderOption(e,n,r,s){let i=(n.selected?je.green(vt.radioOn):vt.radioOff)+" "+s+" ",o,a;return n.disabled?o=e===r?je.gray().underline(n.title):je.strikethrough().gray(n.title):(o=e===r?je.cyan().underline(n.title):n.title,e===r&&n.description&&(a=` - ${n.description}`,(i.length+o.length+a.length>=this.out.columns||n.description.split(/\r?\n/).length>1)&&(a=`
103
- `+UC(n.description,{margin:i.length,width:this.out.columns})))),i+o+je.gray(a||"")}paginateOptions(e){if(e.length===0)return je.red("No matches for this query.");let{startIndex:n,endIndex:r}=WC(this.cursor,e.length,this.optionsPerPage),s,i=[];for(let o=n;o<r;o++)o===n&&n>0?s=vt.arrowUp:o===r-1&&r<e.length?s=vt.arrowDown:s=" ",i.push(this.renderOption(this.cursor,e[o],o,s));return`
102
+ `:"")+" enter/return: Complete answer":""}renderOption(e,n,r,s){let i=(n.selected?Fe.green(St.radioOn):St.radioOff)+" "+s+" ",o,a;return n.disabled?o=e===r?Fe.gray().underline(n.title):Fe.strikethrough().gray(n.title):(o=e===r?Fe.cyan().underline(n.title):n.title,e===r&&n.description&&(a=` - ${n.description}`,(i.length+o.length+a.length>=this.out.columns||n.description.split(/\r?\n/).length>1)&&(a=`
103
+ `+zC(n.description,{margin:i.length,width:this.out.columns})))),i+o+Fe.gray(a||"")}paginateOptions(e){if(e.length===0)return Fe.red("No matches for this query.");let{startIndex:n,endIndex:r}=KC(this.cursor,e.length,this.optionsPerPage),s,i=[];for(let o=n;o<r;o++)o===n&&n>0?s=St.arrowUp:o===r-1&&r<e.length?s=St.arrowDown:s=" ",i.push(this.renderOption(this.cursor,e[o],o,s));return`
104
104
  `+i.join(`
105
- `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let e=[je.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(je.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(HC.hide),super.render();let e=[gp.symbol(this.done,this.aborted),je.bold(this.msg),gp.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=je.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=mp(e,this.out.columns)}};_p.exports=Ca});var Cp=S((FO,wp)=>{"use strict";var Jn=G(),KC=nt(),{erase:BC,cursor:vp}=W(),{style:xa,clear:bp,figures:Aa,wrap:zC,entriesToDisplay:YC}=Te(),yp=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),JC=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),XC=(t,e)=>{let n=t.findIndex(r=>r.value===e||r.title===e);return n>-1?n:void 0},Ea=class extends KC{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:XC(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=xa.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=bp("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=yp(this.suggestions,e):this.value=this.fallback.value,this.fire()}async complete(e){let n=this.completing=this.suggest(this.input,this.choices),r=await n;if(this.completing!==n)return;this.suggestions=r.map((i,o,a)=>({title:JC(a,o),value:yp(a,o),description:i.description})),this.completing=!1;let s=Math.max(r.length-1,0);this.moveSelect(Math.min(s,this.select)),e&&e()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
105
+ `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let e=[Fe.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(Fe.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(WC.hide),super.render();let e=[yp.symbol(this.done,this.aborted),Fe.bold(this.msg),yp.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Fe.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=bp(e,this.out.columns)}};wp.exports=Sa});var Ep=S((UO,Ap)=>{"use strict";var nr=G(),YC=ot(),{erase:JC,cursor:Cp}=W(),{style:Aa,clear:Sp,figures:Ea,wrap:XC,entriesToDisplay:ZC}=$e(),xp=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),QC=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),eS=(t,e)=>{let n=t.findIndex(r=>r.value===e||r.title===e);return n>-1?n:void 0},Oa=class extends YC{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:eS(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=Aa.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Sp("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=xp(this.suggestions,e):this.value=this.fallback.value,this.fire()}async complete(e){let n=this.completing=this.suggest(this.input,this.choices),r=await n;if(this.completing!==n)return;this.suggestions=r.map((i,o,a)=>({title:QC(a,o),value:xp(a,o),description:i.description})),this.completing=!1;let s=Math.max(r.length-1,0);this.moveSelect(Math.min(s,this.select)),e&&e()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
106
106
  `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
107
107
  `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
108
- `),this.close()}_(e,n){let r=this.input.slice(0,this.cursor),s=this.input.slice(this.cursor);this.input=`${r}${e}${s}`,this.cursor=r.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),n=this.input.slice(this.cursor);this.input=`${e}${n}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor+1);this.input=`${e}${n}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,n,r,s){let i,o=r?Aa.arrowUp:s?Aa.arrowDown:" ",a=n?Jn.cyan().underline(e.title):e.title;return o=(n?Jn.cyan(Aa.pointer)+" ":" ")+o,e.description&&(i=` - ${e.description}`,(o.length+a.length+i.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(i=`
109
- `+zC(e.description,{margin:3,width:this.out.columns}))),o+" "+a+Jn.gray(i||"")}render(){if(this.closed)return;this.firstRender?this.out.write(vp.hide):this.out.write(bp(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:n}=YC(this.select,this.choices.length,this.limit);if(this.outputText=[xa.symbol(this.done,this.aborted,this.exited),Jn.bold(this.msg),xa.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let r=this.suggestions.slice(e,n).map((s,i)=>this.renderOption(s,this.select===i+e,i===0&&e>0,i+e===n-1&&n<this.choices.length)).join(`
108
+ `),this.close()}_(e,n){let r=this.input.slice(0,this.cursor),s=this.input.slice(this.cursor);this.input=`${r}${e}${s}`,this.cursor=r.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),n=this.input.slice(this.cursor);this.input=`${e}${n}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor+1);this.input=`${e}${n}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,n,r,s){let i,o=r?Ea.arrowUp:s?Ea.arrowDown:" ",a=n?nr.cyan().underline(e.title):e.title;return o=(n?nr.cyan(Ea.pointer)+" ":" ")+o,e.description&&(i=` - ${e.description}`,(o.length+a.length+i.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(i=`
109
+ `+XC(e.description,{margin:3,width:this.out.columns}))),o+" "+a+nr.gray(i||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Cp.hide):this.out.write(Sp(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:n}=ZC(this.select,this.choices.length,this.limit);if(this.outputText=[Aa.symbol(this.done,this.aborted,this.exited),nr.bold(this.msg),Aa.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let r=this.suggestions.slice(e,n).map((s,i)=>this.renderOption(s,this.select===i+e,i===0&&e>0,i+e===n-1&&n<this.choices.length)).join(`
110
110
  `);this.outputText+=`
111
- `+(r||Jn.gray(this.fallback.title))}this.out.write(BC.line+vp.to(0)+this.outputText)}};wp.exports=Ea});var Ep=S((qO,Ap)=>{"use strict";var st=G(),{cursor:ZC}=W(),QC=Sa(),{clear:Sp,style:xp,figures:ln}=Te(),Oa=class extends QC{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=Sp("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(r=>this.inputValue?!!(typeof r.title=="string"&&r.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof r.value=="string"&&r.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let n=this.filteredOptions.findIndex(r=>r===e);this.cursor=n<0?0:n,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,n){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
111
+ `+(r||nr.gray(this.fallback.title))}this.out.write(JC.line+Cp.to(0)+this.outputText)}};Ap.exports=Oa});var Rp=S((WO,$p)=>{"use strict";var lt=G(),{cursor:tS}=W(),nS=xa(),{clear:Op,style:Tp,figures:fn}=$e(),Ta=class extends nS{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=Op("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(r=>this.inputValue?!!(typeof r.title=="string"&&r.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof r.value=="string"&&r.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let n=this.filteredOptions.findIndex(r=>r===e);this.cursor=n<0?0:n,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,n){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
112
112
  Instructions:
113
- ${ln.arrowUp}/${ln.arrowDown}: Highlight option
114
- ${ln.arrowLeft}/${ln.arrowRight}/[space]: Toggle selection
113
+ ${fn.arrowUp}/${fn.arrowDown}: Highlight option
114
+ ${fn.arrowLeft}/${fn.arrowRight}/[space]: Toggle selection
115
115
  [a,b,c]/delete: Filter choices
116
116
  enter/return: Complete answer
117
117
  `:""}renderCurrentInput(){return`
118
- Filtered results for: ${this.inputValue?this.inputValue:st.gray("Enter something to filter")}
119
- `}renderOption(e,n,r){let s;return n.disabled?s=e===r?st.gray().underline(n.title):st.strikethrough().gray(n.title):s=e===r?st.cyan().underline(n.title):n.title,(n.selected?st.green(ln.radioOn):ln.radioOff)+" "+s}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let e=[st.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(st.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(ZC.hide),super.render();let e=[xp.symbol(this.done,this.aborted),st.bold(this.msg),xp.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=st.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=Sp(e,this.out.columns)}};Ap.exports=Oa});var Np=S((VO,Rp)=>{"use strict";var Op=G(),eS=nt(),{style:Tp,clear:tS}=Te(),{erase:nS,cursor:$p}=W(),Ta=class extends eS{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
118
+ Filtered results for: ${this.inputValue?this.inputValue:lt.gray("Enter something to filter")}
119
+ `}renderOption(e,n,r){let s;return n.disabled?s=e===r?lt.gray().underline(n.title):lt.strikethrough().gray(n.title):s=e===r?lt.cyan().underline(n.title):n.title,(n.selected?lt.green(fn.radioOn):fn.radioOff)+" "+s}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let e=[lt.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(lt.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(tS.hide),super.render();let e=[Tp.symbol(this.done,this.aborted),lt.bold(this.msg),Tp.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=lt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=Op(e,this.out.columns)}};$p.exports=Ta});var Pp=S((BO,Dp)=>{"use strict";var Np=G(),rS=ot(),{style:kp,clear:sS}=$e(),{erase:iS,cursor:Ip}=W(),$a=class extends rS{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
120
120
  `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
121
- `),this.close()}_(e,n){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write($p.hide):this.out.write(tS(this.outputText,this.out.columns)),super.render(),this.outputText=[Tp.symbol(this.done,this.aborted),Op.bold(this.msg),Tp.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Op.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(nS.line+$p.to(0)+this.outputText))}};Rp.exports=Ta});var Ip=S((LO,kp)=>{"use strict";kp.exports={TextPrompt:Rh(),SelectPrompt:Dh(),TogglePrompt:Fh(),DatePrompt:up(),NumberPrompt:fp(),MultiselectPrompt:Sa(),AutocompletePrompt:Cp(),AutocompleteMultiselectPrompt:Ep(),ConfirmPrompt:Np()}});var Pp=S(Dp=>{"use strict";var pe=Dp,rS=Ip(),fs=t=>t;function Fe(t,e,n={}){return new Promise((r,s)=>{let i=new rS[t](e),o=n.onAbort||fs,a=n.onSubmit||fs,l=n.onExit||fs;i.on("state",e.onState||fs),i.on("submit",d=>r(a(d))),i.on("exit",d=>r(l(d))),i.on("abort",d=>s(o(d)))})}pe.text=t=>Fe("TextPrompt",t);pe.password=t=>(t.style="password",pe.text(t));pe.invisible=t=>(t.style="invisible",pe.text(t));pe.number=t=>Fe("NumberPrompt",t);pe.date=t=>Fe("DatePrompt",t);pe.confirm=t=>Fe("ConfirmPrompt",t);pe.list=t=>{let e=t.separator||",";return Fe("TextPrompt",t,{onSubmit:n=>n.split(e).map(r=>r.trim())})};pe.toggle=t=>Fe("TogglePrompt",t);pe.select=t=>Fe("SelectPrompt",t);pe.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=n=>n.filter(r=>r.selected).map(r=>r.value);return Fe("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};pe.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=n=>n.filter(r=>r.selected).map(r=>r.value);return Fe("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var sS=(t,e)=>Promise.resolve(e.filter(n=>n.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));pe.autocomplete=t=>(t.suggest=t.suggest||sS,t.choices=[].concat(t.choices||[]),Fe("AutocompletePrompt",t))});var Fp=S((GO,jp)=>{"use strict";var $a=Pp(),iS=["suggest","format","onState","validate","onRender","type"],Mp=()=>{};async function bt(t=[],{onSubmit:e=Mp,onCancel:n=Mp}={}){let r={},s=bt._override||{};t=[].concat(t);let i,o,a,l,d,u,c=async(h,f,v=!1)=>{if(!(!v&&h.validate&&h.validate(f)!==!0))return h.format?await h.format(f,r):f};for(o of t)if({name:l,type:d}=o,typeof d=="function"&&(d=await d(i,{...r},o),o.type=d),!!d){for(let h in o){if(iS.includes(h))continue;let f=o[h];o[h]=typeof f=="function"?await f(i,{...r},u):f}if(u=o,typeof o.message!="string")throw new Error("prompt message is required");if({name:l,type:d}=o,$a[d]===void 0)throw new Error(`prompt type (${d}) is not defined`);if(s[o.name]!==void 0&&(i=await c(o,s[o.name]),i!==void 0)){r[l]=i;continue}try{i=bt._injected?oS(bt._injected,o.initial):await $a[d](o),r[l]=i=await c(o,i,!0),a=await e(o,i,r)}catch{a=!await n(o,r)}if(a)return r}return r}function oS(t,e){let n=t.shift();if(n instanceof Error)throw n;return n===void 0?e:n}function aS(t){bt._injected=(bt._injected||[]).concat(t)}function lS(t){bt._override=Object.assign({},t)}jp.exports=Object.assign(bt,{prompt:bt,prompts:$a,inject:aS,override:lS})});var Vt=S((UO,qp)=>{"use strict";function cS(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,n=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(n[e]>t[e])return!1;if(t[e]>n[e])return!0}return!1}qp.exports=cS("8.6.0")?uh():Fp()});var $t=L(Jr(),1);var cu=L(lu(),1),{program:CE,createCommand:SE,createArgument:xE,createOption:AE,CommanderError:EE,InvalidArgumentError:OE,InvalidOptionArgumentError:TE,Command:Se,Argument:$E,Option:uu,Help:RE}=cu.default;var Il=L(Vt(),1);var Vp=(t=0)=>e=>`\x1B[${e+t}m`,Lp=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Hp=(t=0)=>(e,n,r)=>`\x1B[${38+t};2;${e};${n};${r}m`,H={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},WO=Object.keys(H.modifier),uS=Object.keys(H.color),dS=Object.keys(H.bgColor),KO=[...uS,...dS];function hS(){let t=new Map;for(let[e,n]of Object.entries(H)){for(let[r,s]of Object.entries(n))H[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[r]=H[r],t.set(s[0],s[1]);Object.defineProperty(H,e,{value:n,enumerable:!1})}return Object.defineProperty(H,"codes",{value:t,enumerable:!1}),H.color.close="\x1B[39m",H.bgColor.close="\x1B[49m",H.color.ansi=Vp(),H.color.ansi256=Lp(),H.color.ansi16m=Hp(),H.bgColor.ansi=Vp(10),H.bgColor.ansi256=Lp(10),H.bgColor.ansi16m=Hp(10),Object.defineProperties(H,{rgbToAnsi256:{value(e,n,r){return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(e){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(i=>i+i).join(""));let s=Number.parseInt(r,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:e=>H.rgbToAnsi256(...H.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let n,r,s;if(e>=232)n=((e-232)*10+8)/255,r=n,s=n;else{e-=16;let a=e%36;n=Math.floor(e/36)/5,r=Math.floor(a/6)/5,s=a%6/5}let i=Math.max(n,r,s)*2;if(i===0)return 30;let o=30+(Math.round(s)<<2|Math.round(r)<<1|Math.round(n));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,n,r)=>H.ansi256ToAnsi(H.rgbToAnsi256(e,n,r)),enumerable:!1},hexToAnsi:{value:e=>H.ansi256ToAnsi(H.hexToAnsi256(e)),enumerable:!1}}),H}var pS=hS(),$e=pS;var gs=L(require("node:process"),1),Up=L(require("node:os"),1),Ra=L(require("node:tty"),1);function xe(t,e=globalThis.Deno?globalThis.Deno.args:gs.default.argv){let n=t.startsWith("-")?"":t.length===1?"-":"--",r=e.indexOf(n+t),s=e.indexOf("--");return r!==-1&&(s===-1||r<s)}var{env:z}=gs.default,ms;xe("no-color")||xe("no-colors")||xe("color=false")||xe("color=never")?ms=0:(xe("color")||xe("colors")||xe("color=true")||xe("color=always"))&&(ms=1);function fS(){if("FORCE_COLOR"in z)return z.FORCE_COLOR==="true"?1:z.FORCE_COLOR==="false"?0:z.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(z.FORCE_COLOR,10),3)}function mS(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function gS(t,{streamIsTTY:e,sniffFlags:n=!0}={}){let r=fS();r!==void 0&&(ms=r);let s=n?ms:r;if(s===0)return 0;if(n){if(xe("color=16m")||xe("color=full")||xe("color=truecolor"))return 3;if(xe("color=256"))return 2}if("TF_BUILD"in z&&"AGENT_NAME"in z)return 1;if(t&&!e&&s===void 0)return 0;let i=s||0;if(z.TERM==="dumb")return i;if(gs.default.platform==="win32"){let o=Up.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in z)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in z)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in z)||z.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(z.TEAMCITY_VERSION)?1:0;if(z.COLORTERM==="truecolor"||z.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in z){let o=Number.parseInt((z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(z.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(z.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(z.TERM)||"COLORTERM"in z?1:i}function Gp(t,e={}){let n=gS(t,{streamIsTTY:t&&t.isTTY,...e});return mS(n)}var _S={stdout:Gp({isTTY:Ra.default.isatty(1)}),stderr:Gp({isTTY:Ra.default.isatty(2)})},Wp=_S;function Kp(t,e,n){let r=t.indexOf(e);if(r===-1)return t;let s=e.length,i=0,o="";do o+=t.slice(i,r)+e+n,i=r+s,r=t.indexOf(e,i);while(r!==-1);return o+=t.slice(i),o}function Bp(t,e,n,r){let s=0,i="";do{let o=t[r-1]==="\r";i+=t.slice(s,o?r-1:r)+e+(o?`\r
121
+ `),this.close()}_(e,n){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Ip.hide):this.out.write(sS(this.outputText,this.out.columns)),super.render(),this.outputText=[kp.symbol(this.done,this.aborted),Np.bold(this.msg),kp.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Np.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(iS.line+Ip.to(0)+this.outputText))}};Dp.exports=$a});var jp=S((zO,Mp)=>{"use strict";Mp.exports={TextPrompt:Dh(),SelectPrompt:Fh(),TogglePrompt:Hh(),DatePrompt:fp(),NumberPrompt:vp(),MultiselectPrompt:xa(),AutocompletePrompt:Ep(),AutocompleteMultiselectPrompt:Rp(),ConfirmPrompt:Pp()}});var Vp=S(Fp=>{"use strict";var fe=Fp,oS=jp(),vs=t=>t;function Ve(t,e,n={}){return new Promise((r,s)=>{let i=new oS[t](e),o=n.onAbort||vs,a=n.onSubmit||vs,l=n.onExit||vs;i.on("state",e.onState||vs),i.on("submit",d=>r(a(d))),i.on("exit",d=>r(l(d))),i.on("abort",d=>s(o(d)))})}fe.text=t=>Ve("TextPrompt",t);fe.password=t=>(t.style="password",fe.text(t));fe.invisible=t=>(t.style="invisible",fe.text(t));fe.number=t=>Ve("NumberPrompt",t);fe.date=t=>Ve("DatePrompt",t);fe.confirm=t=>Ve("ConfirmPrompt",t);fe.list=t=>{let e=t.separator||",";return Ve("TextPrompt",t,{onSubmit:n=>n.split(e).map(r=>r.trim())})};fe.toggle=t=>Ve("TogglePrompt",t);fe.select=t=>Ve("SelectPrompt",t);fe.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=n=>n.filter(r=>r.selected).map(r=>r.value);return Ve("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};fe.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=n=>n.filter(r=>r.selected).map(r=>r.value);return Ve("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var aS=(t,e)=>Promise.resolve(e.filter(n=>n.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));fe.autocomplete=t=>(t.suggest=t.suggest||aS,t.choices=[].concat(t.choices||[]),Ve("AutocompletePrompt",t))});var Hp=S((YO,Lp)=>{"use strict";var Ra=Vp(),lS=["suggest","format","onState","validate","onRender","type"],qp=()=>{};async function xt(t=[],{onSubmit:e=qp,onCancel:n=qp}={}){let r={},s=xt._override||{};t=[].concat(t);let i,o,a,l,d,u,c=async(h,f,v=!1)=>{if(!(!v&&h.validate&&h.validate(f)!==!0))return h.format?await h.format(f,r):f};for(o of t)if({name:l,type:d}=o,typeof d=="function"&&(d=await d(i,{...r},o),o.type=d),!!d){for(let h in o){if(lS.includes(h))continue;let f=o[h];o[h]=typeof f=="function"?await f(i,{...r},u):f}if(u=o,typeof o.message!="string")throw new Error("prompt message is required");if({name:l,type:d}=o,Ra[d]===void 0)throw new Error(`prompt type (${d}) is not defined`);if(s[o.name]!==void 0&&(i=await c(o,s[o.name]),i!==void 0)){r[l]=i;continue}try{i=xt._injected?cS(xt._injected,o.initial):await Ra[d](o),r[l]=i=await c(o,i,!0),a=await e(o,i,r)}catch{a=!await n(o,r)}if(a)return r}return r}function cS(t,e){let n=t.shift();if(n instanceof Error)throw n;return n===void 0?e:n}function uS(t){xt._injected=(xt._injected||[]).concat(t)}function dS(t){xt._override=Object.assign({},t)}Lp.exports=Object.assign(xt,{prompt:xt,prompts:Ra,inject:uS,override:dS})});var Ut=S((JO,Gp)=>{"use strict";function hS(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,n=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(n[e]>t[e])return!1;if(t[e]>n[e])return!0}return!1}Gp.exports=hS("8.6.0")?fh():Hp()});var It=q(Un(),1);var pu=q(hu(),1),{program:TE,createCommand:$E,createArgument:RE,createOption:NE,CommanderError:kE,InvalidArgumentError:IE,InvalidOptionArgumentError:DE,Command:xe,Argument:PE,Option:fu,Help:ME}=pu.default;var Ml=q(Ut(),1);var Up=(t=0)=>e=>`\x1B[${e+t}m`,Wp=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Bp=(t=0)=>(e,n,r)=>`\x1B[${38+t};2;${e};${n};${r}m`,H={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},XO=Object.keys(H.modifier),pS=Object.keys(H.color),fS=Object.keys(H.bgColor),ZO=[...pS,...fS];function mS(){let t=new Map;for(let[e,n]of Object.entries(H)){for(let[r,s]of Object.entries(n))H[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[r]=H[r],t.set(s[0],s[1]);Object.defineProperty(H,e,{value:n,enumerable:!1})}return Object.defineProperty(H,"codes",{value:t,enumerable:!1}),H.color.close="\x1B[39m",H.bgColor.close="\x1B[49m",H.color.ansi=Up(),H.color.ansi256=Wp(),H.color.ansi16m=Bp(),H.bgColor.ansi=Up(10),H.bgColor.ansi256=Wp(10),H.bgColor.ansi16m=Bp(10),Object.defineProperties(H,{rgbToAnsi256:{value(e,n,r){return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(e){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(i=>i+i).join(""));let s=Number.parseInt(r,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:e=>H.rgbToAnsi256(...H.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let n,r,s;if(e>=232)n=((e-232)*10+8)/255,r=n,s=n;else{e-=16;let a=e%36;n=Math.floor(e/36)/5,r=Math.floor(a/6)/5,s=a%6/5}let i=Math.max(n,r,s)*2;if(i===0)return 30;let o=30+(Math.round(s)<<2|Math.round(r)<<1|Math.round(n));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,n,r)=>H.ansi256ToAnsi(H.rgbToAnsi256(e,n,r)),enumerable:!1},hexToAnsi:{value:e=>H.ansi256ToAnsi(H.hexToAnsi256(e)),enumerable:!1}}),H}var gS=mS(),Re=gS;var ys=q(require("node:process"),1),Kp=q(require("node:os"),1),Na=q(require("node:tty"),1);function Ae(t,e=globalThis.Deno?globalThis.Deno.args:ys.default.argv){let n=t.startsWith("-")?"":t.length===1?"-":"--",r=e.indexOf(n+t),s=e.indexOf("--");return r!==-1&&(s===-1||r<s)}var{env:Y}=ys.default,bs;Ae("no-color")||Ae("no-colors")||Ae("color=false")||Ae("color=never")?bs=0:(Ae("color")||Ae("colors")||Ae("color=true")||Ae("color=always"))&&(bs=1);function _S(){if("FORCE_COLOR"in Y)return Y.FORCE_COLOR==="true"?1:Y.FORCE_COLOR==="false"?0:Y.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Y.FORCE_COLOR,10),3)}function vS(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function bS(t,{streamIsTTY:e,sniffFlags:n=!0}={}){let r=_S();r!==void 0&&(bs=r);let s=n?bs:r;if(s===0)return 0;if(n){if(Ae("color=16m")||Ae("color=full")||Ae("color=truecolor"))return 3;if(Ae("color=256"))return 2}if("TF_BUILD"in Y&&"AGENT_NAME"in Y)return 1;if(t&&!e&&s===void 0)return 0;let i=s||0;if(Y.TERM==="dumb")return i;if(ys.default.platform==="win32"){let o=Kp.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Y)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in Y)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Y)||Y.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in Y)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Y.TEAMCITY_VERSION)?1:0;if(Y.COLORTERM==="truecolor"||Y.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Y){let o=Number.parseInt((Y.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Y.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Y.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Y.TERM)||"COLORTERM"in Y?1:i}function zp(t,e={}){let n=bS(t,{streamIsTTY:t&&t.isTTY,...e});return vS(n)}var yS={stdout:zp({isTTY:Na.default.isatty(1)}),stderr:zp({isTTY:Na.default.isatty(2)})},Yp=yS;function Jp(t,e,n){let r=t.indexOf(e);if(r===-1)return t;let s=e.length,i=0,o="";do o+=t.slice(i,r)+e+n,i=r+s,r=t.indexOf(e,i);while(r!==-1);return o+=t.slice(i),o}function Xp(t,e,n,r){let s=0,i="";do{let o=t[r-1]==="\r";i+=t.slice(s,o?r-1:r)+e+(o?`\r
122
122
  `:`
123
123
  `)+n,s=r+1,r=t.indexOf(`
124
- `,s)}while(r!==-1);return i+=t.slice(s),i}var{stdout:zp,stderr:Yp}=Wp,Na=Symbol("GENERATOR"),cn=Symbol("STYLER"),Xn=Symbol("IS_EMPTY"),Jp=["ansi","ansi","ansi256","ansi16m"],un=Object.create(null),vS=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=zp?zp.level:0;t.level=e.level===void 0?n:e.level};var bS=t=>{let e=(...n)=>n.join(" ");return vS(e,t),Object.setPrototypeOf(e,Zn.prototype),e};function Zn(t){return bS(t)}Object.setPrototypeOf(Zn.prototype,Function.prototype);for(let[t,e]of Object.entries($e))un[t]={get(){let n=_s(this,Ia(e.open,e.close,this[cn]),this[Xn]);return Object.defineProperty(this,t,{value:n}),n}};un.visible={get(){let t=_s(this,this[cn],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var ka=(t,e,n,...r)=>t==="rgb"?e==="ansi16m"?$e[n].ansi16m(...r):e==="ansi256"?$e[n].ansi256($e.rgbToAnsi256(...r)):$e[n].ansi($e.rgbToAnsi(...r)):t==="hex"?ka("rgb",e,n,...$e.hexToRgb(...r)):$e[n][t](...r),yS=["rgb","hex","ansi256"];for(let t of yS){un[t]={get(){let{level:n}=this;return function(...r){let s=Ia(ka(t,Jp[n],"color",...r),$e.color.close,this[cn]);return _s(this,s,this[Xn])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);un[e]={get(){let{level:n}=this;return function(...r){let s=Ia(ka(t,Jp[n],"bgColor",...r),$e.bgColor.close,this[cn]);return _s(this,s,this[Xn])}}}}var wS=Object.defineProperties(()=>{},{...un,level:{enumerable:!0,get(){return this[Na].level},set(t){this[Na].level=t}}}),Ia=(t,e,n)=>{let r,s;return n===void 0?(r=t,s=e):(r=n.openAll+t,s=e+n.closeAll),{open:t,close:e,openAll:r,closeAll:s,parent:n}},_s=(t,e,n)=>{let r=(...s)=>CS(r,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(r,wS),r[Na]=t,r[cn]=e,r[Xn]=n,r},CS=(t,e)=>{if(t.level<=0||!e)return t[Xn]?"":e;let n=t[cn];if(n===void 0)return e;let{openAll:r,closeAll:s}=n;if(e.includes("\x1B"))for(;n!==void 0;)e=Kp(e,n.close,n.open),n=n.parent;let i=e.indexOf(`
125
- `);return i!==-1&&(e=Bp(e,s,r,i)),r+e+s};Object.defineProperties(Zn.prototype,un);var SS=Zn(),QO=Zn({level:Yp?Yp.level:0});var yt=SS;var E={print(...t){console.log(...t)},printError(...t){console.error(this.error(...qe(...t)))},printSuccess(...t){console.log(this.success(...qe(...t)))},printWarn(...t){console.log(this.warn(...qe(...t)))},printInfo(...t){console.log(this.info(...qe(...t)))},printDebug(...t){console.log(this.debug(...qe(...t)))},error(...t){return yt.red(...qe(...t))},success(...t){return yt.green(...qe(...t))},warn(...t){return yt.yellow(...qe(...t))},info(...t){return yt.blueBright(...qe(...t))},debug(...t){return yt.gray(...qe(...t))}};function qe(...t){return t?t.reduce((e,n)=>(n||e.push(""),n instanceof Error?e.push(n.message+`
126
- `+n.stack):typeof n=="string"?e.push(n):typeof n=="object"?e.push(JSON.stringify(n,null,2)):e.push(n.toString()),e),[]):[""]}var Pa=L(Jr(),1);var J=L(Jr(),1);var xS="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Xp=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=xS[n[t]&63];return e};function AS(t,e=!0,n=!1){let r=(0,J.ref)(),s,i=(0,J.ref)(!1),o=()=>{},a=new Proxy(t,{apply:function(u,c,h){let f;try{f=u(...h)}catch(v){f=v}if(f instanceof Error){if(r.value=f,s=f,e)throw o(),f}else i.value=!0,r.value=void 0,s=!0,o()}}),l=()=>{},d=new Proxy(u=>{r.value=u},{apply:function(u,c,h){u(...h),l(...h)}});return{promise:new Promise((u,c)=>{if(e&&s instanceof Error){c(s);return}else if(s===!0){u();return}let h;n&&(h=setTimeout(()=>{let f=new Error("timeout!");r.value=f,e&&c(f)},n)),o=()=>{h&&(clearTimeout(h),h=void 0),u()}}),callback:a,onError:d,resolved:(0,J.computed)(()=>i.value),error:(0,J.computed)(()=>r.value)}}function ES(){return Xp()}function OS(t){let e=TS(t);return(0,J.shallowReadonly)({states:e.states,commands:e.commands,events:e.events})}function TS(t){let e=t.states;for(let o of Object.keys(t.states))e[o]=(0,J.readonly)(e[o]);let n=(0,J.shallowReadonly)(t.states),r=(0,J.readonly)(t.commands),s={},i=t.events;for(let o in t.events)s[o]=i[o].api;return(0,J.shallowReadonly)({states:n,commands:r,events:(0,J.shallowReadonly)(s),destroy:t.destroy})}function vs(t){let{callback:e,onError:n,promise:r,resolved:s}=AS(()=>{},!1,5e3);function i(c){if(s.value===!0)throw new Error("Agg already initialized");o.push(c())}let o=[],a=t({onCreated(c){Promise.resolve().then(c)},onBeforeInitialize:i,isInitialized:(0,J.computed)(()=>s.value),untilInitialized:r});setTimeout(()=>Promise.all(o).then(()=>{e()}).catch(c=>{n(c)}),0);let l=a.states||{},d=a.commands||{},u=a.events||{};return{__id:ES(),type:"Singleton",api:OS({states:l,commands:d,events:u,destroy:()=>{}}),isInitialized:s,async untilInitialized(){return await r.catch(c=>{throw new Error(`Failed to initialize Agg: ${c.message}
127
- Stack : ${c.stack||"unkown"}`)})}}}var $S={"signal.{str}":"Error: {str}","signal.scriptStart":"===== Script start =====","signal.successComplete":"===== Program execution succeeded =====","signal.exitWithError":"===== Exit with error =====","question.subcommand":"Select the business type","question.subcommand.genCode":"Generate code","question.subcommand.genCode.language":"Select your programming language","question.subcommand.genCode.namespace":"Input your domain namespace","question.subcommand.genCode.package":"Input your domain package","question.subcommand.genCode.csharp.additions":"Select additional options","question.subcommand.genCode.csharp.additions.timezone":"Use [DateTimeOffset] to represent time","question.subcommand.genCode.csharp.additions.recordStruct":"Use record+struct value object","question.subcommand.genCode.csharp.additions.primaryConstructor":"Use primary constructor","question.subcommand.genCode.csharp.additions.commandHandlerInterface":"Implement custom CommandHandler interface","question.subcommand.genCode.csharp.additions.commandHandlerInterface.hint":"Please enter the custom CommandHandler interface name","question.subcommand.genCode.csharp.additions.aggInterface":"Implement custom Agg interface","question.subcommand.genCode.csharp.additions.aggInterface.hint":"Please enter the custom Agg interface name","question.subcommand.genCode.kotlin.additions":"Select additional options","question.subcommand.genCode.kotlin.additions.commandHandler":"Generate CommandHandler for each command","question.subcommand.genCode.kotlin.additions.valueClass":"Use value class (Kotlin1.5+)","question.subcommand.genCode.kotlin.additions.timezone":"Use [OffsetDateTime] to represent time","question.subcommand.genCode.java.additions":"Select additional options","question.subcommand.genCode.java.additions.springFramework":"Use spring container for development","question.subcommand.genCode.java.additions.lombok":"Use [@Getter, @RequiredArgsConstructor...] of lombok","question.subcommand.genCode.java.additions.lombokBuilder":"Use [@Builder] of lombok to avoid long parameter lists","question.subcommand.genCode.java.additions.commandHandler":"Generate CommandHandler for each command","question.subcommand.genCode.java.additions.recordVakueObject":"Use [java record] to generate value object (JDK16+)","question.subcommand.genCode.java.additions.timezone":"Use [OffsetDateTime] to represent time","question.subcommand.genCode.java.nonNullAnnotation":"Select non-null annotation","question.subcommand.genCode.additions.hint":"- Space to select. Return to submit","question.subcommand.init":"Initialize project","question.subcommand.updateWorkspace":"Update Workspace","question.subcommand.runWeb":"Run Web server","question.subcommand.runWeb.source":"Please enter the ts file directory","question.subcommand.info":"[ test ]","error.userCancel":"User canceled","error.invalidArgs{str}":"Invalid args: {str}","error.badArgs":"Bad args","error.shouldBeValidDir{dir}":"{dir} should be a valid directory","error.shouldBeEmptyDir{dir}":"{dir} should be an empty directory","error.noPackageManager":"No package manager found, please install bun or pnpm"},Da=$S;var RS={"signal.{str}":"\u9519\u8BEF: {str}","signal.scriptStart":"===== \u811A\u672C\u5F00\u59CB\u6267\u884C =====","signal.successComplete":"===== \u811A\u672C\u6267\u884C\u6210\u529F =====","signal.exitWithError":"===== \u811A\u672C\u5F02\u5E38\u9000\u51FA =====","question.subcommand":"\u8BF7\u9009\u62E9\u8981\u6267\u884C\u7684\u4E1A\u52A1\u7C7B\u578B","question.subcommand.genCode":"\u751F\u6210\u4EE3\u7801","question.subcommand.genCode.language":"\u9009\u62E9\u4F60\u7684\u7F16\u7A0B\u8BED\u8A00","question.subcommand.genCode.namespace":"\u8F93\u5165\u9886\u57DF\u6A21\u5757\u7684namespace\u540D\u79F0","question.subcommand.genCode.package":"\u8F93\u5165\u9886\u57DF\u6A21\u5757\u7684package\u540D\u79F0","question.subcommand.genCode.csharp.additions":"\u9009\u62E9\u9644\u52A0\u9009\u9879","question.subcommand.genCode.csharp.additions.timezone":"\u4F7F\u7528\u5305\u542B\u65F6\u533A\u7684DateTimeOffset\u8868\u793A\u65F6\u95F4","question.subcommand.genCode.csharp.additions.recordStruct":"\u4F7F\u7528record+struct\u503C\u5BF9\u8C61","question.subcommand.genCode.csharp.additions.primaryConstructor":"\u4F7F\u7528\u4E3B\u6784\u9020\u51FD\u6570","question.subcommand.genCode.csharp.additions.commandHandlerInterface":"\u5B9E\u73B0\u81EA\u5B9A\u4E49\u7684CommandHandler\u63A5\u53E3","question.subcommand.genCode.csharp.additions.commandHandlerInterface.hint":"\u8BF7\u8F93\u5165\u8981\u5B9E\u73B0\u7684\u81EA\u5B9A\u4E49CommandHandler\u63A5\u53E3\u540D\u79F0","question.subcommand.genCode.csharp.additions.aggInterface":"\u5B9E\u73B0\u81EA\u5B9A\u4E49\u7684Agg\u63A5\u53E3","question.subcommand.genCode.csharp.additions.aggInterface.hint":"\u8BF7\u8F93\u5165\u8981\u5B9E\u73B0\u7684\u81EA\u5B9A\u4E49Agg\u63A5\u53E3\u540D\u79F0","question.subcommand.genCode.kotlin.additions":"\u9009\u62E9\u9644\u52A0\u9009\u9879","question.subcommand.genCode.kotlin.additions.commandHandler":"\u4E3A\u6BCF\u4E2A\u547D\u4EE4\u751F\u6210CommandHandler","question.subcommand.genCode.kotlin.additions.valueClass":"\u4F7F\u7528\u503C\u7C7B\uFF08Kotlin1.5+\uFF09","question.subcommand.genCode.kotlin.additions.timezone":"\u4F7F\u7528\u5E26\u65F6\u533A\u7684OffsetDateTime\u8868\u793A\u65F6\u95F4","question.subcommand.genCode.java.additions":"\u9009\u62E9\u9644\u52A0\u9009\u9879","question.subcommand.genCode.java.additions.springFramework":"\u4F7F\u7528spring\u5BB9\u5668\u8FDB\u884C\u5F00\u53D1","question.subcommand.genCode.java.additions.lombok":"\u4F7F\u7528lombok\u5E38\u7528\u7684Getter\u7B49\u6CE8\u89E3","question.subcommand.genCode.java.additions.lombokBuilder":"\u4F7F\u7528lombok\u7684Builder\u6CE8\u89E3\u907F\u514D\u957F\u53C2\u6570\u5217\u8868","question.subcommand.genCode.java.additions.commandHandler":"\u4E3A\u6BCF\u4E2A\u547D\u4EE4\u751F\u6210CommandHandler","question.subcommand.genCode.java.additions.recordVakueObject":"\u4F7F\u7528record\u7C7B\u751F\u6210\u503C\u5BF9\u8C61\uFF08JDK16+\uFF09","question.subcommand.genCode.java.additions.timezone":"\u4F7F\u7528\u5E26\u65F6\u533A\u7684OffsetDateTime\u8868\u793A\u65F6\u95F4","question.subcommand.genCode.java.nonNullAnnotation":"\u9009\u62E9\u975E\u7A7A\u6CE8\u89E3","question.subcommand.genCode.additions.hint":"- \u7A7A\u683C\u52FE\u9009\uFF0C\u56DE\u8F66\u63D0\u4EA4","question.subcommand.init":"\u521D\u59CB\u5316\u9879\u76EE","question.subcommand.updateWorkspace":"\u66F4\u65B0\u4F9D\u8D56","question.subcommand.runWeb":"\u8FD0\u884C Web \u670D\u52A1","question.subcommand.runWeb.source":"\u8BF7\u8F93\u5165ts\u6587\u4EF6\u76EE\u5F55","question.subcommand.info":"\u3010\u6D4B\u8BD5\u3011","error.userCancel":"\u7528\u6237\u7EC8\u6B62\u4E86\u811A\u672C\u6267\u884C","error.invalidArgs{str}":"\u65E0\u6548\u7684\u53C2\u6570: {str}","error.badArgs":"\u9519\u8BEF\u7684\u53C2\u6570","error.shouldBeValidDir{dir}":"{dir} \u5E94\u8BE5\u662F\u4E00\u4E2A\u6709\u6548\u7684\u76EE\u5F55","error.shouldBeEmptyDir{dir}":"{dir} \u5E94\u8BE5\u662F\u4E00\u4E2A\u7A7A\u76EE\u5F55","error.noPackageManager":"\u672A\u627E\u5230\u5305\u7BA1\u7406\u5668,\u8BF7\u5B89\u88C5 bun \u6216 pnpm"},Zp=RS;var NS=vs(()=>{let t=(0,Pa.ref)("zh"),e=(0,Pa.ref)(Da);function n(r,s,i){let o=e.value[r];return o||(typeof s=="string"?o=s:typeof i=="string"&&(o=i)),o?(typeof s=="object"&&(o=o.replace(/\{\s*([a-zA-z_]+)\s*\}/g,(a,l)=>String(s[l]))),o):""}return{states:{currentLang:t},commands:{t:n,setCurrentLang(r){r==="en"?e.value=Da:r==="zh"?e.value=Zp:isNever(r),t.value=r}}}});function X(){return NS.api}var kS=X().commands.t;function Q(){throw Error(kS("error.userCancel"))}var Z={name:"@ddd-tool/domain-designer-cli",version:"0.1.0-beta.1",private:!0,type:"module",files:["./src"],repository:{type:"git",url:"git+https://github.com/ddd-tool/domain-designer-cli-node.git"},bugs:{url:"https://github.com/ddd-tool/domain-designer-cli-node/issues"},readme:"ERROR: No README data found!",homepage:"https://github.com/ddd-tool/domain-designer-cli-node#readme",_id:"@ddd-tool/domain-designer-cli@0.1.0-beta.1"};var Lt=require("child_process"),Qp=L(require("os"),1),Qn=L(require("path"),1);function bs(){return process.env.PACKAGE_MANAGER==="bun"?Qn.default.resolve(Qn.default.dirname(process.argv[1]),"..","install","global","node_modules","@ddd-tool","domain-designer-cli").replace(/\\/g,"/"):Qn.default.resolve(Qn.default.dirname(process.argv[1]),"..").replace(/\\/g,"/")}function ef(){let t=er(),e=null;return t==="windows"?e=(0,Lt.spawnSync)("where bun",{encoding:"utf-8",shell:!0}).status:t==="linux"?e=(0,Lt.spawnSync)("hash bun",{encoding:"utf-8",shell:!0}).status:t==="mac"&&(e=(0,Lt.spawnSync)("hash bun",{encoding:"utf-8",shell:!0}).status),e===0}function tf(){let t=er(),e=null;return t==="windows"?e=(0,Lt.spawnSync)("where pnpm",{encoding:"utf-8",shell:!0}).status:t==="linux"?e=(0,Lt.spawnSync)("hash pnpm",{encoding:"utf-8",shell:!0}).status:t==="mac"&&(e=(0,Lt.spawnSync)("hash pnpm",{encoding:"utf-8",shell:!0}).status),e===0}function er(){let t=Qp.default.type();return t==="Windows_NT"?"windows":t==="Linux"?"linux":t==="Darwin"?"mac":"undefined"}function ys(){let t=Z.repository.url.replace(/git\+/g,""),e=`REM App Name: Domain Designer Cli
128
- REM Script Version: ${Z.version}
129
- REM Repo Addr: ${t}
130
- REM Package Manager: ${process.env.PACKAGE_MANAGER}
124
+ `,s)}while(r!==-1);return i+=t.slice(s),i}var{stdout:Zp,stderr:Qp}=Yp,ka=Symbol("GENERATOR"),mn=Symbol("STYLER"),rr=Symbol("IS_EMPTY"),ef=["ansi","ansi","ansi256","ansi16m"],gn=Object.create(null),wS=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=Zp?Zp.level:0;t.level=e.level===void 0?n:e.level};var CS=t=>{let e=(...n)=>n.join(" ");return wS(e,t),Object.setPrototypeOf(e,sr.prototype),e};function sr(t){return CS(t)}Object.setPrototypeOf(sr.prototype,Function.prototype);for(let[t,e]of Object.entries(Re))gn[t]={get(){let n=ws(this,Da(e.open,e.close,this[mn]),this[rr]);return Object.defineProperty(this,t,{value:n}),n}};gn.visible={get(){let t=ws(this,this[mn],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Ia=(t,e,n,...r)=>t==="rgb"?e==="ansi16m"?Re[n].ansi16m(...r):e==="ansi256"?Re[n].ansi256(Re.rgbToAnsi256(...r)):Re[n].ansi(Re.rgbToAnsi(...r)):t==="hex"?Ia("rgb",e,n,...Re.hexToRgb(...r)):Re[n][t](...r),SS=["rgb","hex","ansi256"];for(let t of SS){gn[t]={get(){let{level:n}=this;return function(...r){let s=Da(Ia(t,ef[n],"color",...r),Re.color.close,this[mn]);return ws(this,s,this[rr])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);gn[e]={get(){let{level:n}=this;return function(...r){let s=Da(Ia(t,ef[n],"bgColor",...r),Re.bgColor.close,this[mn]);return ws(this,s,this[rr])}}}}var xS=Object.defineProperties(()=>{},{...gn,level:{enumerable:!0,get(){return this[ka].level},set(t){this[ka].level=t}}}),Da=(t,e,n)=>{let r,s;return n===void 0?(r=t,s=e):(r=n.openAll+t,s=e+n.closeAll),{open:t,close:e,openAll:r,closeAll:s,parent:n}},ws=(t,e,n)=>{let r=(...s)=>AS(r,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(r,xS),r[ka]=t,r[mn]=e,r[rr]=n,r},AS=(t,e)=>{if(t.level<=0||!e)return t[rr]?"":e;let n=t[mn];if(n===void 0)return e;let{openAll:r,closeAll:s}=n;if(e.includes("\x1B"))for(;n!==void 0;)e=Jp(e,n.close,n.open),n=n.parent;let i=e.indexOf(`
125
+ `);return i!==-1&&(e=Xp(e,s,r,i)),r+e+s};Object.defineProperties(sr.prototype,gn);var ES=sr(),i0=sr({level:Qp?Qp.level:0});var qe=ES;var Le=require("child_process"),Pa=q(require("fs"),1),nf=q(require("os"),1),At=q(require("path"),1),ir=q(Un(),1);var X=q(Un(),1);var OS="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",tf=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=OS[n[t]&63];return e};function TS(t,e=!0,n=!1){let r=(0,X.ref)(),s,i=(0,X.ref)(!1),o=()=>{},a=new Proxy(t,{apply:function(u,c,h){let f;try{f=u(...h)}catch(v){f=v}if(f instanceof Error){if(r.value=f,s=f,e)throw o(),f}else i.value=!0,r.value=void 0,s=!0,o()}}),l=()=>{},d=new Proxy(u=>{r.value=u},{apply:function(u,c,h){u(...h),l(...h)}});return{promise:new Promise((u,c)=>{if(e&&s instanceof Error){c(s);return}else if(s===!0){u();return}let h;n&&(h=setTimeout(()=>{let f=new Error("timeout!");r.value=f,e&&c(f)},n)),o=()=>{h&&(clearTimeout(h),h=void 0),u()}}),callback:a,onError:d,resolved:(0,X.computed)(()=>i.value),error:(0,X.computed)(()=>r.value)}}function $S(){return tf()}function RS(t){let e=NS(t);return(0,X.shallowReadonly)({states:e.states,commands:e.commands,events:e.events})}function NS(t){let e=t.states;for(let o of Object.keys(t.states))e[o]=(0,X.readonly)(e[o]);let n=(0,X.shallowReadonly)(t.states),r=(0,X.readonly)(t.commands),s={},i=t.events;for(let o in t.events)s[o]=i[o].api;return(0,X.shallowReadonly)({states:n,commands:r,events:(0,X.shallowReadonly)(s),destroy:t.destroy})}function _n(t){let{callback:e,onError:n,promise:r,resolved:s}=TS(()=>{},!1,5e3);function i(c){if(s.value===!0)throw new Error("Agg already initialized");o.push(c())}let o=[],a=t({onCreated(c){Promise.resolve().then(c)},onBeforeInitialize:i,isInitialized:(0,X.computed)(()=>s.value),untilInitialized:r});setTimeout(()=>Promise.all(o).then(()=>{e()}).catch(c=>{n(c)}),0);let l=a.states||{},d=a.commands||{},u=a.events||{};return{__id:$S(),type:"Singleton",api:RS({states:l,commands:d,events:u,destroy:()=>{}}),isInitialized:s,async untilInitialized(){return await r.catch(c=>{throw new Error(`Failed to initialize Agg: ${c.message}
126
+ Stack : ${c.stack||"unkown"}`)})}}}var kS=_n(()=>{let t=(0,ir.ref)(!1),e=At.default.basename(process.argv[0]),n=(0,ir.ref)("npm");if(e.includes("bun"))n.value="bun";else if(e.includes("node"))o()?n.value="pnpm":n.value="npm";else throw new Error("unknown package manager");let r=(0,ir.ref)(At.default.resolve(At.default.dirname(process.argv[1]),"..").replace(/\\/g,"/"));if(!Pa.default.existsSync(At.default.join(r.value,"templates"))||!Pa.default.statSync(At.default.join(r.value,"templates")).isDirectory())if(n.value==="bun")r.value=At.default.resolve(At.default.dirname(process.argv[1]),"..","install","global","node_modules","@ddd-tool","domain-designer-cli").replace(/\\/g,"/");else throw new Error("unknown webRoot manager");let s=(0,ir.ref)(function(){if(Intl&&Intl.DateTimeFormat){let d=Intl.DateTimeFormat().resolvedOptions();if(d&&d.locale)return d.locale}if(typeof navigator<"u"){let d=navigator;return d.language||d.userLanguage||d.browserLanguage||d.systemLanguage||"en-US"}if(typeof process<"u"){let d=process.env,u=d.LC_ALL||d.LC_MESSAGES||d.LANG||d.LANGUAGE;return u?u.split(/\./)[0].replace("_","-"):"en-US"}return"en-US"}());function i(){let d=l(),u=null;return d==="windows"?u=(0,Le.spawnSync)("where.exe bun",{encoding:"utf-8",shell:!0}).status:d==="linux"?u=(0,Le.spawnSync)("hash bun",{encoding:"utf-8",shell:!0}).status:d==="mac"&&(u=(0,Le.spawnSync)("hash bun",{encoding:"utf-8",shell:!0}).status),u===0}function o(){let d=l(),u=null;return d==="windows"?u=(0,Le.spawnSync)("where.exe pnpm",{encoding:"utf-8",shell:!0}).status:d==="linux"?u=(0,Le.spawnSync)("hash pnpm",{encoding:"utf-8",shell:!0}).status:d==="mac"&&(u=(0,Le.spawnSync)("hash pnpm",{encoding:"utf-8",shell:!0}).status),u===0}function a(){let d=l(),u=null;return d==="windows"?u=(0,Le.spawnSync)("where.exe npm",{encoding:"utf-8",shell:!0}).status:d==="linux"?u=(0,Le.spawnSync)("hash npm",{encoding:"utf-8",shell:!0}).status:d==="mac"&&(u=(0,Le.spawnSync)("hash npm",{encoding:"utf-8",shell:!0}).status),u===0}function l(){let d=nf.default.type();return d==="Windows_NT"?"windows":d==="Linux"?"linux":d==="Darwin"?"mac":"undefined"}return{states:{packageManager:n,webRoot:r,osLanguage:s,debugMode:t},commands:{checkBun:i,checkNpm:a,checkPnpm:o,checkOS:l,setDebugMode(d){t.value=d}}}});function ee(){return kS.api}var x={print(...t){console.log(...t)},printError(...t){console.error(this.error(...He(...t)))},printSuccess(...t){console.log(this.success(...He(...t)))},printWarn(...t){console.log(this.warn(...He(...t)))},printInfo(...t){console.log(this.info(...He(...t)))},printDebug(...t){ee().states.debugMode.value&&console.log(this.debug(...He(...t)))},error(...t){return qe.red(...He(...t))},success(...t){return qe.green(...He(...t))},warn(...t){return qe.yellow(...He(...t))},info(...t){return qe.blueBright(...He(...t))},debug(...t){return qe.gray(...He(...t))}};function He(...t){return t?t.reduce((e,n)=>(n||e.push(""),n instanceof Error?e.push(n.message+`
127
+ `+n.stack):typeof n=="string"?e.push(n):typeof n=="object"?e.push(JSON.stringify(n,null,2)):e.push(n.toString()),e),[]):[""]}var ja=q(Un(),1);var IS={"signal.{str}":"Error: {str}","signal.scriptStart":"===== Script start =====","signal.successComplete":"===== Program execution succeeded =====","signal.exitWithError":"===== Exit with error =====","question.subcommand":"Select the business type","question.subcommand.genCode":"Generate code","question.subcommand.genCode.language":"Select your programming language","question.subcommand.genCode.namespace":"Input your domain namespace","question.subcommand.genCode.package":"Input your domain package","question.subcommand.genCode.csharp.additions":"Select additional options","question.subcommand.genCode.csharp.additions.timezone":"Use [DateTimeOffset] to represent time","question.subcommand.genCode.csharp.additions.recordStruct":"Use record+struct value object","question.subcommand.genCode.csharp.additions.primaryConstructor":"Use primary constructor","question.subcommand.genCode.csharp.additions.commandHandlerInterface":"Implement custom CommandHandler interface","question.subcommand.genCode.csharp.additions.commandHandlerInterface.hint":"Please enter the custom CommandHandler interface name","question.subcommand.genCode.csharp.additions.aggInterface":"Implement custom Agg interface","question.subcommand.genCode.csharp.additions.aggInterface.hint":"Please enter the custom Agg interface name","question.subcommand.genCode.kotlin.additions":"Select additional options","question.subcommand.genCode.kotlin.additions.commandHandler":"Generate CommandHandler for each command","question.subcommand.genCode.kotlin.additions.valueClass":"Use value class (Kotlin1.5+)","question.subcommand.genCode.kotlin.additions.timezone":"Use [OffsetDateTime] to represent time","question.subcommand.genCode.java.additions":"Select additional options","question.subcommand.genCode.java.additions.springFramework":"Use spring container for development","question.subcommand.genCode.java.additions.lombok":"Use [@Getter, @RequiredArgsConstructor...] of lombok","question.subcommand.genCode.java.additions.lombokBuilder":"Use [@Builder] of lombok to avoid long parameter lists","question.subcommand.genCode.java.additions.commandHandler":"Generate CommandHandler for each command","question.subcommand.genCode.java.additions.recordVakueObject":"Use [java record] to generate value object (JDK16+)","question.subcommand.genCode.java.additions.timezone":"Use [OffsetDateTime] to represent time","question.subcommand.genCode.java.nonNullAnnotation":"Select non-null annotation","question.subcommand.genCode.additions.hint":"- Space to select. Return to submit","question.subcommand.init":"Initialize project","question.subcommand.updateWorkspace":"Update Workspace","question.subcommand.runWeb":"Run Web server","question.subcommand.runWeb.source":"Please enter the ts file directory","question.subcommand.info":"[ test ]","error.userCancel":"User canceled","error.invalidArgs{str}":"Invalid args: {str}","error.badArgs":"Bad args","error.shouldBeValidDir{dir}":"{dir} should be a valid directory","error.shouldBeValidWorkspaceOrEmptyDir{dir}":"{dir} should be a valid workspace or an empty directory","error.shouldBeEmptyDir{dir}":"{dir} should be an empty directory","error.noPackageManager":"No package manager found, please install bun or pnpm"},Ma=IS;var DS={"signal.{str}":"\u9519\u8BEF: {str}","signal.scriptStart":"===== \u811A\u672C\u5F00\u59CB\u6267\u884C =====","signal.successComplete":"===== \u811A\u672C\u6267\u884C\u6210\u529F =====","signal.exitWithError":"===== \u811A\u672C\u5F02\u5E38\u9000\u51FA =====","question.subcommand":"\u8BF7\u9009\u62E9\u8981\u6267\u884C\u7684\u4E1A\u52A1\u7C7B\u578B","question.subcommand.genCode":"\u751F\u6210\u4EE3\u7801","question.subcommand.genCode.language":"\u9009\u62E9\u4F60\u7684\u7F16\u7A0B\u8BED\u8A00","question.subcommand.genCode.namespace":"\u8F93\u5165\u9886\u57DF\u6A21\u5757\u7684namespace\u540D\u79F0","question.subcommand.genCode.package":"\u8F93\u5165\u9886\u57DF\u6A21\u5757\u7684package\u540D\u79F0","question.subcommand.genCode.csharp.additions":"\u9009\u62E9\u9644\u52A0\u9009\u9879","question.subcommand.genCode.csharp.additions.timezone":"\u4F7F\u7528\u5305\u542B\u65F6\u533A\u7684DateTimeOffset\u8868\u793A\u65F6\u95F4","question.subcommand.genCode.csharp.additions.recordStruct":"\u4F7F\u7528record+struct\u503C\u5BF9\u8C61","question.subcommand.genCode.csharp.additions.primaryConstructor":"\u4F7F\u7528\u4E3B\u6784\u9020\u51FD\u6570","question.subcommand.genCode.csharp.additions.commandHandlerInterface":"\u5B9E\u73B0\u81EA\u5B9A\u4E49\u7684CommandHandler\u63A5\u53E3","question.subcommand.genCode.csharp.additions.commandHandlerInterface.hint":"\u8BF7\u8F93\u5165\u8981\u5B9E\u73B0\u7684\u81EA\u5B9A\u4E49CommandHandler\u63A5\u53E3\u540D\u79F0","question.subcommand.genCode.csharp.additions.aggInterface":"\u5B9E\u73B0\u81EA\u5B9A\u4E49\u7684Agg\u63A5\u53E3","question.subcommand.genCode.csharp.additions.aggInterface.hint":"\u8BF7\u8F93\u5165\u8981\u5B9E\u73B0\u7684\u81EA\u5B9A\u4E49Agg\u63A5\u53E3\u540D\u79F0","question.subcommand.genCode.kotlin.additions":"\u9009\u62E9\u9644\u52A0\u9009\u9879","question.subcommand.genCode.kotlin.additions.commandHandler":"\u4E3A\u6BCF\u4E2A\u547D\u4EE4\u751F\u6210CommandHandler","question.subcommand.genCode.kotlin.additions.valueClass":"\u4F7F\u7528\u503C\u7C7B\uFF08Kotlin1.5+\uFF09","question.subcommand.genCode.kotlin.additions.timezone":"\u4F7F\u7528\u5E26\u65F6\u533A\u7684OffsetDateTime\u8868\u793A\u65F6\u95F4","question.subcommand.genCode.java.additions":"\u9009\u62E9\u9644\u52A0\u9009\u9879","question.subcommand.genCode.java.additions.springFramework":"\u4F7F\u7528spring\u5BB9\u5668\u8FDB\u884C\u5F00\u53D1","question.subcommand.genCode.java.additions.lombok":"\u4F7F\u7528lombok\u5E38\u7528\u7684Getter\u7B49\u6CE8\u89E3","question.subcommand.genCode.java.additions.lombokBuilder":"\u4F7F\u7528lombok\u7684Builder\u6CE8\u89E3\u907F\u514D\u957F\u53C2\u6570\u5217\u8868","question.subcommand.genCode.java.additions.commandHandler":"\u4E3A\u6BCF\u4E2A\u547D\u4EE4\u751F\u6210CommandHandler","question.subcommand.genCode.java.additions.recordVakueObject":"\u4F7F\u7528record\u7C7B\u751F\u6210\u503C\u5BF9\u8C61\uFF08JDK16+\uFF09","question.subcommand.genCode.java.additions.timezone":"\u4F7F\u7528\u5E26\u65F6\u533A\u7684OffsetDateTime\u8868\u793A\u65F6\u95F4","question.subcommand.genCode.java.nonNullAnnotation":"\u9009\u62E9\u975E\u7A7A\u6CE8\u89E3","question.subcommand.genCode.additions.hint":"- \u7A7A\u683C\u52FE\u9009\uFF0C\u56DE\u8F66\u63D0\u4EA4","question.subcommand.init":"\u521D\u59CB\u5316\u9879\u76EE","question.subcommand.updateWorkspace":"\u66F4\u65B0\u4F9D\u8D56","question.subcommand.runWeb":"\u8FD0\u884C Web \u670D\u52A1","question.subcommand.runWeb.source":"\u8BF7\u8F93\u5165ts\u6587\u4EF6\u76EE\u5F55","question.subcommand.info":"\u3010\u6D4B\u8BD5\u3011","error.userCancel":"\u7528\u6237\u7EC8\u6B62\u4E86\u811A\u672C\u6267\u884C","error.invalidArgs{str}":"\u65E0\u6548\u7684\u53C2\u6570: {str}","error.badArgs":"\u9519\u8BEF\u7684\u53C2\u6570","error.shouldBeValidDir{dir}":"{dir} \u5E94\u8BE5\u662F\u4E00\u4E2A\u6709\u6548\u7684\u76EE\u5F55","error.shouldBeValidWorkspaceOrEmptyDir{dir}":"{dir} \u5E94\u8BE5\u662F \u4E00\u4E2A\u7A7A\u76EE\u5F55 \u6216\u8005 \u4E00\u4E2A\u6709\u6548\u7684\u5DE5\u4F5C\u533A","error.shouldBeEmptyDir{dir}":"{dir} \u5E94\u8BE5\u662F\u4E00\u4E2A\u7A7A\u76EE\u5F55","error.noPackageManager":"\u672A\u627E\u5230\u5305\u7BA1\u7406\u5668,\u8BF7\u5B89\u88C5 bun \u6216 pnpm"},rf=DS;var PS=_n(()=>{let t=(0,ja.ref)("zh"),e=(0,ja.ref)(Ma);function n(r,s,i){let o=e.value[r];return o||(typeof s=="string"?o=s:typeof i=="string"&&(o=i)),o?(typeof s=="object"&&(o=o.replace(/\{\s*([a-zA-z_]+)\s*\}/g,(a,l)=>String(s[l]))),o):""}return{states:{currentLang:t},commands:{t:n,setCurrentLang(r){r==="en"?e.value=Ma:r==="zh"?e.value=rf:isNever(r),t.value=r}}}});function Z(){return PS.api}var MS=Z().commands.t;function Q(){throw Error(MS("error.userCancel"))}var B={name:"@ddd-tool/domain-designer-cli",version:"0.1.0-beta.3",private:!0,type:"module",files:["./src"],repository:{type:"git",url:"git+https://github.com/ddd-tool/domain-designer-cli-node.git"},bugs:{url:"https://github.com/ddd-tool/domain-designer-cli-node/issues"},readme:"ERROR: No README data found!",homepage:"https://github.com/ddd-tool/domain-designer-cli-node#readme",_id:"@ddd-tool/domain-designer-cli@0.1.0-beta.3"};function Cs(){let t=ee(),e=t.states.packageManager.value,n=B.repository.url.replace(/git\+/g,""),r=`REM App Name: Domain Designer Cli
128
+ REM Script Version: ${B.version}
129
+ REM Repo Addr: ${n}
130
+ REM Package Manager: ${e}
131
131
 
132
132
  @echo off
133
133
  setlocal
134
134
  set "scriptPath=%~dp0"
135
135
 
136
- ${process.env.PACKAGE_MANAGER==="bun"?"bunx ":""}domain-designer-cli runWeb --source=%scriptPath%
137
- `,n=`#!/bin/bash
136
+ ${e==="bun"?"bunx ":""}domain-designer-cli runWeb --source=%scriptPath%
137
+ `,s=`#!/bin/bash
138
138
  # App Name: Domain Designer Cli
139
- # Script Version: ${Z.version}
140
- # Repo Addr: ${t}
141
- # Package Manager: ${process.env.PACKAGE_MANAGER}
139
+ # Script Version: ${B.version}
140
+ # Repo Addr: ${n}
141
+ # Package Manager: ${e}
142
142
 
143
- ${process.env.PACKAGE_MANAGER==="bun"?"bunx ":""}domain-designer-cli runWeb --source="$(dirname "$(realpath "$0")")"
144
- `,r=`#!/bin/bash
143
+ ${e==="bun"?"bunx ":""}domain-designer-cli runWeb --source="$(dirname "$(realpath "$0")")"
144
+ `,i=`#!/bin/bash
145
145
  # App Name: Domain Designer Cli
146
- # Script Version: ${Z.version}
147
- # Repo Addr: ${t}
148
- # Package Manager: ${process.env.PACKAGE_MANAGER}
146
+ # Script Version: ${B.version}
147
+ # Repo Addr: ${n}
148
+ # Package Manager: ${e}
149
149
 
150
- ${process.env.PACKAGE_MANAGER==="bun"?"bunx ":""}domain-designer-cli runWeb --source="$(dirname "$(realpath "$0")")"
151
- `,s=er();if(s==="windows")return{name:"RunWeb.bat",content:e};if(s==="linux")return{name:"RunWeb.sh",content:n};if(s==="mac")return{name:"RunWeb.sh",content:r};E.printError(`Unsupported OS: ${s}`)}function ws(){let t=Z.repository.url.replace(/git\+/g,""),e=`REM App Name: Domain Designer Cli
152
- REM Script Version: ${Z.version}
153
- REM Repo Addr: ${t}
154
- REM Package Manager: ${process.env.PACKAGE_MANAGER}
150
+ ${e==="bun"?"bunx ":""}domain-designer-cli runWeb --source="$(dirname "$(realpath "$0")")"
151
+ `,o=t.commands.checkOS();if(o==="windows")return{name:"RunWeb.bat",content:r};if(o==="linux")return{name:"RunWeb.sh",content:s};if(o==="mac")return{name:"RunWeb.sh",content:i};x.printError(`Unsupported OS: ${o}`)}function Ss(){let t=ee(),e=t.states.packageManager.value,n=B.repository.url.replace(/git\+/g,""),r=`REM App Name: Domain Designer Cli
152
+ REM Script Version: ${B.version}
153
+ REM Repo Addr: ${n}
154
+ REM Package Manager: ${e}
155
155
 
156
156
  @echo off
157
157
  setlocal
158
158
  set "scriptPath=%~dp0"
159
159
 
160
- domain-designer-cli genCode --source=%scriptPath%
161
- `,n=`#!/bin/bash
160
+ ${e==="bun"?"bunx ":""}domain-designer-cli genCode --source=%scriptPath%
161
+ `,s=`#!/bin/bash
162
162
  # App Name: Domain Designer Cli
163
- # Script Version: ${Z.version}
164
- # Repo Addr: ${t}
165
- # Package Manager: ${process.env.PACKAGE_MANAGER}
163
+ # Script Version: ${B.version}
164
+ # Repo Addr: ${n}
165
+ # Package Manager: ${e}
166
166
 
167
- domain-designer-cli genCode --source="$(dirname "$(realpath "$0")")"
168
- `,r=`#!/bin/bash
167
+ ${e==="bun"?"bunx ":""}domain-designer-cli genCode --source="$(dirname "$(realpath "$0")")"
168
+ `,i=`#!/bin/bash
169
169
  # App Name: Domain Designer Cli
170
- # Script Version: ${Z.version}
171
- # Repo Addr: ${t}
172
- # Package Manager: ${process.env.PACKAGE_MANAGER}
170
+ # Script Version: ${B.version}
171
+ # Repo Addr: ${n}
172
+ # Package Manager: ${e}
173
173
 
174
- domain-designer-cli genCode --source="$(dirname "$(realpath "$0")")"
175
- `,s=er();if(s==="windows")return{name:"GenCode.bat",content:e};if(s==="linux")return{name:"GenCode.sh",content:n};if(s==="mac")return{name:"GenCode.sh",content:r};E.printError(`Unsupported OS: ${s}`)}function Cs(){return{name:".gitignore",content:`!node_modules
174
+ ${e==="bun"?"bunx ":""}domain-designer-cli genCode --source="$(dirname "$(realpath "$0")")"
175
+ `,o=t.commands.checkOS();if(o==="windows")return{name:"GenCode.bat",content:r};if(o==="linux")return{name:"GenCode.sh",content:s};if(o==="mac")return{name:"GenCode.sh",content:i};x.printError(`Unsupported OS: ${o}`)}function xs(){return{name:".gitignore",content:`!node_modules
176
176
  .output
177
177
 
178
- !*.bat
179
- !*.sh
180
- `}}var hn=L(require("path"),1),Ht=L(require("fs"),1);var Re=L(require("fs"),1),Ma=L(require("path"),1);function tr(t,e,n={}){if(!Re.default.existsSync(t))throw new Error(`Source folder does not exist: ${t}`);Re.default.existsSync(e)||Re.default.mkdirSync(e,{recursive:!0});let r=Re.default.readdirSync(t,{withFileTypes:!0});for(let s of r){let i=Ma.default.join(t,s.name),o=Ma.default.join(e,s.name);n.ignore&&n.ignore.includes(s.name)||n.pattern&&!n.pattern.test(s.name)||(s.isDirectory()?tr(i,o):Re.default.copyFileSync(i,o))}}function nr(t){Re.default.existsSync(t)&&(Re.default.readdirSync(t).forEach(e=>{let n=t+"/"+e;Re.default.lstatSync(n).isDirectory()?nr(n):Re.default.unlinkSync(n)}),Re.default.rmdirSync(t))}var nf=X().commands.t;function rf(t){return new Se().name("init").option("--source <sourceDir>","ts files' dir").action(e=>{t.currentCommand.value="init",e.source&&(t.args.source=e.source)}).addHelpText("before",`Initialize the workspace.
178
+ *.bat
179
+ *.sh
180
+ `}}var Bt=q(require("path"),1),Wt=q(require("fs"),1);var Ne=q(require("fs"),1),Fa=q(require("path"),1);function or(t,e,n={}){if(!Ne.default.existsSync(t))throw new Error(`Source folder does not exist: ${t}`);Ne.default.existsSync(e)||Ne.default.mkdirSync(e,{recursive:!0});let r=Ne.default.readdirSync(t,{withFileTypes:!0});for(let s of r){let i=Fa.default.join(t,s.name),o=Fa.default.join(e,s.name);n.ignore&&n.ignore.includes(s.name)||n.pattern&&!n.pattern.test(s.name)||(s.isDirectory()?or(i,o):Ne.default.copyFileSync(i,o))}}function ar(t){Ne.default.existsSync(t)&&(Ne.default.readdirSync(t).forEach(e=>{let n=t+"/"+e;Ne.default.lstatSync(n).isDirectory()?ar(n):Ne.default.unlinkSync(n)}),Ne.default.rmdirSync(t))}var sf=Z().commands.t,jS=ee();function of(t){return new xe().name("init").option("--source <sourceDir>","ts files' dir").action(e=>{t.currentCommand.value="init",e.source&&(t.args.source=Bt.default.resolve(e.source))}).addHelpText("before",`Initialize the workspace.
181
181
  `).addHelpText("before",`\u521D\u59CB\u5316\u4E00\u4E2A\u5DE5\u4F5C\u7A7A\u95F4
182
- `)}async function sf(t){t.currentCommand.value="init"}async function of(t){let e=hn.default.join(t.source);if(!Ht.default.existsSync(e)||!Ht.default.statSync(e).isDirectory())throw new Error(nf("error.shouldBeValidDir{dir}",{dir:e}));if(Ht.default.readdirSync(e).length>0)throw new Error(nf("error.shouldBeEmptyDir{dir}",{dir:e}));E.printInfo("================ \u521D\u59CB\u5316\u5DE5\u4F5C\u7A7A\u95F4: Starting... ================"),tr(hn.default.join(t.webRoot,"templates"),e);let n=ys();n&&Ht.default.writeFileSync(hn.default.join(e,n.name),n.content,"utf-8");let r=ws();r&&Ht.default.writeFileSync(hn.default.join(e,r.name),r.content,"utf-8");let s=Cs();Ht.default.writeFileSync(hn.default.join(e,s.name),s.content,"utf-8"),E.printSuccess("================ \u521D\u59CB\u5316\u5DE5\u4F5C\u7A7A\u95F4: Succeeded ================")}var af=require("child_process");function lf(t){return new Se().name("info").action(()=>{t.currentCommand.value="info"}).addHelpText("before",`Print info.
182
+ `)}async function af(t){t.currentCommand.value="init"}async function lf(t){let e=Bt.default.join(t.source);if(!Wt.default.existsSync(e)||!Wt.default.statSync(e).isDirectory())throw new Error(sf("error.shouldBeValidDir{dir}",{dir:e}));let n=Wt.default.readdirSync(e),r=[];if(n.length>0){if(n.filter(a=>a.endsWith(".ts")).length===0)throw new Error(sf("error.shouldBeValidWorkspaceOrEmptyDir{dir}",{dir:e}));r.push("example-agg.ts"),r.push("example.ts"),r.push("node_modules")}x.printInfo("================ \u521D\u59CB\u5316\u5DE5\u4F5C\u7A7A\u95F4: Starting... ================"),or(Bt.default.join(jS.states.webRoot.value,"templates"),e,{ignore:r});let s=Cs();s&&Wt.default.writeFileSync(Bt.default.join(e,s.name),s.content,"utf-8");let i=Ss();i&&Wt.default.writeFileSync(Bt.default.join(e,i.name),i.content,"utf-8");let o=xs();Wt.default.writeFileSync(Bt.default.join(e,o.name),o.content,"utf-8"),x.printSuccess("================ \u521D\u59CB\u5316\u5DE5\u4F5C\u7A7A\u95F4: Succeeded ================")}var cf=require("child_process");var As=ee();function uf(t){return new xe().name("info").action(()=>{t.currentCommand.value="info"}).addHelpText("before",`Print info.
183
183
  `).addHelpText("before",`\u6253\u5370\u4FE1\u606F
184
- `)}async function cf(t){t.currentCommand.value="info"}async function uf(){E.printInfo("================ Print info: Starting... ================"),(0,af.spawnSync)('echo "print domain-designer info"',{encoding:"utf-8",stdio:"inherit",shell:!0}),E.print("");let t=process.env.LANG||process.env.LANGUAGE||process.env.LC_ALL||process.env.LC_MESSAGES||!1;E.print(E.info("DEBUG_MODE:"),process.env.DEBUG_MODE),E.print(""),E.print(E.info("lang:"),t),E.print(""),E.print(E.info("__dirname:"),__dirname),E.print(""),E.print(E.info("cwd():"),process.cwd()),E.print(""),E.print(E.info("PACKAGE_MANAGER:"),process.env.PACKAGE_MANAGER),E.print(""),E.print(E.info("webRoot:"),bs()),E.print(""),E.printSuccess("================ Print info: Succeeded ================")}var ce=L(require("fs"),1),ne=L(require("path"),1);function df(t){return new Se().name("update").option("--source <sourceDir>","ts files' dir").action(e=>{t.currentCommand.value="updateWorkspace",e.source&&(t.args.source=e.source)}).addHelpText("before",`Update the workspace.
184
+ `)}async function df(t){t.currentCommand.value="info"}async function hf(){x.printInfo("================ Print info: Starting... ================"),(0,cf.spawnSync)('echo "print domain-designer info"',{encoding:"utf-8",stdio:"inherit",shell:!0}),x.print(""),x.print(x.info("DEBUG_MODE:"),As.states.debugMode.value),x.print(""),x.print(x.info("lang:"),As.states.osLanguage.value),x.print(""),x.print(x.info("__dirname:"),__dirname),x.print(""),x.print(x.info("cwd():"),process.cwd()),x.print(""),x.print(x.info("PACKAGE_MANAGER:"),As.states.packageManager.value),x.print(""),x.print(x.info("webRoot:"),As.states.webRoot.value),x.print(""),x.printSuccess("================ Print info: Succeeded ================")}var ue=q(require("fs"),1),te=q(require("path"),1);var FS=ee();function pf(t){return new xe().name("update").option("--source <sourceDir>","ts files' dir").action(e=>{t.currentCommand.value="updateWorkspace",e.source&&(t.args.source=te.default.resolve(e.source))}).addHelpText("before",`Update the workspace.
185
185
  `).addHelpText("before",`\u66F4\u65B0\u5DE5\u4F5C\u7A7A\u95F4
186
- `)}async function hf(t){t.currentCommand.value="updateWorkspace"}async function pf(t){let e=ne.default.join(t.source);if(E.printInfo("================ \u66F4\u65B0\u4F9D\u8D56: Starting... ================"),!ce.default.existsSync(ne.default.join(e,"node_modules"))||ce.default.existsSync(ne.default.join(t.source,"package.json"))){E.printWarn("\u8BE5\u76EE\u5F55\u4E0D\u662F\u5DE5\u4F5C\u7A7A\u95F4\uFF0C\u65E0\u6CD5\u66F4\u65B0"),E.printWarn("================ \u66F4\u65B0\u4F9D\u8D56: End ================");return}let n=ne.default.join(e,"node_modules","version.txt"),r=ce.default.existsSync(n)&&ce.default.statSync(n).isFile()?ce.default.readFileSync(n).toString().trim():"unknown";if(r===Z.version){E.print("\u5DE5\u4F5C\u76EE\u5F55\u5DF2\u662F\u6700\u65B0\u7248\u672C\uFF0C\u65E0\u9700\u66F4\u65B0"),E.printSuccess("================ \u66F4\u65B0\u4F9D\u8D56: Succeeded ================");return}E.print("\u5DE5\u4F5C\u76EE\u5F55\u7248\u672C\uFF1A",r),nr(ne.default.join(e,"node_modules"));let s=ys();s&&ce.default.existsSync(ne.default.join(e,s.name))&&ce.default.rmSync(ne.default.join(e,s.name));let i=ws();i&&ce.default.existsSync(ne.default.join(e,i.name))&&ce.default.rmSync(ne.default.join(e,i.name));let o=Cs();ce.default.existsSync(ne.default.join(e,o.name))&&ce.default.rmSync(ne.default.join(e,o.name)),tr(ne.default.join(t.webRoot,"templates"),e,{ignore:["example.ts","example-agg.ts"]}),s&&ce.default.writeFileSync(ne.default.join(e,s.name),s.content,"utf-8"),i&&ce.default.writeFileSync(ne.default.join(e,i.name),i.content,"utf-8"),ce.default.writeFileSync(ne.default.join(e,o.name),o.content,"utf-8"),E.print(`\u76EE\u5F55\u5DF2\u66F4\u65B0\u81F3 ${Z.version}`),E.printSuccess("================ \u66F4\u65B0\u4F9D\u8D56: Succeeded ================")}var sr=require("child_process");var Ss=L(require("path"),1),wt=L(require("fs"),1);var IS=X().commands.t;function ff(t){return new Se().name("runWeb").option("--source <sourceDir>","ts files' dir").action(e=>{t.currentCommand.value="runWeb",e.source&&(t.args.source=e.source)}).addHelpText("before",`Run web server.
186
+ `)}async function ff(t){t.currentCommand.value="updateWorkspace"}async function mf(t){let e=te.default.join(t.source);if(x.printInfo("================ \u66F4\u65B0\u4F9D\u8D56: Starting... ================"),!ue.default.existsSync(te.default.join(e,"node_modules"))||ue.default.existsSync(te.default.join(t.source,"package.json"))){x.printWarn("\u8BE5\u76EE\u5F55\u4E0D\u662F\u5DE5\u4F5C\u7A7A\u95F4\uFF0C\u65E0\u6CD5\u66F4\u65B0"),x.printWarn("================ \u66F4\u65B0\u4F9D\u8D56: End ================");return}let n=te.default.join(e,"node_modules","version.txt"),r=ue.default.existsSync(n)&&ue.default.statSync(n).isFile()?ue.default.readFileSync(n).toString().trim():"unknown";if(r===B.version){x.print("\u5DE5\u4F5C\u76EE\u5F55\u5DF2\u662F\u6700\u65B0\u7248\u672C\uFF0C\u65E0\u9700\u66F4\u65B0"),x.printSuccess("================ \u66F4\u65B0\u4F9D\u8D56: Succeeded ================");return}x.print("\u5DE5\u4F5C\u76EE\u5F55\u7248\u672C\uFF1A",r),ar(te.default.join(e,"node_modules"));let s=Cs();s&&ue.default.existsSync(te.default.join(e,s.name))&&ue.default.rmSync(te.default.join(e,s.name));let i=Ss();i&&ue.default.existsSync(te.default.join(e,i.name))&&ue.default.rmSync(te.default.join(e,i.name));let o=xs();ue.default.existsSync(te.default.join(e,o.name))&&ue.default.rmSync(te.default.join(e,o.name)),or(te.default.join(FS.states.webRoot.value,"templates"),e,{ignore:["example.ts","example-agg.ts"]}),s&&ue.default.writeFileSync(te.default.join(e,s.name),s.content,"utf-8"),i&&ue.default.writeFileSync(te.default.join(e,i.name),i.content,"utf-8"),ue.default.writeFileSync(te.default.join(e,o.name),o.content,"utf-8"),x.print(`\u76EE\u5F55\u5DF2\u66F4\u65B0\u81F3 ${B.version}`),x.printSuccess("================ \u66F4\u65B0\u4F9D\u8D56: Succeeded ================")}var zt=require("child_process");var Es=q(require("path"),1),ct=q(require("fs"),1);var VS=Z().commands.t,Va=ee();function gf(t){return new xe().name("runWeb").option("--source <sourceDir>","ts files' dir").action(e=>{t.currentCommand.value="runWeb",e.source&&(t.args.source=e.source)}).addHelpText("before",`Run web server.
187
187
  `).addHelpText("before",`\u8FD0\u884C web \u670D\u52A1
188
- `)}async function mf(t){t.currentCommand.value="runWeb"}async function gf(t){let e=t.webRoot;E.printDebug("webRoot\u8DEF\u5F84",e);let n=process.env.PACKAGE_MANAGER;E.printInfo("================ \u5B89\u88C5\u8FD0\u884C\u4F9D\u8D56: Starting... ================"),n==="bun"?(0,sr.spawnSync)(`bun i --cwd "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):n==="pnpm"?(0,sr.spawnSync)(`pnpm i --prefix "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):isNever(n),E.printSuccess("================ \u5B89\u88C5\u8FD0\u884C\u4F9D\u8D56: Succeeded ================"),E.printInfo("================ \u88C5\u914D\u4EE3\u7801\u6587\u4EF6: Starting... ================"),DS(e,t.source),E.printSuccess("================ \u88C5\u914D\u4EE3\u7801\u6587\u4EF6: Succeeded ================"),E.printInfo("================ \u8FD0\u884CWeb\u670D\u52A1: Starting... ================"),n==="bun"?(0,sr.spawnSync)(`bun --cwd "${e}" dev`,{encoding:"utf-8",stdio:"inherit",shell:!0}):n==="pnpm"?(0,sr.spawnSync)(`pnpm --prefix "${e}" dev`,{encoding:"utf-8",stdio:"inherit",shell:!0}):isNever(n)}async function DS(t,e){if(!wt.default.existsSync(e)||!wt.default.statSync(e).isDirectory())throw new Error(IS("error.shouldBeValidDir{dir}",{dir:e}));let n=Ss.default.join(e,"node_modules","version.txt");(!wt.default.existsSync(n)||!wt.default.statSync(n).isFile()||wt.default.readFileSync(n,"utf-8").trim()!==Z.version)&&(E.printWarn("\u68C0\u6D4B\u5230\u5DE5\u4F5C\u76EE\u5F55\u7248\u672C\u4E0E\u811A\u624B\u67B6\u7248\u672C\u4E0D\u5339\u914D"),E.printWarn("\u8BF7\u6267\u884C\u5728\u5DE5\u4F5C\u76EE\u5F55\u6267\u884Cupdate\u547D\u4EE4\u8FDB\u884C\u66F4\u65B0"),E.print(yt.bgYellow("domain-designer-cli update")));let r=[],s=new RegExp(/(.+)\.ts$/),i=0;wt.default.readdirSync(e).forEach(a=>{if(s.test(a)){let l=s.exec(a)[1];r.push({name:l,flag:`__d${++i}`,importCode:`(await import('${Ss.default.resolve(e,l).replace(/\\/g,"/")}')).default`})}});let o=`import { type DomainDesigner, isDomainDesigner } from '@ddd-tool/domain-designer-core'
188
+ `)}async function _f(t){t.currentCommand.value="runWeb"}async function vf(t){let e=Va.states.webRoot.value;x.printDebug("webRoot\u8DEF\u5F84",e);let n=Va.states.packageManager.value;x.printInfo("================ \u5B89\u88C5\u8FD0\u884C\u4F9D\u8D56: Starting... ================"),n==="bun"?(0,zt.spawnSync)(`bun i --cwd "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):n==="pnpm"?(0,zt.spawnSync)(`pnpm i --prefix "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):n==="npm"?(0,zt.spawnSync)(`npm i --prefix "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):isNever(n),x.printSuccess("================ \u5B89\u88C5\u8FD0\u884C\u4F9D\u8D56: Succeeded ================"),x.printInfo("================ \u88C5\u914D\u4EE3\u7801\u6587\u4EF6: Starting... ================"),qS(e,t.source),x.printSuccess("================ \u88C5\u914D\u4EE3\u7801\u6587\u4EF6: Succeeded ================"),x.printInfo("================ \u8FD0\u884CWeb\u670D\u52A1: Starting... ================"),n==="bun"?(0,zt.spawnSync)(`bun --cwd "${e}" dev`,{encoding:"utf-8",stdio:"inherit",shell:!0}):n==="pnpm"?(0,zt.spawnSync)(`pnpm --prefix "${e}" dev`,{encoding:"utf-8",stdio:"inherit",shell:!0}):n==="npm"?(0,zt.spawnSync)(`npm --prefix "${e}" dev`,{encoding:"utf-8",stdio:"inherit",shell:!0}):isNever(n)}async function qS(t,e){if(!ct.default.existsSync(e)||!ct.default.statSync(e).isDirectory())throw new Error(VS("error.shouldBeValidDir{dir}",{dir:e}));let n=Es.default.join(e,"node_modules","version.txt");(!ct.default.existsSync(n)||!ct.default.statSync(n).isFile()||ct.default.readFileSync(n,"utf-8").trim()!==B.version)&&(x.printWarn("\u68C0\u6D4B\u5230\u5DE5\u4F5C\u76EE\u5F55\u7248\u672C\u4E0E\u811A\u624B\u67B6\u7248\u672C\u4E0D\u5339\u914D"),x.printWarn("\u5F53\u524D\u5DE5\u4F5C\u76EE\u5F55\u7248\u672C\uFF1A",ct.default.readFileSync(n,"utf-8").trim()),x.printWarn("\u811A\u624B\u67B6\u7248\u672C\uFF1A ",B.version),x.printWarn("\u5982\u679C\u8981\u4EE5\u672C\u5730\u811A\u624B\u67B6\u7248\u672C\u4E3A\u51C6\uFF0C\u8BF7\u6267\u884C\u5728\u5DE5\u4F5C\u76EE\u5F55\u6267\u884Cupdate\u547D\u4EE4\u8FDB\u884C\u66F4\u65B0"),x.print(qe.bgYellow(`${Va.states.packageManager.value==="bun"?"bunx ":""}domain-designer-cli update`)));let r=[],s=new RegExp(/(.+)\.ts$/),i=0;ct.default.readdirSync(e).forEach(a=>{if(s.test(a)){let l=s.exec(a)[1];r.push({name:l,flag:`__d${++i}`,importCode:`(await import('${Es.default.resolve(e,l).replace(/\\/g,"/")}')).default`})}});let o=`import { type DomainDesigner, isDomainDesigner } from '@ddd-tool/domain-designer-core'
189
189
 
190
190
  ${r.map(a=>`const ${a.flag} = ${a.importCode}`).join(`
191
191
  `)}
@@ -198,40 +198,40 @@ ${r.map(a=>`if (isDomainDesigner(${a.flag})) {
198
198
  `)}
199
199
 
200
200
  export default data
201
- `;wt.default.writeFileSync(Ss.default.join(t,"src","views","index.ts"),o,{encoding:"utf-8"})}var An=L(require("fs"),1),gr=L(require("path"),1);var Qs=require("child_process");function bf(t){let e=t;return e&&typeof e.actor=="function"&&typeof e.startWorkflow=="function"&&typeof e.defineUserStory=="function"&&typeof e._getContext=="function"&&typeof e.note=="function"&&typeof e.info=="object"&&typeof e.command=="function"&&typeof e.facadeCmd=="function"&&typeof e.agg=="function"&&typeof e.event=="function"&&typeof e.system=="function"&&typeof e.policy=="function"&&typeof e.service=="function"&&typeof e.readModel=="function"}var La=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);var PS=()=>{},MS=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),$s=Object.assign;var Ve=Array.isArray;var Kt=t=>typeof t=="function",St=t=>typeof t=="string",jS=t=>typeof t=="symbol",Gt=t=>t!==null&&typeof t=="object";var FS=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},B0=FS(t=>t.charAt(0).toUpperCase()+t.slice(1));var _f,Rs=()=>_f||(_f=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ka(t){if(Ve(t)){let e={};for(let n=0;n<t.length;n++){let r=t[n],s=St(r)?HS(r):Ka(r);if(s)for(let i in s)e[i]=s[i]}return e}else if(St(t)||Gt(t))return t}var qS=/;(?![^(]*\))/g,VS=/:([^]+)/,LS=/\/\*[^]*?\*\//g;function HS(t){let e={};return t.replace(LS,"").split(qS).forEach(n=>{if(n){let r=n.split(VS);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Ba(t){let e="";if(St(t))e=t;else if(Ve(t))for(let n=0;n<t.length;n++){let r=Ba(t[n]);r&&(e+=r+" ")}else if(Gt(t))for(let n in t)t[n]&&(e+=n+" ");return e.trim()}var Ha=!0,yf=[];function wf(){yf.push(Ha),Ha=!1}function Cf(){let t=yf.pop();Ha=t===void 0?!0:t}var z0=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),Y0=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),J0=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");var X0=Array.prototype;var Z0=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(jS));function Sf(t){return Ga(t)?Sf(t.__v_raw):!!(t&&t.__v_isReactive)}function Ga(t){return!!(t&&t.__v_isReadonly)}function ja(t){return!!(t&&t.__v_isShallow)}function Ua(t){return t?!!t.__v_raw:!1}function Ut(t){let e=t&&t.__v_raw;return e?Ut(e):t}function za(t){return t?t.__v_isRef===!0:!1}var Wt=[];function GS(t){Wt.push(t)}function US(){Wt.pop()}var Fa=!1;function ir(t,...e){if(Fa)return;Fa=!0,wf();let n=Wt.length?Wt[Wt.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=WS();if(r)Ya(r,n,11,[t+e.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),n&&n.proxy,s.map(({vnode:i})=>`at <${jf(n,i.type)}>`).join(`
201
+ `;ct.default.writeFileSync(Es.default.join(t,"src","views","index.ts"),o,{encoding:"utf-8"})}var Ke=q(require("fs"),1),rn=q(require("path"),1);var yr=require("child_process");function wf(t){let e=t;return e&&typeof e.actor=="function"&&typeof e.startWorkflow=="function"&&typeof e.defineUserStory=="function"&&typeof e._getContext=="function"&&typeof e.note=="function"&&typeof e.info=="object"&&typeof e.command=="function"&&typeof e.facadeCmd=="function"&&typeof e.agg=="function"&&typeof e.event=="function"&&typeof e.system=="function"&&typeof e.policy=="function"&&typeof e.service=="function"&&typeof e.readModel=="function"}var Ua=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);var LS=()=>{},HS=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),ks=Object.assign;var Ge=Array.isArray;var Xt=t=>typeof t=="function",Ot=t=>typeof t=="string",GS=t=>typeof t=="symbol",Kt=t=>t!==null&&typeof t=="object";var US=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},aT=US(t=>t.charAt(0).toUpperCase()+t.slice(1));var bf,Is=()=>bf||(bf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ya(t){if(Ge(t)){let e={};for(let n=0;n<t.length;n++){let r=t[n],s=Ot(r)?KS(r):Ya(r);if(s)for(let i in s)e[i]=s[i]}return e}else if(Ot(t)||Kt(t))return t}var WS=/;(?![^(]*\))/g,BS=/:([^]+)/,zS=/\/\*[^]*?\*\//g;function KS(t){let e={};return t.replace(zS,"").split(WS).forEach(n=>{if(n){let r=n.split(BS);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Ja(t){let e="";if(Ot(t))e=t;else if(Ge(t))for(let n=0;n<t.length;n++){let r=Ja(t[n]);r&&(e+=r+" ")}else if(Kt(t))for(let n in t)t[n]&&(e+=n+" ");return e.trim()}var Wa=!0,Cf=[];function Sf(){Cf.push(Wa),Wa=!1}function xf(){let t=Cf.pop();Wa=t===void 0?!0:t}var lT=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),cT=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),uT=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");var dT=Array.prototype;var hT=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(GS));function Af(t){return Ba(t)?Af(t.__v_raw):!!(t&&t.__v_isReactive)}function Ba(t){return!!(t&&t.__v_isReadonly)}function qa(t){return!!(t&&t.__v_isShallow)}function za(t){return t?!!t.__v_raw:!1}function Yt(t){let e=t&&t.__v_raw;return e?Yt(e):t}function Xa(t){return t?t.__v_isRef===!0:!1}var Jt=[];function YS(t){Jt.push(t)}function JS(){Jt.pop()}var La=!1;function cr(t,...e){if(La)return;La=!0,Sf();let n=Jt.length?Jt[Jt.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=XS();if(r)Za(r,n,11,[t+e.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),n&&n.proxy,s.map(({vnode:i})=>`at <${Vf(n,i.type)}>`).join(`
202
202
  `),s]);else{let i=[`[Vue warn]: ${t}`,...e];s.length&&i.push(`
203
- `,...KS(s))}Cf(),Fa=!1}function WS(){let t=Wt[Wt.length-1];if(!t)return[];let e=[];for(;t;){let n=e[0];n&&n.vnode===t?n.recurseCount++:e.push({vnode:t,recurseCount:0});let r=t.component&&t.component.parent;t=r&&r.vnode}return e}function KS(t){let e=[];return t.forEach((n,r)=>{e.push(...r===0?[]:[`
204
- `],...BS(n))}),e}function BS({vnode:t,recurseCount:e}){let n=e>0?`... (${e} recursive calls)`:"",r=t.component?t.component.parent==null:!1,s=` at <${jf(t.component,t.type,r)}`,i=">"+n;return t.props?[s,...zS(t.props),i]:[s+i]}function zS(t){let e=[],n=Object.keys(t);return n.slice(0,3).forEach(r=>{e.push(...xf(r,t[r]))}),n.length>3&&e.push(" ..."),e}function xf(t,e,n){return St(e)?(e=JSON.stringify(e),n?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?n?e:[`${t}=${e}`]:za(e)?(e=xf(t,Ut(e.value),!0),n?e:[`${t}=Ref<`,e,">"]):Kt(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=Ut(e),n?e:[`${t}=`,e])}var Af={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Ya(t,e,n,r){try{return r?t(...r):t()}catch(s){Ef(s,e,n)}}function Ef(t,e,n,r=!0){let s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||La;if(e){let a=e.parent,l=e.proxy,d=process.env.NODE_ENV!=="production"?Af[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){let u=a.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](t,l,d)===!1)return}a=a.parent}if(i){wf(),Ya(i,null,10,[t,l,d]),Cf();return}}YS(t,n,s,r,o)}function YS(t,e,n,r=!0,s=!1){if(process.env.NODE_ENV!=="production"){let i=Af[e];if(n&&GS(n),ir(`Unhandled error${i?` during execution of ${i}`:""}`),n&&US(),r)throw t}else if(s)throw t}var Ae=[],it=-1,fn=[],Ct=null,pn=0,JS=Promise.resolve(),Wa=null,XS=100;function ZS(t){let e=it+1,n=Ae.length;for(;e<n;){let r=e+n>>>1,s=Ae[r],i=or(s);i<t||i===t&&s.flags&2?e=r+1:n=r}return e}function QS(t){if(!(t.flags&1)){let e=or(t),n=Ae[Ae.length-1];!n||!(t.flags&2)&&e>=or(n)?Ae.push(t):Ae.splice(ZS(e),0,t),t.flags|=1,Of()}}function Of(){Wa||(Wa=JS.then(Tf))}function ex(t){Ve(t)?fn.push(...t):Ct&&t.id===-1?Ct.splice(pn+1,0,t):t.flags&1||(fn.push(t),t.flags|=1),Of()}function tx(t){if(fn.length){let e=[...new Set(fn)].sort((n,r)=>or(n)-or(r));if(fn.length=0,Ct){Ct.push(...e);return}for(Ct=e,process.env.NODE_ENV!=="production"&&(t=t||new Map),pn=0;pn<Ct.length;pn++){let n=Ct[pn];process.env.NODE_ENV!=="production"&&$f(t,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Ct=null,pn=0}}var or=t=>t.id==null?t.flags&2?-1:1/0:t.id;function Tf(t){process.env.NODE_ENV!=="production"&&(t=t||new Map);let e=process.env.NODE_ENV!=="production"?n=>$f(t,n):PS;try{for(it=0;it<Ae.length;it++){let n=Ae[it];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&e(n))continue;n.flags&4&&(n.flags&=-2),Ya(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;it<Ae.length;it++){let n=Ae[it];n&&(n.flags&=-2)}it=-1,Ae.length=0,tx(t),Wa=null,(Ae.length||fn.length)&&Tf(t)}}function $f(t,e){let n=t.get(e)||0;if(n>XS){let r=e.i,s=r&&Mf(r.type);return Ef(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return t.set(e,n+1),!1}var qa=new Map;process.env.NODE_ENV!=="production"&&(Rs().__VUE_HMR_RUNTIME__={createRecord:Va(nx),rerender:Va(rx),reload:Va(sx)});var As=new Map;function nx(t,e){return As.has(t)?!1:(As.set(t,{initialDef:Es(e),instances:new Set}),!0)}function Es(t){return Ff(t)?t.__vccOpts:t}function rx(t,e){let n=As.get(t);n&&(n.initialDef.render=e,[...n.instances].forEach(r=>{e&&(r.render=e,Es(r.type).render=e),r.renderCache=[],r.update()}))}function sx(t,e){let n=As.get(t);if(!n)return;e=Es(e),vf(n.initialDef,e);let r=[...n.instances];for(let s=0;s<r.length;s++){let i=r[s],o=Es(i.type),a=qa.get(o);a||(o!==n.initialDef&&vf(o,e),qa.set(o,a=new Set)),a.add(i),i.appContext.propsCache.delete(i.type),i.appContext.emitsCache.delete(i.type),i.appContext.optionsCache.delete(i.type),i.ceReload?(a.add(i),i.ceReload(e.styles),a.delete(i)):i.parent?QS(()=>{i.parent.update(),a.delete(i)}):i.appContext.reload?i.appContext.reload():typeof window<"u"&&window.location.reload(),i.root.ce&&i!==i.root&&i.root.ce._removeChildStyle(o)}ex(()=>{qa.clear()})}function vf(t,e){$s(t,e);for(let n in t)n!=="__file"&&!(n in e)&&delete t[n]}function Va(t){return(e,n)=>{try{return t(e,n)}catch{}}}var Os=null,ix=null,ox=t=>t.__isTeleport;function Rf(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Rf(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}Rs().requestIdleCallback;Rs().cancelIdleCallback;var ax=Symbol.for("v-ndc"),lx={};process.env.NODE_ENV!=="production"&&(lx.ownKeys=t=>(ir("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(t)));var cx={},Nf=t=>Object.getPrototypeOf(t)===cx,ux=t=>t.__isSuspense,kf=Symbol.for("v-fgt"),dx=Symbol.for("v-txt"),hx=Symbol.for("v-cmt");function px(t){return t?t.__v_isVNode===!0:!1}var fx=(...t)=>Df(...t),If=({key:t})=>t??null,xs=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?St(t)||za(t)||Kt(t)?{i:Os,r:t,k:e,f:!!n}:t:null);function mx(t,e=null,n=null,r=0,s=null,i=t===kf?0:1,o=!1,a=!1){let l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&If(e),ref:e&&xs(e),scopeId:ix,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Os};return a?(Ja(l,n),i&128&&t.normalize(l)):n&&(l.shapeFlag|=St(n)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&ir("VNode created with invalid key (NaN). VNode type:",l.type),l}var gx=process.env.NODE_ENV!=="production"?fx:Df;function Df(t,e=null,n=null,r=0,s=null,i=!1){if((!t||t===ax)&&(process.env.NODE_ENV!=="production"&&!t&&ir(`Invalid vnode type when creating vnode: ${t}.`),t=hx),px(t)){let a=Ts(t,e,!0);return n&&Ja(a,n),a.patchFlag=-2,a}if(Ff(t)&&(t=t.__vccOpts),e){e=_x(e);let{class:a,style:l}=e;a&&!St(a)&&(e.class=Ba(a)),Gt(l)&&(Ua(l)&&!Ve(l)&&(l=$s({},l)),e.style=Ka(l))}let o=St(t)?1:ux(t)?128:ox(t)?64:Gt(t)?4:Kt(t)?2:0;return process.env.NODE_ENV!=="production"&&o&4&&Ua(t)&&(t=Ut(t),ir("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
205
- Component that was made reactive: `,t)),mx(t,e,n,r,s,o,i,!0)}function _x(t){return t?Ua(t)||Nf(t)?$s({},t):t:null}function Ts(t,e,n=!1,r=!1){let{props:s,ref:i,patchFlag:o,children:a,transition:l}=t,d=e?bx(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:d,key:d&&If(d),ref:e&&e.ref?n&&i?Ve(i)?i.concat(xs(e)):[i,xs(e)]:xs(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:process.env.NODE_ENV!=="production"&&o===-1&&Ve(a)?a.map(Pf):a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==kf?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Ts(t.ssContent),ssFallback:t.ssFallback&&Ts(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&r&&Rf(u,l.clone(u)),u}function Pf(t){let e=Ts(t);return Ve(t.children)&&(e.children=t.children.map(Pf)),e}function vx(t=" ",e=0){return gx(dx,null,t,e)}function Ja(t,e){let n=0,{shapeFlag:r}=t;if(e==null)e=null;else if(Ve(e))n=16;else if(typeof e=="object")if(r&65){let s=e.default;s&&(s._c&&(s._d=!1),Ja(t,s()),s._c&&(s._d=!0));return}else n=32,!e._&&!Nf(e)&&(e._ctx=Os);else Kt(e)?(e={default:e,_ctx:Os},n=32):(e=String(e),r&64?(n=16,e=[vx(e)]):n=8);t.children=e,t.shapeFlag|=n}function bx(...t){let e={};for(let n=0;n<t.length;n++){let r=t[n];for(let s in r)if(s==="class")e.class!==r.class&&(e.class=Ba([e.class,r.class]));else if(s==="style")e.style=Ka([e.style,r.style]);else if(MS(s)){let i=e[s],o=r[s];o&&i!==o&&!(Ve(i)&&i.includes(o))&&(e[s]=i?[].concat(i,o):o)}else s!==""&&(e[s]=r[s])}return e}{let t=Rs(),e=(n,r)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};e("__VUE_INSTANCE_SETTERS__",n=>n),e("__VUE_SSR_SETTERS__",n=>n)}process.env.NODE_ENV;var yx=/(?:^|[-_])(\w)/g,wx=t=>t.replace(yx,e=>e.toUpperCase()).replace(/[-_]/g,"");function Mf(t,e=!0){return Kt(t)?t.displayName||t.name:t.name||e&&t.__name}function jf(t,e,n=!1){let r=Mf(e);if(!r&&e.__file){let s=e.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&t&&t.parent){let s=i=>{for(let o in i)if(i[o]===e)return o};r=s(t.components||t.parent.type.components)||s(t.appContext.components)}return r?wx(r):n?"App":"Anonymous"}function Ff(t){return Kt(t)&&"__vccOpts"in t}function Cx(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;let t={style:"color:#3ba776"},e={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(c){return Gt(c)?c.__isVue?["div",t,"VueInstance"]:za(c)?["div",{},["span",t,u(c)],"<",a("_value"in c?c._value:c),">"]:Sf(c)?["div",{},["span",t,ja(c)?"ShallowReactive":"Reactive"],"<",a(c),`>${Ga(c)?" (readonly)":""}`]:Ga(c)?["div",{},["span",t,ja(c)?"ShallowReadonly":"Readonly"],"<",a(c),">"]:null:null},hasBody(c){return c&&c.__isVue},body(c){if(c&&c.__isVue)return["div",{},...i(c.$)]}};function i(c){let h=[];c.type.props&&c.props&&h.push(o("props",Ut(c.props))),c.setupState!==La&&h.push(o("setup",c.setupState)),c.data!==La&&h.push(o("data",Ut(c.data)));let f=l(c,"computed");f&&h.push(o("computed",f));let v=l(c,"inject");return v&&h.push(o("injected",v)),h.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:c}]]),h}function o(c,h){return h=$s({},h),Object.keys(h).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},c],["div",{style:"padding-left:1.25em"},...Object.keys(h).map(f=>["div",{},["span",r,f+": "],a(h[f],!1)])]]:["span",{}]}function a(c,h=!0){return typeof c=="number"?["span",e,c]:typeof c=="string"?["span",n,JSON.stringify(c)]:typeof c=="boolean"?["span",r,c]:Gt(c)?["object",{object:h?Ut(c):c}]:["span",n,String(c)]}function l(c,h){let f=c.type;if(Kt(f))return;let v={};for(let m in c.ctx)d(f,m,h)&&(v[m]=c.ctx[m]);return v}function d(c,h,f){let v=c[f];if(Ve(v)&&v.includes(h)||Gt(v)&&h in v||c.extends&&d(c.extends,h,f)||c.mixins&&c.mixins.some(m=>d(m,h,f)))return!0}function u(c){return ja(c)?"ShallowRef":c.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;function Sx(){Cx()}process.env.NODE_ENV!=="production"&&Sx();function xx(t){let e=Object.create(null);for(let n of t.split(","))e[n]=1;return n=>n in e}process.env.NODE_ENV!=="production"&&Object.freeze({});process.env.NODE_ENV!=="production"&&Object.freeze([]);var sl=Object.assign,Ax=Object.prototype.hasOwnProperty,il=(t,e)=>Ax.call(t,e),vn=Array.isArray,lr=t=>Gf(t)==="[object Map]",Ex=t=>typeof t=="function",Ox=t=>typeof t=="string",mr=t=>typeof t=="symbol",zs=t=>t!==null&&typeof t=="object",Tx=Object.prototype.toString,Gf=t=>Tx.call(t),Uf=t=>Gf(t).slice(8,-1),wl=t=>Ox(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,$x=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Rx=$x(t=>t.charAt(0).toUpperCase()+t.slice(1)),bn=(t,e)=>!Object.is(t,e);function Cn(t,...e){}var K,Wf=0,cr,ur;function Nx(t,e=!1){if(t.flags|=8,e){t.next=ur,ur=t;return}t.next=cr,cr=t}function Cl(){Wf++}function Sl(){if(--Wf>0)return;if(ur){let e=ur;for(ur=void 0;e;){let n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;cr;){let e=cr;for(cr=void 0;e;){let n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(r){t||(t=r)}e=n}}if(t)throw t}function kx(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Ix(t){let e,n=t.depsTail,r=n;for(;r;){let s=r.prevDep;r.version===-1?(r===n&&(n=s),Bf(r),Px(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}t.deps=e,t.depsTail=n}function Dx(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Kf(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Kf(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===dr))return;t.globalVersion=dr;let e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Dx(t)){t.flags&=-3;return}let n=K,r=Et;K=t,Et=!0;try{kx(t);let s=t.fn(t._value);(e.version===0||bn(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{K=n,Et=r,Ix(t),t.flags&=-3}}function Bf(t,e=!1){let{dep:n,prevSub:r,nextSub:s}=t;if(r&&(r.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=r,t.nextSub=void 0),process.env.NODE_ENV!=="production"&&n.subsHead===t&&(n.subsHead=s),n.subs===t&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Bf(i,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function Px(t){let{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}var Et=!0,zf=[];function Mx(){zf.push(Et),Et=!1}function jx(){let t=zf.pop();Et=t===void 0?!0:t}var dr=0,ol=class{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},hr=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(e){if(!K||!Et||K===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==K)n=this.activeLink=new ol(K,this),K.deps?(n.prevDep=K.depsTail,K.depsTail.nextDep=n,K.depsTail=n):K.deps=K.depsTail=n,Yf(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){let r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=K.depsTail,n.nextDep=void 0,K.depsTail.nextDep=n,K.depsTail=n,K.deps===n&&(K.deps=r)}return process.env.NODE_ENV!=="production"&&K.onTrack&&K.onTrack(sl({effect:K},e)),n}trigger(e){this.version++,dr++,this.notify(e)}notify(e){Cl();try{if(process.env.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(sl({effect:n.sub},e));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Sl()}}};function Yf(t){if(t.dep.sc++,t.sub.flags&4){let e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let r=e.deps;r;r=r.nextDep)Yf(r)}let n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),process.env.NODE_ENV!=="production"&&t.dep.subsHead===void 0&&(t.dep.subsHead=t),t.dep.subs=t}}var al=new WeakMap,Bt=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),ll=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),pr=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function fe(t,e,n){if(Et&&K){let r=al.get(t);r||al.set(t,r=new Map);let s=r.get(n);s||(r.set(n,s=new hr),s.map=r,s.key=n),process.env.NODE_ENV!=="production"?s.track({target:t,type:e,key:n}):s.track()}}function At(t,e,n,r,s,i){let o=al.get(t);if(!o){dr++;return}let a=l=>{l&&(process.env.NODE_ENV!=="production"?l.trigger({target:t,type:e,key:n,newValue:r,oldValue:s,oldTarget:i}):l.trigger())};if(Cl(),e==="clear")o.forEach(a);else{let l=vn(t),d=l&&wl(n);if(l&&n==="length"){let u=Number(r);o.forEach((c,h)=>{(h==="length"||h===pr||!mr(h)&&h>=u)&&a(c)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),d&&a(o.get(pr)),e){case"add":l?d&&a(o.get("length")):(a(o.get(Bt)),lr(t)&&a(o.get(ll)));break;case"delete":l||(a(o.get(Bt)),lr(t)&&a(o.get(ll)));break;case"set":lr(t)&&a(o.get(Bt));break}}Sl()}function mn(t){let e=F(t);return e===t?e:(fe(e,"iterate",pr),Ot(t)?e:e.map(de))}function xl(t){return fe(t=F(t),"iterate",pr),t}var Fx={__proto__:null,[Symbol.iterator](){return Xa(this,Symbol.iterator,de)},concat(...t){return mn(this).concat(...t.map(e=>vn(e)?mn(e):e))},entries(){return Xa(this,"entries",t=>(t[1]=de(t[1]),t))},every(t,e){return ot(this,"every",t,e,void 0,arguments)},filter(t,e){return ot(this,"filter",t,e,n=>n.map(de),arguments)},find(t,e){return ot(this,"find",t,e,de,arguments)},findIndex(t,e){return ot(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return ot(this,"findLast",t,e,de,arguments)},findLastIndex(t,e){return ot(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return ot(this,"forEach",t,e,void 0,arguments)},includes(...t){return Za(this,"includes",t)},indexOf(...t){return Za(this,"indexOf",t)},join(t){return mn(this).join(t)},lastIndexOf(...t){return Za(this,"lastIndexOf",t)},map(t,e){return ot(this,"map",t,e,void 0,arguments)},pop(){return ar(this,"pop")},push(...t){return ar(this,"push",t)},reduce(t,...e){return qf(this,"reduce",t,e)},reduceRight(t,...e){return qf(this,"reduceRight",t,e)},shift(){return ar(this,"shift")},some(t,e){return ot(this,"some",t,e,void 0,arguments)},splice(...t){return ar(this,"splice",t)},toReversed(){return mn(this).toReversed()},toSorted(t){return mn(this).toSorted(t)},toSpliced(...t){return mn(this).toSpliced(...t)},unshift(...t){return ar(this,"unshift",t)},values(){return Xa(this,"values",de)}};function Xa(t,e,n){let r=xl(t),s=r[e]();return r!==t&&!Ot(t)&&(s._next=s.next,s.next=()=>{let i=s._next();return i.value&&(i.value=n(i.value)),i}),s}var qx=Array.prototype;function ot(t,e,n,r,s,i){let o=xl(t),a=o!==t&&!Ot(t),l=o[e];if(l!==qx[e]){let c=l.apply(t,i);return a?de(c):c}let d=n;o!==t&&(a?d=function(c,h){return n.call(this,de(c),h,t)}:n.length>2&&(d=function(c,h){return n.call(this,c,h,t)}));let u=l.call(o,d,r);return a&&s?s(u):u}function qf(t,e,n,r){let s=xl(t),i=n;return s!==t&&(Ot(t)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,t)}):i=function(o,a,l){return n.call(this,o,de(a),l,t)}),s[e](i,...r)}function Za(t,e,n){let r=F(t);fe(r,"iterate",pr);let s=r[e](...n);return(s===-1||s===!1)&&Qx(n[0])?(n[0]=F(n[0]),r[e](...n)):s}function ar(t,e,n=[]){Mx(),Cl();let r=F(t)[e].apply(t,n);return Sl(),jx(),r}var Vx=xx("__proto__,__v_isRef,__isVue"),Jf=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(mr));function Lx(t){mr(t)||(t=String(t));let e=F(this);return fe(e,"has",t),e.hasOwnProperty(t)}var Ms=class{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){if(n==="__v_skip")return e.__v_skip;let s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?Qf:Zf:i?Jx:Xf).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;let o=vn(e);if(!s){let l;if(o&&(l=Fx[n]))return l;if(n==="hasOwnProperty")return Lx}let a=Reflect.get(e,n,yn(e)?e:r);return(mr(n)?Jf.has(n):Vx(n))||(s||fe(e,"get",n),i)?a:yn(a)?o&&wl(n)?a:a.value:zs(a)?s?Fs(a):em(a):a}},cl=class extends Ms{constructor(e=!1){super(!1,e)}set(e,n,r,s){let i=e[n];if(!this._isShallow){let l=Sn(i);if(!Ot(r)&&!Sn(r)&&(i=F(i),r=F(r)),!vn(e)&&yn(i)&&!yn(r))return l?!1:(i.value=r,!0)}let o=vn(e)&&wl(n)?Number(n)<e.length:il(e,n),a=Reflect.set(e,n,r,yn(e)?e:s);return e===F(s)&&(o?bn(r,i)&&At(e,"set",n,r,i):At(e,"add",n,r)),a}deleteProperty(e,n){let r=il(e,n),s=e[n],i=Reflect.deleteProperty(e,n);return i&&r&&At(e,"delete",n,void 0,s),i}has(e,n){let r=Reflect.has(e,n);return(!mr(n)||!Jf.has(n))&&fe(e,"has",n),r}ownKeys(e){return fe(e,"iterate",vn(e)?"length":Bt),Reflect.ownKeys(e)}},js=class extends Ms{constructor(e=!1){super(!0,e)}set(e,n){return process.env.NODE_ENV!=="production"&&Cn(`Set operation on key "${String(n)}" failed: target is readonly.`,e),!0}deleteProperty(e,n){return process.env.NODE_ENV!=="production"&&Cn(`Delete operation on key "${String(n)}" failed: target is readonly.`,e),!0}},Hx=new cl,Gx=new js,Ux=new js(!0),ul=t=>t,Ns=t=>Reflect.getPrototypeOf(t);function Wx(t,e,n){return function(...r){let s=this.__v_raw,i=F(s),o=lr(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,d=s[t](...r),u=n?ul:e?dl:de;return!e&&fe(i,"iterate",l?ll:Bt),{next(){let{value:c,done:h}=d.next();return h?{value:c,done:h}:{value:a?[u(c[0]),u(c[1])]:u(c),done:h}},[Symbol.iterator](){return this}}}}function ks(t){return function(...e){if(process.env.NODE_ENV!=="production"){let n=e[0]?`on key "${e[0]}" `:"";Cn(`${Rx(t)} operation ${n}failed: target is readonly.`,F(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function Kx(t,e){let n={get(r){let s=this.__v_raw,i=F(s),o=F(r);t||(bn(r,o)&&fe(i,"get",r),fe(i,"get",o));let{has:a}=Ns(i),l=e?ul:t?dl:de;if(a.call(i,r))return l(s.get(r));if(a.call(i,o))return l(s.get(o));s!==i&&s.get(r)},get size(){let r=this.__v_raw;return!t&&fe(F(r),"iterate",Bt),Reflect.get(r,"size",r)},has(r){let s=this.__v_raw,i=F(s),o=F(r);return t||(bn(r,o)&&fe(i,"has",r),fe(i,"has",o)),r===o?s.has(r):s.has(r)||s.has(o)},forEach(r,s){let i=this,o=i.__v_raw,a=F(o),l=e?ul:t?dl:de;return!t&&fe(a,"iterate",Bt),o.forEach((d,u)=>r.call(s,l(d),l(u),i))}};return sl(n,t?{add:ks("add"),set:ks("set"),delete:ks("delete"),clear:ks("clear")}:{add(r){!e&&!Ot(r)&&!Sn(r)&&(r=F(r));let s=F(this);return Ns(s).has.call(s,r)||(s.add(r),At(s,"add",r,r)),this},set(r,s){!e&&!Ot(s)&&!Sn(s)&&(s=F(s));let i=F(this),{has:o,get:a}=Ns(i),l=o.call(i,r);l?process.env.NODE_ENV!=="production"&&Vf(i,o,r):(r=F(r),l=o.call(i,r));let d=a.call(i,r);return i.set(r,s),l?bn(s,d)&&At(i,"set",r,s,d):At(i,"add",r,s),this},delete(r){let s=F(this),{has:i,get:o}=Ns(s),a=i.call(s,r);a?process.env.NODE_ENV!=="production"&&Vf(s,i,r):(r=F(r),a=i.call(s,r));let l=o?o.call(s,r):void 0,d=s.delete(r);return a&&At(s,"delete",r,void 0,l),d},clear(){let r=F(this),s=r.size!==0,i=process.env.NODE_ENV!=="production"?lr(r)?new Map(r):new Set(r):void 0,o=r.clear();return s&&At(r,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Wx(r,t,e)}),n}function Al(t,e){let n=Kx(t,e);return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get(il(n,s)&&s in r?n:r,s,i)}var Bx={get:Al(!1,!1)},zx={get:Al(!0,!1)},Yx={get:Al(!0,!0)};function Vf(t,e,n){let r=F(n);if(r!==n&&e.call(t,r)){let s=Uf(t);Cn(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var Xf=new WeakMap,Jx=new WeakMap,Zf=new WeakMap,Qf=new WeakMap;function Xx(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Zx(t){return t.__v_skip||!Object.isExtensible(t)?0:Xx(Uf(t))}function em(t){return Sn(t)?t:El(t,!1,Hx,Bx,Xf)}function Fs(t){return El(t,!0,Gx,zx,Zf)}function Ds(t){return El(t,!0,Ux,Yx,Qf)}function El(t,e,n,r,s){if(!zs(t))return process.env.NODE_ENV!=="production"&&Cn(`value cannot be made ${e?"readonly":"reactive"}: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive))return t;let i=s.get(t);if(i)return i;let o=Zx(t);if(o===0)return t;let a=new Proxy(t,o===2?r:n);return s.set(t,a),a}function Sn(t){return!!(t&&t.__v_isReadonly)}function Ot(t){return!!(t&&t.__v_isShallow)}function Qx(t){return t?!!t.__v_raw:!1}function F(t){let e=t&&t.__v_raw;return e?F(e):t}var de=t=>zs(t)?em(t):t,dl=t=>zs(t)?Fs(t):t;function yn(t){return t?t.__v_isRef===!0:!1}function qs(t){return eA(t,!1)}function eA(t,e){return yn(t)?t:new hl(t,e)}var hl=class{constructor(e,n){this.dep=new hr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:F(e),this._value=n?e:de(e),this.__v_isShallow=n}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(e){let n=this._rawValue,r=this.__v_isShallow||Ot(e)||Sn(e);e=r?e:F(e),bn(e,n)&&(this._rawValue=e,this._value=r?e:de(e),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:n}):this.dep.trigger())}},pl=class{constructor(e,n,r){this.fn=e,this.setter=n,this._value=void 0,this.dep=new hr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=dr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&K!==this)return Nx(this,!0),!0;process.env.NODE_ENV}get value(){let e=process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Kf(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter?this.setter(e):process.env.NODE_ENV!=="production"&&Cn("Write operation failed: computed value is readonly")}};function fl(t,e,n=!1){let r,s;Ex(t)?r=t:(r=t.get,s=t.set);let i=new pl(r,s,n);return process.env.NODE_ENV,i}var tA="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",nA=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=tA[n[t]&63];return e};function rA(t,e=!0,n=!1){let r=qs(),s,i=qs(!1),o=()=>{},a=new Proxy(t,{apply:function(u,c,h){let f;try{f=u(...h)}catch(v){f=v}if(f instanceof Error){if(r.value=f,s=f,e)throw o(),f}else i.value=!0,r.value=void 0,s=!0,o()}}),l=()=>{},d=new Proxy(u=>{r.value=u},{apply:function(u,c,h){u(...h),l(...h)}});return{promise:new Promise((u,c)=>{if(e&&s instanceof Error){c(s);return}else if(s===!0){u();return}let h;n&&(h=setTimeout(()=>{let f=new Error("timeout!");r.value=f,e&&c(f)},n)),o=()=>{h&&(clearTimeout(h),h=void 0),u()}}),callback:a,onError:d,resolved:fl(()=>i.value),error:fl(()=>r.value)}}function ml(){return nA()}function sA(){let t={},e={},n=new WeakMap,r={};return Object.freeze({registerAgg(s){if(s.isInitialized.value)throw new Error("Agg must register before initialized");if(r[s.__id])throw new Error("Agg already registered");s.type==="MultiInstance"&&s.api.events.destroyed.watchPublish(()=>{delete r[s.__id]}),r[s.__id]=s;let i=[];for(let o of Object.values(t))o.mount({api:s.api,__aggId:s.__id,isInitialized:s.isInitialized});for(let o of Object.values(e))o.mount({api:s.api,__aggId:s.__id}),i.push(o.__id);n.set(s,i)},createSetupPlugin(s){let i;return s instanceof Function?i=s():i=s,Object.freeze({__id:ml(),type:"Setup",mount(o){if(o.isInitialized.value)throw new Error("Can not setup after initialized");i.mount({api:o.api,__aggId:o.__aggId})}})},createHotSwapPlugin(s){let i;return s instanceof Function?i=s():i=s,Object.freeze({__id:ml(),type:"HotSwap",mount:i.mount,unmount:i.unmount})},registerPlugin(s){if(s.type==="Setup"){if(t[s.__id])throw new Error("Plugin already registered");t[s.__id]=s;for(let i in r)s.mount({api:r[i].api,__aggId:r[i].__id,isInitialized:r[i].isInitialized})}else if(s.type==="HotSwap"){e[s.__id]=s;for(let i in r)n.has(r[i])&&!n.get(r[i]).includes(s.__id)&&(s.mount({api:r[i].api,__aggId:r[i].__id}),n.get(r[i]).push(s.__id))}else isNever(s)},unregisterPlugin(s){if(s.type==="Setup")throw new Error("Can not unregister setup plugin");if(s.type==="HotSwap"){for(let i in r)n.has(r[i])&&n.get(r[i]).includes(s.__id)&&s.unmount({api:r[i].api,__aggId:r[i].__id});delete e[s.__id]}else isNever(s)}})}function iA(t){return sA()}function oA(t){let e=aA(t);return Ds({states:e.states,commands:e.commands,events:e.events})}function aA(t){let e=t.states;for(let o of Object.keys(t.states))e[o]=Fs(e[o]);let n=Ds(t.states),r=Fs(t.commands),s={},i=t.events;for(let o in t.events)s[o]=i[o].api;return Ds({states:n,commands:r,events:Ds(s),destroy:t.destroy})}function lA(t){let{callback:e,onError:n,promise:r,resolved:s}=rA(()=>{},!1,5e3);function i(c){if(s.value===!0)throw new Error("Agg already initialized");o.push(c())}let o=[],a=t({onCreated(c){Promise.resolve().then(c)},onBeforeInitialize:i,isInitialized:fl(()=>s.value),untilInitialized:r});setTimeout(()=>Promise.all(o).then(()=>{e()}).catch(c=>{n(c)}),0);let l=a.states||{},d=a.commands||{},u=a.events||{};return{__id:ml(),type:"Singleton",api:oA({states:l,commands:d,events:u,destroy:()=>{}}),isInitialized:s,async untilInitialized(){return await r.catch(c=>{throw new Error(`Failed to initialize Agg: ${c.message}
206
- Stack : ${c.stack||"unkown"}`)})}}}var Is;function cA(t){return lA(()=>{let e=qs(t),n=qs({}),r=()=>[],s=()=>[],i=()=>[],o=()=>[],a=()=>[],l=()=>[],d=()=>[];return{states:{designer:e,context:n},commands:{genCodeFiles(){return d()},clearCaches(){},setContext(u){n.value=u},setDomainDesigner(u){this.clearCaches(),e.value=u},_genInfoCode(...u){return r(...u)},_setInfoCodeProvider(u){r=u},_genCommandCode(...u){return s(...u)},_setCommandCodeProvider(u){s=u},_genFacadeCommandCode(...u){return i(...u)},_setFacadeCommandCodeProvider(u){i=u},_genAggCode(...u){return o(...u)},_setAggCodeProvider(u){o=u},_genEventCode(...u){return a(...u)},_setEventCodeProvider(u){a=u},_genReadModelCode(...u){return l(...u)},_setReadModelCodeProvider(u){l=u},_setCodeFileProvider(u){d=u}}}})}var He=iA();function tm(t){if(!Is){if(!t)throw new Error("designer is required");Is=cA(t),He.registerAgg(Is)}return Is.api}function Ys(t){return t&&t._attributes&&t._attributes.rule==="Info"}function uA(t){return t&&t._attributes&&t._attributes.rule==="Agg"}function dA(t){return t&&t._attributes&&t._attributes.rule==="Command"}function hA(t){return t&&t._attributes&&t._attributes.rule==="FacadeCommand"}function pA(t){return t&&t._attributes&&t._attributes.rule==="Event"}function fA(t){return t&&t._attributes&&t._attributes.rule==="ReadModel"}var gl=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);var mA=()=>{},gA=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Js=Object.assign,Le=Array.isArray,Xt=t=>typeof t=="function",Tt=t=>typeof t=="string",_A=t=>typeof t=="symbol",zt=t=>t!==null&&typeof t=="object",Lf,Xs=()=>Lf||(Lf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ol(t){if(Le(t)){let e={};for(let n=0;n<t.length;n++){let r=t[n],s=Tt(r)?wA(r):Ol(r);if(s)for(let i in s)e[i]=s[i]}return e}else if(Tt(t)||zt(t))return t}var vA=/;(?![^(]*\))/g,bA=/:([^]+)/,yA=/\/\*[^]*?\*\//g;function wA(t){let e={};return t.replace(yA,"").split(vA).forEach(n=>{if(n){let r=n.split(bA);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Tl(t){let e="";if(Tt(t))e=t;else if(Le(t))for(let n=0;n<t.length;n++){let r=Tl(t[n]);r&&(e+=r+" ")}else if(zt(t))for(let n in t)t[n]&&(e+=n+" ");return e.trim()}Symbol(process.env.NODE_ENV!=="production"?"Object iterate":"");Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":"");Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(_A));function nm(t){return _l(t)?nm(t.__v_raw):!!(t&&t.__v_isReactive)}function _l(t){return!!(t&&t.__v_isReadonly)}function Qa(t){return!!(t&&t.__v_isShallow)}function vl(t){return t?!!t.__v_raw:!1}function Yt(t){let e=t&&t.__v_raw;return e?Yt(e):t}function $l(t){return t?t.__v_isRef===!0:!1}var Jt=[];function CA(t){Jt.push(t)}function SA(){Jt.pop()}var el=!1;function Vs(t,...e){if(el)return;el=!0;let n=Jt.length?Jt[Jt.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=xA();if(r)Rl(r,n,11,[t+e.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),n&&n.proxy,s.map(({vnode:i})=>`at <${gm(n,i.type)}>`).join(`
203
+ `,...ZS(s))}xf(),La=!1}function XS(){let t=Jt[Jt.length-1];if(!t)return[];let e=[];for(;t;){let n=e[0];n&&n.vnode===t?n.recurseCount++:e.push({vnode:t,recurseCount:0});let r=t.component&&t.component.parent;t=r&&r.vnode}return e}function ZS(t){let e=[];return t.forEach((n,r)=>{e.push(...r===0?[]:[`
204
+ `],...QS(n))}),e}function QS({vnode:t,recurseCount:e}){let n=e>0?`... (${e} recursive calls)`:"",r=t.component?t.component.parent==null:!1,s=` at <${Vf(t.component,t.type,r)}`,i=">"+n;return t.props?[s,...ex(t.props),i]:[s+i]}function ex(t){let e=[],n=Object.keys(t);return n.slice(0,3).forEach(r=>{e.push(...Ef(r,t[r]))}),n.length>3&&e.push(" ..."),e}function Ef(t,e,n){return Ot(e)?(e=JSON.stringify(e),n?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?n?e:[`${t}=${e}`]:Xa(e)?(e=Ef(t,Yt(e.value),!0),n?e:[`${t}=Ref<`,e,">"]):Xt(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=Yt(e),n?e:[`${t}=`,e])}var Of={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Za(t,e,n,r){try{return r?t(...r):t()}catch(s){Tf(s,e,n)}}function Tf(t,e,n,r=!0){let s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||Ua;if(e){let a=e.parent,l=e.proxy,d=process.env.NODE_ENV!=="production"?Of[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){let u=a.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](t,l,d)===!1)return}a=a.parent}if(i){Sf(),Za(i,null,10,[t,l,d]),xf();return}}tx(t,n,s,r,o)}function tx(t,e,n,r=!0,s=!1){if(process.env.NODE_ENV!=="production"){let i=Of[e];if(n&&YS(n),cr(`Unhandled error${i?` during execution of ${i}`:""}`),n&&JS(),r)throw t}else if(s)throw t}var Ee=[],ut=-1,yn=[],Et=null,bn=0,nx=Promise.resolve(),Ka=null,rx=100;function sx(t){let e=ut+1,n=Ee.length;for(;e<n;){let r=e+n>>>1,s=Ee[r],i=ur(s);i<t||i===t&&s.flags&2?e=r+1:n=r}return e}function ix(t){if(!(t.flags&1)){let e=ur(t),n=Ee[Ee.length-1];!n||!(t.flags&2)&&e>=ur(n)?Ee.push(t):Ee.splice(sx(e),0,t),t.flags|=1,$f()}}function $f(){Ka||(Ka=nx.then(Rf))}function ox(t){Ge(t)?yn.push(...t):Et&&t.id===-1?Et.splice(bn+1,0,t):t.flags&1||(yn.push(t),t.flags|=1),$f()}function ax(t){if(yn.length){let e=[...new Set(yn)].sort((n,r)=>ur(n)-ur(r));if(yn.length=0,Et){Et.push(...e);return}for(Et=e,process.env.NODE_ENV!=="production"&&(t=t||new Map),bn=0;bn<Et.length;bn++){let n=Et[bn];process.env.NODE_ENV!=="production"&&Nf(t,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Et=null,bn=0}}var ur=t=>t.id==null?t.flags&2?-1:1/0:t.id;function Rf(t){process.env.NODE_ENV!=="production"&&(t=t||new Map);let e=process.env.NODE_ENV!=="production"?n=>Nf(t,n):LS;try{for(ut=0;ut<Ee.length;ut++){let n=Ee[ut];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&e(n))continue;n.flags&4&&(n.flags&=-2),Za(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;ut<Ee.length;ut++){let n=Ee[ut];n&&(n.flags&=-2)}ut=-1,Ee.length=0,ax(t),Ka=null,(Ee.length||yn.length)&&Rf(t)}}function Nf(t,e){let n=t.get(e)||0;if(n>rx){let r=e.i,s=r&&Ff(r.type);return Tf(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return t.set(e,n+1),!1}var Ha=new Map;process.env.NODE_ENV!=="production"&&(Is().__VUE_HMR_RUNTIME__={createRecord:Ga(lx),rerender:Ga(cx),reload:Ga(ux)});var Ts=new Map;function lx(t,e){return Ts.has(t)?!1:(Ts.set(t,{initialDef:$s(e),instances:new Set}),!0)}function $s(t){return qf(t)?t.__vccOpts:t}function cx(t,e){let n=Ts.get(t);n&&(n.initialDef.render=e,[...n.instances].forEach(r=>{e&&(r.render=e,$s(r.type).render=e),r.renderCache=[],r.update()}))}function ux(t,e){let n=Ts.get(t);if(!n)return;e=$s(e),yf(n.initialDef,e);let r=[...n.instances];for(let s=0;s<r.length;s++){let i=r[s],o=$s(i.type),a=Ha.get(o);a||(o!==n.initialDef&&yf(o,e),Ha.set(o,a=new Set)),a.add(i),i.appContext.propsCache.delete(i.type),i.appContext.emitsCache.delete(i.type),i.appContext.optionsCache.delete(i.type),i.ceReload?(a.add(i),i.ceReload(e.styles),a.delete(i)):i.parent?ix(()=>{i.parent.update(),a.delete(i)}):i.appContext.reload?i.appContext.reload():typeof window<"u"&&window.location.reload(),i.root.ce&&i!==i.root&&i.root.ce._removeChildStyle(o)}ox(()=>{Ha.clear()})}function yf(t,e){ks(t,e);for(let n in t)n!=="__file"&&!(n in e)&&delete t[n]}function Ga(t){return(e,n)=>{try{return t(e,n)}catch{}}}var Rs=null,dx=null,hx=t=>t.__isTeleport;function kf(t,e){t.shapeFlag&6&&t.component?(t.transition=e,kf(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}Is().requestIdleCallback;Is().cancelIdleCallback;var px=Symbol.for("v-ndc"),fx={};process.env.NODE_ENV!=="production"&&(fx.ownKeys=t=>(cr("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(t)));var mx={},If=t=>Object.getPrototypeOf(t)===mx,gx=t=>t.__isSuspense,Df=Symbol.for("v-fgt"),_x=Symbol.for("v-txt"),vx=Symbol.for("v-cmt");function bx(t){return t?t.__v_isVNode===!0:!1}var yx=(...t)=>Mf(...t),Pf=({key:t})=>t??null,Os=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Ot(t)||Xa(t)||Xt(t)?{i:Rs,r:t,k:e,f:!!n}:t:null);function wx(t,e=null,n=null,r=0,s=null,i=t===Df?0:1,o=!1,a=!1){let l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Pf(e),ref:e&&Os(e),scopeId:dx,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Rs};return a?(Qa(l,n),i&128&&t.normalize(l)):n&&(l.shapeFlag|=Ot(n)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&cr("VNode created with invalid key (NaN). VNode type:",l.type),l}var Cx=process.env.NODE_ENV!=="production"?yx:Mf;function Mf(t,e=null,n=null,r=0,s=null,i=!1){if((!t||t===px)&&(process.env.NODE_ENV!=="production"&&!t&&cr(`Invalid vnode type when creating vnode: ${t}.`),t=vx),bx(t)){let a=Ns(t,e,!0);return n&&Qa(a,n),a.patchFlag=-2,a}if(qf(t)&&(t=t.__vccOpts),e){e=Sx(e);let{class:a,style:l}=e;a&&!Ot(a)&&(e.class=Ja(a)),Kt(l)&&(za(l)&&!Ge(l)&&(l=ks({},l)),e.style=Ya(l))}let o=Ot(t)?1:gx(t)?128:hx(t)?64:Kt(t)?4:Xt(t)?2:0;return process.env.NODE_ENV!=="production"&&o&4&&za(t)&&(t=Yt(t),cr("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
205
+ Component that was made reactive: `,t)),wx(t,e,n,r,s,o,i,!0)}function Sx(t){return t?za(t)||If(t)?ks({},t):t:null}function Ns(t,e,n=!1,r=!1){let{props:s,ref:i,patchFlag:o,children:a,transition:l}=t,d=e?Ax(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:d,key:d&&Pf(d),ref:e&&e.ref?n&&i?Ge(i)?i.concat(Os(e)):[i,Os(e)]:Os(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:process.env.NODE_ENV!=="production"&&o===-1&&Ge(a)?a.map(jf):a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Df?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Ns(t.ssContent),ssFallback:t.ssFallback&&Ns(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&r&&kf(u,l.clone(u)),u}function jf(t){let e=Ns(t);return Ge(t.children)&&(e.children=t.children.map(jf)),e}function xx(t=" ",e=0){return Cx(_x,null,t,e)}function Qa(t,e){let n=0,{shapeFlag:r}=t;if(e==null)e=null;else if(Ge(e))n=16;else if(typeof e=="object")if(r&65){let s=e.default;s&&(s._c&&(s._d=!1),Qa(t,s()),s._c&&(s._d=!0));return}else n=32,!e._&&!If(e)&&(e._ctx=Rs);else Xt(e)?(e={default:e,_ctx:Rs},n=32):(e=String(e),r&64?(n=16,e=[xx(e)]):n=8);t.children=e,t.shapeFlag|=n}function Ax(...t){let e={};for(let n=0;n<t.length;n++){let r=t[n];for(let s in r)if(s==="class")e.class!==r.class&&(e.class=Ja([e.class,r.class]));else if(s==="style")e.style=Ya([e.style,r.style]);else if(HS(s)){let i=e[s],o=r[s];o&&i!==o&&!(Ge(i)&&i.includes(o))&&(e[s]=i?[].concat(i,o):o)}else s!==""&&(e[s]=r[s])}return e}{let t=Is(),e=(n,r)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};e("__VUE_INSTANCE_SETTERS__",n=>n),e("__VUE_SSR_SETTERS__",n=>n)}process.env.NODE_ENV;var Ex=/(?:^|[-_])(\w)/g,Ox=t=>t.replace(Ex,e=>e.toUpperCase()).replace(/[-_]/g,"");function Ff(t,e=!0){return Xt(t)?t.displayName||t.name:t.name||e&&t.__name}function Vf(t,e,n=!1){let r=Ff(e);if(!r&&e.__file){let s=e.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&t&&t.parent){let s=i=>{for(let o in i)if(i[o]===e)return o};r=s(t.components||t.parent.type.components)||s(t.appContext.components)}return r?Ox(r):n?"App":"Anonymous"}function qf(t){return Xt(t)&&"__vccOpts"in t}function Tx(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;let t={style:"color:#3ba776"},e={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(c){return Kt(c)?c.__isVue?["div",t,"VueInstance"]:Xa(c)?["div",{},["span",t,u(c)],"<",a("_value"in c?c._value:c),">"]:Af(c)?["div",{},["span",t,qa(c)?"ShallowReactive":"Reactive"],"<",a(c),`>${Ba(c)?" (readonly)":""}`]:Ba(c)?["div",{},["span",t,qa(c)?"ShallowReadonly":"Readonly"],"<",a(c),">"]:null:null},hasBody(c){return c&&c.__isVue},body(c){if(c&&c.__isVue)return["div",{},...i(c.$)]}};function i(c){let h=[];c.type.props&&c.props&&h.push(o("props",Yt(c.props))),c.setupState!==Ua&&h.push(o("setup",c.setupState)),c.data!==Ua&&h.push(o("data",Yt(c.data)));let f=l(c,"computed");f&&h.push(o("computed",f));let v=l(c,"inject");return v&&h.push(o("injected",v)),h.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:c}]]),h}function o(c,h){return h=ks({},h),Object.keys(h).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},c],["div",{style:"padding-left:1.25em"},...Object.keys(h).map(f=>["div",{},["span",r,f+": "],a(h[f],!1)])]]:["span",{}]}function a(c,h=!0){return typeof c=="number"?["span",e,c]:typeof c=="string"?["span",n,JSON.stringify(c)]:typeof c=="boolean"?["span",r,c]:Kt(c)?["object",{object:h?Yt(c):c}]:["span",n,String(c)]}function l(c,h){let f=c.type;if(Xt(f))return;let v={};for(let m in c.ctx)d(f,m,h)&&(v[m]=c.ctx[m]);return v}function d(c,h,f){let v=c[f];if(Ge(v)&&v.includes(h)||Kt(v)&&h in v||c.extends&&d(c.extends,h,f)||c.mixins&&c.mixins.some(m=>d(m,h,f)))return!0}function u(c){return qa(c)?"ShallowRef":c.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;function $x(){Tx()}process.env.NODE_ENV!=="production"&&$x();function Rx(t){let e=Object.create(null);for(let n of t.split(","))e[n]=1;return n=>n in e}process.env.NODE_ENV!=="production"&&Object.freeze({});process.env.NODE_ENV!=="production"&&Object.freeze([]);var al=Object.assign,Nx=Object.prototype.hasOwnProperty,ll=(t,e)=>Nx.call(t,e),xn=Array.isArray,hr=t=>Wf(t)==="[object Map]",kx=t=>typeof t=="function",Ix=t=>typeof t=="string",br=t=>typeof t=="symbol",Xs=t=>t!==null&&typeof t=="object",Dx=Object.prototype.toString,Wf=t=>Dx.call(t),Bf=t=>Wf(t).slice(8,-1),xl=t=>Ix(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Px=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Mx=Px(t=>t.charAt(0).toUpperCase()+t.slice(1)),An=(t,e)=>!Object.is(t,e);function Tn(t,...e){}var z,zf=0,pr,fr;function jx(t,e=!1){if(t.flags|=8,e){t.next=fr,fr=t;return}t.next=pr,pr=t}function Al(){zf++}function El(){if(--zf>0)return;if(fr){let e=fr;for(fr=void 0;e;){let n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;pr;){let e=pr;for(pr=void 0;e;){let n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(r){t||(t=r)}e=n}}if(t)throw t}function Fx(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Vx(t){let e,n=t.depsTail,r=n;for(;r;){let s=r.prevDep;r.version===-1?(r===n&&(n=s),Yf(r),Lx(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}t.deps=e,t.depsTail=n}function qx(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Kf(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Kf(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===mr))return;t.globalVersion=mr;let e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!qx(t)){t.flags&=-3;return}let n=z,r=Rt;z=t,Rt=!0;try{Fx(t);let s=t.fn(t._value);(e.version===0||An(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{z=n,Rt=r,Vx(t),t.flags&=-3}}function Yf(t,e=!1){let{dep:n,prevSub:r,nextSub:s}=t;if(r&&(r.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=r,t.nextSub=void 0),process.env.NODE_ENV!=="production"&&n.subsHead===t&&(n.subsHead=s),n.subs===t&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Yf(i,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function Lx(t){let{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}var Rt=!0,Jf=[];function Hx(){Jf.push(Rt),Rt=!1}function Gx(){let t=Jf.pop();Rt=t===void 0?!0:t}var mr=0,cl=class{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},gr=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(e){if(!z||!Rt||z===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==z)n=this.activeLink=new cl(z,this),z.deps?(n.prevDep=z.depsTail,z.depsTail.nextDep=n,z.depsTail=n):z.deps=z.depsTail=n,Xf(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){let r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=z.depsTail,n.nextDep=void 0,z.depsTail.nextDep=n,z.depsTail=n,z.deps===n&&(z.deps=r)}return process.env.NODE_ENV!=="production"&&z.onTrack&&z.onTrack(al({effect:z},e)),n}trigger(e){this.version++,mr++,this.notify(e)}notify(e){Al();try{if(process.env.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(al({effect:n.sub},e));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{El()}}};function Xf(t){if(t.dep.sc++,t.sub.flags&4){let e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let r=e.deps;r;r=r.nextDep)Xf(r)}let n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),process.env.NODE_ENV!=="production"&&t.dep.subsHead===void 0&&(t.dep.subsHead=t),t.dep.subs=t}}var ul=new WeakMap,Zt=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),dl=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),_r=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function me(t,e,n){if(Rt&&z){let r=ul.get(t);r||ul.set(t,r=new Map);let s=r.get(n);s||(r.set(n,s=new gr),s.map=r,s.key=n),process.env.NODE_ENV!=="production"?s.track({target:t,type:e,key:n}):s.track()}}function $t(t,e,n,r,s,i){let o=ul.get(t);if(!o){mr++;return}let a=l=>{l&&(process.env.NODE_ENV!=="production"?l.trigger({target:t,type:e,key:n,newValue:r,oldValue:s,oldTarget:i}):l.trigger())};if(Al(),e==="clear")o.forEach(a);else{let l=xn(t),d=l&&xl(n);if(l&&n==="length"){let u=Number(r);o.forEach((c,h)=>{(h==="length"||h===_r||!br(h)&&h>=u)&&a(c)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),d&&a(o.get(_r)),e){case"add":l?d&&a(o.get("length")):(a(o.get(Zt)),hr(t)&&a(o.get(dl)));break;case"delete":l||(a(o.get(Zt)),hr(t)&&a(o.get(dl)));break;case"set":hr(t)&&a(o.get(Zt));break}}El()}function wn(t){let e=F(t);return e===t?e:(me(e,"iterate",_r),Nt(t)?e:e.map(he))}function Ol(t){return me(t=F(t),"iterate",_r),t}var Ux={__proto__:null,[Symbol.iterator](){return el(this,Symbol.iterator,he)},concat(...t){return wn(this).concat(...t.map(e=>xn(e)?wn(e):e))},entries(){return el(this,"entries",t=>(t[1]=he(t[1]),t))},every(t,e){return dt(this,"every",t,e,void 0,arguments)},filter(t,e){return dt(this,"filter",t,e,n=>n.map(he),arguments)},find(t,e){return dt(this,"find",t,e,he,arguments)},findIndex(t,e){return dt(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return dt(this,"findLast",t,e,he,arguments)},findLastIndex(t,e){return dt(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return dt(this,"forEach",t,e,void 0,arguments)},includes(...t){return tl(this,"includes",t)},indexOf(...t){return tl(this,"indexOf",t)},join(t){return wn(this).join(t)},lastIndexOf(...t){return tl(this,"lastIndexOf",t)},map(t,e){return dt(this,"map",t,e,void 0,arguments)},pop(){return dr(this,"pop")},push(...t){return dr(this,"push",t)},reduce(t,...e){return Lf(this,"reduce",t,e)},reduceRight(t,...e){return Lf(this,"reduceRight",t,e)},shift(){return dr(this,"shift")},some(t,e){return dt(this,"some",t,e,void 0,arguments)},splice(...t){return dr(this,"splice",t)},toReversed(){return wn(this).toReversed()},toSorted(t){return wn(this).toSorted(t)},toSpliced(...t){return wn(this).toSpliced(...t)},unshift(...t){return dr(this,"unshift",t)},values(){return el(this,"values",he)}};function el(t,e,n){let r=Ol(t),s=r[e]();return r!==t&&!Nt(t)&&(s._next=s.next,s.next=()=>{let i=s._next();return i.value&&(i.value=n(i.value)),i}),s}var Wx=Array.prototype;function dt(t,e,n,r,s,i){let o=Ol(t),a=o!==t&&!Nt(t),l=o[e];if(l!==Wx[e]){let c=l.apply(t,i);return a?he(c):c}let d=n;o!==t&&(a?d=function(c,h){return n.call(this,he(c),h,t)}:n.length>2&&(d=function(c,h){return n.call(this,c,h,t)}));let u=l.call(o,d,r);return a&&s?s(u):u}function Lf(t,e,n,r){let s=Ol(t),i=n;return s!==t&&(Nt(t)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,t)}):i=function(o,a,l){return n.call(this,o,he(a),l,t)}),s[e](i,...r)}function tl(t,e,n){let r=F(t);me(r,"iterate",_r);let s=r[e](...n);return(s===-1||s===!1)&&iA(n[0])?(n[0]=F(n[0]),r[e](...n)):s}function dr(t,e,n=[]){Hx(),Al();let r=F(t)[e].apply(t,n);return El(),Gx(),r}var Bx=Rx("__proto__,__v_isRef,__isVue"),Zf=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(br));function zx(t){br(t)||(t=String(t));let e=F(this);return me(e,"has",t),e.hasOwnProperty(t)}var Vs=class{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){if(n==="__v_skip")return e.__v_skip;let s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?tm:em:i?nA:Qf).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;let o=xn(e);if(!s){let l;if(o&&(l=Ux[n]))return l;if(n==="hasOwnProperty")return zx}let a=Reflect.get(e,n,En(e)?e:r);return(br(n)?Zf.has(n):Bx(n))||(s||me(e,"get",n),i)?a:En(a)?o&&xl(n)?a:a.value:Xs(a)?s?Ls(a):nm(a):a}},hl=class extends Vs{constructor(e=!1){super(!1,e)}set(e,n,r,s){let i=e[n];if(!this._isShallow){let l=$n(i);if(!Nt(r)&&!$n(r)&&(i=F(i),r=F(r)),!xn(e)&&En(i)&&!En(r))return l?!1:(i.value=r,!0)}let o=xn(e)&&xl(n)?Number(n)<e.length:ll(e,n),a=Reflect.set(e,n,r,En(e)?e:s);return e===F(s)&&(o?An(r,i)&&$t(e,"set",n,r,i):$t(e,"add",n,r)),a}deleteProperty(e,n){let r=ll(e,n),s=e[n],i=Reflect.deleteProperty(e,n);return i&&r&&$t(e,"delete",n,void 0,s),i}has(e,n){let r=Reflect.has(e,n);return(!br(n)||!Zf.has(n))&&me(e,"has",n),r}ownKeys(e){return me(e,"iterate",xn(e)?"length":Zt),Reflect.ownKeys(e)}},qs=class extends Vs{constructor(e=!1){super(!0,e)}set(e,n){return process.env.NODE_ENV!=="production"&&Tn(`Set operation on key "${String(n)}" failed: target is readonly.`,e),!0}deleteProperty(e,n){return process.env.NODE_ENV!=="production"&&Tn(`Delete operation on key "${String(n)}" failed: target is readonly.`,e),!0}},Kx=new hl,Yx=new qs,Jx=new qs(!0),pl=t=>t,Ds=t=>Reflect.getPrototypeOf(t);function Xx(t,e,n){return function(...r){let s=this.__v_raw,i=F(s),o=hr(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,d=s[t](...r),u=n?pl:e?fl:he;return!e&&me(i,"iterate",l?dl:Zt),{next(){let{value:c,done:h}=d.next();return h?{value:c,done:h}:{value:a?[u(c[0]),u(c[1])]:u(c),done:h}},[Symbol.iterator](){return this}}}}function Ps(t){return function(...e){if(process.env.NODE_ENV!=="production"){let n=e[0]?`on key "${e[0]}" `:"";Tn(`${Mx(t)} operation ${n}failed: target is readonly.`,F(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function Zx(t,e){let n={get(r){let s=this.__v_raw,i=F(s),o=F(r);t||(An(r,o)&&me(i,"get",r),me(i,"get",o));let{has:a}=Ds(i),l=e?pl:t?fl:he;if(a.call(i,r))return l(s.get(r));if(a.call(i,o))return l(s.get(o));s!==i&&s.get(r)},get size(){let r=this.__v_raw;return!t&&me(F(r),"iterate",Zt),Reflect.get(r,"size",r)},has(r){let s=this.__v_raw,i=F(s),o=F(r);return t||(An(r,o)&&me(i,"has",r),me(i,"has",o)),r===o?s.has(r):s.has(r)||s.has(o)},forEach(r,s){let i=this,o=i.__v_raw,a=F(o),l=e?pl:t?fl:he;return!t&&me(a,"iterate",Zt),o.forEach((d,u)=>r.call(s,l(d),l(u),i))}};return al(n,t?{add:Ps("add"),set:Ps("set"),delete:Ps("delete"),clear:Ps("clear")}:{add(r){!e&&!Nt(r)&&!$n(r)&&(r=F(r));let s=F(this);return Ds(s).has.call(s,r)||(s.add(r),$t(s,"add",r,r)),this},set(r,s){!e&&!Nt(s)&&!$n(s)&&(s=F(s));let i=F(this),{has:o,get:a}=Ds(i),l=o.call(i,r);l?process.env.NODE_ENV!=="production"&&Hf(i,o,r):(r=F(r),l=o.call(i,r));let d=a.call(i,r);return i.set(r,s),l?An(s,d)&&$t(i,"set",r,s,d):$t(i,"add",r,s),this},delete(r){let s=F(this),{has:i,get:o}=Ds(s),a=i.call(s,r);a?process.env.NODE_ENV!=="production"&&Hf(s,i,r):(r=F(r),a=i.call(s,r));let l=o?o.call(s,r):void 0,d=s.delete(r);return a&&$t(s,"delete",r,void 0,l),d},clear(){let r=F(this),s=r.size!==0,i=process.env.NODE_ENV!=="production"?hr(r)?new Map(r):new Set(r):void 0,o=r.clear();return s&&$t(r,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Xx(r,t,e)}),n}function Tl(t,e){let n=Zx(t,e);return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get(ll(n,s)&&s in r?n:r,s,i)}var Qx={get:Tl(!1,!1)},eA={get:Tl(!0,!1)},tA={get:Tl(!0,!0)};function Hf(t,e,n){let r=F(n);if(r!==n&&e.call(t,r)){let s=Bf(t);Tn(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var Qf=new WeakMap,nA=new WeakMap,em=new WeakMap,tm=new WeakMap;function rA(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function sA(t){return t.__v_skip||!Object.isExtensible(t)?0:rA(Bf(t))}function nm(t){return $n(t)?t:$l(t,!1,Kx,Qx,Qf)}function Ls(t){return $l(t,!0,Yx,eA,em)}function js(t){return $l(t,!0,Jx,tA,tm)}function $l(t,e,n,r,s){if(!Xs(t))return process.env.NODE_ENV!=="production"&&Tn(`value cannot be made ${e?"readonly":"reactive"}: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive))return t;let i=s.get(t);if(i)return i;let o=sA(t);if(o===0)return t;let a=new Proxy(t,o===2?r:n);return s.set(t,a),a}function $n(t){return!!(t&&t.__v_isReadonly)}function Nt(t){return!!(t&&t.__v_isShallow)}function iA(t){return t?!!t.__v_raw:!1}function F(t){let e=t&&t.__v_raw;return e?F(e):t}var he=t=>Xs(t)?nm(t):t,fl=t=>Xs(t)?Ls(t):t;function En(t){return t?t.__v_isRef===!0:!1}function Hs(t){return oA(t,!1)}function oA(t,e){return En(t)?t:new ml(t,e)}var ml=class{constructor(e,n){this.dep=new gr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:F(e),this._value=n?e:he(e),this.__v_isShallow=n}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(e){let n=this._rawValue,r=this.__v_isShallow||Nt(e)||$n(e);e=r?e:F(e),An(e,n)&&(this._rawValue=e,this._value=r?e:he(e),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:n}):this.dep.trigger())}},gl=class{constructor(e,n,r){this.fn=e,this.setter=n,this._value=void 0,this.dep=new gr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=mr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&z!==this)return jx(this,!0),!0;process.env.NODE_ENV}get value(){let e=process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Kf(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter?this.setter(e):process.env.NODE_ENV!=="production"&&Tn("Write operation failed: computed value is readonly")}};function _l(t,e,n=!1){let r,s;kx(t)?r=t:(r=t.get,s=t.set);let i=new gl(r,s,n);return process.env.NODE_ENV,i}var aA="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",lA=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=aA[n[t]&63];return e};function cA(t,e=!0,n=!1){let r=Hs(),s,i=Hs(!1),o=()=>{},a=new Proxy(t,{apply:function(u,c,h){let f;try{f=u(...h)}catch(v){f=v}if(f instanceof Error){if(r.value=f,s=f,e)throw o(),f}else i.value=!0,r.value=void 0,s=!0,o()}}),l=()=>{},d=new Proxy(u=>{r.value=u},{apply:function(u,c,h){u(...h),l(...h)}});return{promise:new Promise((u,c)=>{if(e&&s instanceof Error){c(s);return}else if(s===!0){u();return}let h;n&&(h=setTimeout(()=>{let f=new Error("timeout!");r.value=f,e&&c(f)},n)),o=()=>{h&&(clearTimeout(h),h=void 0),u()}}),callback:a,onError:d,resolved:_l(()=>i.value),error:_l(()=>r.value)}}function vl(){return lA()}function uA(){let t={},e={},n=new WeakMap,r={};return Object.freeze({registerAgg(s){if(s.isInitialized.value)throw new Error("Agg must register before initialized");if(r[s.__id])throw new Error("Agg already registered");s.type==="MultiInstance"&&s.api.events.destroyed.watchPublish(()=>{delete r[s.__id]}),r[s.__id]=s;let i=[];for(let o of Object.values(t))o.mount({api:s.api,__aggId:s.__id,isInitialized:s.isInitialized});for(let o of Object.values(e))o.mount({api:s.api,__aggId:s.__id}),i.push(o.__id);n.set(s,i)},createSetupPlugin(s){let i;return s instanceof Function?i=s():i=s,Object.freeze({__id:vl(),type:"Setup",mount(o){if(o.isInitialized.value)throw new Error("Can not setup after initialized");i.mount({api:o.api,__aggId:o.__aggId})}})},createHotSwapPlugin(s){let i;return s instanceof Function?i=s():i=s,Object.freeze({__id:vl(),type:"HotSwap",mount:i.mount,unmount:i.unmount})},registerPlugin(s){if(s.type==="Setup"){if(t[s.__id])throw new Error("Plugin already registered");t[s.__id]=s;for(let i in r)s.mount({api:r[i].api,__aggId:r[i].__id,isInitialized:r[i].isInitialized})}else if(s.type==="HotSwap"){e[s.__id]=s;for(let i in r)n.has(r[i])&&!n.get(r[i]).includes(s.__id)&&(s.mount({api:r[i].api,__aggId:r[i].__id}),n.get(r[i]).push(s.__id))}else isNever(s)},unregisterPlugin(s){if(s.type==="Setup")throw new Error("Can not unregister setup plugin");if(s.type==="HotSwap"){for(let i in r)n.has(r[i])&&n.get(r[i]).includes(s.__id)&&s.unmount({api:r[i].api,__aggId:r[i].__id});delete e[s.__id]}else isNever(s)}})}function dA(t){return uA()}function hA(t){let e=pA(t);return js({states:e.states,commands:e.commands,events:e.events})}function pA(t){let e=t.states;for(let o of Object.keys(t.states))e[o]=Ls(e[o]);let n=js(t.states),r=Ls(t.commands),s={},i=t.events;for(let o in t.events)s[o]=i[o].api;return js({states:n,commands:r,events:js(s),destroy:t.destroy})}function fA(t){let{callback:e,onError:n,promise:r,resolved:s}=cA(()=>{},!1,5e3);function i(c){if(s.value===!0)throw new Error("Agg already initialized");o.push(c())}let o=[],a=t({onCreated(c){Promise.resolve().then(c)},onBeforeInitialize:i,isInitialized:_l(()=>s.value),untilInitialized:r});setTimeout(()=>Promise.all(o).then(()=>{e()}).catch(c=>{n(c)}),0);let l=a.states||{},d=a.commands||{},u=a.events||{};return{__id:vl(),type:"Singleton",api:hA({states:l,commands:d,events:u,destroy:()=>{}}),isInitialized:s,async untilInitialized(){return await r.catch(c=>{throw new Error(`Failed to initialize Agg: ${c.message}
206
+ Stack : ${c.stack||"unkown"}`)})}}}var Ms;function mA(t){return fA(()=>{let e=Hs(t),n=Hs({}),r=()=>[],s=()=>[],i=()=>[],o=()=>[],a=()=>[],l=()=>[],d=()=>[];return{states:{designer:e,context:n},commands:{genCodeFiles(){return d()},clearCaches(){},setContext(u){n.value=u},setDomainDesigner(u){this.clearCaches(),e.value=u},_genInfoCode(...u){return r(...u)},_setInfoCodeProvider(u){r=u},_genCommandCode(...u){return s(...u)},_setCommandCodeProvider(u){s=u},_genFacadeCommandCode(...u){return i(...u)},_setFacadeCommandCodeProvider(u){i=u},_genAggCode(...u){return o(...u)},_setAggCodeProvider(u){o=u},_genEventCode(...u){return a(...u)},_setEventCodeProvider(u){a=u},_genReadModelCode(...u){return l(...u)},_setReadModelCodeProvider(u){l=u},_setCodeFileProvider(u){d=u}}}})}var We=dA();function rm(t){if(!Ms){if(!t)throw new Error("designer is required");Ms=mA(t),We.registerAgg(Ms)}return Ms.api}function Zs(t){return t&&t._attributes&&t._attributes.rule==="Info"}function gA(t){return t&&t._attributes&&t._attributes.rule==="Agg"}function _A(t){return t&&t._attributes&&t._attributes.rule==="Command"}function vA(t){return t&&t._attributes&&t._attributes.rule==="FacadeCommand"}function bA(t){return t&&t._attributes&&t._attributes.rule==="Event"}function yA(t){return t&&t._attributes&&t._attributes.rule==="ReadModel"}var bl=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);var wA=()=>{},CA=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Qs=Object.assign,Ue=Array.isArray,nn=t=>typeof t=="function",kt=t=>typeof t=="string",SA=t=>typeof t=="symbol",Qt=t=>t!==null&&typeof t=="object",Gf,ei=()=>Gf||(Gf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Rl(t){if(Ue(t)){let e={};for(let n=0;n<t.length;n++){let r=t[n],s=kt(r)?OA(r):Rl(r);if(s)for(let i in s)e[i]=s[i]}return e}else if(kt(t)||Qt(t))return t}var xA=/;(?![^(]*\))/g,AA=/:([^]+)/,EA=/\/\*[^]*?\*\//g;function OA(t){let e={};return t.replace(EA,"").split(xA).forEach(n=>{if(n){let r=n.split(AA);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Nl(t){let e="";if(kt(t))e=t;else if(Ue(t))for(let n=0;n<t.length;n++){let r=Nl(t[n]);r&&(e+=r+" ")}else if(Qt(t))for(let n in t)t[n]&&(e+=n+" ");return e.trim()}Symbol(process.env.NODE_ENV!=="production"?"Object iterate":"");Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":"");Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(SA));function sm(t){return yl(t)?sm(t.__v_raw):!!(t&&t.__v_isReactive)}function yl(t){return!!(t&&t.__v_isReadonly)}function nl(t){return!!(t&&t.__v_isShallow)}function wl(t){return t?!!t.__v_raw:!1}function en(t){let e=t&&t.__v_raw;return e?en(e):t}function kl(t){return t?t.__v_isRef===!0:!1}var tn=[];function TA(t){tn.push(t)}function $A(){tn.pop()}var rl=!1;function Gs(t,...e){if(rl)return;rl=!0;let n=tn.length?tn[tn.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=RA();if(r)Il(r,n,11,[t+e.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),n&&n.proxy,s.map(({vnode:i})=>`at <${vm(n,i.type)}>`).join(`
207
207
  `),s]);else{let i=[`[Vue warn]: ${t}`,...e];s.length&&i.push(`
208
- `,...AA(s))}el=!1}function xA(){let t=Jt[Jt.length-1];if(!t)return[];let e=[];for(;t;){let n=e[0];n&&n.vnode===t?n.recurseCount++:e.push({vnode:t,recurseCount:0});let r=t.component&&t.component.parent;t=r&&r.vnode}return e}function AA(t){let e=[];return t.forEach((n,r)=>{e.push(...r===0?[]:[`
209
- `],...EA(n))}),e}function EA({vnode:t,recurseCount:e}){let n=e>0?`... (${e} recursive calls)`:"",r=t.component?t.component.parent==null:!1,s=` at <${gm(t.component,t.type,r)}`,i=">"+n;return t.props?[s,...OA(t.props),i]:[s+i]}function OA(t){let e=[],n=Object.keys(t);return n.slice(0,3).forEach(r=>{e.push(...rm(r,t[r]))}),n.length>3&&e.push(" ..."),e}function rm(t,e,n){return Tt(e)?(e=JSON.stringify(e),n?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?n?e:[`${t}=${e}`]:$l(e)?(e=rm(t,Yt(e.value),!0),n?e:[`${t}=Ref<`,e,">"]):Xt(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=Yt(e),n?e:[`${t}=`,e])}var sm={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Rl(t,e,n,r){try{return r?t(...r):t()}catch(s){im(s,e,n)}}function im(t,e,n,r=!0){let s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||gl;if(e){let a=e.parent,l=e.proxy,d=process.env.NODE_ENV!=="production"?sm[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){let u=a.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](t,l,d)===!1)return}a=a.parent}if(i){Rl(i,null,10,[t,l,d]);return}}TA(t,n,s,r,o)}function TA(t,e,n,r=!0,s=!1){if(process.env.NODE_ENV!=="production"){let i=sm[e];if(n&&CA(n),Vs(`Unhandled error${i?` during execution of ${i}`:""}`),n&&SA(),r)throw t}else if(s)throw t}var Ee=[],at=-1,wn=[],xt=null,_n=0,$A=Promise.resolve(),bl=null,RA=100;function NA(t){let e=at+1,n=Ee.length;for(;e<n;){let r=e+n>>>1,s=Ee[r],i=fr(s);i<t||i===t&&s.flags&2?e=r+1:n=r}return e}function kA(t){if(!(t.flags&1)){let e=fr(t),n=Ee[Ee.length-1];!n||!(t.flags&2)&&e>=fr(n)?Ee.push(t):Ee.splice(NA(e),0,t),t.flags|=1,om()}}function om(){bl||(bl=$A.then(am))}function IA(t){Le(t)?wn.push(...t):xt&&t.id===-1?xt.splice(_n+1,0,t):t.flags&1||(wn.push(t),t.flags|=1),om()}function DA(t){if(wn.length){let e=[...new Set(wn)].sort((n,r)=>fr(n)-fr(r));if(wn.length=0,xt){xt.push(...e);return}for(xt=e,process.env.NODE_ENV!=="production"&&(t=t||new Map),_n=0;_n<xt.length;_n++){let n=xt[_n];process.env.NODE_ENV!=="production"&&lm(t,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}xt=null,_n=0}}var fr=t=>t.id==null?t.flags&2?-1:1/0:t.id;function am(t){process.env.NODE_ENV!=="production"&&(t=t||new Map);let e=process.env.NODE_ENV!=="production"?n=>lm(t,n):mA;try{for(at=0;at<Ee.length;at++){let n=Ee[at];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&e(n))continue;n.flags&4&&(n.flags&=-2),Rl(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;at<Ee.length;at++){let n=Ee[at];n&&(n.flags&=-2)}at=-1,Ee.length=0,DA(t),bl=null,(Ee.length||wn.length)&&am(t)}}function lm(t,e){let n=t.get(e)||0;if(n>RA){let r=e.i,s=r&&mm(r.type);return im(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return t.set(e,n+1),!1}var tl=new Map;process.env.NODE_ENV!=="production"&&(Xs().__VUE_HMR_RUNTIME__={createRecord:nl(PA),rerender:nl(MA),reload:nl(jA)});var Ls=new Map;function PA(t,e){return Ls.has(t)?!1:(Ls.set(t,{initialDef:Hs(e),instances:new Set}),!0)}function Hs(t){return _m(t)?t.__vccOpts:t}function MA(t,e){let n=Ls.get(t);n&&(n.initialDef.render=e,[...n.instances].forEach(r=>{e&&(r.render=e,Hs(r.type).render=e),r.renderCache=[],r.update()}))}function jA(t,e){let n=Ls.get(t);if(!n)return;e=Hs(e),Hf(n.initialDef,e);let r=[...n.instances];for(let s=0;s<r.length;s++){let i=r[s],o=Hs(i.type),a=tl.get(o);a||(o!==n.initialDef&&Hf(o,e),tl.set(o,a=new Set)),a.add(i),i.appContext.propsCache.delete(i.type),i.appContext.emitsCache.delete(i.type),i.appContext.optionsCache.delete(i.type),i.ceReload?(a.add(i),i.ceReload(e.styles),a.delete(i)):i.parent?kA(()=>{i.parent.update(),a.delete(i)}):i.appContext.reload?i.appContext.reload():typeof window<"u"&&window.location.reload(),i.root.ce&&i!==i.root&&i.root.ce._removeChildStyle(o)}IA(()=>{tl.clear()})}function Hf(t,e){Js(t,e);for(let n in t)n!=="__file"&&!(n in e)&&delete t[n]}function nl(t){return(e,n)=>{try{return t(e,n)}catch{}}}var Gs=null,FA=null,qA=t=>t.__isTeleport;function cm(t,e){t.shapeFlag&6&&t.component?(t.transition=e,cm(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}Xs().requestIdleCallback;Xs().cancelIdleCallback;var VA=Symbol.for("v-ndc");process.env.NODE_ENV;var LA={},um=t=>Object.getPrototypeOf(t)===LA,HA=t=>t.__isSuspense,dm=Symbol.for("v-fgt"),GA=Symbol.for("v-txt"),UA=Symbol.for("v-cmt");function WA(t){return t?t.__v_isVNode===!0:!1}var KA=(...t)=>pm(...t),hm=({key:t})=>t??null,Ps=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Tt(t)||$l(t)||Xt(t)?{i:Gs,r:t,k:e,f:!!n}:t:null);function BA(t,e=null,n=null,r=0,s=null,i=t===dm?0:1,o=!1,a=!1){let l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&hm(e),ref:e&&Ps(e),scopeId:FA,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Gs};return a?(Nl(l,n),i&128&&t.normalize(l)):n&&(l.shapeFlag|=Tt(n)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&Vs("VNode created with invalid key (NaN). VNode type:",l.type),l}var zA=process.env.NODE_ENV!=="production"?KA:pm;function pm(t,e=null,n=null,r=0,s=null,i=!1){if((!t||t===VA)&&(process.env.NODE_ENV!=="production"&&!t&&Vs(`Invalid vnode type when creating vnode: ${t}.`),t=UA),WA(t)){let a=Us(t,e,!0);return n&&Nl(a,n),a.patchFlag=-2,a}if(_m(t)&&(t=t.__vccOpts),e){e=YA(e);let{class:a,style:l}=e;a&&!Tt(a)&&(e.class=Tl(a)),zt(l)&&(vl(l)&&!Le(l)&&(l=Js({},l)),e.style=Ol(l))}let o=Tt(t)?1:HA(t)?128:qA(t)?64:zt(t)?4:Xt(t)?2:0;return process.env.NODE_ENV!=="production"&&o&4&&vl(t)&&(t=Yt(t),Vs("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
210
- Component that was made reactive: `,t)),BA(t,e,n,r,s,o,i,!0)}function YA(t){return t?vl(t)||um(t)?Js({},t):t:null}function Us(t,e,n=!1,r=!1){let{props:s,ref:i,patchFlag:o,children:a,transition:l}=t,d=e?XA(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:d,key:d&&hm(d),ref:e&&e.ref?n&&i?Le(i)?i.concat(Ps(e)):[i,Ps(e)]:Ps(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:process.env.NODE_ENV!=="production"&&o===-1&&Le(a)?a.map(fm):a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==dm?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Us(t.ssContent),ssFallback:t.ssFallback&&Us(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&r&&cm(u,l.clone(u)),u}function fm(t){let e=Us(t);return Le(t.children)&&(e.children=t.children.map(fm)),e}function JA(t=" ",e=0){return zA(GA,null,t,e)}function Nl(t,e){let n=0,{shapeFlag:r}=t;if(e==null)e=null;else if(Le(e))n=16;else if(typeof e=="object")if(r&65){let s=e.default;s&&(s._c&&(s._d=!1),Nl(t,s()),s._c&&(s._d=!0));return}else n=32,!e._&&!um(e)&&(e._ctx=Gs);else Xt(e)?(e={default:e,_ctx:Gs},n=32):(e=String(e),r&64?(n=16,e=[JA(e)]):n=8);t.children=e,t.shapeFlag|=n}function XA(...t){let e={};for(let n=0;n<t.length;n++){let r=t[n];for(let s in r)if(s==="class")e.class!==r.class&&(e.class=Tl([e.class,r.class]));else if(s==="style")e.style=Ol([e.style,r.style]);else if(gA(s)){let i=e[s],o=r[s];o&&i!==o&&!(Le(i)&&i.includes(o))&&(e[s]=i?[].concat(i,o):o)}else s!==""&&(e[s]=r[s])}return e}{let t=Xs(),e=(n,r)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};e("__VUE_INSTANCE_SETTERS__",n=>n),e("__VUE_SSR_SETTERS__",n=>n)}process.env.NODE_ENV;var ZA=/(?:^|[-_])(\w)/g,QA=t=>t.replace(ZA,e=>e.toUpperCase()).replace(/[-_]/g,"");function mm(t,e=!0){return Xt(t)?t.displayName||t.name:t.name||e&&t.__name}function gm(t,e,n=!1){let r=mm(e);if(!r&&e.__file){let s=e.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&t&&t.parent){let s=i=>{for(let o in i)if(i[o]===e)return o};r=s(t.components||t.parent.type.components)||s(t.appContext.components)}return r?QA(r):n?"App":"Anonymous"}function _m(t){return Xt(t)&&"__vccOpts"in t}function eE(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;let t={style:"color:#3ba776"},e={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(c){return zt(c)?c.__isVue?["div",t,"VueInstance"]:$l(c)?["div",{},["span",t,u(c)],"<",a("_value"in c?c._value:c),">"]:nm(c)?["div",{},["span",t,Qa(c)?"ShallowReactive":"Reactive"],"<",a(c),`>${_l(c)?" (readonly)":""}`]:_l(c)?["div",{},["span",t,Qa(c)?"ShallowReadonly":"Readonly"],"<",a(c),">"]:null:null},hasBody(c){return c&&c.__isVue},body(c){if(c&&c.__isVue)return["div",{},...i(c.$)]}};function i(c){let h=[];c.type.props&&c.props&&h.push(o("props",Yt(c.props))),c.setupState!==gl&&h.push(o("setup",c.setupState)),c.data!==gl&&h.push(o("data",Yt(c.data)));let f=l(c,"computed");f&&h.push(o("computed",f));let v=l(c,"inject");return v&&h.push(o("injected",v)),h.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:c}]]),h}function o(c,h){return h=Js({},h),Object.keys(h).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},c],["div",{style:"padding-left:1.25em"},...Object.keys(h).map(f=>["div",{},["span",r,f+": "],a(h[f],!1)])]]:["span",{}]}function a(c,h=!0){return typeof c=="number"?["span",e,c]:typeof c=="string"?["span",n,JSON.stringify(c)]:typeof c=="boolean"?["span",r,c]:zt(c)?["object",{object:h?Yt(c):c}]:["span",n,String(c)]}function l(c,h){let f=c.type;if(Xt(f))return;let v={};for(let m in c.ctx)d(f,m,h)&&(v[m]=c.ctx[m]);return v}function d(c,h,f){let v=c[f];if(Le(v)&&v.includes(h)||zt(v)&&h in v||c.extends&&d(c.extends,h,f)||c.mixins&&c.mixins.some(m=>d(m,h,f)))return!0}function u(c){return Qa(c)?"ShallowRef":c.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;function tE(){eE()}process.env.NODE_ENV!=="production"&&tE();function nE(t){return dA(t)||hA(t)||uA(t)||pA(t)||fA(t)}var vm=(t=>(t.Java="java",t.Kotlin="kotlin",t.CSharp="csharp",t.Go="go",t))(vm||{}),Y=class{imports=new Set;parentDir;name;content="";constructor(e,n){this.parentDir=e,this.name=n}addImport(e){this.imports.add(e)}addImports(e){for(let n of e)this.imports.add(n)}getImports(){return Array.from(this.imports)}appendContent(e){this.content+=e}appendContentln(e){this.content+=e+`
211
- `}getContent(){return this.content}getName(){return this.name}setName(e){this.name=e}getParentDir(){return this.parentDir}setParentDir(e){this.parentDir=e}},Ws;(t=>{(e=>{e.Lombok="Lombok",e.LombokBuilder="LombokBuilder",e.RecordVakueObject="RecordVakueObject",e.CommandHandler="CommandHandler",e.Jpa="Jpa",e.Timezone="Timezone",e.SpringFramework="SpringFramework"})(t.JavaGeneratorAddition||(t.JavaGeneratorAddition={}))})(Ws||(Ws={}));var Ks;(t=>{(e=>{e.ValueClass="ValueClass",e.CommandHandler="CommandHandler",e.Timezone="Timezone"})(t.KotlinGeneratorAddition||(t.KotlinGeneratorAddition={}))})(Ks||(Ks={}));var Bs;(t=>{(e=>{e.Timezone="Timezone",e.RecordStruct="RecordStruct",e.PrimaryConstructor="PrimaryConstructor",e.CommandHandlerInterface="CommandHandlerInterface",e.AggInterface="AggInterface"})(t.CSharpGeneratorAddition||(t.CSharpGeneratorAddition={}))})(Bs||(Bs={}));var yl;(t=>{(e=>{e.SinglePackageEachDesigner="SinglePackageEachDesigner"})(t.GoGeneratorAddition||(t.GoGeneratorAddition={}))})(yl||(yl={}));var I=Object.freeze(Object.defineProperty({__proto__:null,CodeFile:Y,Language:vm,get csharp(){return Bs},get go(){return yl},isStruct:nE,get java(){return Ws},get kotlin(){return Ks}},Symbol.toStringTag,{value:"Module"})),O;(t=>{function e(d){return d.trim().split(d.includes("_")?/_|\s/:/(?=[A-Z])/g).map(u=>u.charAt(0).toUpperCase()+u.toLowerCase().slice(1)).join("")}t.stringToUpperCamel=e;function n(d){let u=!0;return d.trim().split(d.includes("_")?/_|\s/:/(?=[A-Z])/g).map(c=>u?(u=!1,c.toLowerCase()):c.charAt(0).toUpperCase()+c.toLowerCase().slice(1)).join("")}t.stringToLowerCamel=n;function r(d){return d.includes("_")?d.toLowerCase():i(d)}t.stringToLowerSnake=r;function s(d){return d.trim().split(/(?=[A-Z])/g).join("_").toUpperCase()}t.camelToUpperSnake=s;function i(d){return d.trim().split(/(?=[A-Z])/g).join("_").toLowerCase()}t.camelToLowerSnake=i;function o(d){return d.trim().split("_").map(u=>u.charAt(0).toUpperCase()+u.slice(1)).join("")}t.snakeToUpperCamel=o;function a(d){return d.trim().charAt(0).toLowerCase()+d.slice(1)}t.lowerFirst=a;function l(d){return d.trim().charAt(0).toUpperCase()+d.slice(1)}t.upperFirst=l})(O||(O={}));var ue=Ws.JavaGeneratorAddition,bm=He.createHotSwapPlugin(()=>{let t="value";function e(n){return O.stringToUpperCamel(n._attributes.name)}return{unmount({api:n}){n.commands.clearCaches(),n.commands._setCommandCodeProvider(()=>[]),n.commands._setFacadeCommandCodeProvider(()=>[]),n.commands._setAggCodeProvider(()=>[]),n.commands._setEventCodeProvider(()=>[]),n.commands._setReadModelCodeProvider(()=>[]),n.commands._setCodeFileProvider(()=>[]),n.commands.setContext({})},mount({api:n}){let r=n.states.context,s=n.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map(u=>O.stringToLowerCamel(u));function i(u){return!s.includes(O.stringToLowerCamel(u._attributes.name))}function o(u,c){return i(c)?O.stringToUpperCamel(c._attributes.name):l(u,c)}function a(u,c){for(let h of c){if(!i(h)){l(u,h);continue}u.add(`${r.value.namespace}.${r.value.moduleName}.${t}.${e(h)}`)}}function l(u,c){let h=r.value.additions,f=O.stringToLowerSnake(c._attributes.name).replace(/_/," ");return/\b(time|timestamp|date|deadline|expire)\b/.test(f)?h.has(ue.Timezone)?(u.add("java.time.OffsetDateTime"),"OffsetDateTime"):(u.add("java.time.LocalDateTime"),"LocalDateTime"):/\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(f)?"Integer":/\b(price)$/.test(f)?(u.add("java.math.BigDecimal"),"BigDecimal"):/^(if|is)\b/.test(f)?"Boolean":Ys(c)&&(c._attributes.type==="Id"||c._attributes.type==="Version")?"Long":"String"}n.commands._setInfoCodeProvider(u=>{let c=new Set;c.add(r.value.nonNullAnnotation);let h=r.value.nonNullAnnotation.split(".").pop(),f=e(u),v=r.value.additions,m=[];return v.has(ue.RecordVakueObject)?(m.push(`public record ${f}(@${h} ${l(c,u)} value) {`),m.push(` public ${f} {`),m.push(" // HACK check value"),m.push(" }"),m.push("}")):v.has(ue.Lombok)?(m.push("@lombok.Getter"),m.push(`public class ${f} {`),m.push(` private final ${l(c,u)} value;`),m.push(""),m.push(` public ${f} (@${h} ${l(c,u)} value) {`),m.push(" // HACK check value"),m.push(" this.value = value;"),m.push(" }"),m.push("}")):(m.push(`public class ${e(u)} {`),m.push(` private final ${l(c,u)} value;`),m.push(""),m.push(` public ${f} (@${h} ${l(c,u)} value) {`),m.push(" // HACK check value"),m.push(" this.value = value;"),m.push(" }"),m.push(""),m.push(` public ${l(c,u)} getValue() {`),m.push(" return this.value;"),m.push(" }"),m.push("}")),[{type:"Info",imports:c,content:m.join(`
212
- `)}]});function d(u){let c=[],h=r.value.additions,f=r.value.nonNullAnnotation.split(".").pop();{let v=new Set;v.add(r.value.nonNullAnnotation);let m=e(u),_=[],y=Object.values(u.inner);if(a(v,y),h.has(ue.RecordVakueObject)){h.has(ue.LombokBuilder)&&_.push("@lombok.Builder(toBuilder = true)"),_.push(`public record ${m}(`);let b=[];for(let w of y){let g=e(w);b.push(` @${f}
208
+ `,...NA(s))}rl=!1}function RA(){let t=tn[tn.length-1];if(!t)return[];let e=[];for(;t;){let n=e[0];n&&n.vnode===t?n.recurseCount++:e.push({vnode:t,recurseCount:0});let r=t.component&&t.component.parent;t=r&&r.vnode}return e}function NA(t){let e=[];return t.forEach((n,r)=>{e.push(...r===0?[]:[`
209
+ `],...kA(n))}),e}function kA({vnode:t,recurseCount:e}){let n=e>0?`... (${e} recursive calls)`:"",r=t.component?t.component.parent==null:!1,s=` at <${vm(t.component,t.type,r)}`,i=">"+n;return t.props?[s,...IA(t.props),i]:[s+i]}function IA(t){let e=[],n=Object.keys(t);return n.slice(0,3).forEach(r=>{e.push(...im(r,t[r]))}),n.length>3&&e.push(" ..."),e}function im(t,e,n){return kt(e)?(e=JSON.stringify(e),n?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?n?e:[`${t}=${e}`]:kl(e)?(e=im(t,en(e.value),!0),n?e:[`${t}=Ref<`,e,">"]):nn(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=en(e),n?e:[`${t}=`,e])}var om={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Il(t,e,n,r){try{return r?t(...r):t()}catch(s){am(s,e,n)}}function am(t,e,n,r=!0){let s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||bl;if(e){let a=e.parent,l=e.proxy,d=process.env.NODE_ENV!=="production"?om[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){let u=a.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](t,l,d)===!1)return}a=a.parent}if(i){Il(i,null,10,[t,l,d]);return}}DA(t,n,s,r,o)}function DA(t,e,n,r=!0,s=!1){if(process.env.NODE_ENV!=="production"){let i=om[e];if(n&&TA(n),Gs(`Unhandled error${i?` during execution of ${i}`:""}`),n&&$A(),r)throw t}else if(s)throw t}var Oe=[],ht=-1,On=[],Tt=null,Sn=0,PA=Promise.resolve(),Cl=null,MA=100;function jA(t){let e=ht+1,n=Oe.length;for(;e<n;){let r=e+n>>>1,s=Oe[r],i=vr(s);i<t||i===t&&s.flags&2?e=r+1:n=r}return e}function FA(t){if(!(t.flags&1)){let e=vr(t),n=Oe[Oe.length-1];!n||!(t.flags&2)&&e>=vr(n)?Oe.push(t):Oe.splice(jA(e),0,t),t.flags|=1,lm()}}function lm(){Cl||(Cl=PA.then(cm))}function VA(t){Ue(t)?On.push(...t):Tt&&t.id===-1?Tt.splice(Sn+1,0,t):t.flags&1||(On.push(t),t.flags|=1),lm()}function qA(t){if(On.length){let e=[...new Set(On)].sort((n,r)=>vr(n)-vr(r));if(On.length=0,Tt){Tt.push(...e);return}for(Tt=e,process.env.NODE_ENV!=="production"&&(t=t||new Map),Sn=0;Sn<Tt.length;Sn++){let n=Tt[Sn];process.env.NODE_ENV!=="production"&&um(t,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Tt=null,Sn=0}}var vr=t=>t.id==null?t.flags&2?-1:1/0:t.id;function cm(t){process.env.NODE_ENV!=="production"&&(t=t||new Map);let e=process.env.NODE_ENV!=="production"?n=>um(t,n):wA;try{for(ht=0;ht<Oe.length;ht++){let n=Oe[ht];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&e(n))continue;n.flags&4&&(n.flags&=-2),Il(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;ht<Oe.length;ht++){let n=Oe[ht];n&&(n.flags&=-2)}ht=-1,Oe.length=0,qA(t),Cl=null,(Oe.length||On.length)&&cm(t)}}function um(t,e){let n=t.get(e)||0;if(n>MA){let r=e.i,s=r&&_m(r.type);return am(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return t.set(e,n+1),!1}var sl=new Map;process.env.NODE_ENV!=="production"&&(ei().__VUE_HMR_RUNTIME__={createRecord:il(LA),rerender:il(HA),reload:il(GA)});var Us=new Map;function LA(t,e){return Us.has(t)?!1:(Us.set(t,{initialDef:Ws(e),instances:new Set}),!0)}function Ws(t){return bm(t)?t.__vccOpts:t}function HA(t,e){let n=Us.get(t);n&&(n.initialDef.render=e,[...n.instances].forEach(r=>{e&&(r.render=e,Ws(r.type).render=e),r.renderCache=[],r.update()}))}function GA(t,e){let n=Us.get(t);if(!n)return;e=Ws(e),Uf(n.initialDef,e);let r=[...n.instances];for(let s=0;s<r.length;s++){let i=r[s],o=Ws(i.type),a=sl.get(o);a||(o!==n.initialDef&&Uf(o,e),sl.set(o,a=new Set)),a.add(i),i.appContext.propsCache.delete(i.type),i.appContext.emitsCache.delete(i.type),i.appContext.optionsCache.delete(i.type),i.ceReload?(a.add(i),i.ceReload(e.styles),a.delete(i)):i.parent?FA(()=>{i.parent.update(),a.delete(i)}):i.appContext.reload?i.appContext.reload():typeof window<"u"&&window.location.reload(),i.root.ce&&i!==i.root&&i.root.ce._removeChildStyle(o)}VA(()=>{sl.clear()})}function Uf(t,e){Qs(t,e);for(let n in t)n!=="__file"&&!(n in e)&&delete t[n]}function il(t){return(e,n)=>{try{return t(e,n)}catch{}}}var Bs=null,UA=null,WA=t=>t.__isTeleport;function dm(t,e){t.shapeFlag&6&&t.component?(t.transition=e,dm(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}ei().requestIdleCallback;ei().cancelIdleCallback;var BA=Symbol.for("v-ndc");process.env.NODE_ENV;var zA={},hm=t=>Object.getPrototypeOf(t)===zA,KA=t=>t.__isSuspense,pm=Symbol.for("v-fgt"),YA=Symbol.for("v-txt"),JA=Symbol.for("v-cmt");function XA(t){return t?t.__v_isVNode===!0:!1}var ZA=(...t)=>mm(...t),fm=({key:t})=>t??null,Fs=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?kt(t)||kl(t)||nn(t)?{i:Bs,r:t,k:e,f:!!n}:t:null);function QA(t,e=null,n=null,r=0,s=null,i=t===pm?0:1,o=!1,a=!1){let l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&fm(e),ref:e&&Fs(e),scopeId:UA,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Bs};return a?(Dl(l,n),i&128&&t.normalize(l)):n&&(l.shapeFlag|=kt(n)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&Gs("VNode created with invalid key (NaN). VNode type:",l.type),l}var eE=process.env.NODE_ENV!=="production"?ZA:mm;function mm(t,e=null,n=null,r=0,s=null,i=!1){if((!t||t===BA)&&(process.env.NODE_ENV!=="production"&&!t&&Gs(`Invalid vnode type when creating vnode: ${t}.`),t=JA),XA(t)){let a=zs(t,e,!0);return n&&Dl(a,n),a.patchFlag=-2,a}if(bm(t)&&(t=t.__vccOpts),e){e=tE(e);let{class:a,style:l}=e;a&&!kt(a)&&(e.class=Nl(a)),Qt(l)&&(wl(l)&&!Ue(l)&&(l=Qs({},l)),e.style=Rl(l))}let o=kt(t)?1:KA(t)?128:WA(t)?64:Qt(t)?4:nn(t)?2:0;return process.env.NODE_ENV!=="production"&&o&4&&wl(t)&&(t=en(t),Gs("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
210
+ Component that was made reactive: `,t)),QA(t,e,n,r,s,o,i,!0)}function tE(t){return t?wl(t)||hm(t)?Qs({},t):t:null}function zs(t,e,n=!1,r=!1){let{props:s,ref:i,patchFlag:o,children:a,transition:l}=t,d=e?rE(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:d,key:d&&fm(d),ref:e&&e.ref?n&&i?Ue(i)?i.concat(Fs(e)):[i,Fs(e)]:Fs(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:process.env.NODE_ENV!=="production"&&o===-1&&Ue(a)?a.map(gm):a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==pm?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&zs(t.ssContent),ssFallback:t.ssFallback&&zs(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&r&&dm(u,l.clone(u)),u}function gm(t){let e=zs(t);return Ue(t.children)&&(e.children=t.children.map(gm)),e}function nE(t=" ",e=0){return eE(YA,null,t,e)}function Dl(t,e){let n=0,{shapeFlag:r}=t;if(e==null)e=null;else if(Ue(e))n=16;else if(typeof e=="object")if(r&65){let s=e.default;s&&(s._c&&(s._d=!1),Dl(t,s()),s._c&&(s._d=!0));return}else n=32,!e._&&!hm(e)&&(e._ctx=Bs);else nn(e)?(e={default:e,_ctx:Bs},n=32):(e=String(e),r&64?(n=16,e=[nE(e)]):n=8);t.children=e,t.shapeFlag|=n}function rE(...t){let e={};for(let n=0;n<t.length;n++){let r=t[n];for(let s in r)if(s==="class")e.class!==r.class&&(e.class=Nl([e.class,r.class]));else if(s==="style")e.style=Rl([e.style,r.style]);else if(CA(s)){let i=e[s],o=r[s];o&&i!==o&&!(Ue(i)&&i.includes(o))&&(e[s]=i?[].concat(i,o):o)}else s!==""&&(e[s]=r[s])}return e}{let t=ei(),e=(n,r)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};e("__VUE_INSTANCE_SETTERS__",n=>n),e("__VUE_SSR_SETTERS__",n=>n)}process.env.NODE_ENV;var sE=/(?:^|[-_])(\w)/g,iE=t=>t.replace(sE,e=>e.toUpperCase()).replace(/[-_]/g,"");function _m(t,e=!0){return nn(t)?t.displayName||t.name:t.name||e&&t.__name}function vm(t,e,n=!1){let r=_m(e);if(!r&&e.__file){let s=e.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&t&&t.parent){let s=i=>{for(let o in i)if(i[o]===e)return o};r=s(t.components||t.parent.type.components)||s(t.appContext.components)}return r?iE(r):n?"App":"Anonymous"}function bm(t){return nn(t)&&"__vccOpts"in t}function oE(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;let t={style:"color:#3ba776"},e={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(c){return Qt(c)?c.__isVue?["div",t,"VueInstance"]:kl(c)?["div",{},["span",t,u(c)],"<",a("_value"in c?c._value:c),">"]:sm(c)?["div",{},["span",t,nl(c)?"ShallowReactive":"Reactive"],"<",a(c),`>${yl(c)?" (readonly)":""}`]:yl(c)?["div",{},["span",t,nl(c)?"ShallowReadonly":"Readonly"],"<",a(c),">"]:null:null},hasBody(c){return c&&c.__isVue},body(c){if(c&&c.__isVue)return["div",{},...i(c.$)]}};function i(c){let h=[];c.type.props&&c.props&&h.push(o("props",en(c.props))),c.setupState!==bl&&h.push(o("setup",c.setupState)),c.data!==bl&&h.push(o("data",en(c.data)));let f=l(c,"computed");f&&h.push(o("computed",f));let v=l(c,"inject");return v&&h.push(o("injected",v)),h.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:c}]]),h}function o(c,h){return h=Qs({},h),Object.keys(h).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},c],["div",{style:"padding-left:1.25em"},...Object.keys(h).map(f=>["div",{},["span",r,f+": "],a(h[f],!1)])]]:["span",{}]}function a(c,h=!0){return typeof c=="number"?["span",e,c]:typeof c=="string"?["span",n,JSON.stringify(c)]:typeof c=="boolean"?["span",r,c]:Qt(c)?["object",{object:h?en(c):c}]:["span",n,String(c)]}function l(c,h){let f=c.type;if(nn(f))return;let v={};for(let m in c.ctx)d(f,m,h)&&(v[m]=c.ctx[m]);return v}function d(c,h,f){let v=c[f];if(Ue(v)&&v.includes(h)||Qt(v)&&h in v||c.extends&&d(c.extends,h,f)||c.mixins&&c.mixins.some(m=>d(m,h,f)))return!0}function u(c){return nl(c)?"ShallowRef":c.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;function aE(){oE()}process.env.NODE_ENV!=="production"&&aE();function lE(t){return _A(t)||vA(t)||gA(t)||bA(t)||yA(t)}var ym=(t=>(t.Java="java",t.Kotlin="kotlin",t.CSharp="csharp",t.Go="go",t))(ym||{}),J=class{imports=new Set;parentDir;name;content="";constructor(e,n){this.parentDir=e,this.name=n}addImport(e){this.imports.add(e)}addImports(e){for(let n of e)this.imports.add(n)}getImports(){return Array.from(this.imports)}appendContent(e){this.content+=e}appendContentln(e){this.content+=e+`
211
+ `}getContent(){return this.content}getName(){return this.name}setName(e){this.name=e}getParentDir(){return this.parentDir}setParentDir(e){this.parentDir=e}},Ks;(t=>{(e=>{e.Lombok="Lombok",e.LombokBuilder="LombokBuilder",e.RecordVakueObject="RecordVakueObject",e.CommandHandler="CommandHandler",e.Jpa="Jpa",e.Timezone="Timezone",e.SpringFramework="SpringFramework"})(t.JavaGeneratorAddition||(t.JavaGeneratorAddition={}))})(Ks||(Ks={}));var Ys;(t=>{(e=>{e.ValueClass="ValueClass",e.CommandHandler="CommandHandler",e.Timezone="Timezone"})(t.KotlinGeneratorAddition||(t.KotlinGeneratorAddition={}))})(Ys||(Ys={}));var Js;(t=>{(e=>{e.Timezone="Timezone",e.RecordStruct="RecordStruct",e.PrimaryConstructor="PrimaryConstructor",e.CommandHandlerInterface="CommandHandlerInterface",e.AggInterface="AggInterface"})(t.CSharpGeneratorAddition||(t.CSharpGeneratorAddition={}))})(Js||(Js={}));var Sl;(t=>{(e=>{e.SinglePackageEachDesigner="SinglePackageEachDesigner"})(t.GoGeneratorAddition||(t.GoGeneratorAddition={}))})(Sl||(Sl={}));var I=Object.freeze(Object.defineProperty({__proto__:null,CodeFile:J,Language:ym,get csharp(){return Js},get go(){return Sl},isStruct:lE,get java(){return Ks},get kotlin(){return Ys}},Symbol.toStringTag,{value:"Module"})),O;(t=>{function e(d){return d.trim().split(d.includes("_")?/_|\s/:/(?=[A-Z])/g).map(u=>u.charAt(0).toUpperCase()+u.toLowerCase().slice(1)).join("")}t.stringToUpperCamel=e;function n(d){let u=!0;return d.trim().split(d.includes("_")?/_|\s/:/(?=[A-Z])/g).map(c=>u?(u=!1,c.toLowerCase()):c.charAt(0).toUpperCase()+c.toLowerCase().slice(1)).join("")}t.stringToLowerCamel=n;function r(d){return d.includes("_")?d.toLowerCase():i(d)}t.stringToLowerSnake=r;function s(d){return d.trim().split(/(?=[A-Z])/g).join("_").toUpperCase()}t.camelToUpperSnake=s;function i(d){return d.trim().split(/(?=[A-Z])/g).join("_").toLowerCase()}t.camelToLowerSnake=i;function o(d){return d.trim().split("_").map(u=>u.charAt(0).toUpperCase()+u.slice(1)).join("")}t.snakeToUpperCamel=o;function a(d){return d.trim().charAt(0).toLowerCase()+d.slice(1)}t.lowerFirst=a;function l(d){return d.trim().charAt(0).toUpperCase()+d.slice(1)}t.upperFirst=l})(O||(O={}));var de=Ks.JavaGeneratorAddition,wm=We.createHotSwapPlugin(()=>{let t="value";function e(n){return O.stringToUpperCamel(n._attributes.name)}return{unmount({api:n}){n.commands.clearCaches(),n.commands._setCommandCodeProvider(()=>[]),n.commands._setFacadeCommandCodeProvider(()=>[]),n.commands._setAggCodeProvider(()=>[]),n.commands._setEventCodeProvider(()=>[]),n.commands._setReadModelCodeProvider(()=>[]),n.commands._setCodeFileProvider(()=>[]),n.commands.setContext({})},mount({api:n}){let r=n.states.context,s=n.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map(u=>O.stringToLowerCamel(u));function i(u){return!s.includes(O.stringToLowerCamel(u._attributes.name))}function o(u,c){return i(c)?O.stringToUpperCamel(c._attributes.name):l(u,c)}function a(u,c){for(let h of c){if(!i(h)){l(u,h);continue}u.add(`${r.value.namespace}.${r.value.moduleName}.${t}.${e(h)}`)}}function l(u,c){let h=r.value.additions,f=O.stringToLowerSnake(c._attributes.name).replace(/_/," ");return/\b(time|timestamp|date|deadline|expire)\b/.test(f)?h.has(de.Timezone)?(u.add("java.time.OffsetDateTime"),"OffsetDateTime"):(u.add("java.time.LocalDateTime"),"LocalDateTime"):/\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(f)?"Integer":/\b(price)$/.test(f)?(u.add("java.math.BigDecimal"),"BigDecimal"):/^(if|is)\b/.test(f)?"Boolean":Zs(c)&&(c._attributes.type==="Id"||c._attributes.type==="Version")?"Long":"String"}n.commands._setInfoCodeProvider(u=>{let c=new Set;c.add(r.value.nonNullAnnotation);let h=r.value.nonNullAnnotation.split(".").pop(),f=e(u),v=r.value.additions,m=[];return v.has(de.RecordVakueObject)?(m.push(`public record ${f}(@${h} ${l(c,u)} value) {`),m.push(` public ${f} {`),m.push(" // HACK check value"),m.push(" }"),m.push("}")):v.has(de.Lombok)?(m.push("@lombok.Getter"),m.push(`public class ${f} {`),m.push(` private final ${l(c,u)} value;`),m.push(""),m.push(` public ${f} (@${h} ${l(c,u)} value) {`),m.push(" // HACK check value"),m.push(" this.value = value;"),m.push(" }"),m.push("}")):(m.push(`public class ${e(u)} {`),m.push(` private final ${l(c,u)} value;`),m.push(""),m.push(` public ${f} (@${h} ${l(c,u)} value) {`),m.push(" // HACK check value"),m.push(" this.value = value;"),m.push(" }"),m.push(""),m.push(` public ${l(c,u)} getValue() {`),m.push(" return this.value;"),m.push(" }"),m.push("}")),[{type:"Info",imports:c,content:m.join(`
212
+ `)}]});function d(u){let c=[],h=r.value.additions,f=r.value.nonNullAnnotation.split(".").pop();{let v=new Set;v.add(r.value.nonNullAnnotation);let m=e(u),_=[],y=Object.values(u.inner);if(a(v,y),h.has(de.RecordVakueObject)){h.has(de.LombokBuilder)&&_.push("@lombok.Builder(toBuilder = true)"),_.push(`public record ${m}(`);let b=[];for(let w of y){let g=e(w);b.push(` @${f}
213
213
  ${o(v,w)} ${O.lowerFirst(g)}`)}_.push(b.join(`,
214
- `)),_.push(") {"),_.push(` public ${m} {`),_.push(" // HACK check value"),_.push(" }"),_.push("}")}else if(h.has(ue.Lombok)){_.push("@lombok.AllArgsConstructor"),_.push("@lombok.Getter"),h.has(ue.LombokBuilder)&&_.push("@lombok.Builder(toBuilder = true)"),_.push(`public class ${m} {`);for(let b of y){let w=e(b);_.push(` @${f}`),_.push(` private final ${o(v,b)} ${O.lowerFirst(w)};`)}_.push("}")}else{_.push(`public class ${m} {`);for(let g of y){let p=e(g);_.push(` @${f}`),_.push(` private final ${o(v,g)} ${O.lowerFirst(p)};`)}_.push("");let b=[],w=[];for(let g of y){let p=e(g);b.push(`@${f} ${l(v,g)} ${O.lowerFirst(p)}`),w.push(`this.${O.lowerFirst(p)} = ${O.lowerFirst(p)};`)}_.push(` public ${m}(${b.join(", ")}) {`),_.push(` ${w.join(`
214
+ `)),_.push(") {"),_.push(` public ${m} {`),_.push(" // HACK check value"),_.push(" }"),_.push("}")}else if(h.has(de.Lombok)){_.push("@lombok.AllArgsConstructor"),_.push("@lombok.Getter"),h.has(de.LombokBuilder)&&_.push("@lombok.Builder(toBuilder = true)"),_.push(`public class ${m} {`);for(let b of y){let w=e(b);_.push(` @${f}`),_.push(` private final ${o(v,b)} ${O.lowerFirst(w)};`)}_.push("}")}else{_.push(`public class ${m} {`);for(let g of y){let p=e(g);_.push(` @${f}`),_.push(` private final ${o(v,g)} ${O.lowerFirst(p)};`)}_.push("");let b=[],w=[];for(let g of y){let p=e(g);b.push(`@${f} ${l(v,g)} ${O.lowerFirst(p)}`),w.push(`this.${O.lowerFirst(p)} = ${O.lowerFirst(p)};`)}_.push(` public ${m}(${b.join(", ")}) {`),_.push(` ${w.join(`
215
215
  `)}`),_.push(" }");for(let g of y){let p=e(g);_.push(""),_.push(` public ${o(v,g)} get${p} () {`),_.push(` return this.${O.lowerFirst(p)};`),_.push(" }")}_.push("}")}c.push({type:"Command",imports:v,content:_.join(`
216
- `)})}if(!h.has(ue.CommandHandler))return c;{let v=new Set;v.add(r.value.nonNullAnnotation);let m=e(u),_=[];h.has(ue.SpringFramework)&&(v.add("org.springframework.stereotype.Component"),_.push("@Component")),h.has(ue.Lombok)&&_.push("@lombok.RequiredArgsConstructor"),_.push(`public class ${m}Handler {`);let y=[...n.states.designer.value._getContext().getAssociationMap()[u._attributes.__id]].filter(b=>b._attributes.rule==="Agg");for(let b of y)v.add(`${r.value.namespace}.${r.value.moduleName}.${e(b)}`),_.push(` public ${e(b)} handle(@${f} ${m} command) {`),_.push(" // HACK Implement"),_.push(" }");_.push("}"),c.push({type:"CommandHandler",imports:v,content:_.join(`
216
+ `)})}if(!h.has(de.CommandHandler))return c;{let v=new Set;v.add(r.value.nonNullAnnotation);let m=e(u),_=[];h.has(de.SpringFramework)&&(v.add("org.springframework.stereotype.Component"),_.push("@Component")),h.has(de.Lombok)&&_.push("@lombok.RequiredArgsConstructor"),_.push(`public class ${m}Handler {`);let y=[...n.states.designer.value._getContext().getAssociationMap()[u._attributes.__id]].filter(b=>b._attributes.rule==="Agg");for(let b of y)v.add(`${r.value.namespace}.${r.value.moduleName}.${e(b)}`),_.push(` public ${e(b)} handle(@${f} ${m} command) {`),_.push(" // HACK Implement"),_.push(" }");_.push("}"),c.push({type:"CommandHandler",imports:v,content:_.join(`
217
217
  `)})}return c}n.commands._setCommandCodeProvider(d),n.commands._setFacadeCommandCodeProvider(d),n.commands._setAggCodeProvider(u=>{let c=r.value.additions,h=n.states.designer.value,f=r.value.nonNullAnnotation.split(".").pop(),v=e(u),m=[];{let _=new Set;_.add(r.value.nonNullAnnotation);let y=[],b=[],w=[...h._getContext().getAssociationMap()[u._attributes.__id]].filter(g=>g._attributes.rule==="Command"||g._attributes.rule==="FacadeCommand");for(let g of w){let p=e(g);b.push(`public void handle${p}(@${f} ${p} command);`)}y.push(`public interface ${v} {`),y.push(` ${b.join(`
218
218
 
219
219
  `)}`),y.push("}"),m.push({type:"Agg",imports:_,content:y.join(`
220
- `)})}{let _=new Set;_.add(r.value.nonNullAnnotation);let y=[],b=Object.values(u.inner);if(a(_,b),c.has(ue.Lombok)){y.push("@lombok.AllArgsConstructor"),y.push("@lombok.Getter"),y.push(`public class ${v}Impl implements ${v} {`);for(let g of b){let p=e(g);y.push(` @${f}`),y.push(` private ${o(_,g)} ${O.lowerFirst(p)};`)}let w=[...h._getContext().getAssociationMap()[u._attributes.__id]].filter(g=>g._attributes.rule==="Command"||g._attributes.rule==="FacadeCommand");for(let g of w){let p=e(g);y.push(""),y.push(` public void handle${p}(@${f} ${p} ${O.lowerFirst(p)}) {`),y.push(" // HACK need implement"),y.push(" }")}y.push("}")}else{y.push(`public class ${v}Impl implements ${v} {`);for(let C of b){let k=e(C);y.push(` @${f}`),y.push(` private ${o(_,C)} ${O.lowerFirst(k)};`)}y.push("");let w=[],g=[];for(let C of b){let k=e(C);w.push(`@${f} ${o(_,C)} ${O.lowerFirst(k)}`),g.push(`this.${O.lowerFirst(k)} = ${O.lowerFirst(k)};`)}y.push(` public ${v}(${w.join(", ")}) {`),y.push(` ${g.join(`
220
+ `)})}{let _=new Set;_.add(r.value.nonNullAnnotation);let y=[],b=Object.values(u.inner);if(a(_,b),c.has(de.Lombok)){y.push("@lombok.AllArgsConstructor"),y.push("@lombok.Getter"),y.push(`public class ${v}Impl implements ${v} {`);for(let g of b){let p=e(g);y.push(` @${f}`),y.push(` private ${o(_,g)} ${O.lowerFirst(p)};`)}let w=[...h._getContext().getAssociationMap()[u._attributes.__id]].filter(g=>g._attributes.rule==="Command"||g._attributes.rule==="FacadeCommand");for(let g of w){let p=e(g);y.push(""),y.push(` public void handle${p}(@${f} ${p} ${O.lowerFirst(p)}) {`),y.push(" // HACK need implement"),y.push(" }")}y.push("}")}else{y.push(`public class ${v}Impl implements ${v} {`);for(let C of b){let k=e(C);y.push(` @${f}`),y.push(` private ${o(_,C)} ${O.lowerFirst(k)};`)}y.push("");let w=[],g=[];for(let C of b){let k=e(C);w.push(`@${f} ${o(_,C)} ${O.lowerFirst(k)}`),g.push(`this.${O.lowerFirst(k)} = ${O.lowerFirst(k)};`)}y.push(` public ${v}(${w.join(", ")}) {`),y.push(` ${g.join(`
221
221
  `)}`),y.push(" }");for(let C of b){let k=e(C);y.push(""),y.push(` @${f}`),y.push(` public ${o(_,C)} get${k}() {`),y.push(` return this.${O.lowerFirst(k)};`),y.push(" }")}let p=[...h._getContext().getAssociationMap()[u._attributes.__id]].filter(C=>C._attributes.rule==="Command"||C._attributes.rule==="FacadeCommand");for(let C of p){let k=e(C);y.push(""),y.push(` public void handle${k}(@${f} ${k} ${O.lowerFirst(k)}) {`),y.push(" // HACK need implement"),y.push(" }")}y.push("}")}m.push({type:"AggImpl",imports:_,content:y.join(`
222
- `)})}return m}),n.commands._setEventCodeProvider(u=>{let c=new Set;c.add(r.value.nonNullAnnotation);let h=r.value.nonNullAnnotation.split(".").pop(),f=r.value.additions,v=e(u),m=[],_=Object.values(u.inner);if(a(c,_),f.has(ue.RecordVakueObject)){f.has(ue.LombokBuilder)&&m.push("@lombok.Builder(toBuilder = true)"),m.push(`public record ${v}(`);let y=[];for(let b of _){let w=e(b);y.push(` @${h}
222
+ `)})}return m}),n.commands._setEventCodeProvider(u=>{let c=new Set;c.add(r.value.nonNullAnnotation);let h=r.value.nonNullAnnotation.split(".").pop(),f=r.value.additions,v=e(u),m=[],_=Object.values(u.inner);if(a(c,_),f.has(de.RecordVakueObject)){f.has(de.LombokBuilder)&&m.push("@lombok.Builder(toBuilder = true)"),m.push(`public record ${v}(`);let y=[];for(let b of _){let w=e(b);y.push(` @${h}
223
223
  ${o(c,b)} ${O.lowerFirst(w)}`)}m.push(y.join(`,
224
- `)),m.push(") {"),m.push(` public ${v} {`),m.push(" // HACK check value"),m.push(" }"),m.push("}")}else if(f.has(ue.Lombok)){m.push("@lombok.AllArgsConstructor"),m.push("@lombok.Getter"),f.has(ue.LombokBuilder)&&m.push("@lombok.Builder(toBuilder = true)"),m.push(`public class ${v} {`);for(let y of _){let b=e(y);m.push(` @${h}`),m.push(` private final ${o(c,y)} ${O.lowerFirst(b)};`)}m.push("}")}else{m.push(`public class ${v} {`);for(let w of _){let g=e(w);m.push(` @${h}`),m.push(` private final ${g} ${O.lowerFirst(g)};`)}m.push("");let y=[],b=[];for(let w of _){let g=e(w);y.push(`@${h} ${l(c,w)} ${O.lowerFirst(g)}`),b.push(`this.${O.lowerFirst(g)} = ${O.lowerFirst(g)};`)}m.push(` public ${v}(${y.join(", ")}) {`),m.push(` ${b.join(`
224
+ `)),m.push(") {"),m.push(` public ${v} {`),m.push(" // HACK check value"),m.push(" }"),m.push("}")}else if(f.has(de.Lombok)){m.push("@lombok.AllArgsConstructor"),m.push("@lombok.Getter"),f.has(de.LombokBuilder)&&m.push("@lombok.Builder(toBuilder = true)"),m.push(`public class ${v} {`);for(let y of _){let b=e(y);m.push(` @${h}`),m.push(` private final ${o(c,y)} ${O.lowerFirst(b)};`)}m.push("}")}else{m.push(`public class ${v} {`);for(let w of _){let g=e(w);m.push(` @${h}`),m.push(` private final ${g} ${O.lowerFirst(g)};`)}m.push("");let y=[],b=[];for(let w of _){let g=e(w);y.push(`@${h} ${l(c,w)} ${O.lowerFirst(g)}`),b.push(`this.${O.lowerFirst(g)} = ${O.lowerFirst(g)};`)}m.push(` public ${v}(${y.join(", ")}) {`),m.push(` ${b.join(`
225
225
  `)}`),m.push(" }");for(let w of _){let g=e(w);m.push(""),m.push(` public ${g} get${g} () {`),m.push(` return this.${O.lowerFirst(g)};`),m.push(" }")}m.push("}")}return[{type:"Event",imports:c,content:m.join(`
226
- `)}]}),n.commands._setReadModelCodeProvider(()=>[]),n.commands._setCodeFileProvider(()=>{let u=[],c={};function h(y){for(let b of Object.values(y)){if(!i(b))continue;let w=[...r.value.namespace.split(/\./),r.value.moduleName,t],g=e(b)+".java";if(c[`${w.join("/")}/${g}`]===!0)continue;let p=n.commands._genInfoCode(b);if(p.length===0)continue;let C=new Y(w,g);C.appendContentln(`package ${r.value.namespace}.${r.value.moduleName}.${t};`),C.appendContentln("");for(let k of p[0].imports)C.appendContentln(`import ${k};`);C.appendContentln(""),C.appendContentln(p[0].content),u.push(C),c[`${w.join("/")}/${g}`]=!0}}let f=n.states.designer.value._getContext().getCommands();for(let y of f){h(y.inner);let b=n.commands._genCommandCode(y),w=[...r.value.namespace.split(/\./),r.value.moduleName];b.forEach(g=>{if(g.type==="Command"){let p=new Y(w,e(y)+".java");p.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),p.appendContentln(""),p.addImports(g.imports);for(let C of g.imports)p.appendContentln(`import ${C};`);p.appendContentln(""),p.appendContentln(g.content),u.push(p)}else if(g.type==="CommandHandler"){let p=new Y(w,e(y)+"Handler.java");p.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),p.appendContentln(""),p.addImports(g.imports);for(let C of g.imports)p.appendContentln(`import ${C};`);p.appendContentln(""),p.appendContentln(g.content),u.push(p)}else isNever(g.type)})}let v=n.states.designer.value._getContext().getFacadeCommands();for(let y of v){h(y.inner);let b=n.commands._genFacadeCommandCode(y),w=[...r.value.namespace.split(/\./),r.value.moduleName];b.forEach(g=>{if(g.type==="FacadeCommand"){let p=new Y(w,e(y)+".java");p.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),p.appendContentln(""),p.addImports(g.imports);for(let C of g.imports)p.appendContentln(`import ${C};`);p.appendContentln(""),p.appendContentln(g.content),u.push(p)}else isNever(g.type)})}let m=n.states.designer.value._getContext().getAggs();for(let y of m){h(y.inner);let b=n.commands._genAggCode(y),w=[...r.value.namespace.split(/\./),r.value.moduleName];b.forEach(g=>{if(g.type==="Agg"){let p=new Y(w,e(y)+".java");p.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),p.appendContentln(""),p.addImports(g.imports);for(let C of g.imports)p.appendContentln(`import ${C};`);p.appendContentln(""),p.appendContentln(g.content),u.push(p)}else if(g.type==="AggImpl"){let p=new Y(w,e(y)+"Impl.java");p.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),p.appendContentln(""),p.addImports(g.imports);for(let C of g.imports)p.appendContentln(`import ${C};`);p.appendContentln(""),p.appendContentln(g.content),u.push(p)}else isNever(g.type)})}let _=n.states.designer.value._getContext().getEvents();for(let y of _){h(y.inner);let b=n.commands._genEventCode(y),w=[...r.value.namespace.split(/\./),r.value.moduleName];b.forEach(g=>{let p=new Y(w,e(y)+".java");p.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),p.appendContentln(""),p.addImports(g.imports);for(let C of g.imports)p.appendContentln(`import ${C};`);p.appendContentln(""),p.appendContentln(g.content),u.push(p)})}return u})}}}),rl=Ks.KotlinGeneratorAddition,ym=He.createHotSwapPlugin(()=>({unmount({api:t}){t.commands.clearCaches(),t.commands._setCommandCodeProvider(()=>[]),t.commands._setFacadeCommandCodeProvider(()=>[]),t.commands._setAggCodeProvider(()=>[]),t.commands._setEventCodeProvider(()=>[]),t.commands._setReadModelCodeProvider(()=>[]),t.commands._setCodeFileProvider(()=>[]),t.commands.setContext({})},mount({api:t}){let e="value",n=t.states.context,r=t.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map(d=>O.stringToLowerCamel(d));function s(d){return!r.includes(O.stringToLowerCamel(d._attributes.name))}function i(d,u){return s(u)?O.stringToUpperCamel(u._attributes.name):l(d,u)}function o(d){return O.stringToUpperCamel(d._attributes.name)}function a(d,u){for(let c of u){if(!s(c)){l(d,c);continue}d.add(`${n.value.namespace}.${n.value.moduleName}.${e}.${o(c)}`)}}function l(d,u){let c=n.value.additions,h=O.stringToLowerSnake(u._attributes.name).replace(/_/," ");return/\b(time|timestamp|date|deadline|expire)\b/.test(h)?c.has(rl.Timezone)?(d.add("java.time.OffsetDateTime"),"OffsetDateTime"):(d.add("java.time.LocalDateTime"),"LocalDateTime"):/\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(h)?"Integer":/\b(price)$/.test(h)?(d.add("java.math.BigDecimal"),"BigDecimal"):/^(if|is)\b/.test(h)?"Boolean":Ys(u)&&(u._attributes.type==="Id"||u._attributes.type==="Version")?"Long":"String"}t.commands._setInfoCodeProvider(d=>{let u=new Set,c=o(d),h=n.value.additions,f=[];return h.has(rl.ValueClass)?(u.add("kotlin.jvm.JvmInline"),f.push("@JvmInline"),f.push(`value class ${c}(val value: ${l(u,d)})`)):f.push(`data class ${c}(val value: ${l(u,d)})`),[{type:"Info",imports:u,content:f.join(`
226
+ `)}]}),n.commands._setReadModelCodeProvider(()=>[]),n.commands._setCodeFileProvider(()=>{let u=[],c={};function h(y){for(let b of Object.values(y)){if(!i(b))continue;let w=[...r.value.namespace.split(/\./),r.value.moduleName,t],g=e(b)+".java";if(c[`${w.join("/")}/${g}`]===!0)continue;let p=n.commands._genInfoCode(b);if(p.length===0)continue;let C=new J(w,g);C.appendContentln(`package ${r.value.namespace}.${r.value.moduleName}.${t};`),C.appendContentln("");for(let k of p[0].imports)C.appendContentln(`import ${k};`);C.appendContentln(""),C.appendContentln(p[0].content),u.push(C),c[`${w.join("/")}/${g}`]=!0}}let f=n.states.designer.value._getContext().getCommands();for(let y of f){h(y.inner);let b=n.commands._genCommandCode(y),w=[...r.value.namespace.split(/\./),r.value.moduleName];b.forEach(g=>{if(g.type==="Command"){let p=new J(w,e(y)+".java");p.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),p.appendContentln(""),p.addImports(g.imports);for(let C of g.imports)p.appendContentln(`import ${C};`);p.appendContentln(""),p.appendContentln(g.content),u.push(p)}else if(g.type==="CommandHandler"){let p=new J(w,e(y)+"Handler.java");p.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),p.appendContentln(""),p.addImports(g.imports);for(let C of g.imports)p.appendContentln(`import ${C};`);p.appendContentln(""),p.appendContentln(g.content),u.push(p)}else isNever(g.type)})}let v=n.states.designer.value._getContext().getFacadeCommands();for(let y of v){h(y.inner);let b=n.commands._genFacadeCommandCode(y),w=[...r.value.namespace.split(/\./),r.value.moduleName];b.forEach(g=>{if(g.type==="FacadeCommand"){let p=new J(w,e(y)+".java");p.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),p.appendContentln(""),p.addImports(g.imports);for(let C of g.imports)p.appendContentln(`import ${C};`);p.appendContentln(""),p.appendContentln(g.content),u.push(p)}else isNever(g.type)})}let m=n.states.designer.value._getContext().getAggs();for(let y of m){h(y.inner);let b=n.commands._genAggCode(y),w=[...r.value.namespace.split(/\./),r.value.moduleName];b.forEach(g=>{if(g.type==="Agg"){let p=new J(w,e(y)+".java");p.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),p.appendContentln(""),p.addImports(g.imports);for(let C of g.imports)p.appendContentln(`import ${C};`);p.appendContentln(""),p.appendContentln(g.content),u.push(p)}else if(g.type==="AggImpl"){let p=new J(w,e(y)+"Impl.java");p.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),p.appendContentln(""),p.addImports(g.imports);for(let C of g.imports)p.appendContentln(`import ${C};`);p.appendContentln(""),p.appendContentln(g.content),u.push(p)}else isNever(g.type)})}let _=n.states.designer.value._getContext().getEvents();for(let y of _){h(y.inner);let b=n.commands._genEventCode(y),w=[...r.value.namespace.split(/\./),r.value.moduleName];b.forEach(g=>{let p=new J(w,e(y)+".java");p.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),p.appendContentln(""),p.addImports(g.imports);for(let C of g.imports)p.appendContentln(`import ${C};`);p.appendContentln(""),p.appendContentln(g.content),u.push(p)})}return u})}}}),ol=Ys.KotlinGeneratorAddition,Cm=We.createHotSwapPlugin(()=>({unmount({api:t}){t.commands.clearCaches(),t.commands._setCommandCodeProvider(()=>[]),t.commands._setFacadeCommandCodeProvider(()=>[]),t.commands._setAggCodeProvider(()=>[]),t.commands._setEventCodeProvider(()=>[]),t.commands._setReadModelCodeProvider(()=>[]),t.commands._setCodeFileProvider(()=>[]),t.commands.setContext({})},mount({api:t}){let e="value",n=t.states.context,r=t.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map(d=>O.stringToLowerCamel(d));function s(d){return!r.includes(O.stringToLowerCamel(d._attributes.name))}function i(d,u){return s(u)?O.stringToUpperCamel(u._attributes.name):l(d,u)}function o(d){return O.stringToUpperCamel(d._attributes.name)}function a(d,u){for(let c of u){if(!s(c)){l(d,c);continue}d.add(`${n.value.namespace}.${n.value.moduleName}.${e}.${o(c)}`)}}function l(d,u){let c=n.value.additions,h=O.stringToLowerSnake(u._attributes.name).replace(/_/," ");return/\b(time|timestamp|date|deadline|expire)\b/.test(h)?c.has(ol.Timezone)?(d.add("java.time.OffsetDateTime"),"OffsetDateTime"):(d.add("java.time.LocalDateTime"),"LocalDateTime"):/\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(h)?"Integer":/\b(price)$/.test(h)?(d.add("java.math.BigDecimal"),"BigDecimal"):/^(if|is)\b/.test(h)?"Boolean":Zs(u)&&(u._attributes.type==="Id"||u._attributes.type==="Version")?"Long":"String"}t.commands._setInfoCodeProvider(d=>{let u=new Set,c=o(d),h=n.value.additions,f=[];return h.has(ol.ValueClass)?(u.add("kotlin.jvm.JvmInline"),f.push("@JvmInline"),f.push(`value class ${c}(val value: ${l(u,d)})`)):f.push(`data class ${c}(val value: ${l(u,d)})`),[{type:"Info",imports:u,content:f.join(`
227
227
  `)}]}),t.commands._setCommandCodeProvider(d=>{let u=[],c=n.value.additions;{let h=new Set,f=o(d),v=[],m=Object.values(d.inner);a(h,m);let _=[];for(let y of m){let b=o(y);_.push(`val ${O.lowerFirst(b)}: ${i(h,y)}`)}v.push(`data class ${f}(${_.join(", ")})`),u.push({type:"Command",imports:h,content:v.join(`
228
- `)})}if(!c.has(rl.CommandHandler))return u;{let h=new Set,f=o(d),v=[];v.push(`class ${f}Handler {`);let m=[...t.states.designer.value._getContext().getAssociationMap()[d._attributes.__id]].filter(_=>_._attributes.rule==="Agg");for(let _ of m)h.add(`${n.value.namespace}.${n.value.moduleName}.${o(_)}`),v.push(` fun handle(command: ${f}): ${o(_)} {`),v.push(" // HACK Implement"),v.push(" }");v.push("}"),u.push({type:"CommandHandler",imports:h,content:v.join(`
228
+ `)})}if(!c.has(ol.CommandHandler))return u;{let h=new Set,f=o(d),v=[];v.push(`class ${f}Handler {`);let m=[...t.states.designer.value._getContext().getAssociationMap()[d._attributes.__id]].filter(_=>_._attributes.rule==="Agg");for(let _ of m)h.add(`${n.value.namespace}.${n.value.moduleName}.${o(_)}`),v.push(` fun handle(command: ${f}): ${o(_)} {`),v.push(" // HACK Implement"),v.push(" }");v.push("}"),u.push({type:"CommandHandler",imports:h,content:v.join(`
229
229
  `)})}return u}),t.commands._setFacadeCommandCodeProvider(d=>{let u=new Set,c=o(d),h=[],f=Object.values(d.inner);a(u,f);let v=[];for(let m of f){let _=o(m);v.push(`val ${O.lowerFirst(_)}: ${i(u,m)}`)}return h.push(`data class ${c}(${v.join(", ")})`),[{type:"FacadeCommand",imports:u,content:h.join(`
230
230
  `)}]}),t.commands._setAggCodeProvider(d=>{let u=new Set,c=t.states.designer.value,h=o(d),f=[],v=Object.values(d.inner);a(u,v);let m=[],_=[...c._getContext().getAssociationMap()[d._attributes.__id]].filter(b=>b._attributes.rule==="Command"||b._attributes.rule==="FacadeCommand");for(let b of _){let w=o(b);m.push(`fun handle(command: ${w})`)}f.push(`interface ${h} {`),f.push(` ${m.join(`
231
231
  `)}`),f.push("}"),f.push(""),f.push(`class ${h}Impl(`);let y=[];for(let b of v){let w=o(b);y.push(`val ${O.lowerFirst(w)}: ${i(u,b)}`)}f.push(` ${y.join(`,
232
232
  `)}`),f.push(`): ${h} {`);for(let b of _){let w=o(b);f.push(` override fun handle(command: ${w}) {`),f.push(" // HACK Implement"),f.push(" }")}return f.push("}"),[{type:"Agg",imports:u,content:f.join(`
233
233
  `)}]}),t.commands._setEventCodeProvider(d=>{let u=new Set,c=o(d),h=[],f=Object.values(d.inner);a(u,f);let v=[];for(let m of f){let _=o(m);v.push(`val ${O.lowerFirst(_)}: ${i(u,m)}`)}return h.push(`data class ${c}(${v.join(", ")})`),[{type:"Event",imports:u,content:h.join(`
234
- `)}]}),t.commands._setReadModelCodeProvider(()=>[]),t.commands._setCodeFileProvider(()=>{let d=[],u={};function c(_){for(let y of Object.values(_)){if(!s(y))continue;let b=[...n.value.namespace.split(/\./),n.value.moduleName,e],w=o(y)+".kt";if(u[`${b.join("/")}/${w}`]===!0)continue;let g=t.commands._genInfoCode(y);if(g.length===0)continue;let p=new Y(b,w);p.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}.${e}`),p.appendContentln("");for(let C of g[0].imports)p.appendContentln(`import ${C}`);p.appendContentln(""),p.appendContentln(g[0].content),d.push(p),u[`${b.join("/")}/${w}`]=!0}}let h=t.states.designer.value._getContext().getCommands();for(let _ of h){c(_.inner);let y=t.commands._genCommandCode(_),b=[...n.value.namespace.split(/\./),n.value.moduleName],w=new Y(b,o(_)+".kt"),g=[];w.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`),w.appendContentln(""),y.forEach(p=>{p.type==="Command"||p.type==="CommandHandler"?(w.addImports(p.imports),g.push(p.content)):isNever(p.type)});for(let p of w.getImports())w.appendContentln(`import ${p}`);w.appendContentln("");for(let p of g)w.appendContentln(p);d.push(w)}let f=t.states.designer.value._getContext().getFacadeCommands();for(let _ of f){c(_.inner);let y=t.commands._genFacadeCommandCode(_),b=[...n.value.namespace.split(/\./),n.value.moduleName];y.forEach(w=>{if(w.type==="FacadeCommand"){let g=new Y(b,o(_)+".kt");g.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`),g.appendContentln(""),g.addImports(w.imports);for(let p of w.imports)g.appendContentln(`import ${p}`);g.appendContentln(""),g.appendContentln(w.content),d.push(g)}else isNever(w.type)})}let v=t.states.designer.value._getContext().getAggs();for(let _ of v){c(_.inner);let y=t.commands._genAggCode(_),b=[...n.value.namespace.split(/\./),n.value.moduleName],w=new Y(b,o(_)+".kt"),g=[];w.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`),w.appendContentln(""),y.forEach(p=>{p.type==="Agg"||p.type==="AggImpl"?(w.addImports(p.imports),g.push(p.content)):isNever(p.type)});for(let p of w.getImports())w.appendContentln(`import ${p}`);w.appendContentln("");for(let p of g)w.appendContentln(p);d.push(w)}let m=t.states.designer.value._getContext().getEvents();for(let _ of m){c(_.inner);let y=t.commands._genEventCode(_),b=[...n.value.namespace.split(/\./),n.value.moduleName];y.forEach(w=>{if(w.type==="Event"){let g=new Y(b,o(_)+".kt");g.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`),g.appendContentln(""),g.addImports(w.imports);for(let p of w.imports)g.appendContentln(`import ${p}`);g.appendContentln(""),g.appendContentln(w.content),d.push(g)}else isNever(w.type)})}return d})}})),wm=He.createHotSwapPlugin(()=>({unmount({api:t}){t.commands.clearCaches(),t.commands._setCommandCodeProvider(()=>[]),t.commands._setFacadeCommandCodeProvider(()=>[]),t.commands._setAggCodeProvider(()=>[]),t.commands._setEventCodeProvider(()=>[]),t.commands._setReadModelCodeProvider(()=>[]),t.commands._setCodeFileProvider(()=>[]),t.commands.setContext({})},mount({api:t}){let e=t.states.context,n=t.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map(l=>O.stringToLowerCamel(l));function r(l){return!n.includes(O.stringToLowerCamel(l._attributes.name))}function s(l,d){return r(d)?O.stringToUpperCamel(d._attributes.name):a(l,d)}function i(l){return O.stringToUpperCamel(l._attributes.name)}function o(l){return O.stringToLowerCamel(l._attributes.name)}function a(l,d){let u=O.stringToLowerSnake(d._attributes.name).replace(/_/," ");return/\b(time|timestamp|date|deadline|expire)\b/.test(u)?(l.add("time"),"time.Time"):/\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(u)?"int":/\b(price)$/.test(u)?"string":/^(if|is)\b/.test(u)?"bool":Ys(d)&&(d._attributes.type==="Id"||d._attributes.type==="Version")?"int64":"string"}t.commands._setInfoCodeProvider(l=>{let d=new Set,u=[];return u.push(`type ${i(l)} struct {`),u.push(` value ${a(d,l)}`),u.push("}"),u.push(""),u.push(`func New${i(l)}(value ${a(d,l)}) ${i(l)} {`),u.push(" // HACK check value"),u.push(` return ${i(l)}{value}`),u.push("}"),u.push(`func (${o(l)} ${i(l)}) GetValue() ${a(d,l)} {`),u.push(` return ${o(l)}.value`),u.push("}"),[{type:"Info",imports:d,content:u.join(`
234
+ `)}]}),t.commands._setReadModelCodeProvider(()=>[]),t.commands._setCodeFileProvider(()=>{let d=[],u={};function c(_){for(let y of Object.values(_)){if(!s(y))continue;let b=[...n.value.namespace.split(/\./),n.value.moduleName,e],w=o(y)+".kt";if(u[`${b.join("/")}/${w}`]===!0)continue;let g=t.commands._genInfoCode(y);if(g.length===0)continue;let p=new J(b,w);p.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}.${e}`),p.appendContentln("");for(let C of g[0].imports)p.appendContentln(`import ${C}`);p.appendContentln(""),p.appendContentln(g[0].content),d.push(p),u[`${b.join("/")}/${w}`]=!0}}let h=t.states.designer.value._getContext().getCommands();for(let _ of h){c(_.inner);let y=t.commands._genCommandCode(_),b=[...n.value.namespace.split(/\./),n.value.moduleName],w=new J(b,o(_)+".kt"),g=[];w.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`),w.appendContentln(""),y.forEach(p=>{p.type==="Command"||p.type==="CommandHandler"?(w.addImports(p.imports),g.push(p.content)):isNever(p.type)});for(let p of w.getImports())w.appendContentln(`import ${p}`);w.appendContentln("");for(let p of g)w.appendContentln(p);d.push(w)}let f=t.states.designer.value._getContext().getFacadeCommands();for(let _ of f){c(_.inner);let y=t.commands._genFacadeCommandCode(_),b=[...n.value.namespace.split(/\./),n.value.moduleName];y.forEach(w=>{if(w.type==="FacadeCommand"){let g=new J(b,o(_)+".kt");g.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`),g.appendContentln(""),g.addImports(w.imports);for(let p of w.imports)g.appendContentln(`import ${p}`);g.appendContentln(""),g.appendContentln(w.content),d.push(g)}else isNever(w.type)})}let v=t.states.designer.value._getContext().getAggs();for(let _ of v){c(_.inner);let y=t.commands._genAggCode(_),b=[...n.value.namespace.split(/\./),n.value.moduleName],w=new J(b,o(_)+".kt"),g=[];w.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`),w.appendContentln(""),y.forEach(p=>{p.type==="Agg"||p.type==="AggImpl"?(w.addImports(p.imports),g.push(p.content)):isNever(p.type)});for(let p of w.getImports())w.appendContentln(`import ${p}`);w.appendContentln("");for(let p of g)w.appendContentln(p);d.push(w)}let m=t.states.designer.value._getContext().getEvents();for(let _ of m){c(_.inner);let y=t.commands._genEventCode(_),b=[...n.value.namespace.split(/\./),n.value.moduleName];y.forEach(w=>{if(w.type==="Event"){let g=new J(b,o(_)+".kt");g.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`),g.appendContentln(""),g.addImports(w.imports);for(let p of w.imports)g.appendContentln(`import ${p}`);g.appendContentln(""),g.appendContentln(w.content),d.push(g)}else isNever(w.type)})}return d})}})),Sm=We.createHotSwapPlugin(()=>({unmount({api:t}){t.commands.clearCaches(),t.commands._setCommandCodeProvider(()=>[]),t.commands._setFacadeCommandCodeProvider(()=>[]),t.commands._setAggCodeProvider(()=>[]),t.commands._setEventCodeProvider(()=>[]),t.commands._setReadModelCodeProvider(()=>[]),t.commands._setCodeFileProvider(()=>[]),t.commands.setContext({})},mount({api:t}){let e=t.states.context,n=t.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map(l=>O.stringToLowerCamel(l));function r(l){return!n.includes(O.stringToLowerCamel(l._attributes.name))}function s(l,d){return r(d)?O.stringToUpperCamel(d._attributes.name):a(l,d)}function i(l){return O.stringToUpperCamel(l._attributes.name)}function o(l){return O.stringToLowerCamel(l._attributes.name)}function a(l,d){let u=O.stringToLowerSnake(d._attributes.name).replace(/_/," ");return/\b(time|timestamp|date|deadline|expire)\b/.test(u)?(l.add("time"),"time.Time"):/\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(u)?"int":/\b(price)$/.test(u)?"string":/^(if|is)\b/.test(u)?"bool":Zs(d)&&(d._attributes.type==="Id"||d._attributes.type==="Version")?"int64":"string"}t.commands._setInfoCodeProvider(l=>{let d=new Set,u=[];return u.push(`type ${i(l)} struct {`),u.push(` value ${a(d,l)}`),u.push("}"),u.push(""),u.push(`func New${i(l)}(value ${a(d,l)}) ${i(l)} {`),u.push(" // HACK check value"),u.push(` return ${i(l)}{value}`),u.push("}"),u.push(`func (${o(l)} ${i(l)}) GetValue() ${a(d,l)} {`),u.push(` return ${o(l)}.value`),u.push("}"),[{type:"Info",imports:d,content:u.join(`
235
235
  `)}]}),t.commands._setCommandCodeProvider(l=>{let d=i(l),u=o(l),c=new Set,h=[];h.push(`type ${d} struct {`);let f=Object.values(l.inner);for(let _ of f)h.push(` ${o(_)} ${s(c,_)}`);h.push("}");for(let _ of f)h.push(`func (${u} ${d}) Get${i(_)} () ${s(c,_)} {`),h.push(` return ${u}.${o(_)}`),h.push("}");let v=[],m=[];for(let _ of f)v.push(`${o(_)} ${s(c,_)}`),m.push(o(_));return h.push(`func New${d}(${v.join(", ")}) ${d} {`),h.push(" // HACK check value"),h.push(` return ${d}{`),h.push(` ${m.join(`,
236
236
  `)},`),h.push(" }"),h.push("}"),[{type:"Command",imports:c,content:h.join(`
237
237
  `)}]}),t.commands._setFacadeCommandCodeProvider(l=>{let d=i(l),u=o(l),c=Object.values(l.inner),h=new Set,f=[];f.push(`type ${d} struct {`);for(let _ of c)f.push(` ${o(_)} ${s(h,_)}`);f.push("}");for(let _ of c)f.push(`func (${u} ${d}) Get${i(_)} () ${s(h,_)} {`),f.push(` return ${u}.${o(_)}`),f.push("}");let v=[],m=[];for(let _ of c)v.push(`${o(_)} ${s(h,_)}`),m.push(o(_));return f.push(`func New${d}(${v.join(", ")}) ${d} {`),f.push(" // HACK check value"),f.push(` return ${d}{`),f.push(` ${m.join(`,
@@ -240,31 +240,31 @@ Component that was made reactive: `,t)),BA(t,e,n,r,s,o,i,!0)}function YA(t){retu
240
240
  `)},`),v.push(" }"),v.push("}"),v.push("");let y=[...d._getContext().getAssociationMap()[l._attributes.__id]].filter(b=>b._attributes.rule==="Command"||b._attributes.rule==="FacadeCommand");for(let b of y){let w=i(b),g=o(b);v.push(`func (${c} ${u}) Handle${w} (${g} ${w}) {`),v.push(" // HACK implement"),v.push("}")}return[{type:"Agg",imports:f,content:v.join(`
241
241
  `)}]}),t.commands._setEventCodeProvider(l=>{let d=[],u=new Set,c=Object.values(l.inner),h=i(l),f=o(l);d.push(`type ${h} struct {`);for(let _ of c)d.push(` ${o(_)} ${s(u,_)}`);d.push("}");for(let _ of c)d.push(`func (${f} ${h}) Get${i(_)} () ${s(u,_)} {`),d.push(` return ${f}.${o(_)}`),d.push("}");let v=[],m=[];for(let _ of c)v.push(`${o(_)} ${s(u,_)}`),m.push(o(_));return d.push(`func New${h}(${v.join(", ")}) ${h} {`),d.push(" // HACK check value"),d.push(` return ${h}{`),d.push(` ${m.join(`,
242
242
  `)},`),d.push(" }"),d.push("}"),[{type:"Event",imports:u,content:d.join(`
243
- `)}]}),t.commands._setCodeFileProvider(()=>{let l=[],d={},u=[...e.value.namespace.split(/\./),e.value.moduleName],c=new Y(u,`${e.value.moduleName}.go`),h=[],f=new Y(u,`${e.value.moduleName}_value_object.go`),v=[];function m(g){for(let p of Object.values(g)){if(!r(p))continue;let C=i(p);if(d[`${u.join("/")}/${C}`]===!0)continue;let k=t.commands._genInfoCode(p);k.length!==0&&(f.addImports(k[0].imports),v.push(k[0].content),v.push(""),d[`${u.join("/")}/${C}`]=!0)}}let _=t.states.designer.value._getContext().getCommands();for(let g of _){m(g.inner);let p=t.commands._genCommandCode(g);for(let C of p)d[C.content]!==!0&&(c.addImports(C.imports),h.push(C.content))}let y=t.states.designer.value._getContext().getFacadeCommands();for(let g of y){m(g.inner);let p=t.commands._genFacadeCommandCode(g);for(let C of p)d[C.content]!==!0&&(c.addImports(C.imports),h.push(C.content))}let b=t.states.designer.value._getContext().getAggs();for(let g of b){m(g.inner);let p=t.commands._genAggCode(g);for(let C of p)d[C.content]!==!0&&(c.addImports(C.imports),h.push(C.content))}let w=t.states.designer.value._getContext().getEvents();for(let g of w){m(g.inner);let p=t.commands._genEventCode(g);for(let C of p)d[C.content]!==!0&&(c.addImports(C.imports),h.push(C.content))}return c.appendContentln(`package ${e.value.moduleName}`),c.appendContentln(""),c.getImports().length>0&&(c.appendContentln("import ("),c.appendContentln(` ${[...c.getImports()].join(`
243
+ `)}]}),t.commands._setCodeFileProvider(()=>{let l=[],d={},u=[...e.value.namespace.split(/\./),e.value.moduleName],c=new J(u,`${e.value.moduleName}.go`),h=[],f=new J(u,`${e.value.moduleName}_value_object.go`),v=[];function m(g){for(let p of Object.values(g)){if(!r(p))continue;let C=i(p);if(d[`${u.join("/")}/${C}`]===!0)continue;let k=t.commands._genInfoCode(p);k.length!==0&&(f.addImports(k[0].imports),v.push(k[0].content),v.push(""),d[`${u.join("/")}/${C}`]=!0)}}let _=t.states.designer.value._getContext().getCommands();for(let g of _){m(g.inner);let p=t.commands._genCommandCode(g);for(let C of p)d[C.content]!==!0&&(c.addImports(C.imports),h.push(C.content))}let y=t.states.designer.value._getContext().getFacadeCommands();for(let g of y){m(g.inner);let p=t.commands._genFacadeCommandCode(g);for(let C of p)d[C.content]!==!0&&(c.addImports(C.imports),h.push(C.content))}let b=t.states.designer.value._getContext().getAggs();for(let g of b){m(g.inner);let p=t.commands._genAggCode(g);for(let C of p)d[C.content]!==!0&&(c.addImports(C.imports),h.push(C.content))}let w=t.states.designer.value._getContext().getEvents();for(let g of w){m(g.inner);let p=t.commands._genEventCode(g);for(let C of p)d[C.content]!==!0&&(c.addImports(C.imports),h.push(C.content))}return c.appendContentln(`package ${e.value.moduleName}`),c.appendContentln(""),c.getImports().length>0&&(c.appendContentln("import ("),c.appendContentln(` ${[...c.getImports()].join(`
244
244
  `)}`),c.appendContentln(")")),c.appendContentln(h.join(`
245
245
  `)),f.appendContentln(`package ${e.value.moduleName}`),f.appendContentln(""),f.getImports().length>0&&(f.appendContentln("import ("),f.appendContentln(` ${[...f.getImports()].map(g=>`"${g}"`).join(`
246
246
  `)}`),f.appendContentln(")"),f.appendContentln("")),f.appendContentln(v.join(`
247
- `)),l.push(c),l.push(f),l})}})),gn=Bs.CSharpGeneratorAddition,Cm=He.createHotSwapPlugin(()=>{let t=" ";function e(n,r=1){return n.split(`
247
+ `)),l.push(c),l.push(f),l})}})),Cn=Js.CSharpGeneratorAddition,xm=We.createHotSwapPlugin(()=>{let t=" ";function e(n,r=1){return n.split(`
248
248
  `).map(s=>t.repeat(r)+s).join(`
249
- `)}return{unmount({api:n}){n.commands.clearCaches(),n.commands._setCommandCodeProvider(()=>[]),n.commands._setFacadeCommandCodeProvider(()=>[]),n.commands._setAggCodeProvider(()=>[]),n.commands._setEventCodeProvider(()=>[]),n.commands._setReadModelCodeProvider(()=>[]),n.commands._setCodeFileProvider(()=>[]),n.commands.setContext({})},mount({api:n}){let r=n.states.context,s=n.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map(u=>O.stringToLowerCamel(u));function i(u){return!s.includes(O.stringToLowerCamel(u._attributes.name))}function o(u,c){return i(c)?O.stringToUpperCamel(c._attributes.name):d(u,c)}function a(u){return O.stringToUpperCamel(u._attributes.name)}function l(u){return u.has(gn.RecordStruct)?" struct":""}function d(u,c){let h=r.value.additions,f=O.stringToLowerSnake(c._attributes.name).replace(/_/," ");return/\b(time|timestamp|date|deadline|expire)\b/.test(f)?h.has(gn.Timezone)?"System.DateTimeOffset":"System.DateTime":/\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(f)?"int":/\b(price)$/.test(f)?"decimal":/^(if|is)\b/.test(f)?"bool":Ys(c)&&(c._attributes.type==="Id"||c._attributes.type==="Version")?"long":"string"}n.commands._setInfoCodeProvider(u=>{let c=r.value.additions,h=new Set,f=[];return f.push(`public record${l(c)} ${a(u)}(${d(h,u)} value);`),[{type:"Info",content:f.join(`
249
+ `)}return{unmount({api:n}){n.commands.clearCaches(),n.commands._setCommandCodeProvider(()=>[]),n.commands._setFacadeCommandCodeProvider(()=>[]),n.commands._setAggCodeProvider(()=>[]),n.commands._setEventCodeProvider(()=>[]),n.commands._setReadModelCodeProvider(()=>[]),n.commands._setCodeFileProvider(()=>[]),n.commands.setContext({})},mount({api:n}){let r=n.states.context,s=n.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map(u=>O.stringToLowerCamel(u));function i(u){return!s.includes(O.stringToLowerCamel(u._attributes.name))}function o(u,c){return i(c)?O.stringToUpperCamel(c._attributes.name):d(u,c)}function a(u){return O.stringToUpperCamel(u._attributes.name)}function l(u){return u.has(Cn.RecordStruct)?" struct":""}function d(u,c){let h=r.value.additions,f=O.stringToLowerSnake(c._attributes.name).replace(/_/," ");return/\b(time|timestamp|date|deadline|expire)\b/.test(f)?h.has(Cn.Timezone)?"System.DateTimeOffset":"System.DateTime":/\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(f)?"int":/\b(price)$/.test(f)?"decimal":/^(if|is)\b/.test(f)?"bool":Zs(c)&&(c._attributes.type==="Id"||c._attributes.type==="Version")?"long":"string"}n.commands._setInfoCodeProvider(u=>{let c=r.value.additions,h=new Set,f=[];return f.push(`public record${l(c)} ${a(u)}(${d(h,u)} value);`),[{type:"Info",content:f.join(`
250
250
  `),imports:h}]}),n.commands._setCommandCodeProvider(u=>{let c=[],h=r.value.additions,f=new Set,v=a(u);{let m=[],_=Object.values(u.inner);m.push(`public record${l(h)} ${v}`),m.push("(");let y=[];for(let b of _){let w=a(b);y.push(`${o(f,b)} ${O.upperFirst(w)}`)}m.push(` ${y.join(`,
251
251
  `)}`),m.push(")"),m.push("{"),m.push("}"),c.push({type:"Command",content:m.join(`
252
- `),imports:f})}{let m=h.has(gn.CommandHandlerInterface)?` : ${r.value.commandHandlerInterface}`:"",_=[];_.push(`public class ${v}Handler${m}`),_.push("{"),_.push(` public void Handle(${v} command)`),_.push(" {"),_.push(" // HACK implement"),_.push(" }"),_.push("}"),c.push({type:"CommandHandler",content:_.join(`
253
- `),imports:f})}return c}),n.commands._setAggCodeProvider(u=>{let c=[],h=n.states.designer.value,f=r.value.additions;{let v=new Set,m=[],_=f.has(gn.AggInterface)?` : ${r.value.aggInterface}`:"";m.push(`public interface I${a(u)}${_}`),m.push("{");let y=[],b=[...h._getContext().getAssociationMap()[u._attributes.__id]].filter(w=>w._attributes.rule==="Command"||w._attributes.rule==="FacadeCommand");for(let w of b){let g=a(w);y.push(`void Handle${g}(${g} command);`)}m.push(` ${y.join(`
252
+ `),imports:f})}{let m=h.has(Cn.CommandHandlerInterface)?` : ${r.value.commandHandlerInterface}`:"",_=[];_.push(`public class ${v}Handler${m}`),_.push("{"),_.push(` public void Handle(${v} command)`),_.push(" {"),_.push(" // HACK implement"),_.push(" }"),_.push("}"),c.push({type:"CommandHandler",content:_.join(`
253
+ `),imports:f})}return c}),n.commands._setAggCodeProvider(u=>{let c=[],h=n.states.designer.value,f=r.value.additions;{let v=new Set,m=[],_=f.has(Cn.AggInterface)?` : ${r.value.aggInterface}`:"";m.push(`public interface I${a(u)}${_}`),m.push("{");let y=[],b=[...h._getContext().getAssociationMap()[u._attributes.__id]].filter(w=>w._attributes.rule==="Command"||w._attributes.rule==="FacadeCommand");for(let w of b){let g=a(w);y.push(`void Handle${g}(${g} command);`)}m.push(` ${y.join(`
254
254
 
255
255
  `)}`),m.push("}"),m.push(""),c.push({type:"Agg",content:m.join(`
256
- `),imports:v})}{let v=new Set,m=[],_=a(u),y=Object.values(u.inner),b=f.has(gn.AggInterface)?`, ${r.value.aggInterface}`:"";if(f.has(gn.PrimaryConstructor)){let w=[...h._getContext().getAssociationMap()[u._attributes.__id]].filter(C=>C._attributes.rule==="Command"||C._attributes.rule==="FacadeCommand"),g=[];for(let C of y){let k=a(C);g.push(`${o(v,C)} ${O.lowerFirst(k)}`)}m.push(`public class ${_}`),m.push("("),m.push(` ${g.join(`,
256
+ `),imports:v})}{let v=new Set,m=[],_=a(u),y=Object.values(u.inner),b=f.has(Cn.AggInterface)?`, ${r.value.aggInterface}`:"";if(f.has(Cn.PrimaryConstructor)){let w=[...h._getContext().getAssociationMap()[u._attributes.__id]].filter(C=>C._attributes.rule==="Command"||C._attributes.rule==="FacadeCommand"),g=[];for(let C of y){let k=a(C);g.push(`${o(v,C)} ${O.lowerFirst(k)}`)}m.push(`public class ${_}`),m.push("("),m.push(` ${g.join(`,
257
257
  `)}`),m.push(`): I${_}${b}`),m.push("{");for(let C of y){let k=a(C);m.push(` public ${o(v,C)} ${O.upperFirst(k)} { get; private set; } = ${O.lowerFirst(k)};`),m.push("")}let p=[];for(let C of w){let k=a(C);p.push(`public void Handle${k}(${k} command)`),p.push("{"),p.push(" // HACK implement"),p.push("}"),p.push("")}m.push(` ${p.join(`
258
258
  `)}`),m.push("}")}else{let w=[...h._getContext().getAssociationMap()[u._attributes.__id]].filter(C=>C._attributes.rule==="Command"||C._attributes.rule==="FacadeCommand");m.push(`public class ${_} : I${_}${b}`),m.push("{");for(let C of y){let k=a(C);m.push(` public ${o(v,C)} ${O.lowerFirst(k)} { get; private set; }`)}m.push("");let g=[];for(let C of y){let k=a(C);g.push(`${o(v,C)} ${k}`)}m.push(` public ${_}(${g.join(", ")})`),m.push(" {");for(let C of y){let k=a(C);m.push(` ${k} = ${O.lowerFirst(k)};`)}m.push(" }");let p=[];for(let C of w){let k=a(C);p.push(`public void Handle${k}(${k} command)`),p.push("{"),p.push(" // HACK implement"),p.push("}"),p.push("")}m.push(` ${p.join(`
259
259
  `)}`),m.push("}")}c.push({type:"AggImpl",content:m.join(`
260
260
  `),imports:v})}return c}),n.commands._setEventCodeProvider(u=>{let c=r.value.additions,h=a(u),f=new Set,v=Object.values(u.inner),m=[];m.push(`public record${l(c)} ${h}`),m.push("(");let _=[];for(let y of v){let b=a(y);_.push(`${o(f,y)} ${O.upperFirst(b)}`)}return m.push(` ${_.join(`,
261
261
  `)}`),m.push(")"),m.push("{"),m.push("}"),[{type:"Event",content:m.join(`
262
- `),imports:f}]}),n.commands._setReadModelCodeProvider(()=>[]),n.commands._setCodeFileProvider(()=>{let u=[],c={},h=[...r.value.namespace.split(/\./),O.stringToUpperCamel(r.value.moduleName)];function f(b){for(let w of Object.values(b)){if(!i(w))continue;let g=a(w)+".cs";if(c[`${h.join("/")}/${g}`]===!0)continue;let p=n.commands._genInfoCode(w);if(p.length===0)continue;let C=new Y(h,g);for(let k of p[0].imports)C.appendContentln(`using ${k};`);C.appendContentln(""),C.appendContentln(`namespace ${r.value.namespace}.${O.stringToUpperCamel(r.value.moduleName)}`),C.appendContentln("{"),C.appendContentln(e(p[0].content)),C.appendContentln("}"),u.push(C),c[`${h.join("/")}/${g}`]=!0}}let v=n.states.designer.value._getContext().getCommands();for(let b of v){f(b.inner);let w=a(b)+".cs",g=n.commands._genCommandCode(b),p=new Y(h,w);for(let C of g)if(C.type==="Command"){p.addImports(C.imports);for(let k of C.imports)p.appendContentln(`using ${k};`);p.appendContentln(""),p.appendContentln(`namespace ${r.value.namespace}.${O.stringToUpperCamel(r.value.moduleName)}`),p.appendContentln("{"),p.appendContentln(e(C.content)),p.appendContentln("}")}u.push(p)}let m=n.states.designer.value._getContext().getFacadeCommands();for(let b of m){f(b.inner);let w=a(b)+".cs",g=n.commands._genFacadeCommandCode(b),p=new Y(h,w);p.addImports(g[0].imports);for(let C of g[0].imports)p.appendContentln(`using ${C};`);p.appendContentln(""),p.appendContentln(`namespace ${r.value.namespace}.${O.stringToUpperCamel(r.value.moduleName)}`),p.appendContentln("{"),p.appendContentln(e(g[0].content)),p.appendContentln("}"),u.push(p)}let _=n.states.designer.value._getContext().getAggs();for(let b of _){f(b.inner);let w=n.commands._genAggCode(b),g=a(b)+".cs",p=new Y(h,g);for(let C of w){p.addImports(C.imports);for(let k of C.imports)p.appendContentln(`using ${k};`);p.appendContentln("")}p.appendContentln(`namespace ${r.value.namespace}.${O.stringToUpperCamel(r.value.moduleName)}`),p.appendContentln("{");for(let C of w)p.appendContentln(e(C.content));p.appendContentln("}"),u.push(p)}let y=n.states.designer.value._getContext().getEvents();for(let b of y){f(b.inner);let w=a(b)+".cs",g=n.commands._genEventCode(b),p=new Y(h,w);p.addImports(g[0].imports);for(let C of g[0].imports)p.appendContentln(`using ${C};`);p.appendContentln(""),p.appendContentln(`namespace ${r.value.namespace}.${O.stringToUpperCamel(r.value.moduleName)}`),p.appendContentln("{"),p.appendContentln(e(g[0].content)),p.appendContentln("}"),u.push(p)}return u})}}});var $m=L(Vt(),1);var kl=L(Vt(),1);var{t:Ge}=X().commands;async function Sm(){let t={},{namespace:e,additions:n}=await(0,kl.default)([{name:"namespace",type:"text",message:Ge("question.subcommand.genCode.package"),initial:"com.github.example"},{name:"additions",type:"multiselect",message:Ge("question.subcommand.genCode.java.additions"),choices:[{title:I.java.JavaGeneratorAddition.SpringFramework,value:I.java.JavaGeneratorAddition.SpringFramework,selected:!0,description:Ge("question.subcommand.genCode.java.additions.springFramework")},{title:I.java.JavaGeneratorAddition.Lombok,value:I.java.JavaGeneratorAddition.Lombok,selected:!0,description:Ge("question.subcommand.genCode.java.additions.lombok")},{title:I.java.JavaGeneratorAddition.LombokBuilder,value:I.java.JavaGeneratorAddition.LombokBuilder,description:Ge("question.subcommand.genCode.java.additions.lombokBuilder")},{title:I.java.JavaGeneratorAddition.CommandHandler,value:I.java.JavaGeneratorAddition.CommandHandler,selected:!0,description:Ge("question.subcommand.genCode.java.additions.commandHandler")},{title:I.java.JavaGeneratorAddition.RecordVakueObject,value:I.java.JavaGeneratorAddition.RecordVakueObject,description:Ge("question.subcommand.genCode.java.additions.recordVakueObject")},{title:I.java.JavaGeneratorAddition.Timezone,value:I.java.JavaGeneratorAddition.Timezone,selected:!0,description:Ge("question.subcommand.genCode.java.additions.timezone")}],hint:Ge("question.subcommand.genCode.additions.hint")}],{onCancel:Q}),r=n.includes(I.java.JavaGeneratorAddition.SpringFramework)?"org.springframework.lang.NonNull":void 0;return r===void 0&&(r=(await(0,kl.default)([{name:"nonNullAnnotation",type:"select",message:Ge("question.subcommand.genCode.java.nonNullAnnotation"),choices:[{title:"org.springframework.lang.NonNull",value:"org.springframework.lang.NonNull"},{title:"org.jetbrains.annotations.NotNull",value:"org.jetbrains.annotations.NotNull"},{title:"javax.annotation.Nonnull",value:"javax.annotation.Nonnull"}]}],{onCancel:Q})).nonNullAnnotation),t.namespace=e,t.additions=new Set(n),t.moduleName="",t.nonNullAnnotation=r,t}var xm=L(Vt(),1),{t:xn}=X().commands;async function Am(){let t={},{namespace:e,additions:n}=await(0,xm.default)([{name:"namespace",type:"text",message:xn("question.subcommand.genCode.package"),initial:"com.github.example"},{name:"additions",type:"multiselect",message:xn("question.subcommand.genCode.kotlin.additions"),choices:[{title:I.kotlin.KotlinGeneratorAddition.CommandHandler,value:I.kotlin.KotlinGeneratorAddition.CommandHandler,selected:!0,description:xn("question.subcommand.genCode.kotlin.additions.commandHandler")},{title:I.kotlin.KotlinGeneratorAddition.ValueClass,value:I.kotlin.KotlinGeneratorAddition.ValueClass,selected:!0,description:xn("question.subcommand.genCode.kotlin.additions.valueClass")},{title:I.kotlin.KotlinGeneratorAddition.Timezone,value:I.kotlin.KotlinGeneratorAddition.Timezone,description:xn("question.subcommand.genCode.kotlin.additions.timezone")}],hint:xn("question.subcommand.genCode.additions.hint")}],{onCancel:Q});return t.namespace=e,t.additions=new Set(n),t}var Zs=L(Vt(),1);var{t:Ue}=X().commands;async function Em(){let t={},{namespace:e,additions:n}=await(0,Zs.default)([{name:"namespace",type:"text",message:Ue("question.subcommand.genCode.namespace"),initial:"WebApplication1.Domain"},{name:"additions",type:"multiselect",message:Ue("question.subcommand.genCode.csharp.additions"),choices:[{title:I.csharp.CSharpGeneratorAddition.Timezone,value:I.csharp.CSharpGeneratorAddition.Timezone,selected:!0,description:Ue("question.subcommand.genCode.csharp.additions.timezone")},{title:I.csharp.CSharpGeneratorAddition.RecordStruct,value:I.csharp.CSharpGeneratorAddition.RecordStruct,selected:!0,description:Ue("question.subcommand.genCode.csharp.additions.recordStruct")},{title:I.csharp.CSharpGeneratorAddition.PrimaryConstructor,value:I.csharp.CSharpGeneratorAddition.PrimaryConstructor,selected:!0,description:Ue("question.subcommand.genCode.csharp.additions.primaryConstructor")},{title:I.csharp.CSharpGeneratorAddition.CommandHandlerInterface,value:I.csharp.CSharpGeneratorAddition.CommandHandlerInterface,selected:!1,description:Ue("question.subcommand.genCode.csharp.additions.commandHandlerInterface")},{title:I.csharp.CSharpGeneratorAddition.AggInterface,value:I.csharp.CSharpGeneratorAddition.AggInterface,selected:!1,description:Ue("question.subcommand.genCode.csharp.additions.aggInterface")}],hint:Ue("question.subcommand.genCode.additions.hint")}],{onCancel:Q});if(t.additions=new Set(n),t.namespace=e,t.additions.has(I.csharp.CSharpGeneratorAddition.CommandHandlerInterface)){let{commandHandlerInterface:r}=await(0,Zs.default)([{name:"commandHandlerInterface",type:"text",message:Ue("question.subcommand.genCode.csharp.additions.commandHandlerInterface.hint")}],{onCancel:Q});t.commandHandlerInterface=r}if(t.additions.has(I.csharp.CSharpGeneratorAddition.AggInterface)){let{aggInterface:r}=await(0,Zs.default)([{name:"aggInterface",type:"text",message:Ue("question.subcommand.genCode.csharp.additions.aggInterface.hint")}],{onCancel:Q});t.aggInterface=r}return t}var Om=L(Vt(),1);var{t:rE}=X().commands;async function Tm(){let t={},{namespace:e}=await(0,Om.default)([{name:"namespace",type:"text",message:rE("question.subcommand.genCode.namespace"),initial:"ComGithub.Example"}],{onCancel:Q});return t.namespace=e,t.additions=new Set,t}var{t:sE}=X().commands;function Rm(t){return new Se().name("genCode").option("--source <sourceDir>","ts files' dir").action(e=>{t.currentCommand.value="GenCode",e.source&&(t.args.source=e.source)}).addHelpText("before",`Generate code.
262
+ `),imports:f}]}),n.commands._setReadModelCodeProvider(()=>[]),n.commands._setCodeFileProvider(()=>{let u=[],c={},h=[...r.value.namespace.split(/\./),O.stringToUpperCamel(r.value.moduleName)];function f(b){for(let w of Object.values(b)){if(!i(w))continue;let g=a(w)+".cs";if(c[`${h.join("/")}/${g}`]===!0)continue;let p=n.commands._genInfoCode(w);if(p.length===0)continue;let C=new J(h,g);for(let k of p[0].imports)C.appendContentln(`using ${k};`);C.appendContentln(""),C.appendContentln(`namespace ${r.value.namespace}.${O.stringToUpperCamel(r.value.moduleName)}`),C.appendContentln("{"),C.appendContentln(e(p[0].content)),C.appendContentln("}"),u.push(C),c[`${h.join("/")}/${g}`]=!0}}let v=n.states.designer.value._getContext().getCommands();for(let b of v){f(b.inner);let w=a(b)+".cs",g=n.commands._genCommandCode(b),p=new J(h,w);for(let C of g)if(C.type==="Command"){p.addImports(C.imports);for(let k of C.imports)p.appendContentln(`using ${k};`);p.appendContentln(""),p.appendContentln(`namespace ${r.value.namespace}.${O.stringToUpperCamel(r.value.moduleName)}`),p.appendContentln("{"),p.appendContentln(e(C.content)),p.appendContentln("}")}u.push(p)}let m=n.states.designer.value._getContext().getFacadeCommands();for(let b of m){f(b.inner);let w=a(b)+".cs",g=n.commands._genFacadeCommandCode(b),p=new J(h,w);p.addImports(g[0].imports);for(let C of g[0].imports)p.appendContentln(`using ${C};`);p.appendContentln(""),p.appendContentln(`namespace ${r.value.namespace}.${O.stringToUpperCamel(r.value.moduleName)}`),p.appendContentln("{"),p.appendContentln(e(g[0].content)),p.appendContentln("}"),u.push(p)}let _=n.states.designer.value._getContext().getAggs();for(let b of _){f(b.inner);let w=n.commands._genAggCode(b),g=a(b)+".cs",p=new J(h,g);for(let C of w){p.addImports(C.imports);for(let k of C.imports)p.appendContentln(`using ${k};`);p.appendContentln("")}p.appendContentln(`namespace ${r.value.namespace}.${O.stringToUpperCamel(r.value.moduleName)}`),p.appendContentln("{");for(let C of w)p.appendContentln(e(C.content));p.appendContentln("}"),u.push(p)}let y=n.states.designer.value._getContext().getEvents();for(let b of y){f(b.inner);let w=a(b)+".cs",g=n.commands._genEventCode(b),p=new J(h,w);p.addImports(g[0].imports);for(let C of g[0].imports)p.appendContentln(`using ${C};`);p.appendContentln(""),p.appendContentln(`namespace ${r.value.namespace}.${O.stringToUpperCamel(r.value.moduleName)}`),p.appendContentln("{"),p.appendContentln(e(g[0].content)),p.appendContentln("}"),u.push(p)}return u})}}});var km=q(Ut(),1);var Pl=q(Ut(),1);var{t:Be}=Z().commands;async function Am(){let t={},{namespace:e,additions:n}=await(0,Pl.default)([{name:"namespace",type:"text",message:Be("question.subcommand.genCode.package"),initial:"com.github.example"},{name:"additions",type:"multiselect",message:Be("question.subcommand.genCode.java.additions"),choices:[{title:I.java.JavaGeneratorAddition.SpringFramework,value:I.java.JavaGeneratorAddition.SpringFramework,selected:!0,description:Be("question.subcommand.genCode.java.additions.springFramework")},{title:I.java.JavaGeneratorAddition.Lombok,value:I.java.JavaGeneratorAddition.Lombok,selected:!0,description:Be("question.subcommand.genCode.java.additions.lombok")},{title:I.java.JavaGeneratorAddition.LombokBuilder,value:I.java.JavaGeneratorAddition.LombokBuilder,description:Be("question.subcommand.genCode.java.additions.lombokBuilder")},{title:I.java.JavaGeneratorAddition.CommandHandler,value:I.java.JavaGeneratorAddition.CommandHandler,selected:!0,description:Be("question.subcommand.genCode.java.additions.commandHandler")},{title:I.java.JavaGeneratorAddition.RecordVakueObject,value:I.java.JavaGeneratorAddition.RecordVakueObject,description:Be("question.subcommand.genCode.java.additions.recordVakueObject")},{title:I.java.JavaGeneratorAddition.Timezone,value:I.java.JavaGeneratorAddition.Timezone,selected:!0,description:Be("question.subcommand.genCode.java.additions.timezone")}],hint:Be("question.subcommand.genCode.additions.hint")}],{onCancel:Q}),r=n.includes(I.java.JavaGeneratorAddition.SpringFramework)?"org.springframework.lang.NonNull":void 0;return r===void 0&&(r=(await(0,Pl.default)([{name:"nonNullAnnotation",type:"select",message:Be("question.subcommand.genCode.java.nonNullAnnotation"),choices:[{title:"org.springframework.lang.NonNull",value:"org.springframework.lang.NonNull"},{title:"org.jetbrains.annotations.NotNull",value:"org.jetbrains.annotations.NotNull"},{title:"javax.annotation.Nonnull",value:"javax.annotation.Nonnull"}]}],{onCancel:Q})).nonNullAnnotation),t.namespace=e,t.additions=new Set(n),t.moduleName="",t.nonNullAnnotation=r,t}var Em=q(Ut(),1),{t:Rn}=Z().commands;async function Om(){let t={},{namespace:e,additions:n}=await(0,Em.default)([{name:"namespace",type:"text",message:Rn("question.subcommand.genCode.package"),initial:"com.github.example"},{name:"additions",type:"multiselect",message:Rn("question.subcommand.genCode.kotlin.additions"),choices:[{title:I.kotlin.KotlinGeneratorAddition.CommandHandler,value:I.kotlin.KotlinGeneratorAddition.CommandHandler,selected:!0,description:Rn("question.subcommand.genCode.kotlin.additions.commandHandler")},{title:I.kotlin.KotlinGeneratorAddition.ValueClass,value:I.kotlin.KotlinGeneratorAddition.ValueClass,selected:!0,description:Rn("question.subcommand.genCode.kotlin.additions.valueClass")},{title:I.kotlin.KotlinGeneratorAddition.Timezone,value:I.kotlin.KotlinGeneratorAddition.Timezone,description:Rn("question.subcommand.genCode.kotlin.additions.timezone")}],hint:Rn("question.subcommand.genCode.additions.hint")}],{onCancel:Q});return t.namespace=e,t.additions=new Set(n),t}var ti=q(Ut(),1);var{t:ze}=Z().commands;async function Tm(){let t={},{namespace:e,additions:n}=await(0,ti.default)([{name:"namespace",type:"text",message:ze("question.subcommand.genCode.namespace"),initial:"WebApplication1.Domain"},{name:"additions",type:"multiselect",message:ze("question.subcommand.genCode.csharp.additions"),choices:[{title:I.csharp.CSharpGeneratorAddition.Timezone,value:I.csharp.CSharpGeneratorAddition.Timezone,selected:!0,description:ze("question.subcommand.genCode.csharp.additions.timezone")},{title:I.csharp.CSharpGeneratorAddition.RecordStruct,value:I.csharp.CSharpGeneratorAddition.RecordStruct,selected:!0,description:ze("question.subcommand.genCode.csharp.additions.recordStruct")},{title:I.csharp.CSharpGeneratorAddition.PrimaryConstructor,value:I.csharp.CSharpGeneratorAddition.PrimaryConstructor,selected:!0,description:ze("question.subcommand.genCode.csharp.additions.primaryConstructor")},{title:I.csharp.CSharpGeneratorAddition.CommandHandlerInterface,value:I.csharp.CSharpGeneratorAddition.CommandHandlerInterface,selected:!1,description:ze("question.subcommand.genCode.csharp.additions.commandHandlerInterface")},{title:I.csharp.CSharpGeneratorAddition.AggInterface,value:I.csharp.CSharpGeneratorAddition.AggInterface,selected:!1,description:ze("question.subcommand.genCode.csharp.additions.aggInterface")}],hint:ze("question.subcommand.genCode.additions.hint")}],{onCancel:Q});if(t.additions=new Set(n),t.namespace=e,t.additions.has(I.csharp.CSharpGeneratorAddition.CommandHandlerInterface)){let{commandHandlerInterface:r}=await(0,ti.default)([{name:"commandHandlerInterface",type:"text",message:ze("question.subcommand.genCode.csharp.additions.commandHandlerInterface.hint")}],{onCancel:Q});t.commandHandlerInterface=r}if(t.additions.has(I.csharp.CSharpGeneratorAddition.AggInterface)){let{aggInterface:r}=await(0,ti.default)([{name:"aggInterface",type:"text",message:ze("question.subcommand.genCode.csharp.additions.aggInterface.hint")}],{onCancel:Q});t.aggInterface=r}return t}var $m=q(Ut(),1);var{t:cE}=Z().commands;async function Rm(){let t={},{namespace:e}=await(0,$m.default)([{name:"namespace",type:"text",message:cE("question.subcommand.genCode.namespace"),initial:"ComGithub.Example"}],{onCancel:Q});return t.namespace=e,t.additions=new Set,t}var{t:uE}=Z().commands,Nm=ee();function Im(t){return new xe().name("genCode").option("--source <sourceDir>","ts files' dir").action(e=>{t.currentCommand.value="GenCode",e.source&&(t.args.source=rn.default.resolve(e.source))}).addHelpText("before",`Generate code.
263
263
  `).addHelpText("before",`\u751F\u6210\u4EE3\u7801
264
- `)}async function Nm(t){let e=(await(0,$m.default)([{name:"language",type:"select",message:sE("question.subcommand.genCode.language"),choices:[{title:I.Language.CSharp,value:I.Language.CSharp},{title:I.Language.Go,value:I.Language.Go},{title:I.Language.Java,value:I.Language.Java},{title:I.Language.Kotlin,value:I.Language.Kotlin}]}],{onCancel:Q})).language;t.args.language=e,e===I.Language.Java?t.args.context=await Sm():e===I.Language.Kotlin?t.args.context=await Am():e===I.Language.CSharp?t.args.context=await Em():e===I.Language.Go?t.args.context=await Tm():isNever(e)}async function km(t){let e=t.webRoot,n=t.source,r=process.env.PACKAGE_MANAGER;E.printInfo("================ Install dependencies: Starting... ================"),r==="bun"?(0,Qs.spawnSync)(`bun i --cwd "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):r==="pnpm"?(0,Qs.spawnSync)(`pnpm i --prefix "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):isNever(r),E.printSuccess("================ Install dependencies: Succeeded ================"),E.printInfo("================ Compliling ts code: Starting... ================"),(0,Qs.spawnSync)(`${r==="bun"?"bunx":"pnpx"} zx ${e.replace(/\\/g,"/")}/scripts/build-ts.mjs --source=${n}`,{encoding:"utf-8",stdio:"inherit",shell:!0}),E.printSuccess("================ Compliling ts code: Succeeded ================"),E.printInfo("================ Generating code: Starting... ================");let i=An.default.readdirSync(gr.default.join(n,".output","esm")),o,a=!1;nr(`${n.replace(/\\/g,"/")}/.output/${t.language}`);for(let l of i){if(An.default.statSync(gr.default.join(n,".output","esm",l)).isDirectory()||!l.endsWith(".mjs"))continue;let d=await import(`file://${n.replace(/\\/g,"/")}/.output/esm/${l}`);if(!bf(d.default))continue;let u=d.default;a||(t.language===I.Language.Java?He.registerPlugin(bm):t.language===I.Language.Kotlin?He.registerPlugin(ym):t.language===I.Language.CSharp?He.registerPlugin(Cm):t.language===I.Language.Go?He.registerPlugin(wm):isNever(t.language),a=!0),o=tm(u),o.commands.setDomainDesigner(u),t.context.moduleName=u._getContext().getDesignerOptions().moduleName||l.split(".")[0],o.commands.setContext(t.context);let c=o.commands.genCodeFiles();for(let h of c){let f=gr.default.join(n,".output",t.language,...h.getParentDir());An.default.existsSync(f)||An.default.mkdirSync(f,{recursive:!0}),An.default.writeFileSync(gr.default.join(f,h.getName()),h.getContent(),"utf-8")}}E.printSuccess("================ Generating code: Succeeded ================")}var{t:En,setCurrentLang:iE}=X().commands,oE=vs(()=>{let t=(0,$t.ref)(!1),e=(0,$t.ref)("none"),n=bs(),r=process.cwd(),s=(0,$t.reactive)({webRoot:n,source:r}),i=(0,$t.reactive)({webRoot:n,source:r}),o=(0,$t.reactive)({webRoot:n,source:r}),a=(0,$t.reactive)({webRoot:n,source:r});new Se().name("domain-designer-cli").version(Z.version).addOption(new uu("--debug","debug mode").default(!1)).hook("preAction",u=>{u.opts().debug===!0&&E.printDebug("\u8C03\u8BD5\u6A21\u5F0F\u5DF2\u5F00\u542F"),process.env.DEBUG_MODE}).addCommand(rf({currentCommand:e,args:s})).addCommand(lf({currentCommand:e})).addCommand(df({currentCommand:e,args:i})).addCommand(ff({currentCommand:e,args:o})).addCommand(Rm({currentCommand:e,args:a})).parse(process.argv),"GenCode"!==e.value&&"none"!==e.value&&(t.value=!0),process.env.DEBUG_MODE==="T"&&(E.printDebug(typeof process.env.DEBUG_MODE,process.env.DEBUG_MODE),E.printDebug("- DEBUG: args\u4FE1\u606F\uFF1A",`[
264
+ `)}async function Dm(t){let e=(await(0,km.default)([{name:"language",type:"select",message:uE("question.subcommand.genCode.language"),choices:[{title:I.Language.CSharp,value:I.Language.CSharp},{title:I.Language.Go,value:I.Language.Go},{title:I.Language.Java,value:I.Language.Java},{title:I.Language.Kotlin,value:I.Language.Kotlin}]}],{onCancel:Q})).language;t.args.language=e,e===I.Language.Java?t.args.context=await Am():e===I.Language.Kotlin?t.args.context=await Om():e===I.Language.CSharp?t.args.context=await Tm():e===I.Language.Go?t.args.context=await Rm():isNever(e)}async function Pm(t){let e=Nm.states.webRoot.value,n=t.source,r=Nm.states.packageManager.value,s=rn.default.join(n,"node_modules","version.txt");(!Ke.default.existsSync(s)||!Ke.default.statSync(s).isFile()||Ke.default.readFileSync(s,"utf-8").trim()!==B.version)&&(x.printWarn("\u68C0\u6D4B\u5230\u5DE5\u4F5C\u76EE\u5F55\u7248\u672C\u4E0E\u811A\u624B\u67B6\u7248\u672C\u4E0D\u5339\u914D"),x.printWarn("\u5F53\u524D\u5DE5\u4F5C\u76EE\u5F55\u7248\u672C\uFF1A",Ke.default.readFileSync(s,"utf-8").trim()),x.printWarn("\u811A\u624B\u67B6\u7248\u672C\uFF1A ",B.version),x.printWarn("\u5982\u679C\u8981\u4EE5\u672C\u5730\u811A\u624B\u67B6\u7248\u672C\u4E3A\u51C6\uFF0C\u8BF7\u6267\u884C\u5728\u5DE5\u4F5C\u76EE\u5F55\u6267\u884Cupdate\u547D\u4EE4\u8FDB\u884C\u66F4\u65B0"),x.print(qe.bgYellow(`${r==="bun"?"bunx ":""}domain-designer-cli update`))),x.printInfo("================ Install dependencies: Starting... ================"),r==="bun"?(0,yr.spawnSync)(`bun i --cwd "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):r==="pnpm"?(0,yr.spawnSync)(`pnpm i --prefix "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):r==="npm"?(0,yr.spawnSync)(`npm i --prefix "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):isNever(r),x.printSuccess("================ Install dependencies: Succeeded ================"),x.printInfo("================ Compliling ts code: Starting... ================"),(0,yr.spawnSync)(`${r==="bun"?"bunx":"pnpx"} zx ${e.replace(/\\/g,"/")}/scripts/build-ts.mjs --source=${n}`,{encoding:"utf-8",stdio:"inherit",shell:!0}),x.printSuccess("================ Compliling ts code: Succeeded ================"),x.printInfo("================ Generating code: Starting... ================");let o=Ke.default.readdirSync(rn.default.join(n,".output","esm")),a,l=!1;ar(`${n.replace(/\\/g,"/")}/.output/${t.language}`);for(let d of o){if(Ke.default.statSync(rn.default.join(n,".output","esm",d)).isDirectory()||!d.endsWith(".mjs"))continue;let u=await import(`file://${n.replace(/\\/g,"/")}/.output/esm/${d}`);if(!u||!wf(u.default))continue;let c=u.default;l||(t.language===I.Language.Java?We.registerPlugin(wm):t.language===I.Language.Kotlin?We.registerPlugin(Cm):t.language===I.Language.CSharp?We.registerPlugin(xm):t.language===I.Language.Go?We.registerPlugin(Sm):isNever(t.language),l=!0),a=rm(c),a.commands.setDomainDesigner(c),t.context.moduleName=c._getContext().getDesignerOptions().moduleName||d.split(".")[0],a.commands.setContext(t.context);let h=a.commands.genCodeFiles();for(let f of h){let v=rn.default.join(n,".output",t.language,...f.getParentDir());Ke.default.existsSync(v)||Ke.default.mkdirSync(v,{recursive:!0}),Ke.default.writeFileSync(rn.default.join(v,f.getName()),f.getContent(),"utf-8")}}x.printSuccess("================ Generating code: Succeeded ================")}var{t:Nn,setCurrentLang:dE}=Z().commands,wr=ee(),hE=_n(()=>{let t=(0,It.ref)(!1),e=(0,It.ref)("none"),n=process.cwd(),r=(0,It.reactive)({source:n}),s=(0,It.reactive)({source:n}),i=(0,It.reactive)({source:n}),o=(0,It.reactive)({source:n});async function a(){if(t.value)return;if(new xe().name("domain-designer-cli").version(B.version).addOption(new fu("--debug","debug mode").default(!1)).hook("preAction",u=>{u.opts().debug===!0?(x.printDebug("\u8C03\u8BD5\u6A21\u5F0F\u5DF2\u5F00\u542F"),wr.commands.setDebugMode(!0)):wr.commands.setDebugMode(!1)}).addCommand(of({currentCommand:e,args:r})).addCommand(uf({currentCommand:e})).addCommand(pf({currentCommand:e,args:s})).addCommand(gf({currentCommand:e,args:i})).addCommand(Im({currentCommand:e,args:o})).parse(process.argv),wr.states.debugMode.value===!0&&(x.printDebug("- DEBUG: args\u4FE1\u606F\uFF1A",`[
265
265
  ${process.argv.join(`
266
266
  `)}
267
- ]`),E.printDebug("- DEBUG: packageManager",process.env.PACKAGE_MANAGER));async function d(){let{langurage:u}=await(0,Il.default)([{name:"langurage",type:"select",message:"Choose The language during this creation process",choices:[{title:"\u4E2D\u6587",value:"zh"},{title:"English",value:"en"}]}],{onCancel:Q});if(iE(u),e.value==="none"){let h=await(0,Il.default)([{name:"subcommand",type:"select",message:En("question.subcommand"),choices:[{title:En("question.subcommand.genCode"),value:"GenCode"},{title:En("question.subcommand.init"),value:"init"},{title:En("question.subcommand.updateWorkspace"),value:"updateWorkspace"},{title:En("question.subcommand.runWeb"),value:"runWeb"},{title:En("question.subcommand.info"),value:"info"}]}],{onCancel:Q});e.value=h.subcommand}let c=e.value;if(c==="init")await sf({currentCommand:e,args:s});else if(c==="updateWorkspace")await hf({currentCommand:e,args:i});else if(c==="runWeb")await mf({currentCommand:e,args:o});else if(c==="info")await cf({currentCommand:e});else if(c==="GenCode")await Nm({currentCommand:e,args:a});else{if(c==="none")return;isNever(c)}}return{states:{initCommandArgs:s,updateCommandArgs:i},commands:{async init(){t.value||(await d(),t.value=!0)},async exec(){let u=e.value;u==="info"?await uf():u==="init"?await of(s):u==="runWeb"?await gf(o):u==="updateWorkspace"?await pf(i):u==="GenCode"?await km(a):u==="none"||isNever(u)}}}});function Im(){return oE.api}var ei=X().commands.t;E.printInfo(ei("signal.scriptStart"));var Dm=Im();aE().then(()=>{E.printSuccess(ei("signal.successComplete"))}).catch(t=>{E.printError(t.message),E.printError(ei("signal.exitWithError"))});process.on("SIGINT",Q);async function aE(){if(E.print("Repo Addr:",E.info(Z.repository.url.replace(/git\+/g,""))),E.print(""),E.print("Script Version:",E.info(Z.version)),E.print(""),ef())process.env.PACKAGE_MANAGER="bun",E.printDebug("Package Manager: bun detected");else if(tf())process.env.PACKAGE_MANAGER="pnpm",E.printDebug("Package Manager: pnpm detected");else throw new Error(ei("error.noPackageManager"));await Dm.commands.init(),await Dm.commands.exec()}
267
+ ]`),x.printDebug("- DEBUG: packageManager",wr.states.packageManager.value)),"GenCode"!==e.value&&"none"!==e.value){t.value=!0;return}await l(),t.value=!0}async function l(){let d=wr.states.osLanguage.value;if(d.startsWith("zh"))d="zh";else if(d.startsWith("en"))d="en";else{let{language:c}=await(0,Ml.default)([{name:"language",type:"select",message:"Choose The language during this creation process",choices:[{title:"\u4E2D\u6587",value:"zh"},{title:"English",value:"en"}]}],{onCancel:Q});d=c}if(dE(d),e.value==="none"){let c=await(0,Ml.default)([{name:"subcommand",type:"select",message:Nn("question.subcommand"),choices:[{title:Nn("question.subcommand.genCode"),value:"GenCode"},{title:Nn("question.subcommand.init"),value:"init"},{title:Nn("question.subcommand.updateWorkspace"),value:"updateWorkspace"},{title:Nn("question.subcommand.runWeb"),value:"runWeb"},{title:Nn("question.subcommand.info"),value:"info"}]}],{onCancel:Q});e.value=c.subcommand}let u=e.value;if(u==="init")await af({currentCommand:e,args:r});else if(u==="updateWorkspace")await ff({currentCommand:e,args:s});else if(u==="runWeb")await _f({currentCommand:e,args:i});else if(u==="info")await df({currentCommand:e});else if(u==="GenCode")await Dm({currentCommand:e,args:o});else{if(u==="none")return;isNever(u)}}return{states:{initCommandArgs:r,updateCommandArgs:s},commands:{init:a,async exec(){let d=e.value;d==="info"?await hf():d==="init"?await lf(r):d==="runWeb"?await vf(i):d==="updateWorkspace"?await mf(s):d==="GenCode"?await Pm(o):d==="none"||isNever(d)}}}});function Mm(){return hE.api}var jl=Z().commands.t;x.printInfo(jl("signal.scriptStart"));var jm=Mm();pE().then(()=>{x.printSuccess(jl("signal.successComplete"))}).catch(t=>{x.printError(t.message),x.printError(jl("signal.exitWithError"))});process.on("SIGINT",Q);async function pE(){x.print("Repo Addr:",x.info(B.repository.url.replace(/git\+/g,""))),x.print(""),x.print("Script Version:",x.info(B.version)),x.print(""),await jm.commands.init(),await jm.commands.exec()}
268
268
  /*! Bundled license information:
269
269
 
270
270
  @vue/shared/dist/shared.cjs.prod.js: