@wix/create-app 0.0.63 → 0.0.64

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/build/index.js CHANGED
@@ -169,7 +169,7 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
169
169
  `;if(this.options.debug){o&&(this.fullStaticOutput+=i),this.options.stdout.write(this.fullStaticOutput+r);return}if(dd){o&&this.options.stdout.write(i),this.lastOutput=r;return}if(o&&(this.fullStaticOutput+=i),n>=this.options.stdout.rows){this.options.stdout.write(Yg.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}o&&(this.log.clear(),this.options.stdout.write(i),this.log(r)),!o&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r}}),cI(this),this.options=e,this.rootNode=ES("ink-root"),this.rootNode.onComputeLayout=this.calculateLayout,this.rootNode.onRender=e.debug?this.onRender:(0,QI.default)(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=dW.create(e.stdout),this.throttledLog=e.debug?this.log:(0,QI.default)(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=r_.createContainer(this.rootNode,0,null,!1,null,"id",()=>{},null),this.unsubscribeExit=(0,HW.default)(this.unmount,{alwaysLast:!1}),kW.env.DEV==="true"&&r_.injectIntoDevTools({bundleType:0,version:"16.13.1",rendererPackageName:"ink"}),e.patchConsole&&this.patchConsole(),dd||(e.stdout.on("resize",this.resized),this.unsubscribeResize=()=>{e.stdout.off("resize",this.resized)})}render(e){let r=BW.default.createElement(pd,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);r_.updateContainer(r,this.container,null,MW)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(dd){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(dd){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.calculateLayout(),this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),dd?this.options.stdout.write(this.lastOutput+`
170
170
  `):this.options.debug||this.log.done(),this.isUnmounted=!0,r_.updateContainer(null,this.container,null,MW),fd.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}async waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!dd&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=w6((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};var iRe=(t,e)=>{let r={stdout:wS.stdout,stdin:wS.stdin,stderr:wS.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0,...oRe(e)},n=sRe(r.stdout,()=>new s_(r));return n.render(t),{rerender:n.render,unmount(){n.unmount()},waitUntilExit:n.waitUntilExit,cleanup:()=>fd.delete(r.stdout),clear:n.clear}},NS=iRe,oRe=(t={})=>t instanceof nRe?{stdout:t,stdin:wS.stdin}:t,sRe=(t,e)=>{let r=fd.get(t);return r||(r=e(),fd.set(t,r)),r};u();var PS=F(ie(),1);u();var qW=F(ie(),1);function FS({children:t,transform:e}){return t==null?null:qW.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t)}u();var jW=F(ie(),1);function ps({count:t=1}){return jW.default.createElement("ink-text",null,`
171
171
  `.repeat(t))}u();var aRe=F(ie(),1);u();var ew=F(ie(),1);u();function GW(t){return t.toUpperCase()===t&&t.toLowerCase()!==t}u();import{Buffer as uRe}from"node:buffer";var cRe=/^(?:\x1b)([a-zA-Z0-9])$/,lRe=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,VW={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"},WW=[...Object.values(VW),"backspace"],fRe=t=>["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t),pRe=t=>["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t),dRe=(t="")=>{let e;uRe.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t="\x1B"+String(t)):t=String(t):t!==void 0&&typeof t!="string"?t=String(t):t||(t="");let r={name:"",ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t};if(r.sequence=r.sequence||t||r.name,t==="\r")r.raw=void 0,r.name="return";else if(t===`
172
- `)r.name="enter";else if(t===" ")r.name="tab";else if(t==="\b"||t==="\x1B\b")r.name="backspace",r.meta=t.charAt(0)==="\x1B";else if(t==="\x7F"||t==="\x1B\x7F")r.name="delete",r.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")r.name="escape",r.meta=t.length===2;else if(t===" "||t==="\x1B ")r.name="space",r.meta=t.length===2;else if(t<="")r.name=String.fromCharCode(t.charCodeAt(0)+97-1),r.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")r.name="number";else if(t.length===1&&t>="a"&&t<="z")r.name=t;else if(t.length===1&&t>="A"&&t<="Z")r.name=t.toLowerCase(),r.shift=!0;else if(e=cRe.exec(t))r.meta=!0,r.shift=/^[A-Z]$/.test(e[1]);else if(e=lRe.exec(t)){let n=[...t];n[0]==="\x1B"&&n[1]==="\x1B"&&(r.option=!0);let i=[e[1],e[2],e[4],e[6]].filter(Boolean).join(""),o=(e[3]||e[5]||1)-1;r.ctrl=!!(o&4),r.meta=!!(o&10),r.shift=!!(o&1),r.code=i,r.name=VW[i],r.shift=fRe(i)||r.shift,r.ctrl=pRe(i)||r.ctrl}return r},$W=dRe;u();var zW=F(ie(),1);var hRe=()=>(0,zW.useContext)(OS),LS=hRe;var mRe=(t,e={})=>{let{stdin:r,setRawMode:n,internal_exitOnCtrlC:i}=LS();(0,ew.useEffect)(()=>{if(e.isActive!==!1)return n(!0),()=>{n(!1)}},[e.isActive,n]),(0,ew.useEffect)(()=>{if(e.isActive===!1)return;let o=s=>{let a=$W(s),c={upArrow:a.name==="up",downArrow:a.name==="down",leftArrow:a.name==="left",rightArrow:a.name==="right",pageDown:a.name==="pagedown",pageUp:a.name==="pageup",return:a.name==="return",escape:a.name==="escape",ctrl:a.ctrl,shift:a.shift,tab:a.name==="tab",backspace:a.name==="backspace",delete:a.name==="delete",meta:a.meta||a.name==="escape"||a.option},p=a.ctrl?a.name:a.sequence;WW.includes(a.name)&&(p=""),p.startsWith("\x1B")&&(p=p.slice(1)),p.length===1&&typeof p[0]=="string"&&GW(p[0])&&(c.shift=!0),(!(p==="c"&&c.ctrl)||!i)&&t(p,c)};return r?.on("data",o),()=>{r?.off("data",o)}},[e.isActive,r,i,t])},Co=mRe;u();var YW=F(ie(),1);var gRe=()=>(0,YW.useContext)(xS),tw=gRe;u();var _Re=F(ie(),1);u();var ERe=F(ie(),1);u();var rw=F(ie(),1);u();var yRe=F(ie(),1);u();u();u();var $s=F(ie(),1);u();var hd=F(ie(),1);u();var KW=F(ie(),1);u();u();import ds from"node:process";function nn(){return ds.platform!=="win32"?ds.env.TERM!=="linux":!!ds.env.CI||!!ds.env.WT_SESSION||!!ds.env.TERMINUS_SUBLIME||ds.env.ConEmuTask==="{cmd::Cmder}"||ds.env.TERM_PROGRAM==="Terminus-Sublime"||ds.env.TERM_PROGRAM==="vscode"||ds.env.TERM==="xterm-256color"||ds.env.TERM==="alacritty"||ds.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var MS=nn()?"\u25CF":"*";var a_=(0,KW.createContext)({marker:MS});function XW({children:t,marker:e,...r}){let{marker:n}=(0,hd.useContext)(a_);return typeof e<"u"&&(n=e),hd.default.createElement(ke,{gap:1},n&&hd.default.createElement(Ut,null,n),hd.default.createElement(ke,{flexDirection:"column",...r},t))}u();var JW=F(ie(),1),nw=(0,JW.createContext)({depth:0});function nc({children:t,marker:e,...r}){let{depth:n}=(0,$s.useContext)(nw),{marker:i}=(0,$s.useContext)(a_),o=(0,$s.useMemo)(()=>({depth:n+1}),[n]),s=(0,$s.useMemo)(()=>typeof e=="string"?{marker:e}:typeof i=="string"?{marker:i}:{marker:MS},[i,e]);return $s.default.createElement(nw.Provider,{value:o},$s.default.createElement(a_.Provider,{value:s},$s.default.createElement(ke,{...r,flexDirection:"column",marginLeft:n*2},t)))}nc.Item=XW;u();u();var zs=F(ie(),1),Sw=F(tt(),1);u();var D5=F(ie(),1);var bIe={standard:{},secondary:{color:"gray"},success:{color:"green"},info:{color:"cyan"},error:{color:"red"},warning:{color:"yellow"},code:{color:"yellowBright"},legacyBlue:{color:"blueBright"}},Q=({children:t,skin:e="standard",bold:r,underline:n,strikethrough:i})=>D5.default.createElement(Ut,{...bIe[e],bold:r,underline:n,strikethrough:i},t);u();var XS=F(tt(),1),Pi=(0,XS.variant)((0,XS.onTerms)(({T:t})=>({NotSubmitted:e=>({value:e}),Submitted:e=>({value:e})})));u();var hs=F(ie(),1),f_=F(tt(),1);u();u();var v5=F(ie(),1);var gw=()=>v5.default.createElement(Q,null,nn()?"\u2026":"...");u();var S5=F(ie(),1);var _w=()=>S5.default.createElement(Q,null,nn()?"\u2716":"\xD7");u();var T5=F(ie(),1);var Ew=()=>T5.default.createElement(Q,null,nn()?"\u276F":">");u();var A5=F(ie(),1);var u_=()=>A5.default.createElement(Q,null,nn()?"\u203A":"\xBB");u();var C5=F(ie(),1);var yw=()=>C5.default.createElement(Q,null,"?");u();var x5=F(ie(),1);var c_=()=>x5.default.createElement(Q,null,nn()?"\u2714":"\u221A");u();var O5=F(ie(),1);var Dw=()=>O5.default.createElement(Q,null,nn()?"\u26A0":"\u203C");u();var b5=F(ie(),1);var l_=()=>b5.default.createElement(Q,null,nn()?"\u{1F4A1}":"!");var _d=({children:t,inputState:e})=>{let{icon:r,separator:n}=(0,f_.match)(e,{NotSubmitted:(0,f_.constant)({icon:hs.default.createElement(Q,{skin:"info"},hs.default.createElement(yw,null)),separator:hs.default.createElement(Q,{skin:"secondary"},hs.default.createElement(u_,null))}),Submitted:(0,f_.constant)({icon:hs.default.createElement(Q,{skin:"success"},hs.default.createElement(c_,null)),separator:hs.default.createElement(Q,{skin:"secondary"},hs.default.createElement(gw,null))})});return hs.default.createElement(Q,null,r," ",hs.default.createElement(Q,{bold:!0},t)," ",n)};u();var vw=F(ie(),1),R5=F(tt(),1);var I5=({inputState:t})=>(0,R5.match)(t,{NotSubmitted:({value:e})=>vw.default.createElement(Q,{skin:"secondary"},"(",e?"Y/n":"y/N",")"),Submitted:({value:e})=>vw.default.createElement(Q,null,e?"Yes":"No")});u();var ZS=F(ie(),1);u();var Ed=F(ie(),1);function RIe({value:t,placeholder:e="",focus:r=!0,mask:n,highlightPastedText:i=!1,showCursor:o=!0,onChange:s,onSubmit:a}){let[c,p]=(0,Ed.useState)({cursorOffset:(t||"").length,cursorWidth:0}),{cursorOffset:d,cursorWidth:h}=c;(0,Ed.useEffect)(()=>{p(x=>{if(!r||!o)return x;let O=t||"";return x.cursorOffset>O.length-1?{cursorOffset:O.length,cursorWidth:0}:x})},[t,r,o]);let m=i?h:0,y=n?n.repeat(t.length):t,S=y,T=e?nr.grey(e):void 0;if(o&&r){T=e.length>0?nr.inverse(e[0])+nr.grey(e.slice(1)):nr.inverse(" "),S=y.length>0?"":nr.inverse(" ");let x=0;for(let O of y)S+=x>=d-m&&x<=d?nr.inverse(O):O,x++;y.length>0&&d===y.length&&(S+=nr.inverse(" "))}return Co((x,O)=>{if(O.upArrow||O.downArrow||O.ctrl&&x==="c"||O.tab||O.shift&&O.tab)return;if(O.return){a&&a(t);return}let N=d,I=t,P=0;O.leftArrow?o&&N--:O.rightArrow?o&&N++:O.backspace||O.delete?d>0&&(I=t.slice(0,d-1)+t.slice(d,t.length),N--):(I=t.slice(0,d)+x+t.slice(d,t.length),N+=x.length,x.length>1&&(P=x.length)),d<0&&(N=0),d>t.length&&(N=t.length),p({cursorOffset:N,cursorWidth:P}),I!==t&&s(I)},{isActive:r}),Ed.default.createElement(Ut,null,e?y.length>0?S:T:S)}var JS=RIe;var w5=({initialValue:t,onSubmit:e})=>{let r=(0,ZS.useCallback)(n=>{let i=n.toLowerCase();["y","n"].includes(i)&&e(i==="y")},[e]);return ZS.default.createElement(JS,{value:"",showCursor:!1,onChange:r,onSubmit:()=>e(t)})};var p_=({label:t,info:e,initialValue:r=!0,onSubmit:n})=>{let[i,o]=(0,zs.useState)(()=>Pi.NotSubmitted(r)),s=(0,zs.useCallback)(a=>{o(Pi.Submitted(a)),n(a)},[n]);return zs.default.createElement(Q,null,zs.default.createElement(_d,{inputState:i},t)," ",e&&(0,Sw.isType)(i,Pi.NotSubmitted)&&zs.default.createElement(Q,{skin:"secondary"},e," "),zs.default.createElement(I5,{inputState:i}),(0,Sw.isType)(i,Pi.NotSubmitted)&&zs.default.createElement(w5,{initialValue:r,onSubmit:s}))};u();u();var pi=F(ie(),1),h0=F(tt(),1);u();u();var QS=F(ie(),1);u();import IIe from"node:process";u();var{platform:wIe}=IIe,N5={square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},NIe={...N5,...wIe==="linux"?{circleQuestionMark:"?\u20DD",questionMarkPrefix:"?\u20DD"}:{circleQuestionMark:"?",questionMarkPrefix:"?"},tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},PIe={...N5,tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",circleQuestionMark:"(?)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",questionMarkPrefix:"\uFF1F",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},FIe=nn(),LIe=FIe?NIe:PIe,P5=LIe;function MIe({isSelected:t=!1}){return QS.default.createElement(ke,{marginRight:1},t?QS.default.createElement(Ut,{color:"blue"},P5.pointer):QS.default.createElement(Ut,null," "))}var Tw=MIe;u();var F5=F(ie(),1);function kIe({isSelected:t=!1,label:e}){return F5.createElement(Ut,{color:t?"blue":void 0},e)}var Aw=kIe;u();var E_=F(ie(),1),Ba=F(ie(),1),E$=F(m$(),1),y_=F(_$(),1);function hNe({items:t=[],isFocused:e=!0,initialIndex:r=0,indicatorComponent:n=Tw,itemComponent:i=Aw,limit:o,onSelect:s,onHighlight:a}){let c=typeof o=="number"&&t.length>o,p=c?Math.min(o,t.length):t.length,d=p-1,[h,m]=(0,Ba.useState)(r>d?d-r:0),[y,S]=(0,Ba.useState)(r?r>d?d:r:0),T=(0,Ba.useRef)(t);(0,Ba.useEffect)(()=>{(0,E$.default)(T.current.map(O=>O.value),t.map(O=>O.value))||(m(0),S(0)),T.current=t},[t]),Co((0,Ba.useCallback)((O,N)=>{if(O==="k"||N.upArrow){let I=(c?p:t.length)-1,P=y===0,k=c?y:I,j=P?h+1:h,G=P?k:y-1;m(j),S(G);let oe=c?(0,y_.default)(t,j).slice(0,p):t;typeof a=="function"&&a(oe[G])}if(O==="j"||N.downArrow){let I=y===(c?p:t.length)-1,P=c?y:0,k=I?h-1:h,j=I?P:y+1;m(k),S(j);let G=c?(0,y_.default)(t,k).slice(0,p):t;typeof a=="function"&&a(G[j])}if(N.return){let I=c?(0,y_.default)(t,h).slice(0,p):t;typeof s=="function"&&s(I[y])}},[c,p,h,y,t,s,a]),{isActive:e});let x=c?(0,y_.default)(t,h).slice(0,p):t;return E_.default.createElement(ke,{flexDirection:"column"},x.map((O,N)=>{let I=N===y;return E_.default.createElement(ke,{key:O.key??O.value},E_.default.createElement(n,{isSelected:I}),E_.default.createElement(i,{...O,isSelected:I}))}))}var Mw=hNe;u();var f0=F(ie(),1);var y$=({isSelected:t})=>f0.default.createElement(ke,{width:4},t&&f0.default.createElement(Q,{skin:"info"},f0.default.createElement(Ew,null)));u();var of=F(ie(),1);var d0=F(tt(),1);u();var p0=F(tt(),1),fi=(0,p0.variant)({Enabled:{},Disabled:(0,p0.fields)()});function D$({isSelected:t,label:e,value:{description:r,availability:n=fi.Enabled()}}){let i=(0,d0.isType)(n,fi.Disabled);return of.default.createElement(ke,null,of.default.createElement(Q,{skin:i?"secondary":t?"info":"standard",underline:t,strikethrough:!t&&i},e),t&&(0,d0.match)(n,{Disabled:({reason:o})=>of.default.createElement(ke,{marginLeft:1},of.default.createElement(Q,{skin:"warning"},"- disabled",o&&` (${o})`)),Enabled:()=>r&&of.default.createElement(ke,{marginLeft:1},of.default.createElement(Q,{skin:"secondary"},"- ",r))}))}u();var v$=F(ie(),1),S$=F(tt(),1);function T$({inputState:t}){return(0,S$.match)(t,{NotSubmitted:()=>null,Submitted:({value:e})=>v$.default.createElement(Q,null,e.title)})}function Ua({label:t,info:e,options:r,onSubmit:n,limit:i=10}){if(!r.length)throw new Error("SelectInput: options cannot be empty");let[o,s]=(0,pi.useState)(()=>Pi.NotSubmitted()),a=(0,pi.useCallback)(({value:d})=>{s(Pi.NotSubmitted(d))},[]),c=(0,pi.useCallback)(({value:d})=>{(0,h0.isType)(d.availability,fi.Disabled)||(s(Pi.Submitted(d)),n(d))},[n]),p=(0,pi.useMemo)(()=>r.map(d=>({key:typeof d.value=="string"?d.value:d.key,label:d.title,value:d})),[r]);return pi.default.createElement(pi.default.Fragment,null,pi.default.createElement(Q,null,pi.default.createElement(_d,{inputState:o},t)," ",e&&(0,h0.isType)(o,Pi.NotSubmitted)&&pi.default.createElement(Q,{skin:"secondary"},e),pi.default.createElement(T$,{inputState:o})),(0,h0.isType)(o,Pi.NotSubmitted)&&pi.default.createElement(Mw,{items:p,limit:i,itemComponent:D$,indicatorComponent:y$,onSelect:c,onHighlight:a}))}u();var m0=F(ie(),1);var A$=({onSubmit:t,onChange:e,placeholder:r,showCursor:n})=>{let[i,o]=(0,m0.useState)("");return m0.default.createElement(JS,{showCursor:n,placeholder:r,value:i,onChange:s=>{o(s),e?.(s)},onSubmit:()=>{t?.(!i&&r?r:i)}})};u();u();var In=F(ie(),1);var C$=F(tt(),1);var sf=({label:t,placeholder:e,onSubmit:r,validate:n=()=>!0})=>{let[i,o]=(0,In.useState)(()=>Pi.NotSubmitted(e)),[s,a]=(0,In.useState)(!1),[c,p]=(0,In.useState)(),d=(0,In.useCallback)(async m=>{a(!1);let y=await n(m);y!==!0?p(y):(p(void 0),o(Pi.Submitted(m)),r(m))},[r,n]),h=!!(c&&!s);return In.default.createElement(In.default.Fragment,null,In.default.createElement(ke,{columnGap:1},In.default.createElement(_d,{inputState:i},t),(0,C$.match)(i,{NotSubmitted:({value:m})=>In.default.createElement(Q,{skin:h?"error":"standard"},In.default.createElement(A$,{placeholder:m,onSubmit:d,onChange:()=>a(!0),showCursor:h})),Submitted:({value:m})=>In.default.createElement(Q,null,m)})),c&&In.default.createElement(ke,{columnGap:1},In.default.createElement(u_,null),In.default.createElement(Q,{skin:"error"},c)))};u();var Ha=F(ie(),1),af=F(tt(),1);var qa=({type:t,children:e})=>{let r=(0,af.match)(t,{error:(0,af.constant)(Ha.default.createElement(Q,{skin:"error"},Ha.default.createElement(_w,null))),warning:(0,af.constant)(Ha.default.createElement(Q,{skin:"warning"},Ha.default.createElement(Dw,null))),success:(0,af.constant)(Ha.default.createElement(Q,{skin:"success"},Ha.default.createElement(c_,null))),insight:(0,af.constant)(Ha.default.createElement(l_,null))});return Ha.default.createElement(Q,null,r," ",e)};u();var x$=F(ie(),1);var Sd=({value:t})=>x$.default.createElement(Ut,{inverse:!0}," ",t," ");u();var E0=F(ie(),1);u();u();var qt="\x1B[",D_="\x1B]",Td="\x07",g0=";",O$=process.env.TERM_PROGRAM==="Apple_Terminal",xt={};xt.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?qt+(t+1)+"G":qt+(e+1)+";"+(t+1)+"H"};xt.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let r="";return t<0?r+=qt+-t+"D":t>0&&(r+=qt+t+"C"),e<0?r+=qt+-e+"A":e>0&&(r+=qt+e+"B"),r};xt.cursorUp=(t=1)=>qt+t+"A";xt.cursorDown=(t=1)=>qt+t+"B";xt.cursorForward=(t=1)=>qt+t+"C";xt.cursorBackward=(t=1)=>qt+t+"D";xt.cursorLeft=qt+"G";xt.cursorSavePosition=O$?"\x1B7":qt+"s";xt.cursorRestorePosition=O$?"\x1B8":qt+"u";xt.cursorGetPosition=qt+"6n";xt.cursorNextLine=qt+"E";xt.cursorPrevLine=qt+"F";xt.cursorHide=qt+"?25l";xt.cursorShow=qt+"?25h";xt.eraseLines=t=>{let e="";for(let r=0;r<t;r++)e+=xt.eraseLine+(r<t-1?xt.cursorUp():"");return t&&(e+=xt.cursorLeft),e};xt.eraseEndLine=qt+"K";xt.eraseStartLine=qt+"1K";xt.eraseLine=qt+"2K";xt.eraseDown=qt+"J";xt.eraseUp=qt+"1J";xt.eraseScreen=qt+"2J";xt.scrollUp=qt+"S";xt.scrollDown=qt+"T";xt.clearScreen="\x1Bc";xt.clearTerminal=process.platform==="win32"?`${xt.eraseScreen}${qt}0f`:`${xt.eraseScreen}${qt}3J${qt}H`;xt.beep=Td;xt.link=(t,e)=>[D_,"8",g0,g0,e,Td,t,D_,"8",g0,g0,Td].join("");xt.image=(t,e={})=>{let r=`${D_}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+t.toString("base64")+Td};xt.iTerm={setCwd:(t=process.cwd())=>`${D_}50;CurrentDir=${t}${Td}`,annotation:(t,e={})=>{let r=`${D_}1337;`,n=typeof e.x<"u",i=typeof e.y<"u";if((n||i)&&!(n&&i&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),r+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?r+=(n?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):r+=t,r+Td}};var b$=xt;var _0=F(F$(),1);function uf(t,e,{target:r="stdout",...n}={}){return _0.default[r]?b$.link(t,e):n.fallback===!1?t:typeof n.fallback=="function"?n.fallback(t,e):`${t} (\u200B${e}\u200B)`}uf.isSupported=_0.default.stdout;uf.stderr=(t,e,r={})=>uf(t,e,{target:"stderr",...r});uf.stderr.isSupported=_0.default.stderr;var Dn=({children:t,url:e,transform:r=n=>n})=>t?E0.default.createElement(FS,{transform:n=>r(uf(n,e,{fallback:!0}))},E0.default.createElement(Q,null,t)):E0.default.createElement(Q,{skin:"legacyBlue"},e);u();var v_=F(ie(),1);u();var Cd=F(ie(),1);var U$=F(B$(),1);function yNe({type:t="dots"}){let[e,r]=(0,Cd.useState)(0),n=U$.default[t];return(0,Cd.useEffect)(()=>{let i=setInterval(()=>{r(o=>o===n.frames.length-1?0:o+1)},n.interval);return()=>{clearInterval(i)}},[n]),Cd.default.createElement(Ut,null,n.frames[e])}var H$=yNe;var Gr=({text:t})=>{let e=v_.default.createElement(Q,{skin:"info"},v_.default.createElement(H$,{type:"dots"}));return t?v_.default.createElement(ke,{gap:1},e,typeof t=="string"?v_.default.createElement(Q,null,t):t):e};u();var q$=F(ie(),1);function dc(){let{exit:t}=tw();return(0,q$.useCallback)(e=>{e instanceof Error?t(e):e!==void 0?t(new Error(JSON.stringify(e))):t()},[t])}u();var ja=F(tt(),1);u();var wr=F(ie());function xd(){return xd=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xd.apply(this,arguments)}var WEt=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator",$Et=typeof Symbol<"u"?Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")):"@@asyncIterator";var DNe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?wr.useLayoutEffect:wr.useEffect,vNe=function(e){var r=(0,wr.useRef)(e);return DNe(function(){r.current=e}),(0,wr.useCallback)(function(){return r.current},[r])},SNe={status:"not-requested",loading:!1,result:void 0,error:void 0},G$={status:"loading",loading:!0,result:void 0,error:void 0},TNe=function(e){return G$},ANe=function(e,r){return{status:"success",loading:!1,result:e,error:void 0}},CNe=function(e,r){return{status:"error",loading:!1,result:void 0,error:e}},j$=function(){},xNe={initialState:function(e){return e&&e.executeOnMount?G$:SNe},executeOnMount:!0,executeOnUpdate:!0,setLoading:TNe,setResult:ANe,setError:CNe,onSuccess:j$,onError:j$},ONe=function(e){return xd({},xNe,{},e)},bNe=function(e){var r=(0,wr.useState)(function(){return e.initialState(e)}),n=r[0],i=r[1],o=(0,wr.useCallback)(function(){return i(e.initialState(e))},[i,e]),s=(0,wr.useCallback)(function(){return i(e.setLoading(n))},[n,i]),a=(0,wr.useCallback)(function(d){return i(e.setResult(d,n))},[n,i]),c=(0,wr.useCallback)(function(d){return i(e.setError(d,n))},[n,i]),p=(0,wr.useCallback)(function(d){return i(xd({},n,{},d))},[n,i]);return{value:n,set:i,merge:p,reset:o,setLoading:s,setResult:a,setError:c}},RNe=function(){var e=(0,wr.useRef)(!1);return(0,wr.useEffect)(function(){return e.current=!0,function(){e.current=!1}},[]),function(){return e.current}},INe=function(){var e=(0,wr.useRef)(null);return{set:function(n){return e.current=n},get:function(){return e.current},is:function(n){return e.current===n}}},V$=function(e,r,n){!r&&(r=[]);var i=ONe(n),o=(0,wr.useState)(null),s=o[0],a=o[1],c=bNe(i),p=RNe(),d=INe(),h=function(O){return p()&&d.is(O)},m=function(){for(var O=arguments.length,N=new Array(O),I=0;I<O;I++)N[I]=arguments[I];var P=function(){try{return Promise.resolve(e.apply(void 0,N))}catch(k){return Promise.reject(k)}}();return a(N),d.set(P),c.setLoading(),P.then(function(k){h(P)&&c.setResult(k),i.onSuccess(k,{isCurrent:function(){return d.is(P)}})},function(k){h(P)&&c.setError(k),i.onError(k,{isCurrent:function(){return d.is(P)}})}),P},y=vNe(m),S=(0,wr.useCallback)(function(){return y().apply(void 0,arguments)},[y]),T=!p();return(0,wr.useEffect)(function(){var x=function(){return y().apply(void 0,r)};T&&i.executeOnMount&&x(),!T&&i.executeOnUpdate&&x()},r),xd({},c.value,{set:c.set,merge:c.merge,reset:c.reset,execute:S,currentPromise:d.get(),currentParams:s})};function W$(t,e,r){return V$(t,e,r)}var $$=function(e,r){return V$(e,[],xd({},r,{executeOnMount:!1,executeOnUpdate:!1}))};var Od=F(ie(),1);var S_=(0,ja.variant)((0,ja.onTerms)(({T:t})=>({Error:e=>({error:e}),Success:e=>({result:e}),Loading:()=>({})}))),T_=(0,ja.variant)((0,ja.onTerms)(({T:t})=>({Error:e=>({error:e}),Success:e=>({result:e}),Loading:()=>({}),NotRequested:()=>({})}))),wn=(t,e,r)=>{let n=dc(),i=(0,Od.useMemo)(()=>new AbortController,[]),{result:o,error:s,status:a,merge:c}=W$(t.bind(null,{signal:i.signal}),e,{onError:p=>n(p),...r??{}});return(0,Od.useEffect)(()=>()=>{i.abort()},[i]),(0,ja.match)(a,{error:()=>({status:S_.Error(s??new Error("Unexpected error state in useAsync")),merge:c}),"not-requested":()=>({status:S_.Loading(),merge:c}),loading:()=>({status:S_.Loading(),merge:c}),success:()=>({status:S_.Success(o),merge:c})})},ms=(t,e)=>{let r=dc(),n=(0,Od.useMemo)(()=>new AbortController,[]),{result:i,error:o,status:s,merge:a,execute:c}=$$(t.bind(null,{signal:n.signal}),{onError:p=>r(p),...e??{}});return(0,Od.useEffect)(()=>()=>{n.abort()},[n]),(0,ja.match)(s,{error:()=>({status:T_.Error(o??new Error("Unexpected error state in useAsyncCallback")),merge:a,execute:c}),"not-requested":()=>({status:T_.NotRequested(),merge:a,execute:c}),loading:()=>({status:T_.Loading(),merge:a,execute:c}),success:()=>({status:T_.Success(i),merge:a,execute:c})})};u();var Js=F(ie(),1);u();var D0="WIX_CLI_TEST_OVERRIDES";u();import Md from"node:process";u();var bt;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let s of i)o[s]=s;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(let a of o)s[a]=i[a];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},t.find=(i,o)=>{for(let s of i)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(bt||(bt={}));var Gw;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Gw||(Gw={}));var we=bt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),hc=t=>{switch(typeof t){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(t)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(t)?we.array:t===null?we.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?we.promise:typeof Map<"u"&&t instanceof Map?we.map:typeof Set<"u"&&t instanceof Set?we.set:typeof Date<"u"&&t instanceof Date?we.date:we.object;default:return we.unknown}},ge=bt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),wNe=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Zi=class t extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let p=s.path[c];c===s.path.length-1?(a[p]=a[p]||{_errors:[]},a[p]._errors.push(r(s))):a[p]=a[p]||{_errors:[]},a=a[p],c++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,bt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Zi.create=t=>new Zi(t);var Id=(t,e)=>{let r;switch(t.code){case ge.invalid_type:t.received===we.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case ge.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,bt.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:r=`Unrecognized key(s) in object: ${bt.joinValues(t.keys,", ")}`;break;case ge.invalid_union:r="Invalid input";break;case ge.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${bt.joinValues(t.options)}`;break;case ge.invalid_enum_value:r=`Invalid enum value. Expected ${bt.joinValues(t.options)}, received '${t.received}'`;break;case ge.invalid_arguments:r="Invalid function arguments";break;case ge.invalid_return_type:r="Invalid function return type";break;case ge.invalid_date:r="Invalid date";break;case ge.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:bt.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case ge.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case ge.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case ge.custom:r="Invalid input";break;case ge.invalid_intersection_types:r="Intersection results could not be merged";break;case ge.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case ge.not_finite:r="Number must be finite";break;default:r=e.defaultError,bt.assertNever(t)}return{message:r}},K$=Id;function NNe(t){K$=t}function v0(){return K$}var S0=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="",c=n.filter(p=>!!p).slice().reverse();for(let p of c)a=p(s,{data:e,defaultError:a}).message;return{...i,path:o,message:a}},PNe=[];function be(t,e){let r=v0(),n=S0({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Id?void 0:Id].filter(i=>!!i)});t.common.issues.push(n)}var Wn=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return et;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,s=await i.value;n.push({key:o,value:s})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return et;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[o.value]=s.value)}return{status:e.value,value:n}}},et=Object.freeze({status:"aborted"}),Rd=t=>({status:"dirty",value:t}),di=t=>({status:"valid",value:t}),Vw=t=>t.status==="aborted",Ww=t=>t.status==="dirty",x_=t=>t.status==="valid",O_=t=>typeof Promise<"u"&&t instanceof Promise;function T0(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function X$(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}var We;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(We||(We={}));var A_,C_,bo=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},z$=(t,e)=>{if(x_(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Zi(t.common.issues);return this._error=r,this._error}}};function ut(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,a)=>{var c,p;let{message:d}=t;return s.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(c=d??n)!==null&&c!==void 0?c:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(p=d??r)!==null&&p!==void 0?p:a.defaultError}},description:i}}var ct=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return hc(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:hc(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Wn,ctx:{common:e.parent.common,data:e.data,parsedType:hc(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(O_(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:hc(e)},o=this._parseSync({data:e,path:i.path,parent:i});return z$(i,o)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:hc(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(O_(i)?i:Promise.resolve(i));return z$(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let s=e(i),a=()=>o.addIssue({code:ge.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Qi({schema:this,typeName:Je.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Oo.create(this,this._def)}nullable(){return Xs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wa.create(this,this._def)}promise(){return _c.create(this,this._def)}or(e){return mf.create([this,e],this._def)}and(e){return gf.create(this,e,this._def)}transform(e){return new Qi({...ut(this._def),schema:this,typeName:Je.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new vf({...ut(this._def),innerType:this,defaultValue:r,typeName:Je.ZodDefault})}brand(){return new b_({typeName:Je.ZodBranded,type:this,...ut(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Sf({...ut(this._def),innerType:this,catchValue:r,typeName:Je.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return R_.create(this,e)}readonly(){return Tf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},FNe=/^c[^\s-]{8,}$/i,LNe=/^[0-9a-z]+$/,MNe=/^[0-9A-HJKMNP-TV-Z]{26}$/,kNe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,BNe=/^[a-z0-9_-]{21}$/i,UNe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,HNe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,qNe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",jw,jNe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,GNe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,VNe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,J$="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",WNe=new RegExp(`^${J$}$`);function Z$(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function $Ne(t){return new RegExp(`^${Z$(t)}$`)}function Q$(t){let e=`${J$}T${Z$(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function zNe(t,e){return!!((e==="v4"||!e)&&jNe.test(t)||(e==="v6"||!e)&&GNe.test(t))}var mc=class t extends ct{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==we.string){let o=this._getOrReturnCtx(e);return be(o,{code:ge.invalid_type,expected:we.string,received:o.parsedType}),et}let n=new Wn,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),be(i,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),be(i,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(e,i),s?be(i,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&be(i,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")HNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"email",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")jw||(jw=new RegExp(qNe,"u")),jw.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"emoji",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")kNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"uuid",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")BNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"nanoid",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")FNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"cuid",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")LNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"cuid2",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")MNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"ulid",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),be(i,{validation:"url",code:ge.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"regex",code:ge.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),be(i,{code:ge.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),be(i,{code:ge.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),be(i,{code:ge.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Q$(o).test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{code:ge.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?WNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{code:ge.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?$Ne(o).test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{code:ge.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?UNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"duration",code:ge.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?zNe(e.data,o.version)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"ip",code:ge.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?VNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"base64",code:ge.invalid_string,message:o.message}),n.dirty()):bt.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:ge.invalid_string,...We.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...We.errToObj(e)})}url(e){return this._addCheck({kind:"url",...We.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...We.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...We.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...We.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...We.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...We.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...We.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...We.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...We.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...We.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...We.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...We.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...We.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...We.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...We.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...We.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...We.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...We.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...We.errToObj(r)})}nonempty(e){return this.min(1,We.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};mc.create=t=>{var e;return new mc({checks:[],typeName:Je.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...ut(t)})};function YNe(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(t.toFixed(i).replace(".","")),s=parseInt(e.toFixed(i).replace(".",""));return o%s/Math.pow(10,i)}var cf=class t extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==we.number){let o=this._getOrReturnCtx(e);return be(o,{code:ge.invalid_type,expected:we.number,received:o.parsedType}),et}let n,i=new Wn;for(let o of this._def.checks)o.kind==="int"?bt.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),be(n,{code:ge.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),be(n,{code:ge.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),be(n,{code:ge.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?YNe(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),be(n,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),be(n,{code:ge.not_finite,message:o.message}),i.dirty()):bt.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,We.toString(r))}gt(e,r){return this.setLimit("min",e,!1,We.toString(r))}lte(e,r){return this.setLimit("max",e,!0,We.toString(r))}lt(e,r){return this.setLimit("max",e,!1,We.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:We.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:We.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:We.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:We.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:We.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:We.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:We.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:We.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:We.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:We.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&bt.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};cf.create=t=>new cf({checks:[],typeName:Je.ZodNumber,coerce:t?.coerce||!1,...ut(t)});var lf=class t extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==we.bigint){let o=this._getOrReturnCtx(e);return be(o,{code:ge.invalid_type,expected:we.bigint,received:o.parsedType}),et}let n,i=new Wn;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),be(n,{code:ge.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),be(n,{code:ge.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),be(n,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):bt.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,We.toString(r))}gt(e,r){return this.setLimit("min",e,!1,We.toString(r))}lte(e,r){return this.setLimit("max",e,!0,We.toString(r))}lt(e,r){return this.setLimit("max",e,!1,We.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:We.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:We.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:We.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:We.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:We.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:We.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};lf.create=t=>{var e;return new lf({checks:[],typeName:Je.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...ut(t)})};var ff=class extends ct{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==we.boolean){let n=this._getOrReturnCtx(e);return be(n,{code:ge.invalid_type,expected:we.boolean,received:n.parsedType}),et}return di(e.data)}};ff.create=t=>new ff({typeName:Je.ZodBoolean,coerce:t?.coerce||!1,...ut(t)});var pf=class t extends ct{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==we.date){let o=this._getOrReturnCtx(e);return be(o,{code:ge.invalid_type,expected:we.date,received:o.parsedType}),et}if(isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return be(o,{code:ge.invalid_date}),et}let n=new Wn,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),be(i,{code:ge.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),be(i,{code:ge.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):bt.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:We.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:We.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};pf.create=t=>new pf({checks:[],coerce:t?.coerce||!1,typeName:Je.ZodDate,...ut(t)});var wd=class extends ct{_parse(e){if(this._getType(e)!==we.symbol){let n=this._getOrReturnCtx(e);return be(n,{code:ge.invalid_type,expected:we.symbol,received:n.parsedType}),et}return di(e.data)}};wd.create=t=>new wd({typeName:Je.ZodSymbol,...ut(t)});var df=class extends ct{_parse(e){if(this._getType(e)!==we.undefined){let n=this._getOrReturnCtx(e);return be(n,{code:ge.invalid_type,expected:we.undefined,received:n.parsedType}),et}return di(e.data)}};df.create=t=>new df({typeName:Je.ZodUndefined,...ut(t)});var hf=class extends ct{_parse(e){if(this._getType(e)!==we.null){let n=this._getOrReturnCtx(e);return be(n,{code:ge.invalid_type,expected:we.null,received:n.parsedType}),et}return di(e.data)}};hf.create=t=>new hf({typeName:Je.ZodNull,...ut(t)});var gc=class extends ct{constructor(){super(...arguments),this._any=!0}_parse(e){return di(e.data)}};gc.create=t=>new gc({typeName:Je.ZodAny,...ut(t)});var Va=class extends ct{constructor(){super(...arguments),this._unknown=!0}_parse(e){return di(e.data)}};Va.create=t=>new Va({typeName:Je.ZodUnknown,...ut(t)});var gs=class extends ct{_parse(e){let r=this._getOrReturnCtx(e);return be(r,{code:ge.invalid_type,expected:we.never,received:r.parsedType}),et}};gs.create=t=>new gs({typeName:Je.ZodNever,...ut(t)});var Nd=class extends ct{_parse(e){if(this._getType(e)!==we.undefined){let n=this._getOrReturnCtx(e);return be(n,{code:ge.invalid_type,expected:we.void,received:n.parsedType}),et}return di(e.data)}};Nd.create=t=>new Nd({typeName:Je.ZodVoid,...ut(t)});var Wa=class t extends ct{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==we.array)return be(r,{code:ge.invalid_type,expected:we.array,received:r.parsedType}),et;if(i.exactLength!==null){let s=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(s||a)&&(be(r,{code:s?ge.too_big:ge.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(be(r,{code:ge.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(be(r,{code:ge.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>i.type._parseAsync(new bo(r,s,r.path,a)))).then(s=>Wn.mergeArray(n,s));let o=[...r.data].map((s,a)=>i.type._parseSync(new bo(r,s,r.path,a)));return Wn.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:We.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:We.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:We.toString(r)}})}nonempty(e){return this.min(1,e)}};Wa.create=(t,e)=>new Wa({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Je.ZodArray,...ut(e)});function bd(t){if(t instanceof Fi){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Oo.create(bd(n))}return new Fi({...t._def,shape:()=>e})}else return t instanceof Wa?new Wa({...t._def,type:bd(t.element)}):t instanceof Oo?Oo.create(bd(t.unwrap())):t instanceof Xs?Xs.create(bd(t.unwrap())):t instanceof Ks?Ks.create(t.items.map(e=>bd(e))):t}var Fi=class t extends ct{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=bt.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==we.object){let p=this._getOrReturnCtx(e);return be(p,{code:ge.invalid_type,expected:we.object,received:p.parsedType}),et}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof gs&&this._def.unknownKeys==="strip"))for(let p in i.data)s.includes(p)||a.push(p);let c=[];for(let p of s){let d=o[p],h=i.data[p];c.push({key:{status:"valid",value:p},value:d._parse(new bo(i,h,i.path,p)),alwaysSet:p in i.data})}if(this._def.catchall instanceof gs){let p=this._def.unknownKeys;if(p==="passthrough")for(let d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(p==="strict")a.length>0&&(be(i,{code:ge.unrecognized_keys,keys:a}),n.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let p=this._def.catchall;for(let d of a){let h=i.data[d];c.push({key:{status:"valid",value:d},value:p._parse(new bo(i,h,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let p=[];for(let d of c){let h=await d.key,m=await d.value;p.push({key:h,value:m,alwaysSet:d.alwaysSet})}return p}).then(p=>Wn.mergeObjectSync(n,p)):Wn.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return We.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,o,s,a;let c=(s=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&s!==void 0?s:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=We.errToObj(e).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Je.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return bt.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return bt.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return bd(this)}partial(e){let r={};return bt.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return bt.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Oo;)o=o._def.innerType;r[n]=o}}),new t({...this._def,shape:()=>r})}keyof(){return e9(bt.objectKeys(this.shape))}};Fi.create=(t,e)=>new Fi({shape:()=>t,unknownKeys:"strip",catchall:gs.create(),typeName:Je.ZodObject,...ut(e)});Fi.strictCreate=(t,e)=>new Fi({shape:()=>t,unknownKeys:"strict",catchall:gs.create(),typeName:Je.ZodObject,...ut(e)});Fi.lazycreate=(t,e)=>new Fi({shape:t,unknownKeys:"strip",catchall:gs.create(),typeName:Je.ZodObject,...ut(e)});var mf=class extends ct{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(a=>new Zi(a.ctx.common.issues));return be(r,{code:ge.invalid_union,unionErrors:s}),et}if(r.common.async)return Promise.all(n.map(async o=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(i);{let o,s=[];for(let c of n){let p={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:p});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:p}),p.common.issues.length&&s.push(p.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(c=>new Zi(c));return be(r,{code:ge.invalid_union,unionErrors:a}),et}}get options(){return this._def.options}};mf.create=(t,e)=>new mf({options:t,typeName:Je.ZodUnion,...ut(e)});var Ga=t=>t instanceof _f?Ga(t.schema):t instanceof Qi?Ga(t.innerType()):t instanceof Ef?[t.value]:t instanceof yf?t.options:t instanceof Df?bt.objectValues(t.enum):t instanceof vf?Ga(t._def.innerType):t instanceof df?[void 0]:t instanceof hf?[null]:t instanceof Oo?[void 0,...Ga(t.unwrap())]:t instanceof Xs?[null,...Ga(t.unwrap())]:t instanceof b_||t instanceof Tf?Ga(t.unwrap()):t instanceof Sf?Ga(t._def.innerType):[],A0=class t extends ct{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==we.object)return be(r,{code:ge.invalid_type,expected:we.object,received:r.parsedType}),et;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(be(r,{code:ge.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),et)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let s=Ga(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,o)}}return new t({typeName:Je.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...ut(n)})}};function $w(t,e){let r=hc(t),n=hc(e);if(t===e)return{valid:!0,data:t};if(r===we.object&&n===we.object){let i=bt.objectKeys(e),o=bt.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(let a of o){let c=$w(t[a],e[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===we.array&&n===we.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let s=t[o],a=e[o],c=$w(s,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===we.date&&n===we.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var gf=class extends ct{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,s)=>{if(Vw(o)||Vw(s))return et;let a=$w(o.value,s.value);return a.valid?((Ww(o)||Ww(s))&&r.dirty(),{status:r.value,value:a.data}):(be(n,{code:ge.invalid_intersection_types}),et)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};gf.create=(t,e,r)=>new gf({left:t,right:e,typeName:Je.ZodIntersection,...ut(r)});var Ks=class t extends ct{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==we.array)return be(n,{code:ge.invalid_type,expected:we.array,received:n.parsedType}),et;if(n.data.length<this._def.items.length)return be(n,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),et;!this._def.rest&&n.data.length>this._def.items.length&&(be(n,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new bo(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(o).then(s=>Wn.mergeArray(r,s)):Wn.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Ks.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ks({items:t,typeName:Je.ZodTuple,rest:null,...ut(e)})};var C0=class t extends ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==we.object)return be(n,{code:ge.invalid_type,expected:we.object,received:n.parsedType}),et;let i=[],o=this._def.keyType,s=this._def.valueType;for(let a in n.data)i.push({key:o._parse(new bo(n,a,n.path,a)),value:s._parse(new bo(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Wn.mergeObjectAsync(r,i):Wn.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof ct?new t({keyType:e,valueType:r,typeName:Je.ZodRecord,...ut(n)}):new t({keyType:mc.create(),valueType:e,typeName:Je.ZodRecord,...ut(r)})}},Pd=class extends ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==we.map)return be(n,{code:ge.invalid_type,expected:we.map,received:n.parsedType}),et;let i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([a,c],p)=>({key:i._parse(new bo(n,a,n.path,[p,"key"])),value:o._parse(new bo(n,c,n.path,[p,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let p=await c.key,d=await c.value;if(p.status==="aborted"||d.status==="aborted")return et;(p.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(p.value,d.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let p=c.key,d=c.value;if(p.status==="aborted"||d.status==="aborted")return et;(p.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(p.value,d.value)}return{status:r.value,value:a}}}};Pd.create=(t,e,r)=>new Pd({valueType:e,keyType:t,typeName:Je.ZodMap,...ut(r)});var Fd=class t extends ct{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==we.set)return be(n,{code:ge.invalid_type,expected:we.set,received:n.parsedType}),et;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(be(n,{code:ge.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(be(n,{code:ge.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function s(c){let p=new Set;for(let d of c){if(d.status==="aborted")return et;d.status==="dirty"&&r.dirty(),p.add(d.value)}return{status:r.value,value:p}}let a=[...n.data.values()].map((c,p)=>o._parse(new bo(n,c,n.path,p)));return n.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:We.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:We.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Fd.create=(t,e)=>new Fd({valueType:t,minSize:null,maxSize:null,typeName:Je.ZodSet,...ut(e)});var x0=class t extends ct{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==we.function)return be(r,{code:ge.invalid_type,expected:we.function,received:r.parsedType}),et;function n(a,c){return S0({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,v0(),Id].filter(p=>!!p),issueData:{code:ge.invalid_arguments,argumentsError:c}})}function i(a,c){return S0({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,v0(),Id].filter(p=>!!p),issueData:{code:ge.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof _c){let a=this;return di(async function(...c){let p=new Zi([]),d=await a._def.args.parseAsync(c,o).catch(y=>{throw p.addIssue(n(c,y)),p}),h=await Reflect.apply(s,this,d);return await a._def.returns._def.type.parseAsync(h,o).catch(y=>{throw p.addIssue(i(h,y)),p})})}else{let a=this;return di(function(...c){let p=a._def.args.safeParse(c,o);if(!p.success)throw new Zi([n(c,p.error)]);let d=Reflect.apply(s,this,p.data),h=a._def.returns.safeParse(d,o);if(!h.success)throw new Zi([i(d,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Ks.create(e).rest(Va.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||Ks.create([]).rest(Va.create()),returns:r||Va.create(),typeName:Je.ZodFunction,...ut(n)})}},_f=class extends ct{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};_f.create=(t,e)=>new _f({getter:t,typeName:Je.ZodLazy,...ut(e)});var Ef=class extends ct{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return be(r,{received:r.data,code:ge.invalid_literal,expected:this._def.value}),et}return{status:"valid",value:e.data}}get value(){return this._def.value}};Ef.create=(t,e)=>new Ef({value:t,typeName:Je.ZodLiteral,...ut(e)});function e9(t,e){return new yf({values:t,typeName:Je.ZodEnum,...ut(e)})}var yf=class t extends ct{constructor(){super(...arguments),A_.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return be(r,{expected:bt.joinValues(n),received:r.parsedType,code:ge.invalid_type}),et}if(T0(this,A_,"f")||X$(this,A_,new Set(this._def.values),"f"),!T0(this,A_,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return be(r,{received:r.data,code:ge.invalid_enum_value,options:n}),et}return di(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};A_=new WeakMap;yf.create=e9;var Df=class extends ct{constructor(){super(...arguments),C_.set(this,void 0)}_parse(e){let r=bt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==we.string&&n.parsedType!==we.number){let i=bt.objectValues(r);return be(n,{expected:bt.joinValues(i),received:n.parsedType,code:ge.invalid_type}),et}if(T0(this,C_,"f")||X$(this,C_,new Set(bt.getValidEnumValues(this._def.values)),"f"),!T0(this,C_,"f").has(e.data)){let i=bt.objectValues(r);return be(n,{received:n.data,code:ge.invalid_enum_value,options:i}),et}return di(e.data)}get enum(){return this._def.values}};C_=new WeakMap;Df.create=(t,e)=>new Df({values:t,typeName:Je.ZodNativeEnum,...ut(e)});var _c=class extends ct{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==we.promise&&r.common.async===!1)return be(r,{code:ge.invalid_type,expected:we.promise,received:r.parsedType}),et;let n=r.parsedType===we.promise?r.data:Promise.resolve(r.data);return di(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};_c.create=(t,e)=>new _c({type:t,typeName:Je.ZodPromise,...ut(e)});var Qi=class extends ct{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Je.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s=>{be(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let s=i.transform(n.data,o);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return et;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?et:c.status==="dirty"||r.value==="dirty"?Rd(c.value):c});{if(r.value==="aborted")return et;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?et:a.status==="dirty"||r.value==="dirty"?Rd(a.value):a}}if(i.type==="refinement"){let s=a=>{let c=i.refinement(a,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?et:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?et:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!x_(s))return s;let a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>x_(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:r.value,value:a})):s);bt.assertNever(i)}};Qi.create=(t,e,r)=>new Qi({schema:t,typeName:Je.ZodEffects,effect:e,...ut(r)});Qi.createWithPreprocess=(t,e,r)=>new Qi({schema:e,effect:{type:"preprocess",transform:t},typeName:Je.ZodEffects,...ut(r)});var Oo=class extends ct{_parse(e){return this._getType(e)===we.undefined?di(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Oo.create=(t,e)=>new Oo({innerType:t,typeName:Je.ZodOptional,...ut(e)});var Xs=class extends ct{_parse(e){return this._getType(e)===we.null?di(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Xs.create=(t,e)=>new Xs({innerType:t,typeName:Je.ZodNullable,...ut(e)});var vf=class extends ct{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===we.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};vf.create=(t,e)=>new vf({innerType:t,typeName:Je.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ut(e)});var Sf=class extends ct{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return O_(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Zi(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Zi(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Sf.create=(t,e)=>new Sf({innerType:t,typeName:Je.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ut(e)});var Ld=class extends ct{_parse(e){if(this._getType(e)!==we.nan){let n=this._getOrReturnCtx(e);return be(n,{code:ge.invalid_type,expected:we.nan,received:n.parsedType}),et}return{status:"valid",value:e.data}}};Ld.create=t=>new Ld({typeName:Je.ZodNaN,...ut(t)});var KNe=Symbol("zod_brand"),b_=class extends ct{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},R_=class t extends ct{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?et:o.status==="dirty"?(r.dirty(),Rd(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?et:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:Je.ZodPipeline})}},Tf=class extends ct{_parse(e){let r=this._def.innerType._parse(e),n=i=>(x_(i)&&(i.value=Object.freeze(i.value)),i);return O_(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};Tf.create=(t,e)=>new Tf({innerType:t,typeName:Je.ZodReadonly,...ut(e)});function t9(t,e={},r){return t?gc.create().superRefine((n,i)=>{var o,s;if(!t(n)){let a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,c=(s=(o=a.fatal)!==null&&o!==void 0?o:r)!==null&&s!==void 0?s:!0,p=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...p,fatal:c})}}):gc.create()}var XNe={object:Fi.lazycreate},Je;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Je||(Je={}));var JNe=(t,e={message:`Input not instance of ${t.name}`})=>t9(r=>r instanceof t,e),r9=mc.create,n9=cf.create,ZNe=Ld.create,QNe=lf.create,i9=ff.create,e1e=pf.create,t1e=wd.create,r1e=df.create,n1e=hf.create,i1e=gc.create,o1e=Va.create,s1e=gs.create,a1e=Nd.create,u1e=Wa.create,c1e=Fi.create,l1e=Fi.strictCreate,f1e=mf.create,p1e=A0.create,d1e=gf.create,h1e=Ks.create,m1e=C0.create,g1e=Pd.create,_1e=Fd.create,E1e=x0.create,y1e=_f.create,D1e=Ef.create,v1e=yf.create,S1e=Df.create,T1e=_c.create,Y$=Qi.create,A1e=Oo.create,C1e=Xs.create,x1e=Qi.createWithPreprocess,O1e=R_.create,b1e=()=>r9().optional(),R1e=()=>n9().optional(),I1e=()=>i9().optional(),w1e={string:t=>mc.create({...t,coerce:!0}),number:t=>cf.create({...t,coerce:!0}),boolean:t=>ff.create({...t,coerce:!0}),bigint:t=>lf.create({...t,coerce:!0}),date:t=>pf.create({...t,coerce:!0})},N1e=et,ee=Object.freeze({__proto__:null,defaultErrorMap:Id,setErrorMap:NNe,getErrorMap:v0,makeIssue:S0,EMPTY_PATH:PNe,addIssueToContext:be,ParseStatus:Wn,INVALID:et,DIRTY:Rd,OK:di,isAborted:Vw,isDirty:Ww,isValid:x_,isAsync:O_,get util(){return bt},get objectUtil(){return Gw},ZodParsedType:we,getParsedType:hc,ZodType:ct,datetimeRegex:Q$,ZodString:mc,ZodNumber:cf,ZodBigInt:lf,ZodBoolean:ff,ZodDate:pf,ZodSymbol:wd,ZodUndefined:df,ZodNull:hf,ZodAny:gc,ZodUnknown:Va,ZodNever:gs,ZodVoid:Nd,ZodArray:Wa,ZodObject:Fi,ZodUnion:mf,ZodDiscriminatedUnion:A0,ZodIntersection:gf,ZodTuple:Ks,ZodRecord:C0,ZodMap:Pd,ZodSet:Fd,ZodFunction:x0,ZodLazy:_f,ZodLiteral:Ef,ZodEnum:yf,ZodNativeEnum:Df,ZodPromise:_c,ZodEffects:Qi,ZodTransformer:Qi,ZodOptional:Oo,ZodNullable:Xs,ZodDefault:vf,ZodCatch:Sf,ZodNaN:Ld,BRAND:KNe,ZodBranded:b_,ZodPipeline:R_,ZodReadonly:Tf,custom:t9,Schema:ct,ZodSchema:ct,late:XNe,get ZodFirstPartyTypeKind(){return Je},coerce:w1e,any:i1e,array:u1e,bigint:QNe,boolean:i9,date:e1e,discriminatedUnion:p1e,effect:Y$,enum:v1e,function:E1e,instanceof:JNe,intersection:d1e,lazy:y1e,literal:D1e,map:g1e,nan:ZNe,nativeEnum:S1e,never:s1e,null:n1e,nullable:C1e,number:n9,object:c1e,oboolean:I1e,onumber:R1e,optional:A1e,ostring:b1e,pipeline:O1e,preprocess:x1e,promise:T1e,record:m1e,set:_1e,strictObject:l1e,string:r9,symbol:t1e,transformer:Y$,tuple:h1e,undefined:r1e,union:f1e,unknown:o1e,void:a1e,NEVER:N1e,ZodIssueCode:ge,quotelessJson:wNe,ZodError:Zi});u();import P1e from"node:process";function o9(){let t=P1e.env[D0];return t?JSON.parse(t):{}}var F1e=ee.object({biLoggerBaseUrl:ee.string().url().optional(),devEditorBaseUrl:ee.string().url().optional(),inkDebug:ee.boolean().optional(),minRetryTimeout:ee.number().optional(),sentryDsn:ee.string().optional(),userBrowserTestEndpoint:ee.string().url().optional(),dataDir:ee.string().optional(),wixCliDependencyVersion:ee.string().optional(),wixCliAppDependencyVersion:ee.string().optional(),appInstallationPollInterval:ee.number().optional(),disableTTY:ee.boolean().optional(),waitForLoginInterval:ee.number().optional(),registryUrl:ee.string().optional(),fsCacheDir:ee.string().optional(),localTunnel:ee.boolean().optional(),miniflareInspectorPort:ee.number().optional(),customElementsCreationDelay:ee.number().optional(),sdkAuthServerBaseUrl:ee.string().optional()});function gr(){return F1e.parse(o9())}function L1e(){return!!Md.env[D0]}function s9(){L1e()&&(Md.stdout.columns=300,Md.stderr.columns=300,Md.stdin.isTTY=!gr().disableTTY,Md.stdin.setRawMode=()=>Md.stdin)}u();u();var m9=F(Af(),1),{WError:nPe}=m9.default,Oe=class extends nPe{cliCode;constructor(e){let r=e.cause instanceof Error?e.cause:new Error(JSON.stringify(e.cause));super({name:e.code.type,cause:r,info:e.info},e.code.type),this.cliCode=e.code,this.name=e.code.type}};u();var Ne=F(tt(),1),Ud=(0,Ne.variant)({FailedToGetDeviceCode:{},FailedToGetAuthToken:{},FailedToRenewAuthToken:{},FailedToRefreshTokenForSite:{},FailedToRevokeRefreshToken:(0,Ne.fields)(),UnknownFailure:(0,Ne.fields)(),FailedToFetchPackageJson:{},FailedToGetDeveloperApps:{},FailedToUpdateTelemetryConfig:{},FailedToSyncToRevision:(0,Ne.fields)(),FailedToCreateVersion:{},FailedToReadCache:(0,Ne.fields)(),FailedToWriteCache:(0,Ne.fields)(),UploadApplicationFailed:{},FailedToCreateDevCenterApp:{},FailedToGetAppSecret:{},FailedToGetAppSnapshot:{},FailedToCreateTunnel:{},FailedToDeleteTunnel:{},GridAppFailedToUpdateFiles:{},FailedToCreateGridApp:(0,Ne.fields)(),InvalidResponseData:{},InvalidCreateAppResponse:{},InvalidDeployAppResponse:{},InvalidGetDeploymentResponse:{},FailedToGetPagesDiff:{},InvalidViteBuildOutput:{},ViteModuleBundleNotFound:{},ViteFileNotFoundInOutput:(0,Ne.fields)(),FailedToCreatePresignedUrl:{},FailedToCreateBackendDeployment:{},FailedToUpdateBackendDeployment:{},InvalidDeploymentUrl:(0,Ne.fields)(),FailedToGetBackendDeployment:{},FailedToDeployBackend:{},FailedToUploadApplicationFiles:{},FailedToVerifyDeployment:{},FailedToGetUserInfo:{},FailedToGetMyAccount:{},FailedToCreateDevelopmentSite:{},FailedToGetDevelopmentSites:{},FailedToGetDevelopmentSitesLimit:{},FailedToGetRequiredApps:{},FailedToGetMarketListing:{},FailedToAddRequiredApp:{},FailedToGetAppValidity:{},FailedToQuerySites:{},FailedToGetSite:{},FailedToDeploySite:{},FailedToPublishDeployment:{},FailedToMarkDeploymentAsPermanent:{},FailedToCheckIfAppInstalled:{},TypeErrorInvalidUrl:{},FailedToGenerateSelfsignedCertificate:{},FailedToResolveViteOrigin:{},FailedToCreateAppRelease:{},FailedToUpdateAppRelease:{},FailedToCreateComponents:{},FailedToGetResolveNpmDependenciesResult:{},FailedToResolveNpmDependencies:{},FailedToCheckDeprecatedStatus:{},FailedToCreateSiteOverride:{},FailedToGetDeploymentStatus:{},FailedToGetPipelineErrorInfo:{},FailedToGenerateAppMarketQueryParam:{},InvalidDependenciesJsonSchemaError:(0,Ne.fields)(),FailedToParseLog:{},FailedToConnectToLogsService:{},FailedToGetLogsTopology:{},LogsConnectionTimeout:{},FailedToFetchAppForVersion:{},InvalidSiteOverrideID:{}}),Zw=(0,Ne.variant)({LatestVersionOfCreateAppRequired:(0,Ne.fields)(),FailedToCreateProjectFolder:(0,Ne.fields)(),EmptyDirectoryRequiredAppGeneration:(0,Ne.fields)(),InvalidNewPackageName:(0,Ne.fields)(),UnsupportedPackageManager:(0,Ne.fields)(),UnsupportedPackageManagerWorkspaces:(0,Ne.fields)(),FailedAddingPackageToWorkspace:{},SitePermissionDenied:(0,Ne.fields)(),AppPermissionDenied:(0,Ne.fields)(),BuiltProjectNeeded:{},WixUninstallMissingPackageName:{},FailedToReadJson:(0,Ne.fields)(),FailedToWriteJson:(0,Ne.fields)(),InvalidJsonFile:(0,Ne.fields)(),FailedToWriteWixLock:{},InvalidVeloConfigJson:(0,Ne.fields)(),DashboardPageConfigNotFound:(0,Ne.fields)(),EmbeddedScriptConfigNotFound:(0,Ne.fields)(),NoExtensionsFound:{},CustomElementConfigNotFound:(0,Ne.fields)(),NoPagesDirectoryFound:(0,Ne.fields)(),DashboardPluginConfigNotFound:(0,Ne.fields)(),DashboardMenuPluginConfigNotFound:(0,Ne.fields)(),ServicePluginConfigNotFound:(0,Ne.fields)(),DashboardModalConfigNotFound:(0,Ne.fields)(),InvalidConfigSchemaError:(0,Ne.fields)(),InvalidParamsOverrideSchemaError:(0,Ne.fields)(),PermissionDenied:{},SiteSelectorTimedout:{},FailedToReadProjectFiles:(0,Ne.fields)(),FailedToCreateVersionForSubmittedApp:{},GridAppFilesMaxLengthExcceeded:(0,Ne.fields)(),DeviceCodeTimedOut:{},DuplicateComponentIdsError:(0,Ne.fields)(),FailedToSaveDevelopmentSite:(0,Ne.fields)(),FailedToBuildApp:(0,Ne.fields)(),FailedToInitializeGitRepo:(0,Ne.fields)(),FailedToInstallDependencies:(0,Ne.fields)(),FailedToCommitChanges:(0,Ne.fields)(),FailedToDeleteAuthData:(0,Ne.fields)(),FailedToDeleteLegacyAuthData:(0,Ne.fields)(),FailedToSaveAuthData:(0,Ne.fields)(),FailedToSaveApiKeyAuthData:(0,Ne.fields)(),FailedToRenewAuthTokenSiteNotFound:(0,Ne.fields)(),FailedToRenewAuthTokenRefreshTokenRevoked:{},FailedToInstallPackage:(0,Ne.fields)(),FailedToInstallPackages:(0,Ne.fields)(),FailedToUninstallPackage:(0,Ne.fields)(),FailedMigrationToAnyNpm:{},DeprecatedVersion:(0,Ne.fields)(),TemplatePathNotFound:(0,Ne.fields)(),FailedToCloneRepo:(0,Ne.fields)(),InvalidGitUrl:(0,Ne.fields)(),AuthenticationRequired:{},SiteConfiguredRequired:{},NonInteractiveTerminal:{},FailedToWatchFiles:(0,Ne.fields)(),CliAppVersionMismatch:(0,Ne.fields)(),NetworkError:(0,Ne.fields)(),AppForVersionNotFound:(0,Ne.fields)(),UnknownServicePlugin:(0,Ne.fields)(),InvalidServicePluginFolder:(0,Ne.fields)()}),iPe=(0,Ne.variant)({InvalidDashboardPageRoute:(0,Ne.fields)(),InvalidEmbeddedScriptFolder:(0,Ne.fields)(),InvalidEmbeddedScriptTemplate:(0,Ne.fields)(),InvalidCustomElementTagName:(0,Ne.fields)(),InvalidSiteFrontendPackageVersion:(0,Ne.fields)(),InvalidServicePluginImplementation:(0,Ne.fields)()}),Pe=(0,Ne.variant)({...Ud,...Zw,...iPe});u();var Qw=F(tt(),1);function Hd(t){return t&&typeof t=="object"&&"cliCode"in t?(0,Qw.isOfVariant)(t.cliCode,Pe):!1}function $a(t){return(0,Qw.isOfVariant)(t.cliCode,Ud)}u();var g9=F(tt(),1),_9=F(Af(),1);function E9(t){if(Hd(t)&&(0,g9.isOfVariant)(t.cliCode,Zw))return t;let e=_9.default.cause(t);return e?E9(e):null}function F_(t){let e=Hd(t)?t:new Oe({code:Pe.UnknownFailure({error:t})});return E9(e)??e}var eN=class extends Js.Component{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e){let r=e instanceof Error?e:new Error(JSON.stringify(e));r.message.includes("Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default")?this.props.onExit(new Oe({code:Pe.NonInteractiveTerminal(),cause:r})):this.props.onExit(r)}render(){return this.state.hasError?null:this.props.children}},oPe=({children:t})=>{let e=dc();return Js.default.createElement(eN,{onExit:e},t)},y9=({children:t,wrap:e})=>Js.default.createElement(Js.default.Fragment,null,e&&Js.default.createElement(Ut,null,"----RENDER FRAME START----"),t);async function L_(t){let e=!!gr().inkDebug,{waitUntilExit:r,unmount:n}=NS(Js.default.createElement(y9,{wrap:e},Js.default.createElement(oPe,null,t)),{exitOnCtrlC:!0,debug:e});process.once("beforeExit",()=>{n()}),process.once("SIGINT",()=>{n()}),await r()}function D9(t,e){let r=!!gr().inkDebug,{unmount:n}=NS(Js.default.createElement(y9,{wrap:r},t),{debug:r,...e});n()}function tN(t){D9(t)}function rN(t){D9(t,{stdout:process.stderr})}u();u();u();var qJ=F(tt(),1);u();u();var O9=F(C9(),1),aPe=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed"]),nN=class extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}},uPe=(t,e,r)=>{let n=r.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=n,t},cPe=t=>aPe.has(t),x9=t=>globalThis.DOMException===void 0?new Error(t):new DOMException(t);async function on(t,e){return new Promise((r,n)=>{e={onFailedAttempt(){},retries:10,...e};let i=O9.default.operation(e);i.attempt(async o=>{try{r(await t(o))}catch(s){if(!(s instanceof Error)){n(new TypeError(`Non-error was thrown: "${s}". You should only throw errors.`));return}if(s instanceof nN)i.stop(),n(s.originalError);else if(s instanceof TypeError&&!cPe(s.message))i.stop(),n(s);else{uPe(s,o,e);try{await e.onFailedAttempt(s)}catch(a){n(a);return}i.retry(s)||n(i.mainError())}}}),e.signal&&!e.signal.aborted&&e.signal.addEventListener("abort",()=>{i.stop();let o=e.signal.reason===void 0?x9("The operation was aborted."):e.signal.reason;n(o instanceof Error?o:x9(o))},{once:!0})})}u();u();u();u();function b9(t=""){let[e,r]=lPe(t);return r?{schemaName:r,schemaType:e}:{schemaName:e}}var lPe=t=>t.split("#");u();u();function R9(t,e,r,n){let i=t;for(let o of e.split(".")){if(!i)return r;i=i[o]}return`${i}${n}`}var fPe="_",pPe=["wix.com","editorx.com"],dPe=["42.wixprod.net","uw2-edt-1.wixprod.net"],hPe="dev.wix-code.com",mPe=/{(.*)}/,gPe=new RegExp(`\\.(${pPe.join("|")})$`),_Pe=new RegExp(`\\.(${dPe.join("|")})$`),EPe=new RegExp(`.*\\.${hPe}$`);function hi(t){let e=vPe(t.host),r=TPe(e,t.domainToMappings),n=yPe(t.protoPath,t.data||{});return APe(n,r)}function yPe(t,e){return t.split("/").map(r=>DPe(r,e)).join("/")}function DPe(t,e){let r=t.match(mPe)||[],n=r[1];if(n){let i=t.replace(r[0],"");return R9(e,n,t,i)}return t}function vPe(t){return SPe(t).replace(gPe,"._base_domain_").replace(_Pe,"._api_base_domain_").replace(EPe,"*.dev.wix-code.com")}function SPe(t){return t.replace("create.editorx.com","editor.editorx.com")}function TPe(t,e){let r=e[t]||e[fPe];return!r&&CPe(t)?e[xPe]:r}function APe(t,e){let r=e?.find(n=>t.startsWith(n.destPath));return r?r.srcPath+t.slice(r.destPath.length):t}function CPe(t){return!!t.match(/\._base_domain_$/)}var xPe="www._base_domain_";u();u();var iN=typeof Buffer=="function",IDt=typeof TextDecoder=="function"?new TextDecoder:void 0,I9=typeof TextEncoder=="function"?new TextEncoder:void 0,OPe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",M_=Array.prototype.slice.call(OPe),wDt=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(M_);var Zs=String.fromCharCode.bind(String),NDt=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),bPe=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_");var RPe=t=>{let e,r,n,i,o="",s=t.length%3;for(let a=0;a<t.length;){if((r=t.charCodeAt(a++))>255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,o+=M_[e>>18&63]+M_[e>>12&63]+M_[e>>6&63]+M_[e&63]}return s?o.slice(0,s-3)+"===".substring(s):o},N9=typeof btoa=="function"?t=>btoa(t):iN?t=>Buffer.from(t,"binary").toString("base64"):RPe,IPe=iN?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;n<i;n+=4096)r.push(Zs.apply(null,t.subarray(n,n+4096)));return N9(r.join(""))};var wPe=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?Zs(192|e>>>6)+Zs(128|e&63):Zs(224|e>>>12&15)+Zs(128|e>>>6&63)+Zs(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return Zs(240|e>>>18&7)+Zs(128|e>>>12&63)+Zs(128|e>>>6&63)+Zs(128|e&63)}},NPe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,PPe=t=>t.replace(NPe,wPe),w9=iN?t=>Buffer.from(t,"utf8").toString("base64"):I9?t=>IPe(I9.encode(t)):t=>N9(PPe(t)),P9=(t,e=!1)=>e?bPe(w9(t)):w9(t);function F9(t,e=""){let r={};return Object.entries(t).forEach(([n,i])=>{let o=i!==null&&typeof i=="object"&&!Array.isArray(i),s=FPe(e,n);if(o){let a=F9(i,s);Object.assign(r,a)}else r[s]=i}),r}function FPe(t,e){return`${t}${t?".":""}${e}`}function sn(t,e){let r=F9(t),n=Object.entries(r).reduce((i,[o,s])=>((Array.isArray(s)?s:[s]).forEach(c=>{c!=null&&i.append(o,c)}),i),new URLSearchParams);return e&&n.append(".r",P9(JSON.stringify(t),!0)),n}u();u();var Wr;(function(t){t[t.TO_JSON=0]="TO_JSON",t[t.FROM_JSON=1]="FROM_JSON"})(Wr||(Wr={}));u();function L9(t,e={},r){return function(i={},o){return typeof i=="string"?i:s(t,i);function s(d,h){let m={};return[null,void 0].includes(h)?h:(Object.entries(h).forEach(([y,S])=>{let T=d[y],{schemaName:x,schemaType:O}=b9(T),N=O==="Map",I=c(x)?.checkRepetable?.(S)??Array.isArray(S),P;I?P=S.map(k=>a(k,x)):N?P=p(S,x):P=a(S,x),m[y]=P}),m)}function a(d,h){if(!h)return d;let m=e[h];if(c(h))return c(h).transform(d);if(m)return s(m,d);throw new Error(`${h} is neither schema nor serializable type`)}function c(d){return r[d]?.[o]}function p(d,h){return Object.entries(d).reduce((m,[y,S])=>(m[y]=a(S,h),m),{})}}}u();u();var M9={types:["google.protobuf.Timestamp"],[Wr.TO_JSON]:{transform:t=>t?.toISOString()},[Wr.FROM_JSON]:{transform:t=>t?new Date(t):void 0}};u();var k9={types:["google.protobuf.FieldMask"],[Wr.TO_JSON]:{transform:t=>t.join(","),checkRepetable:t=>t.some(e=>Array.isArray(e))},[Wr.FROM_JSON]:{transform:t=>typeof t=="object"?t.paths:t.split(",")}};u();var B9={types:["google.protobuf.BytesValue","BYTES"],[Wr.TO_JSON]:{transform:t=>{let e=t.reduce((r,n)=>r+String.fromCharCode(n),"");return btoa(e)}},[Wr.FROM_JSON]:{transform:t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0))}};u();var U9={types:["google.protobuf.Duration"],[Wr.TO_JSON]:{transform:({seconds:t="0",nanos:e=0})=>{let r="";return e!==0&&(r=`.${e.toString().padStart(9,"0")}`),`${t}${r}s`}},[Wr.FROM_JSON]:{transform:t=>{let[e,r]=t.substring(0,t.length-1).split(".");return{seconds:e,nanos:LPe(r)}}}};function LPe(t){let e=0;if(t!==void 0){let r=3-t.length/3;e=parseInt(t,10)*Math.pow(1e3,r)}return e}u();var H9={types:["FLOAT","DOUBLE","google.protobuf.FloatValue","google.protobuf.DoubleValue"],[Wr.TO_JSON]:{transform:t=>isFinite(t)?t:t.toString()},[Wr.FROM_JSON]:{transform:t=>t==="NaN"?NaN:t==="Infinity"?1/0:t==="-Infinity"?-1/0:t}};var q9=[M9,k9,B9,U9,H9];u();function j9(t){return t.reduce((e,r)=>{let n=r.types.reduce((i,o)=>({...i,[o]:r}),{});return{...e,...n}},{})}var MPe=j9([...q9]);function gt(t,e={}){let r=L9(t,e,MPe);return{fromJSON(n){let i=kPe(n)||n;return r(i,Wr.FROM_JSON)},toJSON(n){return r(n,Wr.TO_JSON)}}}function kPe(t){try{return JSON.parse(t)}catch{}}var BPe={dateCreated:"google.protobuf.Timestamp",dateUpdated:"google.protobuf.Timestamp"},UPe={account:"_account"};var HPe={};function qPe(t){var e={"api._api_base_domain_":[{srcPath:"/account-server",destPath:""}],"www._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"manage._base_domain_":[{srcPath:"/_api/account-server",destPath:""},{srcPath:"/account-server",destPath:""}],"premium._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"editor._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"blocks._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"create.editorx":[{srcPath:"/_api/account-server",destPath:""}],"bo._base_domain_":[{srcPath:"/account-server",destPath:""}],"wixbo.ai":[{srcPath:"/account-server",destPath:""}],"www.wixapis.com":[{srcPath:"/accounts",destPath:""}],"users._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"*.dev.wix-code.com":[{srcPath:"/_api/account-server",destPath:""}]};return hi(Object.assign(t,{domainToMappings:e}))}function G9(t){var e=gt(HPe,{}),r=e.toJSON,n=e.fromJSON,i=gt(UPe,{_account:BPe}).fromJSON;function o(s){var a=s.host,c=r(t),p={entityFqdn:"wix.identity.account.v2.account",method:"GET",methodFqn:"com.wixpress.account.api.AccountService.getMyAccount",url:qPe({protoPath:"/v1/accounts/my_account",data:c,host:a}),params:sn(c),transformResponse:i};return p}return o.fromReq=n,o.__isAmbassador=!0,o}u();var jPe={},GPe={};var VPe={body:"BYTES"},WPe={body:"BYTES"},$Pe={},zPe={};function oN(t){var e={"manage._base_domain_":[{srcPath:"/oauth2",destPath:"/v1/oauth"}],"www.wixapis.com":[{srcPath:"/oauth2",destPath:"/v1/oauth"},{srcPath:"/oauth2/token_info",destPath:"/v1/token_info"}],"users._base_domain_":[{srcPath:"/v1/oauth/device/verify",destPath:"/v1/oauth/device/verify"},{srcPath:"/v1/oauth/manage/user-code",destPath:"/v1/oauth/manage/user-code"},{srcPath:"/v2/oauth/device/verify",destPath:"/v2/oauth/device/verify"}],_:[{srcPath:"/_api/oauth2",destPath:"/v1/oauth"}]};return hi(Object.assign(t,{domainToMappings:e}))}function sN(t){var e=gt(VPe,{}),r=e.toJSON,n=e.fromJSON,i=gt(WPe,{}).fromJSON;function o(s){var a=s.host,c=r(t),p={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"POST",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.Token",url:oN({protoPath:"/v1/oauth/token",data:c,host:a}),data:c,transformResponse:i};return p}return o.fromReq=n,o.__isAmbassador=!0,o}function V9(t){var e=gt(jPe,{}),r=e.toJSON,n=e.fromJSON,i=gt(GPe,{}).fromJSON;function o(s){var a=s.host,c=r(t),p={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"GET",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.DeviceCode",url:oN({protoPath:"/v1/oauth/device/code",data:c,host:a}),params:sn(c),transformResponse:i};return p}return o.fromReq=n,o.__isAmbassador=!0,o}function W9(t){var e=gt($Pe,{}),r=e.toJSON,n=e.fromJSON,i=gt(zPe,{}).fromJSON;function o(s){var a=s.host,c=r(t),p={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"POST",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.RevokeRefreshToken",url:oN({protoPath:"/v1/oauth/revoke",data:c,host:a}),data:c,transformResponse:i};return p}return o.fromReq=n,o.__isAmbassador=!0,o}u();var SY=F(Zd(),1);u();var vY=F(Zd(),1);function wf(t){return vY.HttpClient.isHttpError(t)}var M2e={backoffice:"https://manage.wix.com",editor:"https://editor.wix.com",code:"https://code.wix.com",general:"https://www.wix.com",standalone:void 0};function Sc(t,e){return(...r)=>e.apply(t,r).catch(n=>{throw wf(n)&&!t.isCancel(n)&&!n.response?new Oe({code:Pe.NetworkError({cause:n}),cause:n,info:{code:n.code}}):n})}function Qd({getAppToken:t,createHeaders:e,type:r}){let n=(0,SY.createHttpClient)({baseURL:M2e[r],...r!=="standalone"?{getAppToken:t}:{},createHeaders:()=>({...e?.(),"X-XSRF-TOKEN":"nocheck",Cookie:"XSRF-TOKEN=nocheck","User-Agent":"wix-cli"})});return{...n,request:Sc(n,n.request),get:Sc(n,n.get),delete:Sc(n,n.delete),head:Sc(n,n.head),options:Sc(n,n.options),post:Sc(n,n.post),put:Sc(n,n.put),patch:Sc(n,n.patch)}}u();var TY=F(Zd(),1),AY=F(Af(),1);function X_(t){if(TY.HttpClient.isHttpError(t))return t;let e=t instanceof Error?AY.default.cause(t):null;return e?X_(e):null}u();function sT(t){return{request:{baseURL:t.config.baseURL,url:t.config.url,method:t.config.method,headers:t.config.headers,data:t.config.data},response:{code:t.code,message:t.message,status:t.response?.status,headers:t.response?.headers,data:t.response?.data}}}var eh=F(tt(),1);u();var CY=ee.object({deviceCode:ee.string(),verificationUri:ee.string().url(),userCode:ee.string(),expiresIn:ee.number()}),ZN=ee.object({access_token:ee.string(),refresh_token:ee.string(),expires_in:ee.number()}).transform(t=>({accessToken:t.access_token,refreshToken:t.refresh_token,expiresIn:t.expires_in})),QN=ee.object({userId:ee.string().uuid(),email:ee.string().email()}),xY=ee.object({account:ee.object({slug:ee.string(),accountId:ee.string().uuid(),accountOwner:ee.string().uuid()})}),OY=ee.object({accessToken:ee.string(),refreshToken:ee.string(),expiresIn:ee.number(),issuedAt:ee.number()}),bY=OY.extend({userInfo:QN}),RY=ee.object({token:ee.string(),accountId:ee.string().uuid(),userInfo:ee.object({userId:ee.string().uuid(),email:ee.string()})});var{InvalidResponseData:k2e,FailedToGetAuthToken:B2e,FailedToGetDeviceCode:U2e,FailedToRenewAuthToken:H2e,FailedToRenewAuthTokenSiteNotFound:q2e,FailedToRevokeRefreshToken:j2e}=Pe,e1="6f95cec8-3e98-48b9-b4e5-1fb92fcd9973",IY=()=>Math.floor(Date.now()/1e3),J_=class extends Error{},aT=(0,eh.variant)({TokenRenewed:(0,eh.payload)(),RefreshTokenRevoked:(0,eh.fields)()}),t1=class{constructor(e){this.httpClient=e;let{minRetryTimeout:r}=gr();this.retryOptions={retries:3,minTimeout:r,maxTimeout:3*1e3}}retryOptions;async requestDeviceCode(e={}){try{let{data:r}=await on(()=>this.httpClient.request(V9({...e,clientId:e1})),this.retryOptions);return CY.parse(r)}catch(r){throw new Oe({code:U2e(),cause:r})}}async createToken(e){try{let r={clientId:e1,grantType:"urn:ietf:params:oauth:grant-type:device_code",scope:"offline_access",...e};return{...await on(async()=>{let{data:i,requestId:o}=await this.httpClient.request(sN(r)),s=ZN.safeParse(i);if(s.success)return s.data;throw new Oe({code:k2e(),cause:s.error,info:{requestId:o,data:i}})},this.retryOptions),issuedAt:IY()}}catch(r){throw wf(r)&&(r.response?.data?.message==="Device code is not yet verified"||r.response?.data?.error==="authorization_pending")?new J_("Device code is not yet verified."):new Oe({code:B2e(),cause:r})}}async renewToken(e){try{let r={clientId:e1,grantType:"refresh_token",...e},{data:n}=await on(()=>this.httpClient.request(sN(r)),this.retryOptions),i=ZN.parse(n);return aT.TokenRenewed({...i,issuedAt:IY()})}catch(r){if(wf(r)){if(r.response?.status===400&&r.response.data?.error==="invalid_grant")return aT.RefreshTokenRevoked({cause:r});if(e.siteId&&r.response?.status===404&&r.response.data?.details?.applicationError?.code==="SITE_NOT_FOUND")throw new Oe({code:q2e({siteId:e.siteId}),cause:r})}throw new Oe({code:H2e(),cause:r})}}async revokeRefreshToken(e,{email:r}){try{let{data:n}=await this.httpClient.request(W9(e));return n}catch(n){throw new Oe({code:j2e({email:r}),info:{email:r},cause:n})}}async userInfo({accessToken:e}){try{let r=Qd({type:"backoffice",getAppToken:async()=>e}),{data:n}=await r.get("/_serverless/wix-cli-userinfo/userinfo");return QN.parse(n)}catch(r){throw new Oe({code:Pe.FailedToGetUserInfo(),cause:r})}}async getMyAccount({token:e}){try{let r=Qd({type:"backoffice",getAppToken:async()=>e}),{data:n}=await r.request(G9({}));return xY.parse(n).account}catch(r){throw new Oe({code:Pe.FailedToGetMyAccount(),cause:r})}}},Tc=new t1(Qd({type:"backoffice"}));u();import{unlink as RBe,rm as IBe}from"node:fs/promises";import{resolve as yE}from"node:path";u();import{resolve as G2e}from"node:path";import{homedir as V2e}from"node:os";function Z_(){return gr().dataDir??G2e(V2e(),".wix")}var gi=F(tt(),1);u();var xBe=F(wJ(),1),OBe=F(Af(),1);import{access as TBe,readFile as ABe,writeFile as NJ,mkdir as PJ,stat as gCt}from"node:fs/promises";import{dirname as FJ,join as ECt,relative as yCt}from"node:path";import{EOL as CBe}from"node:os";function bBe(t,e){return JSON.stringify(t,null,e?.spaces).concat(CBe)}async function Bc(t,e,r){try{let n=bBe(e,r);await PJ(FJ(t),{recursive:!0}),await NJ(t,n,"utf-8")}catch(n){throw new Oe({code:Pe.FailedToWriteJson({filePath:t,cause:n}),cause:n})}}async function Ss(t){let e=null;try{e=await ABe(t,"utf-8")}catch(r){throw new Oe({code:Pe.FailedToReadJson({filePath:t,cause:r})})}try{return JSON.parse(e)}catch(r){throw new Oe({code:Pe.InvalidJsonFile({filePath:t,cause:r})})}}function Hi(t){return TBe(t).then(()=>!0).catch(()=>!1)}async function LJ(t,e){await PJ(FJ(t),{recursive:!0}),await NJ(t,e,"utf-8")}function MJ(){return yE(Z_(),"auth.json")}function hA(){return yE(Z_(),"auth")}function kJ(){return yE(hA(),"api-key.json")}function BJ(){return yE(hA(),"account.json")}function wBe(t){return yE(hA(),`${t}.json`)}var WP=(0,gi.variant)({Authenticated:(0,gi.payload)(),Unauthenticated:{}});async function $P(){let t=kJ();if(!await Hi(t))return WP.Unauthenticated();let e=await Ss(t),r=RY.parse(e);return WP.Authenticated(r)}async function UJ(t){try{let e=kJ();await Bc(e,t)}catch(e){throw new Oe({code:Pe.FailedToSaveApiKeyAuthData({cause:e}),cause:e})}}var VP=(0,gi.variant)({Authenticated:(0,gi.fields)(),Unauthenticated:{},Expired:(0,gi.fields)()});async function zP(){let t=BJ();if(!await Hi(t))return VP.Unauthenticated();let e=await Ss(t),r=bY.parse(e);return XP(r)?VP.Authenticated(r):VP.Expired(r)}var ICt=(0,gi.variant)({Authenticated:(0,gi.fields)(),Unauthenticated:{},Expired:(0,gi.fields)()});async function YP(t,e){try{let r=e?wBe(e):BJ();await Bc(r,t)}catch(r){throw new Oe({code:Pe.FailedToSaveAuthData({cause:r}),cause:r})}}async function mA(){try{await IBe(hA(),{recursive:!0,force:!0})}catch(t){throw new Oe({code:Pe.FailedToDeleteAuthData({cause:t}),cause:t})}await KP()&&await NBe()}async function NBe(){try{await RBe(MJ())}catch(t){throw new Oe({code:Pe.FailedToDeleteLegacyAuthData({cause:t}),cause:t})}}async function KP(){return Hi(MJ())}function XP(t){let e=Math.floor(Date.now()/1e3),r=10*60,n=t.expiresIn-r;return t.issuedAt+n>e}async function JP(){let t=await $P();if((0,gi.isType)(t,WP.Authenticated))return t.payload.userInfo;let e=await zP();return(0,gi.match)(e,{Authenticated:({userInfo:r})=>r,Expired:({userInfo:r})=>r,Unauthenticated:()=>null})}function HJ({authData:{token:t,accountId:e,userInfo:r},siteId:n}){return{getAccessToken:async()=>t,getRefreshToken:()=>{throw new Error("API key auth does not support refresh tokens")},getRequestHeaders:()=>({"wix-account-id":e,...n&&{"wix-site-id":n}}),userInfo:r}}var jJ={async isLoggedIn({siteId:t}={}){let e=await $P();return(0,qJ.match)(e,{Authenticated:({payload:r})=>HJ({authData:r,siteId:t}),Unauthenticated:()=>null})},async login({token:t}){let{accountId:e,accountOwner:r,slug:n}=await Tc.getMyAccount({token:t}),i={token:t,accountId:e,userInfo:{userId:r,email:n}};return await mA(),await UJ(i),HJ({authData:i})}};u();u();u();var ZP=class{value;next;constructor(e){this.value=e}},DE=class{#r;#t;#e;constructor(){this.clear()}enqueue(e){let r=new ZP(e);this.#r?(this.#t.next=r,this.#t=r):(this.#r=r,this.#t=r),this.#e++}dequeue(){let e=this.#r;if(e)return this.#r=this.#r.next,this.#e--,e.value}clear(){this.#r=void 0,this.#t=void 0,this.#e=0}get size(){return this.#e}*[Symbol.iterator](){let e=this.#r;for(;e;)yield e.value,e=e.next}};function QP(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new DE,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,c,p)=>{r++;let d=(async()=>a(...p))();c(d);try{await d}catch{}n()},o=(a,c,p)=>{e.enqueue(i.bind(void 0,a,c,p)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},s=(a,...c)=>new Promise(p=>{o(a,p,c)});return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s}var Hc=F(tt(),1);u();u();var Uc=class extends Error{constructor(e){super(e),this.name="TimeoutError"}},eF=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},GJ=t=>globalThis.DOMException===void 0?new eF(t):new DOMException(t),VJ=t=>{let e=t.reason===void 0?GJ("This operation was aborted."):t.reason;return e instanceof Error?e:GJ(e)};function tF(t,e){let{milliseconds:r,fallback:n,message:i,customTimers:o={setTimeout,clearTimeout}}=e,s,c=new Promise((p,d)=>{if(typeof r!="number"||Math.sign(r)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(e.signal){let{signal:m}=e;m.aborted&&d(VJ(m)),m.addEventListener("abort",()=>{d(VJ(m))})}if(r===Number.POSITIVE_INFINITY){t.then(p,d);return}let h=new Uc;s=o.setTimeout.call(void 0,()=>{if(n){try{p(n())}catch(m){d(m)}return}typeof t.cancel=="function"&&t.cancel(),i===!1?p():i instanceof Error?d(i):(h.message=i??`Promise timed out after ${r} milliseconds`,d(h))},r),(async()=>{try{p(await t)}catch(m){d(m)}})()}).finally(()=>{c.clear()});return c.clear=()=>{o.clearTimeout.call(void 0,s),s=void 0},c}var rF=Symbol("resolveValue");async function Vf(t,e={}){let{interval:r=20,timeout:n=Number.POSITIVE_INFINITY,before:i=!0}=e,o,s=!1,a=new Promise((c,p)=>{let d=async()=>{try{let h=await t();if(typeof h=="object"&&h[rF])c(h[rF]);else{if(typeof h!="boolean")throw new TypeError("Expected condition to return a boolean");h===!0?c():s||(o=setTimeout(d,r))}}catch(h){p(h)}};i?d():o=setTimeout(d,r)});if(n===Number.POSITIVE_INFINITY)return a;try{return await tF(a,typeof n=="number"?{milliseconds:n}:n)}finally{s=!0,clearTimeout(o)}}Vf.resolveWith=t=>({[rF]:t});var WJ=t=>1e3*t;async function PBe({deviceCode:t,expiresIn:e},{signal:r}){try{let n=await Vf(async()=>{try{let s=await Tc.createToken({deviceCode:t});return Vf.resolveWith(s)}catch(s){if(s instanceof J_)return!1;throw s}},{interval:gr().waitForLoginInterval??WJ(3),timeout:{milliseconds:WJ(e),signal:r}}),i=await Tc.userInfo({accessToken:n.accessToken}),o={...n,userInfo:i};return await mA(),await YP(o),o}catch(n){throw n instanceof Uc?new Oe({code:Pe.DeviceCodeTimedOut()}):n}}async function zJ({refreshToken:t,userInfo:e}){let r=await Tc.renewToken({refreshToken:t});return(0,Hc.isType)(r,aT.TokenRenewed)&&await YP({...r.payload,userInfo:e}),r}async function FBe(){let t=await zP();return(0,Hc.match)(t,{Authenticated:e=>e,Unauthenticated:()=>null,Expired:async e=>{let r=await zJ(e);return(0,Hc.match)(r,{TokenRenewed:({payload:n})=>({...n,userInfo:e.userInfo}),RefreshTokenRevoked:(0,Hc.constant)(null)})}})}function $J({userInfo:t,...e}){let r=QP(1),n={...e};return{getAccessToken:()=>r(async()=>{if(XP(n))return n.accessToken;let i=await zJ({...n,userInfo:t});return(0,Hc.match)(i,{TokenRenewed:({payload:o})=>(n=o,n.accessToken),RefreshTokenRevoked:({cause:o})=>{throw new Oe({code:Pe.FailedToRenewAuthTokenRefreshTokenRevoked(),cause:o})}})}),getRefreshToken:()=>n.refreshToken,userInfo:t}}var vE={async isLoggedIn(){let t=await jJ.isLoggedIn();if(t)return t;let e=await FBe();return e?$J(e):null},async login({deviceCode:t,signal:e}){let r=await PBe(t,{signal:e});return $J(r)}};u();var KJ=F(ie(),1);u();var YJ=F(ie(),1),gA=(0,YJ.createContext)(null);function nF(){let t=(0,KJ.useContext)(gA);if(!t)throw new Error("useAuth() cannot be used without an <AuthProvider>");return t}u();function XJ(t){return{evid:5200,src:11,endpoint:"wix-cli",params:t}}function iF(t){return{evid:5201,src:11,endpoint:"wix-cli",params:t}}function JJ(t){return{evid:5211,src:11,endpoint:"wix-cli",params:t}}function oF(t){return{evid:5212,src:11,endpoint:"wix-cli",params:t}}u();var CM=F(ie(),1);u();u();u();var lZ=F(ie(),1);u();var un=F(ie(),1);u();var tZ=F(QJ()),LBe=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function eZ(t){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},r=t.match(/<\/?([^\s]+?)[/\s>]/);if(r&&(e.name=r[1],(tZ.default[r[1]]||t.charAt(t.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var n=t.indexOf("-->");return{type:"comment",comment:n!==-1?t.slice(4,n):""}}for(var i=new RegExp(LBe),o=null;(o=i.exec(t))!==null;)if(o[0].trim())if(o[1]){var s=o[1].trim(),a=[s,""];s.indexOf("=")>-1&&(a=s.split("=")),e.attrs[a[0]]=a[1],i.lastIndex--}else o[2]&&(e.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return e}var MBe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,kBe=/^\s*$/,BBe=Object.create(null);function rZ(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?function(r){var n=[];for(var i in r)n.push(i+'="'+r[i]+'"');return n.length?" "+n.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(rZ,"")+"</"+e.name+">";case"comment":return t+"<!--"+e.comment+"-->"}}var UBe={parse:function(t,e){e||(e={}),e.components||(e.components=BBe);var r,n=[],i=[],o=-1,s=!1;if(t.indexOf("<")!==0){var a=t.indexOf("<");n.push({type:"text",content:a===-1?t:t.substring(0,a)})}return t.replace(MBe,function(c,p){if(s){if(c!=="</"+r.name+">")return;s=!1}var d,h=c.charAt(1)!=="/",m=c.startsWith("<!--"),y=p+c.length,S=t.charAt(y);if(m){var T=eZ(c);return o<0?(n.push(T),n):((d=i[o]).children.push(T),n)}if(h&&(o++,(r=eZ(c)).type==="tag"&&e.components[r.name]&&(r.type="component",s=!0),r.voidElement||s||!S||S==="<"||r.children.push({type:"text",content:t.slice(y,t.indexOf("<",y))}),o===0&&n.push(r),(d=i[o-1])&&d.children.push(r),i[o]=r),(!h||r.voidElement)&&(o>-1&&(r.voidElement||r.name===c.slice(2,-1))&&(o--,r=o===-1?n:i[o]),!s&&S!=="<"&&S)){d=o===-1?n:i[o].children;var x=t.indexOf("<",y),O=t.slice(y,x===-1?void 0:x);kBe.test(O)&&(O=" "),(x>-1&&o+d.length>=0||O!==" ")&&d.push({type:"text",content:O})}}),n},stringify:function(t){return t.reduce(function(e,r){return e+rZ("",r)},"")}},nZ=UBe;u();function SE(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}var iZ={};function Ah(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];typeof e[0]=="string"&&iZ[e[0]]||(typeof e[0]=="string"&&(iZ[e[0]]=new Date),SE(...e))}var oZ=(t,e)=>()=>{if(t.isInitialized)e();else{let r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}};function sF(t,e,r){t.loadNamespaces(e,oZ(t,r))}function aF(t,e,r,n){typeof r=="string"&&(r=[r]),r.forEach(i=>{t.options.ns.indexOf(i)<0&&t.options.ns.push(i)}),t.loadLanguages(e,oZ(t,n))}function HBe(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=e.languages[0],i=e.options?e.options.fallbackLng:!1,o=e.languages[e.languages.length-1];if(n.toLowerCase()==="cimode")return!0;let s=(a,c)=>{let p=e.services.backendConnector.state[`${a}|${c}`];return p===-1||p===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!s(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(n,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||s(n,t)&&(!i||s(o,t)))}function sZ(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(Ah("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:r.lng,precheck:(i,o)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,t))return!1}}):HBe(t,e,r)}u();u();var qBe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,jBe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},GBe=t=>jBe[t],aZ=t=>t.replace(qBe,GBe);var uF={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:aZ};function _A(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};uF={...uF,...t}}function Ch(){return uF}u();var uZ;function EA(t){uZ=t}function uu(){return uZ}function cF(t,e){if(!t)return!1;let r=t.props?t.props.children:t.children;return e?r.length>0:!!r}function lF(t){if(!t)return[];let e=t.props?t.props.children:t.children;return t.props&&t.props.i18nIsDynamicList?xh(e):e}function VBe(t){return Object.prototype.toString.call(t)!=="[object Array]"?!1:t.every(e=>(0,un.isValidElement)(e))}function xh(t){return Array.isArray(t)?t:[t]}function WBe(t,e){let r={...e};return r.props=Object.assign(t.props,e.props),r}function fF(t,e){if(!t)return"";let r="",n=xh(t),i=e.transSupportBasicHtmlNodes&&e.transKeepBasicHtmlNodesFor?e.transKeepBasicHtmlNodesFor:[];return n.forEach((o,s)=>{if(typeof o=="string")r+=`${o}`;else if((0,un.isValidElement)(o)){let a=Object.keys(o.props).length,c=i.indexOf(o.type)>-1,p=o.props.children;if(!p&&c&&a===0)r+=`<${o.type}/>`;else if(!p&&(!c||a!==0))r+=`<${s}></${s}>`;else if(o.props.i18nIsDynamicList)r+=`<${s}></${s}>`;else if(c&&a===1&&typeof p=="string")r+=`<${o.type}>${p}</${o.type}>`;else{let d=fF(p,e);r+=`<${s}>${d}</${s}>`}}else if(o===null)SE("Trans: the passed in value is invalid - seems you passed in a null child.");else if(typeof o=="object"){let{format:a,...c}=o,p=Object.keys(c);if(p.length===1){let d=a?`${p[0]}, ${a}`:p[0];r+=`{{${d}}}`}else SE("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",o)}else SE("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",o)}),r}function $Be(t,e,r,n,i,o){if(e==="")return[];let s=n.transKeepBasicHtmlNodesFor||[],a=e&&new RegExp(s.map(x=>`<${x}`).join("|")).test(e);if(!t&&!a&&!o)return[e];let c={};function p(x){xh(x).forEach(N=>{typeof N!="string"&&(cF(N)?p(lF(N)):typeof N=="object"&&!(0,un.isValidElement)(N)&&Object.assign(c,N))})}p(t);let d=nZ.parse(`<0>${e}</0>`),h={...c,...i};function m(x,O,N){let I=lF(x),P=S(I,O.children,N);return VBe(I)&&P.length===0||x.props&&x.props.i18nIsDynamicList?I:P}function y(x,O,N,I,P){x.dummy?(x.children=O,N.push((0,un.cloneElement)(x,{key:I},P?void 0:O))):N.push(...un.Children.map([x],k=>{let j={...k.props};return delete j.i18nIsDynamicList,(0,un.createElement)(k.type,{...j,key:I,ref:k.ref},P?null:O)}))}function S(x,O,N){let I=xh(x);return xh(O).reduce((k,j,G)=>{let oe=j.children&&j.children[0]&&j.children[0].content&&r.services.interpolator.interpolate(j.children[0].content,h,r.language);if(j.type==="tag"){let K=I[parseInt(j.name,10)];N.length===1&&!K&&(K=N[0][j.name]),K||(K={});let ue=Object.keys(j.attrs).length!==0?WBe({props:j.attrs},K):K,M=(0,un.isValidElement)(ue),ce=M&&cF(j,!0)&&!j.voidElement,me=a&&typeof ue=="object"&&ue.dummy&&!M,Se=typeof t=="object"&&t!==null&&Object.hasOwnProperty.call(t,j.name);if(typeof ue=="string"){let H=r.services.interpolator.interpolate(ue,h,r.language);k.push(H)}else if(cF(ue)||ce){let H=m(ue,j,N);y(ue,H,k,G)}else if(me){let H=S(I,j.children,N);y(ue,H,k,G)}else if(Number.isNaN(parseFloat(j.name)))if(Se){let H=m(ue,j,N);y(ue,H,k,G,j.voidElement)}else if(n.transSupportBasicHtmlNodes&&s.indexOf(j.name)>-1)if(j.voidElement)k.push((0,un.createElement)(j.name,{key:`${j.name}-${G}`}));else{let H=S(I,j.children,N);k.push((0,un.createElement)(j.name,{key:`${j.name}-${G}`},H))}else if(j.voidElement)k.push(`<${j.name} />`);else{let H=S(I,j.children,N);k.push(`<${j.name}>${H}</${j.name}>`)}else if(typeof ue=="object"&&!M){let H=j.children[0]?oe:null;H&&k.push(H)}else y(ue,oe,k,G,j.children.length!==1||!oe)}else if(j.type==="text"){let K=n.transWrapTextNodes,ue=o?n.unescape(r.services.interpolator.interpolate(j.content,h,r.language)):r.services.interpolator.interpolate(j.content,h,r.language);K?k.push((0,un.createElement)(K,{key:`${j.name}-${G}`},ue)):k.push(ue)}return k},[])}let T=S([{dummy:!0,children:t||[]}],d,xh(t||[]));return lF(T[0])}function pF(t){let{children:e,count:r,parent:n,i18nKey:i,context:o,tOptions:s={},values:a,defaults:c,components:p,ns:d,i18n:h,t:m,shouldUnescape:y,...S}=t,T=h||uu();if(!T)return Ah("You will need to pass in an i18next instance by using i18nextReactModule"),e;let x=m||T.t.bind(T)||(ce=>ce),O={...Ch(),...T.options&&T.options.react},N=d||x.ns||T.options&&T.options.defaultNS;N=typeof N=="string"?[N]:N||["translation"];let I=fF(e,O),P=c||I||O.transEmptyNodeValue||i,{hashTransKey:k}=O,j=i||(k?k(I||P):I||P);T.options&&T.options.interpolation&&T.options.interpolation.defaultVariables&&(a=a&&Object.keys(a).length>0?{...a,...T.options.interpolation.defaultVariables}:{...T.options.interpolation.defaultVariables});let G=a||r!==void 0||!e?s.interpolation:{interpolation:{...s.interpolation,prefix:"#$?",suffix:"?$#"}},oe={...s,context:o||s.context,count:r,...a,...G,defaultValue:P,ns:N},K=j?x(j,oe):P;p&&Object.keys(p).forEach(ce=>{let me=p[ce];if(typeof me.type=="function"||!me.props||!me.props.children||K.indexOf(`${ce}/>`)<0&&K.indexOf(`${ce} />`)<0)return;function Se(){return(0,un.createElement)(un.Fragment,null,me)}p[ce]=(0,un.createElement)(Se)});let ue=$Be(p||e,K,T,O,oe,y),M=n!==void 0?n:O.defaultTransParent;return M?(0,un.createElement)(M,S,ue):ue}u();var cZ=F(ie(),1);u();var yA={type:"3rdParty",init(t){_A(t.options.react),EA(t)}};var qc=(0,cZ.createContext)(),DA=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}};function Rt(t){let{children:e,count:r,parent:n,i18nKey:i,context:o,tOptions:s={},values:a,defaults:c,components:p,ns:d,i18n:h,t:m,shouldUnescape:y,...S}=t,{i18n:T,defaultNS:x}=(0,lZ.useContext)(qc)||{},O=h||T||uu(),N=m||O&&O.t.bind(O);return pF({children:e,count:r,parent:n,i18nKey:i,context:o,tOptions:s,values:a,defaults:c,components:p,ns:d||N&&N.ns||x||O&&O.options&&O.options.defaultNS,i18n:O,t:m,shouldUnescape:y,...S})}u();var io=F(ie(),1);var zBe=(t,e)=>{let r=(0,io.useRef)();return(0,io.useEffect)(()=>{r.current=e?r.current:t},[t,e]),r.current};function fZ(t,e,r,n){return t.getFixedT(e,r,n)}function YBe(t,e,r,n){return(0,io.useCallback)(fZ(t,e,r,n),[t,e,r,n])}function lt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{i18n:r}=e,{i18n:n,defaultNS:i}=(0,io.useContext)(qc)||{},o=r||n||uu();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new DA),!o){Ah("You will need to pass in an i18next instance by using initReactI18next");let P=(j,G)=>typeof G=="string"?G:G&&typeof G=="object"&&typeof G.defaultValue=="string"?G.defaultValue:Array.isArray(j)?j[j.length-1]:j,k=[P,{},!1];return k.t=P,k.i18n={},k.ready=!1,k}o.options.react&&o.options.react.wait!==void 0&&Ah("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");let s={...Ch(),...o.options.react,...e},{useSuspense:a,keyPrefix:c}=s,p=t||i||o.options&&o.options.defaultNS;p=typeof p=="string"?[p]:p||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(p);let d=(o.isInitialized||o.initializedStoreOnce)&&p.every(P=>sZ(P,o,s)),h=YBe(o,e.lng||null,s.nsMode==="fallback"?p:p[0],c),m=()=>h,y=()=>fZ(o,e.lng||null,s.nsMode==="fallback"?p:p[0],c),[S,T]=(0,io.useState)(m),x=p.join();e.lng&&(x=`${e.lng}${x}`);let O=zBe(x),N=(0,io.useRef)(!0);(0,io.useEffect)(()=>{let{bindI18n:P,bindI18nStore:k}=s;N.current=!0,!d&&!a&&(e.lng?aF(o,e.lng,p,()=>{N.current&&T(y)}):sF(o,p,()=>{N.current&&T(y)})),d&&O&&O!==x&&N.current&&T(y);function j(){N.current&&T(y)}return P&&o&&o.on(P,j),k&&o&&o.store.on(k,j),()=>{N.current=!1,P&&o&&P.split(" ").forEach(G=>o.off(G,j)),k&&o&&k.split(" ").forEach(G=>o.store.off(G,j))}},[o,x]),(0,io.useEffect)(()=>{N.current&&d&&T(m)},[o,c,d]);let I=[S,o,d];if(I.t=S,I.i18n=o,I.ready=d,d||!d&&!a)return I;throw new Promise(P=>{e.lng?aF(o,e.lng,p,()=>P()):sF(o,p,()=>P())})}u();var pZ=F(ie(),1);u();u();var vA=F(ie(),1);function dF(t){let{i18n:e,defaultNS:r,children:n}=t,i=(0,vA.useMemo)(()=>({i18n:e,defaultNS:r}),[e,r]);return(0,vA.createElement)(qc.Provider,{value:i},n)}u();var QBe=F(ie(),1);u();var XBe=F(ie(),1);u();u();u();function dZ(t,e,r){function n(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!t||typeof t=="string"}for(var o=typeof e!="string"?[].concat(e):e.split(".");o.length>1;){if(i())return{};var s=n(o.shift());!t[s]&&r&&(t[s]=new r),t=t[s]}return i()?{}:{obj:t,k:n(o.shift())}}function hZ(t,e,r){var n=dZ(t,e,Object),i=n.obj,o=n.k;i[o]=r}function mZ(t,e){var r=dZ(t,e),n=r.obj,i=r.k;if(n)return n[i]}var gZ=[],eUe=gZ.forEach,tUe=gZ.slice;function _Z(t){return eUe.call(tUe.call(arguments,1),function(e){if(e)for(var r in e)t[r]===void 0&&(t[r]=e[r])}),t}u();u();Es();u();Es();u();var Tt;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Tt||(Tt={}));u();Es();u();var or;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(or||(or={}));var Wf;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(Wf||(Wf={}));function hF(t){return t.type===or.literal}function EZ(t){return t.type===or.argument}function SA(t){return t.type===or.number}function TA(t){return t.type===or.date}function AA(t){return t.type===or.time}function CA(t){return t.type===or.select}function xA(t){return t.type===or.plural}function yZ(t){return t.type===or.pound}function OA(t){return t.type===or.tag}function bA(t){return!!(t&&typeof t=="object"&&t.type===Wf.number)}function TE(t){return!!(t&&typeof t=="object"&&t.type===Wf.dateTime)}u();var mF=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;u();u();var nUe=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function DZ(t){var e={};return t.replace(nUe,function(r){var n=r.length;switch(r[0]){case"G":e.era=n===4?"long":n===5?"narrow":"short";break;case"y":e.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][n-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][n-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][n-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][n-1];break;case"s":e.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}u();Es();u();var vZ=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function CZ(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(vZ).filter(function(m){return m.length>0}),r=[],n=0,i=e;n<i.length;n++){var o=i[n],s=o.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],c=s.slice(1),p=0,d=c;p<d.length;p++){var h=d[p];if(h.length===0)throw new Error("Invalid number skeleton")}r.push({stem:a,options:c})}return r}function iUe(t){return t.replace(/^(.*?)-/,"")}var SZ=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,xZ=/^(@+)?(\+|#+)?[rs]?$/g,oUe=/(\*)(0+)|(#+)(0+)|(0+)/g,OZ=/^(0+)$/;function TZ(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(xZ,function(r,n,i){return typeof i!="string"?(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length):i==="+"?e.minimumSignificantDigits=n.length:n[0]==="#"?e.maximumSignificantDigits=n.length:(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),e}function bZ(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function sUe(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var r=t.slice(0,2);if(r==="+!"?(e.signDisplay="always",t=t.slice(2)):r==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!OZ.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function AZ(t){var e={},r=bZ(t);return r||e}function RZ(t){for(var e={},r=0,n=t;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=i.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=iUe(i.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=ft(ft(ft({},e),{notation:"scientific"}),i.options.reduce(function(c,p){return ft(ft({},c),AZ(p))},{}));continue;case"engineering":e=ft(ft(ft({},e),{notation:"engineering"}),i.options.reduce(function(c,p){return ft(ft({},c),AZ(p))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(oUe,function(c,p,d,h,m,y){if(p)e.minimumIntegerDigits=d.length;else{if(h&&m)throw new Error("We currently do not support maximum integer digits");if(y)throw new Error("We currently do not support exact integer digits")}return""});continue}if(OZ.test(i.stem)){e.minimumIntegerDigits=i.stem.length;continue}if(SZ.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(SZ,function(c,p,d,h,m,y){return d==="*"?e.minimumFractionDigits=p.length:h&&h[0]==="#"?e.maximumFractionDigits=h.length:m&&y?(e.minimumFractionDigits=m.length,e.maximumFractionDigits=m.length+y.length):(e.minimumFractionDigits=p.length,e.maximumFractionDigits=p.length),""});var o=i.options[0];o==="w"?e=ft(ft({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=ft(ft({},e),TZ(o)));continue}if(xZ.test(i.stem)){e=ft(ft({},e),TZ(i.stem));continue}var s=bZ(i.stem);s&&(e=ft(ft({},e),s));var a=sUe(i.stem);a&&(e=ft(ft({},e),a))}return e}u();u();var AE={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function IZ(t,e){for(var r="",n=0;n<t.length;n++){var i=t.charAt(n);if(i==="j"){for(var o=0;n+1<t.length&&t.charAt(n+1)===i;)o++,n++;var s=1+(o&1),a=o<2?1:3+(o>>1),c="a",p=aUe(e);for((p=="H"||p=="k")&&(a=0);a-- >0;)r+=c;for(;s-- >0;)r=p+r}else i==="J"?r+="H":r+=i}return r}function aUe(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=t.language,n;r!=="root"&&(n=t.maximize().region);var i=AE[n||""]||AE[r||""]||AE["".concat(r,"-001")]||AE["001"];return i[0]}var gF,uUe=new RegExp("^".concat(mF.source,"*")),cUe=new RegExp("".concat(mF.source,"*$"));function It(t,e){return{start:t,end:e}}var lUe=!!String.prototype.startsWith&&"_a".startsWith("a",1),fUe=!!String.fromCodePoint,pUe=!!Object.fromEntries,dUe=!!String.prototype.codePointAt,hUe=!!String.prototype.trimStart,mUe=!!String.prototype.trimEnd,gUe=!!Number.isSafeInteger,_Ue=gUe?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},EF=!0;try{wZ=LZ("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),EF=((gF=wZ.exec("a"))===null||gF===void 0?void 0:gF[0])==="a"}catch{EF=!1}var wZ,NZ=lUe?function(e,r,n){return e.startsWith(r,n)}:function(e,r,n){return e.slice(n,n+r.length)===r},yF=fUe?String.fromCodePoint:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];for(var n="",i=e.length,o=0,s;i>o;){if(s=e[o++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},PZ=pUe?Object.fromEntries:function(e){for(var r={},n=0,i=e;n<i.length;n++){var o=i[n],s=o[0],a=o[1];r[s]=a}return r},FZ=dUe?function(e,r){return e.codePointAt(r)}:function(e,r){var n=e.length;if(!(r<0||r>=n)){var i=e.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},EUe=hUe?function(e){return e.trimStart()}:function(e){return e.replace(uUe,"")},yUe=mUe?function(e){return e.trimEnd()}:function(e){return e.replace(cUe,"")};function LZ(t,e){return new RegExp(t,e)}var DF;EF?(_F=LZ("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),DF=function(e,r){var n;_F.lastIndex=r;var i=_F.exec(e);return(n=i[1])!==null&&n!==void 0?n:""}):DF=function(e,r){for(var n=[];;){var i=FZ(e,r);if(i===void 0||kZ(i)||SUe(i))break;n.push(i),r+=i>=65536?2:1}return yF.apply(void 0,n)};var _F,MZ=function(){function t(e,r){r===void 0&&(r={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(e,n);if(s.err)return s;i.push(s.val)}else{if(o===125&&e>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:or.pound,location:It(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(Tt.UNMATCHED_CLOSING_TAG,It(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&vF(this.peek()||0)){var s=this.parseTag(e,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(e,r);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},t.prototype.parseTag=function(e,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:or.literal,value:"<".concat(i,"/>"),location:It(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,r,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!vF(this.char()))return this.error(Tt.INVALID_TAG,It(a,this.clonePosition()));var c=this.clonePosition(),p=this.parseTagName();return i!==p?this.error(Tt.UNMATCHED_CLOSING_TAG,It(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:or.tag,value:i,children:s,location:It(n,this.clonePosition())},err:null}:this.error(Tt.INVALID_TAG,It(a,this.clonePosition())))}else return this.error(Tt.UNCLOSED_TAG,It(n,this.clonePosition()))}else return this.error(Tt.INVALID_TAG,It(n,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&vUe(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var s=this.tryParseUnquoted(e,r);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var c=It(n,this.clonePosition());return{val:{type:or.literal,value:i,location:c},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!DUe(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return yF.apply(void 0,r)},t.prototype.tryParseUnquoted=function(e,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&e>0?null:(this.bump(),yF(n))},t.prototype.parseArgument=function(e,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Tt.EXPECT_ARGUMENT_CLOSING_BRACE,It(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Tt.EMPTY_ARGUMENT,It(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Tt.MALFORMED_ARGUMENT,It(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Tt.EXPECT_ARGUMENT_CLOSING_BRACE,It(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:or.argument,value:i,location:It(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Tt.EXPECT_ARGUMENT_CLOSING_BRACE,It(n,this.clonePosition())):this.parseArgumentOptions(e,r,i,n);default:return this.error(Tt.MALFORMED_ARGUMENT,It(n,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),r=this.offset(),n=DF(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),s=It(e,o);return{value:n,location:s}},t.prototype.parseArgumentOptions=function(e,r,n,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(a){case"":return this.error(Tt.EXPECT_ARGUMENT_TYPE,It(s,c));case"number":case"date":case"time":{this.bumpSpace();var p=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var m=yUe(h.val);if(m.length===0)return this.error(Tt.EXPECT_ARGUMENT_STYLE,It(this.clonePosition(),this.clonePosition()));var y=It(d,this.clonePosition());p={style:m,styleLocation:y}}var S=this.tryParseArgumentClose(i);if(S.err)return S;var T=It(i,this.clonePosition());if(p&&NZ(p?.style,"::",0)){var x=EUe(p.style.slice(2));if(a==="number"){var h=this.parseNumberSkeletonFromString(x,p.styleLocation);return h.err?h:{val:{type:or.number,value:n,location:T,style:h.val},err:null}}else{if(x.length===0)return this.error(Tt.EXPECT_DATE_TIME_SKELETON,T);var O=x;this.locale&&(O=IZ(x,this.locale));var m={type:Wf.dateTime,pattern:O,location:p.styleLocation,parsedOptions:this.shouldParseSkeletons?DZ(O):{}},N=a==="date"?or.date:or.time;return{val:{type:N,value:n,location:T,style:m},err:null}}}return{val:{type:a==="number"?or.number:a==="date"?or.date:or.time,value:n,location:T,style:(o=p?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var I=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Tt.EXPECT_SELECT_ARGUMENT_OPTIONS,It(I,ft({},I)));this.bumpSpace();var P=this.parseIdentifierIfPossible(),k=0;if(a!=="select"&&P.value==="offset"){if(!this.bumpIf(":"))return this.error(Tt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,It(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(Tt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Tt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),P=this.parseIdentifierIfPossible(),k=h.val}var j=this.tryParsePluralOrSelectOptions(e,a,r,P);if(j.err)return j;var S=this.tryParseArgumentClose(i);if(S.err)return S;var G=It(i,this.clonePosition());return a==="select"?{val:{type:or.select,value:n,options:PZ(j.val),location:G},err:null}:{val:{type:or.plural,value:n,options:PZ(j.val),offset:k,pluralType:a==="plural"?"cardinal":"ordinal",location:G},err:null}}default:return this.error(Tt.INVALID_ARGUMENT_TYPE,It(s,c))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(Tt.EXPECT_ARGUMENT_CLOSING_BRACE,It(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Tt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,It(i,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(e,r){var n=[];try{n=CZ(e)}catch{return this.error(Tt.INVALID_NUMBER_SKELETON,r)}return{val:{type:Wf.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?RZ(n):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,r,n,i){for(var o,s=!1,a=[],c=new Set,p=i.value,d=i.location;;){if(p.length===0){var h=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(Tt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Tt.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;d=It(h,this.clonePosition()),p=this.message.slice(h.offset,this.offset())}else break}if(c.has(p))return this.error(r==="select"?Tt.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Tt.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);p==="other"&&(s=!0),this.bumpSpace();var y=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?Tt.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Tt.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,It(this.clonePosition(),this.clonePosition()));var S=this.parseMessage(e+1,r,n);if(S.err)return S;var T=this.tryParseArgumentClose(y);if(T.err)return T;a.push([p,{value:S.val,location:It(y,this.clonePosition())}]),c.add(p),this.bumpSpace(),o=this.parseIdentifierIfPossible(),p=o.value,d=o.location}return a.length===0?this.error(r==="select"?Tt.EXPECT_SELECT_ARGUMENT_SELECTOR:Tt.EXPECT_PLURAL_ARGUMENT_SELECTOR,It(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Tt.MISSING_OTHER_CLAUSE,It(this.clonePosition(),this.clonePosition())):{val:a,err:null}},t.prototype.tryParseDecimalInteger=function(e,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var c=It(i,this.clonePosition());return o?(s*=n,_Ue(s)?{val:s,err:null}:this.error(r,c)):this.error(e,c)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var r=FZ(this.message,e);if(r===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return r},t.prototype.error=function(e,r){return{val:null,err:{kind:e,message:this.message,location:r}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(NZ(this.message,e,this.offset())){for(var r=0;r<e.length;r++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var r=this.offset(),n=this.message.indexOf(e,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var r=this.offset();if(r===e)break;if(r>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&kZ(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(e>=65536?2:1));return n??null},t}();function vF(t){return t>=97&&t<=122||t>=65&&t<=90}function DUe(t){return vF(t)||t===47}function vUe(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function kZ(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function SUe(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function SF(t){t.forEach(function(e){if(delete e.location,CA(e)||xA(e))for(var r in e.options)delete e.options[r].location,SF(e.options[r].value);else SA(e)&&bA(e.style)||(TA(e)||AA(e))&&TE(e.style)?delete e.style.location:OA(e)&&SF(e.children)})}function BZ(t,e){e===void 0&&(e={}),e=ft({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var r=new MZ(t,e).parse();if(r.err){var n=SyntaxError(Tt[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return e?.captureLocation||SF(r.val),r.val}u();function RA(t,e){var r=e&&e.cache?e.cache:bUe,n=e&&e.serializer?e.serializer:OUe,i=e&&e.strategy?e.strategy:AUe;return i(t,{cache:r,serializer:n})}function TUe(t){return t==null||typeof t=="number"||typeof t=="boolean"}function UZ(t,e,r,n){var i=TUe(n)?n:r(n),o=e.get(i);return typeof o>"u"&&(o=t.call(this,n),e.set(i,o)),o}function HZ(t,e,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=e.get(i);return typeof o>"u"&&(o=t.apply(this,n),e.set(i,o)),o}function TF(t,e,r,n,i){return r.bind(e,t,n,i)}function AUe(t,e){var r=t.length===1?UZ:HZ;return TF(t,this,r,e.cache.create(),e.serializer)}function CUe(t,e){return TF(t,this,HZ,e.cache.create(),e.serializer)}function xUe(t,e){return TF(t,this,UZ,e.cache.create(),e.serializer)}var OUe=function(){return JSON.stringify(arguments)};function AF(){this.cache=Object.create(null)}AF.prototype.get=function(t){return this.cache[t]};AF.prototype.set=function(t,e){this.cache[t]=e};var bUe={create:function(){return new AF}},IA={variadic:CUe,monadic:xUe};u();u();Es();var $f;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})($f||($f={}));var CE=function(t){xf(e,t);function e(r,n,i){var o=t.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error);var CF=function(t){xf(e,t);function e(r,n,i,o){return t.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),$f.INVALID_VALUE,o)||this}return e}(CE);var qZ=function(t){xf(e,t);function e(r,n,i){return t.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),$f.INVALID_VALUE,i)||this}return e}(CE);var jZ=function(t){xf(e,t);function e(r,n){return t.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),$f.MISSING_VALUE,n)||this}return e}(CE);var Jn;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(Jn||(Jn={}));function RUe(t){return t.length<2?t:t.reduce(function(e,r){var n=e[e.length-1];return!n||n.type!==Jn.literal||r.type!==Jn.literal?e.push(r):n.value+=r.value,e},[])}function IUe(t){return typeof t=="function"}function xE(t,e,r,n,i,o,s){if(t.length===1&&hF(t[0]))return[{type:Jn.literal,value:t[0].value}];for(var a=[],c=0,p=t;c<p.length;c++){var d=p[c];if(hF(d)){a.push({type:Jn.literal,value:d.value});continue}if(yZ(d)){typeof o=="number"&&a.push({type:Jn.literal,value:r.getNumberFormat(e).format(o)});continue}var h=d.value;if(!(i&&h in i))throw new jZ(h,s);var m=i[h];if(EZ(d)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),a.push({type:typeof m=="string"?Jn.literal:Jn.object,value:m});continue}if(TA(d)){var y=typeof d.style=="string"?n.date[d.style]:TE(d.style)?d.style.parsedOptions:void 0;a.push({type:Jn.literal,value:r.getDateTimeFormat(e,y).format(m)});continue}if(AA(d)){var y=typeof d.style=="string"?n.time[d.style]:TE(d.style)?d.style.parsedOptions:n.time.medium;a.push({type:Jn.literal,value:r.getDateTimeFormat(e,y).format(m)});continue}if(SA(d)){var y=typeof d.style=="string"?n.number[d.style]:bA(d.style)?d.style.parsedOptions:void 0;y&&y.scale&&(m=m*(y.scale||1)),a.push({type:Jn.literal,value:r.getNumberFormat(e,y).format(m)});continue}if(OA(d)){var S=d.children,T=d.value,x=i[T];if(!IUe(x))throw new qZ(T,"function",s);var O=xE(S,e,r,n,i,o),N=x(O.map(function(k){return k.value}));Array.isArray(N)||(N=[N]),a.push.apply(a,N.map(function(k){return{type:typeof k=="string"?Jn.literal:Jn.object,value:k}}))}if(CA(d)){var I=d.options[m]||d.options.other;if(!I)throw new CF(d.value,m,Object.keys(d.options),s);a.push.apply(a,xE(I.value,e,r,n,i));continue}if(xA(d)){var I=d.options["=".concat(m)];if(!I){if(!Intl.PluralRules)throw new CE(`Intl.PluralRules is not available in this environment.
172
+ `)r.name="enter";else if(t===" ")r.name="tab";else if(t==="\b"||t==="\x1B\b")r.name="backspace",r.meta=t.charAt(0)==="\x1B";else if(t==="\x7F"||t==="\x1B\x7F")r.name="delete",r.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")r.name="escape",r.meta=t.length===2;else if(t===" "||t==="\x1B ")r.name="space",r.meta=t.length===2;else if(t<="")r.name=String.fromCharCode(t.charCodeAt(0)+97-1),r.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")r.name="number";else if(t.length===1&&t>="a"&&t<="z")r.name=t;else if(t.length===1&&t>="A"&&t<="Z")r.name=t.toLowerCase(),r.shift=!0;else if(e=cRe.exec(t))r.meta=!0,r.shift=/^[A-Z]$/.test(e[1]);else if(e=lRe.exec(t)){let n=[...t];n[0]==="\x1B"&&n[1]==="\x1B"&&(r.option=!0);let i=[e[1],e[2],e[4],e[6]].filter(Boolean).join(""),o=(e[3]||e[5]||1)-1;r.ctrl=!!(o&4),r.meta=!!(o&10),r.shift=!!(o&1),r.code=i,r.name=VW[i],r.shift=fRe(i)||r.shift,r.ctrl=pRe(i)||r.ctrl}return r},$W=dRe;u();var zW=F(ie(),1);var hRe=()=>(0,zW.useContext)(OS),LS=hRe;var mRe=(t,e={})=>{let{stdin:r,setRawMode:n,internal_exitOnCtrlC:i}=LS();(0,ew.useEffect)(()=>{if(e.isActive!==!1)return n(!0),()=>{n(!1)}},[e.isActive,n]),(0,ew.useEffect)(()=>{if(e.isActive===!1)return;let o=s=>{let a=$W(s),c={upArrow:a.name==="up",downArrow:a.name==="down",leftArrow:a.name==="left",rightArrow:a.name==="right",pageDown:a.name==="pagedown",pageUp:a.name==="pageup",return:a.name==="return",escape:a.name==="escape",ctrl:a.ctrl,shift:a.shift,tab:a.name==="tab",backspace:a.name==="backspace",delete:a.name==="delete",meta:a.meta||a.name==="escape"||a.option},p=a.ctrl?a.name:a.sequence;WW.includes(a.name)&&(p=""),p.startsWith("\x1B")&&(p=p.slice(1)),p.length===1&&typeof p[0]=="string"&&GW(p[0])&&(c.shift=!0),(!(p==="c"&&c.ctrl)||!i)&&t(p,c)};return r?.on("data",o),()=>{r?.off("data",o)}},[e.isActive,r,i,t])},Co=mRe;u();var YW=F(ie(),1);var gRe=()=>(0,YW.useContext)(xS),tw=gRe;u();var _Re=F(ie(),1);u();var ERe=F(ie(),1);u();var rw=F(ie(),1);u();var yRe=F(ie(),1);u();u();u();var $s=F(ie(),1);u();var hd=F(ie(),1);u();var KW=F(ie(),1);u();u();import ds from"node:process";function nn(){return ds.platform!=="win32"?ds.env.TERM!=="linux":!!ds.env.CI||!!ds.env.WT_SESSION||!!ds.env.TERMINUS_SUBLIME||ds.env.ConEmuTask==="{cmd::Cmder}"||ds.env.TERM_PROGRAM==="Terminus-Sublime"||ds.env.TERM_PROGRAM==="vscode"||ds.env.TERM==="xterm-256color"||ds.env.TERM==="alacritty"||ds.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var MS=nn()?"\u25CF":"*";var a_=(0,KW.createContext)({marker:MS});function XW({children:t,marker:e,...r}){let{marker:n}=(0,hd.useContext)(a_);return typeof e<"u"&&(n=e),hd.default.createElement(ke,{gap:1},n&&hd.default.createElement(Ut,null,n),hd.default.createElement(ke,{flexDirection:"column",...r},t))}u();var JW=F(ie(),1),nw=(0,JW.createContext)({depth:0});function nc({children:t,marker:e,...r}){let{depth:n}=(0,$s.useContext)(nw),{marker:i}=(0,$s.useContext)(a_),o=(0,$s.useMemo)(()=>({depth:n+1}),[n]),s=(0,$s.useMemo)(()=>typeof e=="string"?{marker:e}:typeof i=="string"?{marker:i}:{marker:MS},[i,e]);return $s.default.createElement(nw.Provider,{value:o},$s.default.createElement(a_.Provider,{value:s},$s.default.createElement(ke,{...r,flexDirection:"column",marginLeft:n*2},t)))}nc.Item=XW;u();u();var zs=F(ie(),1),Sw=F(tt(),1);u();var D5=F(ie(),1);var bIe={standard:{},secondary:{color:"gray"},success:{color:"green"},info:{color:"cyan"},error:{color:"red"},warning:{color:"yellow"},code:{color:"yellowBright"},legacyBlue:{color:"blueBright"}},Q=({children:t,skin:e="standard",bold:r,underline:n,strikethrough:i})=>D5.default.createElement(Ut,{...bIe[e],bold:r,underline:n,strikethrough:i},t);u();var XS=F(tt(),1),Pi=(0,XS.variant)((0,XS.onTerms)(({T:t})=>({NotSubmitted:e=>({value:e}),Submitted:e=>({value:e})})));u();var hs=F(ie(),1),f_=F(tt(),1);u();u();var v5=F(ie(),1);var gw=()=>v5.default.createElement(Q,null,nn()?"\u2026":"...");u();var S5=F(ie(),1);var _w=()=>S5.default.createElement(Q,null,nn()?"\u2716":"\xD7");u();var T5=F(ie(),1);var Ew=()=>T5.default.createElement(Q,null,nn()?"\u276F":">");u();var A5=F(ie(),1);var u_=()=>A5.default.createElement(Q,null,nn()?"\u203A":"\xBB");u();var C5=F(ie(),1);var yw=()=>C5.default.createElement(Q,null,"?");u();var x5=F(ie(),1);var c_=()=>x5.default.createElement(Q,null,nn()?"\u2714":"\u221A");u();var O5=F(ie(),1);var Dw=()=>O5.default.createElement(Q,null,nn()?"\u26A0":"\u203C");u();var b5=F(ie(),1);var l_=()=>b5.default.createElement(Q,null,nn()?"\u{1F4A1}":"!");var _d=({children:t,inputState:e})=>{let{icon:r,separator:n}=(0,f_.match)(e,{NotSubmitted:(0,f_.constant)({icon:hs.default.createElement(Q,{skin:"info"},hs.default.createElement(yw,null)),separator:hs.default.createElement(Q,{skin:"secondary"},hs.default.createElement(u_,null))}),Submitted:(0,f_.constant)({icon:hs.default.createElement(Q,{skin:"success"},hs.default.createElement(c_,null)),separator:hs.default.createElement(Q,{skin:"secondary"},hs.default.createElement(gw,null))})});return hs.default.createElement(Q,null,r," ",hs.default.createElement(Q,{bold:!0},t)," ",n)};u();var vw=F(ie(),1),R5=F(tt(),1);var I5=({inputState:t})=>(0,R5.match)(t,{NotSubmitted:({value:e})=>vw.default.createElement(Q,{skin:"secondary"},"(",e?"Y/n":"y/N",")"),Submitted:({value:e})=>vw.default.createElement(Q,null,e?"Yes":"No")});u();var ZS=F(ie(),1);u();var Ed=F(ie(),1);function RIe({value:t,placeholder:e="",focus:r=!0,mask:n,highlightPastedText:i=!1,showCursor:o=!0,onChange:s,onSubmit:a}){let[c,p]=(0,Ed.useState)({cursorOffset:(t||"").length,cursorWidth:0}),{cursorOffset:d,cursorWidth:h}=c;(0,Ed.useEffect)(()=>{p(x=>{if(!r||!o)return x;let O=t||"";return x.cursorOffset>O.length-1?{cursorOffset:O.length,cursorWidth:0}:x})},[t,r,o]);let m=i?h:0,y=n?n.repeat(t.length):t,S=y,T=e?nr.grey(e):void 0;if(o&&r){T=e.length>0?nr.inverse(e[0])+nr.grey(e.slice(1)):nr.inverse(" "),S=y.length>0?"":nr.inverse(" ");let x=0;for(let O of y)S+=x>=d-m&&x<=d?nr.inverse(O):O,x++;y.length>0&&d===y.length&&(S+=nr.inverse(" "))}return Co((x,O)=>{if(O.upArrow||O.downArrow||O.ctrl&&x==="c"||O.tab||O.shift&&O.tab)return;if(O.return){a&&a(t);return}let N=d,I=t,P=0;O.leftArrow?o&&N--:O.rightArrow?o&&N++:O.backspace||O.delete?d>0&&(I=t.slice(0,d-1)+t.slice(d,t.length),N--):(I=t.slice(0,d)+x+t.slice(d,t.length),N+=x.length,x.length>1&&(P=x.length)),d<0&&(N=0),d>t.length&&(N=t.length),p({cursorOffset:N,cursorWidth:P}),I!==t&&s(I)},{isActive:r}),Ed.default.createElement(Ut,null,e?y.length>0?S:T:S)}var JS=RIe;var w5=({initialValue:t,onSubmit:e})=>{let r=(0,ZS.useCallback)(n=>{let i=n.toLowerCase();["y","n"].includes(i)&&e(i==="y")},[e]);return ZS.default.createElement(JS,{value:"",showCursor:!1,onChange:r,onSubmit:()=>e(t)})};var p_=({label:t,info:e,initialValue:r=!0,onSubmit:n})=>{let[i,o]=(0,zs.useState)(()=>Pi.NotSubmitted(r)),s=(0,zs.useCallback)(a=>{o(Pi.Submitted(a)),n(a)},[n]);return zs.default.createElement(Q,null,zs.default.createElement(_d,{inputState:i},t)," ",e&&(0,Sw.isType)(i,Pi.NotSubmitted)&&zs.default.createElement(Q,{skin:"secondary"},e," "),zs.default.createElement(I5,{inputState:i}),(0,Sw.isType)(i,Pi.NotSubmitted)&&zs.default.createElement(w5,{initialValue:r,onSubmit:s}))};u();u();var pi=F(ie(),1),h0=F(tt(),1);u();u();var QS=F(ie(),1);u();import IIe from"node:process";u();var{platform:wIe}=IIe,N5={square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},NIe={...N5,...wIe==="linux"?{circleQuestionMark:"?\u20DD",questionMarkPrefix:"?\u20DD"}:{circleQuestionMark:"?",questionMarkPrefix:"?"},tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},PIe={...N5,tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",circleQuestionMark:"(?)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",questionMarkPrefix:"\uFF1F",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},FIe=nn(),LIe=FIe?NIe:PIe,P5=LIe;function MIe({isSelected:t=!1}){return QS.default.createElement(ke,{marginRight:1},t?QS.default.createElement(Ut,{color:"blue"},P5.pointer):QS.default.createElement(Ut,null," "))}var Tw=MIe;u();var F5=F(ie(),1);function kIe({isSelected:t=!1,label:e}){return F5.createElement(Ut,{color:t?"blue":void 0},e)}var Aw=kIe;u();var E_=F(ie(),1),Ba=F(ie(),1),E$=F(m$(),1),y_=F(_$(),1);function hNe({items:t=[],isFocused:e=!0,initialIndex:r=0,indicatorComponent:n=Tw,itemComponent:i=Aw,limit:o,onSelect:s,onHighlight:a}){let c=typeof o=="number"&&t.length>o,p=c?Math.min(o,t.length):t.length,d=p-1,[h,m]=(0,Ba.useState)(r>d?d-r:0),[y,S]=(0,Ba.useState)(r?r>d?d:r:0),T=(0,Ba.useRef)(t);(0,Ba.useEffect)(()=>{(0,E$.default)(T.current.map(O=>O.value),t.map(O=>O.value))||(m(0),S(0)),T.current=t},[t]),Co((0,Ba.useCallback)((O,N)=>{if(O==="k"||N.upArrow){let I=(c?p:t.length)-1,P=y===0,k=c?y:I,j=P?h+1:h,G=P?k:y-1;m(j),S(G);let oe=c?(0,y_.default)(t,j).slice(0,p):t;typeof a=="function"&&a(oe[G])}if(O==="j"||N.downArrow){let I=y===(c?p:t.length)-1,P=c?y:0,k=I?h-1:h,j=I?P:y+1;m(k),S(j);let G=c?(0,y_.default)(t,k).slice(0,p):t;typeof a=="function"&&a(G[j])}if(N.return){let I=c?(0,y_.default)(t,h).slice(0,p):t;typeof s=="function"&&s(I[y])}},[c,p,h,y,t,s,a]),{isActive:e});let x=c?(0,y_.default)(t,h).slice(0,p):t;return E_.default.createElement(ke,{flexDirection:"column"},x.map((O,N)=>{let I=N===y;return E_.default.createElement(ke,{key:O.key??O.value},E_.default.createElement(n,{isSelected:I}),E_.default.createElement(i,{...O,isSelected:I}))}))}var Mw=hNe;u();var f0=F(ie(),1);var y$=({isSelected:t})=>f0.default.createElement(ke,{width:4},t&&f0.default.createElement(Q,{skin:"info"},f0.default.createElement(Ew,null)));u();var of=F(ie(),1);var d0=F(tt(),1);u();var p0=F(tt(),1),fi=(0,p0.variant)({Enabled:{},Disabled:(0,p0.fields)()});function D$({isSelected:t,label:e,value:{description:r,availability:n=fi.Enabled()}}){let i=(0,d0.isType)(n,fi.Disabled);return of.default.createElement(ke,null,of.default.createElement(Q,{skin:i?"secondary":t?"info":"standard",underline:t,strikethrough:!t&&i},e),t&&(0,d0.match)(n,{Disabled:({reason:o})=>of.default.createElement(ke,{marginLeft:1},of.default.createElement(Q,{skin:"warning"},"- disabled",o&&` (${o})`)),Enabled:()=>r&&of.default.createElement(ke,{marginLeft:1},of.default.createElement(Q,{skin:"secondary"},"- ",r))}))}u();var v$=F(ie(),1),S$=F(tt(),1);function T$({inputState:t}){return(0,S$.match)(t,{NotSubmitted:()=>null,Submitted:({value:e})=>v$.default.createElement(Q,null,e.title)})}function Ua({label:t,info:e,options:r,onSubmit:n,limit:i=10}){if(!r.length)throw new Error("SelectInput: options cannot be empty");let[o,s]=(0,pi.useState)(()=>Pi.NotSubmitted()),a=(0,pi.useCallback)(({value:d})=>{s(Pi.NotSubmitted(d))},[]),c=(0,pi.useCallback)(({value:d})=>{(0,h0.isType)(d.availability,fi.Disabled)||(s(Pi.Submitted(d)),n(d))},[n]),p=(0,pi.useMemo)(()=>r.map(d=>({key:typeof d.value=="string"?d.value:d.key,label:d.title,value:d})),[r]);return pi.default.createElement(pi.default.Fragment,null,pi.default.createElement(Q,null,pi.default.createElement(_d,{inputState:o},t)," ",e&&(0,h0.isType)(o,Pi.NotSubmitted)&&pi.default.createElement(Q,{skin:"secondary"},e),pi.default.createElement(T$,{inputState:o})),(0,h0.isType)(o,Pi.NotSubmitted)&&pi.default.createElement(Mw,{items:p,limit:i,itemComponent:D$,indicatorComponent:y$,onSelect:c,onHighlight:a}))}u();var m0=F(ie(),1);var A$=({onSubmit:t,onChange:e,placeholder:r,showCursor:n})=>{let[i,o]=(0,m0.useState)("");return m0.default.createElement(JS,{showCursor:n,placeholder:r,value:i,onChange:s=>{o(s),e?.(s)},onSubmit:()=>{t?.(!i&&r?r:i)}})};u();u();var In=F(ie(),1);var C$=F(tt(),1);var sf=({label:t,placeholder:e,onSubmit:r,validate:n=()=>!0})=>{let[i,o]=(0,In.useState)(()=>Pi.NotSubmitted(e)),[s,a]=(0,In.useState)(!1),[c,p]=(0,In.useState)(),d=(0,In.useCallback)(async m=>{a(!1);let y=await n(m);y!==!0?p(y):(p(void 0),o(Pi.Submitted(m)),r(m))},[r,n]),h=!!(c&&!s);return In.default.createElement(In.default.Fragment,null,In.default.createElement(ke,{columnGap:1},In.default.createElement(_d,{inputState:i},t),(0,C$.match)(i,{NotSubmitted:({value:m})=>In.default.createElement(Q,{skin:h?"error":"standard"},In.default.createElement(A$,{placeholder:m,onSubmit:d,onChange:()=>a(!0),showCursor:h})),Submitted:({value:m})=>In.default.createElement(Q,null,m)})),c&&In.default.createElement(ke,{columnGap:1},In.default.createElement(u_,null),In.default.createElement(Q,{skin:"error"},c)))};u();var Ha=F(ie(),1),af=F(tt(),1);var qa=({type:t,children:e})=>{let r=(0,af.match)(t,{error:(0,af.constant)(Ha.default.createElement(Q,{skin:"error"},Ha.default.createElement(_w,null))),warning:(0,af.constant)(Ha.default.createElement(Q,{skin:"warning"},Ha.default.createElement(Dw,null))),success:(0,af.constant)(Ha.default.createElement(Q,{skin:"success"},Ha.default.createElement(c_,null))),insight:(0,af.constant)(Ha.default.createElement(l_,null))});return Ha.default.createElement(Q,null,r," ",e)};u();var x$=F(ie(),1);var Sd=({value:t})=>x$.default.createElement(Ut,{inverse:!0}," ",t," ");u();var E0=F(ie(),1);u();u();var qt="\x1B[",D_="\x1B]",Td="\x07",g0=";",O$=process.env.TERM_PROGRAM==="Apple_Terminal",xt={};xt.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?qt+(t+1)+"G":qt+(e+1)+";"+(t+1)+"H"};xt.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let r="";return t<0?r+=qt+-t+"D":t>0&&(r+=qt+t+"C"),e<0?r+=qt+-e+"A":e>0&&(r+=qt+e+"B"),r};xt.cursorUp=(t=1)=>qt+t+"A";xt.cursorDown=(t=1)=>qt+t+"B";xt.cursorForward=(t=1)=>qt+t+"C";xt.cursorBackward=(t=1)=>qt+t+"D";xt.cursorLeft=qt+"G";xt.cursorSavePosition=O$?"\x1B7":qt+"s";xt.cursorRestorePosition=O$?"\x1B8":qt+"u";xt.cursorGetPosition=qt+"6n";xt.cursorNextLine=qt+"E";xt.cursorPrevLine=qt+"F";xt.cursorHide=qt+"?25l";xt.cursorShow=qt+"?25h";xt.eraseLines=t=>{let e="";for(let r=0;r<t;r++)e+=xt.eraseLine+(r<t-1?xt.cursorUp():"");return t&&(e+=xt.cursorLeft),e};xt.eraseEndLine=qt+"K";xt.eraseStartLine=qt+"1K";xt.eraseLine=qt+"2K";xt.eraseDown=qt+"J";xt.eraseUp=qt+"1J";xt.eraseScreen=qt+"2J";xt.scrollUp=qt+"S";xt.scrollDown=qt+"T";xt.clearScreen="\x1Bc";xt.clearTerminal=process.platform==="win32"?`${xt.eraseScreen}${qt}0f`:`${xt.eraseScreen}${qt}3J${qt}H`;xt.beep=Td;xt.link=(t,e)=>[D_,"8",g0,g0,e,Td,t,D_,"8",g0,g0,Td].join("");xt.image=(t,e={})=>{let r=`${D_}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+t.toString("base64")+Td};xt.iTerm={setCwd:(t=process.cwd())=>`${D_}50;CurrentDir=${t}${Td}`,annotation:(t,e={})=>{let r=`${D_}1337;`,n=typeof e.x<"u",i=typeof e.y<"u";if((n||i)&&!(n&&i&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),r+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?r+=(n?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):r+=t,r+Td}};var b$=xt;var _0=F(F$(),1);function uf(t,e,{target:r="stdout",...n}={}){return _0.default[r]?b$.link(t,e):n.fallback===!1?t:typeof n.fallback=="function"?n.fallback(t,e):`${t} (\u200B${e}\u200B)`}uf.isSupported=_0.default.stdout;uf.stderr=(t,e,r={})=>uf(t,e,{target:"stderr",...r});uf.stderr.isSupported=_0.default.stderr;var Dn=({children:t,url:e,transform:r=n=>n})=>t?E0.default.createElement(FS,{transform:n=>r(uf(n,e,{fallback:!0}))},E0.default.createElement(Q,null,t)):E0.default.createElement(Q,{skin:"legacyBlue"},e);u();var v_=F(ie(),1);u();var Cd=F(ie(),1);var U$=F(B$(),1);function yNe({type:t="dots"}){let[e,r]=(0,Cd.useState)(0),n=U$.default[t];return(0,Cd.useEffect)(()=>{let i=setInterval(()=>{r(o=>o===n.frames.length-1?0:o+1)},n.interval);return()=>{clearInterval(i)}},[n]),Cd.default.createElement(Ut,null,n.frames[e])}var H$=yNe;var Gr=({text:t})=>{let e=v_.default.createElement(Q,{skin:"info"},v_.default.createElement(H$,{type:"dots"}));return t?v_.default.createElement(ke,{gap:1},e,typeof t=="string"?v_.default.createElement(Q,null,t):t):e};u();var q$=F(ie(),1);function dc(){let{exit:t}=tw();return(0,q$.useCallback)(e=>{e instanceof Error?t(e):e!==void 0?t(new Error(JSON.stringify(e))):t()},[t])}u();var ja=F(tt(),1);u();var wr=F(ie());function xd(){return xd=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xd.apply(this,arguments)}var WEt=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator",$Et=typeof Symbol<"u"?Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")):"@@asyncIterator";var DNe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?wr.useLayoutEffect:wr.useEffect,vNe=function(e){var r=(0,wr.useRef)(e);return DNe(function(){r.current=e}),(0,wr.useCallback)(function(){return r.current},[r])},SNe={status:"not-requested",loading:!1,result:void 0,error:void 0},G$={status:"loading",loading:!0,result:void 0,error:void 0},TNe=function(e){return G$},ANe=function(e,r){return{status:"success",loading:!1,result:e,error:void 0}},CNe=function(e,r){return{status:"error",loading:!1,result:void 0,error:e}},j$=function(){},xNe={initialState:function(e){return e&&e.executeOnMount?G$:SNe},executeOnMount:!0,executeOnUpdate:!0,setLoading:TNe,setResult:ANe,setError:CNe,onSuccess:j$,onError:j$},ONe=function(e){return xd({},xNe,{},e)},bNe=function(e){var r=(0,wr.useState)(function(){return e.initialState(e)}),n=r[0],i=r[1],o=(0,wr.useCallback)(function(){return i(e.initialState(e))},[i,e]),s=(0,wr.useCallback)(function(){return i(e.setLoading(n))},[n,i]),a=(0,wr.useCallback)(function(d){return i(e.setResult(d,n))},[n,i]),c=(0,wr.useCallback)(function(d){return i(e.setError(d,n))},[n,i]),p=(0,wr.useCallback)(function(d){return i(xd({},n,{},d))},[n,i]);return{value:n,set:i,merge:p,reset:o,setLoading:s,setResult:a,setError:c}},RNe=function(){var e=(0,wr.useRef)(!1);return(0,wr.useEffect)(function(){return e.current=!0,function(){e.current=!1}},[]),function(){return e.current}},INe=function(){var e=(0,wr.useRef)(null);return{set:function(n){return e.current=n},get:function(){return e.current},is:function(n){return e.current===n}}},V$=function(e,r,n){!r&&(r=[]);var i=ONe(n),o=(0,wr.useState)(null),s=o[0],a=o[1],c=bNe(i),p=RNe(),d=INe(),h=function(O){return p()&&d.is(O)},m=function(){for(var O=arguments.length,N=new Array(O),I=0;I<O;I++)N[I]=arguments[I];var P=function(){try{return Promise.resolve(e.apply(void 0,N))}catch(k){return Promise.reject(k)}}();return a(N),d.set(P),c.setLoading(),P.then(function(k){h(P)&&c.setResult(k),i.onSuccess(k,{isCurrent:function(){return d.is(P)}})},function(k){h(P)&&c.setError(k),i.onError(k,{isCurrent:function(){return d.is(P)}})}),P},y=vNe(m),S=(0,wr.useCallback)(function(){return y().apply(void 0,arguments)},[y]),T=!p();return(0,wr.useEffect)(function(){var x=function(){return y().apply(void 0,r)};T&&i.executeOnMount&&x(),!T&&i.executeOnUpdate&&x()},r),xd({},c.value,{set:c.set,merge:c.merge,reset:c.reset,execute:S,currentPromise:d.get(),currentParams:s})};function W$(t,e,r){return V$(t,e,r)}var $$=function(e,r){return V$(e,[],xd({},r,{executeOnMount:!1,executeOnUpdate:!1}))};var Od=F(ie(),1);var S_=(0,ja.variant)((0,ja.onTerms)(({T:t})=>({Error:e=>({error:e}),Success:e=>({result:e}),Loading:()=>({})}))),T_=(0,ja.variant)((0,ja.onTerms)(({T:t})=>({Error:e=>({error:e}),Success:e=>({result:e}),Loading:()=>({}),NotRequested:()=>({})}))),wn=(t,e,r)=>{let n=dc(),i=(0,Od.useMemo)(()=>new AbortController,[]),{result:o,error:s,status:a,merge:c}=W$(t.bind(null,{signal:i.signal}),e,{onError:p=>n(p),...r??{}});return(0,Od.useEffect)(()=>()=>{i.abort()},[i]),(0,ja.match)(a,{error:()=>({status:S_.Error(s??new Error("Unexpected error state in useAsync")),merge:c}),"not-requested":()=>({status:S_.Loading(),merge:c}),loading:()=>({status:S_.Loading(),merge:c}),success:()=>({status:S_.Success(o),merge:c})})},ms=(t,e)=>{let r=dc(),n=(0,Od.useMemo)(()=>new AbortController,[]),{result:i,error:o,status:s,merge:a,execute:c}=$$(t.bind(null,{signal:n.signal}),{onError:p=>r(p),...e??{}});return(0,Od.useEffect)(()=>()=>{n.abort()},[n]),(0,ja.match)(s,{error:()=>({status:T_.Error(o??new Error("Unexpected error state in useAsyncCallback")),merge:a,execute:c}),"not-requested":()=>({status:T_.NotRequested(),merge:a,execute:c}),loading:()=>({status:T_.Loading(),merge:a,execute:c}),success:()=>({status:T_.Success(i),merge:a,execute:c})})};u();var Js=F(ie(),1);u();var D0="WIX_CLI_TEST_OVERRIDES";u();import Md from"node:process";u();var bt;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let s of i)o[s]=s;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(let a of o)s[a]=i[a];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},t.find=(i,o)=>{for(let s of i)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(bt||(bt={}));var Gw;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Gw||(Gw={}));var we=bt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),hc=t=>{switch(typeof t){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(t)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(t)?we.array:t===null?we.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?we.promise:typeof Map<"u"&&t instanceof Map?we.map:typeof Set<"u"&&t instanceof Set?we.set:typeof Date<"u"&&t instanceof Date?we.date:we.object;default:return we.unknown}},ge=bt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),wNe=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Zi=class t extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let p=s.path[c];c===s.path.length-1?(a[p]=a[p]||{_errors:[]},a[p]._errors.push(r(s))):a[p]=a[p]||{_errors:[]},a=a[p],c++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,bt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Zi.create=t=>new Zi(t);var Id=(t,e)=>{let r;switch(t.code){case ge.invalid_type:t.received===we.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case ge.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,bt.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:r=`Unrecognized key(s) in object: ${bt.joinValues(t.keys,", ")}`;break;case ge.invalid_union:r="Invalid input";break;case ge.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${bt.joinValues(t.options)}`;break;case ge.invalid_enum_value:r=`Invalid enum value. Expected ${bt.joinValues(t.options)}, received '${t.received}'`;break;case ge.invalid_arguments:r="Invalid function arguments";break;case ge.invalid_return_type:r="Invalid function return type";break;case ge.invalid_date:r="Invalid date";break;case ge.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:bt.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case ge.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case ge.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case ge.custom:r="Invalid input";break;case ge.invalid_intersection_types:r="Intersection results could not be merged";break;case ge.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case ge.not_finite:r="Number must be finite";break;default:r=e.defaultError,bt.assertNever(t)}return{message:r}},K$=Id;function NNe(t){K$=t}function v0(){return K$}var S0=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="",c=n.filter(p=>!!p).slice().reverse();for(let p of c)a=p(s,{data:e,defaultError:a}).message;return{...i,path:o,message:a}},PNe=[];function be(t,e){let r=v0(),n=S0({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Id?void 0:Id].filter(i=>!!i)});t.common.issues.push(n)}var Wn=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return et;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,s=await i.value;n.push({key:o,value:s})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return et;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[o.value]=s.value)}return{status:e.value,value:n}}},et=Object.freeze({status:"aborted"}),Rd=t=>({status:"dirty",value:t}),di=t=>({status:"valid",value:t}),Vw=t=>t.status==="aborted",Ww=t=>t.status==="dirty",x_=t=>t.status==="valid",O_=t=>typeof Promise<"u"&&t instanceof Promise;function T0(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function X$(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}var We;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(We||(We={}));var A_,C_,bo=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},z$=(t,e)=>{if(x_(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Zi(t.common.issues);return this._error=r,this._error}}};function ut(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,a)=>{var c,p;let{message:d}=t;return s.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(c=d??n)!==null&&c!==void 0?c:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(p=d??r)!==null&&p!==void 0?p:a.defaultError}},description:i}}var ct=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return hc(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:hc(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Wn,ctx:{common:e.parent.common,data:e.data,parsedType:hc(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(O_(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:hc(e)},o=this._parseSync({data:e,path:i.path,parent:i});return z$(i,o)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:hc(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(O_(i)?i:Promise.resolve(i));return z$(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let s=e(i),a=()=>o.addIssue({code:ge.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Qi({schema:this,typeName:Je.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Oo.create(this,this._def)}nullable(){return Xs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wa.create(this,this._def)}promise(){return _c.create(this,this._def)}or(e){return mf.create([this,e],this._def)}and(e){return gf.create(this,e,this._def)}transform(e){return new Qi({...ut(this._def),schema:this,typeName:Je.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new vf({...ut(this._def),innerType:this,defaultValue:r,typeName:Je.ZodDefault})}brand(){return new b_({typeName:Je.ZodBranded,type:this,...ut(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Sf({...ut(this._def),innerType:this,catchValue:r,typeName:Je.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return R_.create(this,e)}readonly(){return Tf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},FNe=/^c[^\s-]{8,}$/i,LNe=/^[0-9a-z]+$/,MNe=/^[0-9A-HJKMNP-TV-Z]{26}$/,kNe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,BNe=/^[a-z0-9_-]{21}$/i,UNe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,HNe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,qNe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",jw,jNe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,GNe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,VNe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,J$="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",WNe=new RegExp(`^${J$}$`);function Z$(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function $Ne(t){return new RegExp(`^${Z$(t)}$`)}function Q$(t){let e=`${J$}T${Z$(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function zNe(t,e){return!!((e==="v4"||!e)&&jNe.test(t)||(e==="v6"||!e)&&GNe.test(t))}var mc=class t extends ct{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==we.string){let o=this._getOrReturnCtx(e);return be(o,{code:ge.invalid_type,expected:we.string,received:o.parsedType}),et}let n=new Wn,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),be(i,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),be(i,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(e,i),s?be(i,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&be(i,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")HNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"email",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")jw||(jw=new RegExp(qNe,"u")),jw.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"emoji",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")kNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"uuid",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")BNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"nanoid",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")FNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"cuid",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")LNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"cuid2",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")MNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"ulid",code:ge.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),be(i,{validation:"url",code:ge.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"regex",code:ge.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),be(i,{code:ge.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),be(i,{code:ge.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),be(i,{code:ge.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Q$(o).test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{code:ge.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?WNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{code:ge.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?$Ne(o).test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{code:ge.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?UNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"duration",code:ge.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?zNe(e.data,o.version)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"ip",code:ge.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?VNe.test(e.data)||(i=this._getOrReturnCtx(e,i),be(i,{validation:"base64",code:ge.invalid_string,message:o.message}),n.dirty()):bt.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:ge.invalid_string,...We.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...We.errToObj(e)})}url(e){return this._addCheck({kind:"url",...We.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...We.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...We.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...We.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...We.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...We.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...We.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...We.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...We.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...We.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...We.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...We.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...We.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...We.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...We.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...We.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...We.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...We.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...We.errToObj(r)})}nonempty(e){return this.min(1,We.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};mc.create=t=>{var e;return new mc({checks:[],typeName:Je.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...ut(t)})};function YNe(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(t.toFixed(i).replace(".","")),s=parseInt(e.toFixed(i).replace(".",""));return o%s/Math.pow(10,i)}var cf=class t extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==we.number){let o=this._getOrReturnCtx(e);return be(o,{code:ge.invalid_type,expected:we.number,received:o.parsedType}),et}let n,i=new Wn;for(let o of this._def.checks)o.kind==="int"?bt.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),be(n,{code:ge.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),be(n,{code:ge.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),be(n,{code:ge.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?YNe(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),be(n,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),be(n,{code:ge.not_finite,message:o.message}),i.dirty()):bt.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,We.toString(r))}gt(e,r){return this.setLimit("min",e,!1,We.toString(r))}lte(e,r){return this.setLimit("max",e,!0,We.toString(r))}lt(e,r){return this.setLimit("max",e,!1,We.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:We.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:We.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:We.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:We.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:We.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:We.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:We.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:We.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:We.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:We.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&bt.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};cf.create=t=>new cf({checks:[],typeName:Je.ZodNumber,coerce:t?.coerce||!1,...ut(t)});var lf=class t extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==we.bigint){let o=this._getOrReturnCtx(e);return be(o,{code:ge.invalid_type,expected:we.bigint,received:o.parsedType}),et}let n,i=new Wn;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),be(n,{code:ge.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),be(n,{code:ge.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),be(n,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):bt.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,We.toString(r))}gt(e,r){return this.setLimit("min",e,!1,We.toString(r))}lte(e,r){return this.setLimit("max",e,!0,We.toString(r))}lt(e,r){return this.setLimit("max",e,!1,We.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:We.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:We.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:We.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:We.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:We.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:We.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};lf.create=t=>{var e;return new lf({checks:[],typeName:Je.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...ut(t)})};var ff=class extends ct{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==we.boolean){let n=this._getOrReturnCtx(e);return be(n,{code:ge.invalid_type,expected:we.boolean,received:n.parsedType}),et}return di(e.data)}};ff.create=t=>new ff({typeName:Je.ZodBoolean,coerce:t?.coerce||!1,...ut(t)});var pf=class t extends ct{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==we.date){let o=this._getOrReturnCtx(e);return be(o,{code:ge.invalid_type,expected:we.date,received:o.parsedType}),et}if(isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return be(o,{code:ge.invalid_date}),et}let n=new Wn,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),be(i,{code:ge.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),be(i,{code:ge.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):bt.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:We.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:We.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};pf.create=t=>new pf({checks:[],coerce:t?.coerce||!1,typeName:Je.ZodDate,...ut(t)});var wd=class extends ct{_parse(e){if(this._getType(e)!==we.symbol){let n=this._getOrReturnCtx(e);return be(n,{code:ge.invalid_type,expected:we.symbol,received:n.parsedType}),et}return di(e.data)}};wd.create=t=>new wd({typeName:Je.ZodSymbol,...ut(t)});var df=class extends ct{_parse(e){if(this._getType(e)!==we.undefined){let n=this._getOrReturnCtx(e);return be(n,{code:ge.invalid_type,expected:we.undefined,received:n.parsedType}),et}return di(e.data)}};df.create=t=>new df({typeName:Je.ZodUndefined,...ut(t)});var hf=class extends ct{_parse(e){if(this._getType(e)!==we.null){let n=this._getOrReturnCtx(e);return be(n,{code:ge.invalid_type,expected:we.null,received:n.parsedType}),et}return di(e.data)}};hf.create=t=>new hf({typeName:Je.ZodNull,...ut(t)});var gc=class extends ct{constructor(){super(...arguments),this._any=!0}_parse(e){return di(e.data)}};gc.create=t=>new gc({typeName:Je.ZodAny,...ut(t)});var Va=class extends ct{constructor(){super(...arguments),this._unknown=!0}_parse(e){return di(e.data)}};Va.create=t=>new Va({typeName:Je.ZodUnknown,...ut(t)});var gs=class extends ct{_parse(e){let r=this._getOrReturnCtx(e);return be(r,{code:ge.invalid_type,expected:we.never,received:r.parsedType}),et}};gs.create=t=>new gs({typeName:Je.ZodNever,...ut(t)});var Nd=class extends ct{_parse(e){if(this._getType(e)!==we.undefined){let n=this._getOrReturnCtx(e);return be(n,{code:ge.invalid_type,expected:we.void,received:n.parsedType}),et}return di(e.data)}};Nd.create=t=>new Nd({typeName:Je.ZodVoid,...ut(t)});var Wa=class t extends ct{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==we.array)return be(r,{code:ge.invalid_type,expected:we.array,received:r.parsedType}),et;if(i.exactLength!==null){let s=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(s||a)&&(be(r,{code:s?ge.too_big:ge.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(be(r,{code:ge.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(be(r,{code:ge.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>i.type._parseAsync(new bo(r,s,r.path,a)))).then(s=>Wn.mergeArray(n,s));let o=[...r.data].map((s,a)=>i.type._parseSync(new bo(r,s,r.path,a)));return Wn.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:We.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:We.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:We.toString(r)}})}nonempty(e){return this.min(1,e)}};Wa.create=(t,e)=>new Wa({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Je.ZodArray,...ut(e)});function bd(t){if(t instanceof Fi){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Oo.create(bd(n))}return new Fi({...t._def,shape:()=>e})}else return t instanceof Wa?new Wa({...t._def,type:bd(t.element)}):t instanceof Oo?Oo.create(bd(t.unwrap())):t instanceof Xs?Xs.create(bd(t.unwrap())):t instanceof Ks?Ks.create(t.items.map(e=>bd(e))):t}var Fi=class t extends ct{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=bt.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==we.object){let p=this._getOrReturnCtx(e);return be(p,{code:ge.invalid_type,expected:we.object,received:p.parsedType}),et}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof gs&&this._def.unknownKeys==="strip"))for(let p in i.data)s.includes(p)||a.push(p);let c=[];for(let p of s){let d=o[p],h=i.data[p];c.push({key:{status:"valid",value:p},value:d._parse(new bo(i,h,i.path,p)),alwaysSet:p in i.data})}if(this._def.catchall instanceof gs){let p=this._def.unknownKeys;if(p==="passthrough")for(let d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(p==="strict")a.length>0&&(be(i,{code:ge.unrecognized_keys,keys:a}),n.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let p=this._def.catchall;for(let d of a){let h=i.data[d];c.push({key:{status:"valid",value:d},value:p._parse(new bo(i,h,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let p=[];for(let d of c){let h=await d.key,m=await d.value;p.push({key:h,value:m,alwaysSet:d.alwaysSet})}return p}).then(p=>Wn.mergeObjectSync(n,p)):Wn.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return We.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,o,s,a;let c=(s=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&s!==void 0?s:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=We.errToObj(e).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Je.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return bt.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return bt.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return bd(this)}partial(e){let r={};return bt.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return bt.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Oo;)o=o._def.innerType;r[n]=o}}),new t({...this._def,shape:()=>r})}keyof(){return e9(bt.objectKeys(this.shape))}};Fi.create=(t,e)=>new Fi({shape:()=>t,unknownKeys:"strip",catchall:gs.create(),typeName:Je.ZodObject,...ut(e)});Fi.strictCreate=(t,e)=>new Fi({shape:()=>t,unknownKeys:"strict",catchall:gs.create(),typeName:Je.ZodObject,...ut(e)});Fi.lazycreate=(t,e)=>new Fi({shape:t,unknownKeys:"strip",catchall:gs.create(),typeName:Je.ZodObject,...ut(e)});var mf=class extends ct{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(a=>new Zi(a.ctx.common.issues));return be(r,{code:ge.invalid_union,unionErrors:s}),et}if(r.common.async)return Promise.all(n.map(async o=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(i);{let o,s=[];for(let c of n){let p={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:p});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:p}),p.common.issues.length&&s.push(p.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(c=>new Zi(c));return be(r,{code:ge.invalid_union,unionErrors:a}),et}}get options(){return this._def.options}};mf.create=(t,e)=>new mf({options:t,typeName:Je.ZodUnion,...ut(e)});var Ga=t=>t instanceof _f?Ga(t.schema):t instanceof Qi?Ga(t.innerType()):t instanceof Ef?[t.value]:t instanceof yf?t.options:t instanceof Df?bt.objectValues(t.enum):t instanceof vf?Ga(t._def.innerType):t instanceof df?[void 0]:t instanceof hf?[null]:t instanceof Oo?[void 0,...Ga(t.unwrap())]:t instanceof Xs?[null,...Ga(t.unwrap())]:t instanceof b_||t instanceof Tf?Ga(t.unwrap()):t instanceof Sf?Ga(t._def.innerType):[],A0=class t extends ct{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==we.object)return be(r,{code:ge.invalid_type,expected:we.object,received:r.parsedType}),et;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(be(r,{code:ge.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),et)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let s=Ga(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,o)}}return new t({typeName:Je.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...ut(n)})}};function $w(t,e){let r=hc(t),n=hc(e);if(t===e)return{valid:!0,data:t};if(r===we.object&&n===we.object){let i=bt.objectKeys(e),o=bt.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(let a of o){let c=$w(t[a],e[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===we.array&&n===we.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let s=t[o],a=e[o],c=$w(s,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===we.date&&n===we.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var gf=class extends ct{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,s)=>{if(Vw(o)||Vw(s))return et;let a=$w(o.value,s.value);return a.valid?((Ww(o)||Ww(s))&&r.dirty(),{status:r.value,value:a.data}):(be(n,{code:ge.invalid_intersection_types}),et)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};gf.create=(t,e,r)=>new gf({left:t,right:e,typeName:Je.ZodIntersection,...ut(r)});var Ks=class t extends ct{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==we.array)return be(n,{code:ge.invalid_type,expected:we.array,received:n.parsedType}),et;if(n.data.length<this._def.items.length)return be(n,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),et;!this._def.rest&&n.data.length>this._def.items.length&&(be(n,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new bo(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(o).then(s=>Wn.mergeArray(r,s)):Wn.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Ks.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ks({items:t,typeName:Je.ZodTuple,rest:null,...ut(e)})};var C0=class t extends ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==we.object)return be(n,{code:ge.invalid_type,expected:we.object,received:n.parsedType}),et;let i=[],o=this._def.keyType,s=this._def.valueType;for(let a in n.data)i.push({key:o._parse(new bo(n,a,n.path,a)),value:s._parse(new bo(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Wn.mergeObjectAsync(r,i):Wn.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof ct?new t({keyType:e,valueType:r,typeName:Je.ZodRecord,...ut(n)}):new t({keyType:mc.create(),valueType:e,typeName:Je.ZodRecord,...ut(r)})}},Pd=class extends ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==we.map)return be(n,{code:ge.invalid_type,expected:we.map,received:n.parsedType}),et;let i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([a,c],p)=>({key:i._parse(new bo(n,a,n.path,[p,"key"])),value:o._parse(new bo(n,c,n.path,[p,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let p=await c.key,d=await c.value;if(p.status==="aborted"||d.status==="aborted")return et;(p.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(p.value,d.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let p=c.key,d=c.value;if(p.status==="aborted"||d.status==="aborted")return et;(p.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(p.value,d.value)}return{status:r.value,value:a}}}};Pd.create=(t,e,r)=>new Pd({valueType:e,keyType:t,typeName:Je.ZodMap,...ut(r)});var Fd=class t extends ct{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==we.set)return be(n,{code:ge.invalid_type,expected:we.set,received:n.parsedType}),et;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(be(n,{code:ge.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(be(n,{code:ge.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function s(c){let p=new Set;for(let d of c){if(d.status==="aborted")return et;d.status==="dirty"&&r.dirty(),p.add(d.value)}return{status:r.value,value:p}}let a=[...n.data.values()].map((c,p)=>o._parse(new bo(n,c,n.path,p)));return n.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:We.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:We.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Fd.create=(t,e)=>new Fd({valueType:t,minSize:null,maxSize:null,typeName:Je.ZodSet,...ut(e)});var x0=class t extends ct{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==we.function)return be(r,{code:ge.invalid_type,expected:we.function,received:r.parsedType}),et;function n(a,c){return S0({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,v0(),Id].filter(p=>!!p),issueData:{code:ge.invalid_arguments,argumentsError:c}})}function i(a,c){return S0({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,v0(),Id].filter(p=>!!p),issueData:{code:ge.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof _c){let a=this;return di(async function(...c){let p=new Zi([]),d=await a._def.args.parseAsync(c,o).catch(y=>{throw p.addIssue(n(c,y)),p}),h=await Reflect.apply(s,this,d);return await a._def.returns._def.type.parseAsync(h,o).catch(y=>{throw p.addIssue(i(h,y)),p})})}else{let a=this;return di(function(...c){let p=a._def.args.safeParse(c,o);if(!p.success)throw new Zi([n(c,p.error)]);let d=Reflect.apply(s,this,p.data),h=a._def.returns.safeParse(d,o);if(!h.success)throw new Zi([i(d,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Ks.create(e).rest(Va.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||Ks.create([]).rest(Va.create()),returns:r||Va.create(),typeName:Je.ZodFunction,...ut(n)})}},_f=class extends ct{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};_f.create=(t,e)=>new _f({getter:t,typeName:Je.ZodLazy,...ut(e)});var Ef=class extends ct{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return be(r,{received:r.data,code:ge.invalid_literal,expected:this._def.value}),et}return{status:"valid",value:e.data}}get value(){return this._def.value}};Ef.create=(t,e)=>new Ef({value:t,typeName:Je.ZodLiteral,...ut(e)});function e9(t,e){return new yf({values:t,typeName:Je.ZodEnum,...ut(e)})}var yf=class t extends ct{constructor(){super(...arguments),A_.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return be(r,{expected:bt.joinValues(n),received:r.parsedType,code:ge.invalid_type}),et}if(T0(this,A_,"f")||X$(this,A_,new Set(this._def.values),"f"),!T0(this,A_,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return be(r,{received:r.data,code:ge.invalid_enum_value,options:n}),et}return di(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};A_=new WeakMap;yf.create=e9;var Df=class extends ct{constructor(){super(...arguments),C_.set(this,void 0)}_parse(e){let r=bt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==we.string&&n.parsedType!==we.number){let i=bt.objectValues(r);return be(n,{expected:bt.joinValues(i),received:n.parsedType,code:ge.invalid_type}),et}if(T0(this,C_,"f")||X$(this,C_,new Set(bt.getValidEnumValues(this._def.values)),"f"),!T0(this,C_,"f").has(e.data)){let i=bt.objectValues(r);return be(n,{received:n.data,code:ge.invalid_enum_value,options:i}),et}return di(e.data)}get enum(){return this._def.values}};C_=new WeakMap;Df.create=(t,e)=>new Df({values:t,typeName:Je.ZodNativeEnum,...ut(e)});var _c=class extends ct{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==we.promise&&r.common.async===!1)return be(r,{code:ge.invalid_type,expected:we.promise,received:r.parsedType}),et;let n=r.parsedType===we.promise?r.data:Promise.resolve(r.data);return di(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};_c.create=(t,e)=>new _c({type:t,typeName:Je.ZodPromise,...ut(e)});var Qi=class extends ct{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Je.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s=>{be(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let s=i.transform(n.data,o);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return et;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?et:c.status==="dirty"||r.value==="dirty"?Rd(c.value):c});{if(r.value==="aborted")return et;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?et:a.status==="dirty"||r.value==="dirty"?Rd(a.value):a}}if(i.type==="refinement"){let s=a=>{let c=i.refinement(a,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?et:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?et:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!x_(s))return s;let a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>x_(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:r.value,value:a})):s);bt.assertNever(i)}};Qi.create=(t,e,r)=>new Qi({schema:t,typeName:Je.ZodEffects,effect:e,...ut(r)});Qi.createWithPreprocess=(t,e,r)=>new Qi({schema:e,effect:{type:"preprocess",transform:t},typeName:Je.ZodEffects,...ut(r)});var Oo=class extends ct{_parse(e){return this._getType(e)===we.undefined?di(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Oo.create=(t,e)=>new Oo({innerType:t,typeName:Je.ZodOptional,...ut(e)});var Xs=class extends ct{_parse(e){return this._getType(e)===we.null?di(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Xs.create=(t,e)=>new Xs({innerType:t,typeName:Je.ZodNullable,...ut(e)});var vf=class extends ct{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===we.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};vf.create=(t,e)=>new vf({innerType:t,typeName:Je.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ut(e)});var Sf=class extends ct{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return O_(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Zi(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Zi(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Sf.create=(t,e)=>new Sf({innerType:t,typeName:Je.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ut(e)});var Ld=class extends ct{_parse(e){if(this._getType(e)!==we.nan){let n=this._getOrReturnCtx(e);return be(n,{code:ge.invalid_type,expected:we.nan,received:n.parsedType}),et}return{status:"valid",value:e.data}}};Ld.create=t=>new Ld({typeName:Je.ZodNaN,...ut(t)});var KNe=Symbol("zod_brand"),b_=class extends ct{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},R_=class t extends ct{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?et:o.status==="dirty"?(r.dirty(),Rd(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?et:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:Je.ZodPipeline})}},Tf=class extends ct{_parse(e){let r=this._def.innerType._parse(e),n=i=>(x_(i)&&(i.value=Object.freeze(i.value)),i);return O_(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};Tf.create=(t,e)=>new Tf({innerType:t,typeName:Je.ZodReadonly,...ut(e)});function t9(t,e={},r){return t?gc.create().superRefine((n,i)=>{var o,s;if(!t(n)){let a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,c=(s=(o=a.fatal)!==null&&o!==void 0?o:r)!==null&&s!==void 0?s:!0,p=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...p,fatal:c})}}):gc.create()}var XNe={object:Fi.lazycreate},Je;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Je||(Je={}));var JNe=(t,e={message:`Input not instance of ${t.name}`})=>t9(r=>r instanceof t,e),r9=mc.create,n9=cf.create,ZNe=Ld.create,QNe=lf.create,i9=ff.create,e1e=pf.create,t1e=wd.create,r1e=df.create,n1e=hf.create,i1e=gc.create,o1e=Va.create,s1e=gs.create,a1e=Nd.create,u1e=Wa.create,c1e=Fi.create,l1e=Fi.strictCreate,f1e=mf.create,p1e=A0.create,d1e=gf.create,h1e=Ks.create,m1e=C0.create,g1e=Pd.create,_1e=Fd.create,E1e=x0.create,y1e=_f.create,D1e=Ef.create,v1e=yf.create,S1e=Df.create,T1e=_c.create,Y$=Qi.create,A1e=Oo.create,C1e=Xs.create,x1e=Qi.createWithPreprocess,O1e=R_.create,b1e=()=>r9().optional(),R1e=()=>n9().optional(),I1e=()=>i9().optional(),w1e={string:t=>mc.create({...t,coerce:!0}),number:t=>cf.create({...t,coerce:!0}),boolean:t=>ff.create({...t,coerce:!0}),bigint:t=>lf.create({...t,coerce:!0}),date:t=>pf.create({...t,coerce:!0})},N1e=et,ee=Object.freeze({__proto__:null,defaultErrorMap:Id,setErrorMap:NNe,getErrorMap:v0,makeIssue:S0,EMPTY_PATH:PNe,addIssueToContext:be,ParseStatus:Wn,INVALID:et,DIRTY:Rd,OK:di,isAborted:Vw,isDirty:Ww,isValid:x_,isAsync:O_,get util(){return bt},get objectUtil(){return Gw},ZodParsedType:we,getParsedType:hc,ZodType:ct,datetimeRegex:Q$,ZodString:mc,ZodNumber:cf,ZodBigInt:lf,ZodBoolean:ff,ZodDate:pf,ZodSymbol:wd,ZodUndefined:df,ZodNull:hf,ZodAny:gc,ZodUnknown:Va,ZodNever:gs,ZodVoid:Nd,ZodArray:Wa,ZodObject:Fi,ZodUnion:mf,ZodDiscriminatedUnion:A0,ZodIntersection:gf,ZodTuple:Ks,ZodRecord:C0,ZodMap:Pd,ZodSet:Fd,ZodFunction:x0,ZodLazy:_f,ZodLiteral:Ef,ZodEnum:yf,ZodNativeEnum:Df,ZodPromise:_c,ZodEffects:Qi,ZodTransformer:Qi,ZodOptional:Oo,ZodNullable:Xs,ZodDefault:vf,ZodCatch:Sf,ZodNaN:Ld,BRAND:KNe,ZodBranded:b_,ZodPipeline:R_,ZodReadonly:Tf,custom:t9,Schema:ct,ZodSchema:ct,late:XNe,get ZodFirstPartyTypeKind(){return Je},coerce:w1e,any:i1e,array:u1e,bigint:QNe,boolean:i9,date:e1e,discriminatedUnion:p1e,effect:Y$,enum:v1e,function:E1e,instanceof:JNe,intersection:d1e,lazy:y1e,literal:D1e,map:g1e,nan:ZNe,nativeEnum:S1e,never:s1e,null:n1e,nullable:C1e,number:n9,object:c1e,oboolean:I1e,onumber:R1e,optional:A1e,ostring:b1e,pipeline:O1e,preprocess:x1e,promise:T1e,record:m1e,set:_1e,strictObject:l1e,string:r9,symbol:t1e,transformer:Y$,tuple:h1e,undefined:r1e,union:f1e,unknown:o1e,void:a1e,NEVER:N1e,ZodIssueCode:ge,quotelessJson:wNe,ZodError:Zi});u();import P1e from"node:process";function o9(){let t=P1e.env[D0];return t?JSON.parse(t):{}}var F1e=ee.object({biLoggerBaseUrl:ee.string().url().optional(),devEditorBaseUrl:ee.string().url().optional(),inkDebug:ee.boolean().optional(),minRetryTimeout:ee.number().optional(),sentryDsn:ee.string().optional(),userBrowserTestEndpoint:ee.string().url().optional(),dataDir:ee.string().optional(),wixCliDependencyVersion:ee.string().optional(),wixCliAppDependencyVersion:ee.string().optional(),appInstallationPollInterval:ee.number().optional(),disableTTY:ee.boolean().optional(),waitForLoginInterval:ee.number().optional(),registryUrl:ee.string().optional(),fsCacheDir:ee.string().optional(),localTunnel:ee.boolean().optional(),miniflareInspectorPort:ee.number().optional(),customElementsCreationDelay:ee.number().optional(),sdkAuthServerBaseUrl:ee.string().optional()});function gr(){return F1e.parse(o9())}function L1e(){return!!Md.env[D0]}function s9(){L1e()&&(Md.stdout.columns=300,Md.stderr.columns=300,Md.stdin.isTTY=!gr().disableTTY,Md.stdin.setRawMode=()=>Md.stdin)}u();u();var m9=F(Af(),1),{WError:nPe}=m9.default,Oe=class extends nPe{cliCode;constructor(e){let r=e.cause instanceof Error?e.cause:new Error(JSON.stringify(e.cause));super({name:e.code.type,cause:r,info:e.info},e.code.type),this.cliCode=e.code,this.name=e.code.type}};u();var Ne=F(tt(),1),Ud=(0,Ne.variant)({FailedToGetDeviceCode:{},FailedToGetAuthToken:{},FailedToRenewAuthToken:{},FailedToRefreshTokenForSite:{},FailedToRevokeRefreshToken:(0,Ne.fields)(),UnknownFailure:(0,Ne.fields)(),FailedToFetchPackageJson:{},FailedToGetDeveloperApps:{},FailedToUpdateTelemetryConfig:{},FailedToSyncToRevision:(0,Ne.fields)(),FailedToCreateVersion:{},FailedToReadCache:(0,Ne.fields)(),FailedToWriteCache:(0,Ne.fields)(),UploadApplicationFailed:{},FailedToCreateDevCenterApp:{},FailedToGetAppSecret:{},FailedToGetAppSnapshot:{},FailedToCreateTunnel:{},FailedToDeleteTunnel:{},GridAppFailedToUpdateFiles:{},FailedToCreateGridApp:(0,Ne.fields)(),InvalidResponseData:{},InvalidCreateAppResponse:{},InvalidDeployAppResponse:{},InvalidGetDeploymentResponse:{},FailedToGetPagesDiff:{},InvalidViteBuildOutput:{},ViteModuleBundleNotFound:{},ViteFileNotFoundInOutput:(0,Ne.fields)(),FailedToCreatePresignedUrl:{},FailedToCreateBackendDeployment:{},FailedToUpdateBackendDeployment:{},InvalidDeploymentUrl:(0,Ne.fields)(),FailedToGetBackendDeployment:{},FailedToDeployBackend:{},FailedToUploadApplicationFiles:{},FailedToVerifyDeployment:{},FailedToGetUserInfo:{},FailedToGetMyAccount:{},FailedToCreateDevelopmentSite:{},FailedToGetDevelopmentSites:{},FailedToGetDevelopmentSitesLimit:{},FailedToGetRequiredApps:{},FailedToGetMarketListing:{},FailedToAddRequiredApp:{},FailedToGetAppValidity:{},FailedToQuerySites:{},FailedToGetSite:{},FailedToDeploySite:{},FailedToPublishDeployment:{},FailedToMarkDeploymentAsPermanent:{},FailedToCheckIfAppInstalled:{},TypeErrorInvalidUrl:{},FailedToGenerateSelfsignedCertificate:{},FailedToResolveViteOrigin:{},FailedToCreateAppRelease:{},FailedToUpdateAppRelease:{},FailedToCreateComponents:{},FailedToGetResolveNpmDependenciesResult:{},FailedToResolveNpmDependencies:{},FailedToCheckDeprecatedStatus:{},FailedToCreateSiteOverride:{},FailedToGetDeploymentStatus:{},FailedToGetPipelineErrorInfo:{},FailedToGenerateAppMarketQueryParam:{},InvalidDependenciesJsonSchemaError:(0,Ne.fields)(),FailedToParseLog:{},FailedToConnectToLogsService:{},FailedToGetLogsTopology:{},LogsConnectionTimeout:{},FailedToFetchAppForVersion:{},InvalidSiteOverrideID:{}}),Zw=(0,Ne.variant)({LatestVersionOfCreateAppRequired:(0,Ne.fields)(),FailedToCreateProjectFolder:(0,Ne.fields)(),EmptyDirectoryRequiredAppGeneration:(0,Ne.fields)(),InvalidNewPackageName:(0,Ne.fields)(),UnsupportedPackageManager:(0,Ne.fields)(),UnsupportedPackageManagerWorkspaces:(0,Ne.fields)(),FailedAddingPackageToWorkspace:{},SitePermissionDenied:(0,Ne.fields)(),AppPermissionDenied:(0,Ne.fields)(),BuiltProjectNeeded:{},WixUninstallMissingPackageName:{},FailedToReadJson:(0,Ne.fields)(),FailedToWriteJson:(0,Ne.fields)(),InvalidJsonFile:(0,Ne.fields)(),FailedToWriteWixLock:{},InvalidVeloConfigJson:(0,Ne.fields)(),DashboardPageConfigNotFound:(0,Ne.fields)(),EmbeddedScriptConfigNotFound:(0,Ne.fields)(),NoExtensionsFound:{},CustomElementConfigNotFound:(0,Ne.fields)(),NoPagesDirectoryFound:(0,Ne.fields)(),DashboardPluginConfigNotFound:(0,Ne.fields)(),DashboardMenuPluginConfigNotFound:(0,Ne.fields)(),ServicePluginConfigNotFound:(0,Ne.fields)(),DashboardModalConfigNotFound:(0,Ne.fields)(),InvalidConfigSchemaError:(0,Ne.fields)(),InvalidParamsOverrideSchemaError:(0,Ne.fields)(),PermissionDenied:{},SiteSelectorTimedout:{},FailedToReadProjectFiles:(0,Ne.fields)(),FailedToCreateVersionForSubmittedApp:{},GridAppFilesMaxLengthExcceeded:(0,Ne.fields)(),DeviceCodeTimedOut:{},DuplicateComponentIdsError:(0,Ne.fields)(),FailedToSaveDevelopmentSite:(0,Ne.fields)(),FailedToBuildApp:(0,Ne.fields)(),FailedToInitializeGitRepo:(0,Ne.fields)(),FailedToInstallDependencies:(0,Ne.fields)(),FailedToCommitChanges:(0,Ne.fields)(),FailedToDeleteAuthData:(0,Ne.fields)(),FailedToDeleteLegacyAuthData:(0,Ne.fields)(),FailedToSaveAuthData:(0,Ne.fields)(),FailedToSaveApiKeyAuthData:(0,Ne.fields)(),FailedToRenewAuthTokenSiteNotFound:(0,Ne.fields)(),FailedToRenewAuthTokenRefreshTokenRevoked:{},FailedToInstallPackage:(0,Ne.fields)(),FailedToInstallPackages:(0,Ne.fields)(),FailedToUninstallPackage:(0,Ne.fields)(),FailedMigrationToAnyNpm:{},DeprecatedVersion:(0,Ne.fields)(),TemplatePathNotFound:(0,Ne.fields)(),FailedToCloneRepo:(0,Ne.fields)(),InvalidGitUrl:(0,Ne.fields)(),AuthenticationRequired:{},SiteConfiguredRequired:{},NonInteractiveTerminal:{},FailedToWatchFiles:(0,Ne.fields)(),CliAppVersionMismatch:(0,Ne.fields)(),NetworkError:(0,Ne.fields)(),AppForVersionNotFound:(0,Ne.fields)(),UnknownServicePlugin:(0,Ne.fields)(),InvalidServicePluginFolder:(0,Ne.fields)()}),iPe=(0,Ne.variant)({InvalidDashboardPageRoute:(0,Ne.fields)(),InvalidEmbeddedScriptFolder:(0,Ne.fields)(),InvalidEmbeddedScriptTemplate:(0,Ne.fields)(),InvalidCustomElementTagName:(0,Ne.fields)(),InvalidSiteFrontendPackageVersion:(0,Ne.fields)(),InvalidServicePluginImplementation:(0,Ne.fields)()}),Pe=(0,Ne.variant)({...Ud,...Zw,...iPe});u();var Qw=F(tt(),1);function Hd(t){return t&&typeof t=="object"&&"cliCode"in t?(0,Qw.isOfVariant)(t.cliCode,Pe):!1}function $a(t){return(0,Qw.isOfVariant)(t.cliCode,Ud)}u();var g9=F(tt(),1),_9=F(Af(),1);function E9(t){if(Hd(t)&&(0,g9.isOfVariant)(t.cliCode,Zw))return t;let e=_9.default.cause(t);return e?E9(e):null}function F_(t){let e=Hd(t)?t:new Oe({code:Pe.UnknownFailure({error:t})});return E9(e)??e}var eN=class extends Js.Component{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e){let r=e instanceof Error?e:new Error(JSON.stringify(e));r.message.includes("Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default")?this.props.onExit(new Oe({code:Pe.NonInteractiveTerminal(),cause:r})):this.props.onExit(r)}render(){return this.state.hasError?null:this.props.children}},oPe=({children:t})=>{let e=dc();return Js.default.createElement(eN,{onExit:e},t)},y9=({children:t,wrap:e})=>Js.default.createElement(Js.default.Fragment,null,e&&Js.default.createElement(Ut,null,"----RENDER FRAME START----"),t);async function L_(t){let e=!!gr().inkDebug,{waitUntilExit:r,unmount:n}=NS(Js.default.createElement(y9,{wrap:e},Js.default.createElement(oPe,null,t)),{exitOnCtrlC:!0,debug:e});process.once("beforeExit",()=>{n()}),process.once("SIGINT",()=>{n()}),await r()}function D9(t,e){let r=!!gr().inkDebug,{unmount:n}=NS(Js.default.createElement(y9,{wrap:r},t),{debug:r,...e});n()}function tN(t){D9(t)}function rN(t){D9(t,{stdout:process.stderr})}u();u();u();var qJ=F(tt(),1);u();u();var O9=F(C9(),1),aPe=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed"]),nN=class extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}},uPe=(t,e,r)=>{let n=r.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=n,t},cPe=t=>aPe.has(t),x9=t=>globalThis.DOMException===void 0?new Error(t):new DOMException(t);async function on(t,e){return new Promise((r,n)=>{e={onFailedAttempt(){},retries:10,...e};let i=O9.default.operation(e);i.attempt(async o=>{try{r(await t(o))}catch(s){if(!(s instanceof Error)){n(new TypeError(`Non-error was thrown: "${s}". You should only throw errors.`));return}if(s instanceof nN)i.stop(),n(s.originalError);else if(s instanceof TypeError&&!cPe(s.message))i.stop(),n(s);else{uPe(s,o,e);try{await e.onFailedAttempt(s)}catch(a){n(a);return}i.retry(s)||n(i.mainError())}}}),e.signal&&!e.signal.aborted&&e.signal.addEventListener("abort",()=>{i.stop();let o=e.signal.reason===void 0?x9("The operation was aborted."):e.signal.reason;n(o instanceof Error?o:x9(o))},{once:!0})})}u();u();u();u();function b9(t=""){let[e,r]=lPe(t);return r?{schemaName:r,schemaType:e}:{schemaName:e}}var lPe=t=>t.split("#");u();u();function R9(t,e,r,n){let i=t;for(let o of e.split(".")){if(!i)return r;i=i[o]}return`${i}${n}`}var fPe="_",pPe=["wix.com","editorx.com"],dPe=["42.wixprod.net","uw2-edt-1.wixprod.net"],hPe="dev.wix-code.com",mPe=/{(.*)}/,gPe=new RegExp(`\\.(${pPe.join("|")})$`),_Pe=new RegExp(`\\.(${dPe.join("|")})$`),EPe=new RegExp(`.*\\.${hPe}$`);function hi(t){let e=vPe(t.host),r=TPe(e,t.domainToMappings),n=yPe(t.protoPath,t.data||{});return APe(n,r)}function yPe(t,e){return t.split("/").map(r=>DPe(r,e)).join("/")}function DPe(t,e){let r=t.match(mPe)||[],n=r[1];if(n){let i=t.replace(r[0],"");return R9(e,n,t,i)}return t}function vPe(t){return SPe(t).replace(gPe,"._base_domain_").replace(_Pe,"._api_base_domain_").replace(EPe,"*.dev.wix-code.com")}function SPe(t){return t.replace("create.editorx.com","editor.editorx.com")}function TPe(t,e){let r=e[t]||e[fPe];return!r&&CPe(t)?e[xPe]:r}function APe(t,e){let r=e?.find(n=>t.startsWith(n.destPath));return r?r.srcPath+t.slice(r.destPath.length):t}function CPe(t){return!!t.match(/\._base_domain_$/)}var xPe="www._base_domain_";u();u();var iN=typeof Buffer=="function",IDt=typeof TextDecoder=="function"?new TextDecoder:void 0,I9=typeof TextEncoder=="function"?new TextEncoder:void 0,OPe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",M_=Array.prototype.slice.call(OPe),wDt=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(M_);var Zs=String.fromCharCode.bind(String),NDt=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),bPe=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_");var RPe=t=>{let e,r,n,i,o="",s=t.length%3;for(let a=0;a<t.length;){if((r=t.charCodeAt(a++))>255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,o+=M_[e>>18&63]+M_[e>>12&63]+M_[e>>6&63]+M_[e&63]}return s?o.slice(0,s-3)+"===".substring(s):o},N9=typeof btoa=="function"?t=>btoa(t):iN?t=>Buffer.from(t,"binary").toString("base64"):RPe,IPe=iN?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;n<i;n+=4096)r.push(Zs.apply(null,t.subarray(n,n+4096)));return N9(r.join(""))};var wPe=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?Zs(192|e>>>6)+Zs(128|e&63):Zs(224|e>>>12&15)+Zs(128|e>>>6&63)+Zs(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return Zs(240|e>>>18&7)+Zs(128|e>>>12&63)+Zs(128|e>>>6&63)+Zs(128|e&63)}},NPe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,PPe=t=>t.replace(NPe,wPe),w9=iN?t=>Buffer.from(t,"utf8").toString("base64"):I9?t=>IPe(I9.encode(t)):t=>N9(PPe(t)),P9=(t,e=!1)=>e?bPe(w9(t)):w9(t);function F9(t,e=""){let r={};return Object.entries(t).forEach(([n,i])=>{let o=i!==null&&typeof i=="object"&&!Array.isArray(i),s=FPe(e,n);if(o){let a=F9(i,s);Object.assign(r,a)}else r[s]=i}),r}function FPe(t,e){return`${t}${t?".":""}${e}`}function sn(t,e){let r=F9(t),n=Object.entries(r).reduce((i,[o,s])=>((Array.isArray(s)?s:[s]).forEach(c=>{c!=null&&i.append(o,c)}),i),new URLSearchParams);return e&&n.append(".r",P9(JSON.stringify(t),!0)),n}u();u();var Wr;(function(t){t[t.TO_JSON=0]="TO_JSON",t[t.FROM_JSON=1]="FROM_JSON"})(Wr||(Wr={}));u();function L9(t,e={},r){return function(i={},o){return typeof i=="string"?i:s(t,i);function s(d,h){let m={};return[null,void 0].includes(h)?h:(Object.entries(h).forEach(([y,S])=>{let T=d[y],{schemaName:x,schemaType:O}=b9(T),N=O==="Map",I=c(x)?.checkRepetable?.(S)??Array.isArray(S),P;I?P=S.map(k=>a(k,x)):N?P=p(S,x):P=a(S,x),m[y]=P}),m)}function a(d,h){if(!h)return d;let m=e[h];if(c(h))return c(h).transform(d);if(m)return s(m,d);throw new Error(`${h} is neither schema nor serializable type`)}function c(d){return r[d]?.[o]}function p(d,h){return Object.entries(d).reduce((m,[y,S])=>(m[y]=a(S,h),m),{})}}}u();u();var M9={types:["google.protobuf.Timestamp"],[Wr.TO_JSON]:{transform:t=>t?.toISOString()},[Wr.FROM_JSON]:{transform:t=>t?new Date(t):void 0}};u();var k9={types:["google.protobuf.FieldMask"],[Wr.TO_JSON]:{transform:t=>t.join(","),checkRepetable:t=>t.some(e=>Array.isArray(e))},[Wr.FROM_JSON]:{transform:t=>typeof t=="object"?t.paths:t.split(",")}};u();var B9={types:["google.protobuf.BytesValue","BYTES"],[Wr.TO_JSON]:{transform:t=>{let e=t.reduce((r,n)=>r+String.fromCharCode(n),"");return btoa(e)}},[Wr.FROM_JSON]:{transform:t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0))}};u();var U9={types:["google.protobuf.Duration"],[Wr.TO_JSON]:{transform:({seconds:t="0",nanos:e=0})=>{let r="";return e!==0&&(r=`.${e.toString().padStart(9,"0")}`),`${t}${r}s`}},[Wr.FROM_JSON]:{transform:t=>{let[e,r]=t.substring(0,t.length-1).split(".");return{seconds:e,nanos:LPe(r)}}}};function LPe(t){let e=0;if(t!==void 0){let r=3-t.length/3;e=parseInt(t,10)*Math.pow(1e3,r)}return e}u();var H9={types:["FLOAT","DOUBLE","google.protobuf.FloatValue","google.protobuf.DoubleValue"],[Wr.TO_JSON]:{transform:t=>isFinite(t)?t:t.toString()},[Wr.FROM_JSON]:{transform:t=>t==="NaN"?NaN:t==="Infinity"?1/0:t==="-Infinity"?-1/0:t}};var q9=[M9,k9,B9,U9,H9];u();function j9(t){return t.reduce((e,r)=>{let n=r.types.reduce((i,o)=>({...i,[o]:r}),{});return{...e,...n}},{})}var MPe=j9([...q9]);function gt(t,e={}){let r=L9(t,e,MPe);return{fromJSON(n){let i=kPe(n)||n;return r(i,Wr.FROM_JSON)},toJSON(n){return r(n,Wr.TO_JSON)}}}function kPe(t){try{return JSON.parse(t)}catch{}}var BPe={dateCreated:"google.protobuf.Timestamp",dateUpdated:"google.protobuf.Timestamp"},UPe={account:"_account"};var HPe={};function qPe(t){var e={"api._api_base_domain_":[{srcPath:"/account-server",destPath:""}],"www._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"manage._base_domain_":[{srcPath:"/_api/account-server",destPath:""},{srcPath:"/account-server",destPath:""}],"premium._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"editor._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"blocks._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"create.editorx":[{srcPath:"/_api/account-server",destPath:""}],"bo._base_domain_":[{srcPath:"/account-server",destPath:""}],"wixbo.ai":[{srcPath:"/account-server",destPath:""}],"wix-bo.com":[{srcPath:"/account-server",destPath:""}],"www.wixapis.com":[{srcPath:"/accounts",destPath:""}],"users._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"*.dev.wix-code.com":[{srcPath:"/_api/account-server",destPath:""}]};return hi(Object.assign(t,{domainToMappings:e}))}function G9(t){var e=gt(HPe,{}),r=e.toJSON,n=e.fromJSON,i=gt(UPe,{_account:BPe}).fromJSON;function o(s){var a=s.host,c=r(t),p={entityFqdn:"wix.identity.account.v2.account",method:"GET",methodFqn:"com.wixpress.account.api.AccountService.getMyAccount",url:qPe({protoPath:"/v1/accounts/my_account",data:c,host:a}),params:sn(c),transformResponse:i};return p}return o.fromReq=n,o.__isAmbassador=!0,o}u();var jPe={},GPe={};var VPe={body:"BYTES"},WPe={body:"BYTES"},$Pe={},zPe={};function oN(t){var e={"manage._base_domain_":[{srcPath:"/oauth2",destPath:"/v1/oauth"}],"www.wixapis.com":[{srcPath:"/oauth2",destPath:"/v1/oauth"},{srcPath:"/oauth2/token_info",destPath:"/v1/token_info"}],"users._base_domain_":[{srcPath:"/v1/oauth/device/verify",destPath:"/v1/oauth/device/verify"},{srcPath:"/v1/oauth/manage/user-code",destPath:"/v1/oauth/manage/user-code"},{srcPath:"/v2/oauth/device/verify",destPath:"/v2/oauth/device/verify"}],_:[{srcPath:"/_api/oauth2",destPath:"/v1/oauth"}]};return hi(Object.assign(t,{domainToMappings:e}))}function sN(t){var e=gt(VPe,{}),r=e.toJSON,n=e.fromJSON,i=gt(WPe,{}).fromJSON;function o(s){var a=s.host,c=r(t),p={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"POST",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.Token",url:oN({protoPath:"/v1/oauth/token",data:c,host:a}),data:c,transformResponse:i};return p}return o.fromReq=n,o.__isAmbassador=!0,o}function V9(t){var e=gt(jPe,{}),r=e.toJSON,n=e.fromJSON,i=gt(GPe,{}).fromJSON;function o(s){var a=s.host,c=r(t),p={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"GET",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.DeviceCode",url:oN({protoPath:"/v1/oauth/device/code",data:c,host:a}),params:sn(c),transformResponse:i};return p}return o.fromReq=n,o.__isAmbassador=!0,o}function W9(t){var e=gt($Pe,{}),r=e.toJSON,n=e.fromJSON,i=gt(zPe,{}).fromJSON;function o(s){var a=s.host,c=r(t),p={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"POST",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.RevokeRefreshToken",url:oN({protoPath:"/v1/oauth/revoke",data:c,host:a}),data:c,transformResponse:i};return p}return o.fromReq=n,o.__isAmbassador=!0,o}u();var SY=F(Zd(),1);u();var vY=F(Zd(),1);function wf(t){return vY.HttpClient.isHttpError(t)}var M2e={backoffice:"https://manage.wix.com",editor:"https://editor.wix.com",code:"https://code.wix.com",general:"https://www.wix.com",standalone:void 0};function Sc(t,e){return(...r)=>e.apply(t,r).catch(n=>{throw wf(n)&&!t.isCancel(n)&&!n.response?new Oe({code:Pe.NetworkError({cause:n}),cause:n,info:{code:n.code}}):n})}function Qd({getAppToken:t,createHeaders:e,type:r}){let n=(0,SY.createHttpClient)({baseURL:M2e[r],...r!=="standalone"?{getAppToken:t}:{},createHeaders:()=>({...e?.(),"X-XSRF-TOKEN":"nocheck",Cookie:"XSRF-TOKEN=nocheck","User-Agent":"wix-cli"})});return{...n,request:Sc(n,n.request),get:Sc(n,n.get),delete:Sc(n,n.delete),head:Sc(n,n.head),options:Sc(n,n.options),post:Sc(n,n.post),put:Sc(n,n.put),patch:Sc(n,n.patch)}}u();var TY=F(Zd(),1),AY=F(Af(),1);function X_(t){if(TY.HttpClient.isHttpError(t))return t;let e=t instanceof Error?AY.default.cause(t):null;return e?X_(e):null}u();function sT(t){return{request:{baseURL:t.config.baseURL,url:t.config.url,method:t.config.method,headers:t.config.headers,data:t.config.data},response:{code:t.code,message:t.message,status:t.response?.status,headers:t.response?.headers,data:t.response?.data}}}var eh=F(tt(),1);u();var CY=ee.object({deviceCode:ee.string(),verificationUri:ee.string().url(),userCode:ee.string(),expiresIn:ee.number()}),ZN=ee.object({access_token:ee.string(),refresh_token:ee.string(),expires_in:ee.number()}).transform(t=>({accessToken:t.access_token,refreshToken:t.refresh_token,expiresIn:t.expires_in})),QN=ee.object({userId:ee.string().uuid(),email:ee.string().email()}),xY=ee.object({account:ee.object({slug:ee.string(),accountId:ee.string().uuid(),accountOwner:ee.string().uuid()})}),OY=ee.object({accessToken:ee.string(),refreshToken:ee.string(),expiresIn:ee.number(),issuedAt:ee.number()}),bY=OY.extend({userInfo:QN}),RY=ee.object({token:ee.string(),accountId:ee.string().uuid(),userInfo:ee.object({userId:ee.string().uuid(),email:ee.string()})});var{InvalidResponseData:k2e,FailedToGetAuthToken:B2e,FailedToGetDeviceCode:U2e,FailedToRenewAuthToken:H2e,FailedToRenewAuthTokenSiteNotFound:q2e,FailedToRevokeRefreshToken:j2e}=Pe,e1="6f95cec8-3e98-48b9-b4e5-1fb92fcd9973",IY=()=>Math.floor(Date.now()/1e3),J_=class extends Error{},aT=(0,eh.variant)({TokenRenewed:(0,eh.payload)(),RefreshTokenRevoked:(0,eh.fields)()}),t1=class{constructor(e){this.httpClient=e;let{minRetryTimeout:r}=gr();this.retryOptions={retries:3,minTimeout:r,maxTimeout:3*1e3}}retryOptions;async requestDeviceCode(e={}){try{let{data:r}=await on(()=>this.httpClient.request(V9({...e,clientId:e1})),this.retryOptions);return CY.parse(r)}catch(r){throw new Oe({code:U2e(),cause:r})}}async createToken(e){try{let r={clientId:e1,grantType:"urn:ietf:params:oauth:grant-type:device_code",scope:"offline_access",...e};return{...await on(async()=>{let{data:i,requestId:o}=await this.httpClient.request(sN(r)),s=ZN.safeParse(i);if(s.success)return s.data;throw new Oe({code:k2e(),cause:s.error,info:{requestId:o,data:i}})},this.retryOptions),issuedAt:IY()}}catch(r){throw wf(r)&&(r.response?.data?.message==="Device code is not yet verified"||r.response?.data?.error==="authorization_pending")?new J_("Device code is not yet verified."):new Oe({code:B2e(),cause:r})}}async renewToken(e){try{let r={clientId:e1,grantType:"refresh_token",...e},{data:n}=await on(()=>this.httpClient.request(sN(r)),this.retryOptions),i=ZN.parse(n);return aT.TokenRenewed({...i,issuedAt:IY()})}catch(r){if(wf(r)){if(r.response?.status===400&&r.response.data?.error==="invalid_grant")return aT.RefreshTokenRevoked({cause:r});if(e.siteId&&r.response?.status===404&&r.response.data?.details?.applicationError?.code==="SITE_NOT_FOUND")throw new Oe({code:q2e({siteId:e.siteId}),cause:r})}throw new Oe({code:H2e(),cause:r})}}async revokeRefreshToken(e,{email:r}){try{let{data:n}=await this.httpClient.request(W9(e));return n}catch(n){throw new Oe({code:j2e({email:r}),info:{email:r},cause:n})}}async userInfo({accessToken:e}){try{let r=Qd({type:"backoffice",getAppToken:async()=>e}),{data:n}=await r.get("/_serverless/wix-cli-userinfo/userinfo");return QN.parse(n)}catch(r){throw new Oe({code:Pe.FailedToGetUserInfo(),cause:r})}}async getMyAccount({token:e}){try{let r=Qd({type:"backoffice",getAppToken:async()=>e}),{data:n}=await r.request(G9({}));return xY.parse(n).account}catch(r){throw new Oe({code:Pe.FailedToGetMyAccount(),cause:r})}}},Tc=new t1(Qd({type:"backoffice"}));u();import{unlink as RBe,rm as IBe}from"node:fs/promises";import{resolve as yE}from"node:path";u();import{resolve as G2e}from"node:path";import{homedir as V2e}from"node:os";function Z_(){return gr().dataDir??G2e(V2e(),".wix")}var gi=F(tt(),1);u();var xBe=F(wJ(),1),OBe=F(Af(),1);import{access as TBe,readFile as ABe,writeFile as NJ,mkdir as PJ,stat as gCt}from"node:fs/promises";import{dirname as FJ,join as ECt,relative as yCt}from"node:path";import{EOL as CBe}from"node:os";function bBe(t,e){return JSON.stringify(t,null,e?.spaces).concat(CBe)}async function Bc(t,e,r){try{let n=bBe(e,r);await PJ(FJ(t),{recursive:!0}),await NJ(t,n,"utf-8")}catch(n){throw new Oe({code:Pe.FailedToWriteJson({filePath:t,cause:n}),cause:n})}}async function Ss(t){let e=null;try{e=await ABe(t,"utf-8")}catch(r){throw new Oe({code:Pe.FailedToReadJson({filePath:t,cause:r})})}try{return JSON.parse(e)}catch(r){throw new Oe({code:Pe.InvalidJsonFile({filePath:t,cause:r})})}}function Hi(t){return TBe(t).then(()=>!0).catch(()=>!1)}async function LJ(t,e){await PJ(FJ(t),{recursive:!0}),await NJ(t,e,"utf-8")}function MJ(){return yE(Z_(),"auth.json")}function hA(){return yE(Z_(),"auth")}function kJ(){return yE(hA(),"api-key.json")}function BJ(){return yE(hA(),"account.json")}function wBe(t){return yE(hA(),`${t}.json`)}var WP=(0,gi.variant)({Authenticated:(0,gi.payload)(),Unauthenticated:{}});async function $P(){let t=kJ();if(!await Hi(t))return WP.Unauthenticated();let e=await Ss(t),r=RY.parse(e);return WP.Authenticated(r)}async function UJ(t){try{let e=kJ();await Bc(e,t)}catch(e){throw new Oe({code:Pe.FailedToSaveApiKeyAuthData({cause:e}),cause:e})}}var VP=(0,gi.variant)({Authenticated:(0,gi.fields)(),Unauthenticated:{},Expired:(0,gi.fields)()});async function zP(){let t=BJ();if(!await Hi(t))return VP.Unauthenticated();let e=await Ss(t),r=bY.parse(e);return XP(r)?VP.Authenticated(r):VP.Expired(r)}var ICt=(0,gi.variant)({Authenticated:(0,gi.fields)(),Unauthenticated:{},Expired:(0,gi.fields)()});async function YP(t,e){try{let r=e?wBe(e):BJ();await Bc(r,t)}catch(r){throw new Oe({code:Pe.FailedToSaveAuthData({cause:r}),cause:r})}}async function mA(){try{await IBe(hA(),{recursive:!0,force:!0})}catch(t){throw new Oe({code:Pe.FailedToDeleteAuthData({cause:t}),cause:t})}await KP()&&await NBe()}async function NBe(){try{await RBe(MJ())}catch(t){throw new Oe({code:Pe.FailedToDeleteLegacyAuthData({cause:t}),cause:t})}}async function KP(){return Hi(MJ())}function XP(t){let e=Math.floor(Date.now()/1e3),r=10*60,n=t.expiresIn-r;return t.issuedAt+n>e}async function JP(){let t=await $P();if((0,gi.isType)(t,WP.Authenticated))return t.payload.userInfo;let e=await zP();return(0,gi.match)(e,{Authenticated:({userInfo:r})=>r,Expired:({userInfo:r})=>r,Unauthenticated:()=>null})}function HJ({authData:{token:t,accountId:e,userInfo:r},siteId:n}){return{getAccessToken:async()=>t,getRefreshToken:()=>{throw new Error("API key auth does not support refresh tokens")},getRequestHeaders:()=>({"wix-account-id":e,...n&&{"wix-site-id":n}}),userInfo:r}}var jJ={async isLoggedIn({siteId:t}={}){let e=await $P();return(0,qJ.match)(e,{Authenticated:({payload:r})=>HJ({authData:r,siteId:t}),Unauthenticated:()=>null})},async login({token:t}){let{accountId:e,accountOwner:r,slug:n}=await Tc.getMyAccount({token:t}),i={token:t,accountId:e,userInfo:{userId:r,email:n}};return await mA(),await UJ(i),HJ({authData:i})}};u();u();u();var ZP=class{value;next;constructor(e){this.value=e}},DE=class{#r;#t;#e;constructor(){this.clear()}enqueue(e){let r=new ZP(e);this.#r?(this.#t.next=r,this.#t=r):(this.#r=r,this.#t=r),this.#e++}dequeue(){let e=this.#r;if(e)return this.#r=this.#r.next,this.#e--,e.value}clear(){this.#r=void 0,this.#t=void 0,this.#e=0}get size(){return this.#e}*[Symbol.iterator](){let e=this.#r;for(;e;)yield e.value,e=e.next}};function QP(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new DE,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,c,p)=>{r++;let d=(async()=>a(...p))();c(d);try{await d}catch{}n()},o=(a,c,p)=>{e.enqueue(i.bind(void 0,a,c,p)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},s=(a,...c)=>new Promise(p=>{o(a,p,c)});return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s}var Hc=F(tt(),1);u();u();var Uc=class extends Error{constructor(e){super(e),this.name="TimeoutError"}},eF=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},GJ=t=>globalThis.DOMException===void 0?new eF(t):new DOMException(t),VJ=t=>{let e=t.reason===void 0?GJ("This operation was aborted."):t.reason;return e instanceof Error?e:GJ(e)};function tF(t,e){let{milliseconds:r,fallback:n,message:i,customTimers:o={setTimeout,clearTimeout}}=e,s,c=new Promise((p,d)=>{if(typeof r!="number"||Math.sign(r)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(e.signal){let{signal:m}=e;m.aborted&&d(VJ(m)),m.addEventListener("abort",()=>{d(VJ(m))})}if(r===Number.POSITIVE_INFINITY){t.then(p,d);return}let h=new Uc;s=o.setTimeout.call(void 0,()=>{if(n){try{p(n())}catch(m){d(m)}return}typeof t.cancel=="function"&&t.cancel(),i===!1?p():i instanceof Error?d(i):(h.message=i??`Promise timed out after ${r} milliseconds`,d(h))},r),(async()=>{try{p(await t)}catch(m){d(m)}})()}).finally(()=>{c.clear()});return c.clear=()=>{o.clearTimeout.call(void 0,s),s=void 0},c}var rF=Symbol("resolveValue");async function Vf(t,e={}){let{interval:r=20,timeout:n=Number.POSITIVE_INFINITY,before:i=!0}=e,o,s=!1,a=new Promise((c,p)=>{let d=async()=>{try{let h=await t();if(typeof h=="object"&&h[rF])c(h[rF]);else{if(typeof h!="boolean")throw new TypeError("Expected condition to return a boolean");h===!0?c():s||(o=setTimeout(d,r))}}catch(h){p(h)}};i?d():o=setTimeout(d,r)});if(n===Number.POSITIVE_INFINITY)return a;try{return await tF(a,typeof n=="number"?{milliseconds:n}:n)}finally{s=!0,clearTimeout(o)}}Vf.resolveWith=t=>({[rF]:t});var WJ=t=>1e3*t;async function PBe({deviceCode:t,expiresIn:e},{signal:r}){try{let n=await Vf(async()=>{try{let s=await Tc.createToken({deviceCode:t});return Vf.resolveWith(s)}catch(s){if(s instanceof J_)return!1;throw s}},{interval:gr().waitForLoginInterval??WJ(3),timeout:{milliseconds:WJ(e),signal:r}}),i=await Tc.userInfo({accessToken:n.accessToken}),o={...n,userInfo:i};return await mA(),await YP(o),o}catch(n){throw n instanceof Uc?new Oe({code:Pe.DeviceCodeTimedOut()}):n}}async function zJ({refreshToken:t,userInfo:e}){let r=await Tc.renewToken({refreshToken:t});return(0,Hc.isType)(r,aT.TokenRenewed)&&await YP({...r.payload,userInfo:e}),r}async function FBe(){let t=await zP();return(0,Hc.match)(t,{Authenticated:e=>e,Unauthenticated:()=>null,Expired:async e=>{let r=await zJ(e);return(0,Hc.match)(r,{TokenRenewed:({payload:n})=>({...n,userInfo:e.userInfo}),RefreshTokenRevoked:(0,Hc.constant)(null)})}})}function $J({userInfo:t,...e}){let r=QP(1),n={...e};return{getAccessToken:()=>r(async()=>{if(XP(n))return n.accessToken;let i=await zJ({...n,userInfo:t});return(0,Hc.match)(i,{TokenRenewed:({payload:o})=>(n=o,n.accessToken),RefreshTokenRevoked:({cause:o})=>{throw new Oe({code:Pe.FailedToRenewAuthTokenRefreshTokenRevoked(),cause:o})}})}),getRefreshToken:()=>n.refreshToken,userInfo:t}}var vE={async isLoggedIn(){let t=await jJ.isLoggedIn();if(t)return t;let e=await FBe();return e?$J(e):null},async login({deviceCode:t,signal:e}){let r=await PBe(t,{signal:e});return $J(r)}};u();var KJ=F(ie(),1);u();var YJ=F(ie(),1),gA=(0,YJ.createContext)(null);function nF(){let t=(0,KJ.useContext)(gA);if(!t)throw new Error("useAuth() cannot be used without an <AuthProvider>");return t}u();function XJ(t){return{evid:5200,src:11,endpoint:"wix-cli",params:t}}function iF(t){return{evid:5201,src:11,endpoint:"wix-cli",params:t}}function JJ(t){return{evid:5211,src:11,endpoint:"wix-cli",params:t}}function oF(t){return{evid:5212,src:11,endpoint:"wix-cli",params:t}}u();var CM=F(ie(),1);u();u();u();var lZ=F(ie(),1);u();var un=F(ie(),1);u();var tZ=F(QJ()),LBe=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function eZ(t){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},r=t.match(/<\/?([^\s]+?)[/\s>]/);if(r&&(e.name=r[1],(tZ.default[r[1]]||t.charAt(t.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var n=t.indexOf("-->");return{type:"comment",comment:n!==-1?t.slice(4,n):""}}for(var i=new RegExp(LBe),o=null;(o=i.exec(t))!==null;)if(o[0].trim())if(o[1]){var s=o[1].trim(),a=[s,""];s.indexOf("=")>-1&&(a=s.split("=")),e.attrs[a[0]]=a[1],i.lastIndex--}else o[2]&&(e.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return e}var MBe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,kBe=/^\s*$/,BBe=Object.create(null);function rZ(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?function(r){var n=[];for(var i in r)n.push(i+'="'+r[i]+'"');return n.length?" "+n.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(rZ,"")+"</"+e.name+">";case"comment":return t+"<!--"+e.comment+"-->"}}var UBe={parse:function(t,e){e||(e={}),e.components||(e.components=BBe);var r,n=[],i=[],o=-1,s=!1;if(t.indexOf("<")!==0){var a=t.indexOf("<");n.push({type:"text",content:a===-1?t:t.substring(0,a)})}return t.replace(MBe,function(c,p){if(s){if(c!=="</"+r.name+">")return;s=!1}var d,h=c.charAt(1)!=="/",m=c.startsWith("<!--"),y=p+c.length,S=t.charAt(y);if(m){var T=eZ(c);return o<0?(n.push(T),n):((d=i[o]).children.push(T),n)}if(h&&(o++,(r=eZ(c)).type==="tag"&&e.components[r.name]&&(r.type="component",s=!0),r.voidElement||s||!S||S==="<"||r.children.push({type:"text",content:t.slice(y,t.indexOf("<",y))}),o===0&&n.push(r),(d=i[o-1])&&d.children.push(r),i[o]=r),(!h||r.voidElement)&&(o>-1&&(r.voidElement||r.name===c.slice(2,-1))&&(o--,r=o===-1?n:i[o]),!s&&S!=="<"&&S)){d=o===-1?n:i[o].children;var x=t.indexOf("<",y),O=t.slice(y,x===-1?void 0:x);kBe.test(O)&&(O=" "),(x>-1&&o+d.length>=0||O!==" ")&&d.push({type:"text",content:O})}}),n},stringify:function(t){return t.reduce(function(e,r){return e+rZ("",r)},"")}},nZ=UBe;u();function SE(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}var iZ={};function Ah(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];typeof e[0]=="string"&&iZ[e[0]]||(typeof e[0]=="string"&&(iZ[e[0]]=new Date),SE(...e))}var oZ=(t,e)=>()=>{if(t.isInitialized)e();else{let r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}};function sF(t,e,r){t.loadNamespaces(e,oZ(t,r))}function aF(t,e,r,n){typeof r=="string"&&(r=[r]),r.forEach(i=>{t.options.ns.indexOf(i)<0&&t.options.ns.push(i)}),t.loadLanguages(e,oZ(t,n))}function HBe(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=e.languages[0],i=e.options?e.options.fallbackLng:!1,o=e.languages[e.languages.length-1];if(n.toLowerCase()==="cimode")return!0;let s=(a,c)=>{let p=e.services.backendConnector.state[`${a}|${c}`];return p===-1||p===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!s(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(n,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||s(n,t)&&(!i||s(o,t)))}function sZ(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(Ah("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:r.lng,precheck:(i,o)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,t))return!1}}):HBe(t,e,r)}u();u();var qBe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,jBe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},GBe=t=>jBe[t],aZ=t=>t.replace(qBe,GBe);var uF={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:aZ};function _A(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};uF={...uF,...t}}function Ch(){return uF}u();var uZ;function EA(t){uZ=t}function uu(){return uZ}function cF(t,e){if(!t)return!1;let r=t.props?t.props.children:t.children;return e?r.length>0:!!r}function lF(t){if(!t)return[];let e=t.props?t.props.children:t.children;return t.props&&t.props.i18nIsDynamicList?xh(e):e}function VBe(t){return Object.prototype.toString.call(t)!=="[object Array]"?!1:t.every(e=>(0,un.isValidElement)(e))}function xh(t){return Array.isArray(t)?t:[t]}function WBe(t,e){let r={...e};return r.props=Object.assign(t.props,e.props),r}function fF(t,e){if(!t)return"";let r="",n=xh(t),i=e.transSupportBasicHtmlNodes&&e.transKeepBasicHtmlNodesFor?e.transKeepBasicHtmlNodesFor:[];return n.forEach((o,s)=>{if(typeof o=="string")r+=`${o}`;else if((0,un.isValidElement)(o)){let a=Object.keys(o.props).length,c=i.indexOf(o.type)>-1,p=o.props.children;if(!p&&c&&a===0)r+=`<${o.type}/>`;else if(!p&&(!c||a!==0))r+=`<${s}></${s}>`;else if(o.props.i18nIsDynamicList)r+=`<${s}></${s}>`;else if(c&&a===1&&typeof p=="string")r+=`<${o.type}>${p}</${o.type}>`;else{let d=fF(p,e);r+=`<${s}>${d}</${s}>`}}else if(o===null)SE("Trans: the passed in value is invalid - seems you passed in a null child.");else if(typeof o=="object"){let{format:a,...c}=o,p=Object.keys(c);if(p.length===1){let d=a?`${p[0]}, ${a}`:p[0];r+=`{{${d}}}`}else SE("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",o)}else SE("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",o)}),r}function $Be(t,e,r,n,i,o){if(e==="")return[];let s=n.transKeepBasicHtmlNodesFor||[],a=e&&new RegExp(s.map(x=>`<${x}`).join("|")).test(e);if(!t&&!a&&!o)return[e];let c={};function p(x){xh(x).forEach(N=>{typeof N!="string"&&(cF(N)?p(lF(N)):typeof N=="object"&&!(0,un.isValidElement)(N)&&Object.assign(c,N))})}p(t);let d=nZ.parse(`<0>${e}</0>`),h={...c,...i};function m(x,O,N){let I=lF(x),P=S(I,O.children,N);return VBe(I)&&P.length===0||x.props&&x.props.i18nIsDynamicList?I:P}function y(x,O,N,I,P){x.dummy?(x.children=O,N.push((0,un.cloneElement)(x,{key:I},P?void 0:O))):N.push(...un.Children.map([x],k=>{let j={...k.props};return delete j.i18nIsDynamicList,(0,un.createElement)(k.type,{...j,key:I,ref:k.ref},P?null:O)}))}function S(x,O,N){let I=xh(x);return xh(O).reduce((k,j,G)=>{let oe=j.children&&j.children[0]&&j.children[0].content&&r.services.interpolator.interpolate(j.children[0].content,h,r.language);if(j.type==="tag"){let K=I[parseInt(j.name,10)];N.length===1&&!K&&(K=N[0][j.name]),K||(K={});let ue=Object.keys(j.attrs).length!==0?WBe({props:j.attrs},K):K,M=(0,un.isValidElement)(ue),ce=M&&cF(j,!0)&&!j.voidElement,me=a&&typeof ue=="object"&&ue.dummy&&!M,Se=typeof t=="object"&&t!==null&&Object.hasOwnProperty.call(t,j.name);if(typeof ue=="string"){let H=r.services.interpolator.interpolate(ue,h,r.language);k.push(H)}else if(cF(ue)||ce){let H=m(ue,j,N);y(ue,H,k,G)}else if(me){let H=S(I,j.children,N);y(ue,H,k,G)}else if(Number.isNaN(parseFloat(j.name)))if(Se){let H=m(ue,j,N);y(ue,H,k,G,j.voidElement)}else if(n.transSupportBasicHtmlNodes&&s.indexOf(j.name)>-1)if(j.voidElement)k.push((0,un.createElement)(j.name,{key:`${j.name}-${G}`}));else{let H=S(I,j.children,N);k.push((0,un.createElement)(j.name,{key:`${j.name}-${G}`},H))}else if(j.voidElement)k.push(`<${j.name} />`);else{let H=S(I,j.children,N);k.push(`<${j.name}>${H}</${j.name}>`)}else if(typeof ue=="object"&&!M){let H=j.children[0]?oe:null;H&&k.push(H)}else y(ue,oe,k,G,j.children.length!==1||!oe)}else if(j.type==="text"){let K=n.transWrapTextNodes,ue=o?n.unescape(r.services.interpolator.interpolate(j.content,h,r.language)):r.services.interpolator.interpolate(j.content,h,r.language);K?k.push((0,un.createElement)(K,{key:`${j.name}-${G}`},ue)):k.push(ue)}return k},[])}let T=S([{dummy:!0,children:t||[]}],d,xh(t||[]));return lF(T[0])}function pF(t){let{children:e,count:r,parent:n,i18nKey:i,context:o,tOptions:s={},values:a,defaults:c,components:p,ns:d,i18n:h,t:m,shouldUnescape:y,...S}=t,T=h||uu();if(!T)return Ah("You will need to pass in an i18next instance by using i18nextReactModule"),e;let x=m||T.t.bind(T)||(ce=>ce),O={...Ch(),...T.options&&T.options.react},N=d||x.ns||T.options&&T.options.defaultNS;N=typeof N=="string"?[N]:N||["translation"];let I=fF(e,O),P=c||I||O.transEmptyNodeValue||i,{hashTransKey:k}=O,j=i||(k?k(I||P):I||P);T.options&&T.options.interpolation&&T.options.interpolation.defaultVariables&&(a=a&&Object.keys(a).length>0?{...a,...T.options.interpolation.defaultVariables}:{...T.options.interpolation.defaultVariables});let G=a||r!==void 0||!e?s.interpolation:{interpolation:{...s.interpolation,prefix:"#$?",suffix:"?$#"}},oe={...s,context:o||s.context,count:r,...a,...G,defaultValue:P,ns:N},K=j?x(j,oe):P;p&&Object.keys(p).forEach(ce=>{let me=p[ce];if(typeof me.type=="function"||!me.props||!me.props.children||K.indexOf(`${ce}/>`)<0&&K.indexOf(`${ce} />`)<0)return;function Se(){return(0,un.createElement)(un.Fragment,null,me)}p[ce]=(0,un.createElement)(Se)});let ue=$Be(p||e,K,T,O,oe,y),M=n!==void 0?n:O.defaultTransParent;return M?(0,un.createElement)(M,S,ue):ue}u();var cZ=F(ie(),1);u();var yA={type:"3rdParty",init(t){_A(t.options.react),EA(t)}};var qc=(0,cZ.createContext)(),DA=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}};function Rt(t){let{children:e,count:r,parent:n,i18nKey:i,context:o,tOptions:s={},values:a,defaults:c,components:p,ns:d,i18n:h,t:m,shouldUnescape:y,...S}=t,{i18n:T,defaultNS:x}=(0,lZ.useContext)(qc)||{},O=h||T||uu(),N=m||O&&O.t.bind(O);return pF({children:e,count:r,parent:n,i18nKey:i,context:o,tOptions:s,values:a,defaults:c,components:p,ns:d||N&&N.ns||x||O&&O.options&&O.options.defaultNS,i18n:O,t:m,shouldUnescape:y,...S})}u();var io=F(ie(),1);var zBe=(t,e)=>{let r=(0,io.useRef)();return(0,io.useEffect)(()=>{r.current=e?r.current:t},[t,e]),r.current};function fZ(t,e,r,n){return t.getFixedT(e,r,n)}function YBe(t,e,r,n){return(0,io.useCallback)(fZ(t,e,r,n),[t,e,r,n])}function lt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{i18n:r}=e,{i18n:n,defaultNS:i}=(0,io.useContext)(qc)||{},o=r||n||uu();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new DA),!o){Ah("You will need to pass in an i18next instance by using initReactI18next");let P=(j,G)=>typeof G=="string"?G:G&&typeof G=="object"&&typeof G.defaultValue=="string"?G.defaultValue:Array.isArray(j)?j[j.length-1]:j,k=[P,{},!1];return k.t=P,k.i18n={},k.ready=!1,k}o.options.react&&o.options.react.wait!==void 0&&Ah("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");let s={...Ch(),...o.options.react,...e},{useSuspense:a,keyPrefix:c}=s,p=t||i||o.options&&o.options.defaultNS;p=typeof p=="string"?[p]:p||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(p);let d=(o.isInitialized||o.initializedStoreOnce)&&p.every(P=>sZ(P,o,s)),h=YBe(o,e.lng||null,s.nsMode==="fallback"?p:p[0],c),m=()=>h,y=()=>fZ(o,e.lng||null,s.nsMode==="fallback"?p:p[0],c),[S,T]=(0,io.useState)(m),x=p.join();e.lng&&(x=`${e.lng}${x}`);let O=zBe(x),N=(0,io.useRef)(!0);(0,io.useEffect)(()=>{let{bindI18n:P,bindI18nStore:k}=s;N.current=!0,!d&&!a&&(e.lng?aF(o,e.lng,p,()=>{N.current&&T(y)}):sF(o,p,()=>{N.current&&T(y)})),d&&O&&O!==x&&N.current&&T(y);function j(){N.current&&T(y)}return P&&o&&o.on(P,j),k&&o&&o.store.on(k,j),()=>{N.current=!1,P&&o&&P.split(" ").forEach(G=>o.off(G,j)),k&&o&&k.split(" ").forEach(G=>o.store.off(G,j))}},[o,x]),(0,io.useEffect)(()=>{N.current&&d&&T(m)},[o,c,d]);let I=[S,o,d];if(I.t=S,I.i18n=o,I.ready=d,d||!d&&!a)return I;throw new Promise(P=>{e.lng?aF(o,e.lng,p,()=>P()):sF(o,p,()=>P())})}u();var pZ=F(ie(),1);u();u();var vA=F(ie(),1);function dF(t){let{i18n:e,defaultNS:r,children:n}=t,i=(0,vA.useMemo)(()=>({i18n:e,defaultNS:r}),[e,r]);return(0,vA.createElement)(qc.Provider,{value:i},n)}u();var QBe=F(ie(),1);u();var XBe=F(ie(),1);u();u();u();function dZ(t,e,r){function n(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!t||typeof t=="string"}for(var o=typeof e!="string"?[].concat(e):e.split(".");o.length>1;){if(i())return{};var s=n(o.shift());!t[s]&&r&&(t[s]=new r),t=t[s]}return i()?{}:{obj:t,k:n(o.shift())}}function hZ(t,e,r){var n=dZ(t,e,Object),i=n.obj,o=n.k;i[o]=r}function mZ(t,e){var r=dZ(t,e),n=r.obj,i=r.k;if(n)return n[i]}var gZ=[],eUe=gZ.forEach,tUe=gZ.slice;function _Z(t){return eUe.call(tUe.call(arguments,1),function(e){if(e)for(var r in e)t[r]===void 0&&(t[r]=e[r])}),t}u();u();Es();u();Es();u();var Tt;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Tt||(Tt={}));u();Es();u();var or;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(or||(or={}));var Wf;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(Wf||(Wf={}));function hF(t){return t.type===or.literal}function EZ(t){return t.type===or.argument}function SA(t){return t.type===or.number}function TA(t){return t.type===or.date}function AA(t){return t.type===or.time}function CA(t){return t.type===or.select}function xA(t){return t.type===or.plural}function yZ(t){return t.type===or.pound}function OA(t){return t.type===or.tag}function bA(t){return!!(t&&typeof t=="object"&&t.type===Wf.number)}function TE(t){return!!(t&&typeof t=="object"&&t.type===Wf.dateTime)}u();var mF=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;u();u();var nUe=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function DZ(t){var e={};return t.replace(nUe,function(r){var n=r.length;switch(r[0]){case"G":e.era=n===4?"long":n===5?"narrow":"short";break;case"y":e.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][n-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][n-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][n-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][n-1];break;case"s":e.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}u();Es();u();var vZ=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function CZ(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(vZ).filter(function(m){return m.length>0}),r=[],n=0,i=e;n<i.length;n++){var o=i[n],s=o.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],c=s.slice(1),p=0,d=c;p<d.length;p++){var h=d[p];if(h.length===0)throw new Error("Invalid number skeleton")}r.push({stem:a,options:c})}return r}function iUe(t){return t.replace(/^(.*?)-/,"")}var SZ=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,xZ=/^(@+)?(\+|#+)?[rs]?$/g,oUe=/(\*)(0+)|(#+)(0+)|(0+)/g,OZ=/^(0+)$/;function TZ(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(xZ,function(r,n,i){return typeof i!="string"?(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length):i==="+"?e.minimumSignificantDigits=n.length:n[0]==="#"?e.maximumSignificantDigits=n.length:(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),e}function bZ(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function sUe(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var r=t.slice(0,2);if(r==="+!"?(e.signDisplay="always",t=t.slice(2)):r==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!OZ.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function AZ(t){var e={},r=bZ(t);return r||e}function RZ(t){for(var e={},r=0,n=t;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=i.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=iUe(i.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=ft(ft(ft({},e),{notation:"scientific"}),i.options.reduce(function(c,p){return ft(ft({},c),AZ(p))},{}));continue;case"engineering":e=ft(ft(ft({},e),{notation:"engineering"}),i.options.reduce(function(c,p){return ft(ft({},c),AZ(p))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(oUe,function(c,p,d,h,m,y){if(p)e.minimumIntegerDigits=d.length;else{if(h&&m)throw new Error("We currently do not support maximum integer digits");if(y)throw new Error("We currently do not support exact integer digits")}return""});continue}if(OZ.test(i.stem)){e.minimumIntegerDigits=i.stem.length;continue}if(SZ.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(SZ,function(c,p,d,h,m,y){return d==="*"?e.minimumFractionDigits=p.length:h&&h[0]==="#"?e.maximumFractionDigits=h.length:m&&y?(e.minimumFractionDigits=m.length,e.maximumFractionDigits=m.length+y.length):(e.minimumFractionDigits=p.length,e.maximumFractionDigits=p.length),""});var o=i.options[0];o==="w"?e=ft(ft({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=ft(ft({},e),TZ(o)));continue}if(xZ.test(i.stem)){e=ft(ft({},e),TZ(i.stem));continue}var s=bZ(i.stem);s&&(e=ft(ft({},e),s));var a=sUe(i.stem);a&&(e=ft(ft({},e),a))}return e}u();u();var AE={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function IZ(t,e){for(var r="",n=0;n<t.length;n++){var i=t.charAt(n);if(i==="j"){for(var o=0;n+1<t.length&&t.charAt(n+1)===i;)o++,n++;var s=1+(o&1),a=o<2?1:3+(o>>1),c="a",p=aUe(e);for((p=="H"||p=="k")&&(a=0);a-- >0;)r+=c;for(;s-- >0;)r=p+r}else i==="J"?r+="H":r+=i}return r}function aUe(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=t.language,n;r!=="root"&&(n=t.maximize().region);var i=AE[n||""]||AE[r||""]||AE["".concat(r,"-001")]||AE["001"];return i[0]}var gF,uUe=new RegExp("^".concat(mF.source,"*")),cUe=new RegExp("".concat(mF.source,"*$"));function It(t,e){return{start:t,end:e}}var lUe=!!String.prototype.startsWith&&"_a".startsWith("a",1),fUe=!!String.fromCodePoint,pUe=!!Object.fromEntries,dUe=!!String.prototype.codePointAt,hUe=!!String.prototype.trimStart,mUe=!!String.prototype.trimEnd,gUe=!!Number.isSafeInteger,_Ue=gUe?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},EF=!0;try{wZ=LZ("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),EF=((gF=wZ.exec("a"))===null||gF===void 0?void 0:gF[0])==="a"}catch{EF=!1}var wZ,NZ=lUe?function(e,r,n){return e.startsWith(r,n)}:function(e,r,n){return e.slice(n,n+r.length)===r},yF=fUe?String.fromCodePoint:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];for(var n="",i=e.length,o=0,s;i>o;){if(s=e[o++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},PZ=pUe?Object.fromEntries:function(e){for(var r={},n=0,i=e;n<i.length;n++){var o=i[n],s=o[0],a=o[1];r[s]=a}return r},FZ=dUe?function(e,r){return e.codePointAt(r)}:function(e,r){var n=e.length;if(!(r<0||r>=n)){var i=e.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},EUe=hUe?function(e){return e.trimStart()}:function(e){return e.replace(uUe,"")},yUe=mUe?function(e){return e.trimEnd()}:function(e){return e.replace(cUe,"")};function LZ(t,e){return new RegExp(t,e)}var DF;EF?(_F=LZ("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),DF=function(e,r){var n;_F.lastIndex=r;var i=_F.exec(e);return(n=i[1])!==null&&n!==void 0?n:""}):DF=function(e,r){for(var n=[];;){var i=FZ(e,r);if(i===void 0||kZ(i)||SUe(i))break;n.push(i),r+=i>=65536?2:1}return yF.apply(void 0,n)};var _F,MZ=function(){function t(e,r){r===void 0&&(r={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(e,n);if(s.err)return s;i.push(s.val)}else{if(o===125&&e>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:or.pound,location:It(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(Tt.UNMATCHED_CLOSING_TAG,It(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&vF(this.peek()||0)){var s=this.parseTag(e,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(e,r);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},t.prototype.parseTag=function(e,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:or.literal,value:"<".concat(i,"/>"),location:It(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,r,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!vF(this.char()))return this.error(Tt.INVALID_TAG,It(a,this.clonePosition()));var c=this.clonePosition(),p=this.parseTagName();return i!==p?this.error(Tt.UNMATCHED_CLOSING_TAG,It(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:or.tag,value:i,children:s,location:It(n,this.clonePosition())},err:null}:this.error(Tt.INVALID_TAG,It(a,this.clonePosition())))}else return this.error(Tt.UNCLOSED_TAG,It(n,this.clonePosition()))}else return this.error(Tt.INVALID_TAG,It(n,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&vUe(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var s=this.tryParseUnquoted(e,r);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var c=It(n,this.clonePosition());return{val:{type:or.literal,value:i,location:c},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!DUe(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return yF.apply(void 0,r)},t.prototype.tryParseUnquoted=function(e,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&e>0?null:(this.bump(),yF(n))},t.prototype.parseArgument=function(e,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Tt.EXPECT_ARGUMENT_CLOSING_BRACE,It(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Tt.EMPTY_ARGUMENT,It(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Tt.MALFORMED_ARGUMENT,It(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Tt.EXPECT_ARGUMENT_CLOSING_BRACE,It(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:or.argument,value:i,location:It(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Tt.EXPECT_ARGUMENT_CLOSING_BRACE,It(n,this.clonePosition())):this.parseArgumentOptions(e,r,i,n);default:return this.error(Tt.MALFORMED_ARGUMENT,It(n,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),r=this.offset(),n=DF(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),s=It(e,o);return{value:n,location:s}},t.prototype.parseArgumentOptions=function(e,r,n,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(a){case"":return this.error(Tt.EXPECT_ARGUMENT_TYPE,It(s,c));case"number":case"date":case"time":{this.bumpSpace();var p=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var m=yUe(h.val);if(m.length===0)return this.error(Tt.EXPECT_ARGUMENT_STYLE,It(this.clonePosition(),this.clonePosition()));var y=It(d,this.clonePosition());p={style:m,styleLocation:y}}var S=this.tryParseArgumentClose(i);if(S.err)return S;var T=It(i,this.clonePosition());if(p&&NZ(p?.style,"::",0)){var x=EUe(p.style.slice(2));if(a==="number"){var h=this.parseNumberSkeletonFromString(x,p.styleLocation);return h.err?h:{val:{type:or.number,value:n,location:T,style:h.val},err:null}}else{if(x.length===0)return this.error(Tt.EXPECT_DATE_TIME_SKELETON,T);var O=x;this.locale&&(O=IZ(x,this.locale));var m={type:Wf.dateTime,pattern:O,location:p.styleLocation,parsedOptions:this.shouldParseSkeletons?DZ(O):{}},N=a==="date"?or.date:or.time;return{val:{type:N,value:n,location:T,style:m},err:null}}}return{val:{type:a==="number"?or.number:a==="date"?or.date:or.time,value:n,location:T,style:(o=p?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var I=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Tt.EXPECT_SELECT_ARGUMENT_OPTIONS,It(I,ft({},I)));this.bumpSpace();var P=this.parseIdentifierIfPossible(),k=0;if(a!=="select"&&P.value==="offset"){if(!this.bumpIf(":"))return this.error(Tt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,It(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(Tt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Tt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),P=this.parseIdentifierIfPossible(),k=h.val}var j=this.tryParsePluralOrSelectOptions(e,a,r,P);if(j.err)return j;var S=this.tryParseArgumentClose(i);if(S.err)return S;var G=It(i,this.clonePosition());return a==="select"?{val:{type:or.select,value:n,options:PZ(j.val),location:G},err:null}:{val:{type:or.plural,value:n,options:PZ(j.val),offset:k,pluralType:a==="plural"?"cardinal":"ordinal",location:G},err:null}}default:return this.error(Tt.INVALID_ARGUMENT_TYPE,It(s,c))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(Tt.EXPECT_ARGUMENT_CLOSING_BRACE,It(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Tt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,It(i,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(e,r){var n=[];try{n=CZ(e)}catch{return this.error(Tt.INVALID_NUMBER_SKELETON,r)}return{val:{type:Wf.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?RZ(n):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,r,n,i){for(var o,s=!1,a=[],c=new Set,p=i.value,d=i.location;;){if(p.length===0){var h=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(Tt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Tt.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;d=It(h,this.clonePosition()),p=this.message.slice(h.offset,this.offset())}else break}if(c.has(p))return this.error(r==="select"?Tt.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Tt.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);p==="other"&&(s=!0),this.bumpSpace();var y=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?Tt.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Tt.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,It(this.clonePosition(),this.clonePosition()));var S=this.parseMessage(e+1,r,n);if(S.err)return S;var T=this.tryParseArgumentClose(y);if(T.err)return T;a.push([p,{value:S.val,location:It(y,this.clonePosition())}]),c.add(p),this.bumpSpace(),o=this.parseIdentifierIfPossible(),p=o.value,d=o.location}return a.length===0?this.error(r==="select"?Tt.EXPECT_SELECT_ARGUMENT_SELECTOR:Tt.EXPECT_PLURAL_ARGUMENT_SELECTOR,It(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Tt.MISSING_OTHER_CLAUSE,It(this.clonePosition(),this.clonePosition())):{val:a,err:null}},t.prototype.tryParseDecimalInteger=function(e,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var c=It(i,this.clonePosition());return o?(s*=n,_Ue(s)?{val:s,err:null}:this.error(r,c)):this.error(e,c)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var r=FZ(this.message,e);if(r===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return r},t.prototype.error=function(e,r){return{val:null,err:{kind:e,message:this.message,location:r}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(NZ(this.message,e,this.offset())){for(var r=0;r<e.length;r++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var r=this.offset(),n=this.message.indexOf(e,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var r=this.offset();if(r===e)break;if(r>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&kZ(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(e>=65536?2:1));return n??null},t}();function vF(t){return t>=97&&t<=122||t>=65&&t<=90}function DUe(t){return vF(t)||t===47}function vUe(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function kZ(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function SUe(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function SF(t){t.forEach(function(e){if(delete e.location,CA(e)||xA(e))for(var r in e.options)delete e.options[r].location,SF(e.options[r].value);else SA(e)&&bA(e.style)||(TA(e)||AA(e))&&TE(e.style)?delete e.style.location:OA(e)&&SF(e.children)})}function BZ(t,e){e===void 0&&(e={}),e=ft({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var r=new MZ(t,e).parse();if(r.err){var n=SyntaxError(Tt[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return e?.captureLocation||SF(r.val),r.val}u();function RA(t,e){var r=e&&e.cache?e.cache:bUe,n=e&&e.serializer?e.serializer:OUe,i=e&&e.strategy?e.strategy:AUe;return i(t,{cache:r,serializer:n})}function TUe(t){return t==null||typeof t=="number"||typeof t=="boolean"}function UZ(t,e,r,n){var i=TUe(n)?n:r(n),o=e.get(i);return typeof o>"u"&&(o=t.call(this,n),e.set(i,o)),o}function HZ(t,e,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=e.get(i);return typeof o>"u"&&(o=t.apply(this,n),e.set(i,o)),o}function TF(t,e,r,n,i){return r.bind(e,t,n,i)}function AUe(t,e){var r=t.length===1?UZ:HZ;return TF(t,this,r,e.cache.create(),e.serializer)}function CUe(t,e){return TF(t,this,HZ,e.cache.create(),e.serializer)}function xUe(t,e){return TF(t,this,UZ,e.cache.create(),e.serializer)}var OUe=function(){return JSON.stringify(arguments)};function AF(){this.cache=Object.create(null)}AF.prototype.get=function(t){return this.cache[t]};AF.prototype.set=function(t,e){this.cache[t]=e};var bUe={create:function(){return new AF}},IA={variadic:CUe,monadic:xUe};u();u();Es();var $f;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})($f||($f={}));var CE=function(t){xf(e,t);function e(r,n,i){var o=t.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error);var CF=function(t){xf(e,t);function e(r,n,i,o){return t.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),$f.INVALID_VALUE,o)||this}return e}(CE);var qZ=function(t){xf(e,t);function e(r,n,i){return t.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),$f.INVALID_VALUE,i)||this}return e}(CE);var jZ=function(t){xf(e,t);function e(r,n){return t.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),$f.MISSING_VALUE,n)||this}return e}(CE);var Jn;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(Jn||(Jn={}));function RUe(t){return t.length<2?t:t.reduce(function(e,r){var n=e[e.length-1];return!n||n.type!==Jn.literal||r.type!==Jn.literal?e.push(r):n.value+=r.value,e},[])}function IUe(t){return typeof t=="function"}function xE(t,e,r,n,i,o,s){if(t.length===1&&hF(t[0]))return[{type:Jn.literal,value:t[0].value}];for(var a=[],c=0,p=t;c<p.length;c++){var d=p[c];if(hF(d)){a.push({type:Jn.literal,value:d.value});continue}if(yZ(d)){typeof o=="number"&&a.push({type:Jn.literal,value:r.getNumberFormat(e).format(o)});continue}var h=d.value;if(!(i&&h in i))throw new jZ(h,s);var m=i[h];if(EZ(d)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),a.push({type:typeof m=="string"?Jn.literal:Jn.object,value:m});continue}if(TA(d)){var y=typeof d.style=="string"?n.date[d.style]:TE(d.style)?d.style.parsedOptions:void 0;a.push({type:Jn.literal,value:r.getDateTimeFormat(e,y).format(m)});continue}if(AA(d)){var y=typeof d.style=="string"?n.time[d.style]:TE(d.style)?d.style.parsedOptions:n.time.medium;a.push({type:Jn.literal,value:r.getDateTimeFormat(e,y).format(m)});continue}if(SA(d)){var y=typeof d.style=="string"?n.number[d.style]:bA(d.style)?d.style.parsedOptions:void 0;y&&y.scale&&(m=m*(y.scale||1)),a.push({type:Jn.literal,value:r.getNumberFormat(e,y).format(m)});continue}if(OA(d)){var S=d.children,T=d.value,x=i[T];if(!IUe(x))throw new qZ(T,"function",s);var O=xE(S,e,r,n,i,o),N=x(O.map(function(k){return k.value}));Array.isArray(N)||(N=[N]),a.push.apply(a,N.map(function(k){return{type:typeof k=="string"?Jn.literal:Jn.object,value:k}}))}if(CA(d)){var I=d.options[m]||d.options.other;if(!I)throw new CF(d.value,m,Object.keys(d.options),s);a.push.apply(a,xE(I.value,e,r,n,i));continue}if(xA(d)){var I=d.options["=".concat(m)];if(!I){if(!Intl.PluralRules)throw new CE(`Intl.PluralRules is not available in this environment.
173
173
  Try polyfilling it using "@formatjs/intl-pluralrules"
174
174
  `,$f.MISSING_INTL_API,s);var P=r.getPluralRules(e,{type:d.pluralType}).select(m-(d.offset||0));I=d.options[P]||d.options.other}if(!I)throw new CF(d.value,m,Object.keys(d.options),s);a.push.apply(a,xE(I.value,e,r,n,i,m-(d.offset||0)));continue}}return RUe(a)}function wUe(t,e){return e?ft(ft(ft({},t||{}),e||{}),Object.keys(t).reduce(function(r,n){return r[n]=ft(ft({},t[n]),e[n]||{}),r},{})):t}function NUe(t,e){return e?Object.keys(t).reduce(function(r,n){return r[n]=wUe(t[n],e[n]),r},ft({},t)):t}function xF(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,r){t[e]=r}}}}}function PUe(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:RA(function(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,jd([void 0],r,!1)))},{cache:xF(t.number),strategy:IA.variadic}),getDateTimeFormat:RA(function(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,jd([void 0],r,!1)))},{cache:xF(t.dateTime),strategy:IA.variadic}),getPluralRules:RA(function(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,jd([void 0],r,!1)))},{cache:xF(t.pluralRules),strategy:IA.variadic})}}var GZ=function(){function t(e,r,n,i){var o=this;if(r===void 0&&(r=t.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(p){var d=o.formatToParts(p);if(d.length===1)return d[0].value;var h=d.reduce(function(m,y){return!m.length||y.type!==Jn.literal||typeof m[m.length-1]!="string"?m.push(y.value):m[m.length-1]+=y.value,m},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(p){return xE(o.ast,o.locales,o.formatters,o.formats,p,void 0,o.message)},this.resolvedOptions=function(){var p;return{locale:((p=o.resolvedLocale)===null||p===void 0?void 0:p.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=r,this.resolvedLocale=t.resolveLocale(r),typeof e=="string"){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{},a=s.formatters,c=N0(s,["formatters"]);this.ast=t.__parse(e,ft(ft({},c),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=NUe(t.formats,n),this.formatters=i&&i.formatters||PUe(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(e){if(!(typeof Intl.Locale>"u")){var r=Intl.NumberFormat.supportedLocalesOf(e);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof e=="string"?e:e[0])}},t.__parse=BZ,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}();var OF=GZ;function VZ(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function WZ(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?VZ(Object(r),!0).forEach(function(n){FUe(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):VZ(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function FUe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function LUe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $Z(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function MUe(t,e,r){return e&&$Z(t.prototype,e),r&&$Z(t,r),t}function kUe(){return{memoize:!0,memoizeFallback:!1,bindI18n:"",bindI18nStore:"",parseErrorHandler:function(e,r,n,i){return n},parseLngForICU:function(e){return e}}}var zZ=function(){function t(e){LUe(this,t),this.type="i18nFormat",this.mem={},this.init(null,e)}return MUe(t,[{key:"init",value:function(r,n){var i=this,o=r&&r.options&&r.options.i18nFormat||{};if(this.options=_Z(o,n,this.options||{},kUe()),this.formats=this.options.formats,r){var s=this.options,a=s.bindI18n,c=s.bindI18nStore,p=s.memoize;r.IntlMessageFormat=OF,r.ICU=this,p&&(a&&r.on(a,function(){return i.clearCache()}),c&&r.store.on(c,function(){return i.clearCache()}))}}},{key:"addUserDefinedFormats",value:function(r){this.formats=this.formats?WZ(WZ({},this.formats),r):r}},{key:"parse",value:function(r,n,i,o,s,a){var c=a&&a.resolved&&a.resolved.res,p=this.options.memoize&&"".concat(i,".").concat(o,".").concat(s.replace(/\./g,"###")),d;this.options.memoize&&(d=mZ(this.mem,p));try{if(!d){var h=this.options.parseLngForICU(i);d=new OF(r,h,this.formats,{ignoreTag:!0}),this.options.memoize&&(this.options.memoizeFallback||!a||c)&&hZ(this.mem,p,d)}return d.format(n)}catch(m){return this.options.parseErrorHandler(m,s,r,n)}}},{key:"addLookupKeys",value:function(r,n,i,o,s){return r}},{key:"clearCache",value:function(){this.mem={}}}]),t}();zZ.type="i18nFormat";var YZ=zZ;u();var BUe={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}},RF=class t{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||BUe,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}warn(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}error(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"error","")}deprecate(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,n,i){return i&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new t(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new t(this.logger,e)}},aa=new RF,Rh=class{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);let i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(s=>{let[a,c]=s;for(let p=0;p<c;p++)a(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[a,c]=s;for(let p=0;p<c;p++)a.apply(a,[e,...n])})}};function OE(){let t,e,r=new Promise((n,i)=>{t=n,e=i});return r.resolve=t,r.reject=e,r}function KZ(t){return t==null?"":""+t}function UUe(t,e,r){t.forEach(n=>{e[n]&&(r[n]=e[n])})}var HUe=/###/g;function bE(t,e,r){function n(a){return a&&a.indexOf("###")>-1?a.replace(HUe,"."):a}function i(){return!t||typeof t=="string"}let o=typeof e!="string"?e:e.split("."),s=0;for(;s<o.length-1;){if(i())return{};let a=n(o[s]);!t[a]&&r&&(t[a]=new r),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++s}return i()?{}:{obj:t,k:n(o[s])}}function XZ(t,e,r){let{obj:n,k:i}=bE(t,e,Object);if(n!==void 0||e.length===1){n[i]=r;return}let o=e[e.length-1],s=e.slice(0,e.length-1),a=bE(t,s,Object);for(;a.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=bE(t,s,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=r}function qUe(t,e,r,n){let{obj:i,k:o}=bE(t,e,Object);i[o]=i[o]||[],n&&(i[o]=i[o].concat(r)),n||i[o].push(r)}function NA(t,e){let{obj:r,k:n}=bE(t,e);if(r)return r[n]}function jUe(t,e,r){let n=NA(t,r);return n!==void 0?n:NA(e,r)}function rQ(t,e,r){for(let n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?typeof t[n]=="string"||t[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?r&&(t[n]=e[n]):rQ(t[n],e[n],r):t[n]=e[n]);return t}function Oh(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var GUe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function VUe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>GUe[e]):t}var IF=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let r=this.regExpMap.get(e);if(r!==void 0)return r;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},WUe=[" ",",","?","!",";"],$Ue=new IF(20);function zUe(t,e,r){e=e||"",r=r||"";let n=WUe.filter(s=>e.indexOf(s)<0&&r.indexOf(s)<0);if(n.length===0)return!0;let i=$Ue.getRegExp(`(${n.map(s=>s==="?"?"\\?":s).join("|")})`),o=!i.test(t);if(!o){let s=t.indexOf(r);s>0&&!i.test(t.substring(0,s))&&(o=!0)}return o}function wF(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];let n=e.split(r),i=t;for(let o=0;o<n.length;){if(!i||typeof i!="object")return;let s,a="";for(let c=o;c<n.length;++c)if(c!==o&&(a+=r),a+=n[c],s=i[a],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&c<n.length-1)continue;o+=c-o+1;break}i=s}return i}function PA(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}var FA=class extends Rh{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure,a;e.indexOf(".")>-1?a=e.split("."):(a=[e,r],n&&(Array.isArray(n)?a.push(...n):typeof n=="string"&&o?a.push(...n.split(o)):a.push(n)));let c=NA(this.data,a);return!c&&!r&&!n&&e.indexOf(".")>-1&&(e=a[0],r=a[1],n=a.slice(2).join(".")),c||!s||typeof n!="string"?c:wF(this.data&&this.data[e]&&this.data[e][r],n,o)}addResource(e,r,n,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=[e,r];n&&(a=a.concat(s?n.split(s):n)),e.indexOf(".")>-1&&(a=e.split("."),i=r,r=a[1]),this.addNamespaces(r),XZ(this.data,a,i),o.silent||this.emit("added",e,r,n,i)}addResources(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(let o in n)(typeof n[o]=="string"||Array.isArray(n[o]))&&this.addResource(e,r,o,n[o],{silent:!0});i.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,r];e.indexOf(".")>-1&&(a=e.split("."),i=n,n=r,r=a[1]),this.addNamespaces(r);let c=NA(this.data,a)||{};s.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?rQ(c,n,o):c={...c,...n},XZ(this.data,a,c),s.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,r)}:this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}},nQ={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,i){return t.forEach(o=>{this.processors[o]&&(e=this.processors[o].process(e,r,n,i))}),e}},JZ={},LA=class t extends Rh{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),UUe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=aa.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;let n=this.resolve(e,r);return n&&n.res!==void 0}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");let i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,o=r.ns||this.options.defaultNS||[],s=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!zUe(e,n,i);if(s&&!a){let c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:o};let p=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(p[0])>-1)&&(o=p.shift()),e=p.join(i)}return typeof o=="string"&&(o=[o]),{key:e,namespaces:o}}translate(e,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);let i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],r),c=a[a.length-1],p=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(d){let P=r.nsSeparator||this.options.nsSeparator;return i?{res:`${c}${P}${s}`,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:`${c}${P}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:s}let h=this.resolve(e,r),m=h&&h.res,y=h&&h.usedKey||s,S=h&&h.exactUsedKey||s,T=Object.prototype.toString.apply(m),x=["[object Number]","[object Function]","[object RegExp]"],O=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,N=!this.i18nFormat||this.i18nFormat.handleAsObject;if(N&&m&&(typeof m!="string"&&typeof m!="boolean"&&typeof m!="number")&&x.indexOf(T)<0&&!(typeof O=="string"&&Array.isArray(m))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,m,{...r,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(h.res=P,h.usedParams=this.getUsedParamsDetails(r),h):P}if(o){let P=Array.isArray(m),k=P?[]:{},j=P?S:y;for(let G in m)if(Object.prototype.hasOwnProperty.call(m,G)){let oe=`${j}${o}${G}`;k[G]=this.translate(oe,{...r,joinArrays:!1,ns:a}),k[G]===oe&&(k[G]=m[G])}m=k}}else if(N&&typeof O=="string"&&Array.isArray(m))m=m.join(O),m&&(m=this.extendTranslation(m,e,r,n));else{let P=!1,k=!1,j=r.count!==void 0&&typeof r.count!="string",G=t.hasDefaultValue(r),oe=j?this.pluralResolver.getSuffix(p,r.count,r):"",K=r.ordinal&&j?this.pluralResolver.getSuffix(p,r.count,{ordinal:!1}):"",ue=j&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),M=ue&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${oe}`]||r[`defaultValue${K}`]||r.defaultValue;!this.isValidLookup(m)&&G&&(P=!0,m=M),this.isValidLookup(m)||(k=!0,m=s);let me=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:m,Se=G&&M!==m&&this.options.updateMissing;if(k||P||Se){if(this.logger.log(Se?"updateKey":"missingKey",p,c,s,Se?M:m),o){let ne=this.resolve(s,{...r,keySeparator:!1});ne&&ne.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let H=[],Y=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Y&&Y[0])for(let ne=0;ne<Y.length;ne++)H.push(Y[ne]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(r.lng||this.language):H.push(r.lng||this.language);let Te=(ne,Ae,_t)=>{let At=G&&_t!==m?_t:me;this.options.missingKeyHandler?this.options.missingKeyHandler(ne,c,Ae,At,Se,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(ne,c,Ae,At,Se,r),this.emit("missingKey",ne,c,Ae,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?H.forEach(ne=>{let Ae=this.pluralResolver.getSuffixes(ne,r);ue&&r[`defaultValue${this.options.pluralSeparator}zero`]&&Ae.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ae.push(`${this.options.pluralSeparator}zero`),Ae.forEach(_t=>{Te([ne],s+_t,r[`defaultValue${_t}`]||M)})}):Te(H,s,M))}m=this.extendTranslation(m,e,r,h,n),k&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${c}:${s}`),(k||P)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${s}`:s,P?m:void 0):m=this.options.parseMissingKeyHandler(m))}return i?(h.res=m,h.usedParams=this.getUsedParamsDetails(r),h):m}extendTranslation(e,r,n,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let p=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(p){let m=e.match(this.interpolator.nestingRegexp);d=m&&m.length}let h=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,n.lng||this.language,n),p){let m=e.match(this.interpolator.nestingRegexp),y=m&&m.length;d<y&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var m=arguments.length,y=new Array(m),S=0;S<m;S++)y[S]=arguments[S];return o&&o[0]===y[0]&&!n.context?(s.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${r[0]}`),null):s.translate(...y,r)},n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,c=typeof a=="string"?[a]:a;return e!=null&&c&&c.length&&n.applyPostProcessor!==!1&&(e=nQ.handle(c,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,o,s,a;return typeof e=="string"&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(n))return;let p=this.extractFromKey(c,r),d=p.key;i=d;let h=p.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));let m=r.count!==void 0&&typeof r.count!="string",y=m&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),S=r.context!==void 0&&(typeof r.context=="string"||typeof r.context=="number")&&r.context!=="",T=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(x=>{this.isValidLookup(n)||(a=x,!JZ[`${T[0]}-${x}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(JZ[`${T[0]}-${x}`]=!0,this.logger.warn(`key "${i}" for languages "${T.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),T.forEach(O=>{if(this.isValidLookup(n))return;s=O;let N=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(N,d,O,x,r);else{let P;m&&(P=this.pluralResolver.getSuffix(O,r.count,r));let k=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(N.push(d+P),r.ordinal&&P.indexOf(j)===0&&N.push(d+P.replace(j,this.options.pluralSeparator)),y&&N.push(d+k)),S){let G=`${d}${this.options.contextSeparator}${r.context}`;N.push(G),m&&(N.push(G+P),r.ordinal&&P.indexOf(j)===0&&N.push(G+P.replace(j,this.options.pluralSeparator)),y&&N.push(G+k))}}let I;for(;I=N.pop();)this.isValidLookup(n)||(o=I,n=this.getResource(O,x,I,r))}))})}),{res:n,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,r,n,i):this.resourceStore.getResource(e,r,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&typeof e.replace!="string",i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(let o of r)delete i[o]}return i}static hasDefaultValue(e){let r="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r===n.substring(0,r.length)&&e[n]!==void 0)return!0;return!1}};function bF(t){return t.charAt(0).toUpperCase()+t.slice(1)}var MA=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=aa.create("languageUtils")}getScriptPartFromCode(e){if(e=PA(e),!e||e.indexOf("-")<0)return null;let r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=PA(e),!e||e.indexOf("-")<0)return e;let r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){let r=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=bF(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=bF(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=bF(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;let i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;let i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){let n=this.getFallbackCodes(r||this.options.fallbackLng||[],e),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):typeof e=="string"&&o(this.formatLanguageCode(e)),n.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}},YUe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],KUe={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},XUe=["v1","v2","v3"],JUe=["v4"],ZZ={zero:0,one:1,two:2,few:3,many:4,other:5};function ZUe(){let t={};return YUe.forEach(e=>{e.lngs.forEach(r=>{t[r]={numbers:e.nr,plurals:KUe[e.fc]}})}),t}var NF=class{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=r,this.logger=aa.create("pluralResolver"),(!this.options.compatibilityJSON||JUe.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=ZUe()}addRule(e,r){this.rules[e]=r}getRule(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(PA(e==="dev"?"en":e),{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${r}${i}`)}getSuffixes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,o)=>ZZ[i]-ZZ[o]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,r)):[]}getSuffix(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,r){let n=e.noAbs?e.plurals(r):e.plurals(Math.abs(r)),i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));let o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!XUe.includes(this.options.compatibilityJSON)}};function QZ(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=jUe(t,e,r);return!o&&i&&typeof r=="string"&&(o=wF(t,r,n),o===void 0&&(o=wF(e,r,n))),o}var PF=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=aa.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});let{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:c,formatSeparator:p,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:m,nestingPrefixEscaped:y,nestingSuffix:S,nestingSuffixEscaped:T,nestingOptionsSeparator:x,maxReplaces:O,alwaysFormat:N}=e.interpolation;this.escape=r!==void 0?r:VUe,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Oh(o):s||"{{",this.suffix=a?Oh(a):c||"}}",this.formatSeparator=p||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?Oh(m):y||Oh("$t("),this.nestingSuffix=S?Oh(S):T||Oh(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=O||1e3,this.alwaysFormat=N!==void 0?N:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,r,n,i){let o,s,a,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function p(S){return S.replace(/\$/g,"$$$$")}let d=S=>{if(S.indexOf(this.formatSeparator)<0){let N=QZ(r,c,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,n,{...i,...r,interpolationkey:S}):N}let T=S.split(this.formatSeparator),x=T.shift().trim(),O=T.join(this.formatSeparator).trim();return this.format(QZ(r,c,x,this.options.keySeparator,this.options.ignoreJSONStructure),O,n,{...i,...r,interpolationkey:x})};this.resetRegExp();let h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,m=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:S=>p(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?p(this.escape(S)):p(S)}].forEach(S=>{for(a=0;o=S.regex.exec(e);){let T=o[1].trim();if(s=d(T),s===void 0)if(typeof h=="function"){let O=h(e,o,i);s=typeof O=="string"?O:""}else if(i&&Object.prototype.hasOwnProperty.call(i,T))s="";else if(m){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${T} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=KZ(s));let x=S.safeValue(s);if(e=e.replace(o[0],x),m?(S.regex.lastIndex+=s.length,S.regex.lastIndex-=o[0].length):S.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;function a(c,p){let d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;let h=c.split(new RegExp(`${d}[ ]*{`)),m=`{${h[1]}`;c=h[0],m=this.interpolate(m,s);let y=m.match(/'/g),S=m.match(/"/g);(y&&y.length%2===0&&!S||S.length%2!==0)&&(m=m.replace(/'/g,'"'));try{s=JSON.parse(m),p&&(s={...p,...s})}catch(T){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,T),`${c}${d}${m}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,c}for(;i=this.nestingRegexp.exec(e);){let c=[];s={...n},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let p=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){let d=i[1].split(this.formatSeparator).map(h=>h.trim());i[1]=d.shift(),c=d,p=!0}if(o=r(a.call(this,i[1].trim(),s),s),o&&i[0]===e&&typeof o!="string")return o;typeof o!="string"&&(o=KZ(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),o=""),p&&(o=c.reduce((d,h)=>this.format(d,h,n.lng,{...n,interpolationkey:i[1].trim()}),o.trim())),e=e.replace(i[0],o),this.regexp.lastIndex=0}return e}};function QUe(t){let e=t.toLowerCase().trim(),r={};if(t.indexOf("(")>-1){let n=t.split("(");e=n[0].toLowerCase().trim();let i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(s=>{if(s){let[a,...c]=s.split(":"),p=c.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();r[d]||(r[d]=p),p==="false"&&(r[d]=!1),p==="true"&&(r[d]=!0),isNaN(p)||(r[d]=parseInt(p,10))}})}return{formatName:e,formatOptions:r}}function bh(t){let e={};return function(n,i,o){let s=i+JSON.stringify(o),a=e[s];return a||(a=t(PA(i),o),e[s]=a),a(n)}}var FF=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=aa.create("formatter"),this.options=e,this.formats={number:bh((r,n)=>{let i=new Intl.NumberFormat(r,{...n});return o=>i.format(o)}),currency:bh((r,n)=>{let i=new Intl.NumberFormat(r,{...n,style:"currency"});return o=>i.format(o)}),datetime:bh((r,n)=>{let i=new Intl.DateTimeFormat(r,{...n});return o=>i.format(o)}),relativetime:bh((r,n)=>{let i=new Intl.RelativeTimeFormat(r,{...n});return o=>i.format(o,n.range||"day")}),list:bh((r,n)=>{let i=new Intl.ListFormat(r,{...n});return o=>i.format(o)})},this.init(e)}init(e){let n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=bh(r)}format(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return r.split(this.formatSeparator).reduce((a,c)=>{let{formatName:p,formatOptions:d}=QUe(c);if(this.formats[p]){let h=a;try{let m=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},y=m.locale||m.lng||i.locale||i.lng||n;h=this.formats[p](a,y,{...d,...i,...m})}catch(m){this.logger.warn(m)}return h}else this.logger.warn(`there was no format function for ${p}`);return a},e)}};function e3e(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var LF=class extends Rh{constructor(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=aa.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,r,n,i){let o={},s={},a={},c={};return e.forEach(p=>{let d=!0;r.forEach(h=>{let m=`${p}|${h}`;!n.reload&&this.store.hasResourceBundle(p,h)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?s[m]===void 0&&(s[m]=!0):(this.state[m]=1,d=!1,s[m]===void 0&&(s[m]=!0),o[m]===void 0&&(o[m]=!0),c[h]===void 0&&(c[h]=!0)))}),d||(a[p]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(e,r,n){let i=e.split("|"),o=i[0],s=i[1];r&&this.emit("failedLoading",o,s,r),n&&this.store.addResourceBundle(o,s,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2;let a={};this.queue.forEach(c=>{qUe(c.loaded,[o],s),e3e(c,e),r&&c.errors.push(r),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(p=>{a[p]||(a[p]={});let d=c.loaded[p];d.length&&d.forEach(h=>{a[p][h]===void 0&&(a[p][h]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:i,wait:o,callback:s});return}this.readingCalls++;let a=(p,d)=>{if(this.readingCalls--,this.waitingReads.length>0){let h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(p&&d&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,r,n,i+1,o*2,s)},o);return}s(p,d)},c=this.backend[n].bind(this.backend);if(c.length===2){try{let p=c(e,r);p&&typeof p.then=="function"?p.then(d=>a(null,d)).catch(a):a(null,p)}catch(p){a(p)}return}return c(e,r,a)}prepareLoading(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof r=="string"&&(r=[r]);let o=this.queueLoad(e,r,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=e.split("|"),i=n[0],o=n[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${r}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${r}loaded namespace ${o} for language ${i}`,a),this.loaded(e,s,a)})}saveMissing(e,r,n,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){let c={...s,isUpdate:o},p=this.backend.create.bind(this.backend);if(p.length<6)try{let d;p.length===5?d=p(e,r,n,i,c):d=p(e,r,n,i),d&&typeof d.then=="function"?d.then(h=>a(null,h)).catch(a):a(null,d)}catch(d){a(d)}else p(e,r,n,i,a,c)}!e||!e[0]||this.store.addResource(e[0],r,n,i)}}};function eQ(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let r={};if(typeof e[1]=="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){let n=e[3]||e[2];Object.keys(n).forEach(i=>{r[i]=n[i]})}return r},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function tQ(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function wA(){}function t3e(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})}var kA=class t extends Rh{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=tQ(e),this.services={},this.logger=aa,this.modules={external:[]},t3e(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(){var e=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(typeof r.ns=="string"?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));let i=eQ();this.options={...i,...this.options,...tQ(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);function o(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?aa.init(o(this.modules.logger),this.options):aa.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=FF);let h=new MA(this.options);this.store=new FA(this.options.resources,this.options);let m=this.services;m.logger=aa,m.resourceStore=this.store,m.languageUtils=h,m.pluralResolver=new NF(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(m.formatter=o(d),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new PF(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new LF(o(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(y){for(var S=arguments.length,T=new Array(S>1?S-1:0),x=1;x<S;x++)T[x-1]=arguments[x];e.emit(y,...T)}),this.modules.languageDetector&&(m.languageDetector=o(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=o(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new LA(this.services,this.options),this.translator.on("*",function(y){for(var S=arguments.length,T=new Array(S>1?S-1:0),x=1;x<S;x++)T[x-1]=arguments[x];e.emit(y,...T)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,n||(n=wA),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});let c=OE(),p=()=>{let d=(h,m)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(m),n(h,m)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?p():setTimeout(p,0),c}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wA,i=typeof e=="string"?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();let o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(p=>{p!=="cimode"&&o.indexOf(p)<0&&o.push(p)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>s(c)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(e,r,n){let i=OE();return e||(e=this.languages),r||(r=this.options.ns),n||(n=wA),this.services.backendConnector.reload(e,r,o=>{i.resolve(),n(o)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&nQ.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let r=0;r<this.languages.length;r++){let n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,r){var n=this;this.isLanguageChangingTo=e;let i=OE();this.emit("languageChanging",e);let o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},s=(c,p)=>{p?(o(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(c,function(){return n.t(...arguments)})},a=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);let p=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);p&&(this.language||o(p),this.translator.language||this.translator.changeLanguage(p),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(p)),this.loadResources(p,d=>{s(d,p)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),i}getFixedT(e,r,n){var i=this;let o=function(s,a){let c;if(typeof a!="object"){for(var p=arguments.length,d=new Array(p>2?p-2:0),h=2;h<p;h++)d[h-2]=arguments[h];c=i.options.overloadTranslationOptionHandler([s,a].concat(d))}else c={...a};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix=c.keyPrefix||n||o.keyPrefix;let m=i.options.keySeparator||".",y;return c.keyPrefix&&Array.isArray(s)?y=s.map(S=>`${c.keyPrefix}${m}${S}`):y=c.keyPrefix?`${c.keyPrefix}${m}${s}`:s,i.t(y,c)};return typeof e=="string"?o.lng=e:o.lngs=e,o.ns=r,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;let s=(a,c)=>{let p=this.services.backendConnector.state[`${a}|${c}`];return p===-1||p===2};if(r.precheck){let a=r.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,e)&&(!i||s(o,e)))}loadNamespaces(e,r){let n=OE();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){let n=OE();typeof e=="string"&&(e=[e]);let i=this.options.preload||[],o=e.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{n.resolve(),r&&r(s)}),n):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";let r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new MA(eQ());return r.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wA,n=e.forkResourceStore;n&&delete e.forkResourceStore;let i={...this.options,...e,isClone:!0},o=new t(i);return(e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new FA(this.store.data,i),o.services.resourceStore=o.store),o.translator=new LA(o.services,i),o.translator.on("*",function(a){for(var c=arguments.length,p=new Array(c>1?c-1:0),d=1;d<c;d++)p[d-1]=arguments[d];o.emit(a,...p)}),o.init(i,r),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},Ln=kA.createInstance();Ln.createInstance=kA.createInstance;var Hbt=Ln.createInstance,qbt=Ln.dir,jbt=Ln.init,Gbt=Ln.loadResources,Vbt=Ln.reloadResources,Wbt=Ln.use,$bt=Ln.changeLanguage,zbt=Ln.getFixedT,Ybt=Ln.t,Kbt=Ln.exists,Xbt=Ln.setDefaultNamespace,Jbt=Ln.hasLoadedNamespace,Zbt=Ln.loadNamespaces,Qbt=Ln.loadLanguages;function iQ(t){let e={lng:"en",resources:{en:{translation:t}},keySeparator:!1,react:{defaultTransParent:Q}},r=new YZ,n=Ln.createInstance(e);return n.use(r),n.use(yA),n.init(),n}u();var BA=F(ie(),1);var ua=({children:t,messages:e,i18n:r})=>{let[n]=(0,BA.useState)(()=>r??iQ(e));return BA.default.createElement(dF,{i18n:n},t)};var dce=F(tt(),1);var oQ={"login.instructions_title":"Authorize the CLI to access your Wix account:","login.instructions_details":`1. Copy this code to the clipboard: <0>{code}</0>
175
175
  2. Press <1/> to <2>log in</2> and then paste the code`,"login.legacy_auth_notice":"We implemented a new and more secure login method. You'll need to re-login to continue using the CLI.","login.error_opening_browser":"Failed to open browser, please try opening <0/> manually."};u();var kn=F(ie(),1);u();var SQ=F(yQ(),1);u();var DQ=F(Zd(),1);async function vQ(t,e){await(0,DQ.createHttpClient)().post(t,void 0,{params:{url:e}})}async function GA(t){let{userBrowserTestEndpoint:e}=gr();e?await vQ(e,t):await(0,SQ.default)(t,{background:!0})}u();u();var uce=F(ie(),1);import SM from"node:process";u();var RE=F(ie(),1),GF=F(Af(),1);import{dirname as h3e}from"node:path";import{appendFileSync as m3e,mkdirSync as g3e}from"node:fs";function VF(t,e){try{let r=`----- CLI crash report at ${new Date().toISOString()}
@@ -209,7 +209,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
209
209
  user: https://bo.wix.com/um/users/${s}
210
210
  ---
211
211
  ${c}
212
- `})},setContext:(s,a)=>i.setContext(s,a),setUser:s=>i.setUser(s),getUser:()=>{let s=i.getUser();if(typeof s?.id=="string")return{id:s.id}}}}u();var qy=F(ie(),1),vM=F(tt(),1);import{stdin as n$e}from"node:process";u();var Ex=F(tt(),1);var Hy=(0,Ex.variant)({Exists:(0,Ex.fields)(),NotExists:{}}),e$e=ee.object({data:ee.unknown(),createdAt:ee.number()}),t$e=(t,e)=>Date.now()-t.valueOf()>e*60*60*1e3;function ice({filePath:t,ttlInHours:e=24*7}){return{get:async()=>{try{if(await Hi(t)){let o=e$e.parse(await Ss(t));if(!t$e(o.createdAt,e))return Hy.Exists({data:o.data})}return Hy.NotExists()}catch(i){throw new Oe({code:Pe.FailedToReadCache({path:t}),cause:i})}},set:async i=>{try{return await Bc(t,{data:i,createdAt:Date.now()}),Hy.Exists({data:i})}catch(o){throw new Oe({code:Pe.FailedToWriteCache({path:t}),cause:o})}}}}u();var Mn=F(ie(),1);u();var EM=F(ie(),1);var yx=()=>EM.default.createElement(Rt,{i18nKey:"user_feedback.contact_us",components:[EM.default.createElement(Dn,{url:"https://discord.gg/devs-on-wix"})]});var oce=({onSubmit:t})=>{let{t:e}=lt(),[r,n]=(0,Mn.useState)(!1),[i,o]=(0,Mn.useState)(),s=(0,Mn.useCallback)(c=>{o(c),c||n(!0)},[]),a=(0,Mn.useCallback)(c=>{n(!0),t({feedback:c})},[t]);return Mn.default.createElement(Mn.default.Fragment,null,Mn.default.createElement(ke,{flexDirection:"column",marginTop:1,marginBottom:1},Mn.default.createElement(Q,null,e("user_feedback.title")),Mn.default.createElement(Q,{skin:"secondary"},e("user_feedback.subtitle"))),Mn.default.createElement(p_,{label:e("user_feedback.consent.label"),onSubmit:s}),i===!0&&Mn.default.createElement(sf,{label:e("user_feedback.comments.label"),onSubmit:a}),r&&Mn.default.createElement(ke,{flexDirection:"column",marginTop:1},Mn.default.createElement(Q,null,e(i?"user_feedback.submitted":"user_feedback.declined")),Mn.default.createElement(yx,null)))};u();var yM=F(ie(),1);var sce=()=>yM.default.createElement(ke,{flexDirection:"column",marginTop:1},yM.default.createElement(yx,null));var DM={"user_feedback.title":"Your experience matters to us. Would you like to submit feedback regarding this incident?","user_feedback.subtitle":"We may contact you by email in case we need more details.","user_feedback.consent.label":"Submit feedback?","user_feedback.comments.label":"Feedback (optional)","user_feedback.submitted":"Thank you for your cooperation in helping us resolve this issue promptly.","user_feedback.declined":"Thank you for your feedback.","user_feedback.contact_us":"Reach us in Discord in case you have more questions: <0 />"};async function ace({cachePath:t,reportResult:e,errorReporter:r}){if(!n$e.isTTY||!t||!(0,vM.isType)(e,_x.Reported))return;let n=ice({filePath:t,ttlInHours:1}),i=await n.get();if((0,vM.isType)(i,Hy.Exists))return;let o=r.getUser();o?await L_(qy.default.createElement(ua,{messages:DM},qy.default.createElement(oce,{onSubmit:({feedback:s})=>{r.reportUserFeedback({userId:o.id,eventId:e.eventId,feedback:s})}}))):tN(qy.default.createElement(ua,{messages:DM},qy.default.createElement(sce,null))),await n.set({reported:!0})}function TM({debugOutputPath:t,userFeedbackCachePath:e,...r}){let n=nce(r),i=function({error:s,data:a}){let c=n.reportError(s,{data:a});rN(uce.default.createElement(zf,{error:s})),VF(t,s),SM.exitCode=1,ace({reportResult:c,errorReporter:n,cachePath:e}).catch(p=>{VF(t,p)})};return{handler:i,errorReporter:n,registerToProcessErrors:function(){SM.on("uncaughtException",s=>{i({error:s,data:{mechanism:{handled:!1,type:"uncaughtException"}}})}),SM.on("unhandledRejection",s=>{s instanceof Error&&s.message.startsWith("Build failed with")&&s.stack?.includes("esbuild")||i({error:s,data:{mechanism:{handled:!1,type:"unhandledRejection"}}})})}}}u();var mm=F(ie(),1),cce=(0,mm.createContext)(null),AM=t=>mm.default.createElement(cce.Provider,{...t}),Cu=()=>{let t=(0,mm.useContext)(cce);if(t===null)throw new Error("useErrorReporter() cannot be used without an <ErrorReporterProvider>");return t};u();var lce=F(ie(),1);function fce(t){return(0,lce.useMemo)(()=>{let e=new URL(t);return e.searchParams.set("color","developer"),e.searchParams.set("studio","true"),e.toString()},[t])}var pce=({userCode:t,verificationUri:e})=>{let r=fce(e),{reportError:n}=Cu(),[i,o]=(0,kn.useState)(null);return Co((s,a)=>{a.return&&GA(r).catch(c=>{n(c),o(c)})}),kn.default.createElement(kn.default.Fragment,null,kn.default.createElement(Rt,{i18nKey:"login.instructions_title"}),kn.default.createElement(ke,{flexDirection:"column",marginTop:1,marginBottom:1,marginLeft:2},kn.default.createElement(Rt,{i18nKey:"login.instructions_details",components:[kn.default.createElement(Q,{skin:"legacyBlue"}),kn.default.createElement(Sd,{value:"enter"}),kn.default.createElement(Dn,{url:r})],values:{code:t}})),i&&kn.default.createElement(kn.default.Fragment,null,kn.default.createElement(ke,{flexDirection:"column",marginBottom:1},kn.default.createElement(zf,{error:i})),kn.default.createElement(Rt,{i18nKey:"login.error_opening_browser",components:[kn.default.createElement(Dn,{url:r})]})))};var hce=({loginFn:t,onLogin:e,onError:r})=>{let n=cs();function i(a){n.report(oF({isSuccess:!1,...a instanceof Error?{errorType:a.name}:{errorType:"unknown",errorMessage:JSON.stringify(a)}})),r(a)}let o=ms(async({signal:a},c)=>{try{let p=await t({deviceCode:c,signal:a});n.report(oF({isSuccess:!0})),e(p)}catch(p){i(p)}}),{status:s}=wn(async()=>(n.report(JJ({})),Tc.requestDeviceCode()),[],{onSuccess:a=>{o.execute(a)},onError:i});return(0,dce.match)(s,{Error:()=>null,Loading:()=>CM.default.createElement(Gr,null),Success:({result:{userCode:a,verificationUri:c}})=>CM.default.createElement(pce,{userCode:a,verificationUri:c})})};u();var xM=F(ie(),1);u();var Gy=F(ie(),1),_ce=F(tt(),1);u();var jy=F(ie(),1),mce=F(tt(),1);var gce=({children:t})=>{let{status:e}=wn(KP,[],{onError:()=>{}});return(0,mce.match)(e,{Error:()=>null,Loading:()=>null,Success:({result:r})=>jy.default.createElement(jy.default.Fragment,null,r&&jy.default.createElement(ke,{marginBottom:1},jy.default.createElement(Rt,{i18nKey:"login.legacy_auth_notice"})),t)})};var Ece=({authStrategy:{login:t,isLoggedIn:e},onLogin:r,onError:n,children:i})=>{let{status:o,merge:s}=wn(e,[],{onSuccess:a=>{a&&r(a)},onError:n});return(0,_ce.match)(o,{Loading:()=>Gy.default.createElement(Gr,null),Error:()=>null,Success:({result:a})=>a===null?Gy.default.createElement(ua,{messages:oQ},Gy.default.createElement(gce,null,Gy.default.createElement(hce,{loginFn:t,onLogin:c=>{s({result:c}),r(c)},onError:n}))):i(a)})};var OM=({children:t,onError:e,onLogin:r})=>{let n=dc();return xM.default.createElement(Ece,{authStrategy:vE,onLogin:({userInfo:i})=>r?.(i),onError:e??n},({getAccessToken:i,getRequestHeaders:o,userInfo:s})=>xM.default.createElement(gA.Provider,{value:{getAccessToken:i,getRequestHeaders:o,userInfo:s}},t))};var{isLoggedIn:X8t}=vE;u();var Pce=F(Nce(),1),{program:_6t,createCommand:E6t,createArgument:y6t,createOption:D6t,CommanderError:v6t,InvalidArgumentError:S6t,InvalidOptionArgumentError:T6t,Command:Fce,Argument:A6t,Option:C6t,Help:x6t}=Pce.default;u();import{join as y$e}from"node:path";var Lce="https://22f50012d85a41e78a75ae13d92bd04f@o37417.ingest.sentry.io/4505232975593472",GM="wix-error.log";function Mce(t){return y$e(t,GM)}u();u();var Uce=F(ie(),1);u();u();function Sx(t){return{evid:5229,src:11,endpoint:"",params:t}}function kce(t){return{evid:5230,src:11,endpoint:"",params:t}}function Tx(t){return{evid:5231,src:11,endpoint:"",params:t}}var Bce=t=>({cliAction:({question:e,action:r,key:n,additionalInfo:i})=>t.report(Tx({question:e,action:r,key:n,additionalInfo:JSON.stringify(i)})),cliFlowStepAnswered:({question:e,answer:r,additionalInfo:n})=>t.report(Sx({question:e,answer:r,additionalInfo:JSON.stringify(n)}))});function Rs(){let t=cs();return(0,Uce.useMemo)(()=>Bce(t),[t])}u();import{randomUUID as y9e}from"node:crypto";u();u();u();Es();var ple=F(fle()),dle=F(Zd()),l9e={baseUrl:process.env.BI_BASE_URL||"https://frog.wix.com",endpoint:"",logError:!1},XM=function(){function t(){}return t.prototype.factory=function(e){var r=this;e===void 0&&(e={});var n=ft(ft({},l9e),e),i=ple.default.factory();return n.onError&&i.setPublisherFailHandler(n.onError),i.addPublisher(function(o,s){return P0(r,void 0,void 0,function(){var a,c,p,d,h;return F0(this,function(m){switch(m.label){case 0:return a=s.endpoint||n.endpoint,c=n.baseUrl,p=n.userAgent,d=n.logError,h=p?{headers:{"User-Agent":p}}:{},[4,new dle.HttpClient({baseURL:c}).get(a,{headers:h,params:o,timeout:30*1e3}).catch(function(y){return d?console.error(y.toJSON()):Promise.reject(y)})];case 1:return m.sent(),[2]}})})}),i},t}();var p4t=new XM;u();import{join as f9e}from"node:path";u();var hle="user.config.json",mle=ee.object({telemetry:ee.boolean().default(!0),tunneling:ee.boolean().default(!1)});function p9e(){return f9e(Z_(),hle)}async function gle(){let t=p9e(),r=await Hi(t)?await Ss(t):{};return mle.parse(r)}u();import{randomUUID as d9e}from"node:crypto";function JM(t,e){t.updateDefaults(ZM(e))}function ZM(t){return t?{_client_id:t,_uuid:t,logged_user_id:t,logged_account_id:t,target_account_id:t}:{_client_id:d9e()}}async function QM(t,e){let r=gr().biLoggerBaseUrl,n=r?{baseUrl:r}:{},i=ZM(e),{telemetry:o}=await gle();return new XM().factory(n).updateDefaults({localTime:()=>Date.now(),...t,...i}).setMuted(!o).logger()}u();import{uptime as E9e}from"node:process";u();var _le=F(uI(),1);import h9e from"node:os";import{platform as m9e,version as g9e}from"node:process";function Ele({cliVersion:t,flow:e}){return{...e?{flow:e}:{},cliVersion:t,isCI:_le.default,nodeVersion:g9e,osName:_9e(),osVersion:h9e.release()}}function _9e(){switch(m9e){case"darwin":return"mac";case"win32":return"windows";default:return"linux"}}var yle=()=>Math.round(E9e()*1e3);function ek({biLogger:t,command:e,flow:r,cliVersion:n,projectId:i,extensions:o}){let s=e.opts(),a=e.args,c=new Set(["apiKey"]),p=Object.fromEntries(Object.entries(s).map(([h,m])=>{let y=c.has(h)?"<censored>":m;return[h,y]})),d={command:e.name(),arguments:a.join(","),flags:Object.keys(p).length?JSON.stringify(p):""};return t.report(XJ({...Ele({cliVersion:n,flow:r}),...d,...i?{projectId:i}:{},isValid:!0})),{succeed(){t.report(iF({...d,...o?{extensions:JSON.stringify(o)}:{},duration:yle(),isSuccess:!0,isValid:!0}))},failed(h){let m=Hd(h)?{errorType:$a(h)?"SystemError":"UserError",errorName:h.name,errorMessage:h.message}:h instanceof Error?{errorType:"UnknownError",errorName:h.name,errorMessage:h.message}:{errorType:"UnknownError",errorMessage:JSON.stringify(h)};t.report(iF({...d,...m,...o?{extensions:JSON.stringify(o)}:{},duration:yle(),isSuccess:!1,isValid:!0}))}}}var tk="0.0.63";var Em={name:"@wix/create-app",description:"Create Wix apps",version:tk,author:"Ihor Machuzhak",bin:"bin/index.cjs",devDependencies:{"@commander-js/extra-typings":"^12.1.0","@types/is-git-url":"^1.0.2","@types/lodash":"^4.17.6","@types/validate-npm-package-name":"^4.0.2","@wix/bi-logger-dev-tools-data":"^1.53.0","@wix/cli-auth":"workspace:*","@wix/cli-core-definitions":"workspace:*","@wix/cli-error":"workspace:*","@wix/cli-error-reporting":"workspace:*","@wix/cli-fs":"workspace:*","@wix/cli-http-client":"workspace:*","@wix/cli-i18n":"workspace:*","@wix/cli-site-selector":"workspace:*","@wix/cli-telemetry":"workspace:*","@wix/cli-telemetry-react":"workspace:*","@wix/cli-test-overrides":"workspace:*","@wix/cli-ui-kit":"workspace:*","@wix/create-app-definitions":"workspace:*","@wix/dev-center-client":"workspace:*","@wix/gena":"workspace:*","@wix/site-list-client":"workspace:*","@wix/tsup-configs":"workspace:*",commander:"^12.1.0",execa:"^8.0.1",globby:"^13.2.2","is-git-url":"^1.0.0",lodash:"^4.17.21","package-json":"^8.1.1",react:"^18.3.1",semver:"^7.6.2",tempy:"^3.1.0","type-fest":"^3.13.1","validate-npm-package-name":"^5.0.1",variant:"^3.0.0-dev.27",zod:"^3.23.8"},engines:{node:">= 18.16"},files:["bin","build","templates"],perfer:{bundleSize:{files:[{glob:"./build/index.js",maxSize:"440kb"}]}},publishConfig:{registry:"https://registry.npmjs.org/",access:"public",versionBumpStrategy:"manual",logLevel:"verbose"},scripts:{build:"run -T tsup","build:watch":"run build --watch","dev:npm":"npx $INIT_CWD","dev:yarn":"yarn create @wix/app@portal:$INIT_CWD",test:"yarn workspace @wix/create-app-spec run test","test:watch":"yarn workspace @wix/create-app-spec run test:watch",typecheck:"run -T tsc --noEmit"},type:"module",wix:{artifact:{groupId:"com.wixpress",artifactId:"wix-create-app"},validations:{postBuild:["typecheck"]}}};var rk=async(t,e)=>{let r=await QM({command:"create-app",cliSessionId:y9e(),cliVersion:tk},e);t.on("errorReported",i=>r.report(kce({errorMessage:i.message,errorType:$a(i)?"SystemError":"UserError",errorName:i.name})));function n(i){let o={name:()=>"create-app",args:i.args,opts:()=>i.opts()};return ek({biLogger:r,command:o,cliVersion:tk,flow:"Apps"})}return{biLogger:r,reportCommandStartEvent:n}};u();var xn=F(ie(),1),Dj=F(tt(),1);u();var Wy=F(ie(),1);var vle=()=>{let{t}=lt();return Wy.default.createElement(ke,{flexDirection:"column",marginBottom:1,rowGap:1},Wy.default.createElement(Q,null,t("create_app.get_started")),Wy.default.createElement(Rt,{i18nKey:"create_app.more_info_on_app_development",components:[Wy.default.createElement(Dn,{url:"https://wix.to/dVzAH1u"})]}))};u();u();u();var wde=F(nk(),1),Qy=F(qB(),1),Zy=F(dde(),1);import XKe from"node:fs";import JKe from"node:path";u();var JB=F(qB(),1),Ade=F(Sde(),1);import $Ke from"node:process";import Tde from"node:fs";import Om from"node:path";u();function xm(t){let e=/^\\\\\?\\/.test(t),r=/[^\u0000-\u0080]+/.test(t);return e||r?t:t.replace(/\\/g,"/")}u();import{fileURLToPath as VKe}from"node:url";import{Transform as WKe}from"node:stream";var Jy=t=>t instanceof URL?VKe(t):t,rO=class extends WKe{constructor(e){super({objectMode:!0,transform(r,n,i){i(void 0,e(r)?r:void 0)}})}},nO=t=>t[0]==="!";var Cde={ignore:["**/node_modules","**/flow-typed","**/coverage","**/.git"],absolute:!0,dot:!0},xde="**/.gitignore",zKe=(t,e)=>nO(t)?"!"+Om.posix.join(e,t.slice(1)):Om.posix.join(e,t),YKe=(t,e)=>{let r=xm(Om.relative(e,Om.dirname(t.filePath)));return t.content.split(/\r?\n/).filter(n=>n&&!n.startsWith("#")).map(n=>zKe(n,r))},KKe=(t,e)=>{if(e=xm(e),Om.isAbsolute(t)){if(xm(t).startsWith(e))return Om.relative(e,t);throw new Error(`Path ${t} is not in cwd ${e}`)}return t},Ode=(t,e)=>{let r=t.flatMap(i=>YKe(i,e)),n=(0,Ade.default)().add(r);return i=>(i=Jy(i),i=KKe(i,e),i?n.ignores(xm(i)):!1)},bde=(t={})=>({cwd:Jy(t.cwd)||$Ke.cwd(),suppressErrors:!!t.suppressErrors,deep:typeof t.deep=="number"?t.deep:Number.POSITIVE_INFINITY}),Rde=async(t,e)=>{let{cwd:r,suppressErrors:n,deep:i}=bde(e),o=await(0,JB.default)(t,{cwd:r,suppressErrors:n,deep:i,...Cde}),s=await Promise.all(o.map(async a=>({filePath:a,content:await Tde.promises.readFile(a,"utf8")})));return Ode(s,r)},Ide=(t,e)=>{let{cwd:r,suppressErrors:n,deep:i}=bde(e),s=JB.default.sync(t,{cwd:r,suppressErrors:n,deep:i,...Cde}).map(a=>({filePath:a,content:Tde.readFileSync(a,"utf8")}));return Ode(s,r)};var ZKe=t=>{if(t.some(e=>typeof e!="string"))throw new TypeError("Patterns must be a string or an array of strings")},ZB=t=>(t=[...new Set([t].flat())],ZKe(t),t),QKe=t=>{if(!t.cwd)return;let e;try{e=XKe.statSync(t.cwd)}catch{return}if(!e.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},Nde=(t={})=>(t={...t,ignore:t.ignore||[],expandDirectories:t.expandDirectories===void 0?!0:t.expandDirectories,cwd:Jy(t.cwd)},QKe(t),t),Pde=t=>async(e,r)=>t(ZB(e),Nde(r)),iO=t=>(e,r)=>t(ZB(e),Nde(r)),Fde=t=>{let{ignoreFiles:e,gitignore:r}=t,n=e?ZB(e):[];return r&&n.push(xde),n},eXe=async t=>{let e=Fde(t);return Mde(e.length>0&&await Rde(e,t))},Lde=t=>{let e=Fde(t);return Mde(e.length>0&&Ide(e,t))},Mde=t=>{let e=new Set;return r=>{let n=r.path||r,i=JKe.normalize(n),o=e.has(i)||t&&t(n);return e.add(i),!o}},kde=(t,e)=>t.flat().filter(r=>e(r)),tXe=(t,e)=>(0,wde.default)(t).pipe(new rO(r=>e(r))),Bde=(t,e)=>{let r=[];for(;t.length>0;){let n=t.findIndex(o=>nO(o));if(n===-1){r.push({patterns:t,options:e});break}let i=t[n].slice(1);for(let o of r)o.options.ignore.push(i);n!==0&&r.push({patterns:t.slice(0,n),options:{...e,ignore:[...e.ignore,i]}}),t=t.slice(n+1)}return r},Ude=(t,e)=>({...e?{cwd:e}:{},...Array.isArray(t)?{files:t}:t}),Hde=async(t,e)=>{let r=Bde(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let o=Ude(i,n),s=n?{cwd:n}:void 0;return Promise.all(r.map(async a=>{let{patterns:c,options:p}=a;return[c,p.ignore]=await Promise.all([(0,Zy.default)(c,o),(0,Zy.default)(p.ignore,s)]),{patterns:c,options:p}}))},QB=(t,e)=>{let r=Bde(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let o=Ude(i,n),s=n?{cwd:n}:void 0;return r.map(a=>{let{patterns:c,options:p}=a;return c=Zy.default.sync(c,o),p.ignore=Zy.default.sync(p.ignore,s),{patterns:c,options:p}})},oO=Pde(async(t,e)=>{let[r,n]=await Promise.all([Hde(t,e),eXe(e)]),i=await Promise.all(r.map(o=>(0,Qy.default)(o.patterns,o.options)));return kde(i,n)}),y$t=iO((t,e)=>{let r=QB(t,e),n=Lde(e),i=r.map(o=>Qy.default.sync(o.patterns,o.options));return kde(i,n)}),D$t=iO((t,e)=>{let r=QB(t,e),n=Lde(e),i=r.map(o=>Qy.default.stream(o.patterns,o.options));return tXe(i,n)}),v$t=iO((t,e)=>t.some(r=>Qy.default.isDynamicPattern(r,e))),S$t=Pde(Hde),T$t=iO(QB);async function eU(t){return(await oO(["*"],{ignore:[GM],cwd:t})).length===0}u();var r_e=F(VE(),1);u();import{Agent as set}from"node:http";import{Agent as aet}from"node:https";u();u();u();var qde=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function rXe(t){return qde.includes(t)}var nXe=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...qde];function iXe(t){return nXe.includes(t)}var oXe=["null","undefined","string","number","bigint","boolean","symbol"];function sXe(t){return oXe.includes(t)}function bm(t){return e=>typeof e===t}var{toString:aXe}=Object.prototype,eD=t=>{let e=aXe.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&L.domElement(t))return"HTMLElement";if(iXe(e))return e},Vt=t=>e=>eD(e)===t;function L(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(L.observable(t))return"Observable";if(L.array(t))return"Array";if(L.buffer(t))return"Buffer";let e=eD(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}L.undefined=bm("undefined");L.string=bm("string");var uXe=bm("number");L.number=t=>uXe(t)&&!L.nan(t);L.bigint=bm("bigint");L.function_=bm("function");L.null_=t=>t===null;L.class_=t=>L.function_(t)&&t.toString().startsWith("class ");L.boolean=t=>t===!0||t===!1;L.symbol=bm("symbol");L.numericString=t=>L.string(t)&&!L.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));L.array=(t,e)=>Array.isArray(t)?L.function_(e)?t.every(r=>e(r)):!0:!1;L.buffer=t=>t?.constructor?.isBuffer?.(t)??!1;L.blob=t=>Vt("Blob")(t);L.nullOrUndefined=t=>L.null_(t)||L.undefined(t);L.object=t=>!L.null_(t)&&(typeof t=="object"||L.function_(t));L.iterable=t=>L.function_(t?.[Symbol.iterator]);L.asyncIterable=t=>L.function_(t?.[Symbol.asyncIterator]);L.generator=t=>L.iterable(t)&&L.function_(t?.next)&&L.function_(t?.throw);L.asyncGenerator=t=>L.asyncIterable(t)&&L.function_(t.next)&&L.function_(t.throw);L.nativePromise=t=>Vt("Promise")(t);var cXe=t=>L.function_(t?.then)&&L.function_(t?.catch);L.promise=t=>L.nativePromise(t)||cXe(t);L.generatorFunction=Vt("GeneratorFunction");L.asyncGeneratorFunction=t=>eD(t)==="AsyncGeneratorFunction";L.asyncFunction=t=>eD(t)==="AsyncFunction";L.boundFunction=t=>L.function_(t)&&!t.hasOwnProperty("prototype");L.regExp=Vt("RegExp");L.date=Vt("Date");L.error=Vt("Error");L.map=t=>Vt("Map")(t);L.set=t=>Vt("Set")(t);L.weakMap=t=>Vt("WeakMap")(t);L.weakSet=t=>Vt("WeakSet")(t);L.weakRef=t=>Vt("WeakRef")(t);L.int8Array=Vt("Int8Array");L.uint8Array=Vt("Uint8Array");L.uint8ClampedArray=Vt("Uint8ClampedArray");L.int16Array=Vt("Int16Array");L.uint16Array=Vt("Uint16Array");L.int32Array=Vt("Int32Array");L.uint32Array=Vt("Uint32Array");L.float32Array=Vt("Float32Array");L.float64Array=Vt("Float64Array");L.bigInt64Array=Vt("BigInt64Array");L.bigUint64Array=Vt("BigUint64Array");L.arrayBuffer=Vt("ArrayBuffer");L.sharedArrayBuffer=Vt("SharedArrayBuffer");L.dataView=Vt("DataView");L.enumCase=(t,e)=>Object.values(e).includes(t);L.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;L.urlInstance=t=>Vt("URL")(t);L.urlString=t=>{if(!L.string(t))return!1;try{return new URL(t),!0}catch{return!1}};L.truthy=t=>!!t;L.falsy=t=>!t;L.nan=t=>Number.isNaN(t);L.primitive=t=>L.null_(t)||sXe(typeof t);L.integer=t=>Number.isInteger(t);L.safeInteger=t=>Number.isSafeInteger(t);L.plainObject=t=>{if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};L.typedArray=t=>rXe(eD(t));var lXe=t=>L.safeInteger(t)&&t>=0;L.arrayLike=t=>!L.nullOrUndefined(t)&&!L.function_(t)&&lXe(t.length);L.inRange=(t,e)=>{if(L.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(L.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var fXe=1,pXe=["innerHTML","ownerDocument","style","attributes","nodeValue"];L.domElement=t=>L.object(t)&&t.nodeType===fXe&&L.string(t.nodeName)&&!L.plainObject(t)&&pXe.every(e=>e in t);L.observable=t=>t?t===t[Symbol.observable]?.()||t===t["@@observable"]?.():!1;L.nodeStream=t=>L.object(t)&&L.function_(t.pipe)&&!L.observable(t);L.infinite=t=>t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY;var jde=t=>e=>L.integer(e)&&Math.abs(e%2)===t;L.evenInteger=jde(0);L.oddInteger=jde(1);L.emptyArray=t=>L.array(t)&&t.length===0;L.nonEmptyArray=t=>L.array(t)&&t.length>0;L.emptyString=t=>L.string(t)&&t.length===0;var dXe=t=>L.string(t)&&!/\S/.test(t);L.emptyStringOrWhitespace=t=>L.emptyString(t)||dXe(t);L.nonEmptyString=t=>L.string(t)&&t.length>0;L.nonEmptyStringAndNotWhitespace=t=>L.string(t)&&!L.emptyStringOrWhitespace(t);L.emptyObject=t=>L.object(t)&&!L.map(t)&&!L.set(t)&&Object.keys(t).length===0;L.nonEmptyObject=t=>L.object(t)&&!L.map(t)&&!L.set(t)&&Object.keys(t).length>0;L.emptySet=t=>L.set(t)&&t.size===0;L.nonEmptySet=t=>L.set(t)&&t.size>0;L.emptyMap=t=>L.map(t)&&t.size===0;L.nonEmptyMap=t=>L.map(t)&&t.size>0;L.propertyKey=t=>L.any([L.string,L.number,L.symbol],t);L.formData=t=>Vt("FormData")(t);L.urlSearchParams=t=>Vt("URLSearchParams")(t);var Gde=(t,e,r)=>{if(!L.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};L.any=(t,...e)=>(L.array(t)?t:[t]).some(n=>Gde(Array.prototype.some,n,e));L.all=(t,...e)=>Gde(Array.prototype.every,t,e);var De=(t,e,r,n={})=>{if(!t){let{multipleValues:i}=n,o=i?`received values of types ${[...new Set(r.map(s=>`\`${L(s)}\``))].join(", ")}`:`received value of type \`${L(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${o}.`)}},pe={undefined:t=>De(L.undefined(t),"undefined",t),string:t=>De(L.string(t),"string",t),number:t=>De(L.number(t),"number",t),bigint:t=>De(L.bigint(t),"bigint",t),function_:t=>De(L.function_(t),"Function",t),null_:t=>De(L.null_(t),"null",t),class_:t=>De(L.class_(t),"Class",t),boolean:t=>De(L.boolean(t),"boolean",t),symbol:t=>De(L.symbol(t),"symbol",t),numericString:t=>De(L.numericString(t),"string with a number",t),array:(t,e)=>{De(L.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>De(L.buffer(t),"Buffer",t),blob:t=>De(L.blob(t),"Blob",t),nullOrUndefined:t=>De(L.nullOrUndefined(t),"null or undefined",t),object:t=>De(L.object(t),"Object",t),iterable:t=>De(L.iterable(t),"Iterable",t),asyncIterable:t=>De(L.asyncIterable(t),"AsyncIterable",t),generator:t=>De(L.generator(t),"Generator",t),asyncGenerator:t=>De(L.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>De(L.nativePromise(t),"native Promise",t),promise:t=>De(L.promise(t),"Promise",t),generatorFunction:t=>De(L.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>De(L.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>De(L.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>De(L.boundFunction(t),"Function",t),regExp:t=>De(L.regExp(t),"RegExp",t),date:t=>De(L.date(t),"Date",t),error:t=>De(L.error(t),"Error",t),map:t=>De(L.map(t),"Map",t),set:t=>De(L.set(t),"Set",t),weakMap:t=>De(L.weakMap(t),"WeakMap",t),weakSet:t=>De(L.weakSet(t),"WeakSet",t),weakRef:t=>De(L.weakRef(t),"WeakRef",t),int8Array:t=>De(L.int8Array(t),"Int8Array",t),uint8Array:t=>De(L.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>De(L.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>De(L.int16Array(t),"Int16Array",t),uint16Array:t=>De(L.uint16Array(t),"Uint16Array",t),int32Array:t=>De(L.int32Array(t),"Int32Array",t),uint32Array:t=>De(L.uint32Array(t),"Uint32Array",t),float32Array:t=>De(L.float32Array(t),"Float32Array",t),float64Array:t=>De(L.float64Array(t),"Float64Array",t),bigInt64Array:t=>De(L.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>De(L.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>De(L.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>De(L.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>De(L.dataView(t),"DataView",t),enumCase:(t,e)=>De(L.enumCase(t,e),"EnumCase",t),urlInstance:t=>De(L.urlInstance(t),"URL",t),urlString:t=>De(L.urlString(t),"string with a URL",t),truthy:t=>De(L.truthy(t),"truthy",t),falsy:t=>De(L.falsy(t),"falsy",t),nan:t=>De(L.nan(t),"NaN",t),primitive:t=>De(L.primitive(t),"primitive",t),integer:t=>De(L.integer(t),"integer",t),safeInteger:t=>De(L.safeInteger(t),"integer",t),plainObject:t=>De(L.plainObject(t),"plain object",t),typedArray:t=>De(L.typedArray(t),"TypedArray",t),arrayLike:t=>De(L.arrayLike(t),"array-like",t),domElement:t=>De(L.domElement(t),"HTMLElement",t),observable:t=>De(L.observable(t),"Observable",t),nodeStream:t=>De(L.nodeStream(t),"Node.js Stream",t),infinite:t=>De(L.infinite(t),"infinite number",t),emptyArray:t=>De(L.emptyArray(t),"empty array",t),nonEmptyArray:t=>De(L.nonEmptyArray(t),"non-empty array",t),emptyString:t=>De(L.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>De(L.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>De(L.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>De(L.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>De(L.emptyObject(t),"empty object",t),nonEmptyObject:t=>De(L.nonEmptyObject(t),"non-empty object",t),emptySet:t=>De(L.emptySet(t),"empty set",t),nonEmptySet:t=>De(L.nonEmptySet(t),"non-empty set",t),emptyMap:t=>De(L.emptyMap(t),"empty map",t),nonEmptyMap:t=>De(L.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>De(L.propertyKey(t),"PropertyKey",t),formData:t=>De(L.formData(t),"FormData",t),urlSearchParams:t=>De(L.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>De(L.evenInteger(t),"even integer",t),oddInteger:t=>De(L.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>De(L.directInstanceOf(t,e),"T",t),inRange:(t,e)=>De(L.inRange(t,e),"in range",t),any:(t,...e)=>De(L.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>De(L.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(L,{class:{value:L.class_},function:{value:L.function_},null:{value:L.null_}});Object.defineProperties(pe,{class:{value:pe.class_},function:{value:pe.function_},null:{value:pe.null_}});var q=L;u();import{EventEmitter as nQe}from"node:events";u();var tU=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},Rm=class t{static fn(e){return(...r)=>new t((n,i,o)=>{r.push(o),e(...r).then(n,i)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,n)=>{this._reject=n;let i=a=>{(!this._isCanceled||!s.shouldReject)&&(this._isPending=!1,r(a))},o=a=>{this._isPending=!1,n(a)},s=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)};Object.defineProperties(s,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a}}}),e(i,o,s)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new tU(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(Rm.prototype,Promise.prototype);u();function hXe(t){return q.object(t)&&"_onResponse"in t}var yr=class extends Error{constructor(e,r,n){if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code??"ERR_GOT_REQUEST_ERROR",this.input=r.input,hXe(n)?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),this.options=n.options):this.options=n,this.timings=this.request?.timings,q.string(r.stack)&&q.string(this.stack)){let i=this.stack.indexOf(this.message)+this.message.length,o=this.stack.slice(i).split(`
212
+ `})},setContext:(s,a)=>i.setContext(s,a),setUser:s=>i.setUser(s),getUser:()=>{let s=i.getUser();if(typeof s?.id=="string")return{id:s.id}}}}u();var qy=F(ie(),1),vM=F(tt(),1);import{stdin as n$e}from"node:process";u();var Ex=F(tt(),1);var Hy=(0,Ex.variant)({Exists:(0,Ex.fields)(),NotExists:{}}),e$e=ee.object({data:ee.unknown(),createdAt:ee.number()}),t$e=(t,e)=>Date.now()-t.valueOf()>e*60*60*1e3;function ice({filePath:t,ttlInHours:e=24*7}){return{get:async()=>{try{if(await Hi(t)){let o=e$e.parse(await Ss(t));if(!t$e(o.createdAt,e))return Hy.Exists({data:o.data})}return Hy.NotExists()}catch(i){throw new Oe({code:Pe.FailedToReadCache({path:t}),cause:i})}},set:async i=>{try{return await Bc(t,{data:i,createdAt:Date.now()}),Hy.Exists({data:i})}catch(o){throw new Oe({code:Pe.FailedToWriteCache({path:t}),cause:o})}}}}u();var Mn=F(ie(),1);u();var EM=F(ie(),1);var yx=()=>EM.default.createElement(Rt,{i18nKey:"user_feedback.contact_us",components:[EM.default.createElement(Dn,{url:"https://discord.gg/devs-on-wix"})]});var oce=({onSubmit:t})=>{let{t:e}=lt(),[r,n]=(0,Mn.useState)(!1),[i,o]=(0,Mn.useState)(),s=(0,Mn.useCallback)(c=>{o(c),c||n(!0)},[]),a=(0,Mn.useCallback)(c=>{n(!0),t({feedback:c})},[t]);return Mn.default.createElement(Mn.default.Fragment,null,Mn.default.createElement(ke,{flexDirection:"column",marginTop:1,marginBottom:1},Mn.default.createElement(Q,null,e("user_feedback.title")),Mn.default.createElement(Q,{skin:"secondary"},e("user_feedback.subtitle"))),Mn.default.createElement(p_,{label:e("user_feedback.consent.label"),onSubmit:s}),i===!0&&Mn.default.createElement(sf,{label:e("user_feedback.comments.label"),onSubmit:a}),r&&Mn.default.createElement(ke,{flexDirection:"column",marginTop:1},Mn.default.createElement(Q,null,e(i?"user_feedback.submitted":"user_feedback.declined")),Mn.default.createElement(yx,null)))};u();var yM=F(ie(),1);var sce=()=>yM.default.createElement(ke,{flexDirection:"column",marginTop:1},yM.default.createElement(yx,null));var DM={"user_feedback.title":"Your experience matters to us. Would you like to submit feedback regarding this incident?","user_feedback.subtitle":"We may contact you by email in case we need more details.","user_feedback.consent.label":"Submit feedback?","user_feedback.comments.label":"Feedback (optional)","user_feedback.submitted":"Thank you for your cooperation in helping us resolve this issue promptly.","user_feedback.declined":"Thank you for your feedback.","user_feedback.contact_us":"Reach us in Discord in case you have more questions: <0 />"};async function ace({cachePath:t,reportResult:e,errorReporter:r}){if(!n$e.isTTY||!t||!(0,vM.isType)(e,_x.Reported))return;let n=ice({filePath:t,ttlInHours:1}),i=await n.get();if((0,vM.isType)(i,Hy.Exists))return;let o=r.getUser();o?await L_(qy.default.createElement(ua,{messages:DM},qy.default.createElement(oce,{onSubmit:({feedback:s})=>{r.reportUserFeedback({userId:o.id,eventId:e.eventId,feedback:s})}}))):tN(qy.default.createElement(ua,{messages:DM},qy.default.createElement(sce,null))),await n.set({reported:!0})}function TM({debugOutputPath:t,userFeedbackCachePath:e,...r}){let n=nce(r),i=function({error:s,data:a}){let c=n.reportError(s,{data:a});rN(uce.default.createElement(zf,{error:s})),VF(t,s),SM.exitCode=1,ace({reportResult:c,errorReporter:n,cachePath:e}).catch(p=>{VF(t,p)})};return{handler:i,errorReporter:n,registerToProcessErrors:function(){SM.on("uncaughtException",s=>{i({error:s,data:{mechanism:{handled:!1,type:"uncaughtException"}}})}),SM.on("unhandledRejection",s=>{s instanceof Error&&s.message.startsWith("Build failed with")&&s.stack?.includes("esbuild")||i({error:s,data:{mechanism:{handled:!1,type:"unhandledRejection"}}})})}}}u();var mm=F(ie(),1),cce=(0,mm.createContext)(null),AM=t=>mm.default.createElement(cce.Provider,{...t}),Cu=()=>{let t=(0,mm.useContext)(cce);if(t===null)throw new Error("useErrorReporter() cannot be used without an <ErrorReporterProvider>");return t};u();var lce=F(ie(),1);function fce(t){return(0,lce.useMemo)(()=>{let e=new URL(t);return e.searchParams.set("color","developer"),e.searchParams.set("studio","true"),e.toString()},[t])}var pce=({userCode:t,verificationUri:e})=>{let r=fce(e),{reportError:n}=Cu(),[i,o]=(0,kn.useState)(null);return Co((s,a)=>{a.return&&GA(r).catch(c=>{n(c),o(c)})}),kn.default.createElement(kn.default.Fragment,null,kn.default.createElement(Rt,{i18nKey:"login.instructions_title"}),kn.default.createElement(ke,{flexDirection:"column",marginTop:1,marginBottom:1,marginLeft:2},kn.default.createElement(Rt,{i18nKey:"login.instructions_details",components:[kn.default.createElement(Q,{skin:"legacyBlue"}),kn.default.createElement(Sd,{value:"enter"}),kn.default.createElement(Dn,{url:r})],values:{code:t}})),i&&kn.default.createElement(kn.default.Fragment,null,kn.default.createElement(ke,{flexDirection:"column",marginBottom:1},kn.default.createElement(zf,{error:i})),kn.default.createElement(Rt,{i18nKey:"login.error_opening_browser",components:[kn.default.createElement(Dn,{url:r})]})))};var hce=({loginFn:t,onLogin:e,onError:r})=>{let n=cs();function i(a){n.report(oF({isSuccess:!1,...a instanceof Error?{errorType:a.name}:{errorType:"unknown",errorMessage:JSON.stringify(a)}})),r(a)}let o=ms(async({signal:a},c)=>{try{let p=await t({deviceCode:c,signal:a});n.report(oF({isSuccess:!0})),e(p)}catch(p){i(p)}}),{status:s}=wn(async()=>(n.report(JJ({})),Tc.requestDeviceCode()),[],{onSuccess:a=>{o.execute(a)},onError:i});return(0,dce.match)(s,{Error:()=>null,Loading:()=>CM.default.createElement(Gr,null),Success:({result:{userCode:a,verificationUri:c}})=>CM.default.createElement(pce,{userCode:a,verificationUri:c})})};u();var xM=F(ie(),1);u();var Gy=F(ie(),1),_ce=F(tt(),1);u();var jy=F(ie(),1),mce=F(tt(),1);var gce=({children:t})=>{let{status:e}=wn(KP,[],{onError:()=>{}});return(0,mce.match)(e,{Error:()=>null,Loading:()=>null,Success:({result:r})=>jy.default.createElement(jy.default.Fragment,null,r&&jy.default.createElement(ke,{marginBottom:1},jy.default.createElement(Rt,{i18nKey:"login.legacy_auth_notice"})),t)})};var Ece=({authStrategy:{login:t,isLoggedIn:e},onLogin:r,onError:n,children:i})=>{let{status:o,merge:s}=wn(e,[],{onSuccess:a=>{a&&r(a)},onError:n});return(0,_ce.match)(o,{Loading:()=>Gy.default.createElement(Gr,null),Error:()=>null,Success:({result:a})=>a===null?Gy.default.createElement(ua,{messages:oQ},Gy.default.createElement(gce,null,Gy.default.createElement(hce,{loginFn:t,onLogin:c=>{s({result:c}),r(c)},onError:n}))):i(a)})};var OM=({children:t,onError:e,onLogin:r})=>{let n=dc();return xM.default.createElement(Ece,{authStrategy:vE,onLogin:({userInfo:i})=>r?.(i),onError:e??n},({getAccessToken:i,getRequestHeaders:o,userInfo:s})=>xM.default.createElement(gA.Provider,{value:{getAccessToken:i,getRequestHeaders:o,userInfo:s}},t))};var{isLoggedIn:X8t}=vE;u();var Pce=F(Nce(),1),{program:_6t,createCommand:E6t,createArgument:y6t,createOption:D6t,CommanderError:v6t,InvalidArgumentError:S6t,InvalidOptionArgumentError:T6t,Command:Fce,Argument:A6t,Option:C6t,Help:x6t}=Pce.default;u();import{join as y$e}from"node:path";var Lce="https://22f50012d85a41e78a75ae13d92bd04f@o37417.ingest.sentry.io/4505232975593472",GM="wix-error.log";function Mce(t){return y$e(t,GM)}u();u();var Uce=F(ie(),1);u();u();function Sx(t){return{evid:5229,src:11,endpoint:"",params:t}}function kce(t){return{evid:5230,src:11,endpoint:"",params:t}}function Tx(t){return{evid:5231,src:11,endpoint:"",params:t}}var Bce=t=>({cliAction:({question:e,action:r,key:n,additionalInfo:i})=>t.report(Tx({question:e,action:r,key:n,additionalInfo:JSON.stringify(i)})),cliFlowStepAnswered:({question:e,answer:r,additionalInfo:n})=>t.report(Sx({question:e,answer:r,additionalInfo:JSON.stringify(n)}))});function Rs(){let t=cs();return(0,Uce.useMemo)(()=>Bce(t),[t])}u();import{randomUUID as y9e}from"node:crypto";u();u();u();Es();var ple=F(fle()),dle=F(Zd()),l9e={baseUrl:process.env.BI_BASE_URL||"https://frog.wix.com",endpoint:"",logError:!1},XM=function(){function t(){}return t.prototype.factory=function(e){var r=this;e===void 0&&(e={});var n=ft(ft({},l9e),e),i=ple.default.factory();return n.onError&&i.setPublisherFailHandler(n.onError),i.addPublisher(function(o,s){return P0(r,void 0,void 0,function(){var a,c,p,d,h;return F0(this,function(m){switch(m.label){case 0:return a=s.endpoint||n.endpoint,c=n.baseUrl,p=n.userAgent,d=n.logError,h=p?{headers:{"User-Agent":p}}:{},[4,new dle.HttpClient({baseURL:c}).get(a,{headers:h,params:o,timeout:30*1e3}).catch(function(y){return d?console.error(y.toJSON()):Promise.reject(y)})];case 1:return m.sent(),[2]}})})}),i},t}();var p4t=new XM;u();import{join as f9e}from"node:path";u();var hle="user.config.json",mle=ee.object({telemetry:ee.boolean().default(!0),tunneling:ee.boolean().default(!1)});function p9e(){return f9e(Z_(),hle)}async function gle(){let t=p9e(),r=await Hi(t)?await Ss(t):{};return mle.parse(r)}u();import{randomUUID as d9e}from"node:crypto";function JM(t,e){t.updateDefaults(ZM(e))}function ZM(t){return t?{_client_id:t,_uuid:t,logged_user_id:t,logged_account_id:t,target_account_id:t}:{_client_id:d9e()}}async function QM(t,e){let r=gr().biLoggerBaseUrl,n=r?{baseUrl:r}:{},i=ZM(e),{telemetry:o}=await gle();return new XM().factory(n).updateDefaults({localTime:()=>Date.now(),...t,...i}).setMuted(!o).logger()}u();import{uptime as E9e}from"node:process";u();var _le=F(uI(),1);import h9e from"node:os";import{platform as m9e,version as g9e}from"node:process";function Ele({cliVersion:t,flow:e}){return{...e?{flow:e}:{},cliVersion:t,isCI:_le.default,nodeVersion:g9e,osName:_9e(),osVersion:h9e.release()}}function _9e(){switch(m9e){case"darwin":return"mac";case"win32":return"windows";default:return"linux"}}var yle=()=>Math.round(E9e()*1e3);function ek({biLogger:t,command:e,flow:r,cliVersion:n,projectId:i,extensions:o}){let s=e.opts(),a=e.args,c=new Set(["apiKey"]),p=Object.fromEntries(Object.entries(s).map(([h,m])=>{let y=c.has(h)?"<censored>":m;return[h,y]})),d={command:e.name(),arguments:a.join(","),flags:Object.keys(p).length?JSON.stringify(p):""};return t.report(XJ({...Ele({cliVersion:n,flow:r}),...d,...i?{projectId:i}:{},isValid:!0})),{succeed(){t.report(iF({...d,...o?{extensions:JSON.stringify(o)}:{},duration:yle(),isSuccess:!0,isValid:!0}))},failed(h){let m=Hd(h)?{errorType:$a(h)?"SystemError":"UserError",errorName:h.name,errorMessage:h.message}:h instanceof Error?{errorType:"UnknownError",errorName:h.name,errorMessage:h.message}:{errorType:"UnknownError",errorMessage:JSON.stringify(h)};t.report(iF({...d,...m,...o?{extensions:JSON.stringify(o)}:{},duration:yle(),isSuccess:!1,isValid:!0}))}}}var tk="0.0.64";var Em={name:"@wix/create-app",description:"Create Wix apps",version:tk,author:"Ihor Machuzhak",bin:"bin/index.cjs",devDependencies:{"@commander-js/extra-typings":"^12.1.0","@types/is-git-url":"^1.0.2","@types/lodash":"^4.17.6","@types/validate-npm-package-name":"^4.0.2","@wix/bi-logger-dev-tools-data":"^1.54.0","@wix/cli-auth":"workspace:*","@wix/cli-core-definitions":"workspace:*","@wix/cli-error":"workspace:*","@wix/cli-error-reporting":"workspace:*","@wix/cli-fs":"workspace:*","@wix/cli-http-client":"workspace:*","@wix/cli-i18n":"workspace:*","@wix/cli-site-selector":"workspace:*","@wix/cli-telemetry":"workspace:*","@wix/cli-telemetry-react":"workspace:*","@wix/cli-test-overrides":"workspace:*","@wix/cli-ui-kit":"workspace:*","@wix/create-app-definitions":"workspace:*","@wix/dev-center-client":"workspace:*","@wix/gena":"workspace:*","@wix/site-list-client":"workspace:*","@wix/tsup-configs":"workspace:*",commander:"^12.1.0",execa:"^8.0.1",globby:"^13.2.2","is-git-url":"^1.0.0",lodash:"^4.17.21","package-json":"^8.1.1",react:"^18.3.1",semver:"^7.6.2",tempy:"^3.1.0","type-fest":"^3.13.1","validate-npm-package-name":"^5.0.1",variant:"^3.0.0-dev.27",zod:"^3.23.8"},engines:{node:">= 18.16"},files:["bin","build","templates"],perfer:{bundleSize:{files:[{glob:"./build/index.js",maxSize:"440kb"}]}},publishConfig:{registry:"https://registry.npmjs.org/",access:"public",versionBumpStrategy:"manual",logLevel:"verbose"},scripts:{build:"run -T tsup","build:watch":"run build --watch","dev:npm":"npx $INIT_CWD","dev:yarn":"yarn create @wix/app@portal:$INIT_CWD",test:"yarn workspace @wix/create-app-spec run test","test:watch":"yarn workspace @wix/create-app-spec run test:watch",typecheck:"run -T tsc --noEmit"},type:"module",wix:{artifact:{groupId:"com.wixpress",artifactId:"wix-create-app"},validations:{postBuild:["typecheck"]}}};var rk=async(t,e)=>{let r=await QM({command:"create-app",cliSessionId:y9e(),cliVersion:tk},e);t.on("errorReported",i=>r.report(kce({errorMessage:i.message,errorType:$a(i)?"SystemError":"UserError",errorName:i.name})));function n(i){let o={name:()=>"create-app",args:i.args,opts:()=>i.opts()};return ek({biLogger:r,command:o,cliVersion:tk,flow:"Apps"})}return{biLogger:r,reportCommandStartEvent:n}};u();var xn=F(ie(),1),Dj=F(tt(),1);u();var Wy=F(ie(),1);var vle=()=>{let{t}=lt();return Wy.default.createElement(ke,{flexDirection:"column",marginBottom:1,rowGap:1},Wy.default.createElement(Q,null,t("create_app.get_started")),Wy.default.createElement(Rt,{i18nKey:"create_app.more_info_on_app_development",components:[Wy.default.createElement(Dn,{url:"https://wix.to/dVzAH1u"})]}))};u();u();u();var wde=F(nk(),1),Qy=F(qB(),1),Zy=F(dde(),1);import XKe from"node:fs";import JKe from"node:path";u();var JB=F(qB(),1),Ade=F(Sde(),1);import $Ke from"node:process";import Tde from"node:fs";import Om from"node:path";u();function xm(t){let e=/^\\\\\?\\/.test(t),r=/[^\u0000-\u0080]+/.test(t);return e||r?t:t.replace(/\\/g,"/")}u();import{fileURLToPath as VKe}from"node:url";import{Transform as WKe}from"node:stream";var Jy=t=>t instanceof URL?VKe(t):t,rO=class extends WKe{constructor(e){super({objectMode:!0,transform(r,n,i){i(void 0,e(r)?r:void 0)}})}},nO=t=>t[0]==="!";var Cde={ignore:["**/node_modules","**/flow-typed","**/coverage","**/.git"],absolute:!0,dot:!0},xde="**/.gitignore",zKe=(t,e)=>nO(t)?"!"+Om.posix.join(e,t.slice(1)):Om.posix.join(e,t),YKe=(t,e)=>{let r=xm(Om.relative(e,Om.dirname(t.filePath)));return t.content.split(/\r?\n/).filter(n=>n&&!n.startsWith("#")).map(n=>zKe(n,r))},KKe=(t,e)=>{if(e=xm(e),Om.isAbsolute(t)){if(xm(t).startsWith(e))return Om.relative(e,t);throw new Error(`Path ${t} is not in cwd ${e}`)}return t},Ode=(t,e)=>{let r=t.flatMap(i=>YKe(i,e)),n=(0,Ade.default)().add(r);return i=>(i=Jy(i),i=KKe(i,e),i?n.ignores(xm(i)):!1)},bde=(t={})=>({cwd:Jy(t.cwd)||$Ke.cwd(),suppressErrors:!!t.suppressErrors,deep:typeof t.deep=="number"?t.deep:Number.POSITIVE_INFINITY}),Rde=async(t,e)=>{let{cwd:r,suppressErrors:n,deep:i}=bde(e),o=await(0,JB.default)(t,{cwd:r,suppressErrors:n,deep:i,...Cde}),s=await Promise.all(o.map(async a=>({filePath:a,content:await Tde.promises.readFile(a,"utf8")})));return Ode(s,r)},Ide=(t,e)=>{let{cwd:r,suppressErrors:n,deep:i}=bde(e),s=JB.default.sync(t,{cwd:r,suppressErrors:n,deep:i,...Cde}).map(a=>({filePath:a,content:Tde.readFileSync(a,"utf8")}));return Ode(s,r)};var ZKe=t=>{if(t.some(e=>typeof e!="string"))throw new TypeError("Patterns must be a string or an array of strings")},ZB=t=>(t=[...new Set([t].flat())],ZKe(t),t),QKe=t=>{if(!t.cwd)return;let e;try{e=XKe.statSync(t.cwd)}catch{return}if(!e.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},Nde=(t={})=>(t={...t,ignore:t.ignore||[],expandDirectories:t.expandDirectories===void 0?!0:t.expandDirectories,cwd:Jy(t.cwd)},QKe(t),t),Pde=t=>async(e,r)=>t(ZB(e),Nde(r)),iO=t=>(e,r)=>t(ZB(e),Nde(r)),Fde=t=>{let{ignoreFiles:e,gitignore:r}=t,n=e?ZB(e):[];return r&&n.push(xde),n},eXe=async t=>{let e=Fde(t);return Mde(e.length>0&&await Rde(e,t))},Lde=t=>{let e=Fde(t);return Mde(e.length>0&&Ide(e,t))},Mde=t=>{let e=new Set;return r=>{let n=r.path||r,i=JKe.normalize(n),o=e.has(i)||t&&t(n);return e.add(i),!o}},kde=(t,e)=>t.flat().filter(r=>e(r)),tXe=(t,e)=>(0,wde.default)(t).pipe(new rO(r=>e(r))),Bde=(t,e)=>{let r=[];for(;t.length>0;){let n=t.findIndex(o=>nO(o));if(n===-1){r.push({patterns:t,options:e});break}let i=t[n].slice(1);for(let o of r)o.options.ignore.push(i);n!==0&&r.push({patterns:t.slice(0,n),options:{...e,ignore:[...e.ignore,i]}}),t=t.slice(n+1)}return r},Ude=(t,e)=>({...e?{cwd:e}:{},...Array.isArray(t)?{files:t}:t}),Hde=async(t,e)=>{let r=Bde(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let o=Ude(i,n),s=n?{cwd:n}:void 0;return Promise.all(r.map(async a=>{let{patterns:c,options:p}=a;return[c,p.ignore]=await Promise.all([(0,Zy.default)(c,o),(0,Zy.default)(p.ignore,s)]),{patterns:c,options:p}}))},QB=(t,e)=>{let r=Bde(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let o=Ude(i,n),s=n?{cwd:n}:void 0;return r.map(a=>{let{patterns:c,options:p}=a;return c=Zy.default.sync(c,o),p.ignore=Zy.default.sync(p.ignore,s),{patterns:c,options:p}})},oO=Pde(async(t,e)=>{let[r,n]=await Promise.all([Hde(t,e),eXe(e)]),i=await Promise.all(r.map(o=>(0,Qy.default)(o.patterns,o.options)));return kde(i,n)}),y$t=iO((t,e)=>{let r=QB(t,e),n=Lde(e),i=r.map(o=>Qy.default.sync(o.patterns,o.options));return kde(i,n)}),D$t=iO((t,e)=>{let r=QB(t,e),n=Lde(e),i=r.map(o=>Qy.default.stream(o.patterns,o.options));return tXe(i,n)}),v$t=iO((t,e)=>t.some(r=>Qy.default.isDynamicPattern(r,e))),S$t=Pde(Hde),T$t=iO(QB);async function eU(t){return(await oO(["*"],{ignore:[GM],cwd:t})).length===0}u();var r_e=F(VE(),1);u();import{Agent as set}from"node:http";import{Agent as aet}from"node:https";u();u();u();var qde=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function rXe(t){return qde.includes(t)}var nXe=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...qde];function iXe(t){return nXe.includes(t)}var oXe=["null","undefined","string","number","bigint","boolean","symbol"];function sXe(t){return oXe.includes(t)}function bm(t){return e=>typeof e===t}var{toString:aXe}=Object.prototype,eD=t=>{let e=aXe.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&L.domElement(t))return"HTMLElement";if(iXe(e))return e},Vt=t=>e=>eD(e)===t;function L(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(L.observable(t))return"Observable";if(L.array(t))return"Array";if(L.buffer(t))return"Buffer";let e=eD(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}L.undefined=bm("undefined");L.string=bm("string");var uXe=bm("number");L.number=t=>uXe(t)&&!L.nan(t);L.bigint=bm("bigint");L.function_=bm("function");L.null_=t=>t===null;L.class_=t=>L.function_(t)&&t.toString().startsWith("class ");L.boolean=t=>t===!0||t===!1;L.symbol=bm("symbol");L.numericString=t=>L.string(t)&&!L.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));L.array=(t,e)=>Array.isArray(t)?L.function_(e)?t.every(r=>e(r)):!0:!1;L.buffer=t=>t?.constructor?.isBuffer?.(t)??!1;L.blob=t=>Vt("Blob")(t);L.nullOrUndefined=t=>L.null_(t)||L.undefined(t);L.object=t=>!L.null_(t)&&(typeof t=="object"||L.function_(t));L.iterable=t=>L.function_(t?.[Symbol.iterator]);L.asyncIterable=t=>L.function_(t?.[Symbol.asyncIterator]);L.generator=t=>L.iterable(t)&&L.function_(t?.next)&&L.function_(t?.throw);L.asyncGenerator=t=>L.asyncIterable(t)&&L.function_(t.next)&&L.function_(t.throw);L.nativePromise=t=>Vt("Promise")(t);var cXe=t=>L.function_(t?.then)&&L.function_(t?.catch);L.promise=t=>L.nativePromise(t)||cXe(t);L.generatorFunction=Vt("GeneratorFunction");L.asyncGeneratorFunction=t=>eD(t)==="AsyncGeneratorFunction";L.asyncFunction=t=>eD(t)==="AsyncFunction";L.boundFunction=t=>L.function_(t)&&!t.hasOwnProperty("prototype");L.regExp=Vt("RegExp");L.date=Vt("Date");L.error=Vt("Error");L.map=t=>Vt("Map")(t);L.set=t=>Vt("Set")(t);L.weakMap=t=>Vt("WeakMap")(t);L.weakSet=t=>Vt("WeakSet")(t);L.weakRef=t=>Vt("WeakRef")(t);L.int8Array=Vt("Int8Array");L.uint8Array=Vt("Uint8Array");L.uint8ClampedArray=Vt("Uint8ClampedArray");L.int16Array=Vt("Int16Array");L.uint16Array=Vt("Uint16Array");L.int32Array=Vt("Int32Array");L.uint32Array=Vt("Uint32Array");L.float32Array=Vt("Float32Array");L.float64Array=Vt("Float64Array");L.bigInt64Array=Vt("BigInt64Array");L.bigUint64Array=Vt("BigUint64Array");L.arrayBuffer=Vt("ArrayBuffer");L.sharedArrayBuffer=Vt("SharedArrayBuffer");L.dataView=Vt("DataView");L.enumCase=(t,e)=>Object.values(e).includes(t);L.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;L.urlInstance=t=>Vt("URL")(t);L.urlString=t=>{if(!L.string(t))return!1;try{return new URL(t),!0}catch{return!1}};L.truthy=t=>!!t;L.falsy=t=>!t;L.nan=t=>Number.isNaN(t);L.primitive=t=>L.null_(t)||sXe(typeof t);L.integer=t=>Number.isInteger(t);L.safeInteger=t=>Number.isSafeInteger(t);L.plainObject=t=>{if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};L.typedArray=t=>rXe(eD(t));var lXe=t=>L.safeInteger(t)&&t>=0;L.arrayLike=t=>!L.nullOrUndefined(t)&&!L.function_(t)&&lXe(t.length);L.inRange=(t,e)=>{if(L.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(L.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var fXe=1,pXe=["innerHTML","ownerDocument","style","attributes","nodeValue"];L.domElement=t=>L.object(t)&&t.nodeType===fXe&&L.string(t.nodeName)&&!L.plainObject(t)&&pXe.every(e=>e in t);L.observable=t=>t?t===t[Symbol.observable]?.()||t===t["@@observable"]?.():!1;L.nodeStream=t=>L.object(t)&&L.function_(t.pipe)&&!L.observable(t);L.infinite=t=>t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY;var jde=t=>e=>L.integer(e)&&Math.abs(e%2)===t;L.evenInteger=jde(0);L.oddInteger=jde(1);L.emptyArray=t=>L.array(t)&&t.length===0;L.nonEmptyArray=t=>L.array(t)&&t.length>0;L.emptyString=t=>L.string(t)&&t.length===0;var dXe=t=>L.string(t)&&!/\S/.test(t);L.emptyStringOrWhitespace=t=>L.emptyString(t)||dXe(t);L.nonEmptyString=t=>L.string(t)&&t.length>0;L.nonEmptyStringAndNotWhitespace=t=>L.string(t)&&!L.emptyStringOrWhitespace(t);L.emptyObject=t=>L.object(t)&&!L.map(t)&&!L.set(t)&&Object.keys(t).length===0;L.nonEmptyObject=t=>L.object(t)&&!L.map(t)&&!L.set(t)&&Object.keys(t).length>0;L.emptySet=t=>L.set(t)&&t.size===0;L.nonEmptySet=t=>L.set(t)&&t.size>0;L.emptyMap=t=>L.map(t)&&t.size===0;L.nonEmptyMap=t=>L.map(t)&&t.size>0;L.propertyKey=t=>L.any([L.string,L.number,L.symbol],t);L.formData=t=>Vt("FormData")(t);L.urlSearchParams=t=>Vt("URLSearchParams")(t);var Gde=(t,e,r)=>{if(!L.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};L.any=(t,...e)=>(L.array(t)?t:[t]).some(n=>Gde(Array.prototype.some,n,e));L.all=(t,...e)=>Gde(Array.prototype.every,t,e);var De=(t,e,r,n={})=>{if(!t){let{multipleValues:i}=n,o=i?`received values of types ${[...new Set(r.map(s=>`\`${L(s)}\``))].join(", ")}`:`received value of type \`${L(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${o}.`)}},pe={undefined:t=>De(L.undefined(t),"undefined",t),string:t=>De(L.string(t),"string",t),number:t=>De(L.number(t),"number",t),bigint:t=>De(L.bigint(t),"bigint",t),function_:t=>De(L.function_(t),"Function",t),null_:t=>De(L.null_(t),"null",t),class_:t=>De(L.class_(t),"Class",t),boolean:t=>De(L.boolean(t),"boolean",t),symbol:t=>De(L.symbol(t),"symbol",t),numericString:t=>De(L.numericString(t),"string with a number",t),array:(t,e)=>{De(L.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>De(L.buffer(t),"Buffer",t),blob:t=>De(L.blob(t),"Blob",t),nullOrUndefined:t=>De(L.nullOrUndefined(t),"null or undefined",t),object:t=>De(L.object(t),"Object",t),iterable:t=>De(L.iterable(t),"Iterable",t),asyncIterable:t=>De(L.asyncIterable(t),"AsyncIterable",t),generator:t=>De(L.generator(t),"Generator",t),asyncGenerator:t=>De(L.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>De(L.nativePromise(t),"native Promise",t),promise:t=>De(L.promise(t),"Promise",t),generatorFunction:t=>De(L.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>De(L.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>De(L.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>De(L.boundFunction(t),"Function",t),regExp:t=>De(L.regExp(t),"RegExp",t),date:t=>De(L.date(t),"Date",t),error:t=>De(L.error(t),"Error",t),map:t=>De(L.map(t),"Map",t),set:t=>De(L.set(t),"Set",t),weakMap:t=>De(L.weakMap(t),"WeakMap",t),weakSet:t=>De(L.weakSet(t),"WeakSet",t),weakRef:t=>De(L.weakRef(t),"WeakRef",t),int8Array:t=>De(L.int8Array(t),"Int8Array",t),uint8Array:t=>De(L.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>De(L.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>De(L.int16Array(t),"Int16Array",t),uint16Array:t=>De(L.uint16Array(t),"Uint16Array",t),int32Array:t=>De(L.int32Array(t),"Int32Array",t),uint32Array:t=>De(L.uint32Array(t),"Uint32Array",t),float32Array:t=>De(L.float32Array(t),"Float32Array",t),float64Array:t=>De(L.float64Array(t),"Float64Array",t),bigInt64Array:t=>De(L.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>De(L.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>De(L.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>De(L.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>De(L.dataView(t),"DataView",t),enumCase:(t,e)=>De(L.enumCase(t,e),"EnumCase",t),urlInstance:t=>De(L.urlInstance(t),"URL",t),urlString:t=>De(L.urlString(t),"string with a URL",t),truthy:t=>De(L.truthy(t),"truthy",t),falsy:t=>De(L.falsy(t),"falsy",t),nan:t=>De(L.nan(t),"NaN",t),primitive:t=>De(L.primitive(t),"primitive",t),integer:t=>De(L.integer(t),"integer",t),safeInteger:t=>De(L.safeInteger(t),"integer",t),plainObject:t=>De(L.plainObject(t),"plain object",t),typedArray:t=>De(L.typedArray(t),"TypedArray",t),arrayLike:t=>De(L.arrayLike(t),"array-like",t),domElement:t=>De(L.domElement(t),"HTMLElement",t),observable:t=>De(L.observable(t),"Observable",t),nodeStream:t=>De(L.nodeStream(t),"Node.js Stream",t),infinite:t=>De(L.infinite(t),"infinite number",t),emptyArray:t=>De(L.emptyArray(t),"empty array",t),nonEmptyArray:t=>De(L.nonEmptyArray(t),"non-empty array",t),emptyString:t=>De(L.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>De(L.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>De(L.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>De(L.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>De(L.emptyObject(t),"empty object",t),nonEmptyObject:t=>De(L.nonEmptyObject(t),"non-empty object",t),emptySet:t=>De(L.emptySet(t),"empty set",t),nonEmptySet:t=>De(L.nonEmptySet(t),"non-empty set",t),emptyMap:t=>De(L.emptyMap(t),"empty map",t),nonEmptyMap:t=>De(L.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>De(L.propertyKey(t),"PropertyKey",t),formData:t=>De(L.formData(t),"FormData",t),urlSearchParams:t=>De(L.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>De(L.evenInteger(t),"even integer",t),oddInteger:t=>De(L.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>De(L.directInstanceOf(t,e),"T",t),inRange:(t,e)=>De(L.inRange(t,e),"in range",t),any:(t,...e)=>De(L.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>De(L.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(L,{class:{value:L.class_},function:{value:L.function_},null:{value:L.null_}});Object.defineProperties(pe,{class:{value:pe.class_},function:{value:pe.function_},null:{value:pe.null_}});var q=L;u();import{EventEmitter as nQe}from"node:events";u();var tU=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},Rm=class t{static fn(e){return(...r)=>new t((n,i,o)=>{r.push(o),e(...r).then(n,i)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,n)=>{this._reject=n;let i=a=>{(!this._isCanceled||!s.shouldReject)&&(this._isPending=!1,r(a))},o=a=>{this._isPending=!1,n(a)},s=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)};Object.defineProperties(s,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a}}}),e(i,o,s)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new tU(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(Rm.prototype,Promise.prototype);u();function hXe(t){return q.object(t)&&"_onResponse"in t}var yr=class extends Error{constructor(e,r,n){if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code??"ERR_GOT_REQUEST_ERROR",this.input=r.input,hXe(n)?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),this.options=n.options):this.options=n,this.timings=this.request?.timings,q.string(r.stack)&&q.string(this.stack)){let i=this.stack.indexOf(this.message)+this.message.length,o=this.stack.slice(i).split(`
213
213
  `).reverse(),s=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
214
214
  `).reverse();for(;s.length>0&&s[0]===o[0];)o.shift();this.stack=`${this.stack.slice(0,i)}${o.reverse().join(`
215
215
  `)}${s.reverse().join(`