@ddd-tool/domain-designer-cli 0.0.0-alpha.8 → 0.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +105 -10
- package/bin/domain-designer-cli.cjs +278 -98
- package/package.json +19 -18
- package/scripts/build-ts.mjs +52 -0
- package/scripts/sync-ver.mjs +0 -0
- package/src/views/design-en.ts +18 -31
- package/src/views/design-zh.ts +14 -24
- package/src/views/index.ts +12 -4
- package/templates/example-agg.ts +31 -0
- package/templates/example.ts +91 -0
- package/templates/node_modules/@ddd-tool/domain-designer-core/actor.d.ts +1 -1
- package/templates/node_modules/@ddd-tool/domain-designer-core/common.d.ts +33 -155
- package/templates/node_modules/@ddd-tool/domain-designer-core/define.d.ts +258 -124
- package/templates/node_modules/@ddd-tool/domain-designer-core/index.d.ts +3 -203
- package/templates/node_modules/@ddd-tool/domain-designer-core/info.d.ts +2 -0
- package/templates/node_modules/@ddd-tool/domain-designer-core/note.d.ts +2 -0
- package/templates/node_modules/@ddd-tool/domain-designer-core/policy.d.ts +1 -1
- package/templates/node_modules/@ddd-tool/domain-designer-core/service.d.ts +1 -1
- package/templates/node_modules/@ddd-tool/domain-designer-core/system.d.ts +1 -1
- package/templates/node_modules/version.txt +1 -0
- package/tsconfig.json +6 -19
- package/vite.config.ts +11 -5
- package/bin/domain-designer-cli.cjs.map +0 -7
- package/templates/node_modules/@ddd-tool/domain-designer-core/desc.d.ts +0 -2
- package/templates/node_modules/@ddd-tool/domain-designer-core/info/field.d.ts +0 -2
- package/templates/node_modules/@ddd-tool/domain-designer-core/info/index.d.ts +0 -3
- package/templates//347/244/272/344/276/213.ts +0 -31
|
@@ -1,140 +1,269 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`)}function Ui(t){if(Ke(t)){let e={};for(let i=0;i<t.length;i++){let s=t[i],r=ue(s)?Pn(s):Ui(s);if(r)for(let n in r)e[n]=r[n]}return e}else if(ue(t)||De(t))return t}var kc=/;(?![^(]*\))/g,Lc=/:([^]+)/,Hc=/\/\*[^]*?\*\//g;function Pn(t){let e={};return t.replace(Hc,"").split(kc).forEach(i=>{if(i){let s=i.split(Lc);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function Fc(t){if(!t)return"";if(ue(t))return t;let e="";for(let i in t){let s=t[i];if(ue(s)||typeof s=="number"){let r=i.startsWith("--")?i:Rn(i);e+=`${r}:${s};`}}return e}function Yi(t){let e="";if(ue(t))e=t;else if(Ke(t))for(let i=0;i<t.length;i++){let s=Yi(t[i]);s&&(e+=s+" ")}else if(De(t))for(let i in t)t[i]&&(e+=i+" ");return e.trim()}function jc(t){if(!t)return null;let{class:e,style:i}=t;return e&&!ue(e)&&(t.class=Yi(e)),i&&(t.style=Ui(i)),t}var Vc="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",Wc="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",Uc="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",Yc="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Kc=X(Vc),zc=X(Wc),Gc=X(Uc),Bc=X(Yc),Dn="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Jc=X(Dn),Xc=X(Dn+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Zc(t){return!!t||t===""}var Qc=/[>/="'\u0009\u000a\u000c\u0020]/,Fi={};function ed(t){if(Fi.hasOwnProperty(t))return Fi[t];let e=Qc.test(t);return e&&console.error(`unsafe attribute name: ${t}`),Fi[t]=!e}var td={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},id=X("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"),sd=X("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"),rd=X("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 nd(t){if(t==null)return!1;let e=typeof t;return e==="string"||e==="number"||e==="boolean"}var od=/["'&<>]/;function ad(t){let e=""+t,i=od.exec(e);if(!i)return e;let s="",r,n,o=0;for(n=i.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:r=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";break;default:continue}o!==n&&(s+=e.slice(o,n)),o=n+1,s+=r}return o!==n?s+e.slice(o,n):s}var ld=/^-?>|<!--|-->|--!>|<!-$/g;function ud(t){return t.replace(ld,"")}var Nn=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function hd(t,e){return t.replace(Nn,i=>e?i==='"'?'\\\\\\"':`\\\\${i}`:`\\${i}`)}function cd(t,e){if(t.length!==e.length)return!1;let i=!0;for(let s=0;i&&s<t.length;s++)i=Vt(t[s],e[s]);return i}function Vt(t,e){if(t===e)return!0;let i=Vi(t),s=Vi(e);if(i||s)return i&&s?t.getTime()===e.getTime():!1;if(i=mt(t),s=mt(e),i||s)return t===e;if(i=Ke(t),s=Ke(e),i||s)return i&&s?cd(t,e):!1;if(i=De(t),s=De(e),i||s){if(!i||!s)return!1;let r=Object.keys(t).length,n=Object.keys(e).length;if(r!==n)return!1;for(let o in t){let a=t.hasOwnProperty(o),l=e.hasOwnProperty(o);if(a&&!l||!a&&l||!Vt(t[o],e[o]))return!1}}return String(t)===String(e)}function dd(t,e){return t.findIndex(i=>Vt(i,e))}var qn=t=>!!(t&&t.__v_isRef===!0),$n=t=>ue(t)?t:t==null?"":Ke(t)||De(t)&&(t.toString===Wi||!pt(t.toString))?qn(t)?$n(t.value):JSON.stringify(t,kn,2):String(t),kn=(t,e)=>qn(e)?kn(t,e.value):On(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((i,[s,r],n)=>(i[ji(s,n)+" =>"]=r,i),{})}:Tn(e)?{[`Set(${e.size})`]:[...e.values()].map(i=>ji(i))}:mt(e)?ji(e):De(e)&&!Ke(e)&&!Cn(e)?String(e):e,ji=(t,e="")=>{var i;return mt(t)?`Symbol(${(i=t.description)!=null?i:e})`:t};p.EMPTY_ARR=tc;p.EMPTY_OBJ=ec;p.NO=sc;p.NOOP=ic;p.PatchFlagNames=Mc;p.PatchFlags=Rc;p.ShapeFlags=Ic;p.SlotFlags=Pc;p.camelize=bc;p.capitalize=Mn;p.cssVarNameEscapeSymbolsRE=Nn;p.def=xc;p.escapeHtml=ad;p.escapeHtmlComment=ud;p.extend=oc;p.genCacheKey=Cc;p.genPropsAccessExp=Tc;p.generateCodeFrame=$c;p.getEscapedCssVarName=hd;p.getGlobalThis=Ec;p.hasChanged=vc;p.hasOwn=uc;p.hyphenate=Rn;p.includeBooleanAttr=Zc;p.invokeArrayFns=wc;p.isArray=Ke;p.isBooleanAttr=Xc;p.isBuiltInDirective=mc;p.isDate=Vi;p.isFunction=pt;p.isGloballyAllowed=In;p.isGloballyWhitelisted=qc;p.isHTMLTag=Kc;p.isIntegerKey=fc;p.isKnownHtmlAttr=id;p.isKnownMathMLAttr=rd;p.isKnownSvgAttr=sd;p.isMap=On;p.isMathMLTag=Gc;p.isModelListener=nc;p.isObject=De;p.isOn=rc;p.isPlainObject=Cn;p.isPromise=cc;p.isRegExp=hc;p.isRenderableAttrValue=nd;p.isReservedProp=pc;p.isSSRSafeAttrName=ed;p.isSVGTag=zc;p.isSet=Tn;p.isSpecialBooleanAttr=Jc;p.isString=ue;p.isSymbol=mt;p.isVoidTag=Bc;p.looseEqual=Vt;p.looseIndexOf=dd;p.looseToNumber=Sc;p.makeMap=X;p.normalizeClass=Yi;p.normalizeProps=jc;p.normalizeStyle=Ui;p.objectToString=Wi;p.parseStringStyle=Pn;p.propsToAttrMap=td;p.remove=ac;p.slotFlagsText=Dc;p.stringifyStyle=Fc;p.toDisplayString=$n;p.toHandlerKey=yc;p.toNumber=Ac;p.toRawType=dc;p.toTypeString=ze});var Qn=f(m=>{"use strict";Object.defineProperty(m,"__esModule",{value:!0});function Z(t){let e=Object.create(null);for(let i of t.split(","))e[i]=1;return i=>i in e}var fd=Object.freeze({}),pd=Object.freeze([]),md=()=>{},gd=()=>!1,bd=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),_d=t=>t.startsWith("onUpdate:"),yd=Object.assign,vd=(t,e)=>{let i=t.indexOf(e);i>-1&&t.splice(i,1)},wd=Object.prototype.hasOwnProperty,xd=(t,e)=>wd.call(t,e),Ge=Array.isArray,jn=t=>Be(t)==="[object Map]",Vn=t=>Be(t)==="[object Set]",Gi=t=>Be(t)==="[object Date]",Sd=t=>Be(t)==="[object RegExp]",gt=t=>typeof t=="function",he=t=>typeof t=="string",bt=t=>typeof t=="symbol",Ne=t=>t!==null&&typeof t=="object",Ad=t=>(Ne(t)||gt(t))&>(t.then)&>(t.catch),Bi=Object.prototype.toString,Be=t=>Bi.call(t),Ed=t=>Be(t).slice(8,-1),Wn=t=>Be(t)==="[object Object]",Od=t=>he(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Td=Z(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Cd=Z("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Wt=t=>{let e=Object.create(null);return i=>e[i]||(e[i]=t(i))},Rd=/-(\w)/g,Md=Wt(t=>t.replace(Rd,(e,i)=>i?i.toUpperCase():"")),Id=/\B([A-Z])/g,Un=Wt(t=>t.replace(Id,"-$1").toLowerCase()),Yn=Wt(t=>t.charAt(0).toUpperCase()+t.slice(1)),Pd=Wt(t=>t?`on${Yn(t)}`:""),Dd=(t,e)=>!Object.is(t,e),Nd=(t,...e)=>{for(let i=0;i<t.length;i++)t[i](...e)},qd=(t,e,i,s=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:s,value:i})},$d=t=>{let e=parseFloat(t);return isNaN(e)?t:e},kd=t=>{let e=he(t)?Number(t):NaN;return isNaN(e)?t:e},Hn,Ld=()=>Hn||(Hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Hd=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;function Fd(t){return Hd.test(t)?`__props.${t}`:`__props[${JSON.stringify(t)}]`}function jd(t,e){return t+JSON.stringify(e,(i,s)=>typeof s=="function"?s.toString():s)}var Vd={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"},Wd={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"},Ud={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"},Yd={STABLE:1,1:"STABLE",DYNAMIC:2,2:"DYNAMIC",FORWARDED:3,3:"FORWARDED"},Kd={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},zd="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",Kn=Z(zd),Gd=Kn,Fn=2;function Bd(t,e=0,i=t.length){if(e=Math.max(0,Math.min(e,t.length)),i=Math.max(0,Math.min(i,t.length)),e>i)return"";let s=t.split(/(\r?\n)/),r=s.filter((a,l)=>l%2===1);s=s.filter((a,l)=>l%2===0);let n=0,o=[];for(let a=0;a<s.length;a++)if(n+=s[a].length+(r[a]&&r[a].length||0),n>=e){for(let l=a-Fn;l<=a+Fn||i>n;l++){if(l<0||l>=s.length)continue;let u=l+1;o.push(`${u}${" ".repeat(Math.max(3-String(u).length,0))}| ${s[l]}`);let c=s[l].length,h=r[l]&&r[l].length||0;if(l===a){let d=e-(n-(c+h)),v=Math.max(1,i>n?c-d:i-e);o.push(" | "+" ".repeat(d)+"^".repeat(v))}else if(l>a){if(i>n){let d=Math.max(Math.min(i-n,c),1);o.push(" | "+"^".repeat(d))}n+=c+h}}break}return o.join(`
|
|
3
|
-
`)}function Ji(t){if(Ge(t)){let e={};for(let i=0;i<t.length;i++){let s=t[i],r=he(s)?zn(s):Ji(s);if(r)for(let n in r)e[n]=r[n]}return e}else if(he(t)||Ne(t))return t}var Jd=/;(?![^(]*\))/g,Xd=/:([^]+)/,Zd=/\/\*[^]*?\*\//g;function zn(t){let e={};return t.replace(Zd,"").split(Jd).forEach(i=>{if(i){let s=i.split(Xd);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function Qd(t){if(!t)return"";if(he(t))return t;let e="";for(let i in t){let s=t[i];if(he(s)||typeof s=="number"){let r=i.startsWith("--")?i:Un(i);e+=`${r}:${s};`}}return e}function Xi(t){let e="";if(he(t))e=t;else if(Ge(t))for(let i=0;i<t.length;i++){let s=Xi(t[i]);s&&(e+=s+" ")}else if(Ne(t))for(let i in t)t[i]&&(e+=i+" ");return e.trim()}function ef(t){if(!t)return null;let{class:e,style:i}=t;return e&&!he(e)&&(t.class=Xi(e)),i&&(t.style=Ji(i)),t}var tf="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",sf="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",rf="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",nf="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",of=Z(tf),af=Z(sf),lf=Z(rf),uf=Z(nf),Gn="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",hf=Z(Gn),cf=Z(Gn+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function df(t){return!!t||t===""}var ff=/[>/="'\u0009\u000a\u000c\u0020]/,Ki={};function pf(t){if(Ki.hasOwnProperty(t))return Ki[t];let e=ff.test(t);return e&&console.error(`unsafe attribute name: ${t}`),Ki[t]=!e}var mf={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},gf=Z("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"),bf=Z("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"),_f=Z("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 yf(t){if(t==null)return!1;let e=typeof t;return e==="string"||e==="number"||e==="boolean"}var vf=/["'&<>]/;function wf(t){let e=""+t,i=vf.exec(e);if(!i)return e;let s="",r,n,o=0;for(n=i.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:r=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";break;default:continue}o!==n&&(s+=e.slice(o,n)),o=n+1,s+=r}return o!==n?s+e.slice(o,n):s}var xf=/^-?>|<!--|-->|--!>|<!-$/g;function Sf(t){return t.replace(xf,"")}var Bn=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function Af(t,e){return t.replace(Bn,i=>e?i==='"'?'\\\\\\"':`\\\\${i}`:`\\${i}`)}function Ef(t,e){if(t.length!==e.length)return!1;let i=!0;for(let s=0;i&&s<t.length;s++)i=Ut(t[s],e[s]);return i}function Ut(t,e){if(t===e)return!0;let i=Gi(t),s=Gi(e);if(i||s)return i&&s?t.getTime()===e.getTime():!1;if(i=bt(t),s=bt(e),i||s)return t===e;if(i=Ge(t),s=Ge(e),i||s)return i&&s?Ef(t,e):!1;if(i=Ne(t),s=Ne(e),i||s){if(!i||!s)return!1;let r=Object.keys(t).length,n=Object.keys(e).length;if(r!==n)return!1;for(let o in t){let a=t.hasOwnProperty(o),l=e.hasOwnProperty(o);if(a&&!l||!a&&l||!Ut(t[o],e[o]))return!1}}return String(t)===String(e)}function Of(t,e){return t.findIndex(i=>Ut(i,e))}var Jn=t=>!!(t&&t.__v_isRef===!0),Xn=t=>he(t)?t:t==null?"":Ge(t)||Ne(t)&&(t.toString===Bi||!gt(t.toString))?Jn(t)?Xn(t.value):JSON.stringify(t,Zn,2):String(t),Zn=(t,e)=>Jn(e)?Zn(t,e.value):jn(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((i,[s,r],n)=>(i[zi(s,n)+" =>"]=r,i),{})}:Vn(e)?{[`Set(${e.size})`]:[...e.values()].map(i=>zi(i))}:bt(e)?zi(e):Ne(e)&&!Ge(e)&&!Wn(e)?String(e):e,zi=(t,e="")=>{var i;return bt(t)?`Symbol(${(i=t.description)!=null?i:e})`:t};m.EMPTY_ARR=pd;m.EMPTY_OBJ=fd;m.NO=gd;m.NOOP=md;m.PatchFlagNames=Wd;m.PatchFlags=Vd;m.ShapeFlags=Ud;m.SlotFlags=Yd;m.camelize=Md;m.capitalize=Yn;m.cssVarNameEscapeSymbolsRE=Bn;m.def=qd;m.escapeHtml=wf;m.escapeHtmlComment=Sf;m.extend=yd;m.genCacheKey=jd;m.genPropsAccessExp=Fd;m.generateCodeFrame=Bd;m.getEscapedCssVarName=Af;m.getGlobalThis=Ld;m.hasChanged=Dd;m.hasOwn=xd;m.hyphenate=Un;m.includeBooleanAttr=df;m.invokeArrayFns=Nd;m.isArray=Ge;m.isBooleanAttr=cf;m.isBuiltInDirective=Cd;m.isDate=Gi;m.isFunction=gt;m.isGloballyAllowed=Kn;m.isGloballyWhitelisted=Gd;m.isHTMLTag=of;m.isIntegerKey=Od;m.isKnownHtmlAttr=gf;m.isKnownMathMLAttr=_f;m.isKnownSvgAttr=bf;m.isMap=jn;m.isMathMLTag=lf;m.isModelListener=_d;m.isObject=Ne;m.isOn=bd;m.isPlainObject=Wn;m.isPromise=Ad;m.isRegExp=Sd;m.isRenderableAttrValue=yf;m.isReservedProp=Td;m.isSSRSafeAttrName=pf;m.isSVGTag=af;m.isSet=Vn;m.isSpecialBooleanAttr=hf;m.isString=he;m.isSymbol=bt;m.isVoidTag=uf;m.looseEqual=Ut;m.looseIndexOf=Of;m.looseToNumber=$d;m.makeMap=Z;m.normalizeClass=Xi;m.normalizeProps=ef;m.normalizeStyle=Ji;m.objectToString=Bi;m.parseStringStyle=zn;m.propsToAttrMap=mf;m.remove=vd;m.slotFlagsText=Kd;m.stringifyStyle=Qd;m.toDisplayString=Xn;m.toHandlerKey=Pd;m.toNumber=kd;m.toRawType=Ed;m.toTypeString=Be});var Qi=f((Y_,Zi)=>{"use strict";process.env.NODE_ENV==="production"?Zi.exports=Ln():Zi.exports=Qn()});var vo=f(_=>{"use strict";Object.defineProperty(_,"__esModule",{value:!0});var b=Qi(),V,Gt=class{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=V,!e&&V&&(this.index=(V.scopes||(V.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,i;if(this.scopes)for(e=0,i=this.scopes.length;e<i;e++)this.scopes[e].pause();for(e=0,i=this.effects.length;e<i;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,i;if(this.scopes)for(e=0,i=this.scopes.length;e<i;e++)this.scopes[e].resume();for(e=0,i=this.effects.length;e<i;e++)this.effects[e].resume()}}run(e){if(this._active){let i=V;try{return V=this,e()}finally{V=i}}}on(){V=this}off(){V=this.parent}stop(e){if(this._active){this._active=!1;let i,s;for(i=0,s=this.effects.length;i<s;i++)this.effects[i].stop();for(this.effects.length=0,i=0,s=this.cleanups.length;i<s;i++)this.cleanups[i]();if(this.cleanups.length=0,this.scopes){for(i=0,s=this.scopes.length;i<s;i++)this.scopes[i].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}};function Tf(t){return new Gt(t)}function io(){return V}function Cf(t,e=!1){V&&V.cleanups.push(t)}var C,Rf={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"},es=new WeakSet,Xe=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,V&&V.active&&V.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,es.has(this)&&(es.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ro(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,eo(this),no(this);let e=C,i=Q;C=this,Q=!0;try{return this.fn()}finally{oo(this),C=e,Q=i,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)fs(e);this.deps=this.depsTail=void 0,eo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?es.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ss(this)&&this.run()}get dirty(){return ss(this)}},so=0,yt,vt;function ro(t,e=!1){if(t.flags|=8,e){t.next=vt,vt=t;return}t.next=yt,yt=t}function cs(){so++}function ds(){if(--so>0)return;if(vt){let e=vt;for(vt=void 0;e;){let i=e.next;e.next=void 0,e.flags&=-9,e=i}}let t;for(;yt;){let e=yt;for(yt=void 0;e;){let i=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(s){t||(t=s)}e=i}}if(t)throw t}function no(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function oo(t){let e,i=t.depsTail,s=i;for(;s;){let r=s.prevDep;s.version===-1?(s===i&&(i=r),fs(s),Mf(s)):e=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}t.deps=e,t.depsTail=i}function ss(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(ao(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function ao(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===wt))return;t.globalVersion=wt;let e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!ss(t)){t.flags&=-3;return}let i=C,s=Q;C=t,Q=!0;try{no(t);let r=t.fn(t._value);(e.version===0||b.hasChanged(r,t._value))&&(t._value=r,e.version++)}catch(r){throw e.version++,r}finally{C=i,Q=s,oo(t),t.flags&=-3}}function fs(t,e=!1){let{dep:i,prevSub:s,nextSub:r}=t;if(s&&(s.nextSub=r,t.prevSub=void 0),r&&(r.prevSub=s,t.nextSub=void 0),i.subs===t&&(i.subs=s,!s&&i.computed)){i.computed.flags&=-5;for(let n=i.computed.deps;n;n=n.nextDep)fs(n,!0)}!e&&!--i.sc&&i.map&&i.map.delete(i.key)}function Mf(t){let{prevDep:e,nextDep:i}=t;e&&(e.nextDep=i,t.prevDep=void 0),i&&(i.prevDep=e,t.nextDep=void 0)}function If(t,e){t.effect instanceof Xe&&(t=t.effect.fn);let i=new Xe(t);e&&b.extend(i,e);try{i.run()}catch(r){throw i.stop(),r}let s=i.run.bind(i);return s.effect=i,s}function Pf(t){t.effect.stop()}var Q=!0,ps=[];function ms(){ps.push(Q),Q=!1}function Df(){ps.push(Q),Q=!0}function gs(){let t=ps.pop();Q=t===void 0?!0:t}function Nf(t,e=!1){C instanceof Xe&&(C.cleanup=t)}function eo(t){let{cleanup:e}=t;if(t.cleanup=void 0,e){let i=C;C=void 0;try{e()}finally{C=i}}}var wt=0,rs=class{constructor(e,i){this.sub=e,this.dep=i,this.version=i.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},st=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(!C||!Q||C===this.computed)return;let i=this.activeLink;if(i===void 0||i.sub!==C)i=this.activeLink=new rs(C,this),C.deps?(i.prevDep=C.depsTail,C.depsTail.nextDep=i,C.depsTail=i):C.deps=C.depsTail=i,lo(i);else if(i.version===-1&&(i.version=this.version,i.nextDep)){let s=i.nextDep;s.prevDep=i.prevDep,i.prevDep&&(i.prevDep.nextDep=s),i.prevDep=C.depsTail,i.nextDep=void 0,C.depsTail.nextDep=i,C.depsTail=i,C.deps===i&&(C.deps=s)}return i}trigger(e){this.version++,wt++,this.notify(e)}notify(e){cs();try{for(let i=this.subs;i;i=i.prevSub)i.sub.notify()&&i.sub.dep.notify()}finally{ds()}}};function lo(t){if(t.dep.sc++,t.sub.flags&4){let e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let s=e.deps;s;s=s.nextDep)lo(s)}let i=t.dep.subs;i!==t&&(t.prevSub=i,i&&(i.nextSub=t)),t.dep.subs=t}}var Bt=new WeakMap,$e=Symbol(""),Jt=Symbol(""),rt=Symbol("");function W(t,e,i){if(Q&&C){let s=Bt.get(t);s||Bt.set(t,s=new Map);let r=s.get(i);r||(s.set(i,r=new st),r.map=s,r.key=i),r.track()}}function ye(t,e,i,s,r,n){let o=Bt.get(t);if(!o){wt++;return}let a=l=>{l&&l.trigger()};if(cs(),e==="clear")o.forEach(a);else{let l=b.isArray(t),u=l&&b.isIntegerKey(i);if(l&&i==="length"){let c=Number(s);o.forEach((h,d)=>{(d==="length"||d===rt||!b.isSymbol(d)&&d>=c)&&a(h)})}else switch((i!==void 0||o.has(void 0))&&a(o.get(i)),u&&a(o.get(rt)),e){case"add":l?u&&a(o.get("length")):(a(o.get($e)),b.isMap(t)&&a(o.get(Jt)));break;case"delete":l||(a(o.get($e)),b.isMap(t)&&a(o.get(Jt)));break;case"set":b.isMap(t)&&a(o.get($e));break}}ds()}function qf(t,e){let i=Bt.get(t);return i&&i.get(e)}function Je(t){let e=O(t);return e===t?e:(W(e,"iterate",rt),ie(t)?e:e.map(F))}function ii(t){return W(t=O(t),"iterate",rt),t}var $f={__proto__:null,[Symbol.iterator](){return ts(this,Symbol.iterator,F)},concat(...t){return Je(this).concat(...t.map(e=>b.isArray(e)?Je(e):e))},entries(){return ts(this,"entries",t=>(t[1]=F(t[1]),t))},every(t,e){return _e(this,"every",t,e,void 0,arguments)},filter(t,e){return _e(this,"filter",t,e,i=>i.map(F),arguments)},find(t,e){return _e(this,"find",t,e,F,arguments)},findIndex(t,e){return _e(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return _e(this,"findLast",t,e,F,arguments)},findLastIndex(t,e){return _e(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return _e(this,"forEach",t,e,void 0,arguments)},includes(...t){return is(this,"includes",t)},indexOf(...t){return is(this,"indexOf",t)},join(t){return Je(this).join(t)},lastIndexOf(...t){return is(this,"lastIndexOf",t)},map(t,e){return _e(this,"map",t,e,void 0,arguments)},pop(){return _t(this,"pop")},push(...t){return _t(this,"push",t)},reduce(t,...e){return to(this,"reduce",t,e)},reduceRight(t,...e){return to(this,"reduceRight",t,e)},shift(){return _t(this,"shift")},some(t,e){return _e(this,"some",t,e,void 0,arguments)},splice(...t){return _t(this,"splice",t)},toReversed(){return Je(this).toReversed()},toSorted(t){return Je(this).toSorted(t)},toSpliced(...t){return Je(this).toSpliced(...t)},unshift(...t){return _t(this,"unshift",t)},values(){return ts(this,"values",F)}};function ts(t,e,i){let s=ii(t),r=s[e]();return s!==t&&!ie(t)&&(r._next=r.next,r.next=()=>{let n=r._next();return n.value&&(n.value=i(n.value)),n}),r}var kf=Array.prototype;function _e(t,e,i,s,r,n){let o=ii(t),a=o!==t&&!ie(t),l=o[e];if(l!==kf[e]){let h=l.apply(t,n);return a?F(h):h}let u=i;o!==t&&(a?u=function(h,d){return i.call(this,F(h),d,t)}:i.length>2&&(u=function(h,d){return i.call(this,h,d,t)}));let c=l.call(o,u,s);return a&&r?r(c):c}function to(t,e,i,s){let r=ii(t),n=i;return r!==t&&(ie(t)?i.length>3&&(n=function(o,a,l){return i.call(this,o,a,l,t)}):n=function(o,a,l){return i.call(this,o,F(a),l,t)}),r[e](n,...s)}function is(t,e,i){let s=O(t);W(s,"iterate",rt);let r=s[e](...i);return(r===-1||r===!1)&&mo(i[0])?(i[0]=O(i[0]),s[e](...i)):r}function _t(t,e,i=[]){ms(),cs();let s=O(t)[e].apply(t,i);return ds(),gs(),s}var Lf=b.makeMap("__proto__,__v_isRef,__isVue"),uo=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(b.isSymbol));function Hf(t){b.isSymbol(t)||(t=String(t));let e=O(this);return W(e,"has",t),e.hasOwnProperty(t)}var Xt=class{constructor(e=!1,i=!1){this._isReadonly=e,this._isShallow=i}get(e,i,s){if(i==="__v_skip")return e.__v_skip;let r=this._isReadonly,n=this._isShallow;if(i==="__v_isReactive")return!r;if(i==="__v_isReadonly")return r;if(i==="__v_isShallow")return n;if(i==="__v_raw")return s===(r?n?po:fo:n?co:ho).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(s)?e:void 0;let o=b.isArray(e);if(!r){let l;if(o&&(l=$f[i]))return l;if(i==="hasOwnProperty")return Hf}let a=Reflect.get(e,i,U(e)?e:s);return(b.isSymbol(i)?uo.has(i):Lf(i))||(r||W(e,"get",i),n)?a:U(a)?o&&b.isIntegerKey(i)?a:a.value:b.isObject(a)?r?_s(a):bs(a):a}},Zt=class extends Xt{constructor(e=!1){super(!1,e)}set(e,i,s,r){let n=e[i];if(!this._isShallow){let l=ke(n);if(!ie(s)&&!ke(s)&&(n=O(n),s=O(s)),!b.isArray(e)&&U(n)&&!U(s))return l?!1:(n.value=s,!0)}let o=b.isArray(e)&&b.isIntegerKey(i)?Number(i)<e.length:b.hasOwn(e,i),a=Reflect.set(e,i,s,U(e)?e:r);return e===O(r)&&(o?b.hasChanged(s,n)&&ye(e,"set",i,s):ye(e,"add",i,s)),a}deleteProperty(e,i){let s=b.hasOwn(e,i);e[i];let r=Reflect.deleteProperty(e,i);return r&&s&&ye(e,"delete",i,void 0),r}has(e,i){let s=Reflect.has(e,i);return(!b.isSymbol(i)||!uo.has(i))&&W(e,"has",i),s}ownKeys(e){return W(e,"iterate",b.isArray(e)?"length":$e),Reflect.ownKeys(e)}},Qt=class extends Xt{constructor(e=!1){super(!0,e)}set(e,i){return!0}deleteProperty(e,i){return!0}},Ff=new Zt,jf=new Qt,Vf=new Zt(!0),Wf=new Qt(!0),ns=t=>t,Yt=t=>Reflect.getPrototypeOf(t);function Uf(t,e,i){return function(...s){let r=this.__v_raw,n=O(r),o=b.isMap(n),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,u=r[t](...s),c=i?ns:e?ei:F;return!e&&W(n,"iterate",l?Jt:$e),{next(){let{value:h,done:d}=u.next();return d?{value:h,done:d}:{value:a?[c(h[0]),c(h[1])]:c(h),done:d}},[Symbol.iterator](){return this}}}}function Kt(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Yf(t,e){let i={get(r){let n=this.__v_raw,o=O(n),a=O(r);t||(b.hasChanged(r,a)&&W(o,"get",r),W(o,"get",a));let{has:l}=Yt(o),u=e?ns:t?ei:F;if(l.call(o,r))return u(n.get(r));if(l.call(o,a))return u(n.get(a));n!==o&&n.get(r)},get size(){let r=this.__v_raw;return!t&&W(O(r),"iterate",$e),Reflect.get(r,"size",r)},has(r){let n=this.__v_raw,o=O(n),a=O(r);return t||(b.hasChanged(r,a)&&W(o,"has",r),W(o,"has",a)),r===a?n.has(r):n.has(r)||n.has(a)},forEach(r,n){let o=this,a=o.__v_raw,l=O(a),u=e?ns:t?ei:F;return!t&&W(l,"iterate",$e),a.forEach((c,h)=>r.call(n,u(c),u(h),o))}};return b.extend(i,t?{add:Kt("add"),set:Kt("set"),delete:Kt("delete"),clear:Kt("clear")}:{add(r){!e&&!ie(r)&&!ke(r)&&(r=O(r));let n=O(this);return Yt(n).has.call(n,r)||(n.add(r),ye(n,"add",r,r)),this},set(r,n){!e&&!ie(n)&&!ke(n)&&(n=O(n));let o=O(this),{has:a,get:l}=Yt(o),u=a.call(o,r);u||(r=O(r),u=a.call(o,r));let c=l.call(o,r);return o.set(r,n),u?b.hasChanged(n,c)&&ye(o,"set",r,n):ye(o,"add",r,n),this},delete(r){let n=O(this),{has:o,get:a}=Yt(n),l=o.call(n,r);l||(r=O(r),l=o.call(n,r)),a&&a.call(n,r);let u=n.delete(r);return l&&ye(n,"delete",r,void 0),u},clear(){let r=O(this),n=r.size!==0,o=r.clear();return n&&ye(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{i[r]=Uf(r,t,e)}),i}function si(t,e){let i=Yf(t,e);return(s,r,n)=>r==="__v_isReactive"?!t:r==="__v_isReadonly"?t:r==="__v_raw"?s:Reflect.get(b.hasOwn(i,r)&&r in s?i:s,r,n)}var Kf={get:si(!1,!1)},zf={get:si(!1,!0)},Gf={get:si(!0,!1)},Bf={get:si(!0,!0)},ho=new WeakMap,co=new WeakMap,fo=new WeakMap,po=new WeakMap;function Jf(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Xf(t){return t.__v_skip||!Object.isExtensible(t)?0:Jf(b.toRawType(t))}function bs(t){return ke(t)?t:ri(t,!1,Ff,Kf,ho)}function Zf(t){return ri(t,!1,Vf,zf,co)}function _s(t){return ri(t,!0,jf,Gf,fo)}function Qf(t){return ri(t,!0,Wf,Bf,po)}function ri(t,e,i,s,r){if(!b.isObject(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;let n=r.get(t);if(n)return n;let o=Xf(t);if(o===0)return t;let a=new Proxy(t,o===2?s:i);return r.set(t,a),a}function it(t){return ke(t)?it(t.__v_raw):!!(t&&t.__v_isReactive)}function ke(t){return!!(t&&t.__v_isReadonly)}function ie(t){return!!(t&&t.__v_isShallow)}function mo(t){return t?!!t.__v_raw:!1}function O(t){let e=t&&t.__v_raw;return e?O(e):t}function ep(t){return!b.hasOwn(t,"__v_skip")&&Object.isExtensible(t)&&b.def(t,"__v_skip",!0),t}var F=t=>b.isObject(t)?bs(t):t,ei=t=>b.isObject(t)?_s(t):t;function U(t){return t?t.__v_isRef===!0:!1}function go(t){return bo(t,!1)}function tp(t){return bo(t,!0)}function bo(t,e){return U(t)?t:new os(t,e)}var os=class{constructor(e,i){this.dep=new st,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=i?e:O(e),this._value=i?e:F(e),this.__v_isShallow=i}get value(){return this.dep.track(),this._value}set value(e){let i=this._rawValue,s=this.__v_isShallow||ie(e)||ke(e);e=s?e:O(e),b.hasChanged(e,i)&&(this._rawValue=e,this._value=s?e:F(e),this.dep.trigger())}};function ip(t){t.dep&&t.dep.trigger()}function ys(t){return U(t)?t.value:t}function sp(t){return b.isFunction(t)?t():ys(t)}var rp={get:(t,e,i)=>e==="__v_raw"?t:ys(Reflect.get(t,e,i)),set:(t,e,i,s)=>{let r=t[e];return U(r)&&!U(i)?(r.value=i,!0):Reflect.set(t,e,i,s)}};function np(t){return it(t)?t:new Proxy(t,rp)}var as=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let i=this.dep=new st,{get:s,set:r}=e(i.track.bind(i),i.trigger.bind(i));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}};function op(t){return new as(t)}function ap(t){let e=b.isArray(t)?new Array(t.length):{};for(let i in t)e[i]=_o(t,i);return e}var ls=class{constructor(e,i,s){this._object=e,this._key=i,this._defaultValue=s,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 qf(O(this._object),this._key)}},us=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 lp(t,e,i){return U(t)?t:b.isFunction(t)?new us(t):b.isObject(t)&&arguments.length>1?_o(t,e,i):go(t)}function _o(t,e,i){let s=t[e];return U(s)?s:new ls(t,e,i)}var hs=class{constructor(e,i,s){this.fn=e,this.setter=i,this._value=void 0,this.dep=new st(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=wt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!i,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&C!==this)return ro(this,!0),!0}get value(){let e=this.dep.track();return ao(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function up(t,e,i=!1){let s,r;return b.isFunction(t)?s=t:(s=t.get,r=t.set),new hs(s,r,i)}var hp={GET:"get",HAS:"has",ITERATE:"iterate"},cp={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},dp={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},fp={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},zt={},ti=new WeakMap,qe;function pp(){return qe}function yo(t,e=!1,i=qe){if(i){let s=ti.get(i);s||ti.set(i,s=[]),s.push(t)}}function mp(t,e,i=b.EMPTY_OBJ){let{immediate:s,deep:r,once:n,scheduler:o,augmentJob:a,call:l}=i,u=S=>r?S:ie(S)||r===!1||r===0?ve(S,1):ve(S),c,h,d,v,x=!1,N=!1;if(U(t)?(h=()=>t.value,x=ie(t)):it(t)?(h=()=>u(t),x=!0):b.isArray(t)?(N=!0,x=t.some(S=>it(S)||ie(S)),h=()=>t.map(S=>{if(U(S))return S.value;if(it(S))return u(S);if(b.isFunction(S))return l?l(S,2):S()})):b.isFunction(t)?e?h=l?()=>l(t,2):t:h=()=>{if(d){ms();try{d()}finally{gs()}}let S=qe;qe=c;try{return l?l(t,3,[v]):t(v)}finally{qe=S}}:h=b.NOOP,e&&r){let S=h,w=r===!0?1/0:r;h=()=>ve(S(),w)}let q=io(),k=()=>{c.stop(),q&&q.active&&b.remove(q.effects,c)};if(n&&e){let S=e;e=(...w)=>{S(...w),k()}}let L=N?new Array(t.length).fill(zt):zt,H=S=>{if(!(!(c.flags&1)||!c.dirty&&!S))if(e){let w=c.run();if(r||x||(N?w.some((G,Pe)=>b.hasChanged(G,L[Pe])):b.hasChanged(w,L))){d&&d();let G=qe;qe=c;try{let Pe=[w,L===zt?void 0:N&&L[0]===zt?[]:L,v];l?l(e,3,Pe):e(...Pe),L=w}finally{qe=G}}}else c.run()};return a&&a(H),c=new Xe(h),c.scheduler=o?()=>o(H,!1):H,v=S=>yo(S,!1,c),d=c.onStop=()=>{let S=ti.get(c);if(S){if(l)l(S,4);else for(let w of S)w();ti.delete(c)}},e?s?H(!0):L=c.run():o?o(H.bind(null,!0),!0):c.run(),k.pause=c.pause.bind(c),k.resume=c.resume.bind(c),k.stop=k,k}function ve(t,e=1/0,i){if(e<=0||!b.isObject(t)||t.__v_skip||(i=i||new Set,i.has(t)))return t;if(i.add(t),e--,U(t))ve(t.value,e,i);else if(b.isArray(t))for(let s=0;s<t.length;s++)ve(t[s],e,i);else if(b.isSet(t)||b.isMap(t))t.forEach(s=>{ve(s,e,i)});else if(b.isPlainObject(t)){for(let s in t)ve(t[s],e,i);for(let s of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,s)&&ve(t[s],e,i)}return t}_.ARRAY_ITERATE_KEY=rt;_.EffectFlags=Rf;_.EffectScope=Gt;_.ITERATE_KEY=$e;_.MAP_KEY_ITERATE_KEY=Jt;_.ReactiveEffect=Xe;_.ReactiveFlags=dp;_.TrackOpTypes=hp;_.TriggerOpTypes=cp;_.WatchErrorCodes=fp;_.computed=up;_.customRef=op;_.effect=If;_.effectScope=Tf;_.enableTracking=Df;_.getCurrentScope=io;_.getCurrentWatcher=pp;_.isProxy=mo;_.isReactive=it;_.isReadonly=ke;_.isRef=U;_.isShallow=ie;_.markRaw=ep;_.onEffectCleanup=Nf;_.onScopeDispose=Cf;_.onWatcherCleanup=yo;_.pauseTracking=ms;_.proxyRefs=np;_.reactive=bs;_.reactiveReadArray=Je;_.readonly=_s;_.ref=go;_.resetTracking=gs;_.shallowReactive=Zf;_.shallowReadArray=ii;_.shallowReadonly=Qf;_.shallowRef=tp;_.stop=Pf;_.toRaw=O;_.toReactive=F;_.toReadonly=ei;_.toRef=lp;_.toRefs=ap;_.toValue=sp;_.track=W;_.traverse=ve;_.trigger=ye;_.triggerRef=ip;_.unref=ys;_.watch=mp});var Fo=f(y=>{"use strict";Object.defineProperty(y,"__esModule",{value:!0});var g=Qi();function te(t,...e){console.warn(`[Vue warn] ${t}`,...e)}var Y,li=class{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Y,!e&&Y&&(this.index=(Y.scopes||(Y.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,i;if(this.scopes)for(e=0,i=this.scopes.length;e<i;e++)this.scopes[e].pause();for(e=0,i=this.effects.length;e<i;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,i;if(this.scopes)for(e=0,i=this.scopes.length;e<i;e++)this.scopes[e].resume();for(e=0,i=this.effects.length;e<i;e++)this.effects[e].resume()}}run(e){if(this._active){let i=Y;try{return Y=this,e()}finally{Y=i}}else te("cannot run an inactive effect scope.")}on(){Y=this}off(){Y=this.parent}stop(e){if(this._active){this._active=!1;let i,s;for(i=0,s=this.effects.length;i<s;i++)this.effects[i].stop();for(this.effects.length=0,i=0,s=this.cleanups.length;i<s;i++)this.cleanups[i]();if(this.cleanups.length=0,this.scopes){for(i=0,s=this.scopes.length;i<s;i++)this.scopes[i].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}};function gp(t){return new li(t)}function Ao(){return Y}function bp(t,e=!1){Y?Y.cleanups.push(t):e||te("onScopeDispose() is called when there is no active effect scope to be associated with.")}var A,_p={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"},vs=new WeakSet,Qe=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,Y&&Y.active&&Y.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,vs.has(this)&&(vs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Oo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,wo(this),To(this);let e=A,i=ee;A=this,ee=!0;try{return this.fn()}finally{A!==this&&te("Active effect was not restored correctly - this is likely a Vue internal bug."),Co(this),A=e,ee=i,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ds(e);this.deps=this.depsTail=void 0,wo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?vs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ss(this)&&this.run()}get dirty(){return Ss(this)}},Eo=0,St,At;function Oo(t,e=!1){if(t.flags|=8,e){t.next=At,At=t;return}t.next=St,St=t}function Is(){Eo++}function Ps(){if(--Eo>0)return;if(At){let e=At;for(At=void 0;e;){let i=e.next;e.next=void 0,e.flags&=-9,e=i}}let t;for(;St;){let e=St;for(St=void 0;e;){let i=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(s){t||(t=s)}e=i}}if(t)throw t}function To(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Co(t){let e,i=t.depsTail,s=i;for(;s;){let r=s.prevDep;s.version===-1?(s===i&&(i=r),Ds(s),yp(s)):e=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}t.deps=e,t.depsTail=i}function Ss(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Ro(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Ro(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Et))return;t.globalVersion=Et;let e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Ss(t)){t.flags&=-3;return}let i=A,s=ee;A=t,ee=!0;try{To(t);let r=t.fn(t._value);(e.version===0||g.hasChanged(r,t._value))&&(t._value=r,e.version++)}catch(r){throw e.version++,r}finally{A=i,ee=s,Co(t),t.flags&=-3}}function Ds(t,e=!1){let{dep:i,prevSub:s,nextSub:r}=t;if(s&&(s.nextSub=r,t.prevSub=void 0),r&&(r.prevSub=s,t.nextSub=void 0),i.subsHead===t&&(i.subsHead=r),i.subs===t&&(i.subs=s,!s&&i.computed)){i.computed.flags&=-5;for(let n=i.computed.deps;n;n=n.nextDep)Ds(n,!0)}!e&&!--i.sc&&i.map&&i.map.delete(i.key)}function yp(t){let{prevDep:e,nextDep:i}=t;e&&(e.nextDep=i,t.prevDep=void 0),i&&(i.prevDep=e,t.nextDep=void 0)}function vp(t,e){t.effect instanceof Qe&&(t=t.effect.fn);let i=new Qe(t);e&&g.extend(i,e);try{i.run()}catch(r){throw i.stop(),r}let s=i.run.bind(i);return s.effect=i,s}function wp(t){t.effect.stop()}var ee=!0,Ns=[];function qs(){Ns.push(ee),ee=!1}function xp(){Ns.push(ee),ee=!0}function $s(){let t=Ns.pop();ee=t===void 0?!0:t}function Sp(t,e=!1){A instanceof Qe?A.cleanup=t:e||te("onEffectCleanup() was called when there was no active effect to associate with.")}function wo(t){let{cleanup:e}=t;if(t.cleanup=void 0,e){let i=A;A=void 0;try{e()}finally{A=i}}}var Et=0,As=class{constructor(e,i){this.sub=e,this.dep=i,this.version=i.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},ot=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(!A||!ee||A===this.computed)return;let i=this.activeLink;if(i===void 0||i.sub!==A)i=this.activeLink=new As(A,this),A.deps?(i.prevDep=A.depsTail,A.depsTail.nextDep=i,A.depsTail=i):A.deps=A.depsTail=i,Mo(i);else if(i.version===-1&&(i.version=this.version,i.nextDep)){let s=i.nextDep;s.prevDep=i.prevDep,i.prevDep&&(i.prevDep.nextDep=s),i.prevDep=A.depsTail,i.nextDep=void 0,A.depsTail.nextDep=i,A.depsTail=i,A.deps===i&&(A.deps=s)}return A.onTrack&&A.onTrack(g.extend({effect:A},e)),i}trigger(e){this.version++,Et++,this.notify(e)}notify(e){Is();try{for(let i=this.subsHead;i;i=i.nextSub)i.sub.onTrigger&&!(i.sub.flags&8)&&i.sub.onTrigger(g.extend({effect:i.sub},e));for(let i=this.subs;i;i=i.prevSub)i.sub.notify()&&i.sub.dep.notify()}finally{Ps()}}};function Mo(t){if(t.dep.sc++,t.sub.flags&4){let e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let s=e.deps;s;s=s.nextDep)Mo(s)}let i=t.dep.subs;i!==t&&(t.prevSub=i,i&&(i.nextSub=t)),t.dep.subsHead===void 0&&(t.dep.subsHead=t),t.dep.subs=t}}var ui=new WeakMap,He=Symbol("Object iterate"),hi=Symbol("Map keys iterate"),at=Symbol("Array iterate");function K(t,e,i){if(ee&&A){let s=ui.get(t);s||ui.set(t,s=new Map);let r=s.get(i);r||(s.set(i,r=new ot),r.map=s,r.key=i),r.track({target:t,type:e,key:i})}}function xe(t,e,i,s,r,n){let o=ui.get(t);if(!o){Et++;return}let a=l=>{l&&l.trigger({target:t,type:e,key:i,newValue:s,oldValue:r,oldTarget:n})};if(Is(),e==="clear")o.forEach(a);else{let l=g.isArray(t),u=l&&g.isIntegerKey(i);if(l&&i==="length"){let c=Number(s);o.forEach((h,d)=>{(d==="length"||d===at||!g.isSymbol(d)&&d>=c)&&a(h)})}else switch((i!==void 0||o.has(void 0))&&a(o.get(i)),u&&a(o.get(at)),e){case"add":l?u&&a(o.get("length")):(a(o.get(He)),g.isMap(t)&&a(o.get(hi)));break;case"delete":l||(a(o.get(He)),g.isMap(t)&&a(o.get(hi)));break;case"set":g.isMap(t)&&a(o.get(He));break}}Ps()}function Ap(t,e){let i=ui.get(t);return i&&i.get(e)}function Ze(t){let e=E(t);return e===t?e:(K(e,"iterate",at),se(t)?e:e.map(j))}function gi(t){return K(t=E(t),"iterate",at),t}var Ep={__proto__:null,[Symbol.iterator](){return ws(this,Symbol.iterator,j)},concat(...t){return Ze(this).concat(...t.map(e=>g.isArray(e)?Ze(e):e))},entries(){return ws(this,"entries",t=>(t[1]=j(t[1]),t))},every(t,e){return we(this,"every",t,e,void 0,arguments)},filter(t,e){return we(this,"filter",t,e,i=>i.map(j),arguments)},find(t,e){return we(this,"find",t,e,j,arguments)},findIndex(t,e){return we(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return we(this,"findLast",t,e,j,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 xs(this,"includes",t)},indexOf(...t){return xs(this,"indexOf",t)},join(t){return Ze(this).join(t)},lastIndexOf(...t){return xs(this,"lastIndexOf",t)},map(t,e){return we(this,"map",t,e,void 0,arguments)},pop(){return xt(this,"pop")},push(...t){return xt(this,"push",t)},reduce(t,...e){return xo(this,"reduce",t,e)},reduceRight(t,...e){return xo(this,"reduceRight",t,e)},shift(){return xt(this,"shift")},some(t,e){return we(this,"some",t,e,void 0,arguments)},splice(...t){return xt(this,"splice",t)},toReversed(){return Ze(this).toReversed()},toSorted(t){return Ze(this).toSorted(t)},toSpliced(...t){return Ze(this).toSpliced(...t)},unshift(...t){return xt(this,"unshift",t)},values(){return ws(this,"values",j)}};function ws(t,e,i){let s=gi(t),r=s[e]();return s!==t&&!se(t)&&(r._next=r.next,r.next=()=>{let n=r._next();return n.value&&(n.value=i(n.value)),n}),r}var Op=Array.prototype;function we(t,e,i,s,r,n){let o=gi(t),a=o!==t&&!se(t),l=o[e];if(l!==Op[e]){let h=l.apply(t,n);return a?j(h):h}let u=i;o!==t&&(a?u=function(h,d){return i.call(this,j(h),d,t)}:i.length>2&&(u=function(h,d){return i.call(this,h,d,t)}));let c=l.call(o,u,s);return a&&r?r(c):c}function xo(t,e,i,s){let r=gi(t),n=i;return r!==t&&(se(t)?i.length>3&&(n=function(o,a,l){return i.call(this,o,a,l,t)}):n=function(o,a,l){return i.call(this,o,j(a),l,t)}),r[e](n,...s)}function xs(t,e,i){let s=E(t);K(s,"iterate",at);let r=s[e](...i);return(r===-1||r===!1)&&Hs(i[0])?(i[0]=E(i[0]),s[e](...i)):r}function xt(t,e,i=[]){qs(),Is();let s=E(t)[e].apply(t,i);return Ps(),$s(),s}var Tp=g.makeMap("__proto__,__v_isRef,__isVue"),Io=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(g.isSymbol));function Cp(t){g.isSymbol(t)||(t=String(t));let e=E(this);return K(e,"has",t),e.hasOwnProperty(t)}var ci=class{constructor(e=!1,i=!1){this._isReadonly=e,this._isShallow=i}get(e,i,s){if(i==="__v_skip")return e.__v_skip;let r=this._isReadonly,n=this._isShallow;if(i==="__v_isReactive")return!r;if(i==="__v_isReadonly")return r;if(i==="__v_isShallow")return n;if(i==="__v_raw")return s===(r?n?qo:No:n?Do:Po).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(s)?e:void 0;let o=g.isArray(e);if(!r){let l;if(o&&(l=Ep[i]))return l;if(i==="hasOwnProperty")return Cp}let a=Reflect.get(e,i,z(e)?e:s);return(g.isSymbol(i)?Io.has(i):Tp(i))||(r||K(e,"get",i),n)?a:z(a)?o&&g.isIntegerKey(i)?a:a.value:g.isObject(a)?r?Ls(a):ks(a):a}},di=class extends ci{constructor(e=!1){super(!1,e)}set(e,i,s,r){let n=e[i];if(!this._isShallow){let l=Fe(n);if(!se(s)&&!Fe(s)&&(n=E(n),s=E(s)),!g.isArray(e)&&z(n)&&!z(s))return l?!1:(n.value=s,!0)}let o=g.isArray(e)&&g.isIntegerKey(i)?Number(i)<e.length:g.hasOwn(e,i),a=Reflect.set(e,i,s,z(e)?e:r);return e===E(r)&&(o?g.hasChanged(s,n)&&xe(e,"set",i,s,n):xe(e,"add",i,s)),a}deleteProperty(e,i){let s=g.hasOwn(e,i),r=e[i],n=Reflect.deleteProperty(e,i);return n&&s&&xe(e,"delete",i,void 0,r),n}has(e,i){let s=Reflect.has(e,i);return(!g.isSymbol(i)||!Io.has(i))&&K(e,"has",i),s}ownKeys(e){return K(e,"iterate",g.isArray(e)?"length":He),Reflect.ownKeys(e)}},fi=class extends ci{constructor(e=!1){super(!0,e)}set(e,i){return te(`Set operation on key "${String(i)}" failed: target is readonly.`,e),!0}deleteProperty(e,i){return te(`Delete operation on key "${String(i)}" failed: target is readonly.`,e),!0}},Rp=new di,Mp=new fi,Ip=new di(!0),Pp=new fi(!0),Es=t=>t,ni=t=>Reflect.getPrototypeOf(t);function Dp(t,e,i){return function(...s){let r=this.__v_raw,n=E(r),o=g.isMap(n),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,u=r[t](...s),c=i?Es:e?pi:j;return!e&&K(n,"iterate",l?hi:He),{next(){let{value:h,done:d}=u.next();return d?{value:h,done:d}:{value:a?[c(h[0]),c(h[1])]:c(h),done:d}},[Symbol.iterator](){return this}}}}function oi(t){return function(...e){{let i=e[0]?`on key "${e[0]}" `:"";te(`${g.capitalize(t)} operation ${i}failed: target is readonly.`,E(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function Np(t,e){let i={get(r){let n=this.__v_raw,o=E(n),a=E(r);t||(g.hasChanged(r,a)&&K(o,"get",r),K(o,"get",a));let{has:l}=ni(o),u=e?Es:t?pi:j;if(l.call(o,r))return u(n.get(r));if(l.call(o,a))return u(n.get(a));n!==o&&n.get(r)},get size(){let r=this.__v_raw;return!t&&K(E(r),"iterate",He),Reflect.get(r,"size",r)},has(r){let n=this.__v_raw,o=E(n),a=E(r);return t||(g.hasChanged(r,a)&&K(o,"has",r),K(o,"has",a)),r===a?n.has(r):n.has(r)||n.has(a)},forEach(r,n){let o=this,a=o.__v_raw,l=E(a),u=e?Es:t?pi:j;return!t&&K(l,"iterate",He),a.forEach((c,h)=>r.call(n,u(c),u(h),o))}};return g.extend(i,t?{add:oi("add"),set:oi("set"),delete:oi("delete"),clear:oi("clear")}:{add(r){!e&&!se(r)&&!Fe(r)&&(r=E(r));let n=E(this);return ni(n).has.call(n,r)||(n.add(r),xe(n,"add",r,r)),this},set(r,n){!e&&!se(n)&&!Fe(n)&&(n=E(n));let o=E(this),{has:a,get:l}=ni(o),u=a.call(o,r);u?So(o,a,r):(r=E(r),u=a.call(o,r));let c=l.call(o,r);return o.set(r,n),u?g.hasChanged(n,c)&&xe(o,"set",r,n,c):xe(o,"add",r,n),this},delete(r){let n=E(this),{has:o,get:a}=ni(n),l=o.call(n,r);l?So(n,o,r):(r=E(r),l=o.call(n,r));let u=a?a.call(n,r):void 0,c=n.delete(r);return l&&xe(n,"delete",r,void 0,u),c},clear(){let r=E(this),n=r.size!==0,o=g.isMap(r)?new Map(r):new Set(r),a=r.clear();return n&&xe(r,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(r=>{i[r]=Dp(r,t,e)}),i}function bi(t,e){let i=Np(t,e);return(s,r,n)=>r==="__v_isReactive"?!t:r==="__v_isReadonly"?t:r==="__v_raw"?s:Reflect.get(g.hasOwn(i,r)&&r in s?i:s,r,n)}var qp={get:bi(!1,!1)},$p={get:bi(!1,!0)},kp={get:bi(!0,!1)},Lp={get:bi(!0,!0)};function So(t,e,i){let s=E(i);if(s!==i&&e.call(t,s)){let r=g.toRawType(t);te(`Reactive ${r} contains both the raw and reactive versions of the same object${r==="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 Po=new WeakMap,Do=new WeakMap,No=new WeakMap,qo=new WeakMap;function Hp(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Fp(t){return t.__v_skip||!Object.isExtensible(t)?0:Hp(g.toRawType(t))}function ks(t){return Fe(t)?t:_i(t,!1,Rp,qp,Po)}function jp(t){return _i(t,!1,Ip,$p,Do)}function Ls(t){return _i(t,!0,Mp,kp,No)}function Vp(t){return _i(t,!0,Pp,Lp,qo)}function _i(t,e,i,s,r){if(!g.isObject(t))return te(`value cannot be made ${e?"readonly":"reactive"}: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive))return t;let n=r.get(t);if(n)return n;let o=Fp(t);if(o===0)return t;let a=new Proxy(t,o===2?s:i);return r.set(t,a),a}function nt(t){return Fe(t)?nt(t.__v_raw):!!(t&&t.__v_isReactive)}function Fe(t){return!!(t&&t.__v_isReadonly)}function se(t){return!!(t&&t.__v_isShallow)}function Hs(t){return t?!!t.__v_raw:!1}function E(t){let e=t&&t.__v_raw;return e?E(e):t}function Wp(t){return!g.hasOwn(t,"__v_skip")&&Object.isExtensible(t)&&g.def(t,"__v_skip",!0),t}var j=t=>g.isObject(t)?ks(t):t,pi=t=>g.isObject(t)?Ls(t):t;function z(t){return t?t.__v_isRef===!0:!1}function $o(t){return ko(t,!1)}function Up(t){return ko(t,!0)}function ko(t,e){return z(t)?t:new Os(t,e)}var Os=class{constructor(e,i){this.dep=new ot,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=i?e:E(e),this._value=i?e:j(e),this.__v_isShallow=i}get value(){return this.dep.track({target:this,type:"get",key:"value"}),this._value}set value(e){let i=this._rawValue,s=this.__v_isShallow||se(e)||Fe(e);e=s?e:E(e),g.hasChanged(e,i)&&(this._rawValue=e,this._value=s?e:j(e),this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:i}))}};function Yp(t){t.dep&&t.dep.trigger({target:t,type:"set",key:"value",newValue:t._value})}function Fs(t){return z(t)?t.value:t}function Kp(t){return g.isFunction(t)?t():Fs(t)}var zp={get:(t,e,i)=>e==="__v_raw"?t:Fs(Reflect.get(t,e,i)),set:(t,e,i,s)=>{let r=t[e];return z(r)&&!z(i)?(r.value=i,!0):Reflect.set(t,e,i,s)}};function Gp(t){return nt(t)?t:new Proxy(t,zp)}var Ts=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let i=this.dep=new ot,{get:s,set:r}=e(i.track.bind(i),i.trigger.bind(i));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}};function Bp(t){return new Ts(t)}function Jp(t){Hs(t)||te("toRefs() expects a reactive object but received a plain one.");let e=g.isArray(t)?new Array(t.length):{};for(let i in t)e[i]=Lo(t,i);return e}var Cs=class{constructor(e,i,s){this._object=e,this._key=i,this._defaultValue=s,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 Ap(E(this._object),this._key)}},Rs=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 Xp(t,e,i){return z(t)?t:g.isFunction(t)?new Rs(t):g.isObject(t)&&arguments.length>1?Lo(t,e,i):$o(t)}function Lo(t,e,i){let s=t[e];return z(s)?s:new Cs(t,e,i)}var Ms=class{constructor(e,i,s){this.fn=e,this.setter=i,this._value=void 0,this.dep=new ot(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Et-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!i,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&A!==this)return Oo(this,!0),!0}get value(){let e=this.dep.track({target:this,type:"get",key:"value"});return Ro(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter?this.setter(e):te("Write operation failed: computed value is readonly")}};function Zp(t,e,i=!1){let s,r;g.isFunction(t)?s=t:(s=t.get,r=t.set);let n=new Ms(s,r,i);return e&&!i&&(n.onTrack=e.onTrack,n.onTrigger=e.onTrigger),n}var Qp={GET:"get",HAS:"has",ITERATE:"iterate"},em={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},tm={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},im={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},ai={},mi=new WeakMap,Le;function sm(){return Le}function Ho(t,e=!1,i=Le){if(i){let s=mi.get(i);s||mi.set(i,s=[]),s.push(t)}else e||te("onWatcherCleanup() was called when there was no active watcher to associate with.")}function rm(t,e,i=g.EMPTY_OBJ){let{immediate:s,deep:r,once:n,scheduler:o,augmentJob:a,call:l}=i,u=w=>{(i.onWarn||te)("Invalid watch source: ",w,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=w=>r?w:se(w)||r===!1||r===0?Se(w,1):Se(w),h,d,v,x,N=!1,q=!1;if(z(t)?(d=()=>t.value,N=se(t)):nt(t)?(d=()=>c(t),N=!0):g.isArray(t)?(q=!0,N=t.some(w=>nt(w)||se(w)),d=()=>t.map(w=>{if(z(w))return w.value;if(nt(w))return c(w);if(g.isFunction(w))return l?l(w,2):w();u(w)})):g.isFunction(t)?e?d=l?()=>l(t,2):t:d=()=>{if(v){qs();try{v()}finally{$s()}}let w=Le;Le=h;try{return l?l(t,3,[x]):t(x)}finally{Le=w}}:(d=g.NOOP,u(t)),e&&r){let w=d,G=r===!0?1/0:r;d=()=>Se(w(),G)}let k=Ao(),L=()=>{h.stop(),k&&k.active&&g.remove(k.effects,h)};if(n&&e){let w=e;e=(...G)=>{w(...G),L()}}let H=q?new Array(t.length).fill(ai):ai,S=w=>{if(!(!(h.flags&1)||!h.dirty&&!w))if(e){let G=h.run();if(r||N||(q?G.some((Pe,Ft)=>g.hasChanged(Pe,H[Ft])):g.hasChanged(G,H))){v&&v();let Pe=Le;Le=h;try{let Ft=[G,H===ai?void 0:q&&H[0]===ai?[]:H,x];l?l(e,3,Ft):e(...Ft),H=G}finally{Le=Pe}}}else h.run()};return a&&a(S),h=new Qe(d),h.scheduler=o?()=>o(S,!1):S,x=w=>Ho(w,!1,h),v=h.onStop=()=>{let w=mi.get(h);if(w){if(l)l(w,4);else for(let G of w)G();mi.delete(h)}},h.onTrack=i.onTrack,h.onTrigger=i.onTrigger,e?s?S(!0):H=h.run():o?o(S.bind(null,!0),!0):h.run(),L.pause=h.pause.bind(h),L.resume=h.resume.bind(h),L.stop=L,L}function Se(t,e=1/0,i){if(e<=0||!g.isObject(t)||t.__v_skip||(i=i||new Set,i.has(t)))return t;if(i.add(t),e--,z(t))Se(t.value,e,i);else if(g.isArray(t))for(let s=0;s<t.length;s++)Se(t[s],e,i);else if(g.isSet(t)||g.isMap(t))t.forEach(s=>{Se(s,e,i)});else if(g.isPlainObject(t)){for(let s in t)Se(t[s],e,i);for(let s of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,s)&&Se(t[s],e,i)}return t}y.ARRAY_ITERATE_KEY=at;y.EffectFlags=_p;y.EffectScope=li;y.ITERATE_KEY=He;y.MAP_KEY_ITERATE_KEY=hi;y.ReactiveEffect=Qe;y.ReactiveFlags=tm;y.TrackOpTypes=Qp;y.TriggerOpTypes=em;y.WatchErrorCodes=im;y.computed=Zp;y.customRef=Bp;y.effect=vp;y.effectScope=gp;y.enableTracking=xp;y.getCurrentScope=Ao;y.getCurrentWatcher=sm;y.isProxy=Hs;y.isReactive=nt;y.isReadonly=Fe;y.isRef=z;y.isShallow=se;y.markRaw=Wp;y.onEffectCleanup=Sp;y.onScopeDispose=bp;y.onWatcherCleanup=Ho;y.pauseTracking=qs;y.proxyRefs=Gp;y.reactive=ks;y.reactiveReadArray=Ze;y.readonly=Ls;y.ref=$o;y.resetTracking=$s;y.shallowReactive=jp;y.shallowReadArray=gi;y.shallowReadonly=Vp;y.shallowRef=Up;y.stop=wp;y.toRaw=E;y.toReactive=j;y.toReadonly=pi;y.toRef=Xp;y.toRefs=Jp;y.toValue=Kp;y.track=K;y.traverse=Se;y.trigger=xe;y.triggerRef=Yp;y.unref=Fs;y.watch=rm});var yi=f((G_,js)=>{"use strict";process.env.NODE_ENV==="production"?js.exports=vo():js.exports=Fo()});var Ot=f(Ws=>{"use strict";var vi=class extends Error{constructor(e,i,s){super(s),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=i,this.exitCode=e,this.nestedError=void 0}},Vs=class extends vi{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ws.CommanderError=vi;Ws.InvalidArgumentError=Vs});var wi=f(Ys=>{"use strict";var{InvalidArgumentError:nm}=Ot(),Us=class{constructor(e,i){switch(this.description=i||"",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,i){return i===this.defaultValue||!Array.isArray(i)?[e]:i.concat(e)}default(e,i){return this.defaultValue=e,this.defaultValueDescription=i,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(i,s)=>{if(!this.argChoices.includes(i))throw new nm(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(i,s):i},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function om(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}Ys.Argument=Us;Ys.humanReadableArgName=om});var zs=f(jo=>{"use strict";var{humanReadableArgName:am}=wi(),Ks=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let i=e.commands.filter(r=>!r._hidden),s=e._getHelpCommand();return s&&!s._hidden&&i.push(s),this.sortSubcommands&&i.sort((r,n)=>r.name().localeCompare(n.name())),i}compareOptions(e,i){let s=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return s(e).localeCompare(s(i))}visibleOptions(e){let i=e.options.filter(r=>!r.hidden),s=e._getHelpOption();if(s&&!s.hidden){let r=s.short&&e._findOption(s.short),n=s.long&&e._findOption(s.long);!r&&!n?i.push(s):s.long&&!n?i.push(e.createOption(s.long,s.description)):s.short&&!r&&i.push(e.createOption(s.short,s.description))}return this.sortOptions&&i.sort(this.compareOptions),i}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let i=[];for(let s=e.parent;s;s=s.parent){let r=s.options.filter(n=>!n.hidden);i.push(...r)}return this.sortOptions&&i.sort(this.compareOptions),i}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(i=>{i.description=i.description||e._argsDescription[i.name()]||""}),e.registeredArguments.find(i=>i.description)?e.registeredArguments:[]}subcommandTerm(e){let i=e.registeredArguments.map(s=>am(s)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(i?" "+i:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,i){return i.visibleCommands(e).reduce((s,r)=>Math.max(s,i.subcommandTerm(r).length),0)}longestOptionTermLength(e,i){return i.visibleOptions(e).reduce((s,r)=>Math.max(s,i.optionTerm(r).length),0)}longestGlobalOptionTermLength(e,i){return i.visibleGlobalOptions(e).reduce((s,r)=>Math.max(s,i.optionTerm(r).length),0)}longestArgumentTermLength(e,i){return i.visibleArguments(e).reduce((s,r)=>Math.max(s,i.argumentTerm(r).length),0)}commandUsage(e){let i=e._name;e._aliases[0]&&(i=i+"|"+e._aliases[0]);let s="";for(let r=e.parent;r;r=r.parent)s=r.name()+" "+s;return s+i+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let i=[];return e.argChoices&&i.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&i.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&i.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&i.push(`env: ${e.envVar}`),i.length>0?`${e.description} (${i.join(", ")})`:e.description}argumentDescription(e){let i=[];if(e.argChoices&&i.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&i.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),i.length>0){let s=`(${i.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}formatHelp(e,i){let s=i.padWidth(e,i),r=i.helpWidth||80,n=2,o=2;function a(x,N){if(N){let q=`${x.padEnd(s+o)}${N}`;return i.wrap(q,r-n,s+o)}return x}function l(x){return x.join(`
|
|
4
|
-
`).replace(/^/gm," ".repeat(
|
|
5
|
-
`)}padWidth(e,
|
|
1
|
+
"use strict";var Dm=Object.create;var Il=Object.defineProperty;var Pm=Object.getOwnPropertyDescriptor;var Mm=Object.getOwnPropertyNames;var jm=Object.getPrototypeOf,Fm=Object.prototype.hasOwnProperty;var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var qm=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Mm(e))!Fm.call(t,s)&&s!==n&&Il(t,s,{get:()=>e[s],enumerable:!(r=Pm(e,s))||r.enumerable});return t};var q=(t,e,n)=>(n=t!=null?Dm(jm(t)):{},qm(e||!t||!t.__esModule?Il(n,"default",{value:t,enumerable:!0}):n,t));var zl=y(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});function fe(t){let e=Object.create(null);for(let n of t.split(","))e[n]=1;return n=>n in e}var Vm={},Lm=[],Hm=()=>{},Gm=()=>!1,Um=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Wm=t=>t.startsWith("onUpdate:"),Km=Object.assign,Bm=(t,e)=>{let n=t.indexOf(e);n>-1&&t.splice(n,1)},zm=Object.prototype.hasOwnProperty,Ym=(t,e)=>zm.call(t,e),Rt=Array.isArray,Ml=t=>Nt(t)==="[object Map]",jl=t=>Nt(t)==="[object Set]",ti=t=>Nt(t)==="[object Date]",Jm=t=>Nt(t)==="[object RegExp]",On=t=>typeof t=="function",Re=t=>typeof t=="string",Tn=t=>typeof t=="symbol",lt=t=>t!==null&&typeof t=="object",Xm=t=>(lt(t)||On(t))&&On(t.then)&&On(t.catch),ni=Object.prototype.toString,Nt=t=>ni.call(t),Zm=t=>Nt(t).slice(8,-1),Fl=t=>Nt(t)==="[object Object]",Qm=t=>Re(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,eg=fe(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),tg=fe("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),_r=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},ng=/-(\w)/g,rg=_r(t=>t.replace(ng,(e,n)=>n?n.toUpperCase():"")),sg=/\B([A-Z])/g,ql=_r(t=>t.replace(sg,"-$1").toLowerCase()),Vl=_r(t=>t.charAt(0).toUpperCase()+t.slice(1)),ig=_r(t=>t?`on${Vl(t)}`:""),og=(t,e)=>!Object.is(t,e),ag=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},lg=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},cg=t=>{let e=parseFloat(t);return isNaN(e)?t:e},ug=t=>{let e=Re(t)?Number(t):NaN;return isNaN(e)?t:e},Dl,dg=()=>Dl||(Dl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),hg=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;function pg(t){return hg.test(t)?`__props.${t}`:`__props[${JSON.stringify(t)}]`}function fg(t,e){return t+JSON.stringify(e,(n,r)=>typeof r=="function"?r.toString():r)}var mg={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"},gg={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"},_g={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"},vg={STABLE:1,1:"STABLE",DYNAMIC:2,2:"DYNAMIC",FORWARDED:3,3:"FORWARDED"},bg={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},yg="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",Ll=fe(yg),wg=Ll,Pl=2;function Cg(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-Pl;l<=a+Pl||n>i;l++){if(l<0||l>=r.length)continue;let u=l+1;o.push(`${u}${" ".repeat(Math.max(3-String(u).length,0))}| ${r[l]}`);let d=r[l].length,c=s[l]&&s[l].length||0;if(l===a){let h=e-(i-(d+c)),p=Math.max(1,n>i?d-h:n-e);o.push(" | "+" ".repeat(h)+"^".repeat(p))}else if(l>a){if(n>i){let h=Math.max(Math.min(n-i,d),1);o.push(" | "+"^".repeat(h))}i+=d+c}}break}return o.join(`
|
|
2
|
+
`)}function ri(t){if(Rt(t)){let e={};for(let n=0;n<t.length;n++){let r=t[n],s=Re(r)?Hl(r):ri(r);if(s)for(let i in s)e[i]=s[i]}return e}else if(Re(t)||lt(t))return t}var Sg=/;(?![^(]*\))/g,xg=/:([^]+)/,Ag=/\/\*[^]*?\*\//g;function Hl(t){let e={};return t.replace(Ag,"").split(Sg).forEach(n=>{if(n){let r=n.split(xg);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Eg(t){if(!t)return"";if(Re(t))return t;let e="";for(let n in t){let r=t[n];if(Re(r)||typeof r=="number"){let s=n.startsWith("--")?n:ql(n);e+=`${s}:${r};`}}return e}function si(t){let e="";if(Re(t))e=t;else if(Rt(t))for(let n=0;n<t.length;n++){let r=si(t[n]);r&&(e+=r+" ")}else if(lt(t))for(let n in t)t[n]&&(e+=n+" ");return e.trim()}function Og(t){if(!t)return null;let{class:e,style:n}=t;return e&&!Re(e)&&(t.class=si(e)),n&&(t.style=ri(n)),t}var Tg="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",Rg="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",Ng="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",kg=fe(Tg),Ig=fe($g),Dg=fe(Rg),Pg=fe(Ng),Gl="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Mg=fe(Gl),jg=fe(Gl+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Fg(t){return!!t||t===""}var qg=/[>/="'\u0009\u000a\u000c\u0020]/,Qs={};function Vg(t){if(Qs.hasOwnProperty(t))return Qs[t];let e=qg.test(t);return e&&console.error(`unsafe attribute name: ${t}`),Qs[t]=!e}var Lg={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},Hg=fe("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"),Gg=fe("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"),Ug=fe("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 Wg(t){if(t==null)return!1;let e=typeof t;return e==="string"||e==="number"||e==="boolean"}var Kg=/["'&<>]/;function Bg(t){let e=""+t,n=Kg.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=""";break;case 38:s="&";break;case 39:s="'";break;case 60:s="<";break;case 62:s=">";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 Yg(t){return t.replace(zg,"")}var Ul=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function Jg(t,e){return t.replace(Ul,n=>e?n==='"'?'\\\\\\"':`\\\\${n}`:`\\${n}`)}function Xg(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=vr(t[r],e[r]);return n}function vr(t,e){if(t===e)return!0;let n=ti(t),r=ti(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?Xg(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||!vr(t[o],e[o]))return!1}}return String(t)===String(e)}function Zg(t,e){return t.findIndex(n=>vr(n,e))}var Wl=t=>!!(t&&t.__v_isRef===!0),Kl=t=>Re(t)?t:t==null?"":Rt(t)||lt(t)&&(t.toString===ni||!On(t.toString))?Wl(t)?Kl(t.value):JSON.stringify(t,Bl,2):String(t),Bl=(t,e)=>Wl(e)?Bl(t,e.value):Ml(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,s],i)=>(n[ei(r,i)+" =>"]=s,n),{})}:jl(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>ei(n))}:Tn(e)?ei(e):lt(e)&&!Rt(e)&&!Fl(e)?String(e):e,ei=(t,e="")=>{var n;return Tn(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};w.EMPTY_ARR=Lm;w.EMPTY_OBJ=Vm;w.NO=Gm;w.NOOP=Hm;w.PatchFlagNames=gg;w.PatchFlags=mg;w.ShapeFlags=_g;w.SlotFlags=vg;w.camelize=rg;w.capitalize=Vl;w.cssVarNameEscapeSymbolsRE=Ul;w.def=lg;w.escapeHtml=Bg;w.escapeHtmlComment=Yg;w.extend=Km;w.genCacheKey=fg;w.genPropsAccessExp=pg;w.generateCodeFrame=Cg;w.getEscapedCssVarName=Jg;w.getGlobalThis=dg;w.hasChanged=og;w.hasOwn=Ym;w.hyphenate=ql;w.includeBooleanAttr=Fg;w.invokeArrayFns=ag;w.isArray=Rt;w.isBooleanAttr=jg;w.isBuiltInDirective=tg;w.isDate=ti;w.isFunction=On;w.isGloballyAllowed=Ll;w.isGloballyWhitelisted=wg;w.isHTMLTag=kg;w.isIntegerKey=Qm;w.isKnownHtmlAttr=Hg;w.isKnownMathMLAttr=Ug;w.isKnownSvgAttr=Gg;w.isMap=Ml;w.isMathMLTag=Dg;w.isModelListener=Wm;w.isObject=lt;w.isOn=Um;w.isPlainObject=Fl;w.isPromise=Xm;w.isRegExp=Jm;w.isRenderableAttrValue=Wg;w.isReservedProp=eg;w.isSSRSafeAttrName=Vg;w.isSVGTag=Ig;w.isSet=jl;w.isSpecialBooleanAttr=Mg;w.isString=Re;w.isSymbol=Tn;w.isVoidTag=Pg;w.looseEqual=vr;w.looseIndexOf=Zg;w.looseToNumber=cg;w.makeMap=fe;w.normalizeClass=si;w.normalizeProps=Og;w.normalizeStyle=ri;w.objectToString=ni;w.parseStringStyle=Hl;w.propsToAttrMap=Lg;w.remove=Bm;w.slotFlagsText=bg;w.stringifyStyle=Eg;w.toDisplayString=Kl;w.toHandlerKey=ig;w.toNumber=ug;w.toRawType=Zm;w.toTypeString=Nt});var cc=y(C=>{"use strict";Object.defineProperty(C,"__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 Qg=Object.freeze({}),e_=Object.freeze([]),t_=()=>{},n_=()=>!1,r_=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),s_=t=>t.startsWith("onUpdate:"),i_=Object.assign,o_=(t,e)=>{let n=t.indexOf(e);n>-1&&t.splice(n,1)},a_=Object.prototype.hasOwnProperty,l_=(t,e)=>a_.call(t,e),kt=Array.isArray,Xl=t=>It(t)==="[object Map]",Zl=t=>It(t)==="[object Set]",ai=t=>It(t)==="[object Date]",c_=t=>It(t)==="[object RegExp]",$n=t=>typeof t=="function",Ne=t=>typeof t=="string",Rn=t=>typeof t=="symbol",ct=t=>t!==null&&typeof t=="object",u_=t=>(ct(t)||$n(t))&&$n(t.then)&&$n(t.catch),li=Object.prototype.toString,It=t=>li.call(t),d_=t=>It(t).slice(8,-1),Ql=t=>It(t)==="[object Object]",h_=t=>Ne(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,p_=me(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),f_=me("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),br=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},m_=/-(\w)/g,g_=br(t=>t.replace(m_,(e,n)=>n?n.toUpperCase():"")),__=/\B([A-Z])/g,ec=br(t=>t.replace(__,"-$1").toLowerCase()),tc=br(t=>t.charAt(0).toUpperCase()+t.slice(1)),v_=br(t=>t?`on${tc(t)}`:""),b_=(t,e)=>!Object.is(t,e),y_=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},w_=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},C_=t=>{let e=parseFloat(t);return isNaN(e)?t:e},S_=t=>{let e=Ne(t)?Number(t):NaN;return isNaN(e)?t:e},Yl,x_=()=>Yl||(Yl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),A_=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;function E_(t){return A_.test(t)?`__props.${t}`:`__props[${JSON.stringify(t)}]`}function O_(t,e){return t+JSON.stringify(e,(n,r)=>typeof r=="function"?r.toString():r)}var T_={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"},$_={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"},R_={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"},N_={STABLE:1,1:"STABLE",DYNAMIC:2,2:"DYNAMIC",FORWARDED:3,3:"FORWARDED"},k_={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},I_="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",nc=me(I_),D_=nc,Jl=2;function P_(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-Jl;l<=a+Jl||n>i;l++){if(l<0||l>=r.length)continue;let u=l+1;o.push(`${u}${" ".repeat(Math.max(3-String(u).length,0))}| ${r[l]}`);let d=r[l].length,c=s[l]&&s[l].length||0;if(l===a){let h=e-(i-(d+c)),p=Math.max(1,n>i?d-h:n-e);o.push(" | "+" ".repeat(h)+"^".repeat(p))}else if(l>a){if(n>i){let h=Math.max(Math.min(n-i,d),1);o.push(" | "+"^".repeat(h))}i+=d+c}}break}return o.join(`
|
|
3
|
+
`)}function ci(t){if(kt(t)){let e={};for(let n=0;n<t.length;n++){let r=t[n],s=Ne(r)?rc(r):ci(r);if(s)for(let i in s)e[i]=s[i]}return e}else if(Ne(t)||ct(t))return t}var M_=/;(?![^(]*\))/g,j_=/:([^]+)/,F_=/\/\*[^]*?\*\//g;function rc(t){let e={};return t.replace(F_,"").split(M_).forEach(n=>{if(n){let r=n.split(j_);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function q_(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:ec(n);e+=`${s}:${r};`}}return e}function ui(t){let e="";if(Ne(t))e=t;else if(kt(t))for(let n=0;n<t.length;n++){let r=ui(t[n]);r&&(e+=r+" ")}else if(ct(t))for(let n in t)t[n]&&(e+=n+" ");return e.trim()}function V_(t){if(!t)return null;let{class:e,style:n}=t;return e&&!Ne(e)&&(t.class=ui(e)),n&&(t.style=ci(n)),t}var L_="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",H_="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",G_="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",U_="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",W_=me(L_),K_=me(H_),B_=me(G_),z_=me(U_),sc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Y_=me(sc),J_=me(sc+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function X_(t){return!!t||t===""}var Z_=/[>/="'\u0009\u000a\u000c\u0020]/,ii={};function Q_(t){if(ii.hasOwnProperty(t))return ii[t];let e=Z_.test(t);return e&&console.error(`unsafe attribute name: ${t}`),ii[t]=!e}var ev={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},tv=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"),nv=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"),rv=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 sv(t){if(t==null)return!1;let e=typeof t;return e==="string"||e==="number"||e==="boolean"}var iv=/["'&<>]/;function ov(t){let e=""+t,n=iv.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=""";break;case 38:s="&";break;case 39:s="'";break;case 60:s="<";break;case 62:s=">";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 av=/^-?>|<!--|-->|--!>|<!-$/g;function lv(t){return t.replace(av,"")}var ic=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function cv(t,e){return t.replace(ic,n=>e?n==='"'?'\\\\\\"':`\\\\${n}`:`\\${n}`)}function uv(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=yr(t[r],e[r]);return n}function yr(t,e){if(t===e)return!0;let n=ai(t),r=ai(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?uv(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||!yr(t[o],e[o]))return!1}}return String(t)===String(e)}function dv(t,e){return t.findIndex(n=>yr(n,e))}var oc=t=>!!(t&&t.__v_isRef===!0),ac=t=>Ne(t)?t:t==null?"":kt(t)||ct(t)&&(t.toString===li||!$n(t.toString))?oc(t)?ac(t.value):JSON.stringify(t,lc,2):String(t),lc=(t,e)=>oc(e)?lc(t,e.value):Xl(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,s],i)=>(n[oi(r,i)+" =>"]=s,n),{})}:Zl(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>oi(n))}:Rn(e)?oi(e):ct(e)&&!kt(e)&&!Ql(e)?String(e):e,oi=(t,e="")=>{var n;return Rn(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};C.EMPTY_ARR=e_;C.EMPTY_OBJ=Qg;C.NO=n_;C.NOOP=t_;C.PatchFlagNames=$_;C.PatchFlags=T_;C.ShapeFlags=R_;C.SlotFlags=N_;C.camelize=g_;C.capitalize=tc;C.cssVarNameEscapeSymbolsRE=ic;C.def=w_;C.escapeHtml=ov;C.escapeHtmlComment=lv;C.extend=i_;C.genCacheKey=O_;C.genPropsAccessExp=E_;C.generateCodeFrame=P_;C.getEscapedCssVarName=cv;C.getGlobalThis=x_;C.hasChanged=b_;C.hasOwn=l_;C.hyphenate=ec;C.includeBooleanAttr=X_;C.invokeArrayFns=y_;C.isArray=kt;C.isBooleanAttr=J_;C.isBuiltInDirective=f_;C.isDate=ai;C.isFunction=$n;C.isGloballyAllowed=nc;C.isGloballyWhitelisted=D_;C.isHTMLTag=W_;C.isIntegerKey=h_;C.isKnownHtmlAttr=tv;C.isKnownMathMLAttr=rv;C.isKnownSvgAttr=nv;C.isMap=Xl;C.isMathMLTag=B_;C.isModelListener=s_;C.isObject=ct;C.isOn=r_;C.isPlainObject=Ql;C.isPromise=u_;C.isRegExp=c_;C.isRenderableAttrValue=sv;C.isReservedProp=p_;C.isSSRSafeAttrName=Q_;C.isSVGTag=K_;C.isSet=Zl;C.isSpecialBooleanAttr=Y_;C.isString=Ne;C.isSymbol=Rn;C.isVoidTag=z_;C.looseEqual=yr;C.looseIndexOf=dv;C.looseToNumber=C_;C.makeMap=me;C.normalizeClass=ui;C.normalizeProps=V_;C.normalizeStyle=ci;C.objectToString=li;C.parseStringStyle=rc;C.propsToAttrMap=ev;C.remove=o_;C.slotFlagsText=k_;C.stringifyStyle=q_;C.toDisplayString=ac;C.toHandlerKey=v_;C.toNumber=S_;C.toRawType=d_;C.toTypeString=It});var hi=y((dE,di)=>{"use strict";process.env.NODE_ENV==="production"?di.exports=zl():di.exports=cc()});var $c=y(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});var E=hi(),te,xr=class{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=te,!e&&te&&(this.index=(te.scopes||(te.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=te;try{return te=this,e()}finally{te=n}}}on(){te=this}off(){te=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 hv(t){return new xr(t)}function hc(){return te}function pv(t,e=!1){te&&te.cleanups.push(t)}var j,fv={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,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,te&&te.active&&te.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||fc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,uc(this),mc(this);let e=j,n=ge;j=this,ge=!0;try{return this.fn()}finally{gc(this),j=e,ge=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ei(e);this.deps=this.depsTail=void 0,uc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?pi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){gi(this)&&this.run()}get dirty(){return gi(this)}},pc=0,kn,In;function fc(t,e=!1){if(t.flags|=8,e){t.next=In,In=t;return}t.next=kn,kn=t}function xi(){pc++}function Ai(){if(--pc>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 mc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function gc(t){let e,n=t.depsTail,r=n;for(;r;){let s=r.prevDep;r.version===-1?(r===n&&(n=s),Ei(r),mv(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}t.deps=e,t.depsTail=n}function gi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(_c(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function _c(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&&!gi(t)){t.flags&=-3;return}let n=j,r=ge;j=t,ge=!0;try{mc(t);let s=t.fn(t._value);(e.version===0||E.hasChanged(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{j=n,ge=r,gc(t),t.flags&=-3}}function Ei(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)Ei(i,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function mv(t){let{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function gv(t,e){t.effect instanceof Pt&&(t=t.effect.fn);let n=new Pt(t);e&&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 _v(t){t.effect.stop()}var ge=!0,Oi=[];function Ti(){Oi.push(ge),ge=!1}function vv(){Oi.push(ge),ge=!0}function $i(){let t=Oi.pop();ge=t===void 0?!0:t}function bv(t,e=!1){j instanceof Pt&&(j.cleanup=t)}function uc(t){let{cleanup:e}=t;if(t.cleanup=void 0,e){let n=j;j=void 0;try{e()}finally{j=n}}}var Dn=0,_i=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(!j||!ge||j===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==j)n=this.activeLink=new _i(j,this),j.deps?(n.prevDep=j.depsTail,j.depsTail.nextDep=n,j.depsTail=n):j.deps=j.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=j.depsTail,n.nextDep=void 0,j.depsTail.nextDep=n,j.depsTail=n,j.deps===n&&(j.deps=r)}return n}trigger(e){this.version++,Dn++,this.notify(e)}notify(e){xi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ai()}}};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.subs=t}}var Ar=new WeakMap,dt=Symbol(""),Er=Symbol(""),en=Symbol("");function ne(t,e,n){if(ge&&j){let r=Ar.get(t);r||Ar.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 We(t,e,n,r,s,i){let o=Ar.get(t);if(!o){Dn++;return}let a=l=>{l&&l.trigger()};if(xi(),e==="clear")o.forEach(a);else{let l=E.isArray(t),u=l&&E.isIntegerKey(n);if(l&&n==="length"){let d=Number(r);o.forEach((c,h)=>{(h==="length"||h===en||!E.isSymbol(h)&&h>=d)&&a(c)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(en)),e){case"add":l?u&&a(o.get("length")):(a(o.get(dt)),E.isMap(t)&&a(o.get(Er)));break;case"delete":l||(a(o.get(dt)),E.isMap(t)&&a(o.get(Er)));break;case"set":E.isMap(t)&&a(o.get(dt));break}}Ai()}function yv(t,e){let n=Ar.get(t);return n&&n.get(e)}function Dt(t){let e=D(t);return e===t?e:(ne(e,"iterate",en),be(t)?e:e.map(Z))}function kr(t){return ne(t=D(t),"iterate",en),t}var wv={__proto__:null,[Symbol.iterator](){return fi(this,Symbol.iterator,Z)},concat(...t){return Dt(this).concat(...t.map(e=>E.isArray(e)?Dt(e):e))},entries(){return fi(this,"entries",t=>(t[1]=Z(t[1]),t))},every(t,e){return Ue(this,"every",t,e,void 0,arguments)},filter(t,e){return Ue(this,"filter",t,e,n=>n.map(Z),arguments)},find(t,e){return Ue(this,"find",t,e,Z,arguments)},findIndex(t,e){return Ue(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Ue(this,"findLast",t,e,Z,arguments)},findLastIndex(t,e){return Ue(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Ue(this,"forEach",t,e,void 0,arguments)},includes(...t){return mi(this,"includes",t)},indexOf(...t){return mi(this,"indexOf",t)},join(t){return Dt(this).join(t)},lastIndexOf(...t){return mi(this,"lastIndexOf",t)},map(t,e){return Ue(this,"map",t,e,void 0,arguments)},pop(){return Nn(this,"pop")},push(...t){return Nn(this,"push",t)},reduce(t,...e){return dc(this,"reduce",t,e)},reduceRight(t,...e){return dc(this,"reduceRight",t,e)},shift(){return Nn(this,"shift")},some(t,e){return Ue(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 fi(this,"values",Z)}};function fi(t,e,n){let r=kr(t),s=r[e]();return r!==t&&!be(t)&&(s._next=s.next,s.next=()=>{let i=s._next();return i.value&&(i.value=n(i.value)),i}),s}var Cv=Array.prototype;function Ue(t,e,n,r,s,i){let o=kr(t),a=o!==t&&!be(t),l=o[e];if(l!==Cv[e]){let c=l.apply(t,i);return a?Z(c):c}let u=n;o!==t&&(a?u=function(c,h){return n.call(this,Z(c),h,t)}:n.length>2&&(u=function(c,h){return n.call(this,c,h,t)}));let d=l.call(o,u,r);return a&&s?s(d):d}function dc(t,e,n,r){let s=kr(t),i=n;return s!==t&&(be(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,Z(a),l,t)}),s[e](i,...r)}function mi(t,e,n){let r=D(t);ne(r,"iterate",en);let s=r[e](...n);return(s===-1||s===!1)&&xc(n[0])?(n[0]=D(n[0]),r[e](...n)):s}function Nn(t,e,n=[]){Ti(),xi();let r=D(t)[e].apply(t,n);return Ai(),$i(),r}var Sv=E.makeMap("__proto__,__v_isRef,__isVue"),bc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(E.isSymbol));function xv(t){E.isSymbol(t)||(t=String(t));let e=D(this);return ne(e,"has",t),e.hasOwnProperty(t)}var Or=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?Sc:Cc:i?wc:yc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;let o=E.isArray(e);if(!s){let l;if(o&&(l=wv[n]))return l;if(n==="hasOwnProperty")return xv}let a=Reflect.get(e,n,re(e)?e:r);return(E.isSymbol(n)?bc.has(n):Sv(n))||(s||ne(e,"get",n),i)?a:re(a)?o&&E.isIntegerKey(n)?a:a.value:E.isObject(a)?s?Ni(a):Ri(a):a}},Tr=class extends Or{constructor(e=!1){super(!1,e)}set(e,n,r,s){let i=e[n];if(!this._isShallow){let l=ht(i);if(!be(r)&&!ht(r)&&(i=D(i),r=D(r)),!E.isArray(e)&&re(i)&&!re(r))return l?!1:(i.value=r,!0)}let o=E.isArray(e)&&E.isIntegerKey(n)?Number(n)<e.length:E.hasOwn(e,n),a=Reflect.set(e,n,r,re(e)?e:s);return e===D(s)&&(o?E.hasChanged(r,i)&&We(e,"set",n,r):We(e,"add",n,r)),a}deleteProperty(e,n){let r=E.hasOwn(e,n);e[n];let s=Reflect.deleteProperty(e,n);return s&&r&&We(e,"delete",n,void 0),s}has(e,n){let r=Reflect.has(e,n);return(!E.isSymbol(n)||!bc.has(n))&&ne(e,"has",n),r}ownKeys(e){return ne(e,"iterate",E.isArray(e)?"length":dt),Reflect.ownKeys(e)}},$r=class extends Or{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}},Av=new Tr,Ev=new $r,Ov=new Tr(!0),Tv=new $r(!0),vi=t=>t,wr=t=>Reflect.getPrototypeOf(t);function $v(t,e,n){return function(...r){let s=this.__v_raw,i=D(s),o=E.isMap(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,u=s[t](...r),d=n?vi:e?Rr:Z;return!e&&ne(i,"iterate",l?Er:dt),{next(){let{value:c,done:h}=u.next();return h?{value:c,done:h}:{value:a?[d(c[0]),d(c[1])]:d(c),done:h}},[Symbol.iterator](){return this}}}}function Cr(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Rv(t,e){let n={get(s){let i=this.__v_raw,o=D(i),a=D(s);t||(E.hasChanged(s,a)&&ne(o,"get",s),ne(o,"get",a));let{has:l}=wr(o),u=e?vi:t?Rr:Z;if(l.call(o,s))return u(i.get(s));if(l.call(o,a))return u(i.get(a));i!==o&&i.get(s)},get size(){let s=this.__v_raw;return!t&&ne(D(s),"iterate",dt),Reflect.get(s,"size",s)},has(s){let i=this.__v_raw,o=D(i),a=D(s);return t||(E.hasChanged(s,a)&&ne(o,"has",s),ne(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=D(a),u=e?vi:t?Rr:Z;return!t&&ne(l,"iterate",dt),a.forEach((d,c)=>s.call(i,u(d),u(c),o))}};return E.extend(n,t?{add:Cr("add"),set:Cr("set"),delete:Cr("delete"),clear:Cr("clear")}:{add(s){!e&&!be(s)&&!ht(s)&&(s=D(s));let i=D(this);return wr(i).has.call(i,s)||(i.add(s),We(i,"add",s,s)),this},set(s,i){!e&&!be(i)&&!ht(i)&&(i=D(i));let o=D(this),{has:a,get:l}=wr(o),u=a.call(o,s);u||(s=D(s),u=a.call(o,s));let d=l.call(o,s);return o.set(s,i),u?E.hasChanged(i,d)&&We(o,"set",s,i):We(o,"add",s,i),this},delete(s){let i=D(this),{has:o,get:a}=wr(i),l=o.call(i,s);l||(s=D(s),l=o.call(i,s)),a&&a.call(i,s);let u=i.delete(s);return l&&We(i,"delete",s,void 0),u},clear(){let s=D(this),i=s.size!==0,o=s.clear();return i&&We(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=$v(s,t,e)}),n}function Ir(t,e){let n=Rv(t,e);return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get(E.hasOwn(n,s)&&s in r?n:r,s,i)}var Nv={get:Ir(!1,!1)},kv={get:Ir(!1,!0)},Iv={get:Ir(!0,!1)},Dv={get:Ir(!0,!0)},yc=new WeakMap,wc=new WeakMap,Cc=new WeakMap,Sc=new WeakMap;function Pv(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mv(t){return t.__v_skip||!Object.isExtensible(t)?0:Pv(E.toRawType(t))}function Ri(t){return ht(t)?t:Dr(t,!1,Av,Nv,yc)}function jv(t){return Dr(t,!1,Ov,kv,wc)}function Ni(t){return Dr(t,!0,Ev,Iv,Cc)}function Fv(t){return Dr(t,!0,Tv,Dv,Sc)}function Dr(t,e,n,r,s){if(!E.isObject(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;let i=s.get(t);if(i)return i;let o=Mv(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 be(t){return!!(t&&t.__v_isShallow)}function xc(t){return t?!!t.__v_raw:!1}function D(t){let e=t&&t.__v_raw;return e?D(e):t}function qv(t){return!E.hasOwn(t,"__v_skip")&&Object.isExtensible(t)&&E.def(t,"__v_skip",!0),t}var Z=t=>E.isObject(t)?Ri(t):t,Rr=t=>E.isObject(t)?Ni(t):t;function re(t){return t?t.__v_isRef===!0:!1}function Ac(t){return Ec(t,!1)}function Vv(t){return Ec(t,!0)}function Ec(t,e){return re(t)?t:new bi(t,e)}var bi=class{constructor(e,n){this.dep=new Qt,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:D(e),this._value=n?e:Z(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){let n=this._rawValue,r=this.__v_isShallow||be(e)||ht(e);e=r?e:D(e),E.hasChanged(e,n)&&(this._rawValue=e,this._value=r?e:Z(e),this.dep.trigger())}};function Lv(t){t.dep&&t.dep.trigger()}function ki(t){return re(t)?t.value:t}function Hv(t){return E.isFunction(t)?t():ki(t)}var Gv={get:(t,e,n)=>e==="__v_raw"?t:ki(Reflect.get(t,e,n)),set:(t,e,n,r)=>{let s=t[e];return re(s)&&!re(n)?(s.value=n,!0):Reflect.set(t,e,n,r)}};function Uv(t){return Zt(t)?t:new Proxy(t,Gv)}var yi=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 Wv(t){return new yi(t)}function Kv(t){let e=E.isArray(t)?new Array(t.length):{};for(let n in t)e[n]=Oc(t,n);return e}var wi=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 yv(D(this._object),this._key)}},Ci=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 Bv(t,e,n){return re(t)?t:E.isFunction(t)?new Ci(t):E.isObject(t)&&arguments.length>1?Oc(t,e,n):Ac(t)}function Oc(t,e,n){let r=t[e];return re(r)?r:new wi(t,e,n)}var Si=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)&&j!==this)return fc(this,!0),!0}get value(){let e=this.dep.track();return _c(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 E.isFunction(t)?r=t:(r=t.get,s=t.set),new Si(r,s,n)}var Yv={GET:"get",HAS:"has",ITERATE:"iterate"},Jv={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Xv={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},Zv={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},Sr={},Nr=new WeakMap,ut;function Qv(){return ut}function Tc(t,e=!1,n=ut){if(n){let r=Nr.get(n);r||Nr.set(n,r=[]),r.push(t)}}function eb(t,e,n=E.EMPTY_OBJ){let{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,u=x=>s?x:be(x)||s===!1||s===0?Ke(x,1):Ke(x),d,c,h,p,g=!1,m=!1;if(re(t)?(c=()=>t.value,g=be(t)):Zt(t)?(c=()=>u(t),g=!0):E.isArray(t)?(m=!0,g=t.some(x=>Zt(x)||be(x)),c=()=>t.map(x=>{if(re(x))return x.value;if(Zt(x))return u(x);if(E.isFunction(x))return l?l(x,2):x()})):E.isFunction(t)?e?c=l?()=>l(t,2):t:c=()=>{if(h){Ti();try{h()}finally{$i()}}let x=ut;ut=d;try{return l?l(t,3,[p]):t(p)}finally{ut=x}}:c=E.NOOP,e&&s){let x=c,N=s===!0?1/0:s;c=()=>Ke(x(),N)}let _=hc(),f=()=>{d.stop(),_&&_.active&&E.remove(_.effects,d)};if(i&&e){let x=e;e=(...N)=>{x(...N),f()}}let v=m?new Array(t.length).fill(Sr):Sr,b=x=>{if(!(!(d.flags&1)||!d.dirty&&!x))if(e){let N=d.run();if(s||g||(m?N.some((ue,at)=>E.hasChanged(ue,v[at])):E.hasChanged(N,v))){h&&h();let ue=ut;ut=d;try{let at=[N,v===Sr?void 0:m&&v[0]===Sr?[]:v,p];l?l(e,3,at):e(...at),v=N}finally{ut=ue}}}else d.run()};return a&&a(b),d=new Pt(c),d.scheduler=o?()=>o(b,!1):b,p=x=>Tc(x,!1,d),h=d.onStop=()=>{let x=Nr.get(d);if(x){if(l)l(x,4);else for(let N of x)N();Nr.delete(d)}},e?r?b(!0):v=d.run():o?o(b.bind(null,!0),!0):d.run(),f.pause=d.pause.bind(d),f.resume=d.resume.bind(d),f.stop=f,f}function Ke(t,e=1/0,n){if(e<=0||!E.isObject(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,re(t))Ke(t.value,e,n);else if(E.isArray(t))for(let r=0;r<t.length;r++)Ke(t[r],e,n);else if(E.isSet(t)||E.isMap(t))t.forEach(r=>{Ke(r,e,n)});else if(E.isPlainObject(t)){for(let r in t)Ke(t[r],e,n);for(let r of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,r)&&Ke(t[r],e,n)}return t}O.ARRAY_ITERATE_KEY=en;O.EffectFlags=fv;O.EffectScope=xr;O.ITERATE_KEY=dt;O.MAP_KEY_ITERATE_KEY=Er;O.ReactiveEffect=Pt;O.ReactiveFlags=Xv;O.TrackOpTypes=Yv;O.TriggerOpTypes=Jv;O.WatchErrorCodes=Zv;O.computed=zv;O.customRef=Wv;O.effect=gv;O.effectScope=hv;O.enableTracking=vv;O.getCurrentScope=hc;O.getCurrentWatcher=Qv;O.isProxy=xc;O.isReactive=Zt;O.isReadonly=ht;O.isRef=re;O.isShallow=be;O.markRaw=qv;O.onEffectCleanup=bv;O.onScopeDispose=pv;O.onWatcherCleanup=Tc;O.pauseTracking=Ti;O.proxyRefs=Uv;O.reactive=Ri;O.reactiveReadArray=Dt;O.readonly=Ni;O.ref=Ac;O.resetTracking=$i;O.shallowReactive=jv;O.shallowReadArray=kr;O.shallowReadonly=Fv;O.shallowRef=Vv;O.stop=_v;O.toRaw=D;O.toReactive=Z;O.toReadonly=Rr;O.toRef=Bv;O.toRefs=Kv;O.toValue=Hv;O.track=ne;O.traverse=Ke;O.trigger=We;O.triggerRef=Lv;O.unref=ki;O.watch=eb});var Yc=y(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});var A=hi();function ve(t,...e){console.warn(`[Vue warn] ${t}`,...e)}var se,Fr=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}}else ve("cannot run an inactive effect scope.")}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 tb(t){return new Fr(t)}function Ic(){return se}function nb(t,e=!1){se?se.cleanups.push(t):e||ve("onScopeDispose() is called when there is no active effect scope to be associated with.")}var k,rb={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"},Ii=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,se&&se.active&&se.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ii.has(this)&&(Ii.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Pc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Rc(this),Mc(this);let e=k,n=_e;k=this,_e=!0;try{return this.fn()}finally{k!==this&&ve("Active effect was not restored correctly - this is likely a Vue internal bug."),jc(this),k=e,_e=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ki(e);this.deps=this.depsTail=void 0,Rc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ii.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Mi(this)&&this.run()}get dirty(){return Mi(this)}},Dc=0,Mn,jn;function Pc(t,e=!1){if(t.flags|=8,e){t.next=jn,jn=t;return}t.next=Mn,Mn=t}function Ui(){Dc++}function Wi(){if(--Dc>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 Mc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function jc(t){let e,n=t.depsTail,r=n;for(;r;){let s=r.prevDep;r.version===-1?(r===n&&(n=s),Ki(r),sb(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}t.deps=e,t.depsTail=n}function Mi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Fc(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Fc(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&&!Mi(t)){t.flags&=-3;return}let n=k,r=_e;k=t,_e=!0;try{Mc(t);let s=t.fn(t._value);(e.version===0||A.hasChanged(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{k=n,_e=r,jc(t),t.flags&=-3}}function Ki(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)Ki(i,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function sb(t){let{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function ib(t,e){t.effect instanceof jt&&(t=t.effect.fn);let n=new jt(t);e&&A.extend(n,e);try{n.run()}catch(s){throw n.stop(),s}let r=n.run.bind(n);return r.effect=n,r}function ob(t){t.effect.stop()}var _e=!0,Bi=[];function zi(){Bi.push(_e),_e=!1}function ab(){Bi.push(_e),_e=!0}function Yi(){let t=Bi.pop();_e=t===void 0?!0:t}function lb(t,e=!1){k instanceof jt?k.cleanup=t:e||ve("onEffectCleanup() was called when there was no active effect to associate with.")}function Rc(t){let{cleanup:e}=t;if(t.cleanup=void 0,e){let n=k;k=void 0;try{e()}finally{k=n}}}var Fn=0,ji=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(!k||!_e||k===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==k)n=this.activeLink=new ji(k,this),k.deps?(n.prevDep=k.depsTail,k.depsTail.nextDep=n,k.depsTail=n):k.deps=k.depsTail=n,qc(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 k.onTrack&&k.onTrack(A.extend({effect:k},e)),n}trigger(e){this.version++,Fn++,this.notify(e)}notify(e){Ui();try{for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(A.extend({effect:n.sub},e));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Wi()}}};function qc(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)qc(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 qr=new WeakMap,ft=Symbol("Object iterate"),Vr=Symbol("Map keys iterate"),rn=Symbol("Array iterate");function ie(t,e,n){if(_e&&k){let r=qr.get(t);r||qr.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 ze(t,e,n,r,s,i){let o=qr.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(Ui(),e==="clear")o.forEach(a);else{let l=A.isArray(t),u=l&&A.isIntegerKey(n);if(l&&n==="length"){let d=Number(r);o.forEach((c,h)=>{(h==="length"||h===rn||!A.isSymbol(h)&&h>=d)&&a(c)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(rn)),e){case"add":l?u&&a(o.get("length")):(a(o.get(ft)),A.isMap(t)&&a(o.get(Vr)));break;case"delete":l||(a(o.get(ft)),A.isMap(t)&&a(o.get(Vr)));break;case"set":A.isMap(t)&&a(o.get(ft));break}}Wi()}function cb(t,e){let n=qr.get(t);return n&&n.get(e)}function Mt(t){let e=I(t);return e===t?e:(ie(e,"iterate",rn),ye(t)?e:e.map(Q))}function Kr(t){return ie(t=I(t),"iterate",rn),t}var ub={__proto__:null,[Symbol.iterator](){return Di(this,Symbol.iterator,Q)},concat(...t){return Mt(this).concat(...t.map(e=>A.isArray(e)?Mt(e):e))},entries(){return Di(this,"entries",t=>(t[1]=Q(t[1]),t))},every(t,e){return Be(this,"every",t,e,void 0,arguments)},filter(t,e){return Be(this,"filter",t,e,n=>n.map(Q),arguments)},find(t,e){return Be(this,"find",t,e,Q,arguments)},findIndex(t,e){return Be(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Be(this,"findLast",t,e,Q,arguments)},findLastIndex(t,e){return Be(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Be(this,"forEach",t,e,void 0,arguments)},includes(...t){return Pi(this,"includes",t)},indexOf(...t){return Pi(this,"indexOf",t)},join(t){return Mt(this).join(t)},lastIndexOf(...t){return Pi(this,"lastIndexOf",t)},map(t,e){return Be(this,"map",t,e,void 0,arguments)},pop(){return Pn(this,"pop")},push(...t){return Pn(this,"push",t)},reduce(t,...e){return Nc(this,"reduce",t,e)},reduceRight(t,...e){return Nc(this,"reduceRight",t,e)},shift(){return Pn(this,"shift")},some(t,e){return Be(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 Di(this,"values",Q)}};function Di(t,e,n){let r=Kr(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 db=Array.prototype;function Be(t,e,n,r,s,i){let o=Kr(t),a=o!==t&&!ye(t),l=o[e];if(l!==db[e]){let c=l.apply(t,i);return a?Q(c):c}let u=n;o!==t&&(a?u=function(c,h){return n.call(this,Q(c),h,t)}:n.length>2&&(u=function(c,h){return n.call(this,c,h,t)}));let d=l.call(o,u,r);return a&&s?s(d):d}function Nc(t,e,n,r){let s=Kr(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,Q(a),l,t)}),s[e](i,...r)}function Pi(t,e,n){let r=I(t);ie(r,"iterate",rn);let s=r[e](...n);return(s===-1||s===!1)&&Zi(n[0])?(n[0]=I(n[0]),r[e](...n)):s}function Pn(t,e,n=[]){zi(),Ui();let r=I(t)[e].apply(t,n);return Wi(),Yi(),r}var hb=A.makeMap("__proto__,__v_isRef,__isVue"),Vc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(A.isSymbol));function pb(t){A.isSymbol(t)||(t=String(t));let e=I(this);return ie(e,"has",t),e.hasOwnProperty(t)}var Lr=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?Uc:Gc:i?Hc:Lc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;let o=A.isArray(e);if(!s){let l;if(o&&(l=ub[n]))return l;if(n==="hasOwnProperty")return pb}let a=Reflect.get(e,n,oe(e)?e:r);return(A.isSymbol(n)?Vc.has(n):hb(n))||(s||ie(e,"get",n),i)?a:oe(a)?o&&A.isIntegerKey(n)?a:a.value:A.isObject(a)?s?Xi(a):Ji(a):a}},Hr=class extends Lr{constructor(e=!1){super(!1,e)}set(e,n,r,s){let i=e[n];if(!this._isShallow){let l=mt(i);if(!ye(r)&&!mt(r)&&(i=I(i),r=I(r)),!A.isArray(e)&&oe(i)&&!oe(r))return l?!1:(i.value=r,!0)}let o=A.isArray(e)&&A.isIntegerKey(n)?Number(n)<e.length:A.hasOwn(e,n),a=Reflect.set(e,n,r,oe(e)?e:s);return e===I(s)&&(o?A.hasChanged(r,i)&&ze(e,"set",n,r,i):ze(e,"add",n,r)),a}deleteProperty(e,n){let r=A.hasOwn(e,n),s=e[n],i=Reflect.deleteProperty(e,n);return i&&r&&ze(e,"delete",n,void 0,s),i}has(e,n){let r=Reflect.has(e,n);return(!A.isSymbol(n)||!Vc.has(n))&&ie(e,"has",n),r}ownKeys(e){return ie(e,"iterate",A.isArray(e)?"length":ft),Reflect.ownKeys(e)}},Gr=class extends Lr{constructor(e=!1){super(!0,e)}set(e,n){return ve(`Set operation on key "${String(n)}" failed: target is readonly.`,e),!0}deleteProperty(e,n){return ve(`Delete operation on key "${String(n)}" failed: target is readonly.`,e),!0}},fb=new Hr,mb=new Gr,gb=new Hr(!0),_b=new Gr(!0),Fi=t=>t,Pr=t=>Reflect.getPrototypeOf(t);function vb(t,e,n){return function(...r){let s=this.__v_raw,i=I(s),o=A.isMap(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,u=s[t](...r),d=n?Fi:e?Ur:Q;return!e&&ie(i,"iterate",l?Vr:ft),{next(){let{value:c,done:h}=u.next();return h?{value:c,done:h}:{value:a?[d(c[0]),d(c[1])]:d(c),done:h}},[Symbol.iterator](){return this}}}}function Mr(t){return function(...e){{let n=e[0]?`on key "${e[0]}" `:"";ve(`${A.capitalize(t)} operation ${n}failed: target is readonly.`,I(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function bb(t,e){let n={get(s){let i=this.__v_raw,o=I(i),a=I(s);t||(A.hasChanged(s,a)&&ie(o,"get",s),ie(o,"get",a));let{has:l}=Pr(o),u=e?Fi:t?Ur:Q;if(l.call(o,s))return u(i.get(s));if(l.call(o,a))return u(i.get(a));i!==o&&i.get(s)},get size(){let s=this.__v_raw;return!t&&ie(I(s),"iterate",ft),Reflect.get(s,"size",s)},has(s){let i=this.__v_raw,o=I(i),a=I(s);return t||(A.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=I(a),u=e?Fi:t?Ur:Q;return!t&&ie(l,"iterate",ft),a.forEach((d,c)=>s.call(i,u(d),u(c),o))}};return A.extend(n,t?{add:Mr("add"),set:Mr("set"),delete:Mr("delete"),clear:Mr("clear")}:{add(s){!e&&!ye(s)&&!mt(s)&&(s=I(s));let i=I(this);return Pr(i).has.call(i,s)||(i.add(s),ze(i,"add",s,s)),this},set(s,i){!e&&!ye(i)&&!mt(i)&&(i=I(i));let o=I(this),{has:a,get:l}=Pr(o),u=a.call(o,s);u?kc(o,a,s):(s=I(s),u=a.call(o,s));let d=l.call(o,s);return o.set(s,i),u?A.hasChanged(i,d)&&ze(o,"set",s,i,d):ze(o,"add",s,i),this},delete(s){let i=I(this),{has:o,get:a}=Pr(i),l=o.call(i,s);l?kc(i,o,s):(s=I(s),l=o.call(i,s));let u=a?a.call(i,s):void 0,d=i.delete(s);return l&&ze(i,"delete",s,void 0,u),d},clear(){let s=I(this),i=s.size!==0,o=A.isMap(s)?new Map(s):new Set(s),a=s.clear();return i&&ze(s,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=vb(s,t,e)}),n}function Br(t,e){let n=bb(t,e);return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get(A.hasOwn(n,s)&&s in r?n:r,s,i)}var yb={get:Br(!1,!1)},wb={get:Br(!1,!0)},Cb={get:Br(!0,!1)},Sb={get:Br(!0,!0)};function kc(t,e,n){let r=I(n);if(r!==n&&e.call(t,r)){let s=A.toRawType(t);ve(`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 Lc=new WeakMap,Hc=new WeakMap,Gc=new WeakMap,Uc=new WeakMap;function xb(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ab(t){return t.__v_skip||!Object.isExtensible(t)?0:xb(A.toRawType(t))}function Ji(t){return mt(t)?t:zr(t,!1,fb,yb,Lc)}function Eb(t){return zr(t,!1,gb,wb,Hc)}function Xi(t){return zr(t,!0,mb,Cb,Gc)}function Ob(t){return zr(t,!0,_b,Sb,Uc)}function zr(t,e,n,r,s){if(!A.isObject(t))return ve(`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=Ab(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 ye(t){return!!(t&&t.__v_isShallow)}function Zi(t){return t?!!t.__v_raw:!1}function I(t){let e=t&&t.__v_raw;return e?I(e):t}function Tb(t){return!A.hasOwn(t,"__v_skip")&&Object.isExtensible(t)&&A.def(t,"__v_skip",!0),t}var Q=t=>A.isObject(t)?Ji(t):t,Ur=t=>A.isObject(t)?Xi(t):t;function oe(t){return t?t.__v_isRef===!0:!1}function Wc(t){return Kc(t,!1)}function $b(t){return Kc(t,!0)}function Kc(t,e){return oe(t)?t:new qi(t,e)}var qi=class{constructor(e,n){this.dep=new nn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:I(e),this._value=n?e:Q(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||ye(e)||mt(e);e=r?e:I(e),A.hasChanged(e,n)&&(this._rawValue=e,this._value=r?e:Q(e),this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:n}))}};function Rb(t){t.dep&&t.dep.trigger({target:t,type:"set",key:"value",newValue:t._value})}function Qi(t){return oe(t)?t.value:t}function Nb(t){return A.isFunction(t)?t():Qi(t)}var kb={get:(t,e,n)=>e==="__v_raw"?t:Qi(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 Ib(t){return tn(t)?t:new Proxy(t,kb)}var Vi=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 Db(t){return new Vi(t)}function Pb(t){Zi(t)||ve("toRefs() expects a reactive object but received a plain one.");let e=A.isArray(t)?new Array(t.length):{};for(let n in t)e[n]=Bc(t,n);return e}var Li=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 cb(I(this._object),this._key)}},Hi=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 Mb(t,e,n){return oe(t)?t:A.isFunction(t)?new Hi(t):A.isObject(t)&&arguments.length>1?Bc(t,e,n):Wc(t)}function Bc(t,e,n){let r=t[e];return oe(r)?r:new Li(t,e,n)}var Gi=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)&&k!==this)return Pc(this,!0),!0}get value(){let e=this.dep.track({target:this,type:"get",key:"value"});return Fc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter?this.setter(e):ve("Write operation failed: computed value is readonly")}};function jb(t,e,n=!1){let r,s;A.isFunction(t)?r=t:(r=t.get,s=t.set);let i=new Gi(r,s,n);return e&&!n&&(i.onTrack=e.onTrack,i.onTrigger=e.onTrigger),i}var Fb={GET:"get",HAS:"has",ITERATE:"iterate"},qb={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Vb={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},Lb={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},jr={},Wr=new WeakMap,pt;function Hb(){return pt}function zc(t,e=!1,n=pt){if(n){let r=Wr.get(n);r||Wr.set(n,r=[]),r.push(t)}else e||ve("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Gb(t,e,n=A.EMPTY_OBJ){let{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,u=N=>{(n.onWarn||ve)("Invalid watch source: ",N,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},d=N=>s?N:ye(N)||s===!1||s===0?Ye(N,1):Ye(N),c,h,p,g,m=!1,_=!1;if(oe(t)?(h=()=>t.value,m=ye(t)):tn(t)?(h=()=>d(t),m=!0):A.isArray(t)?(_=!0,m=t.some(N=>tn(N)||ye(N)),h=()=>t.map(N=>{if(oe(N))return N.value;if(tn(N))return d(N);if(A.isFunction(N))return l?l(N,2):N();u(N)})):A.isFunction(t)?e?h=l?()=>l(t,2):t:h=()=>{if(p){zi();try{p()}finally{Yi()}}let N=pt;pt=c;try{return l?l(t,3,[g]):t(g)}finally{pt=N}}:(h=A.NOOP,u(t)),e&&s){let N=h,ue=s===!0?1/0:s;h=()=>Ye(N(),ue)}let f=Ic(),v=()=>{c.stop(),f&&f.active&&A.remove(f.effects,c)};if(i&&e){let N=e;e=(...ue)=>{N(...ue),v()}}let b=_?new Array(t.length).fill(jr):jr,x=N=>{if(!(!(c.flags&1)||!c.dirty&&!N))if(e){let ue=c.run();if(s||m||(_?ue.some((at,gr)=>A.hasChanged(at,b[gr])):A.hasChanged(ue,b))){p&&p();let at=pt;pt=c;try{let gr=[ue,b===jr?void 0:_&&b[0]===jr?[]:b,g];l?l(e,3,gr):e(...gr),b=ue}finally{pt=at}}}else c.run()};return a&&a(x),c=new jt(h),c.scheduler=o?()=>o(x,!1):x,g=N=>zc(N,!1,c),p=c.onStop=()=>{let N=Wr.get(c);if(N){if(l)l(N,4);else for(let ue of N)ue();Wr.delete(c)}},c.onTrack=n.onTrack,c.onTrigger=n.onTrigger,e?r?x(!0):b=c.run():o?o(x.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function Ye(t,e=1/0,n){if(e<=0||!A.isObject(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,oe(t))Ye(t.value,e,n);else if(A.isArray(t))for(let r=0;r<t.length;r++)Ye(t[r],e,n);else if(A.isSet(t)||A.isMap(t))t.forEach(r=>{Ye(r,e,n)});else if(A.isPlainObject(t)){for(let r in t)Ye(t[r],e,n);for(let r of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,r)&&Ye(t[r],e,n)}return t}T.ARRAY_ITERATE_KEY=rn;T.EffectFlags=rb;T.EffectScope=Fr;T.ITERATE_KEY=ft;T.MAP_KEY_ITERATE_KEY=Vr;T.ReactiveEffect=jt;T.ReactiveFlags=Vb;T.TrackOpTypes=Fb;T.TriggerOpTypes=qb;T.WatchErrorCodes=Lb;T.computed=jb;T.customRef=Db;T.effect=ib;T.effectScope=tb;T.enableTracking=ab;T.getCurrentScope=Ic;T.getCurrentWatcher=Hb;T.isProxy=Zi;T.isReactive=tn;T.isReadonly=mt;T.isRef=oe;T.isShallow=ye;T.markRaw=Tb;T.onEffectCleanup=lb;T.onScopeDispose=nb;T.onWatcherCleanup=zc;T.pauseTracking=zi;T.proxyRefs=Ib;T.reactive=Ji;T.reactiveReadArray=Mt;T.readonly=Xi;T.ref=Wc;T.resetTracking=Yi;T.shallowReactive=Eb;T.shallowReadArray=Kr;T.shallowReadonly=Ob;T.shallowRef=$b;T.stop=ob;T.toRaw=I;T.toReactive=Q;T.toReadonly=Ur;T.toRef=Mb;T.toRefs=Pb;T.toValue=Nb;T.track=ie;T.traverse=Ye;T.trigger=ze;T.triggerRef=Rb;T.unref=Qi;T.watch=Gb});var Yr=y((fE,eo)=>{"use strict";process.env.NODE_ENV==="production"?eo.exports=$c():eo.exports=Yc()});var qn=y(no=>{"use strict";var Jr=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}},to=class extends Jr{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};no.CommanderError=Jr;no.InvalidArgumentError=to});var Xr=y(so=>{"use strict";var{InvalidArgumentError:Ub}=qn(),ro=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 Ub(`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 Wb(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}so.Argument=ro;so.humanReadableArgName=Wb});var oo=y(Jc=>{"use strict";var{humanReadableArgName:Kb}=Xr(),io=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=>Kb(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(g,m){if(m){let _=`${g.padEnd(r+o)}${m}`;return n.wrap(_,s-i,r+o)}return g}function l(g){return g.join(`
|
|
4
|
+
`).replace(/^/gm," ".repeat(i))}let u=[`Usage: ${n.commandUsage(e)}`,""],d=n.commandDescription(e);d.length>0&&(u=u.concat([n.wrap(d,s,0),""]));let c=n.visibleArguments(e).map(g=>a(n.argumentTerm(g),n.argumentDescription(g)));c.length>0&&(u=u.concat(["Arguments:",l(c),""]));let h=n.visibleOptions(e).map(g=>a(n.optionTerm(g),n.optionDescription(g)));if(h.length>0&&(u=u.concat(["Options:",l(h),""])),this.showGlobalOptions){let g=n.visibleGlobalOptions(e).map(m=>a(n.optionTerm(m),n.optionDescription(m)));g.length>0&&(u=u.concat(["Global Options:",l(g),""]))}let p=n.visibleCommands(e).map(g=>a(n.subcommandTerm(g),n.subcommandDescription(g)));return p.length>0&&(u=u.concat(["Commands:",l(p),""])),u.join(`
|
|
5
|
+
`)}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),u=e.slice(r).replace(`\r
|
|
6
6
|
`,`
|
|
7
|
-
`),
|
|
8
|
-
|.{1,${a-1}}([${
|
|
9
|
-
`?"":(
|
|
10
|
-
`)}};
|
|
11
|
-
(Did you mean one of ${
|
|
12
|
-
(Did you mean ${
|
|
13
|
-
- specify the name in Command constructor or using .name()`);return
|
|
14
|
-
Expecting one of '${
|
|
15
|
-
- already used by option '${
|
|
7
|
+
`),d=" ".repeat(r),h="\\s\u200B",p=new RegExp(`
|
|
8
|
+
|.{1,${a-1}}([${h}]|$)|[^${h}]+?([${h}]|$)`,"g"),g=u.match(p)||[];return l+g.map((m,_)=>m===`
|
|
9
|
+
`?"":(_>0?d:"")+m.trimEnd()).join(`
|
|
10
|
+
`)}};Jc.Help=io});var uo=y(co=>{"use strict";var{InvalidArgumentError:Bb}=qn(),ao=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=Yb(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 Bb(`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}},lo=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 Yb(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}}co.Option=ao;co.DualOptions=lo});var Zc=y(Xc=>{"use strict";function Jb(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 Xb(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=Jb(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
|
+
(Did you mean one of ${r.join(", ")}?)`:r.length===1?`
|
|
12
|
+
(Did you mean ${r[0]}?)`:""}Xc.suggestSimilar=Xb});var ru=y(nu=>{"use strict";var Zb=require("node:events").EventEmitter,ho=require("node:child_process"),Je=require("node:path"),po=require("node:fs"),W=require("node:process"),{Argument:Qb,humanReadableArgName:ey}=Xr(),{CommanderError:fo}=qn(),{Help:ty}=oo(),{Option:Qc,DualOptions:ny}=uo(),{suggestSimilar:eu}=Zc(),mo=class t extends Zb{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=>W.stdout.write(n),writeErr:n=>W.stderr.write(n),getOutHelpWidth:()=>W.stdout.isTTY?W.stdout.columns:void 0,getErrHelpWidth:()=>W.stderr.isTTY?W.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 ty,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
|
|
13
|
+
- 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 Qb(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}'.
|
|
14
|
+
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 fo(e,n,r)),W.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 Qc(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}'
|
|
15
|
+
- 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 Qc)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,u)=>{let d=a.exec(l);return d?d[0]:u},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){W.versions?.electron&&(n.from="electron");let s=W.execArgv??[];(s.includes("-e")||s.includes("--eval")||s.includes("-p")||s.includes("--print"))&&(n.from="eval")}e===void 0&&(e=W.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":W.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(d,c){let h=Je.resolve(d,c);if(po.existsSync(h))return h;if(s.includes(Je.extname(c)))return;let p=s.find(g=>po.existsSync(`${h}${g}`));if(p)return`${h}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let d;try{d=po.realpathSync(this._scriptPath)}catch{d=this._scriptPath}a=Je.resolve(Je.dirname(d),a)}if(a){let d=i(a,o);if(!d&&!e._executableFile&&this._scriptPath){let c=Je.basename(this._scriptPath,Je.extname(this._scriptPath));c!==this._name&&(d=i(a,`${c}-${e._name}`))}o=d||o}r=s.includes(Je.extname(o));let l;W.platform!=="win32"?r?(n.unshift(o),n=tu(W.execArgv).concat(n),l=ho.spawn(W.argv[0],n,{stdio:"inherit"})):l=ho.spawn(o,n,{stdio:"inherit"}):(n.unshift(o),n=tu(W.execArgv).concat(n),l=ho.spawn(W.execPath,n,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{W.on(c,()=>{l.killed===!1&&l.exitCode===null&&l.kill(c)})});let u=this._exitCallback;l.on("close",d=>{d=d??1,u?u(new fo(d,"commander.executeSubCommandAsync","(close)")):W.exit(d)}),l.on("error",d=>{if(d.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
|
|
16
16
|
- if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
17
17
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
18
|
-
- ${
|
|
18
|
+
- ${c}`;throw new Error(h)}else if(d.code==="EACCES")throw new Error(`'${o}' not executable`);if(!u)W.exit(1);else{let c=new fo(1,"commander.executeSubCommandAsync","(error)");c.nestedError=d,u(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 u=this._findOption(l);if(u){if(u.required){let d=i.shift();d===void 0&&this.optionMissingArgument(u),this.emit(`option:${u.name()}`,d)}else if(u.optional){let d=null;i.length>0&&!o(i[0])&&(d=i.shift()),this.emit(`option:${u.name()}`,d)}else this.emit(`option:${u.name()}`);a=u.variadic?u:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let u=this._findOption(`-${l[1]}`);if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${u.name()}`,l.slice(2)):(this.emit(`option:${u.name()}`),i.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let u=l.indexOf("="),d=this._findOption(l.slice(0,u));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,l.slice(u+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
19
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
20
20
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
21
|
-
`),this.outputHelp({error:!0}));let
|
|
22
|
-
`),this._exit(0,"commander.version",e)}),this}description(e,
|
|
23
|
-
Expecting one of '${
|
|
24
|
-
`)}),this}_outputHelpIfRequested(e){let
|
|
25
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var
|
|
21
|
+
`),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 W.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()}`,W.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new ny(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),u=this.options.find(c=>c.negate&&a===c.attributeName()),d=this.options.find(c=>!c.negate&&a===c.attributeName());return u&&(u.presetArg===void 0&&l===!1||u.presetArg!==void 0&&l===u.presetArg)?u:d||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=eu(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=eu(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}
|
|
22
|
+
`),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=>ey(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=Je.basename(e,Je.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=W.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.
|
|
23
|
+
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}
|
|
24
|
+
`)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(s=>n.is(s))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function tu(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})}nu.Command=mo});var au=y(we=>{"use strict";var{Argument:su}=Xr(),{Command:go}=ru(),{CommanderError:ry,InvalidArgumentError:iu}=qn(),{Help:sy}=oo(),{Option:ou}=uo();we.program=new go;we.createCommand=t=>new go(t);we.createOption=(t,e)=>new ou(t,e);we.createArgument=(t,e)=>new su(t,e);we.Command=go;we.Option=ou;we.Argument=su;we.Help=sy;we.CommanderError=ry;we.InvalidArgumentError=iu;we.InvalidOptionArgumentError=iu});var L=y((kE,du)=>{"use strict";var{FORCE_COLOR:iy,NODE_DISABLE_COLORS:oy,TERM:ay}=process.env,P={enabled:!oy&&ay!=="dumb"&&iy!=="0",reset:F(0,0),bold:F(1,22),dim:F(2,22),italic:F(3,23),underline:F(4,24),inverse:F(7,27),hidden:F(8,28),strikethrough:F(9,29),black:F(30,39),red:F(31,39),green:F(32,39),yellow:F(33,39),blue:F(34,39),magenta:F(35,39),cyan:F(36,39),white:F(37,39),gray:F(90,39),grey:F(90,39),bgBlack:F(40,49),bgRed:F(41,49),bgGreen:F(42,49),bgYellow:F(43,49),bgBlue:F(44,49),bgMagenta:F(45,49),bgCyan:F(46,49),bgWhite:F(47,49)};function uu(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 ly(t,e){let n={has:t,keys:e};return n.reset=P.reset.bind(n),n.bold=P.bold.bind(n),n.dim=P.dim.bind(n),n.italic=P.italic.bind(n),n.underline=P.underline.bind(n),n.inverse=P.inverse.bind(n),n.hidden=P.hidden.bind(n),n.strikethrough=P.strikethrough.bind(n),n.black=P.black.bind(n),n.red=P.red.bind(n),n.green=P.green.bind(n),n.yellow=P.yellow.bind(n),n.blue=P.blue.bind(n),n.magenta=P.magenta.bind(n),n.cyan=P.cyan.bind(n),n.white=P.white.bind(n),n.gray=P.gray.bind(n),n.grey=P.grey.bind(n),n.bgBlack=P.bgBlack.bind(n),n.bgRed=P.bgRed.bind(n),n.bgGreen=P.bgGreen.bind(n),n.bgYellow=P.bgYellow.bind(n),n.bgBlue=P.bgBlue.bind(n),n.bgMagenta=P.bgMagenta.bind(n),n.bgCyan=P.bgCyan.bind(n),n.bgWhite=P.bgWhite.bind(n),n}function F(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:P.enabled?uu(this.keys,r+""):r+""):r===void 0?ly([t],[n]):P.enabled?uu([n],r+""):r+""}}du.exports=P});var pu=y((IE,hu)=>{"use strict";hu.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 Zr=y((DE,fu)=>{"use strict";fu.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 G=y((PE,mu)=>{"use strict";var _o="\x1B",H=`${_o}[`,cy="\x07",vo={to(t,e){return e?`${H}${e+1};${t+1}H`:`${H}${t+1}G`},move(t,e){let n="";return t<0?n+=`${H}${-t}D`:t>0&&(n+=`${H}${t}C`),e<0?n+=`${H}${-e}A`:e>0&&(n+=`${H}${e}B`),n},up:(t=1)=>`${H}${t}A`,down:(t=1)=>`${H}${t}B`,forward:(t=1)=>`${H}${t}C`,backward:(t=1)=>`${H}${t}D`,nextLine:(t=1)=>`${H}E`.repeat(t),prevLine:(t=1)=>`${H}F`.repeat(t),left:`${H}G`,hide:`${H}?25l`,show:`${H}?25h`,save:`${_o}7`,restore:`${_o}8`},uy={up:(t=1)=>`${H}S`.repeat(t),down:(t=1)=>`${H}T`.repeat(t)},dy={screen:`${H}2J`,up:(t=1)=>`${H}1J`.repeat(t),down:(t=1)=>`${H}J`.repeat(t),line:`${H}2K`,lineEnd:`${H}K`,lineStart:`${H}1K`,lines(t){let e="";for(let n=0;n<t;n++)e+=this.line+(n<t-1?vo.up():"");return t&&(e+=vo.left),e}};mu.exports={cursor:vo,scroll:uy,erase:dy,beep:cy}});var yu=y((ME,bu)=>{"use strict";function hy(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=py(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(u){throw u},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
25
|
+
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 u=n.next();return i=u.done,u},e:function(u){o=!0,a=u},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}}}function py(t,e){if(t){if(typeof t=="string")return gu(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 gu(t,e)}}function gu(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 fy=Zr(),vu=G(),_u=vu.erase,my=vu.cursor,gy=t=>[...fy(t)].length;bu.exports=function(t,e){if(!e)return _u.line+my.to(0);let n=0,r=t.split(/\r?\n/);var s=hy(r),i;try{for(s.s();!(i=s.n()).done;){let o=i.value;n+=1+Math.floor(Math.max(gy(o)-1,0)/e)}}catch(o){s.e(o)}finally{s.f()}return _u.lines(n)}});var bo=y((jE,wu)=>{"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"},_y={arrowUp:Vn.arrowUp,arrowDown:Vn.arrowDown,arrowLeft:Vn.arrowLeft,arrowRight:Vn.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},vy=process.platform==="win32"?_y:Vn;wu.exports=vy});var Su=y((FE,Cu)=>{"use strict";var sn=L(),Ft=bo(),yo=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}`}}),by=t=>yo[t]||yo.default,Ln=Object.freeze({aborted:sn.red(Ft.cross),done:sn.green(Ft.tick),exited:sn.yellow(Ft.cross),default:sn.cyan("?")}),yy=(t,e,n)=>e?Ln.aborted:n?Ln.exited:t?Ln.done:Ln.default,wy=t=>sn.gray(t?Ft.ellipsis:Ft.pointerSmall),Cy=(t,e)=>sn.gray(t?e?Ft.pointerSmall:"+":Ft.line);Cu.exports={styles:yo,render:by,symbols:Ln,symbol:yy,delimiter:wy,item:Cy}});var Au=y((qE,xu)=>{"use strict";var Sy=Zr();xu.exports=function(t,e){let n=String(Sy(t)||"").split(/\r?\n/);return e?n.map(r=>Math.ceil(r.length/e)).reduce((r,s)=>r+s):n.length}});var Ou=y((VE,Eu)=>{"use strict";Eu.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(`
|
|
26
26
|
`)).join(`
|
|
27
|
-
`)}});var
|
|
28
|
-
`),this.close()}validate(){var e=this;return
|
|
29
|
-
`),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,
|
|
30
|
-
`).reduce((e,
|
|
31
|
-
${
|
|
27
|
+
`)}});var $u=y((LE,Tu)=>{"use strict";Tu.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 Ee=y((HE,Ru)=>{"use strict";Ru.exports={action:pu(),clear:yu(),style:Su(),strip:Zr(),figures:bo(),lines:Au(),wrap:Ou(),entriesToDisplay:$u()}});var Xe=y((GE,Iu)=>{"use strict";var Nu=require("readline"),xy=Ee(),Ay=xy.action,Ey=require("events"),ku=G(),Oy=ku.beep,Ty=ku.cursor,$y=L(),wo=class extends Ey{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=Nu.createInterface({input:this.in,escapeCodeTimeout:50});Nu.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=Ay(o,r);a===!1?this._&&this._(i,o):typeof this[a]=="function"?this[a](o):this.bell()};this.close=()=>{this.out.write(Ty.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(Oy)}render(){this.onRender($y),this.firstRender&&(this.firstRender=!1)}};Iu.exports=wo});var Fu=y((UE,ju)=>{"use strict";function Du(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(u){n(u);return}a.done?e(l):Promise.resolve(l).then(r,s)}function Pu(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){Du(i,r,s,o,a,"next",l)}function a(l){Du(i,r,s,o,a,"throw",l)}o(void 0)})}}var Qr=L(),Ry=Xe(),Mu=G(),Ny=Mu.erase,Hn=Mu.cursor,es=Ee(),Co=es.style,So=es.clear,ky=es.lines,Iy=es.figures,xo=class extends Ry{constructor(e={}){super(e),this.transform=Co.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=So("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=Qr.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(`
|
|
28
|
+
`),this.close()}validate(){var e=this;return Pu(function*(){let n=yield e.validator(e.value);typeof n=="string"&&(e.errorMsg=n,n=!1),e.error=!n})()}submit(){var e=this;return Pu(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(`
|
|
29
|
+
`),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(ky(this.outputError,this.out.columns)-1)+So(this.outputError,this.out.columns)),this.out.write(So(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Co.symbol(this.done,this.aborted),Qr.bold(this.msg),Co.delimiter(this.done),this.red?Qr.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
30
|
+
`).reduce((e,n,r)=>e+`
|
|
31
|
+
${r?" ":Iy.pointerSmall} ${Qr.red().italic(n)}`,"")),this.out.write(Ny.line+Hn.to(0)+this.outputText+Hn.save+this.outputError+Hn.restore+Hn.move(this.cursorOffset,0)))}};ju.exports=xo});var Hu=y((WE,Lu)=>{"use strict";var Ze=L(),Dy=Xe(),Gn=Ee(),qu=Gn.style,Vu=Gn.clear,ts=Gn.figures,Py=Gn.wrap,My=Gn.entriesToDisplay,jy=G(),Fy=jy.cursor,Ao=class extends Dy{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=Vu("",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
32
|
`),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
33
|
-
`),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,
|
|
34
|
-
`;for(let
|
|
35
|
-
`+
|
|
36
|
-
`}}this.out.write(this.outputText)}};
|
|
33
|
+
`),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(Fy.hide):this.out.write(Vu(this.outputText,this.out.columns)),super.render();let e=My(this.cursor,this.choices.length,this.optionsPerPage),n=e.startIndex,r=e.endIndex;if(this.outputText=[qu.symbol(this.done,this.aborted),Ze.bold(this.msg),qu.delimiter(!1),this.done?this.selection.title:this.selection.disabled?Ze.yellow(this.warn):Ze.gray(this.hint)].join(" "),!this.done){this.outputText+=`
|
|
34
|
+
`;for(let s=n;s<r;s++){let i,o,a="",l=this.choices[s];s===n&&n>0?o=ts.arrowUp:s===r-1&&r<this.choices.length?o=ts.arrowDown:o=" ",l.disabled?(i=this.cursor===s?Ze.gray().underline(l.title):Ze.strikethrough().gray(l.title),o=(this.cursor===s?Ze.bold().gray(ts.pointer)+" ":" ")+o):(i=this.cursor===s?Ze.cyan().underline(l.title):l.title,o=(this.cursor===s?Ze.cyan(ts.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=`
|
|
35
|
+
`+Py(l.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${i}${Ze.gray(a)}
|
|
36
|
+
`}}this.out.write(this.outputText)}};Lu.exports=Ao});var zu=y((KE,Bu)=>{"use strict";var ns=L(),qy=Xe(),Wu=Ee(),Gu=Wu.style,Vy=Wu.clear,Ku=G(),Uu=Ku.cursor,Ly=Ku.erase,Eo=class extends qy{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(`
|
|
37
37
|
`),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
38
|
-
`),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,
|
|
39
|
-
`),this.close()}validate(){var e=this;return
|
|
40
|
-
`),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(
|
|
41
|
-
`).reduce((e,
|
|
42
|
-
${
|
|
43
|
-
`),this.close()}validate(){var e=this;return
|
|
44
|
-
`),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,
|
|
45
|
-
`).reduce((e,
|
|
46
|
-
${
|
|
47
|
-
`),this.close()}submit(){let e=this.value.filter(
|
|
48
|
-
`),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(
|
|
38
|
+
`),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(Uu.hide):this.out.write(Vy(this.outputText,this.out.columns)),super.render(),this.outputText=[Gu.symbol(this.done,this.aborted),ns.bold(this.msg),Gu.delimiter(this.done),this.value?this.inactive:ns.cyan().underline(this.inactive),ns.gray("/"),this.value?ns.cyan().underline(this.active):this.active].join(" "),this.out.write(Ly.line+Uu.to(0)+this.outputText))}};Bu.exports=Eo});var ke=y((BE,Yu)=>{"use strict";var Oo=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)}};Yu.exports=Oo});var Xu=y((zE,Ju)=>{"use strict";var Hy=ke(),To=class extends Hy{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}};Ju.exports=To});var Qu=y((YE,Zu)=>{"use strict";var Gy=ke(),Uy=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),$o=class extends Gy{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+Uy(e):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:e}};Zu.exports=$o});var td=y((JE,ed)=>{"use strict";var Wy=ke(),Ro=class extends Wy{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}};ed.exports=Ro});var rd=y((XE,nd)=>{"use strict";var Ky=ke(),No=class extends Ky{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)}};nd.exports=No});var id=y((ZE,sd)=>{"use strict";var By=ke(),ko=class extends By{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}};sd.exports=ko});var ad=y((QE,od)=>{"use strict";var zy=ke(),Io=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)}};od.exports=Io});var cd=y((eO,ld)=>{"use strict";var Yy=ke(),Do=class extends Yy{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}};ld.exports=Do});var dd=y((tO,ud)=>{"use strict";var Jy=ke(),Po=class extends Jy{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}};ud.exports=Po});var pd=y((nO,hd)=>{"use strict";hd.exports={DatePart:ke(),Meridiem:Xu(),Day:Qu(),Hours:td(),Milliseconds:rd(),Minutes:id(),Month:ad(),Seconds:cd(),Year:dd()}});var Sd=y((rO,Cd)=>{"use strict";function fd(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(u){n(u);return}a.done?e(l):Promise.resolve(l).then(r,s)}function md(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){fd(i,r,s,o,a,"next",l)}function a(l){fd(i,r,s,o,a,"throw",l)}o(void 0)})}}var Mo=L(),Xy=Xe(),Fo=Ee(),gd=Fo.style,_d=Fo.clear,Zy=Fo.figures,wd=G(),Qy=wd.erase,vd=wd.cursor,Qe=pd(),bd=Qe.DatePart,ew=Qe.Meridiem,tw=Qe.Day,nw=Qe.Hours,rw=Qe.Milliseconds,sw=Qe.Minutes,iw=Qe.Month,ow=Qe.Seconds,aw=Qe.Year,lw=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,yd={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new tw(t),3:t=>new iw(t),4:t=>new aw(t),5:t=>new ew(t),6:t=>new nw(t),7:t=>new sw(t),8:t=>new ow(t),9:t=>new rw(t)},cw={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(",")},jo=class extends Xy{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(cw,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=_d("",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=lw.exec(e);){let s=n.shift(),i=n.findIndex(o=>o!=null);this.parts.push(i in yd?yd[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 bd)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
39
|
+
`),this.close()}validate(){var e=this;return md(function*(){let n=yield e.validator(e.value);typeof n=="string"&&(e.errorMsg=n,n=!1),e.error=!n})()}submit(){var e=this;return md(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(`
|
|
40
|
+
`),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 bd)),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(vd.hide):this.out.write(_d(this.outputText,this.out.columns)),super.render(),this.outputText=[gd.symbol(this.done,this.aborted),Mo.bold(this.msg),gd.delimiter(!1),this.parts.reduce((e,n,r)=>e.concat(r===this.cursor&&!this.done?Mo.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
|
|
41
|
+
`).reduce((e,n,r)=>e+`
|
|
42
|
+
${r?" ":Zy.pointerSmall} ${Mo.red().italic(n)}`,"")),this.out.write(Qy.line+vd.to(0)+this.outputText))}};Cd.exports=jo});var Rd=y((sO,$d)=>{"use strict";function xd(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(u){n(u);return}a.done?e(l):Promise.resolve(l).then(r,s)}function Ad(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){xd(i,r,s,o,a,"next",l)}function a(l){xd(i,r,s,o,a,"throw",l)}o(void 0)})}}var rs=L(),uw=Xe(),Td=G(),ss=Td.cursor,dw=Td.erase,is=Ee(),qo=is.style,hw=is.figures,Ed=is.clear,pw=is.lines,fw=/[0-9]/,Vo=t=>t!==void 0,Od=(t,e)=>{let n=Math.pow(10,e);return Math.round(t*n)/n},Lo=class extends uw{constructor(e={}){super(e),this.transform=qo.render(e.style),this.msg=e.message,this.initial=Vo(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=Vo(e.min)?e.min:-1/0,this.max=Vo(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=rs.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${Od(e,this.round)}`),this._value=Od(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||fw.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(`
|
|
43
|
+
`),this.close()}validate(){var e=this;return Ad(function*(){let n=yield e.validator(e.value);typeof n=="string"&&(e.errorMsg=n,n=!1),e.error=!n})()}submit(){var e=this;return Ad(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(`
|
|
44
|
+
`),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(ss.down(pw(this.outputError,this.out.columns)-1)+Ed(this.outputError,this.out.columns)),this.out.write(Ed(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[qo.symbol(this.done,this.aborted),rs.bold(this.msg),qo.delimiter(this.done),!this.done||!this.done&&!this.placeholder?rs[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
45
|
+
`).reduce((e,n,r)=>e+`
|
|
46
|
+
${r?" ":hw.pointerSmall} ${rs.red().italic(n)}`,"")),this.out.write(dw.line+ss.to(0)+this.outputText+ss.save+this.outputError+ss.restore))}};$d.exports=Lo});var Go=y((iO,Id)=>{"use strict";var Ie=L(),mw=G(),gw=mw.cursor,_w=Xe(),Un=Ee(),Nd=Un.clear,gt=Un.figures,kd=Un.style,vw=Un.wrap,bw=Un.entriesToDisplay,Ho=class extends _w{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=Nd("",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
|
+
`),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(`
|
|
48
|
+
`),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:`
|
|
49
49
|
Instructions:
|
|
50
|
-
${
|
|
51
|
-
${
|
|
50
|
+
${gt.arrowUp}/${gt.arrowDown}: Highlight option
|
|
51
|
+
${gt.arrowLeft}/${gt.arrowRight}/[space]: Toggle selection
|
|
52
52
|
`+(this.maxChoices===void 0?` a: Toggle all
|
|
53
|
-
`:"")+" enter/return: Complete answer":""}renderOption(e,
|
|
54
|
-
`+
|
|
53
|
+
`:"")+" enter/return: Complete answer":""}renderOption(e,n,r,s){let i=(n.selected?Ie.green(gt.radioOn):gt.radioOff)+" "+s+" ",o,a;return n.disabled?o=e===r?Ie.gray().underline(n.title):Ie.strikethrough().gray(n.title):(o=e===r?Ie.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=`
|
|
54
|
+
`+vw(n.description,{margin:i.length,width:this.out.columns})))),i+o+Ie.gray(a||"")}paginateOptions(e){if(e.length===0)return Ie.red("No matches for this query.");let n=bw(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`
|
|
55
55
|
`+o.join(`
|
|
56
|
-
`)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(
|
|
56
|
+
`)}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=[Ie.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(Ie.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(gw.hide),super.render();let e=[kd.symbol(this.done,this.aborted),Ie.bold(this.msg),kd.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Ie.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=Nd(e,this.out.columns)}};Id.exports=Ho});var Vd=y((oO,qd)=>{"use strict";function Dd(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(u){n(u);return}a.done?e(l):Promise.resolve(l).then(r,s)}function yw(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){Dd(i,r,s,o,a,"next",l)}function a(l){Dd(i,r,s,o,a,"throw",l)}o(void 0)})}}var Wn=L(),ww=Xe(),Fd=G(),Cw=Fd.erase,Pd=Fd.cursor,Kn=Ee(),Uo=Kn.style,Md=Kn.clear,Wo=Kn.figures,Sw=Kn.wrap,xw=Kn.entriesToDisplay,jd=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),Aw=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),Ew=(t,e)=>{let n=t.findIndex(r=>r.value===e||r.title===e);return n>-1?n:void 0},Ko=class extends ww{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:Ew(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=Uo.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Md("",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=jd(this.suggestions,e):this.value=this.fallback.value,this.fire()}complete(e){var n=this;return yw(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:Aw(l,a),value:jd(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
57
|
`),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
58
58
|
`),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
59
|
-
`),this.close()}_(e,
|
|
60
|
-
`+
|
|
59
|
+
`),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?Wo.arrowUp:s?Wo.arrowDown:" ",a=n?Wn.cyan().underline(e.title):e.title;return o=(n?Wn.cyan(Wo.pointer)+" ":" ")+o,e.description&&(i=` - ${e.description}`,(o.length+a.length+i.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(i=`
|
|
60
|
+
`+Sw(e.description,{margin:3,width:this.out.columns}))),o+" "+a+Wn.gray(i||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Pd.hide):this.out.write(Md(this.outputText,this.out.columns)),super.render();let e=xw(this.select,this.choices.length,this.limit),n=e.startIndex,r=e.endIndex;if(this.outputText=[Uo.symbol(this.done,this.aborted,this.exited),Wn.bold(this.msg),Uo.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(`
|
|
61
61
|
`);this.outputText+=`
|
|
62
|
-
`+(
|
|
62
|
+
`+(s||Wn.gray(this.fallback.title))}this.out.write(Cw.line+Pd.to(0)+this.outputText)}};qd.exports=Ko});var Ud=y((aO,Gd)=>{"use strict";var et=L(),Ow=G(),Tw=Ow.cursor,$w=Go(),zo=Ee(),Ld=zo.clear,Hd=zo.style,on=zo.figures,Bo=class extends $w{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=Ld("",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
63
|
Instructions:
|
|
64
|
-
${
|
|
65
|
-
${
|
|
64
|
+
${on.arrowUp}/${on.arrowDown}: Highlight option
|
|
65
|
+
${on.arrowLeft}/${on.arrowRight}/[space]: Toggle selection
|
|
66
66
|
[a,b,c]/delete: Filter choices
|
|
67
67
|
enter/return: Complete answer
|
|
68
68
|
`:""}renderCurrentInput(){return`
|
|
69
|
-
Filtered results for: ${this.inputValue?this.inputValue:
|
|
70
|
-
`}renderOption(e,
|
|
69
|
+
Filtered results for: ${this.inputValue?this.inputValue:et.gray("Enter something to filter")}
|
|
70
|
+
`}renderOption(e,n,r){let s;return n.disabled?s=e===r?et.gray().underline(n.title):et.strikethrough().gray(n.title):s=e===r?et.cyan().underline(n.title):n.title,(n.selected?et.green(on.radioOn):on.radioOff)+" "+s}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let e=[et.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(et.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(Tw.hide),super.render();let e=[Hd.symbol(this.done,this.aborted),et.bold(this.msg),Hd.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=et.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=Ld(e,this.out.columns)}};Gd.exports=Bo});var Xd=y((lO,Jd)=>{"use strict";var Wd=L(),Rw=Xe(),zd=Ee(),Kd=zd.style,Nw=zd.clear,Yd=G(),kw=Yd.erase,Bd=Yd.cursor,Yo=class extends Rw{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(`
|
|
71
71
|
`),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
72
|
-
`),this.close()}_(e,
|
|
73
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var
|
|
72
|
+
`),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(Bd.hide):this.out.write(Nw(this.outputText,this.out.columns)),super.render(),this.outputText=[Kd.symbol(this.done,this.aborted),Wd.bold(this.msg),Kd.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Wd.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(kw.line+Bd.to(0)+this.outputText))}};Jd.exports=Yo});var Qd=y((cO,Zd)=>{"use strict";Zd.exports={TextPrompt:Fu(),SelectPrompt:Hu(),TogglePrompt:zu(),DatePrompt:Sd(),NumberPrompt:Rd(),MultiselectPrompt:Go(),AutocompletePrompt:Vd(),AutocompleteMultiselectPrompt:Ud(),ConfirmPrompt:Xd()}});var th=y(eh=>{"use strict";var de=eh,Iw=Qd(),os=t=>t;function De(t,e,n={}){return new Promise((r,s)=>{let i=new Iw[t](e),o=n.onAbort||os,a=n.onSubmit||os,l=n.onExit||os;i.on("state",e.onState||os),i.on("submit",u=>r(a(u))),i.on("exit",u=>r(l(u))),i.on("abort",u=>s(o(u)))})}de.text=t=>De("TextPrompt",t);de.password=t=>(t.style="password",de.text(t));de.invisible=t=>(t.style="invisible",de.text(t));de.number=t=>De("NumberPrompt",t);de.date=t=>De("DatePrompt",t);de.confirm=t=>De("ConfirmPrompt",t);de.list=t=>{let e=t.separator||",";return De("TextPrompt",t,{onSubmit:n=>n.split(e).map(r=>r.trim())})};de.toggle=t=>De("TogglePrompt",t);de.select=t=>De("SelectPrompt",t);de.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=n=>n.filter(r=>r.selected).map(r=>r.value);return De("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};de.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=n=>n.filter(r=>r.selected).map(r=>r.value);return De("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var Dw=(t,e)=>Promise.resolve(e.filter(n=>n.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));de.autocomplete=t=>(t.suggest=t.suggest||Dw,t.choices=[].concat(t.choices||[]),De("AutocompletePrompt",t))});var ch=y((dO,lh)=>{"use strict";function nh(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 rh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nh(Object(n),!0).forEach(function(r){Pw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nh(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Pw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mw(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=jw(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(u){throw u},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
73
|
+
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 u=n.next();return i=u.done,u},e:function(u){o=!0,a=u},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}}}function jw(t,e){if(t){if(typeof t=="string")return sh(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 sh(t,e)}}function sh(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 ih(t,e,n,r,s,i,o){try{var a=t[i](o),l=a.value}catch(u){n(u);return}a.done?e(l):Promise.resolve(l).then(r,s)}function oh(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function o(l){ih(i,r,s,o,a,"next",l)}function a(l){ih(i,r,s,o,a,"throw",l)}o(void 0)})}}var Jo=th(),Fw=["suggest","format","onState","validate","onRender","type"],ah=()=>{};function _t(){return Xo.apply(this,arguments)}function Xo(){return Xo=oh(function*(t=[],{onSubmit:e=ah,onCancel:n=ah}={}){let r={},s=_t._override||{};t=[].concat(t);let i,o,a,l,u,d,c=function(){var _=oh(function*(f,v,b=!1){if(!(!b&&f.validate&&f.validate(v)!==!0))return f.format?yield f.format(v,r):v});return function(v,b){return _.apply(this,arguments)}}();var h=Mw(t),p;try{for(h.s();!(p=h.n()).done;){o=p.value;var g=o;if(l=g.name,u=g.type,typeof u=="function"&&(u=yield u(i,rh({},r),o),o.type=u),!!u){for(let _ in o){if(Fw.includes(_))continue;let f=o[_];o[_]=typeof f=="function"?yield f(i,rh({},r),d):f}if(d=o,typeof o.message!="string")throw new Error("prompt message is required");var m=o;if(l=m.name,u=m.type,Jo[u]===void 0)throw new Error(`prompt type (${u}) 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?qw(_t._injected,o.initial):yield Jo[u](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}),Xo.apply(this,arguments)}function qw(t,e){let n=t.shift();if(n instanceof Error)throw n;return n===void 0?e:n}function Vw(t){_t._injected=(_t._injected||[]).concat(t)}function Lw(t){_t._override=Object.assign({},t)}lh.exports=Object.assign(_t,{prompt:_t,prompts:Jo,inject:Vw,override:Lw})});var dh=y((hO,uh)=>{"use strict";uh.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 as=y((pO,hh)=>{"use strict";hh.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 mh=y((fO,fh)=>{"use strict";var Hw=as(),{erase:ph,cursor:Gw}=G(),Uw=t=>[...Hw(t)].length;fh.exports=function(t,e){if(!e)return ph.line+Gw.to(0);let n=0,r=t.split(/\r?\n/);for(let s of r)n+=1+Math.floor(Math.max(Uw(s)-1,0)/e);return ph.lines(n)}});var Zo=y((mO,gh)=>{"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"},Ww={arrowUp:Bn.arrowUp,arrowDown:Bn.arrowDown,arrowLeft:Bn.arrowLeft,arrowRight:Bn.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},Kw=process.platform==="win32"?Ww:Bn;gh.exports=Kw});var vh=y((gO,_h)=>{"use strict";var an=L(),qt=Zo(),Qo=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}`}}),Bw=t=>Qo[t]||Qo.default,zn=Object.freeze({aborted:an.red(qt.cross),done:an.green(qt.tick),exited:an.yellow(qt.cross),default:an.cyan("?")}),zw=(t,e,n)=>e?zn.aborted:n?zn.exited:t?zn.done:zn.default,Yw=t=>an.gray(t?qt.ellipsis:qt.pointerSmall),Jw=(t,e)=>an.gray(t?e?qt.pointerSmall:"+":qt.line);_h.exports={styles:Qo,render:Bw,symbols:zn,symbol:zw,delimiter:Yw,item:Jw}});var yh=y((_O,bh)=>{"use strict";var Xw=as();bh.exports=function(t,e){let n=String(Xw(t)||"").split(/\r?\n/);return e?n.map(r=>Math.ceil(r.length/e)).reduce((r,s)=>r+s):n.length}});var Ch=y((vO,wh)=>{"use strict";wh.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(`
|
|
74
74
|
`)).join(`
|
|
75
|
-
`)}});var
|
|
75
|
+
`)}});var xh=y((bO,Sh)=>{"use strict";Sh.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=y((yO,Ah)=>{"use strict";Ah.exports={action:dh(),clear:mh(),style:vh(),strip:as(),figures:Zo(),lines:yh(),wrap:Ch(),entriesToDisplay:xh()}});var tt=y((wO,Oh)=>{"use strict";var Eh=require("readline"),{action:Zw}=Oe(),Qw=require("events"),{beep:eC,cursor:tC}=G(),nC=L(),ea=class extends Qw{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=Eh.createInterface({input:this.in,escapeCodeTimeout:50});Eh.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=Zw(o,r);a===!1?this._&&this._(i,o):typeof this[a]=="function"?this[a](o):this.bell()};this.close=()=>{this.out.write(tC.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(eC)}render(){this.onRender(nC),this.firstRender&&(this.firstRender=!1)}};Oh.exports=ea});var $h=y((CO,Th)=>{"use strict";var ls=L(),rC=tt(),{erase:sC,cursor:Yn}=G(),{style:ta,clear:na,lines:iC,figures:oC}=Oe(),ra=class extends rC{constructor(e={}){super(e),this.transform=ta.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=na("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=ls.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
76
|
`),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(`
|
|
77
|
-
`),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,
|
|
78
|
-
`).reduce((e,
|
|
79
|
-
${
|
|
77
|
+
`),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(iC(this.outputError,this.out.columns)-1)+na(this.outputError,this.out.columns)),this.out.write(na(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[ta.symbol(this.done,this.aborted),ls.bold(this.msg),ta.delimiter(this.done),this.red?ls.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
78
|
+
`).reduce((e,n,r)=>e+`
|
|
79
|
+
${r?" ":oC.pointerSmall} ${ls.red().italic(n)}`,"")),this.out.write(sC.line+Yn.to(0)+this.outputText+Yn.save+this.outputError+Yn.restore+Yn.move(this.cursorOffset,0)))}};Th.exports=ra});var Ih=y((SO,kh)=>{"use strict";var nt=L(),aC=tt(),{style:Rh,clear:Nh,figures:cs,wrap:lC,entriesToDisplay:cC}=Oe(),{cursor:uC}=G(),sa=class extends aC{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=Nh("",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
80
|
`),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
81
|
-
`),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,
|
|
82
|
-
`;for(let
|
|
83
|
-
`+
|
|
84
|
-
`}}this.out.write(this.outputText)}};
|
|
81
|
+
`),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(uC.hide):this.out.write(Nh(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:n}=cC(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Rh.symbol(this.done,this.aborted),nt.bold(this.msg),Rh.delimiter(!1),this.done?this.selection.title:this.selection.disabled?nt.yellow(this.warn):nt.gray(this.hint)].join(" "),!this.done){this.outputText+=`
|
|
82
|
+
`;for(let r=e;r<n;r++){let s,i,o="",a=this.choices[r];r===e&&e>0?i=cs.arrowUp:r===n-1&&n<this.choices.length?i=cs.arrowDown:i=" ",a.disabled?(s=this.cursor===r?nt.gray().underline(a.title):nt.strikethrough().gray(a.title),i=(this.cursor===r?nt.bold().gray(cs.pointer)+" ":" ")+i):(s=this.cursor===r?nt.cyan().underline(a.title):a.title,i=(this.cursor===r?nt.cyan(cs.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=`
|
|
83
|
+
`+lC(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${i} ${s}${nt.gray(o)}
|
|
84
|
+
`}}this.out.write(this.outputText)}};kh.exports=sa});var jh=y((xO,Mh)=>{"use strict";var us=L(),dC=tt(),{style:Dh,clear:hC}=Oe(),{cursor:Ph,erase:pC}=G(),ia=class extends dC{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(`
|
|
85
85
|
`),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
86
|
-
`),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,
|
|
86
|
+
`),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(Ph.hide):this.out.write(hC(this.outputText,this.out.columns)),super.render(),this.outputText=[Dh.symbol(this.done,this.aborted),us.bold(this.msg),Dh.delimiter(this.done),this.value?this.inactive:us.cyan().underline(this.inactive),us.gray("/"),this.value?us.cyan().underline(this.active):this.active].join(" "),this.out.write(pC.line+Ph.to(0)+this.outputText))}};Mh.exports=ia});var Pe=y((AO,Fh)=>{"use strict";var oa=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)}};Fh.exports=oa});var Vh=y((EO,qh)=>{"use strict";var fC=Pe(),aa=class extends fC{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}};qh.exports=aa});var Hh=y((OO,Lh)=>{"use strict";var mC=Pe(),gC=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),la=class extends mC{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+gC(e):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:e}};Lh.exports=la});var Uh=y((TO,Gh)=>{"use strict";var _C=Pe(),ca=class extends _C{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}};Gh.exports=ca});var Kh=y(($O,Wh)=>{"use strict";var vC=Pe(),ua=class extends vC{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)}};Wh.exports=ua});var zh=y((RO,Bh)=>{"use strict";var bC=Pe(),da=class extends bC{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}};Bh.exports=da});var Jh=y((NO,Yh)=>{"use strict";var yC=Pe(),ha=class extends yC{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)}};Yh.exports=ha});var Zh=y((kO,Xh)=>{"use strict";var wC=Pe(),pa=class extends wC{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}};Xh.exports=pa});var ep=y((IO,Qh)=>{"use strict";var CC=Pe(),fa=class extends CC{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}};Qh.exports=fa});var np=y((DO,tp)=>{"use strict";tp.exports={DatePart:Pe(),Meridiem:Vh(),Day:Hh(),Hours:Uh(),Milliseconds:Kh(),Minutes:zh(),Month:Jh(),Seconds:Zh(),Year:ep()}});var cp=y((PO,lp)=>{"use strict";var ma=L(),SC=tt(),{style:rp,clear:sp,figures:xC}=Oe(),{erase:AC,cursor:ip}=G(),{DatePart:op,Meridiem:EC,Day:OC,Hours:TC,Milliseconds:$C,Minutes:RC,Month:NC,Seconds:kC,Year:IC}=np(),DC=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,ap={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new OC(t),3:t=>new NC(t),4:t=>new IC(t),5:t=>new EC(t),6:t=>new TC(t),7:t=>new RC(t),8:t=>new kC(t),9:t=>new $C(t)},PC={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(",")},ga=class extends SC{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(PC,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=sp("",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=DC.exec(e);){let s=n.shift(),i=n.findIndex(o=>o!=null);this.parts.push(i in ap?ap[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 op)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
87
87
|
`),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(`
|
|
88
|
-
`),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(
|
|
89
|
-
`).reduce((e,
|
|
90
|
-
${
|
|
88
|
+
`),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 op)),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(ip.hide):this.out.write(sp(this.outputText,this.out.columns)),super.render(),this.outputText=[rp.symbol(this.done,this.aborted),ma.bold(this.msg),rp.delimiter(!1),this.parts.reduce((e,n,r)=>e.concat(r===this.cursor&&!this.done?ma.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
|
|
89
|
+
`).reduce((e,n,r)=>e+`
|
|
90
|
+
${r?" ":xC.pointerSmall} ${ma.red().italic(n)}`,"")),this.out.write(AC.line+ip.to(0)+this.outputText))}};lp.exports=ga});var pp=y((MO,hp)=>{"use strict";var ds=L(),MC=tt(),{cursor:hs,erase:jC}=G(),{style:_a,figures:FC,clear:up,lines:qC}=Oe(),VC=/[0-9]/,va=t=>t!==void 0,dp=(t,e)=>{let n=Math.pow(10,e);return Math.round(t*n)/n},ba=class extends MC{constructor(e={}){super(e),this.transform=_a.render(e.style),this.msg=e.message,this.initial=va(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=va(e.min)?e.min:-1/0,this.max=va(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=ds.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${dp(e,this.round)}`),this._value=dp(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||VC.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
91
|
`),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(`
|
|
92
|
-
`),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,
|
|
93
|
-
`).reduce((e,
|
|
94
|
-
${
|
|
95
|
-
`),this.close()}submit(){let e=this.value.filter(
|
|
96
|
-
`),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(
|
|
92
|
+
`),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(hs.down(qC(this.outputError,this.out.columns)-1)+up(this.outputError,this.out.columns)),this.out.write(up(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[_a.symbol(this.done,this.aborted),ds.bold(this.msg),_a.delimiter(this.done),!this.done||!this.done&&!this.placeholder?ds[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
93
|
+
`).reduce((e,n,r)=>e+`
|
|
94
|
+
${r?" ":FC.pointerSmall} ${ds.red().italic(n)}`,"")),this.out.write(jC.line+hs.to(0)+this.outputText+hs.save+this.outputError+hs.restore))}};hp.exports=ba});var wa=y((jO,gp)=>{"use strict";var Me=L(),{cursor:LC}=G(),HC=tt(),{clear:fp,figures:vt,style:mp,wrap:GC,entriesToDisplay:UC}=Oe(),ya=class extends HC{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=fp("",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
|
+
`),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(`
|
|
96
|
+
`),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:`
|
|
97
97
|
Instructions:
|
|
98
|
-
${
|
|
99
|
-
${
|
|
98
|
+
${vt.arrowUp}/${vt.arrowDown}: Highlight option
|
|
99
|
+
${vt.arrowLeft}/${vt.arrowRight}/[space]: Toggle selection
|
|
100
100
|
`+(this.maxChoices===void 0?` a: Toggle all
|
|
101
|
-
`:"")+" enter/return: Complete answer":""}renderOption(e,
|
|
102
|
-
`+
|
|
103
|
-
`+
|
|
104
|
-
`)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(
|
|
101
|
+
`:"")+" enter/return: Complete answer":""}renderOption(e,n,r,s){let i=(n.selected?Me.green(vt.radioOn):vt.radioOff)+" "+s+" ",o,a;return n.disabled?o=e===r?Me.gray().underline(n.title):Me.strikethrough().gray(n.title):(o=e===r?Me.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=`
|
|
102
|
+
`+GC(n.description,{margin:i.length,width:this.out.columns})))),i+o+Me.gray(a||"")}paginateOptions(e){if(e.length===0)return Me.red("No matches for this query.");let{startIndex:n,endIndex:r}=UC(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`
|
|
103
|
+
`+i.join(`
|
|
104
|
+
`)}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=[Me.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(Me.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(LC.hide),super.render();let e=[mp.symbol(this.done,this.aborted),Me.bold(this.msg),mp.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Me.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=fp(e,this.out.columns)}};gp.exports=ya});var wp=y((FO,yp)=>{"use strict";var Jn=L(),WC=tt(),{erase:KC,cursor:_p}=G(),{style:Ca,clear:vp,figures:Sa,wrap:BC,entriesToDisplay:zC}=Oe(),bp=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),YC=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),JC=(t,e)=>{let n=t.findIndex(r=>r.value===e||r.title===e);return n>-1?n:void 0},xa=class extends WC{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:JC(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=Ca.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=vp("",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=bp(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:YC(a,o),value:bp(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
105
|
`),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
106
106
|
`),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
107
|
-
`),this.close()}_(e,
|
|
108
|
-
`+
|
|
107
|
+
`),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?Sa.arrowUp:s?Sa.arrowDown:" ",a=n?Jn.cyan().underline(e.title):e.title;return o=(n?Jn.cyan(Sa.pointer)+" ":" ")+o,e.description&&(i=` - ${e.description}`,(o.length+a.length+i.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(i=`
|
|
108
|
+
`+BC(e.description,{margin:3,width:this.out.columns}))),o+" "+a+Jn.gray(i||"")}render(){if(this.closed)return;this.firstRender?this.out.write(_p.hide):this.out.write(vp(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:n}=zC(this.select,this.choices.length,this.limit);if(this.outputText=[Ca.symbol(this.done,this.aborted,this.exited),Jn.bold(this.msg),Ca.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(`
|
|
109
109
|
`);this.outputText+=`
|
|
110
|
-
`+(
|
|
110
|
+
`+(r||Jn.gray(this.fallback.title))}this.out.write(KC.line+_p.to(0)+this.outputText)}};yp.exports=xa});var Ap=y((qO,xp)=>{"use strict";var rt=L(),{cursor:XC}=G(),ZC=wa(),{clear:Cp,style:Sp,figures:ln}=Oe(),Aa=class extends ZC{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=Cp("",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
111
|
Instructions:
|
|
112
|
-
${
|
|
113
|
-
${
|
|
112
|
+
${ln.arrowUp}/${ln.arrowDown}: Highlight option
|
|
113
|
+
${ln.arrowLeft}/${ln.arrowRight}/[space]: Toggle selection
|
|
114
114
|
[a,b,c]/delete: Filter choices
|
|
115
115
|
enter/return: Complete answer
|
|
116
116
|
`:""}renderCurrentInput(){return`
|
|
117
|
-
Filtered results for: ${this.inputValue?this.inputValue:
|
|
118
|
-
`}renderOption(e,
|
|
117
|
+
Filtered results for: ${this.inputValue?this.inputValue:rt.gray("Enter something to filter")}
|
|
118
|
+
`}renderOption(e,n,r){let s;return n.disabled?s=e===r?rt.gray().underline(n.title):rt.strikethrough().gray(n.title):s=e===r?rt.cyan().underline(n.title):n.title,(n.selected?rt.green(ln.radioOn):ln.radioOff)+" "+s}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let e=[rt.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(rt.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(XC.hide),super.render();let e=[Sp.symbol(this.done,this.aborted),rt.bold(this.msg),Sp.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=rt.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=Cp(e,this.out.columns)}};xp.exports=Aa});var Rp=y((VO,$p)=>{"use strict";var Ep=L(),QC=tt(),{style:Op,clear:eS}=Oe(),{erase:tS,cursor:Tp}=G(),Ea=class extends QC{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(`
|
|
119
119
|
`),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
120
|
-
`),this.close()}_(e,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
120
|
+
`),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(Tp.hide):this.out.write(eS(this.outputText,this.out.columns)),super.render(),this.outputText=[Op.symbol(this.done,this.aborted),Ep.bold(this.msg),Op.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Ep.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(tS.line+Tp.to(0)+this.outputText))}};$p.exports=Ea});var kp=y((LO,Np)=>{"use strict";Np.exports={TextPrompt:$h(),SelectPrompt:Ih(),TogglePrompt:jh(),DatePrompt:cp(),NumberPrompt:pp(),MultiselectPrompt:wa(),AutocompletePrompt:wp(),AutocompleteMultiselectPrompt:Ap(),ConfirmPrompt:Rp()}});var Dp=y(Ip=>{"use strict";var he=Ip,nS=kp(),ps=t=>t;function je(t,e,n={}){return new Promise((r,s)=>{let i=new nS[t](e),o=n.onAbort||ps,a=n.onSubmit||ps,l=n.onExit||ps;i.on("state",e.onState||ps),i.on("submit",u=>r(a(u))),i.on("exit",u=>r(l(u))),i.on("abort",u=>s(o(u)))})}he.text=t=>je("TextPrompt",t);he.password=t=>(t.style="password",he.text(t));he.invisible=t=>(t.style="invisible",he.text(t));he.number=t=>je("NumberPrompt",t);he.date=t=>je("DatePrompt",t);he.confirm=t=>je("ConfirmPrompt",t);he.list=t=>{let e=t.separator||",";return je("TextPrompt",t,{onSubmit:n=>n.split(e).map(r=>r.trim())})};he.toggle=t=>je("TogglePrompt",t);he.select=t=>je("SelectPrompt",t);he.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=n=>n.filter(r=>r.selected).map(r=>r.value);return je("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 je("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var rS=(t,e)=>Promise.resolve(e.filter(n=>n.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));he.autocomplete=t=>(t.suggest=t.suggest||rS,t.choices=[].concat(t.choices||[]),je("AutocompletePrompt",t))});var jp=y((GO,Mp)=>{"use strict";var Oa=Dp(),sS=["suggest","format","onState","validate","onRender","type"],Pp=()=>{};async function bt(t=[],{onSubmit:e=Pp,onCancel:n=Pp}={}){let r={},s=bt._override||{};t=[].concat(t);let i,o,a,l,u,d,c=async(h,p,g=!1)=>{if(!(!g&&h.validate&&h.validate(p)!==!0))return h.format?await h.format(p,r):p};for(o of t)if({name:l,type:u}=o,typeof u=="function"&&(u=await u(i,{...r},o),o.type=u),!!u){for(let h in o){if(sS.includes(h))continue;let p=o[h];o[h]=typeof p=="function"?await p(i,{...r},d):p}if(d=o,typeof o.message!="string")throw new Error("prompt message is required");if({name:l,type:u}=o,Oa[u]===void 0)throw new Error(`prompt type (${u}) 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?iS(bt._injected,o.initial):await Oa[u](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 iS(t,e){let n=t.shift();if(n instanceof Error)throw n;return n===void 0?e:n}function oS(t){bt._injected=(bt._injected||[]).concat(t)}function aS(t){bt._override=Object.assign({},t)}Mp.exports=Object.assign(bt,{prompt:bt,prompts:Oa,inject:oS,override:aS})});var Vt=y((UO,Fp)=>{"use strict";function lS(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}Fp.exports=lS("8.6.0")?ch():jp()});var $t=q(Yr(),1);var lu=q(au(),1),{program:CE,createCommand:SE,createArgument:xE,createOption:AE,CommanderError:EE,InvalidArgumentError:OE,InvalidOptionArgumentError:TE,Command:Ce,Argument:$E,Option:cu,Help:RE}=lu.default;var Nl=q(Vt(),1);var qp=(t=0)=>e=>`\x1B[${e+t}m`,Vp=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Lp=(t=0)=>(e,n,r)=>`\x1B[${38+t};2;${e};${n};${r}m`,V={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(V.modifier),cS=Object.keys(V.color),uS=Object.keys(V.bgColor),KO=[...cS,...uS];function dS(){let t=new Map;for(let[e,n]of Object.entries(V)){for(let[r,s]of Object.entries(n))V[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[r]=V[r],t.set(s[0],s[1]);Object.defineProperty(V,e,{value:n,enumerable:!1})}return Object.defineProperty(V,"codes",{value:t,enumerable:!1}),V.color.close="\x1B[39m",V.bgColor.close="\x1B[49m",V.color.ansi=qp(),V.color.ansi256=Vp(),V.color.ansi16m=Lp(),V.bgColor.ansi=qp(10),V.bgColor.ansi256=Vp(10),V.bgColor.ansi16m=Lp(10),Object.defineProperties(V,{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=>V.rgbToAnsi256(...V.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)=>V.ansi256ToAnsi(V.rgbToAnsi256(e,n,r)),enumerable:!1},hexToAnsi:{value:e=>V.ansi256ToAnsi(V.hexToAnsi256(e)),enumerable:!1}}),V}var hS=dS(),Te=hS;var ms=q(require("node:process"),1),Gp=q(require("node:os"),1),Ta=q(require("node:tty"),1);function Se(t,e=globalThis.Deno?globalThis.Deno.args:ms.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:K}=ms.default,fs;Se("no-color")||Se("no-colors")||Se("color=false")||Se("color=never")?fs=0:(Se("color")||Se("colors")||Se("color=true")||Se("color=always"))&&(fs=1);function pS(){if("FORCE_COLOR"in K)return K.FORCE_COLOR==="true"?1:K.FORCE_COLOR==="false"?0:K.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(K.FORCE_COLOR,10),3)}function fS(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function mS(t,{streamIsTTY:e,sniffFlags:n=!0}={}){let r=pS();r!==void 0&&(fs=r);let s=n?fs:r;if(s===0)return 0;if(n){if(Se("color=16m")||Se("color=full")||Se("color=truecolor"))return 3;if(Se("color=256"))return 2}if("TF_BUILD"in K&&"AGENT_NAME"in K)return 1;if(t&&!e&&s===void 0)return 0;let i=s||0;if(K.TERM==="dumb")return i;if(ms.default.platform==="win32"){let o=Gp.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in K)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in K)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in K)||K.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in K)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(K.TEAMCITY_VERSION)?1:0;if(K.COLORTERM==="truecolor"||K.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in K){let o=Number.parseInt((K.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(K.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(K.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(K.TERM)||"COLORTERM"in K?1:i}function Hp(t,e={}){let n=mS(t,{streamIsTTY:t&&t.isTTY,...e});return fS(n)}var gS={stdout:Hp({isTTY:Ta.default.isatty(1)}),stderr:Hp({isTTY:Ta.default.isatty(2)})},Up=gS;function Wp(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 Kp(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
|
+
`:`
|
|
122
|
+
`)+n,s=r+1,r=t.indexOf(`
|
|
123
|
+
`,s)}while(r!==-1);return i+=t.slice(s),i}var{stdout:Bp,stderr:zp}=Up,$a=Symbol("GENERATOR"),cn=Symbol("STYLER"),Xn=Symbol("IS_EMPTY"),Yp=["ansi","ansi","ansi256","ansi16m"],un=Object.create(null),_S=(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=Bp?Bp.level:0;t.level=e.level===void 0?n:e.level};var vS=t=>{let e=(...n)=>n.join(" ");return _S(e,t),Object.setPrototypeOf(e,Zn.prototype),e};function Zn(t){return vS(t)}Object.setPrototypeOf(Zn.prototype,Function.prototype);for(let[t,e]of Object.entries(Te))un[t]={get(){let n=gs(this,Na(e.open,e.close,this[cn]),this[Xn]);return Object.defineProperty(this,t,{value:n}),n}};un.visible={get(){let t=gs(this,this[cn],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Ra=(t,e,n,...r)=>t==="rgb"?e==="ansi16m"?Te[n].ansi16m(...r):e==="ansi256"?Te[n].ansi256(Te.rgbToAnsi256(...r)):Te[n].ansi(Te.rgbToAnsi(...r)):t==="hex"?Ra("rgb",e,n,...Te.hexToRgb(...r)):Te[n][t](...r),bS=["rgb","hex","ansi256"];for(let t of bS){un[t]={get(){let{level:n}=this;return function(...r){let s=Na(Ra(t,Yp[n],"color",...r),Te.color.close,this[cn]);return gs(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=Na(Ra(t,Yp[n],"bgColor",...r),Te.bgColor.close,this[cn]);return gs(this,s,this[Xn])}}}}var yS=Object.defineProperties(()=>{},{...un,level:{enumerable:!0,get(){return this[$a].level},set(t){this[$a].level=t}}}),Na=(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}},gs=(t,e,n)=>{let r=(...s)=>wS(r,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(r,yS),r[$a]=t,r[cn]=e,r[Xn]=n,r},wS=(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=Wp(e,n.close,n.open),n=n.parent;let i=e.indexOf(`
|
|
124
|
+
`);return i!==-1&&(e=Kp(e,s,r,i)),r+e+s};Object.defineProperties(Zn.prototype,un);var CS=Zn(),QO=Zn({level:zp?zp.level:0});var yt=CS;var S={print(...t){console.log(...t)},printError(...t){console.error(this.error(...Fe(...t)))},printSuccess(...t){console.log(this.success(...Fe(...t)))},printWarn(...t){console.log(this.warn(...Fe(...t)))},printInfo(...t){console.log(this.info(...Fe(...t)))},printDebug(...t){console.log(this.debug(...Fe(...t)))},error(...t){return yt.red(...Fe(...t))},success(...t){return yt.green(...Fe(...t))},warn(...t){return yt.yellow(...Fe(...t))},info(...t){return yt.blueBright(...Fe(...t))},debug(...t){return yt.gray(...Fe(...t))}};function Fe(...t){return t?t.reduce((e,n)=>(n||e.push(""),n instanceof Error?e.push(n.message+`
|
|
125
|
+
`+n.stack):typeof n=="string"?e.push(n):typeof n=="object"?e.push(JSON.stringify(n,null,2)):e.push(n.toString()),e),[]):[""]}var Ia=q(Yr(),1);var z=q(Yr(),1);var SS="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Jp=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=SS[n[t]&63];return e};function xS(t,e=!0,n=!1){let r=(0,z.ref)(),s,i=(0,z.ref)(!1),o=()=>{},a=new Proxy(t,{apply:function(d,c,h){let p;try{p=d(...h)}catch(g){p=g}if(p instanceof Error){if(r.value=p,s=p,e)throw o(),p}else i.value=!0,r.value=void 0,s=!0,o()}}),l=()=>{},u=new Proxy(d=>{r.value=d},{apply:function(d,c,h){d(...h),l(...h)}});return{promise:new Promise((d,c)=>{if(e&&s instanceof Error){c(s);return}else if(s===!0){d();return}let h;n&&(h=setTimeout(()=>{let p=new Error("timeout!");r.value=p,e&&c(p)},n)),o=()=>{h&&(clearTimeout(h),h=void 0),d()}}),callback:a,onError:u,resolved:(0,z.computed)(()=>i.value),error:(0,z.computed)(()=>r.value)}}function AS(){return Jp()}function ES(t){let e=OS(t);return(0,z.shallowReadonly)({states:e.states,commands:e.commands,events:e.events})}function OS(t){let e=t.states;for(let o of Object.keys(t.states))e[o]=(0,z.readonly)(e[o]);let n=(0,z.shallowReadonly)(t.states),r=(0,z.readonly)(t.commands),s={},i=t.events;for(let o in t.events)s[o]=i[o].api;return(0,z.shallowReadonly)({states:n,commands:r,events:(0,z.shallowReadonly)(s),destroy:t.destroy})}function _s(t){let{callback:e,onError:n,promise:r,resolved:s}=xS(()=>{},!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,z.computed)(()=>s.value),untilInitialized:r});setTimeout(()=>Promise.all(o).then(()=>{e()}).catch(c=>{n(c)}));let l=a.states||{},u=a.commands||{},d=a.events||{};return{__id:AS(),type:"Singleton",api:ES({states:l,commands:u,events:d,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 TS={"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"},ka=TS;var $S={"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"},Xp=$S;var RS=_s(()=>{let t=(0,Ia.ref)("zh"),e=(0,Ia.ref)(ka);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=ka:r==="zh"?e.value=Xp:isNever(r),t.value=r}}}});function Y(){return RS.api}var NS=Y().commands.t;function X(){throw Error(NS("error.userCancel"))}var J={name:"@ddd-tool/domain-designer-cli",version:"0.1.0-beta.0",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.0"};var Lt=require("child_process"),Zp=q(require("os"),1);function Qp(){let t=Qn(),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 ef(){let t=Qn(),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 Qn(){let t=Zp.default.type();return t==="Windows_NT"?"windows":t==="Linux"?"linux":t==="Darwin"?"mac":"undefined"}function vs(){let t=J.repository.url.replace(/git\+/g,""),e=`REM App Name: Domain Designer Cli
|
|
127
|
+
REM Script Version: ${J.version}
|
|
128
|
+
REM Repo Addr: ${t}
|
|
129
|
+
REM Package Manager: ${process.env.PACKAGE_MANAGER}
|
|
126
130
|
|
|
127
|
-
|
|
128
|
-
`;Ht.default.writeFileSync(_n.default.join(t,"src","views","index.ts"),r,{encoding:"utf-8"})}var ft=oe(require("node:path"),1),be=oe(require("node:fs"),1),Wh=oe(require("node:os"),1);var Vh=ne().commands.t;async function Uh(t){let e=ft.default.join(t.source);if(!be.default.existsSync(e)||!be.default.statSync(e).isDirectory())throw new Error(Vh("error.shouldBeValidDir{dir}",{dir:e}));if(be.default.readdirSync(e).length>0)throw new Error(Vh("error.shouldBeEmptyDir{dir}",{dir:e}));Yh(ft.default.join(t.webRoot,"templates"),e);let i=k_();i&&be.default.writeFileSync(ft.default.join(e,i.name),i.content,"utf-8")}function Yh(t,e){if(!be.default.existsSync(t))throw new Error(`Source folder does not exist: ${t}`);be.default.existsSync(e)||be.default.mkdirSync(e,{recursive:!0});let i=be.default.readdirSync(t,{withFileTypes:!0});for(let s of i){let r=ft.default.join(t,s.name),n=ft.default.join(e,s.name);s.isDirectory()?Yh(r,n):be.default.copyFileSync(r,n)}}function k_(){let t=`@echo off
|
|
131
|
+
@echo off
|
|
129
132
|
setlocal
|
|
130
133
|
set "scriptPath=%~dp0"
|
|
131
134
|
|
|
132
135
|
domain-designer-cli runWeb --source=%scriptPath%
|
|
133
|
-
`,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
`,n=`#!/bin/bash
|
|
137
|
+
# App Name: Domain Designer Cli
|
|
138
|
+
# Script Version: ${J.version}
|
|
139
|
+
# Repo Addr: ${t}
|
|
140
|
+
# Package Manager: ${process.env.PACKAGE_MANAGER}
|
|
141
|
+
|
|
142
|
+
domain-designer-cli runWeb --source="$(dirname "$(realpath "$0")")"
|
|
143
|
+
`,r=`#!/bin/bash
|
|
144
|
+
# App Name: Domain Designer Cli
|
|
145
|
+
# Script Version: ${J.version}
|
|
146
|
+
# Repo Addr: ${t}
|
|
147
|
+
# Package Manager: ${process.env.PACKAGE_MANAGER}
|
|
148
|
+
|
|
149
|
+
domain-designer-cli runWeb --source="$(dirname "$(realpath "$0")")"
|
|
150
|
+
`,s=Qn();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};S.printError(`Unsupported OS: ${s}`)}function bs(){let t=J.repository.url.replace(/git\+/g,""),e=`REM App Name: Domain Designer Cli
|
|
151
|
+
REM Script Version: ${J.version}
|
|
152
|
+
REM Repo Addr: ${t}
|
|
153
|
+
REM Package Manager: ${process.env.PACKAGE_MANAGER}
|
|
154
|
+
|
|
155
|
+
@echo off
|
|
156
|
+
setlocal
|
|
157
|
+
set "scriptPath=%~dp0"
|
|
158
|
+
|
|
159
|
+
domain-designer-cli genCode --source=%scriptPath%
|
|
160
|
+
`,n=`#!/bin/bash
|
|
161
|
+
# App Name: Domain Designer Cli
|
|
162
|
+
# Script Version: ${J.version}
|
|
163
|
+
# Repo Addr: ${t}
|
|
164
|
+
# Package Manager: ${process.env.PACKAGE_MANAGER}
|
|
165
|
+
|
|
166
|
+
domain-designer-cli genCode --source="$(dirname "$(realpath "$0")")"
|
|
167
|
+
`,r=`#!/bin/bash
|
|
168
|
+
# App Name: Domain Designer Cli
|
|
169
|
+
# Script Version: ${J.version}
|
|
170
|
+
# Repo Addr: ${t}
|
|
171
|
+
# Package Manager: ${process.env.PACKAGE_MANAGER}
|
|
172
|
+
|
|
173
|
+
domain-designer-cli genCode --source="$(dirname "$(realpath "$0")")"
|
|
174
|
+
`,s=Qn();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};S.printError(`Unsupported OS: ${s}`)}function ys(){return{name:".gitignore",content:`!node_modules
|
|
175
|
+
.output
|
|
176
|
+
|
|
177
|
+
!*.bat
|
|
178
|
+
!*.sh
|
|
179
|
+
`}}var kl=q(require("path"),1);var hn=q(require("path"),1),Ht=q(require("fs"),1);var $e=q(require("fs"),1),Da=q(require("path"),1);function er(t,e,n={}){if(!$e.default.existsSync(t))throw new Error(`Source folder does not exist: ${t}`);$e.default.existsSync(e)||$e.default.mkdirSync(e,{recursive:!0});let r=$e.default.readdirSync(t,{withFileTypes:!0});for(let s of r){let i=Da.default.join(t,s.name),o=Da.default.join(e,s.name);n.ignore&&n.ignore.includes(s.name)||n.pattern&&!n.pattern.test(s.name)||(s.isDirectory()?er(i,o):$e.default.copyFileSync(i,o))}}function tr(t){$e.default.existsSync(t)&&($e.default.readdirSync(t).forEach(e=>{let n=t+"/"+e;$e.default.lstatSync(n).isDirectory()?tr(n):$e.default.unlinkSync(n)}),$e.default.rmdirSync(t))}var tf=Y().commands.t;function nf(t){return new Ce().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.
|
|
180
|
+
`).addHelpText("before",`\u521D\u59CB\u5316\u4E00\u4E2A\u5DE5\u4F5C\u7A7A\u95F4
|
|
181
|
+
`)}async function rf(t){t.currentCommand.value="init"}async function sf(t){let e=hn.default.join(t.source);if(!Ht.default.existsSync(e)||!Ht.default.statSync(e).isDirectory())throw new Error(tf("error.shouldBeValidDir{dir}",{dir:e}));if(Ht.default.readdirSync(e).length>0)throw new Error(tf("error.shouldBeEmptyDir{dir}",{dir:e}));S.printInfo("================ \u521D\u59CB\u5316\u5DE5\u4F5C\u7A7A\u95F4: Starting... ================"),er(hn.default.join(t.webRoot,"templates"),e);let n=vs();n&&Ht.default.writeFileSync(hn.default.join(e,n.name),n.content,"utf-8");let r=bs();r&&Ht.default.writeFileSync(hn.default.join(e,r.name),r.content,"utf-8");let s=ys();Ht.default.writeFileSync(hn.default.join(e,s.name),s.content,"utf-8"),S.printSuccess("================ \u521D\u59CB\u5316\u5DE5\u4F5C\u7A7A\u95F4: Succeeded ================")}var of=require("child_process");function af(t){return new Ce().name("info").action(()=>{t.currentCommand.value="info"}).addHelpText("before",`Print info.
|
|
182
|
+
`).addHelpText("before",`\u6253\u5370\u4FE1\u606F
|
|
183
|
+
`)}async function lf(t){t.currentCommand.value="info"}async function cf(){S.printInfo("================ Print info: Starting... ================"),(0,of.spawnSync)('echo "print domain-designer info"',{encoding:"utf-8",stdio:"inherit",shell:!0}),S.print("");let t=process.env.LANG||process.env.LANGUAGE||process.env.LC_ALL||process.env.LC_MESSAGES||!1;S.print(S.info("DEBUG_MODE:"),process.env.DEBUG_MODE),S.print(""),S.print(S.info("lang:"),t),S.print(""),S.print(S.info("__dirname:"),__dirname),S.print(""),S.print(S.info("cwd():"),process.cwd()),S.print(""),S.print(S.info("PACKAGE_MANAGER:"),process.env.PACKAGE_MANAGER),S.print(""),S.printSuccess("================ Print info: Succeeded ================")}var ae=q(require("fs"),1),ee=q(require("path"),1);function uf(t){return new Ce().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
|
+
`).addHelpText("before",`\u66F4\u65B0\u5DE5\u4F5C\u7A7A\u95F4
|
|
185
|
+
`)}async function df(t){t.currentCommand.value="updateWorkspace"}async function hf(t){let e=ee.default.join(t.source);if(S.printInfo("================ \u66F4\u65B0\u4F9D\u8D56: Starting... ================"),!ae.default.existsSync(ee.default.join(e,"node_modules"))||ae.default.existsSync(ee.default.join(t.source,"package.json"))){S.printWarn("\u8BE5\u76EE\u5F55\u4E0D\u662F\u5DE5\u4F5C\u7A7A\u95F4\uFF0C\u65E0\u6CD5\u66F4\u65B0"),S.printWarn("================ \u66F4\u65B0\u4F9D\u8D56: End ================");return}let n=ee.default.join(e,"node_modules","version.txt"),r=ae.default.existsSync(n)&&ae.default.statSync(n).isFile()?ae.default.readFileSync(n).toString().trim():"unknown";if(r===J.version){S.print("\u5DE5\u4F5C\u76EE\u5F55\u5DF2\u662F\u6700\u65B0\u7248\u672C\uFF0C\u65E0\u9700\u66F4\u65B0"),S.printSuccess("================ \u66F4\u65B0\u4F9D\u8D56: Succeeded ================");return}S.print("\u5DE5\u4F5C\u76EE\u5F55\u7248\u672C\uFF1A",r),tr(ee.default.join(e,"node_modules"));let s=vs();s&&ae.default.existsSync(ee.default.join(e,s.name))&&ae.default.rmSync(ee.default.join(e,s.name));let i=bs();i&&ae.default.existsSync(ee.default.join(e,i.name))&&ae.default.rmSync(ee.default.join(e,i.name));let o=ys();ae.default.existsSync(ee.default.join(e,o.name))&&ae.default.rmSync(ee.default.join(e,o.name)),er(ee.default.join(t.webRoot,"templates"),e,{ignore:["example.ts","example-agg.ts"]}),s&&ae.default.writeFileSync(ee.default.join(e,s.name),s.content,"utf-8"),i&&ae.default.writeFileSync(ee.default.join(e,i.name),i.content,"utf-8"),ae.default.writeFileSync(ee.default.join(e,o.name),o.content,"utf-8"),S.print(`\u76EE\u5F55\u5DF2\u66F4\u65B0\u81F3 ${J.version}`),S.printSuccess("================ \u66F4\u65B0\u4F9D\u8D56: Succeeded ================")}var rr=require("child_process");var ws=q(require("path"),1),wt=q(require("fs"),1);var kS=Y().commands.t;function pf(t){return new Ce().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
|
+
`).addHelpText("before",`\u8FD0\u884C web \u670D\u52A1
|
|
187
|
+
`)}async function ff(t){t.currentCommand.value="runWeb"}async function mf(t){let e=t.webRoot;S.printDebug("webRoot\u8DEF\u5F84",e);let n=process.env.PACKAGE_MANAGER;S.printInfo("================ \u5B89\u88C5\u8FD0\u884C\u4F9D\u8D56: Starting... ================"),n==="bun"?(0,rr.spawnSync)(`bun i --cwd "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):n==="pnpm"?(0,rr.spawnSync)(`pnpm i --prefix "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):isNever(n),S.printSuccess("================ \u5B89\u88C5\u8FD0\u884C\u4F9D\u8D56: Succeeded ================"),S.printInfo("================ \u88C5\u914D\u4EE3\u7801\u6587\u4EF6: Starting... ================"),IS(e,t.source),S.printSuccess("================ \u88C5\u914D\u4EE3\u7801\u6587\u4EF6: Succeeded ================"),S.printInfo("================ \u8FD0\u884CWeb\u670D\u52A1: Starting... ================"),n==="bun"?(0,rr.spawnSync)(`bun --cwd "${e}" dev`,{encoding:"utf-8",stdio:"inherit",shell:!0}):n==="pnpm"?(0,rr.spawnSync)(`pnpm --prefix "${e}" dev`,{encoding:"utf-8",stdio:"inherit",shell:!0}):isNever(n)}async function IS(t,e){if(!wt.default.existsSync(e)||!wt.default.statSync(e).isDirectory())throw new Error(kS("error.shouldBeValidDir{dir}",{dir:e}));let n=ws.default.join(e,"node_modules","version.txt");(!wt.default.existsSync(n)||!wt.default.statSync(n).isFile()||wt.default.readFileSync(n,"utf-8").trim()!==J.version)&&(S.printWarn("\u68C0\u6D4B\u5230\u5DE5\u4F5C\u76EE\u5F55\u7248\u672C\u4E0E\u811A\u624B\u67B6\u7248\u672C\u4E0D\u5339\u914D"),S.printWarn("\u8BF7\u6267\u884C\u5728\u5DE5\u4F5C\u76EE\u5F55\u6267\u884Cupdate\u547D\u4EE4\u8FDB\u884C\u66F4\u65B0"),S.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('${ws.default.resolve(e,l).replace(/\\/g,"/")}')).default`})}});let o=`import { type DomainDesigner, isDomainDesigner } from '@ddd-tool/domain-designer-core'
|
|
188
|
+
|
|
189
|
+
${r.map(a=>`const ${a.flag} = ${a.importCode}`).join(`
|
|
190
|
+
`)}
|
|
191
|
+
|
|
192
|
+
const data: Record<string, DomainDesigner> = {}
|
|
193
|
+
|
|
194
|
+
${r.map(a=>`if (isDomainDesigner(${a.flag})) {
|
|
195
|
+
data['${a.name}'] = ${a.flag}
|
|
196
|
+
}`).join(`
|
|
197
|
+
`)}
|
|
198
|
+
|
|
199
|
+
export default data
|
|
200
|
+
`;wt.default.writeFileSync(ws.default.join(t,"src","views","index.ts"),o,{encoding:"utf-8"})}var An=q(require("fs"),1),mr=q(require("path"),1);var Xs=require("child_process");function vf(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 qa=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);var DS=()=>{},PS=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Os=Object.assign;var qe=Array.isArray;var Kt=t=>typeof t=="function",St=t=>typeof t=="string",MS=t=>typeof t=="symbol",Gt=t=>t!==null&&typeof t=="object";var jS=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},K0=jS(t=>t.charAt(0).toUpperCase()+t.slice(1));var gf,Ts=()=>gf||(gf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ua(t){if(qe(t)){let e={};for(let n=0;n<t.length;n++){let r=t[n],s=St(r)?LS(r):Ua(r);if(s)for(let i in s)e[i]=s[i]}return e}else if(St(t)||Gt(t))return t}var FS=/;(?![^(]*\))/g,qS=/:([^]+)/,VS=/\/\*[^]*?\*\//g;function LS(t){let e={};return t.replace(VS,"").split(FS).forEach(n=>{if(n){let r=n.split(qS);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Wa(t){let e="";if(St(t))e=t;else if(qe(t))for(let n=0;n<t.length;n++){let r=Wa(t[n]);r&&(e+=r+" ")}else if(Gt(t))for(let n in t)t[n]&&(e+=n+" ");return e.trim()}var Va=!0,bf=[];function yf(){bf.push(Va),Va=!1}function wf(){let t=bf.pop();Va=t===void 0?!0:t}var B0=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),z0=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),Y0=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");var J0=Array.prototype;var X0=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(MS));function Cf(t){return La(t)?Cf(t.__v_raw):!!(t&&t.__v_isReactive)}function La(t){return!!(t&&t.__v_isReadonly)}function Pa(t){return!!(t&&t.__v_isShallow)}function Ha(t){return t?!!t.__v_raw:!1}function Ut(t){let e=t&&t.__v_raw;return e?Ut(e):t}function Ka(t){return t?t.__v_isRef===!0:!1}var Wt=[];function HS(t){Wt.push(t)}function GS(){Wt.pop()}var Ma=!1;function sr(t,...e){if(Ma)return;Ma=!0,yf();let n=Wt.length?Wt[Wt.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=US();if(r)Ba(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 <${Mf(n,i.type)}>`).join(`
|
|
201
|
+
`),s]);else{let i=[`[Vue warn]: ${t}`,...e];s.length&&i.push(`
|
|
202
|
+
`,...WS(s))}wf(),Ma=!1}function US(){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 WS(t){let e=[];return t.forEach((n,r)=>{e.push(...r===0?[]:[`
|
|
203
|
+
`],...KS(n))}),e}function KS({vnode:t,recurseCount:e}){let n=e>0?`... (${e} recursive calls)`:"",r=t.component?t.component.parent==null:!1,s=` at <${Mf(t.component,t.type,r)}`,i=">"+n;return t.props?[s,...BS(t.props),i]:[s+i]}function BS(t){let e=[],n=Object.keys(t);return n.slice(0,3).forEach(r=>{e.push(...Sf(r,t[r]))}),n.length>3&&e.push(" ..."),e}function Sf(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}`]:Ka(e)?(e=Sf(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 xf={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 Ba(t,e,n,r){try{return r?t(...r):t()}catch(s){Af(s,e,n)}}function Af(t,e,n,r=!0){let s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||qa;if(e){let a=e.parent,l=e.proxy,u=process.env.NODE_ENV!=="production"?xf[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){let d=a.ec;if(d){for(let c=0;c<d.length;c++)if(d[c](t,l,u)===!1)return}a=a.parent}if(i){yf(),Ba(i,null,10,[t,l,u]),wf();return}}zS(t,n,s,r,o)}function zS(t,e,n,r=!0,s=!1){if(process.env.NODE_ENV!=="production"){let i=xf[e];if(n&&HS(n),sr(`Unhandled error${i?` during execution of ${i}`:""}`),n&&GS(),r)throw t}else if(s)throw t}var xe=[],st=-1,fn=[],Ct=null,pn=0,YS=Promise.resolve(),Ga=null,JS=100;function XS(t){let e=st+1,n=xe.length;for(;e<n;){let r=e+n>>>1,s=xe[r],i=ir(s);i<t||i===t&&s.flags&2?e=r+1:n=r}return e}function ZS(t){if(!(t.flags&1)){let e=ir(t),n=xe[xe.length-1];!n||!(t.flags&2)&&e>=ir(n)?xe.push(t):xe.splice(XS(e),0,t),t.flags|=1,Ef()}}function Ef(){Ga||(Ga=YS.then(Of))}function QS(t){qe(t)?fn.push(...t):Ct&&t.id===-1?Ct.splice(pn+1,0,t):t.flags&1||(fn.push(t),t.flags|=1),Ef()}function ex(t){if(fn.length){let e=[...new Set(fn)].sort((n,r)=>ir(n)-ir(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"&&Tf(t,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Ct=null,pn=0}}var ir=t=>t.id==null?t.flags&2?-1:1/0:t.id;function Of(t){process.env.NODE_ENV!=="production"&&(t=t||new Map);let e=process.env.NODE_ENV!=="production"?n=>Tf(t,n):DS;try{for(st=0;st<xe.length;st++){let n=xe[st];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&e(n))continue;n.flags&4&&(n.flags&=-2),Ba(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;st<xe.length;st++){let n=xe[st];n&&(n.flags&=-2)}st=-1,xe.length=0,ex(t),Ga=null,(xe.length||fn.length)&&Of(t)}}function Tf(t,e){let n=t.get(e)||0;if(n>JS){let r=e.i,s=r&&Pf(r.type);return Af(`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 ja=new Map;process.env.NODE_ENV!=="production"&&(Ts().__VUE_HMR_RUNTIME__={createRecord:Fa(tx),rerender:Fa(nx),reload:Fa(rx)});var Ss=new Map;function tx(t,e){return Ss.has(t)?!1:(Ss.set(t,{initialDef:xs(e),instances:new Set}),!0)}function xs(t){return jf(t)?t.__vccOpts:t}function nx(t,e){let n=Ss.get(t);n&&(n.initialDef.render=e,[...n.instances].forEach(r=>{e&&(r.render=e,xs(r.type).render=e),r.renderCache=[],r.update()}))}function rx(t,e){let n=Ss.get(t);if(!n)return;e=xs(e),_f(n.initialDef,e);let r=[...n.instances];for(let s=0;s<r.length;s++){let i=r[s],o=xs(i.type),a=ja.get(o);a||(o!==n.initialDef&&_f(o,e),ja.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?ZS(()=>{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)}QS(()=>{ja.clear()})}function _f(t,e){Os(t,e);for(let n in t)n!=="__file"&&!(n in e)&&delete t[n]}function Fa(t){return(e,n)=>{try{return t(e,n)}catch{}}}var As=null,sx=null,ix=t=>t.__isTeleport;function $f(t,e){t.shapeFlag&6&&t.component?(t.transition=e,$f(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}Ts().requestIdleCallback;Ts().cancelIdleCallback;var ox=Symbol.for("v-ndc"),ax={};process.env.NODE_ENV!=="production"&&(ax.ownKeys=t=>(sr("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 lx={},Rf=t=>Object.getPrototypeOf(t)===lx,cx=t=>t.__isSuspense,Nf=Symbol.for("v-fgt"),ux=Symbol.for("v-txt"),dx=Symbol.for("v-cmt");function hx(t){return t?t.__v_isVNode===!0:!1}var px=(...t)=>If(...t),kf=({key:t})=>t??null,Cs=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?St(t)||Ka(t)||Kt(t)?{i:As,r:t,k:e,f:!!n}:t:null);function fx(t,e=null,n=null,r=0,s=null,i=t===Nf?0:1,o=!1,a=!1){let l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&kf(e),ref:e&&Cs(e),scopeId:sx,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:As};return a?(za(l,n),i&128&&t.normalize(l)):n&&(l.shapeFlag|=St(n)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&sr("VNode created with invalid key (NaN). VNode type:",l.type),l}var mx=process.env.NODE_ENV!=="production"?px:If;function If(t,e=null,n=null,r=0,s=null,i=!1){if((!t||t===ox)&&(process.env.NODE_ENV!=="production"&&!t&&sr(`Invalid vnode type when creating vnode: ${t}.`),t=dx),hx(t)){let a=Es(t,e,!0);return n&&za(a,n),a.patchFlag=-2,a}if(jf(t)&&(t=t.__vccOpts),e){e=gx(e);let{class:a,style:l}=e;a&&!St(a)&&(e.class=Wa(a)),Gt(l)&&(Ha(l)&&!qe(l)&&(l=Os({},l)),e.style=Ua(l))}let o=St(t)?1:cx(t)?128:ix(t)?64:Gt(t)?4:Kt(t)?2:0;return process.env.NODE_ENV!=="production"&&o&4&&Ha(t)&&(t=Ut(t),sr("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`.",`
|
|
204
|
+
Component that was made reactive: `,t)),fx(t,e,n,r,s,o,i,!0)}function gx(t){return t?Ha(t)||Rf(t)?Os({},t):t:null}function Es(t,e,n=!1,r=!1){let{props:s,ref:i,patchFlag:o,children:a,transition:l}=t,u=e?vx(s||{},e):s,d={__v_isVNode:!0,__v_skip:!0,type:t.type,props:u,key:u&&kf(u),ref:e&&e.ref?n&&i?qe(i)?i.concat(Cs(e)):[i,Cs(e)]:Cs(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:process.env.NODE_ENV!=="production"&&o===-1&&qe(a)?a.map(Df):a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Nf?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&&Es(t.ssContent),ssFallback:t.ssFallback&&Es(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&r&&$f(d,l.clone(d)),d}function Df(t){let e=Es(t);return qe(t.children)&&(e.children=t.children.map(Df)),e}function _x(t=" ",e=0){return mx(ux,null,t,e)}function za(t,e){let n=0,{shapeFlag:r}=t;if(e==null)e=null;else if(qe(e))n=16;else if(typeof e=="object")if(r&65){let s=e.default;s&&(s._c&&(s._d=!1),za(t,s()),s._c&&(s._d=!0));return}else n=32,!e._&&!Rf(e)&&(e._ctx=As);else Kt(e)?(e={default:e,_ctx:As},n=32):(e=String(e),r&64?(n=16,e=[_x(e)]):n=8);t.children=e,t.shapeFlag|=n}function vx(...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=Wa([e.class,r.class]));else if(s==="style")e.style=Ua([e.style,r.style]);else if(PS(s)){let i=e[s],o=r[s];o&&i!==o&&!(qe(i)&&i.includes(o))&&(e[s]=i?[].concat(i,o):o)}else s!==""&&(e[s]=r[s])}return e}{let t=Ts(),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 bx=/(?:^|[-_])(\w)/g,yx=t=>t.replace(bx,e=>e.toUpperCase()).replace(/[-_]/g,"");function Pf(t,e=!0){return Kt(t)?t.displayName||t.name:t.name||e&&t.__name}function Mf(t,e,n=!1){let r=Pf(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?yx(r):n?"App":"Anonymous"}function jf(t){return Kt(t)&&"__vccOpts"in t}function wx(){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"]:Ka(c)?["div",{},["span",t,d(c)],"<",a("_value"in c?c._value:c),">"]:Cf(c)?["div",{},["span",t,Pa(c)?"ShallowReactive":"Reactive"],"<",a(c),`>${La(c)?" (readonly)":""}`]:La(c)?["div",{},["span",t,Pa(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!==qa&&h.push(o("setup",c.setupState)),c.data!==qa&&h.push(o("data",Ut(c.data)));let p=l(c,"computed");p&&h.push(o("computed",p));let g=l(c,"inject");return g&&h.push(o("injected",g)),h.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:c}]]),h}function o(c,h){return h=Os({},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(p=>["div",{},["span",r,p+": "],a(h[p],!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 p=c.type;if(Kt(p))return;let g={};for(let m in c.ctx)u(p,m,h)&&(g[m]=c.ctx[m]);return g}function u(c,h,p){let g=c[p];if(qe(g)&&g.includes(h)||Gt(g)&&h in g||c.extends&&u(c.extends,h,p)||c.mixins&&c.mixins.some(m=>u(m,h,p)))return!0}function d(c){return Pa(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 Cx(){wx()}process.env.NODE_ENV!=="production"&&Cx();function Sx(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 nl=Object.assign,xx=Object.prototype.hasOwnProperty,rl=(t,e)=>xx.call(t,e),vn=Array.isArray,ar=t=>Hf(t)==="[object Map]",Ax=t=>typeof t=="function",Ex=t=>typeof t=="string",fr=t=>typeof t=="symbol",Ks=t=>t!==null&&typeof t=="object",Ox=Object.prototype.toString,Hf=t=>Ox.call(t),Gf=t=>Hf(t).slice(8,-1),bl=t=>Ex(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Tx=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},$x=Tx(t=>t.charAt(0).toUpperCase()+t.slice(1)),bn=(t,e)=>!Object.is(t,e);function Cn(t,...e){}var U,Uf=0,lr,cr;function Rx(t,e=!1){if(t.flags|=8,e){t.next=cr,cr=t;return}t.next=lr,lr=t}function yl(){Uf++}function wl(){if(--Uf>0)return;if(cr){let e=cr;for(cr=void 0;e;){let n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;lr;){let e=lr;for(lr=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 Nx(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function kx(t){let e,n=t.depsTail,r=n;for(;r;){let s=r.prevDep;r.version===-1?(r===n&&(n=s),Kf(r),Dx(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}t.deps=e,t.depsTail=n}function Ix(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Wf(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Wf(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===ur))return;t.globalVersion=ur;let e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Ix(t)){t.flags&=-3;return}let n=U,r=Et;U=t,Et=!0;try{Nx(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{U=n,Et=r,kx(t),t.flags&=-3}}function Kf(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)Kf(i,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function Dx(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,Bf=[];function Px(){Bf.push(Et),Et=!1}function Mx(){let t=Bf.pop();Et=t===void 0?!0:t}var ur=0,sl=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}},dr=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(!U||!Et||U===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==U)n=this.activeLink=new sl(U,this),U.deps?(n.prevDep=U.depsTail,U.depsTail.nextDep=n,U.depsTail=n):U.deps=U.depsTail=n,zf(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=U.depsTail,n.nextDep=void 0,U.depsTail.nextDep=n,U.depsTail=n,U.deps===n&&(U.deps=r)}return process.env.NODE_ENV!=="production"&&U.onTrack&&U.onTrack(nl({effect:U},e)),n}trigger(e){this.version++,ur++,this.notify(e)}notify(e){yl();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(nl({effect:n.sub},e));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{wl()}}};function zf(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)zf(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 il=new WeakMap,Bt=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),ol=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),hr=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function pe(t,e,n){if(Et&&U){let r=il.get(t);r||il.set(t,r=new Map);let s=r.get(n);s||(r.set(n,s=new dr),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=il.get(t);if(!o){ur++;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(yl(),e==="clear")o.forEach(a);else{let l=vn(t),u=l&&bl(n);if(l&&n==="length"){let d=Number(r);o.forEach((c,h)=>{(h==="length"||h===hr||!fr(h)&&h>=d)&&a(c)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(hr)),e){case"add":l?u&&a(o.get("length")):(a(o.get(Bt)),ar(t)&&a(o.get(ol)));break;case"delete":l||(a(o.get(Bt)),ar(t)&&a(o.get(ol)));break;case"set":ar(t)&&a(o.get(Bt));break}}wl()}function mn(t){let e=M(t);return e===t?e:(pe(e,"iterate",hr),Ot(t)?e:e.map(ce))}function Cl(t){return pe(t=M(t),"iterate",hr),t}var jx={__proto__:null,[Symbol.iterator](){return Ya(this,Symbol.iterator,ce)},concat(...t){return mn(this).concat(...t.map(e=>vn(e)?mn(e):e))},entries(){return Ya(this,"entries",t=>(t[1]=ce(t[1]),t))},every(t,e){return it(this,"every",t,e,void 0,arguments)},filter(t,e){return it(this,"filter",t,e,n=>n.map(ce),arguments)},find(t,e){return it(this,"find",t,e,ce,arguments)},findIndex(t,e){return it(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return it(this,"findLast",t,e,ce,arguments)},findLastIndex(t,e){return it(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return it(this,"forEach",t,e,void 0,arguments)},includes(...t){return Ja(this,"includes",t)},indexOf(...t){return Ja(this,"indexOf",t)},join(t){return mn(this).join(t)},lastIndexOf(...t){return Ja(this,"lastIndexOf",t)},map(t,e){return it(this,"map",t,e,void 0,arguments)},pop(){return or(this,"pop")},push(...t){return or(this,"push",t)},reduce(t,...e){return Ff(this,"reduce",t,e)},reduceRight(t,...e){return Ff(this,"reduceRight",t,e)},shift(){return or(this,"shift")},some(t,e){return it(this,"some",t,e,void 0,arguments)},splice(...t){return or(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 or(this,"unshift",t)},values(){return Ya(this,"values",ce)}};function Ya(t,e,n){let r=Cl(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 Fx=Array.prototype;function it(t,e,n,r,s,i){let o=Cl(t),a=o!==t&&!Ot(t),l=o[e];if(l!==Fx[e]){let c=l.apply(t,i);return a?ce(c):c}let u=n;o!==t&&(a?u=function(c,h){return n.call(this,ce(c),h,t)}:n.length>2&&(u=function(c,h){return n.call(this,c,h,t)}));let d=l.call(o,u,r);return a&&s?s(d):d}function Ff(t,e,n,r){let s=Cl(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,ce(a),l,t)}),s[e](i,...r)}function Ja(t,e,n){let r=M(t);pe(r,"iterate",hr);let s=r[e](...n);return(s===-1||s===!1)&&Zx(n[0])?(n[0]=M(n[0]),r[e](...n)):s}function or(t,e,n=[]){Px(),yl();let r=M(t)[e].apply(t,n);return wl(),Mx(),r}var qx=Sx("__proto__,__v_isRef,__isVue"),Yf=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(fr));function Vx(t){fr(t)||(t=String(t));let e=M(this);return pe(e,"has",t),e.hasOwnProperty(t)}var Ds=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?Zf:Xf:i?Yx:Jf).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;let o=vn(e);if(!s){let l;if(o&&(l=jx[n]))return l;if(n==="hasOwnProperty")return Vx}let a=Reflect.get(e,n,yn(e)?e:r);return(fr(n)?Yf.has(n):qx(n))||(s||pe(e,"get",n),i)?a:yn(a)?o&&bl(n)?a:a.value:Ks(a)?s?Ms(a):Qf(a):a}},al=class extends Ds{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=M(i),r=M(r)),!vn(e)&&yn(i)&&!yn(r))return l?!1:(i.value=r,!0)}let o=vn(e)&&bl(n)?Number(n)<e.length:rl(e,n),a=Reflect.set(e,n,r,yn(e)?e:s);return e===M(s)&&(o?bn(r,i)&&At(e,"set",n,r,i):At(e,"add",n,r)),a}deleteProperty(e,n){let r=rl(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(!fr(n)||!Yf.has(n))&&pe(e,"has",n),r}ownKeys(e){return pe(e,"iterate",vn(e)?"length":Bt),Reflect.ownKeys(e)}},Ps=class extends Ds{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}},Lx=new al,Hx=new Ps,Gx=new Ps(!0),ll=t=>t,$s=t=>Reflect.getPrototypeOf(t);function Ux(t,e,n){return function(...r){let s=this.__v_raw,i=M(s),o=ar(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,u=s[t](...r),d=n?ll:e?cl:ce;return!e&&pe(i,"iterate",l?ol:Bt),{next(){let{value:c,done:h}=u.next();return h?{value:c,done:h}:{value:a?[d(c[0]),d(c[1])]:d(c),done:h}},[Symbol.iterator](){return this}}}}function Rs(t){return function(...e){if(process.env.NODE_ENV!=="production"){let n=e[0]?`on key "${e[0]}" `:"";Cn(`${$x(t)} operation ${n}failed: target is readonly.`,M(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function Wx(t,e){let n={get(r){let s=this.__v_raw,i=M(s),o=M(r);t||(bn(r,o)&&pe(i,"get",r),pe(i,"get",o));let{has:a}=$s(i),l=e?ll:t?cl:ce;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&&pe(M(r),"iterate",Bt),Reflect.get(r,"size",r)},has(r){let s=this.__v_raw,i=M(s),o=M(r);return t||(bn(r,o)&&pe(i,"has",r),pe(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=M(o),l=e?ll:t?cl:ce;return!t&&pe(a,"iterate",Bt),o.forEach((u,d)=>r.call(s,l(u),l(d),i))}};return nl(n,t?{add:Rs("add"),set:Rs("set"),delete:Rs("delete"),clear:Rs("clear")}:{add(r){!e&&!Ot(r)&&!Sn(r)&&(r=M(r));let s=M(this);return $s(s).has.call(s,r)||(s.add(r),At(s,"add",r,r)),this},set(r,s){!e&&!Ot(s)&&!Sn(s)&&(s=M(s));let i=M(this),{has:o,get:a}=$s(i),l=o.call(i,r);l?process.env.NODE_ENV!=="production"&&qf(i,o,r):(r=M(r),l=o.call(i,r));let u=a.call(i,r);return i.set(r,s),l?bn(s,u)&&At(i,"set",r,s,u):At(i,"add",r,s),this},delete(r){let s=M(this),{has:i,get:o}=$s(s),a=i.call(s,r);a?process.env.NODE_ENV!=="production"&&qf(s,i,r):(r=M(r),a=i.call(s,r));let l=o?o.call(s,r):void 0,u=s.delete(r);return a&&At(s,"delete",r,void 0,l),u},clear(){let r=M(this),s=r.size!==0,i=process.env.NODE_ENV!=="production"?ar(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]=Ux(r,t,e)}),n}function Sl(t,e){let n=Wx(t,e);return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get(rl(n,s)&&s in r?n:r,s,i)}var Kx={get:Sl(!1,!1)},Bx={get:Sl(!0,!1)},zx={get:Sl(!0,!0)};function qf(t,e,n){let r=M(n);if(r!==n&&e.call(t,r)){let s=Gf(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 Jf=new WeakMap,Yx=new WeakMap,Xf=new WeakMap,Zf=new WeakMap;function Jx(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Xx(t){return t.__v_skip||!Object.isExtensible(t)?0:Jx(Gf(t))}function Qf(t){return Sn(t)?t:xl(t,!1,Lx,Kx,Jf)}function Ms(t){return xl(t,!0,Hx,Bx,Xf)}function ks(t){return xl(t,!0,Gx,zx,Zf)}function xl(t,e,n,r,s){if(!Ks(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=Xx(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 Zx(t){return t?!!t.__v_raw:!1}function M(t){let e=t&&t.__v_raw;return e?M(e):t}var ce=t=>Ks(t)?Qf(t):t,cl=t=>Ks(t)?Ms(t):t;function yn(t){return t?t.__v_isRef===!0:!1}function js(t){return Qx(t,!1)}function Qx(t,e){return yn(t)?t:new ul(t,e)}var ul=class{constructor(e,n){this.dep=new dr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:M(e),this._value=n?e:ce(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:M(e),bn(e,n)&&(this._rawValue=e,this._value=r?e:ce(e),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:n}):this.dep.trigger())}},dl=class{constructor(e,n,r){this.fn=e,this.setter=n,this._value=void 0,this.dep=new dr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ur-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&U!==this)return Rx(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 Wf(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 hl(t,e,n=!1){let r,s;Ax(t)?r=t:(r=t.get,s=t.set);let i=new dl(r,s,n);return process.env.NODE_ENV,i}var eA="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",tA=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=eA[n[t]&63];return e};function nA(t,e=!0,n=!1){let r=js(),s,i=js(!1),o=()=>{},a=new Proxy(t,{apply:function(d,c,h){let p;try{p=d(...h)}catch(g){p=g}if(p instanceof Error){if(r.value=p,s=p,e)throw o(),p}else i.value=!0,r.value=void 0,s=!0,o()}}),l=()=>{},u=new Proxy(d=>{r.value=d},{apply:function(d,c,h){d(...h),l(...h)}});return{promise:new Promise((d,c)=>{if(e&&s instanceof Error){c(s);return}else if(s===!0){d();return}let h;n&&(h=setTimeout(()=>{let p=new Error("timeout!");r.value=p,e&&c(p)},n)),o=()=>{h&&(clearTimeout(h),h=void 0),d()}}),callback:a,onError:u,resolved:hl(()=>i.value),error:hl(()=>r.value)}}function pl(){return tA()}function rA(){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:pl(),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:pl(),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 sA(t){return rA()}function iA(t){let e=oA(t);return ks({states:e.states,commands:e.commands,events:e.events})}function oA(t){let e=t.states;for(let o of Object.keys(t.states))e[o]=Ms(e[o]);let n=ks(t.states),r=Ms(t.commands),s={},i=t.events;for(let o in t.events)s[o]=i[o].api;return ks({states:n,commands:r,events:ks(s),destroy:t.destroy})}function aA(t){let{callback:e,onError:n,promise:r,resolved:s}=nA(()=>{},!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:hl(()=>s.value),untilInitialized:r});setTimeout(()=>Promise.all(o).then(()=>{e()}).catch(c=>{n(c)}));let l=a.states||{},u=a.commands||{},d=a.events||{};return{__id:pl(),type:"Singleton",api:iA({states:l,commands:u,events:d,destroy:()=>{}}),isInitialized:s,async untilInitialized(){return await r.catch(c=>{throw new Error(`Failed to initialize Agg: ${c.message}
|
|
205
|
+
Stack : ${c.stack||"unkown"}`)})}}}var Ns;function lA(t){return aA(()=>{let e=js(t),n=js({}),r=()=>[],s=()=>[],i=()=>[],o=()=>[],a=()=>[],l=()=>[],u=()=>[];return{states:{designer:e,context:n},commands:{genCodeFiles(){return u()},clearCaches(){},setContext(d){n.value=d},setDomainDesigner(d){this.clearCaches(),e.value=d},_genInfoCode(...d){return r(...d)},_setInfoCodeProvider(d){r=d},_genCommandCode(...d){return s(...d)},_setCommandCodeProvider(d){s=d},_genFacadeCommandCode(...d){return i(...d)},_setFacadeCommandCodeProvider(d){i=d},_genAggCode(...d){return o(...d)},_setAggCodeProvider(d){o=d},_genEventCode(...d){return a(...d)},_setEventCodeProvider(d){a=d},_genReadModelCode(...d){return l(...d)},_setReadModelCodeProvider(d){l=d},_setCodeFileProvider(d){u=d}}}})}var Le=sA();function em(t){if(!Ns){if(!t)throw new Error("designer is required");Ns=lA(t),Le.registerAgg(Ns)}return Ns.api}function Bs(t){return t&&t._attributes&&t._attributes.rule==="Info"}function cA(t){return t&&t._attributes&&t._attributes.rule==="Agg"}function uA(t){return t&&t._attributes&&t._attributes.rule==="Command"}function dA(t){return t&&t._attributes&&t._attributes.rule==="FacadeCommand"}function hA(t){return t&&t._attributes&&t._attributes.rule==="Event"}function pA(t){return t&&t._attributes&&t._attributes.rule==="ReadModel"}var fl=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);var fA=()=>{},mA=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),zs=Object.assign,Ve=Array.isArray,Xt=t=>typeof t=="function",Tt=t=>typeof t=="string",gA=t=>typeof t=="symbol",zt=t=>t!==null&&typeof t=="object",Vf,Ys=()=>Vf||(Vf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Al(t){if(Ve(t)){let e={};for(let n=0;n<t.length;n++){let r=t[n],s=Tt(r)?yA(r):Al(r);if(s)for(let i in s)e[i]=s[i]}return e}else if(Tt(t)||zt(t))return t}var _A=/;(?![^(]*\))/g,vA=/:([^]+)/,bA=/\/\*[^]*?\*\//g;function yA(t){let e={};return t.replace(bA,"").split(_A).forEach(n=>{if(n){let r=n.split(vA);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function El(t){let e="";if(Tt(t))e=t;else if(Ve(t))for(let n=0;n<t.length;n++){let r=El(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(gA));function tm(t){return ml(t)?tm(t.__v_raw):!!(t&&t.__v_isReactive)}function ml(t){return!!(t&&t.__v_isReadonly)}function Xa(t){return!!(t&&t.__v_isShallow)}function gl(t){return t?!!t.__v_raw:!1}function Yt(t){let e=t&&t.__v_raw;return e?Yt(e):t}function Ol(t){return t?t.__v_isRef===!0:!1}var Jt=[];function wA(t){Jt.push(t)}function CA(){Jt.pop()}var Za=!1;function Fs(t,...e){if(Za)return;Za=!0;let n=Jt.length?Jt[Jt.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=SA();if(r)Tl(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 <${mm(n,i.type)}>`).join(`
|
|
206
|
+
`),s]);else{let i=[`[Vue warn]: ${t}`,...e];s.length&&i.push(`
|
|
207
|
+
`,...xA(s))}Za=!1}function SA(){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 xA(t){let e=[];return t.forEach((n,r)=>{e.push(...r===0?[]:[`
|
|
208
|
+
`],...AA(n))}),e}function AA({vnode:t,recurseCount:e}){let n=e>0?`... (${e} recursive calls)`:"",r=t.component?t.component.parent==null:!1,s=` at <${mm(t.component,t.type,r)}`,i=">"+n;return t.props?[s,...EA(t.props),i]:[s+i]}function EA(t){let e=[],n=Object.keys(t);return n.slice(0,3).forEach(r=>{e.push(...nm(r,t[r]))}),n.length>3&&e.push(" ..."),e}function nm(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}`]:Ol(e)?(e=nm(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 rm={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 Tl(t,e,n,r){try{return r?t(...r):t()}catch(s){sm(s,e,n)}}function sm(t,e,n,r=!0){let s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||fl;if(e){let a=e.parent,l=e.proxy,u=process.env.NODE_ENV!=="production"?rm[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){let d=a.ec;if(d){for(let c=0;c<d.length;c++)if(d[c](t,l,u)===!1)return}a=a.parent}if(i){Tl(i,null,10,[t,l,u]);return}}OA(t,n,s,r,o)}function OA(t,e,n,r=!0,s=!1){if(process.env.NODE_ENV!=="production"){let i=rm[e];if(n&&wA(n),Fs(`Unhandled error${i?` during execution of ${i}`:""}`),n&&CA(),r)throw t}else if(s)throw t}var Ae=[],ot=-1,wn=[],xt=null,_n=0,TA=Promise.resolve(),_l=null,$A=100;function RA(t){let e=ot+1,n=Ae.length;for(;e<n;){let r=e+n>>>1,s=Ae[r],i=pr(s);i<t||i===t&&s.flags&2?e=r+1:n=r}return e}function NA(t){if(!(t.flags&1)){let e=pr(t),n=Ae[Ae.length-1];!n||!(t.flags&2)&&e>=pr(n)?Ae.push(t):Ae.splice(RA(e),0,t),t.flags|=1,im()}}function im(){_l||(_l=TA.then(om))}function kA(t){Ve(t)?wn.push(...t):xt&&t.id===-1?xt.splice(_n+1,0,t):t.flags&1||(wn.push(t),t.flags|=1),im()}function IA(t){if(wn.length){let e=[...new Set(wn)].sort((n,r)=>pr(n)-pr(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"&&am(t,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}xt=null,_n=0}}var pr=t=>t.id==null?t.flags&2?-1:1/0:t.id;function om(t){process.env.NODE_ENV!=="production"&&(t=t||new Map);let e=process.env.NODE_ENV!=="production"?n=>am(t,n):fA;try{for(ot=0;ot<Ae.length;ot++){let n=Ae[ot];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&e(n))continue;n.flags&4&&(n.flags&=-2),Tl(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;ot<Ae.length;ot++){let n=Ae[ot];n&&(n.flags&=-2)}ot=-1,Ae.length=0,IA(t),_l=null,(Ae.length||wn.length)&&om(t)}}function am(t,e){let n=t.get(e)||0;if(n>$A){let r=e.i,s=r&&fm(r.type);return sm(`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"&&(Ys().__VUE_HMR_RUNTIME__={createRecord:el(DA),rerender:el(PA),reload:el(MA)});var qs=new Map;function DA(t,e){return qs.has(t)?!1:(qs.set(t,{initialDef:Vs(e),instances:new Set}),!0)}function Vs(t){return gm(t)?t.__vccOpts:t}function PA(t,e){let n=qs.get(t);n&&(n.initialDef.render=e,[...n.instances].forEach(r=>{e&&(r.render=e,Vs(r.type).render=e),r.renderCache=[],r.update()}))}function MA(t,e){let n=qs.get(t);if(!n)return;e=Vs(e),Lf(n.initialDef,e);let r=[...n.instances];for(let s=0;s<r.length;s++){let i=r[s],o=Vs(i.type),a=Qa.get(o);a||(o!==n.initialDef&&Lf(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?NA(()=>{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)}kA(()=>{Qa.clear()})}function Lf(t,e){zs(t,e);for(let n in t)n!=="__file"&&!(n in e)&&delete t[n]}function el(t){return(e,n)=>{try{return t(e,n)}catch{}}}var Ls=null,jA=null,FA=t=>t.__isTeleport;function lm(t,e){t.shapeFlag&6&&t.component?(t.transition=e,lm(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}Ys().requestIdleCallback;Ys().cancelIdleCallback;var qA=Symbol.for("v-ndc");process.env.NODE_ENV;var VA={},cm=t=>Object.getPrototypeOf(t)===VA,LA=t=>t.__isSuspense,um=Symbol.for("v-fgt"),HA=Symbol.for("v-txt"),GA=Symbol.for("v-cmt");function UA(t){return t?t.__v_isVNode===!0:!1}var WA=(...t)=>hm(...t),dm=({key:t})=>t??null,Is=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Tt(t)||Ol(t)||Xt(t)?{i:Ls,r:t,k:e,f:!!n}:t:null);function KA(t,e=null,n=null,r=0,s=null,i=t===um?0:1,o=!1,a=!1){let l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&dm(e),ref:e&&Is(e),scopeId:jA,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:Ls};return a?($l(l,n),i&128&&t.normalize(l)):n&&(l.shapeFlag|=Tt(n)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&Fs("VNode created with invalid key (NaN). VNode type:",l.type),l}var BA=process.env.NODE_ENV!=="production"?WA:hm;function hm(t,e=null,n=null,r=0,s=null,i=!1){if((!t||t===qA)&&(process.env.NODE_ENV!=="production"&&!t&&Fs(`Invalid vnode type when creating vnode: ${t}.`),t=GA),UA(t)){let a=Hs(t,e,!0);return n&&$l(a,n),a.patchFlag=-2,a}if(gm(t)&&(t=t.__vccOpts),e){e=zA(e);let{class:a,style:l}=e;a&&!Tt(a)&&(e.class=El(a)),zt(l)&&(gl(l)&&!Ve(l)&&(l=zs({},l)),e.style=Al(l))}let o=Tt(t)?1:LA(t)?128:FA(t)?64:zt(t)?4:Xt(t)?2:0;return process.env.NODE_ENV!=="production"&&o&4&&gl(t)&&(t=Yt(t),Fs("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`.",`
|
|
209
|
+
Component that was made reactive: `,t)),KA(t,e,n,r,s,o,i,!0)}function zA(t){return t?gl(t)||cm(t)?zs({},t):t:null}function Hs(t,e,n=!1,r=!1){let{props:s,ref:i,patchFlag:o,children:a,transition:l}=t,u=e?JA(s||{},e):s,d={__v_isVNode:!0,__v_skip:!0,type:t.type,props:u,key:u&&dm(u),ref:e&&e.ref?n&&i?Ve(i)?i.concat(Is(e)):[i,Is(e)]:Is(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:process.env.NODE_ENV!=="production"&&o===-1&&Ve(a)?a.map(pm):a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==um?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&&Hs(t.ssContent),ssFallback:t.ssFallback&&Hs(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&r&&lm(d,l.clone(d)),d}function pm(t){let e=Hs(t);return Ve(t.children)&&(e.children=t.children.map(pm)),e}function YA(t=" ",e=0){return BA(HA,null,t,e)}function $l(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),$l(t,s()),s._c&&(s._d=!0));return}else n=32,!e._&&!cm(e)&&(e._ctx=Ls);else Xt(e)?(e={default:e,_ctx:Ls},n=32):(e=String(e),r&64?(n=16,e=[YA(e)]):n=8);t.children=e,t.shapeFlag|=n}function JA(...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=El([e.class,r.class]));else if(s==="style")e.style=Al([e.style,r.style]);else if(mA(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=Ys(),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 XA=/(?:^|[-_])(\w)/g,ZA=t=>t.replace(XA,e=>e.toUpperCase()).replace(/[-_]/g,"");function fm(t,e=!0){return Xt(t)?t.displayName||t.name:t.name||e&&t.__name}function mm(t,e,n=!1){let r=fm(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?ZA(r):n?"App":"Anonymous"}function gm(t){return Xt(t)&&"__vccOpts"in t}function QA(){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"]:Ol(c)?["div",{},["span",t,d(c)],"<",a("_value"in c?c._value:c),">"]:tm(c)?["div",{},["span",t,Xa(c)?"ShallowReactive":"Reactive"],"<",a(c),`>${ml(c)?" (readonly)":""}`]:ml(c)?["div",{},["span",t,Xa(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!==fl&&h.push(o("setup",c.setupState)),c.data!==fl&&h.push(o("data",Yt(c.data)));let p=l(c,"computed");p&&h.push(o("computed",p));let g=l(c,"inject");return g&&h.push(o("injected",g)),h.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:c}]]),h}function o(c,h){return h=zs({},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(p=>["div",{},["span",r,p+": "],a(h[p],!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 p=c.type;if(Xt(p))return;let g={};for(let m in c.ctx)u(p,m,h)&&(g[m]=c.ctx[m]);return g}function u(c,h,p){let g=c[p];if(Ve(g)&&g.includes(h)||zt(g)&&h in g||c.extends&&u(c.extends,h,p)||c.mixins&&c.mixins.some(m=>u(m,h,p)))return!0}function d(c){return Xa(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 eE(){QA()}process.env.NODE_ENV!=="production"&&eE();function tE(t){return uA(t)||dA(t)||cA(t)||hA(t)||pA(t)}var _m=(t=>(t.Java="java",t.Kotlin="kotlin",t.CSharp="csharp",t.Go="go",t))(_m||{}),B=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+`
|
|
210
|
+
`}getContent(){return this.content}getName(){return this.name}setName(e){this.name=e}getParentDir(){return this.parentDir}setParentDir(e){this.parentDir=e}},Gs;(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={}))})(Gs||(Gs={}));var Us;(t=>{(e=>{e.ValueClass="ValueClass",e.CommandHandler="CommandHandler",e.Timezone="Timezone"})(t.KotlinGeneratorAddition||(t.KotlinGeneratorAddition={}))})(Us||(Us={}));var Ws;(t=>{(e=>{e.Timezone="Timezone",e.RecordStruct="RecordStruct",e.PrimaryConstructor="PrimaryConstructor",e.CommandHandlerInterface="CommandHandlerInterface",e.AggInterface="AggInterface"})(t.CSharpGeneratorAddition||(t.CSharpGeneratorAddition={}))})(Ws||(Ws={}));var vl;(t=>{(e=>{e.SinglePackageEachDesigner="SinglePackageEachDesigner"})(t.GoGeneratorAddition||(t.GoGeneratorAddition={}))})(vl||(vl={}));var $=Object.freeze(Object.defineProperty({__proto__:null,CodeFile:B,Language:_m,get csharp(){return Ws},get go(){return vl},isStruct:tE,get java(){return Gs},get kotlin(){return Us}},Symbol.toStringTag,{value:"Module"})),R;(t=>{function e(u){return u.trim().split(u.includes("_")?/_|\s/:/(?=[A-Z])/g).map(d=>d.charAt(0).toUpperCase()+d.toLowerCase().slice(1)).join("")}t.stringToUpperCamel=e;function n(u){let d=!0;return u.trim().split(u.includes("_")?/_|\s/:/(?=[A-Z])/g).map(c=>d?(d=!1,c.toLowerCase()):c.charAt(0).toUpperCase()+c.toLowerCase().slice(1)).join("")}t.stringToLowerCamel=n;function r(u){return u.includes("_")?u.toLowerCase():i(u)}t.stringToLowerSnake=r;function s(u){return u.trim().split(/(?=[A-Z])/g).join("_").toUpperCase()}t.camelToUpperSnake=s;function i(u){return u.trim().split(/(?=[A-Z])/g).join("_").toLowerCase()}t.camelToLowerSnake=i;function o(u){return u.trim().split("_").map(d=>d.charAt(0).toUpperCase()+d.slice(1)).join("")}t.snakeToUpperCamel=o;function a(u){return u.trim().charAt(0).toLowerCase()+u.slice(1)}t.lowerFirst=a;function l(u){return u.trim().charAt(0).toUpperCase()+u.slice(1)}t.upperFirst=l})(R||(R={}));var le=Gs.JavaGeneratorAddition,vm=Le.createHotSwapPlugin(()=>{let t="value";function e(n){return R.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;function s(o,a){let l=r.value.additions,u=R.stringToLowerSnake(a._attributes.name).replace(/_/," ");return/\b(time|timestamp|date|deadline|expire)\b/.test(u)?l.has(le.Timezone)?(o.add("java.time.OffsetDateTime"),"OffsetDateTime"):(o.add("java.time.LocalDateTime"),"LocalDateTime"):/\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(u)?"Integer":/\b(price)$/.test(u)?(o.add("java.math.BigDecimal"),"BigDecimal"):/^(if|is)\b/.test(u)?"Boolean":Bs(a)&&(a._attributes.type==="Id"||a._attributes.type==="Version")?"Long":"String"}n.commands._setInfoCodeProvider(o=>{let a=new Set;a.add(r.value.nonNullAnnotation);let l=r.value.nonNullAnnotation.split(".").pop(),u=e(o),d=r.value.additions,c=[];return d.has(le.RecordVakueObject)?(c.push(`public record ${u}(@${l} ${s(a,o)} value) {`),c.push(` public ${u} {`),c.push(" // HACK check value"),c.push(" }"),c.push("}")):d.has(le.Lombok)?(c.push("@lombok.Getter"),c.push(`public class ${u} {`),c.push(` private final ${s(a,o)} value;`),c.push(""),c.push(` public ${u} (@${l} ${s(a,o)} value) {`),c.push(" // HACK check value"),c.push(" this.value = value;"),c.push(" }"),c.push("}")):(c.push(`public class ${e(o)} {`),c.push(` private final ${s(a,o)} value;`),c.push(""),c.push(` public ${u} (@${l} ${s(a,o)} value) {`),c.push(" // HACK check value"),c.push(" this.value = value;"),c.push(" }"),c.push(""),c.push(` public ${s(a,o)} getValue() {`),c.push(" return this.value;"),c.push(" }"),c.push("}")),[{type:"Info",imports:a,content:c.join(`
|
|
211
|
+
`)}]});function i(o){let a=[],l=r.value.additions,u=r.value.nonNullAnnotation.split(".").pop();{let d=new Set;d.add(r.value.nonNullAnnotation);let c=e(o),h=[],p=Object.values(o.inner);for(let g of p)d.add(`${r.value.namespace}.${r.value.moduleName}.${t}.${e(g)}`);if(l.has(le.RecordVakueObject)){l.has(le.LombokBuilder)&&h.push("@lombok.Builder(toBuilder = true)"),h.push(`public record ${c}(`);let g=[];for(let m of p){let _=e(m);g.push(` @${u}
|
|
212
|
+
${_} ${R.lowerFirst(_)}`)}h.push(g.join(`,
|
|
213
|
+
`)),h.push(") {"),h.push(` public ${c} {`),h.push(" // HACK check value"),h.push(" }"),h.push("}")}else if(l.has(le.Lombok)){h.push("@lombok.AllArgsConstructor"),h.push("@lombok.Getter"),l.has(le.LombokBuilder)&&h.push("@lombok.Builder(toBuilder = true)"),h.push(`public class ${c} {`);for(let g of p){let m=e(g);h.push(` @${u}`),h.push(` private final ${m} ${R.lowerFirst(m)};`)}h.push("}")}else{h.push(`public class ${c} {`);for(let _ of p){let f=e(_);h.push(` @${u}`),h.push(` private final ${s(d,_)} ${R.lowerFirst(f)};`)}h.push("");let g=[],m=[];for(let _ of p){let f=e(_);g.push(`@${u} ${s(d,_)} ${R.lowerFirst(f)}`),m.push(`this.${R.lowerFirst(f)} = ${R.lowerFirst(f)};`)}h.push(` public ${c}(${g.join(", ")}) {`),h.push(` ${m.join(`
|
|
214
|
+
`)}`),h.push(" }");for(let _ of p){let f=e(_);h.push(""),h.push(` public ${s(d,_)} get${f} () {`),h.push(` return this.${R.lowerFirst(f)};`),h.push(" }")}h.push("}")}a.push({type:"Command",imports:d,content:h.join(`
|
|
215
|
+
`)})}if(!l.has(le.CommandHandler))return a;{let d=new Set;d.add(r.value.nonNullAnnotation);let c=e(o),h=[];l.has(le.SpringFramework)&&(d.add("org.springframework.stereotype.Component"),h.push("@Component")),l.has(le.Lombok)&&h.push("@lombok.RequiredArgsConstructor"),h.push(`public class ${c}Handler {`);let p=[...n.states.designer.value._getContext().getAssociationMap()[o._attributes.__id]].filter(g=>g._attributes.rule==="Agg");for(let g of p)d.add(`${r.value.namespace}.${r.value.moduleName}.${e(g)}`),h.push(` public ${e(g)} handle(@${u} ${c} command) {`),h.push(" // HACK Implement"),h.push(" }");h.push("}"),a.push({type:"CommandHandler",imports:d,content:h.join(`
|
|
216
|
+
`)})}return a}n.commands._setCommandCodeProvider(i),n.commands._setFacadeCommandCodeProvider(i),n.commands._setAggCodeProvider(o=>{let a=r.value.additions,l=n.states.designer.value,u=r.value.nonNullAnnotation.split(".").pop(),d=e(o),c=[];{let h=new Set;h.add(r.value.nonNullAnnotation);let p=[],g=[],m=[...l._getContext().getAssociationMap()[o._attributes.__id]].filter(_=>_._attributes.rule==="Command"||_._attributes.rule==="FacadeCommand");for(let _ of m){let f=e(_);g.push(`public void handle${f}(@${u} ${f} command);`)}p.push(`public interface ${d} {`),p.push(` ${g.join(`
|
|
217
|
+
|
|
218
|
+
`)}`),p.push("}"),c.push({type:"Agg",imports:h,content:p.join(`
|
|
219
|
+
`)})}{let h=new Set;h.add(r.value.nonNullAnnotation);let p=[],g=Object.values(o.inner);for(let m of g)h.add(`${r.value.namespace}.${r.value.moduleName}.${t}.${e(m)}`);if(a.has(le.Lombok)){p.push("@lombok.AllArgsConstructor"),p.push("@lombok.Getter"),p.push(`public class ${d}Impl implements ${d} {`);for(let _ of g){let f=e(_);p.push(` @${u}`),p.push(` private ${f} ${R.lowerFirst(f)};`)}let m=[...l._getContext().getAssociationMap()[o._attributes.__id]].filter(_=>_._attributes.rule==="Command"||_._attributes.rule==="FacadeCommand");for(let _ of m){let f=e(_);p.push(""),p.push(` public void handle${f}(@${u} ${f} ${R.lowerFirst(f)}) {`),p.push(" // HACK need implement"),p.push(" }")}p.push("}")}else{p.push(`public class ${d}Impl implements ${d} {`);for(let v of g){let b=e(v);p.push(` @${u}`),p.push(` private ${b} ${R.lowerFirst(b)};`)}p.push("");let m=[],_=[];for(let v of g){let b=e(v);m.push(`@${u} ${b} ${R.lowerFirst(b)}`),_.push(`this.${R.lowerFirst(b)} = ${R.lowerFirst(b)};`)}p.push(` public ${d}(${m.join(", ")}) {`),p.push(` ${_.join(`
|
|
220
|
+
`)}`),p.push(" }");for(let v of g){let b=e(v);p.push(""),p.push(` @${u}`),p.push(` public ${b} get${b}() {`),p.push(` return this.${R.lowerFirst(b)};`),p.push(" }")}let f=[...l._getContext().getAssociationMap()[o._attributes.__id]].filter(v=>v._attributes.rule==="Command"||v._attributes.rule==="FacadeCommand");for(let v of f){let b=e(v);p.push(""),p.push(` public void handle${b}(@${u} ${b} ${R.lowerFirst(b)}) {`),p.push(" // HACK need implement"),p.push(" }")}p.push("}")}c.push({type:"AggImpl",imports:h,content:p.join(`
|
|
221
|
+
`)})}return c}),n.commands._setEventCodeProvider(o=>{let a=new Set;a.add(r.value.nonNullAnnotation);let l=r.value.nonNullAnnotation.split(".").pop(),u=r.value.additions,d=e(o),c=[],h=Object.values(o.inner);for(let p of h)a.add(`${r.value.namespace}.${r.value.moduleName}.${t}.${e(p)}`);if(u.has(le.RecordVakueObject)){u.has(le.LombokBuilder)&&c.push("@lombok.Builder(toBuilder = true)"),c.push(`public record ${d}(`);let p=[];for(let g of h){let m=e(g);p.push(` @${l}
|
|
222
|
+
${m} ${R.lowerFirst(m)}`)}c.push(p.join(`,
|
|
223
|
+
`)),c.push(") {"),c.push(` public ${d} {`),c.push(" // HACK check value"),c.push(" }"),c.push("}")}else if(u.has(le.Lombok)){c.push("@lombok.AllArgsConstructor"),c.push("@lombok.Getter"),u.has(le.LombokBuilder)&&c.push("@lombok.Builder(toBuilder = true)"),c.push(`public class ${d} {`);for(let p of h){let g=e(p);c.push(` @${l}`),c.push(` private final ${g} ${R.lowerFirst(g)};`)}c.push("}")}else{c.push(`public class ${d} {`);for(let m of h){let _=e(m);c.push(` @${l}`),c.push(` private final ${_} ${R.lowerFirst(_)};`)}c.push("");let p=[],g=[];for(let m of h){let _=e(m);p.push(`@${l} ${s(a,m)} ${R.lowerFirst(_)}`),g.push(`this.${R.lowerFirst(_)} = ${R.lowerFirst(_)};`)}c.push(` public ${d}(${p.join(", ")}) {`),c.push(` ${g.join(`
|
|
224
|
+
`)}`),c.push(" }");for(let m of h){let _=e(m);c.push(""),c.push(` public ${_} get${_} () {`),c.push(` return this.${R.lowerFirst(_)};`),c.push(" }")}c.push("}")}return[{type:"Event",imports:a,content:c.join(`
|
|
225
|
+
`)}]}),n.commands._setReadModelCodeProvider(()=>[]),n.commands._setCodeFileProvider(()=>{let o=[],a={};function l(p){for(let g of Object.values(p)){let m=[...r.value.namespace.split(/\./),r.value.moduleName,t],_=e(g)+".java";if(a[`${m.join("/")}/${_}`]===!0)continue;let f=n.commands._genInfoCode(g);if(f.length===0)continue;let v=new B(m,_);v.appendContentln(`package ${r.value.namespace}.${r.value.moduleName}.${t};`),v.appendContentln("");for(let b of f[0].imports)v.appendContentln(`import ${b};`);v.appendContentln(""),v.appendContentln(f[0].content),o.push(v),a[`${m.join("/")}/${_}`]=!0}}let u=n.states.designer.value._getContext().getCommands();for(let p of u){l(p.inner);let g=n.commands._genCommandCode(p),m=[...r.value.namespace.split(/\./),r.value.moduleName];g.forEach(_=>{if(_.type==="Command"){let f=new B(m,e(p)+".java");f.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),f.appendContentln(""),f.addImports(_.imports);for(let v of _.imports)f.appendContentln(`import ${v};`);f.appendContentln(""),f.appendContentln(_.content),o.push(f)}else if(_.type==="CommandHandler"){let f=new B(m,e(p)+"Handler.java");f.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),f.appendContentln(""),f.addImports(_.imports);for(let v of _.imports)f.appendContentln(`import ${v};`);f.appendContentln(""),f.appendContentln(_.content),o.push(f)}else isNever(_.type)})}let d=n.states.designer.value._getContext().getFacadeCommands();for(let p of d){l(p.inner);let g=n.commands._genFacadeCommandCode(p),m=[...r.value.namespace.split(/\./),r.value.moduleName];g.forEach(_=>{if(_.type==="FacadeCommand"){let f=new B(m,e(p)+".java");f.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),f.appendContentln(""),f.addImports(_.imports);for(let v of _.imports)f.appendContentln(`import ${v};`);f.appendContentln(""),f.appendContentln(_.content),o.push(f)}else isNever(_.type)})}let c=n.states.designer.value._getContext().getAggs();for(let p of c){l(p.inner);let g=n.commands._genAggCode(p),m=[...r.value.namespace.split(/\./),r.value.moduleName];g.forEach(_=>{if(_.type==="Agg"){let f=new B(m,e(p)+".java");f.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),f.appendContentln(""),f.addImports(_.imports);for(let v of _.imports)f.appendContentln(`import ${v};`);f.appendContentln(""),f.appendContentln(_.content),o.push(f)}else if(_.type==="AggImpl"){let f=new B(m,e(p)+"Impl.java");f.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),f.appendContentln(""),f.addImports(_.imports);for(let v of _.imports)f.appendContentln(`import ${v};`);f.appendContentln(""),f.appendContentln(_.content),o.push(f)}else isNever(_.type)})}let h=n.states.designer.value._getContext().getEvents();for(let p of h){l(p.inner);let g=n.commands._genEventCode(p),m=[...r.value.namespace.split(/\./),r.value.moduleName];g.forEach(_=>{let f=new B(m,e(p)+".java");f.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`),f.appendContentln(""),f.addImports(_.imports);for(let v of _.imports)f.appendContentln(`import ${v};`);f.appendContentln(""),f.appendContentln(_.content),o.push(f)})}return o})}}}),tl=Us.KotlinGeneratorAddition,bm=Le.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;function r(i){return R.stringToUpperCamel(i._attributes.name)}function s(i,o){let a=n.value.additions,l=R.stringToLowerSnake(o._attributes.name).replace(/_/," ");return/\b(time|timestamp|date|deadline|expire)\b/.test(l)?a.has(tl.Timezone)?(i.add("java.time.OffsetDateTime"),"OffsetDateTime"):(i.add("java.time.LocalDateTime"),"LocalDateTime"):/\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(l)?"Integer":/\b(price)$/.test(l)?(i.add("java.math.BigDecimal"),"BigDecimal"):/^(if|is)\b/.test(l)?"Boolean":Bs(o)&&(o._attributes.type==="Id"||o._attributes.type==="Version")?"Long":"String"}t.commands._setInfoCodeProvider(i=>{let o=new Set,a=r(i),l=n.value.additions,u=[];return l.has(tl.ValueClass)?(o.add("kotlin.jvm.JvmInline"),u.push("@JvmInline"),u.push(`value class ${a}(val value: ${s(o,i)})`)):u.push(`data class ${a}(val value: ${s(o,i)})`),[{type:"Info",imports:o,content:u.join(`
|
|
226
|
+
`)}]}),t.commands._setCommandCodeProvider(i=>{let o=[],a=n.value.additions;{let l=new Set,u=r(i),d=[],c=Object.values(i.inner);for(let p of c)l.add(`${n.value.namespace}.${n.value.moduleName}.${e}.${r(p)}`);let h=[];for(let p of c){let g=r(p);h.push(`val ${R.lowerFirst(g)}: ${g}`)}d.push(`data class ${u}(${h.join(", ")})`),o.push({type:"Command",imports:l,content:d.join(`
|
|
227
|
+
`)})}if(!a.has(tl.CommandHandler))return o;{let l=new Set,u=r(i),d=[];d.push(`class ${u}Handler {`);let c=[...t.states.designer.value._getContext().getAssociationMap()[i._attributes.__id]].filter(h=>h._attributes.rule==="Agg");for(let h of c)l.add(`${n.value.namespace}.${n.value.moduleName}.${r(h)}`),d.push(` fun handle(command: ${u}): ${r(h)} {`),d.push(" // HACK Implement"),d.push(" }");d.push("}"),o.push({type:"CommandHandler",imports:l,content:d.join(`
|
|
228
|
+
`)})}return o}),t.commands._setFacadeCommandCodeProvider(i=>{let o=new Set,a=r(i),l=[],u=Object.values(i.inner);for(let c of u)o.add(`${n.value.namespace}.${n.value.moduleName}.${e}.${r(c)}`);let d=[];for(let c of u){let h=r(c);d.push(`val ${R.lowerFirst(h)}: ${h}`)}return l.push(`data class ${a}(${d.join(", ")})`),[{type:"FacadeCommand",imports:o,content:l.join(`
|
|
229
|
+
`)}]}),t.commands._setAggCodeProvider(i=>{let o=new Set,a=t.states.designer.value,l=r(i),u=[],d=Object.values(i.inner);for(let g of d)o.add(`${n.value.namespace}.${n.value.moduleName}.${e}.${r(g)}`);let c=[],h=[...a._getContext().getAssociationMap()[i._attributes.__id]].filter(g=>g._attributes.rule==="Command"||g._attributes.rule==="FacadeCommand");for(let g of h){let m=r(g);c.push(`fun handle(command: ${m})`)}u.push(`interface ${l} {`),u.push(` ${c.join(`
|
|
230
|
+
`)}`),u.push("}"),u.push(""),u.push(`class ${l}Impl(`);let p=[];for(let g of d){let m=r(g);p.push(`val ${R.lowerFirst(m)}: ${m}`)}u.push(` ${p.join(`,
|
|
231
|
+
`)}`),u.push(`): ${l} {`);for(let g of h){let m=r(g);u.push(` override fun handle(command: ${m}) {`),u.push(" // HACK Implement"),u.push(" }")}return u.push("}"),[{type:"Agg",imports:o,content:u.join(`
|
|
232
|
+
`)}]}),t.commands._setEventCodeProvider(i=>{let o=new Set,a=r(i),l=[],u=Object.values(i.inner);for(let c of u)o.add(`${n.value.namespace}.${n.value.moduleName}.${e}.${r(c)}`);let d=[];for(let c of u){let h=r(c);d.push(`val ${R.lowerFirst(h)}: ${h}`)}return l.push(`data class ${a}(${d.join(", ")})`),[{type:"Event",imports:o,content:l.join(`
|
|
233
|
+
`)}]}),t.commands._setReadModelCodeProvider(()=>[]),t.commands._setCodeFileProvider(()=>{let i=[],o={};function a(h){for(let p of Object.values(h)){let g=[...n.value.namespace.split(/\./),n.value.moduleName,e],m=r(p)+".kt";if(o[`${g.join("/")}/${m}`]===!0)continue;let _=t.commands._genInfoCode(p);if(_.length===0)continue;let f=new B(g,m);f.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}.${e}`),f.appendContentln("");for(let v of _[0].imports)f.appendContentln(`import ${v}`);f.appendContentln(""),f.appendContentln(_[0].content),i.push(f),o[`${g.join("/")}/${m}`]=!0}}let l=t.states.designer.value._getContext().getCommands();for(let h of l){a(h.inner);let p=t.commands._genCommandCode(h),g=[...n.value.namespace.split(/\./),n.value.moduleName],m=new B(g,r(h)+".kt"),_=[];m.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`),m.appendContentln(""),p.forEach(f=>{f.type==="Command"||f.type==="CommandHandler"?(m.addImports(f.imports),_.push(f.content)):isNever(f.type)});for(let f of m.getImports())m.appendContentln(`import ${f}`);m.appendContentln("");for(let f of _)m.appendContentln(f);i.push(m)}let u=t.states.designer.value._getContext().getFacadeCommands();for(let h of u){a(h.inner);let p=t.commands._genFacadeCommandCode(h),g=[...n.value.namespace.split(/\./),n.value.moduleName];p.forEach(m=>{if(m.type==="FacadeCommand"){let _=new B(g,r(h)+".kt");_.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`),_.appendContentln(""),_.addImports(m.imports);for(let f of m.imports)_.appendContentln(`import ${f}`);_.appendContentln(""),_.appendContentln(m.content),i.push(_)}else isNever(m.type)})}let d=t.states.designer.value._getContext().getAggs();for(let h of d){a(h.inner);let p=t.commands._genAggCode(h),g=[...n.value.namespace.split(/\./),n.value.moduleName],m=new B(g,r(h)+".kt"),_=[];m.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`),m.appendContentln(""),p.forEach(f=>{f.type==="Agg"||f.type==="AggImpl"?(m.addImports(f.imports),_.push(f.content)):isNever(f.type)});for(let f of m.getImports())m.appendContentln(`import ${f}`);m.appendContentln("");for(let f of _)m.appendContentln(f);i.push(m)}let c=t.states.designer.value._getContext().getEvents();for(let h of c){a(h.inner);let p=t.commands._genEventCode(h),g=[...n.value.namespace.split(/\./),n.value.moduleName];p.forEach(m=>{if(m.type==="Event"){let _=new B(g,r(h)+".kt");_.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`),_.appendContentln(""),_.addImports(m.imports);for(let f of m.imports)_.appendContentln(`import ${f}`);_.appendContentln(""),_.appendContentln(m.content),i.push(_)}else isNever(m.type)})}return i})}})),ym=Le.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;function n(i){return R.stringToUpperCamel(i._attributes.name)}function r(i){return R.stringToLowerCamel(i._attributes.name)}function s(i,o){let a=R.stringToLowerSnake(o._attributes.name).replace(/_/," ");return/\b(time|timestamp|date|deadline|expire)\b/.test(a)?(i.add("time"),"time.Time"):/\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(a)?"int":/\b(price)$/.test(a)?"string":/^(if|is)\b/.test(a)?"bool":Bs(o)&&(o._attributes.type==="Id"||o._attributes.type==="Version")?"int64":"string"}t.commands._setInfoCodeProvider(i=>{let o=new Set,a=[];return a.push(`type ${n(i)} struct {`),a.push(` value ${s(o,i)}`),a.push("}"),a.push(""),a.push(`func New${n(i)}(value ${s(o,i)}) ${n(i)} {`),a.push(" // HACK check value"),a.push(` return ${n(i)}{value}`),a.push("}"),a.push(`func (${r(i)} ${n(i)}) GetValue() ${s(o,i)} {`),a.push(` return ${r(i)}.value`),a.push("}"),[{type:"Info",imports:o,content:a.join(`
|
|
234
|
+
`)}]}),t.commands._setCommandCodeProvider(i=>{let o=n(i),a=r(i),l=new Set,u=[];u.push(`type ${o} struct {`);let d=Object.values(i.inner);for(let p of d)u.push(` ${r(p)} ${n(p)}`);u.push("}");for(let p of d)u.push(`func (${a} ${o}) Get${n(p)} () ${n(p)} {`),u.push(` return ${a}.${r(p)}`),u.push("}");let c=[],h=[];for(let p of d)c.push(`${r(p)} ${n(p)}`),h.push(r(p));return u.push(`func New${o}(${c.join(", ")}) ${o} {`),u.push(" // HACK check value"),u.push(` return ${o}{`),u.push(` ${h.join(`,
|
|
235
|
+
`)},`),u.push(" }"),u.push("}"),[{type:"Command",imports:l,content:u.join(`
|
|
236
|
+
`)}]}),t.commands._setFacadeCommandCodeProvider(i=>{let o=n(i),a=r(i),l=Object.values(i.inner),u=new Set,d=[];d.push(`type ${o} struct {`);for(let p of l)d.push(` ${r(p)} ${n(p)}`);d.push("}");for(let p of l)d.push(`func (${a} ${o}) Get${n(p)} () ${n(p)} {`),d.push(` return ${a}.${r(p)}`),d.push("}");let c=[],h=[];for(let p of l)c.push(`${r(p)} ${n(p)}`),h.push(r(p));return d.push(`func New${o}(${c.join(", ")}) ${o} {`),d.push(" // HACK check value"),d.push(` return ${o}{`),d.push(` ${h.join(`,
|
|
237
|
+
`)},`),d.push(" }"),d.push("}"),[{type:"FacadeCommand",imports:u,content:d.join(`
|
|
238
|
+
`)}]}),t.commands._setAggCodeProvider(i=>{let o=t.states.designer.value,a=n(i),l=r(i),u=Object.values(i.inner),d=new Set,c=[];c.push(`type ${a} struct {`);for(let m of u)c.push(` ${r(m)} ${n(m)}`);c.push("}");for(let m of u)c.push(`func (${l} ${a}) Get${n(m)} () ${n(m)} {`),c.push(` return ${l}.${r(m)}`),c.push("}");let h=[],p=[];for(let m of u)h.push(`${r(m)} ${n(m)}`),p.push(r(m));c.push(`func New${a}(${h.join(", ")}) ${a} {`),c.push(" // HACK check value"),c.push(` return ${a}{`),c.push(` ${p.join(`,
|
|
239
|
+
`)},`),c.push(" }"),c.push("}"),c.push("");let g=[...o._getContext().getAssociationMap()[i._attributes.__id]].filter(m=>m._attributes.rule==="Command"||m._attributes.rule==="FacadeCommand");for(let m of g){let _=n(m),f=r(m);c.push(`func (${l} ${a}) Handle${_} (${f} ${_}) {`),c.push(" // HACK implement"),c.push("}")}return[{type:"Agg",imports:d,content:c.join(`
|
|
240
|
+
`)}]}),t.commands._setEventCodeProvider(i=>{let o=[],a=new Set,l=Object.values(i.inner),u=n(i),d=r(i);o.push(`type ${u} struct {`);for(let p of l)o.push(` ${r(p)} ${n(p)}`);o.push("}");for(let p of l)o.push(`func (${d} ${u}) Get${n(p)} () ${n(p)} {`),o.push(` return ${d}.${r(p)}`),o.push("}");let c=[],h=[];for(let p of l)c.push(`${r(p)} ${n(p)}`),h.push(r(p));return o.push(`func New${u}(${c.join(", ")}) ${u} {`),o.push(" // HACK check value"),o.push(` return ${u}{`),o.push(` ${h.join(`,
|
|
241
|
+
`)},`),o.push(" }"),o.push("}"),[{type:"Event",imports:a,content:o.join(`
|
|
242
|
+
`)}]}),t.commands._setCodeFileProvider(()=>{let i=[],o={},a=[...e.value.namespace.split(/\./),e.value.moduleName],l=new B(a,`${e.value.moduleName}.go`),u=[],d=new B(a,`${e.value.moduleName}_value_object.go`),c=[];function h(f){for(let v of Object.values(f)){let b=n(v);if(o[`${a.join("/")}/${b}`]===!0)continue;let x=t.commands._genInfoCode(v);x.length!==0&&(d.addImports(x[0].imports),c.push(x[0].content),c.push(""),o[`${a.join("/")}/${b}`]=!0)}}let p=t.states.designer.value._getContext().getCommands();for(let f of p){h(f.inner);let v=t.commands._genCommandCode(f);for(let b of v)o[b.content]!==!0&&(l.addImports(b.imports),u.push(b.content))}let g=t.states.designer.value._getContext().getFacadeCommands();for(let f of g){h(f.inner);let v=t.commands._genFacadeCommandCode(f);for(let b of v)o[b.content]!==!0&&(l.addImports(b.imports),u.push(b.content))}let m=t.states.designer.value._getContext().getAggs();for(let f of m){h(f.inner);let v=t.commands._genAggCode(f);for(let b of v)o[b.content]!==!0&&(l.addImports(b.imports),u.push(b.content))}let _=t.states.designer.value._getContext().getEvents();for(let f of _){h(f.inner);let v=t.commands._genEventCode(f);for(let b of v)o[b.content]!==!0&&(l.addImports(b.imports),u.push(b.content))}return l.appendContentln(`package ${e.value.moduleName}`),l.appendContentln(""),l.getImports().length>0&&(l.appendContentln("import ("),l.appendContentln(` ${[...l.getImports()].join(`
|
|
243
|
+
`)}`),l.appendContentln(")")),l.appendContentln(u.join(`
|
|
244
|
+
`)),d.appendContentln(`package ${e.value.moduleName}`),d.appendContentln(""),d.getImports().length>0&&(d.appendContentln("import ("),d.appendContentln(` ${[...d.getImports()].map(f=>`"${f}"`).join(`
|
|
245
|
+
`)}`),d.appendContentln(")"),d.appendContentln("")),d.appendContentln(c.join(`
|
|
246
|
+
`)),i.push(l),i.push(d),i})}})),gn=Ws.CSharpGeneratorAddition,wm=Le.createHotSwapPlugin(()=>{let t=" ";function e(n,r=1){return n.split(`
|
|
247
|
+
`).map(s=>t.repeat(r)+s).join(`
|
|
248
|
+
`)}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;function s(a){return R.stringToUpperCamel(a._attributes.name)}function i(a){return a.has(gn.RecordStruct)?" struct":""}function o(a,l){let u=r.value.additions,d=R.stringToLowerSnake(l._attributes.name).replace(/_/," ");return/\b(time|timestamp|date|deadline|expire)\b/.test(d)?u.has(gn.Timezone)?"System.DateTimeOffset":"System.DateTime":/\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(d)?"int":/\b(price)$/.test(d)?"decimal":/^(if|is)\b/.test(d)?"bool":Bs(l)&&(l._attributes.type==="Id"||l._attributes.type==="Version")?"long":"string"}n.commands._setInfoCodeProvider(a=>{let l=r.value.additions,u=new Set,d=[];return d.push(`public record${i(l)} ${s(a)}(${o(u,a)} value);`),[{type:"Info",content:d.join(`
|
|
249
|
+
`),imports:u}]}),n.commands._setCommandCodeProvider(a=>{let l=[],u=r.value.additions,d=new Set,c=s(a);{let h=[],p=Object.values(a.inner);h.push(`public record${i(u)} ${c}`),h.push("(");let g=[];for(let m of p){let _=s(m);g.push(`${_} ${R.upperFirst(_)}`)}h.push(` ${g.join(`,
|
|
250
|
+
`)}`),h.push(")"),h.push("{"),h.push("}"),l.push({type:"Command",content:h.join(`
|
|
251
|
+
`),imports:d})}{let h=u.has(gn.CommandHandlerInterface)?` : ${r.value.commandHandlerInterface}`:"",p=[];p.push(`public class ${c}Handler${h}`),p.push("{"),p.push(` public void Handle(${c} command)`),p.push(" {"),p.push(" // HACK implement"),p.push(" }"),p.push("}"),l.push({type:"CommandHandler",content:p.join(`
|
|
252
|
+
`),imports:d})}return l}),n.commands._setAggCodeProvider(a=>{let l=[],u=n.states.designer.value,d=r.value.additions;{let c=new Set,h=[],p=d.has(gn.AggInterface)?` : ${r.value.aggInterface}`:"";h.push(`public interface I${s(a)}${p}`),h.push("{");let g=[],m=[...u._getContext().getAssociationMap()[a._attributes.__id]].filter(_=>_._attributes.rule==="Command"||_._attributes.rule==="FacadeCommand");for(let _ of m){let f=s(_);g.push(`void Handle${f}(${f} command);`)}h.push(` ${g.join(`
|
|
253
|
+
|
|
254
|
+
`)}`),h.push("}"),h.push(""),l.push({type:"Agg",content:h.join(`
|
|
255
|
+
`),imports:c})}{let c=new Set,h=[],p=s(a),g=Object.values(a.inner),m=d.has(gn.AggInterface)?`, ${r.value.aggInterface}`:"";if(d.has(gn.PrimaryConstructor)){let _=[...u._getContext().getAssociationMap()[a._attributes.__id]].filter(b=>b._attributes.rule==="Command"||b._attributes.rule==="FacadeCommand"),f=[];for(let b of g){let x=s(b);f.push(`${x} ${R.lowerFirst(x)}`)}h.push(`public class ${p}`),h.push("("),h.push(` ${f.join(`,
|
|
256
|
+
`)}`),h.push(`): I${p}${m}`),h.push("{");for(let b of g){let x=s(b);h.push(` public ${x} ${R.upperFirst(x)} { get; private set; } = ${R.lowerFirst(x)};`),h.push("")}let v=[];for(let b of _){let x=s(b);v.push(`public void Handle${x}(${x} command)`),v.push("{"),v.push(" // HACK implement"),v.push("}"),v.push("")}h.push(` ${v.join(`
|
|
257
|
+
`)}`),h.push("}")}else{let _=[...u._getContext().getAssociationMap()[a._attributes.__id]].filter(b=>b._attributes.rule==="Command"||b._attributes.rule==="FacadeCommand");h.push(`public class ${p} : I${p}${m}`),h.push("{");for(let b of g){let x=s(b);h.push(` public ${x} ${R.lowerFirst(x)} { get; private set; }`)}h.push("");let f=[];for(let b of g){let x=s(b);f.push(`${x} ${x}`)}h.push(` public ${p}(${f.join(", ")})`),h.push(" {");for(let b of g){let x=s(b);h.push(` ${x} = ${R.lowerFirst(x)};`)}h.push(" }");let v=[];for(let b of _){let x=s(b);v.push(`public void Handle${x}(${x} command)`),v.push("{"),v.push(" // HACK implement"),v.push("}"),v.push("")}h.push(` ${v.join(`
|
|
258
|
+
`)}`),h.push("}")}l.push({type:"AggImpl",content:h.join(`
|
|
259
|
+
`),imports:c})}return l}),n.commands._setEventCodeProvider(a=>{let l=r.value.additions,u=s(a),d=new Set,c=Object.values(a.inner),h=[];h.push(`public record${i(l)} ${u}`),h.push("(");let p=[];for(let g of c){let m=s(g);p.push(`${m} ${R.upperFirst(m)}`)}return h.push(` ${p.join(`,
|
|
260
|
+
`)}`),h.push(")"),h.push("{"),h.push("}"),[{type:"Event",content:h.join(`
|
|
261
|
+
`),imports:d}]}),n.commands._setReadModelCodeProvider(()=>[]),n.commands._setCodeFileProvider(()=>{let a=[],l={},u=[...r.value.namespace.split(/\./),R.stringToUpperCamel(r.value.moduleName)];function d(m){for(let _ of Object.values(m)){let f=s(_)+".cs";if(l[`${u.join("/")}/${f}`]===!0)continue;let v=n.commands._genInfoCode(_);if(v.length===0)continue;let b=new B(u,f);for(let x of v[0].imports)b.appendContentln(`using ${x};`);b.appendContentln(""),b.appendContentln(`namespace ${r.value.namespace}.${R.stringToUpperCamel(r.value.moduleName)}`),b.appendContentln("{"),b.appendContentln(e(v[0].content)),b.appendContentln("}"),a.push(b),l[`${u.join("/")}/${f}`]=!0}}let c=n.states.designer.value._getContext().getCommands();for(let m of c){d(m.inner);let _=s(m)+".cs",f=n.commands._genCommandCode(m),v=new B(u,_);for(let b of f)if(b.type==="Command"){v.addImports(b.imports);for(let x of b.imports)v.appendContentln(`using ${x};`);v.appendContentln(""),v.appendContentln(`namespace ${r.value.namespace}.${R.stringToUpperCamel(r.value.moduleName)}`),v.appendContentln("{"),v.appendContentln(e(b.content)),v.appendContentln("}")}a.push(v)}let h=n.states.designer.value._getContext().getFacadeCommands();for(let m of h){d(m.inner);let _=s(m)+".cs",f=n.commands._genFacadeCommandCode(m),v=new B(u,_);v.addImports(f[0].imports);for(let b of f[0].imports)v.appendContentln(`using ${b};`);v.appendContentln(""),v.appendContentln(`namespace ${r.value.namespace}.${R.stringToUpperCamel(r.value.moduleName)}`),v.appendContentln("{"),v.appendContentln(e(f[0].content)),v.appendContentln("}"),a.push(v)}let p=n.states.designer.value._getContext().getAggs();for(let m of p){d(m.inner);let _=n.commands._genAggCode(m),f=s(m)+".cs",v=new B(u,f);for(let b of _){v.addImports(b.imports);for(let x of b.imports)v.appendContentln(`using ${x};`);v.appendContentln("")}v.appendContentln(`namespace ${r.value.namespace}.${R.stringToUpperCamel(r.value.moduleName)}`),v.appendContentln("{");for(let b of _)v.appendContentln(e(b.content));v.appendContentln("}"),a.push(v)}let g=n.states.designer.value._getContext().getEvents();for(let m of g){d(m.inner);let _=s(m)+".cs",f=n.commands._genEventCode(m),v=new B(u,_);v.addImports(f[0].imports);for(let b of f[0].imports)v.appendContentln(`using ${b};`);v.appendContentln(""),v.appendContentln(`namespace ${r.value.namespace}.${R.stringToUpperCamel(r.value.moduleName)}`),v.appendContentln("{"),v.appendContentln(e(f[0].content)),v.appendContentln("}"),a.push(v)}return a})}}});var Tm=q(Vt(),1);var Rl=q(Vt(),1);var{t:He}=Y().commands;async function Cm(){let t={},{namespace:e,additions:n}=await(0,Rl.default)([{name:"namespace",type:"text",message:He("question.subcommand.genCode.package"),initial:"com.github.example"},{name:"additions",type:"multiselect",message:He("question.subcommand.genCode.java.additions"),choices:[{title:$.java.JavaGeneratorAddition.SpringFramework,value:$.java.JavaGeneratorAddition.SpringFramework,selected:!0,description:He("question.subcommand.genCode.java.additions.springFramework")},{title:$.java.JavaGeneratorAddition.Lombok,value:$.java.JavaGeneratorAddition.Lombok,selected:!0,description:He("question.subcommand.genCode.java.additions.lombok")},{title:$.java.JavaGeneratorAddition.LombokBuilder,value:$.java.JavaGeneratorAddition.LombokBuilder,description:He("question.subcommand.genCode.java.additions.lombokBuilder")},{title:$.java.JavaGeneratorAddition.CommandHandler,value:$.java.JavaGeneratorAddition.CommandHandler,selected:!0,description:He("question.subcommand.genCode.java.additions.commandHandler")},{title:$.java.JavaGeneratorAddition.RecordVakueObject,value:$.java.JavaGeneratorAddition.RecordVakueObject,description:He("question.subcommand.genCode.java.additions.recordVakueObject")},{title:$.java.JavaGeneratorAddition.Timezone,value:$.java.JavaGeneratorAddition.Timezone,selected:!0,description:He("question.subcommand.genCode.java.additions.timezone")}],hint:He("question.subcommand.genCode.additions.hint")}],{onCancel:X}),r=n.includes($.java.JavaGeneratorAddition.SpringFramework)?"org.springframework.lang.NonNull":void 0;return r===void 0&&(r=(await(0,Rl.default)([{name:"nonNullAnnotation",type:"select",message:He("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:X})).nonNullAnnotation),t.namespace=e,t.additions=new Set(n),t.moduleName="",t.nonNullAnnotation=r,t}var Sm=q(Vt(),1),{t:xn}=Y().commands;async function xm(){let t={},{namespace:e,additions:n}=await(0,Sm.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:$.kotlin.KotlinGeneratorAddition.CommandHandler,value:$.kotlin.KotlinGeneratorAddition.CommandHandler,selected:!0,description:xn("question.subcommand.genCode.kotlin.additions.commandHandler")},{title:$.kotlin.KotlinGeneratorAddition.ValueClass,value:$.kotlin.KotlinGeneratorAddition.ValueClass,selected:!0,description:xn("question.subcommand.genCode.kotlin.additions.valueClass")},{title:$.kotlin.KotlinGeneratorAddition.Timezone,value:$.kotlin.KotlinGeneratorAddition.Timezone,description:xn("question.subcommand.genCode.kotlin.additions.timezone")}],hint:xn("question.subcommand.genCode.additions.hint")}],{onCancel:X});return t.namespace=e,t.additions=new Set(n),t}var Js=q(Vt(),1);var{t:Ge}=Y().commands;async function Am(){let t={},{namespace:e,additions:n}=await(0,Js.default)([{name:"namespace",type:"text",message:Ge("question.subcommand.genCode.namespace"),initial:"WebApplication1.Domain"},{name:"additions",type:"multiselect",message:Ge("question.subcommand.genCode.csharp.additions"),choices:[{title:$.csharp.CSharpGeneratorAddition.Timezone,value:$.csharp.CSharpGeneratorAddition.Timezone,selected:!0,description:Ge("question.subcommand.genCode.csharp.additions.timezone")},{title:$.csharp.CSharpGeneratorAddition.RecordStruct,value:$.csharp.CSharpGeneratorAddition.RecordStruct,selected:!0,description:Ge("question.subcommand.genCode.csharp.additions.recordStruct")},{title:$.csharp.CSharpGeneratorAddition.PrimaryConstructor,value:$.csharp.CSharpGeneratorAddition.PrimaryConstructor,selected:!0,description:Ge("question.subcommand.genCode.csharp.additions.primaryConstructor")},{title:$.csharp.CSharpGeneratorAddition.CommandHandlerInterface,value:$.csharp.CSharpGeneratorAddition.CommandHandlerInterface,selected:!1,description:Ge("question.subcommand.genCode.csharp.additions.commandHandlerInterface")},{title:$.csharp.CSharpGeneratorAddition.AggInterface,value:$.csharp.CSharpGeneratorAddition.AggInterface,selected:!1,description:Ge("question.subcommand.genCode.csharp.additions.aggInterface")}],hint:Ge("question.subcommand.genCode.additions.hint")}],{onCancel:X});if(t.additions=new Set(n),t.namespace=e,t.additions.has($.csharp.CSharpGeneratorAddition.CommandHandlerInterface)){let{commandHandlerInterface:r}=await(0,Js.default)([{name:"commandHandlerInterface",type:"text",message:Ge("question.subcommand.genCode.csharp.additions.commandHandlerInterface.hint")}],{onCancel:X});t.commandHandlerInterface=r}if(t.additions.has($.csharp.CSharpGeneratorAddition.AggInterface)){let{aggInterface:r}=await(0,Js.default)([{name:"aggInterface",type:"text",message:Ge("question.subcommand.genCode.csharp.additions.aggInterface.hint")}],{onCancel:X});t.aggInterface=r}return t}var Em=q(Vt(),1);var{t:nE}=Y().commands;async function Om(){let t={},{namespace:e}=await(0,Em.default)([{name:"namespace",type:"text",message:nE("question.subcommand.genCode.namespace"),initial:"ComGithub.Example"}],{onCancel:X});return t.namespace=e,t.additions=new Set,t}var{t:rE}=Y().commands;function $m(t){return new Ce().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
|
+
`).addHelpText("before",`\u751F\u6210\u4EE3\u7801
|
|
263
|
+
`)}async function Rm(t){let e=(await(0,Tm.default)([{name:"language",type:"select",message:rE("question.subcommand.genCode.language"),choices:[{title:$.Language.CSharp,value:$.Language.CSharp},{title:$.Language.Go,value:$.Language.Go},{title:$.Language.Java,value:$.Language.Java},{title:$.Language.Kotlin,value:$.Language.Kotlin}]}],{onCancel:X})).language;t.args.language=e,e===$.Language.Java?t.args.context=await Cm():e===$.Language.Kotlin?t.args.context=await xm():e===$.Language.CSharp?t.args.context=await Am():e===$.Language.Go?t.args.context=await Om():isNever(e)}async function Nm(t){let e=t.webRoot,n=t.source,r=process.env.PACKAGE_MANAGER;S.printInfo("================ Install dependencies: Starting... ================"),r==="bun"?(0,Xs.spawnSync)(`bun i --cwd "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):r==="pnpm"?(0,Xs.spawnSync)(`pnpm i --prefix "${e}"`,{encoding:"utf-8",stdio:"inherit",shell:!0}):isNever(r),S.printSuccess("================ Install dependencies: Succeeded ================"),S.printInfo("================ Compliling ts code: Starting... ================"),(0,Xs.spawnSync)(`${r==="bun"?"bunx":"pnpx"} zx ${e.replace(/\\/g,"/")}/scripts/build-ts.mjs --source=${n}`,{encoding:"utf-8",stdio:"inherit",shell:!0}),S.printSuccess("================ Compliling ts code: Succeeded ================"),S.printInfo("================ Generating code: Starting... ================");let i=An.default.readdirSync(mr.default.join(n,".output","esm")),o,a=!1;tr(`${n.replace(/\\/g,"/")}/.output/${t.language}`);for(let l of i){if(An.default.statSync(mr.default.join(n,".output","esm",l)).isDirectory()||!l.endsWith(".mjs"))continue;let u=await import(`file://${n.replace(/\\/g,"/")}/.output/esm/${l}`);if(!vf(u.default))continue;let d=u.default;a||(t.language===$.Language.Java?Le.registerPlugin(vm):t.language===$.Language.Kotlin?Le.registerPlugin(bm):t.language===$.Language.CSharp?Le.registerPlugin(wm):t.language===$.Language.Go?Le.registerPlugin(ym):isNever(t.language),a=!0),o=em(d),o.commands.setDomainDesigner(d),t.context.moduleName=d._getContext().getModuleName()||l.split(".")[0],o.commands.setContext(t.context);let c=o.commands.genCodeFiles();for(let h of c){let p=mr.default.join(n,".output",t.language,...h.getParentDir());An.default.existsSync(p)||An.default.mkdirSync(p,{recursive:!0}),An.default.writeFileSync(mr.default.join(p,h.getName()),h.getContent(),"utf-8")}}S.printSuccess("================ Generating code: Succeeded ================")}var{t:En,setCurrentLang:sE}=Y().commands;function iE(){return kl.default.resolve(kl.default.dirname(process.argv[1]),"..").replace(/\\/g,"/")}var oE=_s(()=>{let t=(0,$t.ref)(!1),e=(0,$t.ref)("none"),n=iE(),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 Ce().name("domain-designer-cli").version(J.version).addOption(new cu("--debug","debug mode").default(!1)).hook("preAction",d=>{d.opts().debug===!0&&S.printDebug("\u8C03\u8BD5\u6A21\u5F0F\u5DF2\u5F00\u542F"),process.env.DEBUG_MODE}).addCommand(nf({currentCommand:e,args:s})).addCommand(af({currentCommand:e})).addCommand(uf({currentCommand:e,args:i})).addCommand(pf({currentCommand:e,args:o})).addCommand($m({currentCommand:e,args:a})).parse(process.argv),"GenCode"!==e.value&&"none"!==e.value&&(t.value=!0),process.env.DEBUG_MODE==="T"&&(S.printDebug(typeof process.env.DEBUG_MODE,process.env.DEBUG_MODE),S.printDebug("- DEBUG: args\u4FE1\u606F\uFF1A",`[
|
|
264
|
+
${process.argv.join(`
|
|
265
|
+
`)}
|
|
266
|
+
]`),S.printDebug("- DEBUG: packageManager",process.env.PACKAGE_MANAGER));async function u(){let{langurage:d}=await(0,Nl.default)([{name:"langurage",type:"select",message:"Choose The language during this creation process",choices:[{title:"\u4E2D\u6587",value:"zh"},{title:"English",value:"en"}]}],{onCancel:X});if(sE(d),e.value==="none"){let h=await(0,Nl.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:X});e.value=h.subcommand}let c=e.value;if(c==="init")await rf({currentCommand:e,args:s});else if(c==="updateWorkspace")await df({currentCommand:e,args:i});else if(c==="runWeb")await ff({currentCommand:e,args:o});else if(c==="info")await lf({currentCommand:e});else if(c==="GenCode")await Rm({currentCommand:e,args:a});else{if(c==="none")return;isNever(c)}}return{states:{initCommandArgs:s,updateCommandArgs:i},commands:{async init(){t.value||(await u(),t.value=!0)},async exec(){let d=e.value;d==="info"?await cf():d==="init"?await sf(s):d==="runWeb"?await mf(o):d==="updateWorkspace"?await hf(i):d==="GenCode"?await Nm(a):d==="none"||isNever(d)}}}});function km(){return oE.api}var Zs=Y().commands.t;S.printInfo(Zs("signal.scriptStart"));var Im=km();aE().then(()=>{S.printSuccess(Zs("signal.successComplete"))}).catch(t=>{S.printError(t.message),S.printError(Zs("signal.exitWithError"))});process.on("SIGINT",X);async function aE(){if(S.print("Repo Addr:",S.info(J.repository.url.replace(/git\+/g,""))),S.print(""),S.print("Script Version:",S.info(J.version)),S.print(""),Qp())process.env.PACKAGE_MANAGER="bun",S.printDebug("Package Manager: bun detected");else if(ef())process.env.PACKAGE_MANAGER="pnpm",S.printDebug("Package Manager: pnpm detected");else throw new Error(Zs("error.noPackageManager"));await Im.commands.init(),await Im.commands.exec()}
|
|
138
267
|
/*! Bundled license information:
|
|
139
268
|
|
|
140
269
|
@vue/shared/dist/shared.cjs.prod.js:
|
|
@@ -166,5 +295,56 @@ domain-designer-cli runWeb --source="$(pwd)"
|
|
|
166
295
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
167
296
|
* @license MIT
|
|
168
297
|
**)
|
|
298
|
+
|
|
299
|
+
@ddd-tool/domain-designer-core/index.js:
|
|
300
|
+
(**
|
|
301
|
+
* @vue/shared v3.5.13
|
|
302
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
303
|
+
* @license MIT
|
|
304
|
+
**)
|
|
305
|
+
(*! #__NO_SIDE_EFFECTS__ *)
|
|
306
|
+
|
|
307
|
+
@ddd-tool/domain-designer-core/index.js:
|
|
308
|
+
(**
|
|
309
|
+
* @vue/reactivity v3.5.13
|
|
310
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
311
|
+
* @license MIT
|
|
312
|
+
**)
|
|
313
|
+
|
|
314
|
+
@ddd-tool/domain-designer-core/index.js:
|
|
315
|
+
(**
|
|
316
|
+
* @vue/runtime-core v3.5.13
|
|
317
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
318
|
+
* @license MIT
|
|
319
|
+
**)
|
|
320
|
+
|
|
321
|
+
@ddd-tool/domain-designer-core/index.js:
|
|
322
|
+
(**
|
|
323
|
+
* vue v3.5.13
|
|
324
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
325
|
+
* @license MIT
|
|
326
|
+
**)
|
|
327
|
+
|
|
328
|
+
@ddd-tool/domain-designer-generator/index.js:
|
|
329
|
+
(**
|
|
330
|
+
* @vue/shared v3.5.13
|
|
331
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
332
|
+
* @license MIT
|
|
333
|
+
**)
|
|
334
|
+
(*! #__NO_SIDE_EFFECTS__ *)
|
|
335
|
+
(**
|
|
336
|
+
* @vue/reactivity v3.5.13
|
|
337
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
338
|
+
* @license MIT
|
|
339
|
+
**)
|
|
340
|
+
(**
|
|
341
|
+
* @vue/runtime-core v3.5.13
|
|
342
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
343
|
+
* @license MIT
|
|
344
|
+
**)
|
|
345
|
+
(**
|
|
346
|
+
* vue v3.5.13
|
|
347
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
348
|
+
* @license MIT
|
|
349
|
+
**)
|
|
169
350
|
*/
|
|
170
|
-
//# sourceMappingURL=pkg/domain-designer-cli.cjs.map
|